If i have this action for machete,
<action itemid="2420" script="tools/machete.lua" />
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if target.itemid == 2782 then
target:transform(2781)
target:decay()
return true
end
return...