scoreboard objectives add calamityrunner dummy calamityrunner
scoreboard players add @a calamityrunner 1
execute @r[scores={calamityrunner=5..}] ~ ~ ~ function platforms
execute @r[scores={calamityrunner=5..}] ~ ~ ~ scoreboard players set @a calamityrunner 0

execute @e[type=vatonage:spawn_wooden_platform] ~ ~ ~ setblock ~ ~ ~ air
execute @e[type=vatonage:spawn_cobblestone_platform] ~ ~ ~ setblock ~ ~ ~ air
execute @e[type=vatonage:spawn_prismarine_platform] ~ ~ ~ setblock ~ ~ ~ air
execute @e[type=vatonage:spawn_iron_platform] ~ ~ ~ setblock ~ ~ ~ air
execute @e[type=vatonage:spawn_golden_platform] ~ ~ ~ setblock ~ ~ ~ air
execute @e[type=vatonage:spawn_diamond_platform] ~ ~ ~ setblock ~ ~ ~ air
execute @e[type=vatonage:spawn_emerald_platform] ~ ~ ~ setblock ~ ~ ~ air
execute @e[type=vatonage:spawn_purpur_platform] ~ ~ ~ setblock ~ ~ ~ air
execute @e[type=vatonage:spawn_obsidian_platform] ~ ~ ~ setblock ~ ~ ~ air
execute @e[type=vatonage:spawn_magma_platform] ~ ~ ~ setblock ~ ~ ~ air

scoreboard objectives add calamitydespawn dummy calamitydespawn

execute @e[type=vatonage:shadow_illuminator_projectile] ~ ~ ~ tag @s add calamityprojectile
execute @e[type=vatonage:firethrower_projectile] ~ ~ ~ tag @s add calamityprojectile
execute @e[type=vatonage:enderblaster_projectile] ~ ~ ~ tag @s add calamityprojectile
execute @e[type=vatonage:ender_destroyer_projectile] ~ ~ ~ tag @s add calamityprojectile

execute @e[type=vatonage:leafdart_projectile] ~ ~ ~ particle minecraft:crop_growth_emitter ~ ~ ~
execute @e[type=vatonage:gemblast_projectile] ~ ~ ~ particle minecraft:blue_flame_particle ~ ~ ~
execute @e[type=vatonage:shadow_illuminator_projectile] ~ ~ ~ particle minecraft:balloon_gas_particle ~ ~ ~
execute @e[type=vatonage:firethrower_projectile] ~ ~ ~ particle minecraft:basic_flame_particle ~ ~ ~
execute @e[type=vatonage:enderblaster_projectile] ~ ~ ~ particle minecraft:endrod ~ ~ ~
execute @e[type=vatonage:ender_destroyer_projectile] ~ ~ ~ particle minecraft:endrod ~ ~ ~

scoreboard players add @e[tag=calamityprojectile] calamitydespawn 1
execute @e[tag=calamityprojectile,scores={calamitydespawn=60..}] ~ ~ ~ kill @s