Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local game_mt = getrawmetatable(game);
- local old_namecall = game_mt.__namecall; --so nothing breaks
- setreadonly(game_mt,false);
- local possible_methods = {
- [1] = "remove";
- [2] = "kick";
- [3] = "destroy";
- [4] = "Remove";
- [5] = "Kick";
- [6] = "Destroy";
- };
- local function isInTable(table, value)
- for _,v in ipairs(table) do
- if v == value then
- return true;
- end
- end
- end
- game_mt.__namecall = function(...)
- local method_args = {...};
- local method = method_args[#method_args];
- if isInTable(possible_methods, method) == true then
- return true;
- end
- return old_namecall(...);
- end
- warn("loaded");
Add Comment
Please, Sign In to add comment