Advertisement
Resioku

Untitled

Oct 6th, 2022
797
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.04 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.        
  20. --Notification so you know it activated
  21. game.StarterGui:SetCore("SendNotification", {
  22. Title = "Infinite Jump"; -- the title
  23. Text = "Enabled!"; -- what the text says
  24. --Icon = "rbxassetid://57254792"; -- the image if u want
  25. Duration = 5; -- how long the notification should in secounds
  26. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement