scoreboard players tag @e[type=item] add KillSecretItem {Item:{id:"minecraft:snowball",tag:{display:{Name:"§b§lSnowball"}}}}
scoreboard players tag @e[type=item] add KillSecretItem {Item:{id:"minecraft:barrier"}}
kill @e[tag=KillSecretItem]

clear @a[score_UseSnowball_min=1,tag=Lobby] snowball
clear @a[score_UseSnowball_min=1,tag=LobbyAFK] snowball
clear @a[score_UseSnowball_min=1,tag=LobbySpectate] snowball

execute @a[tag=LobbySnowball] ~ ~ ~ scoreboard players tag @s[tag=LobbyAFK] add TestforSecretItem
execute @a[tag=LobbySnowball] ~ ~ ~ scoreboard players tag @s[tag=Lobby] add TestforSecretItem
execute @a[tag=LobbySnowball] ~ ~ ~ execute @s[tag=LobbySpectate] ~ ~ ~ execute @s[tag=!LobbyAFKBar] ~ ~ ~ execute @s[tag=!LobbyAFKHowToPlay] ~ ~ ~ scoreboard players tag @s[tag=!LobbyAFKTesterRoom] add TestforSecretItem
execute @a[tag=LobbySnowball] ~ ~ ~ scoreboard players tag @s[tag=Lobby] remove TestforSecretItem {Inventory:[{Slot:0b,id:"minecraft:snowball"}]}
execute @a[tag=LobbySnowball] ~ ~ ~ scoreboard players tag @s[tag=LobbyAFK] remove TestforSecretItem {Inventory:[{Slot:0b,id:"minecraft:snowball"}]}
execute @a[tag=LobbySnowball] ~ ~ ~ execute @s[tag=LobbySpectate] ~ ~ ~ execute @s[tag=!LobbyAFKBar] ~ ~ ~ execute @s[tag=!LobbyAFKHowToPlay] ~ ~ ~ scoreboard players tag @s[tag=!LobbyAFKTesterRoom] remove TestforSecretItem {Inventory:[{Slot:0b,id:"minecraft:snowball"}]}
clear @a[tag=TestforSecretItem] minecraft:snowball


scoreboard players tag @a[tag=TestforSecretItem,score_UseSnowball_min=1] add TestforSecretItem1
scoreboard players tag @a[tag=TestforSecretItem,score_UseSnowball_min=1] remove TestforSecretItem


execute @a[tag=TestforSecretItem] ~ ~ ~ replaceitem entity @s[tag=!TestforSecretItem1] slot.container.0 minecraft:snowball 1 0 {display:{Name:"§b§lSnowball"}}


scoreboard players add @a[tag=TestforSecretItem1] GiveSecret 1

scoreboard players tag @a[score_GiveSecret_min=0,score_GiveSecret=55] add TestforSecretBarrier
scoreboard players tag @a[score_GiveSecret_min=0,score_GiveSecret=55] remove TestforSecretBarrier {Inventory:[{Slot:0b,id:"minecraft:barrier"}]}
clear @a[tag=TestforSecretBarrier] minecraft:barrier

replaceitem entity @a[score_GiveSecret_min=1,score_GiveSecret=5] slot.container.0 minecraft:barrier 1 0 {display:{Name:"§l§6[§cIIIIIIIIII§6]"}}
replaceitem entity @a[score_GiveSecret_min=6,score_GiveSecret=10] slot.container.0 minecraft:barrier 1 0 {display:{Name:"§l§6[§2I§cIIIIIIIII§6]"}}
replaceitem entity @a[score_GiveSecret_min=11,score_GiveSecret=15] slot.container.0 minecraft:barrier 1 0 {display:{Name:"§l§6[§2II§cIIIIIIII§6]"}}
replaceitem entity @a[score_GiveSecret_min=16,score_GiveSecret=20] slot.container.0 minecraft:barrier 1 0 {display:{Name:"§l§6[§2III§cIIIIIII§6]"}}
replaceitem entity @a[score_GiveSecret_min=21,score_GiveSecret=25] slot.container.0 minecraft:barrier 1 0 {display:{Name:"§l§6[§2IIII§cIIIIII§6]"}}
replaceitem entity @a[score_GiveSecret_min=26,score_GiveSecret=30] slot.container.0 minecraft:barrier 1 0 {display:{Name:"§l§6[§2IIIII§cIIIII§6]"}}
replaceitem entity @a[score_GiveSecret_min=31,score_GiveSecret=35] slot.container.0 minecraft:barrier 1 0 {display:{Name:"§l§6[§2IIIIII§cIIII§6]"}}
replaceitem entity @a[score_GiveSecret_min=36,score_GiveSecret=40] slot.container.0 minecraft:barrier 1 0 {display:{Name:"§l§6[§2IIIIIII§cIII§6]"}}
replaceitem entity @a[score_GiveSecret_min=41,score_GiveSecret=45] slot.container.0 minecraft:barrier 1 0 {display:{Name:"§l§6[§2IIIIIIII§cII§6]"}}
replaceitem entity @a[score_GiveSecret_min=46,score_GiveSecret=50] slot.container.0 minecraft:barrier 1 0 {display:{Name:"§l§6[§2IIIIIIIII§cI§6]"}}
replaceitem entity @a[score_GiveSecret_min=51,score_GiveSecret=55] slot.container.0 minecraft:barrier 1 0 {display:{Name:"§l§6[§2IIIIIIIIII§6]"}}

replaceitem entity @a[score_GiveSecret_min=56] slot.container.0 minecraft:snowball 1 0 {display:{Name:"§b§lSnowball"}}
scoreboard players tag @a[score_GiveSecret_min=56] remove TestforSecretItem1
scoreboard players reset @a[score_GiveSecret_min=56] GiveSecret