All credit to Devlog for everything aside from one thing. (don't press 1)
Thanks to Devlog for the majority of the code.