local function UltimateRollJumpLock(player) for player in players.iterate do if not (player and player.valid and player.mo) then continue end if (player.pflags & PF_SPINNING) and not (player.mo and player.mo.skin == "charmy") -- Exclude from the whole script and not (player.pflags & PF_JUMPED) and not P_IsObjectOnGround(player.mo) and not (player.mo.eflags & (MFE_TOUCHWATER)) then player.rolledge = true player.pflags = $|PF_JUMPED|PF_THOKKED&~PF_SPINNING if player.rolledge and not (player.mo and player.mo.skin == "silver") --Exclude only from the change of state and not (player.mo and player.mo.skin == "bomb") and not (player.mo and player.mo.skin == "mario") player.mo.state = S_PLAY_JUMP end end if player.rolledge == true player.powerup = true end if player.powerup == true player.powers[pw_strong] = $ | (STR_ANIM | STR_WALL) end if player.rolledge == true and (player.mo and player.mo.skin == "trip") and (player.cmd.buttons & BT_JUMP) or (player.mo and player.mo.skin == "mario") and not (player.mo.state == S_PLAY_ROLL) player.rolledge = false player.powerup = false end if player.rolledge == true and P_IsObjectOnGround(player.mo) player.rolledge = false player.powerup = false end --water skipping activation if player.rolledge and player.powerup and (player.mo.eflags & (MFE_TOUCHWATER)) player.pflags = $|PF_SPINNING&~PF_JUMPED player.pflags = $ & ~PF_THOKKED end -- Jump if not P_IsObjectOnGround(player.mo) and (player.pflags & PF_SPINNING) and (player.pflags & PF_JUMPED) player.pflags = $ & ~PF_SPINNING end end end addHook("PreThinkFrame", UltimateRollJumpLock) addHook("PostThinkFrame", UltimateRollJumpLock)