Advertisement
okban

kylr

Jan 22nd, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 113.17 KB | None | 0 0
  1. function sandbox(var,func)
  2. local env = getfenv(func)
  3. local newenv = setmetatable({},{
  4. __index = function(self,k)
  5. if k=="script" then
  6. return var
  7. else
  8. return env[k]
  9. end
  10. end,
  11. })
  12. setfenv(func,newenv)
  13. return func
  14. end
  15. cors = {}
  16. mas = Instance.new("Model",game:GetService("Lighting"))
  17. ScreenGui0 = Instance.new("ScreenGui")
  18. TextButton1 = Instance.new("TextButton")
  19. LocalScript2 = Instance.new("LocalScript")
  20. Frame3 = Instance.new("Frame")
  21. TextButton4 = Instance.new("TextButton")
  22. LocalScript5 = Instance.new("LocalScript")
  23. TextButton6 = Instance.new("TextButton")
  24. TextButton7 = Instance.new("TextButton")
  25. LocalScript8 = Instance.new("LocalScript")
  26. Frame9 = Instance.new("Frame")
  27. Frame10 = Instance.new("Frame")
  28. TextLabel11 = Instance.new("TextLabel")
  29. Frame12 = Instance.new("Frame")
  30. ImageButton13 = Instance.new("ImageButton")
  31. Frame14 = Instance.new("Frame")
  32. Frame15 = Instance.new("Frame")
  33. Frame16 = Instance.new("Frame")
  34. Frame17 = Instance.new("Frame")
  35. Frame18 = Instance.new("Frame")
  36. ImageButton19 = Instance.new("ImageButton")
  37. Frame20 = Instance.new("Frame")
  38. Frame21 = Instance.new("Frame")
  39. Frame22 = Instance.new("Frame")
  40. Frame23 = Instance.new("Frame")
  41. Frame24 = Instance.new("Frame")
  42. ImageButton25 = Instance.new("ImageButton")
  43. ImageButton26 = Instance.new("ImageButton")
  44. Frame27 = Instance.new("Frame")
  45. Frame28 = Instance.new("Frame")
  46. Frame29 = Instance.new("Frame")
  47. Frame30 = Instance.new("Frame")
  48. LocalScript31 = Instance.new("LocalScript")
  49. Frame32 = Instance.new("Frame")
  50. TextLabel33 = Instance.new("TextLabel")
  51. Frame34 = Instance.new("Frame")
  52. Frame35 = Instance.new("Frame")
  53. TextLabel36 = Instance.new("TextLabel")
  54. TextLabel37 = Instance.new("TextLabel")
  55. Frame38 = Instance.new("Frame")
  56. Frame39 = Instance.new("Frame")
  57. TextLabel40 = Instance.new("TextLabel")
  58. TextBox41 = Instance.new("TextBox")
  59. ImageButton42 = Instance.new("ImageButton")
  60. LocalScript43 = Instance.new("LocalScript")
  61. LocalScript44 = Instance.new("LocalScript")
  62. Frame45 = Instance.new("Frame")
  63. Frame46 = Instance.new("Frame")
  64. TextLabel47 = Instance.new("TextLabel")
  65. TextLabel48 = Instance.new("TextLabel")
  66. Frame49 = Instance.new("Frame")
  67. ImageButton50 = Instance.new("ImageButton")
  68. Frame51 = Instance.new("Frame")
  69. Frame52 = Instance.new("Frame")
  70. Frame53 = Instance.new("Frame")
  71. Frame54 = Instance.new("Frame")
  72. Frame55 = Instance.new("Frame")
  73. ImageButton56 = Instance.new("ImageButton")
  74. Frame57 = Instance.new("Frame")
  75. Frame58 = Instance.new("Frame")
  76. Frame59 = Instance.new("Frame")
  77. Frame60 = Instance.new("Frame")
  78. Frame61 = Instance.new("Frame")
  79. ImageButton62 = Instance.new("ImageButton")
  80. ImageButton63 = Instance.new("ImageButton")
  81. Frame64 = Instance.new("Frame")
  82. Frame65 = Instance.new("Frame")
  83. Frame66 = Instance.new("Frame")
  84. Frame67 = Instance.new("Frame")
  85. Frame68 = Instance.new("Frame")
  86. Frame69 = Instance.new("Frame")
  87. TextLabel70 = Instance.new("TextLabel")
  88. TextLabel71 = Instance.new("TextLabel")
  89. Frame72 = Instance.new("Frame")
  90. Frame73 = Instance.new("Frame")
  91. TextLabel74 = Instance.new("TextLabel")
  92. TextBox75 = Instance.new("TextBox")
  93. ImageButton76 = Instance.new("ImageButton")
  94. LocalScript77 = Instance.new("LocalScript")
  95. TextBox78 = Instance.new("TextBox")
  96. TextButton79 = Instance.new("TextButton")
  97. TextLabel80 = Instance.new("TextLabel")
  98. TextLabel81 = Instance.new("TextLabel")
  99. Frame82 = Instance.new("Frame")
  100. LocalScript83 = Instance.new("LocalScript")
  101. BindableEvent84 = Instance.new("BindableEvent")
  102. BindableFunction85 = Instance.new("BindableFunction")
  103. BindableFunction86 = Instance.new("BindableFunction")
  104. BindableFunction87 = Instance.new("BindableFunction")
  105. BindableFunction88 = Instance.new("BindableFunction")
  106. Frame89 = Instance.new("Frame")
  107. Frame90 = Instance.new("Frame")
  108. TextLabel91 = Instance.new("TextLabel")
  109. Frame92 = Instance.new("Frame")
  110. TextLabel93 = Instance.new("TextLabel")
  111. Frame94 = Instance.new("Frame")
  112. ImageButton95 = Instance.new("ImageButton")
  113. Frame96 = Instance.new("Frame")
  114. Frame97 = Instance.new("Frame")
  115. Frame98 = Instance.new("Frame")
  116. Frame99 = Instance.new("Frame")
  117. Frame100 = Instance.new("Frame")
  118. ImageButton101 = Instance.new("ImageButton")
  119. Frame102 = Instance.new("Frame")
  120. Frame103 = Instance.new("Frame")
  121. Frame104 = Instance.new("Frame")
  122. Frame105 = Instance.new("Frame")
  123. Frame106 = Instance.new("Frame")
  124. ImageButton107 = Instance.new("ImageButton")
  125. ImageButton108 = Instance.new("ImageButton")
  126. Frame109 = Instance.new("Frame")
  127. Frame110 = Instance.new("Frame")
  128. Frame111 = Instance.new("Frame")
  129. Frame112 = Instance.new("Frame")
  130. Frame113 = Instance.new("Frame")
  131. Frame114 = Instance.new("Frame")
  132. TextLabel115 = Instance.new("TextLabel")
  133. TextLabel116 = Instance.new("TextLabel")
  134. Frame117 = Instance.new("Frame")
  135. Frame118 = Instance.new("Frame")
  136. TextLabel119 = Instance.new("TextLabel")
  137. TextBox120 = Instance.new("TextBox")
  138. ImageButton121 = Instance.new("ImageButton")
  139. LocalScript122 = Instance.new("LocalScript")
  140. Script123 = Instance.new("Script")
  141. BindableFunction124 = Instance.new("BindableFunction")
  142. ScreenGui0.Name = "Explorer"
  143. ScreenGui0.Parent = mas
  144. TextButton1.Name = "Locaa"
  145. TextButton1.Parent = ScreenGui0
  146. TextButton1.Size = UDim2.new(0, 145, 0, 40)
  147. TextButton1.Text = "Local"
  148. TextButton1.Position = UDim2.new(0, 154, 0, 330)
  149. TextButton1.Visible = false
  150. TextButton1.BackgroundColor3 = Color3.new(0, 0, 0)
  151. TextButton1.BorderSizePixel = 0
  152. TextButton1.AutoButtonColor = false
  153. TextButton1.Font = Enum.Font.SourceSansBold
  154. TextButton1.FontSize = Enum.FontSize.Size36
  155. TextButton1.TextColor3 = Color3.new(0, 0, 0)
  156. TextButton1.TextStrokeColor3 = Color3.new(1, 1, 1)
  157. TextButton1.TextStrokeTransparency = 0
  158. LocalScript2.Parent = TextButton1
  159. table.insert(cors,sandbox(LocalScript2,function()
  160. local player = game.Players.LocalPlayer
  161.  
  162. function click()
  163. player.PlayerGui.KappaGUI.Page1Commands.Visible = false
  164. player.PlayerGui.KappaGUI.Close.Visible = true
  165. player.PlayerGui.KappaGUI.Open.Visible = false
  166. player.PlayerGui.KappaGUI.Page2Commands.Visible = true
  167. player.PlayerGui.KappaGUI.lll.Visible = false
  168. player.PlayerGui.KappaGUI.rrr.Visible = true
  169. end
  170.  
  171. script.Parent.MouseButton1Down:connect(click)
  172.  
  173. end))
  174. Frame3.Name = "Tools"
  175. Frame3.Parent = ScreenGui0
  176. Frame3.Transparency = 1
  177. Frame3.Size = UDim2.new(0, 100, 0, 100)
  178. Frame3.Active = true
  179. Frame3.Visible = false
  180. Frame3.BackgroundColor3 = Color3.new(1, 1, 1)
  181. Frame3.BackgroundTransparency = 1
  182. Frame3.BorderSizePixel = 0
  183. TextButton4.Name = "Close"
  184. TextButton4.Parent = ScreenGui0
  185. TextButton4.Size = UDim2.new(0, 70, 0, 20)
  186. TextButton4.Text = "Close"
  187. TextButton4.Position = UDim2.new(0, 4, 0, 464)
  188. TextButton4.Visible = false
  189. TextButton4.BackgroundColor3 = Color3.new(0, 0, 1)
  190. TextButton4.BorderSizePixel = 0
  191. TextButton4.AutoButtonColor = false
  192. TextButton4.Font = Enum.Font.ArialBold
  193. TextButton4.FontSize = Enum.FontSize.Size14
  194. TextButton4.TextColor3 = Color3.new(1, 1, 1)
  195. LocalScript5.Parent = TextButton4
  196. table.insert(cors,sandbox(LocalScript5,function()
  197. local player = game.Players.LocalPlayer
  198.  
  199. function click()
  200. player.PlayerGui.KappaGUI.Page1Commands.Visible = false
  201. player.PlayerGui.KappaGUI.Close.Visible = false
  202. player.PlayerGui.KappaGUI.Open.Visible = true
  203. player.PlayerGui.KappaGUI.Page2Commands.Visible = false
  204. player.PlayerGui.KappaGUI.Locaa.Visible = false
  205. player.PlayerGui.KappaGUI.Main.Visible = false
  206. player.PlayerGui.KappaGUI.lll.Visible = false
  207. player.PlayerGui.KappaGUI.rrr.Visible = false
  208. end
  209.  
  210. script.Parent.MouseButton1Down:connect(click)
  211.  
  212. end))
  213. TextButton6.Name = "ExplorerToggle"
  214. TextButton6.Parent = ScreenGui0
  215. TextButton6.Transparency = 0.5
  216. TextButton6.Size = UDim2.new(0, 175, 0, 20)
  217. TextButton6.Text = "Explorer: CLOSED"
  218. TextButton6.Position = UDim2.new(0.800000012, 0, 0.100000001, 1)
  219. TextButton6.BackgroundColor3 = Color3.new(0, 0, 0)
  220. TextButton6.BackgroundTransparency = 0.5
  221. TextButton6.BorderColor3 = Color3.new(0, 0, 0)
  222. TextButton6.BorderSizePixel = 0
  223. TextButton6.Font = Enum.Font.SourceSans
  224. TextButton6.FontSize = Enum.FontSize.Size18
  225. TextButton6.TextColor3 = Color3.new(1, 1, 1)
  226. TextButton6.TextStrokeColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  227. TextButton6.TextStrokeTransparency = 0.69999998807907
  228. TextButton7.Name = "Main"
  229. TextButton7.Parent = ScreenGui0
  230. TextButton7.Size = UDim2.new(0, 145, 0, 40)
  231. TextButton7.Text = "Main"
  232. TextButton7.Position = UDim2.new(0, 4, 0, 330)
  233. TextButton7.Visible = false
  234. TextButton7.BackgroundColor3 = Color3.new(0, 0, 0)
  235. TextButton7.BorderSizePixel = 0
  236. TextButton7.AutoButtonColor = false
  237. TextButton7.Font = Enum.Font.SourceSansBold
  238. TextButton7.FontSize = Enum.FontSize.Size36
  239. TextButton7.TextColor3 = Color3.new(0, 0, 0)
  240. TextButton7.TextStrokeColor3 = Color3.new(1, 1, 1)
  241. TextButton7.TextStrokeTransparency = 0
  242. LocalScript8.Parent = TextButton7
  243. table.insert(cors,sandbox(LocalScript8,function()
  244. local player = game.Players.LocalPlayer
  245.  
  246. function click()
  247. player.PlayerGui.KappaGUI.Page1Commands.Visible = true
  248. player.PlayerGui.KappaGUI.Close.Visible = true
  249. player.PlayerGui.KappaGUI.Open.Visible = false
  250. player.PlayerGui.KappaGUI.Page2Commands.Visible = false
  251. player.PlayerGui.KappaGUI.lll.Visible = true
  252. player.PlayerGui.KappaGUI.rrr.Visible = false
  253. end
  254.  
  255. script.Parent.MouseButton1Down:connect(click)
  256.  
  257. end))
  258. Frame9.Name = "PropertiesPanel"
  259. Frame9.Parent = ScreenGui0
  260. Frame9.Transparency = 0.10000000149012
  261. Frame9.Size = UDim2.new(0, 300, 0.5, -50)
  262. Frame9.Position = UDim2.new(1, -615, 0, 200)
  263. Frame9.Active = true
  264. Frame9.Visible = false
  265. Frame9.BackgroundColor3 = Color3.new(1, 1, 1)
  266. Frame9.BackgroundTransparency = 0.10000000149012
  267. Frame9.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  268. Frame10.Name = "List"
  269. Frame10.Parent = Frame9
  270. Frame10.Transparency = 1
  271. Frame10.Size = UDim2.new(1, -16, 1, -18)
  272. Frame10.Position = UDim2.new(0, 0, 0, 18)
  273. Frame10.BackgroundTransparency = 1
  274. Frame10.ClipsDescendants = true
  275. TextLabel11.Name = "TextWidth"
  276. TextLabel11.Parent = Frame9
  277. TextLabel11.Size = UDim2.new(1, 0, 1, 0)
  278. TextLabel11.Text = "TweenService"
  279. TextLabel11.Visible = false
  280. TextLabel11.Font = Enum.Font.SourceSans
  281. TextLabel11.FontSize = Enum.FontSize.Size14
  282. TextLabel11.TextXAlignment = Enum.TextXAlignment.Left
  283. Frame12.Name = "ScrollFrame"
  284. Frame12.Parent = Frame9
  285. Frame12.Transparency = 1
  286. Frame12.Size = UDim2.new(0, 16, 1, -18)
  287. Frame12.Position = UDim2.new(1, -16, 0, 18)
  288. Frame12.BackgroundTransparency = 1
  289. ImageButton13.Name = "ScrollDown"
  290. ImageButton13.Parent = Frame12
  291. ImageButton13.Size = UDim2.new(0, 16, 0, 16)
  292. ImageButton13.Position = UDim2.new(0, 0, 1, -16)
  293. ImageButton13.BackgroundColor3 = Color3.new(0.866667, 0.866667, 0.866667)
  294. ImageButton13.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  295. Frame14.Name = "Arrow Graphic"
  296. Frame14.Parent = ImageButton13
  297. Frame14.Transparency = 1
  298. Frame14.Size = UDim2.new(0, 8, 0, 8)
  299. Frame14.Position = UDim2.new(0.5, -4, 0.5, -4)
  300. Frame14.BackgroundTransparency = 1
  301. Frame14.BorderSizePixel = 0
  302. Frame15.Name = "Graphic"
  303. Frame15.Parent = Frame14
  304. Frame15.Size = UDim2.new(0.25, 0, 0.125, 0)
  305. Frame15.Position = UDim2.new(0.375, 0, 0.625, 0)
  306. Frame15.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  307. Frame15.BorderSizePixel = 0
  308. Frame16.Name = "Graphic"
  309. Frame16.Parent = Frame14
  310. Frame16.Size = UDim2.new(0.5, 0, 0.125, 0)
  311. Frame16.Position = UDim2.new(0.25, 0, 0.5, 0)
  312. Frame16.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  313. Frame16.BorderSizePixel = 0
  314. Frame17.Name = "Graphic"
  315. Frame17.Parent = Frame14
  316. Frame17.Size = UDim2.new(0.75, 0, 0.125, 0)
  317. Frame17.Position = UDim2.new(0.125, 0, 0.375, 0)
  318. Frame17.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  319. Frame17.BorderSizePixel = 0
  320. Frame18.Name = "Graphic"
  321. Frame18.Parent = Frame14
  322. Frame18.Size = UDim2.new(1, 0, 0.125, 0)
  323. Frame18.Position = UDim2.new(0, 0, 0.25, 0)
  324. Frame18.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  325. Frame18.BorderSizePixel = 0
  326. ImageButton19.Name = "ScrollUp"
  327. ImageButton19.Parent = Frame12
  328. ImageButton19.Size = UDim2.new(0, 16, 0, 16)
  329. ImageButton19.Active = false
  330. ImageButton19.BackgroundColor3 = Color3.new(0.866667, 0.866667, 0.866667)
  331. ImageButton19.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  332. ImageButton19.AutoButtonColor = false
  333. Frame20.Name = "Arrow Graphic"
  334. Frame20.Parent = ImageButton19
  335. Frame20.Transparency = 1
  336. Frame20.Size = UDim2.new(0, 8, 0, 8)
  337. Frame20.Position = UDim2.new(0.5, -4, 0.5, -4)
  338. Frame20.BackgroundTransparency = 1
  339. Frame20.BorderSizePixel = 0
  340. Frame21.Name = "Graphic"
  341. Frame21.Parent = Frame20
  342. Frame21.Transparency = 0.69999998807907
  343. Frame21.Size = UDim2.new(0.25, 0, 0.125, 0)
  344. Frame21.Position = UDim2.new(0.375, 0, 0.25, 0)
  345. Frame21.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  346. Frame21.BackgroundTransparency = 0.69999998807907
  347. Frame21.BorderSizePixel = 0
  348. Frame22.Name = "Graphic"
  349. Frame22.Parent = Frame20
  350. Frame22.Transparency = 0.69999998807907
  351. Frame22.Size = UDim2.new(0.5, 0, 0.125, 0)
  352. Frame22.Position = UDim2.new(0.25, 0, 0.375, 0)
  353. Frame22.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  354. Frame22.BackgroundTransparency = 0.69999998807907
  355. Frame22.BorderSizePixel = 0
  356. Frame23.Name = "Graphic"
  357. Frame23.Parent = Frame20
  358. Frame23.Transparency = 0.69999998807907
  359. Frame23.Size = UDim2.new(0.75, 0, 0.125, 0)
  360. Frame23.Position = UDim2.new(0.125, 0, 0.5, 0)
  361. Frame23.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  362. Frame23.BackgroundTransparency = 0.69999998807907
  363. Frame23.BorderSizePixel = 0
  364. Frame24.Name = "Graphic"
  365. Frame24.Parent = Frame20
  366. Frame24.Transparency = 0.69999998807907
  367. Frame24.Size = UDim2.new(1, 0, 0.125, 0)
  368. Frame24.Position = UDim2.new(0, 0, 0.625, 0)
  369. Frame24.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  370. Frame24.BackgroundTransparency = 0.69999998807907
  371. Frame24.BorderSizePixel = 0
  372. ImageButton25.Name = "ScrollBar"
  373. ImageButton25.Parent = Frame12
  374. ImageButton25.Size = UDim2.new(1, 0, 1, -32)
  375. ImageButton25.Position = UDim2.new(0, 0, 0, 16)
  376. ImageButton25.BackgroundColor3 = Color3.new(0.94902, 0.94902, 0.94902)
  377. ImageButton25.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  378. ImageButton25.AutoButtonColor = false
  379. ImageButton26.Name = "ScrollThumb"
  380. ImageButton26.Parent = ImageButton25
  381. ImageButton26.Size = UDim2.new(0, 16, 0, 75)
  382. ImageButton26.BackgroundColor3 = Color3.new(0.866667, 0.866667, 0.866667)
  383. ImageButton26.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  384. ImageButton26.Draggable = true
  385. ImageButton26.AutoButtonColor = false
  386. Frame27.Name = "Grip Graphic"
  387. Frame27.Parent = ImageButton26
  388. Frame27.Transparency = 1
  389. Frame27.Size = UDim2.new(0, 6, 0, 6)
  390. Frame27.Position = UDim2.new(0.5, -3, 0.5, -3)
  391. Frame27.BackgroundTransparency = 1
  392. Frame27.BorderSizePixel = 0
  393. Frame28.Parent = Frame27
  394. Frame28.Size = UDim2.new(1, 0, 0.166666672, 0)
  395. Frame28.BorderSizePixel = 0
  396. Frame29.Parent = Frame27
  397. Frame29.Size = UDim2.new(1, 0, 0.166666672, 0)
  398. Frame29.Position = UDim2.new(0, 0, 0.333333343, 0)
  399. Frame29.BorderSizePixel = 0
  400. Frame30.Parent = Frame27
  401. Frame30.Size = UDim2.new(1, 0, 0.166666672, 0)
  402. Frame30.Position = UDim2.new(0, 0, 0.666666687, 0)
  403. Frame30.BorderSizePixel = 0
  404. LocalScript31.Name = "Properties"
  405. LocalScript31.Parent = Frame9
  406. table.insert(cors,sandbox(LocalScript31,function()
  407. local Explorer = script.Parent.Parent:WaitForChild("ExplorerPanel")
  408. Explorer:WaitForChild("List")
  409. Explorer:WaitForChild("SelectionChanged")
  410. local Output = script.Parent.Parent:WaitForChild("OutputPanel")
  411. local Command = script.Parent.Parent:WaitForChild("CommandPanel")
  412. local Properties = script.Parent
  413. local Studio = script.Parent.Parent
  414.  
  415. function Recursive(Parent,Do)
  416. for _,v in pairs(Parent:GetChildren())do
  417. Do(v)
  418. Recursive(v,Do)
  419. end
  420. end
  421.  
  422. Recursive(Studio,function(child)
  423. if child:IsA("GuiObject") then
  424. child.ZIndex = 10
  425. end
  426. end)
  427. Studio.ChildAdded:connect(function(child)
  428. if child:IsA("GuiObject") then
  429. child.ZIndex = 10
  430. end
  431. end)
  432. Studio.DescendantAdded:connect(function(child) -- same as above? idk
  433. if child:IsA("GuiObject") then
  434. child.ZIndex = 10
  435. end
  436. end)
  437.  
  438. wait(2)
  439.  
  440. local Alphabet = {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"}
  441.  
  442. local Properties_TBL = {"AbsolutePosition","AbsoluteSize","AccountAge","AccountAgeReplicate",
  443. "Active","Adornee","AllowAmbientOcclusion","AllowTeamChangeOnTouch","AluminumQuality",
  444. "AlwaysOnTop","Ambient","AmbientReverb","Anchored","Angularvelocity","AnimationId",
  445. "Archivable","AreHingesDetected","AttachmentForward","AttachmentPoint","AttachmentPos",
  446. "AttachmentRight","AttachmentUp","AutoAssignable","AutoButtonColor","AutoColorCharacters",
  447. "AvailablePhysicalMemory","Axes","BackgroundColor","BackgroundColor3","BackgroundTransparency",
  448. "BaseTextureId","BaseUrl","Bevel","Roundness","BinType","BlastPressure","BlastRadius",
  449. "BodyColor","BodyPart","BorderColor","BorderColor3","BorderSizePixel","BrickColor",
  450. "Brightness","Browsable","BubbleChat","BubbleChatLifetime","BubbleChatMaxBubbles",
  451. "Bulge","Button1DownConnectionCount","Button1UpConnectionCount","Button2DownConnectionCount",
  452. "Button2UpConnectionCount","C0","C1","CameraMode","CameraSubject","CameraType",
  453. "CanBeDropped","CanCollide","CartoonFactor","CastShadows","CelestialBodiesShown",
  454. "CFrame","Cframe","Character","CharacterAppearance","CharacterAutoLoads","ChatScrollLength",
  455. "ClassicChat","ClassName","ClearTextOnFocus","ClipsDescendants","CollisionSoundEnabled",
  456. "CollisionSoundVolume","Color","Bottom","Top","ConstrainedValue","ControllingHumanoid",
  457. "ControlMode","ConversationDistance","CoordinateFrame","CorrodedMetalQuality","CPU",
  458. "CpuCount","CpuSpeed","CreatorId","CreatorType","CurrentAngle","CurrentCamera",
  459. "CycleOffset","D","DataCap","DataComplexity","DataComplexityLimit","DataCost",
  460. "DataReady","Deprecated","DeselectedConnectionCount","DesiredAngle","DiamondPlateQuality",
  461. "Disabled","DistanceFactor","DistributedGameTime","DopplerScale","Draggable","DraggingV1",
  462. "Duration","EditorFont","EditorFontSize","EditorTabWidth","ElapsedTime","Elasticity",
  463. "Enabled","ExplosionType","ExtentsOffset","F0","F1","F2","F3","Face","FaceId","Faces",
  464. "FieldOfView","Focus","FogColor","FogEnd","FogStart","Font","FontSize","Force","FormFactor",
  465. "Friction","From","GearGenreSetting","Genre","GeographicLatitude","GfxCard","Graphic",
  466. "GrassQuality","Grip","GripForward","GripPos","GripRight","GripUp","Guest","HeadsUpDisplay",
  467. "Health","Heat","Hit","Humanoid","IceQuality","Icon","IdleConnectionCount","Image",
  468. "InitialPrompt","InOut","InUse","IsPaused","IsPlaying","JobId","Jump","KeyDownConnectionCount",
  469. "KeyUpConnectionCount","LeftLeg","LeftRight","LinkedSource","LocalPlayer","Location",
  470. "Locked","LODX","LODY","Looped","Material","MaxActivationDistance","MaxCollisionSounds",
  471. "MaxExtents","MaxForce","MaxHealth","MaxItems","MaxPlayers","MaxSpeed","MaxThrust",
  472. "MaxTorque","MaxValue","MaxVelocity","MembershipType","MembershipTypeReplicate","MeshId",
  473. "MeshType","MinValue","Modal","MouseButton1ClickConnectionCount","MouseButton1DownConnectionCount",
  474. "MouseButton1UpConnectionCount","MouseButton2ClickConnectionCount","MouseButton2DownConnectionCount",
  475. "MouseButton2UpConnectionCount","MouseDelta","MouseDragConnectionCount","MouseEnterConnectionCount",
  476. "MouseHit","MouseLeaveConnectionCount","MouseLock","MouseMovedConnectionCount","MouseTarget",
  477. "MouseTargetFilter","MouseTargetSurface","MoveConnectionCount","MoveState","MultiLine","Name",
  478. "NameOcclusion","NetworkOwner","Neutral","NumPlayers","Offset","Opacity","Origin","OsPlatform",
  479. "OsVer","OverlayTextureId","P","PantsTemplate","ParamA","ParamB","Parent","Part","Part0",
  480. "Part1","Pitch","PixelShaderModel","PlaceId","PlasticQuality","PlatformStand","PlayCount",
  481. "PlayerToHideFrom","PlayOnRemove","Point","Port","Position","Preliminary","PrimaryPart",
  482. "PrivateWorkingSetBytes","Purpose","RAM","Reflectance","ReplicatedSelectedConnectionCount",
  483. "ResizeableFaces","ResizeIncrement","Resolution","ResponseDialog","RightLeg","RiseVelocity",
  484. "RobloxLocked","RobloxVersion","RolloffScale","RotVelocity","Scale","Score","ScriptsDisabled",
  485. "SecondaryColor","Selected","ShadowColor","Shape","Shiny","ShirtTemplate","ShowDeprecatedObjects",
  486. "ShowDevelopmentGui","ShowPreliminaryObjects","Sides","Sit","Size","SizeConstraint",
  487. "SizeOffset","SkinColor","SkyboxBk","SkyboxDn","SkyboxFt","SkyboxLf","SkyboxRt","SkyboxUp",
  488. "SlateQuality","SoundId","Source","SparkleColor","Specular","StarCount",
  489. "Steer","StickyWheels","StudsBetweenTextures","StudsOffset","StudsPerTileU","StudsPerTileV",
  490. "Style","Summary","SuperSafeChatReplicate","Surface","Surface0",
  491. "Surface1","SurfaceInput","Target","TargetFilter","TargetOffset","TargetPoint",
  492. "TargetRadius","TargetSurface","TeamColor","Terrain","Text","TextBounds","TextColor","TextColor3",
  493. "TextFits","TextScaled","TextStrokeColor3","TextStrokeTransparency","TextTransparency","Texture",
  494. "TextureId","TextureSize","TextWrap","TextWrapped","TextXAlignment","TextYAlignment","Throttle",
  495. "ThrustD","ThrustP","Ticket","Time","TimeOfDay","To","Tone","ToolTip","TopBottom","Torque","Torso",
  496. "Transparency","TrussDetail","TurnD","TurnP","TurnSpeed","UnitRay","UserDialog","UserId","Value",
  497. "Version","VertexColor","VideoCaptureEnabled","VideoMemory","VideoQuality",
  498. "ViewSizeX","ViewSizeY","Visible","Volume","WalkDirection","WalkSpeed","WalkToPart","WalkToPoint",
  499. "WheelBackwardConnectionCount","WheelForwardConnectionCount","WindowSize","WireRadius","WoodQuality",
  500. "X","Y","Size","Radius"}
  501.  
  502. local LockedProperties = { -- cant be edited
  503. "ClassName",
  504. "Parent",
  505. "userId",
  506. "MembershipType",
  507. "CameraSubject",
  508. "FilteringEnabled",
  509. }
  510.  
  511. local LockedItems = { -- cant be edited
  512.  
  513. }
  514.  
  515. function GetProperties(obj)
  516. assert(pcall(function() assert(game.IsA(obj,"Instance")) end),"Should be ROBLOX instance")
  517. local objProper = {}
  518. for i = 1,#Properties_TBL do
  519. local v = Properties_TBL[i]
  520. if pcall(function() return obj[v] end) and ( not obj:FindFirstChild(v)) then
  521. objProper[#objProper+1] = v
  522. end
  523. end
  524. return objProper
  525. end
  526.  
  527. local Player = game:service"Players".LocalPlayer
  528. local Mouse = Player:GetMouse()
  529. local guis_enabled = {}
  530. if game:service"StarterGui":GetCoreGuiEnabled(0) then
  531. guis_enabled[0] = true
  532. end
  533. if game:service"StarterGui":GetCoreGuiEnabled(1) then
  534. guis_enabled[1] = true
  535. end
  536. if game:service"StarterGui":GetCoreGuiEnabled(2) then
  537. guis_enabled[2] = true
  538. end
  539. if game:service"StarterGui":GetCoreGuiEnabled(3) then
  540. guis_enabled[3] = true
  541. end
  542. Mouse.KeyDown:connect(function(k)
  543. if string.byte(k) == 30 then
  544. Properties.Visible = not Properties.Visible
  545. Explorer.Visible = Properties.Visible
  546. Command.Visible = Properties.Visible
  547. Output.Visible = Properties.Visible
  548. if Properties.Visible then
  549. game:service"StarterGui":SetCoreGuiEnabled(4,false)
  550. else
  551. for _,v in pairs(guis_enabled) do
  552. game:service"StarterGui":SetCoreGuiEnabled(_,true)
  553. end
  554. end
  555. end
  556. end)
  557.  
  558.  
  559. -- generik scroll:
  560. local scroll = Properties:WaitForChild("ScrollFrame")
  561. scroll:WaitForChild("ScrollBar"):WaitForChild("ScrollThumb")
  562. local down,up
  563. scroll.ScrollBar.MouseButton1Click:connect(function()
  564. scroll.ScrollBar.ScrollThumb.Position = UDim2.new(0,0,0,scroll.ScrollBar.AbsolutePosition.Y-Mouse.Y)
  565. end)
  566. scroll.ScrollBar.ScrollThumb.Changed:connect(function()
  567. scroll.ScrollBar.ScrollThumb.Position = UDim2.new(0,0,0,scroll.ScrollBar.ScrollThumb.Position.Y.Offset)
  568. local p = scroll.ScrollBar.ScrollThumb.Position
  569. if p.Y.Offset < 0 then
  570. scroll.ScrollBar.ScrollThumb.Position = UDim2.new(0,0,0,0)
  571. end
  572. if p.Y.Offset > scroll.ScrollBar.AbsoluteSize.Y-scroll.ScrollBar.ScrollThumb.Size.Y.Offset then
  573. scroll.ScrollBar.ScrollThumb.Position = UDim2.new(0,0,0,scroll.ScrollBar.AbsoluteSize.Y-scroll.ScrollBar.ScrollThumb.Size.Y.Offset)
  574. end
  575. if p.Y.Offset > (23*#Properties.List:GetChildren())-(scroll.ScrollBar.ScrollThumb.Size.Y.Offset/2) then
  576. scroll.ScrollBar.ScrollThumb.Position = UDim2.new(0,0,0,(23*#Properties.List:GetChildren())-(scroll.ScrollBar.ScrollThumb.Size.Y.Offset/2))
  577. end
  578. for _,v in pairs(Properties.List:GetChildren())do
  579. v.Position = UDim2.new(0,0,0,v.BasePosition.Value)-UDim2.new(0,0,0,4*scroll.ScrollBar.ScrollThumb.Position.Y.Offset)
  580. end
  581. end)
  582. scroll.ScrollDown.MouseButton1Down:connect(function()
  583. down = true
  584. repeat wait(.001) for _,v in pairs(Properties.List:GetChildren())do v.Position = v.Position - UDim2.new(0,0,0,1) end until not down
  585. end)
  586. scroll.ScrollDown.MouseButton1Up:connect(function()
  587. down = false
  588. end)
  589. scroll.ScrollDown.MouseLeave:connect(function()
  590. down = false
  591. end)
  592. scroll.ScrollUp.MouseButton1Down:connect(function()
  593. up = true
  594. repeat wait(.001) for _,v in pairs(Properties.List:GetChildren())do v.Position = v.Position + UDim2.new(0,0,0,1) end until not up
  595. end)
  596. scroll.ScrollUp.MouseButton1Up:connect(function()
  597. up = false
  598. end)
  599. scroll.ScrollUp.MouseLeave:connect(function()
  600. up = false
  601. end)
  602.  
  603. function findInTable(tbl,f)
  604. for _,v in pairs(tbl)do
  605. if v == f then
  606. return true
  607. end
  608. end
  609. return false
  610. end
  611.  
  612. function GetPropertyType(prop,obj)
  613. local propv = obj[prop]
  614. if type(propv) == "userdata" then
  615. local type = "instance"
  616. pcall(function() -- Detect Vector3
  617. local x,y,z,lv = propv.X,propv.Y,propv.Z,propv.unit.Z
  618. if x and y and z and lv then
  619. type = "vector3"
  620. end
  621. end)
  622. pcall(function() -- Detect CFrame
  623. local x,y,z,lv,p = propv.X,propv.Y,propv.Z,propv.lookVector,propv.p
  624. if x and y and z and lv and p then
  625. type = "cframe"
  626. end
  627. end)
  628. pcall(function() -- Detect UDim2
  629. local x,y,o1,o2 = propv.X.Offset,propv.Y.Offset,propv.X.Scale,propv.Y.Scale
  630. if x and y and o1 and o2 then
  631. type = "udim2"
  632. end
  633. end)
  634. pcall(function() -- Detect BrickColor
  635. local r,g,b,n,c = propv.r,propv.g,propv.b,propv.Name,propv.Color
  636. if r and g and b and n and c then
  637. type = "brickcolor"
  638. end
  639. end)
  640. pcall(function() -- Detect Color3
  641. local r,g,b = propv.r,propv.g,propv.b
  642. if r and g and b and not type == "brickcolor" then
  643. type = "color3"
  644. end
  645. end)
  646. pcall(function() -- Detect enum
  647. if tostring(propv):sub(1,#"Enum.") == "Enum." then
  648. type = "enum"
  649. end
  650. end)
  651. return type
  652. elseif type(propv) == "number" then
  653. return "number"
  654. elseif type(propv) == "string" then
  655. return "string"
  656. elseif type(propv) == "boolean" then
  657. return "boolean"
  658. end
  659. return "string" -- hm...
  660. end
  661.  
  662. local Object
  663. local Events = {}
  664. local color = Color3.new(237/255, 237/255, 238/255)
  665. local ocolor = color
  666. Explorer.SelectionChanged.Event:connect(function()
  667. Object = Explorer.GetSelection:Invoke()[1]
  668.  
  669. for _,v in pairs(Events)do v:disconnect() end
  670.  
  671. Properties.List:ClearAllChildren()
  672.  
  673. if Object then
  674. local Properties_list = GetProperties(Object)
  675. for i=1,#Properties_list do
  676. local _ = Properties_list[i]
  677. if color ~= ocolor then
  678. color = ocolor
  679. else
  680. color = Color3.new(221/255, 221/255, 222/255)
  681. end
  682. local ui = Properties.property:Clone()
  683. ui.Visible = true
  684. ui.BackgroundColor3 = color
  685. ui.Parent = Properties.List
  686. ui.Position = UDim2.new(0,0,0,(22*(#Properties.List:GetChildren()-1))+(1*(#Properties.List:GetChildren()-1)))
  687. ui.name.locked.Text = _
  688. ui.name.unlocked.Text = _
  689. local bp = Instance.new("NumberValue",ui)
  690. bp.Name = "BasePosition"
  691. bp.Value = ui.Position.Y.Offset
  692. if findInTable(LockedProperties,_) then
  693. ui.name.locked.Visible = true
  694. else
  695. ui.name.unlocked.Visible = true
  696. end
  697. local type = GetPropertyType(_,Object)
  698. local propv = Object[_]
  699. local img_checked = "http://www.roblox.com/asset/?id=48138491"
  700. local img_unchecked = "http://www.roblox.com/asset/?id=48138474"
  701. if findInTable(LockedProperties,_) then
  702. ui.edit.locked.Visible = true
  703. ui.edit.locked.Text = tostring(propv)
  704. elseif type == "number" or type == "string" then
  705. ui.edit.box.Visible = true
  706. ui.edit.box.Text = tostring(propv)
  707. ui.edit.box.FocusLost:connect(function()
  708. if type == "number" then
  709. Object[_] = tonumber(ui.edit.box.Text)
  710. else
  711. Object[_] = ui.edit.box.Text
  712. end
  713. end)
  714. elseif type == "boolean" then
  715. ui.edit.check.Visible = true
  716. if propv then
  717. ui.edit.check.Image = img_checked
  718. else
  719. ui.edit.check.Image = img_unchecked
  720. end
  721. ui.edit.check.MouseButton1Click:connect(function()
  722. Object[_] = not Object[_]
  723. propv = Object[_]
  724. if propv then
  725. ui.edit.check.Image = img_checked
  726. else
  727. ui.edit.check.Image = img_unchecked
  728. end
  729. end)
  730. elseif type == "instance" then
  731. ui.edit.locked.Visible = true
  732. ui.edit.locked.Text = tostring(propv)
  733. elseif type == "vector3" then
  734. ui.edit.box.Visible = true
  735. ui.edit.box.Text = propv.X..", "..propv.Y..", "..propv.Z
  736. local origit = ui.edit.box.Text
  737. ui.edit.box.FocusLost:connect(function()
  738. local x,y,z
  739. local n = 1
  740. for match in ui.edit.box.Text:gsub(" ",""):gmatch("[^,]+") do
  741. if n == 1 then x = tonumber(match) end
  742. if n == 2 then y = tonumber(match) end
  743. if n == 3 then z = tonumber(match) end
  744. n = n + 1
  745. end
  746. x,y,z = tonumber(x),tonumber(y),tonumber(z)
  747. local origi = Object[_] if not pcall(function() Object[_] = Vector3.new(x,y,z) end) then Object[_] = origi ui.edit.box.Text = origit else origit = ui.edit.box.Text end
  748. end)
  749. elseif type == "cframe" then
  750. ui.edit.box.Visible = true
  751. ui.edit.box.Text = propv.p.X..", "..propv.p.Y..", "..propv.p.Z
  752. local origit = ui.edit.box.Text
  753. ui.edit.box.FocusLost:connect(function()
  754. local x,y,z
  755. local n = 1
  756. for match in ui.edit.box.Text:gsub(" ",""):gmatch("[^,]+") do
  757. if n == 1 then x = tonumber(match) end
  758. if n == 2 then y = tonumber(match) end
  759. if n == 3 then z = tonumber(match) end
  760. n = n + 1
  761. end
  762. x,y,z = tonumber(x),tonumber(y),tonumber(z)
  763. local origi = Object[_] if not pcall(function() Object[_] = CFrame.new(x,y,z) end) then Object[_] = origi ui.edit.box.Text = origit else origit = ui.edit.box.Text end
  764. end)
  765. elseif type == "udim2" then
  766. ui.edit.box.Visible = true
  767. ui.edit.box.Text = "{"..propv.X.Scale..", "..propv.X.Offset.."}, {"..propv.Y.Scale..", "..propv.Y.Offset.."}"
  768. local origit = ui.edit.box.Text
  769. ui.edit.box.FocusLost:connect(function()
  770. local xscale,xoffset,yscale,yoffset
  771. local n = 1
  772. for match in ui.edit.box.Text:gsub(" ",""):gsub("}",""):gsub("{",""):gmatch("[^,]+") do
  773. if n == 1 then xscale = tonumber(match) end
  774. if n == 2 then xoffset = tonumber(match) end
  775. if n == 3 then yscale = tonumber(match) end
  776. if n == 4 then yoffset = tonumber(match) end
  777. n = n + 1
  778. end
  779. xscale,xoffset,yscale,yoffset = tonumber(xscale),tonumber(xoffset),tonumber(yscale),tonumber(yoffset)
  780. local origi = Object[_] if not pcall(function() Object[_] = UDim2.new(xscale,xoffset,yscale,yoffset) end) then Object[_] = origi ui.edit.box.Text = origit else origit = ui.edit.box.Text end
  781. end)
  782. elseif type == "color3" then
  783. ui.edit.box.Visible = true
  784. ui.edit.box.Text = propv.r*255 ..", "..propv.g*255 ..", "..propv.b*255
  785. local origit = ui.edit.box.Text
  786. ui.edit.box.FocusLost:connect(function()
  787. local r,g,b
  788. local n = 1
  789. for match in ui.edit.box.Text:gsub(" ",""):gmatch("[^,]+") do
  790. if n == 1 then r = tonumber(match) end
  791. if n == 2 then g = tonumber(match) end
  792. if n == 3 then b = tonumber(match) end
  793. n = n + 1
  794. end
  795. r,g,b = tonumber(r)/255,tonumber(g)/255,tonumber(b)/255
  796. local origi = Object[_] if not pcall(function() Object[_] = Color3.new(r,g,b) end) then Object[_] = origi ui.edit.box.Text = origit else origit = ui.edit.box.Text end
  797. end)
  798. elseif type == "brickcolor" then
  799. ui.edit.box.Visible = true
  800. ui.edit.box.Text = tostring(propv)
  801. local origit = ui.edit.box.Text
  802. ui.edit.box.FocusLost:connect(function()
  803. local origi = Object[_] if not pcall(function() Object[_] = BrickColor.new(ui.edit.box.Text) end) then Object[_] = origi ui.edit.box.Text = origit else origit = ui.edit.box.Text end
  804. end)
  805. elseif type == "enum" then
  806. ui.edit.box.Visible = true
  807. ui.edit.box.Text = tostring(propv)
  808. local origit = ui.edit.box.Text
  809. ui.edit.box.FocusLost:connect(function()
  810. local origi = Object[_] if not pcall(function() Object[_] = loadstring("return "..ui.edit.box.Text)() end) then Object[_] = origi ui.edit.box.Text = origit else origit = ui.edit.box.Text end
  811. end)
  812. end
  813. end
  814. end
  815. end)
  816. end))
  817. Frame32.Name = "Header"
  818. Frame32.Parent = Frame9
  819. Frame32.Size = UDim2.new(1, 0, 0, 18)
  820. Frame32.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
  821. Frame32.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  822. TextLabel33.Parent = Frame32
  823. TextLabel33.Transparency = 1
  824. TextLabel33.Size = UDim2.new(1, -4, 1, 0)
  825. TextLabel33.Text = "Properties"
  826. TextLabel33.Position = UDim2.new(0, 4, 0, 0)
  827. TextLabel33.BackgroundTransparency = 1
  828. TextLabel33.Font = Enum.Font.SourceSans
  829. TextLabel33.FontSize = Enum.FontSize.Size14
  830. TextLabel33.TextColor3 = Color3.new(0, 0, 0)
  831. TextLabel33.TextXAlignment = Enum.TextXAlignment.Left
  832. Frame34.Name = "property"
  833. Frame34.Parent = Frame9
  834. Frame34.Size = UDim2.new(1, 0, 0, 22)
  835. Frame34.Position = UDim2.new(0, 0, 0, 1)
  836. Frame34.Visible = false
  837. Frame34.BackgroundColor3 = Color3.new(0.866667, 0.866667, 0.870588)
  838. Frame34.BorderColor3 = Color3.new(0.686275, 0.686275, 0.686275)
  839. Frame35.Name = "name"
  840. Frame35.Parent = Frame34
  841. Frame35.Transparency = 1
  842. Frame35.Size = UDim2.new(0.5, 0, 1, -1)
  843. Frame35.BackgroundColor3 = Color3.new(0.992157, 0.984314, 1)
  844. Frame35.BackgroundTransparency = 1
  845. TextLabel36.Name = "unlocked"
  846. TextLabel36.Parent = Frame35
  847. TextLabel36.Transparency = 1
  848. TextLabel36.Size = UDim2.new(1, -10, 1, 0)
  849. TextLabel36.Text = ""
  850. TextLabel36.Position = UDim2.new(0, 5, 0, 0)
  851. TextLabel36.Visible = false
  852. TextLabel36.BackgroundTransparency = 1
  853. TextLabel36.Font = Enum.Font.SourceSans
  854. TextLabel36.FontSize = Enum.FontSize.Size14
  855. TextLabel36.TextColor3 = Color3.new(0.0980392, 0.0980392, 0.0980392)
  856. TextLabel36.TextWrapped = true
  857. TextLabel36.TextXAlignment = Enum.TextXAlignment.Left
  858. TextLabel37.Name = "locked"
  859. TextLabel37.Parent = Frame35
  860. TextLabel37.Transparency = 1
  861. TextLabel37.Size = UDim2.new(1, -10, 1, 0)
  862. TextLabel37.Text = ""
  863. TextLabel37.Position = UDim2.new(0, 5, 0, 0)
  864. TextLabel37.Visible = false
  865. TextLabel37.BackgroundTransparency = 1
  866. TextLabel37.Font = Enum.Font.SourceSans
  867. TextLabel37.FontSize = Enum.FontSize.Size14
  868. TextLabel37.TextColor3 = Color3.new(0.580392, 0.580392, 0.580392)
  869. TextLabel37.TextWrapped = true
  870. TextLabel37.TextXAlignment = Enum.TextXAlignment.Left
  871. Frame38.Name = "border"
  872. Frame38.Parent = Frame34
  873. Frame38.Size = UDim2.new(0, 1, 1, 0)
  874. Frame38.Position = UDim2.new(0.5, 0, 0, 0)
  875. Frame38.BackgroundColor3 = Color3.new(0.686275, 0.686275, 0.686275)
  876. Frame38.BorderColor3 = Color3.new(0.686275, 0.686275, 0.686275)
  877. Frame38.BorderSizePixel = 0
  878. Frame39.Name = "edit"
  879. Frame39.Parent = Frame34
  880. Frame39.Transparency = 1
  881. Frame39.Size = UDim2.new(0.5, 0, 1, -1)
  882. Frame39.Position = UDim2.new(0.5, 0, 0, 0)
  883. Frame39.BackgroundColor3 = Color3.new(0.992157, 0.984314, 1)
  884. Frame39.BackgroundTransparency = 1
  885. TextLabel40.Name = "locked"
  886. TextLabel40.Parent = Frame39
  887. TextLabel40.Transparency = 1
  888. TextLabel40.Size = UDim2.new(1, -10, 1, 0)
  889. TextLabel40.Text = ""
  890. TextLabel40.Position = UDim2.new(0, 5, 0, 0)
  891. TextLabel40.Visible = false
  892. TextLabel40.BackgroundTransparency = 1
  893. TextLabel40.Font = Enum.Font.SourceSans
  894. TextLabel40.FontSize = Enum.FontSize.Size14
  895. TextLabel40.TextColor3 = Color3.new(0.580392, 0.580392, 0.580392)
  896. TextLabel40.TextWrapped = true
  897. TextLabel40.TextXAlignment = Enum.TextXAlignment.Left
  898. TextBox41.Name = "box"
  899. TextBox41.Parent = Frame39
  900. TextBox41.Transparency = 1
  901. TextBox41.Size = UDim2.new(1, -10, 1, 0)
  902. TextBox41.Text = ""
  903. TextBox41.Position = UDim2.new(0, 5, 0, 0)
  904. TextBox41.Visible = false
  905. TextBox41.BackgroundTransparency = 1
  906. TextBox41.Font = Enum.Font.SourceSans
  907. TextBox41.FontSize = Enum.FontSize.Size14
  908. TextBox41.TextColor3 = Color3.new(0.0980392, 0.0980392, 0.0980392)
  909. TextBox41.TextWrapped = true
  910. TextBox41.TextXAlignment = Enum.TextXAlignment.Left
  911. ImageButton42.Name = "check"
  912. ImageButton42.Parent = Frame39
  913. ImageButton42.Size = UDim2.new(0, 12, 0, 12)
  914. ImageButton42.Position = UDim2.new(0, 5, 0, 5)
  915. ImageButton42.Visible = false
  916. ImageButton42.BackgroundColor3 = Color3.new(0.866667, 0.866667, 0.870588)
  917. ImageButton42.BorderSizePixel = 0
  918. LocalScript43.Name = "ExplorerPanelToggle"
  919. LocalScript43.Parent = ScreenGui0
  920. table.insert(cors,sandbox(LocalScript43,function()
  921. local ExplorerPanel = script.Parent["ExplorerPanel"]
  922. local Button = script.Parent.ExplorerToggle
  923. local Open = false
  924.  
  925.  
  926. Button.MouseButton1Down:connect(function(open)
  927. if Open == false then
  928. Button.Text = "Explorer: OPEN"
  929. Open = true
  930. ExplorerPanel.Visible = true
  931. else
  932. if Open == true then
  933. Button.Text = "Explorer: CLOSED"
  934. ExplorerPanel.Visible = false
  935. Open = false
  936. end
  937. end
  938. end)
  939. end))
  940. LocalScript44.Name = "PropertiesToggle"
  941. LocalScript44.Parent = ScreenGui0
  942. table.insert(cors,sandbox(LocalScript44,function()
  943. local PropertiesPanel = script.Parent["PropertiesPanel"]
  944. local Button = script.Parent.ExplorerToggle
  945. local Open = false
  946.  
  947.  
  948. Button.MouseButton1Down:connect(function(open)
  949. if Open == false then
  950. Button.Text = "Explorer: OPEN"
  951. Open = true
  952. PropertiesPanel.Visible = true
  953. else
  954. if Open == true then
  955. Button.Text = "Explorer: CLOSED"
  956. PropertiesPanel.Visible = false
  957. Open = false
  958. end
  959. end
  960. end)
  961. end))
  962. Frame45.Name = "CommandPanel"
  963. Frame45.Parent = ScreenGui0
  964. Frame45.Transparency = 0.10000000149012
  965. Frame45.Size = UDim2.new(1, -310, 0, 75)
  966. Frame45.Position = UDim2.new(0, 0, 1, -75)
  967. Frame45.Active = true
  968. Frame45.Visible = false
  969. Frame45.BackgroundColor3 = Color3.new(1, 1, 1)
  970. Frame45.BackgroundTransparency = 0.10000000149012
  971. Frame45.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  972. Frame46.Name = "Header"
  973. Frame46.Parent = Frame45
  974. Frame46.Size = UDim2.new(1, 0, 0, 18)
  975. Frame46.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
  976. Frame46.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  977. TextLabel47.Parent = Frame46
  978. TextLabel47.Transparency = 1
  979. TextLabel47.Size = UDim2.new(1, -4, 1, 0)
  980. TextLabel47.Text = "Command"
  981. TextLabel47.Position = UDim2.new(0, 4, 0, 0)
  982. TextLabel47.BackgroundTransparency = 1
  983. TextLabel47.Font = Enum.Font.SourceSans
  984. TextLabel47.FontSize = Enum.FontSize.Size14
  985. TextLabel47.TextColor3 = Color3.new(0, 0, 0)
  986. TextLabel47.TextXAlignment = Enum.TextXAlignment.Left
  987. TextLabel48.Name = "TextWidth"
  988. TextLabel48.Parent = Frame45
  989. TextLabel48.Size = UDim2.new(1, 0, 1, 0)
  990. TextLabel48.Text = "TweenService"
  991. TextLabel48.Visible = false
  992. TextLabel48.Font = Enum.Font.SourceSans
  993. TextLabel48.FontSize = Enum.FontSize.Size14
  994. TextLabel48.TextXAlignment = Enum.TextXAlignment.Left
  995. Frame49.Name = "ScrollFrame"
  996. Frame49.Parent = Frame45
  997. Frame49.Transparency = 1
  998. Frame49.Size = UDim2.new(0, 16, 1, -18)
  999. Frame49.Position = UDim2.new(1, -16, 0, 18)
  1000. Frame49.Visible = false
  1001. Frame49.BackgroundTransparency = 1
  1002. ImageButton50.Name = "ScrollDown"
  1003. ImageButton50.Parent = Frame49
  1004. ImageButton50.Size = UDim2.new(0, 16, 0, 16)
  1005. ImageButton50.Position = UDim2.new(0, 0, 1, -16)
  1006. ImageButton50.BackgroundColor3 = Color3.new(0.866667, 0.866667, 0.866667)
  1007. ImageButton50.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  1008. Frame51.Name = "Arrow Graphic"
  1009. Frame51.Parent = ImageButton50
  1010. Frame51.Transparency = 1
  1011. Frame51.Size = UDim2.new(0, 8, 0, 8)
  1012. Frame51.Position = UDim2.new(0.5, -4, 0.5, -4)
  1013. Frame51.BackgroundTransparency = 1
  1014. Frame51.BorderSizePixel = 0
  1015. Frame52.Name = "Graphic"
  1016. Frame52.Parent = Frame51
  1017. Frame52.Size = UDim2.new(0.25, 0, 0.125, 0)
  1018. Frame52.Position = UDim2.new(0.375, 0, 0.625, 0)
  1019. Frame52.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  1020. Frame52.BorderSizePixel = 0
  1021. Frame53.Name = "Graphic"
  1022. Frame53.Parent = Frame51
  1023. Frame53.Size = UDim2.new(0.5, 0, 0.125, 0)
  1024. Frame53.Position = UDim2.new(0.25, 0, 0.5, 0)
  1025. Frame53.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  1026. Frame53.BorderSizePixel = 0
  1027. Frame54.Name = "Graphic"
  1028. Frame54.Parent = Frame51
  1029. Frame54.Size = UDim2.new(0.75, 0, 0.125, 0)
  1030. Frame54.Position = UDim2.new(0.125, 0, 0.375, 0)
  1031. Frame54.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  1032. Frame54.BorderSizePixel = 0
  1033. Frame55.Name = "Graphic"
  1034. Frame55.Parent = Frame51
  1035. Frame55.Size = UDim2.new(1, 0, 0.125, 0)
  1036. Frame55.Position = UDim2.new(0, 0, 0.25, 0)
  1037. Frame55.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  1038. Frame55.BorderSizePixel = 0
  1039. ImageButton56.Name = "ScrollUp"
  1040. ImageButton56.Parent = Frame49
  1041. ImageButton56.Size = UDim2.new(0, 16, 0, 16)
  1042. ImageButton56.Active = false
  1043. ImageButton56.BackgroundColor3 = Color3.new(0.866667, 0.866667, 0.866667)
  1044. ImageButton56.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  1045. ImageButton56.AutoButtonColor = false
  1046. Frame57.Name = "Arrow Graphic"
  1047. Frame57.Parent = ImageButton56
  1048. Frame57.Transparency = 1
  1049. Frame57.Size = UDim2.new(0, 8, 0, 8)
  1050. Frame57.Position = UDim2.new(0.5, -4, 0.5, -4)
  1051. Frame57.BackgroundTransparency = 1
  1052. Frame57.BorderSizePixel = 0
  1053. Frame58.Name = "Graphic"
  1054. Frame58.Parent = Frame57
  1055. Frame58.Transparency = 0.69999998807907
  1056. Frame58.Size = UDim2.new(0.25, 0, 0.125, 0)
  1057. Frame58.Position = UDim2.new(0.375, 0, 0.25, 0)
  1058. Frame58.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  1059. Frame58.BackgroundTransparency = 0.69999998807907
  1060. Frame58.BorderSizePixel = 0
  1061. Frame59.Name = "Graphic"
  1062. Frame59.Parent = Frame57
  1063. Frame59.Transparency = 0.69999998807907
  1064. Frame59.Size = UDim2.new(0.5, 0, 0.125, 0)
  1065. Frame59.Position = UDim2.new(0.25, 0, 0.375, 0)
  1066. Frame59.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  1067. Frame59.BackgroundTransparency = 0.69999998807907
  1068. Frame59.BorderSizePixel = 0
  1069. Frame60.Name = "Graphic"
  1070. Frame60.Parent = Frame57
  1071. Frame60.Transparency = 0.69999998807907
  1072. Frame60.Size = UDim2.new(0.75, 0, 0.125, 0)
  1073. Frame60.Position = UDim2.new(0.125, 0, 0.5, 0)
  1074. Frame60.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  1075. Frame60.BackgroundTransparency = 0.69999998807907
  1076. Frame60.BorderSizePixel = 0
  1077. Frame61.Name = "Graphic"
  1078. Frame61.Parent = Frame57
  1079. Frame61.Transparency = 0.69999998807907
  1080. Frame61.Size = UDim2.new(1, 0, 0.125, 0)
  1081. Frame61.Position = UDim2.new(0, 0, 0.625, 0)
  1082. Frame61.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  1083. Frame61.BackgroundTransparency = 0.69999998807907
  1084. Frame61.BorderSizePixel = 0
  1085. ImageButton62.Name = "ScrollBar"
  1086. ImageButton62.Parent = Frame49
  1087. ImageButton62.Size = UDim2.new(1, 0, 1, -32)
  1088. ImageButton62.Position = UDim2.new(0, 0, 0, 16)
  1089. ImageButton62.BackgroundColor3 = Color3.new(0.94902, 0.94902, 0.94902)
  1090. ImageButton62.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  1091. ImageButton62.AutoButtonColor = false
  1092. ImageButton63.Name = "ScrollThumb"
  1093. ImageButton63.Parent = ImageButton62
  1094. ImageButton63.Size = UDim2.new(0, 16, 0.283333331, 0)
  1095. ImageButton63.BackgroundColor3 = Color3.new(0.866667, 0.866667, 0.866667)
  1096. ImageButton63.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  1097. ImageButton63.Draggable = true
  1098. ImageButton63.AutoButtonColor = false
  1099. Frame64.Name = "Grip Graphic"
  1100. Frame64.Parent = ImageButton63
  1101. Frame64.Transparency = 1
  1102. Frame64.Size = UDim2.new(0, 6, 0, 6)
  1103. Frame64.Position = UDim2.new(0.5, -3, 0.5, -3)
  1104. Frame64.BackgroundTransparency = 1
  1105. Frame64.BorderSizePixel = 0
  1106. Frame65.Parent = Frame64
  1107. Frame65.Size = UDim2.new(1, 0, 0.166666672, 0)
  1108. Frame65.BorderSizePixel = 0
  1109. Frame66.Parent = Frame64
  1110. Frame66.Size = UDim2.new(1, 0, 0.166666672, 0)
  1111. Frame66.Position = UDim2.new(0, 0, 0.333333343, 0)
  1112. Frame66.BorderSizePixel = 0
  1113. Frame67.Parent = Frame64
  1114. Frame67.Size = UDim2.new(1, 0, 0.166666672, 0)
  1115. Frame67.Position = UDim2.new(0, 0, 0.666666687, 0)
  1116. Frame67.BorderSizePixel = 0
  1117. Frame68.Name = "property"
  1118. Frame68.Parent = Frame45
  1119. Frame68.Size = UDim2.new(1, 0, 0, 22)
  1120. Frame68.Position = UDim2.new(0, 0, 0, 1)
  1121. Frame68.Visible = false
  1122. Frame68.BackgroundColor3 = Color3.new(0.866667, 0.866667, 0.870588)
  1123. Frame68.BorderColor3 = Color3.new(0.686275, 0.686275, 0.686275)
  1124. Frame69.Name = "name"
  1125. Frame69.Parent = Frame68
  1126. Frame69.Transparency = 1
  1127. Frame69.Size = UDim2.new(0.5, 0, 1, -1)
  1128. Frame69.BackgroundColor3 = Color3.new(0.992157, 0.984314, 1)
  1129. Frame69.BackgroundTransparency = 1
  1130. TextLabel70.Name = "unlocked"
  1131. TextLabel70.Parent = Frame69
  1132. TextLabel70.Transparency = 1
  1133. TextLabel70.Size = UDim2.new(1, -10, 1, 0)
  1134. TextLabel70.Text = ""
  1135. TextLabel70.Position = UDim2.new(0, 5, 0, 0)
  1136. TextLabel70.Visible = false
  1137. TextLabel70.BackgroundTransparency = 1
  1138. TextLabel70.Font = Enum.Font.SourceSans
  1139. TextLabel70.FontSize = Enum.FontSize.Size14
  1140. TextLabel70.TextColor3 = Color3.new(0.0980392, 0.0980392, 0.0980392)
  1141. TextLabel70.TextWrapped = true
  1142. TextLabel70.TextXAlignment = Enum.TextXAlignment.Left
  1143. TextLabel71.Name = "locked"
  1144. TextLabel71.Parent = Frame69
  1145. TextLabel71.Transparency = 1
  1146. TextLabel71.Size = UDim2.new(1, -10, 1, 0)
  1147. TextLabel71.Text = ""
  1148. TextLabel71.Position = UDim2.new(0, 5, 0, 0)
  1149. TextLabel71.Visible = false
  1150. TextLabel71.BackgroundTransparency = 1
  1151. TextLabel71.Font = Enum.Font.SourceSans
  1152. TextLabel71.FontSize = Enum.FontSize.Size14
  1153. TextLabel71.TextColor3 = Color3.new(0.580392, 0.580392, 0.580392)
  1154. TextLabel71.TextWrapped = true
  1155. TextLabel71.TextXAlignment = Enum.TextXAlignment.Left
  1156. Frame72.Name = "border"
  1157. Frame72.Parent = Frame68
  1158. Frame72.Size = UDim2.new(0, 1, 1, 0)
  1159. Frame72.Position = UDim2.new(0.5, 0, 0, 0)
  1160. Frame72.BackgroundColor3 = Color3.new(0.686275, 0.686275, 0.686275)
  1161. Frame72.BorderColor3 = Color3.new(0.686275, 0.686275, 0.686275)
  1162. Frame72.BorderSizePixel = 0
  1163. Frame73.Name = "edit"
  1164. Frame73.Parent = Frame68
  1165. Frame73.Transparency = 1
  1166. Frame73.Size = UDim2.new(0.5, 0, 1, -1)
  1167. Frame73.Position = UDim2.new(0.5, 0, 0, 0)
  1168. Frame73.BackgroundColor3 = Color3.new(0.992157, 0.984314, 1)
  1169. Frame73.BackgroundTransparency = 1
  1170. TextLabel74.Name = "locked"
  1171. TextLabel74.Parent = Frame73
  1172. TextLabel74.Transparency = 1
  1173. TextLabel74.Size = UDim2.new(1, -10, 1, 0)
  1174. TextLabel74.Text = ""
  1175. TextLabel74.Position = UDim2.new(0, 5, 0, 0)
  1176. TextLabel74.Visible = false
  1177. TextLabel74.BackgroundTransparency = 1
  1178. TextLabel74.Font = Enum.Font.SourceSans
  1179. TextLabel74.FontSize = Enum.FontSize.Size14
  1180. TextLabel74.TextColor3 = Color3.new(0.580392, 0.580392, 0.580392)
  1181. TextLabel74.TextWrapped = true
  1182. TextLabel74.TextXAlignment = Enum.TextXAlignment.Left
  1183. TextBox75.Name = "box"
  1184. TextBox75.Parent = Frame73
  1185. TextBox75.Transparency = 1
  1186. TextBox75.Size = UDim2.new(1, -10, 1, 0)
  1187. TextBox75.Text = ""
  1188. TextBox75.Position = UDim2.new(0, 5, 0, 0)
  1189. TextBox75.Visible = false
  1190. TextBox75.BackgroundTransparency = 1
  1191. TextBox75.Font = Enum.Font.SourceSans
  1192. TextBox75.FontSize = Enum.FontSize.Size14
  1193. TextBox75.TextColor3 = Color3.new(0.0980392, 0.0980392, 0.0980392)
  1194. TextBox75.TextWrapped = true
  1195. TextBox75.TextXAlignment = Enum.TextXAlignment.Left
  1196. ImageButton76.Name = "check"
  1197. ImageButton76.Parent = Frame73
  1198. ImageButton76.Size = UDim2.new(0, 12, 0, 12)
  1199. ImageButton76.Position = UDim2.new(0, 5, 0, 5)
  1200. ImageButton76.Visible = false
  1201. ImageButton76.BorderSizePixel = 0
  1202. LocalScript77.Name = "Command"
  1203. LocalScript77.Parent = Frame45
  1204. table.insert(cors,sandbox(LocalScript77,function()
  1205. local Explorer = script.Parent.Parent:WaitForChild("ExplorerPanel")
  1206. Explorer:WaitForChild("List")
  1207. Explorer:WaitForChild("SelectionChanged")
  1208. local Output = script.Parent
  1209. local Command = script.Parent.Parent:WaitForChild("CommandPanel")
  1210. local Properties = script.Parent.Parent:WaitForChild("PropertiesPanel")
  1211. local Studio = script.Parent.Parent
  1212.  
  1213. Command:WaitForChild("TextButton").MouseButton1Click:connect(function()
  1214. print(">",game.Players.LocalPlayer.Name.." ran script:",Command.TextBox.Text)
  1215. ypcall(function() loadstring(Command.TextBox.Text)() end)
  1216. end)
  1217. end))
  1218. TextBox78.Parent = Frame45
  1219. TextBox78.Size = UDim2.new(1, -165, 0, 35)
  1220. TextBox78.Text = "print"Hello, world!""
  1221. TextBox78.Position = UDim2.new(0, 0, 0, 30)
  1222. TextBox78.BackgroundColor3 = Color3.new(0.866667, 0.866667, 0.866667)
  1223. TextBox78.ClearTextOnFocus = false
  1224. TextBox78.MultiLine = true
  1225. TextBox78.Font = Enum.Font.SourceSans
  1226. TextBox78.FontSize = Enum.FontSize.Size18
  1227. TextButton79.Parent = Frame45
  1228. TextButton79.Size = UDim2.new(0, 150, 0, 30)
  1229. TextButton79.Style = Enum.ButtonStyle.RobloxButton
  1230. TextButton79.Text = "Execute Code"
  1231. TextButton79.Position = UDim2.new(1, -150, 0, 32)
  1232. TextButton79.BackgroundColor3 = Color3.new(1, 1, 1)
  1233. TextButton79.Font = Enum.Font.SourceSans
  1234. TextButton79.FontSize = Enum.FontSize.Size24
  1235. TextButton79.TextColor3 = Color3.new(1, 1, 1)
  1236. TextButton79.TextWrapped = true
  1237. TextLabel80.Name = "rrr"
  1238. TextLabel80.Parent = ScreenGui0
  1239. TextLabel80.Size = UDim2.new(0, 30, 0, 40)
  1240. TextLabel80.Text = ">"
  1241. TextLabel80.Position = UDim2.new(0, 163, 0, 330)
  1242. TextLabel80.Active = true
  1243. TextLabel80.Visible = false
  1244. TextLabel80.BackgroundColor3 = Color3.new(0, 0, 0)
  1245. TextLabel80.BorderSizePixel = 0
  1246. TextLabel80.Font = Enum.Font.SourceSansBold
  1247. TextLabel80.FontSize = Enum.FontSize.Size36
  1248. TextLabel80.TextColor3 = Color3.new(0, 0, 0)
  1249. TextLabel80.TextStrokeColor3 = Color3.new(1, 1, 1)
  1250. TextLabel80.TextStrokeTransparency = 0
  1251. TextLabel81.Name = "lll"
  1252. TextLabel81.Parent = ScreenGui0
  1253. TextLabel81.Size = UDim2.new(0, 30, 0, 40)
  1254. TextLabel81.Text = ">"
  1255. TextLabel81.Position = UDim2.new(0, 15, 0, 330)
  1256. TextLabel81.Active = true
  1257. TextLabel81.Visible = false
  1258. TextLabel81.BackgroundColor3 = Color3.new(0, 0, 0)
  1259. TextLabel81.BorderSizePixel = 0
  1260. TextLabel81.Font = Enum.Font.SourceSansBold
  1261. TextLabel81.FontSize = Enum.FontSize.Size36
  1262. TextLabel81.TextColor3 = Color3.new(0, 0, 0)
  1263. TextLabel81.TextStrokeColor3 = Color3.new(1, 1, 1)
  1264. TextLabel81.TextStrokeTransparency = 0
  1265. Frame82.Name = "ExplorerPanel"
  1266. Frame82.Parent = ScreenGui0
  1267. Frame82.Transparency = 0.10000000149012
  1268. Frame82.Size = UDim2.new(0, 300, 1, -210)
  1269. Frame82.Position = UDim2.new(1, -308, 0, 190)
  1270. Frame82.Visible = false
  1271. Frame82.BackgroundColor3 = Color3.new(1, 1, 1)
  1272. Frame82.BackgroundTransparency = 0.10000000149012
  1273. Frame82.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
  1274. LocalScript83.Parent = Frame82
  1275. table.insert(cors,sandbox(LocalScript83,function()
  1276. -- initial states
  1277. local Option = {
  1278. -- can modify objects
  1279. Modifiable = true;
  1280. -- can select objects
  1281. Selectable = true;
  1282. }
  1283.  
  1284. -- general size of GUI objects, in pixels
  1285. local GUI_SIZE = 16
  1286. -- padding between items within each entry
  1287. local ENTRY_PADDING = 1
  1288. -- padding between each entry
  1289. local ENTRY_MARGIN = 1
  1290.  
  1291. --[[
  1292.  
  1293. # Explorer Panel
  1294.  
  1295. A GUI panel that displays the game hierarchy.
  1296.  
  1297.  
  1298. ## Selection Bindables
  1299.  
  1300. - `Function GetSelection ( )`
  1301.  
  1302. Returns an array of objects representing the objects currently
  1303. selected in the panel.
  1304.  
  1305. - `Function SetSelection ( Objects selection )`
  1306.  
  1307. Sets the objects that are selected in the panel. `selection` is an array
  1308. of objects.
  1309.  
  1310. - `Event SelectionChanged ( )`
  1311.  
  1312. Fired after the selection changes.
  1313.  
  1314.  
  1315. ## Option Bindables
  1316.  
  1317. - `Function GetOption ( string optionName )`
  1318.  
  1319. If `optionName` is given, returns the value of that option. Otherwise,
  1320. returns a table of options and their current values.
  1321.  
  1322. - `Function SetOption ( string optionName, bool value )`
  1323.  
  1324. Sets `optionName` to `value`.
  1325.  
  1326. Options:
  1327.  
  1328. - Modifiable
  1329.  
  1330. Whether objects can be modified by the panel.
  1331.  
  1332. Note that modifying objects depends on being able to select them. If
  1333. Selectable is false, then Actions will not be available. Reparenting
  1334. is still possible, but only for the dragged object.
  1335.  
  1336. - Selectable
  1337.  
  1338. Whether objects can be selected.
  1339.  
  1340. If Modifiable is false, then left-clicking will perform a drag
  1341. selection.
  1342.  
  1343. ## Updates
  1344.  
  1345. - 2013-09-18
  1346. - Fixed explorer icons to match studio explorer.
  1347.  
  1348. - 2013-09-14
  1349. - Added GetOption and SetOption bindables.
  1350. - Option: Modifiable; sets whether objects can be modified by the panel.
  1351. - Option: Selectable; sets whether objects can be selected.
  1352. - Slight modification to left-click selection behavior.
  1353. - Improved layout and scaling.
  1354.  
  1355. - 2013-09-13
  1356. - Added drag to reparent objects.
  1357. - Left-click to select/deselect object.
  1358. - Left-click and drag unselected object to reparent single object.
  1359. - Left-click and drag selected object to move reparent entire selection.
  1360. - Right-click while dragging to cancel.
  1361.  
  1362. - 2013-09-11
  1363. - Added explorer panel header with actions.
  1364. - Added Cut action.
  1365. - Added Copy action.
  1366. - Added Paste action.
  1367. - Added Delete action.
  1368. - Added drag selection.
  1369. - Left-click: Add to selection on drag.
  1370. - Right-click: Add to or remove from selection on drag.
  1371. - Ensured SelectionChanged fires only when the selection actually changes.
  1372. - Added documentation and change log.
  1373. - Fixed thread issue.
  1374.  
  1375. - 2013-09-09
  1376. - Added basic multi-selection.
  1377. - Left-click to set selection.
  1378. - Right-click to add to or remove from selection.
  1379. - Removed "Selection" ObjectValue.
  1380. - Added GetSelection BindableFunction.
  1381. - Added SetSelection BindableFunction.
  1382. - Added SelectionChanged BindableEvent.
  1383. - Changed font to SourceSans.
  1384.  
  1385. - 2013-08-31
  1386. - Improved GUI sizing based off of `GUI_SIZE` constant.
  1387. - Automatic font size detection.
  1388.  
  1389. - 2013-08-27
  1390. - Initial explorer panel.
  1391.  
  1392.  
  1393. ## Todo
  1394.  
  1395. - Sorting
  1396. - by ExplorerOrder
  1397. - by children
  1398. - by name
  1399. - Drag objects to reparent
  1400.  
  1401. ]]
  1402.  
  1403. local ENTRY_SIZE = GUI_SIZE + ENTRY_PADDING*2
  1404. local ENTRY_BOUND = ENTRY_SIZE + ENTRY_MARGIN
  1405. local HEADER_SIZE = ENTRY_SIZE
  1406.  
  1407. local FONT = 'SourceSans'
  1408. local FONT_SIZE do
  1409. local size = {8,9,10,11,12,14,18,24,36,48}
  1410. local s
  1411. local n = math.huge
  1412. for i = 1,#size do
  1413. if size[i] <= GUI_SIZE then
  1414. FONT_SIZE = i - 1
  1415. end
  1416. end
  1417. end
  1418.  
  1419. local GuiColor = {
  1420. Background = Color3.new(233/255, 233/255, 233/255);
  1421. Border = Color3.new(149/255, 149/255, 149/255);
  1422. Selected = Color3.new( 96/255, 140/255, 211/255);
  1423. BorderSelected = Color3.new( 86/255, 125/255, 188/255);
  1424. Text = Color3.new( 0/255, 0/255, 0/255);
  1425. TextDisabled = Color3.new(128/255, 128/255, 128/255);
  1426. TextSelected = Color3.new(255/255, 255/255, 255/255);
  1427. Button = Color3.new(221/255, 221/255, 221/255);
  1428. ButtonBorder = Color3.new(149/255, 149/255, 149/255);
  1429. ButtonSelected = Color3.new(255/255, 0/255, 0/255);
  1430. Field = Color3.new(255/255, 255/255, 255/255);
  1431. FieldBorder = Color3.new(191/255, 191/255, 191/255);
  1432. TitleBackground = Color3.new(178/255, 178/255, 178/255);
  1433. }
  1434.  
  1435. ----------------------------------------------------------------
  1436. ----------------------------------------------------------------
  1437. ----------------------------------------------------------------
  1438. ----------------------------------------------------------------
  1439. ---- Icon map constants
  1440.  
  1441. local MAP_ID = 129293660
  1442.  
  1443. -- Indices based on implementation of Icon function.
  1444. local ACTION_CUT = 160
  1445. local ACTION_COPY = 161
  1446. local ACTION_PASTE = 162
  1447. local ACTION_DELETE = 163
  1448. local ACTION_SORT = 164
  1449. local ACTION_CUT_OVER = 174
  1450. local ACTION_COPY_OVER = 175
  1451. local ACTION_PASTE_OVER = 176
  1452. local ACTION_DELETE_OVER = 177
  1453. local ACTION_SORT_OVER = 178
  1454.  
  1455. local NODE_COLLAPSED = 165
  1456. local NODE_EXPANDED = 166
  1457. local NODE_COLLAPSED_OVER = 179
  1458. local NODE_EXPANDED_OVER = 180
  1459.  
  1460. local ExplorerIndex = {
  1461. ["Accoutrement"] = 32;
  1462. ["Animation"] = 60;
  1463. ["AnimationTrack"] = 60;
  1464. ["ArcHandles"] = 56;
  1465. ["Backpack"] = 20;
  1466. ["BillboardGui"] = 64;
  1467. ["BindableEvent"] = 67;
  1468. ["BindableFunction"] = 66;
  1469. ["BlockMesh"] = 8;
  1470. ["BodyAngularVelocity"] = 14;
  1471. ["BodyForce"] = 14;
  1472. ["BodyGyro"] = 14;
  1473. ["BodyPosition"] = 14;
  1474. ["BodyThrust"] = 14;
  1475. ["BodyVelocity"] = 14;
  1476. ["BoolValue"] = 4;
  1477. ["BrickColorValue"] = 4;
  1478. ["Camera"] = 5;
  1479. ["CFrameValue"] = 4;
  1480. ["CharacterMesh"] = 60;
  1481. ["ClickDetector"] = 41;
  1482. ["Color3Value"] = 4;
  1483. ["Configuration"] = 58;
  1484. ["CoreGui"] = 46;
  1485. ["CornerWedgePart"] = 1;
  1486. ["CustomEvent"] = 4;
  1487. ["CustomEventReceiver"] = 4;
  1488. ["CylinderMesh"] = 8;
  1489. ["Debris"] = 30;
  1490. ["Decal"] = 7;
  1491. ["Dialog"] = 62;
  1492. ["DialogChoice"] = 63;
  1493. ["DoubleConstrainedValue"] = 4;
  1494. ["Explosion"] = 36;
  1495. ["Fire"] = 61;
  1496. ["Flag"] = 38;
  1497. ["FlagStand"] = 39;
  1498. ["FloorWire"] = 4;
  1499. ["ForceField"] = 37;
  1500. ["Frame"] = 48;
  1501. ["GuiButton"] = 52;
  1502. ["GuiMain"] = 47;
  1503. ["Handles"] = 53;
  1504. ["Hat"] = 45;
  1505. ["Hint"] = 33;
  1506. ["HopperBin"] = 22;
  1507. ["Humanoid"] = 9;
  1508. ["ImageButton"] = 52;
  1509. ["ImageLabel"] = 49;
  1510. ["IntConstrainedValue"] = 4;
  1511. ["IntValue"] = 4;
  1512. ["JointInstance"] = 34;
  1513. ["Keyframe"] = 60;
  1514. ["Lighting"] = 13;
  1515. ["LocalScript"] = 18;
  1516. ["MarketplaceService"] = 46;
  1517. ["Message"] = 33;
  1518. ["Model"] = 2;
  1519. ["NetworkClient"] = 16;
  1520. ["NetworkReplicator"] = 29;
  1521. ["NetworkServer"] = 15;
  1522. ["NumberValue"] = 4;
  1523. ["ObjectValue"] = 4;
  1524. ["Pants"] = 44;
  1525. ["ParallelRampPart"] = 1;
  1526. ["Part"] = 1;
  1527. ["PartPairLasso"] = 57;
  1528. ["Platform"] = 35;
  1529. ["Player"] = 12;
  1530. ["PlayerGui"] = 46;
  1531. ["Players"] = 21;
  1532. ["PointLight"] = 13;
  1533. ["Pose"] = 60;
  1534. ["PrismPart"] = 1;
  1535. ["PyramidPart"] = 1;
  1536. ["RayValue"] = 4;
  1537. ["ReplicatedStorage"] = 0;
  1538. ["RightAngleRampPart"] = 1;
  1539. ["RocketPropulsion"] = 14;
  1540. ["ScreenGui"] = 47;
  1541. ["Script"] = 6;
  1542. ["Seat"] = 35;
  1543. ["SelectionBox"] = 54;
  1544. ["SelectionPartLasso"] = 57;
  1545. ["SelectionPointLasso"] = 57;
  1546. ["ServerScriptService"] = 0;
  1547. ["ServerStorage"] = 0;
  1548. ["Shirt"] = 43;
  1549. ["ShirtGraphic"] = 40;
  1550. ["SkateboardPlatform"] = 35;
  1551. ["Sky"] = 28;
  1552. ["Smoke"] = 59;
  1553. ["Sound"] = 11;
  1554. ["SoundService"] = 31;
  1555. ["Sparkles"] = 42;
  1556. ["SpawnLocation"] = 25;
  1557. ["SpecialMesh"] = 8;
  1558. ["SpotLight"] = 13;
  1559. ["StarterGear"] = 20;
  1560. ["StarterGui"] = 46;
  1561. ["StarterPack"] = 20;
  1562. ["Status"] = 2;
  1563. ["StringValue"] = 4;
  1564. ["SurfaceSelection"] = 55;
  1565. ["Team"] = 24;
  1566. ["Teams"] = 23;
  1567. ["Terrain"] = 65;
  1568. ["TestService"] = 68;
  1569. ["TextBox"] = 51;
  1570. ["TextButton"] = 51;
  1571. ["TextLabel"] = 50;
  1572. ["Texture"] = 10;
  1573. ["TextureTrail"] = 4;
  1574. ["Tool"] = 17;
  1575. ["TouchTransmitter"] = 37;
  1576. ["TrussPart"] = 1;
  1577. ["Vector3Value"] = 4;
  1578. ["VehicleSeat"] = 35;
  1579. ["WedgePart"] = 1;
  1580. ["Weld"] = 34;
  1581. ["Workspace"] = 19;
  1582. }
  1583.  
  1584. ----------------------------------------------------------------
  1585. ----------------------------------------------------------------
  1586. ----------------------------------------------------------------
  1587. ----------------------------------------------------------------
  1588. ----------------------------------------------------------------
  1589.  
  1590. function Create(ty,data)
  1591. local obj
  1592. if type(ty) == 'string' then
  1593. obj = Instance.new(ty)
  1594. else
  1595. obj = ty
  1596. end
  1597. for k, v in pairs(data) do
  1598. if type(k) == 'number' then
  1599. v.Parent = obj
  1600. else
  1601. obj[k] = v
  1602. end
  1603. end
  1604. return obj
  1605. end
  1606.  
  1607. -- Connects a function to an event such that it fires asynchronously
  1608. function Connect(event,func)
  1609. return event:connect(function(...)
  1610. local a = {...}
  1611. Spawn(function() func(unpack(a)) end)
  1612. end)
  1613. end
  1614.  
  1615. -- returns the ascendant ScreenGui of an object
  1616. function GetScreen(screen)
  1617. if screen == nil then return nil end
  1618. while not screen:IsA("ScreenGui") do
  1619. screen = screen.Parent
  1620. if screen == nil then return nil end
  1621. end
  1622. return screen
  1623. end
  1624.  
  1625. do
  1626. local ZIndexLock = {}
  1627. -- Sets the ZIndex of an object and its descendants. Objects are locked so
  1628. -- that SetZIndexOnChanged doesn't spawn multiple threads that set the
  1629. -- ZIndex of the same object.
  1630. function SetZIndex(object,z)
  1631. if not ZIndexLock[object] then
  1632. ZIndexLock[object] = true
  1633. if object:IsA'GuiObject' then
  1634. object.ZIndex = z
  1635. end
  1636. local children = object:GetChildren()
  1637. for i = 1,#children do
  1638. SetZIndex(children[i],z)
  1639. end
  1640. ZIndexLock[object] = nil
  1641. end
  1642. end
  1643.  
  1644. function SetZIndexOnChanged(object)
  1645. return object.Changed:connect(function(p)
  1646. if p == "ZIndex" then
  1647. SetZIndex(object,object.ZIndex)
  1648. end
  1649. end)
  1650. end
  1651. end
  1652.  
  1653. ---- IconMap ----
  1654. -- Image size: 256px x 256px
  1655. -- Icon size: 16px x 16px
  1656. -- Padding between each icon: 2px
  1657. -- Padding around image edge: 1px
  1658. -- Total icons: 14 x 14 (196)
  1659. local Icon do
  1660. local iconMap = 'http://www.roblox.com/asset/?id=' .. MAP_ID
  1661. Game:GetService('ContentProvider'):Preload(iconMap)
  1662. local iconDehash do
  1663. -- 14 x 14, 0-based input, 0-based output
  1664. local f=math.floor
  1665. function iconDehash(h)
  1666. return f(h/14%14),f(h%14)
  1667. end
  1668. end
  1669.  
  1670. function Icon(IconFrame,index)
  1671. local row,col = iconDehash(index)
  1672. local mapSize = Vector2.new(256,256)
  1673. local pad,border = 2,1
  1674. local iconSize = 16
  1675.  
  1676. local class = 'Frame'
  1677. if type(IconFrame) == 'string' then
  1678. class = IconFrame
  1679. IconFrame = nil
  1680. end
  1681.  
  1682. if not IconFrame then
  1683. IconFrame = Create(class,{
  1684. Name = "Icon";
  1685. BackgroundTransparency = 1;
  1686. ClipsDescendants = true;
  1687. Create('ImageLabel',{
  1688. Name = "IconMap";
  1689. Active = false;
  1690. BackgroundTransparency = 1;
  1691. Image = iconMap;
  1692. Size = UDim2.new(mapSize.x/iconSize,0,mapSize.y/iconSize,0);
  1693. });
  1694. })
  1695. end
  1696.  
  1697. IconFrame.IconMap.Position = UDim2.new(-col - (pad*(col+1) + border)/iconSize,0,-row - (pad*(row+1) + border)/iconSize,0)
  1698. return IconFrame
  1699. end
  1700. end
  1701.  
  1702. ----------------------------------------------------------------
  1703. ----------------------------------------------------------------
  1704. ----------------------------------------------------------------
  1705. ----------------------------------------------------------------
  1706. ---- ScrollBar
  1707. do
  1708. -- AutoButtonColor doesn't always reset properly
  1709. local function ResetButtonColor(button)
  1710. local active = button.Active
  1711. button.Active = not active
  1712. button.Active = active
  1713. end
  1714.  
  1715. local function ArrowGraphic(size,dir,scaled,template)
  1716. local Frame = Create('Frame',{
  1717. Name = "Arrow Graphic";
  1718. BorderSizePixel = 0;
  1719. Size = UDim2.new(0,size,0,size);
  1720. Transparency = 1;
  1721. })
  1722. if not template then
  1723. template = Instance.new("Frame")
  1724. template.BorderSizePixel = 0
  1725. end
  1726.  
  1727. local transform
  1728. if dir == nil or dir == 'Up' then
  1729. function transform(p,s) return p,s end
  1730. elseif dir == 'Down' then
  1731. function transform(p,s) return UDim2.new(0,p.X.Offset,0,size-p.Y.Offset-1),s end
  1732. elseif dir == 'Left' then
  1733. function transform(p,s) return UDim2.new(0,p.Y.Offset,0,p.X.Offset),UDim2.new(0,s.Y.Offset,0,s.X.Offset) end
  1734. elseif dir == 'Right' then
  1735. function transform(p,s) return UDim2.new(0,size-p.Y.Offset-1,0,p.X.Offset),UDim2.new(0,s.Y.Offset,0,s.X.Offset) end
  1736. end
  1737.  
  1738. local scale
  1739. if scaled then
  1740. function scale(p,s) return UDim2.new(p.X.Offset/size,0,p.Y.Offset/size,0),UDim2.new(s.X.Offset/size,0,s.Y.Offset/size,0) end
  1741. else
  1742. function scale(p,s) return p,s end
  1743. end
  1744.  
  1745. local o = math.floor(size/4)
  1746. if size%2 == 0 then
  1747. local n = size/2-1
  1748. for i = 0,n do
  1749. local t = template:Clone()
  1750. local p,s = scale(transform(
  1751. UDim2.new(0,n-i,0,o+i),
  1752. UDim2.new(0,(i+1)*2,0,1)
  1753. ))
  1754. t.Position = p
  1755. t.Size = s
  1756. t.Parent = Frame
  1757. end
  1758. else
  1759. local n = (size-1)/2
  1760. for i = 0,n do
  1761. local t = template:Clone()
  1762. local p,s = scale(transform(
  1763. UDim2.new(0,n-i,0,o+i),
  1764. UDim2.new(0,i*2+1,0,1)
  1765. ))
  1766. t.Position = p
  1767. t.Size = s
  1768. t.Parent = Frame
  1769. end
  1770. end
  1771. if size%4 > 1 then
  1772. local t = template:Clone()
  1773. local p,s = scale(transform(
  1774. UDim2.new(0,0,0,size-o-1),
  1775. UDim2.new(0,size,0,1)
  1776. ))
  1777. t.Position = p
  1778. t.Size = s
  1779. t.Parent = Frame
  1780. end
  1781. return Frame
  1782. end
  1783.  
  1784.  
  1785. local function GripGraphic(size,dir,spacing,scaled,template)
  1786. local Frame = Create('Frame',{
  1787. Name = "Grip Graphic";
  1788. BorderSizePixel = 0;
  1789. Size = UDim2.new(0,size.x,0,size.y);
  1790. Transparency = 1;
  1791. })
  1792. if not template then
  1793. template = Instance.new("Frame")
  1794. template.BorderSizePixel = 0
  1795. end
  1796.  
  1797. spacing = spacing or 2
  1798.  
  1799. local scale
  1800. if scaled then
  1801. function scale(p) return UDim2.new(p.X.Offset/size.x,0,p.Y.Offset/size.y,0) end
  1802. else
  1803. function scale(p) return p end
  1804. end
  1805.  
  1806. if dir == 'Vertical' then
  1807. for i=0,size.x-1,spacing do
  1808. local t = template:Clone()
  1809. t.Size = scale(UDim2.new(0,1,0,size.y))
  1810. t.Position = scale(UDim2.new(0,i,0,0))
  1811. t.Parent = Frame
  1812. end
  1813. elseif dir == nil or dir == 'Horizontal' then
  1814. for i=0,size.y-1,spacing do
  1815. local t = template:Clone()
  1816. t.Size = scale(UDim2.new(0,size.x,0,1))
  1817. t.Position = scale(UDim2.new(0,0,0,i))
  1818. t.Parent = Frame
  1819. end
  1820. end
  1821.  
  1822. return Frame
  1823. end
  1824.  
  1825. local mt = {
  1826. __index = {
  1827. GetScrollPercent = function(self)
  1828. return self.ScrollIndex/(self.TotalSpace-self.VisibleSpace)
  1829. end;
  1830. CanScrollDown = function(self)
  1831. return self.ScrollIndex + self.VisibleSpace < self.TotalSpace
  1832. end;
  1833. CanScrollUp = function(self)
  1834. return self.ScrollIndex > 0
  1835. end;
  1836. ScrollDown = function(self)
  1837. self.ScrollIndex = self.ScrollIndex + self.PageIncrement
  1838. self:Update()
  1839. end;
  1840. ScrollUp = function(self)
  1841. self.ScrollIndex = self.ScrollIndex - self.PageIncrement
  1842. self:Update()
  1843. end;
  1844. ScrollTo = function(self,index)
  1845. self.ScrollIndex = index
  1846. self:Update()
  1847. end;
  1848. SetScrollPercent = function(self,percent)
  1849. self.ScrollIndex = math.floor((self.TotalSpace - self.VisibleSpace)*percent + 0.5)
  1850. self:Update()
  1851. end;
  1852. };
  1853. }
  1854. mt.__index.CanScrollRight = mt.__index.CanScrollDown
  1855. mt.__index.CanScrollLeft = mt.__index.CanScrollUp
  1856. mt.__index.ScrollLeft = mt.__index.ScrollUp
  1857. mt.__index.ScrollRight = mt.__index.ScrollDown
  1858.  
  1859. function ScrollBar(horizontal)
  1860. -- create row scroll bar
  1861. local ScrollFrame = Create('Frame',{
  1862. Name = "ScrollFrame";
  1863. Position = horizontal and UDim2.new(0,0,1,-GUI_SIZE) or UDim2.new(1,-GUI_SIZE,0,0);
  1864. Size = horizontal and UDim2.new(1,0,0,GUI_SIZE) or UDim2.new(0,GUI_SIZE,1,0);
  1865. BackgroundTransparency = 1;
  1866. Create('ImageButton',{
  1867. Name = "ScrollDown";
  1868. Position = horizontal and UDim2.new(1,-GUI_SIZE,0,0) or UDim2.new(0,0,1,-GUI_SIZE);
  1869. Size = UDim2.new(0, GUI_SIZE, 0, GUI_SIZE);
  1870. BackgroundColor3 = GuiColor.Button;
  1871. BorderColor3 = GuiColor.Border;
  1872. --BorderSizePixel = 0;
  1873. });
  1874. Create('ImageButton',{
  1875. Name = "ScrollUp";
  1876. Size = UDim2.new(0, GUI_SIZE, 0, GUI_SIZE);
  1877. BackgroundColor3 = GuiColor.Button;
  1878. BorderColor3 = GuiColor.Border;
  1879. --BorderSizePixel = 0;
  1880. });
  1881. Create('ImageButton',{
  1882. Name = "ScrollBar";
  1883. Size = horizontal and UDim2.new(1,-GUI_SIZE*2,1,0) or UDim2.new(1,0,1,-GUI_SIZE*2);
  1884. Position = horizontal and UDim2.new(0,GUI_SIZE,0,0) or UDim2.new(0,0,0,GUI_SIZE);
  1885. AutoButtonColor = false;
  1886. BackgroundColor3 = Color3.new(0.94902, 0.94902, 0.94902);
  1887. BorderColor3 = GuiColor.Border;
  1888. --BorderSizePixel = 0;
  1889. Create('ImageButton',{
  1890. Name = "ScrollThumb";
  1891. AutoButtonColor = false;
  1892. Size = UDim2.new(0, GUI_SIZE, 0, GUI_SIZE);
  1893. BackgroundColor3 = GuiColor.Button;
  1894. BorderColor3 = GuiColor.Border;
  1895. --BorderSizePixel = 0;
  1896. });
  1897. });
  1898. })
  1899.  
  1900. local graphicTemplate = Create('Frame',{
  1901. Name="Graphic";
  1902. BorderSizePixel = 0;
  1903. BackgroundColor3 = GuiColor.Border;
  1904. })
  1905. local graphicSize = GUI_SIZE/2
  1906.  
  1907. local ScrollDownFrame = ScrollFrame.ScrollDown
  1908. local ScrollDownGraphic = ArrowGraphic(graphicSize,horizontal and 'Right' or 'Down',true,graphicTemplate)
  1909. ScrollDownGraphic.Position = UDim2.new(0.5,-graphicSize/2,0.5,-graphicSize/2)
  1910. ScrollDownGraphic.Parent = ScrollDownFrame
  1911. local ScrollUpFrame = ScrollFrame.ScrollUp
  1912. local ScrollUpGraphic = ArrowGraphic(graphicSize,horizontal and 'Left' or 'Up',true,graphicTemplate)
  1913. ScrollUpGraphic.Position = UDim2.new(0.5,-graphicSize/2,0.5,-graphicSize/2)
  1914. ScrollUpGraphic.Parent = ScrollUpFrame
  1915. local ScrollBarFrame = ScrollFrame.ScrollBar
  1916. local ScrollThumbFrame = ScrollBarFrame.ScrollThumb
  1917. do
  1918. local size = GUI_SIZE*3/8
  1919. local Decal = GripGraphic(Vector2.new(size,size),horizontal and 'Vertical' or 'Horizontal',2,graphicTemplate)
  1920. Decal.Position = UDim2.new(0.5,-size/2,0.5,-size/2)
  1921. Decal.Parent = ScrollThumbFrame
  1922. end
  1923.  
  1924. local Class = setmetatable({
  1925. GUI = ScrollFrame;
  1926. ScrollIndex = 0;
  1927. VisibleSpace = 0;
  1928. TotalSpace = 0;
  1929. PageIncrement = 1;
  1930. },mt)
  1931.  
  1932. local UpdateScrollThumb
  1933. if horizontal then
  1934. function UpdateScrollThumb()
  1935. ScrollThumbFrame.Size = UDim2.new(Class.VisibleSpace/Class.TotalSpace,0,0,GUI_SIZE)
  1936. if ScrollThumbFrame.AbsoluteSize.x < GUI_SIZE then
  1937. ScrollThumbFrame.Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE)
  1938. end
  1939. local barSize = ScrollBarFrame.AbsoluteSize.x
  1940. ScrollThumbFrame.Position = UDim2.new(Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.x)/barSize,0,0,0)
  1941. end
  1942. else
  1943. function UpdateScrollThumb()
  1944. ScrollThumbFrame.Size = UDim2.new(0,GUI_SIZE,Class.VisibleSpace/Class.TotalSpace,0)
  1945. if ScrollThumbFrame.AbsoluteSize.y < GUI_SIZE then
  1946. ScrollThumbFrame.Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE)
  1947. end
  1948. local barSize = ScrollBarFrame.AbsoluteSize.y
  1949. ScrollThumbFrame.Position = UDim2.new(0,0,Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.y)/barSize,0)
  1950. end
  1951. end
  1952.  
  1953. local lastDown
  1954. local lastUp
  1955. local scrollStyle = {BackgroundColor3=GuiColor.Border,BackgroundTransparency=0}
  1956. local scrollStyle_ds = {BackgroundColor3=GuiColor.Border,BackgroundTransparency=0.7}
  1957.  
  1958. local function Update()
  1959. local t = Class.TotalSpace
  1960. local v = Class.VisibleSpace
  1961. local s = Class.ScrollIndex
  1962. if v <= t then
  1963. if s > 0 then
  1964. if s + v > t then
  1965. Class.ScrollIndex = t - v
  1966. end
  1967. else
  1968. Class.ScrollIndex = 0
  1969. end
  1970. else
  1971. Class.ScrollIndex = 0
  1972. end
  1973.  
  1974. if Class.UpdateCallback then
  1975. if Class.UpdateCallback(Class) == false then
  1976. return
  1977. end
  1978. end
  1979.  
  1980. local down = Class:CanScrollDown()
  1981. local up = Class:CanScrollUp()
  1982. if down ~= lastDown then
  1983. lastDown = down
  1984. ScrollDownFrame.Active = down
  1985. ScrollDownFrame.AutoButtonColor = down
  1986. local children = ScrollDownGraphic:GetChildren()
  1987. local style = down and scrollStyle or scrollStyle_ds
  1988. for i = 1,#children do
  1989. Create(children[i],style)
  1990. end
  1991. end
  1992. if up ~= lastUp then
  1993. lastUp = up
  1994. ScrollUpFrame.Active = up
  1995. ScrollUpFrame.AutoButtonColor = up
  1996. local children = ScrollUpGraphic:GetChildren()
  1997. local style = up and scrollStyle or scrollStyle_ds
  1998. for i = 1,#children do
  1999. Create(children[i],style)
  2000. end
  2001. end
  2002. ScrollThumbFrame.Visible = down or up
  2003. UpdateScrollThumb()
  2004. end
  2005. Class.Update = Update
  2006.  
  2007. SetZIndexOnChanged(ScrollFrame)
  2008.  
  2009. local MouseDrag = Create('ImageButton',{
  2010. Name = "MouseDrag";
  2011. Position = UDim2.new(-0.25,0,-0.25,0);
  2012. Size = UDim2.new(1.5,0,1.5,0);
  2013. Transparency = 1;
  2014. AutoButtonColor = false;
  2015. Active = true;
  2016. ZIndex = 10;
  2017. })
  2018.  
  2019. local scrollEventID = 0
  2020. ScrollDownFrame.MouseButton1Down:connect(function()
  2021. scrollEventID = tick()
  2022. local current = scrollEventID
  2023. local up_con
  2024. up_con = MouseDrag.MouseButton1Up:connect(function()
  2025. scrollEventID = tick()
  2026. MouseDrag.Parent = nil
  2027. ResetButtonColor(ScrollDownFrame)
  2028. up_con:disconnect(); drag = nil
  2029. end)
  2030. MouseDrag.Parent = GetScreen(ScrollFrame)
  2031. Class:ScrollDown()
  2032. wait(0.2) -- delay before auto scroll
  2033. while scrollEventID == current do
  2034. Class:ScrollDown()
  2035. if not Class:CanScrollDown() then break end
  2036. wait()
  2037. end
  2038. end)
  2039.  
  2040. ScrollDownFrame.MouseButton1Up:connect(function()
  2041. scrollEventID = tick()
  2042. end)
  2043.  
  2044. ScrollUpFrame.MouseButton1Down:connect(function()
  2045. scrollEventID = tick()
  2046. local current = scrollEventID
  2047. local up_con
  2048. up_con = MouseDrag.MouseButton1Up:connect(function()
  2049. scrollEventID = tick()
  2050. MouseDrag.Parent = nil
  2051. ResetButtonColor(ScrollUpFrame)
  2052. up_con:disconnect(); drag = nil
  2053. end)
  2054. MouseDrag.Parent = GetScreen(ScrollFrame)
  2055. Class:ScrollUp()
  2056. wait(0.2)
  2057. while scrollEventID == current do
  2058. Class:ScrollUp()
  2059. if not Class:CanScrollUp() then break end
  2060. wait()
  2061. end
  2062. end)
  2063.  
  2064. ScrollUpFrame.MouseButton1Up:connect(function()
  2065. scrollEventID = tick()
  2066. end)
  2067.  
  2068. if horizontal then
  2069. ScrollBarFrame.MouseButton1Down:connect(function(x,y)
  2070. scrollEventID = tick()
  2071. local current = scrollEventID
  2072. local up_con
  2073. up_con = MouseDrag.MouseButton1Up:connect(function()
  2074. scrollEventID = tick()
  2075. MouseDrag.Parent = nil
  2076. ResetButtonColor(ScrollUpFrame)
  2077. up_con:disconnect(); drag = nil
  2078. end)
  2079. MouseDrag.Parent = GetScreen(ScrollFrame)
  2080. if x > ScrollThumbFrame.AbsolutePosition.x then
  2081. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  2082. wait(0.2)
  2083. while scrollEventID == current do
  2084. if x < ScrollThumbFrame.AbsolutePosition.x + ScrollThumbFrame.AbsoluteSize.x then break end
  2085. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  2086. wait()
  2087. end
  2088. else
  2089. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  2090. wait(0.2)
  2091. while scrollEventID == current do
  2092. if x > ScrollThumbFrame.AbsolutePosition.x then break end
  2093. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  2094. wait()
  2095. end
  2096. end
  2097. end)
  2098. else
  2099. ScrollBarFrame.MouseButton1Down:connect(function(x,y)
  2100. scrollEventID = tick()
  2101. local current = scrollEventID
  2102. local up_con
  2103. up_con = MouseDrag.MouseButton1Up:connect(function()
  2104. scrollEventID = tick()
  2105. MouseDrag.Parent = nil
  2106. ResetButtonColor(ScrollUpFrame)
  2107. up_con:disconnect(); drag = nil
  2108. end)
  2109. MouseDrag.Parent = GetScreen(ScrollFrame)
  2110. if y > ScrollThumbFrame.AbsolutePosition.y then
  2111. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  2112. wait(0.2)
  2113. while scrollEventID == current do
  2114. if y < ScrollThumbFrame.AbsolutePosition.y + ScrollThumbFrame.AbsoluteSize.y then break end
  2115. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  2116. wait()
  2117. end
  2118. else
  2119. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  2120. wait(0.2)
  2121. while scrollEventID == current do
  2122. if y > ScrollThumbFrame.AbsolutePosition.y then break end
  2123. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  2124. wait()
  2125. end
  2126. end
  2127. end)
  2128. end
  2129.  
  2130. if horizontal then
  2131. ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
  2132. scrollEventID = tick()
  2133. local mouse_offset = x - ScrollThumbFrame.AbsolutePosition.x
  2134. local drag_con
  2135. local up_con
  2136. drag_con = MouseDrag.MouseMoved:connect(function(x,y)
  2137. local bar_abs_pos = ScrollBarFrame.AbsolutePosition.x
  2138. local bar_drag = ScrollBarFrame.AbsoluteSize.x - ScrollThumbFrame.AbsoluteSize.x
  2139. local bar_abs_one = bar_abs_pos + bar_drag
  2140. x = x - mouse_offset
  2141. x = x < bar_abs_pos and bar_abs_pos or x > bar_abs_one and bar_abs_one or x
  2142. x = x - bar_abs_pos
  2143. Class:SetScrollPercent(x/(bar_drag))
  2144. end)
  2145. up_con = MouseDrag.MouseButton1Up:connect(function()
  2146. scrollEventID = tick()
  2147. MouseDrag.Parent = nil
  2148. ResetButtonColor(ScrollThumbFrame)
  2149. drag_con:disconnect(); drag_con = nil
  2150. up_con:disconnect(); drag = nil
  2151. end)
  2152. MouseDrag.Parent = GetScreen(ScrollFrame)
  2153. end)
  2154. else
  2155. ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
  2156. scrollEventID = tick()
  2157. local mouse_offset = y - ScrollThumbFrame.AbsolutePosition.y
  2158. local drag_con
  2159. local up_con
  2160. drag_con = MouseDrag.MouseMoved:connect(function(x,y)
  2161. local bar_abs_pos = ScrollBarFrame.AbsolutePosition.y
  2162. local bar_drag = ScrollBarFrame.AbsoluteSize.y - ScrollThumbFrame.AbsoluteSize.y
  2163. local bar_abs_one = bar_abs_pos + bar_drag
  2164. y = y - mouse_offset
  2165. y = y < bar_abs_pos and bar_abs_pos or y > bar_abs_one and bar_abs_one or y
  2166. y = y - bar_abs_pos
  2167. Class:SetScrollPercent(y/(bar_drag))
  2168. end)
  2169. up_con = MouseDrag.MouseButton1Up:connect(function()
  2170. scrollEventID = tick()
  2171. MouseDrag.Parent = nil
  2172. ResetButtonColor(ScrollThumbFrame)
  2173. drag_con:disconnect(); drag_con = nil
  2174. up_con:disconnect(); drag = nil
  2175. end)
  2176. MouseDrag.Parent = GetScreen(ScrollFrame)
  2177. end)
  2178. end
  2179.  
  2180. function Class:Destroy()
  2181. ScrollFrame:Destroy()
  2182. MouseDrag:Destroy()
  2183. for k in pairs(Class) do
  2184. Class[k] = nil
  2185. end
  2186. setmetatable(Class,nil)
  2187. end
  2188.  
  2189. Update()
  2190.  
  2191. return Class
  2192. end
  2193. end
  2194.  
  2195. ----------------------------------------------------------------
  2196. ----------------------------------------------------------------
  2197. ----------------------------------------------------------------
  2198. ----------------------------------------------------------------
  2199. ---- Explorer panel
  2200.  
  2201. local explorerPanel = script.Parent
  2202. Create(explorerPanel,{
  2203. BackgroundColor3 = GuiColor.Field;
  2204. BorderColor3 = GuiColor.Border;
  2205. Active = true;
  2206. })
  2207.  
  2208. local listFrame = Create('Frame',{
  2209. Name = "List";
  2210. BackgroundTransparency = 1;
  2211. ClipsDescendants = true;
  2212. Position = UDim2.new(0,0,0,HEADER_SIZE);
  2213. Size = UDim2.new(1,-GUI_SIZE,1,-HEADER_SIZE);
  2214. Parent = explorerPanel;
  2215. })
  2216.  
  2217. local scrollBar = ScrollBar(false)
  2218. scrollBar.PageIncrement = 1
  2219. Create(scrollBar.GUI,{
  2220. Position = UDim2.new(1,-GUI_SIZE,0,HEADER_SIZE);
  2221. Size = UDim2.new(0,GUI_SIZE,1,-HEADER_SIZE);
  2222. Parent = explorerPanel;
  2223. })
  2224.  
  2225. local scrollBarH = ScrollBar(true)
  2226. scrollBarH.PageIncrement = GUI_SIZE
  2227. Create(scrollBarH.GUI,{
  2228. Position = UDim2.new(0,0,1,-GUI_SIZE);
  2229. Size = UDim2.new(1,-GUI_SIZE,0,GUI_SIZE);
  2230. Visible = false;
  2231. Parent = explorerPanel;
  2232. })
  2233.  
  2234. local headerFrame = Create('Frame',{
  2235. Name = "Header";
  2236. BackgroundColor3 = GuiColor.Background;
  2237. BorderColor3 = GuiColor.Border;
  2238. Position = UDim2.new(0,0,0,0);
  2239. Size = UDim2.new(1,0,0,HEADER_SIZE);
  2240. Parent = explorerPanel;
  2241. Create('TextLabel',{
  2242. Text = "Explorer";
  2243. BackgroundTransparency = 1;
  2244. TextColor3 = GuiColor.Text;
  2245. TextXAlignment = 'Left';
  2246. Font = FONT;
  2247. FontSize = FONT_SIZE;
  2248. Position = UDim2.new(0,4,0,0);
  2249. Size = UDim2.new(1,-4,1,0);
  2250. });
  2251. })
  2252.  
  2253. SetZIndexOnChanged(explorerPanel)
  2254.  
  2255. local getTextWidth do
  2256. local text = Create('TextLabel',{
  2257. Name = "TextWidth";
  2258. TextXAlignment = 'Left';
  2259. TextYAlignment = 'Center';
  2260. Font = FONT;
  2261. FontSize = FONT_SIZE;
  2262. Text = "";
  2263. Position = UDim2.new(0,0,0,0);
  2264. Size = UDim2.new(1,0,1,0);
  2265. Visible = false;
  2266. Parent = explorerPanel;
  2267. })
  2268. function getTextWidth(s)
  2269. text.Text = s
  2270. return text.TextBounds.x
  2271. end
  2272. end
  2273.  
  2274. -- Holds the game tree converted to a list.
  2275. local TreeList = {}
  2276. -- Matches objects to their tree node representation.
  2277. local NodeLookup = {}
  2278.  
  2279. local nodeWidth = 0
  2280.  
  2281. local updateList,rawUpdateList,updateScroll,rawUpdateSize do
  2282. local function r(t)
  2283. for i = 1,#t do
  2284. TreeList[#TreeList+1] = t[i]
  2285.  
  2286. local w = (t[i].Depth)*(2+ENTRY_PADDING+GUI_SIZE) + 2 + ENTRY_SIZE + 4 + getTextWidth(t[i].Object.Name) + 4
  2287. if w > nodeWidth then
  2288. nodeWidth = w
  2289. end
  2290. if t[i].Expanded then
  2291. r(t[i])
  2292. end
  2293. end
  2294. end
  2295.  
  2296. function rawUpdateSize()
  2297. scrollBarH.TotalSpace = nodeWidth
  2298. scrollBarH.VisibleSpace = listFrame.AbsoluteSize.x
  2299. scrollBarH:Update()
  2300. local visible = scrollBarH:CanScrollDown() or scrollBarH:CanScrollUp()
  2301. scrollBarH.GUI.Visible = visible
  2302.  
  2303. listFrame.Size = UDim2.new(1,-GUI_SIZE,1,-GUI_SIZE*(visible and 1 or 0) - HEADER_SIZE)
  2304.  
  2305. scrollBar.VisibleSpace = math.ceil(listFrame.AbsoluteSize.y/ENTRY_BOUND)
  2306. scrollBar.GUI.Size = UDim2.new(0,GUI_SIZE,1,-GUI_SIZE*(visible and 1 or 0) - HEADER_SIZE)
  2307.  
  2308. scrollBar.TotalSpace = #TreeList+1
  2309. scrollBar:Update()
  2310. end
  2311.  
  2312. function rawUpdateList()
  2313. -- Clear then repopulate the entire list. It appears to be fast enough.
  2314. TreeList = {}
  2315. nodeWidth = 0
  2316. r(NodeLookup[Game])
  2317. rawUpdateSize()
  2318. end
  2319.  
  2320. -- Adding or removing large models will cause many updates to occur. We
  2321. -- can reduce the number of updates by creating a delay, then dropping any
  2322. -- updates that occur during the delay.
  2323. local updatingList = false
  2324. function updateList()
  2325. if updatingList then return end
  2326. updatingList = true
  2327. wait(0.25)
  2328. updatingList = false
  2329. rawUpdateList()
  2330. end
  2331.  
  2332. local updatingScroll = false
  2333. function updateScroll()
  2334. if updatingScroll then return end
  2335. updatingScroll = true
  2336. wait(0.25)
  2337. updatingScroll = false
  2338. scrollBar:Update()
  2339. end
  2340. end
  2341.  
  2342. local Selection do
  2343. local bindGetSelection = script.Parent:FindFirstChild("GetSelection")
  2344. if not bindGetSelection then
  2345. bindGetSelection = Create('BindableFunction',{Name = "GetSelection"})
  2346. bindGetSelection.Parent = script.Parent
  2347. end
  2348.  
  2349. local bindSetSelection = script.Parent:FindFirstChild("SetSelection")
  2350. if not bindSetSelection then
  2351. bindSetSelection = Create('BindableFunction',{Name = "SetSelection"})
  2352. bindSetSelection.Parent = script.Parent
  2353. end
  2354.  
  2355. local bindSelectionChanged = script.Parent:FindFirstChild("SelectionChanged")
  2356. if not bindSelectionChanged then
  2357. bindSelectionChanged = Create('BindableEvent',{Name = "SelectionChanged"})
  2358. bindSelectionChanged.Parent = script.Parent
  2359. end
  2360.  
  2361. local SelectionList = {}
  2362. local SelectionSet = {}
  2363. Selection = {
  2364. Selected = SelectionSet;
  2365. List = SelectionList;
  2366. }
  2367.  
  2368. local function addObject(object)
  2369. -- list update
  2370. local lupdate = false
  2371. -- scroll update
  2372. local supdate = false
  2373.  
  2374. if not SelectionSet[object] then
  2375. local node = NodeLookup[object]
  2376. if node then
  2377. table.insert(SelectionList,object)
  2378. SelectionSet[object] = true
  2379. node.Selected = true
  2380.  
  2381. -- expand all ancestors so that selected node becomes visible
  2382. node = node.Parent
  2383. while node do
  2384. if not node.Expanded then
  2385. node.Expanded = true
  2386. lupdate = true
  2387. end
  2388. node = node.Parent
  2389. end
  2390. supdate = true
  2391. end
  2392. end
  2393. return lupdate,supdate
  2394. end
  2395.  
  2396. function Selection:Set(objects)
  2397. local lupdate = false
  2398. local supdate = false
  2399.  
  2400. if #SelectionList > 0 then
  2401. for i = 1,#SelectionList do
  2402. local object = SelectionList[i]
  2403. local node = NodeLookup[object]
  2404. if node then
  2405. node.Selected = false
  2406. SelectionSet[object] = nil
  2407. end
  2408. end
  2409.  
  2410. SelectionList = {}
  2411. Selection.List = SelectionList
  2412. supdate = true
  2413. end
  2414.  
  2415. for i = 1,#objects do
  2416. local l,s = addObject(objects[i])
  2417. lupdate = l or lupdate
  2418. supdate = s or supdate
  2419. end
  2420.  
  2421. if lupdate then
  2422. rawUpdateList()
  2423. supdate = true
  2424. elseif supdate then
  2425. scrollBar:Update()
  2426. end
  2427.  
  2428. if supdate then
  2429. bindSelectionChanged:Fire()
  2430. end
  2431. end
  2432.  
  2433. function Selection:Add(object)
  2434. local l,s = addObject(object)
  2435. if l then
  2436. rawUpdateList()
  2437. bindSelectionChanged:Fire()
  2438. elseif s then
  2439. scrollBar:Update()
  2440. bindSelectionChanged:Fire()
  2441. end
  2442. end
  2443.  
  2444. function Selection:Remove(object,noupdate)
  2445. if SelectionSet[object] then
  2446. local node = NodeLookup[object]
  2447. if node then
  2448. node.Selected = false
  2449. SelectionSet[object] = nil
  2450. for i = 1,#SelectionList do
  2451. if SelectionList[i] == object then
  2452. table.remove(SelectionList,i)
  2453. break
  2454. end
  2455. end
  2456.  
  2457. if not noupdate then
  2458. scrollBar:Update()
  2459. end
  2460. bindSelectionChanged:Fire()
  2461. end
  2462. end
  2463. end
  2464.  
  2465. function Selection:Get()
  2466. local list = {}
  2467. for i = 1,#SelectionList do
  2468. list[i] = SelectionList[i]
  2469. end
  2470. return list
  2471. end
  2472.  
  2473. bindSetSelection.OnInvoke = function(...)
  2474. Selection:Set(...)
  2475. end
  2476.  
  2477. bindGetSelection.OnInvoke = function()
  2478. return Selection:Get()
  2479. end
  2480. end
  2481.  
  2482. local function cancelReparentDrag()end
  2483. local function cancelSelectDrag()end
  2484. do
  2485. local listEntries = {}
  2486. local nameConnLookup = {}
  2487.  
  2488. local mouseDrag = Create('ImageButton',{
  2489. Name = "MouseDrag";
  2490. Position = UDim2.new(-0.25,0,-0.25,0);
  2491. Size = UDim2.new(1.5,0,1.5,0);
  2492. Transparency = 1;
  2493. AutoButtonColor = false;
  2494. Active = true;
  2495. ZIndex = 10;
  2496. })
  2497. local function dragSelect(last,add,button)
  2498. local connDrag
  2499. local conUp
  2500.  
  2501. conDrag = mouseDrag.MouseMoved:connect(function(x,y)
  2502. local pos = Vector2.new(x,y) - listFrame.AbsolutePosition
  2503. local size = listFrame.AbsoluteSize
  2504. if pos.x < 0 or pos.x > size.x or pos.y < 0 or pos.y > size.y then return end
  2505.  
  2506. local i = math.ceil(pos.y/ENTRY_BOUND) + scrollBar.ScrollIndex
  2507. -- Mouse may have made a large step, so interpolate between the
  2508. -- last index and the current.
  2509. for n = i<last and i or last, i>last and i or last do
  2510. local node = TreeList[n]
  2511. if node then
  2512. if add then
  2513. Selection:Add(node.Object)
  2514. else
  2515. Selection:Remove(node.Object)
  2516. end
  2517. end
  2518. end
  2519. last = i
  2520. end)
  2521.  
  2522. function cancelSelectDrag()
  2523. mouseDrag.Parent = nil
  2524. conDrag:disconnect()
  2525. conUp:disconnect()
  2526. function cancelSelectDrag()end
  2527. end
  2528.  
  2529. conUp = mouseDrag[button]:connect(cancelSelectDrag)
  2530.  
  2531. mouseDrag.Parent = GetScreen(listFrame)
  2532. end
  2533.  
  2534. local function dragReparent(object,dragGhost,clickPos,ghostOffset)
  2535. local connDrag
  2536. local conUp
  2537. local conUp2
  2538.  
  2539. local parentIndex = nil
  2540. local dragged = false
  2541.  
  2542. local parentHighlight = Create('Frame',{
  2543. Transparency = 1;
  2544. Visible = false;
  2545. Create('Frame',{
  2546. BorderSizePixel = 0;
  2547. BackgroundColor3 = Color3.new(0,0,0);
  2548. BackgroundTransparency = 0.1;
  2549. Position = UDim2.new(0,0,0,0);
  2550. Size = UDim2.new(1,0,0,1);
  2551. });
  2552. Create('Frame',{
  2553. BorderSizePixel = 0;
  2554. BackgroundColor3 = Color3.new(0,0,0);
  2555. BackgroundTransparency = 0.1;
  2556. Position = UDim2.new(1,0,0,0);
  2557. Size = UDim2.new(0,1,1,0);
  2558. });
  2559. Create('Frame',{
  2560. BorderSizePixel = 0;
  2561. BackgroundColor3 = Color3.new(0,0,0);
  2562. BackgroundTransparency = 0.1;
  2563. Position = UDim2.new(0,0,1,0);
  2564. Size = UDim2.new(1,0,0,1);
  2565. });
  2566. Create('Frame',{
  2567. BorderSizePixel = 0;
  2568. BackgroundColor3 = Color3.new(0,0,0);
  2569. BackgroundTransparency = 0.1;
  2570. Position = UDim2.new(0,0,0,0);
  2571. Size = UDim2.new(0,1,1,0);
  2572. });
  2573. })
  2574. SetZIndex(parentHighlight,9)
  2575.  
  2576. conDrag = mouseDrag.MouseMoved:connect(function(x,y)
  2577. local dragPos = Vector2.new(x,y)
  2578. if dragged then
  2579. local pos = dragPos - listFrame.AbsolutePosition
  2580. local size = listFrame.AbsoluteSize
  2581.  
  2582. parentIndex = nil
  2583. parentHighlight.Visible = false
  2584. if pos.x >= 0 and pos.x <= size.x and pos.y >= 0 and pos.y <= size.y then
  2585. local i = math.ceil(pos.y/ENTRY_BOUND)
  2586. local node = TreeList[i + scrollBar.ScrollIndex]
  2587. if node and node.Object ~= object and not object:IsAncestorOf(node.Object) then
  2588. parentIndex = i
  2589. local entry = listEntries[i]
  2590. if entry then
  2591. parentHighlight.Visible = true
  2592. parentHighlight.Position = UDim2.new(0,1,0,entry.AbsolutePosition.y-listFrame.AbsolutePosition.y)
  2593. parentHighlight.Size = UDim2.new(0,size.x-4,0,entry.AbsoluteSize.y)
  2594. end
  2595. end
  2596. end
  2597.  
  2598. dragGhost.Position = UDim2.new(0,dragPos.x+ghostOffset.x,0,dragPos.y+ghostOffset.y)
  2599. elseif (clickPos-dragPos).magnitude > 8 then
  2600. dragged = true
  2601. SetZIndex(dragGhost,9)
  2602. dragGhost.IndentFrame.Transparency = 0.25
  2603. dragGhost.IndentFrame.EntryText.TextColor3 = GuiColor.TextSelected
  2604. dragGhost.Position = UDim2.new(0,dragPos.x+ghostOffset.x,0,dragPos.y+ghostOffset.y)
  2605. dragGhost.Parent = GetScreen(listFrame)
  2606. parentHighlight.Parent = listFrame
  2607. end
  2608. end)
  2609.  
  2610. function cancelReparentDrag()
  2611. mouseDrag.Parent = nil
  2612. conDrag:disconnect()
  2613. conUp:disconnect()
  2614. conUp2:disconnect()
  2615. dragGhost:Destroy()
  2616. parentHighlight:Destroy()
  2617. function cancelReparentDrag()end
  2618. end
  2619.  
  2620. local wasSelected = Selection.Selected[object]
  2621. if not wasSelected and Option.Selectable then
  2622. Selection:Set({object})
  2623. end
  2624.  
  2625. conUp = mouseDrag.MouseButton1Up:connect(function()
  2626. cancelReparentDrag()
  2627. if dragged then
  2628. if parentIndex then
  2629. local parentNode = TreeList[parentIndex + scrollBar.ScrollIndex]
  2630. if parentNode then
  2631. parentNode.Expanded = true
  2632.  
  2633. local parentObj = parentNode.Object
  2634. local function parent(a,b)
  2635. a.Parent = b
  2636. end
  2637. if Option.Selectable then
  2638. local list = Selection.List
  2639. for i = 1,#list do
  2640. pcall(parent,list[i],parentObj)
  2641. end
  2642. else
  2643. pcall(parent,object,parentObj)
  2644. end
  2645. end
  2646. end
  2647. else
  2648. -- do selection click
  2649. if wasSelected and Option.Selectable then
  2650. Selection:Set({})
  2651. end
  2652. end
  2653. end)
  2654. conUp2 = mouseDrag.MouseButton2Down:connect(function()
  2655. cancelReparentDrag()
  2656. end)
  2657.  
  2658. mouseDrag.Parent = GetScreen(listFrame)
  2659. end
  2660.  
  2661. local entryTemplate = Create('ImageButton',{
  2662. Name = "Entry";
  2663. Transparency = 1;
  2664. AutoButtonColor = false;
  2665. Position = UDim2.new(0,0,0,0);
  2666. Size = UDim2.new(1,0,0,ENTRY_SIZE);
  2667. Create('Frame',{
  2668. Name = "IndentFrame";
  2669. BackgroundTransparency = 1;
  2670. BackgroundColor3 = GuiColor.Selected;
  2671. BorderColor3 = GuiColor.BorderSelected;
  2672. Position = UDim2.new(0,0,0,0);
  2673. Size = UDim2.new(1,0,1,0);
  2674. Create(Icon('ImageButton',0),{
  2675. Name = "Expand";
  2676. AutoButtonColor = false;
  2677. Position = UDim2.new(0,-GUI_SIZE,0.5,-GUI_SIZE/2);
  2678. Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE);
  2679. });
  2680. Create(Icon(nil,0),{
  2681. Name = "ExplorerIcon";
  2682. Position = UDim2.new(0,2+ENTRY_PADDING,0.5,-GUI_SIZE/2);
  2683. Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE);
  2684. });
  2685. Create('TextLabel',{
  2686. Name = "EntryText";
  2687. BackgroundTransparency = 1;
  2688. TextColor3 = GuiColor.Text;
  2689. TextXAlignment = 'Left';
  2690. TextYAlignment = 'Center';
  2691. Font = FONT;
  2692. FontSize = FONT_SIZE;
  2693. Text = "";
  2694. Position = UDim2.new(0,2+ENTRY_SIZE+4,0,0);
  2695. Size = UDim2.new(1,-2,1,0);
  2696. });
  2697. });
  2698. })
  2699.  
  2700. function scrollBar.UpdateCallback(self)
  2701. for i = 1,self.VisibleSpace do
  2702. local node = TreeList[i + self.ScrollIndex]
  2703. if node then
  2704. local entry = listEntries[i]
  2705. if not entry then
  2706. entry = Create(entryTemplate:Clone(),{
  2707. Position = UDim2.new(0,2,0,ENTRY_BOUND*(i-1)+2);
  2708. Size = UDim2.new(0,nodeWidth,0,ENTRY_SIZE);
  2709. ZIndex = listFrame.ZIndex;
  2710. })
  2711. listEntries[i] = entry
  2712.  
  2713. local expand = entry.IndentFrame.Expand
  2714. expand.MouseEnter:connect(function()
  2715. local node = TreeList[i + self.ScrollIndex]
  2716. if #node > 0 then
  2717. if node.Expanded then
  2718. Icon(expand,NODE_EXPANDED_OVER)
  2719. else
  2720. Icon(expand,NODE_COLLAPSED_OVER)
  2721. end
  2722. end
  2723. end)
  2724. expand.MouseLeave:connect(function()
  2725. local node = TreeList[i + self.ScrollIndex]
  2726. if #node > 0 then
  2727. if node.Expanded then
  2728. Icon(expand,NODE_EXPANDED)
  2729. else
  2730. Icon(expand,NODE_COLLAPSED)
  2731. end
  2732. end
  2733. end)
  2734. expand.MouseButton1Down:connect(function()
  2735. local node = TreeList[i + self.ScrollIndex]
  2736. if #node > 0 then
  2737. node.Expanded = not node.Expanded
  2738. -- use raw update so the list updates instantly
  2739. rawUpdateList()
  2740. end
  2741. end)
  2742.  
  2743. entry.MouseButton1Down:connect(function(x,y)
  2744. local node = TreeList[i + self.ScrollIndex]
  2745. if Option.Modifiable then
  2746. local pos = Vector2.new(x,y)
  2747. dragReparent(node.Object,entry:Clone(),pos,entry.AbsolutePosition-pos)
  2748. elseif Option.Selectable then
  2749. if Selection.Selected[node.Object] then
  2750. Selection:Set({})
  2751. else
  2752. Selection:Set({node.Object})
  2753. end
  2754. dragSelect(i+self.ScrollIndex,true,'MouseButton1Up')
  2755. end
  2756. end)
  2757.  
  2758. entry.MouseButton2Down:connect(function()
  2759. if not Option.Selectable then return end
  2760.  
  2761. local node = TreeList[i + self.ScrollIndex]
  2762. if Selection.Selected[node.Object] then
  2763. Selection:Remove(node.Object)
  2764. dragSelect(i+self.ScrollIndex,false,'MouseButton2Up')
  2765. else
  2766. Selection:Add(node.Object)
  2767. dragSelect(i+self.ScrollIndex,true,'MouseButton2Up')
  2768. end
  2769. end)
  2770.  
  2771. entry.Parent = listFrame
  2772. end
  2773.  
  2774. entry.Visible = true
  2775.  
  2776. local object = node.Object
  2777.  
  2778. -- update expand icon
  2779. if #node == 0 then
  2780. entry.IndentFrame.Expand.Visible = false
  2781. elseif node.Expanded then
  2782. Icon(entry.IndentFrame.Expand,NODE_EXPANDED)
  2783. entry.IndentFrame.Expand.Visible = true
  2784. else
  2785. Icon(entry.IndentFrame.Expand,NODE_COLLAPSED)
  2786. entry.IndentFrame.Expand.Visible = true
  2787. end
  2788.  
  2789. -- update explorer icon
  2790. Icon(entry.IndentFrame.ExplorerIcon,ExplorerIndex[object.ClassName] or 0)
  2791.  
  2792. -- update indentation
  2793. local w = (node.Depth)*(2+ENTRY_PADDING+GUI_SIZE)
  2794. entry.IndentFrame.Position = UDim2.new(0,w,0,0)
  2795. entry.IndentFrame.Size = UDim2.new(1,-w,1,0)
  2796.  
  2797. -- update name change detection
  2798. if nameConnLookup[entry] then
  2799. nameConnLookup[entry]:disconnect()
  2800. end
  2801. local text = entry.IndentFrame.EntryText
  2802. text.Text = object.Name
  2803. nameConnLookup[entry] = node.Object.Changed:connect(function(p)
  2804. if p == 'Name' then
  2805. text.Text = object.Name
  2806. end
  2807. end)
  2808.  
  2809. -- update selection
  2810. entry.IndentFrame.Transparency = node.Selected and 0 or 1
  2811. text.TextColor3 = GuiColor[node.Selected and 'TextSelected' or 'Text']
  2812.  
  2813. entry.Size = UDim2.new(0,nodeWidth,0,ENTRY_SIZE)
  2814. elseif listEntries[i] then
  2815. listEntries[i].Visible = false
  2816. end
  2817. end
  2818. for i = self.VisibleSpace+1,self.TotalSpace do
  2819. local entry = listEntries[i]
  2820. if entry then
  2821. listEntries[i] = nil
  2822. entry:Destroy()
  2823. end
  2824. end
  2825. end
  2826.  
  2827. function scrollBarH.UpdateCallback(self)
  2828. for i = 1,scrollBar.VisibleSpace do
  2829. local node = TreeList[i + scrollBar.ScrollIndex]
  2830. if node then
  2831. local entry = listEntries[i]
  2832. if entry then
  2833. entry.Position = UDim2.new(0,2 - scrollBarH.ScrollIndex,0,ENTRY_BOUND*(i-1)+2)
  2834. end
  2835. end
  2836. end
  2837. end
  2838.  
  2839. Connect(listFrame.Changed,function(p)
  2840. if p == 'AbsoluteSize' then
  2841. rawUpdateSize()
  2842. end
  2843. end)
  2844.  
  2845. local wheelAmount = 6
  2846. explorerPanel.MouseWheelForward:connect(function()
  2847. if scrollBar.VisibleSpace - 1 > wheelAmount then
  2848. scrollBar:ScrollTo(scrollBar.ScrollIndex - wheelAmount)
  2849. else
  2850. scrollBar:ScrollTo(scrollBar.ScrollIndex - scrollBar.VisibleSpace)
  2851. end
  2852. end)
  2853. explorerPanel.MouseWheelBackward:connect(function()
  2854. if scrollBar.VisibleSpace - 1 > wheelAmount then
  2855. scrollBar:ScrollTo(scrollBar.ScrollIndex + wheelAmount)
  2856. else
  2857. scrollBar:ScrollTo(scrollBar.ScrollIndex + scrollBar.VisibleSpace)
  2858. end
  2859. end)
  2860. end
  2861.  
  2862. ----------------------------------------------------------------
  2863. ----------------------------------------------------------------
  2864. ----------------------------------------------------------------
  2865. ----------------------------------------------------------------
  2866. ---- Object detection
  2867.  
  2868. -- Inserts `v` into `t` at `i`. Also sets `Index` field in `v`.
  2869. local function insert(t,i,v)
  2870. for n = #t,i,-1 do
  2871. local v = t[n]
  2872. v.Index = n+1
  2873. t[n+1] = v
  2874. end
  2875. v.Index = i
  2876. t[i] = v
  2877. end
  2878.  
  2879. -- Removes `i` from `t`. Also sets `Index` field in removed value.
  2880. local function remove(t,i)
  2881. local v = t[i]
  2882. for n = i+1,#t do
  2883. local v = t[n]
  2884. v.Index = n-1
  2885. t[n-1] = v
  2886. end
  2887. t[#t] = nil
  2888. v.Index = 0
  2889. return v
  2890. end
  2891.  
  2892. -- Returns how deep `o` is in the tree.
  2893. local function depth(o)
  2894. local d = -1
  2895. while o do
  2896. o = o.Parent
  2897. d = d + 1
  2898. end
  2899. return d
  2900. end
  2901.  
  2902.  
  2903. local connLookup = {}
  2904.  
  2905. -- Returns whether a node would be present in the tree list
  2906. local function nodeIsVisible(node)
  2907. local visible = true
  2908. node = node.Parent
  2909. while node and visible do
  2910. visible = visible and node.Expanded
  2911. node = node.Parent
  2912. end
  2913. return visible
  2914. end
  2915.  
  2916. -- Removes an object's tree node. Called when the object stops existing in the
  2917. -- game tree.
  2918. local function removeObject(object)
  2919. local objectNode = NodeLookup[object]
  2920. if not objectNode then
  2921. return
  2922. end
  2923.  
  2924. local visible = nodeIsVisible(objectNode)
  2925.  
  2926. Selection:Remove(object,true)
  2927.  
  2928. local parent = objectNode.Parent
  2929. remove(parent,objectNode.Index)
  2930. NodeLookup[object] = nil
  2931. connLookup[object]:disconnect()
  2932. connLookup[object] = nil
  2933.  
  2934. if visible then
  2935. updateList()
  2936. elseif nodeIsVisible(parent) then
  2937. updateScroll()
  2938. end
  2939. end
  2940.  
  2941. -- Moves a tree node to a new parent. Called when an existing object's parent
  2942. -- changes.
  2943. local function moveObject(object,parent)
  2944. local objectNode = NodeLookup[object]
  2945. if not objectNode then
  2946. return
  2947. end
  2948.  
  2949. local parentNode = NodeLookup[parent]
  2950. if not parentNode then
  2951. return
  2952. end
  2953.  
  2954. local visible = nodeIsVisible(objectNode)
  2955.  
  2956. remove(objectNode.Parent,objectNode.Index)
  2957. objectNode.Parent = parentNode
  2958.  
  2959. objectNode.Depth = depth(object)
  2960. local function r(node,d)
  2961. for i = 1,#node do
  2962. node[i].Depth = d
  2963. r(node[i],d+1)
  2964. end
  2965. end
  2966. r(objectNode,objectNode.Depth+1)
  2967.  
  2968. insert(parentNode,#parentNode+1,objectNode)
  2969.  
  2970. if visible or nodeIsVisible(objectNode) then
  2971. updateList()
  2972. elseif nodeIsVisible(objectNode.Parent) then
  2973. updateScroll()
  2974. end
  2975. end
  2976.  
  2977. -- ScriptContext['/Libraries/LibraryRegistration/LibraryRegistration']
  2978. -- This RobloxLocked object lets me index its properties for some reason
  2979.  
  2980. local function check(object)
  2981. return object.AncestryChanged
  2982. end
  2983.  
  2984. -- Creates a new tree node from an object. Called when an object starts
  2985. -- existing in the game tree.
  2986. local function addObject(object,noupdate)
  2987. if script then
  2988. -- protect against naughty RobloxLocked objects
  2989. local s = pcall(check,object)
  2990. if not s then
  2991. return
  2992. end
  2993. end
  2994.  
  2995. local parentNode = NodeLookup[object.Parent]
  2996. if not parentNode then
  2997. return
  2998. end
  2999.  
  3000. local objectNode = {
  3001. Object = object;
  3002. Parent = parentNode;
  3003. Index = 0;
  3004. Expanded = false;
  3005. Selected = false;
  3006. Depth = depth(object);
  3007. }
  3008.  
  3009. connLookup[object] = Connect(object.AncestryChanged,function(c,p)
  3010. if c == object then
  3011. if p == nil then
  3012. removeObject(c)
  3013. else
  3014. moveObject(c,p)
  3015. end
  3016. end
  3017. end)
  3018.  
  3019. NodeLookup[object] = objectNode
  3020. insert(parentNode,#parentNode+1,objectNode)
  3021.  
  3022. if not noupdate then
  3023. if nodeIsVisible(objectNode) then
  3024. updateList()
  3025. elseif nodeIsVisible(objectNode.Parent) then
  3026. updateScroll()
  3027. end
  3028. end
  3029. end
  3030.  
  3031. do
  3032. NodeLookup[Game] = {
  3033. Object = Game;
  3034. Parent = nil;
  3035. Index = 0;
  3036. Expanded = true;
  3037. }
  3038.  
  3039. Connect(Game.DescendantAdded,addObject)
  3040. Connect(Game.DescendantRemoving,removeObject)
  3041.  
  3042. local function get(o)
  3043. return o:GetChildren()
  3044. end
  3045.  
  3046. local function r(o)
  3047. local s,children = pcall(get,o)
  3048. if s then
  3049. for i = 1,#children do
  3050. addObject(children[i],true)
  3051. r(children[i])
  3052. end
  3053. end
  3054. end
  3055.  
  3056. r(Game)
  3057.  
  3058. scrollBar.VisibleSpace = math.ceil(listFrame.AbsoluteSize.y/ENTRY_BOUND)
  3059. updateList()
  3060. end
  3061.  
  3062. ----------------------------------------------------------------
  3063. ----------------------------------------------------------------
  3064. ----------------------------------------------------------------
  3065. ----------------------------------------------------------------
  3066. ---- Actions
  3067.  
  3068. local actionButtons do
  3069. actionButtons = {}
  3070.  
  3071. local totalActions = (4) + 1
  3072. local currentActions = totalActions
  3073. local function makeButton(icon,over,name)
  3074. local button = Create(Icon('ImageButton',icon),{
  3075. Name = name .. "Button";
  3076. Visible = Option.Modifiable and Option.Selectable;
  3077. Position = UDim2.new(1,-(GUI_SIZE+2)*currentActions+2,0.5,-GUI_SIZE/2);
  3078. Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE);
  3079. Parent = headerFrame;
  3080. })
  3081.  
  3082. local tipText = Create('TextLabel',{
  3083. Name = name .. "Text";
  3084. Text = name;
  3085. Visible = false;
  3086. BackgroundTransparency = 1;
  3087. TextXAlignment = 'Right';
  3088. Font = FONT;
  3089. FontSize = FONT_SIZE;
  3090. Position = UDim2.new(0,0,0,0);
  3091. Size = UDim2.new(1,-(GUI_SIZE+2)*totalActions,1,0);
  3092. Parent = headerFrame;
  3093. })
  3094.  
  3095.  
  3096. button.MouseEnter:connect(function()
  3097. Icon(button,over)
  3098. tipText.Visible = true
  3099. end)
  3100. button.MouseLeave:connect(function()
  3101. Icon(button,icon)
  3102. tipText.Visible = false
  3103. end)
  3104.  
  3105. currentActions = currentActions - 1
  3106. actionButtons[#actionButtons+1] = button
  3107. return button
  3108. end
  3109.  
  3110. local clipboard = {}
  3111. local function delete(o)
  3112. o.Parent = nil
  3113. end
  3114.  
  3115. -- CUT
  3116. makeButton(ACTION_CUT,ACTION_CUT_OVER,"Cut").MouseButton1Click:connect(function()
  3117. if not Option.Modifiable then return end
  3118. clipboard = {}
  3119. local list = Selection.List
  3120. local cut = {}
  3121. for i = 1,#list do
  3122. local obj = list[i]:Clone()
  3123. if obj then
  3124. table.insert(clipboard,obj)
  3125. table.insert(cut,list[i])
  3126. end
  3127. end
  3128. for i = 1,#cut do
  3129. pcall(delete,cut[i])
  3130. end
  3131. end)
  3132.  
  3133. -- COPY
  3134. makeButton(ACTION_COPY,ACTION_COPY_OVER,"Copy").MouseButton1Click:connect(function()
  3135. if not Option.Modifiable then return end
  3136. clipboard = {}
  3137. local list = Selection.List
  3138. for i = 1,#list do
  3139. table.insert(clipboard,list[i]:Clone())
  3140. end
  3141. end)
  3142.  
  3143. -- PASTE
  3144. makeButton(ACTION_PASTE,ACTION_PASTE_OVER,"Paste").MouseButton1Click:connect(function()
  3145. if not Option.Modifiable then return end
  3146. local parent = Selection.List[1] or Workspace
  3147. for i = 1,#clipboard do
  3148. clipboard[i]:Clone().Parent = parent
  3149. end
  3150. end)
  3151.  
  3152. -- DELETE
  3153. makeButton(ACTION_DELETE,ACTION_DELETE_OVER,"Delete").MouseButton1Click:connect(function()
  3154. if not Option.Modifiable then return end
  3155. local list = Selection:Get()
  3156. for i = 1,#list do
  3157. pcall(delete,list[i])
  3158. end
  3159. Selection:Set({})
  3160. end)
  3161.  
  3162. -- SORT
  3163. -- local actionSort = makeButton(ACTION_SORT,ACTION_SORT_OVER,"Sort")
  3164. end
  3165.  
  3166. ----------------------------------------------------------------
  3167. ----------------------------------------------------------------
  3168. ----------------------------------------------------------------
  3169. ----------------------------------------------------------------
  3170. ---- Option Bindables
  3171.  
  3172. do
  3173. local optionCallback = {
  3174. Modifiable = function(value)
  3175. for i = 1,#actionButtons do
  3176. actionButtons[i].Visible = value and Option.Selectable
  3177. end
  3178. cancelReparentDrag()
  3179. end;
  3180. Selectable = function(value)
  3181. for i = 1,#actionButtons do
  3182. actionButtons[i].Visible = value and Option.Modifiable
  3183. end
  3184. cancelSelectDrag()
  3185. Selection:Set({})
  3186. end;
  3187. }
  3188.  
  3189. local bindSetOption = script.Parent:FindFirstChild("SetOption")
  3190. if not bindSetOption then
  3191. bindSetOption = Create('BindableFunction',{Name = "SetOption"})
  3192. bindSetOption.Parent = script.Parent
  3193. end
  3194.  
  3195. bindSetOption.OnInvoke = function(optionName,value)
  3196. if optionCallback[optionName] then
  3197. Option[optionName] = value
  3198. optionCallback[optionName](value)
  3199. end
  3200. end
  3201.  
  3202. local bindGetOption = script.Parent:FindFirstChild("GetOption")
  3203. if not bindGetOption then
  3204. bindGetOption = Create('BindableFunction',{Name = "GetOption"})
  3205. bindGetOption.Parent = script.Parent
  3206. end
  3207.  
  3208. bindGetOption.OnInvoke = function(optionName)
  3209. if optionName then
  3210. return Option[optionName]
  3211. else
  3212. local options = {}
  3213. for k,v in pairs(Option) do
  3214. options[k] = v
  3215. end
  3216. return options
  3217. end
  3218. end
  3219. end
  3220.  
  3221. end))
  3222. BindableEvent84.Name = "SelectionChanged"
  3223. BindableEvent84.Parent = Frame82
  3224. BindableFunction85.Name = "SetOption"
  3225. BindableFunction85.Parent = Frame82
  3226. BindableFunction86.Name = "SetSelection"
  3227. BindableFunction86.Parent = Frame82
  3228. BindableFunction87.Name = "GetOption"
  3229. BindableFunction87.Parent = Frame82
  3230. BindableFunction88.Name = "GetSelection"
  3231. BindableFunction88.Parent = Frame82
  3232. Frame89.Name = "OutputPanel"
  3233. Frame89.Parent = ScreenGui0
  3234. Frame89.Transparency = 0.10000000149012
  3235. Frame89.Size = UDim2.new(1, -310, 0.5, -75)
  3236. Frame89.Position = UDim2.new(0, 0, 0.5, 0)
  3237. Frame89.Active = true
  3238. Frame89.Visible = false
  3239. Frame89.BackgroundColor3 = Color3.new(1, 1, 1)
  3240. Frame89.BackgroundTransparency = 0.10000000149012
  3241. Frame89.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  3242. Frame90.Name = "Header"
  3243. Frame90.Parent = Frame89
  3244. Frame90.Size = UDim2.new(1, 0, 0, 18)
  3245. Frame90.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
  3246. Frame90.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  3247. TextLabel91.Parent = Frame90
  3248. TextLabel91.Transparency = 1
  3249. TextLabel91.Size = UDim2.new(1, -4, 1, 0)
  3250. TextLabel91.Text = "Output"
  3251. TextLabel91.Position = UDim2.new(0, 4, 0, 0)
  3252. TextLabel91.BackgroundTransparency = 1
  3253. TextLabel91.Font = Enum.Font.SourceSans
  3254. TextLabel91.FontSize = Enum.FontSize.Size14
  3255. TextLabel91.TextColor3 = Color3.new(0, 0, 0)
  3256. TextLabel91.TextXAlignment = Enum.TextXAlignment.Left
  3257. Frame92.Name = "List"
  3258. Frame92.Parent = Frame89
  3259. Frame92.Transparency = 1
  3260. Frame92.Size = UDim2.new(1, -16, 1, -18)
  3261. Frame92.Position = UDim2.new(0, 0, 0, 18)
  3262. Frame92.BackgroundTransparency = 1
  3263. Frame92.ClipsDescendants = true
  3264. TextLabel93.Name = "TextWidth"
  3265. TextLabel93.Parent = Frame89
  3266. TextLabel93.Size = UDim2.new(1, 0, 1, 0)
  3267. TextLabel93.Text = "TweenService"
  3268. TextLabel93.Visible = false
  3269. TextLabel93.Font = Enum.Font.SourceSans
  3270. TextLabel93.FontSize = Enum.FontSize.Size14
  3271. TextLabel93.TextXAlignment = Enum.TextXAlignment.Left
  3272. Frame94.Name = "ScrollFrame"
  3273. Frame94.Parent = Frame89
  3274. Frame94.Transparency = 1
  3275. Frame94.Size = UDim2.new(0, 16, 1, -18)
  3276. Frame94.Position = UDim2.new(1, -16, 0, 18)
  3277. Frame94.Visible = false
  3278. Frame94.BackgroundTransparency = 1
  3279. ImageButton95.Name = "ScrollDown"
  3280. ImageButton95.Parent = Frame94
  3281. ImageButton95.Size = UDim2.new(0, 16, 0, 16)
  3282. ImageButton95.Position = UDim2.new(0, 0, 1, -16)
  3283. ImageButton95.BackgroundColor3 = Color3.new(0.866667, 0.866667, 0.866667)
  3284. ImageButton95.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  3285. Frame96.Name = "Arrow Graphic"
  3286. Frame96.Parent = ImageButton95
  3287. Frame96.Transparency = 1
  3288. Frame96.Size = UDim2.new(0, 8, 0, 8)
  3289. Frame96.Position = UDim2.new(0.5, -4, 0.5, -4)
  3290. Frame96.BackgroundTransparency = 1
  3291. Frame96.BorderSizePixel = 0
  3292. Frame97.Name = "Graphic"
  3293. Frame97.Parent = Frame96
  3294. Frame97.Size = UDim2.new(0.25, 0, 0.125, 0)
  3295. Frame97.Position = UDim2.new(0.375, 0, 0.625, 0)
  3296. Frame97.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  3297. Frame97.BorderSizePixel = 0
  3298. Frame98.Name = "Graphic"
  3299. Frame98.Parent = Frame96
  3300. Frame98.Size = UDim2.new(0.5, 0, 0.125, 0)
  3301. Frame98.Position = UDim2.new(0.25, 0, 0.5, 0)
  3302. Frame98.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  3303. Frame98.BorderSizePixel = 0
  3304. Frame99.Name = "Graphic"
  3305. Frame99.Parent = Frame96
  3306. Frame99.Size = UDim2.new(0.75, 0, 0.125, 0)
  3307. Frame99.Position = UDim2.new(0.125, 0, 0.375, 0)
  3308. Frame99.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  3309. Frame99.BorderSizePixel = 0
  3310. Frame100.Name = "Graphic"
  3311. Frame100.Parent = Frame96
  3312. Frame100.Size = UDim2.new(1, 0, 0.125, 0)
  3313. Frame100.Position = UDim2.new(0, 0, 0.25, 0)
  3314. Frame100.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  3315. Frame100.BorderSizePixel = 0
  3316. ImageButton101.Name = "ScrollUp"
  3317. ImageButton101.Parent = Frame94
  3318. ImageButton101.Size = UDim2.new(0, 16, 0, 16)
  3319. ImageButton101.Active = false
  3320. ImageButton101.BackgroundColor3 = Color3.new(0.866667, 0.866667, 0.866667)
  3321. ImageButton101.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  3322. ImageButton101.AutoButtonColor = false
  3323. Frame102.Name = "Arrow Graphic"
  3324. Frame102.Parent = ImageButton101
  3325. Frame102.Transparency = 1
  3326. Frame102.Size = UDim2.new(0, 8, 0, 8)
  3327. Frame102.Position = UDim2.new(0.5, -4, 0.5, -4)
  3328. Frame102.BackgroundTransparency = 1
  3329. Frame102.BorderSizePixel = 0
  3330. Frame103.Name = "Graphic"
  3331. Frame103.Parent = Frame102
  3332. Frame103.Transparency = 0.69999998807907
  3333. Frame103.Size = UDim2.new(0.25, 0, 0.125, 0)
  3334. Frame103.Position = UDim2.new(0.375, 0, 0.25, 0)
  3335. Frame103.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  3336. Frame103.BackgroundTransparency = 0.69999998807907
  3337. Frame103.BorderSizePixel = 0
  3338. Frame104.Name = "Graphic"
  3339. Frame104.Parent = Frame102
  3340. Frame104.Transparency = 0.69999998807907
  3341. Frame104.Size = UDim2.new(0.5, 0, 0.125, 0)
  3342. Frame104.Position = UDim2.new(0.25, 0, 0.375, 0)
  3343. Frame104.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  3344. Frame104.BackgroundTransparency = 0.69999998807907
  3345. Frame104.BorderSizePixel = 0
  3346. Frame105.Name = "Graphic"
  3347. Frame105.Parent = Frame102
  3348. Frame105.Transparency = 0.69999998807907
  3349. Frame105.Size = UDim2.new(0.75, 0, 0.125, 0)
  3350. Frame105.Position = UDim2.new(0.125, 0, 0.5, 0)
  3351. Frame105.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  3352. Frame105.BackgroundTransparency = 0.69999998807907
  3353. Frame105.BorderSizePixel = 0
  3354. Frame106.Name = "Graphic"
  3355. Frame106.Parent = Frame102
  3356. Frame106.Transparency = 0.69999998807907
  3357. Frame106.Size = UDim2.new(1, 0, 0.125, 0)
  3358. Frame106.Position = UDim2.new(0, 0, 0.625, 0)
  3359. Frame106.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  3360. Frame106.BackgroundTransparency = 0.69999998807907
  3361. Frame106.BorderSizePixel = 0
  3362. ImageButton107.Name = "ScrollBar"
  3363. ImageButton107.Parent = Frame94
  3364. ImageButton107.Size = UDim2.new(1, 0, 1, -32)
  3365. ImageButton107.Position = UDim2.new(0, 0, 0, 16)
  3366. ImageButton107.BackgroundColor3 = Color3.new(0.94902, 0.94902, 0.94902)
  3367. ImageButton107.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  3368. ImageButton107.AutoButtonColor = false
  3369. ImageButton108.Name = "ScrollThumb"
  3370. ImageButton108.Parent = ImageButton107
  3371. ImageButton108.Size = UDim2.new(0, 16, 0.283333331, 0)
  3372. ImageButton108.BackgroundColor3 = Color3.new(0.866667, 0.866667, 0.866667)
  3373. ImageButton108.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  3374. ImageButton108.Draggable = true
  3375. ImageButton108.AutoButtonColor = false
  3376. Frame109.Name = "Grip Graphic"
  3377. Frame109.Parent = ImageButton108
  3378. Frame109.Transparency = 1
  3379. Frame109.Size = UDim2.new(0, 6, 0, 6)
  3380. Frame109.Position = UDim2.new(0.5, -3, 0.5, -3)
  3381. Frame109.BackgroundTransparency = 1
  3382. Frame109.BorderSizePixel = 0
  3383. Frame110.Parent = Frame109
  3384. Frame110.Size = UDim2.new(1, 0, 0.166666672, 0)
  3385. Frame110.BorderSizePixel = 0
  3386. Frame111.Parent = Frame109
  3387. Frame111.Size = UDim2.new(1, 0, 0.166666672, 0)
  3388. Frame111.Position = UDim2.new(0, 0, 0.333333343, 0)
  3389. Frame111.BorderSizePixel = 0
  3390. Frame112.Parent = Frame109
  3391. Frame112.Size = UDim2.new(1, 0, 0.166666672, 0)
  3392. Frame112.Position = UDim2.new(0, 0, 0.666666687, 0)
  3393. Frame112.BorderSizePixel = 0
  3394. Frame113.Name = "property"
  3395. Frame113.Parent = Frame89
  3396. Frame113.Size = UDim2.new(1, 0, 0, 22)
  3397. Frame113.Position = UDim2.new(0, 0, 0, 1)
  3398. Frame113.Visible = false
  3399. Frame113.BackgroundColor3 = Color3.new(0.866667, 0.866667, 0.870588)
  3400. Frame113.BorderColor3 = Color3.new(0.686275, 0.686275, 0.686275)
  3401. Frame114.Name = "name"
  3402. Frame114.Parent = Frame113
  3403. Frame114.Transparency = 1
  3404. Frame114.Size = UDim2.new(0.5, 0, 1, -1)
  3405. Frame114.BackgroundColor3 = Color3.new(0.992157, 0.984314, 1)
  3406. Frame114.BackgroundTransparency = 1
  3407. TextLabel115.Name = "unlocked"
  3408. TextLabel115.Parent = Frame114
  3409. TextLabel115.Transparency = 1
  3410. TextLabel115.Size = UDim2.new(1, -10, 1, 0)
  3411. TextLabel115.Text = ""
  3412. TextLabel115.Position = UDim2.new(0, 5, 0, 0)
  3413. TextLabel115.Visible = false
  3414. TextLabel115.BackgroundTransparency = 1
  3415. TextLabel115.Font = Enum.Font.SourceSans
  3416. TextLabel115.FontSize = Enum.FontSize.Size14
  3417. TextLabel115.TextColor3 = Color3.new(0.0980392, 0.0980392, 0.0980392)
  3418. TextLabel115.TextWrapped = true
  3419. TextLabel115.TextXAlignment = Enum.TextXAlignment.Left
  3420. TextLabel116.Name = "locked"
  3421. TextLabel116.Parent = Frame114
  3422. TextLabel116.Transparency = 1
  3423. TextLabel116.Size = UDim2.new(1, -10, 1, 0)
  3424. TextLabel116.Text = ""
  3425. TextLabel116.Position = UDim2.new(0, 5, 0, 0)
  3426. TextLabel116.Visible = false
  3427. TextLabel116.BackgroundTransparency = 1
  3428. TextLabel116.Font = Enum.Font.SourceSans
  3429. TextLabel116.FontSize = Enum.FontSize.Size14
  3430. TextLabel116.TextColor3 = Color3.new(0.580392, 0.580392, 0.580392)
  3431. TextLabel116.TextWrapped = true
  3432. TextLabel116.TextXAlignment = Enum.TextXAlignment.Left
  3433. Frame117.Name = "border"
  3434. Frame117.Parent = Frame113
  3435. Frame117.Size = UDim2.new(0, 1, 1, 0)
  3436. Frame117.Position = UDim2.new(0.5, 0, 0, 0)
  3437. Frame117.BackgroundColor3 = Color3.new(0.686275, 0.686275, 0.686275)
  3438. Frame117.BorderColor3 = Color3.new(0.686275, 0.686275, 0.686275)
  3439. Frame117.BorderSizePixel = 0
  3440. Frame118.Name = "edit"
  3441. Frame118.Parent = Frame113
  3442. Frame118.Transparency = 1
  3443. Frame118.Size = UDim2.new(0.5, 0, 1, -1)
  3444. Frame118.Position = UDim2.new(0.5, 0, 0, 0)
  3445. Frame118.BackgroundColor3 = Color3.new(0.992157, 0.984314, 1)
  3446. Frame118.BackgroundTransparency = 1
  3447. TextLabel119.Name = "locked"
  3448. TextLabel119.Parent = Frame118
  3449. TextLabel119.Transparency = 1
  3450. TextLabel119.Size = UDim2.new(1, -10, 1, 0)
  3451. TextLabel119.Text = ""
  3452. TextLabel119.Position = UDim2.new(0, 5, 0, 0)
  3453. TextLabel119.Visible = false
  3454. TextLabel119.BackgroundTransparency = 1
  3455. TextLabel119.Font = Enum.Font.SourceSans
  3456. TextLabel119.FontSize = Enum.FontSize.Size14
  3457. TextLabel119.TextColor3 = Color3.new(0.580392, 0.580392, 0.580392)
  3458. TextLabel119.TextWrapped = true
  3459. TextLabel119.TextXAlignment = Enum.TextXAlignment.Left
  3460. TextBox120.Name = "box"
  3461. TextBox120.Parent = Frame118
  3462. TextBox120.Transparency = 1
  3463. TextBox120.Size = UDim2.new(1, -10, 1, 0)
  3464. TextBox120.Text = ""
  3465. TextBox120.Position = UDim2.new(0, 5, 0, 0)
  3466. TextBox120.Visible = false
  3467. TextBox120.BackgroundTransparency = 1
  3468. TextBox120.Font = Enum.Font.SourceSans
  3469. TextBox120.FontSize = Enum.FontSize.Size14
  3470. TextBox120.TextColor3 = Color3.new(0.0980392, 0.0980392, 0.0980392)
  3471. TextBox120.TextWrapped = true
  3472. TextBox120.TextXAlignment = Enum.TextXAlignment.Left
  3473. ImageButton121.Name = "check"
  3474. ImageButton121.Parent = Frame118
  3475. ImageButton121.Size = UDim2.new(0, 12, 0, 12)
  3476. ImageButton121.Position = UDim2.new(0, 5, 0, 5)
  3477. ImageButton121.Visible = false
  3478. ImageButton121.BorderSizePixel = 0
  3479. LocalScript122.Name = "Output"
  3480. LocalScript122.Parent = Frame89
  3481. table.insert(cors,sandbox(LocalScript122,function()
  3482. game:GetService"LogService".MessageOut:connect(function(message,messageType)
  3483. script:WaitForChild("PushOutput"):Invoke(message,messageType)
  3484. end)
  3485.  
  3486. if game.PlaceId > 0 then
  3487. script.Output.Disabled = false
  3488. end
  3489.  
  3490. local Explorer = script.Parent.Parent:WaitForChild("ExplorerPanel")
  3491. Explorer:WaitForChild("List")
  3492. Explorer:WaitForChild("SelectionChanged")
  3493. local Output = script.Parent.Parent:WaitForChild("OutputPanel")
  3494. _G.___outputgui = Output
  3495. local Command = script.Parent
  3496. local Properties = script.Parent.Parent:WaitForChild("CommandPanel")
  3497. local Studio = script.Parent.Parent
  3498.  
  3499. script:WaitForChild("PushOutput").OnInvoke = function(message,messageType)
  3500. if not _G.___outputgui then return end
  3501. local l = Instance.new("TextLabel")
  3502. l.Size = UDim2.new(1,0,0,15)
  3503. l.BackgroundTransparency = 1
  3504. l.TextColor3 = Color3.new(0,0,0)
  3505. l.Text = message
  3506. l.Position = UDim2.new(0,0,1,-15)
  3507. if messageType == Enum.MessageType.MessageError then
  3508. l.TextColor3 = Color3.new(1, 0, 0)
  3509. elseif messageType == Enum.MessageType.MessageInfo then
  3510. l.TextColor3 = Color3.new(0.4, 0.5, 1)
  3511. elseif messageType == Enum.MessageType.MessageWarning then
  3512. l.TextColor3 = Color3.new(1, 0.6, 0.4)
  3513. end
  3514. l.TextScaled = true
  3515. for _,v in pairs(_G.___outputgui.List:GetChildren())do
  3516. v.Position = v.Position - UDim2.new(0,0,0,16)
  3517. end
  3518. l.Parent = _G.___outputgui.List
  3519. end
  3520.  
  3521.  
  3522. end))
  3523. Script123.Name = "Output"
  3524. Script123.Parent = LocalScript122
  3525. Script123.Disabled = true
  3526. table.insert(cors,sandbox(Script123,function()
  3527. game:GetService"LogService".MessageOut:connect(function(message,messageType)
  3528. script.Parent:WaitForChild("PushOutput"):Invoke(message,messageType)
  3529. end)
  3530. end))
  3531. BindableFunction124.Name = "PushOutput"
  3532. BindableFunction124.Parent = LocalScript122
  3533. for i,v in pairs(mas:GetChildren()) do
  3534. v.Parent = game:GetService("Players").LocalPlayer.PlayerGui
  3535. pcall(function() v:MakeJoints() end)
  3536. end
  3537. mas:Destroy()
  3538. for i,v in pairs(cors) do
  3539. spawn(function()
  3540. pcall(v)
  3541. end)
  3542. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement