gpt-4.1-mini-2025-04-14· OpenAI
WildChat-4.8M (AI2)
give script Roblox menu gui
- User
give script Roblox menu gui
- Assistant
give script Roblox menu gui
Sure! Below is a simple example of a Roblox GUI menu script. This script creates a basic menu with buttons that you can customize. It includes a toggle button to show/hide the menu and some example buttons inside the menu.
MenuGui.MenuGui, insert a Frame and name it MenuFrame.MenuFrame, insert a TextButton and name it CloseButton.MenuGui, insert another TextButton and name it ToggleButton.MenuFrame size (example): {0, 200},{0,300}MenuFrame position (example): {0, 50},{0, 50}CloseButton inside MenuFrame: Text = "Close"ToggleButton position somewhere on screen where you want the toggle to appear and text "Menu"MenuGui-- References to GUI elements
local MenuGui = script.Parent
local MenuFrame = MenuGui:WaitForChild("MenuFrame")
local ToggleButton = MenuGui:WaitForChild("ToggleButton")
local CloseButton = MenuFrame:WaitForChild("CloseButton")
-- Hide the menu initially
MenuFrame.Visible = false
-- Toggle the menu visibility when ToggleButton is clicked
ToggleButton.MouseButton1Click:Connect(function()
MenuFrame.Visible = not MenuFrame.Visible
end)
-- Close menu when CloseButton is clicked
CloseButton.MouseButton1Click:Connect(function()
MenuFrame.Visible = false
end)
-- Example: You can add more buttons with actions as children of MenuFrame
-- For demonstration, let's add a button that prints a message when clicked
local function createButton(name, text, callback)
local btn = Instance.new("TextButton")
btn.Name = name
btn.Size = UDim2.new(1, -20, 0, 40)
btn.Position = UDim2.new(0, 10, 0, 50 + (#MenuFrame:GetChildren()-3)*50)
btn.BackgroundColor3 = Color3.fromRGB(70, 130, 180)
btn.TextColor3 = Color3.new(1,1,1)
btn.Text = text
btn.Parent = MenuFrame
btn.MouseButton1Click:Connect(callback)
end
createButton("Button1", "Print Hello", function()
print("Hello from Button 1!")
end)
createButton("Button2", "Print Goodbye", function()
print("Goodbye from Button 2!")
end)
createButton function dynamically adds buttons inside the menu to perform actions.You can customize the buttons and add your own functionality where you see fit!
If you want me to create a menu for a specific purpose (like settings, inventory, etc.) just tell me!
Not yet included in a published release.