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