Make sure to update all default (and community) resources. Keeping them outdated could lead to such scenarios, where they could make use of incorrectly written logic.
Disable access to load and loadstring in ACL, unless you have certain reason to keep it enabled (latest MTA builds have it disabled by default).
<right name="function.loadstring" access="false"/>
<right name="function.load" access="false"/>
You could take a look at Script security article, which i've recently updated.
Also, there's no such anti-cheat which would protect you from vulnerable Lua code running on your server, so blaming it in first place isn't reasonable - which most of people nowadays shamelessly do. Including ungratefulness towards AC team, which provided nearly cheat-free experience for a few good years.