execute if entity @s[tag=!playing] run scoreboard players enable @s cosmetics_ui
playsound minecraft:ui.button.click player @s ~ ~ ~ 1 2
execute anchored eyes run particle minecraft:crit ^ ^ ^0.5 0.25 0.25 0.25 0.5 10 force @s

execute store result storage pctf:id input.x int 1 run scoreboard players get @s real_ID

execute if score @s cosmetics_ui matches 1 run function pctf:cosmetics/start

## death messages
execute if score @s cosmetics_ui matches 1000 run function pctf:cosmetics/death_messages/page/1 with storage pctf:id input
execute if score @s cosmetics_ui matches 1010 run function pctf:cosmetics/death_messages/page/2 with storage pctf:id input
execute if score @s cosmetics_ui matches 1020 run function pctf:cosmetics/death_messages/page/3 with storage pctf:id input

execute if score @s cosmetics_ui matches 1001 run function pctf:cosmetics/death_messages/default
execute if score @s cosmetics_ui matches 1002 run function pctf:cosmetics/death_messages/triumphant
execute if score @s cosmetics_ui matches 1003 run function pctf:cosmetics/death_messages/legend
execute if score @s cosmetics_ui matches 1004 run function pctf:cosmetics/death_messages/coward
execute if score @s cosmetics_ui matches 1005 run function pctf:cosmetics/death_messages/cursed
execute if score @s cosmetics_ui matches 1006 run function pctf:cosmetics/death_messages/cyber
execute if score @s cosmetics_ui matches 1007 run function pctf:cosmetics/death_messages/kek
execute if score @s cosmetics_ui matches 1008 run function pctf:cosmetics/death_messages/pirate
execute if score @s cosmetics_ui matches 1009 run function pctf:cosmetics/death_messages/not_my_fault
execute if score @s cosmetics_ui matches 1011 run function pctf:cosmetics/death_messages/brutal
execute if score @s cosmetics_ui matches 1012 run function pctf:cosmetics/death_messages/noble
execute if score @s cosmetics_ui matches 1013 run function pctf:cosmetics/death_messages/statistical
execute if score @s cosmetics_ui matches 1014 run function pctf:cosmetics/death_messages/lolcat
execute if score @s cosmetics_ui matches 1015 run function pctf:cosmetics/death_messages/sarcastic
execute if score @s cosmetics_ui matches 1016 run function pctf:cosmetics/death_messages/existential

## kill messages
execute if score @s cosmetics_ui matches 2000 run function pctf:cosmetics/kill_messages/page/1 with storage pctf:id input
execute if score @s cosmetics_ui matches 2010 run function pctf:cosmetics/kill_messages/page/2 with storage pctf:id input
execute if score @s cosmetics_ui matches 2020 run function pctf:cosmetics/kill_messages/page/3 with storage pctf:id input

execute if score @s cosmetics_ui matches 2001 run function pctf:cosmetics/kill_messages/default
execute if score @s cosmetics_ui matches 2002 run function pctf:cosmetics/kill_messages/assassin
execute if score @s cosmetics_ui matches 2003 run function pctf:cosmetics/kill_messages/western
execute if score @s cosmetics_ui matches 2004 run function pctf:cosmetics/kill_messages/trolled
execute if score @s cosmetics_ui matches 2005 run function pctf:cosmetics/kill_messages/mythological
execute if score @s cosmetics_ui matches 2006 run function pctf:cosmetics/kill_messages/brief
execute if score @s cosmetics_ui matches 2007 run function pctf:cosmetics/kill_messages/alien_abduction
execute if score @s cosmetics_ui matches 2008 run function pctf:cosmetics/kill_messages/origami
execute if score @s cosmetics_ui matches 2009 run function pctf:cosmetics/kill_messages/hairstyler
execute if score @s cosmetics_ui matches 2011 run function pctf:cosmetics/kill_messages/time_travel
execute if score @s cosmetics_ui matches 2012 run function pctf:cosmetics/kill_messages/statistical
execute if score @s cosmetics_ui matches 2013 run function pctf:cosmetics/kill_messages/lolcat
execute if score @s cosmetics_ui matches 2014 run function pctf:cosmetics/kill_messages/brain_rot
execute if score @s cosmetics_ui matches 2015 run function pctf:cosmetics/kill_messages/medieval
execute if score @s cosmetics_ui matches 2016 run function pctf:cosmetics/kill_messages/apocalypse

## arrow trails
execute if score @s cosmetics_ui matches 3000 run function pctf:cosmetics/arrow_trails/page/1 with storage pctf:id input
execute if score @s cosmetics_ui matches 3010 run function pctf:cosmetics/arrow_trails/page/2 with storage pctf:id input
execute if score @s cosmetics_ui matches 3020 run function pctf:cosmetics/arrow_trails/page/3 with storage pctf:id input

execute if score @s cosmetics_ui matches 3001 run function pctf:cosmetics/arrow_trails/default
execute if score @s cosmetics_ui matches 3002 run function pctf:cosmetics/arrow_trails/fiery
execute if score @s cosmetics_ui matches 3003 run function pctf:cosmetics/arrow_trails/light
execute if score @s cosmetics_ui matches 3004 run function pctf:cosmetics/arrow_trails/sparkle
execute if score @s cosmetics_ui matches 3005 run function pctf:cosmetics/arrow_trails/water

scoreboard players set @s cosmetics_ui -1