$execute store result storage pctf:$(x) page.num int 1 run scoreboard players set @s c_page 1

tellraw @s {"text":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"}
tellraw @s ["",{"text":"Arrow Trails ","bold":true,"color":"yellow"},{"text":"(1/1) ","color":"dark_gray"},{"text":"[⏴]","color":"gray","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 1"},"hover_event":{"action":"show_text","value":"Back"}},{"text":" "}]
tellraw @s ""

# default
tellraw @s ["",{"text":"[","bold":true,"color":"yellow"},{"text":"Default","bold":true,"color":"white","hover_event":{"action":"show_text","value":["",{"text":"No trail","color":"white"}]}},{"text":"] ","bold":true,"color":"yellow"}]
execute unless score @s at_num matches -1 run tellraw @s ["",{"text":"[Select]","color":"dark_purple","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 3001"},"hover_event":{"action":"show_text","value":["",{"text":"Click to Select: ","color":"yellow"},{"text":"Default","color":"aqua"}]}}]
execute if score @s at_num matches -1 run tellraw @s ["",{"text":"[Selected]","bold":true,"color":"light_purple","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 3001"},"hover_event":{"action":"show_text","value":["",{"text":"Currently Selected: ","color":"light_purple"},{"text":"Default","color":"aqua"}]}}]
tellraw @s ""

# fiery
tellraw @s ["",{"text":"[","bold":true,"color":"yellow"},{"text":"Fiery","bold":true,"color":"white","hover_event":{"action":"show_text","value":["",{"text":"Things are heating up","color":"white"}]}},{"text":"] ","bold":true,"color":"yellow"}]
execute unless entity @s[tag=c_at_fiery] run tellraw @s ["",{"text":"[Buy]","color":"green","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 3002"},"hover_event":{"action":"show_text","value":["",{"text":"Cost: ","color":"green"},{"text":"80 Credits","color":"aqua"}]}}]
execute if entity @s[tag=c_at_fiery] unless score @s at_num matches 1 run tellraw @s ["",{"text":"[Select]","color":"dark_purple","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 3002"},"hover_event":{"action":"show_text","value":["",{"text":"Click to Select: ","color":"yellow"},{"text":"Fiery","color":"aqua"}]}}]
execute if entity @s[tag=c_at_fiery] if score @s at_num matches 1 run tellraw @s ["",{"text":"[Selected]","bold":true,"color":"light_purple","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 3002"},"hover_event":{"action":"show_text","value":["",{"text":"Currently Selected: ","color":"light_purple"},{"text":"Fiery","color":"aqua"}]}}]
tellraw @s ""

# light
tellraw @s ["",{"text":"[","bold":true,"color":"yellow"},{"text":"Light","bold":true,"color":"white","hover_event":{"action":"show_text","value":["",{"text":"Send them to the light!","color":"white"}]}},{"text":"] ","bold":true,"color":"yellow"}]
execute unless entity @s[tag=c_at_light] run tellraw @s ["",{"text":"[Buy]","color":"green","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 3003"},"hover_event":{"action":"show_text","value":["",{"text":"Cost: ","color":"green"},{"text":"80 Credits","color":"aqua"}]}}]
execute if entity @s[tag=c_at_light] unless score @s at_num matches 2 run tellraw @s ["",{"text":"[Select]","color":"dark_purple","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 3003"},"hover_event":{"action":"show_text","value":["",{"text":"Click to Select: ","color":"yellow"},{"text":"Light","color":"aqua"}]}}]
execute if entity @s[tag=c_at_light] if score @s at_num matches 2 run tellraw @s ["",{"text":"[Selected]","bold":true,"color":"light_purple","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 3003"},"hover_event":{"action":"show_text","value":["",{"text":"Currently Selected: ","color":"light_purple"},{"text":"Light","color":"aqua"}]}}]
tellraw @s ""

# sparkle
tellraw @s ["",{"text":"[","bold":true,"color":"yellow"},{"text":"Sparkle","bold":true,"color":"white","hover_event":{"action":"show_text","value":["",{"text":"Extra flare included","color":"white"}]}},{"text":"] ","bold":true,"color":"yellow"}]
execute unless entity @s[tag=c_at_sparkle] run tellraw @s ["",{"text":"[Buy]","color":"green","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 3004"},"hover_event":{"action":"show_text","value":["",{"text":"Cost: ","color":"green"},{"text":"80 Credits","color":"aqua"}]}}]
execute if entity @s[tag=c_at_sparkle] unless score @s at_num matches 3 run tellraw @s ["",{"text":"[Select]","color":"dark_purple","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 3004"},"hover_event":{"action":"show_text","value":["",{"text":"Click to Select: ","color":"yellow"},{"text":"Sparkle","color":"aqua"}]}}]
execute if entity @s[tag=c_at_sparkle] if score @s at_num matches 3 run tellraw @s ["",{"text":"[Selected]","bold":true,"color":"light_purple","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 3004"},"hover_event":{"action":"show_text","value":["",{"text":"Currently Selected: ","color":"light_purple"},{"text":"Sparkle","color":"aqua"}]}}]
tellraw @s ""

# water
tellraw @s ["",{"text":"[","bold":true,"color":"yellow"},{"text":"Water","bold":true,"color":"white","hover_event":{"action":"show_text","value":["",{"text":"Drench the competition","color":"white"}]}},{"text":"] ","bold":true,"color":"yellow"}]
execute unless entity @s[tag=c_at_water] run tellraw @s ["",{"text":"[Buy]","color":"green","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 3005"},"hover_event":{"action":"show_text","value":["",{"text":"Cost: ","color":"green"},{"text":"80 Credits","color":"aqua"}]}}]
execute if entity @s[tag=c_at_water] unless score @s at_num matches 4 run tellraw @s ["",{"text":"[Select]","color":"dark_purple","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 3005"},"hover_event":{"action":"show_text","value":["",{"text":"Click to Select: ","color":"yellow"},{"text":"Water","color":"aqua"}]}}]
execute if entity @s[tag=c_at_water] if score @s at_num matches 4 run tellraw @s ["",{"text":"[Selected]","bold":true,"color":"light_purple","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 3005"},"hover_event":{"action":"show_text","value":["",{"text":"Currently Selected: ","color":"light_purple"},{"text":"Water","color":"aqua"}]}}]
tellraw @s ""