tenta assim
local config = {
resets = 2,
msg = "Você não tem resets suficientes para acessar esta área.",
}
function onStepIn(cid, item,position,fromPos)
if not isPlayer(cid) then
return false
end
if getPlayerStorageValue(cid, 378378) <= config.resets then
doTeleportThing(cid, fromPos, true)
doPlayerSendCancel(cid, config.msg)
return false
end
return true
end