The way I have been doing it is by adding a 2d scene with buttons like resume and quit, and instantiating it in the level scene. Then in the level scene, i have a is_paused boolean that tracks if the game is paused. I added an input "p" and when the "p" key is pressed then it changes the visibility of the pause menu, and sets the Engine.timescale to 0. This stops all of the enemies and game processes from moving. if the game is paused and its clicked again, then reverse the previous steps