--\\ Only Edit Above //--



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)
