scoreboard players tag @a[tag=Lobby] add TestItemSpectate
scoreboard players tag @a[tag=LobbyAFK] add TestItemSpectate
scoreboard players tag @a[tag=TestItemSpectate] remove TestItemSpectate {Inventory:[{Slot:4b,id:"minecraft:dye"}]}
clear @a[tag=TestItemSpectate] minecraft:dye 12 1
replaceitem entity @a[tag=TestItemSpectate] slot.hotbar.4 minecraft:dye 1 12 {display:{Name:"§b§lSpectator §6§o(drop to enable)"}}