-- ONE SCRIPT: MOVABLE REALISTIC RAGDOLL GUI -- Client-side ragdoll attempt local Players = game:GetService("Players") local UIS = game:GetService("UserInputService") local player = Players.LocalPlayer local ragdolled = false local saved = {} local gui = Instance.new("ScreenGui") gui.Name = "RagdollGUI" gui.ResetOnSpawn = false gui.Parent = game:GetService("CoreGui") local bar = Instance.new("Frame") bar.Size = UDim2.fromOffset(220, 115) bar.Position = UDim2.new(0.5, -110, 0.5, -57) bar.BackgroundColor3 = Color3.fromRGB(30, 30, 40) bar.Active = true bar.Parent = gui Instance.new("UICorner", bar).CornerRadius = UDim.new(0, 12) local title = Instance.new("TextButton") title.Size = UDim2.new(1, 0, 0, 35) title.BackgroundColor3 = Color3.fromRGB(60, 60, 80) title.Text = "DRAG HERE" title.TextColor3 = Color3.new(1, 1, 1) title.Parent = bar local button = Instance.new("TextButton") button.Size = UDim2.new(1, -20, 0, 55) button.Position = UDim2.new(0, 10, 0, 48) button.BackgroundColor3 = Color3.fromRGB(210, 55, 55) button.Text = "RAGDOLL" button.TextColor3 = Color3.new(1, 1, 1) button.TextSize = 18 button.Parent = bar Instance.new("UICorner", button).CornerRadius = UDim.new(0, 8) -- Drag the bar with mouse or touch local dragging = false local dragStart, startPos title.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = bar.Position end end) UIS.InputChanged:Connect(function(input) if dragging and ( input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch ) then local delta = input.Position - dragStart bar.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y ) end end) UIS.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = false end end) local function setRagdoll(enable) local char = player.Character if not char then return end local hum = char:FindFirstChildOfClass("Humanoid") if not hum then return end if enable then saved = {} hum.RequiresNeck = false hum.AutoRotate = false hum.PlatformStand = true for _, motor in ipairs(char:GetDescendants()) do if motor:IsA("Motor6D") and motor.Name ~= "RootJoint" and motor.Part0 and motor.Part1 then local a0 = Instance.new("Attachment") a0.CFrame = motor.C0 a0.Parent = motor.Part0 local a1 = Instance.new("Attachment") a1.CFrame = motor.C1 a1.Parent = motor.Part1 local socket = Instance.new("BallSocketConstraint") socket.Attachment0 = a0 socket.Attachment1 = a1 socket.LimitsEnabled = true socket.UpperAngle = 50 socket.Parent = motor.Part0 table.insert(saved, { motor = motor, a0 = a0, a1 = a1, socket = socket }) motor.Enabled = false end end hum:ChangeState(Enum.HumanoidStateType.Physics) else for _, item in ipairs(saved) do if item.motor and item.motor.Parent then item.motor.Enabled = true end item.socket:Destroy() item.a0:Destroy() item.a1:Destroy() end saved = {} hum.PlatformStand = false hum.AutoRotate = true hum:ChangeState(Enum.HumanoidStateType.GettingUp) end end button.Activated:Connect(function() ragdolled = not ragdolled setRagdoll(ragdolled) button.Text = ragdolled and "STAND UP" or "RAGDOLL" button.BackgroundColor3 = ragdolled and Color3.fromRGB(50, 170, 90) or Color3.fromRGB(210, 55, 55) end) player.CharacterAdded:Connect(function() ragdolled = false saved = {} button.Text = "RAGDOLL" button.BackgroundColor3 = Color3.fromRGB(210, 55, 55) end)