you should do a function structure and a bit more conditional then that.
here is a example creature-spawn
Also your title is not matching your question, is weird... please take your time and change it, so community members can answer about the correct issue you have.
you are asking how to spawn a object every 5 seconds with 1 second apart from each other while title is saying "how do i export my game" xD confusing, is like opening a kinder egg.
As for explaining why your code doesn't work, if you notice you are running a every 1 second loop under 1 time trigger? they don't go like that, you can't really run a loop with a wait in between under 1 time trigger cause the 1 time trigger only lasts 1 tick. where 1 second is 60 ticks or more in a second.