DankGreenMoney

turtlespy

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