Sure! Here's an example implementation of the game you described using HTML and JavaScript:
This game creates a canvas element where the game is rendered. The user can click on the canvas to shoot a garlic at the vampire, and the goal is to hit the garlic into the vampire's mouth (represented by a red rectangle). The vampire moves from left to right, and if the vampire goes off the screen or the garlic hits the vampire, the game is over and the score is displayed. The garlic (yellow rectangle) moves from left to right as well. The score increases whenever the garlic successfully hits the vampire.