Get the Illegal Ending without unlocking any doors in the saveroom except for G. You're allowed to unlock doors with numbers on them.
What makes this challenging is that you can't get the inventory; and you can't use any resources outside of the train rooms except for two warp bombs, a few gems (useless since you can't go into any shops), a box, some blue cubes and a yellow bird.
The cheat button, developer mode, and changing the savefile through a text editor are all forbidden.
There's no real solution except for the setup, which I might as well post:
While you're in the tutorial, pick up a few boxes and throw them on top of the cliff where the white gun is, making sure to leave three a two-block gap at the top for you to squeeze through. Then get on top of the cliff, pick up the topmost box, and do a jump-drop with it while moving left. You'll get into a secret passage, keep going left, warp out with the master key, open the G door, get going.
Bit late, but I did it.
This challenge isn't nearly as restrictive as you think it is. You seem to be unaware of two things.
First, if you die before reaching the save room, your stack remains unchanged. So you can teleport multiple master keys into the save room. Additional ones can be used for doors in the G area hub, allowing you to skip large parts of it.
Second, there's a hidden passage in the O area that gives you access to the Z tower, village and JTC area. So you can get an inventory book, heal gun and lots of purple guns. In order to get the money you need to buy those, you can get 17 coins from the JTC area and three more in the village in order to buy a use gun. Once you have one and teleported an inventory book, shoot the teleport box in the box shop to retrieve and read it so that you don't lose the use gun when resetting. You can now get lots of quick money by shooting the gem shop's stock. It's not quite enough for the heal gun, but you should be able to afford one with an additional visit to the JTC area or by teleport bombing and retrieving some of the gems in the hidden room at the left end of the O area.