Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.
You should take a look at SephirothSpawn's Event Spawner script. If you won't use it as it is, you'll surely find what you need in there. I recommend it in the whole, though.