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