Advertisement
1_F0

Untitled

Jun 22nd, 2020
1,624
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. --made by pomegranate on v3rmillion
  2. local UIS = game:GetService("UserInputService")
  3. local rs = game:GetService("RunService").RenderStepped
  4. local lp = game.Players.LocalPlayer
  5. local c = lp.Character
  6.  
  7. UIS.InputBegan:connect(function(input, processed)
  8. if processed then return end
  9. c.Humanoid.JumpPower = 50 -- sets the JumpPower from 0 to 50 (default JumpPower)
  10. if UIS:IsKeyDown(Enum.KeyCode.Space) then -- if the space key is pressed
  11. repeat rs:Wait() --wait 1 frame, and jump if you aren't in air every frame
  12. if c.Humanoid.FloorMaterial ~= Enum.Material.Air then -- checks if the player isn't in air
  13. c.Humanoid:ChangeState(Enum.HumanoidStateType.Jumping) -- Humanoid.Jump = true does not work, so I used changestate
  14. end
  15. until UIS:IsKeyDown(Enum.KeyCode.Space) == false
  16. end
  17. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement