How to detect pause and unpause event?

The best way would be to bind it to an input event, like a keypress, to unset the boolean, (or set it to false).

EDIT: Sorry, rereading your question, do you want an event listener that works like an OnUnPause?