Level end after certian amount of points collected

I am making a survival game and would like it so that the monsters drop a coin and you can collect it. i have a script which allows you to collect a coin and then adds 1 to your score. (the score is showed using GUI) . And i would like it so if my score reached 50, the next scene would begin.

Thanks in advance for any answers.

Your score is certainly stored in a variable (I assume it as “score”), so do something like:

function Update(){
   if (score >= 50)
      Application.LoadLevel(Application.loadedLevel+1);
}

Make sure to handle the special case regarding the last level, this way.

You can also use

Application.LoadLevel("scenename");

if you want more control.

Remember to add your scene to the build by clicking File > Build Settings and dragging the scenes to the Scenes in Build section (at the top).