It may be useful to define the global environment as read-only. Such that it is not possible to create/modify any global variables. This will not effect locals.
-- Not allowed:
my_global = 12
-- Locals ok
local my_local = 12
-- Calling functions is allowed
foobar()