Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game.Players.PlayerAdded:Connect(function(Player)
- Player.CharacterAdded:Connect(function(Character)
- local HumanoidRootPart = Character:WaitForChild('HumanoidRootPart')
- local Humanoid = Character:WaitForChild('Humanoid')
- local StartJump = nil
- Humanoid.FreeFalling:Connect(function(Active)
- if Active then
- StartJump = HumanoidRootPart.Position.Y
- else
- local JumpHeight = StartJump - HumanoidRootPart.Position.Y
- if JumpHeight > HeightRequired then
- Humanoid:TakeDamage((JumpHeight - HeightRequired) * DamageScale)
- end
- end
- end)
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement