need help with scripting

i dont know how to right a script that will end the game when my live run out or advanc me to the next leval like when i have destroyd all my enamys

Something like

if( life <= 0 || nbEnemy <= 0 )
   Application.LoadLevel( "menu");
or Application.LoadLevel( Application.loadedLevel+1 );
or Application.Quit();