Advertisement
Meliodas0_0

Inf jump++

Feb 1st, 2020
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. local Player = game:GetService'Players'.LocalPlayer;
  2. local UIS = game:GetService'UserInputService';
  3.  
  4. _G.JumpHeight = 100;
  5.  
  6. function Action(Object, Function) if Object ~= nil then Function(Object); end end
  7.  
  8. UIS.InputBegan:connect(function(UserInput)
  9. if UserInput.UserInputType == Enum.UserInputType.Keyboard and UserInput.KeyCode == Enum.KeyCode.Space then
  10. Action(Player.Character.Humanoid, function(self)
  11. if self:GetState() == Enum.HumanoidStateType.Jumping or self:GetState() == Enum.HumanoidStateType.Freefall then
  12. Action(self.Parent.HumanoidRootPart, function(self)
  13. self.Velocity = Vector3.new(0, _G.JumpHeight, 0);
  14. end)
  15. end
  16. end)
  17. end
  18. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement