//No airwalk, no airfall, but airroll
addHook("PlayerThink", function(player)
	if player.mo and player.mo.skin == "romhack"
	and not P_IsObjectOnGround(player.mo)
		if player.powers[pw_carry] == CR_ROLLOUT
			return
		end
		if player.mo.state == S_PLAY_WALK
		or player.mo.state == S_PLAY_RUN
		or player.mo.state == S_PLAY_DASH
		or player.mo.state == S_PLAY_FALL
			player.mo.state = S_PLAY_ROLL
			player.pflags = $ |PF_JUMPED
		end
	end
end)

//funni trails
addHook("PlayerThink", function(player)
   if (player.mo and player.mo.valid and player.mo.skin == "romhack")
   local mo = player.mo
   
	if mo.state == S_PLAY_DASH or mo.state == S_PLAY_ROLL or mo.state == S_PLAY_FLY
		local speedtrail = P_SpawnGhostMobj(player.mo) 
		speedtrail.colorized = false
		speedtrail.color = player.mo.color
		speedtrail.fuse = 5
		speedtrail.blendmode = AST_TRANSLUCENT
	end
	if mo.state == S_PLAY_DASH or mo.state == S_PLAY_ROLL
		player.powers[pw_strong] = STR_ANIM|STR_WALL|STR_PUNCH
	end
	if mo.state == S_PLAY_FLY
		player.powers[pw_strong] = STR_ANIM|STR_FLOOR|STR_SPRING|STR_SPIKE
	end
end
end)

//air dashy cuz fun	
addHook("JumpSpinSpecial", function(player)
    if player.mo and player.mo.skin == "romhack"
	and not (player.pflags & PF_THOKKED)
		player.pflags = $1|PF_THOKKED
		P_InstaThrust(player.mo, player.mo.angle, FRACUNIT*70)
		P_SetObjectMomZ(player.mo,0*FRACUNIT)
		S_StartSound(player.mo, sfx_zoom)
		player.mo.state = S_PLAY_ROLL
		player.lestomping = 0
	end
end)

//stomp
addHook("JumpSpecial", function(player)
	player.lestomping = 0
end)
addHook("PlayerThink", function(player)
	if player.lestomping == nil
		player.lestomping = 0
	end
    if player.mo and player.mo.skin == "romhack"
	and player.lestomping == 1
	and P_IsObjectOnGround(player.mo)
		player.lestomping = 2
		player.mo.state = S_PLAY_FALL
	end
	if player.mo and player.mo.skin == "romhack"
	and player.lestomping == 1
	and P_PlayerInPain(player)
		player.lestomping = 0
	end
	if player.mo and player.mo.skin == "romhack"
	and player.lestomping == 1
	and P_CheckDeathPitCollide(player.mo)
		player.lestomping = 0
	end
	if player.mo and player.mo.skin == "romhack"
	and player.lestomping == 1
	and player.mo.state == S_PLAY_SPRING
		player.lestomping = 0
	end
	if player.mo and player.mo.skin == "romhack"
	and player.lestomping == 1
		player.mo.state = S_PLAY_FLY
	end
	if player.mo and player.mo.skin == "romhack"
	and (player.cmd.buttons & BT_CUSTOM1)
	and not P_IsObjectOnGround(player.mo)
	and player.lestomping == 0
		player.lestomping = 1
		S_StartSound(player.mo,	sfx_zoom)
		P_SetObjectMomZ(player.mo,-40*FRACUNIT)
	end
end)

addHook("PlayerCanDamage", function(player)
    if player.skin == "romhack"
	and player.lestomping == 1
		return true
    end
end)