script.Parent.MouseButton1Click:Connect(function()
 if game.StarterGui.Store1.Enabled then
	game.StarterGui.Store1.Enabled = false
 	script.Parent.Text = "Close GUI"
 else
   if not game.StarterGui.Store1.Enabled then
	game.StarterGui.Store1.Enabled = true
 	script.Parent.Text = "Open GUI"
 end
end
end)

script.Parent.MouseButton1Click:Connect(function()
 if game.StarterGui.Store2.Enabled then
	game.StarterGui.Store2.Enabled = false
 else
   if not game.StarterGui.Store1.Enabled then
	game.StarterGui.Store2.Enabled = true
 end
end
end)

script.Parent.MouseButton1Click:Connect(function()
 if game.StarterGui.Store3.Enabled then
	game.StarterGui.Store3.Enabled = false
 else
   if not game.StarterGui.Store1.Enabled then
	game.StarterGui.Store3.Enabled = true
 end
end
end)

3 comments

0

PlayerGui, not StarterGui. You can access it via game.Players.LocalPlayer

0

You can put that as an answer and I can accept it if you want. :D

0

a simpler way of doing it is - Store1.Enabled = not Store1.Enabled - etc.