How do I get my high scores to move lower scores down the list?

Right now I have working high scores in my game, but if a new high score is set, it just replaces the one that was there and doesn’t move the others down the list. How would I make it so that when a high score is set it just pushes the others down and removes the lowest one? Here’s the code I’m using now:

if (PlayerPrefs.GetFloat ("Highscore1") < scoreNumber)
        PlayerPrefs.SetFloat ("Highscore1", scoreNumber);
    else if (PlayerPrefs.GetFloat ("Highscore2") < scoreNumber)
        PlayerPrefs.SetFloat ("Highscore2", scoreNumber);
    else if (PlayerPrefs.GetFloat ("Highscore3") < scoreNumber)
        PlayerPrefs.SetFloat ("Highscore3", scoreNumber);
    else if (PlayerPrefs.GetFloat ("Highscore4") < scoreNumber)
        PlayerPrefs.SetFloat ("Highscore4", scoreNumber);
    else if (PlayerPrefs.GetFloat ("Highscore5") < scoreNumber)
        PlayerPrefs.SetFloat ("Highscore5", scoreNumber);

Whenever a new score is set, it needs to move every score below it down by one first before replacing the appropriate score. For example, if someone takes over position 2 in the list, then the code should first set

  • Highscore5 = Highscore4
  • then Highscore4 = Highscore3
  • then Highscore 3 = Highscore 2
  • and finally Highscore 2 = scoreNumber

It should always start from the bottom score upwards until the one being replaced is moved down, then replace it.