dats-scythe

No fall damage

Jul 3rd, 2026
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. -- ==================== NO FALL DAMAGE ====================
  2. local noFallDamageEnabled = false
  3. local fallConnection = nil
  4. local healthConnection = nil
  5.  
  6. local function enableNoFallDamage()
  7. if fallConnection then return end
  8. noFallDamageEnabled = true
  9.  
  10. local character = player.Character or player.CharacterAdded:Wait()
  11. local humanoid = character:WaitForChild("Humanoid")
  12.  
  13. healthConnection = humanoid.HealthChanged:Connect(function(health)
  14. if health < humanoid.MaxHealth then
  15. humanoid.Health = humanoid.MaxHealth
  16. end
  17. end)
  18.  
  19. fallConnection = RunService.Heartbeat:Connect(function()
  20. if not noFallDamageEnabled then return end
  21. local char = player.Character
  22. if not char then return end
  23. local root = char:FindFirstChild("HumanoidRootPart")
  24. if not root or humanoid.Health <= 0 then return end
  25.  
  26. if root.Velocity.Y < -40 then
  27. local vel = root.Velocity
  28. root.Velocity = Vector3.new(vel.X, math.max(vel.Y, -25), vel.Z)
  29. end
  30. end)
  31. end
  32.  
  33. local function disableNoFallDamage()
  34. noFallDamageEnabled = false
  35. if healthConnection then
  36. healthConnection:Disconnect()
  37. healthConnection = nil
  38. end
  39. if fallConnection then
  40. fallConnection:Disconnect()
  41. fallConnection = nil
  42. end
  43. end
  44.  
  45. MainTab:CreateToggle({
  46. Name = "No Fall Damage",
  47. CurrentValue = false,
  48. Flag = "NoFallDamage",
  49. Callback = function(Value)
  50. if Value then
  51. enableNoFallDamage()
  52. else
  53. disableNoFallDamage()
  54. end
  55. end,
  56. })
Advertisement
Add Comment
Please, Sign In to add comment