how to load a scene using score

hay guys, i’m biginner in unity, Could you tell me how to load a scene using the parameter score in untiy 2d (c#), example :

if score 500 until 1000 {loadscene (1) }
if score >1000 {loadscene(2)}
else score <500 {loadscene(0)}

thanks :slight_smile:

int score; //store score here

void LoadLevel () //call this function in a button or something
{
if (score >= 500 && score <= 1000)
        {
          Application.LoadLevel("Scene1");
         }
        else if (score <= 499)
         {
          Application.LoadLevel("Scene2");           
         }
        else if (score > 1001)
         {
         Application.LoadLevel("Scene3");
         }
}