events.listen('item.right_click', event => {
	
  if (event.item.id == 'kubejs:affixgear6') {
	event.player.playSound('mana-and-artifice:entity_pixie_attack');
		
	event.server.schedule(10, event.server, function (callback) {
	callback.server.runCommandSilent('execute as ' + event.player.name + ' run affixloot ANCIENT'); 
	  })

	  
	if (!event.player.isCreativeMode()) {
	
	event.item.setCount(event.item.getCount() - 1)
	}
	}
});