Advertisement
Kin_N0ob

Untitled

Oct 22nd, 2020
2,268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. local UserIS = game:GetService("UserInputService")
  2. local F = Enum.KeyCode.F
  3. Press = false
  4.  
  5. function Jump()
  6.     if UserIS:IsKeyDown(F) and Press == false then
  7.         Press = true
  8.         UserIS.JumpRequest:connect(function()
  9.             game:GetService("Players").LocalPlayer.Character:FindFirstChildofClass("Humanoid"):ChangeState("Jumping")
  10.             end)
  11.             else if UserIS:IsKeyDown(F) and Press == true then
  12.             Press = false
  13.             end
  14.             UserIS.JumpRequest:connect(function()
  15.                 game:GetService("Players").LocalPlayer.Character:FindFirstChildofClass("Humanoid"):ChangeState("Idle")
  16.             end
  17.         )
  18.     end
  19. end
  20. UserIS.InputBegan:connect(Jump)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement