The only difference between a local and a global function is that a global function can be found in _G. Whether it got there by writing "function myfunc(...)" or by "_G.myfunc = myfunc" or "function _G.myfunc(...)" or "_G.myfunc = function(...)" makes no difference.