local function MyCustomAbility(player) if player.mo.skin ~= "sonic" then--if the player is not sonic return end--we do not run the script if (player.cmd.buttons & BT_USE) then -- If the player is pressing Spin if P_IsObjectOnGround(player.mo) ~= true then--and the player is not on the ground if player.mo.state == S_PLAY_FALL then-- if the player is in their falling animation player.mo.state = S_PLAY_ROLL --we play the rolling animation player.pflags = $|PF_SPINNING --we add the spinning flag so the game will know we are spinning S_StartSound(player.mo, sfx_zoom)--then we play the sound from realeasing the spindash end end end end addHook("PlayerThink", MyCustomAbility)