So, I have seen people struggle pausing their scripts while their gui is open.
Sometimes they try using a boolean
public void onStart(){
gui.initComponents()
pause = true;
}
public int onLoop(){
if(pause == false){
//do stuff
}
}
In theory it works, but its not really what you want to do, do you?
You essentially want to halt the scripts thread from working until the gui is closed or the start button is pressed, because you only want it to start doing stuff only after the user has his