local maxJumps = 2 -- amount of jumps in the air local jumpCooldown = 0.1 -- how fast you can jump again while in the air local userInputService = game:GetService("UserInputService") local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local jumpCount = 0 local canJump = false local function onStateChanged(oldState, newState) if newState == Enum.HumanoidStateType.Landed then jumpCount = 0 canJump = false elseif newState == Enum.HumanoidStateType.Freefall then wait(jumpCooldown) canJump = true elseif newState == Enum.HumanoidStateType.Jumping then canJump = false jumpCount = jumpCount + 1 end end humanoid.StateChanged:Connect(onStateChanged) userInputService.JumpRequest:Connect(function() if canJump and jumpCount < maxJumps then humanoid:ChangeState(Enum.HumanoidStateType.Jumping) end end)
@BotamisPrime Жыл бұрын
Holy crap tysm I needed this for my new obby
@mazesunshine3946 Жыл бұрын
You're Welcome!
@Mittin1 Жыл бұрын
well it works and its useful thank yu brother
@mazesunshine3946 Жыл бұрын
Your welcome brother!
@LukaPlemenitiАй бұрын
it rlly works thank you your awesome 😀
@ェエェ9 ай бұрын
how do i add an animation to it
@Relatable_as_hell2 ай бұрын
You are the best person ever
@CuRioSitYNeXusQueSt7 ай бұрын
i tried it and worked but only once, if i die its doesnt work
@BallerIsCool96622 күн бұрын
put it in starter character scripts instead. worked for me