Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Metatable = gemetaxtable(game)
- local Backup = Metatable
- local FunctionHandler = function(Instance, Name)
- if Instance == game and Name == "GetObjects" then
- return function(Instance, ...)
- return { GetObjects(...) }
- end
- end
- end
- Metatable.__index = function(Instance, Key)
- local Value = FunctionHandler(Instance, Key)
- if Value then
- return Value
- end
- return Backup.__index(Instance, Key)
- end
- Metatable.__namecall = function(Instance, ...)
- local Arguments = {...}
- local Method = table.remove(Arguments)
- if tostring(type(Method)) == "string" then
- local Return = FunctionHandler(Instance, Method)
- if Return then
- return Return(Instance, unpack(Arguments))
- end
- return Backup.__namecall(Instance, ...)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement