RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"script a shop menu for my shop that has a close button and open button And items"
-- local script (StarterGUI) local player = game.Players.LocalPlayer local screenGui = Instance.new("ScreenGui", player.PlayerGui) local shopMenu = Instance.new("Frame", screenGui) shopMenu.BackgroundColor3 = Color3.fromRGB(0, 0, 0) shopMenu.Size = UDim2.new(0.5, 0, 0.5, 0) shopMenu.Position = UDim2.new(0.25, 0, 0.25, 0) shopMenu.Visible = false local openButton = Instance.new("TextButton", screenGui) openButton.Text = "Open Shop" openButton.TextColor3 = Color3.fromRGB(255, 255, 255) openButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0) openButton.Position = UDim2.new(0.5, 0, 0.9, 0) openButton.AnchorPoint = Vector2.new(0.5, 0.5) openButton.UICorner = 5 local closeButton = Instance.new("TextButton", shopMenu) closeButton.Text = "Close" closeButton.TextColor3 = Color3.fromRGB(255, 255, 255) closeButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0) closeButton.Position = UDim2.new(0.95, 0, 0.05, 0) closeButton.AnchorPoint = Vector2.new(0.5, 0.5) closeButton.UICorner = 5 local itemsList = Instance.new("ScrollingFrame", shopMenu) itemsList.Size = UDim2.new(0.9, 0, 0.8, 0) itemsList.Position = UDim2.new(0.05, 0, 0.1, 0) itemsList.CanvasSize = UDim2.new(0, 0, 5, 0) -- Add your shop items here in the itemsList ScrollingFrame openButton.MouseButton1Click:Connect(function() shopMenu.Visible = true end) closeButton.MouseButton1Click:Connect(function() shopMenu.Visible = false end)