Can I make 2d sprites random generate in a level?

Hey, so one last thing - How can I make a record system that keeps track of your high score of coins collected? Just following the randomly generated tutorial you earlier recommended.