How to call the GUI then is need and to close then is need?

EDIT: Moved my question to here: How to put the game on pause?