Here's an example of a simple text-based rap game where you earn and lose money by pressing the arrow keys correctly:
Rap Money Game
Press the arrow keys to rap and earn money.
If you miss, you lose money.
Your score: 0
Your money: $0
To play the game, save the above code in a single HTML file (e.g., index.html) and open it in a web browser. Press the arrow keys (left, right, up, or down) to rap and earn money. Each correct arrow key press earns you $10 and increases your score by 1. However, if you press the wrong arrow key, you lose $5. Your current score and money amount will be displayed on the page. Have fun rapping and earning money in the game!