Sure! Below is a Roblox script that you can paste into the command bar in Roblox Studio. This script will create a minimalistic GUI with rounded corners and a sleek design using a color palette of white, grey, and black.
-- Create a ScreenGui
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "MinimalisticGui"
screenGui.ResetOnSpawn = false
screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
-- Create a Frame
local frame = Instance.new("Frame")
frame.Name = "MainFrame"
frame.Size = UDim2.new(0.5, 0, 0.5, 0) -- Half of the screen size
frame.Position = UDim2.new(0.25, 0, 0.25, 0) -- Centered on the screen
frame.BackgroundColor3 = Color3.fromRGB(50, 50, 50) -- Dark grey
frame.BorderSizePixel = 0
frame.Parent = screenGui
-- Add UICorner for rounded corners
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0, 10) -- Adjust the radius as needed
corner.Parent = frame
-- Add a Title Label
local titleLabel = Instance.new("TextLabel")
titleLabel.Name = "TitleLabel"
titleLabel.Size = UDim2.new(1, 0, 0.1, 0)
titleLabel.Position = UDim2.new(0, 0, 0, 0)
titleLabel.BackgroundTransparency = 1
titleLabel.Text = "Minimalistic GUI"
titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255) -- White text
titleLabel.Font = Enum.Font.GothamBold
titleLabel.TextScaled = true
titleLabel.Parent = frame
-- Add a Separator Line
local separator = Instance.new("Frame")
separator.Name = "Separator"
separator.Size = UDim2.new(1, -20, 0, 1)
separator.Position = UDim2.new(0, 10, 0.1, 0)
separator.BackgroundColor3 = Color3.fromRGB(200, 200, 200) -- Light grey line
separator.BorderSizePixel = 0
separator.Parent = frame
-- Add Content Frame
local contentFrame = Instance.new("Frame")
contentFrame.Name = "ContentFrame"
contentFrame.Size = UDim2.new(1, -20, 0.8, -20)
contentFrame.Position = UDim2.new(0, 10, 0.15, 0)
contentFrame.BackgroundColor3 = Color3.fromRGB(70, 70, 70) -- Slightly lighter grey
contentFrame.BorderSizePixel = 0
contentFrame.Parent = frame
-- Add UICorner to Content Frame
local contentCorner = Instance.new("UICorner")
contentCorner.CornerRadius = UDim.new(0, 10)
contentCorner.Parent = contentFrame
-- Add sample Text inside Content Frame
local sampleText = Instance.new("TextLabel")
sampleText.Name = "SampleText"
sampleText.Size = UDim2.new(1, -20, 1, -20)
sampleText.Position = UDim2.new(0, 10, 0, 10)
sampleText.BackgroundTransparency = 1
sampleText.Text = "This is a sample minimalistic GUI."
sampleText.TextColor3 = Color3.fromRGB(220, 220, 220)
sampleText.Font = Enum.Font.Gotham
sampleText.TextScaled = true
sampleText.TextWrapped = true
sampleText.Parent = contentFrame
-- Optionally, add a close button
local closeButton = Instance.new("TextButton")
closeButton.Name = "CloseButton"
closeButton.Size = UDim2.new(0, 30, 0, 30)
closeButton.Position = UDim2.new(1, -40, 0, 10)
closeButton.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
closeButton.Text = "X"
closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
closeButton.Font = Enum.Font.GothamBold
closeButton.TextSize = 14
closeButton.Parent = frame
-- Add UICorner to Close Button
local closeCorner = Instance.new("UICorner")
closeCorner.CornerRadius = UDim.new(0, 5)
closeCorner.Parent = closeButton
-- Close button functionality
closeButton.MouseButton1Click:Connect(function()
screenGui:Destroy()
end)
How to Use the Script:
- Open Roblox Studio and load your place or create a new one.
- Go to the View tab and ensure that the Command Bar is visible. If not, click on Command Bar to display it.
- Copy the script above.
- Paste the script into the Command Bar at the bottom of Roblox Studio.
- Press Enter to execute the script.
What the Script Does:
- Creates a
ScreenGui: This acts as a container for all the GUI elements.
- Adds a main
Frame: Serves as the background panel for the GUI.
- Applies rounded corners using
UICorner instances to the main frame, content frame, and close button.
- Sets a minimalistic color palette: Uses shades of grey and black with white text to keep the design clean and sleek.
- Adds a title label: Displays the title "Minimalistic GUI" at the top.
- Includes a separator line: Visually separates the title from the content area.
- Creates a content frame: Acts as a container for any content you might want to add.
- Adds sample text: Demonstrates how text can be displayed within the content frame.
- Includes a close button: Allows users to close the GUI by clicking the "X" button.
Customization:
- Adjust Sizes and Positions: Modify the
Size and Position properties to resize or reposition elements.
- Change Corner Radius: Modify the
CornerRadius property of UICorner instances to increase or decrease the roundness of corners.
- Update Colors: Change the
BackgroundColor3 and TextColor3 properties to use different shades of white, grey, or black.
Notes:
- Ensure UI Elements Fit on All Screens: Keep in mind different screen sizes. Using relative sizes with
UDim2 helps the GUI scale properly.
- Consider Adding More Functionality: You can expand the GUI by adding more buttons, input fields, or other interactive elements as needed.
Feel free to modify the script to better suit your project's requirements!