Some time ago, i have made this funcion:
function isValueBetween(value, min, max)
return (value >= min and value < max)
end
You can use like that on your code:
local cfg = {[1] = {level = 1, level2 = 100}}
function onSay(cid, words, param, channel)
for v, k in pairs(cfg) do
if...