DrawingJhon

Untitled

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