local level = getPlayerLevel(cid)
local min = x
local max = y
function onCastSpell(cid, var)
if level >= X and level <= y then
doPlayerSendCancel(cid, "Only players of level X or lower can use this spell.")
else
return doCombat(cid, combat, var)
end
end