How to add High Score ?

This is my score script.
This working.
I want to add high score ?
Please ?
using UnityEngine;
using System.Collections;

public class HUDScript : MonoBehaviour {

	float playerScore = 0;

	void Update () {
			playerScore += Time.deltaTime;
	}

		public void IncreaseScore(int amount)
	{
		playerScore += amount;
	}

	void OnDisable()
	{
		PlayerPrefs.SetInt("Score", (int)playerScore * 100);
	}

	void OnGUI ()
	{
		GUI.Label(new Rect(10, 10, 100, 30), "Score: " + (int) (playerScore * 100));
	}
}

I think something like →

void OnDisable()
    {
        int score = playerScore * 100,
            high_score = PlayerPrefs.GetInt("HiScore");
        PlayerPrefs.SetInt("Score", score);
        if (score > high_score) {
            PlayerPrefs.SetInt("HiScore", score);
        }
    }

I changed your script a bit and here is working example :

using UnityEngine;
using System.Collections;

public class Score : MonoBehaviour {

	float playerScore = 0;
	//float highScore = 0 ;

	void Start (){

		//PlayerPrefs.SetFloat ("HighScore", highScore);
	}
	void Update () {
		playerScore += Time.deltaTime;
	}
	

	
	void OnDisable()
	{
		PlayerPrefs.SetFloat("Score", playerScore);

		if ((playerScore*100) > PlayerPrefs.GetFloat ("HighScore")){

			PlayerPrefs.SetFloat ("HighScore", playerScore*100);
		}
	}
	
	void OnGUI ()
	{
		GUI.Label(new Rect(10, 10, 100, 30), "Score: " + (int) (playerScore * 100));
		GUI.Label(new Rect(100, 10, 100, 300), "HighScore: " + (int) PlayerPrefs.GetFloat ("HighScore"));
	}
}

In order to set new High Score, current score must be larger than last high score. We check that in “OnDisable()” function. If current score is larger than high score value in PlayerPrefs, we simply set current score as new HighScore.

Keep in mind that I commented out that line of code in Start function, because I don’t know do you have to create key before you can use it in Player Prefs, so I just used it to set it up on first run.

If you run that code and disable/enable your gameObject, you will see that high score has new value each time.