public LuaSandbox() { State = new Lua(); State.State.Encoding = Encoding.UTF8; RunnerSource = new WrapMutex <string>(@" import = function () end -- Block import local env = {print = print} local function run(untrusted_code) local untrusted_function, message = load(untrusted_code, nil, 't', env) if not untrusted_function then return nil, message end return pcall(untrusted_function) end return run"); }