you need 2 game attributes (numbers) score and highscore
if your player died .... if score > highscore then set highscore = score
then save your game if you want to save the attributes and load it if you start your app new (load at the beginning)
if you play it again set "score" to 0