#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#
#    This function has been created by Skilendarz Group.
#             https://skilendarz.com
#
#      GIVE MAP MAKERS THE CREDIT THEY DESERVE!
#             COPYING IS PROHIBITED!
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

#Get Player
tag @a remove this_p
scoreboard players operation $id id = @s id
execute as @a[tag=player] if score @s id = $id id run tag @s add this_p
execute as @a[team=seeker] if score @s id = $id id run tag @s add this_p

#Storage
tp @s @p[tag=this_p]
scoreboard players operation @s pumpkin_count = @p[tag=this_p] pumpkin_count

#Player left
execute unless entity @p[tag=this_p] if score @s pumpkin_count matches 1.. run summon firework_rocket ~ ~1 ~ {LifeTime:1,FireworksItem:{id:"firework_rocket",Count:1,tag:{Fireworks:{Explosions:[{Type:0,Colors:[I;12844856,8485119],FadeColors:[I;16744760,4587500]}]}}}}
execute unless entity @p[tag=this_p] if score @s pumpkin_count matches 1.. run function f:game/kill/drop
execute unless entity @p[tag=this_p] run kill @s

tag @a remove this_p