griminz

Remote

Oct 17th, 2020
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 43.99 KB | None | 0 0
  1. -- TurtleSpy V1.5.2, credits to Intrer#0421
  2.  
  3. local colorSettings =
  4. {
  5. ["Main"] = {
  6. ["HeaderColor"] = Color3.fromRGB(0, 168, 255),
  7. ["HeaderShadingColor"] = Color3.fromRGB(0, 151, 230),
  8. ["HeaderTextColor"] = Color3.fromRGB(47, 54, 64),
  9. ["MainBackgroundColor"] = Color3.fromRGB(0, 0, 0,
  10. ["InfoScrollingFrameBgColor"] = Color3.fromRGB(47, 54, 64),
  11. ["ScrollBarImageColor"] = Color3.fromRGB(127, 143, 166)
  12. },
  13. ["RemoteButtons"] = {
  14. ["BorderColor"] = Color3.fromRGB(113, 128, 147),
  15. ["BackgroundColor"] = Color3.fromRGB(53, 59, 72),
  16. ["TextColor"] = Color3.fromRGB(220, 221, 225),
  17. ["NumberTextColor"] = Color3.fromRGB(203, 204, 207)
  18. },
  19. ["MainButtons"] = {
  20. ["BorderColor"] = Color3.fromRGB(113, 128, 147),
  21. ["BackgroundColor"] = Color3.fromRGB(53, 59, 72),
  22. ["TextColor"] = Color3.fromRGB(220, 221, 225)
  23. },
  24. ['Code'] = {
  25. ['BackgroundColor'] = Color3.fromRGB(35, 40, 48),
  26. ['TextColor'] = Color3.fromRGB(220, 221, 225),
  27. ['CreditsColor'] = Color3.fromRGB(108, 108, 108)
  28. },
  29. }
  30.  
  31. local settings = {
  32. ["Keybind"] = "P"
  33. }
  34.  
  35. if PROTOSMASHER_LOADED then
  36. getgenv().isfile = newcclosure(function(File)
  37. local Suc, Er = pcall(readfile, File)
  38. if not Suc then
  39. return false
  40. end
  41. return true
  42. end)
  43. end
  44.  
  45. local HttpService = game:GetService("HttpService")
  46. -- read settings for keybind
  47. if not isfile("TurtleSpySettings.json") then
  48. writefile("TurtleSpySettings.json", HttpService:JSONEncode(settings))
  49. else
  50. if HttpService:JSONDecode(readfile("TurtleSpySettings.json"))["Main"] then
  51. writefile("TurtleSpySettings.json", HttpService:JSONEncode(settings))
  52. else
  53. settings = HttpService:JSONDecode(readfile("TurtleSpySettings.json"))
  54. end
  55. end
  56.  
  57. -- Compatibility for protosmasher: credits to sdjsdj (v3rm username) for converting to proto
  58.  
  59. function isSynapse()
  60. if PROTOSMASHER_LOADED then
  61. return false
  62. else
  63. return true
  64. end
  65. end
  66. function Parent(GUI)
  67. if isSynapse() then
  68. syn.protect_gui(GUI)
  69. GUI.Parent = game:GetService("CoreGui")
  70. elseif PROTOSMASHER_LOADED then
  71. GUI.Parent = get_hidden_gui()
  72. else
  73. GUI.Parent = game:GetService("CoreGui")
  74. end
  75. end
  76.  
  77. local client = game.Players.LocalPlayer
  78. local function toUnicode(string)
  79. local codepoints = "utf8.char("
  80.  
  81. for _i, v in utf8.codes(string) do
  82. codepoints = codepoints .. v .. ', '
  83. end
  84.  
  85. return codepoints:sub(1, -3) .. ')'
  86. end
  87. local function GetFullPathOfAnInstance(instance)
  88. local name = instance.Name
  89. local head = (#name > 0 and '.' .. name) or "['']"
  90.  
  91. if not instance.Parent and instance ~= game then
  92. return head .. " --[[ PARENTED TO NIL OR DESTROYED ]]"
  93. end
  94.  
  95. if instance == game then
  96. return "game"
  97. elseif instance == workspace then
  98. return "workspace"
  99. else
  100. local _success, result = pcall(game.GetService, game, instance.ClassName)
  101.  
  102. if result then
  103. head = ':GetService("' .. instance.ClassName .. '")'
  104. elseif instance == client then
  105. head = '.LocalPlayer'
  106. else
  107. local nonAlphaNum = name:gsub('[%w_]', '')
  108. local noPunct = nonAlphaNum:gsub('[%s%p]', '')
  109.  
  110. if tonumber(name:sub(1, 1)) or (#nonAlphaNum ~= 0 and #noPunct == 0) then
  111. head = '["' .. name:gsub('"', '\\"'):gsub('\\', '\\\\') .. '"]'
  112. elseif #nonAlphaNum ~= 0 and #noPunct > 0 then
  113. head = '[' .. toUnicode(name) .. ']'
  114. end
  115. end
  116. end
  117.  
  118. return GetFullPathOfAnInstance(instance.Parent) .. head
  119. end
  120. -- Main Script
  121.  
  122. -- references to game functions (to prevent using namecall inside of a namecall hook)
  123. local isA = game.IsA
  124. local clone = game.Clone
  125.  
  126. local TextService = game:GetService("TextService")
  127. local getTextSize = TextService.GetTextSize
  128. game.StarterGui.ResetPlayerGuiOnSpawn = false
  129. local mouse = game.Players.LocalPlayer:GetMouse()
  130.  
  131. -- delete the previous instances of turtlespy
  132. if game.CoreGui:FindFirstChild("TurtleSpyGUI") then
  133. game.CoreGui.TurtleSpyGUI:Destroy()
  134. end
  135.  
  136. --Important tables and GUI offsets
  137. local buttonOffset = -25
  138. local scrollSizeOffset = 287
  139. local functionImage = "http://www.roblox.com/asset/?id=413369623"
  140. local eventImage = "http://www.roblox.com/asset/?id=413369506"
  141. local remotes = {}
  142. local remoteArgs = {}
  143. local remoteButtons = {}
  144. local remoteScripts = {}
  145. local IgnoreList = {}
  146. local BlockList = {}
  147. local IgnoreList = {}
  148. local connections = {}
  149. local unstacked = {}
  150.  
  151. -- (mostly) generated code by Gui to lua
  152. local TurtleSpyGUI = Instance.new("ScreenGui")
  153. local mainFrame = Instance.new("Frame")
  154. local Header = Instance.new("Frame")
  155. local HeaderShading = Instance.new("Frame")
  156. local HeaderTextLabel = Instance.new("TextLabel")
  157. local RemoteScrollFrame = Instance.new("ScrollingFrame")
  158. local RemoteButton = Instance.new("TextButton")
  159. local Number = Instance.new("TextLabel")
  160. local RemoteName = Instance.new("TextLabel")
  161. local RemoteIcon = Instance.new("ImageLabel")
  162. local InfoFrame = Instance.new("Frame")
  163. local InfoFrameHeader = Instance.new("Frame")
  164. local InfoTitleShading = Instance.new("Frame")
  165. local CodeFrame = Instance.new("ScrollingFrame")
  166. local Code = Instance.new("TextLabel")
  167. local CodeComment = Instance.new("TextLabel")
  168. local InfoHeaderText = Instance.new("TextLabel")
  169. local InfoButtonsScroll = Instance.new("ScrollingFrame")
  170. local CopyCode = Instance.new("TextButton")
  171. local RunCode = Instance.new("TextButton")
  172. local CopyScriptPath = Instance.new("TextButton")
  173. local CopyDecompiled = Instance.new("TextButton")
  174. local IgnoreRemote = Instance.new("TextButton")
  175. local BlockRemote = Instance.new("TextButton")
  176. local WhileLoop = Instance.new("TextButton")
  177. local CopyReturn = Instance.new("TextButton")
  178. local Clear = Instance.new("TextButton")
  179. local FrameDivider = Instance.new("Frame")
  180. local CloseInfoFrame = Instance.new("TextButton")
  181. local OpenInfoFrame = Instance.new("TextButton")
  182. local Minimize = Instance.new("TextButton")
  183. local DoNotStack = Instance.new("TextButton")
  184. local ImageButton = Instance.new("ImageButton")
  185.  
  186. -- Remote browser
  187. local BrowserHeader = Instance.new("Frame")
  188. local BrowserHeaderFrame = Instance.new("Frame")
  189. local BrowserHeaderText = Instance.new("TextLabel")
  190. local CloseInfoFrame2 = Instance.new("TextButton")
  191. local RemoteBrowserFrame = Instance.new("ScrollingFrame")
  192. local RemoteButton2 = Instance.new("TextButton")
  193. local RemoteName2 = Instance.new("TextLabel")
  194. local RemoteIcon2 = Instance.new("ImageLabel")
  195.  
  196. TurtleSpyGUI.Name = "RemoteSpy"
  197.  
  198. Parent(RemoteSpy)
  199.  
  200. mainFrame.Name = "mainFrame"
  201. mainFrame.Parent = RemoteSpy
  202. mainFrame.BackgroundColor3 = Color3.fromRGB(53, 59, 72)
  203. mainFrame.BorderColor3 = Color3.fromRGB(53, 59, 72)
  204. mainFrame.Position = UDim2.new(0.100000001, 0, 0.239999995, 0)
  205. mainFrame.Size = UDim2.new(0, 207, 0, 35)
  206. mainFrame.ZIndex = 8
  207. mainFrame.Active = true
  208. mainFrame.Draggable = true
  209.  
  210. -- Remote browser properties
  211.  
  212. BrowserHeader.Name = "BrowserHeader"
  213. BrowserHeader.Parent = RemoteSpy
  214. BrowserHeader.BackgroundColor3 = colorSettings["Main"]["HeaderShadingColor"]
  215. BrowserHeader.BorderColor3 = colorSettings["Main"]["HeaderShadingColor"]
  216. BrowserHeader.Position = UDim2.new(0.712152421, 0, 0.339464903, 0)
  217. BrowserHeader.Size = UDim2.new(0, 207, 0, 33)
  218. BrowserHeader.ZIndex = 20
  219. BrowserHeader.Active = true
  220. BrowserHeader.Draggable = true
  221. BrowserHeader.Visible = false
  222.  
  223. BrowserHeaderFrame.Name = "BrowserHeaderFrame"
  224. BrowserHeaderFrame.Parent = BrowserHeader
  225. BrowserHeaderFrame.BackgroundColor3 = colorSettings["Main"]["HeaderColor"]
  226. BrowserHeaderFrame.BorderColor3 = colorSettings["Main"]["HeaderColor"]
  227. BrowserHeaderFrame.Position = UDim2.new(0, 0, -0.0202544238, 0)
  228. BrowserHeaderFrame.Size = UDim2.new(0, 207, 0, 26)
  229. BrowserHeaderFrame.ZIndex = 21
  230.  
  231. BrowserHeaderText.Name = "InfoHeaderText"
  232. BrowserHeaderText.Parent = BrowserHeaderFrame
  233. BrowserHeaderText.BackgroundTransparency = 1.000
  234. BrowserHeaderText.Position = UDim2.new(0, 0, -0.00206991332, 0)
  235. BrowserHeaderText.Size = UDim2.new(0, 206, 0, 33)
  236. BrowserHeaderText.ZIndex = 22
  237. BrowserHeaderText.Font = Enum.Font.SourceSans
  238. BrowserHeaderText.Text = "Remote Browser"
  239. BrowserHeaderText.TextColor3 = colorSettings["Main"]["HeaderTextColor"]
  240. BrowserHeaderText.TextSize = 17.000
  241.  
  242. CloseInfoFrame2.Name = "CloseInfoFrame"
  243. CloseInfoFrame2.Parent = BrowserHeaderFrame
  244. CloseInfoFrame2.BackgroundColor3 = colorSettings["Main"]["HeaderColor"]
  245. CloseInfoFrame2.BorderColor3 = colorSettings["Main"]["HeaderColor"]
  246. CloseInfoFrame2.Position = UDim2.new(0, 185, 0, 2)
  247. CloseInfoFrame2.Size = UDim2.new(0, 22, 0, 22)
  248. CloseInfoFrame2.ZIndex = 38
  249. CloseInfoFrame2.Font = Enum.Font.SourceSansLight
  250. CloseInfoFrame2.Text = "X"
  251. CloseInfoFrame2.TextColor3 = Color3.fromRGB(0, 0, 0)
  252. CloseInfoFrame2.TextSize = 20.000
  253. CloseInfoFrame2.MouseButton1Click:Connect(function()
  254. BrowserHeader.Visible = not BrowserHeader.Visible
  255. end)
  256.  
  257. RemoteBrowserFrame.Name = "RemoteBrowserFrame"
  258. RemoteBrowserFrame.Parent = BrowserHeader
  259. RemoteBrowserFrame.Active = true
  260. RemoteBrowserFrame.BackgroundColor3 = Color3.fromRGB(47, 54, 64)
  261. RemoteBrowserFrame.BorderColor3 = Color3.fromRGB(47, 54, 64)
  262. RemoteBrowserFrame.Position = UDim2.new(-0.004540205, 0, 1.03504682, 0)
  263. RemoteBrowserFrame.Size = UDim2.new(0, 207, 0, 286)
  264. RemoteBrowserFrame.ZIndex = 19
  265. RemoteBrowserFrame.CanvasSize = UDim2.new(0, 0, 0, 287)
  266. RemoteBrowserFrame.ScrollBarThickness = 8
  267. RemoteBrowserFrame.VerticalScrollBarPosition = Enum.VerticalScrollBarPosition.Left
  268. RemoteBrowserFrame.ScrollBarImageColor3 = colorSettings["Main"]["ScrollBarImageColor"]
  269.  
  270. RemoteButton2.Name = "RemoteButton"
  271. RemoteButton2.Parent = RemoteBrowserFrame
  272. RemoteButton2.BackgroundColor3 = colorSettings["RemoteButtons"]["BackgroundColor"]
  273. RemoteButton2.BorderColor3 = colorSettings["RemoteButtons"]["BorderColor"]
  274. RemoteButton2.Position = UDim2.new(0, 17, 0, 10)
  275. RemoteButton2.Size = UDim2.new(0, 182, 0, 26)
  276. RemoteButton2.ZIndex = 20
  277. RemoteButton2.Selected = true
  278. RemoteButton2.Font = Enum.Font.SourceSans
  279. RemoteButton2.Text = ""
  280. RemoteButton2.TextSize = 18.000
  281. RemoteButton2.TextStrokeTransparency = 123.000
  282. RemoteButton2.TextWrapped = true
  283. RemoteButton2.TextXAlignment = Enum.TextXAlignment.Left
  284. RemoteButton2.Visible = false
  285.  
  286. RemoteName2.Name = "RemoteName2"
  287. RemoteName2.Parent = RemoteButton2
  288. RemoteName2.BackgroundTransparency = 1.000
  289. RemoteName2.Position = UDim2.new(0, 5, 0, 0)
  290. RemoteName2.Size = UDim2.new(0, 155, 0, 26)
  291. RemoteName2.ZIndex = 21
  292. RemoteName2.Font = Enum.Font.SourceSans
  293. RemoteName2.Text = "RemoteEventaasdadad"
  294. RemoteName2.TextColor3 = colorSettings["RemoteButtons"]["TextColor"]
  295. RemoteName2.TextSize = 16.000
  296. RemoteName2.TextXAlignment = Enum.TextXAlignment.Left
  297. RemoteName2.TextTruncate = 1
  298.  
  299.  
  300. RemoteIcon2.Name = "RemoteIcon2"
  301. RemoteIcon2.Parent = RemoteButton2
  302. RemoteIcon2.BackgroundTransparency = 1.000
  303. RemoteIcon2.Position = UDim2.new(0.840260386, 0, 0.0225472748, 0)
  304. RemoteIcon2.Size = UDim2.new(0, 24, 0, 24)
  305. RemoteIcon2.ZIndex = 21
  306. RemoteIcon2.Image = functionImage
  307.  
  308. local browsedRemotes = {}
  309. local browsedConnections = {}
  310. local browsedButtonOffset = 10
  311. local browserCanvasSize = 286
  312.  
  313. ImageButton.Parent = Header
  314. ImageButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  315. ImageButton.BackgroundTransparency = 1.000
  316. ImageButton.Position = UDim2.new(0, 8, 0, 8)
  317. ImageButton.Size = UDim2.new(0, 18, 0, 18)
  318. ImageButton.ZIndex = 9
  319. ImageButton.Image = "rbxassetid://169476802"
  320. ImageButton.ImageColor3 = Color3.fromRGB(53, 53, 53)
  321. ImageButton.MouseButton1Click:Connect(function()
  322. BrowserHeader.Visible = not BrowserHeader.Visible
  323. for i, v in pairs(game:GetDescendants()) do
  324. if isA(v, "RemoteEvent") or isA(v, "RemoteFunction") then
  325. local bButton = clone(RemoteButton2)
  326. bButton.Parent = RemoteBrowserFrame
  327. bButton.Visible = true
  328. bButton.Position = UDim2.new(0, 17, 0, browsedButtonOffset)
  329. local fireFunction = ""
  330. if isA(v, "RemoteEvent") then
  331. fireFunction = ":FireServer()"
  332. bButton.RemoteIcon2.Image = eventImage
  333. else
  334. fireFunction = ":InvokeServer()"
  335. end
  336. bButton.RemoteName2.Text = v.Name
  337. local connection = bButton.MouseButton1Click:Connect(function()
  338. setclipboard(GetFullPathOfAnInstance(v)..fireFunction)
  339. end)
  340. table.insert(browsedConnections, connection)
  341. browsedButtonOffset = browsedButtonOffset + 35
  342.  
  343. if #browsedConnections > 8 then
  344. browserCanvasSize = browserCanvasSize + 35
  345. RemoteBrowserFrame.CanvasSize = UDim2.new(0, 0, 0, browserCanvasSize)
  346. end
  347. end
  348. end
  349. end)
  350.  
  351. mouse.KeyDown:Connect(function(key)
  352. if key:lower() == settings["Keybind"]:lower() then
  353. TurtleSpyGUI.Enabled = not TurtleSpyGUI.Enabled
  354. end
  355. end)
  356.  
  357. Header.Name = "Header"
  358. Header.Parent = mainFrame
  359. Header.BackgroundColor3 = colorSettings["Main"]["HeaderColor"]
  360. Header.BorderColor3 = colorSettings["Main"]["HeaderColor"]
  361. Header.Size = UDim2.new(0, 207, 0, 26)
  362. Header.ZIndex = 9
  363.  
  364. HeaderShading.Name = "HeaderShading"
  365. HeaderShading.Parent = Header
  366. HeaderShading.BackgroundColor3 = colorSettings["Main"]["HeaderShadingColor"]
  367. HeaderShading.BorderColor3 = colorSettings["Main"]["HeaderShadingColor"]
  368. HeaderShading.Position = UDim2.new(1.46719131e-07, 0, 0.285714358, 0)
  369. HeaderShading.Size = UDim2.new(0, 207, 0, 27)
  370. HeaderShading.ZIndex = 8
  371.  
  372. HeaderTextLabel.Name = "HeaderTextLabel"
  373. HeaderTextLabel.Parent = HeaderShading
  374. HeaderTextLabel.BackgroundTransparency = 1.000
  375. HeaderTextLabel.Position = UDim2.new(-0.00507604145, 0, -0.202857122, 0)
  376. HeaderTextLabel.Size = UDim2.new(0, 215, 0, 29)
  377. HeaderTextLabel.ZIndex = 10
  378. HeaderTextLabel.Font = Enum.Font.SourceSans
  379. HeaderTextLabel.Text = "RemoteSpy"
  380. HeaderTextLabel.TextColor3 = colorSettings["Main"]["HeaderTextColor"]
  381. HeaderTextLabel.TextSize = 17.000
  382.  
  383. RemoteScrollFrame.Name = "RemoteScrollFrame"
  384. RemoteScrollFrame.Parent = mainFrame
  385. RemoteScrollFrame.Active = true
  386. RemoteScrollFrame.BackgroundColor3 = Color3.fromRGB(47, 54, 64)
  387. RemoteScrollFrame.BorderColor3 = Color3.fromRGB(47, 54, 64)
  388. RemoteScrollFrame.Position = UDim2.new(0, 0, 1.02292562, 0)
  389. RemoteScrollFrame.Size = UDim2.new(0, 207, 0, 286)
  390. RemoteScrollFrame.CanvasSize = UDim2.new(0, 0, 0, 287)
  391. RemoteScrollFrame.ScrollBarThickness = 8
  392. RemoteScrollFrame.VerticalScrollBarPosition = Enum.VerticalScrollBarPosition.Left
  393. RemoteScrollFrame.ScrollBarImageColor3 = colorSettings["Main"]["ScrollBarImageColor"]
  394.  
  395. RemoteButton.Name = "RemoteButton"
  396. RemoteButton.Parent = RemoteScrollFrame
  397. RemoteButton.BackgroundColor3 = colorSettings["RemoteButtons"]["BackgroundColor"]
  398. RemoteButton.BorderColor3 = colorSettings["RemoteButtons"]["BorderColor"]
  399. RemoteButton.Position = UDim2.new(0, 17, 0, 10)
  400. RemoteButton.Size = UDim2.new(0, 182, 0, 26)
  401. RemoteButton.Selected = true
  402. RemoteButton.Font = Enum.Font.SourceSans
  403. RemoteButton.Text = ""
  404. RemoteButton.TextColor3 = Color3.fromRGB(220, 221, 225)
  405. RemoteButton.TextSize = 18.000
  406. RemoteButton.TextStrokeTransparency = 123.000
  407. RemoteButton.TextWrapped = true
  408. RemoteButton.TextXAlignment = Enum.TextXAlignment.Left
  409. RemoteButton.Visible = false
  410.  
  411. Number.Name = "Number"
  412. Number.Parent = RemoteButton
  413. Number.BackgroundTransparency = 1.000
  414. Number.Position = UDim2.new(0, 5, 0, 0)
  415. Number.Size = UDim2.new(0, 300, 0, 26)
  416. Number.ZIndex = 2
  417. Number.Font = Enum.Font.SourceSans
  418. Number.Text = "1"
  419. Number.TextColor3 = colorSettings["RemoteButtons"]["NumberTextColor"]
  420. Number.TextSize = 16.000
  421. Number.TextWrapped = true
  422. Number.TextXAlignment = Enum.TextXAlignment.Left
  423.  
  424. RemoteName.Name = "RemoteName"
  425. RemoteName.Parent = RemoteButton
  426. RemoteName.BackgroundTransparency = 1.000
  427. RemoteName.Position = UDim2.new(0, 20, 0, 0)
  428. RemoteName.Size = UDim2.new(0, 134, 0, 26)
  429. RemoteName.Font = Enum.Font.SourceSans
  430. RemoteName.Text = "RemoteEvent"
  431. RemoteName.TextColor3 = colorSettings["RemoteButtons"]["TextColor"]
  432. RemoteName.TextSize = 16.000
  433. RemoteName.TextXAlignment = Enum.TextXAlignment.Left
  434. RemoteName.TextTruncate = 1
  435.  
  436. RemoteIcon.Name = "RemoteIcon"
  437. RemoteIcon.Parent = RemoteButton
  438. RemoteIcon.BackgroundTransparency = 1.000
  439. RemoteIcon.Position = UDim2.new(0.840260386, 0, 0.0225472748, 0)
  440. RemoteIcon.Size = UDim2.new(0, 24, 0, 24)
  441. RemoteIcon.Image = "http://www.roblox.com/asset/?id=413369506"
  442.  
  443. InfoFrame.Name = "InfoFrame"
  444. InfoFrame.Parent = mainFrame
  445. InfoFrame.BackgroundColor3 = colorSettings["Main"]["MainBackgroundColor"]
  446. InfoFrame.BorderColor3 = colorSettings["Main"]["MainBackgroundColor"]
  447. InfoFrame.Position = UDim2.new(0.368141592, 0, -5.58035717e-05, 0)
  448. InfoFrame.Size = UDim2.new(0, 357, 0, 322)
  449. InfoFrame.Visible = false
  450. InfoFrame.ZIndex = 6
  451.  
  452. InfoFrameHeader.Name = "InfoFrameHeader"
  453. InfoFrameHeader.Parent = InfoFrame
  454. InfoFrameHeader.BackgroundColor3 = colorSettings["Main"]["HeaderColor"]
  455. InfoFrameHeader.BorderColor3 = colorSettings["Main"]["HeaderColor"]
  456. InfoFrameHeader.Size = UDim2.new(0, 357, 0, 26)
  457. InfoFrameHeader.ZIndex = 14
  458.  
  459. InfoTitleShading.Name = "InfoTitleShading"
  460. InfoTitleShading.Parent = InfoFrame
  461. InfoTitleShading.BackgroundColor3 = colorSettings["Main"]["HeaderShadingColor"]
  462. InfoTitleShading.BorderColor3 = colorSettings["Main"]["HeaderShadingColor"]
  463. InfoTitleShading.Position = UDim2.new(-0.00280881394, 0, 0, 0)
  464. InfoTitleShading.Size = UDim2.new(0, 358, 0, 34)
  465. InfoTitleShading.ZIndex = 13
  466.  
  467. CodeFrame.Name = "CodeFrame"
  468. CodeFrame.Parent = InfoFrame
  469. CodeFrame.Active = true
  470. CodeFrame.BackgroundColor3 = colorSettings["Code"]["BackgroundColor"]
  471. CodeFrame.BorderColor3 = colorSettings["Code"]["BackgroundColor"]
  472. CodeFrame.Position = UDim2.new(0.0391303748, 0, 0.141156405, 0)
  473. CodeFrame.Size = UDim2.new(0, 329, 0, 63)
  474. CodeFrame.ZIndex = 16
  475. CodeFrame.CanvasSize = UDim2.new(0, 670, 2, 0)
  476. CodeFrame.ScrollBarThickness = 8
  477. CodeFrame.ScrollingDirection = 1
  478. CodeFrame.ScrollBarImageColor3 = colorSettings["Main"]["ScrollBarImageColor"]
  479.  
  480. Code.Name = "Code"
  481. Code.Parent = CodeFrame
  482. Code.BackgroundTransparency = 1.000
  483. Code.Position = UDim2.new(0.00888902973, 0, 0.0394801199, 0)
  484. Code.Size = UDim2.new(0, 100000, 0, 25)
  485. Code.ZIndex = 18
  486. Code.Font = Enum.Font.SourceSans
  487. Code.Text = "Thanks for using Turtle Spy! :D"
  488. Code.TextColor3 = colorSettings["Code"]["TextColor"]
  489. Code.TextSize = 14.000
  490. Code.TextWrapped = true
  491. Code.TextXAlignment = Enum.TextXAlignment.Left
  492.  
  493. CodeComment.Name = "CodeComment"
  494. CodeComment.Parent = CodeFrame
  495. CodeComment.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  496. CodeComment.BackgroundTransparency = 1.000
  497. CodeComment.Position = UDim2.new(0.0119285434, 0, -0.001968503, 0)
  498. CodeComment.Size = UDim2.new(0, 1000, 0, 25)
  499. CodeComment.ZIndex = 18
  500. CodeComment.Font = Enum.Font.SourceSans
  501. CodeComment.Text = "-- Script generated by TurtleSpy, made by Intrer#0421 Edited by Grim"
  502. CodeComment.TextColor3 = colorSettings["Code"]["CreditsColor"]
  503. CodeComment.TextSize = 14.000
  504. CodeComment.TextXAlignment = Enum.TextXAlignment.Left
  505.  
  506. InfoHeaderText.Name = "InfoHeaderText"
  507. InfoHeaderText.Parent = InfoFrame
  508. InfoHeaderText.BackgroundTransparency = 1.000
  509. InfoHeaderText.Position = UDim2.new(0.0391303934, 0, -0.00206972216, 0)
  510. InfoHeaderText.Size = UDim2.new(0, 342, 0, 35)
  511. InfoHeaderText.ZIndex = 18
  512. InfoHeaderText.Font = Enum.Font.SourceSans
  513. InfoHeaderText.Text = "Info: RemoteFunction"
  514. InfoHeaderText.TextColor3 = colorSettings["Main"]["HeaderTextColor"]
  515. InfoHeaderText.TextSize = 17.000
  516.  
  517. InfoButtonsScroll.Name = "InfoButtonsScroll"
  518. InfoButtonsScroll.Parent = InfoFrame
  519. InfoButtonsScroll.Active = true
  520. InfoButtonsScroll.BackgroundColor3 = colorSettings["Main"]["MainBackgroundColor"]
  521. InfoButtonsScroll.BorderColor3 = colorSettings["Main"]["MainBackgroundColor"]
  522. InfoButtonsScroll.Position = UDim2.new(0.0391303748, 0, 0.355857909, 0)
  523. InfoButtonsScroll.Size = UDim2.new(0, 329, 0, 199)
  524. InfoButtonsScroll.ZIndex = 11
  525. InfoButtonsScroll.CanvasSize = UDim2.new(0, 0, 1, 0)
  526. InfoButtonsScroll.ScrollBarThickness = 8
  527. InfoButtonsScroll.VerticalScrollBarPosition = Enum.VerticalScrollBarPosition.Left
  528. InfoButtonsScroll.ScrollBarImageColor3 = colorSettings["Main"]["ScrollBarImageColor"]
  529.  
  530. CopyCode.Name = "CopyCode"
  531. CopyCode.Parent = InfoButtonsScroll
  532. CopyCode.BackgroundColor3 = colorSettings["MainButtons"]["BackgroundColor"]
  533. CopyCode.BorderColor3 = colorSettings["MainButtons"]["BorderColor"]
  534. CopyCode.Position = UDim2.new(0.0645, 0, 0, 10)
  535. CopyCode.Size = UDim2.new(0, 294, 0, 26)
  536. CopyCode.ZIndex = 15
  537. CopyCode.Font = Enum.Font.SourceSans
  538. CopyCode.Text = "Copy code"
  539. CopyCode.TextColor3 = Color3.fromRGB(250, 251, 255)
  540. CopyCode.TextSize = 16.000
  541.  
  542. RunCode.Name = "RunCode"
  543. RunCode.Parent = InfoButtonsScroll
  544. RunCode.BackgroundColor3 = colorSettings["MainButtons"]["BackgroundColor"]
  545. RunCode.BorderColor3 = colorSettings["MainButtons"]["BorderColor"]
  546. RunCode.Position = UDim2.new(0.0645, 0, 0, 45)
  547. RunCode.Size = UDim2.new(0, 294, 0, 26)
  548. RunCode.ZIndex = 15
  549. RunCode.Font = Enum.Font.SourceSans
  550. RunCode.Text = "Execute"
  551. RunCode.TextColor3 = Color3.fromRGB(250, 251, 255)
  552. RunCode.TextSize = 16.000
  553.  
  554. CopyScriptPath.Name = "CopyScriptPath"
  555. CopyScriptPath.Parent = InfoButtonsScroll
  556. CopyScriptPath.BackgroundColor3 = colorSettings["MainButtons"]["BackgroundColor"]
  557. CopyScriptPath.BorderColor3 = colorSettings["MainButtons"]["BorderColor"]
  558. CopyScriptPath.Position = UDim2.new(0.0645, 0, 0, 80)
  559. CopyScriptPath.Size = UDim2.new(0, 294, 0, 26)
  560. CopyScriptPath.ZIndex = 15
  561. CopyScriptPath.Font = Enum.Font.SourceSans
  562. CopyScriptPath.Text = "Copy script path"
  563. CopyScriptPath.TextColor3 = Color3.fromRGB(250, 251, 255)
  564. CopyScriptPath.TextSize = 16.000
  565.  
  566. CopyDecompiled.Name = "CopyDecompiled"
  567. CopyDecompiled.Parent = InfoButtonsScroll
  568. CopyDecompiled.BackgroundColor3 = colorSettings["MainButtons"]["BackgroundColor"]
  569. CopyDecompiled.BorderColor3 = colorSettings["MainButtons"]["BorderColor"]
  570. CopyDecompiled.Position = UDim2.new(0.0645, 0, 0, 115)
  571. CopyDecompiled.Size = UDim2.new(0, 294, 0, 26)
  572. CopyDecompiled.ZIndex = 15
  573. CopyDecompiled.Font = Enum.Font.SourceSans
  574. CopyDecompiled.Text = "Copy decompiled script"
  575. CopyDecompiled.TextColor3 = Color3.fromRGB(250, 251, 255)
  576. CopyDecompiled.TextSize = 16.000
  577.  
  578. IgnoreRemote.Name = "IgnoreRemote"
  579. IgnoreRemote.Parent = InfoButtonsScroll
  580. IgnoreRemote.BackgroundColor3 = colorSettings["MainButtons"]["BackgroundColor"]
  581. IgnoreRemote.BorderColor3 = colorSettings["MainButtons"]["BorderColor"]
  582. IgnoreRemote.Position = UDim2.new(0.0645, 0, 0, 185)
  583. IgnoreRemote.Size = UDim2.new(0, 294, 0, 26)
  584. IgnoreRemote.ZIndex = 15
  585. IgnoreRemote.Font = Enum.Font.SourceSans
  586. IgnoreRemote.Text = "Ignore remote"
  587. IgnoreRemote.TextColor3 = Color3.fromRGB(250, 251, 255)
  588. IgnoreRemote.TextSize = 16.000
  589.  
  590. BlockRemote.Name = "Block Remote"
  591. BlockRemote.Parent = InfoButtonsScroll
  592. BlockRemote.BackgroundColor3 = colorSettings["MainButtons"]["BackgroundColor"]
  593. BlockRemote.BorderColor3 = colorSettings["MainButtons"]["BorderColor"]
  594. BlockRemote.Position = UDim2.new(0.0645, 0, 0, 220)
  595. BlockRemote.Size = UDim2.new(0, 294, 0, 26)
  596. BlockRemote.ZIndex = 15
  597. BlockRemote.Font = Enum.Font.SourceSans
  598. BlockRemote.Text = "Block remote from firing"
  599. BlockRemote.TextColor3 = Color3.fromRGB(250, 251, 255)
  600. BlockRemote.TextSize = 16.000
  601.  
  602. WhileLoop.Name = "WhileLoop"
  603. WhileLoop.Parent = InfoButtonsScroll
  604. WhileLoop.BackgroundColor3 = colorSettings["MainButtons"]["BackgroundColor"]
  605. WhileLoop.BorderColor3 = colorSettings["MainButtons"]["BorderColor"]
  606. WhileLoop.Position = UDim2.new(0.0645, 0, 0, 290)
  607. WhileLoop.Size = UDim2.new(0, 294, 0, 26)
  608. WhileLoop.ZIndex = 15
  609. WhileLoop.Font = Enum.Font.SourceSans
  610. WhileLoop.Text = "Generate while loop script"
  611. WhileLoop.TextColor3 = Color3.fromRGB(250, 251, 255)
  612. WhileLoop.TextSize = 16.000
  613.  
  614. Clear.Name = "Clear"
  615. Clear.Parent = InfoButtonsScroll
  616. Clear.BackgroundColor3 = colorSettings["MainButtons"]["BackgroundColor"]
  617. Clear.BorderColor3 = colorSettings["MainButtons"]["BorderColor"]
  618. Clear.Position = UDim2.new(0.0645, 0, 0, 255)
  619. Clear.Size = UDim2.new(0, 294, 0, 26)
  620. Clear.ZIndex = 15
  621. Clear.Font = Enum.Font.SourceSans
  622. Clear.Text = "Clear logs"
  623. Clear.TextColor3 = Color3.fromRGB(250, 251, 255)
  624. Clear.TextSize = 16.000
  625.  
  626. CopyReturn.Name = "CopyReturn"
  627. CopyReturn.Parent = InfoButtonsScroll
  628. CopyReturn.BackgroundColor3 = colorSettings["MainButtons"]["BackgroundColor"]
  629. CopyReturn.BorderColor3 = colorSettings["MainButtons"]["BorderColor"]
  630. CopyReturn.Position = UDim2.new(0.0645, 0, 0, 325)
  631. CopyReturn.Size = UDim2.new(0, 294, 0, 26)
  632. CopyReturn.ZIndex = 15
  633. CopyReturn.Font = Enum.Font.SourceSans
  634. CopyReturn.Text = "Execute and copy return value"
  635. CopyReturn.TextColor3 = Color3.fromRGB(250, 251, 255)
  636. CopyReturn.TextSize = 16.000
  637.  
  638. DoNotStack.Name = "CopyReturn"
  639. DoNotStack.Parent = InfoButtonsScroll
  640. DoNotStack.BackgroundColor3 = colorSettings["MainButtons"]["BackgroundColor"]
  641. DoNotStack.BorderColor3 = colorSettings["MainButtons"]["BorderColor"]
  642. DoNotStack.Position = UDim2.new(0.0645, 0, 0, 150)
  643. DoNotStack.Size = UDim2.new(0, 294, 0, 26)
  644. DoNotStack.ZIndex = 15
  645. DoNotStack.Font = Enum.Font.SourceSans
  646. DoNotStack.Text = "Unstack remote when fired with new args"
  647. DoNotStack.TextColor3 = Color3.fromRGB(250, 251, 255)
  648. DoNotStack.TextSize = 16.000
  649.  
  650. FrameDivider.Name = "FrameDivider"
  651. FrameDivider.Parent = InfoFrame
  652. FrameDivider.BackgroundColor3 = Color3.fromRGB(53, 59, 72)
  653. FrameDivider.BorderColor3 = Color3.fromRGB(53, 59, 72)
  654. FrameDivider.Position = UDim2.new(0, 3, 0, 0)
  655. FrameDivider.Size = UDim2.new(0, 4, 0, 322)
  656. FrameDivider.ZIndex = 7
  657.  
  658. local InfoFrameOpen = false
  659. CloseInfoFrame.Name = "CloseInfoFrame"
  660. CloseInfoFrame.Parent = InfoFrame
  661. CloseInfoFrame.BackgroundColor3 = colorSettings["Main"]["HeaderColor"]
  662. CloseInfoFrame.BorderColor3 = colorSettings["Main"]["HeaderColor"]
  663. CloseInfoFrame.Position = UDim2.new(0, 333, 0, 2)
  664. CloseInfoFrame.Size = UDim2.new(0, 22, 0, 22)
  665. CloseInfoFrame.ZIndex = 18
  666. CloseInfoFrame.Font = Enum.Font.SourceSansLight
  667. CloseInfoFrame.Text = "X"
  668. CloseInfoFrame.TextColor3 = Color3.fromRGB(0, 0, 0)
  669. CloseInfoFrame.TextSize = 20.000
  670. CloseInfoFrame.MouseButton1Click:Connect(function()
  671. InfoFrame.Visible = false
  672. InfoFrameOpen = false
  673. mainFrame.Size = UDim2.new(0, 207, 0, 35)
  674. end)
  675.  
  676. OpenInfoFrame.Name = "OpenInfoFrame"
  677. OpenInfoFrame.Parent = mainFrame
  678. OpenInfoFrame.BackgroundColor3 = colorSettings["Main"]["HeaderColor"]
  679. OpenInfoFrame.BorderColor3 = colorSettings["Main"]["HeaderColor"]
  680. OpenInfoFrame.Position = UDim2.new(0, 185, 0, 2)
  681. OpenInfoFrame.Size = UDim2.new(0, 22, 0, 22)
  682. OpenInfoFrame.ZIndex = 18
  683. OpenInfoFrame.Font = Enum.Font.SourceSans
  684. OpenInfoFrame.Text = ">"
  685. OpenInfoFrame.TextColor3 = Color3.fromRGB(0, 0, 0)
  686. OpenInfoFrame.TextSize = 16.000
  687. OpenInfoFrame.MouseButton1Click:Connect(function()
  688. if not InfoFrame.Visible then
  689. mainFrame.Size = UDim2.new(0, 565, 0, 35)
  690. OpenInfoFrame.Text = "<"
  691. elseif RemoteScrollFrame.Visible then
  692. mainFrame.Size = UDim2.new(0, 207, 0, 35)
  693. OpenInfoFrame.Text = ">"
  694. end
  695. InfoFrame.Visible = not InfoFrame.Visible
  696. InfoFrameOpen = not InfoFrameOpen
  697. end)
  698.  
  699. Minimize.Name = "Minimize"
  700. Minimize.Parent = mainFrame
  701. Minimize.BackgroundColor3 = colorSettings["Main"]["HeaderColor"]
  702. Minimize.BorderColor3 = colorSettings["Main"]["HeaderColor"]
  703. Minimize.Position = UDim2.new(0, 164, 0, 2)
  704. Minimize.Size = UDim2.new(0, 22, 0, 22)
  705. Minimize.ZIndex = 18
  706. Minimize.Font = Enum.Font.SourceSans
  707. Minimize.Text = "_"
  708. Minimize.TextColor3 = Color3.fromRGB(0, 0, 0)
  709. Minimize.TextSize = 16.000
  710. Minimize.MouseButton1Click:Connect(function()
  711. -- Close
  712. if RemoteScrollFrame.Visible then
  713. mainFrame.Size = UDim2.new(0, 207, 0, 35)
  714. OpenInfoFrame.Text = "<"
  715. InfoFrame.Visible = false
  716. else
  717. --Open
  718. if InfoFrameOpen then
  719. mainFrame.Size = UDim2.new(0, 565, 0, 35)
  720. OpenInfoFrame.Text = "<"
  721. InfoFrame.Visible = true
  722. else
  723. mainFrame.Size = UDim2.new(0, 207, 0, 35)
  724. OpenInfoFrame.Text = ">"
  725. InfoFrame.Visible = false
  726. end
  727. end
  728. RemoteScrollFrame.Visible = not RemoteScrollFrame.Visible
  729. end)
  730.  
  731. local function FindRemote(remote, args)
  732. local currentId = (get_thread_context or syn.get_thread_identity)()
  733. ;(set_thread_context or syn.set_thread_identity)(7)
  734. local i
  735. if table.find(unstacked, remote) then
  736. local numOfRemotes = 0
  737. for b, v in pairs(remotes) do
  738. if v == remote then
  739. numOfRemotes = numOfRemotes + 1
  740. for i2, v2 in pairs(remoteArgs) do
  741. if table.unpack(remoteArgs[b]) == table.unpack(args) then
  742. i = b
  743. end
  744. end
  745. end
  746. end
  747. else
  748. i = table.find(remotes, remote)
  749. end
  750. ;(set_thread_context or syn.set_thread_identity)(currentId)
  751. return i
  752. end
  753.  
  754. -- creates a simple color and text change effect
  755. local function ButtonEffect(textlabel, text)
  756. if not text then
  757. text = "Copied!"
  758. end
  759. local orgText = textlabel.Text
  760. local orgColor = textlabel.TextColor3
  761. textlabel.Text = text
  762. textlabel.TextColor3 = Color3.fromRGB(76, 209, 55)
  763. wait(0.8)
  764. textlabel.Text = orgText
  765. textlabel.TextColor3 = orgColor
  766. end
  767.  
  768. -- important values for later
  769. local lookingAt
  770. local lookingAtArgs
  771. local lookingAtButton
  772.  
  773. CopyCode.MouseButton1Click:Connect(function()
  774. if not lookingAt then return end
  775. -- copy the code's text to clipboard if the user is lookin at a remote
  776. setclipboard(CodeComment.Text.. "\n\n"..Code.Text)
  777. ButtonEffect(CopyCode)
  778. end)
  779.  
  780. RunCode.MouseButton1Click:Connect(function()
  781. -- find the index of the remote the user is looking at
  782. if lookingAt then
  783. if isA(lookingAt, "RemoteFunction") then
  784. -- fire remote with its args
  785. lookingAt:InvokeServer(unpack(lookingAtArgs))
  786. elseif isA(lookingAt, "RemoteEvent") then
  787. lookingAt:FireServer(unpack(lookingAtArgs))
  788. end
  789. end
  790. end)
  791. CopyScriptPath.MouseButton1Click:Connect(function()
  792. -- get remote index
  793. local remote = FindRemote(lookingAt, lookingAtArgs)
  794. if remote and lookingAt then
  795. -- copy the script name at that index
  796. setclipboard(GetFullPathOfAnInstance(remoteScripts[remote]))
  797. ButtonEffect(CopyScriptPath)
  798. end
  799. end)
  800. -- bool to make decompilations queue instead of running simultaneously
  801. local decompiling
  802. CopyDecompiled.MouseButton1Click:Connect(function()
  803. local remote = FindRemote(lookingAt, lookingAtArgs)
  804. if not isSynapse() then
  805. CopyDecompiled.Text = "This exploit doesn't support decompilation!"
  806. CopyDecompiled.TextColor3 = Color3.fromRGB(232, 65, 24)
  807. wait(1.6)
  808. CopyDecompiled.Text = "Copy decompiled script"
  809. CopyDecompiled.TextColor3 = Color3.fromRGB(250, 251, 255)
  810. return
  811. end
  812. if not decompiling and remote and lookingAt then
  813. decompiling = true
  814.  
  815. -- button effect
  816. spawn(function()
  817. while true do
  818. if decompiling == false then return end
  819. CopyDecompiled.Text = "Decompiling."
  820. wait(0.8)
  821. if decompiling == false then return end
  822. CopyDecompiled.Text = "Decompiling.."
  823. wait(0.8)
  824. if decompiling == false then return end
  825. CopyDecompiled.Text = "Decompiling..."
  826. wait(0.8)
  827. end
  828. end)
  829.  
  830. -- Decompile the remotescript of the remote
  831. local success = { pcall(function()setclipboard(decompile(remoteScripts[remote]))end) }
  832. decompiling = false
  833. if success[1] then
  834. CopyDecompiled.Text = "Copied decompilation!"
  835. CopyDecompiled.TextColor3 = Color3.fromRGB(76, 209, 55)
  836. else
  837. warn(success[2], success[3])
  838. CopyDecompiled.Text = "Decompilation error! Check F9 to see the error."
  839. CopyDecompiled.TextColor3 = Color3.fromRGB(232, 65, 24)
  840. end
  841. wait(1.6)
  842. CopyDecompiled.Text = "Copy decompiled script"
  843. CopyDecompiled.TextColor3 = Color3.fromRGB(250, 251, 255)
  844. end
  845. end)
  846.  
  847. BlockRemote.MouseButton1Click:Connect(function()
  848. -- find the remote the user is looking at and check whether it's blocked or not
  849. local bRemote = table.find(BlockList, lookingAt)
  850.  
  851. if lookingAt and not bRemote then
  852. -- remote isn't blocked, add it to the blocklist
  853. table.insert(BlockList, lookingAt)
  854. BlockRemote.Text = "Unblock remote"
  855. BlockRemote.TextColor3 = Color3.fromRGB(251, 197, 49)
  856. local remote = table.find(remotes, lookingAt)
  857. if remote then
  858. remoteButtons[remote].Parent.RemoteName.TextColor3 = Color3.fromRGB(225, 177, 44)
  859. end
  860. elseif lookingAt and bRemote then
  861. -- remote is
  862. table.remove(BlockList, bRemote)
  863. BlockRemote.Text = "Block remote from firing"
  864. BlockRemote.TextColor3 = Color3.fromRGB(250, 251, 255)
  865. local remote = table.find(remotes, lookingAt)
  866. if remote then
  867. remoteButtons[remote].Parent.RemoteName.TextColor3 = Color3.fromRGB(245, 246, 250)
  868. end
  869. end
  870. end)
  871.  
  872. IgnoreRemote.MouseButton1Click:Connect(function()
  873. -- check if remote is blocked
  874. local iRemote = table.find(IgnoreList, lookingAt)
  875. if lookingAt and not iRemote then
  876. table.insert(IgnoreList, lookingAt)
  877. IgnoreRemote.Text = "Stop ignoring remote"
  878. IgnoreRemote.TextColor3 = Color3.fromRGB(127, 143, 166)
  879. local remote = table.find(remotes, lookingAt)
  880. local unstacked = table.find(unstacked, lookingAt)
  881. if remote then
  882. remoteButtons[remote].Parent.RemoteName.TextColor3 = Color3.fromRGB(127, 143, 166)
  883. end
  884. elseif lookingAt and iRemote then
  885. table.remove(IgnoreList, iRemote)
  886. IgnoreRemote.Text = "Ignore remote"
  887. IgnoreRemote.TextColor3 = Color3.fromRGB(250, 251, 255)
  888. local remote = table.find(remotes, lookingAt)
  889. if remote then
  890. remoteButtons[remote].Parent.RemoteName.TextColor3 = Color3.fromRGB(245, 246, 250)
  891. end
  892. end
  893. end)
  894.  
  895. WhileLoop.MouseButton1Click:Connect(function()
  896. if not lookingAt then return end
  897. setclipboard("while wait() do\n "..Code.Text.."\nend")
  898. ButtonEffect(WhileLoop)
  899. end)
  900.  
  901. Clear.MouseButton1Click:Connect(function()
  902. for i, v in pairs(RemoteScrollFrame:GetChildren()) do
  903. if i > 1 then
  904. v:Destroy()
  905. end
  906. end
  907. for i, v in pairs(connections) do
  908. v:Disconnect()
  909. end
  910. -- reset everything
  911. buttonOffset = -25
  912. scrollSizeOffset = 0
  913. remotes = {}
  914. remoteArgs = {}
  915. remoteButtons = {}
  916. remoteScripts = {}
  917. IgnoreList = {}
  918. BlockList = {}
  919. IgnoreList = {}
  920. RemoteScrollFrame.CanvasSize = UDim2.new(0, 0, 0, 287)
  921. unstacked = {}
  922. connections = {}
  923.  
  924. ButtonEffect(Clear, "Cleared!")
  925. end)
  926.  
  927. DoNotStack.MouseButton1Click:Connect(function()
  928. if lookingAt then
  929. local isUnstacked = table.find(unstacked, lookingAt)
  930. if isUnstacked then
  931. table.remove(unstacked, isUnstacked)
  932. DoNotStack.Text = "Unstack remote when fired with new args"
  933. DoNotStack.TextColor3 = Color3.fromRGB(245, 246, 250)
  934. else
  935. table.insert(unstacked, lookingAt)
  936. DoNotStack.Text = "Stack remote"
  937. DoNotStack.TextColor3 = Color3.fromRGB(251, 197, 49)
  938. end
  939. end
  940. end)
  941.  
  942. local function len(t)
  943. local n = 0
  944.  
  945. for _ in pairs(t) do
  946. n = n + 1
  947. end
  948. return n
  949. end
  950.  
  951. -- converts tables to a string, good for formatting arguments
  952. local function convertTableToString(args)
  953. local string = ""
  954. local index = 1
  955. for i,v in pairs(args) do
  956. if type(i) == "string" then
  957. string = string .. '["' .. tostring(i) .. '"] = '
  958. elseif type(i) == "userdata" and typeof(i) ~= "Instance" then
  959. string = string .. "[" .. typeof(i) .. ".new(" .. tostring(i) .. ")] = "
  960. elseif type(i) == "userdata" then
  961. string = string .. "[" .. GetFullPathOfAnInstance(i) .. "] = "
  962. end
  963. if v == nil then
  964. string = string .. "nil"
  965. elseif typeof(v) == "Instance" then
  966. string = string .. GetFullPathOfAnInstance(v)
  967. elseif type(v) == "number" or type(v) == "function" then
  968. string = string .. tostring(v)
  969. elseif type(v) == "userdata" then
  970. string = string .. typeof(v)..".new("..tostring(v)..")"
  971. elseif type(v) == "string" then
  972. string = string .. [["]]..v..[["]]
  973. elseif type(v) == "table" then
  974. string = string .. "{"
  975. string = string .. convertTableToString(v)
  976. string = string .. "}"
  977. end
  978. if len(args) > 1 and index < len(args) then
  979. string = string .. ","
  980. end
  981. index = index + 1
  982. end
  983. return string
  984. end
  985. CopyReturn.MouseButton1Click:Connect(function()
  986. local remote = FindRemote(lookingAt, lookingAtArgs)
  987. if lookingAt and remote then
  988. if isA(lookingAt, "RemoteFunction") then
  989. -- execute the remote and copy the return value, pretty easy stuff
  990. local result = remotes[remote]:InvokeServer(unpack(remoteArgs[remote]))
  991. setclipboard(convertTableToString(table.pack(result)))
  992. ButtonEffect(CopyReturn)
  993. end
  994. end
  995. end)
  996.  
  997. -- detect when a child is added to the remotescrollframe and add a mousebutton1click signal (doing this in the addToList function causes problems since it's in a roblox thread)
  998. RemoteScrollFrame.ChildAdded:Connect(function(child)
  999. -- get all essential info that will be useful later when the user presses the button
  1000. local remote = remotes[#remotes]
  1001. local args = remoteArgs[#remotes]
  1002. local event = true
  1003. local fireFunction = ":FireServer("
  1004. if isA(remote, "RemoteFunction") then
  1005. event = false
  1006. fireFunction = ":InvokeServer("
  1007. end
  1008. local connection = child.MouseButton1Click:Connect(function()
  1009.  
  1010. InfoHeaderText.Text = "Info: "..remote.Name
  1011. if event then
  1012. InfoButtonsScroll.CanvasSize = UDim2.new(0, 0, 1, 0)
  1013. else
  1014. -- make space for the execute and copy return button since it's a remote function
  1015. InfoButtonsScroll.CanvasSize = UDim2.new(0, 0, 1.1, 0)
  1016. end
  1017. mainFrame.Size = UDim2.new(0, 565, 0, 35)
  1018. OpenInfoFrame.Text = ">"
  1019. InfoFrame.Visible = true
  1020. Code.Text = GetFullPathOfAnInstance(remote)..fireFunction..convertTableToString(args)..")"
  1021. -- gets text size and updates code box's size accordingly
  1022. local textsize = TextService:GetTextSize(Code.Text, Code.TextSize, Code.Font, Vector2.new(math.huge, math.huge))
  1023. CodeFrame.CanvasSize = UDim2.new(0, textsize.X + 11, 2, 0)
  1024. lookingAt = remote
  1025. lookingAtArgs = args
  1026. lookingAtButton = child.Number
  1027.  
  1028. -- is the remote ignored/blocked? in that case, change those buttons
  1029. local blocked = table.find(BlockList, remote)
  1030. if blocked then
  1031. BlockRemote.Text = "Unblock remote"
  1032. BlockRemote.TextColor3 = Color3.fromRGB(251, 197, 49)
  1033. else
  1034. BlockRemote.Text = "Block remote from firing"
  1035. BlockRemote.TextColor3 = Color3.fromRGB(250, 251, 255)
  1036. end
  1037. local iRemote = table.find(IgnoreList, lookingAt)
  1038. if iRemote then
  1039. IgnoreRemote.Text = "Stop ignoring remote"
  1040. IgnoreRemote.TextColor3 = Color3.fromRGB(127, 143, 166)
  1041. else
  1042. IgnoreRemote.Text = "Ignore remote"
  1043. IgnoreRemote.TextColor3 = Color3.fromRGB(250, 251, 255)
  1044. end
  1045. InfoFrameOpen = true
  1046. end)
  1047. -- insert them into a connections table in order to be able to disconnect all of them
  1048. table.insert(connections, connection)
  1049. end)
  1050.  
  1051.  
  1052. -- Main function: add a remote to the list (event: is it a RemoteEvent?, remote: the remote fired, ...: the args)
  1053. function addToList(event, remote, ...)
  1054. -- set thread context since this is running in a game thread
  1055. local currentId = (get_thread_context or syn.get_thread_identity)()
  1056. ;(set_thread_context or syn.set_thread_identity)(7)
  1057. if not remote then return end
  1058.  
  1059. -- important variables
  1060. local name = remote.Name
  1061. local args = {...}
  1062.  
  1063. -- call the FindRemote function to find this specific remote with these args
  1064. local i = FindRemote(remote, args)
  1065.  
  1066. -- if the remote hasn't been found
  1067. if not i then
  1068. -- add remote to remotes table (important)
  1069. table.insert(remotes, remote)
  1070.  
  1071. local rButton = clone(RemoteButton)
  1072. -- add all useful info about the remote to tables
  1073. remoteButtons[#remotes] = rButton.Number
  1074. remoteArgs[#remotes] = args
  1075. remoteScripts[#remotes] = (isSynapse() and getcallingscript() or rawget(getfenv(0), "script"))
  1076.  
  1077. -- clone a little baby of the remotebutton
  1078. rButton.Parent = RemoteScrollFrame
  1079. rButton.Visible = true
  1080. local numberTextsize = getTextSize(TextService, rButton.Number.Text, rButton.Number.TextSize, rButton.Number.Font, Vector2.new(math.huge, math.huge))
  1081. rButton.RemoteName.Position = UDim2.new(0,numberTextsize.X + 10, 0, 0)
  1082. if name then
  1083. rButton.RemoteName.Text = name
  1084. end
  1085. if not event then
  1086. rButton.RemoteIcon.Image = "http://www.roblox.com/asset/?id=413369623"
  1087. end
  1088. buttonOffset = buttonOffset + 35
  1089. rButton.Position = UDim2.new(0.0912411734, 0, 0, buttonOffset)
  1090. if #remotes > 8 then
  1091. scrollSizeOffset = scrollSizeOffset + 35
  1092. RemoteScrollFrame.CanvasSize = UDim2.new(0, 0, 0, scrollSizeOffset)
  1093. end
  1094. else
  1095. -- the remote has been found, increment the remote's button's number text
  1096. remoteButtons[i].Text = tostring(tonumber(remoteButtons[i].Text) + 1)
  1097. -- get the size in pixels of the number text and change the name's position accordingly
  1098. local numberTextsize = getTextSize(TextService, remoteButtons[i].Text, remoteButtons[i].TextSize, remoteButtons[i].Font, Vector2.new(math.huge, math.huge))
  1099. remoteButtons[i].Parent.RemoteName.Position = UDim2.new(0,numberTextsize.X + 10, 0, 0)
  1100. remoteButtons[i].Parent.RemoteName.Size = UDim2.new(0, 149 -numberTextsize.X, 0, 26)
  1101.  
  1102. -- update the arguments
  1103. remoteArgs[i] = args
  1104.  
  1105. -- update the codebox if the player is looking at it
  1106. if lookingAt and lookingAt == remote and lookingAtButton == remoteButtons[i] and InfoFrame.Visible then
  1107. local fireFunction = ":FireServer("
  1108. if isA(remote, "RemoteFunction") then
  1109. fireFunction = ":InvokeServer("
  1110. end
  1111. Code.Text = GetFullPathOfAnInstance(remote)..fireFunction..convertTableToString(remoteArgs[i])..")"
  1112. local textsize = getTextSize(TextService, Code.Text, Code.TextSize, Code.Font, Vector2.new(math.huge, math.huge))
  1113. CodeFrame.CanvasSize = UDim2.new(0, textsize.X + 11, 2, 0)
  1114. end
  1115. end
  1116. ;(set_thread_context or syn.set_thread_identity)(currentId)
  1117. end
  1118.  
  1119. -- game namecall hook (makes the script detect the remotes, basically)
  1120. local GameMt = getrawmetatable(game)
  1121. local OldNamecall = GameMt.__namecall
  1122.  
  1123. setreadonly(GameMt, false)
  1124.  
  1125. GameMt.__namecall = newcclosure(function(Self, ...)
  1126. local method = (getnamecallmethod or get_namecall_method)()
  1127. if method == "FireServer" and isA(Self, "RemoteEvent") then
  1128. -- if the remote is blocked and the remote is being fired by the game then block it
  1129. if not checkcaller() and table.find(BlockList, Self) then
  1130. return
  1131. elseif table.find(IgnoreList, Self) then
  1132. --if ignored then don't call the addToList
  1133. return OldNamecall(Self, ...)
  1134. end
  1135. addToList(true, Self, ...)
  1136. elseif method == "InvokeServer" and isA(Self, 'RemoteFunction') then
  1137. if not checkcaller() and table.find(BlockList, Self) then
  1138. return
  1139. elseif table.find(IgnoreList, Self) then
  1140. return OldNamecall(Self, ...)
  1141. end
  1142. addToList(false, Self, ...)
  1143. end
  1144.  
  1145. return OldNamecall(Self, ...)
  1146. end)
  1147.  
  1148. setreadonly(GameMt, true)
Add Comment
Please, Sign In to add comment