memberhero

Dex

May 25th, 2018
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 283.69 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. ScreenGui0 = Instance.new("ScreenGui")
  20. Frame1 = Instance.new("Frame")
  21. LocalScript2 = Instance.new("LocalScript")
  22. ModuleScript3 = Instance.new("ModuleScript")
  23. Frame4 = Instance.new("Frame")
  24. TextLabel5 = Instance.new("TextLabel")
  25. TextBox6 = Instance.new("TextBox")
  26. BindableFunction7 = Instance.new("BindableFunction")
  27. BindableFunction8 = Instance.new("BindableFunction")
  28. BindableEvent9 = Instance.new("BindableEvent")
  29. Frame10 = Instance.new("Frame")
  30. BindableEvent11 = Instance.new("BindableEvent")
  31. BindableFunction12 = Instance.new("BindableFunction")
  32. BindableFunction13 = Instance.new("BindableFunction")
  33. BindableFunction14 = Instance.new("BindableFunction")
  34. BindableFunction15 = Instance.new("BindableFunction")
  35. LocalScript16 = Instance.new("LocalScript")
  36. BindableFunction17 = Instance.new("BindableFunction")
  37. LocalScript18 = Instance.new("LocalScript")
  38. Frame19 = Instance.new("Frame")
  39. TextButton20 = Instance.new("TextButton")
  40. TextLabel21 = Instance.new("TextLabel")
  41. TextLabel22 = Instance.new("TextLabel")
  42. ImageLabel23 = Instance.new("ImageLabel")
  43. Frame24 = Instance.new("Frame")
  44. Frame25 = Instance.new("Frame")
  45. Frame26 = Instance.new("Frame")
  46. TextButton27 = Instance.new("TextButton")
  47. ImageLabel28 = Instance.new("ImageLabel")
  48. TextButton29 = Instance.new("TextButton")
  49. ImageLabel30 = Instance.new("ImageLabel")
  50. TextButton31 = Instance.new("TextButton")
  51. ImageLabel32 = Instance.new("ImageLabel")
  52. TextButton33 = Instance.new("TextButton")
  53. ImageLabel34 = Instance.new("ImageLabel")
  54. TextButton35 = Instance.new("TextButton")
  55. ImageLabel36 = Instance.new("ImageLabel")
  56. Frame37 = Instance.new("Frame")
  57. Frame38 = Instance.new("Frame")
  58. TextLabel39 = Instance.new("TextLabel")
  59. BindableFunction40 = Instance.new("BindableFunction")
  60. Frame41 = Instance.new("Frame")
  61. TextLabel42 = Instance.new("TextLabel")
  62. TextLabel43 = Instance.new("TextLabel")
  63. TextButton44 = Instance.new("TextButton")
  64. TextLabel45 = Instance.new("TextLabel")
  65. TextLabel46 = Instance.new("TextLabel")
  66. Frame47 = Instance.new("Frame")
  67. Frame48 = Instance.new("Frame")
  68. TextLabel49 = Instance.new("TextLabel")
  69. Frame50 = Instance.new("Frame")
  70. TextButton51 = Instance.new("TextButton")
  71. TextLabel52 = Instance.new("TextLabel")
  72. TextButton53 = Instance.new("TextButton")
  73. TextBox54 = Instance.new("TextBox")
  74. TextButton55 = Instance.new("TextButton")
  75. TextLabel56 = Instance.new("TextLabel")
  76. TextLabel57 = Instance.new("TextLabel")
  77. Frame58 = Instance.new("Frame")
  78. TextLabel59 = Instance.new("TextLabel")
  79. Frame60 = Instance.new("Frame")
  80. TextButton61 = Instance.new("TextButton")
  81. TextLabel62 = Instance.new("TextLabel")
  82. TextButton63 = Instance.new("TextButton")
  83. Frame64 = Instance.new("Frame")
  84. TextLabel65 = Instance.new("TextLabel")
  85. Frame66 = Instance.new("Frame")
  86. TextLabel67 = Instance.new("TextLabel")
  87. TextButton68 = Instance.new("TextButton")
  88. Frame69 = Instance.new("Frame")
  89. TextLabel70 = Instance.new("TextLabel")
  90. Frame71 = Instance.new("Frame")
  91. TextLabel72 = Instance.new("TextLabel")
  92. ScrollingFrame73 = Instance.new("ScrollingFrame")
  93. TextButton74 = Instance.new("TextButton")
  94. TextLabel75 = Instance.new("TextLabel")
  95. TextLabel76 = Instance.new("TextLabel")
  96. TextButton77 = Instance.new("TextButton")
  97. TextButton78 = Instance.new("TextButton")
  98. Frame79 = Instance.new("Frame")
  99. TextButton80 = Instance.new("TextButton")
  100. TextBox81 = Instance.new("TextBox")
  101. TextButton82 = Instance.new("TextButton")
  102. TextButton83 = Instance.new("TextButton")
  103. Frame84 = Instance.new("Frame")
  104. Frame85 = Instance.new("Frame")
  105. TextButton86 = Instance.new("TextButton")
  106. ScrollingFrame87 = Instance.new("ScrollingFrame")
  107. Frame88 = Instance.new("Frame")
  108. TextLabel89 = Instance.new("TextLabel")
  109. TextLabel90 = Instance.new("TextLabel")
  110. TextLabel91 = Instance.new("TextLabel")
  111. Frame92 = Instance.new("Frame")
  112. TextLabel93 = Instance.new("TextLabel")
  113. Frame94 = Instance.new("Frame")
  114. Frame95 = Instance.new("Frame")
  115. Frame96 = Instance.new("Frame")
  116. ImageButton97 = Instance.new("ImageButton")
  117. Frame98 = Instance.new("Frame")
  118. Frame99 = Instance.new("Frame")
  119. Frame100 = Instance.new("Frame")
  120. Frame101 = Instance.new("Frame")
  121. Frame102 = Instance.new("Frame")
  122. ImageButton103 = Instance.new("ImageButton")
  123. Frame104 = Instance.new("Frame")
  124. Frame105 = Instance.new("Frame")
  125. Frame106 = Instance.new("Frame")
  126. Frame107 = Instance.new("Frame")
  127. Frame108 = Instance.new("Frame")
  128. TextButton109 = Instance.new("TextButton")
  129. Frame110 = Instance.new("Frame")
  130. Frame111 = Instance.new("Frame")
  131. TextButton112 = Instance.new("TextButton")
  132. TextButton113 = Instance.new("TextButton")
  133. BindableEvent114 = Instance.new("BindableEvent")
  134. LocalScript115 = Instance.new("LocalScript")
  135. TextButton116 = Instance.new("TextButton")
  136. Frame117 = Instance.new("Frame")
  137. Frame118 = Instance.new("Frame")
  138. ImageLabel119 = Instance.new("ImageLabel")
  139. Frame120 = Instance.new("Frame")
  140. ImageLabel121 = Instance.new("ImageLabel")
  141. TextLabel122 = Instance.new("TextLabel")
  142. TextLabel123 = Instance.new("TextLabel")
  143. TextLabel124 = Instance.new("TextLabel")
  144. Frame125 = Instance.new("Frame")
  145. Frame126 = Instance.new("Frame")
  146. TextLabel127 = Instance.new("TextLabel")
  147. Frame128 = Instance.new("Frame")
  148. Frame129 = Instance.new("Frame")
  149. TextLabel130 = Instance.new("TextLabel")
  150. TextLabel131 = Instance.new("TextLabel")
  151. TextButton132 = Instance.new("TextButton")
  152. TextLabel133 = Instance.new("TextLabel")
  153. TextLabel134 = Instance.new("TextLabel")
  154. Frame135 = Instance.new("Frame")
  155. TextLabel136 = Instance.new("TextLabel")
  156. TextLabel137 = Instance.new("TextLabel")
  157. TextButton138 = Instance.new("TextButton")
  158. TextLabel139 = Instance.new("TextLabel")
  159. TextLabel140 = Instance.new("TextLabel")
  160. Frame141 = Instance.new("Frame")
  161. TextLabel142 = Instance.new("TextLabel")
  162. TextLabel143 = Instance.new("TextLabel")
  163. TextButton144 = Instance.new("TextButton")
  164. TextLabel145 = Instance.new("TextLabel")
  165. TextLabel146 = Instance.new("TextLabel")
  166. Frame147 = Instance.new("Frame")
  167. TextLabel148 = Instance.new("TextLabel")
  168. TextLabel149 = Instance.new("TextLabel")
  169. TextButton150 = Instance.new("TextButton")
  170. TextLabel151 = Instance.new("TextLabel")
  171. TextLabel152 = Instance.new("TextLabel")
  172. TextLabel153 = Instance.new("TextLabel")
  173. Frame154 = Instance.new("Frame")
  174. Frame155 = Instance.new("Frame")
  175. TextLabel156 = Instance.new("TextLabel")
  176. TextButton157 = Instance.new("TextButton")
  177. TextBox158 = Instance.new("TextBox")
  178. Frame159 = Instance.new("Frame")
  179. TextButton160 = Instance.new("TextButton")
  180. TextLabel161 = Instance.new("TextLabel")
  181. TextLabel162 = Instance.new("TextLabel")
  182. Frame163 = Instance.new("Frame")
  183. Frame164 = Instance.new("Frame")
  184. TextLabel165 = Instance.new("TextLabel")
  185. BindableFunction166 = Instance.new("BindableFunction")
  186. TextLabel167 = Instance.new("TextLabel")
  187. Frame168 = Instance.new("Frame")
  188. ImageLabel169 = Instance.new("ImageLabel")
  189. TextLabel170 = Instance.new("TextLabel")
  190. TextLabel171 = Instance.new("TextLabel")
  191. TextLabel172 = Instance.new("TextLabel")
  192. ImageButton173 = Instance.new("ImageButton")
  193. TextLabel174 = Instance.new("TextLabel")
  194. ScreenGui0.Name = "Dex"
  195. ScreenGui0.Parent = mas
  196. Frame1.Name = "PropertiesFrame"
  197. Frame1.Parent = ScreenGui0
  198. Frame1.Position = UDim2.new(1, 0, 0.5, 36)
  199. Frame1.Transparency = 0.10000000149012
  200. Frame1.Size = UDim2.new(0, 300, 0.5, -36)
  201. Frame1.Active = true
  202. Frame1.BackgroundColor = BrickColor.new("Institutional white")
  203. Frame1.BackgroundColor3 = Color3.new(1, 1, 1)
  204. Frame1.BackgroundTransparency = 0.10000000149012
  205. Frame1.BorderColor = BrickColor.new("Sand violet metallic")
  206. Frame1.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  207. Frame1.BorderSizePixel = 0
  208. LocalScript2.Name = "Properties"
  209. LocalScript2.Parent = Frame1
  210. table.insert(cors,sandbox(LocalScript2,function()
  211. --[[
  212.  
  213. Change log:
  214.  
  215. 09/18
  216. Fixed checkbox mouseover sprite
  217. Encapsulated checkbox creation into separate method
  218. Fixed another checkbox issue
  219.  
  220. 09/15
  221. Invalid input is ignored instead of setting to default of that data type
  222. Consolidated control methods and simplified them
  223. All input goes through ToValue method
  224. Fixed position of BrickColor palette
  225. Made DropDown appear above row if it would otherwise exceed the page height
  226. Cleaned up stylesheets
  227.  
  228. 09/14
  229. Made properties window scroll when mouse wheel scrolled
  230. Object/Instance and Color3 data types handled properly
  231. Multiple BrickColor controls interfering with each other fixed
  232. Added support for Content data type
  233.  
  234. --]]
  235.  
  236. wait(0.2)
  237.  
  238. local Gui = script.Parent.Parent
  239. local PropertiesFrame = Gui:WaitForChild("PropertiesFrame")
  240. local ExplorerFrame = Gui:WaitForChild("ExplorerPanel")
  241. print = ExplorerFrame:WaitForChild("GetPrint"):Invoke()
  242.  
  243.  
  244. -- Services
  245. local Teams = game:GetService("Teams")
  246. local Workspace = game:GetService("Workspace")
  247. local Debris = game:GetService("Debris")
  248. local ContentProvider = game:GetService("ContentProvider")
  249. local Players = game:GetService("Players")
  250. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  251.  
  252. -- Functions
  253. function httpGet(url)
  254. return game:HttpGet(url,true)
  255. end
  256.  
  257. -- RbxApi Stuff
  258.  
  259. local apiUrl = "http://anaminus.github.io/rbx/json/api/latest.json"
  260. local maxChunkSize = 100 * 1000
  261. local ApiJson
  262. if script:FindFirstChild("RawApiJson") then
  263. ApiJson = script.RawApiJson
  264. else
  265. ApiJson = ""
  266. end
  267.  
  268. function getLocalApiJson()
  269. print(ApiJson)
  270. local usels = false
  271. local s = pcall(function() if ApiJson.Source ~= "" then usels = true end end)
  272. if usels then
  273. return loadstring(ApiJson.Source)()()
  274. else
  275. return require(ApiJson)()
  276. end
  277. end
  278.  
  279. function getCurrentApiJson()
  280. local jsonStr = nil
  281. if readfile and getelysianpath then
  282. if readfile(getelysianpath().."Xpl0rerApi.txt") then
  283. print("Api found in folder!")
  284. jsonStr = readfile(getelysianpath().."Xpl0rerApi.txt")
  285. return jsonStr
  286. end
  287. end
  288. local success
  289. if not SetGlobal then
  290. success = pcall(function()
  291. jsonStr = httpGet(apiUrl)
  292. print("Fetched json successfully")
  293. end)
  294. end
  295. if success then
  296. print("Returning json")
  297. --print(jsonStr:sub(1,500))
  298. return jsonStr
  299. else
  300. print("Error fetching json: " .. tostring(err))
  301. print("Falling back to local copy")
  302. return getLocalApiJson()
  303. end
  304. end
  305.  
  306. function splitStringIntoChunks(jsonStr)
  307. -- Splits up a string into a table with a given size
  308. local t = {}
  309. for i = 1, math.ceil(string.len(jsonStr)/maxChunkSize) do
  310. local str = jsonStr:sub((i-1)*maxChunkSize+1, i*maxChunkSize)
  311. table.insert(t, str)
  312. end
  313. return t
  314. end
  315.  
  316. local jsonToParse = getCurrentApiJson()
  317. local apiChunks = splitStringIntoChunks(jsonToParse)
  318.  
  319. function getRbxApi()
  320. --[[
  321. Api.Classes
  322. Api.Enums
  323. Api.GetProperties(className)
  324. Api.IsEnum(valueType)
  325. --]]
  326.  
  327. -- Services
  328. local HttpService = game:GetService("HttpService")
  329. local ServerStorage = game:GetService("ServerStorage")
  330. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  331.  
  332. -- Remotes
  333. --local Remotes = ReplicatedStorage:WaitForChild("OnlineStudio"):WaitForChild("Remotes")
  334. --local GetApiJsonFunction = Remotes:WaitForChild("GetApiJson")
  335.  
  336. -- Functions
  337. local JsonDecode = function(s) return HttpService:JSONDecode(s) end
  338.  
  339. local function GetApiRemoteFunction(index)
  340. if (apiChunks[index]) then
  341. return apiChunks[index], #apiChunks
  342. else
  343. print("Bad index for GetApiJson")
  344. return nil
  345. end
  346. end
  347.  
  348. local function getApiJson()
  349. local apiTable = {}
  350. local firstPage, pageCount = GetApiRemoteFunction(1)
  351. table.insert(apiTable, firstPage)
  352. for i = 2, pageCount do
  353. --print("Fetching API page # " .. tostring(i))
  354. local result = GetApiRemoteFunction(i)
  355. table.insert(apiTable, result)
  356. end
  357. return table.concat(apiTable)
  358. end
  359.  
  360. local json = getApiJson()
  361. local apiDump = JsonDecode(json)
  362.  
  363. local Classes = {}
  364. local Enums = {}
  365.  
  366. local function sortAlphabetic(t, property)
  367. table.sort(t,
  368. function(x,y) return x[property] < y[property]
  369. end)
  370. end
  371.  
  372. local function isEnum(name)
  373. return Enums[name] ~= nil
  374. end
  375.  
  376. local function getProperties(className)
  377. local class = Classes[className]
  378. local properties = {}
  379.  
  380. if not class then return properties end
  381.  
  382. while class do
  383. for _,property in pairs(class.Properties) do
  384. table.insert(properties, property)
  385. end
  386. class = Classes[class.Superclass]
  387. end
  388.  
  389. sortAlphabetic(properties, "Name")
  390.  
  391. return properties
  392. end
  393.  
  394. for _,item in pairs(apiDump) do
  395. local itemType = item.type
  396. -- Classes --
  397. if (itemType == 'Class') then
  398. Classes[item.Name] = item
  399. item.Properties = {}
  400. item.Functions = {}
  401. item.YieldFunctions = {}
  402. item.Events = {}
  403. item.Callbacks = {}
  404. -- Members --
  405. elseif (itemType == 'Property') then
  406. table.insert(Classes[item.Class].Properties, item)
  407. elseif (itemType == 'Function') then
  408. table.insert(Classes[item.Class].Functions, item)
  409. elseif (itemType == 'YieldFunction') then
  410. table.insert(Classes[item.Class].YieldFunctions, item)
  411. elseif (itemType == 'Event') then
  412. table.insert(Classes[item.Class].Events, item)
  413. elseif (itemType == 'Callback') then
  414. table.insert(Classes[item.Class].Callbacks, item)
  415. -- Enums --
  416. elseif (itemType == 'Enum') then
  417. Enums[item.Name] = item
  418. item.EnumItems = {}
  419. elseif (itemType == 'EnumItem') then
  420. Enums[item.Enum].EnumItems[item.Name] = item
  421. end
  422. end
  423.  
  424. return {
  425. Classes = Classes;
  426. Enums = Enums;
  427. GetProperties = getProperties;
  428. IsEnum = isEnum;
  429. }
  430. end
  431.  
  432. -- Modules
  433. local Permissions = {CanEdit = true}
  434. local RbxApi = getRbxApi()
  435.  
  436. --[[
  437. RbxApi.Classes
  438. RbxApi.Enums
  439. RbxApi.GetProperties(className)
  440. RbxApi.IsEnum(valueType)
  441. --]]
  442.  
  443. -- Styles
  444.  
  445. local function CreateColor3(r, g, b) return Color3.new(r/255,g/255,b/255) end
  446.  
  447. local Styles = {
  448. Font = Enum.Font.Arial;
  449. Margin = 5;
  450. Black = CreateColor3(0,0,0);
  451. White = CreateColor3(255,255,255);
  452. }
  453.  
  454. local Row = {
  455. Font = Styles.Font;
  456. FontSize = Enum.FontSize.Size14;
  457. TextXAlignment = Enum.TextXAlignment.Left;
  458. TextColor = Styles.Black;
  459. TextColorOver = Styles.White;
  460. TextLockedColor = CreateColor3(120,120,120);
  461. Height = 24;
  462. BorderColor = CreateColor3(216,216,216);
  463. BackgroundColor = Styles.White;
  464. BackgroundColorAlternate = CreateColor3(246,246,246);
  465. BackgroundColorMouseover = CreateColor3(211,224,244);
  466. TitleMarginLeft = 15;
  467. }
  468.  
  469. local DropDown = {
  470. Font = Styles.Font;
  471. FontSize = Enum.FontSize.Size14;
  472. TextColor = CreateColor3(0,0,0);
  473. TextColorOver = Styles.White;
  474. TextXAlignment = Enum.TextXAlignment.Left;
  475. Height = 16;
  476. BackColor = Styles.White;
  477. BackColorOver = CreateColor3(86,125,188);
  478. BorderColor = CreateColor3(216,216,216);
  479. BorderSizePixel = 2;
  480. ArrowColor = CreateColor3(160,160,160);
  481. ArrowColorOver = Styles.Black;
  482. }
  483.  
  484. local BrickColors = {
  485. BoxSize = 13;
  486. BorderSizePixel = 1;
  487. BorderColor = CreateColor3(160,160,160);
  488. FrameColor = CreateColor3(160,160,160);
  489. Size = 20;
  490. Padding = 4;
  491. ColorsPerRow = 8;
  492. OuterBorder = 1;
  493. OuterBorderColor = Styles.Black;
  494. }
  495.  
  496. wait(1)
  497.  
  498. local bindGetSelection = ExplorerFrame.GetSelection
  499. local bindSelectionChanged = ExplorerFrame.SelectionChanged
  500. local bindGetApi = PropertiesFrame.GetApi
  501. local bindGetAwait = PropertiesFrame.GetAwaiting
  502. local bindSetAwait = PropertiesFrame.SetAwaiting
  503.  
  504. local ContentUrl = ContentProvider.BaseUrl .. "asset/?id="
  505.  
  506. local SettingsRemote = Gui:WaitForChild("SettingsPanel"):WaitForChild("GetSetting")
  507.  
  508. local propertiesSearch = PropertiesFrame.Header.TextBox
  509.  
  510. local AwaitingObjectValue = false
  511. local AwaitingObjectObj
  512. local AwaitingObjectProp
  513.  
  514. function searchingProperties()
  515. if propertiesSearch.Text ~= "" and propertiesSearch.Text ~= "Search Properties" then
  516. return true
  517. end
  518. return false
  519. end
  520.  
  521. local function GetSelection()
  522. local selection = bindGetSelection:Invoke()
  523. if #selection == 0 then
  524. return nil
  525. else
  526. return selection
  527. end
  528. end
  529.  
  530. -- Number
  531.  
  532. local function Round(number, decimalPlaces)
  533. return tonumber(string.format("%." .. (decimalPlaces or 0) .. "f", number))
  534. end
  535.  
  536. -- Strings
  537.  
  538. local function Split(str, delimiter)
  539. local start = 1
  540. local t = {}
  541. while true do
  542. local pos = string.find (str, delimiter, start, true)
  543. if not pos then
  544. break
  545. end
  546. table.insert (t, string.sub (str, start, pos - 1))
  547. start = pos + string.len (delimiter)
  548. end
  549. table.insert (t, string.sub (str, start))
  550. return t
  551. end
  552.  
  553. -- Data Type Handling
  554.  
  555. local function ToString(value, type)
  556. if type == "float" then
  557. return tostring(Round(value,2))
  558. elseif type == "Content" then
  559. if string.find(value,"/asset") then
  560. local match = string.find(value, "=") + 1
  561. local id = string.sub(value, match)
  562. return id
  563. else
  564. return tostring(value)
  565. end
  566. elseif type == "Vector2" then
  567. local x = value.x
  568. local y = value.y
  569. return string.format("%g, %g", x,y)
  570. elseif type == "Vector3" then
  571. local x = value.x
  572. local y = value.y
  573. local z = value.z
  574. return string.format("%g, %g, %g", x,y,z)
  575. elseif type == "Color3" then
  576. local r = value.r
  577. local g = value.g
  578. local b = value.b
  579. return string.format("%d, %d, %d", r*255,g*255,b*255)
  580. elseif type == "UDim2" then
  581. local xScale = value.X.Scale
  582. local xOffset = value.X.Offset
  583. local yScale = value.Y.Scale
  584. local yOffset = value.Y.Offset
  585. return string.format("{%d, %d}, {%d, %d}", xScale, xOffset, yScale, yOffset)
  586. else
  587. return tostring(value)
  588. end
  589. end
  590.  
  591. local function ToValue(value,type)
  592. if type == "Vector2" then
  593. local list = Split(value,",")
  594. if #list < 2 then return nil end
  595. local x = tonumber(list[1]) or 0
  596. local y = tonumber(list[2]) or 0
  597. return Vector2.new(x,y)
  598. elseif type == "Vector3" then
  599. local list = Split(value,",")
  600. if #list < 3 then return nil end
  601. local x = tonumber(list[1]) or 0
  602. local y = tonumber(list[2]) or 0
  603. local z = tonumber(list[3]) or 0
  604. return Vector3.new(x,y,z)
  605. elseif type == "Color3" then
  606. local list = Split(value,",")
  607. if #list < 3 then return nil end
  608. local r = tonumber(list[1]) or 0
  609. local g = tonumber(list[2]) or 0
  610. local b = tonumber(list[3]) or 0
  611. return Color3.new(r/255,g/255, b/255)
  612. elseif type == "UDim2" then
  613. local list = Split(string.gsub(string.gsub(value, "{", ""),"}",""),",")
  614. if #list < 4 then return nil end
  615. local xScale = tonumber(list[1]) or 0
  616. local xOffset = tonumber(list[2]) or 0
  617. local yScale = tonumber(list[3]) or 0
  618. local yOffset = tonumber(list[4]) or 0
  619. return UDim2.new(xScale, xOffset, yScale, yOffset)
  620. elseif type == "Content" then
  621. if tonumber(value) ~= nil then
  622. value = ContentUrl .. value
  623. end
  624. return value
  625. elseif type == "float" or type == "int" or type == "double" then
  626. return tonumber(value)
  627. elseif type == "string" then
  628. return value
  629. elseif type == "NumberRange" then
  630. local list = Split(value,",")
  631. if #list == 1 then
  632. if tonumber(list[1]) == nil then return nil end
  633. local newVal = tonumber(list[1]) or 0
  634. return NumberRange.new(newVal)
  635. end
  636. if #list < 2 then return nil end
  637. local x = tonumber(list[1]) or 0
  638. local y = tonumber(list[2]) or 0
  639. return NumberRange.new(x,y)
  640. else
  641. return nil
  642. end
  643. end
  644.  
  645.  
  646. -- Tables
  647.  
  648. local function CopyTable(T)
  649. local t2 = {}
  650. for k,v in pairs(T) do
  651. t2[k] = v
  652. end
  653. return t2
  654. end
  655.  
  656. local function SortTable(T)
  657. table.sort(T,
  658. function(x,y) return x.Name < y.Name
  659. end)
  660. end
  661.  
  662. -- Spritesheet
  663. local Sprite = {
  664. Width = 13;
  665. Height = 13;
  666. }
  667.  
  668. local Spritesheet = {
  669. Image = "http://www.roblox.com/asset/?id=128896947";
  670. Height = 256;
  671. Width = 256;
  672. }
  673.  
  674. local Images = {
  675. "unchecked",
  676. "checked",
  677. "unchecked_over",
  678. "checked_over",
  679. "unchecked_disabled",
  680. "checked_disabled"
  681. }
  682.  
  683. local function SpritePosition(spriteName)
  684. local x = 0
  685. local y = 0
  686. for i,v in pairs(Images) do
  687. if (v == spriteName) then
  688. return {x, y}
  689. end
  690. x = x + Sprite.Height
  691. if (x + Sprite.Width) > Spritesheet.Width then
  692. x = 0
  693. y = y + Sprite.Height
  694. end
  695. end
  696. end
  697.  
  698. local function GetCheckboxImageName(checked, readOnly, mouseover)
  699. if checked then
  700. if readOnly then
  701. return "checked_disabled"
  702. elseif mouseover then
  703. return "checked_over"
  704. else
  705. return "checked"
  706. end
  707. else
  708. if readOnly then
  709. return "unchecked_disabled"
  710. elseif mouseover then
  711. return "unchecked_over"
  712. else
  713. return "unchecked"
  714. end
  715. end
  716. end
  717.  
  718. local MAP_ID = 418720155
  719.  
  720. -- Gui Controls --
  721.  
  722. ---- IconMap ----
  723. -- Image size: 256px x 256px
  724. -- Icon size: 16px x 16px
  725. -- Padding between each icon: 2px
  726. -- Padding around image edge: 1px
  727. -- Total icons: 14 x 14 (196)
  728. local Icon do
  729. local iconMap = 'http://www.roblox.com/asset/?id=' .. MAP_ID
  730. game:GetService('ContentProvider'):Preload(iconMap)
  731. local iconDehash do
  732. -- 14 x 14, 0-based input, 0-based output
  733. local f=math.floor
  734. function iconDehash(h)
  735. return f(h/14%14),f(h%14)
  736. end
  737. end
  738.  
  739. function Icon(IconFrame,index)
  740. local row,col = iconDehash(index)
  741. local mapSize = Vector2.new(256,256)
  742. local pad,border = 2,1
  743. local iconSize = 16
  744.  
  745. local class = 'Frame'
  746. if type(IconFrame) == 'string' then
  747. class = IconFrame
  748. IconFrame = nil
  749. end
  750.  
  751. if not IconFrame then
  752. IconFrame = Create(class,{
  753. Name = "Icon";
  754. BackgroundTransparency = 1;
  755. ClipsDescendants = true;
  756. Create('ImageLabel',{
  757. Name = "IconMap";
  758. Active = false;
  759. BackgroundTransparency = 1;
  760. Image = iconMap;
  761. Size = UDim2.new(mapSize.x/iconSize,0,mapSize.y/iconSize,0);
  762. });
  763. })
  764. end
  765.  
  766. IconFrame.IconMap.Position = UDim2.new(-col - (pad*(col+1) + border)/iconSize,0,-row - (pad*(row+1) + border)/iconSize,0)
  767. return IconFrame
  768. end
  769. end
  770.  
  771. local function CreateCell()
  772. local tableCell = Instance.new("Frame")
  773. tableCell.Size = UDim2.new(0.5, -1, 1, 0)
  774. tableCell.BackgroundColor3 = Row.BackgroundColor
  775. tableCell.BorderColor3 = Row.BorderColor
  776. return tableCell
  777. end
  778.  
  779. local function CreateLabel(readOnly)
  780. local label = Instance.new("TextLabel")
  781. label.Font = Row.Font
  782. label.FontSize = Row.FontSize
  783. label.TextXAlignment = Row.TextXAlignment
  784. label.BackgroundTransparency = 1
  785.  
  786. if readOnly then
  787. label.TextColor3 = Row.TextLockedColor
  788. else
  789. label.TextColor3 = Row.TextColor
  790. end
  791. return label
  792. end
  793.  
  794. local function CreateTextButton(readOnly, onClick)
  795. local button = Instance.new("TextButton")
  796. button.Font = Row.Font
  797. button.FontSize = Row.FontSize
  798. button.TextXAlignment = Row.TextXAlignment
  799. button.BackgroundTransparency = 1
  800. if readOnly then
  801. button.TextColor3 = Row.TextLockedColor
  802. else
  803. button.TextColor3 = Row.TextColor
  804. button.MouseButton1Click:connect(function()
  805. onClick()
  806. end)
  807. end
  808. return button
  809. end
  810.  
  811. local function CreateObject(readOnly)
  812. local button = Instance.new("TextButton")
  813. button.Font = Row.Font
  814. button.FontSize = Row.FontSize
  815. button.TextXAlignment = Row.TextXAlignment
  816. button.BackgroundTransparency = 1
  817. if readOnly then
  818. button.TextColor3 = Row.TextLockedColor
  819. else
  820. button.TextColor3 = Row.TextColor
  821. end
  822. local cancel = Create(Icon('ImageButton',177),{
  823. Name = "Cancel";
  824. Visible = false;
  825. Position = UDim2.new(1,-20,0,0);
  826. Size = UDim2.new(0,20,0,20);
  827. Parent = button;
  828. })
  829. return button
  830. end
  831.  
  832. local function CreateTextBox(readOnly)
  833. if readOnly then
  834. local box = CreateLabel(readOnly)
  835. return box
  836. else
  837. local box = Instance.new("TextBox")
  838. if not SettingsRemote:Invoke("ClearProps") then
  839. box.ClearTextOnFocus = false
  840. end
  841. box.Font = Row.Font
  842. box.FontSize = Row.FontSize
  843. box.TextXAlignment = Row.TextXAlignment
  844. box.BackgroundTransparency = 1
  845. box.TextColor3 = Row.TextColor
  846. return box
  847. end
  848. end
  849.  
  850. local function CreateDropDownItem(text, onClick)
  851. local button = Instance.new("TextButton")
  852. button.Font = DropDown.Font
  853. button.FontSize = DropDown.FontSize
  854. button.TextColor3 = DropDown.TextColor
  855. button.TextXAlignment = DropDown.TextXAlignment
  856. button.BackgroundColor3 = DropDown.BackColor
  857. button.AutoButtonColor = false
  858. button.BorderSizePixel = 0
  859. button.Active = true
  860. button.Text = text
  861.  
  862. button.MouseEnter:connect(function()
  863. button.TextColor3 = DropDown.TextColorOver
  864. button.BackgroundColor3 = DropDown.BackColorOver
  865. end)
  866. button.MouseLeave:connect(function()
  867. button.TextColor3 = DropDown.TextColor
  868. button.BackgroundColor3 = DropDown.BackColor
  869. end)
  870. button.MouseButton1Click:connect(function()
  871. onClick(text)
  872. end)
  873. return button
  874. end
  875.  
  876. local function CreateDropDown(choices, currentChoice, readOnly, onClick)
  877. local frame = Instance.new("Frame")
  878. frame.Name = "DropDown"
  879. frame.Size = UDim2.new(1, 0, 1, 0)
  880. frame.BackgroundTransparency = 1
  881. frame.Active = true
  882.  
  883. local menu = nil
  884. local arrow = nil
  885. local expanded = false
  886. local margin = DropDown.BorderSizePixel;
  887.  
  888. local button = Instance.new("TextButton")
  889. button.Font = Row.Font
  890. button.FontSize = Row.FontSize
  891. button.TextXAlignment = Row.TextXAlignment
  892. button.BackgroundTransparency = 1
  893. button.TextColor3 = Row.TextColor
  894. if readOnly then
  895. button.TextColor3 = Row.TextLockedColor
  896. end
  897. button.Text = currentChoice
  898. button.Size = UDim2.new(1, -2 * Styles.Margin, 1, 0)
  899. button.Position = UDim2.new(0, Styles.Margin, 0, 0)
  900. button.Parent = frame
  901.  
  902. local function showArrow(color)
  903. if arrow then arrow:Destroy() end
  904.  
  905. local graphicTemplate = Create('Frame',{
  906. Name="Graphic";
  907. BorderSizePixel = 0;
  908. BackgroundColor3 = color;
  909. })
  910. local graphicSize = 16/2
  911.  
  912. arrow = ArrowGraphic(graphicSize,'Down',true,graphicTemplate)
  913. arrow.Position = UDim2.new(1,-graphicSize * 2,0.5,-graphicSize/2)
  914. arrow.Parent = frame
  915. end
  916.  
  917. local function hideMenu()
  918. expanded = false
  919. showArrow(DropDown.ArrowColor)
  920. if menu then menu:Destroy() end
  921. end
  922.  
  923. local function showMenu()
  924. expanded = true
  925. menu = Instance.new("Frame")
  926. menu.Size = UDim2.new(1, -2 * margin, 0, #choices * DropDown.Height)
  927. menu.Position = UDim2.new(0, margin, 0, Row.Height + margin)
  928. menu.BackgroundTransparency = 0
  929. menu.BackgroundColor3 = DropDown.BackColor
  930. menu.BorderColor3 = DropDown.BorderColor
  931. menu.BorderSizePixel = DropDown.BorderSizePixel
  932. menu.Active = true
  933. menu.ZIndex = 5
  934. menu.Parent = frame
  935.  
  936. local parentFrameHeight = menu.Parent.Parent.Parent.Parent.Size.Y.Offset
  937. local rowHeight = menu.Parent.Parent.Parent.Position.Y.Offset
  938. if (rowHeight + menu.Size.Y.Offset) > math.max(parentFrameHeight,PropertiesFrame.AbsoluteSize.y) then
  939. menu.Position = UDim2.new(0, margin, 0, -1 * (#choices * DropDown.Height) - margin)
  940. end
  941.  
  942. local function choice(name)
  943. onClick(name)
  944. hideMenu()
  945. end
  946.  
  947. for i,name in pairs(choices) do
  948. local option = CreateDropDownItem(name, function()
  949. choice(name)
  950. end)
  951. option.Size = UDim2.new(1, 0, 0, 16)
  952. option.Position = UDim2.new(0, 0, 0, (i - 1) * DropDown.Height)
  953. option.ZIndex = menu.ZIndex
  954. option.Parent = menu
  955. end
  956. end
  957.  
  958. showArrow(DropDown.ArrowColor)
  959.  
  960. if not readOnly then
  961.  
  962. button.MouseEnter:connect(function()
  963. button.TextColor3 = Row.TextColor
  964. showArrow(DropDown.ArrowColorOver)
  965. end)
  966. button.MouseLeave:connect(function()
  967. button.TextColor3 = Row.TextColor
  968. if not expanded then
  969. showArrow(DropDown.ArrowColor)
  970. end
  971. end)
  972. button.MouseButton1Click:connect(function()
  973. if expanded then
  974. hideMenu()
  975. else
  976. showMenu()
  977. end
  978. end)
  979. end
  980.  
  981. return frame,button
  982. end
  983.  
  984. local function CreateBrickColor(readOnly, onClick)
  985. local frame = Instance.new("Frame")
  986. frame.Size = UDim2.new(1,0,1,0)
  987. frame.BackgroundTransparency = 1
  988.  
  989. local colorPalette = Instance.new("Frame")
  990. colorPalette.BackgroundTransparency = 0
  991. colorPalette.SizeConstraint = Enum.SizeConstraint.RelativeXX
  992. colorPalette.Size = UDim2.new(1, -2 * BrickColors.OuterBorder, 1, -2 * BrickColors.OuterBorder)
  993. colorPalette.BorderSizePixel = BrickColors.BorderSizePixel
  994. colorPalette.BorderColor3 = BrickColors.BorderColor
  995. colorPalette.Position = UDim2.new(0, BrickColors.OuterBorder, 0, BrickColors.OuterBorder + Row.Height)
  996. colorPalette.ZIndex = 5
  997. colorPalette.Visible = false
  998. colorPalette.BorderSizePixel = BrickColors.OuterBorder
  999. colorPalette.BorderColor3 = BrickColors.OuterBorderColor
  1000. colorPalette.Parent = frame
  1001.  
  1002. local function show()
  1003. colorPalette.Visible = true
  1004. end
  1005.  
  1006. local function hide()
  1007. colorPalette.Visible = false
  1008. end
  1009.  
  1010. local function toggle()
  1011. colorPalette.Visible = not colorPalette.Visible
  1012. end
  1013.  
  1014. local colorBox = Instance.new("TextButton", frame)
  1015. colorBox.Position = UDim2.new(0, Styles.Margin, 0, Styles.Margin)
  1016. colorBox.Size = UDim2.new(0, BrickColors.BoxSize, 0, BrickColors.BoxSize)
  1017. colorBox.Text = ""
  1018. colorBox.MouseButton1Click:connect(function()
  1019. if not readOnly then
  1020. toggle()
  1021. end
  1022. end)
  1023.  
  1024. if readOnly then
  1025. colorBox.AutoButtonColor = false
  1026. end
  1027.  
  1028. local spacingBefore = (Styles.Margin * 2) + BrickColors.BoxSize
  1029.  
  1030. local propertyLabel = CreateTextButton(readOnly, function()
  1031. if not readOnly then
  1032. toggle()
  1033. end
  1034. end)
  1035. propertyLabel.Size = UDim2.new(1, (-1 * spacingBefore) - Styles.Margin, 1, 0)
  1036. propertyLabel.Position = UDim2.new(0, spacingBefore, 0, 0)
  1037. propertyLabel.Parent = frame
  1038.  
  1039. local size = (1 / BrickColors.ColorsPerRow)
  1040.  
  1041. for index = 0, 127 do
  1042. local brickColor = BrickColor.palette(index)
  1043. local color3 = brickColor.Color
  1044.  
  1045. local x = size * (index % BrickColors.ColorsPerRow)
  1046. local y = size * math.floor(index / BrickColors.ColorsPerRow)
  1047.  
  1048. local brickColorBox = Instance.new("TextButton")
  1049. brickColorBox.Text = ""
  1050. brickColorBox.Size = UDim2.new(size,0,size,0)
  1051. brickColorBox.BackgroundColor3 = color3
  1052. brickColorBox.Position = UDim2.new(x, 0, y, 0)
  1053. brickColorBox.ZIndex = colorPalette.ZIndex
  1054. brickColorBox.Parent = colorPalette
  1055.  
  1056. brickColorBox.MouseButton1Click:connect(function()
  1057. hide()
  1058. onClick(brickColor)
  1059. end)
  1060. end
  1061.  
  1062. return frame,propertyLabel,colorBox
  1063. end
  1064.  
  1065. local function CreateColor3Control(readOnly, onClick)
  1066. local frame = Instance.new("Frame")
  1067. frame.Size = UDim2.new(1,0,1,0)
  1068. frame.BackgroundTransparency = 1
  1069.  
  1070. local colorBox = Instance.new("TextButton", frame)
  1071. colorBox.Position = UDim2.new(0, Styles.Margin, 0, Styles.Margin)
  1072. colorBox.Size = UDim2.new(0, BrickColors.BoxSize, 0, BrickColors.BoxSize)
  1073. colorBox.Text = ""
  1074. colorBox.AutoButtonColor = false
  1075.  
  1076. local spacingBefore = (Styles.Margin * 2) + BrickColors.BoxSize
  1077. local box = CreateTextBox(readOnly)
  1078. box.Size = UDim2.new(1, (-1 * spacingBefore) - Styles.Margin, 1, 0)
  1079. box.Position = UDim2.new(0, spacingBefore, 0, 0)
  1080. box.Parent = frame
  1081.  
  1082. return frame,box,colorBox
  1083. end
  1084.  
  1085. function CreateCheckbox(value, readOnly, onClick)
  1086. local checked = value
  1087. local mouseover = false
  1088.  
  1089. local checkboxFrame = Instance.new("ImageButton")
  1090. checkboxFrame.Size = UDim2.new(0, Sprite.Width, 0, Sprite.Height)
  1091. checkboxFrame.BackgroundTransparency = 1
  1092. checkboxFrame.ClipsDescendants = true
  1093. --checkboxFrame.Position = UDim2.new(0, Styles.Margin, 0, Styles.Margin)
  1094.  
  1095. local spritesheetImage = Instance.new("ImageLabel", checkboxFrame)
  1096. spritesheetImage.Name = "SpritesheetImageLabel"
  1097. spritesheetImage.Size = UDim2.new(0, Spritesheet.Width, 0, Spritesheet.Height)
  1098. spritesheetImage.Image = Spritesheet.Image
  1099. spritesheetImage.BackgroundTransparency = 1
  1100.  
  1101. local function updateSprite()
  1102. local spriteName = GetCheckboxImageName(checked, readOnly, mouseover)
  1103. local spritePosition = SpritePosition(spriteName)
  1104. spritesheetImage.Position = UDim2.new(0, -1 * spritePosition[1], 0, -1 * spritePosition[2])
  1105. end
  1106.  
  1107. local function setValue(val)
  1108. checked = val
  1109. updateSprite()
  1110. end
  1111.  
  1112. if not readOnly then
  1113. checkboxFrame.MouseEnter:connect(function() mouseover = true updateSprite() end)
  1114. checkboxFrame.MouseLeave:connect(function() mouseover = false updateSprite() end)
  1115. checkboxFrame.MouseButton1Click:connect(function()
  1116. onClick(checked)
  1117. end)
  1118. end
  1119.  
  1120. updateSprite()
  1121.  
  1122. return checkboxFrame, setValue
  1123. end
  1124.  
  1125.  
  1126.  
  1127. -- Code for handling controls of various data types --
  1128.  
  1129. local Controls = {}
  1130.  
  1131. Controls["default"] = function(object, propertyData, readOnly)
  1132. local propertyName = propertyData["Name"]
  1133. local propertyType = propertyData["ValueType"]
  1134.  
  1135. local box = CreateTextBox(readOnly)
  1136. box.Size = UDim2.new(1, -2 * Styles.Margin, 1, 0)
  1137. box.Position = UDim2.new(0, Styles.Margin, 0, 0)
  1138.  
  1139. local function update()
  1140. local value = object[propertyName]
  1141. box.Text = ToString(value, propertyType)
  1142. end
  1143.  
  1144. if not readOnly then
  1145. box.FocusLost:connect(function(enterPressed)
  1146. Set(object, propertyData, ToValue(box.Text,propertyType))
  1147. update()
  1148. end)
  1149. end
  1150.  
  1151. update()
  1152.  
  1153. object.Changed:connect(function(property)
  1154. if (property == propertyName) then
  1155. update()
  1156. end
  1157. end)
  1158.  
  1159. return box
  1160. end
  1161.  
  1162. Controls["bool"] = function(object, propertyData, readOnly)
  1163. local propertyName = propertyData["Name"]
  1164. local checked = object[propertyName]
  1165.  
  1166. local checkbox, setValue = CreateCheckbox(checked, readOnly, function(value)
  1167. Set(object, propertyData, not checked)
  1168. end)
  1169. checkbox.Position = UDim2.new(0, Styles.Margin, 0, Styles.Margin)
  1170.  
  1171. setValue(checked)
  1172.  
  1173. local function update()
  1174. checked = object[propertyName]
  1175. setValue(checked)
  1176. end
  1177.  
  1178. object.Changed:connect(function(property)
  1179. if (property == propertyName) then
  1180. update()
  1181. end
  1182. end)
  1183.  
  1184. if object:IsA("BoolValue") then
  1185. object.Changed:connect(function(val)
  1186. update()
  1187. end)
  1188. end
  1189.  
  1190. update()
  1191.  
  1192. return checkbox
  1193. end
  1194.  
  1195. Controls["BrickColor"] = function(object, propertyData, readOnly)
  1196. local propertyName = propertyData["Name"]
  1197.  
  1198. local frame,label,brickColorBox = CreateBrickColor(readOnly, function(brickColor)
  1199. Set(object, propertyData, brickColor)
  1200. end)
  1201.  
  1202. local function update()
  1203. local value = object[propertyName]
  1204. brickColorBox.BackgroundColor3 = value.Color
  1205. label.Text = tostring(value)
  1206. end
  1207.  
  1208. update()
  1209.  
  1210. object.Changed:connect(function(property)
  1211. if (property == propertyName) then
  1212. update()
  1213. end
  1214. end)
  1215.  
  1216. return frame
  1217. end
  1218.  
  1219. Controls["Color3"] = function(object, propertyData, readOnly)
  1220. local propertyName = propertyData["Name"]
  1221.  
  1222. local frame,textBox,colorBox = CreateColor3Control(readOnly)
  1223.  
  1224. textBox.FocusLost:connect(function(enterPressed)
  1225. Set(object, propertyData, ToValue(textBox.Text,"Color3"))
  1226. local value = object[propertyName]
  1227. colorBox.BackgroundColor3 = value
  1228. textBox.Text = ToString(value, "Color3")
  1229. end)
  1230.  
  1231. local function update()
  1232. local value = object[propertyName]
  1233. colorBox.BackgroundColor3 = value
  1234. textBox.Text = ToString(value, "Color3")
  1235. end
  1236.  
  1237. update()
  1238.  
  1239. object.Changed:connect(function(property)
  1240. if (property == propertyName) then
  1241. update()
  1242. end
  1243. end)
  1244.  
  1245. return frame
  1246. end
  1247.  
  1248. Controls["Enum"] = function(object, propertyData, readOnly)
  1249. local propertyName = propertyData["Name"]
  1250. local propertyType = propertyData["ValueType"]
  1251.  
  1252. local enumName = object[propertyName].Name
  1253.  
  1254. local enumNames = {}
  1255. for _,enum in pairs(Enum[tostring(propertyType)]:GetEnumItems()) do
  1256. table.insert(enumNames, enum.Name)
  1257. end
  1258.  
  1259. local dropdown, propertyLabel = CreateDropDown(enumNames, enumName, readOnly, function(value)
  1260. Set(object, propertyData, value)
  1261. end)
  1262. --dropdown.Parent = frame
  1263.  
  1264. local function update()
  1265. local value = object[propertyName].Name
  1266. propertyLabel.Text = tostring(value)
  1267. end
  1268.  
  1269. update()
  1270.  
  1271. object.Changed:connect(function(property)
  1272. if (property == propertyName) then
  1273. update()
  1274. end
  1275. end)
  1276.  
  1277. return dropdown
  1278. end
  1279.  
  1280. Controls["Object"] = function(object, propertyData, readOnly)
  1281. local propertyName = propertyData["Name"]
  1282. local propertyType = propertyData["ValueType"]
  1283.  
  1284. local box = CreateObject(readOnly,function()end)
  1285. box.Size = UDim2.new(1, -2 * Styles.Margin, 1, 0)
  1286. box.Position = UDim2.new(0, Styles.Margin, 0, 0)
  1287.  
  1288. local function update()
  1289. if AwaitingObjectObj == object then
  1290. if AwaitingObjectValue == true then
  1291. box.Text = "Select an Object"
  1292. return
  1293. end
  1294. end
  1295. local value = object[propertyName]
  1296. box.Text = ToString(value, propertyType)
  1297. end
  1298.  
  1299. if not readOnly then
  1300. box.MouseButton1Click:connect(function()
  1301. if AwaitingObjectValue then
  1302. AwaitingObjectValue = false
  1303. update()
  1304. return
  1305. end
  1306. AwaitingObjectValue = true
  1307. AwaitingObjectObj = object
  1308. AwaitingObjectProp = propertyData
  1309. box.Text = "Select an Object"
  1310. end)
  1311.  
  1312. box.Cancel.Visible = true
  1313. box.Cancel.MouseButton1Click:connect(function()
  1314. object[propertyName] = nil
  1315. end)
  1316. end
  1317.  
  1318. update()
  1319.  
  1320. object.Changed:connect(function(property)
  1321. if (property == propertyName) then
  1322. update()
  1323. end
  1324. end)
  1325.  
  1326. if object:IsA("ObjectValue") then
  1327. object.Changed:connect(function(val)
  1328. update()
  1329. end)
  1330. end
  1331.  
  1332. return box
  1333. end
  1334.  
  1335. function GetControl(object, propertyData, readOnly)
  1336. local propertyType = propertyData["ValueType"]
  1337. local control = nil
  1338.  
  1339. if Controls[propertyType] then
  1340. control = Controls[propertyType](object, propertyData, readOnly)
  1341. elseif RbxApi.IsEnum(propertyType) then
  1342. control = Controls["Enum"](object, propertyData, readOnly)
  1343. elseif RbxApi.Classes[propertyType] then
  1344. control = Controls["Object"](object, propertyData, readOnly)
  1345. else
  1346. control = Controls["default"](object, propertyData, readOnly)
  1347. end
  1348. return control
  1349. end
  1350. -- Permissions
  1351.  
  1352. function CanEditObject(object)
  1353. local player = Players.LocalPlayer
  1354. local character = player.Character
  1355. return Permissions.CanEdit
  1356. end
  1357.  
  1358. function CanEditProperty(object,propertyData)
  1359. local tags = propertyData["tags"]
  1360. for _,name in pairs(tags) do
  1361. if name == "readonly" then
  1362. return false
  1363. end
  1364. end
  1365. return CanEditObject(object)
  1366. end
  1367.  
  1368. --RbxApi
  1369. local function PropertyIsHidden(propertyData)
  1370. local tags = propertyData["tags"]
  1371. for _,name in pairs(tags) do
  1372. if name == "deprecated"
  1373. or name == "hidden"
  1374. or name == "writeonly" then
  1375. return true
  1376. end
  1377. end
  1378. return false
  1379. end
  1380.  
  1381. function Set(object, propertyData, value)
  1382. local propertyName = propertyData["Name"]
  1383. local propertyType = propertyData["ValueType"]
  1384.  
  1385. if value == nil then return end
  1386.  
  1387. for i,v in pairs(GetSelection()) do
  1388. if CanEditProperty(v,propertyData) then
  1389. pcall(function()
  1390. --print("Setting " .. propertyName .. " to " .. tostring(value))
  1391. v[propertyName] = value
  1392. end)
  1393. end
  1394. end
  1395. end
  1396.  
  1397. function CreateRow(object, propertyData, isAlternateRow)
  1398. local propertyName = propertyData["Name"]
  1399. local propertyType = propertyData["ValueType"]
  1400. local propertyValue = object[propertyName]
  1401. --rowValue, rowValueType, isAlternate
  1402. local backColor = Row.BackgroundColor;
  1403. if (isAlternateRow) then
  1404. backColor = Row.BackgroundColorAlternate
  1405. end
  1406.  
  1407. local readOnly = not CanEditProperty(object, propertyData)
  1408. --if propertyType == "Instance" or propertyName == "Parent" then readOnly = true end
  1409.  
  1410. local rowFrame = Instance.new("Frame")
  1411. rowFrame.Size = UDim2.new(1,0,0,Row.Height)
  1412. rowFrame.BackgroundTransparency = 1
  1413. rowFrame.Name = 'Row'
  1414.  
  1415. local propertyLabelFrame = CreateCell()
  1416. propertyLabelFrame.Parent = rowFrame
  1417. propertyLabelFrame.ClipsDescendants = true
  1418.  
  1419. local propertyLabel = CreateLabel(readOnly)
  1420. propertyLabel.Text = propertyName
  1421. propertyLabel.Size = UDim2.new(1, -1 * Row.TitleMarginLeft, 1, 0)
  1422. propertyLabel.Position = UDim2.new(0, Row.TitleMarginLeft, 0, 0)
  1423. propertyLabel.Parent = propertyLabelFrame
  1424.  
  1425. local propertyValueFrame = CreateCell()
  1426. propertyValueFrame.Size = UDim2.new(0.5, -1, 1, 0)
  1427. propertyValueFrame.Position = UDim2.new(0.5, 0, 0, 0)
  1428. propertyValueFrame.Parent = rowFrame
  1429.  
  1430. local control = GetControl(object, propertyData, readOnly)
  1431. control.Parent = propertyValueFrame
  1432.  
  1433. rowFrame.MouseEnter:connect(function()
  1434. propertyLabelFrame.BackgroundColor3 = Row.BackgroundColorMouseover
  1435. propertyValueFrame.BackgroundColor3 = Row.BackgroundColorMouseover
  1436. end)
  1437. rowFrame.MouseLeave:connect(function()
  1438. propertyLabelFrame.BackgroundColor3 = backColor
  1439. propertyValueFrame.BackgroundColor3 = backColor
  1440. end)
  1441.  
  1442. propertyLabelFrame.BackgroundColor3 = backColor
  1443. propertyValueFrame.BackgroundColor3 = backColor
  1444.  
  1445. return rowFrame
  1446. end
  1447.  
  1448. function ClearPropertiesList()
  1449. for _,instance in pairs(ContentFrame:GetChildren()) do
  1450. instance:Destroy()
  1451. end
  1452. end
  1453.  
  1454. local selection = Gui:FindFirstChild("Selection", 1)
  1455. print(selection)
  1456.  
  1457. function displayProperties(props)
  1458. for i,v in pairs(props) do
  1459. pcall(function()
  1460. local a = CreateRow(v.object, v.propertyData, ((numRows % 2) == 0))
  1461. a.Position = UDim2.new(0,0,0,numRows*Row.Height)
  1462. a.Parent = ContentFrame
  1463. numRows = numRows + 1
  1464. end)
  1465. end
  1466. end
  1467.  
  1468. function checkForDupe(prop,props)
  1469. for i,v in pairs(props) do
  1470. if v.propertyData.Name == prop.Name and v.propertyData.ValueType == prop.ValueType then
  1471. return true
  1472. end
  1473. end
  1474. return false
  1475. end
  1476.  
  1477. function sortProps(t)
  1478. table.sort(t,
  1479. function(x,y) return x.propertyData.Name < y.propertyData.Name
  1480. end)
  1481. end
  1482.  
  1483. function showProperties(obj)
  1484. ClearPropertiesList()
  1485. if obj == nil then return end
  1486. local propHolder = {}
  1487. local foundProps = {}
  1488. numRows = 0
  1489. for _,nextObj in pairs(obj) do
  1490. if not foundProps[nextObj.className] then
  1491. foundProps[nextObj.className] = true
  1492. for i,v in pairs(RbxApi.GetProperties(nextObj.className)) do
  1493. local suc, err = pcall(function()
  1494. if not (PropertyIsHidden(v)) and not checkForDupe(v,propHolder) then
  1495. if string.find(string.lower(v.Name),string.lower(propertiesSearch.Text)) or not searchingProperties() then
  1496. table.insert(propHolder,{propertyData = v, object = nextObj})
  1497. end
  1498. end
  1499. end)
  1500. --[[if not suc then
  1501. warn("Problem getting the value of property " .. v.Name .. " | " .. err)
  1502. end --]]
  1503. end
  1504. end
  1505. end
  1506. sortProps(propHolder)
  1507. displayProperties(propHolder)
  1508. ContentFrame.Size = UDim2.new(1, 0, 0, numRows * Row.Height)
  1509. scrollBar.ScrollIndex = 0
  1510. scrollBar.TotalSpace = numRows * Row.Height
  1511. scrollBar.Update()
  1512. end
  1513.  
  1514. ----------------------------------------------------------------
  1515. -----------------------SCROLLBAR STUFF--------------------------
  1516. ----------------------------------------------------------------
  1517. ----------------------------------------------------------------
  1518. local ScrollBarWidth = 16
  1519.  
  1520. local ScrollStyles = {
  1521. Background = Color3.new(233/255, 233/255, 233/255);
  1522. Border = Color3.new(149/255, 149/255, 149/255);
  1523. Selected = Color3.new( 63/255, 119/255, 189/255);
  1524. BorderSelected = Color3.new( 55/255, 106/255, 167/255);
  1525. Text = Color3.new( 0/255, 0/255, 0/255);
  1526. TextDisabled = Color3.new(128/255, 128/255, 128/255);
  1527. TextSelected = Color3.new(255/255, 255/255, 255/255);
  1528. Button = Color3.new(221/255, 221/255, 221/255);
  1529. ButtonBorder = Color3.new(149/255, 149/255, 149/255);
  1530. ButtonSelected = Color3.new(255/255, 0/255, 0/255);
  1531. Field = Color3.new(255/255, 255/255, 255/255);
  1532. FieldBorder = Color3.new(191/255, 191/255, 191/255);
  1533. TitleBackground = Color3.new(178/255, 178/255, 178/255);
  1534. }
  1535. do
  1536. local ZIndexLock = {}
  1537. function SetZIndex(object,z)
  1538. if not ZIndexLock[object] then
  1539. ZIndexLock[object] = true
  1540. if object:IsA'GuiObject' then
  1541. object.ZIndex = z
  1542. end
  1543. local children = object:GetChildren()
  1544. for i = 1,#children do
  1545. SetZIndex(children[i],z)
  1546. end
  1547. ZIndexLock[object] = nil
  1548. end
  1549. end
  1550. end
  1551. function SetZIndexOnChanged(object)
  1552. return object.Changed:connect(function(p)
  1553. if p == "ZIndex" then
  1554. SetZIndex(object,object.ZIndex)
  1555. end
  1556. end)
  1557. end
  1558. function Create(ty,data)
  1559. local obj
  1560. if type(ty) == 'string' then
  1561. obj = Instance.new(ty)
  1562. else
  1563. obj = ty
  1564. end
  1565. for k, v in pairs(data) do
  1566. if type(k) == 'number' then
  1567. v.Parent = obj
  1568. else
  1569. obj[k] = v
  1570. end
  1571. end
  1572. return obj
  1573. end
  1574. -- returns the ascendant ScreenGui of an object
  1575. function GetScreen(screen)
  1576. if screen == nil then return nil end
  1577. while not screen:IsA("ScreenGui") do
  1578. screen = screen.Parent
  1579. if screen == nil then return nil end
  1580. end
  1581. return screen
  1582. end
  1583. -- AutoButtonColor doesn't always reset properly
  1584. function ResetButtonColor(button)
  1585. local active = button.Active
  1586. button.Active = not active
  1587. button.Active = active
  1588. end
  1589.  
  1590. function ArrowGraphic(size,dir,scaled,template)
  1591. local Frame = Create('Frame',{
  1592. Name = "Arrow Graphic";
  1593. BorderSizePixel = 0;
  1594. Size = UDim2.new(0,size,0,size);
  1595. Transparency = 1;
  1596. })
  1597. if not template then
  1598. template = Instance.new("Frame")
  1599. template.BorderSizePixel = 0
  1600. end
  1601.  
  1602. local transform
  1603. if dir == nil or dir == 'Up' then
  1604. function transform(p,s) return p,s end
  1605. elseif dir == 'Down' then
  1606. function transform(p,s) return UDim2.new(0,p.X.Offset,0,size-p.Y.Offset-1),s end
  1607. elseif dir == 'Left' then
  1608. 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
  1609. elseif dir == 'Right' then
  1610. 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
  1611. end
  1612.  
  1613. local scale
  1614. if scaled then
  1615. 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
  1616. else
  1617. function scale(p,s) return p,s end
  1618. end
  1619.  
  1620. local o = math.floor(size/4)
  1621. if size%2 == 0 then
  1622. local n = size/2-1
  1623. for i = 0,n do
  1624. local t = template:Clone()
  1625. local p,s = scale(transform(
  1626. UDim2.new(0,n-i,0,o+i),
  1627. UDim2.new(0,(i+1)*2,0,1)
  1628. ))
  1629. t.Position = p
  1630. t.Size = s
  1631. t.Parent = Frame
  1632. end
  1633. else
  1634. local n = (size-1)/2
  1635. for i = 0,n do
  1636. local t = template:Clone()
  1637. local p,s = scale(transform(
  1638. UDim2.new(0,n-i,0,o+i),
  1639. UDim2.new(0,i*2+1,0,1)
  1640. ))
  1641. t.Position = p
  1642. t.Size = s
  1643. t.Parent = Frame
  1644. end
  1645. end
  1646. if size%4 > 1 then
  1647. local t = template:Clone()
  1648. local p,s = scale(transform(
  1649. UDim2.new(0,0,0,size-o-1),
  1650. UDim2.new(0,size,0,1)
  1651. ))
  1652. t.Position = p
  1653. t.Size = s
  1654. t.Parent = Frame
  1655. end
  1656. return Frame
  1657. end
  1658.  
  1659. function GripGraphic(size,dir,spacing,scaled,template)
  1660. local Frame = Create('Frame',{
  1661. Name = "Grip Graphic";
  1662. BorderSizePixel = 0;
  1663. Size = UDim2.new(0,size.x,0,size.y);
  1664. Transparency = 1;
  1665. })
  1666. if not template then
  1667. template = Instance.new("Frame")
  1668. template.BorderSizePixel = 0
  1669. end
  1670.  
  1671. spacing = spacing or 2
  1672.  
  1673. local scale
  1674. if scaled then
  1675. function scale(p) return UDim2.new(p.X.Offset/size.x,0,p.Y.Offset/size.y,0) end
  1676. else
  1677. function scale(p) return p end
  1678. end
  1679.  
  1680. if dir == 'Vertical' then
  1681. for i=0,size.x-1,spacing do
  1682. local t = template:Clone()
  1683. t.Size = scale(UDim2.new(0,1,0,size.y))
  1684. t.Position = scale(UDim2.new(0,i,0,0))
  1685. t.Parent = Frame
  1686. end
  1687. elseif dir == nil or dir == 'Horizontal' then
  1688. for i=0,size.y-1,spacing do
  1689. local t = template:Clone()
  1690. t.Size = scale(UDim2.new(0,size.x,0,1))
  1691. t.Position = scale(UDim2.new(0,0,0,i))
  1692. t.Parent = Frame
  1693. end
  1694. end
  1695.  
  1696. return Frame
  1697. end
  1698.  
  1699. do
  1700. local mt = {
  1701. __index = {
  1702. GetScrollPercent = function(self)
  1703. return self.ScrollIndex/(self.TotalSpace-self.VisibleSpace)
  1704. end;
  1705. CanScrollDown = function(self)
  1706. return self.ScrollIndex + self.VisibleSpace < self.TotalSpace
  1707. end;
  1708. CanScrollUp = function(self)
  1709. return self.ScrollIndex > 0
  1710. end;
  1711. ScrollDown = function(self)
  1712. self.ScrollIndex = self.ScrollIndex + self.PageIncrement
  1713. self:Update()
  1714. end;
  1715. ScrollUp = function(self)
  1716. self.ScrollIndex = self.ScrollIndex - self.PageIncrement
  1717. self:Update()
  1718. end;
  1719. ScrollTo = function(self,index)
  1720. self.ScrollIndex = index
  1721. self:Update()
  1722. end;
  1723. SetScrollPercent = function(self,percent)
  1724. self.ScrollIndex = math.floor((self.TotalSpace - self.VisibleSpace)*percent + 0.5)
  1725. self:Update()
  1726. end;
  1727. };
  1728. }
  1729. mt.__index.CanScrollRight = mt.__index.CanScrollDown
  1730. mt.__index.CanScrollLeft = mt.__index.CanScrollUp
  1731. mt.__index.ScrollLeft = mt.__index.ScrollUp
  1732. mt.__index.ScrollRight = mt.__index.ScrollDown
  1733.  
  1734. function ScrollBar(horizontal)
  1735. -- create row scroll bar
  1736. local ScrollFrame = Create('Frame',{
  1737. Name = "ScrollFrame";
  1738. Position = horizontal and UDim2.new(0,0,1,-ScrollBarWidth) or UDim2.new(1,-ScrollBarWidth,0,0);
  1739. Size = horizontal and UDim2.new(1,0,0,ScrollBarWidth) or UDim2.new(0,ScrollBarWidth,1,0);
  1740. BackgroundTransparency = 1;
  1741. Create('ImageButton',{
  1742. Name = "ScrollDown";
  1743. Position = horizontal and UDim2.new(1,-ScrollBarWidth,0,0) or UDim2.new(0,0,1,-ScrollBarWidth);
  1744. Size = UDim2.new(0, ScrollBarWidth, 0, ScrollBarWidth);
  1745. BackgroundColor3 = ScrollStyles.Button;
  1746. BorderColor3 = ScrollStyles.Border;
  1747. --BorderSizePixel = 0;
  1748. });
  1749. Create('ImageButton',{
  1750. Name = "ScrollUp";
  1751. Size = UDim2.new(0, ScrollBarWidth, 0, ScrollBarWidth);
  1752. BackgroundColor3 = ScrollStyles.Button;
  1753. BorderColor3 = ScrollStyles.Border;
  1754. --BorderSizePixel = 0;
  1755. });
  1756. Create('ImageButton',{
  1757. Name = "ScrollBar";
  1758. Size = horizontal and UDim2.new(1,-ScrollBarWidth*2,1,0) or UDim2.new(1,0,1,-ScrollBarWidth*2);
  1759. Position = horizontal and UDim2.new(0,ScrollBarWidth,0,0) or UDim2.new(0,0,0,ScrollBarWidth);
  1760. AutoButtonColor = false;
  1761. BackgroundColor3 = Color3.new(0.94902, 0.94902, 0.94902);
  1762. BorderColor3 = ScrollStyles.Border;
  1763. --BorderSizePixel = 0;
  1764. Create('ImageButton',{
  1765. Name = "ScrollThumb";
  1766. AutoButtonColor = false;
  1767. Size = UDim2.new(0, ScrollBarWidth, 0, ScrollBarWidth);
  1768. BackgroundColor3 = ScrollStyles.Button;
  1769. BorderColor3 = ScrollStyles.Border;
  1770. --BorderSizePixel = 0;
  1771. });
  1772. });
  1773. })
  1774.  
  1775. local graphicTemplate = Create('Frame',{
  1776. Name="Graphic";
  1777. BorderSizePixel = 0;
  1778. BackgroundColor3 = ScrollStyles.Border;
  1779. })
  1780. local graphicSize = ScrollBarWidth/2
  1781.  
  1782. local ScrollDownFrame = ScrollFrame.ScrollDown
  1783. local ScrollDownGraphic = ArrowGraphic(graphicSize,horizontal and 'Right' or 'Down',true,graphicTemplate)
  1784. ScrollDownGraphic.Position = UDim2.new(0.5,-graphicSize/2,0.5,-graphicSize/2)
  1785. ScrollDownGraphic.Parent = ScrollDownFrame
  1786. local ScrollUpFrame = ScrollFrame.ScrollUp
  1787. local ScrollUpGraphic = ArrowGraphic(graphicSize,horizontal and 'Left' or 'Up',true,graphicTemplate)
  1788. ScrollUpGraphic.Position = UDim2.new(0.5,-graphicSize/2,0.5,-graphicSize/2)
  1789. ScrollUpGraphic.Parent = ScrollUpFrame
  1790. local ScrollBarFrame = ScrollFrame.ScrollBar
  1791. local ScrollThumbFrame = ScrollBarFrame.ScrollThumb
  1792. do
  1793. local size = ScrollBarWidth*3/8
  1794. local Decal = GripGraphic(Vector2.new(size,size),horizontal and 'Vertical' or 'Horizontal',2,graphicTemplate)
  1795. Decal.Position = UDim2.new(0.5,-size/2,0.5,-size/2)
  1796. Decal.Parent = ScrollThumbFrame
  1797. end
  1798.  
  1799. local MouseDrag = Create('ImageButton',{
  1800. Name = "MouseDrag";
  1801. Position = UDim2.new(-0.25,0,-0.25,0);
  1802. Size = UDim2.new(1.5,0,1.5,0);
  1803. Transparency = 1;
  1804. AutoButtonColor = false;
  1805. Active = true;
  1806. ZIndex = 10;
  1807. })
  1808.  
  1809. local Class = setmetatable({
  1810. GUI = ScrollFrame;
  1811. ScrollIndex = 0;
  1812. VisibleSpace = 0;
  1813. TotalSpace = 0;
  1814. PageIncrement = 1;
  1815. },mt)
  1816.  
  1817. local UpdateScrollThumb
  1818. if horizontal then
  1819. function UpdateScrollThumb()
  1820. ScrollThumbFrame.Size = UDim2.new(Class.VisibleSpace/Class.TotalSpace,0,0,ScrollBarWidth)
  1821. if ScrollThumbFrame.AbsoluteSize.x < ScrollBarWidth then
  1822. ScrollThumbFrame.Size = UDim2.new(0,ScrollBarWidth,0,ScrollBarWidth)
  1823. end
  1824. local barSize = ScrollBarFrame.AbsoluteSize.x
  1825. ScrollThumbFrame.Position = UDim2.new(Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.x)/barSize,0,0,0)
  1826. end
  1827. else
  1828. function UpdateScrollThumb()
  1829. ScrollThumbFrame.Size = UDim2.new(0,ScrollBarWidth,Class.VisibleSpace/Class.TotalSpace,0)
  1830. if ScrollThumbFrame.AbsoluteSize.y < ScrollBarWidth then
  1831. ScrollThumbFrame.Size = UDim2.new(0,ScrollBarWidth,0,ScrollBarWidth)
  1832. end
  1833. local barSize = ScrollBarFrame.AbsoluteSize.y
  1834. ScrollThumbFrame.Position = UDim2.new(0,0,Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.y)/barSize,0)
  1835. end
  1836. end
  1837.  
  1838. local lastDown
  1839. local lastUp
  1840. local scrollStyle = {BackgroundColor3=ScrollStyles.Border,BackgroundTransparency=0}
  1841. local scrollStyle_ds = {BackgroundColor3=ScrollStyles.Border,BackgroundTransparency=0.7}
  1842.  
  1843. local function Update()
  1844. local t = Class.TotalSpace
  1845. local v = Class.VisibleSpace
  1846. local s = Class.ScrollIndex
  1847. if v <= t then
  1848. if s > 0 then
  1849. if s + v > t then
  1850. Class.ScrollIndex = t - v
  1851. end
  1852. else
  1853. Class.ScrollIndex = 0
  1854. end
  1855. else
  1856. Class.ScrollIndex = 0
  1857. end
  1858.  
  1859. if Class.UpdateCallback then
  1860. if Class.UpdateCallback(Class) == false then
  1861. return
  1862. end
  1863. end
  1864.  
  1865. local down = Class:CanScrollDown()
  1866. local up = Class:CanScrollUp()
  1867. if down ~= lastDown then
  1868. lastDown = down
  1869. ScrollDownFrame.Active = down
  1870. ScrollDownFrame.AutoButtonColor = down
  1871. local children = ScrollDownGraphic:GetChildren()
  1872. local style = down and scrollStyle or scrollStyle_ds
  1873. for i = 1,#children do
  1874. Create(children[i],style)
  1875. end
  1876. end
  1877. if up ~= lastUp then
  1878. lastUp = up
  1879. ScrollUpFrame.Active = up
  1880. ScrollUpFrame.AutoButtonColor = up
  1881. local children = ScrollUpGraphic:GetChildren()
  1882. local style = up and scrollStyle or scrollStyle_ds
  1883. for i = 1,#children do
  1884. Create(children[i],style)
  1885. end
  1886. end
  1887. ScrollThumbFrame.Visible = down or up
  1888. UpdateScrollThumb()
  1889. end
  1890. Class.Update = Update
  1891.  
  1892. SetZIndexOnChanged(ScrollFrame)
  1893.  
  1894. local scrollEventID = 0
  1895. ScrollDownFrame.MouseButton1Down:connect(function()
  1896. scrollEventID = tick()
  1897. local current = scrollEventID
  1898. local up_con
  1899. up_con = MouseDrag.MouseButton1Up:connect(function()
  1900. scrollEventID = tick()
  1901. MouseDrag.Parent = nil
  1902. ResetButtonColor(ScrollDownFrame)
  1903. up_con:disconnect(); drag = nil
  1904. end)
  1905. MouseDrag.Parent = GetScreen(ScrollFrame)
  1906. Class:ScrollDown()
  1907. wait(0.2) -- delay before auto scroll
  1908. while scrollEventID == current do
  1909. Class:ScrollDown()
  1910. if not Class:CanScrollDown() then break end
  1911. wait()
  1912. end
  1913. end)
  1914.  
  1915. ScrollDownFrame.MouseButton1Up:connect(function()
  1916. scrollEventID = tick()
  1917. end)
  1918.  
  1919. ScrollUpFrame.MouseButton1Down:connect(function()
  1920. scrollEventID = tick()
  1921. local current = scrollEventID
  1922. local up_con
  1923. up_con = MouseDrag.MouseButton1Up:connect(function()
  1924. scrollEventID = tick()
  1925. MouseDrag.Parent = nil
  1926. ResetButtonColor(ScrollUpFrame)
  1927. up_con:disconnect(); drag = nil
  1928. end)
  1929. MouseDrag.Parent = GetScreen(ScrollFrame)
  1930. Class:ScrollUp()
  1931. wait(0.2)
  1932. while scrollEventID == current do
  1933. Class:ScrollUp()
  1934. if not Class:CanScrollUp() then break end
  1935. wait()
  1936. end
  1937. end)
  1938.  
  1939. ScrollUpFrame.MouseButton1Up:connect(function()
  1940. scrollEventID = tick()
  1941. end)
  1942.  
  1943. if horizontal then
  1944. ScrollBarFrame.MouseButton1Down:connect(function(x,y)
  1945. scrollEventID = tick()
  1946. local current = scrollEventID
  1947. local up_con
  1948. up_con = MouseDrag.MouseButton1Up:connect(function()
  1949. scrollEventID = tick()
  1950. MouseDrag.Parent = nil
  1951. ResetButtonColor(ScrollUpFrame)
  1952. up_con:disconnect(); drag = nil
  1953. end)
  1954. MouseDrag.Parent = GetScreen(ScrollFrame)
  1955. if x > ScrollThumbFrame.AbsolutePosition.x then
  1956. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  1957. wait(0.2)
  1958. while scrollEventID == current do
  1959. if x < ScrollThumbFrame.AbsolutePosition.x + ScrollThumbFrame.AbsoluteSize.x then break end
  1960. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  1961. wait()
  1962. end
  1963. else
  1964. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  1965. wait(0.2)
  1966. while scrollEventID == current do
  1967. if x > ScrollThumbFrame.AbsolutePosition.x then break end
  1968. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  1969. wait()
  1970. end
  1971. end
  1972. end)
  1973. else
  1974. ScrollBarFrame.MouseButton1Down:connect(function(x,y)
  1975. scrollEventID = tick()
  1976. local current = scrollEventID
  1977. local up_con
  1978. up_con = MouseDrag.MouseButton1Up:connect(function()
  1979. scrollEventID = tick()
  1980. MouseDrag.Parent = nil
  1981. ResetButtonColor(ScrollUpFrame)
  1982. up_con:disconnect(); drag = nil
  1983. end)
  1984. MouseDrag.Parent = GetScreen(ScrollFrame)
  1985. if y > ScrollThumbFrame.AbsolutePosition.y then
  1986. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  1987. wait(0.2)
  1988. while scrollEventID == current do
  1989. if y < ScrollThumbFrame.AbsolutePosition.y + ScrollThumbFrame.AbsoluteSize.y then break end
  1990. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  1991. wait()
  1992. end
  1993. else
  1994. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  1995. wait(0.2)
  1996. while scrollEventID == current do
  1997. if y > ScrollThumbFrame.AbsolutePosition.y then break end
  1998. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  1999. wait()
  2000. end
  2001. end
  2002. end)
  2003. end
  2004.  
  2005. if horizontal then
  2006. ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
  2007. scrollEventID = tick()
  2008. local mouse_offset = x - ScrollThumbFrame.AbsolutePosition.x
  2009. local drag_con
  2010. local up_con
  2011. drag_con = MouseDrag.MouseMoved:connect(function(x,y)
  2012. local bar_abs_pos = ScrollBarFrame.AbsolutePosition.x
  2013. local bar_drag = ScrollBarFrame.AbsoluteSize.x - ScrollThumbFrame.AbsoluteSize.x
  2014. local bar_abs_one = bar_abs_pos + bar_drag
  2015. x = x - mouse_offset
  2016. x = x < bar_abs_pos and bar_abs_pos or x > bar_abs_one and bar_abs_one or x
  2017. x = x - bar_abs_pos
  2018. Class:SetScrollPercent(x/(bar_drag))
  2019. end)
  2020. up_con = MouseDrag.MouseButton1Up:connect(function()
  2021. scrollEventID = tick()
  2022. MouseDrag.Parent = nil
  2023. ResetButtonColor(ScrollThumbFrame)
  2024. drag_con:disconnect(); drag_con = nil
  2025. up_con:disconnect(); drag = nil
  2026. end)
  2027. MouseDrag.Parent = GetScreen(ScrollFrame)
  2028. end)
  2029. else
  2030. ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
  2031. scrollEventID = tick()
  2032. local mouse_offset = y - ScrollThumbFrame.AbsolutePosition.y
  2033. local drag_con
  2034. local up_con
  2035. drag_con = MouseDrag.MouseMoved:connect(function(x,y)
  2036. local bar_abs_pos = ScrollBarFrame.AbsolutePosition.y
  2037. local bar_drag = ScrollBarFrame.AbsoluteSize.y - ScrollThumbFrame.AbsoluteSize.y
  2038. local bar_abs_one = bar_abs_pos + bar_drag
  2039. y = y - mouse_offset
  2040. y = y < bar_abs_pos and bar_abs_pos or y > bar_abs_one and bar_abs_one or y
  2041. y = y - bar_abs_pos
  2042. Class:SetScrollPercent(y/(bar_drag))
  2043. end)
  2044. up_con = MouseDrag.MouseButton1Up:connect(function()
  2045. scrollEventID = tick()
  2046. MouseDrag.Parent = nil
  2047. ResetButtonColor(ScrollThumbFrame)
  2048. drag_con:disconnect(); drag_con = nil
  2049. up_con:disconnect(); drag = nil
  2050. end)
  2051. MouseDrag.Parent = GetScreen(ScrollFrame)
  2052. end)
  2053. end
  2054.  
  2055. function Class:Destroy()
  2056. ScrollFrame:Destroy()
  2057. MouseDrag:Destroy()
  2058. for k in pairs(Class) do
  2059. Class[k] = nil
  2060. end
  2061. setmetatable(Class,nil)
  2062. end
  2063.  
  2064. Update()
  2065.  
  2066. return Class
  2067. end
  2068. end
  2069.  
  2070. ----------------------------------------------------------------
  2071. ----------------------------------------------------------------
  2072. ----------------------------------------------------------------
  2073. ----------------------------------------------------------------
  2074.  
  2075. local MainFrame = Instance.new("Frame")
  2076. MainFrame.Name = "MainFrame"
  2077. MainFrame.Size = UDim2.new(1, -1 * ScrollBarWidth, 1, 0)
  2078. MainFrame.Position = UDim2.new(0, 0, 0, 0)
  2079. MainFrame.BackgroundTransparency = 1
  2080. MainFrame.ClipsDescendants = true
  2081. MainFrame.Parent = PropertiesFrame
  2082.  
  2083. ContentFrame = Instance.new("Frame")
  2084. ContentFrame.Name = "ContentFrame"
  2085. ContentFrame.Size = UDim2.new(1, 0, 0, 0)
  2086. ContentFrame.BackgroundTransparency = 1
  2087. ContentFrame.Parent = MainFrame
  2088.  
  2089. scrollBar = ScrollBar(false)
  2090. scrollBar.PageIncrement = 1
  2091. Create(scrollBar.GUI,{
  2092. Position = UDim2.new(1,-ScrollBarWidth,0,0);
  2093. Size = UDim2.new(0,ScrollBarWidth,1,0);
  2094. Parent = PropertiesFrame;
  2095. })
  2096.  
  2097. scrollBarH = ScrollBar(true)
  2098. scrollBarH.PageIncrement = ScrollBarWidth
  2099. Create(scrollBarH.GUI,{
  2100. Position = UDim2.new(0,0,1,-ScrollBarWidth);
  2101. Size = UDim2.new(1,-ScrollBarWidth,0,ScrollBarWidth);
  2102. Visible = false;
  2103. Parent = PropertiesFrame;
  2104. })
  2105.  
  2106. do
  2107. local listEntries = {}
  2108. local nameConnLookup = {}
  2109.  
  2110. function scrollBar.UpdateCallback(self)
  2111. scrollBar.TotalSpace = ContentFrame.AbsoluteSize.Y
  2112. scrollBar.VisibleSpace = MainFrame.AbsoluteSize.Y
  2113. ContentFrame.Position = UDim2.new(ContentFrame.Position.X.Scale,ContentFrame.Position.X.Offset,0,-1*scrollBar.ScrollIndex)
  2114. end
  2115.  
  2116. function scrollBarH.UpdateCallback(self)
  2117.  
  2118. end
  2119.  
  2120. MainFrame.Changed:connect(function(p)
  2121. if p == 'AbsoluteSize' then
  2122. scrollBarH.VisibleSpace = math.ceil(MainFrame.AbsoluteSize.x)
  2123. scrollBarH:Update()
  2124. scrollBar.VisibleSpace = math.ceil(MainFrame.AbsoluteSize.y)
  2125. scrollBar:Update()
  2126. end
  2127. end)
  2128.  
  2129. local wheelAmount = Row.Height
  2130. PropertiesFrame.MouseWheelForward:connect(function()
  2131. if scrollBar.VisibleSpace - 1 > wheelAmount then
  2132. scrollBar:ScrollTo(scrollBar.ScrollIndex - wheelAmount)
  2133. else
  2134. scrollBar:ScrollTo(scrollBar.ScrollIndex - scrollBar.VisibleSpace)
  2135. end
  2136. end)
  2137. PropertiesFrame.MouseWheelBackward:connect(function()
  2138. if scrollBar.VisibleSpace - 1 > wheelAmount then
  2139. scrollBar:ScrollTo(scrollBar.ScrollIndex + wheelAmount)
  2140. else
  2141. scrollBar:ScrollTo(scrollBar.ScrollIndex + scrollBar.VisibleSpace)
  2142. end
  2143. end)
  2144. end
  2145.  
  2146. scrollBar.VisibleSpace = math.ceil(MainFrame.AbsoluteSize.y)
  2147. scrollBar:Update()
  2148.  
  2149. showProperties(GetSelection())
  2150.  
  2151. bindSelectionChanged.Event:connect(function()
  2152. showProperties(GetSelection())
  2153. end)
  2154.  
  2155. bindSetAwait.Event:connect(function(obj)
  2156. if AwaitingObjectValue then
  2157. AwaitingObjectValue = false
  2158. local mySel = obj
  2159. if mySel then
  2160. pcall(function()
  2161. Set(AwaitingObjectObj, AwaitingObjectProp, mySel)
  2162. end)
  2163. end
  2164. end
  2165. end)
  2166.  
  2167. propertiesSearch.Changed:connect(function(prop)
  2168. if prop == "Text" then
  2169. showProperties(GetSelection())
  2170. end
  2171. end)
  2172.  
  2173. bindGetApi.OnInvoke = function()
  2174. return RbxApi
  2175. end
  2176.  
  2177. bindGetAwait.OnInvoke = function()
  2178. return AwaitingObjectValue
  2179. end
  2180. end))
  2181. ModuleScript3.Name = "RawApiJson"
  2182. ModuleScript3.Parent = LocalScript2
  2183. Frame4.Name = "Header"
  2184. Frame4.Parent = Frame1
  2185. Frame4.Position = UDim2.new(0, 0, 0, -36)
  2186. Frame4.Size = UDim2.new(1, 0, 0, 36)
  2187. Frame4.BackgroundColor = BrickColor.new("Lily white")
  2188. Frame4.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
  2189. Frame4.BorderColor = BrickColor.new("Sand violet metallic")
  2190. Frame4.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  2191. Frame4.BorderSizePixel = 0
  2192. TextLabel5.Parent = Frame4
  2193. TextLabel5.Position = UDim2.new(0, 4, 0, 0)
  2194. TextLabel5.Transparency = 1
  2195. TextLabel5.Size = UDim2.new(1, -4, 0.5, 0)
  2196. TextLabel5.BackgroundTransparency = 1
  2197. TextLabel5.Font = Enum.Font.SourceSans
  2198. TextLabel5.FontSize = Enum.FontSize.Size14
  2199. TextLabel5.Text = "Properties"
  2200. TextLabel5.TextColor = BrickColor.new("Really black")
  2201. TextLabel5.TextColor3 = Color3.new(0, 0, 0)
  2202. TextLabel5.TextSize = 14
  2203. TextLabel5.TextXAlignment = Enum.TextXAlignment.Left
  2204. TextBox6.Parent = Frame4
  2205. TextBox6.Position = UDim2.new(0, 4, 0.5, 0)
  2206. TextBox6.Transparency = 0.80000001192093
  2207. TextBox6.Size = UDim2.new(1, -8, 0.5, -3)
  2208. TextBox6.BackgroundTransparency = 0.80000001192093
  2209. TextBox6.Font = Enum.Font.SourceSans
  2210. TextBox6.FontSize = Enum.FontSize.Size14
  2211. TextBox6.Text = "Search Properties"
  2212. TextBox6.TextColor = BrickColor.new("Really black")
  2213. TextBox6.TextColor3 = Color3.new(0, 0, 0)
  2214. TextBox6.TextSize = 14
  2215. TextBox6.TextXAlignment = Enum.TextXAlignment.Left
  2216. BindableFunction7.Name = "GetApi"
  2217. BindableFunction7.Parent = Frame1
  2218. BindableFunction8.Name = "GetAwaiting"
  2219. BindableFunction8.Parent = Frame1
  2220. BindableEvent9.Name = "SetAwaiting"
  2221. BindableEvent9.Parent = Frame1
  2222. Frame10.Name = "ExplorerPanel"
  2223. Frame10.Parent = ScreenGui0
  2224. Frame10.Position = UDim2.new(1, 0, 0, 0)
  2225. Frame10.Transparency = 0.10000000149012
  2226. Frame10.Size = UDim2.new(0, 300, 0.5, 0)
  2227. Frame10.BackgroundColor = BrickColor.new("Institutional white")
  2228. Frame10.BackgroundColor3 = Color3.new(1, 1, 1)
  2229. Frame10.BackgroundTransparency = 0.10000000149012
  2230. Frame10.BorderColor = BrickColor.new("Sand violet metallic")
  2231. Frame10.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  2232. Frame10.BorderSizePixel = 0
  2233. BindableEvent11.Name = "SelectionChanged"
  2234. BindableEvent11.Parent = Frame10
  2235. BindableFunction12.Name = "SetOption"
  2236. BindableFunction12.Parent = Frame10
  2237. BindableFunction13.Name = "SetSelection"
  2238. BindableFunction13.Parent = Frame10
  2239. BindableFunction14.Name = "GetOption"
  2240. BindableFunction14.Parent = Frame10
  2241. BindableFunction15.Name = "GetSelection"
  2242. BindableFunction15.Parent = Frame10
  2243. LocalScript16.Parent = Frame10
  2244. table.insert(cors,sandbox(LocalScript16,function()
  2245. -- initial states
  2246. local Option = {
  2247. -- can modify object parents in the hierarchy
  2248. Modifiable = false;
  2249. -- can select objects
  2250. Selectable = true;
  2251. }
  2252.  
  2253. -- MERELY
  2254.  
  2255. Option.Modifiable = true
  2256.  
  2257. -- END MERELY
  2258.  
  2259. -- general size of GUI objects, in pixels
  2260. local GUI_SIZE = 16
  2261. -- padding between items within each entry
  2262. local ENTRY_PADDING = 1
  2263. -- padding between each entry
  2264. local ENTRY_MARGIN = 1
  2265.  
  2266. local explorerPanel = script.Parent
  2267. local Input = game:GetService("UserInputService")
  2268. local HoldingCtrl = false
  2269. local HoldingShift = false
  2270.  
  2271. local DexOutput = Instance.new("Folder")
  2272. DexOutput.Name = "Output"
  2273. local DexOutputMain = Instance.new("ScreenGui", DexOutput)
  2274. DexOutputMain.Name = "Dex Output"
  2275.  
  2276. print = function(...)
  2277. local Obj = Instance.new("Dialog")
  2278. Obj.Parent = DexOutputMain
  2279. Obj.Name = ""
  2280. for i,v in pairs({...}) do
  2281. Obj.Name = Obj.Name .. tostring(v) .. " "
  2282. end
  2283. end
  2284.  
  2285. explorerPanel:WaitForChild("GetPrint").OnInvoke = function()
  2286. return print
  2287. end
  2288.  
  2289.  
  2290. --[[
  2291.  
  2292. # Explorer Panel
  2293.  
  2294. A GUI panel that displays the game hierarchy.
  2295.  
  2296.  
  2297. ## Selection Bindables
  2298.  
  2299. - `Function GetSelection ( )`
  2300.  
  2301. Returns an array of objects representing the objects currently
  2302. selected in the panel.
  2303.  
  2304. - `Function SetSelection ( Objects selection )`
  2305.  
  2306. Sets the objects that are selected in the panel. `selection` is an array
  2307. of objects.
  2308.  
  2309. - `Event SelectionChanged ( )`
  2310.  
  2311. Fired after the selection changes.
  2312.  
  2313.  
  2314. ## Option Bindables
  2315.  
  2316. - `Function GetOption ( string optionName )`
  2317.  
  2318. If `optionName` is given, returns the value of that option. Otherwise,
  2319. returns a table of options and their current values.
  2320.  
  2321. - `Function SetOption ( string optionName, bool value )`
  2322.  
  2323. Sets `optionName` to `value`.
  2324.  
  2325. Options:
  2326.  
  2327. - Modifiable
  2328.  
  2329. Whether objects can be modified by the panel.
  2330.  
  2331. Note that modifying objects depends on being able to select them. If
  2332. Selectable is false, then Actions will not be available. Reparenting
  2333. is still possible, but only for the dragged object.
  2334.  
  2335. - Selectable
  2336.  
  2337. Whether objects can be selected.
  2338.  
  2339. If Modifiable is false, then left-clicking will perform a drag
  2340. selection.
  2341.  
  2342. ## Updates
  2343.  
  2344. - 2013-09-18
  2345. - Fixed explorer icons to match studio explorer.
  2346.  
  2347. - 2013-09-14
  2348. - Added GetOption and SetOption bindables.
  2349. - Option: Modifiable; sets whether objects can be modified by the panel.
  2350. - Option: Selectable; sets whether objects can be selected.
  2351. - Slight modification to left-click selection behavior.
  2352. - Improved layout and scaling.
  2353.  
  2354. - 2013-09-13
  2355. - Added drag to reparent objects.
  2356. - Left-click to select/deselect object.
  2357. - Left-click and drag unselected object to reparent single object.
  2358. - Left-click and drag selected object to move reparent entire selection.
  2359. - Right-click while dragging to cancel.
  2360.  
  2361. - 2013-09-11
  2362. - Added explorer panel header with actions.
  2363. - Added Cut action.
  2364. - Added Copy action.
  2365. - Added Paste action.
  2366. - Added Delete action.
  2367. - Added drag selection.
  2368. - Left-click: Add to selection on drag.
  2369. - Right-click: Add to or remove from selection on drag.
  2370. - Ensured SelectionChanged fires only when the selection actually changes.
  2371. - Added documentation and change log.
  2372. - Fixed thread issue.
  2373.  
  2374. - 2013-09-09
  2375. - Added basic multi-selection.
  2376. - Left-click to set selection.
  2377. - Right-click to add to or remove from selection.
  2378. - Removed "Selection" ObjectValue.
  2379. - Added GetSelection BindableFunction.
  2380. - Added SetSelection BindableFunction.
  2381. - Added SelectionChanged BindableEvent.
  2382. - Changed font to SourceSans.
  2383.  
  2384. - 2013-08-31
  2385. - Improved GUI sizing based off of `GUI_SIZE` constant.
  2386. - Automatic font size detection.
  2387.  
  2388. - 2013-08-27
  2389. - Initial explorer panel.
  2390.  
  2391.  
  2392. ## Todo
  2393.  
  2394. - Sorting
  2395. - by ExplorerOrder
  2396. - by children
  2397. - by name
  2398. - Drag objects to reparent
  2399.  
  2400. ]]
  2401.  
  2402. local ENTRY_SIZE = GUI_SIZE + ENTRY_PADDING*2
  2403. local ENTRY_BOUND = ENTRY_SIZE + ENTRY_MARGIN
  2404. local HEADER_SIZE = ENTRY_SIZE*2
  2405.  
  2406. local FONT = 'SourceSans'
  2407. local FONT_SIZE do
  2408. local size = {8,9,10,11,12,14,18,24,36,48}
  2409. local s
  2410. local n = math.huge
  2411. for i = 1,#size do
  2412. if size[i] <= GUI_SIZE then
  2413. FONT_SIZE = i - 1
  2414. end
  2415. end
  2416. end
  2417.  
  2418. local GuiColor = {
  2419. Background = Color3.new(233/255, 233/255, 233/255);
  2420. Border = Color3.new(149/255, 149/255, 149/255);
  2421. Selected = Color3.new( 96/255, 140/255, 211/255);
  2422. BorderSelected = Color3.new( 86/255, 125/255, 188/255);
  2423. Text = Color3.new( 0/255, 0/255, 0/255);
  2424. TextDisabled = Color3.new(128/255, 128/255, 128/255);
  2425. TextSelected = Color3.new(255/255, 255/255, 255/255);
  2426. Button = Color3.new(221/255, 221/255, 221/255);
  2427. ButtonBorder = Color3.new(149/255, 149/255, 149/255);
  2428. ButtonSelected = Color3.new(255/255, 0/255, 0/255);
  2429. Field = Color3.new(255/255, 255/255, 255/255);
  2430. FieldBorder = Color3.new(191/255, 191/255, 191/255);
  2431. TitleBackground = Color3.new(178/255, 178/255, 178/255);
  2432. }
  2433.  
  2434. ----------------------------------------------------------------
  2435. ----------------------------------------------------------------
  2436. ----------------------------------------------------------------
  2437. ----------------------------------------------------------------
  2438. ---- Icon map constants
  2439.  
  2440. local MAP_ID = 483448923
  2441.  
  2442. -- Indices based on implementation of Icon function.
  2443. local ACTION_CUT = 160
  2444. local ACTION_COPY = 161
  2445. local ACTION_PASTE = 162
  2446. local ACTION_DELETE = 163
  2447. local ACTION_SORT = 164
  2448. local ACTION_CUT_OVER = 174
  2449. local ACTION_COPY_OVER = 175
  2450. local ACTION_PASTE_OVER = 176
  2451. local ACTION_DELETE_OVER = 177
  2452. local ACTION_SORT_OVER = 178
  2453. local ACTION_EDITQUICKACCESS = 190
  2454. local ACTION_FREEZE = 188
  2455. local ACTION_STARRED = 189
  2456. local ACTION_ADDSTAR = 184
  2457. local ACTION_ADDSTAR_OVER = 187
  2458.  
  2459. local NODE_COLLAPSED = 165
  2460. local NODE_EXPANDED = 166
  2461. local NODE_COLLAPSED_OVER = 179
  2462. local NODE_EXPANDED_OVER = 180
  2463.  
  2464. local ExplorerIndex = {
  2465. ["Accessory"] = 32;
  2466. ["Accoutrement"] = 32;
  2467. ["AdService"] = 73;
  2468. ["Animation"] = 60;
  2469. ["AnimationController"] = 60;
  2470. ["AnimationTrack"] = 60;
  2471. ["Animator"] = 60;
  2472. ["ArcHandles"] = 56;
  2473. ["AssetService"] = 72;
  2474. ["Attachment"] = 34;
  2475. ["Backpack"] = 20;
  2476. ["BadgeService"] = 75;
  2477. ["BallSocketConstraint"] = 89;
  2478. ["BillboardGui"] = 64;
  2479. ["BinaryStringValue"] = 4;
  2480. ["BindableEvent"] = 67;
  2481. ["BindableFunction"] = 66;
  2482. ["BlockMesh"] = 8;
  2483. ["BloomEffect"] = 90;
  2484. ["BlurEffect"] = 90;
  2485. ["BodyAngularVelocity"] = 14;
  2486. ["BodyForce"] = 14;
  2487. ["BodyGyro"] = 14;
  2488. ["BodyPosition"] = 14;
  2489. ["BodyThrust"] = 14;
  2490. ["BodyVelocity"] = 14;
  2491. ["BoolValue"] = 4;
  2492. ["BoxHandleAdornment"] = 54;
  2493. ["BrickColorValue"] = 4;
  2494. ["Camera"] = 5;
  2495. ["CFrameValue"] = 4;
  2496. ["CharacterMesh"] = 60;
  2497. ["Chat"] = 33;
  2498. ["ClickDetector"] = 41;
  2499. ["CollectionService"] = 30;
  2500. ["Color3Value"] = 4;
  2501. ["ColorCorrectionEffect"] = 90;
  2502. ["ConeHandleAdornment"] = 54;
  2503. ["Configuration"] = 58;
  2504. ["ContentProvider"] = 72;
  2505. ["ContextActionService"] = 41;
  2506. ["CoreGui"] = 46;
  2507. ["CoreScript"] = 18;
  2508. ["CornerWedgePart"] = 1;
  2509. ["CustomEvent"] = 4;
  2510. ["CustomEventReceiver"] = 4;
  2511. ["CylinderHandleAdornment"] = 54;
  2512. ["CylinderMesh"] = 8;
  2513. ["CylindricalConstraint"] = 89;
  2514. ["Debris"] = 30;
  2515. ["Decal"] = 7;
  2516. ["Dialog"] = 62;
  2517. ["DialogChoice"] = 63;
  2518. ["DoubleConstrainedValue"] = 4;
  2519. ["Explosion"] = 36;
  2520. ["FileMesh"] = 8;
  2521. ["Fire"] = 61;
  2522. ["Flag"] = 38;
  2523. ["FlagStand"] = 39;
  2524. ["FloorWire"] = 4;
  2525. ["Folder"] = 70;
  2526. ["ForceField"] = 37;
  2527. ["Frame"] = 48;
  2528. ["GamePassService"] = 19;
  2529. ["Glue"] = 34;
  2530. ["GuiButton"] = 52;
  2531. ["GuiMain"] = 47;
  2532. ["GuiService"] = 47;
  2533. ["Handles"] = 53;
  2534. ["HapticService"] = 84;
  2535. ["Hat"] = 45;
  2536. ["HingeConstraint"] = 89;
  2537. ["Hint"] = 33;
  2538. ["HopperBin"] = 22;
  2539. ["HttpService"] = 76;
  2540. ["Humanoid"] = 9;
  2541. ["ImageButton"] = 52;
  2542. ["ImageLabel"] = 49;
  2543. ["InsertService"] = 72;
  2544. ["IntConstrainedValue"] = 4;
  2545. ["IntValue"] = 4;
  2546. ["JointInstance"] = 34;
  2547. ["JointsService"] = 34;
  2548. ["Keyframe"] = 60;
  2549. ["KeyframeSequence"] = 60;
  2550. ["KeyframeSequenceProvider"] = 60;
  2551. ["Lighting"] = 13;
  2552. ["LineHandleAdornment"] = 54;
  2553. ["LocalScript"] = 18;
  2554. ["LogService"] = 87;
  2555. ["MarketplaceService"] = 46;
  2556. ["Message"] = 33;
  2557. ["Model"] = 2;
  2558. ["ModuleScript"] = 71;
  2559. ["Motor"] = 34;
  2560. ["Motor6D"] = 34;
  2561. ["MoveToConstraint"] = 89;
  2562. ["NegateOperation"] = 78;
  2563. ["NetworkClient"] = 16;
  2564. ["NetworkReplicator"] = 29;
  2565. ["NetworkServer"] = 15;
  2566. ["NumberValue"] = 4;
  2567. ["ObjectValue"] = 4;
  2568. ["Pants"] = 44;
  2569. ["ParallelRampPart"] = 1;
  2570. ["Part"] = 1;
  2571. ["ParticleEmitter"] = 69;
  2572. ["PartPairLasso"] = 57;
  2573. ["PathfindingService"] = 37;
  2574. ["Platform"] = 35;
  2575. ["Player"] = 12;
  2576. ["PlayerGui"] = 46;
  2577. ["Players"] = 21;
  2578. ["PlayerScripts"] = 82;
  2579. ["PointLight"] = 13;
  2580. ["PointsService"] = 83;
  2581. ["Pose"] = 60;
  2582. ["PrismaticConstraint"] = 89;
  2583. ["PrismPart"] = 1;
  2584. ["PyramidPart"] = 1;
  2585. ["RayValue"] = 4;
  2586. ["ReflectionMetadata"] = 86;
  2587. ["ReflectionMetadataCallbacks"] = 86;
  2588. ["ReflectionMetadataClass"] = 86;
  2589. ["ReflectionMetadataClasses"] = 86;
  2590. ["ReflectionMetadataEnum"] = 86;
  2591. ["ReflectionMetadataEnumItem"] = 86;
  2592. ["ReflectionMetadataEnums"] = 86;
  2593. ["ReflectionMetadataEvents"] = 86;
  2594. ["ReflectionMetadataFunctions"] = 86;
  2595. ["ReflectionMetadataMember"] = 86;
  2596. ["ReflectionMetadataProperties"] = 86;
  2597. ["ReflectionMetadataYieldFunctions"] = 86;
  2598. ["RemoteEvent"] = 80;
  2599. ["RemoteFunction"] = 79;
  2600. ["ReplicatedFirst"] = 72;
  2601. ["ReplicatedStorage"] = 72;
  2602. ["RightAngleRampPart"] = 1;
  2603. ["RocketPropulsion"] = 14;
  2604. ["RodConstraint"] = 89;
  2605. ["RopeConstraint"] = 89;
  2606. ["Rotate"] = 34;
  2607. ["RotateP"] = 34;
  2608. ["RotateV"] = 34;
  2609. ["RunService"] = 66;
  2610. ["ScreenGui"] = 47;
  2611. ["Script"] = 6;
  2612. ["ScrollingFrame"] = 48;
  2613. ["Seat"] = 35;
  2614. ["Selection"] = 55;
  2615. ["SelectionBox"] = 54;
  2616. ["SelectionPartLasso"] = 57;
  2617. ["SelectionPointLasso"] = 57;
  2618. ["SelectionSphere"] = 54;
  2619. ["ServerScriptService"] = 0;
  2620. ["ServerStorage"] = 74;
  2621. ["Shirt"] = 43;
  2622. ["ShirtGraphic"] = 40;
  2623. ["SkateboardPlatform"] = 35;
  2624. ["Sky"] = 28;
  2625. ["SlidingBallConstraint"] = 89;
  2626. ["Smoke"] = 59;
  2627. ["Snap"] = 34;
  2628. ["Sound"] = 11;
  2629. ["SoundService"] = 31;
  2630. ["Sparkles"] = 42;
  2631. ["SpawnLocation"] = 25;
  2632. ["SpecialMesh"] = 8;
  2633. ["SphereHandleAdornment"] = 54;
  2634. ["SpotLight"] = 13;
  2635. ["SpringConstraint"] = 89;
  2636. ["StarterCharacterScripts"] = 82;
  2637. ["StarterGear"] = 20;
  2638. ["StarterGui"] = 46;
  2639. ["StarterPack"] = 20;
  2640. ["StarterPlayer"] = 88;
  2641. ["StarterPlayerScripts"] = 82;
  2642. ["Status"] = 2;
  2643. ["StringValue"] = 4;
  2644. ["SunRaysEffect"] = 90;
  2645. ["SurfaceGui"] = 64;
  2646. ["SurfaceLight"] = 13;
  2647. ["SurfaceSelection"] = 55;
  2648. ["Team"] = 24;
  2649. ["Teams"] = 23;
  2650. ["TeleportService"] = 81;
  2651. ["Terrain"] = 65;
  2652. ["TerrainRegion"] = 65;
  2653. ["TestService"] = 68;
  2654. ["TextBox"] = 51;
  2655. ["TextButton"] = 51;
  2656. ["TextLabel"] = 50;
  2657. ["Texture"] = 10;
  2658. ["TextureTrail"] = 4;
  2659. ["Tool"] = 17;
  2660. ["TouchTransmitter"] = 37;
  2661. ["TrussPart"] = 1;
  2662. ["UnionOperation"] = 77;
  2663. ["UserInputService"] = 84;
  2664. ["Vector3Value"] = 4;
  2665. ["VehicleSeat"] = 35;
  2666. ["VelocityMotor"] = 34;
  2667. ["WedgePart"] = 1;
  2668. ["Weld"] = 34;
  2669. ["Workspace"] = 19;
  2670. }
  2671.  
  2672. ----------------------------------------------------------------
  2673. ----------------------------------------------------------------
  2674. ----------------------------------------------------------------
  2675. ----------------------------------------------------------------
  2676. ----------------------------------------------------------------
  2677.  
  2678. function Create(ty,data)
  2679. local obj
  2680. if type(ty) == 'string' then
  2681. obj = Instance.new(ty)
  2682. else
  2683. obj = ty
  2684. end
  2685. for k, v in pairs(data) do
  2686. if type(k) == 'number' then
  2687. v.Parent = obj
  2688. else
  2689. obj[k] = v
  2690. end
  2691. end
  2692. return obj
  2693. end
  2694.  
  2695. local barActive = false
  2696. local activeOptions = {}
  2697.  
  2698. function createDDown(dBut, callback,...)
  2699. if barActive then
  2700. for i,v in pairs(activeOptions) do
  2701. v:Destroy()
  2702. end
  2703. activeOptions = {}
  2704. barActive = false
  2705. return
  2706. else
  2707. barActive = true
  2708. end
  2709. local slots = {...}
  2710. local base = dBut
  2711. for i,v in pairs(slots) do
  2712. local newOption = base:Clone()
  2713. newOption.ZIndex = 5
  2714. newOption.Name = "Option "..tostring(i)
  2715. newOption.Parent = base.Parent.Parent.Parent
  2716. newOption.BackgroundTransparency = 0
  2717. newOption.ZIndex = 2
  2718. table.insert(activeOptions,newOption)
  2719. newOption.Position = UDim2.new(-0.4, dBut.Position.X.Offset, dBut.Position.Y.Scale, dBut.Position.Y.Offset + (#activeOptions * dBut.Size.Y.Offset))
  2720. newOption.Text = slots[i]
  2721. newOption.MouseButton1Down:connect(function()
  2722. dBut.Text = slots[i]
  2723. callback(slots[i])
  2724. for i,v in pairs(activeOptions) do
  2725. v:Destroy()
  2726. end
  2727. activeOptions = {}
  2728. barActive = false
  2729. end)
  2730. end
  2731. end
  2732.  
  2733. -- Connects a function to an event such that it fires asynchronously
  2734. function Connect(event,func)
  2735. return event:connect(function(...)
  2736. local a = {...}
  2737. spawn(function() func(unpack(a)) end)
  2738. end)
  2739. end
  2740.  
  2741. -- returns the ascendant ScreenGui of an object
  2742. function GetScreen(screen)
  2743. if screen == nil then return nil end
  2744. while not screen:IsA("ScreenGui") do
  2745. screen = screen.Parent
  2746. if screen == nil then return nil end
  2747. end
  2748. return screen
  2749. end
  2750.  
  2751. do
  2752. local ZIndexLock = {}
  2753. -- Sets the ZIndex of an object and its descendants. Objects are locked so
  2754. -- that SetZIndexOnChanged doesn't spawn multiple threads that set the
  2755. -- ZIndex of the same object.
  2756. function SetZIndex(object,z)
  2757. if not ZIndexLock[object] then
  2758. ZIndexLock[object] = true
  2759. if object:IsA'GuiObject' then
  2760. object.ZIndex = z
  2761. end
  2762. local children = object:GetChildren()
  2763. for i = 1,#children do
  2764. SetZIndex(children[i],z)
  2765. end
  2766. ZIndexLock[object] = nil
  2767. end
  2768. end
  2769.  
  2770. function SetZIndexOnChanged(object)
  2771. return object.Changed:connect(function(p)
  2772. if p == "ZIndex" then
  2773. SetZIndex(object,object.ZIndex)
  2774. end
  2775. end)
  2776. end
  2777. end
  2778.  
  2779. ---- IconMap ----
  2780. -- Image size: 256px x 256px
  2781. -- Icon size: 16px x 16px
  2782. -- Padding between each icon: 2px
  2783. -- Padding around image edge: 1px
  2784. -- Total icons: 14 x 14 (196)
  2785. local Icon do
  2786. local iconMap = 'http://www.roblox.com/asset/?id=' .. MAP_ID
  2787. game:GetService('ContentProvider'):Preload(iconMap)
  2788. local iconDehash do
  2789. -- 14 x 14, 0-based input, 0-based output
  2790. local f=math.floor
  2791. function iconDehash(h)
  2792. return f(h/14%14),f(h%14)
  2793. end
  2794. end
  2795.  
  2796. function Icon(IconFrame,index)
  2797. local row,col = iconDehash(index)
  2798. local mapSize = Vector2.new(256,256)
  2799. local pad,border = 2,1
  2800. local iconSize = 16
  2801.  
  2802. local class = 'Frame'
  2803. if type(IconFrame) == 'string' then
  2804. class = IconFrame
  2805. IconFrame = nil
  2806. end
  2807.  
  2808. if not IconFrame then
  2809. IconFrame = Create(class,{
  2810. Name = "Icon";
  2811. BackgroundTransparency = 1;
  2812. ClipsDescendants = true;
  2813. Create('ImageLabel',{
  2814. Name = "IconMap";
  2815. Active = false;
  2816. BackgroundTransparency = 1;
  2817. Image = iconMap;
  2818. Size = UDim2.new(mapSize.x/iconSize,0,mapSize.y/iconSize,0);
  2819. });
  2820. })
  2821. end
  2822.  
  2823. IconFrame.IconMap.Position = UDim2.new(-col - (pad*(col+1) + border)/iconSize,0,-row - (pad*(row+1) + border)/iconSize,0)
  2824. return IconFrame
  2825. end
  2826. end
  2827.  
  2828. ----------------------------------------------------------------
  2829. ----------------------------------------------------------------
  2830. ----------------------------------------------------------------
  2831. ----------------------------------------------------------------
  2832. ---- ScrollBar
  2833. do
  2834. -- AutoButtonColor doesn't always reset properly
  2835. local function ResetButtonColor(button)
  2836. local active = button.Active
  2837. button.Active = not active
  2838. button.Active = active
  2839. end
  2840.  
  2841. local function ArrowGraphic(size,dir,scaled,template)
  2842. local Frame = Create('Frame',{
  2843. Name = "Arrow Graphic";
  2844. BorderSizePixel = 0;
  2845. Size = UDim2.new(0,size,0,size);
  2846. Transparency = 1;
  2847. })
  2848. if not template then
  2849. template = Instance.new("Frame")
  2850. template.BorderSizePixel = 0
  2851. end
  2852.  
  2853. local transform
  2854. if dir == nil or dir == 'Up' then
  2855. function transform(p,s) return p,s end
  2856. elseif dir == 'Down' then
  2857. function transform(p,s) return UDim2.new(0,p.X.Offset,0,size-p.Y.Offset-1),s end
  2858. elseif dir == 'Left' then
  2859. 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
  2860. elseif dir == 'Right' then
  2861. 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
  2862. end
  2863.  
  2864. local scale
  2865. if scaled then
  2866. 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
  2867. else
  2868. function scale(p,s) return p,s end
  2869. end
  2870.  
  2871. local o = math.floor(size/4)
  2872. if size%2 == 0 then
  2873. local n = size/2-1
  2874. for i = 0,n do
  2875. local t = template:Clone()
  2876. local p,s = scale(transform(
  2877. UDim2.new(0,n-i,0,o+i),
  2878. UDim2.new(0,(i+1)*2,0,1)
  2879. ))
  2880. t.Position = p
  2881. t.Size = s
  2882. t.Parent = Frame
  2883. end
  2884. else
  2885. local n = (size-1)/2
  2886. for i = 0,n do
  2887. local t = template:Clone()
  2888. local p,s = scale(transform(
  2889. UDim2.new(0,n-i,0,o+i),
  2890. UDim2.new(0,i*2+1,0,1)
  2891. ))
  2892. t.Position = p
  2893. t.Size = s
  2894. t.Parent = Frame
  2895. end
  2896. end
  2897. if size%4 > 1 then
  2898. local t = template:Clone()
  2899. local p,s = scale(transform(
  2900. UDim2.new(0,0,0,size-o-1),
  2901. UDim2.new(0,size,0,1)
  2902. ))
  2903. t.Position = p
  2904. t.Size = s
  2905. t.Parent = Frame
  2906. end
  2907. return Frame
  2908. end
  2909.  
  2910.  
  2911. local function GripGraphic(size,dir,spacing,scaled,template)
  2912. local Frame = Create('Frame',{
  2913. Name = "Grip Graphic";
  2914. BorderSizePixel = 0;
  2915. Size = UDim2.new(0,size.x,0,size.y);
  2916. Transparency = 1;
  2917. })
  2918. if not template then
  2919. template = Instance.new("Frame")
  2920. template.BorderSizePixel = 0
  2921. end
  2922.  
  2923. spacing = spacing or 2
  2924.  
  2925. local scale
  2926. if scaled then
  2927. function scale(p) return UDim2.new(p.X.Offset/size.x,0,p.Y.Offset/size.y,0) end
  2928. else
  2929. function scale(p) return p end
  2930. end
  2931.  
  2932. if dir == 'Vertical' then
  2933. for i=0,size.x-1,spacing do
  2934. local t = template:Clone()
  2935. t.Size = scale(UDim2.new(0,1,0,size.y))
  2936. t.Position = scale(UDim2.new(0,i,0,0))
  2937. t.Parent = Frame
  2938. end
  2939. elseif dir == nil or dir == 'Horizontal' then
  2940. for i=0,size.y-1,spacing do
  2941. local t = template:Clone()
  2942. t.Size = scale(UDim2.new(0,size.x,0,1))
  2943. t.Position = scale(UDim2.new(0,0,0,i))
  2944. t.Parent = Frame
  2945. end
  2946. end
  2947.  
  2948. return Frame
  2949. end
  2950.  
  2951. local mt = {
  2952. __index = {
  2953. GetScrollPercent = function(self)
  2954. return self.ScrollIndex/(self.TotalSpace-self.VisibleSpace)
  2955. end;
  2956. CanScrollDown = function(self)
  2957. return self.ScrollIndex + self.VisibleSpace < self.TotalSpace
  2958. end;
  2959. CanScrollUp = function(self)
  2960. return self.ScrollIndex > 0
  2961. end;
  2962. ScrollDown = function(self)
  2963. self.ScrollIndex = self.ScrollIndex + self.PageIncrement
  2964. self:Update()
  2965. end;
  2966. ScrollUp = function(self)
  2967. self.ScrollIndex = self.ScrollIndex - self.PageIncrement
  2968. self:Update()
  2969. end;
  2970. ScrollTo = function(self,index)
  2971. self.ScrollIndex = index
  2972. self:Update()
  2973. end;
  2974. SetScrollPercent = function(self,percent)
  2975. self.ScrollIndex = math.floor((self.TotalSpace - self.VisibleSpace)*percent + 0.5)
  2976. self:Update()
  2977. end;
  2978. };
  2979. }
  2980. mt.__index.CanScrollRight = mt.__index.CanScrollDown
  2981. mt.__index.CanScrollLeft = mt.__index.CanScrollUp
  2982. mt.__index.ScrollLeft = mt.__index.ScrollUp
  2983. mt.__index.ScrollRight = mt.__index.ScrollDown
  2984.  
  2985. function ScrollBar(horizontal)
  2986. -- create row scroll bar
  2987. local ScrollFrame = Create('Frame',{
  2988. Name = "ScrollFrame";
  2989. Position = horizontal and UDim2.new(0,0,1,-GUI_SIZE) or UDim2.new(1,-GUI_SIZE,0,0);
  2990. Size = horizontal and UDim2.new(1,0,0,GUI_SIZE) or UDim2.new(0,GUI_SIZE,1,0);
  2991. BackgroundTransparency = 1;
  2992. Create('ImageButton',{
  2993. Name = "ScrollDown";
  2994. Position = horizontal and UDim2.new(1,-GUI_SIZE,0,0) or UDim2.new(0,0,1,-GUI_SIZE);
  2995. Size = UDim2.new(0, GUI_SIZE, 0, GUI_SIZE);
  2996. BackgroundColor3 = GuiColor.Button;
  2997. BorderColor3 = GuiColor.Border;
  2998. --BorderSizePixel = 0;
  2999. });
  3000. Create('ImageButton',{
  3001. Name = "ScrollUp";
  3002. Size = UDim2.new(0, GUI_SIZE, 0, GUI_SIZE);
  3003. BackgroundColor3 = GuiColor.Button;
  3004. BorderColor3 = GuiColor.Border;
  3005. --BorderSizePixel = 0;
  3006. });
  3007. Create('ImageButton',{
  3008. Name = "ScrollBar";
  3009. Size = horizontal and UDim2.new(1,-GUI_SIZE*2,1,0) or UDim2.new(1,0,1,-GUI_SIZE*2);
  3010. Position = horizontal and UDim2.new(0,GUI_SIZE,0,0) or UDim2.new(0,0,0,GUI_SIZE);
  3011. AutoButtonColor = false;
  3012. BackgroundColor3 = Color3.new(0.94902, 0.94902, 0.94902);
  3013. BorderColor3 = GuiColor.Border;
  3014. --BorderSizePixel = 0;
  3015. Create('ImageButton',{
  3016. Name = "ScrollThumb";
  3017. AutoButtonColor = false;
  3018. Size = UDim2.new(0, GUI_SIZE, 0, GUI_SIZE);
  3019. BackgroundColor3 = GuiColor.Button;
  3020. BorderColor3 = GuiColor.Border;
  3021. --BorderSizePixel = 0;
  3022. });
  3023. });
  3024. })
  3025.  
  3026. local graphicTemplate = Create('Frame',{
  3027. Name="Graphic";
  3028. BorderSizePixel = 0;
  3029. BackgroundColor3 = GuiColor.Border;
  3030. })
  3031. local graphicSize = GUI_SIZE/2
  3032.  
  3033. local ScrollDownFrame = ScrollFrame.ScrollDown
  3034. local ScrollDownGraphic = ArrowGraphic(graphicSize,horizontal and 'Right' or 'Down',true,graphicTemplate)
  3035. ScrollDownGraphic.Position = UDim2.new(0.5,-graphicSize/2,0.5,-graphicSize/2)
  3036. ScrollDownGraphic.Parent = ScrollDownFrame
  3037. local ScrollUpFrame = ScrollFrame.ScrollUp
  3038. local ScrollUpGraphic = ArrowGraphic(graphicSize,horizontal and 'Left' or 'Up',true,graphicTemplate)
  3039. ScrollUpGraphic.Position = UDim2.new(0.5,-graphicSize/2,0.5,-graphicSize/2)
  3040. ScrollUpGraphic.Parent = ScrollUpFrame
  3041. local ScrollBarFrame = ScrollFrame.ScrollBar
  3042. local ScrollThumbFrame = ScrollBarFrame.ScrollThumb
  3043. do
  3044. local size = GUI_SIZE*3/8
  3045. local Decal = GripGraphic(Vector2.new(size,size),horizontal and 'Vertical' or 'Horizontal',2,graphicTemplate)
  3046. Decal.Position = UDim2.new(0.5,-size/2,0.5,-size/2)
  3047. Decal.Parent = ScrollThumbFrame
  3048. end
  3049.  
  3050. local Class = setmetatable({
  3051. GUI = ScrollFrame;
  3052. ScrollIndex = 0;
  3053. VisibleSpace = 0;
  3054. TotalSpace = 0;
  3055. PageIncrement = 1;
  3056. },mt)
  3057.  
  3058. local UpdateScrollThumb
  3059. if horizontal then
  3060. function UpdateScrollThumb()
  3061. ScrollThumbFrame.Size = UDim2.new(Class.VisibleSpace/Class.TotalSpace,0,0,GUI_SIZE)
  3062. if ScrollThumbFrame.AbsoluteSize.x < GUI_SIZE then
  3063. ScrollThumbFrame.Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE)
  3064. end
  3065. local barSize = ScrollBarFrame.AbsoluteSize.x
  3066. ScrollThumbFrame.Position = UDim2.new(Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.x)/barSize,0,0,0)
  3067. end
  3068. else
  3069. function UpdateScrollThumb()
  3070. ScrollThumbFrame.Size = UDim2.new(0,GUI_SIZE,Class.VisibleSpace/Class.TotalSpace,0)
  3071. if ScrollThumbFrame.AbsoluteSize.y < GUI_SIZE then
  3072. ScrollThumbFrame.Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE)
  3073. end
  3074. local barSize = ScrollBarFrame.AbsoluteSize.y
  3075. ScrollThumbFrame.Position = UDim2.new(0,0,Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.y)/barSize,0)
  3076. end
  3077. end
  3078.  
  3079. local lastDown
  3080. local lastUp
  3081. local scrollStyle = {BackgroundColor3=GuiColor.Border,BackgroundTransparency=0}
  3082. local scrollStyle_ds = {BackgroundColor3=GuiColor.Border,BackgroundTransparency=0.7}
  3083.  
  3084. local function Update()
  3085. local t = Class.TotalSpace
  3086. local v = Class.VisibleSpace
  3087. local s = Class.ScrollIndex
  3088. if v <= t then
  3089. if s > 0 then
  3090. if s + v > t then
  3091. Class.ScrollIndex = t - v
  3092. end
  3093. else
  3094. Class.ScrollIndex = 0
  3095. end
  3096. else
  3097. Class.ScrollIndex = 0
  3098. end
  3099.  
  3100. if Class.UpdateCallback then
  3101. if Class.UpdateCallback(Class) == false then
  3102. return
  3103. end
  3104. end
  3105.  
  3106. local down = Class:CanScrollDown()
  3107. local up = Class:CanScrollUp()
  3108. if down ~= lastDown then
  3109. lastDown = down
  3110. ScrollDownFrame.Active = down
  3111. ScrollDownFrame.AutoButtonColor = down
  3112. local children = ScrollDownGraphic:GetChildren()
  3113. local style = down and scrollStyle or scrollStyle_ds
  3114. for i = 1,#children do
  3115. Create(children[i],style)
  3116. end
  3117. end
  3118. if up ~= lastUp then
  3119. lastUp = up
  3120. ScrollUpFrame.Active = up
  3121. ScrollUpFrame.AutoButtonColor = up
  3122. local children = ScrollUpGraphic:GetChildren()
  3123. local style = up and scrollStyle or scrollStyle_ds
  3124. for i = 1,#children do
  3125. Create(children[i],style)
  3126. end
  3127. end
  3128. ScrollThumbFrame.Visible = down or up
  3129. UpdateScrollThumb()
  3130. end
  3131. Class.Update = Update
  3132.  
  3133. SetZIndexOnChanged(ScrollFrame)
  3134.  
  3135. local MouseDrag = Create('ImageButton',{
  3136. Name = "MouseDrag";
  3137. Position = UDim2.new(-0.25,0,-0.25,0);
  3138. Size = UDim2.new(1.5,0,1.5,0);
  3139. Transparency = 1;
  3140. AutoButtonColor = false;
  3141. Active = true;
  3142. ZIndex = 10;
  3143. })
  3144.  
  3145. local scrollEventID = 0
  3146. ScrollDownFrame.MouseButton1Down:connect(function()
  3147. scrollEventID = tick()
  3148. local current = scrollEventID
  3149. local up_con
  3150. up_con = MouseDrag.MouseButton1Up:connect(function()
  3151. scrollEventID = tick()
  3152. MouseDrag.Parent = nil
  3153. ResetButtonColor(ScrollDownFrame)
  3154. up_con:disconnect(); drag = nil
  3155. end)
  3156. MouseDrag.Parent = GetScreen(ScrollFrame)
  3157. Class:ScrollDown()
  3158. wait(0.2) -- delay before auto scroll
  3159. while scrollEventID == current do
  3160. Class:ScrollDown()
  3161. if not Class:CanScrollDown() then break end
  3162. wait()
  3163. end
  3164. end)
  3165.  
  3166. ScrollDownFrame.MouseButton1Up:connect(function()
  3167. scrollEventID = tick()
  3168. end)
  3169.  
  3170. ScrollUpFrame.MouseButton1Down:connect(function()
  3171. scrollEventID = tick()
  3172. local current = scrollEventID
  3173. local up_con
  3174. up_con = MouseDrag.MouseButton1Up:connect(function()
  3175. scrollEventID = tick()
  3176. MouseDrag.Parent = nil
  3177. ResetButtonColor(ScrollUpFrame)
  3178. up_con:disconnect(); drag = nil
  3179. end)
  3180. MouseDrag.Parent = GetScreen(ScrollFrame)
  3181. Class:ScrollUp()
  3182. wait(0.2)
  3183. while scrollEventID == current do
  3184. Class:ScrollUp()
  3185. if not Class:CanScrollUp() then break end
  3186. wait()
  3187. end
  3188. end)
  3189.  
  3190. ScrollUpFrame.MouseButton1Up:connect(function()
  3191. scrollEventID = tick()
  3192. end)
  3193.  
  3194. if horizontal then
  3195. ScrollBarFrame.MouseButton1Down:connect(function(x,y)
  3196. scrollEventID = tick()
  3197. local current = scrollEventID
  3198. local up_con
  3199. up_con = MouseDrag.MouseButton1Up:connect(function()
  3200. scrollEventID = tick()
  3201. MouseDrag.Parent = nil
  3202. ResetButtonColor(ScrollUpFrame)
  3203. up_con:disconnect(); drag = nil
  3204. end)
  3205. MouseDrag.Parent = GetScreen(ScrollFrame)
  3206. if x > ScrollThumbFrame.AbsolutePosition.x then
  3207. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  3208. wait(0.2)
  3209. while scrollEventID == current do
  3210. if x < ScrollThumbFrame.AbsolutePosition.x + ScrollThumbFrame.AbsoluteSize.x then break end
  3211. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  3212. wait()
  3213. end
  3214. else
  3215. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  3216. wait(0.2)
  3217. while scrollEventID == current do
  3218. if x > ScrollThumbFrame.AbsolutePosition.x then break end
  3219. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  3220. wait()
  3221. end
  3222. end
  3223. end)
  3224. else
  3225. ScrollBarFrame.MouseButton1Down:connect(function(x,y)
  3226. scrollEventID = tick()
  3227. local current = scrollEventID
  3228. local up_con
  3229. up_con = MouseDrag.MouseButton1Up:connect(function()
  3230. scrollEventID = tick()
  3231. MouseDrag.Parent = nil
  3232. ResetButtonColor(ScrollUpFrame)
  3233. up_con:disconnect(); drag = nil
  3234. end)
  3235. MouseDrag.Parent = GetScreen(ScrollFrame)
  3236. if y > ScrollThumbFrame.AbsolutePosition.y then
  3237. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  3238. wait(0.2)
  3239. while scrollEventID == current do
  3240. if y < ScrollThumbFrame.AbsolutePosition.y + ScrollThumbFrame.AbsoluteSize.y then break end
  3241. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  3242. wait()
  3243. end
  3244. else
  3245. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  3246. wait(0.2)
  3247. while scrollEventID == current do
  3248. if y > ScrollThumbFrame.AbsolutePosition.y then break end
  3249. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  3250. wait()
  3251. end
  3252. end
  3253. end)
  3254. end
  3255.  
  3256. if horizontal then
  3257. ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
  3258. scrollEventID = tick()
  3259. local mouse_offset = x - ScrollThumbFrame.AbsolutePosition.x
  3260. local drag_con
  3261. local up_con
  3262. drag_con = MouseDrag.MouseMoved:connect(function(x,y)
  3263. local bar_abs_pos = ScrollBarFrame.AbsolutePosition.x
  3264. local bar_drag = ScrollBarFrame.AbsoluteSize.x - ScrollThumbFrame.AbsoluteSize.x
  3265. local bar_abs_one = bar_abs_pos + bar_drag
  3266. x = x - mouse_offset
  3267. x = x < bar_abs_pos and bar_abs_pos or x > bar_abs_one and bar_abs_one or x
  3268. x = x - bar_abs_pos
  3269. Class:SetScrollPercent(x/(bar_drag))
  3270. end)
  3271. up_con = MouseDrag.MouseButton1Up:connect(function()
  3272. scrollEventID = tick()
  3273. MouseDrag.Parent = nil
  3274. ResetButtonColor(ScrollThumbFrame)
  3275. drag_con:disconnect(); drag_con = nil
  3276. up_con:disconnect(); drag = nil
  3277. end)
  3278. MouseDrag.Parent = GetScreen(ScrollFrame)
  3279. end)
  3280. else
  3281. ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
  3282. scrollEventID = tick()
  3283. local mouse_offset = y - ScrollThumbFrame.AbsolutePosition.y
  3284. local drag_con
  3285. local up_con
  3286. drag_con = MouseDrag.MouseMoved:connect(function(x,y)
  3287. local bar_abs_pos = ScrollBarFrame.AbsolutePosition.y
  3288. local bar_drag = ScrollBarFrame.AbsoluteSize.y - ScrollThumbFrame.AbsoluteSize.y
  3289. local bar_abs_one = bar_abs_pos + bar_drag
  3290. y = y - mouse_offset
  3291. y = y < bar_abs_pos and bar_abs_pos or y > bar_abs_one and bar_abs_one or y
  3292. y = y - bar_abs_pos
  3293. Class:SetScrollPercent(y/(bar_drag))
  3294. end)
  3295. up_con = MouseDrag.MouseButton1Up:connect(function()
  3296. scrollEventID = tick()
  3297. MouseDrag.Parent = nil
  3298. ResetButtonColor(ScrollThumbFrame)
  3299. drag_con:disconnect(); drag_con = nil
  3300. up_con:disconnect(); drag = nil
  3301. end)
  3302. MouseDrag.Parent = GetScreen(ScrollFrame)
  3303. end)
  3304. end
  3305.  
  3306. function Class:Destroy()
  3307. ScrollFrame:Destroy()
  3308. MouseDrag:Destroy()
  3309. for k in pairs(Class) do
  3310. Class[k] = nil
  3311. end
  3312. setmetatable(Class,nil)
  3313. end
  3314.  
  3315. Update()
  3316.  
  3317. return Class
  3318. end
  3319. end
  3320.  
  3321. ----------------------------------------------------------------
  3322. ----------------------------------------------------------------
  3323. ----------------------------------------------------------------
  3324. ----------------------------------------------------------------
  3325. ---- Explorer panel
  3326.  
  3327. Create(explorerPanel,{
  3328. BackgroundColor3 = GuiColor.Field;
  3329. BorderColor3 = GuiColor.Border;
  3330. Active = true;
  3331. })
  3332.  
  3333. local SettingsRemote = explorerPanel.Parent:WaitForChild("SettingsPanel"):WaitForChild("GetSetting")
  3334. local GetApiRemote = explorerPanel.Parent:WaitForChild("PropertiesFrame"):WaitForChild("GetApi")
  3335. local GetAwaitRemote = explorerPanel.Parent:WaitForChild("PropertiesFrame"):WaitForChild("GetAwaiting")
  3336. local bindSetAwaiting = explorerPanel.Parent:WaitForChild("PropertiesFrame"):WaitForChild("SetAwaiting")
  3337.  
  3338. local SaveInstanceWindow = explorerPanel.Parent:WaitForChild("SaveInstance")
  3339. local ConfirmationWindow = explorerPanel.Parent:WaitForChild("Confirmation")
  3340. local CautionWindow = explorerPanel.Parent:WaitForChild("Caution")
  3341. local TableCautionWindow = explorerPanel.Parent:WaitForChild("TableCaution")
  3342.  
  3343. local RemoteWindow = explorerPanel.Parent:WaitForChild("CallRemote")
  3344.  
  3345. local ScriptEditor = explorerPanel.Parent:WaitForChild("ScriptEditor")
  3346. local ScriptEditorEvent = ScriptEditor:WaitForChild("OpenScript")
  3347.  
  3348. local CurrentSaveInstanceWindow
  3349. local CurrentRemoteWindow
  3350.  
  3351. local lastSelectedNode
  3352.  
  3353. local DexStorage
  3354. local DexStorageMain
  3355. local DexStorageEnabled
  3356.  
  3357. if saveinstance then DexStorageEnabled = true end
  3358.  
  3359. if DexStorageEnabled then
  3360. DexStorage = Instance.new("Folder")
  3361. DexStorage.Name = "Dex"
  3362. DexStorageMain = Instance.new("Folder",DexStorage)
  3363. DexStorageMain.Name = "DexStorage"
  3364. end
  3365.  
  3366. local NilStorage
  3367. local NilStorageMain
  3368. local NilStorageEnabled
  3369.  
  3370. if get_nil_instances and IfThisFunctionWasStableEnough then NilStorageEnabled = true end
  3371.  
  3372. if NilStorageEnabled then
  3373. NilStorage = Instance.new("Folder")
  3374. NilStorage.Name = "Dex Internal Storage"
  3375. NilStorageMain = Instance.new("Folder",NilStorage)
  3376. NilStorageMain.Name = "Nil Instances"
  3377. end
  3378.  
  3379. local listFrame = Create('Frame',{
  3380. Name = "List";
  3381. BackgroundTransparency = 1;
  3382. ClipsDescendants = true;
  3383. Position = UDim2.new(0,0,0,HEADER_SIZE);
  3384. Size = UDim2.new(1,-GUI_SIZE,1,-HEADER_SIZE);
  3385. Parent = explorerPanel;
  3386. })
  3387.  
  3388. local scrollBar = ScrollBar(false)
  3389. scrollBar.PageIncrement = 1
  3390. Create(scrollBar.GUI,{
  3391. Position = UDim2.new(1,-GUI_SIZE,0,HEADER_SIZE);
  3392. Size = UDim2.new(0,GUI_SIZE,1,-HEADER_SIZE);
  3393. Parent = explorerPanel;
  3394. })
  3395.  
  3396. local scrollBarH = ScrollBar(true)
  3397. scrollBarH.PageIncrement = GUI_SIZE
  3398. Create(scrollBarH.GUI,{
  3399. Position = UDim2.new(0,0,1,-GUI_SIZE);
  3400. Size = UDim2.new(1,-GUI_SIZE,0,GUI_SIZE);
  3401. Visible = false;
  3402. Parent = explorerPanel;
  3403. })
  3404.  
  3405. local headerFrame = Create('Frame',{
  3406. Name = "Header";
  3407. BackgroundColor3 = GuiColor.Background;
  3408. BorderColor3 = GuiColor.Border;
  3409. Position = UDim2.new(0,0,0,0);
  3410. Size = UDim2.new(1,0,0,HEADER_SIZE);
  3411. Parent = explorerPanel;
  3412. Create('TextLabel',{
  3413. Text = "Explorer";
  3414. BackgroundTransparency = 1;
  3415. TextColor3 = GuiColor.Text;
  3416. TextXAlignment = 'Left';
  3417. Font = FONT;
  3418. FontSize = FONT_SIZE;
  3419. Position = UDim2.new(0,4,0,0);
  3420. Size = UDim2.new(1,-4,0.5,0);
  3421. });
  3422. })
  3423.  
  3424. local explorerFilter = Create('TextBox',{
  3425. Text = "Filter Workspace";
  3426. BackgroundTransparency = 0.8;
  3427. TextColor3 = GuiColor.Text;
  3428. TextXAlignment = 'Left';
  3429. Font = FONT;
  3430. FontSize = FONT_SIZE;
  3431. Position = UDim2.new(0,4,0.5,0);
  3432. Size = UDim2.new(1,-8,0.5,-2);
  3433. });
  3434. explorerFilter.Parent = headerFrame
  3435.  
  3436. SetZIndexOnChanged(explorerPanel)
  3437.  
  3438. local function CreateColor3(r, g, b) return Color3.new(r/255,g/255,b/255) end
  3439.  
  3440. local Styles = {
  3441. Font = Enum.Font.Arial;
  3442. Margin = 5;
  3443. Black = CreateColor3(0,0,0);
  3444. White = CreateColor3(255,255,255);
  3445. }
  3446.  
  3447. local DropDown = {
  3448. Font = Styles.Font;
  3449. FontSize = Enum.FontSize.Size14;
  3450. TextColor = CreateColor3(0,0,0);
  3451. TextColorOver = Styles.White;
  3452. TextXAlignment = Enum.TextXAlignment.Left;
  3453. Height = 20;
  3454. BackColor = Styles.White;
  3455. BackColorOver = CreateColor3(86,125,188);
  3456. BorderColor = CreateColor3(216,216,216);
  3457. BorderSizePixel = 2;
  3458. ArrowColor = CreateColor3(160,160,160);
  3459. ArrowColorOver = Styles.Black;
  3460. }
  3461.  
  3462. local Row = {
  3463. Font = Styles.Font;
  3464. FontSize = Enum.FontSize.Size14;
  3465. TextXAlignment = Enum.TextXAlignment.Left;
  3466. TextColor = Styles.Black;
  3467. TextColorOver = Styles.White;
  3468. TextLockedColor = CreateColor3(120,120,120);
  3469. Height = 24;
  3470. BorderColor = CreateColor3(216,216,216);
  3471. BackgroundColor = Styles.White;
  3472. BackgroundColorAlternate = CreateColor3(246,246,246);
  3473. BackgroundColorMouseover = CreateColor3(211,224,244);
  3474. TitleMarginLeft = 15;
  3475. }
  3476.  
  3477. local currentRightClickMenu
  3478. local CurrentInsertObjectWindow
  3479. local CurrentFunctionCallerWindow
  3480.  
  3481. local RbxApi
  3482.  
  3483. function ClassCanCreate(IName)
  3484. local success,err = pcall(function() Instance.new(IName) end)
  3485. if err then
  3486. return false
  3487. else
  3488. return true
  3489. end
  3490. end
  3491.  
  3492. function GetClasses()
  3493. if RbxApi == nil then return {} end
  3494. local classTable = {}
  3495. for i,v in pairs(RbxApi.Classes) do
  3496. if ClassCanCreate(v.Name) then
  3497. table.insert(classTable,v.Name)
  3498. end
  3499. end
  3500. return classTable
  3501. end
  3502.  
  3503. local function sortAlphabetic(t, property)
  3504. table.sort(t,
  3505. function(x,y) return x[property] < y[property]
  3506. end)
  3507. end
  3508.  
  3509. local function FunctionIsHidden(functionData)
  3510. local tags = functionData["tags"]
  3511. for _,name in pairs(tags) do
  3512. if name == "deprecated"
  3513. or name == "hidden"
  3514. or name == "writeonly" then
  3515. return true
  3516. end
  3517. end
  3518. return false
  3519. end
  3520.  
  3521. local function GetAllFunctions(className)
  3522. local class = RbxApi.Classes[className]
  3523. local functions = {}
  3524.  
  3525. if not class then return functions end
  3526.  
  3527. while class do
  3528. if class.Name == "Instance" then break end
  3529. for _,nextFunction in pairs(class.Functions) do
  3530. if not FunctionIsHidden(nextFunction) then
  3531. table.insert(functions, nextFunction)
  3532. end
  3533. end
  3534. class = RbxApi.Classes[class.Superclass]
  3535. end
  3536.  
  3537. sortAlphabetic(functions, "Name")
  3538.  
  3539. return functions
  3540. end
  3541.  
  3542. function GetFunctions()
  3543. if RbxApi == nil then return {} end
  3544. local List = SelectionVar():Get()
  3545.  
  3546. if #List == 0 then return end
  3547.  
  3548. local MyObject = List[1]
  3549.  
  3550. local functionTable = {}
  3551. for i,v in pairs(GetAllFunctions(MyObject.ClassName)) do
  3552. table.insert(functionTable,v)
  3553. end
  3554. return functionTable
  3555. end
  3556.  
  3557. function CreateInsertObjectMenu(choices, currentChoice, readOnly, onClick)
  3558. local mouse = game:GetService("Players").LocalPlayer:GetMouse()
  3559. local totalSize = explorerPanel.Parent.AbsoluteSize.y
  3560. if #choices == 0 then return end
  3561.  
  3562. table.sort(choices, function(a,b) return a < b end)
  3563.  
  3564. local frame = Instance.new("Frame")
  3565. frame.Name = "InsertObject"
  3566. frame.Size = UDim2.new(0, 200, 1, 0)
  3567. frame.BackgroundTransparency = 1
  3568. frame.Active = true
  3569.  
  3570. local menu = nil
  3571. local arrow = nil
  3572. local expanded = false
  3573. local margin = DropDown.BorderSizePixel;
  3574.  
  3575. --[[
  3576. local button = Instance.new("TextButton")
  3577. button.Font = Row.Font
  3578. button.FontSize = Row.FontSize
  3579. button.TextXAlignment = Row.TextXAlignment
  3580. button.BackgroundTransparency = 1
  3581. button.TextColor3 = Row.TextColor
  3582. if readOnly then
  3583. button.TextColor3 = Row.TextLockedColor
  3584. end
  3585. button.Text = currentChoice
  3586. button.Size = UDim2.new(1, -2 * Styles.Margin, 1, 0)
  3587. button.Position = UDim2.new(0, Styles.Margin, 0, 0)
  3588. button.Parent = frame
  3589. --]]
  3590.  
  3591. local function hideMenu()
  3592. expanded = false
  3593. --showArrow(DropDown.ArrowColor)
  3594. if frame then
  3595. --frame:Destroy()
  3596. CurrentInsertObjectWindow.Visible = false
  3597. end
  3598. end
  3599.  
  3600. local function showMenu()
  3601. expanded = true
  3602. menu = Instance.new("ScrollingFrame")
  3603. menu.Size = UDim2.new(0,200,1,0)
  3604. menu.CanvasSize = UDim2.new(0, 200, 0, #choices * DropDown.Height)
  3605. menu.Position = UDim2.new(0, margin, 0, 0)
  3606. menu.BackgroundTransparency = 0
  3607. menu.BackgroundColor3 = DropDown.BackColor
  3608. menu.BorderColor3 = DropDown.BorderColor
  3609. menu.BorderSizePixel = DropDown.BorderSizePixel
  3610. menu.TopImage = "rbxasset://textures/blackBkg_square.png"
  3611. menu.MidImage = "rbxasset://textures/blackBkg_square.png"
  3612. menu.BottomImage = "rbxasset://textures/blackBkg_square.png"
  3613. menu.Active = true
  3614. menu.ZIndex = 5
  3615. menu.Parent = frame
  3616.  
  3617. --local parentFrameHeight = script.Parent.List.Size.Y.Offset
  3618. --local rowHeight = mouse.Y
  3619. --if (rowHeight + menu.Size.Y.Offset) > parentFrameHeight then
  3620. -- menu.Position = UDim2.new(0, margin, 0, -1 * (#choices * DropDown.Height) - margin)
  3621. --end
  3622.  
  3623. local function choice(name)
  3624. onClick(name)
  3625. hideMenu()
  3626. end
  3627.  
  3628. for i,name in pairs(choices) do
  3629. local option = CreateRightClickMenuItem(name, function()
  3630. choice(name)
  3631. end,1)
  3632. option.Size = UDim2.new(1, 0, 0, 20)
  3633. option.Position = UDim2.new(0, 0, 0, (i - 1) * DropDown.Height)
  3634. option.ZIndex = menu.ZIndex
  3635. option.Parent = menu
  3636. end
  3637. end
  3638.  
  3639.  
  3640. showMenu()
  3641.  
  3642.  
  3643. return frame
  3644. end
  3645.  
  3646. function CreateFunctionCallerMenu(choices, currentChoice, readOnly, onClick)
  3647. local mouse = game:GetService("Players").LocalPlayer:GetMouse()
  3648. local totalSize = explorerPanel.Parent.AbsoluteSize.y
  3649. if #choices == 0 then return end
  3650.  
  3651. table.sort(choices, function(a,b) return a.Name < b.Name end)
  3652.  
  3653. local frame = Instance.new("Frame")
  3654. frame.Name = "InsertObject"
  3655. frame.Size = UDim2.new(0, 200, 1, 0)
  3656. frame.BackgroundTransparency = 1
  3657. frame.Active = true
  3658.  
  3659. local menu = nil
  3660. local arrow = nil
  3661. local expanded = false
  3662. local margin = DropDown.BorderSizePixel;
  3663.  
  3664. local function hideMenu()
  3665. expanded = false
  3666. --showArrow(DropDown.ArrowColor)
  3667. if frame then
  3668. --frame:Destroy()
  3669. CurrentInsertObjectWindow.Visible = false
  3670. end
  3671. end
  3672.  
  3673. local function showMenu()
  3674. expanded = true
  3675. menu = Instance.new("ScrollingFrame")
  3676. menu.Size = UDim2.new(0,300,1,0)
  3677. menu.CanvasSize = UDim2.new(0, 300, 0, #choices * DropDown.Height)
  3678. menu.Position = UDim2.new(0, margin, 0, 0)
  3679. menu.BackgroundTransparency = 0
  3680. menu.BackgroundColor3 = DropDown.BackColor
  3681. menu.BorderColor3 = DropDown.BorderColor
  3682. menu.BorderSizePixel = DropDown.BorderSizePixel
  3683. menu.TopImage = "rbxasset://textures/blackBkg_square.png"
  3684. menu.MidImage = "rbxasset://textures/blackBkg_square.png"
  3685. menu.BottomImage = "rbxasset://textures/blackBkg_square.png"
  3686. menu.Active = true
  3687. menu.ZIndex = 5
  3688. menu.Parent = frame
  3689.  
  3690. --local parentFrameHeight = script.Parent.List.Size.Y.Offset
  3691. --local rowHeight = mouse.Y
  3692. --if (rowHeight + menu.Size.Y.Offset) > parentFrameHeight then
  3693. -- menu.Position = UDim2.new(0, margin, 0, -1 * (#choices * DropDown.Height) - margin)
  3694. --end
  3695.  
  3696. local function GetParameters(functionData)
  3697. local paraString = ""
  3698. paraString = paraString.."("
  3699. for i,v in pairs(functionData.Arguments) do
  3700. paraString = paraString..v.Type.." "..v.Name
  3701. if i < #functionData.Arguments then
  3702. paraString = paraString..", "
  3703. end
  3704. end
  3705. paraString = paraString..")"
  3706. return paraString
  3707. end
  3708.  
  3709. local function choice(name)
  3710. onClick(name)
  3711. hideMenu()
  3712. end
  3713.  
  3714. for i,name in pairs(choices) do
  3715. local option = CreateRightClickMenuItem(name.ReturnType.." "..name.Name..GetParameters(name), function()
  3716. choice(name)
  3717. end,2)
  3718. option.Size = UDim2.new(1, 0, 0, 20)
  3719. option.Position = UDim2.new(0, 0, 0, (i - 1) * DropDown.Height)
  3720. option.ZIndex = menu.ZIndex
  3721. option.Parent = menu
  3722. end
  3723. end
  3724.  
  3725.  
  3726. showMenu()
  3727.  
  3728.  
  3729. return frame
  3730. end
  3731.  
  3732. function CreateInsertObject()
  3733. if not CurrentInsertObjectWindow then return end
  3734. CurrentInsertObjectWindow.Visible = true
  3735. if currentRightClickMenu and CurrentInsertObjectWindow.Visible then
  3736. CurrentInsertObjectWindow.Position = UDim2.new(0,currentRightClickMenu.Position.X.Offset-currentRightClickMenu.Size.X.Offset-2,0,0)
  3737. end
  3738. if CurrentInsertObjectWindow.Visible then
  3739. CurrentInsertObjectWindow.Parent = explorerPanel.Parent
  3740. end
  3741. end
  3742.  
  3743. function CreateFunctionCaller(oh)
  3744. if CurrentFunctionCallerWindow then
  3745. CurrentFunctionCallerWindow:Destroy()
  3746. CurrentFunctionCallerWindow = nil
  3747. end
  3748. CurrentFunctionCallerWindow = CreateFunctionCallerMenu(
  3749. GetFunctions(),
  3750. "",
  3751. false,
  3752. function(option)
  3753. CurrentFunctionCallerWindow:Destroy()
  3754. CurrentFunctionCallerWindow = nil
  3755. local list = SelectionVar():Get()
  3756. for i,v in pairs(list) do
  3757. pcall(function() print("Function called.", pcall(function() v[option.Name](v) end)) end)
  3758. end
  3759.  
  3760. DestroyRightClick()
  3761. end
  3762. )
  3763. if currentRightClickMenu and CurrentFunctionCallerWindow then
  3764. CurrentFunctionCallerWindow.Position = UDim2.new(0,currentRightClickMenu.Position.X.Offset-currentRightClickMenu.Size.X.Offset*1.5-2,0,0)
  3765. end
  3766. if CurrentFunctionCallerWindow then
  3767. CurrentFunctionCallerWindow.Parent = explorerPanel.Parent
  3768. end
  3769. end
  3770.  
  3771. function CreateRightClickMenuItem(text, onClick, insObj)
  3772. local button = Instance.new("TextButton")
  3773. button.Font = DropDown.Font
  3774. button.FontSize = DropDown.FontSize
  3775. button.TextColor3 = DropDown.TextColor
  3776. button.TextXAlignment = DropDown.TextXAlignment
  3777. button.BackgroundColor3 = DropDown.BackColor
  3778. button.AutoButtonColor = false
  3779. button.BorderSizePixel = 0
  3780. button.Active = true
  3781. button.Text = text
  3782.  
  3783. if insObj == 1 then
  3784. local newIcon = Icon(nil,ExplorerIndex[text] or 0)
  3785. newIcon.Position = UDim2.new(0,0,0,2)
  3786. newIcon.Size = UDim2.new(0,16,0,16)
  3787. newIcon.IconMap.ZIndex = 5
  3788. newIcon.Parent = button
  3789. button.Text = "\t\t"..button.Text
  3790. elseif insObj == 2 then
  3791. button.FontSize = Enum.FontSize.Size11
  3792. end
  3793.  
  3794. button.MouseEnter:connect(function()
  3795. button.TextColor3 = DropDown.TextColorOver
  3796. button.BackgroundColor3 = DropDown.BackColorOver
  3797. if not insObj and CurrentInsertObjectWindow then
  3798. if CurrentInsertObjectWindow.Visible == false and button.Text == "Insert Object" then
  3799. CreateInsertObject()
  3800. elseif CurrentInsertObjectWindow.Visible and button.Text ~= "Insert Object" then
  3801. CurrentInsertObjectWindow.Visible = false
  3802. end
  3803. end
  3804. if not insObj then
  3805. if CurrentFunctionCallerWindow and button.Text ~= "Call Function" then
  3806. CurrentFunctionCallerWindow:Destroy()
  3807. CurrentFunctionCallerWindow = nil
  3808. elseif button.Text == "Call Function" then
  3809. CreateFunctionCaller()
  3810. end
  3811. end
  3812. end)
  3813. button.MouseLeave:connect(function()
  3814. button.TextColor3 = DropDown.TextColor
  3815. button.BackgroundColor3 = DropDown.BackColor
  3816. end)
  3817. button.MouseButton1Click:connect(function()
  3818. button.TextColor3 = DropDown.TextColor
  3819. button.BackgroundColor3 = DropDown.BackColor
  3820. onClick(text)
  3821. end)
  3822. return button
  3823. end
  3824.  
  3825. function CreateRightClickMenu(choices, currentChoice, readOnly, onClick)
  3826. local mouse = game:GetService("Players").LocalPlayer:GetMouse()
  3827.  
  3828. local frame = Instance.new("Frame")
  3829. frame.Name = "DropDown"
  3830. frame.Size = UDim2.new(0, 200, 1, 0)
  3831. frame.BackgroundTransparency = 1
  3832. frame.Active = true
  3833.  
  3834. local menu = nil
  3835. local arrow = nil
  3836. local expanded = false
  3837. local margin = DropDown.BorderSizePixel;
  3838.  
  3839. --[[
  3840. local button = Instance.new("TextButton")
  3841. button.Font = Row.Font
  3842. button.FontSize = Row.FontSize
  3843. button.TextXAlignment = Row.TextXAlignment
  3844. button.BackgroundTransparency = 1
  3845. button.TextColor3 = Row.TextColor
  3846. if readOnly then
  3847. button.TextColor3 = Row.TextLockedColor
  3848. end
  3849. button.Text = currentChoice
  3850. button.Size = UDim2.new(1, -2 * Styles.Margin, 1, 0)
  3851. button.Position = UDim2.new(0, Styles.Margin, 0, 0)
  3852. button.Parent = frame
  3853. --]]
  3854.  
  3855. local function hideMenu()
  3856. expanded = false
  3857. --showArrow(DropDown.ArrowColor)
  3858. if frame then
  3859. frame:Destroy()
  3860. DestroyRightClick()
  3861. end
  3862. end
  3863.  
  3864. local function showMenu()
  3865. expanded = true
  3866. menu = Instance.new("Frame")
  3867. menu.Size = UDim2.new(0, 200, 0, #choices * DropDown.Height)
  3868. menu.Position = UDim2.new(0, margin, 0, 5)
  3869. menu.BackgroundTransparency = 0
  3870. menu.BackgroundColor3 = DropDown.BackColor
  3871. menu.BorderColor3 = DropDown.BorderColor
  3872. menu.BorderSizePixel = DropDown.BorderSizePixel
  3873. menu.Active = true
  3874. menu.ZIndex = 5
  3875. menu.Parent = frame
  3876.  
  3877. --local parentFrameHeight = script.Parent.List.Size.Y.Offset
  3878. --local rowHeight = mouse.Y
  3879. --if (rowHeight + menu.Size.Y.Offset) > parentFrameHeight then
  3880. -- menu.Position = UDim2.new(0, margin, 0, -1 * (#choices * DropDown.Height) - margin)
  3881. --end
  3882.  
  3883. local function choice(name)
  3884. onClick(name)
  3885. hideMenu()
  3886. end
  3887.  
  3888. for i,name in pairs(choices) do
  3889. local option = CreateRightClickMenuItem(name, function()
  3890. choice(name)
  3891. end)
  3892. option.Size = UDim2.new(1, 0, 0, 20)
  3893. option.Position = UDim2.new(0, 0, 0, (i - 1) * DropDown.Height)
  3894. option.ZIndex = menu.ZIndex
  3895. option.Parent = menu
  3896. end
  3897. end
  3898.  
  3899.  
  3900. showMenu()
  3901.  
  3902.  
  3903. return frame
  3904. end
  3905.  
  3906. function checkMouseInGui(gui)
  3907. if gui == nil then return false end
  3908. local plrMouse = game:GetService("Players").LocalPlayer:GetMouse()
  3909. local guiPosition = gui.AbsolutePosition
  3910. local guiSize = gui.AbsoluteSize
  3911.  
  3912. if plrMouse.X >= guiPosition.x and plrMouse.X <= guiPosition.x + guiSize.x and plrMouse.Y >= guiPosition.y and plrMouse.Y <= guiPosition.y + guiSize.y then
  3913. return true
  3914. else
  3915. return false
  3916. end
  3917. end
  3918.  
  3919. local clipboard = {}
  3920. local function delete(o)
  3921. o.Parent = nil
  3922. end
  3923.  
  3924. local getTextWidth do
  3925. local text = Create('TextLabel',{
  3926. Name = "TextWidth";
  3927. TextXAlignment = 'Left';
  3928. TextYAlignment = 'Center';
  3929. Font = FONT;
  3930. FontSize = FONT_SIZE;
  3931. Text = "";
  3932. Position = UDim2.new(0,0,0,0);
  3933. Size = UDim2.new(1,0,1,0);
  3934. Visible = false;
  3935. Parent = explorerPanel;
  3936. })
  3937. function getTextWidth(s)
  3938. text.Text = s
  3939. return text.TextBounds.x
  3940. end
  3941. end
  3942.  
  3943. local nameScanned = false
  3944. -- Holds the game tree converted to a list.
  3945. local TreeList = {}
  3946. -- Matches objects to their tree node representation.
  3947. local NodeLookup = {}
  3948.  
  3949. local nodeWidth = 0
  3950.  
  3951. local QuickButtons = {}
  3952.  
  3953. function filteringWorkspace()
  3954. if explorerFilter.Text ~= "" and explorerFilter.Text ~= "Filter Workspace" then
  3955. return true
  3956. end
  3957. return false
  3958. end
  3959.  
  3960. function lookForAName(obj,name)
  3961. for i,v in pairs(obj:GetChildren()) do
  3962. if string.find(string.lower(v.Name),string.lower(name)) then nameScanned = true end
  3963. lookForAName(v,name)
  3964. end
  3965. end
  3966.  
  3967. function scanName(obj)
  3968. nameScanned = false
  3969. if string.find(string.lower(obj.Name),string.lower(explorerFilter.Text)) then
  3970. nameScanned = true
  3971. else
  3972. lookForAName(obj,explorerFilter.Text)
  3973. end
  3974. return nameScanned
  3975. end
  3976.  
  3977. function updateActions()
  3978. for i,v in pairs(QuickButtons) do
  3979. if v.Cond() then
  3980. v.Toggle(true)
  3981. else
  3982. v.Toggle(false)
  3983. end
  3984. end
  3985. end
  3986.  
  3987. local updateList,rawUpdateList,updateScroll,rawUpdateSize do
  3988. local function r(t)
  3989. for i = 1,#t do
  3990. if not filteringWorkspace() or scanName(t[i].Object) then
  3991. TreeList[#TreeList+1] = t[i]
  3992.  
  3993. local w = (t[i].Depth)*(2+ENTRY_PADDING+GUI_SIZE) + 2 + ENTRY_SIZE + 4 + getTextWidth(t[i].Object.Name) + 4
  3994. if w > nodeWidth then
  3995. nodeWidth = w
  3996. end
  3997. if t[i].Expanded or filteringWorkspace() then
  3998. r(t[i])
  3999. end
  4000. end
  4001. end
  4002. end
  4003.  
  4004. function rawUpdateSize()
  4005. scrollBarH.TotalSpace = nodeWidth
  4006. scrollBarH.VisibleSpace = listFrame.AbsoluteSize.x
  4007. scrollBarH:Update()
  4008. local visible = scrollBarH:CanScrollDown() or scrollBarH:CanScrollUp()
  4009. scrollBarH.GUI.Visible = visible
  4010.  
  4011. listFrame.Size = UDim2.new(1,-GUI_SIZE,1,-GUI_SIZE*(visible and 1 or 0) - HEADER_SIZE)
  4012.  
  4013. scrollBar.VisibleSpace = math.ceil(listFrame.AbsoluteSize.y/ENTRY_BOUND)
  4014. scrollBar.GUI.Size = UDim2.new(0,GUI_SIZE,1,-GUI_SIZE*(visible and 1 or 0) - HEADER_SIZE)
  4015.  
  4016. scrollBar.TotalSpace = #TreeList+1
  4017. scrollBar:Update()
  4018. end
  4019.  
  4020. function rawUpdateList()
  4021. -- Clear then repopulate the entire list. It appears to be fast enough.
  4022. TreeList = {}
  4023. nodeWidth = 0
  4024. r(NodeLookup[workspace.Parent])
  4025. r(NodeLookup[DexOutput])
  4026. if DexStorageEnabled then
  4027. r(NodeLookup[DexStorage])
  4028. end
  4029. if NilStorageEnabled then
  4030. r(NodeLookup[NilStorage])
  4031. end
  4032. rawUpdateSize()
  4033. updateActions()
  4034. end
  4035.  
  4036. -- Adding or removing large models will cause many updates to occur. We
  4037. -- can reduce the number of updates by creating a delay, then dropping any
  4038. -- updates that occur during the delay.
  4039. local updatingList = false
  4040. function updateList()
  4041. if updatingList then return end
  4042. updatingList = true
  4043. wait(0.25)
  4044. updatingList = false
  4045. rawUpdateList()
  4046. end
  4047.  
  4048. local updatingScroll = false
  4049. function updateScroll()
  4050. if updatingScroll then return end
  4051. updatingScroll = true
  4052. wait(0.25)
  4053. updatingScroll = false
  4054. scrollBar:Update()
  4055. end
  4056. end
  4057.  
  4058. local Selection do
  4059. local bindGetSelection = explorerPanel:FindFirstChild("GetSelection")
  4060. if not bindGetSelection then
  4061. bindGetSelection = Create('BindableFunction',{Name = "GetSelection"})
  4062. bindGetSelection.Parent = explorerPanel
  4063. end
  4064.  
  4065. local bindSetSelection = explorerPanel:FindFirstChild("SetSelection")
  4066. if not bindSetSelection then
  4067. bindSetSelection = Create('BindableFunction',{Name = "SetSelection"})
  4068. bindSetSelection.Parent = explorerPanel
  4069. end
  4070.  
  4071. local bindSelectionChanged = explorerPanel:FindFirstChild("SelectionChanged")
  4072. if not bindSelectionChanged then
  4073. bindSelectionChanged = Create('BindableEvent',{Name = "SelectionChanged"})
  4074. bindSelectionChanged.Parent = explorerPanel
  4075. end
  4076.  
  4077. local SelectionList = {}
  4078. local SelectionSet = {}
  4079. local Updates = true
  4080. Selection = {
  4081. Selected = SelectionSet;
  4082. List = SelectionList;
  4083. }
  4084.  
  4085. local function addObject(object)
  4086. -- list update
  4087. local lupdate = false
  4088. -- scroll update
  4089. local supdate = false
  4090.  
  4091. if not SelectionSet[object] then
  4092. local node = NodeLookup[object]
  4093. if node then
  4094. table.insert(SelectionList,object)
  4095. SelectionSet[object] = true
  4096. node.Selected = true
  4097.  
  4098. -- expand all ancestors so that selected node becomes visible
  4099. node = node.Parent
  4100. while node do
  4101. if not node.Expanded then
  4102. node.Expanded = true
  4103. lupdate = true
  4104. end
  4105. node = node.Parent
  4106. end
  4107. supdate = true
  4108. end
  4109. end
  4110. return lupdate,supdate
  4111. end
  4112.  
  4113. function Selection:Set(objects)
  4114. local lupdate = false
  4115. local supdate = false
  4116.  
  4117. if #SelectionList > 0 then
  4118. for i = 1,#SelectionList do
  4119. local object = SelectionList[i]
  4120. local node = NodeLookup[object]
  4121. if node then
  4122. node.Selected = false
  4123. SelectionSet[object] = nil
  4124. end
  4125. end
  4126.  
  4127. SelectionList = {}
  4128. Selection.List = SelectionList
  4129. supdate = true
  4130. end
  4131.  
  4132. for i = 1,#objects do
  4133. local l,s = addObject(objects[i])
  4134. lupdate = l or lupdate
  4135. supdate = s or supdate
  4136. end
  4137.  
  4138. if lupdate then
  4139. rawUpdateList()
  4140. supdate = true
  4141. elseif supdate then
  4142. scrollBar:Update()
  4143. end
  4144.  
  4145. if supdate then
  4146. bindSelectionChanged:Fire()
  4147. updateActions()
  4148. end
  4149. end
  4150.  
  4151. function Selection:Add(object)
  4152. local l,s = addObject(object)
  4153. if l then
  4154. rawUpdateList()
  4155. if Updates then
  4156. bindSelectionChanged:Fire()
  4157. updateActions()
  4158. end
  4159. elseif s then
  4160. scrollBar:Update()
  4161. if Updates then
  4162. bindSelectionChanged:Fire()
  4163. updateActions()
  4164. end
  4165. end
  4166. end
  4167.  
  4168. function Selection:StopUpdates()
  4169. Updates = false
  4170. end
  4171.  
  4172. function Selection:ResumeUpdates()
  4173. Updates = true
  4174. bindSelectionChanged:Fire()
  4175. updateActions()
  4176. end
  4177.  
  4178. function Selection:Remove(object,noupdate)
  4179. if SelectionSet[object] then
  4180. local node = NodeLookup[object]
  4181. if node then
  4182. node.Selected = false
  4183. SelectionSet[object] = nil
  4184. for i = 1,#SelectionList do
  4185. if SelectionList[i] == object then
  4186. table.remove(SelectionList,i)
  4187. break
  4188. end
  4189. end
  4190.  
  4191. if not noupdate then
  4192. scrollBar:Update()
  4193. end
  4194. bindSelectionChanged:Fire()
  4195. updateActions()
  4196. end
  4197. end
  4198. end
  4199.  
  4200. function Selection:Get()
  4201. local list = {}
  4202. for i = 1,#SelectionList do
  4203. list[i] = SelectionList[i]
  4204. end
  4205. return list
  4206. end
  4207.  
  4208. bindSetSelection.OnInvoke = function(...)
  4209. Selection:Set(...)
  4210. end
  4211.  
  4212. bindGetSelection.OnInvoke = function()
  4213. return Selection:Get()
  4214. end
  4215. end
  4216.  
  4217. function CreateCaution(title,msg)
  4218. local newCaution = CautionWindow
  4219. newCaution.Visible = true
  4220. newCaution.Title.Text = title
  4221. newCaution.MainWindow.Desc.Text = msg
  4222. newCaution.MainWindow.Ok.MouseButton1Up:connect(function()
  4223. newCaution.Visible = false
  4224. end)
  4225. end
  4226.  
  4227. function CreateTableCaution(title,msg)
  4228. if type(msg) ~= "table" then return CreateCaution(title,tostring(msg)) end
  4229. local newCaution = TableCautionWindow:Clone()
  4230. newCaution.Title.Text = title
  4231.  
  4232. local TableList = newCaution.MainWindow.TableResults
  4233. local TableTemplate = newCaution.MainWindow.TableTemplate
  4234.  
  4235. for i,v in pairs(msg) do
  4236. local newResult = TableTemplate:Clone()
  4237. newResult.Type.Text = type(v)
  4238. newResult.Value.Text = tostring(v)
  4239. newResult.Position = UDim2.new(0,0,0,#TableList:GetChildren() * 20)
  4240. newResult.Parent = TableList
  4241. TableList.CanvasSize = UDim2.new(0,0,0,#TableList:GetChildren() * 20)
  4242. newResult.Visible = true
  4243. end
  4244. newCaution.Parent = explorerPanel.Parent
  4245. newCaution.Visible = true
  4246. newCaution.MainWindow.Ok.MouseButton1Up:connect(function()
  4247. newCaution:Destroy()
  4248. end)
  4249. end
  4250.  
  4251. local function Split(str, delimiter)
  4252. local start = 1
  4253. local t = {}
  4254. while true do
  4255. local pos = string.find (str, delimiter, start, true)
  4256. if not pos then
  4257. break
  4258. end
  4259. table.insert (t, string.sub (str, start, pos - 1))
  4260. start = pos + string.len (delimiter)
  4261. end
  4262. table.insert (t, string.sub (str, start))
  4263. return t
  4264. end
  4265.  
  4266. local function ToValue(value,type)
  4267. if type == "Vector2" then
  4268. local list = Split(value,",")
  4269. if #list < 2 then return nil end
  4270. local x = tonumber(list[1]) or 0
  4271. local y = tonumber(list[2]) or 0
  4272. return Vector2.new(x,y)
  4273. elseif type == "Vector3" then
  4274. local list = Split(value,",")
  4275. if #list < 3 then return nil end
  4276. local x = tonumber(list[1]) or 0
  4277. local y = tonumber(list[2]) or 0
  4278. local z = tonumber(list[3]) or 0
  4279. return Vector3.new(x,y,z)
  4280. elseif type == "Color3" then
  4281. local list = Split(value,",")
  4282. if #list < 3 then return nil end
  4283. local r = tonumber(list[1]) or 0
  4284. local g = tonumber(list[2]) or 0
  4285. local b = tonumber(list[3]) or 0
  4286. return Color3.new(r/255,g/255, b/255)
  4287. elseif type == "UDim2" then
  4288. local list = Split(string.gsub(string.gsub(value, "{", ""),"}",""),",")
  4289. if #list < 4 then return nil end
  4290. local xScale = tonumber(list[1]) or 0
  4291. local xOffset = tonumber(list[2]) or 0
  4292. local yScale = tonumber(list[3]) or 0
  4293. local yOffset = tonumber(list[4]) or 0
  4294. return UDim2.new(xScale, xOffset, yScale, yOffset)
  4295. elseif type == "Number" then
  4296. return tonumber(value)
  4297. elseif type == "String" then
  4298. return value
  4299. elseif type == "NumberRange" then
  4300. local list = Split(value,",")
  4301. if #list == 1 then
  4302. if tonumber(list[1]) == nil then return nil end
  4303. local newVal = tonumber(list[1]) or 0
  4304. return NumberRange.new(newVal)
  4305. end
  4306. if #list < 2 then return nil end
  4307. local x = tonumber(list[1]) or 0
  4308. local y = tonumber(list[2]) or 0
  4309. return NumberRange.new(x,y)
  4310. elseif type == "Script" then
  4311. local success,err = ypcall(function()
  4312. _G.D_E_X_DONOTUSETHISPLEASE = nil
  4313. loadstring(
  4314. "_G.D_E_X_DONOTUSETHISPLEASE = "..value
  4315. )()
  4316. return _G.D_E_X_DONOTUSETHISPLEASE
  4317. end)
  4318. if err then
  4319. return nil
  4320. end
  4321. else
  4322. return nil
  4323. end
  4324. end
  4325.  
  4326. local function ToPropValue(value,type)
  4327. if type == "Vector2" then
  4328. local list = Split(value,",")
  4329. if #list < 2 then return nil end
  4330. local x = tonumber(list[1]) or 0
  4331. local y = tonumber(list[2]) or 0
  4332. return Vector2.new(x,y)
  4333. elseif type == "Vector3" then
  4334. local list = Split(value,",")
  4335. if #list < 3 then return nil end
  4336. local x = tonumber(list[1]) or 0
  4337. local y = tonumber(list[2]) or 0
  4338. local z = tonumber(list[3]) or 0
  4339. return Vector3.new(x,y,z)
  4340. elseif type == "Color3" then
  4341. local list = Split(value,",")
  4342. if #list < 3 then return nil end
  4343. local r = tonumber(list[1]) or 0
  4344. local g = tonumber(list[2]) or 0
  4345. local b = tonumber(list[3]) or 0
  4346. return Color3.new(r/255,g/255, b/255)
  4347. elseif type == "UDim2" then
  4348. local list = Split(string.gsub(string.gsub(value, "{", ""),"}",""),",")
  4349. if #list < 4 then return nil end
  4350. local xScale = tonumber(list[1]) or 0
  4351. local xOffset = tonumber(list[2]) or 0
  4352. local yScale = tonumber(list[3]) or 0
  4353. local yOffset = tonumber(list[4]) or 0
  4354. return UDim2.new(xScale, xOffset, yScale, yOffset)
  4355. elseif type == "Content" then
  4356. return value
  4357. elseif type == "float" or type == "int" or type == "double" then
  4358. return tonumber(value)
  4359. elseif type == "string" then
  4360. return value
  4361. elseif type == "NumberRange" then
  4362. local list = Split(value,",")
  4363. if #list == 1 then
  4364. if tonumber(list[1]) == nil then return nil end
  4365. local newVal = tonumber(list[1]) or 0
  4366. return NumberRange.new(newVal)
  4367. end
  4368. if #list < 2 then return nil end
  4369. local x = tonumber(list[1]) or 0
  4370. local y = tonumber(list[2]) or 0
  4371. return NumberRange.new(x,y)
  4372. elseif string.sub(value,1,4) == "Enum" then
  4373. local getEnum = value
  4374. while true do
  4375. local x,y = string.find(getEnum,".")
  4376. if y then
  4377. getEnum = string.sub(getEnum,y+1)
  4378. else
  4379. break
  4380. end
  4381. end
  4382. print(getEnum)
  4383. return getEnum
  4384. else
  4385. return nil
  4386. end
  4387. end
  4388.  
  4389. function PromptRemoteCaller(inst)
  4390. if CurrentRemoteWindow then
  4391. CurrentRemoteWindow:Destroy()
  4392. CurrentRemoteWindow = nil
  4393. end
  4394. CurrentRemoteWindow = RemoteWindow:Clone()
  4395. CurrentRemoteWindow.Parent = explorerPanel.Parent
  4396. CurrentRemoteWindow.Visible = true
  4397.  
  4398. local displayValues = false
  4399.  
  4400. local ArgumentList = CurrentRemoteWindow.MainWindow.Arguments
  4401. local ArgumentTemplate = CurrentRemoteWindow.MainWindow.ArgumentTemplate
  4402.  
  4403. if inst:IsA("RemoteEvent") then
  4404. CurrentRemoteWindow.Title.Text = "Fire Event"
  4405. CurrentRemoteWindow.MainWindow.Ok.Text = "Fire"
  4406. CurrentRemoteWindow.MainWindow.DisplayReturned.Visible = false
  4407. CurrentRemoteWindow.MainWindow.Desc2.Visible = false
  4408. end
  4409.  
  4410. local newArgument = ArgumentTemplate:Clone()
  4411. newArgument.Parent = ArgumentList
  4412. newArgument.Visible = true
  4413. newArgument.Type.MouseButton1Down:connect(function()
  4414. createDDown(newArgument.Type,function(choice)
  4415. newArgument.Type.Text = choice
  4416. end,"Script","Number","String","Color3","Vector3","Vector2","UDim2","NumberRange")
  4417. end)
  4418.  
  4419. CurrentRemoteWindow.MainWindow.Ok.MouseButton1Up:connect(function()
  4420. if CurrentRemoteWindow and inst.Parent ~= nil then
  4421. local MyArguments = {}
  4422. for i,v in pairs(ArgumentList:GetChildren()) do
  4423. table.insert(MyArguments,ToValue(v.Value.Text,v.Type.Text))
  4424. end
  4425. if inst:IsA("RemoteFunction") then
  4426. if displayValues then
  4427. spawn(function()
  4428. local myResults = inst:InvokeServer(unpack(MyArguments))
  4429. if myResults then
  4430. CreateTableCaution("Remote Caller",myResults)
  4431. else
  4432. CreateCaution("Remote Caller","This remote did not return anything.")
  4433. end
  4434. end)
  4435. else
  4436. spawn(function()
  4437. inst:InvokeServer(unpack(MyArguments))
  4438. end)
  4439. end
  4440. else
  4441. inst:FireServer(unpack(MyArguments))
  4442. end
  4443. CurrentRemoteWindow:Destroy()
  4444. CurrentRemoteWindow = nil
  4445. end
  4446. end)
  4447.  
  4448. CurrentRemoteWindow.MainWindow.Add.MouseButton1Up:connect(function()
  4449. if CurrentRemoteWindow then
  4450. local newArgument = ArgumentTemplate:Clone()
  4451. newArgument.Position = UDim2.new(0,0,0,#ArgumentList:GetChildren() * 20)
  4452. newArgument.Parent = ArgumentList
  4453. ArgumentList.CanvasSize = UDim2.new(0,0,0,#ArgumentList:GetChildren() * 20)
  4454. newArgument.Visible = true
  4455. newArgument.Type.MouseButton1Down:connect(function()
  4456. createDDown(newArgument.Type,function(choice)
  4457. newArgument.Type.Text = choice
  4458. end,"Script","Number","String","Color3","Vector3","Vector2","UDim2","NumberRange")
  4459. end)
  4460. end
  4461. end)
  4462.  
  4463. CurrentRemoteWindow.MainWindow.Subtract.MouseButton1Up:connect(function()
  4464. if CurrentRemoteWindow then
  4465. if #ArgumentList:GetChildren() > 1 then
  4466. ArgumentList:GetChildren()[#ArgumentList:GetChildren()]:Destroy()
  4467. ArgumentList.CanvasSize = UDim2.new(0,0,0,#ArgumentList:GetChildren() * 20)
  4468. end
  4469. end
  4470. end)
  4471.  
  4472. CurrentRemoteWindow.MainWindow.Cancel.MouseButton1Up:connect(function()
  4473. if CurrentRemoteWindow then
  4474. CurrentRemoteWindow:Destroy()
  4475. CurrentRemoteWindow = nil
  4476. end
  4477. end)
  4478.  
  4479. CurrentRemoteWindow.MainWindow.DisplayReturned.MouseButton1Up:connect(function()
  4480. if displayValues then
  4481. displayValues = false
  4482. CurrentRemoteWindow.MainWindow.DisplayReturned.enabled.Visible = false
  4483. else
  4484. displayValues = true
  4485. CurrentRemoteWindow.MainWindow.DisplayReturned.enabled.Visible = true
  4486. end
  4487. end)
  4488. end
  4489.  
  4490. function PromptSaveInstance(inst)
  4491. if not SaveInstance and not _G.SaveInstance then CreateCaution("SaveInstance Missing","You do not have the SaveInstance function installed. Please go to RaspberryPi's thread to retrieve it.") return end
  4492. if CurrentSaveInstanceWindow then
  4493. CurrentSaveInstanceWindow:Destroy()
  4494. CurrentSaveInstanceWindow = nil
  4495. if explorerPanel.Parent:FindFirstChild("SaveInstanceOverwriteCaution") then
  4496. explorerPanel.Parent.SaveInstanceOverwriteCaution:Destroy()
  4497. end
  4498. end
  4499. CurrentSaveInstanceWindow = SaveInstanceWindow:Clone()
  4500. CurrentSaveInstanceWindow.Parent = explorerPanel.Parent
  4501. CurrentSaveInstanceWindow.Visible = true
  4502.  
  4503. local filename = CurrentSaveInstanceWindow.MainWindow.FileName
  4504. local saveObjects = true
  4505. local overwriteCaution = false
  4506.  
  4507. CurrentSaveInstanceWindow.MainWindow.Save.MouseButton1Up:connect(function()
  4508. if readfile and getelysianpath then
  4509. if readfile(getelysianpath()..filename.Text..".rbxmx") then
  4510. if not overwriteCaution then
  4511. overwriteCaution = true
  4512. local newCaution = ConfirmationWindow:Clone()
  4513. newCaution.Name = "SaveInstanceOverwriteCaution"
  4514. newCaution.MainWindow.Desc.Text = "The file, "..filename.Text..".rbxmx, already exists. Overwrite?"
  4515. newCaution.Parent = explorerPanel.Parent
  4516. newCaution.Visible = true
  4517. newCaution.MainWindow.Yes.MouseButton1Up:connect(function()
  4518. ypcall(function()
  4519. SaveInstance(inst,filename.Text..".rbxmx",not saveObjects)
  4520. end)
  4521. overwriteCaution = false
  4522. newCaution:Destroy()
  4523. if CurrentSaveInstanceWindow then
  4524. CurrentSaveInstanceWindow:Destroy()
  4525. CurrentSaveInstanceWindow = nil
  4526. end
  4527. end)
  4528. newCaution.MainWindow.No.MouseButton1Up:connect(function()
  4529. overwriteCaution = false
  4530. newCaution:Destroy()
  4531. end)
  4532. end
  4533. else
  4534. ypcall(function()
  4535. SaveInstance(inst,filename.Text..".rbxmx",not saveObjects)
  4536. end)
  4537. if CurrentSaveInstanceWindow then
  4538. CurrentSaveInstanceWindow:Destroy()
  4539. CurrentSaveInstanceWindow = nil
  4540. if explorerPanel.Parent:FindFirstChild("SaveInstanceOverwriteCaution") then
  4541. explorerPanel.Parent.SaveInstanceOverwriteCaution:Destroy()
  4542. end
  4543. end
  4544. end
  4545. else
  4546. ypcall(function()
  4547. if SaveInstance then
  4548. SaveInstance(inst,filename.Text..".rbxmx",not saveObjects)
  4549. else
  4550. _G.SaveInstance(inst,filename.Text,not saveObjects)
  4551. end
  4552. end)
  4553. if CurrentSaveInstanceWindow then
  4554. CurrentSaveInstanceWindow:Destroy()
  4555. CurrentSaveInstanceWindow = nil
  4556. if explorerPanel.Parent:FindFirstChild("SaveInstanceOverwriteCaution") then
  4557. explorerPanel.Parent.SaveInstanceOverwriteCaution:Destroy()
  4558. end
  4559. end
  4560. end
  4561. end)
  4562. CurrentSaveInstanceWindow.MainWindow.Cancel.MouseButton1Up:connect(function()
  4563. if CurrentSaveInstanceWindow then
  4564. CurrentSaveInstanceWindow:Destroy()
  4565. CurrentSaveInstanceWindow = nil
  4566. if explorerPanel.Parent:FindFirstChild("SaveInstanceOverwriteCaution") then
  4567. explorerPanel.Parent.SaveInstanceOverwriteCaution:Destroy()
  4568. end
  4569. end
  4570. end)
  4571. CurrentSaveInstanceWindow.MainWindow.SaveObjects.MouseButton1Up:connect(function()
  4572. if saveObjects then
  4573. saveObjects = false
  4574. CurrentSaveInstanceWindow.MainWindow.SaveObjects.enabled.Visible = false
  4575. else
  4576. saveObjects = true
  4577. CurrentSaveInstanceWindow.MainWindow.SaveObjects.enabled.Visible = true
  4578. end
  4579. end)
  4580. end
  4581.  
  4582. function DestroyRightClick()
  4583. if currentRightClickMenu then
  4584. currentRightClickMenu:Destroy()
  4585. currentRightClickMenu = nil
  4586. end
  4587. if CurrentInsertObjectWindow and CurrentInsertObjectWindow.Visible then
  4588. CurrentInsertObjectWindow.Visible = false
  4589. end
  4590. end
  4591.  
  4592. function rightClickMenu(sObj)
  4593. local mouse = game:GetService("Players").LocalPlayer:GetMouse()
  4594.  
  4595. currentRightClickMenu = CreateRightClickMenu(
  4596. {"Cut","Copy","Paste Into","Duplicate","Delete","Group","Ungroup","Select Children","Teleport To","Insert Part","Insert Object","View Script","Save Instance","Call Function","Call Remote"},
  4597. "",
  4598. false,
  4599. function(option)
  4600. if option == "Cut" then
  4601. if not Option.Modifiable then return end
  4602. clipboard = {}
  4603. local list = Selection.List
  4604. local cut = {}
  4605. for i = 1,#list do
  4606. local obj = list[i]:Clone()
  4607. if obj then
  4608. table.insert(clipboard,obj)
  4609. table.insert(cut,list[i])
  4610. end
  4611. end
  4612. for i = 1,#cut do
  4613. pcall(delete,cut[i])
  4614. end
  4615. updateActions()
  4616. elseif option == "Copy" then
  4617. if not Option.Modifiable then return end
  4618. clipboard = {}
  4619. local list = Selection.List
  4620. for i = 1,#list do
  4621. table.insert(clipboard,list[i]:Clone())
  4622. end
  4623. updateActions()
  4624. elseif option == "Paste Into" then
  4625. if not Option.Modifiable then return end
  4626. local parent = Selection.List[1] or workspace
  4627. for i = 1,#clipboard do
  4628. clipboard[i]:Clone().Parent = parent
  4629. end
  4630. elseif option == "Duplicate" then
  4631. if not Option.Modifiable then return end
  4632. local list = Selection:Get()
  4633. for i = 1,#list do
  4634. list[i]:Clone().Parent = Selection.List[1].Parent or workspace
  4635. end
  4636. elseif option == "Delete" then
  4637. if not Option.Modifiable then return end
  4638. local list = Selection:Get()
  4639. for i = 1,#list do
  4640. pcall(delete,list[i])
  4641. end
  4642. Selection:Set({})
  4643. elseif option == "Group" then
  4644. if not Option.Modifiable then return end
  4645. local newModel = Instance.new("Model")
  4646. local list = Selection:Get()
  4647. newModel.Parent = Selection.List[1].Parent or workspace
  4648. for i = 1,#list do
  4649. list[i].Parent = newModel
  4650. end
  4651. Selection:Set({})
  4652. elseif option == "Ungroup" then
  4653. if not Option.Modifiable then return end
  4654. local ungrouped = {}
  4655. local list = Selection:Get()
  4656. for i = 1,#list do
  4657. if list[i]:IsA("Model") then
  4658. for i2,v2 in pairs(list[i]:GetChildren()) do
  4659. v2.Parent = list[i].Parent or workspace
  4660. table.insert(ungrouped,v2)
  4661. end
  4662. pcall(delete,list[i])
  4663. end
  4664. end
  4665. Selection:Set({})
  4666. if SettingsRemote:Invoke("SelectUngrouped") then
  4667. for i,v in pairs(ungrouped) do
  4668. Selection:Add(v)
  4669. end
  4670. end
  4671. elseif option == "Select Children" then
  4672. if not Option.Modifiable then return end
  4673. local list = Selection:Get()
  4674. Selection:Set({})
  4675. Selection:StopUpdates()
  4676. for i = 1,#list do
  4677. for i2,v2 in pairs(list[i]:GetChildren()) do
  4678. Selection:Add(v2)
  4679. end
  4680. end
  4681. Selection:ResumeUpdates()
  4682. elseif option == "Teleport To" then
  4683. if not Option.Modifiable then return end
  4684. local list = Selection:Get()
  4685. for i = 1,#list do
  4686. if list[i]:IsA("BasePart") then
  4687. pcall(function()
  4688. game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = list[i].CFrame
  4689. end)
  4690. break
  4691. end
  4692. end
  4693. elseif option == "Insert Part" then
  4694. if not Option.Modifiable then return end
  4695. local insertedParts = {}
  4696. local list = Selection:Get()
  4697. for i = 1,#list do
  4698. pcall(function()
  4699. local newPart = Instance.new("Part")
  4700. newPart.Parent = list[i]
  4701. newPart.CFrame = CFrame.new(game:GetService("Players").LocalPlayer.Character.Head.Position) + Vector3.new(0,3,0)
  4702. table.insert(insertedParts,newPart)
  4703. end)
  4704. end
  4705. elseif option == "Save Instance" then
  4706. if not Option.Modifiable then return end
  4707. local list = Selection:Get()
  4708. if #list == 1 then
  4709. list[1].Archivable = true
  4710. ypcall(function()PromptSaveInstance(list[1]:Clone())end)
  4711. elseif #list > 1 then
  4712. local newModel = Instance.new("Model")
  4713. newModel.Name = "SavedInstances"
  4714. for i = 1,#list do
  4715. ypcall(function()
  4716. list[i].Archivable = true
  4717. list[i]:Clone().Parent = newModel
  4718. end)
  4719. end
  4720. PromptSaveInstance(newModel)
  4721. end
  4722. elseif option == "Call Remote" then
  4723. if not Option.Modifiable then return end
  4724. local list = Selection:Get()
  4725. for i = 1,#list do
  4726. if list[i]:IsA("RemoteFunction") or list[i]:IsA("RemoteEvent") then
  4727. PromptRemoteCaller(list[i])
  4728. break
  4729. end
  4730. end
  4731. elseif option == "View Script" then
  4732. if not Option.Modifiable then return end
  4733. local list = Selection:Get()
  4734. for i = 1,#list do
  4735. if list[i]:IsA("LocalScript") or list[i]:IsA("ModuleScript") then
  4736. ScriptEditorEvent:Fire(list[i])
  4737. end
  4738. end
  4739. end
  4740. end)
  4741. currentRightClickMenu.Parent = explorerPanel.Parent
  4742. currentRightClickMenu.Position = UDim2.new(0,mouse.X,0,mouse.Y)
  4743. if currentRightClickMenu.AbsolutePosition.X + currentRightClickMenu.AbsoluteSize.X > explorerPanel.AbsolutePosition.X + explorerPanel.AbsoluteSize.X then
  4744. currentRightClickMenu.Position = UDim2.new(0, explorerPanel.AbsolutePosition.X + explorerPanel.AbsoluteSize.X - currentRightClickMenu.AbsoluteSize.X, 0, mouse.Y)
  4745. end
  4746. end
  4747.  
  4748. local function cancelReparentDrag()end
  4749. local function cancelSelectDrag()end
  4750. do
  4751. local listEntries = {}
  4752. local nameConnLookup = {}
  4753.  
  4754. local mouseDrag = Create('ImageButton',{
  4755. Name = "MouseDrag";
  4756. Position = UDim2.new(-0.25,0,-0.25,0);
  4757. Size = UDim2.new(1.5,0,1.5,0);
  4758. Transparency = 1;
  4759. AutoButtonColor = false;
  4760. Active = true;
  4761. ZIndex = 10;
  4762. })
  4763. local function dragSelect(last,add,button)
  4764. local connDrag
  4765. local conUp
  4766.  
  4767. conDrag = mouseDrag.MouseMoved:connect(function(x,y)
  4768. local pos = Vector2.new(x,y) - listFrame.AbsolutePosition
  4769. local size = listFrame.AbsoluteSize
  4770. if pos.x < 0 or pos.x > size.x or pos.y < 0 or pos.y > size.y then return end
  4771.  
  4772. local i = math.ceil(pos.y/ENTRY_BOUND) + scrollBar.ScrollIndex
  4773. -- Mouse may have made a large step, so interpolate between the
  4774. -- last index and the current.
  4775. for n = i<last and i or last, i>last and i or last do
  4776. local node = TreeList[n]
  4777. if node then
  4778. if add then
  4779. Selection:Add(node.Object)
  4780. else
  4781. Selection:Remove(node.Object)
  4782. end
  4783. end
  4784. end
  4785. last = i
  4786. end)
  4787.  
  4788. function cancelSelectDrag()
  4789. mouseDrag.Parent = nil
  4790. conDrag:disconnect()
  4791. conUp:disconnect()
  4792. function cancelSelectDrag()end
  4793. end
  4794.  
  4795. conUp = mouseDrag[button]:connect(cancelSelectDrag)
  4796.  
  4797. mouseDrag.Parent = GetScreen(listFrame)
  4798. end
  4799.  
  4800. local function dragReparent(object,dragGhost,clickPos,ghostOffset)
  4801. local connDrag
  4802. local conUp
  4803. local conUp2
  4804.  
  4805. local parentIndex = nil
  4806. local dragged = false
  4807.  
  4808. local parentHighlight = Create('Frame',{
  4809. Transparency = 1;
  4810. Visible = false;
  4811. Create('Frame',{
  4812. BorderSizePixel = 0;
  4813. BackgroundColor3 = Color3.new(0,0,0);
  4814. BackgroundTransparency = 0.1;
  4815. Position = UDim2.new(0,0,0,0);
  4816. Size = UDim2.new(1,0,0,1);
  4817. });
  4818. Create('Frame',{
  4819. BorderSizePixel = 0;
  4820. BackgroundColor3 = Color3.new(0,0,0);
  4821. BackgroundTransparency = 0.1;
  4822. Position = UDim2.new(1,0,0,0);
  4823. Size = UDim2.new(0,1,1,0);
  4824. });
  4825. Create('Frame',{
  4826. BorderSizePixel = 0;
  4827. BackgroundColor3 = Color3.new(0,0,0);
  4828. BackgroundTransparency = 0.1;
  4829. Position = UDim2.new(0,0,1,0);
  4830. Size = UDim2.new(1,0,0,1);
  4831. });
  4832. Create('Frame',{
  4833. BorderSizePixel = 0;
  4834. BackgroundColor3 = Color3.new(0,0,0);
  4835. BackgroundTransparency = 0.1;
  4836. Position = UDim2.new(0,0,0,0);
  4837. Size = UDim2.new(0,1,1,0);
  4838. });
  4839. })
  4840. SetZIndex(parentHighlight,9)
  4841.  
  4842. conDrag = mouseDrag.MouseMoved:connect(function(x,y)
  4843. local dragPos = Vector2.new(x,y)
  4844. if dragged then
  4845. local pos = dragPos - listFrame.AbsolutePosition
  4846. local size = listFrame.AbsoluteSize
  4847.  
  4848. parentIndex = nil
  4849. parentHighlight.Visible = false
  4850. if pos.x >= 0 and pos.x <= size.x and pos.y >= 0 and pos.y <= size.y + ENTRY_SIZE*2 then
  4851. local i = math.ceil(pos.y/ENTRY_BOUND-2)
  4852. local node = TreeList[i + scrollBar.ScrollIndex]
  4853. if node and node.Object ~= object and not object:IsAncestorOf(node.Object) then
  4854. parentIndex = i
  4855. local entry = listEntries[i]
  4856. if entry then
  4857. parentHighlight.Visible = true
  4858. parentHighlight.Position = UDim2.new(0,1,0,entry.AbsolutePosition.y-listFrame.AbsolutePosition.y)
  4859. parentHighlight.Size = UDim2.new(0,size.x-4,0,entry.AbsoluteSize.y)
  4860. end
  4861. end
  4862. end
  4863.  
  4864. dragGhost.Position = UDim2.new(0,dragPos.x+ghostOffset.x,0,dragPos.y+ghostOffset.y)
  4865. elseif (clickPos-dragPos).magnitude > 8 then
  4866. dragged = true
  4867. SetZIndex(dragGhost,9)
  4868. dragGhost.IndentFrame.Transparency = 0.25
  4869. dragGhost.IndentFrame.EntryText.TextColor3 = GuiColor.TextSelected
  4870. dragGhost.Position = UDim2.new(0,dragPos.x+ghostOffset.x,0,dragPos.y+ghostOffset.y)
  4871. dragGhost.Parent = GetScreen(listFrame)
  4872. parentHighlight.Parent = listFrame
  4873. end
  4874. end)
  4875.  
  4876. function cancelReparentDrag()
  4877. mouseDrag.Parent = nil
  4878. conDrag:disconnect()
  4879. conUp:disconnect()
  4880. conUp2:disconnect()
  4881. dragGhost:Destroy()
  4882. parentHighlight:Destroy()
  4883. function cancelReparentDrag()end
  4884. end
  4885.  
  4886. local wasSelected = Selection.Selected[object]
  4887. if not wasSelected and Option.Selectable then
  4888. Selection:Set({object})
  4889. end
  4890.  
  4891. conUp = mouseDrag.MouseButton1Up:connect(function()
  4892. cancelReparentDrag()
  4893. if dragged then
  4894. if parentIndex then
  4895. local parentNode = TreeList[parentIndex + scrollBar.ScrollIndex]
  4896. if parentNode then
  4897. parentNode.Expanded = true
  4898.  
  4899. local parentObj = parentNode.Object
  4900. local function parent(a,b)
  4901. a.Parent = b
  4902. end
  4903. if Option.Selectable then
  4904. local list = Selection.List
  4905. for i = 1,#list do
  4906. pcall(parent,list[i],parentObj)
  4907. end
  4908. else
  4909. pcall(parent,object,parentObj)
  4910. end
  4911. end
  4912. end
  4913. else
  4914. -- do selection click
  4915. if wasSelected and Option.Selectable then
  4916. Selection:Set({})
  4917. end
  4918. end
  4919. end)
  4920. conUp2 = mouseDrag.MouseButton2Down:connect(function()
  4921. cancelReparentDrag()
  4922. end)
  4923.  
  4924. mouseDrag.Parent = GetScreen(listFrame)
  4925. end
  4926.  
  4927. local entryTemplate = Create('ImageButton',{
  4928. Name = "Entry";
  4929. Transparency = 1;
  4930. AutoButtonColor = false;
  4931. Position = UDim2.new(0,0,0,0);
  4932. Size = UDim2.new(1,0,0,ENTRY_SIZE);
  4933. Create('Frame',{
  4934. Name = "IndentFrame";
  4935. BackgroundTransparency = 1;
  4936. BackgroundColor3 = GuiColor.Selected;
  4937. BorderColor3 = GuiColor.BorderSelected;
  4938. Position = UDim2.new(0,0,0,0);
  4939. Size = UDim2.new(1,0,1,0);
  4940. Create(Icon('ImageButton',0),{
  4941. Name = "Expand";
  4942. AutoButtonColor = false;
  4943. Position = UDim2.new(0,-GUI_SIZE,0.5,-GUI_SIZE/2);
  4944. Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE);
  4945. });
  4946. Create(Icon(nil,0),{
  4947. Name = "ExplorerIcon";
  4948. Position = UDim2.new(0,2+ENTRY_PADDING,0.5,-GUI_SIZE/2);
  4949. Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE);
  4950. });
  4951. Create('TextLabel',{
  4952. Name = "EntryText";
  4953. BackgroundTransparency = 1;
  4954. TextColor3 = GuiColor.Text;
  4955. TextXAlignment = 'Left';
  4956. TextYAlignment = 'Center';
  4957. Font = FONT;
  4958. FontSize = FONT_SIZE;
  4959. Text = "";
  4960. Position = UDim2.new(0,2+ENTRY_SIZE+4,0,0);
  4961. Size = UDim2.new(1,-2,1,0);
  4962. });
  4963. });
  4964. })
  4965.  
  4966. function scrollBar.UpdateCallback(self)
  4967. for i = 1,self.VisibleSpace do
  4968. local node = TreeList[i + self.ScrollIndex]
  4969. if node then
  4970. local entry = listEntries[i]
  4971. if not entry then
  4972. entry = Create(entryTemplate:Clone(),{
  4973. Position = UDim2.new(0,2,0,ENTRY_BOUND*(i-1)+2);
  4974. Size = UDim2.new(0,nodeWidth,0,ENTRY_SIZE);
  4975. ZIndex = listFrame.ZIndex;
  4976. })
  4977. listEntries[i] = entry
  4978.  
  4979. local expand = entry.IndentFrame.Expand
  4980. expand.MouseEnter:connect(function()
  4981. local node = TreeList[i + self.ScrollIndex]
  4982. if #node > 0 then
  4983. if node.Expanded then
  4984. Icon(expand,NODE_EXPANDED_OVER)
  4985. else
  4986. Icon(expand,NODE_COLLAPSED_OVER)
  4987. end
  4988. end
  4989. end)
  4990. expand.MouseLeave:connect(function()
  4991. local node = TreeList[i + self.ScrollIndex]
  4992. if #node > 0 then
  4993. if node.Expanded then
  4994. Icon(expand,NODE_EXPANDED)
  4995. else
  4996. Icon(expand,NODE_COLLAPSED)
  4997. end
  4998. end
  4999. end)
  5000. expand.MouseButton1Down:connect(function()
  5001. local node = TreeList[i + self.ScrollIndex]
  5002. if #node > 0 then
  5003. node.Expanded = not node.Expanded
  5004. if node.Object == explorerPanel.Parent and node.Expanded then
  5005. CreateCaution("Warning","Please be careful when editing instances inside here, this is like the System32 of Dex and modifying objects here can break Dex.")
  5006. end
  5007. -- use raw update so the list updates instantly
  5008. rawUpdateList()
  5009. end
  5010. end)
  5011.  
  5012. entry.MouseButton1Down:connect(function(x,y)
  5013. local node = TreeList[i + self.ScrollIndex]
  5014. DestroyRightClick()
  5015. if GetAwaitRemote:Invoke() then
  5016. bindSetAwaiting:Fire(node.Object)
  5017. return
  5018. end
  5019.  
  5020. if not HoldingShift then
  5021. lastSelectedNode = i + self.ScrollIndex
  5022. end
  5023.  
  5024. if HoldingShift and not filteringWorkspace() then
  5025. if lastSelectedNode then
  5026. if i + self.ScrollIndex - lastSelectedNode > 0 then
  5027. Selection:StopUpdates()
  5028. for i2 = 1, i + self.ScrollIndex - lastSelectedNode do
  5029. local newNode = TreeList[lastSelectedNode + i2]
  5030. if newNode then
  5031. Selection:Add(newNode.Object)
  5032. end
  5033. end
  5034. Selection:ResumeUpdates()
  5035. else
  5036. Selection:StopUpdates()
  5037. for i2 = i + self.ScrollIndex - lastSelectedNode, 1 do
  5038. local newNode = TreeList[lastSelectedNode + i2]
  5039. if newNode then
  5040. Selection:Add(newNode.Object)
  5041. end
  5042. end
  5043. Selection:ResumeUpdates()
  5044. end
  5045. end
  5046. return
  5047. end
  5048.  
  5049. if HoldingCtrl then
  5050. if Selection.Selected[node.Object] then
  5051. Selection:Remove(node.Object)
  5052. else
  5053. Selection:Add(node.Object)
  5054. end
  5055. return
  5056. end
  5057. if Option.Modifiable then
  5058. local pos = Vector2.new(x,y)
  5059. dragReparent(node.Object,entry:Clone(),pos,entry.AbsolutePosition-pos)
  5060. elseif Option.Selectable then
  5061. if Selection.Selected[node.Object] then
  5062. Selection:Set({})
  5063. else
  5064. Selection:Set({node.Object})
  5065. end
  5066. dragSelect(i+self.ScrollIndex,true,'MouseButton1Up')
  5067. end
  5068. end)
  5069.  
  5070. entry.MouseButton2Down:connect(function()
  5071. if not Option.Selectable then return end
  5072.  
  5073. DestroyRightClick()
  5074.  
  5075. curSelect = entry
  5076.  
  5077. local node = TreeList[i + self.ScrollIndex]
  5078.  
  5079. if GetAwaitRemote:Invoke() then
  5080. bindSetAwaiting:Fire(node.Object)
  5081. return
  5082. end
  5083.  
  5084. if not Selection.Selected[node.Object] then
  5085. Selection:Set({node.Object})
  5086. end
  5087. end)
  5088.  
  5089.  
  5090. entry.MouseButton2Up:connect(function()
  5091. if not Option.Selectable then return end
  5092.  
  5093. local node = TreeList[i + self.ScrollIndex]
  5094.  
  5095. if checkMouseInGui(curSelect) then
  5096. rightClickMenu(node.Object)
  5097. end
  5098. end)
  5099.  
  5100. entry.Parent = listFrame
  5101. end
  5102.  
  5103. entry.Visible = true
  5104.  
  5105. local object = node.Object
  5106.  
  5107. -- update expand icon
  5108. if #node == 0 then
  5109. entry.IndentFrame.Expand.Visible = false
  5110. elseif node.Expanded then
  5111. Icon(entry.IndentFrame.Expand,NODE_EXPANDED)
  5112. entry.IndentFrame.Expand.Visible = true
  5113. else
  5114. Icon(entry.IndentFrame.Expand,NODE_COLLAPSED)
  5115. entry.IndentFrame.Expand.Visible = true
  5116. end
  5117.  
  5118. -- update explorer icon
  5119. Icon(entry.IndentFrame.ExplorerIcon,ExplorerIndex[object.ClassName] or 0)
  5120.  
  5121. -- update indentation
  5122. local w = (node.Depth)*(2+ENTRY_PADDING+GUI_SIZE)
  5123. entry.IndentFrame.Position = UDim2.new(0,w,0,0)
  5124. entry.IndentFrame.Size = UDim2.new(1,-w,1,0)
  5125.  
  5126. -- update name change detection
  5127. if nameConnLookup[entry] then
  5128. nameConnLookup[entry]:disconnect()
  5129. end
  5130. local text = entry.IndentFrame.EntryText
  5131. text.Text = object.Name
  5132. nameConnLookup[entry] = node.Object.Changed:connect(function(p)
  5133. if p == 'Name' then
  5134. text.Text = object.Name
  5135. end
  5136. end)
  5137.  
  5138. -- update selection
  5139. entry.IndentFrame.Transparency = node.Selected and 0 or 1
  5140. text.TextColor3 = GuiColor[node.Selected and 'TextSelected' or 'Text']
  5141.  
  5142. entry.Size = UDim2.new(0,nodeWidth,0,ENTRY_SIZE)
  5143. elseif listEntries[i] then
  5144. listEntries[i].Visible = false
  5145. end
  5146. end
  5147. for i = self.VisibleSpace+1,self.TotalSpace do
  5148. local entry = listEntries[i]
  5149. if entry then
  5150. listEntries[i] = nil
  5151. entry:Destroy()
  5152. end
  5153. end
  5154. end
  5155.  
  5156. function scrollBarH.UpdateCallback(self)
  5157. for i = 1,scrollBar.VisibleSpace do
  5158. local node = TreeList[i + scrollBar.ScrollIndex]
  5159. if node then
  5160. local entry = listEntries[i]
  5161. if entry then
  5162. entry.Position = UDim2.new(0,2 - scrollBarH.ScrollIndex,0,ENTRY_BOUND*(i-1)+2)
  5163. end
  5164. end
  5165. end
  5166. end
  5167.  
  5168. Connect(listFrame.Changed,function(p)
  5169. if p == 'AbsoluteSize' then
  5170. rawUpdateSize()
  5171. end
  5172. end)
  5173.  
  5174. local wheelAmount = 6
  5175. explorerPanel.MouseWheelForward:connect(function()
  5176. if scrollBar.VisibleSpace - 1 > wheelAmount then
  5177. scrollBar:ScrollTo(scrollBar.ScrollIndex - wheelAmount)
  5178. else
  5179. scrollBar:ScrollTo(scrollBar.ScrollIndex - scrollBar.VisibleSpace)
  5180. end
  5181. end)
  5182. explorerPanel.MouseWheelBackward:connect(function()
  5183. if scrollBar.VisibleSpace - 1 > wheelAmount then
  5184. scrollBar:ScrollTo(scrollBar.ScrollIndex + wheelAmount)
  5185. else
  5186. scrollBar:ScrollTo(scrollBar.ScrollIndex + scrollBar.VisibleSpace)
  5187. end
  5188. end)
  5189. end
  5190.  
  5191. ----------------------------------------------------------------
  5192. ----------------------------------------------------------------
  5193. ----------------------------------------------------------------
  5194. ----------------------------------------------------------------
  5195. ---- Object detection
  5196.  
  5197. -- Inserts `v` into `t` at `i`. Also sets `Index` field in `v`.
  5198. local function insert(t,i,v)
  5199. for n = #t,i,-1 do
  5200. local v = t[n]
  5201. v.Index = n+1
  5202. t[n+1] = v
  5203. end
  5204. v.Index = i
  5205. t[i] = v
  5206. end
  5207.  
  5208. -- Removes `i` from `t`. Also sets `Index` field in removed value.
  5209. local function remove(t,i)
  5210. local v = t[i]
  5211. for n = i+1,#t do
  5212. local v = t[n]
  5213. v.Index = n-1
  5214. t[n-1] = v
  5215. end
  5216. t[#t] = nil
  5217. v.Index = 0
  5218. return v
  5219. end
  5220.  
  5221. -- Returns how deep `o` is in the tree.
  5222. local function depth(o)
  5223. local d = -1
  5224. while o do
  5225. o = o.Parent
  5226. d = d + 1
  5227. end
  5228. return d
  5229. end
  5230.  
  5231.  
  5232. local connLookup = {}
  5233.  
  5234. -- Returns whether a node would be present in the tree list
  5235. local function nodeIsVisible(node)
  5236. local visible = true
  5237. node = node.Parent
  5238. while node and visible do
  5239. visible = visible and node.Expanded
  5240. node = node.Parent
  5241. end
  5242. return visible
  5243. end
  5244.  
  5245. -- Removes an object's tree node. Called when the object stops existing in the
  5246. -- game tree.
  5247. local function removeObject(object)
  5248. local objectNode = NodeLookup[object]
  5249. if not objectNode then
  5250. return
  5251. end
  5252.  
  5253. local visible = nodeIsVisible(objectNode)
  5254.  
  5255. Selection:Remove(object,true)
  5256.  
  5257. local parent = objectNode.Parent
  5258. remove(parent,objectNode.Index)
  5259. NodeLookup[object] = nil
  5260. connLookup[object]:disconnect()
  5261. connLookup[object] = nil
  5262.  
  5263. if visible then
  5264. updateList()
  5265. elseif nodeIsVisible(parent) then
  5266. updateScroll()
  5267. end
  5268. end
  5269.  
  5270. -- Moves a tree node to a new parent. Called when an existing object's parent
  5271. -- changes.
  5272. local function moveObject(object,parent)
  5273. local objectNode = NodeLookup[object]
  5274. if not objectNode then
  5275. return
  5276. end
  5277.  
  5278. local parentNode = NodeLookup[parent]
  5279. if not parentNode then
  5280. return
  5281. end
  5282.  
  5283. local visible = nodeIsVisible(objectNode)
  5284.  
  5285. remove(objectNode.Parent,objectNode.Index)
  5286. objectNode.Parent = parentNode
  5287.  
  5288. objectNode.Depth = depth(object)
  5289. local function r(node,d)
  5290. for i = 1,#node do
  5291. node[i].Depth = d
  5292. r(node[i],d+1)
  5293. end
  5294. end
  5295. r(objectNode,objectNode.Depth+1)
  5296.  
  5297. insert(parentNode,#parentNode+1,objectNode)
  5298.  
  5299. if visible or nodeIsVisible(objectNode) then
  5300. updateList()
  5301. elseif nodeIsVisible(objectNode.Parent) then
  5302. updateScroll()
  5303. end
  5304. end
  5305.  
  5306. -- ScriptContext['/Libraries/LibraryRegistration/LibraryRegistration']
  5307. -- This RobloxLocked object lets me index its properties for some reason
  5308.  
  5309. local function check(object)
  5310. return object.AncestryChanged
  5311. end
  5312.  
  5313. -- Creates a new tree node from an object. Called when an object starts
  5314. -- existing in the game tree.
  5315. local function addObject(object,noupdate)
  5316. if script then
  5317. -- protect against naughty RobloxLocked objects
  5318. local s = pcall(check,object)
  5319. if not s then
  5320. return
  5321. end
  5322. end
  5323.  
  5324. local parentNode = NodeLookup[object.Parent]
  5325. if not parentNode then
  5326. return
  5327. end
  5328.  
  5329. local objectNode = {
  5330. Object = object;
  5331. Parent = parentNode;
  5332. Index = 0;
  5333. Expanded = false;
  5334. Selected = false;
  5335. Depth = depth(object);
  5336. }
  5337.  
  5338. connLookup[object] = Connect(object.AncestryChanged,function(c,p)
  5339. if c == object then
  5340. if p == nil then
  5341. removeObject(c)
  5342. else
  5343. moveObject(c,p)
  5344. end
  5345. end
  5346. end)
  5347.  
  5348. NodeLookup[object] = objectNode
  5349. insert(parentNode,#parentNode+1,objectNode)
  5350.  
  5351. if not noupdate then
  5352. if nodeIsVisible(objectNode) then
  5353. updateList()
  5354. elseif nodeIsVisible(objectNode.Parent) then
  5355. updateScroll()
  5356. end
  5357. end
  5358. end
  5359.  
  5360. local function makeObject(obj,par)
  5361. local newObject = Instance.new(obj.ClassName)
  5362. for i,v in pairs(obj.Properties) do
  5363. ypcall(function()
  5364. local newProp
  5365. newProp = ToPropValue(v.Value,v.Type)
  5366. newObject[v.Name] = newProp
  5367. end)
  5368. end
  5369. newObject.Parent = par
  5370. end
  5371.  
  5372. local function writeObject(obj)
  5373. local newObject = {ClassName = obj.ClassName, Properties = {}}
  5374. for i,v in pairs(RbxApi.GetProperties(obj.className)) do
  5375. if v["Name"] ~= "Parent" then
  5376. print("thispassed")
  5377. table.insert(newObject.Properties,{Name = v["Name"], Type = v["ValueType"], Value = tostring(obj[v["Name"]])})
  5378. end
  5379. end
  5380. return newObject
  5381. end
  5382.  
  5383. local function buildDexStorage()
  5384. local localDexStorage
  5385.  
  5386. local success,err = ypcall(function()
  5387. localDexStorage = game:GetObjects("rbxasset://DexStorage.rbxm")[1]
  5388. end)
  5389.  
  5390. if success and localDexStorage then
  5391. for i,v in pairs(localDexStorage:GetChildren()) do
  5392. ypcall(function()
  5393. v.Parent = DexStorageMain
  5394. end)
  5395. end
  5396. end
  5397.  
  5398. updateDexStorageListeners()
  5399. --[[
  5400. local localDexStorage = readfile(getelysianpath().."DexStorage.txt")--game:GetService("CookiesService"):GetCookieValue("DexStorage")
  5401. --local success,err = pcall(function()
  5402. if localDexStorage then
  5403. local objTable = game:GetService("HttpService"):JSONDecode(localDexStorage)
  5404. for i,v in pairs(objTable) do
  5405. makeObject(v,DexStorageMain)
  5406. end
  5407. end
  5408. --end)
  5409. --]]
  5410. end
  5411.  
  5412. local dexStorageDebounce = false
  5413. local dexStorageListeners = {}
  5414.  
  5415. local function updateDexStorage()
  5416. if dexStorageDebounce then return end
  5417. dexStorageDebounce = true
  5418.  
  5419. wait()
  5420.  
  5421. pcall(function()
  5422. saveinstance("content//DexStorage.rbxm",DexStorageMain)
  5423. end)
  5424.  
  5425. updateDexStorageListeners()
  5426.  
  5427. dexStorageDebounce = false
  5428. --[[
  5429. local success,err = ypcall(function()
  5430. local objs = {}
  5431. for i,v in pairs(DexStorageMain:GetChildren()) do
  5432. table.insert(objs,writeObject(v))
  5433. end
  5434. writefile(getelysianpath().."DexStorage.txt",game:GetService("HttpService"):JSONEncode(objs))
  5435. --game:GetService("CookiesService"):SetCookieValue("DexStorage",game:GetService("HttpService"):JSONEncode(objs))
  5436. end)
  5437. if err then
  5438. CreateCaution("DexStorage Save Fail!","DexStorage broke! If you see this message, report to Raspberry Pi!")
  5439. end
  5440. print("hi")
  5441. --]]
  5442. end
  5443.  
  5444. function updateDexStorageListeners()
  5445. for i,v in pairs(dexStorageListeners) do
  5446. v:Disconnect()
  5447. end
  5448. dexStorageListeners = {}
  5449. for i,v in pairs(DexStorageMain:GetChildren()) do
  5450. pcall(function()
  5451. local ev = v.Changed:connect(updateDexStorage)
  5452. table.insert(dexStorageListeners,ev)
  5453. end)
  5454. end
  5455. end
  5456.  
  5457. do
  5458. NodeLookup[workspace.Parent] = {
  5459. Object = workspace.Parent;
  5460. Parent = nil;
  5461. Index = 0;
  5462. Expanded = true;
  5463. }
  5464.  
  5465. NodeLookup[DexOutput] = {
  5466. Object = DexOutput;
  5467. Parent = nil;
  5468. Index = 0;
  5469. Expanded = true;
  5470. }
  5471.  
  5472. if DexStorageEnabled then
  5473. NodeLookup[DexStorage] = {
  5474. Object = DexStorage;
  5475. Parent = nil;
  5476. Index = 0;
  5477. Expanded = true;
  5478. }
  5479. end
  5480.  
  5481. if NilStorageEnabled then
  5482. NodeLookup[NilStorage] = {
  5483. Object = NilStorage;
  5484. Parent = nil;
  5485. Index = 0;
  5486. Expanded = true;
  5487. }
  5488. end
  5489.  
  5490. Connect(game.DescendantAdded,addObject)
  5491. Connect(game.DescendantRemoving,removeObject)
  5492.  
  5493. Connect(DexOutput.DescendantAdded,addObject)
  5494. Connect(DexOutput.DescendantRemoving,removeObject)
  5495.  
  5496. if DexStorageEnabled then
  5497. --[[
  5498. if readfile(getelysianpath().."DexStorage.txt") == nil then
  5499. writefile(getelysianpath().."DexStorage.txt","")
  5500. end
  5501. --]]
  5502.  
  5503. buildDexStorage()
  5504.  
  5505. Connect(DexStorage.DescendantAdded,addObject)
  5506. Connect(DexStorage.DescendantRemoving,removeObject)
  5507.  
  5508. Connect(DexStorage.DescendantAdded,updateDexStorage)
  5509. Connect(DexStorage.DescendantRemoving,updateDexStorage)
  5510. end
  5511.  
  5512. if NilStorageEnabled then
  5513. Connect(NilStorage.DescendantAdded,addObject)
  5514. Connect(NilStorage.DescendantRemoving,removeObject)
  5515.  
  5516. local currentTable = get_nil_instances()
  5517.  
  5518. spawn(function()
  5519. while wait() do
  5520. if #currentTable ~= #get_nil_instances() then
  5521. currentTable = get_nil_instances()
  5522. --NilStorageMain:ClearAllChildren()
  5523. for i,v in pairs(get_nil_instances()) do
  5524. if v ~= NilStorage and v ~= DexStorage then
  5525. pcall(function()
  5526. v.Parent = NilStorageMain
  5527. end)
  5528. --[[
  5529. local newNil = v
  5530. newNil.Archivable = true
  5531. newNil:Clone().Parent = NilStorageMain
  5532. --]]
  5533. end
  5534. end
  5535. end
  5536. end
  5537. end)
  5538. end
  5539.  
  5540. local function get(o)
  5541. return o:GetChildren()
  5542. end
  5543.  
  5544. local function r(o)
  5545. local s,children = pcall(get,o)
  5546. if s then
  5547. for i = 1,#children do
  5548. addObject(children[i],true)
  5549. r(children[i])
  5550. end
  5551. end
  5552. end
  5553.  
  5554. r(workspace.Parent)
  5555. r(DexOutput)
  5556. if DexStorageEnabled then
  5557. r(DexStorage)
  5558. end
  5559. if NilStorageEnabled then
  5560. r(NilStorage)
  5561. end
  5562.  
  5563. scrollBar.VisibleSpace = math.ceil(listFrame.AbsoluteSize.y/ENTRY_BOUND)
  5564. updateList()
  5565. end
  5566.  
  5567. ----------------------------------------------------------------
  5568. ----------------------------------------------------------------
  5569. ----------------------------------------------------------------
  5570. ----------------------------------------------------------------
  5571. ---- Actions
  5572.  
  5573. local actionButtons do
  5574. actionButtons = {}
  5575.  
  5576. local totalActions = 1
  5577. local currentActions = totalActions
  5578. local function makeButton(icon,over,name,vis,cond)
  5579. local buttonEnabled = false
  5580.  
  5581. local button = Create(Icon('ImageButton',icon),{
  5582. Name = name .. "Button";
  5583. Visible = Option.Modifiable and Option.Selectable;
  5584. Position = UDim2.new(1,-(GUI_SIZE+2)*currentActions+2,0.25,-GUI_SIZE/2);
  5585. Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE);
  5586. Parent = headerFrame;
  5587. })
  5588.  
  5589. local tipText = Create('TextLabel',{
  5590. Name = name .. "Text";
  5591. Text = name;
  5592. Visible = false;
  5593. BackgroundTransparency = 1;
  5594. TextXAlignment = 'Right';
  5595. Font = FONT;
  5596. FontSize = FONT_SIZE;
  5597. Position = UDim2.new(0,0,0,0);
  5598. Size = UDim2.new(1,-(GUI_SIZE+2)*totalActions,1,0);
  5599. Parent = headerFrame;
  5600. })
  5601.  
  5602.  
  5603. button.MouseEnter:connect(function()
  5604. if buttonEnabled then
  5605. button.BackgroundTransparency = 0.9
  5606. end
  5607. --Icon(button,over)
  5608. --tipText.Visible = true
  5609. end)
  5610. button.MouseLeave:connect(function()
  5611. button.BackgroundTransparency = 1
  5612. --Icon(button,icon)
  5613. --tipText.Visible = false
  5614. end)
  5615.  
  5616. currentActions = currentActions + 1
  5617. actionButtons[#actionButtons+1] = {Obj = button,Cond = cond}
  5618. QuickButtons[#actionButtons+1] = {Obj = button,Cond = cond, Toggle = function(on)
  5619. if on then
  5620. buttonEnabled = true
  5621. Icon(button,over)
  5622. else
  5623. buttonEnabled = false
  5624. Icon(button,icon)
  5625. end
  5626. end}
  5627. return button
  5628. end
  5629.  
  5630. --local clipboard = {}
  5631. local function delete(o)
  5632. o.Parent = nil
  5633. end
  5634.  
  5635. makeButton(ACTION_EDITQUICKACCESS,ACTION_EDITQUICKACCESS,"Options",true,function()return true end).MouseButton1Click:connect(function()
  5636.  
  5637. end)
  5638.  
  5639.  
  5640. -- DELETE
  5641. makeButton(ACTION_DELETE,ACTION_DELETE_OVER,"Delete",true,function() return #Selection:Get() > 0 end).MouseButton1Click:connect(function()
  5642. if not Option.Modifiable then return end
  5643. local list = Selection:Get()
  5644. for i = 1,#list do
  5645. pcall(delete,list[i])
  5646. end
  5647. Selection:Set({})
  5648. end)
  5649.  
  5650. -- PASTE
  5651. makeButton(ACTION_PASTE,ACTION_PASTE_OVER,"Paste",true,function() return #Selection:Get() > 0 and #clipboard > 0 end).MouseButton1Click:connect(function()
  5652. if not Option.Modifiable then return end
  5653. local parent = Selection.List[1] or workspace
  5654. for i = 1,#clipboard do
  5655. clipboard[i]:Clone().Parent = parent
  5656. end
  5657. end)
  5658.  
  5659. -- COPY
  5660. makeButton(ACTION_COPY,ACTION_COPY_OVER,"Copy",true,function() return #Selection:Get() > 0 end).MouseButton1Click:connect(function()
  5661. if not Option.Modifiable then return end
  5662. clipboard = {}
  5663. local list = Selection.List
  5664. for i = 1,#list do
  5665. table.insert(clipboard,list[i]:Clone())
  5666. end
  5667. updateActions()
  5668. end)
  5669.  
  5670. -- CUT
  5671. makeButton(ACTION_CUT,ACTION_CUT_OVER,"Cut",true,function() return #Selection:Get() > 0 end).MouseButton1Click:connect(function()
  5672. if not Option.Modifiable then return end
  5673. clipboard = {}
  5674. local list = Selection.List
  5675. local cut = {}
  5676. for i = 1,#list do
  5677. local obj = list[i]:Clone()
  5678. if obj then
  5679. table.insert(clipboard,obj)
  5680. table.insert(cut,list[i])
  5681. end
  5682. end
  5683. for i = 1,#cut do
  5684. pcall(delete,cut[i])
  5685. end
  5686. updateActions()
  5687. end)
  5688.  
  5689. -- FREEZE
  5690. makeButton(ACTION_FREEZE,ACTION_FREEZE,"Freeze",true,function() return true end)
  5691.  
  5692. -- ADD/REMOVE STARRED
  5693. makeButton(ACTION_ADDSTAR,ACTION_ADDSTAR_OVER,"Star",true,function() return #Selection:Get() > 0 end)
  5694.  
  5695. -- STARRED
  5696. makeButton(ACTION_STARRED,ACTION_STARRED,"Starred",true,function() return true end)
  5697.  
  5698.  
  5699. -- SORT
  5700. -- local actionSort = makeButton(ACTION_SORT,ACTION_SORT_OVER,"Sort")
  5701. end
  5702.  
  5703. ----------------------------------------------------------------
  5704. ----------------------------------------------------------------
  5705. ----------------------------------------------------------------
  5706. ----------------------------------------------------------------
  5707. ---- Option Bindables
  5708.  
  5709. do
  5710. local optionCallback = {
  5711. Modifiable = function(value)
  5712. for i = 1,#actionButtons do
  5713. actionButtons[i].Obj.Visible = value and Option.Selectable
  5714. end
  5715. cancelReparentDrag()
  5716. end;
  5717. Selectable = function(value)
  5718. for i = 1,#actionButtons do
  5719. actionButtons[i].Obj.Visible = value and Option.Modifiable
  5720. end
  5721. cancelSelectDrag()
  5722. Selection:Set({})
  5723. end;
  5724. }
  5725.  
  5726. local bindSetOption = explorerPanel:FindFirstChild("SetOption")
  5727. if not bindSetOption then
  5728. bindSetOption = Create('BindableFunction',{Name = "SetOption"})
  5729. bindSetOption.Parent = explorerPanel
  5730. end
  5731.  
  5732. bindSetOption.OnInvoke = function(optionName,value)
  5733. if optionCallback[optionName] then
  5734. Option[optionName] = value
  5735. optionCallback[optionName](value)
  5736. end
  5737. end
  5738.  
  5739. local bindGetOption = explorerPanel:FindFirstChild("GetOption")
  5740. if not bindGetOption then
  5741. bindGetOption = Create('BindableFunction',{Name = "GetOption"})
  5742. bindGetOption.Parent = explorerPanel
  5743. end
  5744.  
  5745. bindGetOption.OnInvoke = function(optionName)
  5746. if optionName then
  5747. return Option[optionName]
  5748. else
  5749. local options = {}
  5750. for k,v in pairs(Option) do
  5751. options[k] = v
  5752. end
  5753. return options
  5754. end
  5755. end
  5756. end
  5757.  
  5758. function SelectionVar()
  5759. return Selection
  5760. end
  5761.  
  5762. Input.InputBegan:connect(function(key)
  5763. if key.KeyCode == Enum.KeyCode.LeftControl then
  5764. HoldingCtrl = true
  5765. end
  5766. if key.KeyCode == Enum.KeyCode.LeftShift then
  5767. HoldingShift = true
  5768. end
  5769. end)
  5770.  
  5771. Input.InputEnded:connect(function(key)
  5772. if key.KeyCode == Enum.KeyCode.LeftControl then
  5773. HoldingCtrl = false
  5774. end
  5775. if key.KeyCode == Enum.KeyCode.LeftShift then
  5776. HoldingShift = false
  5777. end
  5778. end)
  5779.  
  5780. while RbxApi == nil do
  5781. RbxApi = GetApiRemote:Invoke()
  5782. wait()
  5783. end
  5784.  
  5785. explorerFilter.Changed:connect(function(prop)
  5786. if prop == "Text" then
  5787. rawUpdateList()
  5788. end
  5789. end)
  5790.  
  5791. CurrentInsertObjectWindow = CreateInsertObjectMenu(
  5792. GetClasses(),
  5793. "",
  5794. false,
  5795. function(option)
  5796. CurrentInsertObjectWindow.Visible = false
  5797. local list = SelectionVar():Get()
  5798. for i = 1,#list do
  5799. pcall(function() Instance.new(option,list[i]) end)
  5800. end
  5801. DestroyRightClick()
  5802. end
  5803. )
  5804. end))
  5805. BindableFunction17.Name = "GetPrint"
  5806. BindableFunction17.Parent = Frame10
  5807. LocalScript18.Name = "Selection"
  5808. LocalScript18.Parent = ScreenGui0
  5809. table.insert(cors,sandbox(LocalScript18,function()
  5810. local Gui = script.Parent
  5811.  
  5812. local IntroFrame = Gui:WaitForChild("IntroFrame")
  5813.  
  5814. local SideMenu = Gui:WaitForChild("SideMenu")
  5815. local OpenToggleButton = Gui:WaitForChild("Toggle")
  5816. local CloseToggleButton = SideMenu:WaitForChild("Toggle")
  5817. local OpenScriptEditorButton = SideMenu:WaitForChild("OpenScriptEditor")
  5818.  
  5819. local ScriptEditor = Gui:WaitForChild("ScriptEditor")
  5820.  
  5821. local SlideOut = SideMenu:WaitForChild("SlideOut")
  5822. local SlideFrame = SlideOut:WaitForChild("SlideFrame")
  5823. local Slant = SideMenu:WaitForChild("Slant")
  5824.  
  5825. local ExplorerButton = SlideFrame:WaitForChild("Explorer")
  5826. local SettingsButton = SlideFrame:WaitForChild("Settings")
  5827.  
  5828. local SelectionBox = Instance.new("SelectionBox")
  5829. SelectionBox.Parent = Gui
  5830.  
  5831. local ExplorerPanel = Gui:WaitForChild("ExplorerPanel")
  5832. local PropertiesFrame = Gui:WaitForChild("PropertiesFrame")
  5833. local SaveMapWindow = Gui:WaitForChild("SaveMapWindow")
  5834. local RemoteDebugWindow = Gui:WaitForChild("RemoteDebugWindow")
  5835.  
  5836. local SettingsPanel = Gui:WaitForChild("SettingsPanel")
  5837. local AboutPanel = Gui:WaitForChild("About")
  5838. local SettingsListener = SettingsPanel:WaitForChild("GetSetting")
  5839. local SettingTemplate = SettingsPanel:WaitForChild("SettingTemplate")
  5840. local SettingList = SettingsPanel:WaitForChild("SettingList")
  5841.  
  5842. local SaveMapCopyList = SaveMapWindow:WaitForChild("CopyList")
  5843. local SaveMapSettingFrame = SaveMapWindow:WaitForChild("MapSettings")
  5844. local SaveMapName = SaveMapWindow:WaitForChild("FileName")
  5845. local SaveMapButton = SaveMapWindow:WaitForChild("Save")
  5846. local SaveMapCopyTemplate = SaveMapWindow:WaitForChild("Entry")
  5847. local SaveMapSettings = {
  5848. CopyWhat = {
  5849. Workspace = true,
  5850. Lighting = true,
  5851. ReplicatedStorage = true,
  5852. ReplicatedFirst = true,
  5853. StarterPack = true,
  5854. StarterGui = true,
  5855. StarterPlayer = true
  5856. },
  5857. SaveScripts = true,
  5858. SaveTerrain = true,
  5859. LightingProperties = true,
  5860. CameraInstances = true
  5861. }
  5862.  
  5863. --[[
  5864. local ClickSelectOption = SettingsPanel:WaitForChild("ClickSelect"):WaitForChild("Change")
  5865. local SelectionBoxOption = SettingsPanel:WaitForChild("SelectionBox"):WaitForChild("Change")
  5866. local ClearPropsOption = SettingsPanel:WaitForChild("ClearProperties"):WaitForChild("Change")
  5867. local SelectUngroupedOption = SettingsPanel:WaitForChild("SelectUngrouped"):WaitForChild("Change")
  5868. --]]
  5869.  
  5870. local SelectionChanged = ExplorerPanel:WaitForChild("SelectionChanged")
  5871. local GetSelection = ExplorerPanel:WaitForChild("GetSelection")
  5872. local SetSelection = ExplorerPanel:WaitForChild("SetSelection")
  5873.  
  5874. local Player = game:GetService("Players").LocalPlayer
  5875. local Mouse = Player:GetMouse()
  5876.  
  5877. local CurrentWindow = "Nothing c:"
  5878. local Windows = {
  5879. Explorer = {
  5880. ExplorerPanel,
  5881. PropertiesFrame
  5882. },
  5883. Settings = {SettingsPanel},
  5884. SaveMap = {SaveMapWindow},
  5885. Remotes = {RemoteDebugWindow},
  5886. About = {AboutPanel},
  5887. }
  5888.  
  5889. function switchWindows(wName,over)
  5890. if CurrentWindow == wName and not over then return end
  5891.  
  5892. local count = 0
  5893.  
  5894. for i,v in pairs(Windows) do
  5895. count = 0
  5896. if i ~= wName then
  5897. for _,c in pairs(v) do c:TweenPosition(UDim2.new(1, 30, count * 0.5, count * 36), "Out", "Quad", 0.5, true) count = count + 1 end
  5898. end
  5899. end
  5900.  
  5901. count = 0
  5902.  
  5903. if Windows[wName] then
  5904. for _,c in pairs(Windows[wName]) do c:TweenPosition(UDim2.new(1, -300, count * 0.5, count * 36), "Out", "Quad", 0.5, true) count = count + 1 end
  5905. end
  5906.  
  5907. if wName ~= "Nothing c:" then
  5908. CurrentWindow = wName
  5909. for i,v in pairs(SlideFrame:GetChildren()) do
  5910. v.BackgroundTransparency = 1
  5911. v.Icon.ImageColor3 = Color3.new(70/255, 70/255, 70/255)
  5912. end
  5913. if SlideFrame:FindFirstChild(wName) then
  5914. SlideFrame[wName].BackgroundTransparency = 0.5
  5915. SlideFrame[wName].Icon.ImageColor3 = Color3.new(0,0,0)
  5916. end
  5917. end
  5918. end
  5919.  
  5920. function toggleDex(on)
  5921. if on then
  5922. SideMenu:TweenPosition(UDim2.new(1, -330, 0, 0), "Out", "Quad", 0.5, true)
  5923. OpenToggleButton:TweenPosition(UDim2.new(1,0,0,0), "Out", "Quad", 0.5, true)
  5924. switchWindows(CurrentWindow,true)
  5925. else
  5926. SideMenu:TweenPosition(UDim2.new(1, 0, 0, 0), "Out", "Quad", 0.5, true)
  5927. OpenToggleButton:TweenPosition(UDim2.new(1,-40,0,0), "Out", "Quad", 0.5, true)
  5928. switchWindows("Nothing c:")
  5929. end
  5930. end
  5931.  
  5932. local Settings = {
  5933. ClickSelect = false,
  5934. SelBox = false,
  5935. ClearProps = false,
  5936. SelectUngrouped = true,
  5937. SaveInstanceScripts = true
  5938. }
  5939.  
  5940. function ReturnSetting(set)
  5941. if set == "ClearProps" then
  5942. return Settings.ClearProps
  5943. elseif set == "SelectUngrouped" then
  5944. return Settings.SelectUngrouped
  5945. end
  5946. end
  5947.  
  5948. OpenToggleButton.MouseButton1Up:connect(function()
  5949. toggleDex(true)
  5950. end)
  5951.  
  5952. OpenScriptEditorButton.MouseButton1Up:connect(function()
  5953. if OpenScriptEditorButton.Active then
  5954. ScriptEditor.Visible = true
  5955. end
  5956. end)
  5957.  
  5958. CloseToggleButton.MouseButton1Up:connect(function()
  5959. if CloseToggleButton.Active then
  5960. toggleDex(false)
  5961. end
  5962. end)
  5963.  
  5964. --[[
  5965. OpenToggleButton.MouseButton1Up:connect(function()
  5966. SideMenu:TweenPosition(UDim2.new(1, -330, 0, 0), "Out", "Quad", 0.5, true)
  5967.  
  5968. if CurrentWindow == "Explorer" then
  5969. ExplorerPanel:TweenPosition(UDim2.new(1, -300, 0, 0), "Out", "Quad", 0.5, true)
  5970. PropertiesFrame:TweenPosition(UDim2.new(1, -300, 0.5, 36), "Out", "Quad", 0.5, true)
  5971. else
  5972. SettingsPanel:TweenPosition(UDim2.new(1, -300, 0, 0), "Out", "Quad", 0.5, true)
  5973. end
  5974.  
  5975. OpenToggleButton:TweenPosition(UDim2.new(1,0,0,0), "Out", "Quad", 0.5, true)
  5976. end)
  5977.  
  5978. CloseToggleButton.MouseButton1Up:connect(function()
  5979. SideMenu:TweenPosition(UDim2.new(1, 0, 0, 0), "Out", "Quad", 0.5, true)
  5980.  
  5981. ExplorerPanel:TweenPosition(UDim2.new(1, 30, 0, 0), "Out", "Quad", 0.5, true)
  5982. PropertiesFrame:TweenPosition(UDim2.new(1, 30, 0.5, 36), "Out", "Quad", 0.5, true)
  5983. SettingsPanel:TweenPosition(UDim2.new(1, 30, 0, 0), "Out", "Quad", 0.5, true)
  5984.  
  5985. OpenToggleButton:TweenPosition(UDim2.new(1,-30,0,0), "Out", "Quad", 0.5, true)
  5986. end)
  5987. --]]
  5988.  
  5989. --[[
  5990. ExplorerButton.MouseButton1Up:connect(function()
  5991. switchWindows("Explorer")
  5992. end)
  5993.  
  5994. SettingsButton.MouseButton1Up:connect(function()
  5995. switchWindows("Settings")
  5996. end)
  5997. --]]
  5998.  
  5999. for i,v in pairs(SlideFrame:GetChildren()) do
  6000. v.MouseButton1Click:connect(function()
  6001. switchWindows(v.Name)
  6002. end)
  6003.  
  6004. v.MouseEnter:connect(function()v.BackgroundTransparency = 0.5 end)
  6005. v.MouseLeave:connect(function()if CurrentWindow~=v.Name then v.BackgroundTransparency = 1 end end)
  6006. end
  6007.  
  6008. --[[
  6009. ExplorerButton.MouseButton1Up:connect(function()
  6010. if CurrentWindow ~= "Explorer" then
  6011. CurrentWindow = "Explorer"
  6012.  
  6013. ExplorerPanel:TweenPosition(UDim2.new(1, -300, 0, 0), "Out", "Quad", 0.5, true)
  6014. PropertiesFrame:TweenPosition(UDim2.new(1, -300, 0.5, 36), "Out", "Quad", 0.5, true)
  6015. SettingsPanel:TweenPosition(UDim2.new(1, 0, 0, 0), "Out", "Quad", 0.5, true)
  6016. end
  6017. end)
  6018.  
  6019. SettingsButton.MouseButton1Up:connect(function()
  6020. if CurrentWindow ~= "Settings" then
  6021. CurrentWindow = "Settings"
  6022.  
  6023. ExplorerPanel:TweenPosition(UDim2.new(1, 0, 0, 0), "Out", "Quad", 0.5, true)
  6024. PropertiesFrame:TweenPosition(UDim2.new(1, 0, 0.5, 36), "Out", "Quad", 0.5, true)
  6025. SettingsPanel:TweenPosition(UDim2.new(1, -300, 0, 0), "Out", "Quad", 0.5, true)
  6026. end
  6027. end)
  6028. --]]
  6029.  
  6030. function createSetting(name,interName,defaultOn)
  6031. local newSetting = SettingTemplate:Clone()
  6032. newSetting.Position = UDim2.new(0,0,0,#SettingList:GetChildren() * 60)
  6033. newSetting.SName.Text = name
  6034.  
  6035. local function toggle(on)
  6036. if on then
  6037. newSetting.Change.Bar:TweenPosition(UDim2.new(0,32,0,-2),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
  6038. newSetting.Change.OnBar:TweenSize(UDim2.new(0,34,0,15),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
  6039. newSetting.Status.Text = "On"
  6040. Settings[interName] = true
  6041. else
  6042. newSetting.Change.Bar:TweenPosition(UDim2.new(0,-2,0,-2),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
  6043. newSetting.Change.OnBar:TweenSize(UDim2.new(0,0,0,15),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
  6044. newSetting.Status.Text = "Off"
  6045. Settings[interName] = false
  6046. end
  6047. end
  6048.  
  6049. newSetting.Change.MouseButton1Click:connect(function()
  6050. toggle(not Settings[interName])
  6051. end)
  6052.  
  6053. newSetting.Visible = true
  6054. newSetting.Parent = SettingList
  6055.  
  6056. if defaultOn then
  6057. toggle(true)
  6058. end
  6059. end
  6060.  
  6061. createSetting("Click part to select","ClickSelect",false)
  6062. createSetting("Selection Box","SelBox",false)
  6063. createSetting("Clear property value on focus","ClearProps",false)
  6064. createSetting("Select ungrouped models","SelectUngrouped",true)
  6065. createSetting("SaveInstance decompiles scripts","SaveInstanceScripts",true)
  6066.  
  6067. --[[
  6068. ClickSelectOption.MouseButton1Up:connect(function()
  6069. if Settings.ClickSelect then
  6070. Settings.ClickSelect = false
  6071. ClickSelectOption.Text = "OFF"
  6072. else
  6073. Settings.ClickSelect = true
  6074. ClickSelectOption.Text = "ON"
  6075. end
  6076. end)
  6077.  
  6078. SelectionBoxOption.MouseButton1Up:connect(function()
  6079. if Settings.SelBox then
  6080. Settings.SelBox = false
  6081. SelectionBox.Adornee = nil
  6082. SelectionBoxOption.Text = "OFF"
  6083. else
  6084. Settings.SelBox = true
  6085. SelectionBoxOption.Text = "ON"
  6086. end
  6087. end)
  6088.  
  6089. ClearPropsOption.MouseButton1Up:connect(function()
  6090. if Settings.ClearProps then
  6091. Settings.ClearProps = false
  6092. ClearPropsOption.Text = "OFF"
  6093. else
  6094. Settings.ClearProps = true
  6095. ClearPropsOption.Text = "ON"
  6096. end
  6097. end)
  6098.  
  6099. SelectUngroupedOption.MouseButton1Up:connect(function()
  6100. if Settings.SelectUngrouped then
  6101. Settings.SelectUngrouped = false
  6102. SelectUngroupedOption.Text = "OFF"
  6103. else
  6104. Settings.SelectUngrouped = true
  6105. SelectUngroupedOption.Text = "ON"
  6106. end
  6107. end)
  6108. --]]
  6109.  
  6110. local function getSelection()
  6111. local t = GetSelection:Invoke()
  6112. if t and #t > 0 then
  6113. return t[1]
  6114. else
  6115. return nil
  6116. end
  6117. end
  6118.  
  6119. Mouse.Button1Down:connect(function()
  6120. if CurrentWindow == "Explorer" and Settings.ClickSelect then
  6121. local target = Mouse.Target
  6122. if target then
  6123. SetSelection:Invoke({target})
  6124. end
  6125. end
  6126. end)
  6127.  
  6128. SelectionChanged.Event:connect(function()
  6129. if Settings.SelBox then
  6130. local success,err = pcall(function()
  6131. local selection = getSelection()
  6132. SelectionBox.Adornee = selection
  6133. end)
  6134. if err then
  6135. SelectionBox.Adornee = nil
  6136. end
  6137. end
  6138. end)
  6139.  
  6140. SettingsListener.OnInvoke = ReturnSetting
  6141.  
  6142. -- Map Copier
  6143.  
  6144. function createMapSetting(obj,interName,defaultOn)
  6145. local function toggle(on)
  6146. if on then
  6147. obj.Change.Bar:TweenPosition(UDim2.new(0,32,0,-2),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
  6148. obj.Change.OnBar:TweenSize(UDim2.new(0,34,0,15),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
  6149. obj.Status.Text = "On"
  6150. SaveMapSettings[interName] = true
  6151. else
  6152. obj.Change.Bar:TweenPosition(UDim2.new(0,-2,0,-2),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
  6153. obj.Change.OnBar:TweenSize(UDim2.new(0,0,0,15),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
  6154. obj.Status.Text = "Off"
  6155. SaveMapSettings[interName] = false
  6156. end
  6157. end
  6158.  
  6159. obj.Change.MouseButton1Click:connect(function()
  6160. toggle(not SaveMapSettings[interName])
  6161. end)
  6162.  
  6163. obj.Visible = true
  6164. obj.Parent = SaveMapSettingFrame
  6165.  
  6166. if defaultOn then
  6167. toggle(true)
  6168. end
  6169. end
  6170.  
  6171. function createCopyWhatSetting(serv)
  6172. if SaveMapSettings.CopyWhat[serv] then
  6173. local newSetting = SaveMapCopyTemplate:Clone()
  6174. newSetting.Position = UDim2.new(0,0,0,#SaveMapCopyList:GetChildren() * 22 + 5)
  6175. newSetting.Info.Text = serv
  6176.  
  6177. local function toggle(on)
  6178. if on then
  6179. newSetting.Change.enabled.Visible = true
  6180. SaveMapSettings.CopyWhat[serv] = true
  6181. else
  6182. newSetting.Change.enabled.Visible = false
  6183. SaveMapSettings.CopyWhat[serv] = false
  6184. end
  6185. end
  6186.  
  6187. newSetting.Change.MouseButton1Click:connect(function()
  6188. toggle(not SaveMapSettings.CopyWhat[serv])
  6189. end)
  6190.  
  6191. newSetting.Visible = true
  6192. newSetting.Parent = SaveMapCopyList
  6193. end
  6194. end
  6195.  
  6196. createMapSetting(SaveMapSettingFrame.Scripts,"SaveScripts",true)
  6197. createMapSetting(SaveMapSettingFrame.Terrain,"SaveTerrain",true)
  6198. createMapSetting(SaveMapSettingFrame.Lighting,"LightingProperties",true)
  6199. createMapSetting(SaveMapSettingFrame.CameraInstances,"CameraInstances",true)
  6200.  
  6201. createCopyWhatSetting("Workspace")
  6202. createCopyWhatSetting("Lighting")
  6203. createCopyWhatSetting("ReplicatedStorage")
  6204. createCopyWhatSetting("ReplicatedFirst")
  6205. createCopyWhatSetting("StarterPack")
  6206. createCopyWhatSetting("StarterGui")
  6207. createCopyWhatSetting("StarterPlayer")
  6208.  
  6209. SaveMapName.Text = tostring(game.PlaceId).."MapCopy"
  6210.  
  6211. SaveMapButton.MouseButton1Click:connect(function()
  6212. local copyWhat = {}
  6213.  
  6214. local copyGroup = Instance.new("Model",game:GetService('ReplicatedStorage'))
  6215.  
  6216. local copyScripts = SaveMapSettings.SaveScripts
  6217.  
  6218. local copyTerrain = SaveMapSettings.SaveTerrain
  6219.  
  6220. local lightingProperties = SaveMapSettings.LightingProperties
  6221.  
  6222. local cameraInstances = SaveMapSettings.CameraInstances
  6223.  
  6224. -----------------------------------------------------------------------------------
  6225.  
  6226. for i,v in pairs(SaveMapSettings.CopyWhat) do
  6227. if v then
  6228. table.insert(copyWhat,i)
  6229. end
  6230. end
  6231.  
  6232. local consoleFunc = printconsole or writeconsole
  6233.  
  6234. if consoleFunc then
  6235. consoleFunc("Moon's place copier loaded.")
  6236. consoleFunc("Copying map of game "..tostring(game.PlaceId)..".")
  6237. end
  6238.  
  6239. function archivable(root)
  6240. for i,v in pairs(root:GetChildren()) do
  6241. if not game:GetService('Players'):GetPlayerFromCharacter(v) then
  6242. v.Archivable = true
  6243. archivable(v)
  6244. end
  6245. end
  6246. end
  6247.  
  6248. function decompileS(root)
  6249. for i,v in pairs(root:GetChildren()) do
  6250. pcall(function()
  6251. if v:IsA("LocalScript") then
  6252. local isDisabled = v.Disabled
  6253. v.Disabled = true
  6254. v.Source = decompile(v)
  6255. v.Disabled = isDisabled
  6256.  
  6257. if v.Source == "" then
  6258. if consoleFunc then consoleFunc("LocalScript "..v.Name.." had a problem decompiling.") end
  6259. else
  6260. if consoleFunc then consoleFunc("LocalScript "..v.Name.." decompiled.") end
  6261. end
  6262. elseif v:IsA("ModuleScript") then
  6263. v.Source = decompile(v)
  6264.  
  6265. if v.Source == "" then
  6266. if consoleFunc then consoleFunc("ModuleScript "..v.Name.." had a problem decompiling.") end
  6267. else
  6268. if consoleFunc then consoleFunc("ModuleScript "..v.Name.." decompiled.") end
  6269. end
  6270. end
  6271. end)
  6272. decompileS(v)
  6273. end
  6274. end
  6275.  
  6276. for i,v in pairs(copyWhat) do archivable(game[v]) end
  6277.  
  6278. for j,obj in pairs(copyWhat) do
  6279. if obj ~= "StarterPlayer" then
  6280. local newFolder = Instance.new("Folder",copyGroup)
  6281. newFolder.Name = obj
  6282. for i,v in pairs(game[obj]:GetChildren()) do
  6283. if v ~= copyGroup then
  6284. pcall(function()
  6285. v:Clone().Parent = newFolder
  6286. end)
  6287. end
  6288. end
  6289. else
  6290. local newFolder = Instance.new("Model",copyGroup)
  6291. newFolder.Name = "StarterPlayer"
  6292. for i,v in pairs(game[obj]:GetChildren()) do
  6293. local newObj = Instance.new("Folder",newFolder)
  6294. newObj.Name = v.Name
  6295. for _,c in pairs(v:GetChildren()) do
  6296. if c.Name ~= "ControlScript" and c.Name ~= "CameraScript" then
  6297. c:Clone().Parent = newObj
  6298. end
  6299. end
  6300. end
  6301. end
  6302. end
  6303.  
  6304. if workspace.CurrentCamera and cameraInstances then
  6305. local cameraFolder = Instance.new("Model",copyGroup)
  6306. cameraFolder.Name = "CameraItems"
  6307. for i,v in pairs(workspace.CurrentCamera:GetChildren()) do v:Clone().Parent = cameraFolder end
  6308. end
  6309.  
  6310. if copyTerrain then
  6311. local myTerrain = workspace.Terrain:CopyRegion(workspace.Terrain.MaxExtents)
  6312. myTerrain.Parent = copyGroup
  6313. end
  6314.  
  6315. function saveProp(obj,prop,par)
  6316. local myProp = obj[prop]
  6317. if type(myProp) == "boolean" then
  6318. local newProp = Instance.new("BoolValue",par)
  6319. newProp.Name = prop
  6320. newProp.Value = myProp
  6321. elseif type(myProp) == "number" then
  6322. local newProp = Instance.new("IntValue",par)
  6323. newProp.Name = prop
  6324. newProp.Value = myProp
  6325. elseif type(myProp) == "string" then
  6326. local newProp = Instance.new("StringValue",par)
  6327. newProp.Name = prop
  6328. newProp.Value = myProp
  6329. elseif type(myProp) == "userdata" then -- Assume Color3
  6330. pcall(function()
  6331. local newProp = Instance.new("Color3Value",par)
  6332. newProp.Name = prop
  6333. newProp.Value = myProp
  6334. end)
  6335. end
  6336. end
  6337.  
  6338. if lightingProperties then
  6339. local lightingProps = Instance.new("Model",copyGroup)
  6340. lightingProps.Name = "LightingProperties"
  6341.  
  6342. saveProp(game:GetService('Lighting'),"Ambient",lightingProps)
  6343. saveProp(game:GetService('Lighting'),"Brightness",lightingProps)
  6344. saveProp(game:GetService('Lighting'),"ColorShift_Bottom",lightingProps)
  6345. saveProp(game:GetService('Lighting'),"ColorShift_Top",lightingProps)
  6346. saveProp(game:GetService('Lighting'),"GlobalShadows",lightingProps)
  6347. saveProp(game:GetService('Lighting'),"OutdoorAmbient",lightingProps)
  6348. saveProp(game:GetService('Lighting'),"Outlines",lightingProps)
  6349. saveProp(game:GetService('Lighting'),"GeographicLatitude",lightingProps)
  6350. saveProp(game:GetService('Lighting'),"TimeOfDay",lightingProps)
  6351. saveProp(game:GetService('Lighting'),"FogColor",lightingProps)
  6352. saveProp(game:GetService('Lighting'),"FogEnd",lightingProps)
  6353. saveProp(game:GetService('Lighting'),"FogStart",lightingProps)
  6354. end
  6355.  
  6356. if decompile and copyScripts then
  6357. decompileS(copyGroup)
  6358. end
  6359.  
  6360. if SaveInstance then
  6361. SaveInstance(copyGroup,SaveMapName.Text..".rbxm")
  6362. elseif saveinstance then
  6363. saveinstance(getelysianpath()..SaveMapName.Text..".rbxm",copyGroup)
  6364. end
  6365. --print("Saved!")
  6366. if consoleFunc then
  6367. consoleFunc("The map has been copied.")
  6368. end
  6369. SaveMapButton.Text = "The map has been saved"
  6370. wait(5)
  6371. SaveMapButton.Text = "Save"
  6372. end)
  6373.  
  6374. -- End Copier
  6375.  
  6376. wait()
  6377.  
  6378. IntroFrame:TweenPosition(UDim2.new(1,-301,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
  6379.  
  6380. switchWindows("Explorer")
  6381.  
  6382. wait(1)
  6383.  
  6384. SideMenu.Visible = true
  6385.  
  6386. for i = 0,1,0.1 do
  6387. IntroFrame.BackgroundTransparency = i
  6388. IntroFrame.Main.BackgroundTransparency = i
  6389. IntroFrame.Slant.ImageTransparency = i
  6390. IntroFrame.Title.TextTransparency = i
  6391. IntroFrame.Version.TextTransparency = i
  6392. IntroFrame.Creator.TextTransparency = i
  6393. IntroFrame.Sad.ImageTransparency = i
  6394. wait()
  6395. end
  6396.  
  6397. IntroFrame.Visible = false
  6398.  
  6399. SlideFrame:TweenPosition(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
  6400. OpenScriptEditorButton:TweenPosition(UDim2.new(0,0,0,150),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
  6401. CloseToggleButton:TweenPosition(UDim2.new(0,0,0,180),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
  6402. Slant:TweenPosition(UDim2.new(0,0,0,210),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
  6403.  
  6404. wait(0.5)
  6405.  
  6406. for i = 1,0,-0.1 do
  6407. OpenScriptEditorButton.Icon.ImageTransparency = i
  6408. CloseToggleButton.TextTransparency = i
  6409. wait()
  6410. end
  6411.  
  6412. CloseToggleButton.Active = true
  6413. CloseToggleButton.AutoButtonColor = true
  6414.  
  6415. OpenScriptEditorButton.Active = true
  6416. OpenScriptEditorButton.AutoButtonColor = true
  6417. end))
  6418. Frame19.Name = "SideMenu"
  6419. Frame19.Parent = ScreenGui0
  6420. Frame19.Position = UDim2.new(1, -330, 0, 0)
  6421. Frame19.Visible = false
  6422. Frame19.Transparency = 1
  6423. Frame19.Size = UDim2.new(0, 30, 0, 180)
  6424. Frame19.BackgroundColor = BrickColor.new("Lily white")
  6425. Frame19.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
  6426. Frame19.BackgroundTransparency = 1
  6427. Frame19.BorderColor = BrickColor.new("Sand violet metallic")
  6428. Frame19.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  6429. Frame19.BorderSizePixel = 0
  6430. Frame19.ZIndex = 2
  6431. TextButton20.Name = "Toggle"
  6432. TextButton20.Parent = Frame19
  6433. TextButton20.Position = UDim2.new(0, 0, 0, 60)
  6434. TextButton20.Size = UDim2.new(0, 30, 0, 30)
  6435. TextButton20.Active = false
  6436. TextButton20.BackgroundColor = BrickColor.new("Lily white")
  6437. TextButton20.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
  6438. TextButton20.BorderSizePixel = 0
  6439. TextButton20.AutoButtonColor = false
  6440. TextButton20.Font = Enum.Font.SourceSans
  6441. TextButton20.FontSize = Enum.FontSize.Size24
  6442. TextButton20.Text = ">"
  6443. TextButton20.TextSize = 24
  6444. TextButton20.TextTransparency = 1
  6445. TextButton20.TextWrap = true
  6446. TextButton20.TextWrapped = true
  6447. TextLabel21.Name = "Title"
  6448. TextLabel21.Parent = Frame19
  6449. TextLabel21.Transparency = 1
  6450. TextLabel21.Size = UDim2.new(0, 30, 0, 20)
  6451. TextLabel21.BackgroundColor = BrickColor.new("Institutional white")
  6452. TextLabel21.BackgroundColor3 = Color3.new(1, 1, 1)
  6453. TextLabel21.BackgroundTransparency = 1
  6454. TextLabel21.ZIndex = 2
  6455. TextLabel21.Font = Enum.Font.SourceSansBold
  6456. TextLabel21.FontSize = Enum.FontSize.Size14
  6457. TextLabel21.Text = "DEX"
  6458. TextLabel21.TextSize = 14
  6459. TextLabel21.TextWrap = true
  6460. TextLabel21.TextWrapped = true
  6461. TextLabel22.Name = "Version"
  6462. TextLabel22.Parent = Frame19
  6463. TextLabel22.Position = UDim2.new(0, 0, 0, 15)
  6464. TextLabel22.Transparency = 1
  6465. TextLabel22.Size = UDim2.new(0, 30, 0, 20)
  6466. TextLabel22.BackgroundColor = BrickColor.new("Institutional white")
  6467. TextLabel22.BackgroundColor3 = Color3.new(1, 1, 1)
  6468. TextLabel22.BackgroundTransparency = 1
  6469. TextLabel22.ZIndex = 2
  6470. TextLabel22.Font = Enum.Font.SourceSansBold
  6471. TextLabel22.FontSize = Enum.FontSize.Size12
  6472. TextLabel22.Text = "v3"
  6473. TextLabel22.TextSize = 12
  6474. TextLabel22.TextWrap = true
  6475. TextLabel22.TextWrapped = true
  6476. ImageLabel23.Name = "Slant"
  6477. ImageLabel23.Parent = Frame19
  6478. ImageLabel23.Position = UDim2.new(0, 0, 0, 90)
  6479. ImageLabel23.Rotation = 180
  6480. ImageLabel23.Transparency = 1
  6481. ImageLabel23.Size = UDim2.new(0, 30, 0, 30)
  6482. ImageLabel23.BackgroundColor = BrickColor.new("Institutional white")
  6483. ImageLabel23.BackgroundColor3 = Color3.new(1, 1, 1)
  6484. ImageLabel23.BackgroundTransparency = 1
  6485. ImageLabel23.Image = "rbxassetid://1513966937"
  6486. ImageLabel23.ImageColor3 = Color3.new(0.913726, 0.913726, 0.913726)
  6487. Frame24.Name = "Main"
  6488. Frame24.Parent = Frame19
  6489. Frame24.Size = UDim2.new(0, 30, 0, 30)
  6490. Frame24.BackgroundColor = BrickColor.new("Lily white")
  6491. Frame24.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
  6492. Frame24.BorderSizePixel = 0
  6493. Frame25.Name = "SlideOut"
  6494. Frame25.Parent = Frame19
  6495. Frame25.Position = UDim2.new(0, 0, 0, 30)
  6496. Frame25.Transparency = 1
  6497. Frame25.Size = UDim2.new(0, 30, 0, 150)
  6498. Frame25.BackgroundColor = BrickColor.new("Quill grey")
  6499. Frame25.BackgroundColor3 = Color3.new(0.862745, 0.862745, 0.862745)
  6500. Frame25.BackgroundTransparency = 1
  6501. Frame25.BorderSizePixel = 0
  6502. Frame25.ClipsDescendants = true
  6503. Frame26.Name = "SlideFrame"
  6504. Frame26.Parent = Frame25
  6505. Frame26.Position = UDim2.new(0, 0, 0, -120)
  6506. Frame26.Size = UDim2.new(0, 30, 0, 120)
  6507. Frame26.BackgroundColor = BrickColor.new("Quill grey")
  6508. Frame26.BackgroundColor3 = Color3.new(0.862745, 0.862745, 0.862745)
  6509. Frame26.BorderSizePixel = 0
  6510. TextButton27.Name = "Explorer"
  6511. TextButton27.Parent = Frame26
  6512. TextButton27.Position = UDim2.new(0, 0, 0, 90)
  6513. TextButton27.Transparency = 1
  6514. TextButton27.Size = UDim2.new(0, 30, 0, 30)
  6515. TextButton27.BackgroundColor = BrickColor.new("Institutional white")
  6516. TextButton27.BackgroundColor3 = Color3.new(1, 1, 1)
  6517. TextButton27.BackgroundTransparency = 1
  6518. TextButton27.BorderSizePixel = 0
  6519. TextButton27.AutoButtonColor = false
  6520. TextButton27.Font = Enum.Font.SourceSans
  6521. TextButton27.FontSize = Enum.FontSize.Size24
  6522. TextButton27.Text = ""
  6523. TextButton27.TextSize = 24
  6524. ImageLabel28.Name = "Icon"
  6525. ImageLabel28.Parent = TextButton27
  6526. ImageLabel28.Position = UDim2.new(0, 5, 0, 5)
  6527. ImageLabel28.Transparency = 1
  6528. ImageLabel28.Size = UDim2.new(0, 20, 0, 20)
  6529. ImageLabel28.BackgroundColor = BrickColor.new("Institutional white")
  6530. ImageLabel28.BackgroundColor3 = Color3.new(1, 1, 1)
  6531. ImageLabel28.BackgroundTransparency = 1
  6532. ImageLabel28.ZIndex = 2
  6533. ImageLabel28.Image = "rbxassetid://472635937"
  6534. ImageLabel28.ImageColor3 = Color3.new(0.27451, 0.27451, 0.27451)
  6535. TextButton29.Name = "SaveMap"
  6536. TextButton29.Parent = Frame26
  6537. TextButton29.Position = UDim2.new(0, 0, 0, 60)
  6538. TextButton29.Transparency = 1
  6539. TextButton29.Size = UDim2.new(0, 30, 0, 30)
  6540. TextButton29.BackgroundColor = BrickColor.new("Institutional white")
  6541. TextButton29.BackgroundColor3 = Color3.new(1, 1, 1)
  6542. TextButton29.BackgroundTransparency = 1
  6543. TextButton29.BorderSizePixel = 0
  6544. TextButton29.AutoButtonColor = false
  6545. TextButton29.Font = Enum.Font.SourceSans
  6546. TextButton29.FontSize = Enum.FontSize.Size24
  6547. TextButton29.Text = ""
  6548. TextButton29.TextSize = 24
  6549. ImageLabel30.Name = "Icon"
  6550. ImageLabel30.Parent = TextButton29
  6551. ImageLabel30.Position = UDim2.new(0, 5, 0, 5)
  6552. ImageLabel30.Transparency = 1
  6553. ImageLabel30.Size = UDim2.new(0, 20, 0, 20)
  6554. ImageLabel30.BackgroundColor = BrickColor.new("Institutional white")
  6555. ImageLabel30.BackgroundColor3 = Color3.new(1, 1, 1)
  6556. ImageLabel30.BackgroundTransparency = 1
  6557. ImageLabel30.ZIndex = 2
  6558. ImageLabel30.Image = "rbxassetid://472636337"
  6559. ImageLabel30.ImageColor3 = Color3.new(0.27451, 0.27451, 0.27451)
  6560. TextButton31.Name = "Settings"
  6561. TextButton31.Parent = Frame26
  6562. TextButton31.Position = UDim2.new(0, 0, 0, 30)
  6563. TextButton31.Transparency = 1
  6564. TextButton31.Size = UDim2.new(0, 30, 0, 30)
  6565. TextButton31.BackgroundColor = BrickColor.new("Institutional white")
  6566. TextButton31.BackgroundColor3 = Color3.new(1, 1, 1)
  6567. TextButton31.BackgroundTransparency = 1
  6568. TextButton31.BorderSizePixel = 0
  6569. TextButton31.AutoButtonColor = false
  6570. TextButton31.Font = Enum.Font.SourceSans
  6571. TextButton31.FontSize = Enum.FontSize.Size24
  6572. TextButton31.Text = ""
  6573. TextButton31.TextSize = 24
  6574. ImageLabel32.Name = "Icon"
  6575. ImageLabel32.Parent = TextButton31
  6576. ImageLabel32.Position = UDim2.new(0, 5, 0, 5)
  6577. ImageLabel32.Transparency = 1
  6578. ImageLabel32.Size = UDim2.new(0, 20, 0, 20)
  6579. ImageLabel32.BackgroundColor = BrickColor.new("Institutional white")
  6580. ImageLabel32.BackgroundColor3 = Color3.new(1, 1, 1)
  6581. ImageLabel32.BackgroundTransparency = 1
  6582. ImageLabel32.ZIndex = 2
  6583. ImageLabel32.Image = "rbxassetid://472635774"
  6584. ImageLabel32.ImageColor3 = Color3.new(0.27451, 0.27451, 0.27451)
  6585. TextButton33.Name = "About"
  6586. TextButton33.Parent = Frame26
  6587. TextButton33.Transparency = 1
  6588. TextButton33.Size = UDim2.new(0, 30, 0, 30)
  6589. TextButton33.BackgroundColor = BrickColor.new("Institutional white")
  6590. TextButton33.BackgroundColor3 = Color3.new(1, 1, 1)
  6591. TextButton33.BackgroundTransparency = 1
  6592. TextButton33.BorderSizePixel = 0
  6593. TextButton33.AutoButtonColor = false
  6594. TextButton33.Font = Enum.Font.SourceSans
  6595. TextButton33.FontSize = Enum.FontSize.Size24
  6596. TextButton33.Text = ""
  6597. TextButton33.TextSize = 24
  6598. ImageLabel34.Name = "Icon"
  6599. ImageLabel34.Parent = TextButton33
  6600. ImageLabel34.Position = UDim2.new(0, 5, 0, 5)
  6601. ImageLabel34.Transparency = 1
  6602. ImageLabel34.Size = UDim2.new(0, 20, 0, 20)
  6603. ImageLabel34.BackgroundColor = BrickColor.new("Institutional white")
  6604. ImageLabel34.BackgroundColor3 = Color3.new(1, 1, 1)
  6605. ImageLabel34.BackgroundTransparency = 1
  6606. ImageLabel34.ZIndex = 2
  6607. ImageLabel34.Image = "rbxassetid://476354004"
  6608. ImageLabel34.ImageColor3 = Color3.new(0.27451, 0.27451, 0.27451)
  6609. TextButton35.Name = "OpenScriptEditor"
  6610. TextButton35.Parent = Frame19
  6611. TextButton35.Position = UDim2.new(0, 0, 0, 30)
  6612. TextButton35.Size = UDim2.new(0, 30, 0, 30)
  6613. TextButton35.Active = false
  6614. TextButton35.BackgroundColor = BrickColor.new("Lily white")
  6615. TextButton35.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
  6616. TextButton35.BorderSizePixel = 0
  6617. TextButton35.AutoButtonColor = false
  6618. TextButton35.Font = Enum.Font.SourceSans
  6619. TextButton35.FontSize = Enum.FontSize.Size24
  6620. TextButton35.Text = ""
  6621. TextButton35.TextSize = 24
  6622. ImageLabel36.Name = "Icon"
  6623. ImageLabel36.Parent = TextButton35
  6624. ImageLabel36.Position = UDim2.new(0, 5, 0, 5)
  6625. ImageLabel36.Transparency = 1
  6626. ImageLabel36.Size = UDim2.new(0, 20, 0, 20)
  6627. ImageLabel36.BackgroundColor = BrickColor.new("Institutional white")
  6628. ImageLabel36.BackgroundColor3 = Color3.new(1, 1, 1)
  6629. ImageLabel36.BackgroundTransparency = 1
  6630. ImageLabel36.BorderSizePixel = 0
  6631. ImageLabel36.ZIndex = 2
  6632. ImageLabel36.Image = "rbxassetid://475456048"
  6633. ImageLabel36.ImageColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  6634. ImageLabel36.ImageTransparency = 1
  6635. Frame37.Name = "SettingsPanel"
  6636. Frame37.Parent = ScreenGui0
  6637. Frame37.Position = UDim2.new(1, 0, 0, 0)
  6638. Frame37.Transparency = 0.10000000149012
  6639. Frame37.Size = UDim2.new(0, 300, 1, 0)
  6640. Frame37.BackgroundColor = BrickColor.new("Institutional white")
  6641. Frame37.BackgroundColor3 = Color3.new(1, 1, 1)
  6642. Frame37.BackgroundTransparency = 0.10000000149012
  6643. Frame37.BorderColor = BrickColor.new("Light grey")
  6644. Frame37.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
  6645. Frame37.BorderSizePixel = 0
  6646. Frame38.Name = "Header"
  6647. Frame38.Parent = Frame37
  6648. Frame38.Size = UDim2.new(1, 0, 0, 17)
  6649. Frame38.BackgroundColor = BrickColor.new("Lily white")
  6650. Frame38.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
  6651. Frame38.BorderColor = BrickColor.new("Sand violet metallic")
  6652. Frame38.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  6653. Frame38.BorderSizePixel = 0
  6654. TextLabel39.Parent = Frame38
  6655. TextLabel39.Position = UDim2.new(0, 4, 0, 0)
  6656. TextLabel39.Transparency = 1
  6657. TextLabel39.Size = UDim2.new(1, -4, 1, 0)
  6658. TextLabel39.BackgroundTransparency = 1
  6659. TextLabel39.BorderSizePixel = 0
  6660. TextLabel39.Font = Enum.Font.SourceSans
  6661. TextLabel39.FontSize = Enum.FontSize.Size14
  6662. TextLabel39.Text = "Settings"
  6663. TextLabel39.TextColor = BrickColor.new("Really black")
  6664. TextLabel39.TextColor3 = Color3.new(0, 0, 0)
  6665. TextLabel39.TextSize = 14
  6666. TextLabel39.TextXAlignment = Enum.TextXAlignment.Left
  6667. BindableFunction40.Name = "GetSetting"
  6668. BindableFunction40.Parent = Frame37
  6669. Frame41.Name = "SettingTemplate"
  6670. Frame41.Parent = Frame37
  6671. Frame41.Position = UDim2.new(0, 0, 0, 18)
  6672. Frame41.Visible = false
  6673. Frame41.Transparency = 1
  6674. Frame41.Size = UDim2.new(1, 0, 0, 60)
  6675. Frame41.BackgroundColor = BrickColor.new("Institutional white")
  6676. Frame41.BackgroundColor3 = Color3.new(1, 1, 1)
  6677. Frame41.BackgroundTransparency = 1
  6678. TextLabel42.Name = "SName"
  6679. TextLabel42.Parent = Frame41
  6680. TextLabel42.Position = UDim2.new(0, 10, 0, 0)
  6681. TextLabel42.Transparency = 1
  6682. TextLabel42.Size = UDim2.new(1, -20, 0, 30)
  6683. TextLabel42.BackgroundColor = BrickColor.new("Institutional white")
  6684. TextLabel42.BackgroundColor3 = Color3.new(1, 1, 1)
  6685. TextLabel42.BackgroundTransparency = 1
  6686. TextLabel42.Font = Enum.Font.SourceSans
  6687. TextLabel42.FontSize = Enum.FontSize.Size18
  6688. TextLabel42.Text = "SettingName"
  6689. TextLabel42.TextSize = 18
  6690. TextLabel42.TextXAlignment = Enum.TextXAlignment.Left
  6691. TextLabel43.Name = "Status"
  6692. TextLabel43.Parent = Frame41
  6693. TextLabel43.Position = UDim2.new(0, 60, 0, 30)
  6694. TextLabel43.Transparency = 1
  6695. TextLabel43.Size = UDim2.new(0, 50, 0, 15)
  6696. TextLabel43.BackgroundColor = BrickColor.new("Institutional white")
  6697. TextLabel43.BackgroundColor3 = Color3.new(1, 1, 1)
  6698. TextLabel43.BackgroundTransparency = 1
  6699. TextLabel43.Font = Enum.Font.SourceSans
  6700. TextLabel43.FontSize = Enum.FontSize.Size18
  6701. TextLabel43.Text = "Off"
  6702. TextLabel43.TextSize = 18
  6703. TextLabel43.TextXAlignment = Enum.TextXAlignment.Left
  6704. TextButton44.Name = "Change"
  6705. TextButton44.Parent = Frame41
  6706. TextButton44.Position = UDim2.new(0, 10, 0, 30)
  6707. TextButton44.Size = UDim2.new(0, 40, 0, 15)
  6708. TextButton44.BackgroundColor = BrickColor.new("Quill grey")
  6709. TextButton44.BackgroundColor3 = Color3.new(0.862745, 0.862745, 0.862745)
  6710. TextButton44.BorderSizePixel = 0
  6711. TextButton44.Font = Enum.Font.SourceSans
  6712. TextButton44.FontSize = Enum.FontSize.Size14
  6713. TextButton44.Text = ""
  6714. TextButton44.TextSize = 14
  6715. TextLabel45.Name = "OnBar"
  6716. TextLabel45.Parent = TextButton44
  6717. TextLabel45.Size = UDim2.new(0, 0, 0, 15)
  6718. TextLabel45.BackgroundColor = BrickColor.new("Electric blue")
  6719. TextLabel45.BackgroundColor3 = Color3.new(0, 0.576471, 0.862745)
  6720. TextLabel45.BorderSizePixel = 0
  6721. TextLabel45.Font = Enum.Font.SourceSans
  6722. TextLabel45.FontSize = Enum.FontSize.Size14
  6723. TextLabel45.Text = ""
  6724. TextLabel45.TextSize = 14
  6725. TextLabel46.Name = "Bar"
  6726. TextLabel46.Parent = TextButton44
  6727. TextLabel46.Position = UDim2.new(0, -2, 0, -2)
  6728. TextLabel46.Size = UDim2.new(0, 10, 0, 19)
  6729. TextLabel46.BackgroundColor = BrickColor.new("Really black")
  6730. TextLabel46.BackgroundColor3 = Color3.new(0, 0, 0)
  6731. TextLabel46.BorderSizePixel = 0
  6732. TextLabel46.ClipsDescendants = true
  6733. TextLabel46.Font = Enum.Font.SourceSans
  6734. TextLabel46.FontSize = Enum.FontSize.Size14
  6735. TextLabel46.Text = ""
  6736. TextLabel46.TextSize = 14
  6737. Frame47.Name = "SettingList"
  6738. Frame47.Parent = Frame37
  6739. Frame47.Position = UDim2.new(0, 0, 0, 17)
  6740. Frame47.Transparency = 1
  6741. Frame47.Size = UDim2.new(1, 0, 1, -17)
  6742. Frame47.BackgroundColor = BrickColor.new("Institutional white")
  6743. Frame47.BackgroundColor3 = Color3.new(1, 1, 1)
  6744. Frame47.BackgroundTransparency = 1
  6745. Frame48.Name = "SaveInstance"
  6746. Frame48.Parent = ScreenGui0
  6747. Frame48.Position = UDim2.new(0.300000012, 0, 0.300000012, 0)
  6748. Frame48.Visible = false
  6749. Frame48.Size = UDim2.new(0, 350, 0, 20)
  6750. Frame48.Active = true
  6751. Frame48.BackgroundColor = BrickColor.new("Lily white")
  6752. Frame48.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
  6753. Frame48.BorderColor = BrickColor.new("Sand violet metallic")
  6754. Frame48.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  6755. Frame48.BorderSizePixel = 0
  6756. Frame48.Draggable = true
  6757. Frame48.ZIndex = 2
  6758. TextLabel49.Name = "Title"
  6759. TextLabel49.Parent = Frame48
  6760. TextLabel49.Transparency = 1
  6761. TextLabel49.Size = UDim2.new(1, 0, 1, 0)
  6762. TextLabel49.BackgroundTransparency = 1
  6763. TextLabel49.ZIndex = 2
  6764. TextLabel49.Font = Enum.Font.SourceSans
  6765. TextLabel49.FontSize = Enum.FontSize.Size14
  6766. TextLabel49.Text = "Save Instance"
  6767. TextLabel49.TextColor = BrickColor.new("Really black")
  6768. TextLabel49.TextColor3 = Color3.new(0, 0, 0)
  6769. TextLabel49.TextSize = 14
  6770. TextLabel49.TextXAlignment = Enum.TextXAlignment.Left
  6771. Frame50.Name = "MainWindow"
  6772. Frame50.Parent = Frame48
  6773. Frame50.Transparency = 0.10000000149012
  6774. Frame50.Size = UDim2.new(1, 0, 0, 200)
  6775. Frame50.BackgroundColor = BrickColor.new("Institutional white")
  6776. Frame50.BackgroundColor3 = Color3.new(1, 1, 1)
  6777. Frame50.BackgroundTransparency = 0.10000000149012
  6778. Frame50.BorderColor = BrickColor.new("Light grey")
  6779. Frame50.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
  6780. TextButton51.Name = "Save"
  6781. TextButton51.Parent = Frame50
  6782. TextButton51.Position = UDim2.new(0.075000003, 0, 1, -40)
  6783. TextButton51.Transparency = 0.5
  6784. TextButton51.Size = UDim2.new(0.400000006, 0, 0, 30)
  6785. TextButton51.BackgroundColor = BrickColor.new("Institutional white")
  6786. TextButton51.BackgroundColor3 = Color3.new(1, 1, 1)
  6787. TextButton51.BackgroundTransparency = 0.5
  6788. TextButton51.BorderColor = BrickColor.new("Really black")
  6789. TextButton51.BorderColor3 = Color3.new(0, 0, 0)
  6790. TextButton51.Font = Enum.Font.SourceSans
  6791. TextButton51.FontSize = Enum.FontSize.Size18
  6792. TextButton51.Text = "Save"
  6793. TextButton51.TextSize = 18
  6794. TextLabel52.Name = "Desc"
  6795. TextLabel52.Parent = Frame50
  6796. TextLabel52.Position = UDim2.new(0, 0, 0, 20)
  6797. TextLabel52.Transparency = 1
  6798. TextLabel52.Size = UDim2.new(1, 0, 0, 40)
  6799. TextLabel52.BackgroundColor = BrickColor.new("Institutional white")
  6800. TextLabel52.BackgroundColor3 = Color3.new(1, 1, 1)
  6801. TextLabel52.BackgroundTransparency = 1
  6802. TextLabel52.Font = Enum.Font.SourceSans
  6803. TextLabel52.FontSize = Enum.FontSize.Size14
  6804. TextLabel52.Text = "This will save an instance to your PC. Type in the name for your instance. (.rbxmx will be added automatically.)"
  6805. TextLabel52.TextSize = 14
  6806. TextLabel52.TextWrap = true
  6807. TextLabel52.TextWrapped = true
  6808. TextButton53.Name = "Cancel"
  6809. TextButton53.Parent = Frame50
  6810. TextButton53.Position = UDim2.new(0.524999976, 0, 1, -40)
  6811. TextButton53.Transparency = 0.5
  6812. TextButton53.Size = UDim2.new(0.400000006, 0, 0, 30)
  6813. TextButton53.BackgroundColor = BrickColor.new("Institutional white")
  6814. TextButton53.BackgroundColor3 = Color3.new(1, 1, 1)
  6815. TextButton53.BackgroundTransparency = 0.5
  6816. TextButton53.BorderColor = BrickColor.new("Really black")
  6817. TextButton53.BorderColor3 = Color3.new(0, 0, 0)
  6818. TextButton53.Font = Enum.Font.SourceSans
  6819. TextButton53.FontSize = Enum.FontSize.Size18
  6820. TextButton53.Text = "Cancel"
  6821. TextButton53.TextSize = 18
  6822. TextBox54.Name = "FileName"
  6823. TextBox54.Parent = Frame50
  6824. TextBox54.Position = UDim2.new(0.075000003, 0, 0.400000006, 0)
  6825. TextBox54.Transparency = 0.20000000298023
  6826. TextBox54.Size = UDim2.new(0.850000024, 0, 0, 30)
  6827. TextBox54.BackgroundColor = BrickColor.new("Institutional white")
  6828. TextBox54.BackgroundColor3 = Color3.new(1, 1, 1)
  6829. TextBox54.BackgroundTransparency = 0.20000000298023
  6830. TextBox54.Font = Enum.Font.SourceSans
  6831. TextBox54.FontSize = Enum.FontSize.Size18
  6832. TextBox54.Text = ""
  6833. TextBox54.TextSize = 18
  6834. TextBox54.TextXAlignment = Enum.TextXAlignment.Left
  6835. TextButton55.Name = "SaveObjects"
  6836. TextButton55.Parent = Frame50
  6837. TextButton55.Position = UDim2.new(0.075000003, 0, 0.625, 0)
  6838. TextButton55.Transparency = 0.60000002384186
  6839. TextButton55.Size = UDim2.new(0, 20, 0, 20)
  6840. TextButton55.BackgroundColor = BrickColor.new("Institutional white")
  6841. TextButton55.BackgroundColor3 = Color3.new(1, 1, 1)
  6842. TextButton55.BackgroundTransparency = 0.60000002384186
  6843. TextButton55.ZIndex = 2
  6844. TextButton55.Font = Enum.Font.SourceSans
  6845. TextButton55.FontSize = Enum.FontSize.Size18
  6846. TextButton55.Text = ""
  6847. TextButton55.TextColor = BrickColor.new("Institutional white")
  6848. TextButton55.TextColor3 = Color3.new(1, 1, 1)
  6849. TextButton55.TextSize = 18
  6850. TextLabel56.Name = "enabled"
  6851. TextLabel56.Parent = TextButton55
  6852. TextLabel56.Position = UDim2.new(0, 3, 0, 3)
  6853. TextLabel56.Transparency = 0.40000000596046
  6854. TextLabel56.Size = UDim2.new(0, 14, 0, 14)
  6855. TextLabel56.BackgroundColor = BrickColor.new("Dark stone grey")
  6856. TextLabel56.BackgroundColor3 = Color3.new(0.380392, 0.380392, 0.380392)
  6857. TextLabel56.BackgroundTransparency = 0.40000000596046
  6858. TextLabel56.BorderSizePixel = 0
  6859. TextLabel56.Font = Enum.Font.SourceSans
  6860. TextLabel56.FontSize = Enum.FontSize.Size14
  6861. TextLabel56.Text = ""
  6862. TextLabel56.TextSize = 14
  6863. TextLabel57.Name = "Desc2"
  6864. TextLabel57.Parent = Frame50
  6865. TextLabel57.Position = UDim2.new(0.075000003, 30, 0.625, 0)
  6866. TextLabel57.Transparency = 1
  6867. TextLabel57.Size = UDim2.new(0.925000012, -30, 0, 20)
  6868. TextLabel57.BackgroundColor = BrickColor.new("Institutional white")
  6869. TextLabel57.BackgroundColor3 = Color3.new(1, 1, 1)
  6870. TextLabel57.BackgroundTransparency = 1
  6871. TextLabel57.Font = Enum.Font.SourceSans
  6872. TextLabel57.FontSize = Enum.FontSize.Size14
  6873. TextLabel57.Text = "Save Object type values"
  6874. TextLabel57.TextSize = 14
  6875. TextLabel57.TextXAlignment = Enum.TextXAlignment.Left
  6876. Frame58.Name = "Confirmation"
  6877. Frame58.Parent = ScreenGui0
  6878. Frame58.Position = UDim2.new(0.5, -175, 0.5, -75)
  6879. Frame58.Visible = false
  6880. Frame58.Size = UDim2.new(0, 350, 0, 20)
  6881. Frame58.Active = true
  6882. Frame58.BackgroundColor = BrickColor.new("Lily white")
  6883. Frame58.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
  6884. Frame58.BorderColor = BrickColor.new("Sand violet metallic")
  6885. Frame58.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  6886. Frame58.BorderSizePixel = 0
  6887. Frame58.Draggable = true
  6888. Frame58.ZIndex = 3
  6889. TextLabel59.Name = "Title"
  6890. TextLabel59.Parent = Frame58
  6891. TextLabel59.Transparency = 1
  6892. TextLabel59.Size = UDim2.new(1, 0, 1, 0)
  6893. TextLabel59.BackgroundTransparency = 1
  6894. TextLabel59.ZIndex = 3
  6895. TextLabel59.Font = Enum.Font.SourceSans
  6896. TextLabel59.FontSize = Enum.FontSize.Size14
  6897. TextLabel59.Text = "Confirm"
  6898. TextLabel59.TextColor = BrickColor.new("Really black")
  6899. TextLabel59.TextColor3 = Color3.new(0, 0, 0)
  6900. TextLabel59.TextSize = 14
  6901. TextLabel59.TextXAlignment = Enum.TextXAlignment.Left
  6902. Frame60.Name = "MainWindow"
  6903. Frame60.Parent = Frame58
  6904. Frame60.Transparency = 0.10000000149012
  6905. Frame60.Size = UDim2.new(1, 0, 0, 150)
  6906. Frame60.BackgroundColor = BrickColor.new("Institutional white")
  6907. Frame60.BackgroundColor3 = Color3.new(1, 1, 1)
  6908. Frame60.BackgroundTransparency = 0.10000000149012
  6909. Frame60.BorderColor = BrickColor.new("Light grey")
  6910. Frame60.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
  6911. Frame60.ZIndex = 2
  6912. TextButton61.Name = "Yes"
  6913. TextButton61.Parent = Frame60
  6914. TextButton61.Position = UDim2.new(0.075000003, 0, 1, -40)
  6915. TextButton61.Transparency = 0.5
  6916. TextButton61.Size = UDim2.new(0.400000006, 0, 0, 30)
  6917. TextButton61.BackgroundColor = BrickColor.new("Institutional white")
  6918. TextButton61.BackgroundColor3 = Color3.new(1, 1, 1)
  6919. TextButton61.BackgroundTransparency = 0.5
  6920. TextButton61.BorderColor = BrickColor.new("Really black")
  6921. TextButton61.BorderColor3 = Color3.new(0, 0, 0)
  6922. TextButton61.ZIndex = 2
  6923. TextButton61.Font = Enum.Font.SourceSans
  6924. TextButton61.FontSize = Enum.FontSize.Size18
  6925. TextButton61.Text = "Yes"
  6926. TextButton61.TextSize = 18
  6927. TextLabel62.Name = "Desc"
  6928. TextLabel62.Parent = Frame60
  6929. TextLabel62.Position = UDim2.new(0, 0, 0, 20)
  6930. TextLabel62.Transparency = 1
  6931. TextLabel62.Size = UDim2.new(1, 0, 0, 40)
  6932. TextLabel62.BackgroundColor = BrickColor.new("Institutional white")
  6933. TextLabel62.BackgroundColor3 = Color3.new(1, 1, 1)
  6934. TextLabel62.BackgroundTransparency = 1
  6935. TextLabel62.ZIndex = 2
  6936. TextLabel62.Font = Enum.Font.SourceSans
  6937. TextLabel62.FontSize = Enum.FontSize.Size14
  6938. TextLabel62.Text = "The file, FILENAME, already exists. Overwrite?"
  6939. TextLabel62.TextSize = 14
  6940. TextLabel62.TextWrap = true
  6941. TextLabel62.TextWrapped = true
  6942. TextButton63.Name = "No"
  6943. TextButton63.Parent = Frame60
  6944. TextButton63.Position = UDim2.new(0.524999976, 0, 1, -40)
  6945. TextButton63.Transparency = 0.5
  6946. TextButton63.Size = UDim2.new(0.400000006, 0, 0, 30)
  6947. TextButton63.BackgroundColor = BrickColor.new("Institutional white")
  6948. TextButton63.BackgroundColor3 = Color3.new(1, 1, 1)
  6949. TextButton63.BackgroundTransparency = 0.5
  6950. TextButton63.BorderColor = BrickColor.new("Really black")
  6951. TextButton63.BorderColor3 = Color3.new(0, 0, 0)
  6952. TextButton63.ZIndex = 2
  6953. TextButton63.Font = Enum.Font.SourceSans
  6954. TextButton63.FontSize = Enum.FontSize.Size18
  6955. TextButton63.Text = "No"
  6956. TextButton63.TextSize = 18
  6957. Frame64.Name = "Caution"
  6958. Frame64.Parent = ScreenGui0
  6959. Frame64.Position = UDim2.new(0.5, -175, 0.5, -75)
  6960. Frame64.Visible = false
  6961. Frame64.Size = UDim2.new(0, 350, 0, 20)
  6962. Frame64.Active = true
  6963. Frame64.BackgroundColor = BrickColor.new("Lily white")
  6964. Frame64.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
  6965. Frame64.BorderColor = BrickColor.new("Sand violet metallic")
  6966. Frame64.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  6967. Frame64.BorderSizePixel = 0
  6968. Frame64.Draggable = true
  6969. Frame64.ZIndex = 5
  6970. TextLabel65.Name = "Title"
  6971. TextLabel65.Parent = Frame64
  6972. TextLabel65.Transparency = 1
  6973. TextLabel65.Size = UDim2.new(1, 0, 1, 0)
  6974. TextLabel65.BackgroundTransparency = 1
  6975. TextLabel65.ZIndex = 5
  6976. TextLabel65.Font = Enum.Font.SourceSans
  6977. TextLabel65.FontSize = Enum.FontSize.Size14
  6978. TextLabel65.Text = "Caution"
  6979. TextLabel65.TextColor = BrickColor.new("Really black")
  6980. TextLabel65.TextColor3 = Color3.new(0, 0, 0)
  6981. TextLabel65.TextSize = 14
  6982. TextLabel65.TextXAlignment = Enum.TextXAlignment.Left
  6983. Frame66.Name = "MainWindow"
  6984. Frame66.Parent = Frame64
  6985. Frame66.Transparency = 0.10000000149012
  6986. Frame66.Size = UDim2.new(1, 0, 0, 150)
  6987. Frame66.BackgroundColor = BrickColor.new("Institutional white")
  6988. Frame66.BackgroundColor3 = Color3.new(1, 1, 1)
  6989. Frame66.BackgroundTransparency = 0.10000000149012
  6990. Frame66.BorderColor = BrickColor.new("Light grey")
  6991. Frame66.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
  6992. Frame66.ZIndex = 4
  6993. TextLabel67.Name = "Desc"
  6994. TextLabel67.Parent = Frame66
  6995. TextLabel67.Position = UDim2.new(0, 0, 0, 20)
  6996. TextLabel67.Transparency = 1
  6997. TextLabel67.Size = UDim2.new(1, 0, 0, 42)
  6998. TextLabel67.BackgroundColor = BrickColor.new("Institutional white")
  6999. TextLabel67.BackgroundColor3 = Color3.new(1, 1, 1)
  7000. TextLabel67.BackgroundTransparency = 1
  7001. TextLabel67.ZIndex = 4
  7002. TextLabel67.Font = Enum.Font.SourceSans
  7003. TextLabel67.FontSize = Enum.FontSize.Size14
  7004. TextLabel67.Text = "The file, FILENAME, already exists. Overwrite?"
  7005. TextLabel67.TextSize = 14
  7006. TextLabel67.TextWrap = true
  7007. TextLabel67.TextWrapped = true
  7008. TextButton68.Name = "Ok"
  7009. TextButton68.Parent = Frame66
  7010. TextButton68.Position = UDim2.new(0.300000012, 0, 1, -40)
  7011. TextButton68.Transparency = 0.5
  7012. TextButton68.Size = UDim2.new(0.400000006, 0, 0, 30)
  7013. TextButton68.BackgroundColor = BrickColor.new("Institutional white")
  7014. TextButton68.BackgroundColor3 = Color3.new(1, 1, 1)
  7015. TextButton68.BackgroundTransparency = 0.5
  7016. TextButton68.BorderColor = BrickColor.new("Really black")
  7017. TextButton68.BorderColor3 = Color3.new(0, 0, 0)
  7018. TextButton68.ZIndex = 4
  7019. TextButton68.Font = Enum.Font.SourceSans
  7020. TextButton68.FontSize = Enum.FontSize.Size18
  7021. TextButton68.Text = "Ok"
  7022. TextButton68.TextSize = 18
  7023. Frame69.Name = "CallRemote"
  7024. Frame69.Parent = ScreenGui0
  7025. Frame69.Position = UDim2.new(0.5, -175, 0.5, -100)
  7026. Frame69.Visible = false
  7027. Frame69.Size = UDim2.new(0, 350, 0, 20)
  7028. Frame69.Active = true
  7029. Frame69.BackgroundColor = BrickColor.new("Lily white")
  7030. Frame69.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
  7031. Frame69.BorderColor = BrickColor.new("Sand violet metallic")
  7032. Frame69.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  7033. Frame69.BorderSizePixel = 0
  7034. Frame69.Draggable = true
  7035. Frame69.ZIndex = 2
  7036. TextLabel70.Name = "Title"
  7037. TextLabel70.Parent = Frame69
  7038. TextLabel70.Transparency = 1
  7039. TextLabel70.Size = UDim2.new(1, 0, 1, 0)
  7040. TextLabel70.BackgroundTransparency = 1
  7041. TextLabel70.ZIndex = 2
  7042. TextLabel70.Font = Enum.Font.SourceSans
  7043. TextLabel70.FontSize = Enum.FontSize.Size14
  7044. TextLabel70.Text = "Call Remote"
  7045. TextLabel70.TextColor = BrickColor.new("Really black")
  7046. TextLabel70.TextColor3 = Color3.new(0, 0, 0)
  7047. TextLabel70.TextSize = 14
  7048. TextLabel70.TextXAlignment = Enum.TextXAlignment.Left
  7049. Frame71.Name = "MainWindow"
  7050. Frame71.Parent = Frame69
  7051. Frame71.Transparency = 0.10000000149012
  7052. Frame71.Size = UDim2.new(1, 0, 0, 200)
  7053. Frame71.BackgroundColor = BrickColor.new("Institutional white")
  7054. Frame71.BackgroundColor3 = Color3.new(1, 1, 1)
  7055. Frame71.BackgroundTransparency = 0.10000000149012
  7056. Frame71.BorderColor = BrickColor.new("Light grey")
  7057. Frame71.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
  7058. TextLabel72.Name = "Desc"
  7059. TextLabel72.Parent = Frame71
  7060. TextLabel72.Position = UDim2.new(0, 0, 0, 20)
  7061. TextLabel72.Transparency = 1
  7062. TextLabel72.Size = UDim2.new(1, 0, 0, 20)
  7063. TextLabel72.BackgroundColor = BrickColor.new("Institutional white")
  7064. TextLabel72.BackgroundColor3 = Color3.new(1, 1, 1)
  7065. TextLabel72.BackgroundTransparency = 1
  7066. TextLabel72.Font = Enum.Font.SourceSans
  7067. TextLabel72.FontSize = Enum.FontSize.Size14
  7068. TextLabel72.Text = "Arguments"
  7069. TextLabel72.TextSize = 14
  7070. TextLabel72.TextWrap = true
  7071. TextLabel72.TextWrapped = true
  7072. ScrollingFrame73.Name = "Arguments"
  7073. ScrollingFrame73.Parent = Frame71
  7074. ScrollingFrame73.Position = UDim2.new(0, 0, 0, 40)
  7075. ScrollingFrame73.Transparency = 1
  7076. ScrollingFrame73.Size = UDim2.new(1, 0, 0, 80)
  7077. ScrollingFrame73.BackgroundColor = BrickColor.new("Institutional white")
  7078. ScrollingFrame73.BackgroundColor3 = Color3.new(1, 1, 1)
  7079. ScrollingFrame73.BackgroundTransparency = 1
  7080. ScrollingFrame73.BottomImage = "rbxasset://textures/blackBkg_square.png"
  7081. ScrollingFrame73.CanvasSize = UDim2.new(0, 0, 0, 0)
  7082. ScrollingFrame73.MidImage = "rbxasset://textures/blackBkg_square.png"
  7083. ScrollingFrame73.ScrollingDirection = Enum.ScrollingDirection.Y
  7084. ScrollingFrame73.TopImage = "rbxasset://textures/blackBkg_square.png"
  7085. TextButton74.Name = "DisplayReturned"
  7086. TextButton74.Parent = Frame71
  7087. TextButton74.Position = UDim2.new(0.075000003, 0, 0.625, 0)
  7088. TextButton74.Transparency = 0.60000002384186
  7089. TextButton74.Size = UDim2.new(0, 20, 0, 20)
  7090. TextButton74.BackgroundColor = BrickColor.new("Institutional white")
  7091. TextButton74.BackgroundColor3 = Color3.new(1, 1, 1)
  7092. TextButton74.BackgroundTransparency = 0.60000002384186
  7093. TextButton74.ZIndex = 2
  7094. TextButton74.Font = Enum.Font.SourceSans
  7095. TextButton74.FontSize = Enum.FontSize.Size18
  7096. TextButton74.Text = ""
  7097. TextButton74.TextColor = BrickColor.new("Institutional white")
  7098. TextButton74.TextColor3 = Color3.new(1, 1, 1)
  7099. TextButton74.TextSize = 18
  7100. TextLabel75.Name = "enabled"
  7101. TextLabel75.Parent = TextButton74
  7102. TextLabel75.Position = UDim2.new(0, 3, 0, 3)
  7103. TextLabel75.Visible = false
  7104. TextLabel75.Transparency = 0.40000000596046
  7105. TextLabel75.Size = UDim2.new(0, 14, 0, 14)
  7106. TextLabel75.BackgroundColor = BrickColor.new("Dark stone grey")
  7107. TextLabel75.BackgroundColor3 = Color3.new(0.380392, 0.380392, 0.380392)
  7108. TextLabel75.BackgroundTransparency = 0.40000000596046
  7109. TextLabel75.BorderSizePixel = 0
  7110. TextLabel75.Font = Enum.Font.SourceSans
  7111. TextLabel75.FontSize = Enum.FontSize.Size14
  7112. TextLabel75.Text = ""
  7113. TextLabel75.TextSize = 14
  7114. TextLabel76.Name = "Desc2"
  7115. TextLabel76.Parent = Frame71
  7116. TextLabel76.Position = UDim2.new(0.075000003, 30, 0.625, 0)
  7117. TextLabel76.Transparency = 1
  7118. TextLabel76.Size = UDim2.new(0.925000012, -30, 0, 20)
  7119. TextLabel76.BackgroundColor = BrickColor.new("Institutional white")
  7120. TextLabel76.BackgroundColor3 = Color3.new(1, 1, 1)
  7121. TextLabel76.BackgroundTransparency = 1
  7122. TextLabel76.Font = Enum.Font.SourceSans
  7123. TextLabel76.FontSize = Enum.FontSize.Size14
  7124. TextLabel76.Text = "Display values returned"
  7125. TextLabel76.TextSize = 14
  7126. TextLabel76.TextXAlignment = Enum.TextXAlignment.Left
  7127. TextButton77.Name = "Add"
  7128. TextButton77.Parent = Frame71
  7129. TextButton77.Position = UDim2.new(0.800000012, 0, 0.625, 0)
  7130. TextButton77.Transparency = 0.5
  7131. TextButton77.Size = UDim2.new(0, 20, 0, 20)
  7132. TextButton77.BackgroundColor = BrickColor.new("Institutional white")
  7133. TextButton77.BackgroundColor3 = Color3.new(1, 1, 1)
  7134. TextButton77.BackgroundTransparency = 0.5
  7135. TextButton77.BorderColor = BrickColor.new("Really black")
  7136. TextButton77.BorderColor3 = Color3.new(0, 0, 0)
  7137. TextButton77.Font = Enum.Font.SourceSansBold
  7138. TextButton77.FontSize = Enum.FontSize.Size24
  7139. TextButton77.Text = "+"
  7140. TextButton77.TextSize = 24
  7141. TextButton78.Name = "Subtract"
  7142. TextButton78.Parent = Frame71
  7143. TextButton78.Position = UDim2.new(0.899999976, 0, 0.625, 0)
  7144. TextButton78.Transparency = 0.5
  7145. TextButton78.Size = UDim2.new(0, 20, 0, 20)
  7146. TextButton78.BackgroundColor = BrickColor.new("Institutional white")
  7147. TextButton78.BackgroundColor3 = Color3.new(1, 1, 1)
  7148. TextButton78.BackgroundTransparency = 0.5
  7149. TextButton78.BorderColor = BrickColor.new("Really black")
  7150. TextButton78.BorderColor3 = Color3.new(0, 0, 0)
  7151. TextButton78.Font = Enum.Font.SourceSansBold
  7152. TextButton78.FontSize = Enum.FontSize.Size24
  7153. TextButton78.Text = "-"
  7154. TextButton78.TextSize = 24
  7155. Frame79.Name = "ArgumentTemplate"
  7156. Frame79.Parent = Frame71
  7157. Frame79.Visible = false
  7158. Frame79.Transparency = 0.5
  7159. Frame79.Size = UDim2.new(1, 0, 0, 20)
  7160. Frame79.BackgroundColor = BrickColor.new("Institutional white")
  7161. Frame79.BackgroundColor3 = Color3.new(1, 1, 1)
  7162. Frame79.BackgroundTransparency = 0.5
  7163. Frame79.BorderColor = BrickColor.new("Light grey")
  7164. Frame79.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
  7165. TextButton80.Name = "Type"
  7166. TextButton80.Parent = Frame79
  7167. TextButton80.Transparency = 0.89999997615814
  7168. TextButton80.Size = UDim2.new(0.400000006, 0, 0, 20)
  7169. TextButton80.BackgroundColor = BrickColor.new("Institutional white")
  7170. TextButton80.BackgroundColor3 = Color3.new(1, 1, 1)
  7171. TextButton80.BackgroundTransparency = 0.89999997615814
  7172. TextButton80.BorderColor = BrickColor.new("Really black")
  7173. TextButton80.BorderColor3 = Color3.new(0, 0, 0)
  7174. TextButton80.Font = Enum.Font.SourceSans
  7175. TextButton80.FontSize = Enum.FontSize.Size18
  7176. TextButton80.Text = "Script"
  7177. TextButton80.TextSize = 18
  7178. TextBox81.Name = "Value"
  7179. TextBox81.Parent = Frame79
  7180. TextBox81.Position = UDim2.new(0.400000006, 0, 0, 0)
  7181. TextBox81.Transparency = 0.89999997615814
  7182. TextBox81.Size = UDim2.new(0.600000024, -12, 0, 20)
  7183. TextBox81.BackgroundColor = BrickColor.new("Institutional white")
  7184. TextBox81.BackgroundColor3 = Color3.new(1, 1, 1)
  7185. TextBox81.BackgroundTransparency = 0.89999997615814
  7186. TextBox81.Font = Enum.Font.SourceSans
  7187. TextBox81.FontSize = Enum.FontSize.Size14
  7188. TextBox81.Text = ""
  7189. TextBox81.TextSize = 14
  7190. TextBox81.TextXAlignment = Enum.TextXAlignment.Left
  7191. TextButton82.Name = "Cancel"
  7192. TextButton82.Parent = Frame71
  7193. TextButton82.Position = UDim2.new(0.524999976, 0, 1, -40)
  7194. TextButton82.Transparency = 0.5
  7195. TextButton82.Size = UDim2.new(0.400000006, 0, 0, 30)
  7196. TextButton82.BackgroundColor = BrickColor.new("Institutional white")
  7197. TextButton82.BackgroundColor3 = Color3.new(1, 1, 1)
  7198. TextButton82.BackgroundTransparency = 0.5
  7199. TextButton82.BorderColor = BrickColor.new("Really black")
  7200. TextButton82.BorderColor3 = Color3.new(0, 0, 0)
  7201. TextButton82.Font = Enum.Font.SourceSans
  7202. TextButton82.FontSize = Enum.FontSize.Size18
  7203. TextButton82.Text = "Cancel"
  7204. TextButton82.TextSize = 18
  7205. TextButton83.Name = "Ok"
  7206. TextButton83.Parent = Frame71
  7207. TextButton83.Position = UDim2.new(0.075000003, 0, 1, -40)
  7208. TextButton83.Transparency = 0.5
  7209. TextButton83.Size = UDim2.new(0.400000006, 0, 0, 30)
  7210. TextButton83.BackgroundColor = BrickColor.new("Institutional white")
  7211. TextButton83.BackgroundColor3 = Color3.new(1, 1, 1)
  7212. TextButton83.BackgroundTransparency = 0.5
  7213. TextButton83.BorderColor = BrickColor.new("Really black")
  7214. TextButton83.BorderColor3 = Color3.new(0, 0, 0)
  7215. TextButton83.Font = Enum.Font.SourceSans
  7216. TextButton83.FontSize = Enum.FontSize.Size18
  7217. TextButton83.Text = "Call"
  7218. TextButton83.TextSize = 18
  7219. Frame84.Name = "TableCaution"
  7220. Frame84.Parent = ScreenGui0
  7221. Frame84.Position = UDim2.new(0.300000012, 0, 0.300000012, 0)
  7222. Frame84.Visible = false
  7223. Frame84.Size = UDim2.new(0, 350, 0, 20)
  7224. Frame84.Active = true
  7225. Frame84.BackgroundColor = BrickColor.new("Lily white")
  7226. Frame84.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
  7227. Frame84.BorderColor = BrickColor.new("Sand violet metallic")
  7228. Frame84.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  7229. Frame84.BorderSizePixel = 0
  7230. Frame84.Draggable = true
  7231. Frame84.ZIndex = 2
  7232. Frame85.Name = "MainWindow"
  7233. Frame85.Parent = Frame84
  7234. Frame85.Transparency = 0.10000000149012
  7235. Frame85.Size = UDim2.new(1, 0, 0, 150)
  7236. Frame85.BackgroundColor = BrickColor.new("Institutional white")
  7237. Frame85.BackgroundColor3 = Color3.new(1, 1, 1)
  7238. Frame85.BackgroundTransparency = 0.10000000149012
  7239. Frame85.BorderColor = BrickColor.new("Light grey")
  7240. Frame85.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
  7241. TextButton86.Name = "Ok"
  7242. TextButton86.Parent = Frame85
  7243. TextButton86.Position = UDim2.new(0.300000012, 0, 1, -40)
  7244. TextButton86.Transparency = 0.5
  7245. TextButton86.Size = UDim2.new(0.400000006, 0, 0, 30)
  7246. TextButton86.BackgroundColor = BrickColor.new("Institutional white")
  7247. TextButton86.BackgroundColor3 = Color3.new(1, 1, 1)
  7248. TextButton86.BackgroundTransparency = 0.5
  7249. TextButton86.BorderColor = BrickColor.new("Really black")
  7250. TextButton86.BorderColor3 = Color3.new(0, 0, 0)
  7251. TextButton86.Font = Enum.Font.SourceSans
  7252. TextButton86.FontSize = Enum.FontSize.Size18
  7253. TextButton86.Text = "Ok"
  7254. TextButton86.TextSize = 18
  7255. ScrollingFrame87.Name = "TableResults"
  7256. ScrollingFrame87.Parent = Frame85
  7257. ScrollingFrame87.Position = UDim2.new(0, 0, 0, 20)
  7258. ScrollingFrame87.Transparency = 1
  7259. ScrollingFrame87.Size = UDim2.new(1, 0, 0, 80)
  7260. ScrollingFrame87.BackgroundColor = BrickColor.new("Institutional white")
  7261. ScrollingFrame87.BackgroundColor3 = Color3.new(1, 1, 1)
  7262. ScrollingFrame87.BackgroundTransparency = 1
  7263. ScrollingFrame87.BottomImage = "rbxasset://textures/blackBkg_square.png"
  7264. ScrollingFrame87.CanvasSize = UDim2.new(0, 0, 0, 0)
  7265. ScrollingFrame87.MidImage = "rbxasset://textures/blackBkg_square.png"
  7266. ScrollingFrame87.ScrollingDirection = Enum.ScrollingDirection.Y
  7267. ScrollingFrame87.TopImage = "rbxasset://textures/blackBkg_square.png"
  7268. Frame88.Name = "TableTemplate"
  7269. Frame88.Parent = Frame85
  7270. Frame88.Visible = false
  7271. Frame88.Transparency = 0.5
  7272. Frame88.Size = UDim2.new(1, 0, 0, 20)
  7273. Frame88.BackgroundColor = BrickColor.new("Institutional white")
  7274. Frame88.BackgroundColor3 = Color3.new(1, 1, 1)
  7275. Frame88.BackgroundTransparency = 0.5
  7276. Frame88.BorderColor = BrickColor.new("Light grey")
  7277. Frame88.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
  7278. TextLabel89.Name = "Type"
  7279. TextLabel89.Parent = Frame88
  7280. TextLabel89.Transparency = 0.89999997615814
  7281. TextLabel89.Size = UDim2.new(0.400000006, 0, 0, 20)
  7282. TextLabel89.BackgroundColor = BrickColor.new("Institutional white")
  7283. TextLabel89.BackgroundColor3 = Color3.new(1, 1, 1)
  7284. TextLabel89.BackgroundTransparency = 0.89999997615814
  7285. TextLabel89.Font = Enum.Font.SourceSans
  7286. TextLabel89.FontSize = Enum.FontSize.Size18
  7287. TextLabel89.Text = "Script"
  7288. TextLabel89.TextSize = 18
  7289. TextLabel90.Name = "Value"
  7290. TextLabel90.Parent = Frame88
  7291. TextLabel90.Position = UDim2.new(0.400000006, 0, 0, 0)
  7292. TextLabel90.Transparency = 0.89999997615814
  7293. TextLabel90.Size = UDim2.new(0.600000024, -12, 0, 20)
  7294. TextLabel90.BackgroundColor = BrickColor.new("Institutional white")
  7295. TextLabel90.BackgroundColor3 = Color3.new(1, 1, 1)
  7296. TextLabel90.BackgroundTransparency = 0.89999997615814
  7297. TextLabel90.Font = Enum.Font.SourceSans
  7298. TextLabel90.FontSize = Enum.FontSize.Size14
  7299. TextLabel90.Text = "Script"
  7300. TextLabel90.TextSize = 14
  7301. TextLabel91.Name = "Title"
  7302. TextLabel91.Parent = Frame84
  7303. TextLabel91.Transparency = 1
  7304. TextLabel91.Size = UDim2.new(1, 0, 1, 0)
  7305. TextLabel91.BackgroundTransparency = 1
  7306. TextLabel91.ZIndex = 2
  7307. TextLabel91.Font = Enum.Font.SourceSans
  7308. TextLabel91.FontSize = Enum.FontSize.Size14
  7309. TextLabel91.Text = "Caution"
  7310. TextLabel91.TextColor = BrickColor.new("Really black")
  7311. TextLabel91.TextColor3 = Color3.new(0, 0, 0)
  7312. TextLabel91.TextSize = 14
  7313. TextLabel91.TextXAlignment = Enum.TextXAlignment.Left
  7314. Frame92.Name = "ScriptEditor"
  7315. Frame92.Parent = ScreenGui0
  7316. Frame92.Position = UDim2.new(0.5, -258, 0.5, -208)
  7317. Frame92.Visible = false
  7318. Frame92.Size = UDim2.new(0, 516, 0, 20)
  7319. Frame92.Active = true
  7320. Frame92.BackgroundColor = BrickColor.new("Lily white")
  7321. Frame92.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
  7322. Frame92.BorderColor = BrickColor.new("Sand violet metallic")
  7323. Frame92.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  7324. Frame92.Draggable = true
  7325. Frame92.ZIndex = 5
  7326. TextLabel93.Name = "Title"
  7327. TextLabel93.Parent = Frame92
  7328. TextLabel93.Transparency = 1
  7329. TextLabel93.Size = UDim2.new(1, 0, 1, 0)
  7330. TextLabel93.BackgroundTransparency = 1
  7331. TextLabel93.ZIndex = 5
  7332. TextLabel93.Font = Enum.Font.SourceSans
  7333. TextLabel93.FontSize = Enum.FontSize.Size14
  7334. TextLabel93.Text = "Script Viewer"
  7335. TextLabel93.TextColor = BrickColor.new("Really black")
  7336. TextLabel93.TextColor3 = Color3.new(0, 0, 0)
  7337. TextLabel93.TextSize = 14
  7338. TextLabel93.TextXAlignment = Enum.TextXAlignment.Left
  7339. Frame94.Name = "Cover"
  7340. Frame94.Parent = Frame92
  7341. Frame94.Position = UDim2.new(0, 0, 3, 0)
  7342. Frame94.Size = UDim2.new(0, 516, 0, 416)
  7343. Frame94.BackgroundColor = BrickColor.new("Institutional white")
  7344. Frame94.BackgroundColor3 = Color3.new(1, 1, 1)
  7345. Frame94.BorderSizePixel = 0
  7346. Frame95.Name = "EditorGrid"
  7347. Frame95.Parent = Frame92
  7348. Frame95.Position = UDim2.new(0, 0, 3, 0)
  7349. Frame95.Size = UDim2.new(0, 500, 0, 400)
  7350. Frame95.BackgroundColor = BrickColor.new("Institutional white")
  7351. Frame95.BackgroundColor3 = Color3.new(1, 1, 1)
  7352. Frame95.BorderSizePixel = 0
  7353. Frame96.Name = "TopBar"
  7354. Frame96.Parent = Frame92
  7355. Frame96.Size = UDim2.new(1, 0, 3, 0)
  7356. Frame96.BackgroundColor = BrickColor.new("White")
  7357. Frame96.BackgroundColor3 = Color3.new(0.941177, 0.941177, 0.941177)
  7358. Frame96.BorderColor = BrickColor.new("Sand violet metallic")
  7359. Frame96.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  7360. ImageButton97.Name = "ScriptBarLeft"
  7361. ImageButton97.Parent = Frame96
  7362. ImageButton97.Position = UDim2.new(1, -32, 0, 40)
  7363. ImageButton97.Size = UDim2.new(0, 16, 0, 20)
  7364. ImageButton97.Active = false
  7365. ImageButton97.BackgroundColor = BrickColor.new("Quill grey")
  7366. ImageButton97.BackgroundColor3 = Color3.new(0.866667, 0.866667, 0.866667)
  7367. ImageButton97.BorderColor = BrickColor.new("Sand violet metallic")
  7368. ImageButton97.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  7369. ImageButton97.AutoButtonColor = false
  7370. Frame98.Name = "Arrow Graphic"
  7371. Frame98.Parent = ImageButton97
  7372. Frame98.Position = UDim2.new(0.5, -4, 0.5, -4)
  7373. Frame98.Transparency = 1
  7374. Frame98.Size = UDim2.new(0, 8, 0, 8)
  7375. Frame98.BackgroundTransparency = 1
  7376. Frame98.BorderSizePixel = 0
  7377. Frame99.Name = "Graphic"
  7378. Frame99.Parent = Frame98
  7379. Frame99.Position = UDim2.new(0.25, 0, 0.375, 0)
  7380. Frame99.Transparency = 0.69999998807907
  7381. Frame99.Size = UDim2.new(0.125, 0, 0.25, 0)
  7382. Frame99.BackgroundColor = BrickColor.new("Sand violet metallic")
  7383. Frame99.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  7384. Frame99.BackgroundTransparency = 0.69999998807907
  7385. Frame99.BorderSizePixel = 0
  7386. Frame100.Name = "Graphic"
  7387. Frame100.Parent = Frame98
  7388. Frame100.Position = UDim2.new(0.375, 0, 0.25, 0)
  7389. Frame100.Transparency = 0.69999998807907
  7390. Frame100.Size = UDim2.new(0.125, 0, 0.5, 0)
  7391. Frame100.BackgroundColor = BrickColor.new("Sand violet metallic")
  7392. Frame100.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  7393. Frame100.BackgroundTransparency = 0.69999998807907
  7394. Frame100.BorderSizePixel = 0
  7395. Frame101.Name = "Graphic"
  7396. Frame101.Parent = Frame98
  7397. Frame101.Position = UDim2.new(0.5, 0, 0.125, 0)
  7398. Frame101.Transparency = 0.69999998807907
  7399. Frame101.Size = UDim2.new(0.125, 0, 0.75, 0)
  7400. Frame101.BackgroundColor = BrickColor.new("Sand violet metallic")
  7401. Frame101.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  7402. Frame101.BackgroundTransparency = 0.69999998807907
  7403. Frame101.BorderSizePixel = 0
  7404. Frame102.Name = "Graphic"
  7405. Frame102.Parent = Frame98
  7406. Frame102.Position = UDim2.new(0.625, 0, 0, 0)
  7407. Frame102.Transparency = 0.69999998807907
  7408. Frame102.Size = UDim2.new(0.125, 0, 1, 0)
  7409. Frame102.BackgroundColor = BrickColor.new("Sand violet metallic")
  7410. Frame102.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  7411. Frame102.BackgroundTransparency = 0.69999998807907
  7412. Frame102.BorderSizePixel = 0
  7413. ImageButton103.Name = "ScriptBarRight"
  7414. ImageButton103.Parent = Frame96
  7415. ImageButton103.Position = UDim2.new(1, -16, 0, 40)
  7416. ImageButton103.Size = UDim2.new(0, 16, 0, 20)
  7417. ImageButton103.Active = false
  7418. ImageButton103.BackgroundColor = BrickColor.new("Quill grey")
  7419. ImageButton103.BackgroundColor3 = Color3.new(0.866667, 0.866667, 0.866667)
  7420. ImageButton103.BorderColor = BrickColor.new("Sand violet metallic")
  7421. ImageButton103.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  7422. ImageButton103.AutoButtonColor = false
  7423. Frame104.Name = "Arrow Graphic"
  7424. Frame104.Parent = ImageButton103
  7425. Frame104.Position = UDim2.new(0.5, -4, 0.5, -4)
  7426. Frame104.Transparency = 1
  7427. Frame104.Size = UDim2.new(0, 8, 0, 8)
  7428. Frame104.BackgroundTransparency = 1
  7429. Frame104.BorderSizePixel = 0
  7430. Frame105.Name = "Graphic"
  7431. Frame105.Parent = Frame104
  7432. Frame105.Position = UDim2.new(0.625, 0, 0.375, 0)
  7433. Frame105.Transparency = 0.69999998807907
  7434. Frame105.Size = UDim2.new(0.125, 0, 0.25, 0)
  7435. Frame105.BackgroundColor = BrickColor.new("Sand violet metallic")
  7436. Frame105.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  7437. Frame105.BackgroundTransparency = 0.69999998807907
  7438. Frame105.BorderSizePixel = 0
  7439. Frame106.Name = "Graphic"
  7440. Frame106.Parent = Frame104
  7441. Frame106.Position = UDim2.new(0.5, 0, 0.25, 0)
  7442. Frame106.Transparency = 0.69999998807907
  7443. Frame106.Size = UDim2.new(0.125, 0, 0.5, 0)
  7444. Frame106.BackgroundColor = BrickColor.new("Sand violet metallic")
  7445. Frame106.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  7446. Frame106.BackgroundTransparency = 0.69999998807907
  7447. Frame106.BorderSizePixel = 0
  7448. Frame107.Name = "Graphic"
  7449. Frame107.Parent = Frame104
  7450. Frame107.Position = UDim2.new(0.375, 0, 0.125, 0)
  7451. Frame107.Transparency = 0.69999998807907
  7452. Frame107.Size = UDim2.new(0.125, 0, 0.75, 0)
  7453. Frame107.BackgroundColor = BrickColor.new("Sand violet metallic")
  7454. Frame107.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  7455. Frame107.BackgroundTransparency = 0.69999998807907
  7456. Frame107.BorderSizePixel = 0
  7457. Frame108.Name = "Graphic"
  7458. Frame108.Parent = Frame104
  7459. Frame108.Position = UDim2.new(0.25, 0, 0, 0)
  7460. Frame108.Transparency = 0.69999998807907
  7461. Frame108.Size = UDim2.new(0.125, 0, 1, 0)
  7462. Frame108.BackgroundColor = BrickColor.new("Sand violet metallic")
  7463. Frame108.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  7464. Frame108.BackgroundTransparency = 0.69999998807907
  7465. Frame108.BorderSizePixel = 0
  7466. TextButton109.Name = "Clipboard"
  7467. TextButton109.Parent = Frame96
  7468. TextButton109.Position = UDim2.new(0, 0, 0, 20)
  7469. TextButton109.Transparency = 0.5
  7470. TextButton109.Size = UDim2.new(0, 80, 0, 20)
  7471. TextButton109.BackgroundColor = BrickColor.new("Institutional white")
  7472. TextButton109.BackgroundColor3 = Color3.new(1, 1, 1)
  7473. TextButton109.BackgroundTransparency = 0.5
  7474. TextButton109.BorderColor = BrickColor.new("Really black")
  7475. TextButton109.BorderColor3 = Color3.new(0, 0, 0)
  7476. TextButton109.Font = Enum.Font.SourceSans
  7477. TextButton109.FontSize = Enum.FontSize.Size14
  7478. TextButton109.Text = "To Clipboard"
  7479. TextButton109.TextSize = 14
  7480. Frame110.Name = "ScriptBar"
  7481. Frame110.Parent = Frame96
  7482. Frame110.Position = UDim2.new(0, 0, 0, 40)
  7483. Frame110.Size = UDim2.new(1, -32, 0, 20)
  7484. Frame110.BackgroundColor = BrickColor.new("Mid gray")
  7485. Frame110.BackgroundColor3 = Color3.new(0.823529, 0.823529, 0.823529)
  7486. Frame110.BorderColor = BrickColor.new("Sand violet metallic")
  7487. Frame110.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  7488. Frame110.ClipsDescendants = true
  7489. Frame111.Name = "Entry"
  7490. Frame111.Parent = Frame96
  7491. Frame111.Visible = false
  7492. Frame111.Transparency = 1
  7493. Frame111.Size = UDim2.new(0, 100, 1, 0)
  7494. Frame111.BackgroundColor = BrickColor.new("Institutional white")
  7495. Frame111.BackgroundColor3 = Color3.new(1, 1, 1)
  7496. Frame111.BackgroundTransparency = 1
  7497. TextButton112.Name = "Button"
  7498. TextButton112.Parent = Frame111
  7499. TextButton112.Transparency = 0.60000002384186
  7500. TextButton112.Size = UDim2.new(1, 0, 1, 0)
  7501. TextButton112.BackgroundColor = BrickColor.new("Institutional white")
  7502. TextButton112.BackgroundColor3 = Color3.new(1, 1, 1)
  7503. TextButton112.BackgroundTransparency = 0.60000002384186
  7504. TextButton112.BorderColor = BrickColor.new("Really black")
  7505. TextButton112.BorderColor3 = Color3.new(0, 0, 0)
  7506. TextButton112.ClipsDescendants = true
  7507. TextButton112.ZIndex = 4
  7508. TextButton112.Font = Enum.Font.SourceSans
  7509. TextButton112.FontSize = Enum.FontSize.Size12
  7510. TextButton112.Text = ""
  7511. TextButton112.TextSize = 12
  7512. TextButton112.TextXAlignment = Enum.TextXAlignment.Left
  7513. TextButton113.Name = "Close"
  7514. TextButton113.Parent = Frame111
  7515. TextButton113.Position = UDim2.new(1, -20, 0, 0)
  7516. TextButton113.Transparency = 1
  7517. TextButton113.Size = UDim2.new(0, 20, 0, 20)
  7518. TextButton113.BackgroundColor = BrickColor.new("Institutional white")
  7519. TextButton113.BackgroundColor3 = Color3.new(1, 1, 1)
  7520. TextButton113.BackgroundTransparency = 1
  7521. TextButton113.BorderColor = BrickColor.new("Really black")
  7522. TextButton113.BorderColor3 = Color3.new(0, 0, 0)
  7523. TextButton113.ZIndex = 4
  7524. TextButton113.Font = Enum.Font.SourceSans
  7525. TextButton113.FontSize = Enum.FontSize.Size14
  7526. TextButton113.Text = "X"
  7527. TextButton113.TextSize = 14
  7528. BindableEvent114.Name = "OpenScript"
  7529. BindableEvent114.Parent = Frame92
  7530. LocalScript115.Parent = Frame92
  7531. table.insert(cors,sandbox(LocalScript115,function()
  7532. local top = script.Parent
  7533.  
  7534. local editorGrid = top:WaitForChild("EditorGrid")
  7535.  
  7536. local currentSource = ""
  7537.  
  7538. local currentEditor = {
  7539. x = 0,
  7540. y = 0
  7541. }
  7542.  
  7543. local userInput = game:GetService("UserInputService")
  7544. local mouse = game:GetService("Players").LocalPlayer:GetMouse()
  7545.  
  7546. local topBar = top:WaitForChild("TopBar")
  7547. local scriptBar = topBar:WaitForChild("ScriptBar")
  7548. local scriptBarLeft = topBar:WaitForChild("ScriptBarLeft")
  7549. local scriptBarRight = topBar:WaitForChild("ScriptBarRight")
  7550. local clipboardButton = topBar:WaitForChild("Clipboard")
  7551.  
  7552. local entryTemplate = topBar:WaitForChild("Entry")
  7553.  
  7554. local openEvent = top:WaitForChild("OpenScript")
  7555.  
  7556. local closeButton = top:WaitForChild("Close")
  7557.  
  7558. local memoryScripts = {}
  7559.  
  7560. local editingIndex = 0
  7561.  
  7562. -- Scrollbar
  7563.  
  7564. local ScrollBarWidth = 16
  7565.  
  7566. local ScrollStyles = {
  7567. Background = Color3.new(233/255, 233/255, 233/255);
  7568. Border = Color3.new(149/255, 149/255, 149/255);
  7569. Selected = Color3.new( 63/255, 119/255, 189/255);
  7570. BorderSelected = Color3.new( 55/255, 106/255, 167/255);
  7571. Text = Color3.new( 0/255, 0/255, 0/255);
  7572. TextDisabled = Color3.new(128/255, 128/255, 128/255);
  7573. TextSelected = Color3.new(255/255, 255/255, 255/255);
  7574. Button = Color3.new(221/255, 221/255, 221/255);
  7575. ButtonBorder = Color3.new(149/255, 149/255, 149/255);
  7576. ButtonSelected = Color3.new(255/255, 0/255, 0/255);
  7577. Field = Color3.new(255/255, 255/255, 255/255);
  7578. FieldBorder = Color3.new(191/255, 191/255, 191/255);
  7579. TitleBackground = Color3.new(178/255, 178/255, 178/255);
  7580. }
  7581. do
  7582. local ZIndexLock = {}
  7583. function SetZIndex(object,z)
  7584. if not ZIndexLock[object] then
  7585. ZIndexLock[object] = true
  7586. if object:IsA'GuiObject' then
  7587. object.ZIndex = z
  7588. end
  7589. local children = object:GetChildren()
  7590. for i = 1,#children do
  7591. SetZIndex(children[i],z)
  7592. end
  7593. ZIndexLock[object] = nil
  7594. end
  7595. end
  7596. end
  7597. function SetZIndexOnChanged(object)
  7598. return object.Changed:connect(function(p)
  7599. if p == "ZIndex" then
  7600. SetZIndex(object,object.ZIndex)
  7601. end
  7602. end)
  7603. end
  7604. function Create(ty,data)
  7605. local obj
  7606. if type(ty) == 'string' then
  7607. obj = Instance.new(ty)
  7608. else
  7609. obj = ty
  7610. end
  7611. for k, v in pairs(data) do
  7612. if type(k) == 'number' then
  7613. v.Parent = obj
  7614. else
  7615. obj[k] = v
  7616. end
  7617. end
  7618. return obj
  7619. end
  7620. -- returns the ascendant ScreenGui of an object
  7621. function GetScreen(screen)
  7622. if screen == nil then return nil end
  7623. while not screen:IsA("ScreenGui") do
  7624. screen = screen.Parent
  7625. if screen == nil then return nil end
  7626. end
  7627. return screen
  7628. end
  7629. -- AutoButtonColor doesn't always reset properly
  7630. function ResetButtonColor(button)
  7631. local active = button.Active
  7632. button.Active = not active
  7633. button.Active = active
  7634. end
  7635.  
  7636. function ArrowGraphic(size,dir,scaled,template)
  7637. local Frame = Create('Frame',{
  7638. Name = "Arrow Graphic";
  7639. BorderSizePixel = 0;
  7640. Size = UDim2.new(0,size,0,size);
  7641. Transparency = 1;
  7642. })
  7643. if not template then
  7644. template = Instance.new("Frame")
  7645. template.BorderSizePixel = 0
  7646. end
  7647.  
  7648. local transform
  7649. if dir == nil or dir == 'Up' then
  7650. function transform(p,s) return p,s end
  7651. elseif dir == 'Down' then
  7652. function transform(p,s) return UDim2.new(0,p.X.Offset,0,size-p.Y.Offset-1),s end
  7653. elseif dir == 'Left' then
  7654. 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
  7655. elseif dir == 'Right' then
  7656. 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
  7657. end
  7658.  
  7659. local scale
  7660. if scaled then
  7661. 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
  7662. else
  7663. function scale(p,s) return p,s end
  7664. end
  7665.  
  7666. local o = math.floor(size/4)
  7667. if size%2 == 0 then
  7668. local n = size/2-1
  7669. for i = 0,n do
  7670. local t = template:Clone()
  7671. local p,s = scale(transform(
  7672. UDim2.new(0,n-i,0,o+i),
  7673. UDim2.new(0,(i+1)*2,0,1)
  7674. ))
  7675. t.Position = p
  7676. t.Size = s
  7677. t.Parent = Frame
  7678. end
  7679. else
  7680. local n = (size-1)/2
  7681. for i = 0,n do
  7682. local t = template:Clone()
  7683. local p,s = scale(transform(
  7684. UDim2.new(0,n-i,0,o+i),
  7685. UDim2.new(0,i*2+1,0,1)
  7686. ))
  7687. t.Position = p
  7688. t.Size = s
  7689. t.Parent = Frame
  7690. end
  7691. end
  7692. if size%4 > 1 then
  7693. local t = template:Clone()
  7694. local p,s = scale(transform(
  7695. UDim2.new(0,0,0,size-o-1),
  7696. UDim2.new(0,size,0,1)
  7697. ))
  7698. t.Position = p
  7699. t.Size = s
  7700. t.Parent = Frame
  7701. end
  7702. return Frame
  7703. end
  7704.  
  7705. function GripGraphic(size,dir,spacing,scaled,template)
  7706. local Frame = Create('Frame',{
  7707. Name = "Grip Graphic";
  7708. BorderSizePixel = 0;
  7709. Size = UDim2.new(0,size.x,0,size.y);
  7710. Transparency = 1;
  7711. })
  7712. if not template then
  7713. template = Instance.new("Frame")
  7714. template.BorderSizePixel = 0
  7715. end
  7716.  
  7717. spacing = spacing or 2
  7718.  
  7719. local scale
  7720. if scaled then
  7721. function scale(p) return UDim2.new(p.X.Offset/size.x,0,p.Y.Offset/size.y,0) end
  7722. else
  7723. function scale(p) return p end
  7724. end
  7725.  
  7726. if dir == 'Vertical' then
  7727. for i=0,size.x-1,spacing do
  7728. local t = template:Clone()
  7729. t.Size = scale(UDim2.new(0,1,0,size.y))
  7730. t.Position = scale(UDim2.new(0,i,0,0))
  7731. t.Parent = Frame
  7732. end
  7733. elseif dir == nil or dir == 'Horizontal' then
  7734. for i=0,size.y-1,spacing do
  7735. local t = template:Clone()
  7736. t.Size = scale(UDim2.new(0,size.x,0,1))
  7737. t.Position = scale(UDim2.new(0,0,0,i))
  7738. t.Parent = Frame
  7739. end
  7740. end
  7741.  
  7742. return Frame
  7743. end
  7744.  
  7745. do
  7746. local mt = {
  7747. __index = {
  7748. GetScrollPercent = function(self)
  7749. return self.ScrollIndex/(self.TotalSpace-self.VisibleSpace)
  7750. end;
  7751. CanScrollDown = function(self)
  7752. return self.ScrollIndex + self.VisibleSpace < self.TotalSpace
  7753. end;
  7754. CanScrollUp = function(self)
  7755. return self.ScrollIndex > 0
  7756. end;
  7757. ScrollDown = function(self)
  7758. self.ScrollIndex = self.ScrollIndex + self.PageIncrement
  7759. self:Update()
  7760. end;
  7761. ScrollUp = function(self)
  7762. self.ScrollIndex = self.ScrollIndex - self.PageIncrement
  7763. self:Update()
  7764. end;
  7765. ScrollTo = function(self,index)
  7766. self.ScrollIndex = index
  7767. self:Update()
  7768. end;
  7769. SetScrollPercent = function(self,percent)
  7770. self.ScrollIndex = math.floor((self.TotalSpace - self.VisibleSpace)*percent + 0.5)
  7771. self:Update()
  7772. end;
  7773. };
  7774. }
  7775. mt.__index.CanScrollRight = mt.__index.CanScrollDown
  7776. mt.__index.CanScrollLeft = mt.__index.CanScrollUp
  7777. mt.__index.ScrollLeft = mt.__index.ScrollUp
  7778. mt.__index.ScrollRight = mt.__index.ScrollDown
  7779.  
  7780. function ScrollBar(horizontal)
  7781. -- create row scroll bar
  7782. local ScrollFrame = Create('Frame',{
  7783. Name = "ScrollFrame";
  7784. Position = horizontal and UDim2.new(0,0,1,-ScrollBarWidth) or UDim2.new(1,-ScrollBarWidth,0,0);
  7785. Size = horizontal and UDim2.new(1,0,0,ScrollBarWidth) or UDim2.new(0,ScrollBarWidth,1,0);
  7786. BackgroundTransparency = 1;
  7787. Create('ImageButton',{
  7788. Name = "ScrollDown";
  7789. Position = horizontal and UDim2.new(1,-ScrollBarWidth,0,0) or UDim2.new(0,0,1,-ScrollBarWidth);
  7790. Size = UDim2.new(0, ScrollBarWidth, 0, ScrollBarWidth);
  7791. BackgroundColor3 = ScrollStyles.Button;
  7792. BorderColor3 = ScrollStyles.Border;
  7793. --BorderSizePixel = 0;
  7794. });
  7795. Create('ImageButton',{
  7796. Name = "ScrollUp";
  7797. Size = UDim2.new(0, ScrollBarWidth, 0, ScrollBarWidth);
  7798. BackgroundColor3 = ScrollStyles.Button;
  7799. BorderColor3 = ScrollStyles.Border;
  7800. --BorderSizePixel = 0;
  7801. });
  7802. Create('ImageButton',{
  7803. Name = "ScrollBar";
  7804. Size = horizontal and UDim2.new(1,-ScrollBarWidth*2,1,0) or UDim2.new(1,0,1,-ScrollBarWidth*2);
  7805. Position = horizontal and UDim2.new(0,ScrollBarWidth,0,0) or UDim2.new(0,0,0,ScrollBarWidth);
  7806. AutoButtonColor = false;
  7807. BackgroundColor3 = Color3.new(0.94902, 0.94902, 0.94902);
  7808. BorderColor3 = ScrollStyles.Border;
  7809. --BorderSizePixel = 0;
  7810. Create('ImageButton',{
  7811. Name = "ScrollThumb";
  7812. AutoButtonColor = false;
  7813. Size = UDim2.new(0, ScrollBarWidth, 0, ScrollBarWidth);
  7814. BackgroundColor3 = ScrollStyles.Button;
  7815. BorderColor3 = ScrollStyles.Border;
  7816. --BorderSizePixel = 0;
  7817. });
  7818. });
  7819. })
  7820.  
  7821. local graphicTemplate = Create('Frame',{
  7822. Name="Graphic";
  7823. BorderSizePixel = 0;
  7824. BackgroundColor3 = ScrollStyles.Border;
  7825. })
  7826. local graphicSize = ScrollBarWidth/2
  7827.  
  7828. local ScrollDownFrame = ScrollFrame.ScrollDown
  7829. local ScrollDownGraphic = ArrowGraphic(graphicSize,horizontal and 'Right' or 'Down',true,graphicTemplate)
  7830. ScrollDownGraphic.Position = UDim2.new(0.5,-graphicSize/2,0.5,-graphicSize/2)
  7831. ScrollDownGraphic.Parent = ScrollDownFrame
  7832. local ScrollUpFrame = ScrollFrame.ScrollUp
  7833. local ScrollUpGraphic = ArrowGraphic(graphicSize,horizontal and 'Left' or 'Up',true,graphicTemplate)
  7834. ScrollUpGraphic.Position = UDim2.new(0.5,-graphicSize/2,0.5,-graphicSize/2)
  7835. ScrollUpGraphic.Parent = ScrollUpFrame
  7836. local ScrollBarFrame = ScrollFrame.ScrollBar
  7837. local ScrollThumbFrame = ScrollBarFrame.ScrollThumb
  7838. do
  7839. local size = ScrollBarWidth*3/8
  7840. local Decal = GripGraphic(Vector2.new(size,size),horizontal and 'Vertical' or 'Horizontal',2,graphicTemplate)
  7841. Decal.Position = UDim2.new(0.5,-size/2,0.5,-size/2)
  7842. Decal.Parent = ScrollThumbFrame
  7843. end
  7844.  
  7845. local MouseDrag = Create('ImageButton',{
  7846. Name = "MouseDrag";
  7847. Position = UDim2.new(-0.25,0,-0.25,0);
  7848. Size = UDim2.new(1.5,0,1.5,0);
  7849. Transparency = 1;
  7850. AutoButtonColor = false;
  7851. Active = true;
  7852. ZIndex = 10;
  7853. })
  7854.  
  7855. local Class = setmetatable({
  7856. GUI = ScrollFrame;
  7857. ScrollIndex = 0;
  7858. VisibleSpace = 0;
  7859. TotalSpace = 0;
  7860. PageIncrement = 1;
  7861. },mt)
  7862.  
  7863. local UpdateScrollThumb
  7864. if horizontal then
  7865. function UpdateScrollThumb()
  7866. ScrollThumbFrame.Size = UDim2.new(Class.VisibleSpace/Class.TotalSpace,0,0,ScrollBarWidth)
  7867. if ScrollThumbFrame.AbsoluteSize.x < ScrollBarWidth then
  7868. ScrollThumbFrame.Size = UDim2.new(0,ScrollBarWidth,0,ScrollBarWidth)
  7869. end
  7870. local barSize = ScrollBarFrame.AbsoluteSize.x
  7871. ScrollThumbFrame.Position = UDim2.new(Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.x)/barSize,0,0,0)
  7872. end
  7873. else
  7874. function UpdateScrollThumb()
  7875. ScrollThumbFrame.Size = UDim2.new(0,ScrollBarWidth,Class.VisibleSpace/Class.TotalSpace,0)
  7876. if ScrollThumbFrame.AbsoluteSize.y < ScrollBarWidth then
  7877. ScrollThumbFrame.Size = UDim2.new(0,ScrollBarWidth,0,ScrollBarWidth)
  7878. end
  7879. local barSize = ScrollBarFrame.AbsoluteSize.y
  7880. ScrollThumbFrame.Position = UDim2.new(0,0,Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.y)/barSize,0)
  7881. end
  7882. end
  7883.  
  7884. local lastDown
  7885. local lastUp
  7886. local scrollStyle = {BackgroundColor3=ScrollStyles.Border,BackgroundTransparency=0}
  7887. local scrollStyle_ds = {BackgroundColor3=ScrollStyles.Border,BackgroundTransparency=0.7}
  7888.  
  7889. local function Update()
  7890. local t = Class.TotalSpace
  7891. local v = Class.VisibleSpace
  7892. local s = Class.ScrollIndex
  7893. if v <= t then
  7894. if s > 0 then
  7895. if s + v > t then
  7896. Class.ScrollIndex = t - v
  7897. end
  7898. else
  7899. Class.ScrollIndex = 0
  7900. end
  7901. else
  7902. Class.ScrollIndex = 0
  7903. end
  7904.  
  7905. if Class.UpdateCallback then
  7906. if Class.UpdateCallback(Class) == false then
  7907. return
  7908. end
  7909. end
  7910.  
  7911. local down = Class:CanScrollDown()
  7912. local up = Class:CanScrollUp()
  7913. if down ~= lastDown then
  7914. lastDown = down
  7915. ScrollDownFrame.Active = down
  7916. ScrollDownFrame.AutoButtonColor = down
  7917. local children = ScrollDownGraphic:GetChildren()
  7918. local style = down and scrollStyle or scrollStyle_ds
  7919. for i = 1,#children do
  7920. Create(children[i],style)
  7921. end
  7922. end
  7923. if up ~= lastUp then
  7924. lastUp = up
  7925. ScrollUpFrame.Active = up
  7926. ScrollUpFrame.AutoButtonColor = up
  7927. local children = ScrollUpGraphic:GetChildren()
  7928. local style = up and scrollStyle or scrollStyle_ds
  7929. for i = 1,#children do
  7930. Create(children[i],style)
  7931. end
  7932. end
  7933. ScrollThumbFrame.Visible = down or up
  7934. UpdateScrollThumb()
  7935. end
  7936. Class.Update = Update
  7937.  
  7938. SetZIndexOnChanged(ScrollFrame)
  7939.  
  7940. local scrollEventID = 0
  7941. ScrollDownFrame.MouseButton1Down:connect(function()
  7942. scrollEventID = tick()
  7943. local current = scrollEventID
  7944. local up_con
  7945. up_con = MouseDrag.MouseButton1Up:connect(function()
  7946. scrollEventID = tick()
  7947. MouseDrag.Parent = nil
  7948. ResetButtonColor(ScrollDownFrame)
  7949. up_con:disconnect(); drag = nil
  7950. end)
  7951. MouseDrag.Parent = GetScreen(ScrollFrame)
  7952. Class:ScrollDown()
  7953. wait(0.2) -- delay before auto scroll
  7954. while scrollEventID == current do
  7955. Class:ScrollDown()
  7956. if not Class:CanScrollDown() then break end
  7957. wait()
  7958. end
  7959. end)
  7960.  
  7961. ScrollDownFrame.MouseButton1Up:connect(function()
  7962. scrollEventID = tick()
  7963. end)
  7964.  
  7965. ScrollUpFrame.MouseButton1Down:connect(function()
  7966. scrollEventID = tick()
  7967. local current = scrollEventID
  7968. local up_con
  7969. up_con = MouseDrag.MouseButton1Up:connect(function()
  7970. scrollEventID = tick()
  7971. MouseDrag.Parent = nil
  7972. ResetButtonColor(ScrollUpFrame)
  7973. up_con:disconnect(); drag = nil
  7974. end)
  7975. MouseDrag.Parent = GetScreen(ScrollFrame)
  7976. Class:ScrollUp()
  7977. wait(0.2)
  7978. while scrollEventID == current do
  7979. Class:ScrollUp()
  7980. if not Class:CanScrollUp() then break end
  7981. wait()
  7982. end
  7983. end)
  7984.  
  7985. ScrollUpFrame.MouseButton1Up:connect(function()
  7986. scrollEventID = tick()
  7987. end)
  7988.  
  7989. if horizontal then
  7990. ScrollBarFrame.MouseButton1Down:connect(function(x,y)
  7991. scrollEventID = tick()
  7992. local current = scrollEventID
  7993. local up_con
  7994. up_con = MouseDrag.MouseButton1Up:connect(function()
  7995. scrollEventID = tick()
  7996. MouseDrag.Parent = nil
  7997. ResetButtonColor(ScrollUpFrame)
  7998. up_con:disconnect(); drag = nil
  7999. end)
  8000. MouseDrag.Parent = GetScreen(ScrollFrame)
  8001. if x > ScrollThumbFrame.AbsolutePosition.x then
  8002. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  8003. wait(0.2)
  8004. while scrollEventID == current do
  8005. if x < ScrollThumbFrame.AbsolutePosition.x + ScrollThumbFrame.AbsoluteSize.x then break end
  8006. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  8007. wait()
  8008. end
  8009. else
  8010. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  8011. wait(0.2)
  8012. while scrollEventID == current do
  8013. if x > ScrollThumbFrame.AbsolutePosition.x then break end
  8014. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  8015. wait()
  8016. end
  8017. end
  8018. end)
  8019. else
  8020. ScrollBarFrame.MouseButton1Down:connect(function(x,y)
  8021. scrollEventID = tick()
  8022. local current = scrollEventID
  8023. local up_con
  8024. up_con = MouseDrag.MouseButton1Up:connect(function()
  8025. scrollEventID = tick()
  8026. MouseDrag.Parent = nil
  8027. ResetButtonColor(ScrollUpFrame)
  8028. up_con:disconnect(); drag = nil
  8029. end)
  8030. MouseDrag.Parent = GetScreen(ScrollFrame)
  8031. if y > ScrollThumbFrame.AbsolutePosition.y then
  8032. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  8033. wait(0.2)
  8034. while scrollEventID == current do
  8035. if y < ScrollThumbFrame.AbsolutePosition.y + ScrollThumbFrame.AbsoluteSize.y then break end
  8036. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  8037. wait()
  8038. end
  8039. else
  8040. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  8041. wait(0.2)
  8042. while scrollEventID == current do
  8043. if y > ScrollThumbFrame.AbsolutePosition.y then break end
  8044. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  8045. wait()
  8046. end
  8047. end
  8048. end)
  8049. end
  8050.  
  8051. if horizontal then
  8052. ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
  8053. scrollEventID = tick()
  8054. local mouse_offset = x - ScrollThumbFrame.AbsolutePosition.x
  8055. local drag_con
  8056. local up_con
  8057. drag_con = MouseDrag.MouseMoved:connect(function(x,y)
  8058. local bar_abs_pos = ScrollBarFrame.AbsolutePosition.x
  8059. local bar_drag = ScrollBarFrame.AbsoluteSize.x - ScrollThumbFrame.AbsoluteSize.x
  8060. local bar_abs_one = bar_abs_pos + bar_drag
  8061. x = x - mouse_offset
  8062. x = x < bar_abs_pos and bar_abs_pos or x > bar_abs_one and bar_abs_one or x
  8063. x = x - bar_abs_pos
  8064. Class:SetScrollPercent(x/(bar_drag))
  8065. end)
  8066. up_con = MouseDrag.MouseButton1Up:connect(function()
  8067. scrollEventID = tick()
  8068. MouseDrag.Parent = nil
  8069. ResetButtonColor(ScrollThumbFrame)
  8070. drag_con:disconnect(); drag_con = nil
  8071. up_con:disconnect(); drag = nil
  8072. end)
  8073. MouseDrag.Parent = GetScreen(ScrollFrame)
  8074. end)
  8075. else
  8076. ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
  8077. scrollEventID = tick()
  8078. local mouse_offset = y - ScrollThumbFrame.AbsolutePosition.y
  8079. local drag_con
  8080. local up_con
  8081. drag_con = MouseDrag.MouseMoved:connect(function(x,y)
  8082. local bar_abs_pos = ScrollBarFrame.AbsolutePosition.y
  8083. local bar_drag = ScrollBarFrame.AbsoluteSize.y - ScrollThumbFrame.AbsoluteSize.y
  8084. local bar_abs_one = bar_abs_pos + bar_drag
  8085. y = y - mouse_offset
  8086. y = y < bar_abs_pos and bar_abs_pos or y > bar_abs_one and bar_abs_one or y
  8087. y = y - bar_abs_pos
  8088. Class:SetScrollPercent(y/(bar_drag))
  8089. end)
  8090. up_con = MouseDrag.MouseButton1Up:connect(function()
  8091. scrollEventID = tick()
  8092. MouseDrag.Parent = nil
  8093. ResetButtonColor(ScrollThumbFrame)
  8094. drag_con:disconnect(); drag_con = nil
  8095. up_con:disconnect(); drag = nil
  8096. end)
  8097. MouseDrag.Parent = GetScreen(ScrollFrame)
  8098. end)
  8099. end
  8100.  
  8101. function Class:Destroy()
  8102. ScrollFrame:Destroy()
  8103. MouseDrag:Destroy()
  8104. for k in pairs(Class) do
  8105. Class[k] = nil
  8106. end
  8107. setmetatable(Class,nil)
  8108. end
  8109.  
  8110. Update()
  8111.  
  8112. return Class
  8113. end
  8114. end
  8115.  
  8116. -- End Scrollbar
  8117.  
  8118. local scrollBar = ScrollBar(false)
  8119. scrollBar.PageIncrement = 16
  8120. Create(scrollBar.GUI,{
  8121. Position = UDim2.new(1,0,0,0);
  8122. Size = UDim2.new(0,ScrollBarWidth,1,0);
  8123. Parent = editorGrid;
  8124. })
  8125.  
  8126. local scrollBarH = ScrollBar(true)
  8127. scrollBarH.PageIncrement = 8
  8128. Create(scrollBarH.GUI,{
  8129. Position = UDim2.new(0,0,1,0);
  8130. Size = UDim2.new(1,0,0,ScrollBarWidth);
  8131. Parent = editorGrid;
  8132. })
  8133.  
  8134. local entries = {}
  8135.  
  8136. local grid = {}
  8137.  
  8138. local count = 1
  8139. local xCount = 1
  8140.  
  8141. local lineSpan = 0
  8142.  
  8143. for i = 0,490,8 do
  8144. local newRow = {}
  8145. for j = 0,390,16 do
  8146. local cellText = Instance.new("TextLabel",editorGrid)
  8147. cellText.BackgroundTransparency = 1
  8148. cellText.BorderSizePixel = 0
  8149. cellText.Text = ""
  8150. cellText.Position = UDim2.new(0,i,0,j)
  8151. cellText.Size = UDim2.new(0,8,0,16)
  8152. cellText.Font = Enum.Font.SourceSans
  8153. cellText.FontSize = Enum.FontSize.Size18
  8154. table.insert(newRow,cellText)
  8155. xCount = xCount + 1
  8156. end
  8157. table.insert(grid,newRow)
  8158. count = count + 1
  8159. xCount = 1
  8160. end
  8161.  
  8162. local syntaxHighlightList = {
  8163. {["Keyword"] = "for", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  8164. {["Keyword"] = "local", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  8165. {["Keyword"] = "if", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  8166. {["Keyword"] = "then", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  8167. {["Keyword"] = "do", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  8168. {["Keyword"] = "while", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  8169. {["Keyword"] = "end", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  8170. {["Keyword"] = "function", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  8171. {["Keyword"] = "string", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  8172. {["Keyword"] = "table", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  8173. {["Keyword"] = "game", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  8174. {["Keyword"] = "workspace", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  8175. {["Keyword"] = "return", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  8176. {["Keyword"] = "break", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  8177. {["Keyword"] = "elseif", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  8178. {["Keyword"] = "in", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  8179. {["Keyword"] = "pairs", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  8180. {["Keyword"] = "ipairs", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true}
  8181. }
  8182.  
  8183. function checkMouseInGui(gui)
  8184. if gui == nil then return false end
  8185. local plrMouse = game:GetService("Players").LocalPlayer:GetMouse()
  8186. local guiPosition = gui.AbsolutePosition
  8187. local guiSize = gui.AbsoluteSize
  8188.  
  8189. if plrMouse.X >= guiPosition.x and plrMouse.X <= guiPosition.x + guiSize.x and plrMouse.Y >= guiPosition.y and plrMouse.Y <= guiPosition.y + guiSize.y then
  8190. return true
  8191. else
  8192. return false
  8193. end
  8194. end
  8195.  
  8196. function AddZeros(num,reach)
  8197. local toConvert = tostring(num)
  8198. while #toConvert < reach do
  8199. toConvert = " "..toConvert
  8200. end
  8201. return toConvert
  8202. end
  8203.  
  8204. function buildScript(source,xOff,yOff,override)
  8205. local buildingRows = true
  8206. local buildScr = source
  8207.  
  8208. local totalLines = 0
  8209.  
  8210. --print(xOff,yOff)
  8211.  
  8212. if currentSource ~= source then
  8213. currentSource = source
  8214. end
  8215.  
  8216. if override then
  8217. currentSource = source
  8218. entries = {}
  8219. while buildingRows do
  8220. local x,y = string.find(buildScr,"\n")
  8221. if x and y then
  8222. table.insert(entries,string.sub(buildScr,1,y))
  8223. buildScr = string.sub(buildScr,y+1,string.len(buildScr))
  8224. else
  8225. buildingRows = false
  8226. table.insert(entries,buildScr)
  8227. end
  8228. end
  8229. end
  8230.  
  8231. totalLines = #entries
  8232. lineSpan = #tostring(totalLines)
  8233.  
  8234. if lineSpan == 1 then lineSpan = 2 end
  8235.  
  8236. local currentRow = 1
  8237. local currentColumn = 2 + lineSpan
  8238.  
  8239. local colorTime = 0
  8240. local colorReplace = nil
  8241.  
  8242. local inString = false
  8243.  
  8244. local workingEntries = entries
  8245.  
  8246. --[[
  8247. for i,v in pairs(entries) do
  8248. table.insert(workingEntries,v)
  8249. end
  8250.  
  8251. for i = 1,yOff do
  8252. table.remove(workingEntries,1)
  8253. end
  8254. --]]
  8255.  
  8256. local delayance = xOff
  8257.  
  8258. for i = 1,#grid do
  8259. for j = 1,#grid[i] do
  8260. if i <= lineSpan then
  8261. local newNum = AddZeros(yOff + j,lineSpan)
  8262. local newDigit = string.sub(newNum,i,i)
  8263. if newDigit == " " then
  8264. grid[i][j].Text = ""
  8265. else
  8266. grid[i][j].Text = newDigit
  8267. end
  8268. grid[i][j].BackgroundTransparency = 0
  8269. grid[i][j].BackgroundColor3 = Color3.new(163/255, 162/255, 165/255)
  8270. --grid[i][j].Font = Enum.Font.SourceSansBold
  8271. elseif i == lineSpan + 1 then
  8272. grid[i][j].Text = ""
  8273. grid[i][j].BackgroundTransparency = 0
  8274. grid[i][j].BackgroundColor3 = Color3.new(200/255, 200/255, 200/255)
  8275. --grid[i][j].Font = Enum.Font.SourceSans
  8276. else
  8277. grid[i][j].Text = ""
  8278. grid[i][j].BackgroundTransparency = 1
  8279. --grid[i][j].Font = Enum.Font.SourceSans
  8280. end
  8281. end
  8282. end
  8283.  
  8284. while true do
  8285. if currentRow > #workingEntries or currentRow > #grid[1] then break end
  8286. local entry = workingEntries[currentRow+yOff]
  8287. while string.len(entry) > 0 do
  8288. if string.sub(entry,1,1) == "\t" then entry = " "..string.sub(entry,2) end
  8289.  
  8290. if currentColumn > #grid then break end
  8291.  
  8292. if delayance == 0 then
  8293. grid[currentColumn][currentRow].Text = string.sub(entry,1,1)
  8294. end
  8295.  
  8296. -- Coloring
  8297.  
  8298. if not inString then
  8299. for i,v in pairs(syntaxHighlightList) do
  8300. if string.sub(entry,1,string.len(v["Keyword"])) == v["Keyword"] then
  8301. if v["Independent"] then
  8302. local outCheck = string.len(v["Keyword"])+1
  8303. local outEntry = string.sub(entry,outCheck,outCheck)
  8304. if not string.find(outEntry,"%w") then
  8305. colorTime = string.len(v["Keyword"])
  8306. colorReplace = v["Color"]
  8307. end
  8308. else
  8309. colorTime = string.len(v["Keyword"])
  8310. colorReplace = v["Color"]
  8311. end
  8312. end
  8313. end
  8314. end
  8315.  
  8316. if string.sub(entry,1,1) == "\"" and string.match(entry,"\".+\"") then
  8317. inString = true
  8318. colorTime = string.len(string.match(entry,"\".+\""))
  8319. colorReplace = Color3.new(170/255, 0, 1)
  8320. end
  8321.  
  8322. if colorTime > 0 then
  8323. colorTime = colorTime - 1
  8324. grid[currentColumn][currentRow].TextColor3 = colorReplace
  8325. if colorTime == 0 then inString = false end
  8326. else
  8327. grid[currentColumn][currentRow].TextColor3 = Color3.new(0,0,0)
  8328. inString = false
  8329. end
  8330.  
  8331. if delayance == 0 then
  8332. currentColumn = currentColumn + 1
  8333. else
  8334. delayance = delayance - 1
  8335. end
  8336. entry = string.sub(entry,2,string.len(entry))
  8337. end
  8338. currentRow = currentRow + 1
  8339. currentColumn = 2 + lineSpan
  8340. colorTime = 0
  8341. delayance = xOff
  8342. inString = false
  8343. end
  8344. end
  8345.  
  8346. function scrollBar.UpdateCallback(self)
  8347. scrollBar.TotalSpace = #entries * 16
  8348. scrollBar.VisibleSpace = editorGrid.AbsoluteSize.Y
  8349. buildScript(currentSource,math.floor(scrollBarH.ScrollIndex/8),math.floor(scrollBar.ScrollIndex/16))
  8350. end
  8351.  
  8352. function scrollBarH.UpdateCallback(self)
  8353. scrollBarH.TotalSpace = (getLongestEntry(entries) + 1 + lineSpan) * 8
  8354. scrollBarH.VisibleSpace = editorGrid.AbsoluteSize.X
  8355. buildScript(currentSource,math.floor(scrollBarH.ScrollIndex/8),math.floor(scrollBar.ScrollIndex/16))
  8356. end
  8357.  
  8358. function getLongestEntry(tab)
  8359. local longest = 0
  8360. for i,v in pairs(tab) do
  8361. if string.len(v) > longest then
  8362. longest = string.len(v)
  8363. end
  8364. end
  8365. return longest
  8366. end
  8367.  
  8368. function decompileS(obj)
  8369. local src = "print(\"Hello world!\")"
  8370. pcall(function()
  8371. if obj.Source ~= "" then
  8372. src = obj.Source
  8373. else
  8374. src = decompile(obj)
  8375. end
  8376. end)
  8377. return src
  8378. end
  8379.  
  8380. function openScript(scrObj)
  8381. if scrObj:IsA("LocalScript") then
  8382. scrObj.Archivable = true
  8383. scrObj = scrObj:Clone()
  8384. scrObj.Disabled = true
  8385. end
  8386.  
  8387. local scrName = scrObj.Name
  8388. local scrSource = decompileS(scrObj)
  8389.  
  8390. table.insert(memoryScripts,{Name = scrName,Source = scrSource})
  8391.  
  8392. local newTab = entryTemplate:Clone()
  8393. newTab.Button.Text = scrName
  8394. newTab.Position = UDim2.new(0,#scriptBar:GetChildren() * 100,0,0)
  8395. newTab.Visible = true
  8396.  
  8397. newTab.Button.MouseButton1Down:connect(function()
  8398. for i,v in pairs(scriptBar:GetChildren()) do
  8399. if v == newTab then
  8400. editingIndex = i
  8401. buildScript(memoryScripts[i].Source,0,0,true)
  8402. scrollBar:ScrollTo(1)
  8403. scrollBar:Update()
  8404. scrollBarH:ScrollTo(1)
  8405. scrollBarH:Update()
  8406. end
  8407. end
  8408. end)
  8409.  
  8410. newTab.Close.MouseButton1Click:connect(function()
  8411. for i,v in pairs(scriptBar:GetChildren()) do
  8412. if v == newTab then
  8413. table.remove(memoryScripts,i)
  8414. if editingIndex == i then
  8415. editingIndex = #memoryScripts
  8416. if editingIndex > 0 then
  8417. buildScript(memoryScripts[#memoryScripts].Source,0,0,true)
  8418. else
  8419. buildScript("",0,0,true)
  8420. end
  8421. end
  8422.  
  8423. scrollBar:ScrollTo(1)
  8424. scrollBar:Update()
  8425. scrollBarH:ScrollTo(1)
  8426. scrollBarH:Update()
  8427.  
  8428. for i2 = i,#scriptBar:GetChildren() do
  8429. scriptBar:GetChildren()[i2].Position = scriptBar:GetChildren()[i2].Position + UDim2.new(0,-100,0,0)
  8430. end
  8431. if editingIndex > i then
  8432. editingIndex = editingIndex - 1
  8433. end
  8434. newTab:Destroy()
  8435. end
  8436. end
  8437. end)
  8438.  
  8439. editingIndex = #memoryScripts
  8440. buildScript(scrSource,0,0,true)
  8441.  
  8442. newTab.Parent = scriptBar
  8443. end
  8444.  
  8445. function updateScriptBar()
  8446. local entryCount = 0
  8447.  
  8448. scriptBarLeft.Active = false
  8449. scriptBarLeft.AutoButtonColor = false
  8450. for i,v in pairs(scriptBarLeft["Arrow Graphic"]:GetChildren()) do
  8451. v.BackgroundTransparency = 0.7
  8452. end
  8453. scriptBarRight.Active = false
  8454. scriptBarRight.AutoButtonColor = false
  8455. for i,v in pairs(scriptBarRight["Arrow Graphic"]:GetChildren()) do
  8456. v.BackgroundTransparency = 0.7
  8457. end
  8458. for i,v in pairs(scriptBar:GetChildren()) do
  8459. if v.Position.X.Offset < 0 then
  8460. scriptBarLeft.Active = true
  8461. scriptBarLeft.AutoButtonColor = true
  8462. for i,v in pairs(scriptBarLeft["Arrow Graphic"]:GetChildren()) do
  8463. v.BackgroundTransparency = 0
  8464. end
  8465. elseif v.Position.X.Offset >= 0 then
  8466. entryCount = entryCount + 1
  8467. if entryCount == 5 then
  8468. scriptBarRight.Active = true
  8469. scriptBarRight.AutoButtonColor = true
  8470. for i,v in pairs(scriptBarRight["Arrow Graphic"]:GetChildren()) do
  8471. v.BackgroundTransparency = 0
  8472. end
  8473. end
  8474. end
  8475. end
  8476. end
  8477.  
  8478. scriptBar.ChildAdded:connect(updateScriptBar)
  8479. scriptBar.ChildRemoved:connect(updateScriptBar)
  8480.  
  8481. scriptBarLeft.MouseButton1Click:connect(function()
  8482. if scriptBarLeft.Active == false then return end
  8483. for i,v in pairs(scriptBar:GetChildren()) do
  8484. v.Position = v.Position + UDim2.new(0,100,0,0)
  8485. end
  8486. updateScriptBar()
  8487. end)
  8488.  
  8489. scriptBarRight.MouseButton1Click:connect(function()
  8490. if scriptBarRight.Active == false then return end
  8491. for i,v in pairs(scriptBar:GetChildren()) do
  8492. v.Position = v.Position + UDim2.new(0,-100,0,0)
  8493. end
  8494. updateScriptBar()
  8495. end)
  8496.  
  8497. mouse.Button1Down:connect(function()
  8498. if checkMouseInGui(editorGrid) then
  8499. --print("LETS EDIT!")
  8500. end
  8501. end)
  8502.  
  8503. openEvent.Event:connect(function(...)
  8504. top.Visible = true
  8505. local args = {...}
  8506. if #args > 0 then
  8507. openScript(args[1])
  8508. end
  8509. end)
  8510.  
  8511. clipboardButton.MouseButton1Click:connect(function()
  8512. if Clipboard and Clipboard.set then
  8513. Clipboard.set(currentSource)
  8514. elseif CopyString then
  8515. CopyString(currentSource)
  8516. end
  8517. end)
  8518.  
  8519. closeButton.MouseButton1Click:connect(function()
  8520. top.Visible = false
  8521. end)
  8522.  
  8523. --[[
  8524. local scr = script.Parent:WaitForChild("Scr")
  8525. local scr2 = script.Parent:WaitForChild("Scr2")
  8526. local scr3 = script.Parent:WaitForChild("Scr3")
  8527. local scr4 = script.Parent:WaitForChild("TOS")
  8528. local scr5 = script.Parent:WaitForChild("HW")
  8529. --]]
  8530.  
  8531. buildScript("",0,0,true)
  8532. --[[
  8533. openScript(scr)
  8534. openScript(scr2)
  8535. openScript(scr3)
  8536. openScript(scr4)
  8537. openScript(scr5)
  8538. --]]
  8539.  
  8540. scrollBar:Update()
  8541. scrollBarH:Update()
  8542. end))
  8543. TextButton116.Name = "Close"
  8544. TextButton116.Parent = Frame92
  8545. TextButton116.Position = UDim2.new(1, -20, 0, 0)
  8546. TextButton116.Transparency = 1
  8547. TextButton116.Size = UDim2.new(0, 20, 0, 20)
  8548. TextButton116.BackgroundColor = BrickColor.new("Institutional white")
  8549. TextButton116.BackgroundColor3 = Color3.new(1, 1, 1)
  8550. TextButton116.BackgroundTransparency = 1
  8551. TextButton116.BorderColor = BrickColor.new("Really black")
  8552. TextButton116.BorderColor3 = Color3.new(0, 0, 0)
  8553. TextButton116.ZIndex = 5
  8554. TextButton116.Font = Enum.Font.SourceSans
  8555. TextButton116.FontSize = Enum.FontSize.Size14
  8556. TextButton116.Text = "X"
  8557. TextButton116.TextSize = 14
  8558. Frame117.Name = "IntroFrame"
  8559. Frame117.Parent = ScreenGui0
  8560. Frame117.Position = UDim2.new(1, 30, 0, 0)
  8561. Frame117.Size = UDim2.new(0, 301, 1, 0)
  8562. Frame117.BackgroundColor = BrickColor.new("White")
  8563. Frame117.BackgroundColor3 = Color3.new(0.960784, 0.960784, 0.960784)
  8564. Frame117.BorderSizePixel = 0
  8565. Frame117.ZIndex = 2
  8566. Frame118.Name = "Main"
  8567. Frame118.Parent = Frame117
  8568. Frame118.Position = UDim2.new(0, -30, 0, 0)
  8569. Frame118.Size = UDim2.new(0, 30, 0, 90)
  8570. Frame118.BackgroundColor = BrickColor.new("White")
  8571. Frame118.BackgroundColor3 = Color3.new(0.960784, 0.960784, 0.960784)
  8572. Frame118.BorderSizePixel = 0
  8573. Frame118.ZIndex = 2
  8574. ImageLabel119.Name = "Slant"
  8575. ImageLabel119.Parent = Frame117
  8576. ImageLabel119.Position = UDim2.new(0, -30, 0, 90)
  8577. ImageLabel119.Rotation = 180
  8578. ImageLabel119.Transparency = 1
  8579. ImageLabel119.Size = UDim2.new(0, 30, 0, 30)
  8580. ImageLabel119.BackgroundColor = BrickColor.new("Institutional white")
  8581. ImageLabel119.BackgroundColor3 = Color3.new(1, 1, 1)
  8582. ImageLabel119.BackgroundTransparency = 1
  8583. ImageLabel119.ZIndex = 2
  8584. ImageLabel119.Image = "rbxassetid://1513966937"
  8585. ImageLabel119.ImageColor3 = Color3.new(0.960784, 0.960784, 0.960784)
  8586. Frame120.Name = "Main"
  8587. Frame120.Parent = Frame117
  8588. Frame120.Position = UDim2.new(0, -30, 0, 0)
  8589. Frame120.Size = UDim2.new(0, 30, 0, 90)
  8590. Frame120.BackgroundColor = BrickColor.new("White")
  8591. Frame120.BackgroundColor3 = Color3.new(0.960784, 0.960784, 0.960784)
  8592. Frame120.BorderSizePixel = 0
  8593. Frame120.ZIndex = 2
  8594. ImageLabel121.Name = "Sad"
  8595. ImageLabel121.Parent = Frame117
  8596. ImageLabel121.Position = UDim2.new(0, 50, 1, -250)
  8597. ImageLabel121.Transparency = 1
  8598. ImageLabel121.Size = UDim2.new(0, 200, 0, 200)
  8599. ImageLabel121.BackgroundColor = BrickColor.new("Institutional white")
  8600. ImageLabel121.BackgroundColor3 = Color3.new(1, 1, 1)
  8601. ImageLabel121.BackgroundTransparency = 1
  8602. ImageLabel121.ZIndex = 2
  8603. ImageLabel121.Image = "rbxassetid://483437370"
  8604. ImageLabel121.ImageColor3 = Color3.new(0.960784, 0.960784, 0.960784)
  8605. TextLabel122.Name = "Creator"
  8606. TextLabel122.Parent = Frame117
  8607. TextLabel122.Position = UDim2.new(0, 80, 0, 300)
  8608. TextLabel122.Transparency = 1
  8609. TextLabel122.Size = UDim2.new(0, 140, 0, 30)
  8610. TextLabel122.BackgroundColor = BrickColor.new("Institutional white")
  8611. TextLabel122.BackgroundColor3 = Color3.new(1, 1, 1)
  8612. TextLabel122.BackgroundTransparency = 1
  8613. TextLabel122.ZIndex = 2
  8614. TextLabel122.Font = Enum.Font.SourceSansBold
  8615. TextLabel122.FontSize = Enum.FontSize.Size28
  8616. TextLabel122.Text = "By Moon"
  8617. TextLabel122.TextSize = 28
  8618. TextLabel122.TextWrap = true
  8619. TextLabel122.TextWrapped = true
  8620. TextLabel123.Name = "Title"
  8621. TextLabel123.Parent = Frame117
  8622. TextLabel123.Position = UDim2.new(0, 100, 0, 150)
  8623. TextLabel123.Transparency = 1
  8624. TextLabel123.Size = UDim2.new(0, 100, 0, 60)
  8625. TextLabel123.BackgroundColor = BrickColor.new("Institutional white")
  8626. TextLabel123.BackgroundColor3 = Color3.new(1, 1, 1)
  8627. TextLabel123.BackgroundTransparency = 1
  8628. TextLabel123.ZIndex = 2
  8629. TextLabel123.Font = Enum.Font.SourceSansBold
  8630. TextLabel123.FontSize = Enum.FontSize.Size60
  8631. TextLabel123.Text = "DEX"
  8632. TextLabel123.TextSize = 60
  8633. TextLabel123.TextWrap = true
  8634. TextLabel123.TextWrapped = true
  8635. TextLabel124.Name = "Version"
  8636. TextLabel124.Parent = Frame117
  8637. TextLabel124.Position = UDim2.new(0, 100, 0, 210)
  8638. TextLabel124.Transparency = 1
  8639. TextLabel124.Size = UDim2.new(0, 100, 0, 30)
  8640. TextLabel124.BackgroundColor = BrickColor.new("Institutional white")
  8641. TextLabel124.BackgroundColor3 = Color3.new(1, 1, 1)
  8642. TextLabel124.BackgroundTransparency = 1
  8643. TextLabel124.ZIndex = 2
  8644. TextLabel124.Font = Enum.Font.SourceSansBold
  8645. TextLabel124.FontSize = Enum.FontSize.Size28
  8646. TextLabel124.Text = "v3"
  8647. TextLabel124.TextSize = 28
  8648. TextLabel124.TextWrap = true
  8649. TextLabel124.TextWrapped = true
  8650. Frame125.Name = "SaveMapWindow"
  8651. Frame125.Parent = ScreenGui0
  8652. Frame125.Position = UDim2.new(1, 0, 0, 0)
  8653. Frame125.Transparency = 0.10000000149012
  8654. Frame125.Size = UDim2.new(0, 300, 1, 0)
  8655. Frame125.BackgroundColor = BrickColor.new("Institutional white")
  8656. Frame125.BackgroundColor3 = Color3.new(1, 1, 1)
  8657. Frame125.BackgroundTransparency = 0.10000000149012
  8658. Frame125.BorderColor = BrickColor.new("Light grey")
  8659. Frame125.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
  8660. Frame125.BorderSizePixel = 0
  8661. Frame126.Name = "Header"
  8662. Frame126.Parent = Frame125
  8663. Frame126.Size = UDim2.new(1, 0, 0, 17)
  8664. Frame126.BackgroundColor = BrickColor.new("Lily white")
  8665. Frame126.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
  8666. Frame126.BorderColor = BrickColor.new("Sand violet metallic")
  8667. Frame126.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  8668. Frame126.BorderSizePixel = 0
  8669. TextLabel127.Parent = Frame126
  8670. TextLabel127.Position = UDim2.new(0, 4, 0, 0)
  8671. TextLabel127.Transparency = 1
  8672. TextLabel127.Size = UDim2.new(1, -4, 1, 0)
  8673. TextLabel127.BackgroundTransparency = 1
  8674. TextLabel127.BorderSizePixel = 0
  8675. TextLabel127.Font = Enum.Font.SourceSans
  8676. TextLabel127.FontSize = Enum.FontSize.Size14
  8677. TextLabel127.Text = "Map Downloader"
  8678. TextLabel127.TextColor = BrickColor.new("Really black")
  8679. TextLabel127.TextColor3 = Color3.new(0, 0, 0)
  8680. TextLabel127.TextSize = 14
  8681. TextLabel127.TextXAlignment = Enum.TextXAlignment.Left
  8682. Frame128.Name = "MapSettings"
  8683. Frame128.Parent = Frame125
  8684. Frame128.Position = UDim2.new(0, 0, 0, 200)
  8685. Frame128.Transparency = 1
  8686. Frame128.Size = UDim2.new(1, 0, 0, 240)
  8687. Frame128.BackgroundColor = BrickColor.new("Institutional white")
  8688. Frame128.BackgroundColor3 = Color3.new(1, 1, 1)
  8689. Frame128.BackgroundTransparency = 1
  8690. Frame129.Name = "Terrain"
  8691. Frame129.Parent = Frame128
  8692. Frame129.Position = UDim2.new(0, 0, 0, 60)
  8693. Frame129.Transparency = 1
  8694. Frame129.Size = UDim2.new(1, 0, 0, 60)
  8695. Frame129.BackgroundColor = BrickColor.new("Institutional white")
  8696. Frame129.BackgroundColor3 = Color3.new(1, 1, 1)
  8697. Frame129.BackgroundTransparency = 1
  8698. TextLabel130.Name = "SName"
  8699. TextLabel130.Parent = Frame129
  8700. TextLabel130.Position = UDim2.new(0, 10, 0, 0)
  8701. TextLabel130.Transparency = 1
  8702. TextLabel130.Size = UDim2.new(1, -20, 0, 30)
  8703. TextLabel130.BackgroundColor = BrickColor.new("Institutional white")
  8704. TextLabel130.BackgroundColor3 = Color3.new(1, 1, 1)
  8705. TextLabel130.BackgroundTransparency = 1
  8706. TextLabel130.Font = Enum.Font.SourceSans
  8707. TextLabel130.FontSize = Enum.FontSize.Size18
  8708. TextLabel130.Text = "Save Terrain"
  8709. TextLabel130.TextSize = 18
  8710. TextLabel130.TextXAlignment = Enum.TextXAlignment.Left
  8711. TextLabel131.Name = "Status"
  8712. TextLabel131.Parent = Frame129
  8713. TextLabel131.Position = UDim2.new(0, 60, 0, 30)
  8714. TextLabel131.Transparency = 1
  8715. TextLabel131.Size = UDim2.new(0, 50, 0, 15)
  8716. TextLabel131.BackgroundColor = BrickColor.new("Institutional white")
  8717. TextLabel131.BackgroundColor3 = Color3.new(1, 1, 1)
  8718. TextLabel131.BackgroundTransparency = 1
  8719. TextLabel131.Font = Enum.Font.SourceSans
  8720. TextLabel131.FontSize = Enum.FontSize.Size18
  8721. TextLabel131.Text = "Off"
  8722. TextLabel131.TextSize = 18
  8723. TextLabel131.TextXAlignment = Enum.TextXAlignment.Left
  8724. TextButton132.Name = "Change"
  8725. TextButton132.Parent = Frame129
  8726. TextButton132.Position = UDim2.new(0, 10, 0, 30)
  8727. TextButton132.Size = UDim2.new(0, 40, 0, 15)
  8728. TextButton132.BackgroundColor = BrickColor.new("Quill grey")
  8729. TextButton132.BackgroundColor3 = Color3.new(0.862745, 0.862745, 0.862745)
  8730. TextButton132.BorderSizePixel = 0
  8731. TextButton132.Font = Enum.Font.SourceSans
  8732. TextButton132.FontSize = Enum.FontSize.Size14
  8733. TextButton132.Text = ""
  8734. TextButton132.TextSize = 14
  8735. TextLabel133.Name = "OnBar"
  8736. TextLabel133.Parent = TextButton132
  8737. TextLabel133.Size = UDim2.new(0, 0, 0, 15)
  8738. TextLabel133.BackgroundColor = BrickColor.new("Electric blue")
  8739. TextLabel133.BackgroundColor3 = Color3.new(0, 0.576471, 0.862745)
  8740. TextLabel133.BorderSizePixel = 0
  8741. TextLabel133.Font = Enum.Font.SourceSans
  8742. TextLabel133.FontSize = Enum.FontSize.Size14
  8743. TextLabel133.Text = ""
  8744. TextLabel133.TextSize = 14
  8745. TextLabel134.Name = "Bar"
  8746. TextLabel134.Parent = TextButton132
  8747. TextLabel134.Position = UDim2.new(0, -2, 0, -2)
  8748. TextLabel134.Size = UDim2.new(0, 10, 0, 19)
  8749. TextLabel134.BackgroundColor = BrickColor.new("Really black")
  8750. TextLabel134.BackgroundColor3 = Color3.new(0, 0, 0)
  8751. TextLabel134.BorderSizePixel = 0
  8752. TextLabel134.ClipsDescendants = true
  8753. TextLabel134.Font = Enum.Font.SourceSans
  8754. TextLabel134.FontSize = Enum.FontSize.Size14
  8755. TextLabel134.Text = ""
  8756. TextLabel134.TextSize = 14
  8757. Frame135.Name = "Lighting"
  8758. Frame135.Parent = Frame128
  8759. Frame135.Position = UDim2.new(0, 0, 0, 120)
  8760. Frame135.Transparency = 1
  8761. Frame135.Size = UDim2.new(1, 0, 0, 60)
  8762. Frame135.BackgroundColor = BrickColor.new("Institutional white")
  8763. Frame135.BackgroundColor3 = Color3.new(1, 1, 1)
  8764. Frame135.BackgroundTransparency = 1
  8765. TextLabel136.Name = "SName"
  8766. TextLabel136.Parent = Frame135
  8767. TextLabel136.Position = UDim2.new(0, 10, 0, 0)
  8768. TextLabel136.Transparency = 1
  8769. TextLabel136.Size = UDim2.new(1, -20, 0, 30)
  8770. TextLabel136.BackgroundColor = BrickColor.new("Institutional white")
  8771. TextLabel136.BackgroundColor3 = Color3.new(1, 1, 1)
  8772. TextLabel136.BackgroundTransparency = 1
  8773. TextLabel136.Font = Enum.Font.SourceSans
  8774. TextLabel136.FontSize = Enum.FontSize.Size18
  8775. TextLabel136.Text = "Lighting Properties"
  8776. TextLabel136.TextSize = 18
  8777. TextLabel136.TextXAlignment = Enum.TextXAlignment.Left
  8778. TextLabel137.Name = "Status"
  8779. TextLabel137.Parent = Frame135
  8780. TextLabel137.Position = UDim2.new(0, 60, 0, 30)
  8781. TextLabel137.Transparency = 1
  8782. TextLabel137.Size = UDim2.new(0, 50, 0, 15)
  8783. TextLabel137.BackgroundColor = BrickColor.new("Institutional white")
  8784. TextLabel137.BackgroundColor3 = Color3.new(1, 1, 1)
  8785. TextLabel137.BackgroundTransparency = 1
  8786. TextLabel137.Font = Enum.Font.SourceSans
  8787. TextLabel137.FontSize = Enum.FontSize.Size18
  8788. TextLabel137.Text = "Off"
  8789. TextLabel137.TextSize = 18
  8790. TextLabel137.TextXAlignment = Enum.TextXAlignment.Left
  8791. TextButton138.Name = "Change"
  8792. TextButton138.Parent = Frame135
  8793. TextButton138.Position = UDim2.new(0, 10, 0, 30)
  8794. TextButton138.Size = UDim2.new(0, 40, 0, 15)
  8795. TextButton138.BackgroundColor = BrickColor.new("Quill grey")
  8796. TextButton138.BackgroundColor3 = Color3.new(0.862745, 0.862745, 0.862745)
  8797. TextButton138.BorderSizePixel = 0
  8798. TextButton138.Font = Enum.Font.SourceSans
  8799. TextButton138.FontSize = Enum.FontSize.Size14
  8800. TextButton138.Text = ""
  8801. TextButton138.TextSize = 14
  8802. TextLabel139.Name = "OnBar"
  8803. TextLabel139.Parent = TextButton138
  8804. TextLabel139.Size = UDim2.new(0, 0, 0, 15)
  8805. TextLabel139.BackgroundColor = BrickColor.new("Electric blue")
  8806. TextLabel139.BackgroundColor3 = Color3.new(0, 0.576471, 0.862745)
  8807. TextLabel139.BorderSizePixel = 0
  8808. TextLabel139.Font = Enum.Font.SourceSans
  8809. TextLabel139.FontSize = Enum.FontSize.Size14
  8810. TextLabel139.Text = ""
  8811. TextLabel139.TextSize = 14
  8812. TextLabel140.Name = "Bar"
  8813. TextLabel140.Parent = TextButton138
  8814. TextLabel140.Position = UDim2.new(0, -2, 0, -2)
  8815. TextLabel140.Size = UDim2.new(0, 10, 0, 19)
  8816. TextLabel140.BackgroundColor = BrickColor.new("Really black")
  8817. TextLabel140.BackgroundColor3 = Color3.new(0, 0, 0)
  8818. TextLabel140.BorderSizePixel = 0
  8819. TextLabel140.ClipsDescendants = true
  8820. TextLabel140.Font = Enum.Font.SourceSans
  8821. TextLabel140.FontSize = Enum.FontSize.Size14
  8822. TextLabel140.Text = ""
  8823. TextLabel140.TextSize = 14
  8824. Frame141.Name = "CameraInstances"
  8825. Frame141.Parent = Frame128
  8826. Frame141.Position = UDim2.new(0, 0, 0, 180)
  8827. Frame141.Transparency = 1
  8828. Frame141.Size = UDim2.new(1, 0, 0, 60)
  8829. Frame141.BackgroundColor = BrickColor.new("Institutional white")
  8830. Frame141.BackgroundColor3 = Color3.new(1, 1, 1)
  8831. Frame141.BackgroundTransparency = 1
  8832. TextLabel142.Name = "SName"
  8833. TextLabel142.Parent = Frame141
  8834. TextLabel142.Position = UDim2.new(0, 10, 0, 0)
  8835. TextLabel142.Transparency = 1
  8836. TextLabel142.Size = UDim2.new(1, -20, 0, 30)
  8837. TextLabel142.BackgroundColor = BrickColor.new("Institutional white")
  8838. TextLabel142.BackgroundColor3 = Color3.new(1, 1, 1)
  8839. TextLabel142.BackgroundTransparency = 1
  8840. TextLabel142.Font = Enum.Font.SourceSans
  8841. TextLabel142.FontSize = Enum.FontSize.Size18
  8842. TextLabel142.Text = "Camera Instances"
  8843. TextLabel142.TextSize = 18
  8844. TextLabel142.TextXAlignment = Enum.TextXAlignment.Left
  8845. TextLabel143.Name = "Status"
  8846. TextLabel143.Parent = Frame141
  8847. TextLabel143.Position = UDim2.new(0, 60, 0, 30)
  8848. TextLabel143.Transparency = 1
  8849. TextLabel143.Size = UDim2.new(0, 50, 0, 15)
  8850. TextLabel143.BackgroundColor = BrickColor.new("Institutional white")
  8851. TextLabel143.BackgroundColor3 = Color3.new(1, 1, 1)
  8852. TextLabel143.BackgroundTransparency = 1
  8853. TextLabel143.Font = Enum.Font.SourceSans
  8854. TextLabel143.FontSize = Enum.FontSize.Size18
  8855. TextLabel143.Text = "Off"
  8856. TextLabel143.TextSize = 18
  8857. TextLabel143.TextXAlignment = Enum.TextXAlignment.Left
  8858. TextButton144.Name = "Change"
  8859. TextButton144.Parent = Frame141
  8860. TextButton144.Position = UDim2.new(0, 10, 0, 30)
  8861. TextButton144.Size = UDim2.new(0, 40, 0, 15)
  8862. TextButton144.BackgroundColor = BrickColor.new("Quill grey")
  8863. TextButton144.BackgroundColor3 = Color3.new(0.862745, 0.862745, 0.862745)
  8864. TextButton144.BorderSizePixel = 0
  8865. TextButton144.Font = Enum.Font.SourceSans
  8866. TextButton144.FontSize = Enum.FontSize.Size14
  8867. TextButton144.Text = ""
  8868. TextButton144.TextSize = 14
  8869. TextLabel145.Name = "OnBar"
  8870. TextLabel145.Parent = TextButton144
  8871. TextLabel145.Size = UDim2.new(0, 0, 0, 15)
  8872. TextLabel145.BackgroundColor = BrickColor.new("Electric blue")
  8873. TextLabel145.BackgroundColor3 = Color3.new(0, 0.576471, 0.862745)
  8874. TextLabel145.BorderSizePixel = 0
  8875. TextLabel145.Font = Enum.Font.SourceSans
  8876. TextLabel145.FontSize = Enum.FontSize.Size14
  8877. TextLabel145.Text = ""
  8878. TextLabel145.TextSize = 14
  8879. TextLabel146.Name = "Bar"
  8880. TextLabel146.Parent = TextButton144
  8881. TextLabel146.Position = UDim2.new(0, -2, 0, -2)
  8882. TextLabel146.Size = UDim2.new(0, 10, 0, 19)
  8883. TextLabel146.BackgroundColor = BrickColor.new("Really black")
  8884. TextLabel146.BackgroundColor3 = Color3.new(0, 0, 0)
  8885. TextLabel146.BorderSizePixel = 0
  8886. TextLabel146.ClipsDescendants = true
  8887. TextLabel146.Font = Enum.Font.SourceSans
  8888. TextLabel146.FontSize = Enum.FontSize.Size14
  8889. TextLabel146.Text = ""
  8890. TextLabel146.TextSize = 14
  8891. Frame147.Name = "Scripts"
  8892. Frame147.Parent = Frame128
  8893. Frame147.Transparency = 1
  8894. Frame147.Size = UDim2.new(1, 0, 0, 60)
  8895. Frame147.BackgroundColor = BrickColor.new("Institutional white")
  8896. Frame147.BackgroundColor3 = Color3.new(1, 1, 1)
  8897. Frame147.BackgroundTransparency = 1
  8898. TextLabel148.Name = "SName"
  8899. TextLabel148.Parent = Frame147
  8900. TextLabel148.Position = UDim2.new(0, 10, 0, 0)
  8901. TextLabel148.Transparency = 1
  8902. TextLabel148.Size = UDim2.new(1, -20, 0, 30)
  8903. TextLabel148.BackgroundColor = BrickColor.new("Institutional white")
  8904. TextLabel148.BackgroundColor3 = Color3.new(1, 1, 1)
  8905. TextLabel148.BackgroundTransparency = 1
  8906. TextLabel148.Font = Enum.Font.SourceSans
  8907. TextLabel148.FontSize = Enum.FontSize.Size18
  8908. TextLabel148.Text = "Save Scripts"
  8909. TextLabel148.TextSize = 18
  8910. TextLabel148.TextXAlignment = Enum.TextXAlignment.Left
  8911. TextLabel149.Name = "Status"
  8912. TextLabel149.Parent = Frame147
  8913. TextLabel149.Position = UDim2.new(0, 60, 0, 30)
  8914. TextLabel149.Transparency = 1
  8915. TextLabel149.Size = UDim2.new(0, 50, 0, 15)
  8916. TextLabel149.BackgroundColor = BrickColor.new("Institutional white")
  8917. TextLabel149.BackgroundColor3 = Color3.new(1, 1, 1)
  8918. TextLabel149.BackgroundTransparency = 1
  8919. TextLabel149.Font = Enum.Font.SourceSans
  8920. TextLabel149.FontSize = Enum.FontSize.Size18
  8921. TextLabel149.Text = "Off"
  8922. TextLabel149.TextSize = 18
  8923. TextLabel149.TextXAlignment = Enum.TextXAlignment.Left
  8924. TextButton150.Name = "Change"
  8925. TextButton150.Parent = Frame147
  8926. TextButton150.Position = UDim2.new(0, 10, 0, 30)
  8927. TextButton150.Size = UDim2.new(0, 40, 0, 15)
  8928. TextButton150.BackgroundColor = BrickColor.new("Quill grey")
  8929. TextButton150.BackgroundColor3 = Color3.new(0.862745, 0.862745, 0.862745)
  8930. TextButton150.BorderSizePixel = 0
  8931. TextButton150.Font = Enum.Font.SourceSans
  8932. TextButton150.FontSize = Enum.FontSize.Size14
  8933. TextButton150.Text = ""
  8934. TextButton150.TextSize = 14
  8935. TextLabel151.Name = "OnBar"
  8936. TextLabel151.Parent = TextButton150
  8937. TextLabel151.Size = UDim2.new(0, 0, 0, 15)
  8938. TextLabel151.BackgroundColor = BrickColor.new("Electric blue")
  8939. TextLabel151.BackgroundColor3 = Color3.new(0, 0.576471, 0.862745)
  8940. TextLabel151.BorderSizePixel = 0
  8941. TextLabel151.Font = Enum.Font.SourceSans
  8942. TextLabel151.FontSize = Enum.FontSize.Size14
  8943. TextLabel151.Text = ""
  8944. TextLabel151.TextSize = 14
  8945. TextLabel152.Name = "Bar"
  8946. TextLabel152.Parent = TextButton150
  8947. TextLabel152.Position = UDim2.new(0, -2, 0, -2)
  8948. TextLabel152.Size = UDim2.new(0, 10, 0, 19)
  8949. TextLabel152.BackgroundColor = BrickColor.new("Really black")
  8950. TextLabel152.BackgroundColor3 = Color3.new(0, 0, 0)
  8951. TextLabel152.BorderSizePixel = 0
  8952. TextLabel152.ClipsDescendants = true
  8953. TextLabel152.Font = Enum.Font.SourceSans
  8954. TextLabel152.FontSize = Enum.FontSize.Size14
  8955. TextLabel152.Text = ""
  8956. TextLabel152.TextSize = 14
  8957. TextLabel153.Name = "ToSave"
  8958. TextLabel153.Parent = Frame125
  8959. TextLabel153.Position = UDim2.new(0, 0, 0, 17)
  8960. TextLabel153.Transparency = 1
  8961. TextLabel153.Size = UDim2.new(1, 0, 0, 20)
  8962. TextLabel153.BackgroundTransparency = 1
  8963. TextLabel153.Font = Enum.Font.SourceSans
  8964. TextLabel153.FontSize = Enum.FontSize.Size18
  8965. TextLabel153.Text = "To Save"
  8966. TextLabel153.TextColor = BrickColor.new("Really black")
  8967. TextLabel153.TextColor3 = Color3.new(0, 0, 0)
  8968. TextLabel153.TextSize = 18
  8969. Frame154.Name = "CopyList"
  8970. Frame154.Parent = Frame125
  8971. Frame154.Position = UDim2.new(0, 0, 0, 37)
  8972. Frame154.Transparency = 0.80000001192093
  8973. Frame154.Size = UDim2.new(1, 0, 0, 163)
  8974. Frame154.BackgroundColor = BrickColor.new("Institutional white")
  8975. Frame154.BackgroundColor3 = Color3.new(1, 1, 1)
  8976. Frame154.BackgroundTransparency = 0.80000001192093
  8977. Frame155.Name = "Bottom"
  8978. Frame155.Parent = Frame125
  8979. Frame155.Position = UDim2.new(0, 0, 1, -50)
  8980. Frame155.Size = UDim2.new(1, 0, 0, 50)
  8981. Frame155.BackgroundColor = BrickColor.new("Lily white")
  8982. Frame155.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
  8983. Frame155.BorderColor = BrickColor.new("Sand violet metallic")
  8984. Frame155.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  8985. TextLabel156.Parent = Frame155
  8986. TextLabel156.Position = UDim2.new(0, 4, 0, 0)
  8987. TextLabel156.Transparency = 1
  8988. TextLabel156.Size = UDim2.new(1, -4, 1, 0)
  8989. TextLabel156.BackgroundTransparency = 1
  8990. TextLabel156.Font = Enum.Font.SourceSans
  8991. TextLabel156.FontSize = Enum.FontSize.Size14
  8992. TextLabel156.Text = "After the map saves, open a new place on studio, then right click Lighting and Insert from file, then select your file and run the unpacker script inside the folder."
  8993. TextLabel156.TextColor = BrickColor.new("Really black")
  8994. TextLabel156.TextColor3 = Color3.new(0, 0, 0)
  8995. TextLabel156.TextSize = 14
  8996. TextLabel156.TextWrap = true
  8997. TextLabel156.TextWrapped = true
  8998. TextLabel156.TextXAlignment = Enum.TextXAlignment.Left
  8999. TextLabel156.TextYAlignment = Enum.TextYAlignment.Top
  9000. TextButton157.Name = "Save"
  9001. TextButton157.Parent = Frame125
  9002. TextButton157.Position = UDim2.new(0, 0, 1, -80)
  9003. TextButton157.Transparency = 0.80000001192093
  9004. TextButton157.Size = UDim2.new(1, 0, 0, 30)
  9005. TextButton157.BackgroundColor = BrickColor.new("White")
  9006. TextButton157.BackgroundColor3 = Color3.new(0.941177, 0.941177, 0.941177)
  9007. TextButton157.BackgroundTransparency = 0.80000001192093
  9008. TextButton157.BorderColor = BrickColor.new("Really black")
  9009. TextButton157.BorderColor3 = Color3.new(0, 0, 0)
  9010. TextButton157.Font = Enum.Font.SourceSans
  9011. TextButton157.FontSize = Enum.FontSize.Size18
  9012. TextButton157.Text = "Save"
  9013. TextButton157.TextSize = 18
  9014. TextBox158.Name = "FileName"
  9015. TextBox158.Parent = Frame125
  9016. TextBox158.Position = UDim2.new(0, 0, 1, -105)
  9017. TextBox158.Transparency = 0.60000002384186
  9018. TextBox158.Size = UDim2.new(1, 0, 0, 25)
  9019. TextBox158.BackgroundColor = BrickColor.new("White")
  9020. TextBox158.BackgroundColor3 = Color3.new(0.941177, 0.941177, 0.941177)
  9021. TextBox158.BackgroundTransparency = 0.60000002384186
  9022. TextBox158.Font = Enum.Font.SourceSans
  9023. TextBox158.FontSize = Enum.FontSize.Size18
  9024. TextBox158.Text = "PlaceName"
  9025. TextBox158.TextSize = 18
  9026. TextBox158.TextXAlignment = Enum.TextXAlignment.Left
  9027. Frame159.Name = "Entry"
  9028. Frame159.Parent = Frame125
  9029. Frame159.Visible = false
  9030. Frame159.Transparency = 1
  9031. Frame159.Size = UDim2.new(1, 0, 0, 22)
  9032. Frame159.BackgroundColor = BrickColor.new("Institutional white")
  9033. Frame159.BackgroundColor3 = Color3.new(1, 1, 1)
  9034. Frame159.BackgroundTransparency = 1
  9035. TextButton160.Name = "Change"
  9036. TextButton160.Parent = Frame159
  9037. TextButton160.Position = UDim2.new(0, 10, 0, 1)
  9038. TextButton160.Transparency = 0.60000002384186
  9039. TextButton160.Size = UDim2.new(0, 20, 0, 20)
  9040. TextButton160.BackgroundColor = BrickColor.new("Institutional white")
  9041. TextButton160.BackgroundColor3 = Color3.new(1, 1, 1)
  9042. TextButton160.BackgroundTransparency = 0.60000002384186
  9043. TextButton160.ZIndex = 2
  9044. TextButton160.Font = Enum.Font.SourceSans
  9045. TextButton160.FontSize = Enum.FontSize.Size18
  9046. TextButton160.Text = ""
  9047. TextButton160.TextColor = BrickColor.new("Institutional white")
  9048. TextButton160.TextColor3 = Color3.new(1, 1, 1)
  9049. TextButton160.TextSize = 18
  9050. TextLabel161.Name = "enabled"
  9051. TextLabel161.Parent = TextButton160
  9052. TextLabel161.Position = UDim2.new(0, 3, 0, 3)
  9053. TextLabel161.Transparency = 0.40000000596046
  9054. TextLabel161.Size = UDim2.new(0, 14, 0, 14)
  9055. TextLabel161.BackgroundColor = BrickColor.new("Dark stone grey")
  9056. TextLabel161.BackgroundColor3 = Color3.new(0.380392, 0.380392, 0.380392)
  9057. TextLabel161.BackgroundTransparency = 0.40000000596046
  9058. TextLabel161.BorderSizePixel = 0
  9059. TextLabel161.Font = Enum.Font.SourceSans
  9060. TextLabel161.FontSize = Enum.FontSize.Size14
  9061. TextLabel161.Text = ""
  9062. TextLabel161.TextSize = 14
  9063. TextLabel162.Name = "Info"
  9064. TextLabel162.Parent = Frame159
  9065. TextLabel162.Position = UDim2.new(0, 40, 0, 0)
  9066. TextLabel162.Transparency = 1
  9067. TextLabel162.Size = UDim2.new(1, -40, 0, 22)
  9068. TextLabel162.BackgroundTransparency = 1
  9069. TextLabel162.Font = Enum.Font.SourceSans
  9070. TextLabel162.FontSize = Enum.FontSize.Size18
  9071. TextLabel162.Text = "Workspace"
  9072. TextLabel162.TextColor = BrickColor.new("Really black")
  9073. TextLabel162.TextColor3 = Color3.new(0, 0, 0)
  9074. TextLabel162.TextSize = 18
  9075. TextLabel162.TextXAlignment = Enum.TextXAlignment.Left
  9076. Frame163.Name = "RemoteDebugWindow"
  9077. Frame163.Parent = ScreenGui0
  9078. Frame163.Position = UDim2.new(1, 0, 0, 0)
  9079. Frame163.Transparency = 0.10000000149012
  9080. Frame163.Size = UDim2.new(0, 300, 1, 0)
  9081. Frame163.BackgroundColor = BrickColor.new("Institutional white")
  9082. Frame163.BackgroundColor3 = Color3.new(1, 1, 1)
  9083. Frame163.BackgroundTransparency = 0.10000000149012
  9084. Frame163.BorderColor = BrickColor.new("Light grey")
  9085. Frame163.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
  9086. Frame163.BorderSizePixel = 0
  9087. Frame164.Name = "Header"
  9088. Frame164.Parent = Frame163
  9089. Frame164.Size = UDim2.new(1, 0, 0, 17)
  9090. Frame164.BackgroundColor = BrickColor.new("Lily white")
  9091. Frame164.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
  9092. Frame164.BorderColor = BrickColor.new("Sand violet metallic")
  9093. Frame164.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  9094. TextLabel165.Parent = Frame164
  9095. TextLabel165.Position = UDim2.new(0, 4, 0, 0)
  9096. TextLabel165.Transparency = 1
  9097. TextLabel165.Size = UDim2.new(1, -4, 1, 0)
  9098. TextLabel165.BackgroundTransparency = 1
  9099. TextLabel165.Font = Enum.Font.SourceSans
  9100. TextLabel165.FontSize = Enum.FontSize.Size14
  9101. TextLabel165.Text = "Remote Debugger"
  9102. TextLabel165.TextColor = BrickColor.new("Really black")
  9103. TextLabel165.TextColor3 = Color3.new(0, 0, 0)
  9104. TextLabel165.TextSize = 14
  9105. TextLabel165.TextXAlignment = Enum.TextXAlignment.Left
  9106. BindableFunction166.Name = "GetSetting"
  9107. BindableFunction166.Parent = Frame163
  9108. TextLabel167.Name = "Desc"
  9109. TextLabel167.Parent = Frame163
  9110. TextLabel167.Position = UDim2.new(0, 0, 0, 20)
  9111. TextLabel167.Transparency = 1
  9112. TextLabel167.Size = UDim2.new(1, 0, 0, 40)
  9113. TextLabel167.BackgroundColor = BrickColor.new("Institutional white")
  9114. TextLabel167.BackgroundColor3 = Color3.new(1, 1, 1)
  9115. TextLabel167.BackgroundTransparency = 1
  9116. TextLabel167.Font = Enum.Font.SourceSans
  9117. TextLabel167.FontSize = Enum.FontSize.Size32
  9118. TextLabel167.Text = "Have fun with remotes"
  9119. TextLabel167.TextSize = 32
  9120. TextLabel167.TextWrap = true
  9121. TextLabel167.TextWrapped = true
  9122. Frame168.Name = "About"
  9123. Frame168.Parent = ScreenGui0
  9124. Frame168.Position = UDim2.new(1, 0, 0, 0)
  9125. Frame168.Size = UDim2.new(0, 300, 1, 0)
  9126. Frame168.Active = true
  9127. Frame168.BackgroundColor = BrickColor.new("Lily white")
  9128. Frame168.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
  9129. Frame168.BorderColor = BrickColor.new("Sand violet metallic")
  9130. Frame168.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
  9131. Frame168.BorderSizePixel = 0
  9132. Frame168.Draggable = true
  9133. Frame168.ZIndex = 2
  9134. ImageLabel169.Name = "Sad"
  9135. ImageLabel169.Parent = Frame168
  9136. ImageLabel169.Position = UDim2.new(0, 50, 1, -250)
  9137. ImageLabel169.Transparency = 1
  9138. ImageLabel169.Size = UDim2.new(0, 200, 0, 200)
  9139. ImageLabel169.BackgroundColor = BrickColor.new("Institutional white")
  9140. ImageLabel169.BackgroundColor3 = Color3.new(1, 1, 1)
  9141. ImageLabel169.BackgroundTransparency = 1
  9142. ImageLabel169.ZIndex = 2
  9143. ImageLabel169.Image = "rbxassetid://483437370"
  9144. ImageLabel169.ImageColor3 = Color3.new(0.960784, 0.960784, 0.960784)
  9145. TextLabel170.Name = "Creator"
  9146. TextLabel170.Parent = Frame168
  9147. TextLabel170.Position = UDim2.new(0, 80, 0, 300)
  9148. TextLabel170.Transparency = 1
  9149. TextLabel170.Size = UDim2.new(0, 140, 0, 30)
  9150. TextLabel170.BackgroundColor = BrickColor.new("Institutional white")
  9151. TextLabel170.BackgroundColor3 = Color3.new(1, 1, 1)
  9152. TextLabel170.BackgroundTransparency = 1
  9153. TextLabel170.ZIndex = 2
  9154. TextLabel170.Font = Enum.Font.SourceSansBold
  9155. TextLabel170.FontSize = Enum.FontSize.Size28
  9156. TextLabel170.Text = "By Moon"
  9157. TextLabel170.TextSize = 28
  9158. TextLabel170.TextWrap = true
  9159. TextLabel170.TextWrapped = true
  9160. TextLabel171.Name = "Title"
  9161. TextLabel171.Parent = Frame168
  9162. TextLabel171.Position = UDim2.new(0, 100, 0, 150)
  9163. TextLabel171.Transparency = 1
  9164. TextLabel171.Size = UDim2.new(0, 100, 0, 60)
  9165. TextLabel171.BackgroundColor = BrickColor.new("Institutional white")
  9166. TextLabel171.BackgroundColor3 = Color3.new(1, 1, 1)
  9167. TextLabel171.BackgroundTransparency = 1
  9168. TextLabel171.ZIndex = 2
  9169. TextLabel171.Font = Enum.Font.SourceSansBold
  9170. TextLabel171.FontSize = Enum.FontSize.Size60
  9171. TextLabel171.Text = "DEX"
  9172. TextLabel171.TextSize = 60
  9173. TextLabel171.TextWrap = true
  9174. TextLabel171.TextWrapped = true
  9175. TextLabel172.Name = "Version"
  9176. TextLabel172.Parent = Frame168
  9177. TextLabel172.Position = UDim2.new(0, 100, 0, 210)
  9178. TextLabel172.Transparency = 1
  9179. TextLabel172.Size = UDim2.new(0, 100, 0, 30)
  9180. TextLabel172.BackgroundColor = BrickColor.new("Institutional white")
  9181. TextLabel172.BackgroundColor3 = Color3.new(1, 1, 1)
  9182. TextLabel172.BackgroundTransparency = 1
  9183. TextLabel172.ZIndex = 2
  9184. TextLabel172.Font = Enum.Font.SourceSansBold
  9185. TextLabel172.FontSize = Enum.FontSize.Size28
  9186. TextLabel172.Text = "v3"
  9187. TextLabel172.TextSize = 28
  9188. TextLabel172.TextWrap = true
  9189. TextLabel172.TextWrapped = true
  9190. ImageButton173.Name = "Toggle"
  9191. ImageButton173.Parent = ScreenGui0
  9192. ImageButton173.Position = UDim2.new(1, 0, 0, 0)
  9193. ImageButton173.Rotation = 180
  9194. ImageButton173.Transparency = 1
  9195. ImageButton173.Size = UDim2.new(0, 40, 0, 40)
  9196. ImageButton173.BackgroundColor = BrickColor.new("Institutional white")
  9197. ImageButton173.BackgroundColor3 = Color3.new(1, 1, 1)
  9198. ImageButton173.BackgroundTransparency = 1
  9199. ImageButton173.Image = "rbxassetid://1513966937"
  9200. ImageButton173.ImageColor3 = Color3.new(0.913726, 0.913726, 0.913726)
  9201. TextLabel174.Parent = ImageButton173
  9202. TextLabel174.Position = UDim2.new(0, 2, 0, 10)
  9203. TextLabel174.Rotation = 180
  9204. TextLabel174.Transparency = 1
  9205. TextLabel174.Size = UDim2.new(0, 30, 0, 30)
  9206. TextLabel174.BackgroundColor = BrickColor.new("Institutional white")
  9207. TextLabel174.BackgroundColor3 = Color3.new(1, 1, 1)
  9208. TextLabel174.BackgroundTransparency = 1
  9209. TextLabel174.Font = Enum.Font.SourceSans
  9210. TextLabel174.FontSize = Enum.FontSize.Size24
  9211. TextLabel174.Text = "<"
  9212. TextLabel174.TextSize = 24
  9213. TextLabel174.TextWrap = true
  9214. TextLabel174.TextWrapped = true
  9215. for i,v in pairs(mas:GetChildren()) do
  9216. v.Parent = game:GetService("Players").LocalPlayer.PlayerGui
  9217. pcall(function() v:MakeJoints() end)
  9218. end
  9219. mas:Destroy()
  9220. for i,v in pairs(cors) do
  9221. spawn(function()
  9222. pcall(v)
  9223. end)
  9224. end
Add Comment
Please, Sign In to add comment