$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":"Death Messages ","bold":true,"color":"yellow"},{"text":"(1/3) ","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":" "},{"text":"[⏵]","color":"gray","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 1010"},"hover_event":{"action":"show_text","value":"Next"}}]
tellraw @s ""

# default
tellraw @s ["",{"text":"[","bold":true,"color":"yellow"},{"text":"Default","bold":true,"color":"white","hover_event":{"action":"show_text","value":["",{"selector":"@s","color":"white"},{"text":" died\n","color":"white"},{"selector":"@s","color":"white"},{"text":" fell into the void","color":"white"}]}},{"text":"] ","bold":true,"color":"yellow"}]
execute unless score @s dm_num matches -1 run tellraw @s ["",{"text":"[Select]","color":"dark_purple","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 1001"},"hover_event":{"action":"show_text","value":["",{"text":"Click to Select: ","color":"yellow"},{"text":"Default","color":"aqua"}]}}]
execute if score @s dm_num matches -1 run tellraw @s ["",{"text":"[Selected]","bold":true,"color":"light_purple","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 1001"},"hover_event":{"action":"show_text","value":["",{"text":"Currently Selected: ","color":"light_purple"},{"text":"Default","color":"aqua"}]}}]
tellraw @s ""

# triumphant
tellraw @s ["",{"text":"[","bold":true,"color":"yellow"},{"text":"Triumphant","bold":true,"color":"white","hover_event":{"action":"show_text","value":["",{"selector":"@s","color":"white"},{"text":" fainted valiantly\n","color":"white"},{"selector":"@s","color":"white"},{"text":" was engulfed by eternal darkness"}]}},{"text":"] ","bold":true,"color":"yellow"}]
execute unless entity @s[tag=c_dm_triumphant] run tellraw @s ["",{"text":"[Buy]","color":"green","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 1002"},"hover_event":{"action":"show_text","value":["",{"text":"Cost: ","color":"green"},{"text":"50 Credits","color":"aqua"}]}}]
execute if entity @s[tag=c_dm_triumphant] unless score @s dm_num matches 1 run tellraw @s ["",{"text":"[Select]","color":"dark_purple","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 1002"},"hover_event":{"action":"show_text","value":["",{"text":"Click to Select: ","color":"yellow"},{"text":"Triumphant","color":"aqua"}]}}]
execute if entity @s[tag=c_dm_triumphant] if score @s dm_num matches 1 run tellraw @s ["",{"text":"[Selected]","bold":true,"color":"light_purple","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 1002"},"hover_event":{"action":"show_text","value":["",{"text":"Currently Selected: ","color":"light_purple"},{"text":"Triumphant","color":"aqua"}]}}]
tellraw @s ""

# legend
tellraw @s ["",{"text":"[","bold":true,"color":"yellow"},{"text":"Legend","bold":true,"color":"white","hover_event":{"action":"show_text","value":["",{"selector":"@s","color":"white"},{"text":"'s legend ended in glory\n","color":"white"},{"selector":"@s","color":"white"},{"text":" became one with the void"}]}},{"text":"] ","bold":true,"color":"yellow"}]
execute unless entity @s[tag=c_dm_legend] run tellraw @s ["",{"text":"[Buy]","color":"green","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 1003"},"hover_event":{"action":"show_text","value":["",{"text":"Cost: ","color":"green"},{"text":"50 Credits","color":"aqua"}]}}]
execute if entity @s[tag=c_dm_legend] unless score @s dm_num matches 2 run tellraw @s ["",{"text":"[Select]","color":"dark_purple","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 1003"},"hover_event":{"action":"show_text","value":["",{"text":"Click to Select: ","color":"yellow"},{"text":"Legend","color":"aqua"}]}}]
execute if entity @s[tag=c_dm_legend] if score @s dm_num matches 2 run tellraw @s ["",{"text":"[Selected]","bold":true,"color":"light_purple","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 1003"},"hover_event":{"action":"show_text","value":["",{"text":"Currently Selected: ","color":"light_purple"},{"text":"Legend","color":"aqua"}]}}]
tellraw @s ""

# coward
tellraw @s ["",{"text":"[","bold":true,"color":"yellow"},{"text":"Coward","bold":true,"color":"white","hover_event":{"action":"show_text","value":["",{"selector":"@s","color":"white"},{"text":" ran away in fear\n","color":"white"},{"selector":"@s","color":"white"},{"text":" cried out into the abyss"}]}},{"text":"] ","bold":true,"color":"yellow"}]
execute unless entity @s[tag=c_dm_coward] run tellraw @s ["",{"text":"[Buy]","color":"green","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 1004"},"hover_event":{"action":"show_text","value":["",{"text":"Cost: ","color":"green"},{"text":"50 Credits","color":"aqua"}]}}]
execute if entity @s[tag=c_dm_coward] unless score @s dm_num matches 3 run tellraw @s ["",{"text":"[Select]","color":"dark_purple","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 1004"},"hover_event":{"action":"show_text","value":["",{"text":"Click to Select: ","color":"yellow"},{"text":"Coward","color":"aqua"}]}}]
execute if entity @s[tag=c_dm_coward] if score @s dm_num matches 3 run tellraw @s ["",{"text":"[Selected]","bold":true,"color":"light_purple","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 1004"},"hover_event":{"action":"show_text","value":["",{"text":"Currently Selected: ","color":"light_purple"},{"text":"Coward","color":"aqua"}]}}]
tellraw @s ""

# cursed
tellraw @s ["",{"text":"[","bold":true,"color":"yellow"},{"text":"Cursed","bold":true,"color":"white","hover_event":{"action":"show_text","value":["",{"selector":"@s","color":"white"},{"text":" succumbed to a dark curse\n","color":"white"},{"selector":"@s","color":"white"},{"text":" was banished into the depths"}]}},{"text":"] ","bold":true,"color":"yellow"}]
execute unless entity @s[tag=c_dm_cursed] run tellraw @s ["",{"text":"[Buy]","color":"green","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 1005"},"hover_event":{"action":"show_text","value":["",{"text":"Cost: ","color":"green"},{"text":"50 Credits","color":"aqua"}]}}]
execute if entity @s[tag=c_dm_cursed] unless score @s dm_num matches 4 run tellraw @s ["",{"text":"[Select]","color":"dark_purple","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 1005"},"hover_event":{"action":"show_text","value":["",{"text":"Click to Select: ","color":"yellow"},{"text":"Cursed","color":"aqua"}]}}]
execute if entity @s[tag=c_dm_cursed] if score @s dm_num matches 4 run tellraw @s ["",{"text":"[Selected]","bold":true,"color":"light_purple","click_event":{"action":"run_command","command":"/trigger cosmetics_ui set 1005"},"hover_event":{"action":"show_text","value":["",{"text":"Currently Selected: ","color":"light_purple"},{"text":"Cursed","color":"aqua"}]}}]
tellraw @s ""