how can I create a score for my game?
Develop games in your browser. Powerful, performant & highly capable.
There are many ways to make different styles of score boards. You'll need to be more specific. Generally speaking though...
Part 1 - Record a score during gameplay. Use an instance variable to keep track of the score.
Part 2 - Trigger saving the score. Usually this happens on death. You can save the score to another variable, or if you want to keep track of many scores, an array would work better. The array would additionally allow you to sort by value.
Part 3 - Display the scores by text or spritefont object, using the values from the array. You can get the values from the array into your text object using expressions.
Part 4 - If you want your high scores to be persistent between sessions, you'll probably want to save them by using the local storage plugin.
What have you tried so far? If you get stuck with any particular issue it would be easier to give you more help.