PHP Code:
function onKeyPressed(code, key) {
if (temp.key != 9) return; //If its not the 9 key, do nothing
test_Window1.visible = !test_Window1.visible; //A toggle option to display or hide the window
}
function onCreated() {
new GuiWindowCtrl("test_Window1") {
//ADD THIS LINE IN HERE, so it's not always showing when you update the script
visible = false;
//REST OF YOUR STUFF HERE
}
}
Try this, it should work