SHARE
TWEET

Untitled

a guest Nov 9th, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --toggle classes by switching true/false
  2. SpyOn = {
  3.     RemoteEvent = true;
  4.     RemoteFunction = true;
  5.     BindableEvent = false;
  6.     BindableFunction = false;
  7. }
  8. --if true will spy 'hidden' events
  9. spyNilInstances = false
  10. --list of names it will ignore e.g. {"a","b"}
  11. Ignore = {}
  12. --maximum number of sections at once
  13. numMaxSections = 25
  14. --size of padding inside sections
  15. yindent = 20
  16. --/////////////////////////////////////////////////////////////////////////////////////
  17. --by sirelKilla (v3rm)
  18.  
  19. if Synapse==nil then
  20.     warn("This spy is best used with Synapse.")
  21. end
  22.  
  23. local MT = getrawmetatable(game)
  24. if setreadonly then setreadonly(MT,false) end
  25. if make_writeable then make_writeable(MT) end
  26. local oldNamecall = MT.__namecall
  27.  
  28. local Player = game:GetService("Players").LocalPlayer
  29. --basically makes a background
  30. MakeShadow = function(GUI, Deepness)
  31.     for i=1, Deepness do
  32.         local G = GUI:Clone()
  33.         G.ZIndex = GUI.ZIndex - 1
  34.         G.Size=UDim2.new(1,12,1,12)
  35.         G.Position=UDim2.new(0,-6,0,-6)
  36.         G.Active=false
  37.         G.Draggable=false
  38.         G:ClearAllChildren()
  39.         G.Name = GUI.Name.." Shadow"
  40.         G.Parent = GUI
  41.     end
  42. end
  43. --create basic frames
  44. local CanScroll = true
  45. local GUI = Instance.new("ScreenGui",game.CoreGui)
  46. GUI.Name = "SpyScroller"
  47. GUI.ResetOnSpawn = false
  48. GUI.DisplayOrder = 10000
  49. local Main = Instance.new("Frame", GUI)
  50. Main.Active = true
  51. Main.ZIndex = 10000
  52. Main.Size = UDim2.new(0.27, 0, 0.32, 0)
  53. Main.Draggable = true
  54. Main.Style = "DropShadow"
  55. Main.Position = UDim2.new(0.05, 0, 0.05, 0)
  56. MakeShadow(Main, 4)
  57. local Bar = Instance.new("Frame", Main)
  58. Bar.BackgroundColor3=Color3.fromRGB(40,40,40)
  59. Bar.Size = UDim2.new(1, 20, 0.13, 0)
  60. Bar.Position = UDim2.new(0, -10, -0.03)
  61. Bar.ZIndex = Main.ZIndex+1
  62. local Title = Instance.new("TextLabel", Bar)
  63. Title.BackgroundTransparency = 1
  64. Title.Position=UDim2.new(0,10)
  65. Title.TextColor3 = Color3.new(1, 1, 1)
  66. Title.Font = "SourceSansBold"
  67. Title.Text = "Remote Spy"
  68. Title.TextSize = 15
  69. Title.ZIndex = Main.ZIndex+3
  70. Title.TextXAlignment = "Left"
  71. Title.Size = UDim2.new(1, 0, 1, 0)
  72. local Exit = Instance.new("TextButton", Bar)
  73. Exit.BackgroundTransparency = 1
  74. Exit.Text = "x"
  75. Exit.TextColor3 = Color3.new(1, 1, 1)
  76. Exit.Size = UDim2.new(0.08, 0, 1.5, 0)
  77. Exit.TextSize = 20
  78. Exit.TextWrapped = false
  79. Exit.Position = UDim2.new(0.95, -10, -0.28, 0)
  80. Exit.Font = "SourceSansBold"
  81. Exit.ZIndex = Main.ZIndex+1
  82. Exit.MouseButton1Up:connect(function()
  83.     GUI:Destroy()
  84.     MT.__namecall = oldNamecall
  85. end)
  86. Exit.MouseEnter:connect(function()
  87.     Exit.TextColor3 = Color3.new(1, 0, 0)
  88. end)
  89. Exit.MouseLeave:connect(function()
  90.     Exit.TextColor3 = Color3.new(1, 1, 1)
  91. end)
  92. local Scroll = Instance.new("ScrollingFrame", Main)
  93. Scroll.BackgroundTransparency = 1
  94. Scroll.Name = "Scroll"
  95. Scroll.Size = UDim2.new(1, 0, 0.9, 0)
  96. Scroll.ZIndex = Main.ZIndex+1
  97. Scroll.Position = UDim2.new(0, 0, 0.1, 0)
  98. Scroll.BorderSizePixel = 0
  99. Scroll.CanvasSize = UDim2.new()
  100. --clipboard gui
  101. local Popup = Instance.new("TextButton",GUI)
  102. Instance.new("StringValue",Popup).Name = "ToCopy"
  103. Popup.Name="ClipboardBtn"
  104. Popup.Text="Copy"
  105. Popup.Size=UDim2.new(0,40,0,20)
  106. Popup.ZIndex=Main.ZIndex+4
  107. Popup.Visible=false
  108. Popup.MouseButton1Down:Connect(function()
  109.     if Synapse then
  110.         Synapse:CopyString(Popup.ToCopy.Value)
  111.     elseif setclipboard then
  112.         setclipboard(Popup.ToCopy.Value)
  113.     elseif Clipboard then
  114.         Clipboard.set(Popup.ToCopy.Value)
  115.     end
  116.     Popup.Visible=false
  117. end)
  118. --bottom-right resizer
  119. --////
  120. local resize = Instance.new("ImageButton")
  121. resize.Name = "resize"
  122. resize.BackgroundTransparency = 1
  123. resize.Image = "rbxassetid://55927414"
  124. resize.ZIndex = Main.ZIndex+1
  125. resize.Size = UDim2.new(0,13,0,13)
  126. resize.Position = UDim2.new(1,-9,1,-9)
  127. resize.Active=true
  128. resize.Draggable=true
  129. local resizing=false
  130. local mouseConn
  131. resize.DragBegin:Connect(function()
  132.     --basically moves sizer to only absolutes..
  133.     local rAP = resize.AbsolutePosition
  134.     resize.Parent = GUI
  135.     resize.Position = UDim2.new(0,rAP.X,0,rAP.Y)
  136.     --then offsets main size based on those values
  137.     local mS = Main.Size
  138.     local mAS = Main.AbsoluteSize
  139.     local addX,addY=0,0
  140.     mouseConn = Player:GetMouse().Move:Connect(function()
  141.         --most of this is to keep stuff from going negative
  142.         addX,addY = math.max(-mAS.X+240,resize.AbsolutePosition.X - rAP.X),math.max(-mAS.Y+100,resize.AbsolutePosition.Y - rAP.Y)
  143.         Main.Size=mS + UDim2.new(0,addX,0,addY)
  144.         --hide if negative
  145.         if addX>-mAS.X+240 and addY>-mAS.Y+100 then
  146.             resize.ImageTransparency = 0
  147.         else
  148.             resize.ImageTransparency = 1
  149.         end
  150.     end)
  151. end)
  152. resize.DragStopped:Connect(function()
  153.     --turn to normal
  154.     resize.Parent = Main
  155.     resize.Position = UDim2.new(1,-9,1,-9)
  156.     resize.ImageTransparency = 0
  157.     mouseConn:Disconnect()
  158. end)
  159. resize.Parent = Main
  160. --////
  161. local function isMouseDown()
  162.     local array = game:GetService("UserInputService"):GetMouseButtonsPressed()
  163.     for i=1,#array do
  164.         if array[i].UserInputType==Enum.UserInputType.MouseButton1 then
  165.             return true
  166.         end
  167.     end
  168.     return false
  169. end
  170. local db=false
  171. Scroll:GetPropertyChangedSignal("CanvasPosition"):Connect(function()
  172.     if db==false and CanScroll==false and isMouseDown() then
  173.         db=true
  174.         Main.Active=false
  175.         repeat wait(0.5) until not isMouseDown()
  176.         Main.Active=true
  177.         db=false
  178.     end
  179. end)
  180. Instance.new("UIListLayout",Scroll).SortOrder = Enum.SortOrder.LayoutOrder
  181. local sectionIndex = 0
  182.  
  183. local Console = {}
  184. Console.White = Color3.new(1, 1, 1)
  185. Console.LightGray = Color3.fromRGB(155, 155, 155)
  186. local CurrentColour = Console.White
  187. local CurrentSection
  188. local NumLabels = 0
  189. local sections = {}
  190.  
  191. function Console:WriteLine(Text)
  192.     pcall(function()
  193.         if CurrentSection and tostring(Text) then
  194.             NumLabels=NumLabels+1
  195.             local TL = Instance.new("TextLabel")
  196.             TL.Parent = CurrentSection
  197.             TL.Text = tostring(Text)
  198.             TL.TextColor3 = CurrentColour
  199.             TL.BackgroundTransparency = 1
  200.             TL.Font = "SourceSansBold"
  201.             TL.TextSize = 14
  202.             TL.ZIndex = Main.ZIndex+3
  203.             TL.TextXAlignment = "Left"
  204.             TL.TextWrapped = false
  205.             TL.Size = UDim2.new(1, 0, 0, 20)
  206.             local Y = #CurrentSection:GetChildren()*20
  207.             TL.Position = UDim2.new(0, 0, 0, Y-20 + yindent/2)
  208.             CurrentSection.Size = UDim2.new(1, 0, 0, Y + yindent)
  209.             if CanScroll then
  210.                 Scroll.CanvasSize = UDim2.new(0, 0, 0, NumLabels*20)
  211.                 Scroll.CanvasPosition = Vector2.new(0, Scroll.CanvasSize.Y.Offset)
  212.             end
  213.         end
  214.     end)
  215. end
  216. function Console:SetColor(Color)
  217.     CurrentColour = Color
  218. end
  219. function Console:PushSection(ClipboardText)
  220.     if #sections < numMaxSections then --if going to add a section
  221.         NumLabels=NumLabels+(yindent/20) --just increases scroller size
  222.     end
  223.     sectionIndex=sectionIndex+1
  224.     local f = Instance.new("Frame")
  225.     f.BackgroundTransparency = 1 - (0.07 * (sectionIndex % 2)) --alternate colors
  226.     f.BorderSizePixel=2
  227.     f.BorderColor3=Color3.new(1,1,1)
  228.     f.ZIndex = Main.ZIndex+2
  229.     f.Size = UDim2.new()
  230.    
  231.     if ClipboardText~=nil then
  232.         --on right click show copy option label, which copies text when clicked
  233.         f.InputEnded:Connect(function(input)
  234.             if input.UserInputType==Enum.UserInputType.MouseButton2 then
  235.                 Popup.ToCopy.Value = ClipboardText
  236.                 Popup.Position = UDim2.new(0,Player:GetMouse().X+1,0,Player:GetMouse().Y+1)
  237.                 Popup.Visible=true
  238.                 game:GetService("UserInputService").InputBegan:Wait()
  239.                 wait()
  240.                 Popup.Visible=false
  241.             end
  242.         end)
  243.     end
  244.    
  245.     f.LayoutOrder = sectionIndex --for UIListLayout
  246.     if #sections >= numMaxSections and CanScroll then
  247.         --removes any extra sections. limited by CanScroll or else the rotations will still look like scrolling
  248.         for i=0,#sections-numMaxSections do
  249.             NumLabels = NumLabels - #sections[1]:GetChildren()
  250.             sections[1]:Destroy()
  251.             table.remove(sections,1)
  252.         end
  253.     end
  254.     sections[#sections+1]=f
  255.     f.Parent = Scroll
  256.    
  257.     CurrentSection = f
  258. end
  259.  
  260. Console:SetColor(Console.White)
  261.  
  262. Main.MouseEnter:connect(function()
  263.     CanScroll = false
  264. end)
  265. Main.MouseLeave:connect(function()
  266.     CanScroll = true
  267.     --"unpause"
  268.     for i=1,#sections-numMaxSections do
  269.         NumLabels = NumLabels - #sections[1]:GetChildren()
  270.         sections[1]:Destroy()
  271.         table.remove(sections,1)
  272.     end
  273.     Scroll.CanvasSize = UDim2.new(0, 0, 0, NumLabels*20)
  274. end)
  275.  
  276. --//// utilities ////
  277. local function isInArray(t,v)
  278.     for i=1,#t do
  279.         if t[i]==v then
  280.             return true
  281.         end
  282.     end
  283.     return false
  284. end
  285.  
  286. local function instFormat(name)
  287.     if name=='' or name:match("[^_%w]") or name:match("^%d") then
  288.         return '["'..name..'"]'
  289.     end
  290.     return "."..name
  291. end
  292. local function GetPath(inst)
  293.     if inst==game then return "game" end
  294.     if inst.Parent==nil then return inst.Name end
  295.     local current,str=inst,''
  296.     while current.Parent~=game do
  297.         str=instFormat(current.Name) ..str
  298.         current = current.Parent
  299.     end
  300.     if current==workspace then
  301.         return "workspace"..str
  302.     elseif pcall(game.GetService,game,current.ClassName) then
  303.         return 'game:GetService("'.. current.ClassName ..'")'..str
  304.     end
  305.     return "game"..instFormat(current.Name)..str
  306. end
  307.  
  308. local FullPathsMode = false --internally toggled for using GetPath
  309. local function _tostring(x)
  310.     local typ = typeof(x)
  311.     if typ == "table" then
  312.         return tableToString(x)
  313.     elseif typ == "string" then
  314.         return '"'..x..'"'
  315.     elseif typ == "Vector3" then
  316.         return string.format("Vector3.new(%g,%g,%g)",x.X,x.Y,x.Z)
  317.     elseif typ == "Color3" then
  318.         return string.format("Color3.new(%g,%g,%g)",x.r,x.g,x.b)
  319.     elseif typ == "Vector2" then
  320.         return string.format("Vector2.new(%g,%g)",x.X,x.Y)
  321.     elseif typ == "CFrame" then
  322.         return string.format("CFrame.new(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g)",x:components())
  323.     elseif typ == "UDim2" then
  324.         return string.format("UDim2.new(%g,%g,%g,%g)",x.X.Scale,x.X.Offset,x.Y.Scale,x.Y.Offset)
  325.     elseif typ == "Instance" then
  326.         return ((FullPathsMode==true) and GetPath(x)) or x:GetFullName()
  327.     end
  328.    
  329.     return tostring(x)
  330. end
  331.  
  332. function tableToString(tab)
  333.     local str = "{ "
  334.     local len = #tab
  335.  
  336.     local c = 1
  337.     for k,v in pairs(tab) do
  338.         if (k==c and k<=len) then
  339.             --array part
  340.             str = str .. _tostring(v) .. ", "
  341.             c = c + 1
  342.         else
  343.             --dict part
  344.             str = str .. "[" .. _tostring(k) .. "]= " .. _tostring(v) .. ", "
  345.         end
  346.     end
  347.    
  348.     str = str:sub(1,math.max(1,#str-2)) .. " }"
  349.     return str
  350. end
  351.  
  352. function tupleString(tab,fullPaths)
  353.     FullPathsMode=fullPaths
  354.     return tableToString(tab):sub(3,-3)
  355. end
  356. --//// end utilities ////
  357.  
  358. toConsole = function(method, event, Args, Returned)
  359.     local nilParent = game:IsAncestorOf(event)==false
  360.     if (spyNilInstances==false and nilParent==true) or (event.Name=="CharacterSoundEvent" and event.Parent and event.Parent.ClassName=="Sound") or isInArray(Ignore,event.Name) then
  361.         --ignored an event
  362.         return
  363.     end
  364.     pcall(function()
  365.         Console:PushSection(string.format("%s:%s(%s)",GetPath(event),method,tupleString(Args,true)))
  366.         Console:WriteLine(string.format("%s.%s called!",event.ClassName,method))
  367.         Console:WriteLine("Path: "..event:GetFullName())
  368.         Console:WriteLine("Args: "..tupleString(Args))
  369.         if Returned and #Returned>0 then
  370.             Console:WriteLine("Returned: ".. tupleString(Returned))
  371.         end
  372.     end)
  373. end
  374.  
  375. local logsList = {}
  376.  
  377. MT.__namecall = function(inst,...)
  378.     local args = {...}
  379.     local m = getnamecallmethod()
  380.     args[#args]=nil
  381.     if (m=="FireServer" or m=="Fire" or m=="InvokeServer" or m=="Invoke") and SpyOn[inst.ClassName] then
  382.         local returned = {oldNamecall(inst,...)}
  383.         logsList[#logsList+1]={m, inst, args, returned}
  384.         return unpack(returned)
  385.     end
  386.     return oldNamecall(inst,...)
  387. end
  388.  
  389. local spyfunc = hookfunc or replaceclosure
  390. if spyfunc then
  391. if SpyOn.RemoteEvent==true then
  392.     local oldFS
  393.     oldFS = spyfunc(Instance.new("RemoteEvent").FireServer,newcclosure(function(self,...)
  394.         logsList[#logsList+1]={"FireServer",self,{...}}
  395.         return oldFS(self,...)
  396.     end))
  397. end
  398. if SpyOn.RemoteFunction==true then
  399.     local oldIS
  400.     oldIS = spyfunc(Instance.new("RemoteFunction").InvokeServer,newcclosure(function(self,...)
  401.         local returned = {oldIS(self,...)}
  402.         logsList[#logsList+1]={"InvokeServer",self,{...},returned}
  403.         return unpack(returned)
  404.     end))
  405. end
  406. if SpyOn.BindableEvent==true then
  407.     local oldF
  408.     oldF = spyfunc(Instance.new("BindableEvent").Fire,function(self,...)
  409.         logsList[#logsList+1]={"Fire",self,{...}}
  410.         return oldF(self,...)
  411.     end)
  412. end
  413. if SpyOn.BindableFunction==true then
  414.     local oldI
  415.     oldI = spyfunc(Instance.new("BindableFunction").Invoke,function(self,...)
  416.         local returned = {oldI(self,...)}
  417.         logsList[#logsList+1]={"Invoke",self,{...},returned}
  418.         return unpack(returned)
  419.     end)
  420. end
  421. else
  422. warn("Unable to bypass antiexploits.")
  423. end
  424.  
  425. Console:PushSection()
  426. Console:WriteLine("Right-click any section for clipboard option")
  427.  
  428. while wait() and GUI.Parent do
  429.     if #logsList>0 then
  430.         toConsole(unpack(table.remove(logsList,1)))
  431.     end
  432. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top