Try
local foods = {
[12345] = {10, 'Yum.', infinite = true}, -- If true: dont apply item:remove(1)
-- Add the rest here
}
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local food = foods[item.itemid]
if not food then
return false
end...