But it does not stop the game related function (Getting money per second, time counter continues,...)

I now use a pause variable to fix all this.