--Drop Dash replacement script by Hatninja --You are free to modify this to your liking! addHook("JumpSpecial", function(pl) if pl.mo.skin == "sonic" then pl.ability = PA_NONE if pl.panim == PA_ROLL and not P_IsObjectOnGround(pl.mo) and not (pl.pflags & PF_JUMPDOWN) and (pl.cmd.buttons & BT_JUMP) and not (pl.pflags & PF_THOKKED) then pl.pflags = $1 | PF_THOKKED pl.dropcharged = true P_SpawnThokMobj(pl) S_StartSound(pl.mo, sfx_spndsh, pl) end end end) addHook("ThinkFrame", function() for player in players.iterate if player.mo if player.mo.prevmomz == nil player.mo.prevmomz = 0 end if not player.spectator and player.charability2 == CA2_SPINDASH then --An active player with thok & spin-dash if not (player.mo.eflags & MFE_JUSTHITFLOOR) then if not (player.cmd.buttons & BT_JUMP) and player.dropcharged then player.dropcharged = false end else if player.dropcharged and player.cmd.buttons & BT_JUMP then --Do the dash! player.pflags = $1 | PF_SPINNING player.dropcharged = false S_StartSound(player.mo, sfx_zoom, player) if player.mo.prevmomz > -12*FRACUNIT if player.speed <= 10*FRACUNIT P_InstaThrust(player.mo, player.mo.angle, 10*FRACUNIT) else P_InstaThrust(player.mo, player.mo.angle, player.speed) end else P_InstaThrust(player.mo, player.mo.angle, (-(player.mo.prevmomz*2))+player.speed) end end end player.mo.prevmomz = player.mo.momz end end end end)