Advertisement
Joriangames

Fall Damage script

Oct 22nd, 2021
1,924
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. --[[
  2. Thanks for using this script
  3. This script is made by Joriangames/Problox Studio Scripts
  4. Want to know how to use this and script explanation?
  5. Check the video here: https://youtu.be/49PD-ER8Vtc
  6.  
  7. ]]
  8. local minF = 15
  9. local maxF = 45
  10.  
  11. game.Players.PlayerAdded:Connect(function(plr)
  12. plr.CharacterAdded:Connect(function(char)
  13. local hum = char:WaitForChild("Humanoid")
  14. local humR = char:WaitForChild("HumanoidRootPart")
  15. local humRHeight
  16. wait(3)
  17.  
  18. hum.FreeFalling:Connect(function(Standing)
  19. if Standing then
  20. humRHeight = humR.Position.Y
  21.  
  22. elseif not Standing then
  23. local fallHeight = humRHeight - humR.Position.Y
  24. if fallHeight >= maxF then
  25. char.Head:Destroy()
  26. elseif fallHeight >= minF then
  27. hum.Health = hum.Health -20
  28. end
  29. end
  30. end)
  31. end)
  32. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement