yougotoof

lol

Oct 16th, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. local game_mt = getrawmetatable(game);
  2. local old_namecall = game_mt.__namecall; --so nothing breaks
  3. setreadonly(game_mt,false);
  4. local possible_methods = {
  5. [1] = "remove";
  6. [2] = "kick";
  7. [3] = "destroy";
  8. [4] = "Remove";
  9. [5] = "Kick";
  10. [6] = "Destroy";
  11. };
  12. local function isInTable(table, value)
  13. for _,v in ipairs(table) do
  14. if v == value then
  15. return true;
  16. end
  17. end
  18. end
  19. game_mt.__namecall = function(...)
  20. local method_args = {...};
  21. local method = method_args[#method_args];
  22. if isInTable(possible_methods, method) == true then
  23. return true;
  24. end
  25. return old_namecall(...);
  26. end
  27. warn("loaded");
Add Comment
Please, Sign In to add comment