# Hat variants
scoreboard players add @s hat_variant 1
execute as @s if score @s hat_variant matches 6.. run scoreboard players set @s hat_variant 0
execute if score @s hat_variant matches 0 run scoreboard players set @s hat 42
execute if score @s hat_variant matches 1 run scoreboard players set @s hat 43
execute if score @s hat_variant matches 2 run scoreboard players set @s hat 47
execute if score @s hat_variant matches 3 run scoreboard players set @s hat 44
execute if score @s hat_variant matches 4 run scoreboard players set @s hat 45
execute if score @s hat_variant matches 5 run scoreboard players set @s hat 46

# Fanfare
execute if score @s hat_variant matches 0 run tellraw @s [{"text":"!! ","color":"#f0f000"},{"text":"Secret Accessed","color":"#f0f01c"},{"text":":","color":"gray"}, \
   {"text":"\n  Tour Guide Hat","color":"white"},{"text":" equipped.","color":"gray"}, \
   {"text":"\n  Master Sword","color":"white"},{"text":" equipped.","color":"gray"}, \
   {"text":"\n  Deku Wood Bow","color":"white"},{"text":" equipped.","color":"gray"}]
execute if score @s hat_variant matches 1 run tellraw @s [{"text":"!! ","color":"#f0f000"},{"text":"Secret Accessed","color":"#f0f01c"},{"text":":","color":"gray"}, \
   {"text":"\n  Poof","color":"white"},{"text":" equipped.","color":"gray"}, \
   {"text":"\n  Master Sword","color":"white"},{"text":" equipped.","color":"gray"}, \
   {"text":"\n  Deku Wood Bow","color":"white"},{"text":" equipped.","color":"gray"}]
execute if score @s hat_variant matches 2 run tellraw @s [{"text":"!! ","color":"#f0f000"},{"text":"Secret Accessed","color":"#f0f01c"},{"text":":","color":"gray"}, \
   {"text":"\n  Boar Head","color":"white"},{"text":" equipped.","color":"gray"}, \
   {"text":"\n  Master Sword","color":"white"},{"text":" equipped.","color":"gray"}, \
   {"text":"\n  Deku Wood Bow","color":"white"},{"text":" equipped.","color":"gray"}]
execute if score @s hat_variant matches 3 run tellraw @s [{"text":"!! ","color":"#f0f000"},{"text":"Secret Accessed","color":"#f0f01c"},{"text":":","color":"gray"}, \
   {"text":"\n  Propeller Hat","color":"white"},{"text":" equipped.","color":"gray"}, \
   {"text":"\n  Master Sword","color":"white"},{"text":" equipped.","color":"gray"}, \
   {"text":"\n  Deku Wood Bow","color":"white"},{"text":" equipped.","color":"gray"}]
execute if score @s hat_variant matches 4 run tellraw @s [{"text":"!! ","color":"#f0f000"},{"text":"Secret Accessed","color":"#f0f01c"},{"text":":","color":"gray"}, \
   {"text":"\n  Golden Goose Mask","color":"white"},{"text":" equipped.","color":"gray"}, \
   {"text":"\n  Master Sword","color":"white"},{"text":" equipped.","color":"gray"}, \
   {"text":"\n  Deku Wood Bow","color":"white"},{"text":" equipped.","color":"gray"}]
execute if score @s hat_variant matches 5 run tellraw @s [{"text":"!! ","color":"#f0f000"},{"text":"Secret Accessed","color":"#f0f01c"},{"text":":","color":"gray"}, \
   {"text":"\n  Computer Head","color":"white"},{"text":" equipped.","color":"gray"}, \
   {"text":"\n  Master Sword","color":"white"},{"text":" equipped.","color":"gray"}, \
   {"text":"\n  Deku Wood Bow","color":"white"},{"text":" equipped.","color":"gray"}]

# Other
scoreboard players set @s sword 45
scoreboard players set @s bow 43

# Tells user they can select more
tellraw @s {"text":"Press again to select different secret hat.","color":"gray"}