First of course I made the bool showGui
and here’s the code
if (text.StartsWith("Command"))
{
showGui = !showGui;
if (showGui == true)
{
showGui = true;
GUI.Box(new Rect(150, 150, 150, 150), "Box");
if (GUI.Button(new Rect(128f, 140f, 50f, 25f), "Commands"))
{
GUI.Label(new Rect(40f, 50f, 70f, 70f), "/restart
/kick
/close
/ghost
/gg
/day
/night
/dawn
/blow
/grab
/reviveall
/resetkdall");
this.sendChatContentInfo(“Gui is activated”);
}
}
and this is the command. Blabla is a class
else if (this.inputLine == "/command")
{
Blabla.showGui = true;
}