Advertisement
Guest User

Untitled

a guest
Dec 15th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement