local N=0 local function y()if hum.FloorMaterial==Enum.Material.Air then if N>=settings.ExtraJumps then return end N+=1 hum:ChangeState(Enum.HumanoidStateType.Jumping)event:FireServer()JumpEffect(char)end end hum.StateChanged:connect(function(y,o)if o==Enum.HumanoidStateType.Landed then N=0 end end)

local jumps = 0
local function ToggleFlying()
	if hum.FloorMaterial == Enum.Material.Air then --Is double jumping
		if jumps >= settings.ExtraJumps then return end
		jumps += 1
		
		hum:ChangeState(Enum.HumanoidStateType.Jumping) --Jump
		event:FireServer() --Tell other players that we are double jumping
		
		JumpEffect(char) --Visual Effect
	end
end
hum.StateChanged:connect(function(old, new) --Player landed
	if new == Enum.HumanoidStateType.Landed then
		jumps = 0
	end
end)
