Advertisement
SkiedMasterYTT

pack

Jul 25th, 2019
2,352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. local folder = game:GetService("RobloxReplicatedStorage"):FindFirstChild("REMOTESPYFOLDER_P")
  2.  
  3. local enabled = {
  4. BindableEvent = folder.bindableevent.Value;
  5. BindableFunction = folder.bindablefunc.Value;
  6. RemoteEvent = folder.remoteevent.Value;
  7. RemoteFunction = folder.remotefunc.Value;
  8. }
  9.  
  10. local EXTERNAL_LOGGING = folder.external_logging.Value;
  11.  
  12. local IGNORE_LIST = folder.ignore_list.Value;
  13.  
  14. local ignore = {
  15. -- Any remotes matching the names listed below will be ignored
  16.  
  17. }
  18.  
  19. local meta,oldmeta = getrawmetatable(game),{}
  20. changereadonly(meta, false)
  21. for i,v in next,meta do oldmeta[i] = v end
  22. function formatargs(args,showkeys)
  23. if #args == 0 then return "N/A" end
  24. local strargs = {}
  25. for k,v in next,args do
  26. local argstr = ""
  27. if type(v) == "string" then
  28. argstr = "\"" .. v .. "\""
  29. elseif type(v) == "table" then
  30. argstr = "{" .. formatargs(v,true) .. "}"
  31. else
  32. argstr = tostring(v)
  33. end
  34. if showkeys and type(k) ~= "number" then
  35. table.insert(strargs,k.."="..argstr)
  36. else
  37. table.insert(strargs,argstr)
  38. end
  39. end
  40. return table.concat(strargs, ", ")
  41. end
  42. local realmethods = {}
  43. realmethods.Fire = Instance.new("BindableEvent").Fire
  44. realmethods.Invoke = Instance.new("BindableFunction").Invoke
  45. realmethods.FireServer = Instance.new("RemoteEvent").FireServer
  46. realmethods.InvokeServer = Instance.new("RemoteFunction").InvokeServer
  47. meta.__index = function(t,k)
  48. if (k == "Fire" or k == "Invoke" or k == "FireServer" or k == "InvokeServer") and (enabled[t.ClassName] and not ignore[t.Name]) then
  49. return function(self,...)
  50. local args = {...}
  51. local ret = {realmethods[k](self,...)}
  52. if EXTERNAL_LOGGING == true then
  53. if string.find(IGNORE_LIST, t.Name) then
  54. else
  55. console_print(t.ClassName.." called!\nPath: "..t:GetFullName().."\n".."Args: "..formatargs(args).."\nReturn: "..formatargs(ret), Color3.new(255/255, 170/255, 0/255))
  56. end
  57. else
  58. if string.find(IGNORE_LIST, t.Name) then
  59. else
  60. warn(t.ClassName.." called!\nPath: "..t:GetFullName().."\n".."Args: "..formatargs(args).."\nReturn: "..formatargs(ret), Color3.new(255/255, 170/255, 0/255))
  61. end
  62. end
  63. return unpack(ret)
  64. end
  65. else
  66. return oldmeta.__index(t,k)
  67. end
  68. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement