Sure, here's a simple implementation of a sniper 3D shooting game using JavaScript in a single HTML file:
You can copy this code into a new HTML file and open it in a web browser to play the game. The game consists of a canvas where the player needs to click on a moving target to score points. The score is displayed at the top-left corner of the canvas.