public void stopscore()
    {
        // CancelInvoke("incrementScore");
        Health = 0;
        PlayerPrefs.SetFloat("score", Score);



        if (PlayerPrefs.HasKey("highscore"))
        {
            if (Score > PlayerPrefs.GetFloat("highscore"))
            {
                PlayerPrefs.SetFloat("highscore", Score);
            }
        }
        else
        {
            PlayerPrefs.SetFloat("highscore", Score);
        }


        if (!uploadscore)
        {
            ScoreBoard.AddNewHighscore(playername, (int)Score, (int)finaltime);
            // ScoreBoard.AddNewHighscore(playername, ScoreManager.instance.Score, finaltime);
            //Debug.Log("callinf");
            uploadscore = true;
        }
    }