-- Create the ScreenGui local screenGui = Instance.new("ScreenGui") screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") -- Create the Frame (Draggable GUI) local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 250, 0, 120) frame.Position = UDim2.new(0.35, 0, 0.35, 0) frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) frame.BorderSizePixel = 2 frame.BorderColor3 = Color3.fromRGB(255, 255, 255) frame.Active = true frame.Draggable = true -- Makes it draggable frame.Parent = screenGui -- Create the Button local button = Instance.new("TextButton") button.Size = UDim2.new(0.8, 0, 0.5, 0) button.Position = UDim2.new(0.1, 0, 0.25, 0) button.Text = "Toggle Zero Gravity" button.BackgroundColor3 = Color3.fromRGB(255, 50, 50) button.TextColor3 = Color3.fromRGB(255, 255, 255) button.Font = Enum.Font.GothamBold button.TextSize = 16 button.Parent = frame local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local humanoidRootPart = character:WaitForChild("HumanoidRootPart") local zeroGravity = false local normalGravity = 196.2 local userInputService = game:GetService("UserInputService") -- Function to toggle zero gravity with ragdoll button.MouseButton1Click:Connect(function() if not zeroGravity then zeroGravity = true game.Workspace.Gravity = 0 -- Zero gravity effect humanoid.Sit = true task.wait(0.1) humanoidRootPart.CFrame = humanoidRootPart.CFrame -- Keep original facing direction for _, v in ipairs(humanoid:GetPlayingAnimationTracks()) do v:Stop() end end end) -- Detect jump to cancel zero gravity and allow reuse userInputService.JumpRequest:Connect(function() if zeroGravity then zeroGravity = false game.Workspace.Gravity = normalGravity -- Reset gravity humanoid.Sit = false -- Ensure player can move again end end)