How to code a game to pause?

Before proceeding, please use the forum search feature at the top of the page to check if your question has already been answered.

How do I…

A clear and concise description of what you are trying to do.

What is the expected result

Explain what should happen when you run the game.

What is the actual result

Explain what is happening instead, what is going wrong.

Related screenshots

Please include a screenshot of the full related events including both conditions and actions.
And screenshots to help showing us the issue.

Project files (optional)

Insert a minimal game showing your issue in a .zip or .rar.

How to code a game to pause?

Add new layer and call it Pause Menu
And hide it at the beginning of the scene

Now you would use condition
Show Pause Menu Layer

And there is action
Change time scale on layer and change time scale to 0 on ANY OTHER layer than Pause Menu