You could also do it like this: add 5 star sprites (star1, star2, etc), all invisible. Also have a variable you cna check on. Set star1 visible if 'score' >= 1, set star2 visible if 'score' >= 2, etc... You can also have 10 star sprites => 5 golden ones, 5 grey ones. The 5 grey ones are always displayed, the golden ones are made visible (& grey ones invisible) accordingly to score as explained above.
Hope this helps.