stop timer

hi, right now i have a script that slows down the whole game, when the player fails to complete the game/hit a trigger.
Would it be possible to have the surroundings move in slow motion as they do now, but at the same time stop the timer completely?
Cause right now the timer also kind of moves in slow motion together with the whole game.
I use Time.timeScale to slow down the game. But im not sure how to reference the only the timer, if its possible with the same script type?

how do you increment the timer? A simple way would be to replace your current (assuming you do it this way):

timer += Time.deltaTime;

with

if (game_is_running) {
   timer += Time.deltaTime;
}

and simply toggle the game_is_running variable on or off depending on whether you want the timer to increase or not.