Advertisement
AwesomeMrBird

FE2 Infinite Jump

Oct 19th, 2019
4,606
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. local Player = game:GetService'Players'.LocalPlayer;
  2. local UIS = game:GetService'UserInputService';
  3.  
  4. _G.JumpHeight = 50;
  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)
  19. end)
  20. Jump.MouseButton1Down:connect(function()
  21. local UIS = game:GetService("UserInputService")
  22.  
  23. local Player = game.Players.LocalPlayer
  24. local Mouse = Player:GetMouse()
  25.  
  26.  
  27. function GetCharacter()
  28. return game.Players.LocalPlayer.Character
  29. end
  30.  
  31. function Teleport(pos)
  32. local Char = GetCharacter()
  33. if Char then
  34. Char:MoveTo(pos)
  35. end
  36. end
  37.  
  38.  
  39. UIS.InputBegan:Connect(function(input)
  40. if input.UserInputType == Enum.UserInputType.MouseButton1 and UIS:IsKeyDown(Enum.KeyCode.LeftControl) then
  41. Teleport(Mouse.Hit.p)
  42. end
  43. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement