Natural Disaster Survival
20.5k Views
292 Executions

Anti fall damage

Natural Disaster Survival
0vdi
0vdiPublished 5
2 years ago
Please login to perform these actions:

Anti fall damage is a Natural Disaster Survival script for Roblox, uploaded to ScriptBlox on Oct 22, 2024.

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

A basic anti fall damage script

Updates

  1. Script edited: Create script

View Raw
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")

local FallingTime = 0
local slowFallApplied = false

-- Slow Fall Settings
local fallThreshold = 0.3 -- Time in seconds before slow fall is applied
local slowFallSpeed = Vector3.new(0, -50, 0) -- Maximum slow fall speed
local slowFallMaxForce = Vector3.new(0, 5000, 0) -- Max force applied for slow falling

-- Create a BodyVelocity for the slow fall effect
local slowFallBV = Instance.new("BodyVelocity")
slowFallBV.Velocity = slowFallSpeed
slowFallBV.MaxForce = slowFallMaxForce
slowFallBV.Parent = nil -- Disable by default

-- Function to check if the player is falling
local function checkFalling()
    while true do
        task.wait(0.1)

        -- Check if the character is falling
        if HumanoidRootPart.Velocity.Y < -2 then -- If vertical speed is negative (falling)
            FallingTime = FallingTime + 0.1

            if FallingTime >= fallThreshold and not slowFallApplied then
                -- Apply slow fall after the threshold
                slowFallBV.Parent = HumanoidRootPart
                slowFallApplied = true
            end
        else
            -- Reset when not falling
            FallingTime = 0
            slowFallBV.Parent = nil
            slowFallApplied = false
        end
    end
end


Comments

1
Log in to join the conversation. Login
Mistaken's profile picture
Mistaken2 years ago(edited)

Can u make a inf credits script for spin for free robux game

1