I used playerprefs to save my score between scenes and it works fine but the problem is that if I close the game and run it again my scores are gone .how could I save scores even when I leave the game?
Reading your comment makes me think you may do this :
PlayerPefs.SetInt("SCORES",score);
PlayerPefs.GetInt("SCORES");
Note PlayerPefs.GetInt
returns the score, you have to assign it to your variable.
score = PlayerPefs.GetInt("SCORES");
You need to save the score before you quit the application
For that there is a especial function Unity - Scripting API: MonoBehaviour.OnApplicationQuit()
void OnApplicationQuit ()
{
//save your score
}