Try this
public void EndGame ()
{
if (lives <1)
{
message.text = "Sorry you lost, try again";
}
else
{
message.text = "Well Done you won!";
score = score * Mathf.RoundToInt(timerScript.timeRemaining);
}
Debug.Log(message.text);
panel.SetActive(true);
finalScore.text = score.ToString();
Cursor.lockState = CursorLockMode.None;
Time.timeScale = 0;
if (score > PlayerPrefs.GetInt("HighScore", 0))
{
PlayerPrefs.SetInt("HighScore", score);
}
}