Now my script uses a seed to generate the level, so I can save only that number and use it to generate an identical level when needed.