Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local UserIS = game:GetService("UserInputService")
- local F = Enum.KeyCode.F
- Press = false
- function Jump()
- if UserIS:IsKeyDown(F) and Press == false then
- Press = true
- UserIS.JumpRequest:connect(function()
- game:GetService("Players").LocalPlayer.Character:FindFirstChildofClass("Humanoid"):ChangeState("Jumping")
- end)
- else if UserIS:IsKeyDown(F) and Press == true then
- Press = false
- end
- UserIS.JumpRequest:connect(function()
- game:GetService("Players").LocalPlayer.Character:FindFirstChildofClass("Humanoid"):ChangeState("Idle")
- end
- )
- end
- end
- UserIS.InputBegan:connect(Jump)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement