> How can I read the Lua script and push the Lua functions into a nested table? Try this: function myload(s) _G[s]={} return assert(loadfile(s..".lua","bt",_G[s]))() end Use as follows: myload"script1" myload"script2"