Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function installg (installto)
- for k, v in _G.next, _G, nil do
- installto[k] = v
- end
- installto._G = installto
- end
- function create_loaded_metatable (getSelfID)
- return { __index = function (t, k)
- local selfID = getSelfID()
- if not rawget (t, selfID) then
- rawset (t, selfID, {})
- end
- return rawget (t, selfID)[k]
- end,
- __newindex = function (t, k, v)
- local selfID = getSelfID()
- if not rawget (t, selfID) then
- rawset (t, selfID, {})
- end
- rawget (t, selfID)[k] = v
- end
- }
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement