/*
function random(ary){
    return ary[Math.floor(Math.random()*ary.length)];
}

var spawnerHeadChance = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'valhelsia_structures:metal_framed_glass'];



onEvent('entity.spawned', event => {

    if(event.entity.type == 'minecraft:zombie') {
        
        event.server.scheduleInTicks(15, cb => {
        
        var UUID= event.entity.getFullNBT().UUID;
        var cleanUUID = '[I;'+UUID.toString().substring(1);
	  
	  event.server.runCommandSilent('data merge entity @e[nbt={UUID:'+cleanUUID+'},limit=1] {ArmorItems:[{},{},{},{Count:1,id:"'+random(spawnerHeadChance)+'"}]}');
	  
	  event.server.schedule(7500, event.server, function (cb) {
	  
	  cb.server.runCommandSilent('execute as @e[nbt={UUID:'+cleanUUID+'}] run summon minecraft:zombie ' + event.entity.x + ' ' + (event.entity.y+1) + ' ' + event.entity.z);
	  cb.reschedule();
	  })
    });
}
})
*/