In the future, do not use sampGetChatString method, if chat flows too fast your script will miss it, instead, hook onServerMessage and intercept them as they come.
local sampev = require 'samp.events'
local isModEnable = false -- Dsiabled by default
function main()
while not...