Well, let's say your GUI's name is "MyGui".
Then you would do this:
if (!$MyGuiBinds)
{
$remapDivision[$remapCount] = "My Category";
$remapName[$remapCount] = "Open gui";
$remapCmd[$remapCount] = "MyGui_Open";
$remapCount++;
$MyGuiBinds = 1;
}
function MyGui_Open()
{
canvas.pushDialog(MyGui);
}
What this does is:
-It adds a new category to the controls section of options. "My Category"
-In the category, it adds a new bind. "Open Gui"
-If the key is pressed, it should call function MyGui_Open.
-To avoid having this section multiple times on re-exec, I added a check. $MyGuiBinds
-I have already defined the function that will be called, in it, there's canvas.pushDialog, this function shows a GUI on the screen, canvas.popDialog does the opposite.