You can use a <Self> variable as a counter on each resource and a parallel process to subtract 1 from it until it reaches 0, at which point you can trigger it to respawn.
Is the game freezing in the vanilla project files or only after you add it to your own game? It may be a clash with your existing files.