Tell us about yourself!
There's no indenting on this, so here is a link to a pastebin I made where is fixed it to the best of my (rushed) abilities. At the end, it also called the main_room function twice, which I deleted. Note: I haven't tested this, and I probably didn't indent an if statement correctly somewhere.
p.s if you were confused as to why this wasn't working correctly, you should probably learn more about python before attempting a project like this.