· 5 years ago · Mar 22, 2020, 06:58 PM
1--Converted with ttyyuu12345's model to script plugin v4
2function 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
15end
16cors = {}
17mas = Instance.new("Model",game:GetService("Lighting"))
18ScreenGui0 = Instance.new("ScreenGui")
19Frame1 = Instance.new("Frame")
20LocalScript2 = Instance.new("LocalScript")
21ModuleScript3 = Instance.new("ModuleScript")
22Frame4 = Instance.new("Frame")
23TextLabel5 = Instance.new("TextLabel")
24TextBox6 = Instance.new("TextBox")
25BindableFunction7 = Instance.new("BindableFunction")
26BindableFunction8 = Instance.new("BindableFunction")
27BindableEvent9 = Instance.new("BindableEvent")
28Frame10 = Instance.new("Frame")
29BindableEvent11 = Instance.new("BindableEvent")
30BindableFunction12 = Instance.new("BindableFunction")
31BindableFunction13 = Instance.new("BindableFunction")
32BindableFunction14 = Instance.new("BindableFunction")
33BindableFunction15 = Instance.new("BindableFunction")
34LocalScript16 = Instance.new("LocalScript")
35BindableFunction17 = Instance.new("BindableFunction")
36LocalScript18 = Instance.new("LocalScript")
37Frame19 = Instance.new("Frame")
38TextButton20 = Instance.new("TextButton")
39TextLabel21 = Instance.new("TextLabel")
40TextLabel22 = Instance.new("TextLabel")
41ImageLabel23 = Instance.new("ImageLabel")
42Frame24 = Instance.new("Frame")
43Frame25 = Instance.new("Frame")
44Frame26 = Instance.new("Frame")
45TextButton27 = Instance.new("TextButton")
46ImageLabel28 = Instance.new("ImageLabel")
47TextButton29 = Instance.new("TextButton")
48ImageLabel30 = Instance.new("ImageLabel")
49TextButton31 = Instance.new("TextButton")
50ImageLabel32 = Instance.new("ImageLabel")
51TextButton33 = Instance.new("TextButton")
52ImageLabel34 = Instance.new("ImageLabel")
53TextButton35 = Instance.new("TextButton")
54ImageLabel36 = Instance.new("ImageLabel")
55Frame37 = Instance.new("Frame")
56Frame38 = Instance.new("Frame")
57TextLabel39 = Instance.new("TextLabel")
58BindableFunction40 = Instance.new("BindableFunction")
59Frame41 = Instance.new("Frame")
60TextLabel42 = Instance.new("TextLabel")
61TextLabel43 = Instance.new("TextLabel")
62TextButton44 = Instance.new("TextButton")
63TextLabel45 = Instance.new("TextLabel")
64TextLabel46 = Instance.new("TextLabel")
65Frame47 = Instance.new("Frame")
66Frame48 = Instance.new("Frame")
67TextLabel49 = Instance.new("TextLabel")
68Frame50 = Instance.new("Frame")
69TextButton51 = Instance.new("TextButton")
70TextLabel52 = Instance.new("TextLabel")
71TextButton53 = Instance.new("TextButton")
72TextBox54 = Instance.new("TextBox")
73TextButton55 = Instance.new("TextButton")
74TextLabel56 = Instance.new("TextLabel")
75TextLabel57 = Instance.new("TextLabel")
76Frame58 = Instance.new("Frame")
77TextLabel59 = Instance.new("TextLabel")
78Frame60 = Instance.new("Frame")
79TextButton61 = Instance.new("TextButton")
80TextLabel62 = Instance.new("TextLabel")
81TextButton63 = Instance.new("TextButton")
82Frame64 = Instance.new("Frame")
83TextLabel65 = Instance.new("TextLabel")
84Frame66 = Instance.new("Frame")
85TextLabel67 = Instance.new("TextLabel")
86TextButton68 = Instance.new("TextButton")
87Frame69 = Instance.new("Frame")
88TextLabel70 = Instance.new("TextLabel")
89Frame71 = Instance.new("Frame")
90TextLabel72 = Instance.new("TextLabel")
91ScrollingFrame73 = Instance.new("ScrollingFrame")
92TextButton74 = Instance.new("TextButton")
93TextLabel75 = Instance.new("TextLabel")
94TextLabel76 = Instance.new("TextLabel")
95TextButton77 = Instance.new("TextButton")
96TextButton78 = Instance.new("TextButton")
97Frame79 = Instance.new("Frame")
98TextButton80 = Instance.new("TextButton")
99TextBox81 = Instance.new("TextBox")
100TextButton82 = Instance.new("TextButton")
101TextButton83 = Instance.new("TextButton")
102Frame84 = Instance.new("Frame")
103Frame85 = Instance.new("Frame")
104TextButton86 = Instance.new("TextButton")
105ScrollingFrame87 = Instance.new("ScrollingFrame")
106Frame88 = Instance.new("Frame")
107TextLabel89 = Instance.new("TextLabel")
108TextLabel90 = Instance.new("TextLabel")
109TextLabel91 = Instance.new("TextLabel")
110Frame92 = Instance.new("Frame")
111TextLabel93 = Instance.new("TextLabel")
112Frame94 = Instance.new("Frame")
113Frame95 = Instance.new("Frame")
114Frame96 = Instance.new("Frame")
115ImageButton97 = Instance.new("ImageButton")
116Frame98 = Instance.new("Frame")
117Frame99 = Instance.new("Frame")
118Frame100 = Instance.new("Frame")
119Frame101 = Instance.new("Frame")
120Frame102 = Instance.new("Frame")
121ImageButton103 = Instance.new("ImageButton")
122Frame104 = Instance.new("Frame")
123Frame105 = Instance.new("Frame")
124Frame106 = Instance.new("Frame")
125Frame107 = Instance.new("Frame")
126Frame108 = Instance.new("Frame")
127TextButton109 = Instance.new("TextButton")
128Frame110 = Instance.new("Frame")
129Frame111 = Instance.new("Frame")
130TextButton112 = Instance.new("TextButton")
131TextButton113 = Instance.new("TextButton")
132BindableEvent114 = Instance.new("BindableEvent")
133LocalScript115 = Instance.new("LocalScript")
134TextButton116 = Instance.new("TextButton")
135Frame117 = Instance.new("Frame")
136Frame118 = Instance.new("Frame")
137ImageLabel119 = Instance.new("ImageLabel")
138Frame120 = Instance.new("Frame")
139ImageLabel121 = Instance.new("ImageLabel")
140TextLabel122 = Instance.new("TextLabel")
141TextLabel123 = Instance.new("TextLabel")
142TextLabel124 = Instance.new("TextLabel")
143Frame125 = Instance.new("Frame")
144Frame126 = Instance.new("Frame")
145TextLabel127 = Instance.new("TextLabel")
146Frame128 = Instance.new("Frame")
147Frame129 = Instance.new("Frame")
148TextLabel130 = Instance.new("TextLabel")
149TextLabel131 = Instance.new("TextLabel")
150TextButton132 = Instance.new("TextButton")
151TextLabel133 = Instance.new("TextLabel")
152TextLabel134 = Instance.new("TextLabel")
153Frame135 = Instance.new("Frame")
154TextLabel136 = Instance.new("TextLabel")
155TextLabel137 = Instance.new("TextLabel")
156TextButton138 = Instance.new("TextButton")
157TextLabel139 = Instance.new("TextLabel")
158TextLabel140 = Instance.new("TextLabel")
159Frame141 = Instance.new("Frame")
160TextLabel142 = Instance.new("TextLabel")
161TextLabel143 = Instance.new("TextLabel")
162TextButton144 = Instance.new("TextButton")
163TextLabel145 = Instance.new("TextLabel")
164TextLabel146 = Instance.new("TextLabel")
165Frame147 = Instance.new("Frame")
166TextLabel148 = Instance.new("TextLabel")
167TextLabel149 = Instance.new("TextLabel")
168TextButton150 = Instance.new("TextButton")
169TextLabel151 = Instance.new("TextLabel")
170TextLabel152 = Instance.new("TextLabel")
171TextLabel153 = Instance.new("TextLabel")
172Frame154 = Instance.new("Frame")
173Frame155 = Instance.new("Frame")
174TextLabel156 = Instance.new("TextLabel")
175TextButton157 = Instance.new("TextButton")
176TextBox158 = Instance.new("TextBox")
177Frame159 = Instance.new("Frame")
178TextButton160 = Instance.new("TextButton")
179TextLabel161 = Instance.new("TextLabel")
180TextLabel162 = Instance.new("TextLabel")
181Frame163 = Instance.new("Frame")
182Frame164 = Instance.new("Frame")
183TextLabel165 = Instance.new("TextLabel")
184BindableFunction166 = Instance.new("BindableFunction")
185TextLabel167 = Instance.new("TextLabel")
186Frame168 = Instance.new("Frame")
187ImageLabel169 = Instance.new("ImageLabel")
188TextLabel170 = Instance.new("TextLabel")
189TextLabel171 = Instance.new("TextLabel")
190TextLabel172 = Instance.new("TextLabel")
191ImageButton173 = Instance.new("ImageButton")
192TextLabel174 = Instance.new("TextLabel")
193ScreenGui0.Name = "Dex"
194ScreenGui0.Parent = mas
195Frame1.Name = "PropertiesFrame"
196Frame1.Parent = ScreenGui0
197Frame1.Position = UDim2.new(1, 0, 0.5, 36)
198Frame1.Transparency = 0.10000000149012
199Frame1.Size = UDim2.new(0, 300, 0.5, -36)
200Frame1.Active = true
201Frame1.BackgroundColor = BrickColor.new("Institutional white")
202Frame1.BackgroundColor3 = Color3.new(1, 1, 1)
203Frame1.BackgroundTransparency = 0.10000000149012
204Frame1.BorderColor = BrickColor.new("Sand violet metallic")
205Frame1.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
206Frame1.BorderSizePixel = 0
207LocalScript2.Name = "Properties"
208LocalScript2.Parent = Frame1
209table.insert(cors,sandbox(LocalScript2,function()
210--[[
211
212Change log:
213
21409/18
215 Fixed checkbox mouseover sprite
216 Encapsulated checkbox creation into separate method
217 Fixed another checkbox issue
218
21909/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
22709/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
235wait(0.2)
236
237local Gui = script.Parent.Parent
238local PropertiesFrame = Gui:WaitForChild("PropertiesFrame")
239local ExplorerFrame = Gui:WaitForChild("ExplorerPanel")
240print = ExplorerFrame:WaitForChild("GetPrint"):Invoke()
241
242
243-- Services
244local Teams = game:GetService("Teams")
245local Workspace = game:GetService("Workspace")
246local Debris = game:GetService("Debris")
247local ContentProvider = game:GetService("ContentProvider")
248local Players = game:GetService("Players")
249local ReplicatedStorage = game:GetService("ReplicatedStorage")
250
251-- Functions
252function httpGet(url)
253 return game:HttpGet(url,true)
254end
255
256-- RbxApi Stuff
257
258local apiUrl = "http://anaminus.github.io/rbx/json/api/latest.json"
259local maxChunkSize = 100 * 1000
260local ApiJson
261if script:FindFirstChild("RawApiJson") then
262 ApiJson = script.RawApiJson
263else
264 ApiJson = ""
265end
266
267function 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
276end
277
278function 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
303end
304
305function 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
313end
314
315local jsonToParse = getCurrentApiJson()
316local apiChunks = splitStringIntoChunks(jsonToParse)
317
318function getRbxApi()
319--[[
320 Api.Classes
321 Api.Enums
322 Api.GetProperties(className)
323 Api.IsEnum(valueType)
324--]]
325
326-- Services
327local HttpService = game:GetService("HttpService")
328local ServerStorage = game:GetService("ServerStorage")
329local ReplicatedStorage = game:GetService("ReplicatedStorage")
330
331-- Remotes
332--local Remotes = ReplicatedStorage:WaitForChild("OnlineStudio"):WaitForChild("Remotes")
333--local GetApiJsonFunction = Remotes:WaitForChild("GetApiJson")
334
335-- Functions
336local JsonDecode = function(s) return HttpService:JSONDecode(s) end
337
338local 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
345end
346
347local 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)
357end
358
359local json = getApiJson()
360local apiDump = JsonDecode(json)
361
362local Classes = {}
363local Enums = {}
364
365local function sortAlphabetic(t, property)
366 table.sort(t,
367 function(x,y) return x[property] < y[property]
368 end)
369end
370
371local function isEnum(name)
372 return Enums[name] ~= nil
373end
374
375local 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
391end
392
393for _,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
421end
422
423return {
424 Classes = Classes;
425 Enums = Enums;
426 GetProperties = getProperties;
427 IsEnum = isEnum;
428}
429end
430
431-- Modules
432local Permissions = {CanEdit = true}
433local RbxApi = getRbxApi()
434
435--[[
436 RbxApi.Classes
437 RbxApi.Enums
438 RbxApi.GetProperties(className)
439 RbxApi.IsEnum(valueType)
440--]]
441
442-- Styles
443
444local function CreateColor3(r, g, b) return Color3.new(r/255,g/255,b/255) end
445
446local Styles = {
447 Font = Enum.Font.Arial;
448 Margin = 5;
449 Black = CreateColor3(0,0,0);
450 White = CreateColor3(255,255,255);
451}
452
453local 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
468local 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
483local 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
495wait(1)
496
497local bindGetSelection = ExplorerFrame.GetSelection
498local bindSelectionChanged = ExplorerFrame.SelectionChanged
499local bindGetApi = PropertiesFrame.GetApi
500local bindGetAwait = PropertiesFrame.GetAwaiting
501local bindSetAwait = PropertiesFrame.SetAwaiting
502
503local ContentUrl = ContentProvider.BaseUrl .. "asset/?id="
504
505local SettingsRemote = Gui:WaitForChild("SettingsPanel"):WaitForChild("GetSetting")
506
507local propertiesSearch = PropertiesFrame.Header.TextBox
508
509local AwaitingObjectValue = false
510local AwaitingObjectObj
511local AwaitingObjectProp
512
513function searchingProperties()
514 if propertiesSearch.Text ~= "" and propertiesSearch.Text ~= "Search Properties" then
515 return true
516 end
517 return false
518end
519
520local function GetSelection()
521 local selection = bindGetSelection:Invoke()
522 if #selection == 0 then
523 return nil
524 else
525 return selection
526 end
527end
528
529-- Number
530
531local function Round(number, decimalPlaces)
532 return tonumber(string.format("%." .. (decimalPlaces or 0) .. "f", number))
533end
534
535-- Strings
536
537local 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
550end
551
552-- Data Type Handling
553
554local 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
588end
589
590local 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
642end
643
644
645-- Tables
646
647local function CopyTable(T)
648 local t2 = {}
649 for k,v in pairs(T) do
650 t2[k] = v
651 end
652 return t2
653end
654
655local function SortTable(T)
656 table.sort(T,
657 function(x,y) return x.Name < y.Name
658 end)
659end
660
661-- Spritesheet
662local Sprite = {
663 Width = 13;
664 Height = 13;
665}
666
667local Spritesheet = {
668 Image = "http://www.roblox.com/asset/?id=128896947";
669 Height = 256;
670 Width = 256;
671}
672
673local Images = {
674 "unchecked",
675 "checked",
676 "unchecked_over",
677 "checked_over",
678 "unchecked_disabled",
679 "checked_disabled"
680}
681
682local 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
695end
696
697local 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
715end
716
717local 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)
727local 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
768end
769
770local 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
776end
777
778local 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
791end
792
793local 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
808end
809
810local 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
829end
830
831local 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
847end
848
849local 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
873end
874
875local 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
981end
982
983local 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
1062end
1063
1064local 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
1082end
1083
1084function 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
1122end
1123
1124
1125
1126-- Code for handling controls of various data types --
1127
1128local Controls = {}
1129
1130Controls["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
1159end
1160
1161Controls["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
1192end
1193
1194Controls["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
1216end
1217
1218Controls["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
1245end
1246
1247Controls["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
1277end
1278
1279Controls["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
1332end
1333
1334function 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
1348end
1349-- Permissions
1350
1351function CanEditObject(object)
1352 local player = Players.LocalPlayer
1353 local character = player.Character
1354 return Permissions.CanEdit
1355end
1356
1357function 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)
1365end
1366
1367--RbxApi
1368local 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
1378end
1379
1380function 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
1394end
1395
1396function 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
1445end
1446
1447function ClearPropertiesList()
1448 for _,instance in pairs(ContentFrame:GetChildren()) do
1449 instance:Destroy()
1450 end
1451end
1452
1453local selection = Gui:FindFirstChild("Selection", 1)
1454print(selection)
1455
1456function 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
1465end
1466
1467function 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
1474end
1475
1476function sortProps(t)
1477 table.sort(t,
1478 function(x,y) return x.propertyData.Name < y.propertyData.Name
1479 end)
1480end
1481
1482function 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()
1511end
1512
1513----------------------------------------------------------------
1514-----------------------SCROLLBAR STUFF--------------------------
1515----------------------------------------------------------------
1516----------------------------------------------------------------
1517local ScrollBarWidth = 16
1518
1519local 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}
1534do
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
1549end
1550function SetZIndexOnChanged(object)
1551 return object.Changed:connect(function(p)
1552 if p == "ZIndex" then
1553 SetZIndex(object,object.ZIndex)
1554 end
1555 end)
1556end
1557function 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
1572end
1573-- returns the ascendant ScreenGui of an object
1574function 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
1581end
1582-- AutoButtonColor doesn't always reset properly
1583function ResetButtonColor(button)
1584 local active = button.Active
1585 button.Active = not active
1586 button.Active = active
1587end
1588
1589function 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
1656end
1657
1658function 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
1696end
1697
1698do
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
2067end
2068
2069----------------------------------------------------------------
2070----------------------------------------------------------------
2071----------------------------------------------------------------
2072----------------------------------------------------------------
2073
2074local MainFrame = Instance.new("Frame")
2075MainFrame.Name = "MainFrame"
2076MainFrame.Size = UDim2.new(1, -1 * ScrollBarWidth, 1, 0)
2077MainFrame.Position = UDim2.new(0, 0, 0, 0)
2078MainFrame.BackgroundTransparency = 1
2079MainFrame.ClipsDescendants = true
2080MainFrame.Parent = PropertiesFrame
2081
2082ContentFrame = Instance.new("Frame")
2083ContentFrame.Name = "ContentFrame"
2084ContentFrame.Size = UDim2.new(1, 0, 0, 0)
2085ContentFrame.BackgroundTransparency = 1
2086ContentFrame.Parent = MainFrame
2087
2088scrollBar = ScrollBar(false)
2089scrollBar.PageIncrement = 1
2090Create(scrollBar.GUI,{
2091 Position = UDim2.new(1,-ScrollBarWidth,0,0);
2092 Size = UDim2.new(0,ScrollBarWidth,1,0);
2093 Parent = PropertiesFrame;
2094})
2095
2096scrollBarH = ScrollBar(true)
2097scrollBarH.PageIncrement = ScrollBarWidth
2098Create(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
2105do
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)
2143end
2144
2145scrollBar.VisibleSpace = math.ceil(MainFrame.AbsoluteSize.y)
2146scrollBar:Update()
2147
2148showProperties(GetSelection())
2149
2150bindSelectionChanged.Event:connect(function()
2151 showProperties(GetSelection())
2152end)
2153
2154bindSetAwait.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
2164end)
2165
2166propertiesSearch.Changed:connect(function(prop)
2167 if prop == "Text" then
2168 showProperties(GetSelection())
2169 end
2170end)
2171
2172bindGetApi.OnInvoke = function()
2173 return RbxApi
2174end
2175
2176bindGetAwait.OnInvoke = function()
2177 return AwaitingObjectValue
2178end
2179end))
2180ModuleScript3.Name = "RawApiJson"
2181ModuleScript3.Parent = LocalScript2
2182Frame4.Name = "Header"
2183Frame4.Parent = Frame1
2184Frame4.Position = UDim2.new(0, 0, 0, -36)
2185Frame4.Size = UDim2.new(1, 0, 0, 36)
2186Frame4.BackgroundColor = BrickColor.new("Lily white")
2187Frame4.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
2188Frame4.BorderColor = BrickColor.new("Sand violet metallic")
2189Frame4.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
2190Frame4.BorderSizePixel = 0
2191TextLabel5.Parent = Frame4
2192TextLabel5.Position = UDim2.new(0, 4, 0, 0)
2193TextLabel5.Transparency = 1
2194TextLabel5.Size = UDim2.new(1, -4, 0.5, 0)
2195TextLabel5.BackgroundTransparency = 1
2196TextLabel5.Font = Enum.Font.SourceSans
2197TextLabel5.FontSize = Enum.FontSize.Size14
2198TextLabel5.Text = "Properties"
2199TextLabel5.TextColor = BrickColor.new("Really black")
2200TextLabel5.TextColor3 = Color3.new(0, 0, 0)
2201TextLabel5.TextSize = 14
2202TextLabel5.TextXAlignment = Enum.TextXAlignment.Left
2203TextBox6.Parent = Frame4
2204TextBox6.Position = UDim2.new(0, 4, 0.5, 0)
2205TextBox6.Transparency = 0.80000001192093
2206TextBox6.Size = UDim2.new(1, -8, 0.5, -3)
2207TextBox6.BackgroundTransparency = 0.80000001192093
2208TextBox6.Font = Enum.Font.SourceSans
2209TextBox6.FontSize = Enum.FontSize.Size14
2210TextBox6.Text = "Search Properties"
2211TextBox6.TextColor = BrickColor.new("Really black")
2212TextBox6.TextColor3 = Color3.new(0, 0, 0)
2213TextBox6.TextSize = 14
2214TextBox6.TextXAlignment = Enum.TextXAlignment.Left
2215BindableFunction7.Name = "GetApi"
2216BindableFunction7.Parent = Frame1
2217BindableFunction8.Name = "GetAwaiting"
2218BindableFunction8.Parent = Frame1
2219BindableEvent9.Name = "SetAwaiting"
2220BindableEvent9.Parent = Frame1
2221Frame10.Name = "ExplorerPanel"
2222Frame10.Parent = ScreenGui0
2223Frame10.Position = UDim2.new(1, 0, 0, 0)
2224Frame10.Transparency = 0.10000000149012
2225Frame10.Size = UDim2.new(0, 300, 0.5, 0)
2226Frame10.BackgroundColor = BrickColor.new("Institutional white")
2227Frame10.BackgroundColor3 = Color3.new(1, 1, 1)
2228Frame10.BackgroundTransparency = 0.10000000149012
2229Frame10.BorderColor = BrickColor.new("Sand violet metallic")
2230Frame10.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
2231Frame10.BorderSizePixel = 0
2232BindableEvent11.Name = "SelectionChanged"
2233BindableEvent11.Parent = Frame10
2234BindableFunction12.Name = "SetOption"
2235BindableFunction12.Parent = Frame10
2236BindableFunction13.Name = "SetSelection"
2237BindableFunction13.Parent = Frame10
2238BindableFunction14.Name = "GetOption"
2239BindableFunction14.Parent = Frame10
2240BindableFunction15.Name = "GetSelection"
2241BindableFunction15.Parent = Frame10
2242LocalScript16.Parent = Frame10
2243table.insert(cors,sandbox(LocalScript16,function()
2244-- initial states
2245local Option = {
2246 -- can modify object parents in the hierarchy
2247 Modifiable = false;
2248 -- can select objects
2249 Selectable = true;
2250}
2251
2252-- MERELY
2253
2254Option.Modifiable = true
2255
2256-- END MERELY
2257
2258-- general size of GUI objects, in pixels
2259local GUI_SIZE = 16
2260-- padding between items within each entry
2261local ENTRY_PADDING = 1
2262-- padding between each entry
2263local ENTRY_MARGIN = 1
2264
2265local explorerPanel = script.Parent
2266local Input = game:GetService("UserInputService")
2267local HoldingCtrl = false
2268local HoldingShift = false
2269
2270local DexOutput = Instance.new("Folder")
2271DexOutput.Name = "Output"
2272local DexOutputMain = Instance.new("ScreenGui", DexOutput)
2273DexOutputMain.Name = "Dex Output"
2274
2275print = 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
2282end
2283
2284explorerPanel:WaitForChild("GetPrint").OnInvoke = function()
2285 return print
2286end
2287
2288
2289--[[
2290
2291# Explorer Panel
2292
2293A 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
2401local ENTRY_SIZE = GUI_SIZE + ENTRY_PADDING*2
2402local ENTRY_BOUND = ENTRY_SIZE + ENTRY_MARGIN
2403local HEADER_SIZE = ENTRY_SIZE*2
2404
2405local FONT = 'SourceSans'
2406local 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
2415end
2416
2417local 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
2439local MAP_ID = 483448923
2440
2441-- Indices based on implementation of Icon function.
2442local ACTION_CUT = 160
2443local ACTION_COPY = 161
2444local ACTION_PASTE = 162
2445local ACTION_DELETE = 163
2446local ACTION_SORT = 164
2447local ACTION_CUT_OVER = 174
2448local ACTION_COPY_OVER = 175
2449local ACTION_PASTE_OVER = 176
2450local ACTION_DELETE_OVER = 177
2451local ACTION_SORT_OVER = 178
2452local ACTION_EDITQUICKACCESS = 190
2453local ACTION_FREEZE = 188
2454local ACTION_STARRED = 189
2455local ACTION_ADDSTAR = 184
2456local ACTION_ADDSTAR_OVER = 187
2457
2458local NODE_COLLAPSED = 165
2459local NODE_EXPANDED = 166
2460local NODE_COLLAPSED_OVER = 179
2461local NODE_EXPANDED_OVER = 180
2462
2463local 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
2677function 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
2692end
2693
2694local barActive = false
2695local activeOptions = {}
2696
2697function 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
2730end
2731
2732-- Connects a function to an event such that it fires asynchronously
2733function Connect(event,func)
2734 return event:connect(function(...)
2735 local a = {...}
2736 spawn(function() func(unpack(a)) end)
2737 end)
2738end
2739
2740-- returns the ascendant ScreenGui of an object
2741function 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
2748end
2749
2750do
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
2776end
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)
2784local 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
2825end
2826
2827----------------------------------------------------------------
2828----------------------------------------------------------------
2829----------------------------------------------------------------
2830----------------------------------------------------------------
2831---- ScrollBar
2832do
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
3318end
3319
3320----------------------------------------------------------------
3321----------------------------------------------------------------
3322----------------------------------------------------------------
3323----------------------------------------------------------------
3324---- Explorer panel
3325
3326Create(explorerPanel,{
3327 BackgroundColor3 = GuiColor.Field;
3328 BorderColor3 = GuiColor.Border;
3329 Active = true;
3330})
3331
3332local SettingsRemote = explorerPanel.Parent:WaitForChild("SettingsPanel"):WaitForChild("GetSetting")
3333local GetApiRemote = explorerPanel.Parent:WaitForChild("PropertiesFrame"):WaitForChild("GetApi")
3334local GetAwaitRemote = explorerPanel.Parent:WaitForChild("PropertiesFrame"):WaitForChild("GetAwaiting")
3335local bindSetAwaiting = explorerPanel.Parent:WaitForChild("PropertiesFrame"):WaitForChild("SetAwaiting")
3336
3337local SaveInstanceWindow = explorerPanel.Parent:WaitForChild("SaveInstance")
3338local ConfirmationWindow = explorerPanel.Parent:WaitForChild("Confirmation")
3339local CautionWindow = explorerPanel.Parent:WaitForChild("Caution")
3340local TableCautionWindow = explorerPanel.Parent:WaitForChild("TableCaution")
3341
3342local RemoteWindow = explorerPanel.Parent:WaitForChild("CallRemote")
3343
3344local ScriptEditor = explorerPanel.Parent:WaitForChild("ScriptEditor")
3345local ScriptEditorEvent = ScriptEditor:WaitForChild("OpenScript")
3346
3347local CurrentSaveInstanceWindow
3348local CurrentRemoteWindow
3349
3350local lastSelectedNode
3351
3352local DexStorage
3353local DexStorageMain
3354local DexStorageEnabled
3355
3356if saveinstance then DexStorageEnabled = true end
3357
3358if DexStorageEnabled then
3359 DexStorage = Instance.new("Folder")
3360 DexStorage.Name = "Dex"
3361 DexStorageMain = Instance.new("Folder",DexStorage)
3362 DexStorageMain.Name = "DexStorage"
3363end
3364
3365local NilStorage
3366local NilStorageMain
3367local NilStorageEnabled
3368
3369if get_nil_instances and IfThisFunctionWasStableEnough then NilStorageEnabled = true end
3370
3371if NilStorageEnabled then
3372 NilStorage = Instance.new("Folder")
3373 NilStorage.Name = "Dex Internal Storage"
3374 NilStorageMain = Instance.new("Folder",NilStorage)
3375 NilStorageMain.Name = "Nil Instances"
3376end
3377
3378local 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
3387local scrollBar = ScrollBar(false)
3388scrollBar.PageIncrement = 1
3389Create(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
3395local scrollBarH = ScrollBar(true)
3396scrollBarH.PageIncrement = GUI_SIZE
3397Create(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
3404local 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
3423local 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});
3433explorerFilter.Parent = headerFrame
3434
3435SetZIndexOnChanged(explorerPanel)
3436
3437local function CreateColor3(r, g, b) return Color3.new(r/255,g/255,b/255) end
3438
3439local Styles = {
3440 Font = Enum.Font.Arial;
3441 Margin = 5;
3442 Black = CreateColor3(0,0,0);
3443 White = CreateColor3(255,255,255);
3444}
3445
3446local 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
3461local 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
3476local currentRightClickMenu
3477local CurrentInsertObjectWindow
3478local CurrentFunctionCallerWindow
3479
3480local RbxApi
3481
3482function 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
3489end
3490
3491function 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
3500end
3501
3502local function sortAlphabetic(t, property)
3503 table.sort(t,
3504 function(x,y) return x[property] < y[property]
3505 end)
3506end
3507
3508local 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
3518end
3519
3520local 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
3539end
3540
3541function 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
3554end
3555
3556function 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
3643end
3644
3645function 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
3729end
3730
3731function 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
3740end
3741
3742function 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
3768end
3769
3770function 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
3822end
3823
3824function 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
3903end
3904
3905function 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
3916end
3917
3918local clipboard = {}
3919local function delete(o)
3920 o.Parent = nil
3921end
3922
3923local 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
3940end
3941
3942local nameScanned = false
3943-- Holds the game tree converted to a list.
3944local TreeList = {}
3945-- Matches objects to their tree node representation.
3946local NodeLookup = {}
3947
3948local nodeWidth = 0
3949
3950local QuickButtons = {}
3951
3952function filteringWorkspace()
3953 if explorerFilter.Text ~= "" and explorerFilter.Text ~= "Filter Workspace" then
3954 return true
3955 end
3956 return false
3957end
3958
3959function 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
3964end
3965
3966function 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
3974end
3975
3976function 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
3984end
3985
3986local 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
4055end
4056
4057local 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
4214end
4215
4216function 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)
4224end
4225
4226function 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)
4248end
4249
4250local 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
4263end
4264
4265local 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
4323end
4324
4325local 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
4386end
4387
4388function 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)
4487end
4488
4489function 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)
4579end
4580
4581function 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
4589end
4590
4591function 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
4745end
4746
4747local function cancelReparentDrag()end
4748local function cancelSelectDrag()end
4749do
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)
5188end
5189
5190----------------------------------------------------------------
5191----------------------------------------------------------------
5192----------------------------------------------------------------
5193----------------------------------------------------------------
5194---- Object detection
5195
5196-- Inserts `v` into `t` at `i`. Also sets `Index` field in `v`.
5197local 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
5205end
5206
5207-- Removes `i` from `t`. Also sets `Index` field in removed value.
5208local 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
5218end
5219
5220-- Returns how deep `o` is in the tree.
5221local function depth(o)
5222 local d = -1
5223 while o do
5224 o = o.Parent
5225 d = d + 1
5226 end
5227 return d
5228end
5229
5230
5231local connLookup = {}
5232
5233-- Returns whether a node would be present in the tree list
5234local 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
5242end
5243
5244-- Removes an object's tree node. Called when the object stops existing in the
5245-- game tree.
5246local 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
5267end
5268
5269-- Moves a tree node to a new parent. Called when an existing object's parent
5270-- changes.
5271local 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
5303end
5304
5305-- ScriptContext['/Libraries/LibraryRegistration/LibraryRegistration']
5306-- This RobloxLocked object lets me index its properties for some reason
5307
5308local function check(object)
5309 return object.AncestryChanged
5310end
5311
5312-- Creates a new tree node from an object. Called when an object starts
5313-- existing in the game tree.
5314local 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
5357end
5358
5359local 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
5369end
5370
5371local 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
5380end
5381
5382local 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 --]]
5409end
5410
5411local dexStorageDebounce = false
5412local dexStorageListeners = {}
5413
5414local 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 --]]
5441end
5442
5443function 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
5454end
5455
5456do
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()
5564end
5565
5566----------------------------------------------------------------
5567----------------------------------------------------------------
5568----------------------------------------------------------------
5569----------------------------------------------------------------
5570---- Actions
5571
5572local 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")
5700end
5701
5702----------------------------------------------------------------
5703----------------------------------------------------------------
5704----------------------------------------------------------------
5705----------------------------------------------------------------
5706---- Option Bindables
5707
5708do
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
5755end
5756
5757function SelectionVar()
5758 return Selection
5759end
5760
5761Input.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
5768end)
5769
5770Input.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
5777end)
5778
5779while RbxApi == nil do
5780 RbxApi = GetApiRemote:Invoke()
5781 wait()
5782end
5783
5784explorerFilter.Changed:connect(function(prop)
5785 if prop == "Text" then
5786 rawUpdateList()
5787 end
5788end)
5789
5790CurrentInsertObjectWindow = 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)
5803end))
5804BindableFunction17.Name = "GetPrint"
5805BindableFunction17.Parent = Frame10
5806LocalScript18.Name = "Selection"
5807LocalScript18.Parent = ScreenGui0
5808table.insert(cors,sandbox(LocalScript18,function()
5809local Gui = script.Parent
5810
5811local IntroFrame = Gui:WaitForChild("IntroFrame")
5812
5813local SideMenu = Gui:WaitForChild("SideMenu")
5814local OpenToggleButton = Gui:WaitForChild("Toggle")
5815local CloseToggleButton = SideMenu:WaitForChild("Toggle")
5816local OpenScriptEditorButton = SideMenu:WaitForChild("OpenScriptEditor")
5817
5818local ScriptEditor = Gui:WaitForChild("ScriptEditor")
5819
5820local SlideOut = SideMenu:WaitForChild("SlideOut")
5821local SlideFrame = SlideOut:WaitForChild("SlideFrame")
5822local Slant = SideMenu:WaitForChild("Slant")
5823
5824local ExplorerButton = SlideFrame:WaitForChild("Explorer")
5825local SettingsButton = SlideFrame:WaitForChild("Settings")
5826
5827local SelectionBox = Instance.new("SelectionBox")
5828SelectionBox.Parent = Gui
5829
5830local ExplorerPanel = Gui:WaitForChild("ExplorerPanel")
5831local PropertiesFrame = Gui:WaitForChild("PropertiesFrame")
5832local SaveMapWindow = Gui:WaitForChild("SaveMapWindow")
5833local RemoteDebugWindow = Gui:WaitForChild("RemoteDebugWindow")
5834
5835local SettingsPanel = Gui:WaitForChild("SettingsPanel")
5836local AboutPanel = Gui:WaitForChild("About")
5837local SettingsListener = SettingsPanel:WaitForChild("GetSetting")
5838local SettingTemplate = SettingsPanel:WaitForChild("SettingTemplate")
5839local SettingList = SettingsPanel:WaitForChild("SettingList")
5840
5841local SaveMapCopyList = SaveMapWindow:WaitForChild("CopyList")
5842local SaveMapSettingFrame = SaveMapWindow:WaitForChild("MapSettings")
5843local SaveMapName = SaveMapWindow:WaitForChild("FileName")
5844local SaveMapButton = SaveMapWindow:WaitForChild("Save")
5845local SaveMapCopyTemplate = SaveMapWindow:WaitForChild("Entry")
5846local 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--[[
5863local ClickSelectOption = SettingsPanel:WaitForChild("ClickSelect"):WaitForChild("Change")
5864local SelectionBoxOption = SettingsPanel:WaitForChild("SelectionBox"):WaitForChild("Change")
5865local ClearPropsOption = SettingsPanel:WaitForChild("ClearProperties"):WaitForChild("Change")
5866local SelectUngroupedOption = SettingsPanel:WaitForChild("SelectUngrouped"):WaitForChild("Change")
5867--]]
5868
5869local SelectionChanged = ExplorerPanel:WaitForChild("SelectionChanged")
5870local GetSelection = ExplorerPanel:WaitForChild("GetSelection")
5871local SetSelection = ExplorerPanel:WaitForChild("SetSelection")
5872
5873local Player = game:GetService("Players").LocalPlayer
5874local Mouse = Player:GetMouse()
5875
5876local CurrentWindow = "Nothing c:"
5877local Windows = {
5878 Explorer = {
5879 ExplorerPanel,
5880 PropertiesFrame
5881 },
5882 Settings = {SettingsPanel},
5883 SaveMap = {SaveMapWindow},
5884 Remotes = {RemoteDebugWindow},
5885 About = {AboutPanel},
5886}
5887
5888function 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
5917end
5918
5919function 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
5929end
5930
5931local Settings = {
5932 ClickSelect = false,
5933 SelBox = false,
5934 ClearProps = false,
5935 SelectUngrouped = true,
5936 SaveInstanceScripts = true
5937}
5938
5939function ReturnSetting(set)
5940 if set == "ClearProps" then
5941 return Settings.ClearProps
5942 elseif set == "SelectUngrouped" then
5943 return Settings.SelectUngrouped
5944 end
5945end
5946
5947OpenToggleButton.MouseButton1Up:connect(function()
5948 toggleDex(true)
5949end)
5950
5951OpenScriptEditorButton.MouseButton1Up:connect(function()
5952 if OpenScriptEditorButton.Active then
5953 ScriptEditor.Visible = true
5954 end
5955end)
5956
5957CloseToggleButton.MouseButton1Up:connect(function()
5958 if CloseToggleButton.Active then
5959 toggleDex(false)
5960 end
5961end)
5962
5963--[[
5964OpenToggleButton.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)
5975end)
5976
5977CloseToggleButton.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)
5985end)
5986--]]
5987
5988--[[
5989ExplorerButton.MouseButton1Up:connect(function()
5990 switchWindows("Explorer")
5991end)
5992
5993SettingsButton.MouseButton1Up:connect(function()
5994 switchWindows("Settings")
5995end)
5996--]]
5997
5998for 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)
6005end
6006
6007--[[
6008ExplorerButton.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
6016end)
6017
6018SettingsButton.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
6026end)
6027--]]
6028
6029function 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
6058end
6059
6060createSetting("Click part to select","ClickSelect",false)
6061createSetting("Selection Box","SelBox",false)
6062createSetting("Clear property value on focus","ClearProps",false)
6063createSetting("Select ungrouped models","SelectUngrouped",true)
6064createSetting("SaveInstance decompiles scripts","SaveInstanceScripts",true)
6065
6066--[[
6067ClickSelectOption.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
6075end)
6076
6077SelectionBoxOption.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
6086end)
6087
6088ClearPropsOption.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
6096end)
6097
6098SelectUngroupedOption.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
6106end)
6107--]]
6108
6109local 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
6116end
6117
6118Mouse.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
6125end)
6126
6127SelectionChanged.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
6137end)
6138
6139SettingsListener.OnInvoke = ReturnSetting
6140
6141-- Map Copier
6142
6143function 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
6168end
6169
6170function 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
6193end
6194
6195createMapSetting(SaveMapSettingFrame.Scripts,"SaveScripts",true)
6196createMapSetting(SaveMapSettingFrame.Terrain,"SaveTerrain",true)
6197createMapSetting(SaveMapSettingFrame.Lighting,"LightingProperties",true)
6198createMapSetting(SaveMapSettingFrame.CameraInstances,"CameraInstances",true)
6199
6200createCopyWhatSetting("Workspace")
6201createCopyWhatSetting("Lighting")
6202createCopyWhatSetting("ReplicatedStorage")
6203createCopyWhatSetting("ReplicatedFirst")
6204createCopyWhatSetting("StarterPack")
6205createCopyWhatSetting("StarterGui")
6206createCopyWhatSetting("StarterPlayer")
6207
6208SaveMapName.Text = tostring(game.PlaceId).."MapCopy"
6209
6210SaveMapButton.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"
6371end)
6372
6373-- End Copier
6374
6375wait()
6376
6377IntroFrame:TweenPosition(UDim2.new(1,-301,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
6378
6379switchWindows("Explorer")
6380
6381wait(1)
6382
6383SideMenu.Visible = true
6384
6385for 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()
6394end
6395
6396IntroFrame.Visible = false
6397
6398SlideFrame:TweenPosition(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
6399OpenScriptEditorButton:TweenPosition(UDim2.new(0,0,0,150),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
6400CloseToggleButton:TweenPosition(UDim2.new(0,0,0,180),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
6401Slant:TweenPosition(UDim2.new(0,0,0,210),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
6402
6403wait(0.5)
6404
6405for i = 1,0,-0.1 do
6406 OpenScriptEditorButton.Icon.ImageTransparency = i
6407 CloseToggleButton.TextTransparency = i
6408 wait()
6409end
6410
6411CloseToggleButton.Active = true
6412CloseToggleButton.AutoButtonColor = true
6413
6414OpenScriptEditorButton.Active = true
6415OpenScriptEditorButton.AutoButtonColor = true
6416end))
6417Frame19.Name = "SideMenu"
6418Frame19.Parent = ScreenGui0
6419Frame19.Position = UDim2.new(1, -330, 0, 0)
6420Frame19.Visible = false
6421Frame19.Transparency = 1
6422Frame19.Size = UDim2.new(0, 30, 0, 180)
6423Frame19.BackgroundColor = BrickColor.new("Lily white")
6424Frame19.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
6425Frame19.BackgroundTransparency = 1
6426Frame19.BorderColor = BrickColor.new("Sand violet metallic")
6427Frame19.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
6428Frame19.BorderSizePixel = 0
6429Frame19.ZIndex = 2
6430TextButton20.Name = "Toggle"
6431TextButton20.Parent = Frame19
6432TextButton20.Position = UDim2.new(0, 0, 0, 60)
6433TextButton20.Size = UDim2.new(0, 30, 0, 30)
6434TextButton20.Active = false
6435TextButton20.BackgroundColor = BrickColor.new("Lily white")
6436TextButton20.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
6437TextButton20.BorderSizePixel = 0
6438TextButton20.AutoButtonColor = false
6439TextButton20.Font = Enum.Font.SourceSans
6440TextButton20.FontSize = Enum.FontSize.Size24
6441TextButton20.Text = ">"
6442TextButton20.TextSize = 24
6443TextButton20.TextTransparency = 1
6444TextButton20.TextWrap = true
6445TextButton20.TextWrapped = true
6446TextLabel21.Name = "Title"
6447TextLabel21.Parent = Frame19
6448TextLabel21.Transparency = 1
6449TextLabel21.Size = UDim2.new(0, 30, 0, 20)
6450TextLabel21.BackgroundColor = BrickColor.new("Institutional white")
6451TextLabel21.BackgroundColor3 = Color3.new(1, 1, 1)
6452TextLabel21.BackgroundTransparency = 1
6453TextLabel21.ZIndex = 2
6454TextLabel21.Font = Enum.Font.SourceSansBold
6455TextLabel21.FontSize = Enum.FontSize.Size14
6456TextLabel21.Text = "DEX"
6457TextLabel21.TextSize = 14
6458TextLabel21.TextWrap = true
6459TextLabel21.TextWrapped = true
6460TextLabel22.Name = "Version"
6461TextLabel22.Parent = Frame19
6462TextLabel22.Position = UDim2.new(0, 0, 0, 15)
6463TextLabel22.Transparency = 1
6464TextLabel22.Size = UDim2.new(0, 30, 0, 20)
6465TextLabel22.BackgroundColor = BrickColor.new("Institutional white")
6466TextLabel22.BackgroundColor3 = Color3.new(1, 1, 1)
6467TextLabel22.BackgroundTransparency = 1
6468TextLabel22.ZIndex = 2
6469TextLabel22.Font = Enum.Font.SourceSansBold
6470TextLabel22.FontSize = Enum.FontSize.Size12
6471TextLabel22.Text = "v3"
6472TextLabel22.TextSize = 12
6473TextLabel22.TextWrap = true
6474TextLabel22.TextWrapped = true
6475ImageLabel23.Name = "Slant"
6476ImageLabel23.Parent = Frame19
6477ImageLabel23.Position = UDim2.new(0, 0, 0, 90)
6478ImageLabel23.Rotation = 180
6479ImageLabel23.Transparency = 1
6480ImageLabel23.Size = UDim2.new(0, 30, 0, 30)
6481ImageLabel23.BackgroundColor = BrickColor.new("Institutional white")
6482ImageLabel23.BackgroundColor3 = Color3.new(1, 1, 1)
6483ImageLabel23.BackgroundTransparency = 1
6484ImageLabel23.Image = "rbxassetid://1513966937"
6485ImageLabel23.ImageColor3 = Color3.new(0.913726, 0.913726, 0.913726)
6486Frame24.Name = "Main"
6487Frame24.Parent = Frame19
6488Frame24.Size = UDim2.new(0, 30, 0, 30)
6489Frame24.BackgroundColor = BrickColor.new("Lily white")
6490Frame24.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
6491Frame24.BorderSizePixel = 0
6492Frame25.Name = "SlideOut"
6493Frame25.Parent = Frame19
6494Frame25.Position = UDim2.new(0, 0, 0, 30)
6495Frame25.Transparency = 1
6496Frame25.Size = UDim2.new(0, 30, 0, 150)
6497Frame25.BackgroundColor = BrickColor.new("Quill grey")
6498Frame25.BackgroundColor3 = Color3.new(0.862745, 0.862745, 0.862745)
6499Frame25.BackgroundTransparency = 1
6500Frame25.BorderSizePixel = 0
6501Frame25.ClipsDescendants = true
6502Frame26.Name = "SlideFrame"
6503Frame26.Parent = Frame25
6504Frame26.Position = UDim2.new(0, 0, 0, -120)
6505Frame26.Size = UDim2.new(0, 30, 0, 120)
6506Frame26.BackgroundColor = BrickColor.new("Quill grey")
6507Frame26.BackgroundColor3 = Color3.new(0.862745, 0.862745, 0.862745)
6508Frame26.BorderSizePixel = 0
6509TextButton27.Name = "Explorer"
6510TextButton27.Parent = Frame26
6511TextButton27.Position = UDim2.new(0, 0, 0, 90)
6512TextButton27.Transparency = 1
6513TextButton27.Size = UDim2.new(0, 30, 0, 30)
6514TextButton27.BackgroundColor = BrickColor.new("Institutional white")
6515TextButton27.BackgroundColor3 = Color3.new(1, 1, 1)
6516TextButton27.BackgroundTransparency = 1
6517TextButton27.BorderSizePixel = 0
6518TextButton27.AutoButtonColor = false
6519TextButton27.Font = Enum.Font.SourceSans
6520TextButton27.FontSize = Enum.FontSize.Size24
6521TextButton27.Text = ""
6522TextButton27.TextSize = 24
6523ImageLabel28.Name = "Icon"
6524ImageLabel28.Parent = TextButton27
6525ImageLabel28.Position = UDim2.new(0, 5, 0, 5)
6526ImageLabel28.Transparency = 1
6527ImageLabel28.Size = UDim2.new(0, 20, 0, 20)
6528ImageLabel28.BackgroundColor = BrickColor.new("Institutional white")
6529ImageLabel28.BackgroundColor3 = Color3.new(1, 1, 1)
6530ImageLabel28.BackgroundTransparency = 1
6531ImageLabel28.ZIndex = 2
6532ImageLabel28.Image = "rbxassetid://472635937"
6533ImageLabel28.ImageColor3 = Color3.new(0.27451, 0.27451, 0.27451)
6534TextButton29.Name = "SaveMap"
6535TextButton29.Parent = Frame26
6536TextButton29.Position = UDim2.new(0, 0, 0, 60)
6537TextButton29.Transparency = 1
6538TextButton29.Size = UDim2.new(0, 30, 0, 30)
6539TextButton29.BackgroundColor = BrickColor.new("Institutional white")
6540TextButton29.BackgroundColor3 = Color3.new(1, 1, 1)
6541TextButton29.BackgroundTransparency = 1
6542TextButton29.BorderSizePixel = 0
6543TextButton29.AutoButtonColor = false
6544TextButton29.Font = Enum.Font.SourceSans
6545TextButton29.FontSize = Enum.FontSize.Size24
6546TextButton29.Text = ""
6547TextButton29.TextSize = 24
6548ImageLabel30.Name = "Icon"
6549ImageLabel30.Parent = TextButton29
6550ImageLabel30.Position = UDim2.new(0, 5, 0, 5)
6551ImageLabel30.Transparency = 1
6552ImageLabel30.Size = UDim2.new(0, 20, 0, 20)
6553ImageLabel30.BackgroundColor = BrickColor.new("Institutional white")
6554ImageLabel30.BackgroundColor3 = Color3.new(1, 1, 1)
6555ImageLabel30.BackgroundTransparency = 1
6556ImageLabel30.ZIndex = 2
6557ImageLabel30.Image = "rbxassetid://472636337"
6558ImageLabel30.ImageColor3 = Color3.new(0.27451, 0.27451, 0.27451)
6559TextButton31.Name = "Settings"
6560TextButton31.Parent = Frame26
6561TextButton31.Position = UDim2.new(0, 0, 0, 30)
6562TextButton31.Transparency = 1
6563TextButton31.Size = UDim2.new(0, 30, 0, 30)
6564TextButton31.BackgroundColor = BrickColor.new("Institutional white")
6565TextButton31.BackgroundColor3 = Color3.new(1, 1, 1)
6566TextButton31.BackgroundTransparency = 1
6567TextButton31.BorderSizePixel = 0
6568TextButton31.AutoButtonColor = false
6569TextButton31.Font = Enum.Font.SourceSans
6570TextButton31.FontSize = Enum.FontSize.Size24
6571TextButton31.Text = ""
6572TextButton31.TextSize = 24
6573ImageLabel32.Name = "Icon"
6574ImageLabel32.Parent = TextButton31
6575ImageLabel32.Position = UDim2.new(0, 5, 0, 5)
6576ImageLabel32.Transparency = 1
6577ImageLabel32.Size = UDim2.new(0, 20, 0, 20)
6578ImageLabel32.BackgroundColor = BrickColor.new("Institutional white")
6579ImageLabel32.BackgroundColor3 = Color3.new(1, 1, 1)
6580ImageLabel32.BackgroundTransparency = 1
6581ImageLabel32.ZIndex = 2
6582ImageLabel32.Image = "rbxassetid://472635774"
6583ImageLabel32.ImageColor3 = Color3.new(0.27451, 0.27451, 0.27451)
6584TextButton33.Name = "About"
6585TextButton33.Parent = Frame26
6586TextButton33.Transparency = 1
6587TextButton33.Size = UDim2.new(0, 30, 0, 30)
6588TextButton33.BackgroundColor = BrickColor.new("Institutional white")
6589TextButton33.BackgroundColor3 = Color3.new(1, 1, 1)
6590TextButton33.BackgroundTransparency = 1
6591TextButton33.BorderSizePixel = 0
6592TextButton33.AutoButtonColor = false
6593TextButton33.Font = Enum.Font.SourceSans
6594TextButton33.FontSize = Enum.FontSize.Size24
6595TextButton33.Text = ""
6596TextButton33.TextSize = 24
6597ImageLabel34.Name = "Icon"
6598ImageLabel34.Parent = TextButton33
6599ImageLabel34.Position = UDim2.new(0, 5, 0, 5)
6600ImageLabel34.Transparency = 1
6601ImageLabel34.Size = UDim2.new(0, 20, 0, 20)
6602ImageLabel34.BackgroundColor = BrickColor.new("Institutional white")
6603ImageLabel34.BackgroundColor3 = Color3.new(1, 1, 1)
6604ImageLabel34.BackgroundTransparency = 1
6605ImageLabel34.ZIndex = 2
6606ImageLabel34.Image = "rbxassetid://476354004"
6607ImageLabel34.ImageColor3 = Color3.new(0.27451, 0.27451, 0.27451)
6608TextButton35.Name = "OpenScriptEditor"
6609TextButton35.Parent = Frame19
6610TextButton35.Position = UDim2.new(0, 0, 0, 30)
6611TextButton35.Size = UDim2.new(0, 30, 0, 30)
6612TextButton35.Active = false
6613TextButton35.BackgroundColor = BrickColor.new("Lily white")
6614TextButton35.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
6615TextButton35.BorderSizePixel = 0
6616TextButton35.AutoButtonColor = false
6617TextButton35.Font = Enum.Font.SourceSans
6618TextButton35.FontSize = Enum.FontSize.Size24
6619TextButton35.Text = ""
6620TextButton35.TextSize = 24
6621ImageLabel36.Name = "Icon"
6622ImageLabel36.Parent = TextButton35
6623ImageLabel36.Position = UDim2.new(0, 5, 0, 5)
6624ImageLabel36.Transparency = 1
6625ImageLabel36.Size = UDim2.new(0, 20, 0, 20)
6626ImageLabel36.BackgroundColor = BrickColor.new("Institutional white")
6627ImageLabel36.BackgroundColor3 = Color3.new(1, 1, 1)
6628ImageLabel36.BackgroundTransparency = 1
6629ImageLabel36.BorderSizePixel = 0
6630ImageLabel36.ZIndex = 2
6631ImageLabel36.Image = "rbxassetid://475456048"
6632ImageLabel36.ImageColor3 = Color3.new(0.105882, 0.164706, 0.207843)
6633ImageLabel36.ImageTransparency = 1
6634Frame37.Name = "SettingsPanel"
6635Frame37.Parent = ScreenGui0
6636Frame37.Position = UDim2.new(1, 0, 0, 0)
6637Frame37.Transparency = 0.10000000149012
6638Frame37.Size = UDim2.new(0, 300, 1, 0)
6639Frame37.BackgroundColor = BrickColor.new("Institutional white")
6640Frame37.BackgroundColor3 = Color3.new(1, 1, 1)
6641Frame37.BackgroundTransparency = 0.10000000149012
6642Frame37.BorderColor = BrickColor.new("Light grey")
6643Frame37.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
6644Frame37.BorderSizePixel = 0
6645Frame38.Name = "Header"
6646Frame38.Parent = Frame37
6647Frame38.Size = UDim2.new(1, 0, 0, 17)
6648Frame38.BackgroundColor = BrickColor.new("Lily white")
6649Frame38.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
6650Frame38.BorderColor = BrickColor.new("Sand violet metallic")
6651Frame38.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
6652Frame38.BorderSizePixel = 0
6653TextLabel39.Parent = Frame38
6654TextLabel39.Position = UDim2.new(0, 4, 0, 0)
6655TextLabel39.Transparency = 1
6656TextLabel39.Size = UDim2.new(1, -4, 1, 0)
6657TextLabel39.BackgroundTransparency = 1
6658TextLabel39.BorderSizePixel = 0
6659TextLabel39.Font = Enum.Font.SourceSans
6660TextLabel39.FontSize = Enum.FontSize.Size14
6661TextLabel39.Text = "Settings"
6662TextLabel39.TextColor = BrickColor.new("Really black")
6663TextLabel39.TextColor3 = Color3.new(0, 0, 0)
6664TextLabel39.TextSize = 14
6665TextLabel39.TextXAlignment = Enum.TextXAlignment.Left
6666BindableFunction40.Name = "GetSetting"
6667BindableFunction40.Parent = Frame37
6668Frame41.Name = "SettingTemplate"
6669Frame41.Parent = Frame37
6670Frame41.Position = UDim2.new(0, 0, 0, 18)
6671Frame41.Visible = false
6672Frame41.Transparency = 1
6673Frame41.Size = UDim2.new(1, 0, 0, 60)
6674Frame41.BackgroundColor = BrickColor.new("Institutional white")
6675Frame41.BackgroundColor3 = Color3.new(1, 1, 1)
6676Frame41.BackgroundTransparency = 1
6677TextLabel42.Name = "SName"
6678TextLabel42.Parent = Frame41
6679TextLabel42.Position = UDim2.new(0, 10, 0, 0)
6680TextLabel42.Transparency = 1
6681TextLabel42.Size = UDim2.new(1, -20, 0, 30)
6682TextLabel42.BackgroundColor = BrickColor.new("Institutional white")
6683TextLabel42.BackgroundColor3 = Color3.new(1, 1, 1)
6684TextLabel42.BackgroundTransparency = 1
6685TextLabel42.Font = Enum.Font.SourceSans
6686TextLabel42.FontSize = Enum.FontSize.Size18
6687TextLabel42.Text = "SettingName"
6688TextLabel42.TextSize = 18
6689TextLabel42.TextXAlignment = Enum.TextXAlignment.Left
6690TextLabel43.Name = "Status"
6691TextLabel43.Parent = Frame41
6692TextLabel43.Position = UDim2.new(0, 60, 0, 30)
6693TextLabel43.Transparency = 1
6694TextLabel43.Size = UDim2.new(0, 50, 0, 15)
6695TextLabel43.BackgroundColor = BrickColor.new("Institutional white")
6696TextLabel43.BackgroundColor3 = Color3.new(1, 1, 1)
6697TextLabel43.BackgroundTransparency = 1
6698TextLabel43.Font = Enum.Font.SourceSans
6699TextLabel43.FontSize = Enum.FontSize.Size18
6700TextLabel43.Text = "Off"
6701TextLabel43.TextSize = 18
6702TextLabel43.TextXAlignment = Enum.TextXAlignment.Left
6703TextButton44.Name = "Change"
6704TextButton44.Parent = Frame41
6705TextButton44.Position = UDim2.new(0, 10, 0, 30)
6706TextButton44.Size = UDim2.new(0, 40, 0, 15)
6707TextButton44.BackgroundColor = BrickColor.new("Quill grey")
6708TextButton44.BackgroundColor3 = Color3.new(0.862745, 0.862745, 0.862745)
6709TextButton44.BorderSizePixel = 0
6710TextButton44.Font = Enum.Font.SourceSans
6711TextButton44.FontSize = Enum.FontSize.Size14
6712TextButton44.Text = ""
6713TextButton44.TextSize = 14
6714TextLabel45.Name = "OnBar"
6715TextLabel45.Parent = TextButton44
6716TextLabel45.Size = UDim2.new(0, 0, 0, 15)
6717TextLabel45.BackgroundColor = BrickColor.new("Electric blue")
6718TextLabel45.BackgroundColor3 = Color3.new(0, 0.576471, 0.862745)
6719TextLabel45.BorderSizePixel = 0
6720TextLabel45.Font = Enum.Font.SourceSans
6721TextLabel45.FontSize = Enum.FontSize.Size14
6722TextLabel45.Text = ""
6723TextLabel45.TextSize = 14
6724TextLabel46.Name = "Bar"
6725TextLabel46.Parent = TextButton44
6726TextLabel46.Position = UDim2.new(0, -2, 0, -2)
6727TextLabel46.Size = UDim2.new(0, 10, 0, 19)
6728TextLabel46.BackgroundColor = BrickColor.new("Really black")
6729TextLabel46.BackgroundColor3 = Color3.new(0, 0, 0)
6730TextLabel46.BorderSizePixel = 0
6731TextLabel46.ClipsDescendants = true
6732TextLabel46.Font = Enum.Font.SourceSans
6733TextLabel46.FontSize = Enum.FontSize.Size14
6734TextLabel46.Text = ""
6735TextLabel46.TextSize = 14
6736Frame47.Name = "SettingList"
6737Frame47.Parent = Frame37
6738Frame47.Position = UDim2.new(0, 0, 0, 17)
6739Frame47.Transparency = 1
6740Frame47.Size = UDim2.new(1, 0, 1, -17)
6741Frame47.BackgroundColor = BrickColor.new("Institutional white")
6742Frame47.BackgroundColor3 = Color3.new(1, 1, 1)
6743Frame47.BackgroundTransparency = 1
6744Frame48.Name = "SaveInstance"
6745Frame48.Parent = ScreenGui0
6746Frame48.Position = UDim2.new(0.300000012, 0, 0.300000012, 0)
6747Frame48.Visible = false
6748Frame48.Size = UDim2.new(0, 350, 0, 20)
6749Frame48.Active = true
6750Frame48.BackgroundColor = BrickColor.new("Lily white")
6751Frame48.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
6752Frame48.BorderColor = BrickColor.new("Sand violet metallic")
6753Frame48.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
6754Frame48.BorderSizePixel = 0
6755Frame48.Draggable = true
6756Frame48.ZIndex = 2
6757TextLabel49.Name = "Title"
6758TextLabel49.Parent = Frame48
6759TextLabel49.Transparency = 1
6760TextLabel49.Size = UDim2.new(1, 0, 1, 0)
6761TextLabel49.BackgroundTransparency = 1
6762TextLabel49.ZIndex = 2
6763TextLabel49.Font = Enum.Font.SourceSans
6764TextLabel49.FontSize = Enum.FontSize.Size14
6765TextLabel49.Text = "Save Instance"
6766TextLabel49.TextColor = BrickColor.new("Really black")
6767TextLabel49.TextColor3 = Color3.new(0, 0, 0)
6768TextLabel49.TextSize = 14
6769TextLabel49.TextXAlignment = Enum.TextXAlignment.Left
6770Frame50.Name = "MainWindow"
6771Frame50.Parent = Frame48
6772Frame50.Transparency = 0.10000000149012
6773Frame50.Size = UDim2.new(1, 0, 0, 200)
6774Frame50.BackgroundColor = BrickColor.new("Institutional white")
6775Frame50.BackgroundColor3 = Color3.new(1, 1, 1)
6776Frame50.BackgroundTransparency = 0.10000000149012
6777Frame50.BorderColor = BrickColor.new("Light grey")
6778Frame50.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
6779TextButton51.Name = "Save"
6780TextButton51.Parent = Frame50
6781TextButton51.Position = UDim2.new(0.075000003, 0, 1, -40)
6782TextButton51.Transparency = 0.5
6783TextButton51.Size = UDim2.new(0.400000006, 0, 0, 30)
6784TextButton51.BackgroundColor = BrickColor.new("Institutional white")
6785TextButton51.BackgroundColor3 = Color3.new(1, 1, 1)
6786TextButton51.BackgroundTransparency = 0.5
6787TextButton51.BorderColor = BrickColor.new("Really black")
6788TextButton51.BorderColor3 = Color3.new(0, 0, 0)
6789TextButton51.Font = Enum.Font.SourceSans
6790TextButton51.FontSize = Enum.FontSize.Size18
6791TextButton51.Text = "Save"
6792TextButton51.TextSize = 18
6793TextLabel52.Name = "Desc"
6794TextLabel52.Parent = Frame50
6795TextLabel52.Position = UDim2.new(0, 0, 0, 20)
6796TextLabel52.Transparency = 1
6797TextLabel52.Size = UDim2.new(1, 0, 0, 40)
6798TextLabel52.BackgroundColor = BrickColor.new("Institutional white")
6799TextLabel52.BackgroundColor3 = Color3.new(1, 1, 1)
6800TextLabel52.BackgroundTransparency = 1
6801TextLabel52.Font = Enum.Font.SourceSans
6802TextLabel52.FontSize = Enum.FontSize.Size14
6803TextLabel52.Text = "This will save an instance to your PC. Type in the name for your instance. (.rbxmx will be added automatically.)"
6804TextLabel52.TextSize = 14
6805TextLabel52.TextWrap = true
6806TextLabel52.TextWrapped = true
6807TextButton53.Name = "Cancel"
6808TextButton53.Parent = Frame50
6809TextButton53.Position = UDim2.new(0.524999976, 0, 1, -40)
6810TextButton53.Transparency = 0.5
6811TextButton53.Size = UDim2.new(0.400000006, 0, 0, 30)
6812TextButton53.BackgroundColor = BrickColor.new("Institutional white")
6813TextButton53.BackgroundColor3 = Color3.new(1, 1, 1)
6814TextButton53.BackgroundTransparency = 0.5
6815TextButton53.BorderColor = BrickColor.new("Really black")
6816TextButton53.BorderColor3 = Color3.new(0, 0, 0)
6817TextButton53.Font = Enum.Font.SourceSans
6818TextButton53.FontSize = Enum.FontSize.Size18
6819TextButton53.Text = "Cancel"
6820TextButton53.TextSize = 18
6821TextBox54.Name = "FileName"
6822TextBox54.Parent = Frame50
6823TextBox54.Position = UDim2.new(0.075000003, 0, 0.400000006, 0)
6824TextBox54.Transparency = 0.20000000298023
6825TextBox54.Size = UDim2.new(0.850000024, 0, 0, 30)
6826TextBox54.BackgroundColor = BrickColor.new("Institutional white")
6827TextBox54.BackgroundColor3 = Color3.new(1, 1, 1)
6828TextBox54.BackgroundTransparency = 0.20000000298023
6829TextBox54.Font = Enum.Font.SourceSans
6830TextBox54.FontSize = Enum.FontSize.Size18
6831TextBox54.Text = ""
6832TextBox54.TextSize = 18
6833TextBox54.TextXAlignment = Enum.TextXAlignment.Left
6834TextButton55.Name = "SaveObjects"
6835TextButton55.Parent = Frame50
6836TextButton55.Position = UDim2.new(0.075000003, 0, 0.625, 0)
6837TextButton55.Transparency = 0.60000002384186
6838TextButton55.Size = UDim2.new(0, 20, 0, 20)
6839TextButton55.BackgroundColor = BrickColor.new("Institutional white")
6840TextButton55.BackgroundColor3 = Color3.new(1, 1, 1)
6841TextButton55.BackgroundTransparency = 0.60000002384186
6842TextButton55.ZIndex = 2
6843TextButton55.Font = Enum.Font.SourceSans
6844TextButton55.FontSize = Enum.FontSize.Size18
6845TextButton55.Text = ""
6846TextButton55.TextColor = BrickColor.new("Institutional white")
6847TextButton55.TextColor3 = Color3.new(1, 1, 1)
6848TextButton55.TextSize = 18
6849TextLabel56.Name = "enabled"
6850TextLabel56.Parent = TextButton55
6851TextLabel56.Position = UDim2.new(0, 3, 0, 3)
6852TextLabel56.Transparency = 0.40000000596046
6853TextLabel56.Size = UDim2.new(0, 14, 0, 14)
6854TextLabel56.BackgroundColor = BrickColor.new("Dark stone grey")
6855TextLabel56.BackgroundColor3 = Color3.new(0.380392, 0.380392, 0.380392)
6856TextLabel56.BackgroundTransparency = 0.40000000596046
6857TextLabel56.BorderSizePixel = 0
6858TextLabel56.Font = Enum.Font.SourceSans
6859TextLabel56.FontSize = Enum.FontSize.Size14
6860TextLabel56.Text = ""
6861TextLabel56.TextSize = 14
6862TextLabel57.Name = "Desc2"
6863TextLabel57.Parent = Frame50
6864TextLabel57.Position = UDim2.new(0.075000003, 30, 0.625, 0)
6865TextLabel57.Transparency = 1
6866TextLabel57.Size = UDim2.new(0.925000012, -30, 0, 20)
6867TextLabel57.BackgroundColor = BrickColor.new("Institutional white")
6868TextLabel57.BackgroundColor3 = Color3.new(1, 1, 1)
6869TextLabel57.BackgroundTransparency = 1
6870TextLabel57.Font = Enum.Font.SourceSans
6871TextLabel57.FontSize = Enum.FontSize.Size14
6872TextLabel57.Text = "Save "Object" type values"
6873TextLabel57.TextSize = 14
6874TextLabel57.TextXAlignment = Enum.TextXAlignment.Left
6875Frame58.Name = "Confirmation"
6876Frame58.Parent = ScreenGui0
6877Frame58.Position = UDim2.new(0.5, -175, 0.5, -75)
6878Frame58.Visible = false
6879Frame58.Size = UDim2.new(0, 350, 0, 20)
6880Frame58.Active = true
6881Frame58.BackgroundColor = BrickColor.new("Lily white")
6882Frame58.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
6883Frame58.BorderColor = BrickColor.new("Sand violet metallic")
6884Frame58.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
6885Frame58.BorderSizePixel = 0
6886Frame58.Draggable = true
6887Frame58.ZIndex = 3
6888TextLabel59.Name = "Title"
6889TextLabel59.Parent = Frame58
6890TextLabel59.Transparency = 1
6891TextLabel59.Size = UDim2.new(1, 0, 1, 0)
6892TextLabel59.BackgroundTransparency = 1
6893TextLabel59.ZIndex = 3
6894TextLabel59.Font = Enum.Font.SourceSans
6895TextLabel59.FontSize = Enum.FontSize.Size14
6896TextLabel59.Text = "Confirm"
6897TextLabel59.TextColor = BrickColor.new("Really black")
6898TextLabel59.TextColor3 = Color3.new(0, 0, 0)
6899TextLabel59.TextSize = 14
6900TextLabel59.TextXAlignment = Enum.TextXAlignment.Left
6901Frame60.Name = "MainWindow"
6902Frame60.Parent = Frame58
6903Frame60.Transparency = 0.10000000149012
6904Frame60.Size = UDim2.new(1, 0, 0, 150)
6905Frame60.BackgroundColor = BrickColor.new("Institutional white")
6906Frame60.BackgroundColor3 = Color3.new(1, 1, 1)
6907Frame60.BackgroundTransparency = 0.10000000149012
6908Frame60.BorderColor = BrickColor.new("Light grey")
6909Frame60.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
6910Frame60.ZIndex = 2
6911TextButton61.Name = "Yes"
6912TextButton61.Parent = Frame60
6913TextButton61.Position = UDim2.new(0.075000003, 0, 1, -40)
6914TextButton61.Transparency = 0.5
6915TextButton61.Size = UDim2.new(0.400000006, 0, 0, 30)
6916TextButton61.BackgroundColor = BrickColor.new("Institutional white")
6917TextButton61.BackgroundColor3 = Color3.new(1, 1, 1)
6918TextButton61.BackgroundTransparency = 0.5
6919TextButton61.BorderColor = BrickColor.new("Really black")
6920TextButton61.BorderColor3 = Color3.new(0, 0, 0)
6921TextButton61.ZIndex = 2
6922TextButton61.Font = Enum.Font.SourceSans
6923TextButton61.FontSize = Enum.FontSize.Size18
6924TextButton61.Text = "Yes"
6925TextButton61.TextSize = 18
6926TextLabel62.Name = "Desc"
6927TextLabel62.Parent = Frame60
6928TextLabel62.Position = UDim2.new(0, 0, 0, 20)
6929TextLabel62.Transparency = 1
6930TextLabel62.Size = UDim2.new(1, 0, 0, 40)
6931TextLabel62.BackgroundColor = BrickColor.new("Institutional white")
6932TextLabel62.BackgroundColor3 = Color3.new(1, 1, 1)
6933TextLabel62.BackgroundTransparency = 1
6934TextLabel62.ZIndex = 2
6935TextLabel62.Font = Enum.Font.SourceSans
6936TextLabel62.FontSize = Enum.FontSize.Size14
6937TextLabel62.Text = "The file, FILENAME, already exists. Overwrite?"
6938TextLabel62.TextSize = 14
6939TextLabel62.TextWrap = true
6940TextLabel62.TextWrapped = true
6941TextButton63.Name = "No"
6942TextButton63.Parent = Frame60
6943TextButton63.Position = UDim2.new(0.524999976, 0, 1, -40)
6944TextButton63.Transparency = 0.5
6945TextButton63.Size = UDim2.new(0.400000006, 0, 0, 30)
6946TextButton63.BackgroundColor = BrickColor.new("Institutional white")
6947TextButton63.BackgroundColor3 = Color3.new(1, 1, 1)
6948TextButton63.BackgroundTransparency = 0.5
6949TextButton63.BorderColor = BrickColor.new("Really black")
6950TextButton63.BorderColor3 = Color3.new(0, 0, 0)
6951TextButton63.ZIndex = 2
6952TextButton63.Font = Enum.Font.SourceSans
6953TextButton63.FontSize = Enum.FontSize.Size18
6954TextButton63.Text = "No"
6955TextButton63.TextSize = 18
6956Frame64.Name = "Caution"
6957Frame64.Parent = ScreenGui0
6958Frame64.Position = UDim2.new(0.5, -175, 0.5, -75)
6959Frame64.Visible = false
6960Frame64.Size = UDim2.new(0, 350, 0, 20)
6961Frame64.Active = true
6962Frame64.BackgroundColor = BrickColor.new("Lily white")
6963Frame64.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
6964Frame64.BorderColor = BrickColor.new("Sand violet metallic")
6965Frame64.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
6966Frame64.BorderSizePixel = 0
6967Frame64.Draggable = true
6968Frame64.ZIndex = 5
6969TextLabel65.Name = "Title"
6970TextLabel65.Parent = Frame64
6971TextLabel65.Transparency = 1
6972TextLabel65.Size = UDim2.new(1, 0, 1, 0)
6973TextLabel65.BackgroundTransparency = 1
6974TextLabel65.ZIndex = 5
6975TextLabel65.Font = Enum.Font.SourceSans
6976TextLabel65.FontSize = Enum.FontSize.Size14
6977TextLabel65.Text = "Caution"
6978TextLabel65.TextColor = BrickColor.new("Really black")
6979TextLabel65.TextColor3 = Color3.new(0, 0, 0)
6980TextLabel65.TextSize = 14
6981TextLabel65.TextXAlignment = Enum.TextXAlignment.Left
6982Frame66.Name = "MainWindow"
6983Frame66.Parent = Frame64
6984Frame66.Transparency = 0.10000000149012
6985Frame66.Size = UDim2.new(1, 0, 0, 150)
6986Frame66.BackgroundColor = BrickColor.new("Institutional white")
6987Frame66.BackgroundColor3 = Color3.new(1, 1, 1)
6988Frame66.BackgroundTransparency = 0.10000000149012
6989Frame66.BorderColor = BrickColor.new("Light grey")
6990Frame66.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
6991Frame66.ZIndex = 4
6992TextLabel67.Name = "Desc"
6993TextLabel67.Parent = Frame66
6994TextLabel67.Position = UDim2.new(0, 0, 0, 20)
6995TextLabel67.Transparency = 1
6996TextLabel67.Size = UDim2.new(1, 0, 0, 42)
6997TextLabel67.BackgroundColor = BrickColor.new("Institutional white")
6998TextLabel67.BackgroundColor3 = Color3.new(1, 1, 1)
6999TextLabel67.BackgroundTransparency = 1
7000TextLabel67.ZIndex = 4
7001TextLabel67.Font = Enum.Font.SourceSans
7002TextLabel67.FontSize = Enum.FontSize.Size14
7003TextLabel67.Text = "The file, FILENAME, already exists. Overwrite?"
7004TextLabel67.TextSize = 14
7005TextLabel67.TextWrap = true
7006TextLabel67.TextWrapped = true
7007TextButton68.Name = "Ok"
7008TextButton68.Parent = Frame66
7009TextButton68.Position = UDim2.new(0.300000012, 0, 1, -40)
7010TextButton68.Transparency = 0.5
7011TextButton68.Size = UDim2.new(0.400000006, 0, 0, 30)
7012TextButton68.BackgroundColor = BrickColor.new("Institutional white")
7013TextButton68.BackgroundColor3 = Color3.new(1, 1, 1)
7014TextButton68.BackgroundTransparency = 0.5
7015TextButton68.BorderColor = BrickColor.new("Really black")
7016TextButton68.BorderColor3 = Color3.new(0, 0, 0)
7017TextButton68.ZIndex = 4
7018TextButton68.Font = Enum.Font.SourceSans
7019TextButton68.FontSize = Enum.FontSize.Size18
7020TextButton68.Text = "Ok"
7021TextButton68.TextSize = 18
7022Frame69.Name = "CallRemote"
7023Frame69.Parent = ScreenGui0
7024Frame69.Position = UDim2.new(0.5, -175, 0.5, -100)
7025Frame69.Visible = false
7026Frame69.Size = UDim2.new(0, 350, 0, 20)
7027Frame69.Active = true
7028Frame69.BackgroundColor = BrickColor.new("Lily white")
7029Frame69.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
7030Frame69.BorderColor = BrickColor.new("Sand violet metallic")
7031Frame69.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7032Frame69.BorderSizePixel = 0
7033Frame69.Draggable = true
7034Frame69.ZIndex = 2
7035TextLabel70.Name = "Title"
7036TextLabel70.Parent = Frame69
7037TextLabel70.Transparency = 1
7038TextLabel70.Size = UDim2.new(1, 0, 1, 0)
7039TextLabel70.BackgroundTransparency = 1
7040TextLabel70.ZIndex = 2
7041TextLabel70.Font = Enum.Font.SourceSans
7042TextLabel70.FontSize = Enum.FontSize.Size14
7043TextLabel70.Text = "Call Remote"
7044TextLabel70.TextColor = BrickColor.new("Really black")
7045TextLabel70.TextColor3 = Color3.new(0, 0, 0)
7046TextLabel70.TextSize = 14
7047TextLabel70.TextXAlignment = Enum.TextXAlignment.Left
7048Frame71.Name = "MainWindow"
7049Frame71.Parent = Frame69
7050Frame71.Transparency = 0.10000000149012
7051Frame71.Size = UDim2.new(1, 0, 0, 200)
7052Frame71.BackgroundColor = BrickColor.new("Institutional white")
7053Frame71.BackgroundColor3 = Color3.new(1, 1, 1)
7054Frame71.BackgroundTransparency = 0.10000000149012
7055Frame71.BorderColor = BrickColor.new("Light grey")
7056Frame71.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
7057TextLabel72.Name = "Desc"
7058TextLabel72.Parent = Frame71
7059TextLabel72.Position = UDim2.new(0, 0, 0, 20)
7060TextLabel72.Transparency = 1
7061TextLabel72.Size = UDim2.new(1, 0, 0, 20)
7062TextLabel72.BackgroundColor = BrickColor.new("Institutional white")
7063TextLabel72.BackgroundColor3 = Color3.new(1, 1, 1)
7064TextLabel72.BackgroundTransparency = 1
7065TextLabel72.Font = Enum.Font.SourceSans
7066TextLabel72.FontSize = Enum.FontSize.Size14
7067TextLabel72.Text = "Arguments"
7068TextLabel72.TextSize = 14
7069TextLabel72.TextWrap = true
7070TextLabel72.TextWrapped = true
7071ScrollingFrame73.Name = "Arguments"
7072ScrollingFrame73.Parent = Frame71
7073ScrollingFrame73.Position = UDim2.new(0, 0, 0, 40)
7074ScrollingFrame73.Transparency = 1
7075ScrollingFrame73.Size = UDim2.new(1, 0, 0, 80)
7076ScrollingFrame73.BackgroundColor = BrickColor.new("Institutional white")
7077ScrollingFrame73.BackgroundColor3 = Color3.new(1, 1, 1)
7078ScrollingFrame73.BackgroundTransparency = 1
7079ScrollingFrame73.BottomImage = "rbxasset://textures/blackBkg_square.png"
7080ScrollingFrame73.CanvasSize = UDim2.new(0, 0, 0, 0)
7081ScrollingFrame73.MidImage = "rbxasset://textures/blackBkg_square.png"
7082ScrollingFrame73.ScrollingDirection = Enum.ScrollingDirection.Y
7083ScrollingFrame73.TopImage = "rbxasset://textures/blackBkg_square.png"
7084TextButton74.Name = "DisplayReturned"
7085TextButton74.Parent = Frame71
7086TextButton74.Position = UDim2.new(0.075000003, 0, 0.625, 0)
7087TextButton74.Transparency = 0.60000002384186
7088TextButton74.Size = UDim2.new(0, 20, 0, 20)
7089TextButton74.BackgroundColor = BrickColor.new("Institutional white")
7090TextButton74.BackgroundColor3 = Color3.new(1, 1, 1)
7091TextButton74.BackgroundTransparency = 0.60000002384186
7092TextButton74.ZIndex = 2
7093TextButton74.Font = Enum.Font.SourceSans
7094TextButton74.FontSize = Enum.FontSize.Size18
7095TextButton74.Text = ""
7096TextButton74.TextColor = BrickColor.new("Institutional white")
7097TextButton74.TextColor3 = Color3.new(1, 1, 1)
7098TextButton74.TextSize = 18
7099TextLabel75.Name = "enabled"
7100TextLabel75.Parent = TextButton74
7101TextLabel75.Position = UDim2.new(0, 3, 0, 3)
7102TextLabel75.Visible = false
7103TextLabel75.Transparency = 0.40000000596046
7104TextLabel75.Size = UDim2.new(0, 14, 0, 14)
7105TextLabel75.BackgroundColor = BrickColor.new("Dark stone grey")
7106TextLabel75.BackgroundColor3 = Color3.new(0.380392, 0.380392, 0.380392)
7107TextLabel75.BackgroundTransparency = 0.40000000596046
7108TextLabel75.BorderSizePixel = 0
7109TextLabel75.Font = Enum.Font.SourceSans
7110TextLabel75.FontSize = Enum.FontSize.Size14
7111TextLabel75.Text = ""
7112TextLabel75.TextSize = 14
7113TextLabel76.Name = "Desc2"
7114TextLabel76.Parent = Frame71
7115TextLabel76.Position = UDim2.new(0.075000003, 30, 0.625, 0)
7116TextLabel76.Transparency = 1
7117TextLabel76.Size = UDim2.new(0.925000012, -30, 0, 20)
7118TextLabel76.BackgroundColor = BrickColor.new("Institutional white")
7119TextLabel76.BackgroundColor3 = Color3.new(1, 1, 1)
7120TextLabel76.BackgroundTransparency = 1
7121TextLabel76.Font = Enum.Font.SourceSans
7122TextLabel76.FontSize = Enum.FontSize.Size14
7123TextLabel76.Text = "Display values returned"
7124TextLabel76.TextSize = 14
7125TextLabel76.TextXAlignment = Enum.TextXAlignment.Left
7126TextButton77.Name = "Add"
7127TextButton77.Parent = Frame71
7128TextButton77.Position = UDim2.new(0.800000012, 0, 0.625, 0)
7129TextButton77.Transparency = 0.5
7130TextButton77.Size = UDim2.new(0, 20, 0, 20)
7131TextButton77.BackgroundColor = BrickColor.new("Institutional white")
7132TextButton77.BackgroundColor3 = Color3.new(1, 1, 1)
7133TextButton77.BackgroundTransparency = 0.5
7134TextButton77.BorderColor = BrickColor.new("Really black")
7135TextButton77.BorderColor3 = Color3.new(0, 0, 0)
7136TextButton77.Font = Enum.Font.SourceSansBold
7137TextButton77.FontSize = Enum.FontSize.Size24
7138TextButton77.Text = "+"
7139TextButton77.TextSize = 24
7140TextButton78.Name = "Subtract"
7141TextButton78.Parent = Frame71
7142TextButton78.Position = UDim2.new(0.899999976, 0, 0.625, 0)
7143TextButton78.Transparency = 0.5
7144TextButton78.Size = UDim2.new(0, 20, 0, 20)
7145TextButton78.BackgroundColor = BrickColor.new("Institutional white")
7146TextButton78.BackgroundColor3 = Color3.new(1, 1, 1)
7147TextButton78.BackgroundTransparency = 0.5
7148TextButton78.BorderColor = BrickColor.new("Really black")
7149TextButton78.BorderColor3 = Color3.new(0, 0, 0)
7150TextButton78.Font = Enum.Font.SourceSansBold
7151TextButton78.FontSize = Enum.FontSize.Size24
7152TextButton78.Text = "-"
7153TextButton78.TextSize = 24
7154Frame79.Name = "ArgumentTemplate"
7155Frame79.Parent = Frame71
7156Frame79.Visible = false
7157Frame79.Transparency = 0.5
7158Frame79.Size = UDim2.new(1, 0, 0, 20)
7159Frame79.BackgroundColor = BrickColor.new("Institutional white")
7160Frame79.BackgroundColor3 = Color3.new(1, 1, 1)
7161Frame79.BackgroundTransparency = 0.5
7162Frame79.BorderColor = BrickColor.new("Light grey")
7163Frame79.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
7164TextButton80.Name = "Type"
7165TextButton80.Parent = Frame79
7166TextButton80.Transparency = 0.89999997615814
7167TextButton80.Size = UDim2.new(0.400000006, 0, 0, 20)
7168TextButton80.BackgroundColor = BrickColor.new("Institutional white")
7169TextButton80.BackgroundColor3 = Color3.new(1, 1, 1)
7170TextButton80.BackgroundTransparency = 0.89999997615814
7171TextButton80.BorderColor = BrickColor.new("Really black")
7172TextButton80.BorderColor3 = Color3.new(0, 0, 0)
7173TextButton80.Font = Enum.Font.SourceSans
7174TextButton80.FontSize = Enum.FontSize.Size18
7175TextButton80.Text = "Script"
7176TextButton80.TextSize = 18
7177TextBox81.Name = "Value"
7178TextBox81.Parent = Frame79
7179TextBox81.Position = UDim2.new(0.400000006, 0, 0, 0)
7180TextBox81.Transparency = 0.89999997615814
7181TextBox81.Size = UDim2.new(0.600000024, -12, 0, 20)
7182TextBox81.BackgroundColor = BrickColor.new("Institutional white")
7183TextBox81.BackgroundColor3 = Color3.new(1, 1, 1)
7184TextBox81.BackgroundTransparency = 0.89999997615814
7185TextBox81.Font = Enum.Font.SourceSans
7186TextBox81.FontSize = Enum.FontSize.Size14
7187TextBox81.Text = ""
7188TextBox81.TextSize = 14
7189TextBox81.TextXAlignment = Enum.TextXAlignment.Left
7190TextButton82.Name = "Cancel"
7191TextButton82.Parent = Frame71
7192TextButton82.Position = UDim2.new(0.524999976, 0, 1, -40)
7193TextButton82.Transparency = 0.5
7194TextButton82.Size = UDim2.new(0.400000006, 0, 0, 30)
7195TextButton82.BackgroundColor = BrickColor.new("Institutional white")
7196TextButton82.BackgroundColor3 = Color3.new(1, 1, 1)
7197TextButton82.BackgroundTransparency = 0.5
7198TextButton82.BorderColor = BrickColor.new("Really black")
7199TextButton82.BorderColor3 = Color3.new(0, 0, 0)
7200TextButton82.Font = Enum.Font.SourceSans
7201TextButton82.FontSize = Enum.FontSize.Size18
7202TextButton82.Text = "Cancel"
7203TextButton82.TextSize = 18
7204TextButton83.Name = "Ok"
7205TextButton83.Parent = Frame71
7206TextButton83.Position = UDim2.new(0.075000003, 0, 1, -40)
7207TextButton83.Transparency = 0.5
7208TextButton83.Size = UDim2.new(0.400000006, 0, 0, 30)
7209TextButton83.BackgroundColor = BrickColor.new("Institutional white")
7210TextButton83.BackgroundColor3 = Color3.new(1, 1, 1)
7211TextButton83.BackgroundTransparency = 0.5
7212TextButton83.BorderColor = BrickColor.new("Really black")
7213TextButton83.BorderColor3 = Color3.new(0, 0, 0)
7214TextButton83.Font = Enum.Font.SourceSans
7215TextButton83.FontSize = Enum.FontSize.Size18
7216TextButton83.Text = "Call"
7217TextButton83.TextSize = 18
7218Frame84.Name = "TableCaution"
7219Frame84.Parent = ScreenGui0
7220Frame84.Position = UDim2.new(0.300000012, 0, 0.300000012, 0)
7221Frame84.Visible = false
7222Frame84.Size = UDim2.new(0, 350, 0, 20)
7223Frame84.Active = true
7224Frame84.BackgroundColor = BrickColor.new("Lily white")
7225Frame84.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
7226Frame84.BorderColor = BrickColor.new("Sand violet metallic")
7227Frame84.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7228Frame84.BorderSizePixel = 0
7229Frame84.Draggable = true
7230Frame84.ZIndex = 2
7231Frame85.Name = "MainWindow"
7232Frame85.Parent = Frame84
7233Frame85.Transparency = 0.10000000149012
7234Frame85.Size = UDim2.new(1, 0, 0, 150)
7235Frame85.BackgroundColor = BrickColor.new("Institutional white")
7236Frame85.BackgroundColor3 = Color3.new(1, 1, 1)
7237Frame85.BackgroundTransparency = 0.10000000149012
7238Frame85.BorderColor = BrickColor.new("Light grey")
7239Frame85.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
7240TextButton86.Name = "Ok"
7241TextButton86.Parent = Frame85
7242TextButton86.Position = UDim2.new(0.300000012, 0, 1, -40)
7243TextButton86.Transparency = 0.5
7244TextButton86.Size = UDim2.new(0.400000006, 0, 0, 30)
7245TextButton86.BackgroundColor = BrickColor.new("Institutional white")
7246TextButton86.BackgroundColor3 = Color3.new(1, 1, 1)
7247TextButton86.BackgroundTransparency = 0.5
7248TextButton86.BorderColor = BrickColor.new("Really black")
7249TextButton86.BorderColor3 = Color3.new(0, 0, 0)
7250TextButton86.Font = Enum.Font.SourceSans
7251TextButton86.FontSize = Enum.FontSize.Size18
7252TextButton86.Text = "Ok"
7253TextButton86.TextSize = 18
7254ScrollingFrame87.Name = "TableResults"
7255ScrollingFrame87.Parent = Frame85
7256ScrollingFrame87.Position = UDim2.new(0, 0, 0, 20)
7257ScrollingFrame87.Transparency = 1
7258ScrollingFrame87.Size = UDim2.new(1, 0, 0, 80)
7259ScrollingFrame87.BackgroundColor = BrickColor.new("Institutional white")
7260ScrollingFrame87.BackgroundColor3 = Color3.new(1, 1, 1)
7261ScrollingFrame87.BackgroundTransparency = 1
7262ScrollingFrame87.BottomImage = "rbxasset://textures/blackBkg_square.png"
7263ScrollingFrame87.CanvasSize = UDim2.new(0, 0, 0, 0)
7264ScrollingFrame87.MidImage = "rbxasset://textures/blackBkg_square.png"
7265ScrollingFrame87.ScrollingDirection = Enum.ScrollingDirection.Y
7266ScrollingFrame87.TopImage = "rbxasset://textures/blackBkg_square.png"
7267Frame88.Name = "TableTemplate"
7268Frame88.Parent = Frame85
7269Frame88.Visible = false
7270Frame88.Transparency = 0.5
7271Frame88.Size = UDim2.new(1, 0, 0, 20)
7272Frame88.BackgroundColor = BrickColor.new("Institutional white")
7273Frame88.BackgroundColor3 = Color3.new(1, 1, 1)
7274Frame88.BackgroundTransparency = 0.5
7275Frame88.BorderColor = BrickColor.new("Light grey")
7276Frame88.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
7277TextLabel89.Name = "Type"
7278TextLabel89.Parent = Frame88
7279TextLabel89.Transparency = 0.89999997615814
7280TextLabel89.Size = UDim2.new(0.400000006, 0, 0, 20)
7281TextLabel89.BackgroundColor = BrickColor.new("Institutional white")
7282TextLabel89.BackgroundColor3 = Color3.new(1, 1, 1)
7283TextLabel89.BackgroundTransparency = 0.89999997615814
7284TextLabel89.Font = Enum.Font.SourceSans
7285TextLabel89.FontSize = Enum.FontSize.Size18
7286TextLabel89.Text = "Script"
7287TextLabel89.TextSize = 18
7288TextLabel90.Name = "Value"
7289TextLabel90.Parent = Frame88
7290TextLabel90.Position = UDim2.new(0.400000006, 0, 0, 0)
7291TextLabel90.Transparency = 0.89999997615814
7292TextLabel90.Size = UDim2.new(0.600000024, -12, 0, 20)
7293TextLabel90.BackgroundColor = BrickColor.new("Institutional white")
7294TextLabel90.BackgroundColor3 = Color3.new(1, 1, 1)
7295TextLabel90.BackgroundTransparency = 0.89999997615814
7296TextLabel90.Font = Enum.Font.SourceSans
7297TextLabel90.FontSize = Enum.FontSize.Size14
7298TextLabel90.Text = "Script"
7299TextLabel90.TextSize = 14
7300TextLabel91.Name = "Title"
7301TextLabel91.Parent = Frame84
7302TextLabel91.Transparency = 1
7303TextLabel91.Size = UDim2.new(1, 0, 1, 0)
7304TextLabel91.BackgroundTransparency = 1
7305TextLabel91.ZIndex = 2
7306TextLabel91.Font = Enum.Font.SourceSans
7307TextLabel91.FontSize = Enum.FontSize.Size14
7308TextLabel91.Text = "Caution"
7309TextLabel91.TextColor = BrickColor.new("Really black")
7310TextLabel91.TextColor3 = Color3.new(0, 0, 0)
7311TextLabel91.TextSize = 14
7312TextLabel91.TextXAlignment = Enum.TextXAlignment.Left
7313Frame92.Name = "ScriptEditor"
7314Frame92.Parent = ScreenGui0
7315Frame92.Position = UDim2.new(0.5, -258, 0.5, -208)
7316Frame92.Visible = false
7317Frame92.Size = UDim2.new(0, 516, 0, 20)
7318Frame92.Active = true
7319Frame92.BackgroundColor = BrickColor.new("Lily white")
7320Frame92.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
7321Frame92.BorderColor = BrickColor.new("Sand violet metallic")
7322Frame92.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7323Frame92.Draggable = true
7324Frame92.ZIndex = 5
7325TextLabel93.Name = "Title"
7326TextLabel93.Parent = Frame92
7327TextLabel93.Transparency = 1
7328TextLabel93.Size = UDim2.new(1, 0, 1, 0)
7329TextLabel93.BackgroundTransparency = 1
7330TextLabel93.ZIndex = 5
7331TextLabel93.Font = Enum.Font.SourceSans
7332TextLabel93.FontSize = Enum.FontSize.Size14
7333TextLabel93.Text = "Script Viewer"
7334TextLabel93.TextColor = BrickColor.new("Really black")
7335TextLabel93.TextColor3 = Color3.new(0, 0, 0)
7336TextLabel93.TextSize = 14
7337TextLabel93.TextXAlignment = Enum.TextXAlignment.Left
7338Frame94.Name = "Cover"
7339Frame94.Parent = Frame92
7340Frame94.Position = UDim2.new(0, 0, 3, 0)
7341Frame94.Size = UDim2.new(0, 516, 0, 416)
7342Frame94.BackgroundColor = BrickColor.new("Institutional white")
7343Frame94.BackgroundColor3 = Color3.new(1, 1, 1)
7344Frame94.BorderSizePixel = 0
7345Frame95.Name = "EditorGrid"
7346Frame95.Parent = Frame92
7347Frame95.Position = UDim2.new(0, 0, 3, 0)
7348Frame95.Size = UDim2.new(0, 500, 0, 400)
7349Frame95.BackgroundColor = BrickColor.new("Institutional white")
7350Frame95.BackgroundColor3 = Color3.new(1, 1, 1)
7351Frame95.BorderSizePixel = 0
7352Frame96.Name = "TopBar"
7353Frame96.Parent = Frame92
7354Frame96.Size = UDim2.new(1, 0, 3, 0)
7355Frame96.BackgroundColor = BrickColor.new("White")
7356Frame96.BackgroundColor3 = Color3.new(0.941177, 0.941177, 0.941177)
7357Frame96.BorderColor = BrickColor.new("Sand violet metallic")
7358Frame96.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7359ImageButton97.Name = "ScriptBarLeft"
7360ImageButton97.Parent = Frame96
7361ImageButton97.Position = UDim2.new(1, -32, 0, 40)
7362ImageButton97.Size = UDim2.new(0, 16, 0, 20)
7363ImageButton97.Active = false
7364ImageButton97.BackgroundColor = BrickColor.new("Quill grey")
7365ImageButton97.BackgroundColor3 = Color3.new(0.866667, 0.866667, 0.866667)
7366ImageButton97.BorderColor = BrickColor.new("Sand violet metallic")
7367ImageButton97.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7368ImageButton97.AutoButtonColor = false
7369Frame98.Name = "Arrow Graphic"
7370Frame98.Parent = ImageButton97
7371Frame98.Position = UDim2.new(0.5, -4, 0.5, -4)
7372Frame98.Transparency = 1
7373Frame98.Size = UDim2.new(0, 8, 0, 8)
7374Frame98.BackgroundTransparency = 1
7375Frame98.BorderSizePixel = 0
7376Frame99.Name = "Graphic"
7377Frame99.Parent = Frame98
7378Frame99.Position = UDim2.new(0.25, 0, 0.375, 0)
7379Frame99.Transparency = 0.69999998807907
7380Frame99.Size = UDim2.new(0.125, 0, 0.25, 0)
7381Frame99.BackgroundColor = BrickColor.new("Sand violet metallic")
7382Frame99.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7383Frame99.BackgroundTransparency = 0.69999998807907
7384Frame99.BorderSizePixel = 0
7385Frame100.Name = "Graphic"
7386Frame100.Parent = Frame98
7387Frame100.Position = UDim2.new(0.375, 0, 0.25, 0)
7388Frame100.Transparency = 0.69999998807907
7389Frame100.Size = UDim2.new(0.125, 0, 0.5, 0)
7390Frame100.BackgroundColor = BrickColor.new("Sand violet metallic")
7391Frame100.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7392Frame100.BackgroundTransparency = 0.69999998807907
7393Frame100.BorderSizePixel = 0
7394Frame101.Name = "Graphic"
7395Frame101.Parent = Frame98
7396Frame101.Position = UDim2.new(0.5, 0, 0.125, 0)
7397Frame101.Transparency = 0.69999998807907
7398Frame101.Size = UDim2.new(0.125, 0, 0.75, 0)
7399Frame101.BackgroundColor = BrickColor.new("Sand violet metallic")
7400Frame101.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7401Frame101.BackgroundTransparency = 0.69999998807907
7402Frame101.BorderSizePixel = 0
7403Frame102.Name = "Graphic"
7404Frame102.Parent = Frame98
7405Frame102.Position = UDim2.new(0.625, 0, 0, 0)
7406Frame102.Transparency = 0.69999998807907
7407Frame102.Size = UDim2.new(0.125, 0, 1, 0)
7408Frame102.BackgroundColor = BrickColor.new("Sand violet metallic")
7409Frame102.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7410Frame102.BackgroundTransparency = 0.69999998807907
7411Frame102.BorderSizePixel = 0
7412ImageButton103.Name = "ScriptBarRight"
7413ImageButton103.Parent = Frame96
7414ImageButton103.Position = UDim2.new(1, -16, 0, 40)
7415ImageButton103.Size = UDim2.new(0, 16, 0, 20)
7416ImageButton103.Active = false
7417ImageButton103.BackgroundColor = BrickColor.new("Quill grey")
7418ImageButton103.BackgroundColor3 = Color3.new(0.866667, 0.866667, 0.866667)
7419ImageButton103.BorderColor = BrickColor.new("Sand violet metallic")
7420ImageButton103.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7421ImageButton103.AutoButtonColor = false
7422Frame104.Name = "Arrow Graphic"
7423Frame104.Parent = ImageButton103
7424Frame104.Position = UDim2.new(0.5, -4, 0.5, -4)
7425Frame104.Transparency = 1
7426Frame104.Size = UDim2.new(0, 8, 0, 8)
7427Frame104.BackgroundTransparency = 1
7428Frame104.BorderSizePixel = 0
7429Frame105.Name = "Graphic"
7430Frame105.Parent = Frame104
7431Frame105.Position = UDim2.new(0.625, 0, 0.375, 0)
7432Frame105.Transparency = 0.69999998807907
7433Frame105.Size = UDim2.new(0.125, 0, 0.25, 0)
7434Frame105.BackgroundColor = BrickColor.new("Sand violet metallic")
7435Frame105.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7436Frame105.BackgroundTransparency = 0.69999998807907
7437Frame105.BorderSizePixel = 0
7438Frame106.Name = "Graphic"
7439Frame106.Parent = Frame104
7440Frame106.Position = UDim2.new(0.5, 0, 0.25, 0)
7441Frame106.Transparency = 0.69999998807907
7442Frame106.Size = UDim2.new(0.125, 0, 0.5, 0)
7443Frame106.BackgroundColor = BrickColor.new("Sand violet metallic")
7444Frame106.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7445Frame106.BackgroundTransparency = 0.69999998807907
7446Frame106.BorderSizePixel = 0
7447Frame107.Name = "Graphic"
7448Frame107.Parent = Frame104
7449Frame107.Position = UDim2.new(0.375, 0, 0.125, 0)
7450Frame107.Transparency = 0.69999998807907
7451Frame107.Size = UDim2.new(0.125, 0, 0.75, 0)
7452Frame107.BackgroundColor = BrickColor.new("Sand violet metallic")
7453Frame107.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7454Frame107.BackgroundTransparency = 0.69999998807907
7455Frame107.BorderSizePixel = 0
7456Frame108.Name = "Graphic"
7457Frame108.Parent = Frame104
7458Frame108.Position = UDim2.new(0.25, 0, 0, 0)
7459Frame108.Transparency = 0.69999998807907
7460Frame108.Size = UDim2.new(0.125, 0, 1, 0)
7461Frame108.BackgroundColor = BrickColor.new("Sand violet metallic")
7462Frame108.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7463Frame108.BackgroundTransparency = 0.69999998807907
7464Frame108.BorderSizePixel = 0
7465TextButton109.Name = "Clipboard"
7466TextButton109.Parent = Frame96
7467TextButton109.Position = UDim2.new(0, 0, 0, 20)
7468TextButton109.Transparency = 0.5
7469TextButton109.Size = UDim2.new(0, 80, 0, 20)
7470TextButton109.BackgroundColor = BrickColor.new("Institutional white")
7471TextButton109.BackgroundColor3 = Color3.new(1, 1, 1)
7472TextButton109.BackgroundTransparency = 0.5
7473TextButton109.BorderColor = BrickColor.new("Really black")
7474TextButton109.BorderColor3 = Color3.new(0, 0, 0)
7475TextButton109.Font = Enum.Font.SourceSans
7476TextButton109.FontSize = Enum.FontSize.Size14
7477TextButton109.Text = "To Clipboard"
7478TextButton109.TextSize = 14
7479Frame110.Name = "ScriptBar"
7480Frame110.Parent = Frame96
7481Frame110.Position = UDim2.new(0, 0, 0, 40)
7482Frame110.Size = UDim2.new(1, -32, 0, 20)
7483Frame110.BackgroundColor = BrickColor.new("Mid gray")
7484Frame110.BackgroundColor3 = Color3.new(0.823529, 0.823529, 0.823529)
7485Frame110.BorderColor = BrickColor.new("Sand violet metallic")
7486Frame110.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7487Frame110.ClipsDescendants = true
7488Frame111.Name = "Entry"
7489Frame111.Parent = Frame96
7490Frame111.Visible = false
7491Frame111.Transparency = 1
7492Frame111.Size = UDim2.new(0, 100, 1, 0)
7493Frame111.BackgroundColor = BrickColor.new("Institutional white")
7494Frame111.BackgroundColor3 = Color3.new(1, 1, 1)
7495Frame111.BackgroundTransparency = 1
7496TextButton112.Name = "Button"
7497TextButton112.Parent = Frame111
7498TextButton112.Transparency = 0.60000002384186
7499TextButton112.Size = UDim2.new(1, 0, 1, 0)
7500TextButton112.BackgroundColor = BrickColor.new("Institutional white")
7501TextButton112.BackgroundColor3 = Color3.new(1, 1, 1)
7502TextButton112.BackgroundTransparency = 0.60000002384186
7503TextButton112.BorderColor = BrickColor.new("Really black")
7504TextButton112.BorderColor3 = Color3.new(0, 0, 0)
7505TextButton112.ClipsDescendants = true
7506TextButton112.ZIndex = 4
7507TextButton112.Font = Enum.Font.SourceSans
7508TextButton112.FontSize = Enum.FontSize.Size12
7509TextButton112.Text = ""
7510TextButton112.TextSize = 12
7511TextButton112.TextXAlignment = Enum.TextXAlignment.Left
7512TextButton113.Name = "Close"
7513TextButton113.Parent = Frame111
7514TextButton113.Position = UDim2.new(1, -20, 0, 0)
7515TextButton113.Transparency = 1
7516TextButton113.Size = UDim2.new(0, 20, 0, 20)
7517TextButton113.BackgroundColor = BrickColor.new("Institutional white")
7518TextButton113.BackgroundColor3 = Color3.new(1, 1, 1)
7519TextButton113.BackgroundTransparency = 1
7520TextButton113.BorderColor = BrickColor.new("Really black")
7521TextButton113.BorderColor3 = Color3.new(0, 0, 0)
7522TextButton113.ZIndex = 4
7523TextButton113.Font = Enum.Font.SourceSans
7524TextButton113.FontSize = Enum.FontSize.Size14
7525TextButton113.Text = "X"
7526TextButton113.TextSize = 14
7527BindableEvent114.Name = "OpenScript"
7528BindableEvent114.Parent = Frame92
7529LocalScript115.Parent = Frame92
7530table.insert(cors,sandbox(LocalScript115,function()
7531local top = script.Parent
7532
7533local editorGrid = top:WaitForChild("EditorGrid")
7534
7535local currentSource = ""
7536
7537local currentEditor = {
7538 x = 0,
7539 y = 0
7540}
7541
7542local userInput = game:GetService("UserInputService")
7543local mouse = game:GetService("Players").LocalPlayer:GetMouse()
7544
7545local topBar = top:WaitForChild("TopBar")
7546local scriptBar = topBar:WaitForChild("ScriptBar")
7547local scriptBarLeft = topBar:WaitForChild("ScriptBarLeft")
7548local scriptBarRight = topBar:WaitForChild("ScriptBarRight")
7549local clipboardButton = topBar:WaitForChild("Clipboard")
7550
7551local entryTemplate = topBar:WaitForChild("Entry")
7552
7553local openEvent = top:WaitForChild("OpenScript")
7554
7555local closeButton = top:WaitForChild("Close")
7556
7557local memoryScripts = {}
7558
7559local editingIndex = 0
7560
7561-- Scrollbar
7562
7563local ScrollBarWidth = 16
7564
7565local 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}
7580do
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
7595end
7596function SetZIndexOnChanged(object)
7597 return object.Changed:connect(function(p)
7598 if p == "ZIndex" then
7599 SetZIndex(object,object.ZIndex)
7600 end
7601 end)
7602end
7603function 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
7618end
7619-- returns the ascendant ScreenGui of an object
7620function 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
7627end
7628-- AutoButtonColor doesn't always reset properly
7629function ResetButtonColor(button)
7630 local active = button.Active
7631 button.Active = not active
7632 button.Active = active
7633end
7634
7635function 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
7702end
7703
7704function 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
7742end
7743
7744do
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
8113end
8114
8115-- End Scrollbar
8116
8117local scrollBar = ScrollBar(false)
8118scrollBar.PageIncrement = 16
8119Create(scrollBar.GUI,{
8120 Position = UDim2.new(1,0,0,0);
8121 Size = UDim2.new(0,ScrollBarWidth,1,0);
8122 Parent = editorGrid;
8123})
8124
8125local scrollBarH = ScrollBar(true)
8126scrollBarH.PageIncrement = 8
8127Create(scrollBarH.GUI,{
8128 Position = UDim2.new(0,0,1,0);
8129 Size = UDim2.new(1,0,0,ScrollBarWidth);
8130 Parent = editorGrid;
8131})
8132
8133local entries = {}
8134
8135local grid = {}
8136
8137local count = 1
8138local xCount = 1
8139
8140local lineSpan = 0
8141
8142for 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
8159end
8160
8161local 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
8182function 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
8193end
8194
8195function AddZeros(num,reach)
8196 local toConvert = tostring(num)
8197 while #toConvert < reach do
8198 toConvert = " "..toConvert
8199 end
8200 return toConvert
8201end
8202
8203function 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
8343end
8344
8345function 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))
8349end
8350
8351function 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))
8355end
8356
8357function 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
8365end
8366
8367function 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
8377end
8378
8379function 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
8442end
8443
8444function 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
8475end
8476
8477scriptBar.ChildAdded:connect(updateScriptBar)
8478scriptBar.ChildRemoved:connect(updateScriptBar)
8479
8480scriptBarLeft.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()
8486end)
8487
8488scriptBarRight.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()
8494end)
8495
8496mouse.Button1Down:connect(function()
8497 if checkMouseInGui(editorGrid) then
8498 --print("LETS EDIT!")
8499 end
8500end)
8501
8502openEvent.Event:connect(function(...)
8503 top.Visible = true
8504 local args = {...}
8505 if #args > 0 then
8506 openScript(args[1])
8507 end
8508end)
8509
8510clipboardButton.MouseButton1Click:connect(function()
8511 if Clipboard and Clipboard.set then
8512 Clipboard.set(currentSource)
8513 elseif CopyString then
8514 CopyString(currentSource)
8515 end
8516end)
8517
8518closeButton.MouseButton1Click:connect(function()
8519 top.Visible = false
8520end)
8521
8522--[[
8523local scr = script.Parent:WaitForChild("Scr")
8524local scr2 = script.Parent:WaitForChild("Scr2")
8525local scr3 = script.Parent:WaitForChild("Scr3")
8526local scr4 = script.Parent:WaitForChild("TOS")
8527local scr5 = script.Parent:WaitForChild("HW")
8528--]]
8529
8530buildScript("",0,0,true)
8531--[[
8532openScript(scr)
8533openScript(scr2)
8534openScript(scr3)
8535openScript(scr4)
8536openScript(scr5)
8537--]]
8538
8539scrollBar:Update()
8540scrollBarH:Update()
8541end))
8542TextButton116.Name = "Close"
8543TextButton116.Parent = Frame92
8544TextButton116.Position = UDim2.new(1, -20, 0, 0)
8545TextButton116.Transparency = 1
8546TextButton116.Size = UDim2.new(0, 20, 0, 20)
8547TextButton116.BackgroundColor = BrickColor.new("Institutional white")
8548TextButton116.BackgroundColor3 = Color3.new(1, 1, 1)
8549TextButton116.BackgroundTransparency = 1
8550TextButton116.BorderColor = BrickColor.new("Really black")
8551TextButton116.BorderColor3 = Color3.new(0, 0, 0)
8552TextButton116.ZIndex = 5
8553TextButton116.Font = Enum.Font.SourceSans
8554TextButton116.FontSize = Enum.FontSize.Size14
8555TextButton116.Text = "X"
8556TextButton116.TextSize = 14
8557Frame117.Name = "IntroFrame"
8558Frame117.Parent = ScreenGui0
8559Frame117.Position = UDim2.new(1, 30, 0, 0)
8560Frame117.Size = UDim2.new(0, 301, 1, 0)
8561Frame117.BackgroundColor = BrickColor.new("White")
8562Frame117.BackgroundColor3 = Color3.new(0.960784, 0.960784, 0.960784)
8563Frame117.BorderSizePixel = 0
8564Frame117.ZIndex = 2
8565Frame118.Name = "Main"
8566Frame118.Parent = Frame117
8567Frame118.Position = UDim2.new(0, -30, 0, 0)
8568Frame118.Size = UDim2.new(0, 30, 0, 90)
8569Frame118.BackgroundColor = BrickColor.new("White")
8570Frame118.BackgroundColor3 = Color3.new(0.960784, 0.960784, 0.960784)
8571Frame118.BorderSizePixel = 0
8572Frame118.ZIndex = 2
8573ImageLabel119.Name = "Slant"
8574ImageLabel119.Parent = Frame117
8575ImageLabel119.Position = UDim2.new(0, -30, 0, 90)
8576ImageLabel119.Rotation = 180
8577ImageLabel119.Transparency = 1
8578ImageLabel119.Size = UDim2.new(0, 30, 0, 30)
8579ImageLabel119.BackgroundColor = BrickColor.new("Institutional white")
8580ImageLabel119.BackgroundColor3 = Color3.new(1, 1, 1)
8581ImageLabel119.BackgroundTransparency = 1
8582ImageLabel119.ZIndex = 2
8583ImageLabel119.Image = "rbxassetid://1513966937"
8584ImageLabel119.ImageColor3 = Color3.new(0.960784, 0.960784, 0.960784)
8585Frame120.Name = "Main"
8586Frame120.Parent = Frame117
8587Frame120.Position = UDim2.new(0, -30, 0, 0)
8588Frame120.Size = UDim2.new(0, 30, 0, 90)
8589Frame120.BackgroundColor = BrickColor.new("White")
8590Frame120.BackgroundColor3 = Color3.new(0.960784, 0.960784, 0.960784)
8591Frame120.BorderSizePixel = 0
8592Frame120.ZIndex = 2
8593ImageLabel121.Name = "Sad"
8594ImageLabel121.Parent = Frame117
8595ImageLabel121.Position = UDim2.new(0, 50, 1, -250)
8596ImageLabel121.Transparency = 1
8597ImageLabel121.Size = UDim2.new(0, 200, 0, 200)
8598ImageLabel121.BackgroundColor = BrickColor.new("Institutional white")
8599ImageLabel121.BackgroundColor3 = Color3.new(1, 1, 1)
8600ImageLabel121.BackgroundTransparency = 1
8601ImageLabel121.ZIndex = 2
8602ImageLabel121.Image = "rbxassetid://483437370"
8603ImageLabel121.ImageColor3 = Color3.new(0.960784, 0.960784, 0.960784)
8604TextLabel122.Name = "Creator"
8605TextLabel122.Parent = Frame117
8606TextLabel122.Position = UDim2.new(0, 80, 0, 300)
8607TextLabel122.Transparency = 1
8608TextLabel122.Size = UDim2.new(0, 140, 0, 30)
8609TextLabel122.BackgroundColor = BrickColor.new("Institutional white")
8610TextLabel122.BackgroundColor3 = Color3.new(1, 1, 1)
8611TextLabel122.BackgroundTransparency = 1
8612TextLabel122.ZIndex = 2
8613TextLabel122.Font = Enum.Font.SourceSansBold
8614TextLabel122.FontSize = Enum.FontSize.Size28
8615TextLabel122.Text = "By Moon"
8616TextLabel122.TextSize = 28
8617TextLabel122.TextWrap = true
8618TextLabel122.TextWrapped = true
8619TextLabel123.Name = "Title"
8620TextLabel123.Parent = Frame117
8621TextLabel123.Position = UDim2.new(0, 100, 0, 150)
8622TextLabel123.Transparency = 1
8623TextLabel123.Size = UDim2.new(0, 100, 0, 60)
8624TextLabel123.BackgroundColor = BrickColor.new("Institutional white")
8625TextLabel123.BackgroundColor3 = Color3.new(1, 1, 1)
8626TextLabel123.BackgroundTransparency = 1
8627TextLabel123.ZIndex = 2
8628TextLabel123.Font = Enum.Font.SourceSansBold
8629TextLabel123.FontSize = Enum.FontSize.Size60
8630TextLabel123.Text = "DEX"
8631TextLabel123.TextSize = 60
8632TextLabel123.TextWrap = true
8633TextLabel123.TextWrapped = true
8634TextLabel124.Name = "Version"
8635TextLabel124.Parent = Frame117
8636TextLabel124.Position = UDim2.new(0, 100, 0, 210)
8637TextLabel124.Transparency = 1
8638TextLabel124.Size = UDim2.new(0, 100, 0, 30)
8639TextLabel124.BackgroundColor = BrickColor.new("Institutional white")
8640TextLabel124.BackgroundColor3 = Color3.new(1, 1, 1)
8641TextLabel124.BackgroundTransparency = 1
8642TextLabel124.ZIndex = 2
8643TextLabel124.Font = Enum.Font.SourceSansBold
8644TextLabel124.FontSize = Enum.FontSize.Size28
8645TextLabel124.Text = "v3"
8646TextLabel124.TextSize = 28
8647TextLabel124.TextWrap = true
8648TextLabel124.TextWrapped = true
8649Frame125.Name = "SaveMapWindow"
8650Frame125.Parent = ScreenGui0
8651Frame125.Position = UDim2.new(1, 0, 0, 0)
8652Frame125.Transparency = 0.10000000149012
8653Frame125.Size = UDim2.new(0, 300, 1, 0)
8654Frame125.BackgroundColor = BrickColor.new("Institutional white")
8655Frame125.BackgroundColor3 = Color3.new(1, 1, 1)
8656Frame125.BackgroundTransparency = 0.10000000149012
8657Frame125.BorderColor = BrickColor.new("Light grey")
8658Frame125.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
8659Frame125.BorderSizePixel = 0
8660Frame126.Name = "Header"
8661Frame126.Parent = Frame125
8662Frame126.Size = UDim2.new(1, 0, 0, 17)
8663Frame126.BackgroundColor = BrickColor.new("Lily white")
8664Frame126.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
8665Frame126.BorderColor = BrickColor.new("Sand violet metallic")
8666Frame126.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
8667Frame126.BorderSizePixel = 0
8668TextLabel127.Parent = Frame126
8669TextLabel127.Position = UDim2.new(0, 4, 0, 0)
8670TextLabel127.Transparency = 1
8671TextLabel127.Size = UDim2.new(1, -4, 1, 0)
8672TextLabel127.BackgroundTransparency = 1
8673TextLabel127.BorderSizePixel = 0
8674TextLabel127.Font = Enum.Font.SourceSans
8675TextLabel127.FontSize = Enum.FontSize.Size14
8676TextLabel127.Text = "Map Downloader"
8677TextLabel127.TextColor = BrickColor.new("Really black")
8678TextLabel127.TextColor3 = Color3.new(0, 0, 0)
8679TextLabel127.TextSize = 14
8680TextLabel127.TextXAlignment = Enum.TextXAlignment.Left
8681Frame128.Name = "MapSettings"
8682Frame128.Parent = Frame125
8683Frame128.Position = UDim2.new(0, 0, 0, 200)
8684Frame128.Transparency = 1
8685Frame128.Size = UDim2.new(1, 0, 0, 240)
8686Frame128.BackgroundColor = BrickColor.new("Institutional white")
8687Frame128.BackgroundColor3 = Color3.new(1, 1, 1)
8688Frame128.BackgroundTransparency = 1
8689Frame129.Name = "Terrain"
8690Frame129.Parent = Frame128
8691Frame129.Position = UDim2.new(0, 0, 0, 60)
8692Frame129.Transparency = 1
8693Frame129.Size = UDim2.new(1, 0, 0, 60)
8694Frame129.BackgroundColor = BrickColor.new("Institutional white")
8695Frame129.BackgroundColor3 = Color3.new(1, 1, 1)
8696Frame129.BackgroundTransparency = 1
8697TextLabel130.Name = "SName"
8698TextLabel130.Parent = Frame129
8699TextLabel130.Position = UDim2.new(0, 10, 0, 0)
8700TextLabel130.Transparency = 1
8701TextLabel130.Size = UDim2.new(1, -20, 0, 30)
8702TextLabel130.BackgroundColor = BrickColor.new("Institutional white")
8703TextLabel130.BackgroundColor3 = Color3.new(1, 1, 1)
8704TextLabel130.BackgroundTransparency = 1
8705TextLabel130.Font = Enum.Font.SourceSans
8706TextLabel130.FontSize = Enum.FontSize.Size18
8707TextLabel130.Text = "Save Terrain"
8708TextLabel130.TextSize = 18
8709TextLabel130.TextXAlignment = Enum.TextXAlignment.Left
8710TextLabel131.Name = "Status"
8711TextLabel131.Parent = Frame129
8712TextLabel131.Position = UDim2.new(0, 60, 0, 30)
8713TextLabel131.Transparency = 1
8714TextLabel131.Size = UDim2.new(0, 50, 0, 15)
8715TextLabel131.BackgroundColor = BrickColor.new("Institutional white")
8716TextLabel131.BackgroundColor3 = Color3.new(1, 1, 1)
8717TextLabel131.BackgroundTransparency = 1
8718TextLabel131.Font = Enum.Font.SourceSans
8719TextLabel131.FontSize = Enum.FontSize.Size18
8720TextLabel131.Text = "Off"
8721TextLabel131.TextSize = 18
8722TextLabel131.TextXAlignment = Enum.TextXAlignment.Left
8723TextButton132.Name = "Change"
8724TextButton132.Parent = Frame129
8725TextButton132.Position = UDim2.new(0, 10, 0, 30)
8726TextButton132.Size = UDim2.new(0, 40, 0, 15)
8727TextButton132.BackgroundColor = BrickColor.new("Quill grey")
8728TextButton132.BackgroundColor3 = Color3.new(0.862745, 0.862745, 0.862745)
8729TextButton132.BorderSizePixel = 0
8730TextButton132.Font = Enum.Font.SourceSans
8731TextButton132.FontSize = Enum.FontSize.Size14
8732TextButton132.Text = ""
8733TextButton132.TextSize = 14
8734TextLabel133.Name = "OnBar"
8735TextLabel133.Parent = TextButton132
8736TextLabel133.Size = UDim2.new(0, 0, 0, 15)
8737TextLabel133.BackgroundColor = BrickColor.new("Electric blue")
8738TextLabel133.BackgroundColor3 = Color3.new(0, 0.576471, 0.862745)
8739TextLabel133.BorderSizePixel = 0
8740TextLabel133.Font = Enum.Font.SourceSans
8741TextLabel133.FontSize = Enum.FontSize.Size14
8742TextLabel133.Text = ""
8743TextLabel133.TextSize = 14
8744TextLabel134.Name = "Bar"
8745TextLabel134.Parent = TextButton132
8746TextLabel134.Position = UDim2.new(0, -2, 0, -2)
8747TextLabel134.Size = UDim2.new(0, 10, 0, 19)
8748TextLabel134.BackgroundColor = BrickColor.new("Really black")
8749TextLabel134.BackgroundColor3 = Color3.new(0, 0, 0)
8750TextLabel134.BorderSizePixel = 0
8751TextLabel134.ClipsDescendants = true
8752TextLabel134.Font = Enum.Font.SourceSans
8753TextLabel134.FontSize = Enum.FontSize.Size14
8754TextLabel134.Text = ""
8755TextLabel134.TextSize = 14
8756Frame135.Name = "Lighting"
8757Frame135.Parent = Frame128
8758Frame135.Position = UDim2.new(0, 0, 0, 120)
8759Frame135.Transparency = 1
8760Frame135.Size = UDim2.new(1, 0, 0, 60)
8761Frame135.BackgroundColor = BrickColor.new("Institutional white")
8762Frame135.BackgroundColor3 = Color3.new(1, 1, 1)
8763Frame135.BackgroundTransparency = 1
8764TextLabel136.Name = "SName"
8765TextLabel136.Parent = Frame135
8766TextLabel136.Position = UDim2.new(0, 10, 0, 0)
8767TextLabel136.Transparency = 1
8768TextLabel136.Size = UDim2.new(1, -20, 0, 30)
8769TextLabel136.BackgroundColor = BrickColor.new("Institutional white")
8770TextLabel136.BackgroundColor3 = Color3.new(1, 1, 1)
8771TextLabel136.BackgroundTransparency = 1
8772TextLabel136.Font = Enum.Font.SourceSans
8773TextLabel136.FontSize = Enum.FontSize.Size18
8774TextLabel136.Text = "Lighting Properties"
8775TextLabel136.TextSize = 18
8776TextLabel136.TextXAlignment = Enum.TextXAlignment.Left
8777TextLabel137.Name = "Status"
8778TextLabel137.Parent = Frame135
8779TextLabel137.Position = UDim2.new(0, 60, 0, 30)
8780TextLabel137.Transparency = 1
8781TextLabel137.Size = UDim2.new(0, 50, 0, 15)
8782TextLabel137.BackgroundColor = BrickColor.new("Institutional white")
8783TextLabel137.BackgroundColor3 = Color3.new(1, 1, 1)
8784TextLabel137.BackgroundTransparency = 1
8785TextLabel137.Font = Enum.Font.SourceSans
8786TextLabel137.FontSize = Enum.FontSize.Size18
8787TextLabel137.Text = "Off"
8788TextLabel137.TextSize = 18
8789TextLabel137.TextXAlignment = Enum.TextXAlignment.Left
8790TextButton138.Name = "Change"
8791TextButton138.Parent = Frame135
8792TextButton138.Position = UDim2.new(0, 10, 0, 30)
8793TextButton138.Size = UDim2.new(0, 40, 0, 15)
8794TextButton138.BackgroundColor = BrickColor.new("Quill grey")
8795TextButton138.BackgroundColor3 = Color3.new(0.862745, 0.862745, 0.862745)
8796TextButton138.BorderSizePixel = 0
8797TextButton138.Font = Enum.Font.SourceSans
8798TextButton138.FontSize = Enum.FontSize.Size14
8799TextButton138.Text = ""
8800TextButton138.TextSize = 14
8801TextLabel139.Name = "OnBar"
8802TextLabel139.Parent = TextButton138
8803TextLabel139.Size = UDim2.new(0, 0, 0, 15)
8804TextLabel139.BackgroundColor = BrickColor.new("Electric blue")
8805TextLabel139.BackgroundColor3 = Color3.new(0, 0.576471, 0.862745)
8806TextLabel139.BorderSizePixel = 0
8807TextLabel139.Font = Enum.Font.SourceSans
8808TextLabel139.FontSize = Enum.FontSize.Size14
8809TextLabel139.Text = ""
8810TextLabel139.TextSize = 14
8811TextLabel140.Name = "Bar"
8812TextLabel140.Parent = TextButton138
8813TextLabel140.Position = UDim2.new(0, -2, 0, -2)
8814TextLabel140.Size = UDim2.new(0, 10, 0, 19)
8815TextLabel140.BackgroundColor = BrickColor.new("Really black")
8816TextLabel140.BackgroundColor3 = Color3.new(0, 0, 0)
8817TextLabel140.BorderSizePixel = 0
8818TextLabel140.ClipsDescendants = true
8819TextLabel140.Font = Enum.Font.SourceSans
8820TextLabel140.FontSize = Enum.FontSize.Size14
8821TextLabel140.Text = ""
8822TextLabel140.TextSize = 14
8823Frame141.Name = "CameraInstances"
8824Frame141.Parent = Frame128
8825Frame141.Position = UDim2.new(0, 0, 0, 180)
8826Frame141.Transparency = 1
8827Frame141.Size = UDim2.new(1, 0, 0, 60)
8828Frame141.BackgroundColor = BrickColor.new("Institutional white")
8829Frame141.BackgroundColor3 = Color3.new(1, 1, 1)
8830Frame141.BackgroundTransparency = 1
8831TextLabel142.Name = "SName"
8832TextLabel142.Parent = Frame141
8833TextLabel142.Position = UDim2.new(0, 10, 0, 0)
8834TextLabel142.Transparency = 1
8835TextLabel142.Size = UDim2.new(1, -20, 0, 30)
8836TextLabel142.BackgroundColor = BrickColor.new("Institutional white")
8837TextLabel142.BackgroundColor3 = Color3.new(1, 1, 1)
8838TextLabel142.BackgroundTransparency = 1
8839TextLabel142.Font = Enum.Font.SourceSans
8840TextLabel142.FontSize = Enum.FontSize.Size18
8841TextLabel142.Text = "Camera Instances"
8842TextLabel142.TextSize = 18
8843TextLabel142.TextXAlignment = Enum.TextXAlignment.Left
8844TextLabel143.Name = "Status"
8845TextLabel143.Parent = Frame141
8846TextLabel143.Position = UDim2.new(0, 60, 0, 30)
8847TextLabel143.Transparency = 1
8848TextLabel143.Size = UDim2.new(0, 50, 0, 15)
8849TextLabel143.BackgroundColor = BrickColor.new("Institutional white")
8850TextLabel143.BackgroundColor3 = Color3.new(1, 1, 1)
8851TextLabel143.BackgroundTransparency = 1
8852TextLabel143.Font = Enum.Font.SourceSans
8853TextLabel143.FontSize = Enum.FontSize.Size18
8854TextLabel143.Text = "Off"
8855TextLabel143.TextSize = 18
8856TextLabel143.TextXAlignment = Enum.TextXAlignment.Left
8857TextButton144.Name = "Change"
8858TextButton144.Parent = Frame141
8859TextButton144.Position = UDim2.new(0, 10, 0, 30)
8860TextButton144.Size = UDim2.new(0, 40, 0, 15)
8861TextButton144.BackgroundColor = BrickColor.new("Quill grey")
8862TextButton144.BackgroundColor3 = Color3.new(0.862745, 0.862745, 0.862745)
8863TextButton144.BorderSizePixel = 0
8864TextButton144.Font = Enum.Font.SourceSans
8865TextButton144.FontSize = Enum.FontSize.Size14
8866TextButton144.Text = ""
8867TextButton144.TextSize = 14
8868TextLabel145.Name = "OnBar"
8869TextLabel145.Parent = TextButton144
8870TextLabel145.Size = UDim2.new(0, 0, 0, 15)
8871TextLabel145.BackgroundColor = BrickColor.new("Electric blue")
8872TextLabel145.BackgroundColor3 = Color3.new(0, 0.576471, 0.862745)
8873TextLabel145.BorderSizePixel = 0
8874TextLabel145.Font = Enum.Font.SourceSans
8875TextLabel145.FontSize = Enum.FontSize.Size14
8876TextLabel145.Text = ""
8877TextLabel145.TextSize = 14
8878TextLabel146.Name = "Bar"
8879TextLabel146.Parent = TextButton144
8880TextLabel146.Position = UDim2.new(0, -2, 0, -2)
8881TextLabel146.Size = UDim2.new(0, 10, 0, 19)
8882TextLabel146.BackgroundColor = BrickColor.new("Really black")
8883TextLabel146.BackgroundColor3 = Color3.new(0, 0, 0)
8884TextLabel146.BorderSizePixel = 0
8885TextLabel146.ClipsDescendants = true
8886TextLabel146.Font = Enum.Font.SourceSans
8887TextLabel146.FontSize = Enum.FontSize.Size14
8888TextLabel146.Text = ""
8889TextLabel146.TextSize = 14
8890Frame147.Name = "Scripts"
8891Frame147.Parent = Frame128
8892Frame147.Transparency = 1
8893Frame147.Size = UDim2.new(1, 0, 0, 60)
8894Frame147.BackgroundColor = BrickColor.new("Institutional white")
8895Frame147.BackgroundColor3 = Color3.new(1, 1, 1)
8896Frame147.BackgroundTransparency = 1
8897TextLabel148.Name = "SName"
8898TextLabel148.Parent = Frame147
8899TextLabel148.Position = UDim2.new(0, 10, 0, 0)
8900TextLabel148.Transparency = 1
8901TextLabel148.Size = UDim2.new(1, -20, 0, 30)
8902TextLabel148.BackgroundColor = BrickColor.new("Institutional white")
8903TextLabel148.BackgroundColor3 = Color3.new(1, 1, 1)
8904TextLabel148.BackgroundTransparency = 1
8905TextLabel148.Font = Enum.Font.SourceSans
8906TextLabel148.FontSize = Enum.FontSize.Size18
8907TextLabel148.Text = "Save Scripts"
8908TextLabel148.TextSize = 18
8909TextLabel148.TextXAlignment = Enum.TextXAlignment.Left
8910TextLabel149.Name = "Status"
8911TextLabel149.Parent = Frame147
8912TextLabel149.Position = UDim2.new(0, 60, 0, 30)
8913TextLabel149.Transparency = 1
8914TextLabel149.Size = UDim2.new(0, 50, 0, 15)
8915TextLabel149.BackgroundColor = BrickColor.new("Institutional white")
8916TextLabel149.BackgroundColor3 = Color3.new(1, 1, 1)
8917TextLabel149.BackgroundTransparency = 1
8918TextLabel149.Font = Enum.Font.SourceSans
8919TextLabel149.FontSize = Enum.FontSize.Size18
8920TextLabel149.Text = "Off"
8921TextLabel149.TextSize = 18
8922TextLabel149.TextXAlignment = Enum.TextXAlignment.Left
8923TextButton150.Name = "Change"
8924TextButton150.Parent = Frame147
8925TextButton150.Position = UDim2.new(0, 10, 0, 30)
8926TextButton150.Size = UDim2.new(0, 40, 0, 15)
8927TextButton150.BackgroundColor = BrickColor.new("Quill grey")
8928TextButton150.BackgroundColor3 = Color3.new(0.862745, 0.862745, 0.862745)
8929TextButton150.BorderSizePixel = 0
8930TextButton150.Font = Enum.Font.SourceSans
8931TextButton150.FontSize = Enum.FontSize.Size14
8932TextButton150.Text = ""
8933TextButton150.TextSize = 14
8934TextLabel151.Name = "OnBar"
8935TextLabel151.Parent = TextButton150
8936TextLabel151.Size = UDim2.new(0, 0, 0, 15)
8937TextLabel151.BackgroundColor = BrickColor.new("Electric blue")
8938TextLabel151.BackgroundColor3 = Color3.new(0, 0.576471, 0.862745)
8939TextLabel151.BorderSizePixel = 0
8940TextLabel151.Font = Enum.Font.SourceSans
8941TextLabel151.FontSize = Enum.FontSize.Size14
8942TextLabel151.Text = ""
8943TextLabel151.TextSize = 14
8944TextLabel152.Name = "Bar"
8945TextLabel152.Parent = TextButton150
8946TextLabel152.Position = UDim2.new(0, -2, 0, -2)
8947TextLabel152.Size = UDim2.new(0, 10, 0, 19)
8948TextLabel152.BackgroundColor = BrickColor.new("Really black")
8949TextLabel152.BackgroundColor3 = Color3.new(0, 0, 0)
8950TextLabel152.BorderSizePixel = 0
8951TextLabel152.ClipsDescendants = true
8952TextLabel152.Font = Enum.Font.SourceSans
8953TextLabel152.FontSize = Enum.FontSize.Size14
8954TextLabel152.Text = ""
8955TextLabel152.TextSize = 14
8956TextLabel153.Name = "ToSave"
8957TextLabel153.Parent = Frame125
8958TextLabel153.Position = UDim2.new(0, 0, 0, 17)
8959TextLabel153.Transparency = 1
8960TextLabel153.Size = UDim2.new(1, 0, 0, 20)
8961TextLabel153.BackgroundTransparency = 1
8962TextLabel153.Font = Enum.Font.SourceSans
8963TextLabel153.FontSize = Enum.FontSize.Size18
8964TextLabel153.Text = "To Save"
8965TextLabel153.TextColor = BrickColor.new("Really black")
8966TextLabel153.TextColor3 = Color3.new(0, 0, 0)
8967TextLabel153.TextSize = 18
8968Frame154.Name = "CopyList"
8969Frame154.Parent = Frame125
8970Frame154.Position = UDim2.new(0, 0, 0, 37)
8971Frame154.Transparency = 0.80000001192093
8972Frame154.Size = UDim2.new(1, 0, 0, 163)
8973Frame154.BackgroundColor = BrickColor.new("Institutional white")
8974Frame154.BackgroundColor3 = Color3.new(1, 1, 1)
8975Frame154.BackgroundTransparency = 0.80000001192093
8976Frame155.Name = "Bottom"
8977Frame155.Parent = Frame125
8978Frame155.Position = UDim2.new(0, 0, 1, -50)
8979Frame155.Size = UDim2.new(1, 0, 0, 50)
8980Frame155.BackgroundColor = BrickColor.new("Lily white")
8981Frame155.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
8982Frame155.BorderColor = BrickColor.new("Sand violet metallic")
8983Frame155.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
8984TextLabel156.Parent = Frame155
8985TextLabel156.Position = UDim2.new(0, 4, 0, 0)
8986TextLabel156.Transparency = 1
8987TextLabel156.Size = UDim2.new(1, -4, 1, 0)
8988TextLabel156.BackgroundTransparency = 1
8989TextLabel156.Font = Enum.Font.SourceSans
8990TextLabel156.FontSize = Enum.FontSize.Size14
8991TextLabel156.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."
8992TextLabel156.TextColor = BrickColor.new("Really black")
8993TextLabel156.TextColor3 = Color3.new(0, 0, 0)
8994TextLabel156.TextSize = 14
8995TextLabel156.TextWrap = true
8996TextLabel156.TextWrapped = true
8997TextLabel156.TextXAlignment = Enum.TextXAlignment.Left
8998TextLabel156.TextYAlignment = Enum.TextYAlignment.Top
8999TextButton157.Name = "Save"
9000TextButton157.Parent = Frame125
9001TextButton157.Position = UDim2.new(0, 0, 1, -80)
9002TextButton157.Transparency = 0.80000001192093
9003TextButton157.Size = UDim2.new(1, 0, 0, 30)
9004TextButton157.BackgroundColor = BrickColor.new("White")
9005TextButton157.BackgroundColor3 = Color3.new(0.941177, 0.941177, 0.941177)
9006TextButton157.BackgroundTransparency = 0.80000001192093
9007TextButton157.BorderColor = BrickColor.new("Really black")
9008TextButton157.BorderColor3 = Color3.new(0, 0, 0)
9009TextButton157.Font = Enum.Font.SourceSans
9010TextButton157.FontSize = Enum.FontSize.Size18
9011TextButton157.Text = "Save"
9012TextButton157.TextSize = 18
9013TextBox158.Name = "FileName"
9014TextBox158.Parent = Frame125
9015TextBox158.Position = UDim2.new(0, 0, 1, -105)
9016TextBox158.Transparency = 0.60000002384186
9017TextBox158.Size = UDim2.new(1, 0, 0, 25)
9018TextBox158.BackgroundColor = BrickColor.new("White")
9019TextBox158.BackgroundColor3 = Color3.new(0.941177, 0.941177, 0.941177)
9020TextBox158.BackgroundTransparency = 0.60000002384186
9021TextBox158.Font = Enum.Font.SourceSans
9022TextBox158.FontSize = Enum.FontSize.Size18
9023TextBox158.Text = "PlaceName"
9024TextBox158.TextSize = 18
9025TextBox158.TextXAlignment = Enum.TextXAlignment.Left
9026Frame159.Name = "Entry"
9027Frame159.Parent = Frame125
9028Frame159.Visible = false
9029Frame159.Transparency = 1
9030Frame159.Size = UDim2.new(1, 0, 0, 22)
9031Frame159.BackgroundColor = BrickColor.new("Institutional white")
9032Frame159.BackgroundColor3 = Color3.new(1, 1, 1)
9033Frame159.BackgroundTransparency = 1
9034TextButton160.Name = "Change"
9035TextButton160.Parent = Frame159
9036TextButton160.Position = UDim2.new(0, 10, 0, 1)
9037TextButton160.Transparency = 0.60000002384186
9038TextButton160.Size = UDim2.new(0, 20, 0, 20)
9039TextButton160.BackgroundColor = BrickColor.new("Institutional white")
9040TextButton160.BackgroundColor3 = Color3.new(1, 1, 1)
9041TextButton160.BackgroundTransparency = 0.60000002384186
9042TextButton160.ZIndex = 2
9043TextButton160.Font = Enum.Font.SourceSans
9044TextButton160.FontSize = Enum.FontSize.Size18
9045TextButton160.Text = ""
9046TextButton160.TextColor = BrickColor.new("Institutional white")
9047TextButton160.TextColor3 = Color3.new(1, 1, 1)
9048TextButton160.TextSize = 18
9049TextLabel161.Name = "enabled"
9050TextLabel161.Parent = TextButton160
9051TextLabel161.Position = UDim2.new(0, 3, 0, 3)
9052TextLabel161.Transparency = 0.40000000596046
9053TextLabel161.Size = UDim2.new(0, 14, 0, 14)
9054TextLabel161.BackgroundColor = BrickColor.new("Dark stone grey")
9055TextLabel161.BackgroundColor3 = Color3.new(0.380392, 0.380392, 0.380392)
9056TextLabel161.BackgroundTransparency = 0.40000000596046
9057TextLabel161.BorderSizePixel = 0
9058TextLabel161.Font = Enum.Font.SourceSans
9059TextLabel161.FontSize = Enum.FontSize.Size14
9060TextLabel161.Text = ""
9061TextLabel161.TextSize = 14
9062TextLabel162.Name = "Info"
9063TextLabel162.Parent = Frame159
9064TextLabel162.Position = UDim2.new(0, 40, 0, 0)
9065TextLabel162.Transparency = 1
9066TextLabel162.Size = UDim2.new(1, -40, 0, 22)
9067TextLabel162.BackgroundTransparency = 1
9068TextLabel162.Font = Enum.Font.SourceSans
9069TextLabel162.FontSize = Enum.FontSize.Size18
9070TextLabel162.Text = "Workspace"
9071TextLabel162.TextColor = BrickColor.new("Really black")
9072TextLabel162.TextColor3 = Color3.new(0, 0, 0)
9073TextLabel162.TextSize = 18
9074TextLabel162.TextXAlignment = Enum.TextXAlignment.Left
9075Frame163.Name = "RemoteDebugWindow"
9076Frame163.Parent = ScreenGui0
9077Frame163.Position = UDim2.new(1, 0, 0, 0)
9078Frame163.Transparency = 0.10000000149012
9079Frame163.Size = UDim2.new(0, 300, 1, 0)
9080Frame163.BackgroundColor = BrickColor.new("Institutional white")
9081Frame163.BackgroundColor3 = Color3.new(1, 1, 1)
9082Frame163.BackgroundTransparency = 0.10000000149012
9083Frame163.BorderColor = BrickColor.new("Light grey")
9084Frame163.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
9085Frame163.BorderSizePixel = 0
9086Frame164.Name = "Header"
9087Frame164.Parent = Frame163
9088Frame164.Size = UDim2.new(1, 0, 0, 17)
9089Frame164.BackgroundColor = BrickColor.new("Lily white")
9090Frame164.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
9091Frame164.BorderColor = BrickColor.new("Sand violet metallic")
9092Frame164.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
9093TextLabel165.Parent = Frame164
9094TextLabel165.Position = UDim2.new(0, 4, 0, 0)
9095TextLabel165.Transparency = 1
9096TextLabel165.Size = UDim2.new(1, -4, 1, 0)
9097TextLabel165.BackgroundTransparency = 1
9098TextLabel165.Font = Enum.Font.SourceSans
9099TextLabel165.FontSize = Enum.FontSize.Size14
9100TextLabel165.Text = "Remote Debugger"
9101TextLabel165.TextColor = BrickColor.new("Really black")
9102TextLabel165.TextColor3 = Color3.new(0, 0, 0)
9103TextLabel165.TextSize = 14
9104TextLabel165.TextXAlignment = Enum.TextXAlignment.Left
9105BindableFunction166.Name = "GetSetting"
9106BindableFunction166.Parent = Frame163
9107TextLabel167.Name = "Desc"
9108TextLabel167.Parent = Frame163
9109TextLabel167.Position = UDim2.new(0, 0, 0, 20)
9110TextLabel167.Transparency = 1
9111TextLabel167.Size = UDim2.new(1, 0, 0, 40)
9112TextLabel167.BackgroundColor = BrickColor.new("Institutional white")
9113TextLabel167.BackgroundColor3 = Color3.new(1, 1, 1)
9114TextLabel167.BackgroundTransparency = 1
9115TextLabel167.Font = Enum.Font.SourceSans
9116TextLabel167.FontSize = Enum.FontSize.Size32
9117TextLabel167.Text = "Have fun with remotes"
9118TextLabel167.TextSize = 32
9119TextLabel167.TextWrap = true
9120TextLabel167.TextWrapped = true
9121Frame168.Name = "About"
9122Frame168.Parent = ScreenGui0
9123Frame168.Position = UDim2.new(1, 0, 0, 0)
9124Frame168.Size = UDim2.new(0, 300, 1, 0)
9125Frame168.Active = true
9126Frame168.BackgroundColor = BrickColor.new("Lily white")
9127Frame168.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
9128Frame168.BorderColor = BrickColor.new("Sand violet metallic")
9129Frame168.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
9130Frame168.BorderSizePixel = 0
9131Frame168.Draggable = true
9132Frame168.ZIndex = 2
9133ImageLabel169.Name = "Sad"
9134ImageLabel169.Parent = Frame168
9135ImageLabel169.Position = UDim2.new(0, 50, 1, -250)
9136ImageLabel169.Transparency = 1
9137ImageLabel169.Size = UDim2.new(0, 200, 0, 200)
9138ImageLabel169.BackgroundColor = BrickColor.new("Institutional white")
9139ImageLabel169.BackgroundColor3 = Color3.new(1, 1, 1)
9140ImageLabel169.BackgroundTransparency = 1
9141ImageLabel169.ZIndex = 2
9142ImageLabel169.Image = "rbxassetid://483437370"
9143ImageLabel169.ImageColor3 = Color3.new(0.960784, 0.960784, 0.960784)
9144TextLabel170.Name = "Creator"
9145TextLabel170.Parent = Frame168
9146TextLabel170.Position = UDim2.new(0, 80, 0, 300)
9147TextLabel170.Transparency = 1
9148TextLabel170.Size = UDim2.new(0, 140, 0, 30)
9149TextLabel170.BackgroundColor = BrickColor.new("Institutional white")
9150TextLabel170.BackgroundColor3 = Color3.new(1, 1, 1)
9151TextLabel170.BackgroundTransparency = 1
9152TextLabel170.ZIndex = 2
9153TextLabel170.Font = Enum.Font.SourceSansBold
9154TextLabel170.FontSize = Enum.FontSize.Size28
9155TextLabel170.Text = "By Moon"
9156TextLabel170.TextSize = 28
9157TextLabel170.TextWrap = true
9158TextLabel170.TextWrapped = true
9159TextLabel171.Name = "Title"
9160TextLabel171.Parent = Frame168
9161TextLabel171.Position = UDim2.new(0, 100, 0, 150)
9162TextLabel171.Transparency = 1
9163TextLabel171.Size = UDim2.new(0, 100, 0, 60)
9164TextLabel171.BackgroundColor = BrickColor.new("Institutional white")
9165TextLabel171.BackgroundColor3 = Color3.new(1, 1, 1)
9166TextLabel171.BackgroundTransparency = 1
9167TextLabel171.ZIndex = 2
9168TextLabel171.Font = Enum.Font.SourceSansBold
9169TextLabel171.FontSize = Enum.FontSize.Size60
9170TextLabel171.Text = "DEX"
9171TextLabel171.TextSize = 60
9172TextLabel171.TextWrap = true
9173TextLabel171.TextWrapped = true
9174TextLabel172.Name = "Version"
9175TextLabel172.Parent = Frame168
9176TextLabel172.Position = UDim2.new(0, 100, 0, 210)
9177TextLabel172.Transparency = 1
9178TextLabel172.Size = UDim2.new(0, 100, 0, 30)
9179TextLabel172.BackgroundColor = BrickColor.new("Institutional white")
9180TextLabel172.BackgroundColor3 = Color3.new(1, 1, 1)
9181TextLabel172.BackgroundTransparency = 1
9182TextLabel172.ZIndex = 2
9183TextLabel172.Font = Enum.Font.SourceSansBold
9184TextLabel172.FontSize = Enum.FontSize.Size28
9185TextLabel172.Text = "v3"
9186TextLabel172.TextSize = 28
9187TextLabel172.TextWrap = true
9188TextLabel172.TextWrapped = true
9189ImageButton173.Name = "Toggle"
9190ImageButton173.Parent = ScreenGui0
9191ImageButton173.Position = UDim2.new(1, 0, 0, 0)
9192ImageButton173.Rotation = 180
9193ImageButton173.Transparency = 1
9194ImageButton173.Size = UDim2.new(0, 40, 0, 40)
9195ImageButton173.BackgroundColor = BrickColor.new("Institutional white")
9196ImageButton173.BackgroundColor3 = Color3.new(1, 1, 1)
9197ImageButton173.BackgroundTransparency = 1
9198ImageButton173.Image = "rbxassetid://1513966937"
9199ImageButton173.ImageColor3 = Color3.new(0.913726, 0.913726, 0.913726)
9200TextLabel174.Parent = ImageButton173
9201TextLabel174.Position = UDim2.new(0, 2, 0, 10)
9202TextLabel174.Rotation = 180
9203TextLabel174.Transparency = 1
9204TextLabel174.Size = UDim2.new(0, 30, 0, 30)
9205TextLabel174.BackgroundColor = BrickColor.new("Institutional white")
9206TextLabel174.BackgroundColor3 = Color3.new(1, 1, 1)
9207TextLabel174.BackgroundTransparency = 1
9208TextLabel174.Font = Enum.Font.SourceSans
9209TextLabel174.FontSize = Enum.FontSize.Size24
9210TextLabel174.Text = "<"
9211TextLabel174.TextSize = 24
9212TextLabel174.TextWrap = true
9213TextLabel174.TextWrapped = true
9214for i,v in pairs(mas:GetChildren()) do
9215 v.Parent = game:GetService("Players").LocalPlayer.PlayerGui
9216 pcall(function() v:MakeJoints() end)
9217end
9218mas:Destroy()
9219for i,v in pairs(cors) do
9220 spawn(function()
9221 pcall(v)
9222 end)
9223end