SHARE
TWEET

Untitled

a guest Dec 15th, 2018 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. game.Players.PlayerAdded:Connect(function(Player)
  3.     Player.CharacterAdded:Connect(function(Character)
  4.         local HumanoidRootPart = Character:WaitForChild('HumanoidRootPart')
  5.         local Humanoid = Character:WaitForChild('Humanoid')
  6.        
  7.         local StartJump = nil
  8.        
  9.         Humanoid.FreeFalling:Connect(function(Active)
  10.             if Active then
  11.                 StartJump = HumanoidRootPart.Position.Y
  12.             else
  13.                 local JumpHeight = StartJump - HumanoidRootPart.Position.Y
  14.                
  15.                 if JumpHeight > HeightRequired then
  16.                     Humanoid:TakeDamage((JumpHeight - HeightRequired) * DamageScale)
  17.                 end
  18.             end
  19.         end)
  20.     end)
  21. 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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top