local skin_name = "sonic" // The name of the character!
local super_rings = 150 // How many rings we need to be Super?
local super_button = BT_USE // What button we'll use to go Super? (BT_SPIN same as BT_USE)
addHook("PlayerThink", function(player) // PlayerThink runs every frame as long as there's at least one player in the level
if player.mo // Do we exist?
and player.mo.valid //
and player.mo.health // Are we alive?
and not (player.pflags & PF_THOKKED) // We aren't using any ability?
and not player.powers[pw_super] // No Super Saiyans!
and skins[skin_name].flags & SF_SUPER // Can go Super?
and All7Emeralds(emeralds) // We have all the 7 funny rocks? (Singleplayer/Co-op)
and ((skin_name != "all" // If we setted an specific character...
and player.mo.skin == skin_name) // ...check if we're using that character
or skin_name == "all") // Else, if we setted "all", this will affect any character
player.charflags = $ & ~SF_SUPER // Can't be Super :knuxsmug:
if player.pflags & PF_JUMPED // We've jumped?
and player.cmd.buttons & super_button // Pressing our Super button?
and not P_IsObjectOnGround(player.mo) // We are NOT on grounded?
and player.rings >= super_rings // We have the required amount of rings?
player.charflags = $|SF_SUPER // u can be supah :>
P_DoSuperTransformation(player) // SUPERRRR TRANSFORMATIONNNN!!!!!!!!
end
end
end)