function onClicked() if game.Workspace.StarterGui.Shop.ImageButton.Frame.Visible = false then game.Workspace.StarterGui.Shop.ImageButton.Frame.Visible = true end script.Parent.MouseButton1Click:connect(onClicked) function onClicked() if game.Workspace.StarterGui.Shop.ImageButton.Frame.Visible = true game.Workspace.StarterGui.Shop.ImageButton.Frame.Visible = false end script.Parent.MouseButton1Click:connect(onClicked)
Well, you had several errors. Fixed them all up.
script.Parent.MouseButton1Click:connect(function() if game.Players.LocalPlayer.Shop.ImageButton.Frame.Visible == false then game.Players.LocalPlayer.Shop.ImageButton.Frame.Visible = true elseif game.Players.LocalPlayer.Shop.ImageButton.Frame.Visible == true then game.Players.LocalPlayer.Shop.ImageButton.Frame.Visible = false end end)