
Key Required VerifiedUniversal

local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local StarterGui = game:GetService("StarterGui")
local antiFallEnabled = false
local antiFallConnection = nil
local characterAddedConnection = nil
local function Message(_Title, _Text, Time)
StarterGui:SetCore("SendNotification", {
Title = _Title,
Text = _Text,
Duration = Time
})
end
Message("AntiFallDamage", "Press P to toggle (or button on mobile)", 5)
local function toggleAntiFallDamage()
antiFallEnabled = not antiFallEnabled
if antiFallEnabled then
if game.PlaceId ~= 189707 then
Message("Error", "Not Natural Disasters Survival!", 5)
antiFallEnabled = false
return
end
local lp = Player
local hb = RunService.Heartbeat
local rsd = RunService.RenderStepped
local zero = Vector3.zero
local function protect(char)
local root = char:WaitForChild("HumanoidRootPart")
if root then
local con
con = hb:Connect(function()
if not antiFallEnabled or not root.Parent then
con:Disconnect()
return
end
local vel = root.AssemblyLinearVelocity
root.AssemblyLinearVelocity = zero
rsd:Wait()
root.AssemblyLinearVelocity = vel
end)
antiFallConnection = con
end
end
protect(lp.Character)
characterAddedConnection = lp.CharacterAdded:Connect(protect)
Message("AntiFallDamage", "Enabled", 3)
else
if antiFallConnection then antiFallConnection:Disconnect() end
if characterAddedConnection then characterAddedConnection:Disconnect() end
antiFallConnection = nil
characterAddedConnection = nil
Message("AntiFallDamage", "Disabled", 3)
end
end
if UserInputService.KeyboardEnabled then
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if not gameProcessed and input.KeyCode == Enum.KeyCode.P then
toggleAntiFallDamage()
end
end)
else
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Parent = Player:WaitForChild("PlayerGui")
local Button = Instance.new("TextButton")
Button.Size = UDim2.new(0, 150, 0, 60)
Button.Position = UDim2.new(0.05, 0, 0.75, 0)
Button.Text = "Toggle AntiFall"
Button.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
Button.TextColor3 = Color3.fromRGB(255, 255, 255)
Button.TextScaled = true
Button.Parent = ScreenGui
Button.BorderSizePixel = 2
Button.MouseButton1Click:Connect(function()
toggleAntiFallDamage()
end)
endNo comments yet for this script.


![Noob Avatar in Nds [OPEN SOURCE]](https://scriptblox.com/images/sb/rbx-7ea7065a02f8cff80f8b0270a9ad2d3b-0820ff9b1f88.png)
