- MCP server with 12 tools for Roblox manipulation - WebSocket communication with Roblox Studio - Create scripts, parts, models, GUIs - Execute Lua code, control playtest - Full documentation and examples 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
49 lines
1.5 KiB
Lua
49 lines
1.5 KiB
Lua
-- Example: Simple Start Button GUI
|
|
-- Creates a ScreenGui with a clickable button
|
|
|
|
-- Create ScreenGui
|
|
local screenGui = Instance.new("ScreenGui")
|
|
screenGui.Name = "StartGameGui"
|
|
screenGui.Parent = game:GetService("StarterGui")
|
|
|
|
-- Create main frame
|
|
local frame = Instance.new("Frame")
|
|
frame.Name = "MainFrame"
|
|
frame.Size = UDim2.new(0, 400, 0, 300)
|
|
frame.Position = UDim2.new(0.5, -200, 0.5, -150)
|
|
frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
|
|
frame.Parent = screenGui
|
|
|
|
-- Create title
|
|
local title = Instance.new("TextLabel")
|
|
title.Name = "Title"
|
|
title.Size = UDim2.new(1, 0, 0, 100)
|
|
title.Position = UDim2.new(0, 0, 0, 50)
|
|
title.BackgroundTransparency = 1
|
|
title.Text = "MY AWESOME GAME"
|
|
title.TextColor3 = Color3.fromRGB(255, 255, 255)
|
|
title.TextScaled = true
|
|
title.Font = Enum.Font.GothamBold
|
|
title.Parent = frame
|
|
|
|
-- Create start button
|
|
local startButton = Instance.new("TextButton")
|
|
startButton.Name = "StartButton"
|
|
startButton.Size = UDim2.new(0, 200, 0, 50)
|
|
startButton.Position = UDim2.new(0.5, -100, 0, 150)
|
|
startButton.BackgroundColor3 = Color3.fromRGB(0, 170, 0)
|
|
startButton.TextColor3 = Color3.fromRGB(255, 255, 255)
|
|
startButton.Text = "START GAME"
|
|
startButton.TextScaled = true
|
|
startButton.Font = Enum.Font.GothamBold
|
|
startButton.Parent = frame
|
|
|
|
-- Button click handler
|
|
startButton.MouseButton1Click:Connect(function()
|
|
print("Start button clicked!")
|
|
screenGui:Destroy() -- Remove the GUI
|
|
-- Add your game start logic here
|
|
end)
|
|
|
|
print("Start button GUI created in StarterGui!")
|