Advertisement
okban

test

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