local Players = game:GetService("Players") local player = Players.LocalPlayer local screenGui = Instance.new("ScreenGui") screenGui.Name = "FallDamageToggleUI" screenGui.ResetOnSpawn = false screenGui.Parent = player:WaitForChild("PlayerGui") -- Create main frame to hold the disable/enable buttons and hide button local mainFrame = Instance.new("Frame") mainFrame.Size = UDim2.new(0, 320, 0, 70) -- taller to fit hide button mainFrame.Position = UDim2.new(0.5, -160, 0.85, -50) mainFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40) mainFrame.BorderSizePixel = 0 mainFrame.Visible = false mainFrame.Parent = screenGui -- Make the mainFrame draggable mainFrame.Active = true mainFrame.Draggable = true -- Disable Fall Damage Button local disableButton = Instance.new("TextButton") disableButton.Size = UDim2.new(0, 150, 0, 50) disableButton.Position = UDim2.new(0, 0, 0, 0) disableButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0) disableButton.TextColor3 = Color3.new(1, 1, 1) disableButton.Font = Enum.Font.SourceSansBold disableButton.TextSize = 18 disableButton.Text = "Disable Fall Damage" disableButton.Parent = mainFrame -- Enable Fall Damage Button local enableButton = Instance.new("TextButton") enableButton.Size = UDim2.new(0, 150, 0, 50) enableButton.Position = UDim2.new(0, 170, 0, 0) enableButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0) enableButton.TextColor3 = Color3.new(1, 1, 1) enableButton.Font = Enum.Font.SourceSansBold enableButton.TextSize = 18 enableButton.Text = "Enable Fall Damage" enableButton.Parent = mainFrame -- Hide Button (bottom right corner of mainFrame) local hideButton = Instance.new("TextButton") hideButton.Size = UDim2.new(0, 30, 0, 20) hideButton.Position = UDim2.new(1, -35, 1, -25) -- bottom right with some padding hideButton.BackgroundColor3 = Color3.fromRGB(70, 70, 70) hideButton.TextColor3 = Color3.new(1, 1, 1) hideButton.Font = Enum.Font.SourceSansBold hideButton.TextSize = 18 hideButton.Text = "X" hideButton.Parent = mainFrame -- Toggle Panel Button (bottom right corner) local toggleButton = Instance.new("TextButton") toggleButton.Size = UDim2.new(0, 120, 0, 30) toggleButton.Position = UDim2.new(1, -10, 1, -10) -- bottom right with padding toggleButton.AnchorPoint = Vector2.new(1, 1) -- anchor bottom right corner toggleButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50) toggleButton.TextColor3 = Color3.new(1, 1, 1) toggleButton.Font = Enum.Font.SourceSansBold toggleButton.TextSize = 18 toggleButton.Text = "Show Panel" toggleButton.Parent = screenGui local fallDamageDisabled = false local function updateButtonStates() if fallDamageDisabled then disableButton.BackgroundColor3 = Color3.fromRGB(150, 0, 0) enableButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0) else disableButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0) enableButton.BackgroundColor3 = Color3.fromRGB(0, 150, 0) end end disableButton.MouseButton1Click:Connect(function() local char = player.Character if char then local fallDamageClient = char:FindFirstChild("FallDamageClient") if fallDamageClient then fallDamageClient:Destroy() fallDamageDisabled = true updateButtonStates() end end end) enableButton.MouseButton1Click:Connect(function() player:LoadCharacter() fallDamageDisabled = false updateButtonStates() end) toggleButton.MouseButton1Click:Connect(function() mainFrame.Visible = not mainFrame.Visible toggleButton.Text = mainFrame.Visible and "Hide Panel" or "Show Panel" end) hideButton.MouseButton1Click:Connect(function() mainFrame.Visible = false toggleButton.Text = "Show Panel" end) updateButtonStates()