"script a shop menu for my shop that has a close button and open button"
xxxxxxxxxx
-- 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.5, 0, 0.5, 0)
shopMenu.AnchorPoint = Vector2.new(0.5, 0.5)
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, 10, 0, 10)
openButton.UICorner = 5
local closeButton = Instance.new("TextButton", shopMenu)
closeButton.Text = "Close Shop"
closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
closeButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
closeButton.Position = UDim2.new(1, -110, 0, 10)
closeButton.UICorner = 5
openButton.MouseButton1Click:Connect(function()
shopMenu.Visible = true
openButton.Visible = false
end)
closeButton.MouseButton1Click:Connect(function()
shopMenu.Visible = false
openButton.Visible = true
end)