Other idea is to modify demo.lua: 1. Load user script in separate environment: local env = {} setmetatable(env, {__index = _ENV})