The example uses webstorage?
You can't be talking about the capx attached to the local-storage tutorial, for it ,ofcourse, uses local-storage..
you just need this:
on start of layout
localstorage check item "highscore" exists
localstorage "highscore" exists
system set global variable Highscore to localstorage.itemvalue
on game ended (you should know which triggered event you could use for this in your capx)
System compare two values : Score < Highscore
localstorage set item "highscore" = Score
The tutorials explain this much better and in greater detail..