Here's a basic implementation of the game you described using HTML and JavaScript:
To play the game, simply save the code above as an HTML file (e.g., `game.html`) and open it in a web browser. You can control the player using the arrow keys (left, right, up, down) to move, the space key to shoot bullets, and try to kill all the NPCs to win. The game will display your current score and money earned. Enjoy!