Advertisement
AxLikesDonuts

Esper Online RemoteSpy

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