Advertisement
RandomNewbieScripter

Untitled

Jul 1st, 2018
575
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.01 KB | None | 0 0
  1. local mt = getrawmetatable(game)
  2. local old_i = mt.__index
  3. local old_n = mt.__namecall
  4.  
  5. do
  6.     local f = setreadonly or make_writeable or fullaccess or function() return end
  7.     pcall(f, mt, false)
  8. end
  9.  
  10. local newcclosure = newcclosure or function(f) return f end
  11. local checkcaller = checkcaller or is_protosmasher_caller or function(env) return env.getrawmetatable end
  12.  
  13. mt.__namecall = newcclosure(function(self, ...)
  14.     local p = {...}
  15.     local m = table.remove(p, #p)
  16.  
  17.     if m == "HttpGet" or m == 'HttpGetAsync' then
  18.         local url = p[1]
  19.  
  20.         if string.lower(url):find("getauthticket") then
  21.             return 0
  22.             print("nope xdxdxd")
  23.         end
  24.     end
  25.  
  26.     return old_n(self, ...)
  27. end)
  28.  
  29. mt.__index = newcclosure(function(t, k)
  30.     if t == game and checkcaller(getfenv(2)) then
  31.         if k == 'HttpGet' then
  32.             return function(self, url, ...)
  33.                 return game:HttpGet(url, ...)
  34.             end
  35.         elseif k == 'HttpGetAsync' then
  36.             return function(self, url, ...)
  37.                 return game:HttpGetAsync(url, ...)
  38.             end
  39.         end
  40.     end
  41.     return old_i(t, k)
  42. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement