local Players = game:GetService("Players") local UIS = game:GetService("UserInputService") local player = Players.LocalPlayer local gui = Instance.new("ScreenGui") gui.Name = "ReLaxedUI" gui.ResetOnSpawn = false gui.Parent = player:WaitForChild("PlayerGui") ------------------------------------------------ -- BACKGROUND IMAGE ------------------------------------------------ local bg = Instance.new("ImageLabel") bg.Size = UDim2.new(1, 0, 1, 0) bg.Position = UDim2.new(0, 0, 0, 0) bg.BackgroundTransparency = 1 bg.Image = "rbxassetid://123282651418196" bg.ScaleType = Enum.ScaleType.Crop bg.ZIndex = 0 bg.Parent = gui ------------------------------------------------ -- MAIN FRAME ------------------------------------------------ local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 300, 0, 180) frame.Position = UDim2.new(0.5, -150, 0.5, -90) frame.BackgroundColor3 = Color3.fromRGB(40, 40, 65) frame.BackgroundTransparency = 0.15 frame.BorderSizePixel = 0 frame.ZIndex = 2 frame.Parent = gui Instance.new("UICorner", frame).CornerRadius = UDim.new(0, 12) local stroke = Instance.new("UIStroke") stroke.Color = Color3.fromRGB(120, 140, 255) stroke.Thickness = 2 stroke.Parent = frame ------------------------------------------------ -- LOGO ------------------------------------------------ local logo = Instance.new("TextLabel") logo.Size = UDim2.new(1, 0, 0, 30) logo.Position = UDim2.new(0, 0, 0, 5) logo.BackgroundTransparency = 1 logo.Text = "ReLaxed" logo.Font = Enum.Font.GothamBold logo.TextSize = 24 logo.TextColor3 = Color3.fromRGB(235, 235, 255) logo.ZIndex = 3 logo.Parent = frame ------------------------------------------------ -- TITLE ------------------------------------------------ local title = Instance.new("TextLabel") title.Size = UDim2.new(1, 0, 0, 30) title.Position = UDim2.new(0, 0, 0, 40) title.BackgroundTransparency = 1 title.Text = "Main Menu" title.Font = Enum.Font.Gotham title.TextSize = 18 title.TextColor3 = Color3.fromRGB(200, 200, 220) title.ZIndex = 3 title.Parent = frame ------------------------------------------------ -- TOGGLE ------------------------------------------------ local toggle = Instance.new("TextButton") toggle.Size = UDim2.new(0.8, 0, 0, 40) toggle.Position = UDim2.new(0.1, 0, 0.55, 0) toggle.Text = "Enabled" toggle.Font = Enum.Font.GothamBold toggle.TextSize = 18 toggle.BackgroundColor3 = Color3.fromRGB(90, 110, 255) toggle.TextColor3 = Color3.new(1,1,1) toggle.ZIndex = 3 toggle.Parent = frame Instance.new("UICorner", toggle).CornerRadius = UDim.new(0, 8) local enabled = true toggle.MouseButton1Click:Connect(function() enabled = not enabled if enabled then toggle.Text = "Enabled" toggle.BackgroundColor3 = Color3.fromRGB(90, 110, 255) else toggle.Text = "Disabled" toggle.BackgroundColor3 = Color3.fromRGB(160, 60, 60) end end) ------------------------------------------------ -- MINIMIZE BUTTON ------------------------------------------------ local mini = Instance.new("TextButton") mini.Size = UDim2.new(0, 28, 0, 28) mini.Position = UDim2.new(1, -65, 0, 6) mini.Text = "-" mini.Font = Enum.Font.GothamBold mini.TextSize = 18 mini.BackgroundColor3 = Color3.fromRGB(70, 70, 90) mini.TextColor3 = Color3.new(1,1,1) mini.ZIndex = 3 mini.Parent = frame Instance.new("UICorner", mini).CornerRadius = UDim.new(1,0) ------------------------------------------------ -- CLOSE BUTTON ------------------------------------------------ local close = Instance.new("TextButton") close.Size = UDim2.new(0, 28, 0, 28) close.Position = UDim2.new(1, -32, 0, 6) close.Text = "X" close.Font = Enum.Font.GothamBold close.TextSize = 16 close.BackgroundColor3 = Color3.fromRGB(200, 70, 70) close.TextColor3 = Color3.new(1,1,1) close.ZIndex = 3 close.Parent = frame Instance.new("UICorner", close).CornerRadius = UDim.new(1,0) close.MouseButton1Click:Connect(function() gui:Destroy() end) ------------------------------------------------ -- FLOATING BALL ------------------------------------------------ local ball = Instance.new("TextButton") ball.Size = UDim2.new(0, 50, 0, 50) ball.Position = UDim2.new(0.2, 0, 0.2, 0) ball.BackgroundColor3 = Color3.fromRGB(90, 110, 255) ball.Text = "R" ball.TextSize = 22 ball.TextColor3 = Color3.new(1,1,1) ball.Visible = false ball.ZIndex = 3 ball.Parent = gui Instance.new("UICorner", ball).CornerRadius = UDim.new(1,0) ------------------------------------------------ -- HIDE / SHOW ------------------------------------------------ mini.MouseButton1Click:Connect(function() frame.Visible = false ball.Visible = true end) ball.MouseButton1Click:Connect(function() frame.Visible = true ball.Visible = false end) ------------------------------------------------ -- DRAG BALL ------------------------------------------------ local dragging = false local dragStart local startPos ball.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = true dragStart = input.Position startPos = ball.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) UIS.InputChanged:Connect(function(input) if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then local delta = input.Position - dragStart ball.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y ) end end)