kill @e[tag=top]

#Gens stants
    #Wins
    summon armor_stand 500.50 103.50 -989.49 {CustomNameVisible:0b,NoGravity:1b,Invulnerable:1b,ShowArms:1b,NoBasePlate:1b,Tags:["top","top_win"],Pose:{LeftArm:[285f,334f,0f],RightArm:[255f,36f,20f],LeftLeg:[350f,8f,356f],RightLeg:[4f,334f,6f],Head:[24f,358f,8f]},DisabledSlots:4144959,Rotation:[180F,0F],equipment:{feet:{id:"minecraft:diamond_boots",count:1b},legs:{id:"minecraft:diamond_leggings",count:1b},chest:{id:"minecraft:diamond_chestplate",count:1},head:{id:"minecraft:player_head",count:1,components:{"minecraft:profile":{properties:[{name:"textures",value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTAzNWM1MjgwMzZiMzg0YzUzYzljOGExYTEyNTY4NWUxNmJmYjM2OWMxOTdjYzlmMDNkZmEzYjgzNWIxYWE1NSJ9fX0="}]}}},mainhand:{id:"trident",count:1b},offhand:{id:"minecraft:bow",count:1b}}}
    summon text_display 500.50 106.3 -989.80 {Rotation:[180f,25f],Tags:["top"],billboard:"fixed",text:{"color":"#f1bc48","fallback":"Top Wins","italic":false,bold:true,"translate":"subchronos.lobby.top.wins","shadow_color":-12113912},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1.3f,1.3f,1.3f]},background:16711680}
    summon text_display 500.50 106. -989.60 {Rotation:[180f,25f],Tags:["top","top_win"],billboard:"fixed",text:{"color":"#f1bc48","text":"???","italic":false,"shadow_color":-12113912},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1.3f,1.3f,1.3f]},background:16711680}
    #Deaths
    summon armor_stand 502.75 101.90 -989.54 {CustomNameVisible:0b,NoGravity:1b,Invulnerable:1b,ShowArms:1b,NoBasePlate:1b,Tags:["top","top_death"],Pose:{Body:[64f,0f,0f],LeftArm:[295f,0f,27f],RightArm:[259f,32f,9f],Head:[34f,0f,0f]},DisabledSlots:4144959,Rotation:[161F,0F],equipment:{head:{id:"minecraft:player_head",count:1,components:{"minecraft:profile":{properties:[{name:"textures",value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTAzNWM1MjgwMzZiMzg0YzUzYzljOGExYTEyNTY4NWUxNmJmYjM2OWMxOTdjYzlmMDNkZmEzYjgzNWIxYWE1NSJ9fX0="}]}}},chest:{id:"minecraft:leather_chestplate",count:1b,components:{"minecraft:dyed_color":0}},mainhand:{id:"ender_pearl",count:1b}}}
    summon text_display 502.75 104.6 -989.80 {Rotation:[180f,25f],Tags:["top"],billboard:"fixed",text:{"color":"#f1bc48","fallback":"Top Deaths",bold:true,"italic":false,"translate":"subchronos.lobby.top.deaths","shadow_color":-12113912},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1.3f,1.3f,1.3f]},background:16711680}
    summon text_display 502.75 104.3 -989.60 {Rotation:[180f,25f],Tags:["top","top_death"],billboard:"fixed",text:{"color":"#f1bc48","text":"???","italic":false,"shadow_color":-12113912},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1.3f,1.3f,1.3f]},background:16711680}
    #kills
    summon armor_stand 498.17 103.00 -989.51 {CustomNameVisible:0b,NoGravity:1b,Invulnerable:1b,ShowArms:1b,NoBasePlate:1b,Tags:["top","top_kills"],Pose:{Body:[6f,0f,0f],LeftArm:[287f,32f,267f],RightArm:[337f,329f,0f],LeftLeg:[12f,16f,355f],RightLeg:[349f,0f,9f],Head:[28f,14f,13f]},DisabledSlots:4144959,Rotation:[180F,0F],equipment:{head:{id:"minecraft:player_head",count:1,components:{"minecraft:profile":{properties:[{name:"textures",value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTAzNWM1MjgwMzZiMzg0YzUzYzljOGExYTEyNTY4NWUxNmJmYjM2OWMxOTdjYzlmMDNkZmEzYjgzNWIxYWE1NSJ9fX0="}]}}},feet:{id:"golden_boots",count:1b},legs:{id:"golden_leggings",count:1b},chest:{id:"golden_chestplate",count:1b},mainhand:{id:"diamond_sword",count:1b},offhand:{id:"netherite_sword",count:1b}}}
    summon text_display 498.17 105.45 -989.80 {Rotation:[180f,25f],Tags:["top"],billboard:"fixed",text:{"color":"#f1bc48","fallback":"Top Kills",bold:true,"italic":false,"translate":"subchronos.lobby.top.kills","shadow_color":-12113912},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1.3f,1.3f,1.3f]},background:16711680}
    summon text_display 498.17 105.15 -989.60 {Rotation:[180f,25f],Tags:["top","top_kills"],billboard:"fixed",text:{"color":"#f1bc48","text":"???","italic":false,"shadow_color":-12113912},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1.3f,1.3f,1.3f]},background:16711680}

#Gets top of all stats
function subchronos:lobby/top/get_tops/wins
function subchronos:lobby/top/get_tops/deaths
function subchronos:lobby/top/get_tops/kills

#Updates each stant
execute unless score .top statsWins matches 0 as @a if score @s statsWins = .top statsWins run function subchronos:lobby/top/update/get_nick
execute unless score .top statsWins matches 0 run data merge storage subchronos:input {top:{tag:"top_win"}}
execute unless score .top statsWins matches 0 run function subchronos:lobby/top/update/update_stant with storage subchronos:input top

execute unless score .top statsDeaths matches 0 as @a if score @s statsDeaths = .top statsDeaths run function subchronos:lobby/top/update/get_nick
execute unless score .top statsDeaths matches 0 run data merge storage subchronos:input {top:{tag:"top_death"}}
execute unless score .top statsDeaths matches 0 run function subchronos:lobby/top/update/update_stant with storage subchronos:input top

execute unless score .top statsKills matches 0 as @a if score @s statsKills = .top statsKills run function subchronos:lobby/top/update/get_nick
execute unless score .top statsKills matches 0 run data merge storage subchronos:input {top:{tag:"top_kills"}}
execute unless score .top statsKills matches 0 run function subchronos:lobby/top/update/update_stant with storage subchronos:input top