local Players = game:GetService("Players") local UIS = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local player = Players.LocalPlayer ------------------------------------------------ -- GUI ------------------------------------------------ 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.ImageTransparency = 0 bg.ZIndex = 0 bg.Parent = gui -- 🌫️ Faster fade task.spawn(function() task.wait(0.5) local tween = TweenService:Create( bg, TweenInfo.new(2.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {ImageTransparency = 1} ) tween:Play() end) ------------------------------------------------ -- MAIN FRAME (VIOLET) ------------------------------------------------ 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(80, 45, 150) frame.BackgroundTransparency = 0.1 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(190, 150, 255) stroke.Thickness = 2 stroke.Parent = frame -- 💫 Glow effect (soft) local glow = Instance.new("UIStroke") glow.Color = Color3.fromRGB(120, 90, 255) glow.Thickness = 6 glow.Transparency = 0.85 glow.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(240, 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(210, 200, 230) 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(130, 90, 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(130, 90, 255) else toggle.Text = "Disabled" toggle.BackgroundColor3 = Color3.fromRGB(170, 70, 70) end end) ------------------------------------------------ -- MINIMIZE ------------------------------------------------ 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(90, 70, 140) mini.TextColor3 = Color3.new(1,1,1) mini.ZIndex = 3 mini.Parent = frame Instance.new("UICorner", mini).CornerRadius = UDim.new(1,0) ------------------------------------------------ -- CLOSE (VIOLET) ------------------------------------------------ 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(160, 90, 255) 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(130, 90, 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) ------------------------------------------------ -- SHOW / HIDE ------------------------------------------------ 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) ------------------------------------------------ -- INTRO ANIMATION ------------------------------------------------ frame.BackgroundTransparency = 1 frame.Size = UDim2.new(0, 280, 0, 160) TweenService:Create( frame, TweenInfo.new(0.6, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { BackgroundTransparency = 0.1, Size = UDim2.new(0, 300, 0, 180) } ):Play()