I would recommend coming up with a function that does the whole thing, based on certain settings, like position, platform type, coin amount (or pattern), etc.
That way your content creation is separate from the gameplay bits and way easier to manage.
Then in the function, depending on parameters you can, for example, have sub-events that do certain things: First one makes the platform itself, second one places spikes in different patterns, third one places coins in different patterns.
Then you just use whatever game logic to call the function and make your stuff.