How do i save high scores in my game?

i know i need to use Playerprefs but i dont know how. tried a couple of things i saw online but still didnt help. here is my current scoring code,please how i can i modify it to sava high score.

var currentScore:int;
var startScore:int;
var point:String;
var speed:int=2;
var bestScore:int=0;
var lastBestScore:int=0;
var hasLost:boolean=false;
function Start () {

}

function Update () {
if(!hasLost){
Scorer();
}
//else if player has lost
else {
point="Your Score:" + currentScore.ToString() + "

Your Best:" + bestScore;
if(bestScore>lastBestScore) point+="
New Record!!";
guiText.text=point;
}
}
function Scorer(){
currentScore=startScore+Time.timeSinceLevelLoad*speed;
Show();
}
function Show(){
point=currentScore.ToString();
guiText.text=point;
}
function StopScore(){
hasLost=true;
lastBestScore=bestScore;
if(currentScore>bestScore){
bestScore=currentScore;
}
}

If you want, this is a good place to use a static variable, see this nice example from UnityGems.

But better yet, If I were you, I would make a GameController/GameManager script, which handles everything from scores, player deaths, hits, kills, etc. (Much like the GameController in UDK) - Combined with the singleton pattern making sure there’s only one manager, and DontDestroyOnLoad to keep the manager object alive between scenes.

Try this,

var currentScore : int = 0;

function Awake() {
     if(!PlayerPrefs.HasKey("HighScore"){
          PlayerPrefs.SetInt("HighScore",0);
     }
}

function Update () {
     //Calculate current score...
     //On game over call the SetHighScore function once.
}

function SetHighScore () {
     if(currentScore > PlayerPrefs.GetInt("HighScore"){
          PlayerPrefs.SetInt("HighScore",currentScore );
     }
}