addHook("ThinkFrame", function(player) for player in players.iterate do if player.mo.skin ~= "sonic" then continue end --Tyron wrote the delay code for me because im too dumb to actually figure it out player.puttcount = $ or 0 -- make sure cooldown isn't nil, then... player.puttcooldown = $ or 0 -- make sure cooldown isn't nil, then... player.puttcooldown = max($-1, 0) -- if it's greater than 0, reduce it by 1 if player.mo.state == S_PLAY_ROLL and player.cmd.buttons & BT_USE and not player.puttcooldown then if player.puttstop == 0 then if player.puttcount < 5 then A_Thrust(player.mo, 20, 0) A_PlaySound(player.mo, 19) end end player.puttstop = 1 if player.puttcount < 5 then player.puttcount = player.puttcount + 1 end player.puttcooldown = 15 -- and set the cooldown else player.puttstop = 0 end if player.mo.state == S_PLAY_STND then player.puttcount = 0 end if player.mo.state == S_PLAY_WALK then player.puttcount = 0 end if player.mo.state == S_PLAY_RUN then player.puttcount = 0 end if player.mo.state == S_PLAY_DASH then player.puttcount = 0 end end end) addHook("SpinSpecial", function(player) if player.mo.skin ~= "sonic" then return end if player.mo.state == S_PLAY_SPINDASH then player.mo.state = S_PLAY_ROLL end end)