Blender In game level Editor

Hey guys I’m working on an rpg game however at this stage I wanted to make a simple level editor that could be toggled in game so I could play while creating my maps. I currently have it so that I could build on different z-axis levels. I was wondering if anyone could help me with a save and load function, where when a sensor is active for example “E” key the map saves and with the “L” key you can reload the map. Also was wondering if there were a way to create a library of some sort where you could choose which objects to add. If anyone could help point me in the right direction it would be much appreciated. Thank you all in advance! I have posted a video of a demo pretty much showing what I have except in my own I’m using trees instead of blocks