SHARE
TWEET

INSTA WIN

ipastetomuch Apr 6th, 2019 (edited) 5,933 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top