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