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

execute unless entity @s[nbt={SelectedItemSlot:8}] run title @s[tag=hold_compass] actionbar ""
execute unless entity @s[nbt={SelectedItemSlot:8}] run title @s[tag=compass_title] actionbar ""
tag @s remove compass_title
tag @s remove hold_compass
tag @s[nbt={SelectedItemSlot:8}] add hold_compass

execute if score $game_type main matches 0..2 run item replace entity @s[tag=hold_compass] weapon.offhand with minecraft:carrot_on_a_stick{display:{Name:'""'},Limit:1}

#Seeker use gold
execute if entity @s[team=seeker] run function f:game/compass/seeker_gold