Advertisement
Guest User

Anti kick (might or might not work)

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