Save high score and coins to Space Shooter game

hi, i’m extending Space Shooter and i want to save coins and high scores that i win when i destroy a hazard. how should I edit following C# code?

using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class Done_GameController : MonoBehaviour
{
public GameObject hazards;
public Vector3 spawnValues;
public int hazardCount;
public float spawnWait;
public float startWait;
public float waveWait;

public Text coinsText;
public Text scoreText;
public Text gameOverText;
public GameObject restartButton;

private bool gameOver;
private bool restart;
private int score;
public int coins;

void Start ()
{
	gameOver = false;
	restart = false;
	restartButton.SetActive (false);
	gameOverText.text = "";
	score = 0;
	UpdateScore ();
	StartCoroutine (SpawnWaves ());
}

IEnumerator SpawnWaves ()
{
	yield return new WaitForSeconds (startWait);
	while (true)
	{
		for (int i = 0; i < hazardCount; i++)
		{
			GameObject hazard = hazards [Random.Range (0, hazards.Length)];
			Vector3 spawnPosition = new Vector3 (Random.Range (-spawnValues.x, spawnValues.x), spawnValues.y, spawnValues.z);
			Quaternion spawnRotation = Quaternion.identity;
			Instantiate (hazard, spawnPosition, spawnRotation);
			yield return new WaitForSeconds (spawnWait);
		}
		yield return new WaitForSeconds (waveWait);
		
		if (gameOver)
		{
			restartButton.SetActive (true);
			restart = true;
			break;
		}
	}
}

public void AddScore (int newScoreValue)
{
	score += newScoreValue;
	UpdateScore ();
}

void UpdateScore ()
{
	scoreText.text = "Score: " + score;
}

void UpdateCoins ()
{
	coinsText.text = "Coins: " + coins;
}

public void GameOver ()
{
	gameOverText.text = "Game Over!";
	gameOver = true;
}
public void RestartGame()
{
	Application.LoadLevel (Application.loadedLevel);
}

}

One way to solve this is to save this information as PlayerPrefs. You can save several types of variables to refer to at later times during this run, or after the application has been closed and reopened later. Sometimes though on certain platforms you can lose the PlayerPrefs if you uninstall or do other operations with the application, so it may be better to use a different way to save information depending on your particular situation.

You use PlayerPrefs like this:

PlayerPrefs.SetInt("Player Score", 10);

and to get the value back later:

print(PlayerPrefs.GetInt("Player Score"));