local d=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local x=game.Players.LocalPlayer local z=false d.JumpRequest:Connect(function()local d=x.Character if not z then if d.Humanoid.FloorMaterial==Enum.Material.Air then return end z=true d.Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)task.wait(jumpCooldown)z=false else d.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping,false)end end)



local UserInputService = game:GetService('UserInputService')

local plr = game.Players.LocalPlayer
local Jumped = false --Debounce

UserInputService.JumpRequest:Connect(function()
	local char = plr.Character -- some may place this script in StarterPlayer...
	if not Jumped then
		if char.Humanoid.FloorMaterial == Enum.Material.Air then return end -- Prevent mid air jumps
		Jumped = true --Making it true do it does not loop twice
		char.Humanoid:ChangeState(Enum.HumanoidStateType.Jumping) --Making the character jump
		task.wait(jumpCooldown) -- yield x
		Jumped = false --Make it false so we can repeat it again
	else
		char.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
	end
end)
