abagde

turtle spy

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