Help me write a simple script, I don’t understand anything about it(Every time a player drops a pickaxe with 30 efficiency after death, he throws it away or puts it in a chest, it just needs to be removed This is what the AI gave me, but it doesn’t work:
on item spawn:
if event-entity is a pickaxe:
if event-entity's tool enchantments contains "efficiency":
if level of enchantment "efficiency" of event-entity is 30:
delete event-entity