You are reading and writing to Local Storage on every tick, this is very wrong.
You should write to local storage once at the end of the level/game, if CurrentScore>HighScore.
And read from Local Storage also just once - On Start of Layout, and only if HighScore=0. When HighScore already contains a value, you don't need to retrieve it from local storage.