Pause everything when game not in focus?

Is it possible to get a bool out of this command? I’m having trouble implementing this method.