Advertisement
VertexDatCode

RemoteSpy

Nov 10th, 2018
531
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.05 KB | None | 0 0
  1. -- FAST REMOTE SPY (v1.0.7) --
  2.  
  3. --[[
  4. FastRemoteSpy [Updated by Vertex]
  5.  
  6. --]]
  7.  
  8. local Settings = {
  9. Scan = { -- Places where RemoteSpy will look for remotes
  10. game:GetService("ReplicatedStorage"),
  11. game.Workspace
  12. },
  13. Watch = { -- What RemoteSpy watches
  14. RemoteEvent = true,
  15. RemoteFunction = false, -- Doesn't work
  16. BindableEvent = false, -- Doesn't work
  17. BindableFunction = false -- Doesn't work
  18. },
  19. WatchNewObjects = true -- Watches any new objects on the Watch list that get added
  20. }
  21.  
  22. -- Made by OMG_Gaming404 --
  23.  
  24. function tprint (tbl, indent)
  25. if not indent then indent = 0 end
  26. local toprint = string.rep(" ", indent) .. "{\r\n"
  27. indent = indent + 2
  28. for k, v in pairs(tbl) do
  29. toprint = toprint .. string.rep(" ", indent)
  30. if (type(k) == "number") then
  31. toprint = toprint .. "[" .. k .. "] = "
  32. elseif (type(k) == "string") then
  33. toprint = toprint .. k .. "= "
  34. end
  35. if (type(v) == "number") then
  36. toprint = toprint .. v .. ",\r\n"
  37. elseif (type(v) == "string") then
  38. toprint = toprint .. "\"" .. v .. "\",\r\n"
  39. elseif (type(v) == "table") then
  40. toprint = toprint .. tprint(v, indent + 2) .. ",\r\n"
  41. else
  42. toprint = toprint .. "\"" .. tostring(v) .. "\",\r\n"
  43. end
  44. end
  45. toprint = toprint .. string.rep(" ", indent-2) .. "}"
  46. return toprint
  47. end
  48.  
  49. local remotes = {RE = {}, RF = {}, BE = {}, BF = {}}
  50.  
  51. for i,v in next,Settings.Scan do
  52. for ii,vv in next,v:GetDescendants() do
  53. if vv:IsA("RemoteEvent") then
  54. if Settings.Watch.RemoteEvent then
  55. table.insert(remotes.RE, table.getn(remotes.RE) + 1, vv)
  56. end
  57. end
  58. end
  59. end
  60.  
  61. function exec(funcType, level, args, fullname)
  62. if funcType == 1 then
  63. if level == 1 then
  64. print("[RemoteSpy] Remote Event executed {Ran Server-Side}. Arguments: "..tprint(args))
  65. elseif level == 2 then
  66. print("[RemoteSpy] Remote Event executed {Ran Client-Side}. Path: "..fullname.." Arguments: "..tprint(args))
  67. end
  68. elseif funcType == 2 then
  69.  
  70. elseif funcType == 3 then
  71.  
  72. end
  73. end
  74.  
  75. if Settings.WatchNewObjects then
  76. for i,v in next,Settings.Scan do
  77. v.DescendantAdded:connect(function(object)
  78. if object:IsA("RemoteEvent") and Settings.Watch.RemoteEvent then
  79. object.OnServerEvent:connect(function(player,a,b,c,d,e,f,g,h,ii,j)
  80. local ar = {player,a,b,c,d,e,f,g,h,ii,j}
  81. exec(1,2,ar,object:GetFullName())
  82. end)
  83. object.OnClientEvent:connect(function(a,b,c,d,e,f,g,h,ii,j)
  84. local ar = {a,b,c,d,e,f,g,h,ii,j}
  85. exec(1,1,ar,object:GetFullName())
  86. end)
  87. elseif object:IsA("RemoteFunction") and Settings.Watch.BindableFunction then
  88.  
  89. elseif object:IsA("BindableEvent") and Settings.Watch.BindableEvent then
  90. end
  91. end)
  92. end
  93. end
  94.  
  95. for i,v in next,remotes.RE do
  96. v.OnServerEvent:connect(function(a,b,c,d,e,f,g,h,ii,j)
  97. local ar = {a,b,c,d,e,f,g,h,ii,j}
  98. exec(1,2,ar,v:GetFullName())
  99. end)
  100. v.OnClientEvent:connect(function(a,b,c,d,e,f,g,h,ii,j)
  101. local ar = {a,b,c,d,e,f,g,h,ii,j}
  102. exec(1,1,ar,v:GetFullName())
  103. end)
  104. end
  105.  
  106. print("[RemoteSpy] Loaded!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement