Player death/ game over c#

Hey I’m a novice at this so please be gentle

I’ve been looking around and everyone seems to end the game by moving to another scene, I have this working atm but I would like a more Fancy system.

My aim is to once the player dies to phase into an image with some UI text with scores etc and retry button.The problem I’m having is that my carries on running in the background.

Is there a way to stop everything but allow menus to still function? This includes spawning, Gravity, movement and other such things as my score is based on distance travelled.

I did read somewhere about game States but I’m not sure how those work of even if they could help.

Try using Time.timeScale

Set the function to 0 when you want everything stopped and put it back to 1.0 when you want to get things moving. Also works great as a pause function. Cheers.