Depends on the type of high score system you want.
If you want a local highscore system ie.. you play once it appears at number 1, second time if you beat your own score then it goes to number 1 if not it goes to number 2.. then this can be done with a variety of global variables and events (i am creating one in my game and when i am done Ill create a simple tutorial).
If however you want online highscores so people can compete with other people, then your best bet is to incorporate Kongregates online scoreboards, or facebook plugin for scores. However a lot of people have tried and failed.
Alternatively there is some information on these forums on having your game interract with an ponline php driven database, which could also allow for the creation of a highscore system.