Sure! Here is an example of a game similar to Five Nights at Freddy's implemented as a single HTML file using JavaScript:
Camera 1
Camera 2
Camera 3
Camera 4
Camera 5
Camera 6
Office
In this game, there are six cameras represented by pictogram buttons (camera 1 to camera 6). The player can click on the camera buttons to toggle them on and off. When the animatronics are in camera 1 or camera 2, they slowly slip into camera 6. If the animatronics are in the player's office, they can press the red button (door) to shut the door and prevent them from entering.