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

tag @s add killer
execute if entity @s[team=red] as @p[tag=!invulnerable,distance=..2.5,gamemode=adventure,team=!red] run function f:game/kill/kill
execute if entity @s[team=blue] as @p[tag=!invulnerable,distance=..2.5,gamemode=adventure,team=!blue] run function f:game/kill/kill
execute if entity @s[team=green] as @p[tag=!invulnerable,distance=..2.5,gamemode=adventure,team=!green] run function f:game/kill/kill
execute if entity @s[team=yellow] as @p[tag=!invulnerable,distance=..2.5,gamemode=adventure,team=!yellow] run function f:game/kill/kill

particle end_rod ^-0.4 ^ ^ 0 0 0 0 1 force @a
tag @s remove killer
execute if entity @s[distance=..120] if block ~ ~ ~ #f:snowball positioned ^ ^ ^0.5 run function f:game/store/bonegun_raycast