#Deleted
1 messages · Page 1 of 1 (latest)
338 bytes
you should've sent text instead of file
like this
function getItemData(player, ItemStack){
for (let i = 0; i < 50; i++) {
const result = player.runCommand(`testfor @s[hasitem={item=${ItemStack.typeId.replace("minecraft:", "")},location=slot.weapon.mainhand,data=${i}}]`).successCount;
if (result >= 1) return i;
}
return null;
}```
it's just a matter of seconds