If I understand what you want correctly, I'd do it this way:

Code:
function pause()
{ 
	if(freeze_mode == 2) // all frozen??
	{

		freeze_mode = 0; // go on
		splash_screen.visible = off;
                game_paused_txt.visible = off;  //if desired
	}
	else
	{
		freeze_mode = 2; // pause	
		splash_screen.visible = on;
                game_paused_txt.visible = on;  //if desired
       	}
} 

on_space = pause;  //toggles pause on and off