Sure! Here's a simple text-based game based on Five Nights at Freddy's 2, implemented as a single HTML file using JavaScript:
To play the game, you can simply copy the above code into a new HTML file and open it in a web browser on your smartphone. The game will start automatically and guide you through surviving five nights at Freddy's 2. It uses JavaScript prompts and alerts to interact with the player. Good luck!