For instance, you could (and people have done it !) create a simple game logic with Custom Variables, storing the current score and the high score of the game.

Simple CustomVariable Group containing 2 values.

Simple CustomVariable Group containing 2 values.

Then you can have any event, like the press of a button, increment your current score

An action that increments the "Score" custom variable on every button Press

An action that increments the "Score" custom variable on every button Press

And finally add another action to verify if the current score is a certain number to check if the game is finished. In this same action you can then show an "end of game" message and also reset the current score to 0.

An action that shows "YOU WIN" and reset the current score when it hits 10

An action that shows "YOU WIN" and reset the current score when it hits 10