LimonSpace, the easiest way to pause on unfocus is to click on your project name in the projects bar, then scroll down in the Properties bar until you see the option "Pause on unfocus", then set that to yes. The game would then be paused for that user.
But, since you have a multiplayer game, you may want to pause the game for all players. So, here's the steps to handle that event:
1. Add the Browser plugin to one of your layouts.
2. Create a new event for Browser."On suspended" and Browser."On resumed". These can be found at the bottom in the "Page" section.
3. Add what you want to happen, like a timescale of 0, and sending a message to all other players to also pause.