View difference between Paste ID: ydQB8s4h and TjRGHbsJ
SHOW: | | - or go back to the newest paste.
1
if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
2-
--Converted with ttyyuu12345's model to script plugin v4
2+
3
	script.Parent = owner.Character
4
	local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
5
	local function NewFakeEvent()
6
		local Bind = Instance.new("BindableEvent")
7
		local Fake;Fake = {Connections = {},
8
		fakeEvent=true;
9
		Connect=function(self,Func)
10
			Bind.Event:connect(Func)
11
			self.Connections[Bind] = true
12
			return setmetatable({Connected = true},{
13
				__index = function (self,Index)
14
					if Index:lower() == "disconnect" then
15
						return function() Fake.Connections[Bind] = false;self.Connected = false end
16
					end
17
					return Fake[Index]
18
				end;
19
				__tostring = function() return "Connection" end;
20
			})
21
		end}
22
		Fake.connect = Fake.Connect;return Fake;
23
	end
24
	local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
25
	local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
26
	local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
27
		self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
28
	end};ContextActionService.UnBindAction = ContextActionService.BindAction
29
	local function TriggerEvent(self,Event,...)
30
		local Trigger = Mouse[Event]
31
		if Trigger and Trigger.fakeEvent and Trigger.Connections then
32
			for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
33
		end
34
	end
35
	Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
36
	Event.OnServerEvent:Connect(function(FiredBy,Input)
37
		if FiredBy.Name ~= owner.Name then return end
38
		if Input.MouseEvent then
39
			Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
40
		else
41
			local Begin = Input.UserInputState == Enum.UserInputState.Begin
42
			if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
43
			for _,Action in pairs(ContextActionService.Actions) do
44
				for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
45
			end
46
			Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
47
			UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
48
		end
49
	end)
50
	InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
51
	Event.Parent = NLS([[
52
		local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
53
		local Input = function(Input,gameProcessedEvent)
54
			if gameProcessedEvent then return end
55
			Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
56
		end
57
		UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
58
		local Hit,Target
59
		while wait(1/30) do
60
			if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
61
				Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
62
			end
63
		end
64
	]],owner.Character)
65
end
66
RealGame = game;game = setmetatable({},{
67
	__index = function (self,Index)
68
		local Sandbox = function (Thing)
69
			if Thing:IsA("Player") then
70
				local RealPlayer = Thing
71
				return setmetatable({},{
72
					__index = function (self,Index)
73
						local Type = type(RealPlayer[Index])
74
						if Type == "function" then
75
							if Index:lower() == "getmouse" or Index:lower() == "mouse" then
76
								return function (self)return InternalData["Mouse"] end
77
							end
78
							return function (self,...)return RealPlayer[Index](RealPlayer,...) end
79
						end
80
						return RealPlayer[Index]
81
					end;
82
					__tostring = function(self) return RealPlayer.Name end
83
				})
84
			end
85
		end
86
		if RealGame[Index] then
87
			local Type = type(RealGame[Index])
88
			if Type == "function" then
89
				if Index:lower() == "getservice" or Index:lower() == "service" then
90
					return function (self,Service)
91
						local FakeServices = {
92
							["players"] = function()
93
								return setmetatable({},{
94
									__index = function (self2,Index2)
95
										local RealService = RealGame:GetService(Service)
96
										local Type2 = type(Index2)
97
										if Type2 == "function" then
98
											return function (self,...) return RealService[Index2](RealService,...)end
99
										else
100
											if Index2:lower() == "localplayer" then return Sandbox(owner) end
101
											return RealService[Index2]
102
										end
103
									end;
104
									__tostring = function(self) return RealGame:GetService(Service).Name end
105
								})
106
							end;
107
							["contextactionservice"] = function() return InternalData["ContextActionService"] end;
108
							["userinputservice"] = function() return InternalData["UserInputService"] end;
109
							["runservice"] = function()
110
								return setmetatable({},{
111
									__index = function(self2,Index2)
112
										local RealService = RealGame:GetService(Service)
113
										local Type2 = type(Index2)
114
										if Type2 == "function" then
115
											return function (self,...) return RealService[Index2](RealService,...) end
116
										else
117
											local RunServices = {
118
												["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
119
												["renderstepped"] = function() return RealService["Stepped"] end
120
											}
121
											if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
122
											return RealService[Index2]
123
										end
124
									end
125
								})
126
							end
127
						}
128
						if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
129
						return RealGame:GetService(Service)
130
					end
131
				end
132
				return function (self,...) return RealGame[Index](RealGame,...) end
133
			else
134
				if game:GetService(Index) then return game:GetService(Index) end
135
				return RealGame[Index]
136
			end
137
		end
138
		return nil
139
	end
140
});Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
141
function sandbox(var,func)
142
	local env = getfenv(func)
143
	local newenv = setmetatable({},{
144
		__index = function(self,k)
145
			if k=="script" then
146
				return var
147
			else
148
				return env[k]
149
			end
150
		end,
151
	})
152
	setfenv(func,newenv)
153
	return func
154
end
155
cors = {}
156
mas = Instance.new("Model",game:GetService("Lighting"))
157
ScreenGui0 = Instance.new("ScreenGui")
158
Frame1 = Instance.new("Frame")
159
LocalScript2 = Instance.new("LocalScript")
160
ModuleScript3 = Instance.new("ModuleScript")
161
Frame4 = Instance.new("Frame")
162
TextLabel5 = Instance.new("TextLabel")
163
TextBox6 = Instance.new("TextBox")
164
BindableFunction7 = Instance.new("BindableFunction")
165
BindableFunction8 = Instance.new("BindableFunction")
166
BindableEvent9 = Instance.new("BindableEvent")
167
Frame10 = Instance.new("Frame")
168
BindableEvent11 = Instance.new("BindableEvent")
169
BindableFunction12 = Instance.new("BindableFunction")
170
BindableFunction13 = Instance.new("BindableFunction")
171
BindableFunction14 = Instance.new("BindableFunction")
172
BindableFunction15 = Instance.new("BindableFunction")
173
LocalScript16 = Instance.new("LocalScript")
174
BindableFunction17 = Instance.new("BindableFunction")
175
LocalScript18 = Instance.new("LocalScript")
176
Frame19 = Instance.new("Frame")
177
TextButton20 = Instance.new("TextButton")
178
TextLabel21 = Instance.new("TextLabel")
179
TextLabel22 = Instance.new("TextLabel")
180
ImageLabel23 = Instance.new("ImageLabel")
181
Frame24 = Instance.new("Frame")
182
Frame25 = Instance.new("Frame")
183
Frame26 = Instance.new("Frame")
184
TextButton27 = Instance.new("TextButton")
185
ImageLabel28 = Instance.new("ImageLabel")
186
TextButton29 = Instance.new("TextButton")
187
ImageLabel30 = Instance.new("ImageLabel")
188
TextButton31 = Instance.new("TextButton")
189
ImageLabel32 = Instance.new("ImageLabel")
190
TextButton33 = Instance.new("TextButton")
191
ImageLabel34 = Instance.new("ImageLabel")
192
TextButton35 = Instance.new("TextButton")
193
ImageLabel36 = Instance.new("ImageLabel")
194
Frame37 = Instance.new("Frame")
195
Frame38 = Instance.new("Frame")
196
TextLabel39 = Instance.new("TextLabel")
197
BindableFunction40 = Instance.new("BindableFunction")
198
Frame41 = Instance.new("Frame")
199
TextLabel42 = Instance.new("TextLabel")
200
TextLabel43 = Instance.new("TextLabel")
201
TextButton44 = Instance.new("TextButton")
202
TextLabel45 = Instance.new("TextLabel")
203
TextLabel46 = Instance.new("TextLabel")
204
Frame47 = Instance.new("Frame")
205
Frame48 = Instance.new("Frame")
206
TextLabel49 = Instance.new("TextLabel")
207
Frame50 = Instance.new("Frame")
208
TextButton51 = Instance.new("TextButton")
209
TextLabel52 = Instance.new("TextLabel")
210
TextButton53 = Instance.new("TextButton")
211
TextBox54 = Instance.new("TextBox")
212
TextButton55 = Instance.new("TextButton")
213
TextLabel56 = Instance.new("TextLabel")
214
TextLabel57 = Instance.new("TextLabel")
215
Frame58 = Instance.new("Frame")
216
TextLabel59 = Instance.new("TextLabel")
217
Frame60 = Instance.new("Frame")
218
TextButton61 = Instance.new("TextButton")
219
TextLabel62 = Instance.new("TextLabel")
220
TextButton63 = Instance.new("TextButton")
221
Frame64 = Instance.new("Frame")
222
TextLabel65 = Instance.new("TextLabel")
223
Frame66 = Instance.new("Frame")
224
TextLabel67 = Instance.new("TextLabel")
225
TextButton68 = Instance.new("TextButton")
226
Frame69 = Instance.new("Frame")
227
TextLabel70 = Instance.new("TextLabel")
228
Frame71 = Instance.new("Frame")
229
TextLabel72 = Instance.new("TextLabel")
230
ScrollingFrame73 = Instance.new("ScrollingFrame")
231
TextButton74 = Instance.new("TextButton")
232
TextLabel75 = Instance.new("TextLabel")
233
TextLabel76 = Instance.new("TextLabel")
234
TextButton77 = Instance.new("TextButton")
235
TextButton78 = Instance.new("TextButton")
236-
wait(0.2)
236+
237
TextButton80 = Instance.new("TextButton")
238-
local Gui = script.Parent.Parent
238+
239-
local PropertiesFrame = Gui:WaitForChild("PropertiesFrame")
239+
240-
local ExplorerFrame = Gui:WaitForChild("ExplorerPanel")
240+
241-
print = ExplorerFrame:WaitForChild("GetPrint"):Invoke()
241+
242
Frame85 = Instance.new("Frame")
243
TextButton86 = Instance.new("TextButton")
244-
-- Services
244+
245-
local Teams = game:GetService("Teams")
245+
246-
local Workspace = game:GetService("Workspace")
246+
247-
local Debris = game:GetService("Debris")
247+
248-
local ContentProvider = game:GetService("ContentProvider")
248+
249-
local Players = game:GetService("Players")
249+
250-
local ReplicatedStorage = game:GetService("ReplicatedStorage")
250+
251
Frame94 = Instance.new("Frame")
252-
-- Functions
252+
253-
function httpGet(url)
253+
254-
	return game:HttpGet(url,true)
254+
255
Frame98 = Instance.new("Frame")
256
Frame99 = Instance.new("Frame")
257-
-- RbxApi Stuff
257+
258
Frame101 = Instance.new("Frame")
259-
local apiUrl = "http://anaminus.github.io/rbx/json/api/latest.json"
259+
260-
local maxChunkSize = 100 * 1000
260+
261-
local ApiJson
261+
262-
if script:FindFirstChild("RawApiJson") then
262+
263-
	ApiJson = script.RawApiJson
263+
264-
else
264+
265-
	ApiJson = ""
265+
266
TextButton109 = Instance.new("TextButton")
267
Frame110 = Instance.new("Frame")
268-
function getLocalApiJson()
268+
269-
	print(ApiJson)
269+
270-
	local usels = false
270+
271-
	local s = pcall(function() if ApiJson.Source ~= "" then usels = true end end)
271+
272-
	if usels then
272+
273-
		return loadstring(ApiJson.Source)()()
273+
274
Frame117 = Instance.new("Frame")
275-
		return require(ApiJson)()
275+
276
ImageLabel119 = Instance.new("ImageLabel")
277
Frame120 = Instance.new("Frame")
278
ImageLabel121 = Instance.new("ImageLabel")
279-
function getCurrentApiJson()
279+
280-
	local jsonStr = nil
280+
281-
	if readfile and getelysianpath then
281+
282-
		if readfile(getelysianpath().."Xpl0rerApi.txt") then
282+
283-
			print("Api found in folder!")
283+
284-
			jsonStr = readfile(getelysianpath().."Xpl0rerApi.txt")
284+
285
Frame128 = Instance.new("Frame")
286
Frame129 = Instance.new("Frame")
287
TextLabel130 = Instance.new("TextLabel")
288-
	local success
288+
289-
	if not SetGlobal then
289+
290-
		success = pcall(function()
290+
291-
			jsonStr = httpGet(apiUrl)
291+
292-
			print("Fetched json successfully")
292+
293
TextLabel136 = Instance.new("TextLabel")
294
TextLabel137 = Instance.new("TextLabel")
295-
	if success then
295+
296-
		print("Returning json")
296+
297-
		--print(jsonStr:sub(1,500))
297+
298-
		return jsonStr
298+
299
TextLabel142 = Instance.new("TextLabel")
300-
		print("Error fetching json: " .. tostring(err))
300+
301-
		print("Falling back to local copy")
301+
302-
		return getLocalApiJson()
302+
303
TextLabel146 = Instance.new("TextLabel")
304
Frame147 = Instance.new("Frame")
305
TextLabel148 = Instance.new("TextLabel")
306-
function splitStringIntoChunks(jsonStr)
306+
307-
	-- Splits up a string into a table with a given size
307+
308-
	local t = {}
308+
309-
	for i = 1, math.ceil(string.len(jsonStr)/maxChunkSize) do
309+
310-
		local str = jsonStr:sub((i-1)*maxChunkSize+1, i*maxChunkSize)
310+
311-
		table.insert(t, str)
311+
312
Frame155 = Instance.new("Frame")
313-
	return t
313+
314
TextButton157 = Instance.new("TextButton")
315
TextBox158 = Instance.new("TextBox")
316-
local jsonToParse = getCurrentApiJson()
316+
317-
local apiChunks = splitStringIntoChunks(jsonToParse)
317+
318
TextLabel161 = Instance.new("TextLabel")
319-
function getRbxApi()
319+
320
Frame163 = Instance.new("Frame")
321
Frame164 = Instance.new("Frame")
322
TextLabel165 = Instance.new("TextLabel")
323
BindableFunction166 = Instance.new("BindableFunction")
324
TextLabel167 = Instance.new("TextLabel")
325
Frame168 = Instance.new("Frame")
326
ImageLabel169 = Instance.new("ImageLabel")
327-
-- Services
327+
328-
local HttpService = game:GetService("HttpService")
328+
329-
local ServerStorage = game:GetService("ServerStorage")
329+
330-
local ReplicatedStorage = game:GetService("ReplicatedStorage")
330+
331
TextLabel174 = Instance.new("TextLabel")
332-
-- Remotes
332+
333-
--local Remotes = ReplicatedStorage:WaitForChild("OnlineStudio"):WaitForChild("Remotes")
333+
334-
--local GetApiJsonFunction = Remotes:WaitForChild("GetApiJson")
334+
335
Frame1.Parent = ScreenGui0
336-
-- Functions
336+
337-
local JsonDecode = function(s) return HttpService:JSONDecode(s) end
337+
338
Frame1.Size = UDim2.new(0, 300, 0.5, -36)
339-
local function GetApiRemoteFunction(index)
339+
340-
	if (apiChunks[index]) then 
340+
341-
		return apiChunks[index], #apiChunks
341+
342
Frame1.BackgroundTransparency = 0.10000000149012
343-
		print("Bad index for GetApiJson")
343+
344
Frame1.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
345
Frame1.BorderSizePixel = 0
346
LocalScript2.Name = "Properties"
347
LocalScript2.Parent = Frame1
348-
local function getApiJson()
348+
349-
	local apiTable = {}
349+
350-
	local firstPage, pageCount = GetApiRemoteFunction(1)
350+
351-
	table.insert(apiTable, firstPage)
351+
352-
	for i = 2, pageCount do
352+
353-
		--print("Fetching API page # " .. tostring(i))
353+
354-
		local result = GetApiRemoteFunction(i)
354+
355-
		table.insert(apiTable, result)
355+
356
	Fixed another checkbox issue
357-
	return table.concat(apiTable)
357+
358
09/15
359
	Invalid input is ignored instead of setting to default of that data type
360-
local json = getApiJson()
360+
361-
local apiDump =  JsonDecode(json)
361+
362
	Fixed position of BrickColor palette
363-
local Classes = {}
363+
364-
local Enums = {}
364+
365
366-
local function sortAlphabetic(t, property)
366+
367-
	table.sort(t, 
367+
368-
		function(x,y) return x[property] < y[property]
368+
369
	Multiple BrickColor controls interfering with each other fixed
370
	Added support for Content data type
371
	
372-
local function isEnum(name)
372+
373-
	return Enums[name] ~= nil
373+
374
	wait(0.2)
375
376-
local function getProperties(className)
376+
	local Gui = script.Parent.Parent
377-
	local class = Classes[className]
377+
	local PropertiesFrame = Gui:WaitForChild("PropertiesFrame")
378-
	local properties = {}
378+
	local ExplorerFrame = Gui:WaitForChild("ExplorerPanel")
379
	print = ExplorerFrame:WaitForChild("GetPrint"):Invoke()
380-
	if not class then return properties end
380+
381
382-
	while class do
382+
	-- Services
383-
		for _,property in pairs(class.Properties) do
383+
	local Teams = game:GetService("Teams")
384-
			table.insert(properties, property)
384+
	local Workspace = game:GetService("Workspace")
385
	local Debris = game:GetService("Debris")
386-
		class = Classes[class.Superclass]
386+
	local ContentProvider = game:GetService("ContentProvider")
387
	local Players = game:GetService("Players")
388
	local ReplicatedStorage = game:GetService("ReplicatedStorage")
389-
	sortAlphabetic(properties, "Name")
389+
390
	-- Functions
391-
	return properties
391+
	function httpGet(url)
392
		return game:HttpGet(url,true)
393
	end
394-
for _,item in pairs(apiDump) do
394+
395-
	local itemType = item.type
395+
	-- RbxApi Stuff
396-
-- Classes --
396+
397-
	if (itemType == 'Class') then
397+
	local apiUrl = "http://anaminus.github.io/rbx/json/api/latest.json"
398-
		Classes[item.Name] = item
398+
	local maxChunkSize = 100 * 1000
399-
		item.Properties = {}
399+
	local ApiJson
400-
		item.Functions = {}
400+
	if script:FindFirstChild("RawApiJson") then
401-
		item.YieldFunctions = {}
401+
		ApiJson = script.RawApiJson
402-
		item.Events = {}
402+
403-
		item.Callbacks = {}
403+
		ApiJson = ""
404-
-- Members --
404+
405-
	elseif (itemType == 'Property') then
405+
406-
		table.insert(Classes[item.Class].Properties, item)
406+
	function getLocalApiJson()
407-
	elseif (itemType == 'Function') then
407+
		print(ApiJson)
408-
		table.insert(Classes[item.Class].Functions, item)
408+
		local usels = false
409-
	elseif (itemType == 'YieldFunction') then
409+
		local s = pcall(function() if ApiJson.Source ~= "" then usels = true end end)
410-
		table.insert(Classes[item.Class].YieldFunctions, item)
410+
		if usels then
411-
	elseif (itemType == 'Event') then
411+
			return loadstring(ApiJson.Source)()()
412-
		table.insert(Classes[item.Class].Events, item)
412+
413-
	elseif (itemType == 'Callback') then
413+
			return require(ApiJson)()
414-
		table.insert(Classes[item.Class].Callbacks, item)
414+
415-
-- Enums --
415+
416-
	elseif (itemType == 'Enum') then
416+
417-
		Enums[item.Name] = item
417+
	function getCurrentApiJson()
418-
		item.EnumItems = {}
418+
		local jsonStr = nil
419-
	elseif (itemType == 'EnumItem') then
419+
420-
		Enums[item.Enum].EnumItems[item.Name] = item
420+
			if readfile(getelysianpath().."Xpl0rerApi.txt") then
421
				print("Api found in folder!")
422
				jsonStr = readfile(getelysianpath().."Xpl0rerApi.txt")
423
				return jsonStr
424-
return {
424+
425-
	Classes = Classes;
425+
426-
	Enums = Enums;
426+
		local success
427-
	GetProperties = getProperties;
427+
		if not SetGlobal then
428-
	IsEnum = isEnum;
428+
			success = pcall(function()
429-
}
429+
				jsonStr = httpGet(apiUrl)
430
				print("Fetched json successfully")
431
			end)
432-
-- Modules
432+
433-
local Permissions = {CanEdit = true}
433+
		if success then
434-
local RbxApi = getRbxApi()
434+
			print("Returning json")
435
			--print(jsonStr:sub(1,500))
436
			return jsonStr
437
		else
438
			print("Error fetching json: " .. tostring(err))
439
			print("Falling back to local copy")
440
			return getLocalApiJson()
441
		end
442
	end
443-
-- Styles
443+
444
	function splitStringIntoChunks(jsonStr)
445-
local function CreateColor3(r, g, b) return Color3.new(r/255,g/255,b/255) end
445+
		-- Splits up a string into a table with a given size
446
		local t = {}
447-
local Styles = {
447+
		for i = 1, math.ceil(string.len(jsonStr)/maxChunkSize) do
448-
	Font = Enum.Font.Arial;
448+
			local str = jsonStr:sub((i-1)*maxChunkSize+1, i*maxChunkSize)
449-
	Margin = 5;
449+
			table.insert(t, str)
450-
	Black = CreateColor3(0,0,0);
450+
451-
	White = CreateColor3(255,255,255);
451+
		return t
452-
}
452+
453
454-
local Row = {
454+
	local jsonToParse = getCurrentApiJson()
455-
	Font = Styles.Font;
455+
	local apiChunks = splitStringIntoChunks(jsonToParse)
456-
	FontSize = Enum.FontSize.Size14;
456+
457-
	TextXAlignment = Enum.TextXAlignment.Left;
457+
	function getRbxApi()
458-
	TextColor = Styles.Black;
458+
459-
	TextColorOver = Styles.White;
459+
460-
	TextLockedColor = CreateColor3(120,120,120);
460+
461-
	Height = 24;
461+
462-
	BorderColor = CreateColor3(216,216,216);
462+
463-
	BackgroundColor = Styles.White;
463+
464-
	BackgroundColorAlternate = CreateColor3(246,246,246);
464+
465-
	BackgroundColorMouseover = CreateColor3(211,224,244);
465+
		-- Services
466-
	TitleMarginLeft = 15;
466+
		local HttpService = game:GetService("HttpService")
467-
}
467+
		local ServerStorage = game:GetService("ServerStorage")
468
		local ReplicatedStorage = game:GetService("ReplicatedStorage")
469-
local DropDown = {
469+
470-
	Font = Styles.Font;
470+
		-- Remotes
471-
	FontSize = Enum.FontSize.Size14;
471+
		--local Remotes = ReplicatedStorage:WaitForChild("OnlineStudio"):WaitForChild("Remotes")
472-
	TextColor = CreateColor3(0,0,0);
472+
		--local GetApiJsonFunction = Remotes:WaitForChild("GetApiJson")
473-
	TextColorOver = Styles.White;
473+
474-
	TextXAlignment = Enum.TextXAlignment.Left;
474+
		-- Functions
475-
	Height = 16;
475+
		local JsonDecode = function(s) return HttpService:JSONDecode(s) end
476-
	BackColor = Styles.White;
476+
477-
	BackColorOver = CreateColor3(86,125,188);
477+
		local function GetApiRemoteFunction(index)
478-
	BorderColor = CreateColor3(216,216,216);
478+
			if (apiChunks[index]) then 
479-
	BorderSizePixel = 2;
479+
				return apiChunks[index], #apiChunks
480-
	ArrowColor = CreateColor3(160,160,160);
480+
481-
	ArrowColorOver = Styles.Black;
481+
				print("Bad index for GetApiJson")
482-
}
482+
				return nil
483
			end
484-
local BrickColors = {
484+
485-
	BoxSize = 13;
485+
486-
	BorderSizePixel = 1;
486+
		local function getApiJson()
487-
	BorderColor = CreateColor3(160,160,160);
487+
			local apiTable = {}
488-
	FrameColor = CreateColor3(160,160,160);
488+
			local firstPage, pageCount = GetApiRemoteFunction(1)
489-
	Size = 20;
489+
			table.insert(apiTable, firstPage)
490-
	Padding = 4;
490+
			for i = 2, pageCount do
491-
	ColorsPerRow = 8;
491+
				--print("Fetching API page # " .. tostring(i))
492-
	OuterBorder = 1;
492+
				local result = GetApiRemoteFunction(i)
493-
	OuterBorderColor = Styles.Black;
493+
				table.insert(apiTable, result)
494-
}
494+
495
			return table.concat(apiTable)
496-
wait(1)
496+
497
498-
local bindGetSelection = ExplorerFrame.GetSelection
498+
		local json = getApiJson()
499-
local bindSelectionChanged = ExplorerFrame.SelectionChanged
499+
		local apiDump =  JsonDecode(json)
500-
local bindGetApi = PropertiesFrame.GetApi
500+
501-
local bindGetAwait = PropertiesFrame.GetAwaiting
501+
		local Classes = {}
502-
local bindSetAwait = PropertiesFrame.SetAwaiting
502+
		local Enums = {}
503
504-
local ContentUrl = ContentProvider.BaseUrl .. "asset/?id="
504+
		local function sortAlphabetic(t, property)
505
			table.sort(t, 
506-
local SettingsRemote = Gui:WaitForChild("SettingsPanel"):WaitForChild("GetSetting")
506+
				function(x,y) return x[property] < y[property]
507
				end)
508-
local propertiesSearch = PropertiesFrame.Header.TextBox
508+
509
510-
local AwaitingObjectValue = false
510+
		local function isEnum(name)
511-
local AwaitingObjectObj
511+
			return Enums[name] ~= nil
512-
local AwaitingObjectProp
512+
513
514-
function searchingProperties()
514+
		local function getProperties(className)
515-
	if propertiesSearch.Text ~= "" and propertiesSearch.Text ~= "Search Properties" then
515+
			local class = Classes[className]
516-
		return true
516+
			local properties = {}
517
518-
	return false
518+
			if not class then return properties end
519
520
			while class do
521-
local function GetSelection()
521+
				for _,property in pairs(class.Properties) do
522-
	local selection = bindGetSelection:Invoke()
522+
					table.insert(properties, property)
523-
	if #selection == 0 then
523+
524
				class = Classes[class.Superclass]
525
			end
526-
		return selection
526+
527-
	end 
527+
			sortAlphabetic(properties, "Name")
528
529
			return properties
530-
-- Number
530+
531
532-
local function Round(number, decimalPlaces)
532+
		for _,item in pairs(apiDump) do
533-
	return tonumber(string.format("%." .. (decimalPlaces or 0) .. "f", number))
533+
			local itemType = item.type
534
			-- Classes --
535
			if (itemType == 'Class') then
536-
-- Strings
536+
				Classes[item.Name] = item
537
				item.Properties = {}
538-
local function Split(str, delimiter)
538+
				item.Functions = {}
539-
	local start = 1
539+
				item.YieldFunctions = {}
540-
	local t = {}
540+
				item.Events = {}
541-
	while true do
541+
				item.Callbacks = {}
542-
		local pos = string.find (str, delimiter, start, true)
542+
				-- Members --
543-
		if not pos then
543+
			elseif (itemType == 'Property') then
544-
			break
544+
				table.insert(Classes[item.Class].Properties, item)
545
			elseif (itemType == 'Function') then
546-
		table.insert (t, string.sub (str, start, pos - 1))
546+
				table.insert(Classes[item.Class].Functions, item)
547-
		start = pos + string.len (delimiter)
547+
			elseif (itemType == 'YieldFunction') then
548
				table.insert(Classes[item.Class].YieldFunctions, item)
549-
	table.insert (t, string.sub (str, start))
549+
			elseif (itemType == 'Event') then
550-
	return t
550+
				table.insert(Classes[item.Class].Events, item)
551
			elseif (itemType == 'Callback') then
552
				table.insert(Classes[item.Class].Callbacks, item)
553-
-- Data Type Handling
553+
				-- Enums --
554
			elseif (itemType == 'Enum') then
555-
local function ToString(value, type)
555+
				Enums[item.Name] = item
556-
	if type == "float" then
556+
				item.EnumItems = {}
557-
		return tostring(Round(value,2))
557+
			elseif (itemType == 'EnumItem') then
558-
	elseif type == "Content" then
558+
				Enums[item.Enum].EnumItems[item.Name] = item
559-
		if string.find(value,"/asset") then
559+
560-
			local match = string.find(value, "=") + 1
560+
561-
			local id = string.sub(value, match)
561+
562-
			return id
562+
		return {
563
			Classes = Classes;
564
			Enums = Enums;
565
			GetProperties = getProperties;
566-
	elseif type == "Vector2" then
566+
			IsEnum = isEnum;
567-
		local x = value.x
567+
568-
		local y = value.y
568+
569-
		return string.format("%g, %g", x,y)
569+
570-
	elseif type == "Vector3" then
570+
	-- Modules
571-
		local x = value.x
571+
	local Permissions = {CanEdit = true}
572-
		local y = value.y
572+
	local RbxApi = getRbxApi()
573-
		local z = value.z
573+
574-
		return string.format("%g, %g, %g", x,y,z)
574+
575-
	elseif type == "Color3" then
575+
576-
		local r = value.r
576+
577-
		local g = value.g
577+
578-
		local b = value.b
578+
579-
		return string.format("%d, %d, %d", r*255,g*255,b*255)
579+
580-
	elseif type == "UDim2" then
580+
581-
		local xScale = value.X.Scale
581+
	-- Styles
582-
		local xOffset = value.X.Offset
582+
583-
		local yScale = value.Y.Scale
583+
	local function CreateColor3(r, g, b) return Color3.new(r/255,g/255,b/255) end
584-
		local yOffset = value.Y.Offset
584+
585-
		return string.format("{%d, %d}, {%d, %d}", xScale, xOffset, yScale, yOffset)
585+
	local Styles = {
586
		Font = Enum.Font.Arial;
587-
		return tostring(value)
587+
		Margin = 5;
588
		Black = CreateColor3(0,0,0);
589
		White = CreateColor3(255,255,255);
590
	}
591-
local function ToValue(value,type)
591+
592-
	if type == "Vector2" then
592+
	local Row = {
593-
		local list = Split(value,",")
593+
		Font = Styles.Font;
594-
		if #list < 2 then return nil end
594+
		FontSize = Enum.FontSize.Size14;
595-
		local x = tonumber(list[1]) or 0
595+
		TextXAlignment = Enum.TextXAlignment.Left;
596-
		local y = tonumber(list[2]) or 0
596+
		TextColor = Styles.Black;
597-
		return Vector2.new(x,y)
597+
		TextColorOver = Styles.White;
598-
	elseif type == "Vector3" then
598+
		TextLockedColor = CreateColor3(120,120,120);
599-
		local list = Split(value,",")
599+
		Height = 24;
600-
		if #list < 3 then return nil end
600+
		BorderColor = CreateColor3(216,216,216);
601-
		local x = tonumber(list[1]) or 0
601+
		BackgroundColor = Styles.White;
602-
		local y = tonumber(list[2]) or 0
602+
		BackgroundColorAlternate = CreateColor3(246,246,246);
603-
		local z = tonumber(list[3]) or 0
603+
		BackgroundColorMouseover = CreateColor3(211,224,244);
604-
		return Vector3.new(x,y,z)
604+
		TitleMarginLeft = 15;
605-
	elseif type == "Color3" then
605+
606-
		local list = Split(value,",")
606+
607-
		if #list < 3 then return nil end
607+
	local DropDown = {
608-
		local r = tonumber(list[1]) or 0
608+
		Font = Styles.Font;
609-
		local g = tonumber(list[2]) or 0
609+
		FontSize = Enum.FontSize.Size14;
610-
		local b = tonumber(list[3]) or 0
610+
		TextColor = CreateColor3(0,0,0);
611-
		return Color3.new(r/255,g/255, b/255)
611+
		TextColorOver = Styles.White;
612-
	elseif type == "UDim2" then
612+
		TextXAlignment = Enum.TextXAlignment.Left;
613-
		local list = Split(string.gsub(string.gsub(value, "{", ""),"}",""),",")
613+
		Height = 16;
614-
		if #list < 4 then return nil end
614+
		BackColor = Styles.White;
615-
		local xScale = tonumber(list[1]) or 0
615+
		BackColorOver = CreateColor3(86,125,188);
616-
		local xOffset = tonumber(list[2]) or 0
616+
		BorderColor = CreateColor3(216,216,216);
617-
		local yScale = tonumber(list[3]) or 0
617+
		BorderSizePixel = 2;
618-
		local yOffset = tonumber(list[4]) or 0
618+
		ArrowColor = CreateColor3(160,160,160);
619-
		return UDim2.new(xScale, xOffset, yScale, yOffset)
619+
		ArrowColorOver = Styles.Black;
620-
	elseif type == "Content" then
620+
621-
		if tonumber(value) ~= nil then
621+
622-
			value = ContentUrl .. value
622+
	local BrickColors = {
623
		BoxSize = 13;
624-
		return value
624+
		BorderSizePixel = 1;
625-
	elseif type == "float" or type == "int" or type == "double" then
625+
		BorderColor = CreateColor3(160,160,160);
626-
		return tonumber(value)
626+
		FrameColor = CreateColor3(160,160,160);
627-
	elseif type == "string" then
627+
		Size = 20;
628-
		return value
628+
		Padding = 4;
629-
	elseif type == "NumberRange" then
629+
		ColorsPerRow = 8;
630-
		local list = Split(value,",")
630+
		OuterBorder = 1;
631-
		if #list == 1 then
631+
		OuterBorderColor = Styles.Black;
632-
			if tonumber(list[1]) == nil then return nil end
632+
633-
			local newVal = tonumber(list[1]) or 0
633+
634-
			return NumberRange.new(newVal)
634+
	wait(1)
635
636-
		if #list < 2 then return nil end
636+
	local bindGetSelection = ExplorerFrame.GetSelection
637-
		local x = tonumber(list[1]) or 0
637+
	local bindSelectionChanged = ExplorerFrame.SelectionChanged
638-
		local y = tonumber(list[2]) or 0
638+
	local bindGetApi = PropertiesFrame.GetApi
639-
		return NumberRange.new(x,y)
639+
	local bindGetAwait = PropertiesFrame.GetAwaiting
640
	local bindSetAwait = PropertiesFrame.SetAwaiting
641
642
	local ContentUrl = ContentProvider.BaseUrl .. "asset/?id="
643
644
	local SettingsRemote = Gui:WaitForChild("SettingsPanel"):WaitForChild("GetSetting")
645
646-
-- Tables
646+
	local propertiesSearch = PropertiesFrame.Header.TextBox
647
648-
local function CopyTable(T)
648+
	local AwaitingObjectValue = false
649-
  local t2 = {}
649+
	local AwaitingObjectObj
650-
  for k,v in pairs(T) do
650+
	local AwaitingObjectProp
651-
    t2[k] = v
651+
652-
  end
652+
	function searchingProperties()
653-
  return t2
653+
		if propertiesSearch.Text ~= "" and propertiesSearch.Text ~= "Search Properties" then
654
			return true
655
		end
656-
local function SortTable(T)
656+
657-
	table.sort(T, 
657+
658-
		function(x,y) return x.Name < y.Name
658+
659
	local function GetSelection()
660
		local selection = bindGetSelection:Invoke()
661
		if #selection == 0 then
662-
-- Spritesheet
662+
663-
local Sprite = {
663+
664-
	Width = 13;
664+
			return selection
665-
	Height = 13;
665+
		end 
666-
}
666+
667
668-
local Spritesheet = {
668+
	-- Number
669-
	Image = "http://www.roblox.com/asset/?id=128896947";
669+
670-
	Height = 256;
670+
	local function Round(number, decimalPlaces)
671-
	Width = 256;
671+
		return tonumber(string.format("%." .. (decimalPlaces or 0) .. "f", number))
672-
}
672+
673
674-
local Images = {
674+
	-- Strings
675-
	"unchecked",
675+
676-
	"checked",
676+
	local function Split(str, delimiter)
677-
	"unchecked_over",
677+
		local start = 1
678-
	"checked_over",
678+
		local t = {}
679-
	"unchecked_disabled",
679+
680-
	"checked_disabled"
680+
			local pos = string.find (str, delimiter, start, true)
681-
}
681+
			if not pos then
682
				break
683-
local function SpritePosition(spriteName)
683+
684-
	local x = 0
684+
			table.insert (t, string.sub (str, start, pos - 1))
685-
	local y = 0
685+
			start = pos + string.len (delimiter)
686-
	for i,v in pairs(Images) do
686+
687-
		if (v == spriteName) then
687+
		table.insert (t, string.sub (str, start))
688-
			return {x, y}
688+
		return t
689
	end
690-
		x = x + Sprite.Height
690+
691-
		if (x + Sprite.Width) > Spritesheet.Width then
691+
	-- Data Type Handling
692-
			x = 0
692+
693-
			y = y + Sprite.Height
693+
	local function ToString(value, type)
694
		if type == "float" then
695
			return tostring(Round(value,2))
696
		elseif type == "Content" then
697
			if string.find(value,"/asset") then
698-
local function GetCheckboxImageName(checked, readOnly, mouseover)
698+
				local match = string.find(value, "=") + 1
699-
	if checked then
699+
				local id = string.sub(value, match)
700
				return id
701-
			return "checked_disabled"
701+
702-
		elseif mouseover then
702+
				return tostring(value)
703-
			return "checked_over"
703+
704
		elseif type == "Vector2" then
705-
			return "checked"
705+
			local x = value.x
706
			local y = value.y
707
			return string.format("%g, %g", x,y)
708
		elseif type == "Vector3" then
709-
			return "unchecked_disabled"
709+
			local x = value.x
710-
		elseif mouseover then
710+
			local y = value.y
711-
			return "unchecked_over"
711+
			local z = value.z
712
			return string.format("%g, %g, %g", x,y,z)
713-
			return "unchecked"
713+
		elseif type == "Color3" then
714
			local r = value.r
715
			local g = value.g
716
			local b = value.b
717
			return string.format("%d, %d, %d", r*255,g*255,b*255)
718-
local MAP_ID = 418720155
718+
		elseif type == "UDim2" then
719
			local xScale = value.X.Scale
720-
-- Gui Controls --
720+
			local xOffset = value.X.Offset
721
			local yScale = value.Y.Scale
722-
---- IconMap ----
722+
			local yOffset = value.Y.Offset
723-
-- Image size: 256px x 256px
723+
			return string.format("{%d, %d}, {%d, %d}", xScale, xOffset, yScale, yOffset)
724-
-- Icon size: 16px x 16px
724+
725-
-- Padding between each icon: 2px
725+
726-
-- Padding around image edge: 1px
726+
727-
-- Total icons: 14 x 14 (196)
727+
728-
local Icon do
728+
729-
	local iconMap = 'http://www.roblox.com/asset/?id=' .. MAP_ID
729+
	local function ToValue(value,type)
730-
	game:GetService('ContentProvider'):Preload(iconMap)
730+
		if type == "Vector2" then
731-
	local iconDehash do
731+
			local list = Split(value,",")
732-
		-- 14 x 14, 0-based input, 0-based output
732+
			if #list < 2 then return nil end
733-
		local f=math.floor
733+
			local x = tonumber(list[1]) or 0
734-
		function iconDehash(h)
734+
			local y = tonumber(list[2]) or 0
735-
			return f(h/14%14),f(h%14)
735+
			return Vector2.new(x,y)
736
		elseif type == "Vector3" then
737
			local list = Split(value,",")
738
			if #list < 3 then return nil end
739-
	function Icon(IconFrame,index)
739+
			local x = tonumber(list[1]) or 0
740-
		local row,col = iconDehash(index)
740+
			local y = tonumber(list[2]) or 0
741-
		local mapSize = Vector2.new(256,256)
741+
			local z = tonumber(list[3]) or 0
742-
		local pad,border = 2,1
742+
			return Vector3.new(x,y,z)
743-
		local iconSize = 16
743+
		elseif type == "Color3" then
744
			local list = Split(value,",")
745-
		local class = 'Frame'
745+
			if #list < 3 then return nil end
746-
		if type(IconFrame) == 'string' then
746+
			local r = tonumber(list[1]) or 0
747-
			class = IconFrame
747+
			local g = tonumber(list[2]) or 0
748-
			IconFrame = nil
748+
			local b = tonumber(list[3]) or 0
749
			return Color3.new(r/255,g/255, b/255)
750
		elseif type == "UDim2" then
751-
		if not IconFrame then
751+
			local list = Split(string.gsub(string.gsub(value, "{", ""),"}",""),",")
752-
			IconFrame = Create(class,{
752+
			if #list < 4 then return nil end
753-
				Name = "Icon";
753+
			local xScale = tonumber(list[1]) or 0
754
			local xOffset = tonumber(list[2]) or 0
755-
				ClipsDescendants = true;
755+
			local yScale = tonumber(list[3]) or 0
756-
				Create('ImageLabel',{
756+
			local yOffset = tonumber(list[4]) or 0
757-
					Name = "IconMap";
757+
			return UDim2.new(xScale, xOffset, yScale, yOffset)
758-
					Active = false;
758+
		elseif type == "Content" then
759
			if tonumber(value) ~= nil then
760-
					Image = iconMap;
760+
				value = ContentUrl .. value
761-
					Size = UDim2.new(mapSize.x/iconSize,0,mapSize.y/iconSize,0);
761+
762
			return value
763
		elseif type == "float" or type == "int" or type == "double" then
764
			return tonumber(value)
765
		elseif type == "string" then
766-
		IconFrame.IconMap.Position = UDim2.new(-col - (pad*(col+1) + border)/iconSize,0,-row - (pad*(row+1) + border)/iconSize,0)
766+
			return value
767-
		return IconFrame
767+
		elseif type == "NumberRange" then
768
			local list = Split(value,",")
769
			if #list == 1 then
770
				if tonumber(list[1]) == nil then return nil end
771-
local function CreateCell()
771+
				local newVal = tonumber(list[1]) or 0
772-
	local tableCell = Instance.new("Frame")
772+
				return NumberRange.new(newVal)
773-
	tableCell.Size = UDim2.new(0.5, -1, 1, 0)
773+
774-
	tableCell.BackgroundColor3 = Row.BackgroundColor
774+
			if #list < 2 then return nil end
775-
	tableCell.BorderColor3 = Row.BorderColor
775+
			local x = tonumber(list[1]) or 0
776-
	return tableCell
776+
			local y = tonumber(list[2]) or 0
777
			return NumberRange.new(x,y)
778
		else
779-
local function CreateLabel(readOnly)
779+
780-
	local label = Instance.new("TextLabel")
780+
781-
	label.Font = Row.Font
781+
782-
	label.FontSize = Row.FontSize
782+
783-
	label.TextXAlignment = Row.TextXAlignment
783+
784-
	label.BackgroundTransparency = 1
784+
	-- Tables
785
786
	local function CopyTable(T)
787-
		label.TextColor3 = Row.TextLockedColor
787+
		local t2 = {}
788
		for k,v in pairs(T) do
789-
		label.TextColor3 = Row.TextColor
789+
			t2[k] = v
790
		end
791-
	return label
791+
		return t2
792
	end
793
794-
local function CreateTextButton(readOnly, onClick)
794+
	local function SortTable(T)
795
		table.sort(T, 
796
			function(x,y) return x.Name < y.Name
797
			end)
798
	end
799
800
	-- Spritesheet
801
	local Sprite = {
802
		Width = 13;
803
		Height = 13;
804
	}
805-
			onClick()
805+
806
	local Spritesheet = {
807
		Image = "http://www.roblox.com/asset/?id=128896947";
808-
	return button
808+
		Height = 256;
809
		Width = 256;
810
	}
811-
local function CreateObject(readOnly)
811+
812
	local Images = {
813
		"unchecked",
814
		"checked",
815
		"unchecked_over",
816
		"checked_over",
817
		"unchecked_disabled",
818
		"checked_disabled"
819
	}
820
821
	local function SpritePosition(spriteName)
822-
	local cancel = Create(Icon('ImageButton',177),{
822+
		local x = 0
823-
		Name = "Cancel";
823+
		local y = 0
824
		for i,v in pairs(Images) do
825-
		Position = UDim2.new(1,-20,0,0);
825+
			if (v == spriteName) then
826-
		Size = UDim2.new(0,20,0,20);
826+
				return {x, y}
827-
		Parent = button;
827+
828
			x = x + Sprite.Height
829-
	return button
829+
			if (x + Sprite.Width) > Spritesheet.Width then
830
				x = 0
831
				y = y + Sprite.Height
832-
local function CreateTextBox(readOnly)
832+
833
		end
834-
		local box = CreateLabel(readOnly)
834+
835
836
	local function GetCheckboxImageName(checked, readOnly, mouseover)
837-
		local box = Instance.new("TextBox")
837+
		if checked then
838-
		if not SettingsRemote:Invoke("ClearProps") then
838+
			if readOnly then
839-
			box.ClearTextOnFocus = false
839+
				return "checked_disabled"
840
			elseif mouseover then
841-
		box.Font = Row.Font
841+
				return "checked_over"
842-
		box.FontSize = Row.FontSize
842+
843-
		box.TextXAlignment = Row.TextXAlignment
843+
				return "checked"
844-
		box.BackgroundTransparency = 1
844+
845-
		box.TextColor3 = Row.TextColor
845+
846
			if readOnly then
847
				return "unchecked_disabled"
848
			elseif mouseover then
849
				return "unchecked_over"
850-
local function CreateDropDownItem(text, onClick)
850+
851
				return "unchecked"
852-
	button.Font = DropDown.Font
852+
853-
	button.FontSize = DropDown.FontSize
853+
854-
	button.TextColor3 = DropDown.TextColor
854+
855-
	button.TextXAlignment = DropDown.TextXAlignment
855+
856-
	button.BackgroundColor3 = DropDown.BackColor
856+
	local MAP_ID = 418720155
857-
	button.AutoButtonColor = false
857+
858-
	button.BorderSizePixel = 0
858+
	-- Gui Controls --
859-
	button.Active = true
859+
860-
	button.Text = text
860+
	---- IconMap ----
861
	-- Image size: 256px x 256px
862-
	button.MouseEnter:connect(function()
862+
	-- Icon size: 16px x 16px
863-
		button.TextColor3 = DropDown.TextColorOver
863+
	-- Padding between each icon: 2px
864-
		button.BackgroundColor3 = DropDown.BackColorOver
864+
	-- Padding around image edge: 1px
865
	-- Total icons: 14 x 14 (196)
866-
	button.MouseLeave:connect(function()
866+
	local Icon do
867
		local iconMap = 'http://www.roblox.com/asset/?id=' .. MAP_ID
868
		game:GetService('ContentProvider'):Preload(iconMap)
869
		local iconDehash do
870-
	button.MouseButton1Click:connect(function()
870+
			-- 14 x 14, 0-based input, 0-based output
871-
		onClick(text)
871+
			local f=math.floor
872-
	end)	
872+
			function iconDehash(h)
873-
	return button
873+
				return f(h/14%14),f(h%14)
874
			end
875
		end
876-
local function CreateDropDown(choices, currentChoice, readOnly, onClick)
876+
877-
	local frame = Instance.new("Frame")	
877+
		function Icon(IconFrame,index)
878-
	frame.Name = "DropDown"
878+
			local row,col = iconDehash(index)
879-
	frame.Size = UDim2.new(1, 0, 1, 0)
879+
			local mapSize = Vector2.new(256,256)
880-
	frame.BackgroundTransparency = 1
880+
			local pad,border = 2,1
881-
	frame.Active = true
881+
			local iconSize = 16
882
883-
	local menu = nil
883+
			local class = 'Frame'
884-
	local arrow = nil
884+
			if type(IconFrame) == 'string' then
885-
	local expanded = false
885+
				class = IconFrame
886-
	local margin = DropDown.BorderSizePixel;
886+
				IconFrame = nil
887
			end
888
889
			if not IconFrame then
890
				IconFrame = Create(class,{
891
					Name = "Icon";
892
					BackgroundTransparency = 1;
893
					ClipsDescendants = true;
894
					Create('ImageLabel',{
895
						Name = "IconMap";
896
						Active = false;
897
						BackgroundTransparency = 1;
898
						Image = iconMap;
899
						Size = UDim2.new(mapSize.x/iconSize,0,mapSize.y/iconSize,0);
900
					});
901
				})
902-
	local function showArrow(color)
902+
903-
		if arrow then arrow:Destroy() end
903+
904
			IconFrame.IconMap.Position = UDim2.new(-col - (pad*(col+1) + border)/iconSize,0,-row - (pad*(row+1) + border)/iconSize,0)
905-
		local graphicTemplate = Create('Frame',{
905+
			return IconFrame
906-
			Name="Graphic";
906+
907
	end
908-
			BackgroundColor3 = color;
908+
909
	local function CreateCell()
910-
		local graphicSize = 16/2
910+
		local tableCell = Instance.new("Frame")
911
		tableCell.Size = UDim2.new(0.5, -1, 1, 0)
912-
		arrow = ArrowGraphic(graphicSize,'Down',true,graphicTemplate)
912+
		tableCell.BackgroundColor3 = Row.BackgroundColor
913-
		arrow.Position = UDim2.new(1,-graphicSize * 2,0.5,-graphicSize/2)
913+
		tableCell.BorderColor3 = Row.BorderColor
914-
		arrow.Parent = frame
914+
		return tableCell
915
	end
916
917-
	local function hideMenu()
917+
	local function CreateLabel(readOnly)
918-
		expanded = false
918+
		local label = Instance.new("TextLabel")
919
		label.Font = Row.Font
920-
		if menu then menu:Destroy() end
920+
		label.FontSize = Row.FontSize
921
		label.TextXAlignment = Row.TextXAlignment
922
		label.BackgroundTransparency = 1
923-
	local function showMenu()
923+
924-
		expanded = true
924+
925-
		menu = Instance.new("Frame")
925+
			label.TextColor3 = Row.TextLockedColor
926-
		menu.Size = UDim2.new(1, -2 * margin, 0, #choices * DropDown.Height)
926+
927-
		menu.Position = UDim2.new(0, margin, 0, Row.Height + margin)
927+
			label.TextColor3 = Row.TextColor
928-
		menu.BackgroundTransparency = 0
928+
929-
		menu.BackgroundColor3 = DropDown.BackColor
929+
		return label
930-
		menu.BorderColor3 = DropDown.BorderColor
930+
931-
		menu.BorderSizePixel = DropDown.BorderSizePixel
931+
932-
		menu.Active = true
932+
	local function CreateTextButton(readOnly, onClick)
933-
		menu.ZIndex = 5
933+
		local button = Instance.new("TextButton")
934-
		menu.Parent = frame
934+
		button.Font = Row.Font
935
		button.FontSize = Row.FontSize
936-
		local parentFrameHeight = menu.Parent.Parent.Parent.Parent.Size.Y.Offset
936+
		button.TextXAlignment = Row.TextXAlignment
937-
		local rowHeight = menu.Parent.Parent.Parent.Position.Y.Offset
937+
		button.BackgroundTransparency = 1
938-
		if (rowHeight + menu.Size.Y.Offset) > math.max(parentFrameHeight,PropertiesFrame.AbsoluteSize.y) then
938+
939-
			menu.Position = UDim2.new(0, margin, 0, -1 * (#choices * DropDown.Height) - margin)
939+
			button.TextColor3 = Row.TextLockedColor
940
		else
941-
			
941+
942-
		local function choice(name)
942+
			button.MouseButton1Click:connect(function()
943-
			onClick(name)
943+
				onClick()
944-
			hideMenu()
944+
945
		end
946
		return button
947-
		for i,name in pairs(choices) do
947+
948-
			local option = CreateDropDownItem(name, function()
948+
949-
				choice(name)
949+
	local function CreateObject(readOnly)
950
		local button = Instance.new("TextButton")
951-
			option.Size = UDim2.new(1, 0, 0, 16)
951+
		button.Font = Row.Font
952-
			option.Position = UDim2.new(0, 0, 0, (i - 1) * DropDown.Height)
952+
		button.FontSize = Row.FontSize
953-
			option.ZIndex = menu.ZIndex
953+
		button.TextXAlignment = Row.TextXAlignment
954-
			option.Parent = menu
954+
		button.BackgroundTransparency = 1
955
		if readOnly then
956
			button.TextColor3 = Row.TextLockedColor
957
		else
958-
	showArrow(DropDown.ArrowColor)
958+
959
		end
960-
	if not readOnly then
960+
		local cancel = Create(Icon('ImageButton',177),{
961
			Name = "Cancel";
962
			Visible = false;
963
			Position = UDim2.new(1,-20,0,0);
964-
			showArrow(DropDown.ArrowColorOver)
964+
			Size = UDim2.new(0,20,0,20);
965
			Parent = button;
966
		})
967
		return button
968-
			if not expanded then
968+
969-
				showArrow(DropDown.ArrowColor)
969+
970
	local function CreateTextBox(readOnly)
971
		if readOnly then
972
			local box = CreateLabel(readOnly)
973-
			if expanded then
973+
			return box
974
		else
975
			local box = Instance.new("TextBox")
976-
				showMenu()
976+
			if not SettingsRemote:Invoke("ClearProps") then
977
				box.ClearTextOnFocus = false
978
			end
979
			box.Font = Row.Font
980
			box.FontSize = Row.FontSize
981-
	return frame,button
981+
			box.TextXAlignment = Row.TextXAlignment
982
			box.BackgroundTransparency = 1
983
			box.TextColor3 = Row.TextColor
984-
local function CreateBrickColor(readOnly, onClick)
984+
			return box
985-
	local frame = Instance.new("Frame")
985+
986-
	frame.Size = UDim2.new(1,0,1,0)
986+
987-
	frame.BackgroundTransparency = 1
987+
988
	local function CreateDropDownItem(text, onClick)
989-
	local colorPalette = Instance.new("Frame")
989+
		local button = Instance.new("TextButton")
990-
	colorPalette.BackgroundTransparency = 0
990+
		button.Font = DropDown.Font
991-
	colorPalette.SizeConstraint = Enum.SizeConstraint.RelativeXX
991+
		button.FontSize = DropDown.FontSize
992-
	colorPalette.Size = UDim2.new(1, -2 * BrickColors.OuterBorder, 1, -2 * BrickColors.OuterBorder)
992+
993-
	colorPalette.BorderSizePixel = BrickColors.BorderSizePixel
993+
		button.TextXAlignment = DropDown.TextXAlignment
994-
	colorPalette.BorderColor3 = BrickColors.BorderColor
994+
995-
	colorPalette.Position = UDim2.new(0, BrickColors.OuterBorder, 0, BrickColors.OuterBorder + Row.Height)
995+
		button.AutoButtonColor = false
996-
	colorPalette.ZIndex = 5
996+
		button.BorderSizePixel = 0
997-
	colorPalette.Visible = false
997+
		button.Active = true
998-
	colorPalette.BorderSizePixel = BrickColors.OuterBorder
998+
		button.Text = text
999-
	colorPalette.BorderColor3 = BrickColors.OuterBorderColor
999+
1000-
	colorPalette.Parent = frame
1000+
1001
			button.TextColor3 = DropDown.TextColorOver
1002-
	local function show()
1002+
			button.BackgroundColor3 = DropDown.BackColorOver
1003-
		colorPalette.Visible = true
1003+
1004
		button.MouseLeave:connect(function()
1005
			button.TextColor3 = DropDown.TextColor
1006-
	local function hide()
1006+
			button.BackgroundColor3 = DropDown.BackColor
1007
		end)
1008
		button.MouseButton1Click:connect(function()
1009
			onClick(text)
1010-
	local function toggle()
1010+
		end)	
1011-
		colorPalette.Visible = not colorPalette.Visible
1011+
1012
	end
1013
1014-
	local colorBox = Instance.new("TextButton", frame)
1014+
	local function CreateDropDown(choices, currentChoice, readOnly, onClick)
1015-
	colorBox.Position = UDim2.new(0, Styles.Margin, 0, Styles.Margin)
1015+
		local frame = Instance.new("Frame")	
1016-
	colorBox.Size = UDim2.new(0, BrickColors.BoxSize, 0, BrickColors.BoxSize)
1016+
		frame.Name = "DropDown"
1017-
	colorBox.Text = ""
1017+
		frame.Size = UDim2.new(1, 0, 1, 0)
1018-
	colorBox.MouseButton1Click:connect(function()
1018+
		frame.BackgroundTransparency = 1
1019
		frame.Active = true
1020-
			toggle()
1020+
1021
		local menu = nil
1022
		local arrow = nil
1023
		local expanded = false
1024
		local margin = DropDown.BorderSizePixel;
1025
1026
		local button = Instance.new("TextButton")
1027
		button.Font = Row.Font
1028-
	local spacingBefore = (Styles.Margin * 2) + BrickColors.BoxSize
1028+
		button.FontSize = Row.FontSize
1029
		button.TextXAlignment = Row.TextXAlignment
1030-
	local propertyLabel = CreateTextButton(readOnly, function()
1030+
		button.BackgroundTransparency = 1
1031
		button.TextColor3 = Row.TextColor
1032-
			toggle()
1032+
1033
			button.TextColor3 = Row.TextLockedColor
1034
		end
1035-
	propertyLabel.Size = UDim2.new(1, (-1 * spacingBefore) - Styles.Margin, 1, 0)
1035+
		button.Text = currentChoice
1036-
	propertyLabel.Position = UDim2.new(0, spacingBefore, 0, 0)
1036+
		button.Size = UDim2.new(1, -2 * Styles.Margin, 1, 0)
1037-
	propertyLabel.Parent = frame
1037+
		button.Position = UDim2.new(0, Styles.Margin, 0, 0)
1038
		button.Parent = frame
1039-
	local size = (1 / BrickColors.ColorsPerRow)
1039+
1040
		local function showArrow(color)
1041-
	for index = 0, 127 do
1041+
			if arrow then arrow:Destroy() end
1042-
		local brickColor = BrickColor.palette(index)
1042+
1043-
		local color3 = brickColor.Color
1043+
			local graphicTemplate = Create('Frame',{
1044
				Name="Graphic";
1045-
		local x = size * (index % BrickColors.ColorsPerRow)
1045+
1046-
		local y = size * math.floor(index / BrickColors.ColorsPerRow)
1046+
				BackgroundColor3 = color;
1047
			})
1048-
		local brickColorBox = Instance.new("TextButton")
1048+
			local graphicSize = 16/2
1049-
		brickColorBox.Text = ""
1049+
1050-
		brickColorBox.Size = UDim2.new(size,0,size,0)
1050+
			arrow = ArrowGraphic(graphicSize,'Down',true,graphicTemplate)
1051-
		brickColorBox.BackgroundColor3 = color3
1051+
			arrow.Position = UDim2.new(1,-graphicSize * 2,0.5,-graphicSize/2)
1052-
		brickColorBox.Position = UDim2.new(x, 0, y, 0)
1052+
			arrow.Parent = frame
1053-
		brickColorBox.ZIndex = colorPalette.ZIndex
1053+
1054-
		brickColorBox.Parent = colorPalette
1054+
1055
		local function hideMenu()
1056-
		brickColorBox.MouseButton1Click:connect(function()
1056+
			expanded = false
1057-
			hide()
1057+
			showArrow(DropDown.ArrowColor)
1058-
			onClick(brickColor)
1058+
			if menu then menu:Destroy() end
1059
		end
1060
1061
		local function showMenu()
1062-
	return frame,propertyLabel,colorBox
1062+
			expanded = true
1063
			menu = Instance.new("Frame")
1064
			menu.Size = UDim2.new(1, -2 * margin, 0, #choices * DropDown.Height)
1065-
local function CreateColor3Control(readOnly, onClick)
1065+
			menu.Position = UDim2.new(0, margin, 0, Row.Height + margin)
1066-
	local frame = Instance.new("Frame")
1066+
			menu.BackgroundTransparency = 0
1067-
	frame.Size = UDim2.new(1,0,1,0)
1067+
			menu.BackgroundColor3 = DropDown.BackColor
1068-
	frame.BackgroundTransparency = 1
1068+
			menu.BorderColor3 = DropDown.BorderColor
1069
			menu.BorderSizePixel = DropDown.BorderSizePixel
1070-
	local colorBox = Instance.new("TextButton", frame)
1070+
			menu.Active = true
1071-
	colorBox.Position = UDim2.new(0, Styles.Margin, 0, Styles.Margin)
1071+
			menu.ZIndex = 5
1072-
	colorBox.Size = UDim2.new(0, BrickColors.BoxSize, 0, BrickColors.BoxSize)
1072+
			menu.Parent = frame
1073-
	colorBox.Text = ""
1073+
1074-
	colorBox.AutoButtonColor = false
1074+
			local parentFrameHeight = menu.Parent.Parent.Parent.Parent.Size.Y.Offset
1075
			local rowHeight = menu.Parent.Parent.Parent.Position.Y.Offset
1076-
	local spacingBefore = (Styles.Margin * 2) + BrickColors.BoxSize
1076+
			if (rowHeight + menu.Size.Y.Offset) > math.max(parentFrameHeight,PropertiesFrame.AbsoluteSize.y) then
1077-
	local box = CreateTextBox(readOnly)
1077+
				menu.Position = UDim2.new(0, margin, 0, -1 * (#choices * DropDown.Height) - margin)
1078-
	box.Size = UDim2.new(1, (-1 * spacingBefore) - Styles.Margin, 1, 0)
1078+
1079-
	box.Position = UDim2.new(0, spacingBefore, 0, 0)
1079+
1080-
	box.Parent = frame
1080+
			local function choice(name)
1081
				onClick(name)
1082-
	return frame,box,colorBox
1082+
1083
			end
1084
1085-
function CreateCheckbox(value, readOnly, onClick)
1085+
			for i,name in pairs(choices) do
1086-
	local checked = value
1086+
				local option = CreateDropDownItem(name, function()
1087-
	local mouseover = false
1087+
					choice(name)
1088
				end)
1089-
	local checkboxFrame = Instance.new("ImageButton")
1089+
				option.Size = UDim2.new(1, 0, 0, 16)
1090-
	checkboxFrame.Size = UDim2.new(0, Sprite.Width, 0, Sprite.Height)
1090+
				option.Position = UDim2.new(0, 0, 0, (i - 1) * DropDown.Height)
1091-
	checkboxFrame.BackgroundTransparency = 1
1091+
				option.ZIndex = menu.ZIndex
1092-
	checkboxFrame.ClipsDescendants = true
1092+
				option.Parent = menu
1093-
	--checkboxFrame.Position = UDim2.new(0, Styles.Margin, 0, Styles.Margin)
1093+
1094
		end
1095-
	local spritesheetImage = Instance.new("ImageLabel", checkboxFrame)
1095+
1096-
	spritesheetImage.Name = "SpritesheetImageLabel"
1096+
1097-
	spritesheetImage.Size = UDim2.new(0, Spritesheet.Width, 0, Spritesheet.Height)
1097+
1098-
	spritesheetImage.Image = Spritesheet.Image
1098+
1099-
	spritesheetImage.BackgroundTransparency = 1
1099+
1100
			button.MouseEnter:connect(function()
1101-
	local function updateSprite()
1101+
				button.TextColor3 = Row.TextColor
1102-
		local spriteName = GetCheckboxImageName(checked, readOnly, mouseover)
1102+
				showArrow(DropDown.ArrowColorOver)
1103-
		local spritePosition = SpritePosition(spriteName)
1103+
1104-
		spritesheetImage.Position = UDim2.new(0, -1 * spritePosition[1], 0, -1 * spritePosition[2])
1104+
			button.MouseLeave:connect(function()
1105
				button.TextColor3 = Row.TextColor
1106
				if not expanded then
1107-
	local function setValue(val)
1107+
					showArrow(DropDown.ArrowColor)
1108-
		checked = val
1108+
1109
			end)
1110
			button.MouseButton1Click:connect(function()
1111
				if expanded then
1112-
	if not readOnly then
1112+
					hideMenu()
1113-
		checkboxFrame.MouseEnter:connect(function() mouseover = true updateSprite() end)
1113+
1114-
		checkboxFrame.MouseLeave:connect(function() mouseover = false updateSprite() end)
1114+
					showMenu()
1115-
		checkboxFrame.MouseButton1Click:connect(function()
1115+
1116-
			onClick(checked)
1116+
1117
		end
1118
1119
		return frame,button
1120-
	updateSprite()
1120+
1121
1122-
	return checkboxFrame, setValue
1122+
	local function CreateBrickColor(readOnly, onClick)
1123
		local frame = Instance.new("Frame")
1124
		frame.Size = UDim2.new(1,0,1,0)
1125
		frame.BackgroundTransparency = 1
1126
1127-
-- Code for handling controls of various data types --
1127+
		local colorPalette = Instance.new("Frame")
1128
		colorPalette.BackgroundTransparency = 0
1129-
local Controls = {}
1129+
		colorPalette.SizeConstraint = Enum.SizeConstraint.RelativeXX
1130
		colorPalette.Size = UDim2.new(1, -2 * BrickColors.OuterBorder, 1, -2 * BrickColors.OuterBorder)
1131-
Controls["default"] = function(object, propertyData, readOnly)
1131+
		colorPalette.BorderSizePixel = BrickColors.BorderSizePixel
1132-
	local propertyName = propertyData["Name"]
1132+
		colorPalette.BorderColor3 = BrickColors.BorderColor
1133-
	local propertyType = propertyData["ValueType"]
1133+
		colorPalette.Position = UDim2.new(0, BrickColors.OuterBorder, 0, BrickColors.OuterBorder + Row.Height)
1134
		colorPalette.ZIndex = 5
1135-
	local box = CreateTextBox(readOnly)
1135+
1136-
	box.Size = UDim2.new(1, -2 * Styles.Margin, 1, 0)
1136+
		colorPalette.BorderSizePixel = BrickColors.OuterBorder
1137-
	box.Position = UDim2.new(0, Styles.Margin, 0, 0)
1137+
		colorPalette.BorderColor3 = BrickColors.OuterBorderColor
1138
		colorPalette.Parent = frame
1139-
	local function update()
1139+
1140-
		local value = object[propertyName]
1140+
		local function show()
1141-
		box.Text = ToString(value, propertyType)
1141+
			colorPalette.Visible = true
1142
		end
1143
1144-
	if not readOnly then
1144+
		local function hide()
1145-
		box.FocusLost:connect(function(enterPressed)
1145+
			colorPalette.Visible = false
1146-
			Set(object, propertyData, ToValue(box.Text,propertyType))
1146+
1147-
			update()
1147+
1148
		local function toggle()
1149
			colorPalette.Visible = not colorPalette.Visible
1150
		end
1151-
	update()
1151+
1152
		local colorBox = Instance.new("TextButton", frame)
1153-
	object.Changed:connect(function(property)
1153+
		colorBox.Position = UDim2.new(0, Styles.Margin, 0, Styles.Margin)
1154-
		if (property == propertyName) then
1154+
		colorBox.Size = UDim2.new(0, BrickColors.BoxSize, 0, BrickColors.BoxSize)
1155-
			update()
1155+
		colorBox.Text = ""
1156
		colorBox.MouseButton1Click:connect(function()
1157
			if not readOnly then
1158
				toggle()
1159-
	return box
1159+
1160
		end)
1161
1162-
Controls["bool"] = function(object, propertyData, readOnly)
1162+
1163-
	local propertyName = propertyData["Name"]
1163+
			colorBox.AutoButtonColor = false
1164-
	local checked = object[propertyName]
1164+
1165
1166-
	local checkbox, setValue = CreateCheckbox(checked, readOnly, function(value)
1166+
		local spacingBefore = (Styles.Margin * 2) + BrickColors.BoxSize
1167-
		Set(object, propertyData, not checked)
1167+
1168
		local propertyLabel = CreateTextButton(readOnly, function()
1169-
	checkbox.Position = UDim2.new(0, Styles.Margin, 0, Styles.Margin)
1169+
			if not readOnly then
1170
				toggle()
1171-
	setValue(checked)
1171+
1172
		end)
1173-
	local function update()
1173+
		propertyLabel.Size = UDim2.new(1, (-1 * spacingBefore) - Styles.Margin, 1, 0)
1174-
		checked = object[propertyName]
1174+
		propertyLabel.Position = UDim2.new(0, spacingBefore, 0, 0)
1175
		propertyLabel.Parent = frame
1176
1177
		local size = (1 / BrickColors.ColorsPerRow)
1178-
	object.Changed:connect(function(property)
1178+
1179-
		if (property == propertyName) then
1179+
		for index = 0, 127 do
1180-
			update()
1180+
			local brickColor = BrickColor.palette(index)
1181
			local color3 = brickColor.Color
1182
1183
			local x = size * (index % BrickColors.ColorsPerRow)
1184-
	if object:IsA("BoolValue") then
1184+
			local y = size * math.floor(index / BrickColors.ColorsPerRow)
1185-
		object.Changed:connect(function(val)
1185+
1186-
			update()
1186+
			local brickColorBox = Instance.new("TextButton")
1187
			brickColorBox.Text = ""
1188
			brickColorBox.Size = UDim2.new(size,0,size,0)
1189
			brickColorBox.BackgroundColor3 = color3
1190-
	update()
1190+
			brickColorBox.Position = UDim2.new(x, 0, y, 0)
1191
			brickColorBox.ZIndex = colorPalette.ZIndex
1192-
	return checkbox
1192+
			brickColorBox.Parent = colorPalette
1193
1194
			brickColorBox.MouseButton1Click:connect(function()
1195-
Controls["BrickColor"] = function(object, propertyData, readOnly)
1195+
				hide()
1196-
	local propertyName = propertyData["Name"]
1196+
				onClick(brickColor)
1197
			end)
1198-
	local frame,label,brickColorBox = CreateBrickColor(readOnly, function(brickColor)
1198+
1199-
		Set(object, propertyData, brickColor)
1199+
1200
		return frame,propertyLabel,colorBox
1201
	end
1202-
	local function update()
1202+
1203-
		local value = object[propertyName]
1203+
	local function CreateColor3Control(readOnly, onClick)
1204-
		brickColorBox.BackgroundColor3 = value.Color
1204+
		local frame = Instance.new("Frame")
1205-
		label.Text = tostring(value)
1205+
		frame.Size = UDim2.new(1,0,1,0)
1206
		frame.BackgroundTransparency = 1
1207
1208-
	update()
1208+
		local colorBox = Instance.new("TextButton", frame)
1209
		colorBox.Position = UDim2.new(0, Styles.Margin, 0, Styles.Margin)
1210-
	object.Changed:connect(function(property)
1210+
		colorBox.Size = UDim2.new(0, BrickColors.BoxSize, 0, BrickColors.BoxSize)
1211-
		if (property == propertyName) then
1211+
		colorBox.Text = ""
1212-
			update()
1212+
1213
1214
		local spacingBefore = (Styles.Margin * 2) + BrickColors.BoxSize
1215
		local box = CreateTextBox(readOnly)
1216-
	return frame
1216+
		box.Size = UDim2.new(1, (-1 * spacingBefore) - Styles.Margin, 1, 0)
1217
		box.Position = UDim2.new(0, spacingBefore, 0, 0)
1218
		box.Parent = frame
1219-
Controls["Color3"] = function(object, propertyData, readOnly)
1219+
1220-
	local propertyName = propertyData["Name"]
1220+
		return frame,box,colorBox
1221
	end
1222-
	local frame,textBox,colorBox = CreateColor3Control(readOnly)
1222+
1223
	function CreateCheckbox(value, readOnly, onClick)
1224-
	textBox.FocusLost:connect(function(enterPressed)
1224+
		local checked = value
1225-
		Set(object, propertyData, ToValue(textBox.Text,"Color3"))
1225+
		local mouseover = false
1226-
		local value = object[propertyName]
1226+
1227-
		colorBox.BackgroundColor3 = value
1227+
		local checkboxFrame = Instance.new("ImageButton")
1228-
		textBox.Text = ToString(value, "Color3")
1228+
		checkboxFrame.Size = UDim2.new(0, Sprite.Width, 0, Sprite.Height)
1229
		checkboxFrame.BackgroundTransparency = 1
1230-
			
1230+
		checkboxFrame.ClipsDescendants = true
1231-
	local function update()
1231+
		--checkboxFrame.Position = UDim2.new(0, Styles.Margin, 0, Styles.Margin)
1232-
		local value = object[propertyName]
1232+
1233-
		colorBox.BackgroundColor3 = value
1233+
		local spritesheetImage = Instance.new("ImageLabel", checkboxFrame)
1234-
		textBox.Text = ToString(value, "Color3")
1234+
		spritesheetImage.Name = "SpritesheetImageLabel"
1235
		spritesheetImage.Size = UDim2.new(0, Spritesheet.Width, 0, Spritesheet.Height)
1236
		spritesheetImage.Image = Spritesheet.Image
1237-
	update()
1237+
		spritesheetImage.BackgroundTransparency = 1
1238
1239-
	object.Changed:connect(function(property)
1239+
		local function updateSprite()
1240-
		if (property == propertyName) then
1240+
			local spriteName = GetCheckboxImageName(checked, readOnly, mouseover)
1241-
			update()
1241+
			local spritePosition = SpritePosition(spriteName)
1242
			spritesheetImage.Position = UDim2.new(0, -1 * spritePosition[1], 0, -1 * spritePosition[2])
1243
		end
1244
1245-
	return frame
1245+
		local function setValue(val)
1246
			checked = val
1247
			updateSprite()
1248-
Controls["Enum"] = function(object, propertyData, readOnly)
1248+
1249-
	local propertyName = propertyData["Name"]
1249+
1250-
	local propertyType = propertyData["ValueType"]
1250+
1251
			checkboxFrame.MouseEnter:connect(function() mouseover = true updateSprite() end)
1252-
	local enumName = object[propertyName].Name
1252+
			checkboxFrame.MouseLeave:connect(function() mouseover = false updateSprite() end)
1253
			checkboxFrame.MouseButton1Click:connect(function()
1254-
	local enumNames = {}
1254+
				onClick(checked)
1255-
	for _,enum in pairs(Enum[tostring(propertyType)]:GetEnumItems()) do
1255+
1256-
		table.insert(enumNames, enum.Name)
1256+
1257
1258
		updateSprite()
1259-
	local dropdown, propertyLabel = CreateDropDown(enumNames, enumName, readOnly, function(value)
1259+
1260-
		Set(object, propertyData, value)
1260+
		return checkboxFrame, setValue
1261
	end
1262-
	--dropdown.Parent = frame
1262+
1263
1264-
	local function update()
1264+
1265-
		local value = object[propertyName].Name
1265+
	-- Code for handling controls of various data types --
1266-
		propertyLabel.Text = tostring(value)
1266+
1267
	local Controls = {}
1268
1269-
	update()
1269+
	Controls["default"] = function(object, propertyData, readOnly)
1270
		local propertyName = propertyData["Name"]
1271-
	object.Changed:connect(function(property)
1271+
		local propertyType = propertyData["ValueType"]
1272-
		if (property == propertyName) then
1272+
1273-
			update()
1273+
		local box = CreateTextBox(readOnly)
1274
		box.Size = UDim2.new(1, -2 * Styles.Margin, 1, 0)
1275
		box.Position = UDim2.new(0, Styles.Margin, 0, 0)
1276
1277-
	return dropdown
1277+
		local function update()
1278
			local value = object[propertyName]
1279
			box.Text = ToString(value, propertyType)
1280-
Controls["Object"] = function(object, propertyData, readOnly)
1280+
1281-
	local propertyName = propertyData["Name"]
1281+
1282-
	local propertyType = propertyData["ValueType"]
1282+
1283
			box.FocusLost:connect(function(enterPressed)
1284-
	local box = CreateObject(readOnly,function()end)
1284+
				Set(object, propertyData, ToValue(box.Text,propertyType))
1285-
	box.Size = UDim2.new(1, -2 * Styles.Margin, 1, 0)
1285+
1286-
	box.Position = UDim2.new(0, Styles.Margin, 0, 0)
1286+
1287
		end
1288-
	local function update()
1288+
1289-
		if AwaitingObjectObj == object then
1289+
		update()
1290-
			if AwaitingObjectValue == true then
1290+
1291
		object.Changed:connect(function(property)
1292
			if (property == propertyName) then
1293
				update()
1294
			end
1295-
		local value = object[propertyName]
1295+
1296-
		box.Text = ToString(value, propertyType)
1296+
1297
		return box
1298
	end
1299-
	if not readOnly then
1299+
1300-
		box.MouseButton1Click:connect(function()
1300+
	Controls["bool"] = function(object, propertyData, readOnly)
1301-
			if AwaitingObjectValue then
1301+
		local propertyName = propertyData["Name"]
1302-
				AwaitingObjectValue = false
1302+
		local checked = object[propertyName]
1303
1304
		local checkbox, setValue = CreateCheckbox(checked, readOnly, function(value)
1305
			Set(object, propertyData, not checked)
1306-
			AwaitingObjectValue = true
1306+
1307-
			AwaitingObjectObj = object
1307+
		checkbox.Position = UDim2.new(0, Styles.Margin, 0, Styles.Margin)
1308-
			AwaitingObjectProp = propertyData
1308+
1309-
			box.Text = "Select an Object"
1309+
1310
1311
		local function update()
1312-
		box.Cancel.Visible = true
1312+
			checked = object[propertyName]
1313-
		box.Cancel.MouseButton1Click:connect(function()
1313+
			setValue(checked)
1314-
			object[propertyName] = nil
1314+
1315
1316
		object.Changed:connect(function(property)
1317
			if (property == propertyName) then
1318-
	update()
1318+
1319
			end
1320-
	object.Changed:connect(function(property)
1320+
1321-
		if (property == propertyName) then
1321+
1322-
			update()
1322+
		if object:IsA("BoolValue") then
1323
			object.Changed:connect(function(val)
1324
				update()
1325
			end)
1326-
	if object:IsA("ObjectValue") then
1326+
1327-
		object.Changed:connect(function(val)
1327+
1328-
			update()
1328+
		update()
1329
1330
		return checkbox
1331
	end
1332-
	return box
1332+
1333
	Controls["BrickColor"] = function(object, propertyData, readOnly)
1334
		local propertyName = propertyData["Name"]
1335-
function GetControl(object, propertyData, readOnly)
1335+
1336-
	local propertyType = propertyData["ValueType"]
1336+
		local frame,label,brickColorBox = CreateBrickColor(readOnly, function(brickColor)
1337-
	local control = nil
1337+
			Set(object, propertyData, brickColor)
1338
		end)
1339-
	if Controls[propertyType] then
1339+
1340-
		control = Controls[propertyType](object, propertyData, readOnly)
1340+
		local function update()
1341-
	elseif RbxApi.IsEnum(propertyType) then
1341+
			local value = object[propertyName]
1342-
		control = Controls["Enum"](object, propertyData, readOnly)
1342+
			brickColorBox.BackgroundColor3 = value.Color
1343-
	elseif RbxApi.Classes[propertyType] then
1343+
			label.Text = tostring(value)
1344-
        control = Controls["Object"](object, propertyData, readOnly)
1344+
1345
1346-
		control = Controls["default"](object, propertyData, readOnly)
1346+
		update()
1347
1348-
	return control
1348+
		object.Changed:connect(function(property)
1349
			if (property == propertyName) then
1350-
-- Permissions
1350+
1351
			end
1352-
function CanEditObject(object)
1352+
1353-
	local player = Players.LocalPlayer
1353+
1354-
	local character = player.Character
1354+
		return frame
1355-
	return Permissions.CanEdit
1355+
1356
1357
	Controls["Color3"] = function(object, propertyData, readOnly)
1358-
function CanEditProperty(object,propertyData)
1358+
		local propertyName = propertyData["Name"]
1359-
	local tags = propertyData["tags"]
1359+
1360-
	for _,name in pairs(tags) do
1360+
		local frame,textBox,colorBox = CreateColor3Control(readOnly)
1361-
		if name == "readonly" then
1361+
1362
		textBox.FocusLost:connect(function(enterPressed)
1363
			Set(object, propertyData, ToValue(textBox.Text,"Color3"))
1364
			local value = object[propertyName]
1365-
	return CanEditObject(object)
1365+
			colorBox.BackgroundColor3 = value
1366
			textBox.Text = ToString(value, "Color3")
1367
		end)
1368-
--RbxApi
1368+
1369-
local function PropertyIsHidden(propertyData)
1369+
		local function update()
1370-
	local tags = propertyData["tags"]
1370+
			local value = object[propertyName]
1371-
	for _,name in pairs(tags) do
1371+
			colorBox.BackgroundColor3 = value
1372-
		if name == "deprecated"
1372+
			textBox.Text = ToString(value, "Color3")
1373-
			or name == "hidden"
1373+
1374-
			or name == "writeonly" then
1374+
1375
		update()
1376
1377
		object.Changed:connect(function(property)
1378-
	return false
1378+
			if (property == propertyName) then
1379
				update()
1380
			end
1381-
function Set(object, propertyData, value)
1381+
1382-
	local propertyName = propertyData["Name"]
1382+
1383-
	local propertyType = propertyData["ValueType"]
1383+
		return frame
1384
	end
1385-
	if value == nil then return end
1385+
1386
	Controls["Enum"] = function(object, propertyData, readOnly)
1387-
	for i,v in pairs(GetSelection()) do
1387+
		local propertyName = propertyData["Name"]
1388-
		if CanEditProperty(v,propertyData) then
1388+
		local propertyType = propertyData["ValueType"]
1389
1390-
				--print("Setting " .. propertyName .. " to " .. tostring(value))
1390+
		local enumName = object[propertyName].Name
1391-
				v[propertyName] = value
1391+
1392
		local enumNames = {}
1393
		for _,enum in pairs(Enum[tostring(propertyType)]:GetEnumItems()) do
1394
			table.insert(enumNames, enum.Name)
1395
		end
1396
1397-
function CreateRow(object, propertyData, isAlternateRow)
1397+
		local dropdown, propertyLabel = CreateDropDown(enumNames, enumName, readOnly, function(value)
1398-
	local propertyName = propertyData["Name"]
1398+
			Set(object, propertyData, value)
1399-
	local propertyType = propertyData["ValueType"]
1399+
1400-
	local propertyValue = object[propertyName]
1400+
		--dropdown.Parent = frame
1401-
	--rowValue, rowValueType, isAlternate
1401+
1402-
	local backColor = Row.BackgroundColor;
1402+
		local function update()
1403-
	if (isAlternateRow) then
1403+
			local value = object[propertyName].Name
1404-
		backColor = Row.BackgroundColorAlternate
1404+
			propertyLabel.Text = tostring(value)
1405
		end
1406
1407-
	local readOnly = not CanEditProperty(object, propertyData)
1407+
		update()
1408-
	--if propertyType == "Instance" or propertyName == "Parent" then readOnly = true end
1408+
1409
		object.Changed:connect(function(property)
1410-
	local rowFrame = Instance.new("Frame")
1410+
			if (property == propertyName) then
1411-
	rowFrame.Size = UDim2.new(1,0,0,Row.Height)
1411+
1412-
	rowFrame.BackgroundTransparency = 1
1412+
1413-
	rowFrame.Name = 'Row'
1413+
1414
1415-
	local propertyLabelFrame = CreateCell()
1415+
		return dropdown
1416-
	propertyLabelFrame.Parent = rowFrame
1416+
1417-
	propertyLabelFrame.ClipsDescendants = true
1417+
1418
	Controls["Object"] = function(object, propertyData, readOnly)
1419-
	local propertyLabel = CreateLabel(readOnly)
1419+
		local propertyName = propertyData["Name"]
1420-
	propertyLabel.Text = propertyName
1420+
		local propertyType = propertyData["ValueType"]
1421-
	propertyLabel.Size = UDim2.new(1, -1 * Row.TitleMarginLeft, 1, 0)
1421+
1422-
	propertyLabel.Position = UDim2.new(0, Row.TitleMarginLeft, 0, 0)
1422+
		local box = CreateObject(readOnly,function()end)
1423-
	propertyLabel.Parent = propertyLabelFrame
1423+
		box.Size = UDim2.new(1, -2 * Styles.Margin, 1, 0)
1424
		box.Position = UDim2.new(0, Styles.Margin, 0, 0)
1425-
	local propertyValueFrame = CreateCell()
1425+
1426-
	propertyValueFrame.Size = UDim2.new(0.5, -1, 1, 0)
1426+
		local function update()
1427-
	propertyValueFrame.Position = UDim2.new(0.5, 0, 0, 0)
1427+
			if AwaitingObjectObj == object then
1428-
	propertyValueFrame.Parent = rowFrame
1428+
				if AwaitingObjectValue == true then
1429
					box.Text = "Select an Object"
1430-
	local control = GetControl(object, propertyData, readOnly)
1430+
1431-
	control.Parent = propertyValueFrame
1431+
1432
			end
1433-
	rowFrame.MouseEnter:connect(function()
1433+
			local value = object[propertyName]
1434-
		propertyLabelFrame.BackgroundColor3 = Row.BackgroundColorMouseover
1434+
			box.Text = ToString(value, propertyType)
1435-
		propertyValueFrame.BackgroundColor3 = Row.BackgroundColorMouseover
1435+
1436
1437-
	rowFrame.MouseLeave:connect(function()
1437+
1438
			box.MouseButton1Click:connect(function()
1439
				if AwaitingObjectValue then
1440
					AwaitingObjectValue = false
1441
					update()
1442-
	propertyLabelFrame.BackgroundColor3 = backColor
1442+
1443-
	propertyValueFrame.BackgroundColor3 = backColor
1443+
1444
				AwaitingObjectValue = true
1445-
	return rowFrame
1445+
				AwaitingObjectObj = object
1446
				AwaitingObjectProp = propertyData
1447
				box.Text = "Select an Object"
1448-
function ClearPropertiesList()
1448+
1449-
	for _,instance in pairs(ContentFrame:GetChildren()) do
1449+
1450-
		instance:Destroy()
1450+
			box.Cancel.Visible = true
1451
			box.Cancel.MouseButton1Click:connect(function()
1452
				object[propertyName] = nil
1453
			end)
1454-
local selection = Gui:FindFirstChild("Selection", 1)
1454+
1455-
print(selection)
1455+
1456
		update()
1457-
function displayProperties(props)
1457+
1458-
	for i,v in pairs(props) do
1458+
		object.Changed:connect(function(property)
1459
			if (property == propertyName) then
1460-
			local a = CreateRow(v.object, v.propertyData, ((numRows % 2) == 0))
1460+
1461-
			a.Position = UDim2.new(0,0,0,numRows*Row.Height)
1461+
1462-
			a.Parent = ContentFrame
1462+
1463-
			numRows = numRows + 1
1463+
1464
		if object:IsA("ObjectValue") then
1465
			object.Changed:connect(function(val)
1466
				update()
1467
			end)
1468-
function checkForDupe(prop,props)
1468+
1469-
	for i,v in pairs(props) do
1469+
1470-
		if v.propertyData.Name == prop.Name and v.propertyData.ValueType == prop.ValueType then
1470+
1471
	end
1472
1473
	function GetControl(object, propertyData, readOnly)
1474-
	return false
1474+
		local propertyType = propertyData["ValueType"]
1475
		local control = nil
1476
1477-
function sortProps(t)
1477+
		if Controls[propertyType] then
1478-
	table.sort(t, 
1478+
			control = Controls[propertyType](object, propertyData, readOnly)
1479-
		function(x,y) return x.propertyData.Name < y.propertyData.Name
1479+
		elseif RbxApi.IsEnum(propertyType) then
1480
			control = Controls["Enum"](object, propertyData, readOnly)
1481
		elseif RbxApi.Classes[propertyType] then
1482
			control = Controls["Object"](object, propertyData, readOnly)
1483-
function showProperties(obj)
1483+
1484-
	ClearPropertiesList()
1484+
			control = Controls["default"](object, propertyData, readOnly)
1485-
	if obj == nil then return end
1485+
1486-
	local propHolder = {}
1486+
		return control
1487-
	local foundProps = {}
1487+
1488-
	numRows = 0
1488+
	-- Permissions
1489-
	for _,nextObj in pairs(obj) do
1489+
1490-
		if not foundProps[nextObj.className] then
1490+
	function CanEditObject(object)
1491-
			foundProps[nextObj.className] = true
1491+
		local player = Players.LocalPlayer
1492-
			for i,v in pairs(RbxApi.GetProperties(nextObj.className)) do
1492+
		local character = player.Character
1493-
				local suc, err = pcall(function()
1493+
		return Permissions.CanEdit
1494-
					if not (PropertyIsHidden(v)) and not checkForDupe(v,propHolder) then
1494+
1495-
						if string.find(string.lower(v.Name),string.lower(propertiesSearch.Text)) or not searchingProperties() then
1495+
1496-
							table.insert(propHolder,{propertyData = v, object = nextObj})
1496+
	function CanEditProperty(object,propertyData)
1497
		local tags = propertyData["tags"]
1498
		for _,name in pairs(tags) do
1499
			if name == "readonly" then
1500
				return false
1501
			end
1502
		end
1503
		return CanEditObject(object)
1504
	end
1505
1506-
	sortProps(propHolder)
1506+
	--RbxApi
1507-
	displayProperties(propHolder)
1507+
	local function PropertyIsHidden(propertyData)
1508-
	ContentFrame.Size = UDim2.new(1, 0, 0, numRows * Row.Height)
1508+
		local tags = propertyData["tags"]
1509-
	scrollBar.ScrollIndex = 0
1509+
		for _,name in pairs(tags) do
1510-
	scrollBar.TotalSpace = numRows * Row.Height
1510+
			if name == "deprecated"
1511-
	scrollBar.Update()
1511+
				or name == "hidden"
1512
				or name == "writeonly" then
1513
				return true
1514-
----------------------------------------------------------------
1514+
1515-
-----------------------SCROLLBAR STUFF--------------------------
1515+
1516-
----------------------------------------------------------------
1516+
1517-
----------------------------------------------------------------
1517+
1518-
local ScrollBarWidth = 16
1518+
1519
	function Set(object, propertyData, value)
1520-
local ScrollStyles = {
1520+
		local propertyName = propertyData["Name"]
1521-
	Background      = Color3.new(233/255, 233/255, 233/255);
1521+
		local propertyType = propertyData["ValueType"]
1522-
	Border          = Color3.new(149/255, 149/255, 149/255);
1522+
1523-
	Selected        = Color3.new( 63/255, 119/255, 189/255);
1523+
		if value == nil then return end
1524-
	BorderSelected  = Color3.new( 55/255, 106/255, 167/255);
1524+
1525-
	Text            = Color3.new(  0/255,   0/255,   0/255);
1525+
		for i,v in pairs(GetSelection()) do
1526-
	TextDisabled    = Color3.new(128/255, 128/255, 128/255);
1526+
			if CanEditProperty(v,propertyData) then
1527-
	TextSelected    = Color3.new(255/255, 255/255, 255/255);
1527+
				pcall(function()
1528-
	Button          = Color3.new(221/255, 221/255, 221/255);
1528+
					--print("Setting " .. propertyName .. " to " .. tostring(value))
1529-
	ButtonBorder    = Color3.new(149/255, 149/255, 149/255);
1529+
					v[propertyName] = value
1530-
	ButtonSelected  = Color3.new(255/255,   0/255,   0/255);
1530+
1531-
	Field           = Color3.new(255/255, 255/255, 255/255);
1531+
1532-
	FieldBorder     = Color3.new(191/255, 191/255, 191/255);
1532+
1533-
	TitleBackground = Color3.new(178/255, 178/255, 178/255);
1533+
1534-
}
1534+
1535
	function CreateRow(object, propertyData, isAlternateRow)
1536-
	local ZIndexLock = {}
1536+
		local propertyName = propertyData["Name"]
1537-
	function SetZIndex(object,z)
1537+
		local propertyType = propertyData["ValueType"]
1538-
		if not ZIndexLock[object] then
1538+
		local propertyValue = object[propertyName]
1539-
			ZIndexLock[object] = true
1539+
		--rowValue, rowValueType, isAlternate
1540-
			if object:IsA'GuiObject' then
1540+
		local backColor = Row.BackgroundColor;
1541-
				object.ZIndex = z
1541+
		if (isAlternateRow) then
1542
			backColor = Row.BackgroundColorAlternate
1543-
			local children = object:GetChildren()
1543+
1544-
			for i = 1,#children do
1544+
1545-
				SetZIndex(children[i],z)
1545+
		local readOnly = not CanEditProperty(object, propertyData)
1546
		--if propertyType == "Instance" or propertyName == "Parent" then readOnly = true end
1547-
			ZIndexLock[object] = nil
1547+
1548
		local rowFrame = Instance.new("Frame")
1549
		rowFrame.Size = UDim2.new(1,0,0,Row.Height)
1550
		rowFrame.BackgroundTransparency = 1
1551-
function SetZIndexOnChanged(object)
1551+
		rowFrame.Name = 'Row'
1552-
	return object.Changed:connect(function(p)
1552+
1553-
		if p == "ZIndex" then
1553+
		local propertyLabelFrame = CreateCell()
1554-
			SetZIndex(object,object.ZIndex)
1554+
		propertyLabelFrame.Parent = rowFrame
1555
		propertyLabelFrame.ClipsDescendants = true
1556
1557
		local propertyLabel = CreateLabel(readOnly)
1558-
function Create(ty,data)
1558+
		propertyLabel.Text = propertyName
1559-
	local obj
1559+
		propertyLabel.Size = UDim2.new(1, -1 * Row.TitleMarginLeft, 1, 0)
1560-
	if type(ty) == 'string' then
1560+
		propertyLabel.Position = UDim2.new(0, Row.TitleMarginLeft, 0, 0)
1561-
		obj = Instance.new(ty)
1561+
		propertyLabel.Parent = propertyLabelFrame
1562
1563-
		obj = ty
1563+
		local propertyValueFrame = CreateCell()
1564
		propertyValueFrame.Size = UDim2.new(0.5, -1, 1, 0)
1565-
	for k, v in pairs(data) do
1565+
		propertyValueFrame.Position = UDim2.new(0.5, 0, 0, 0)
1566-
		if type(k) == 'number' then
1566+
		propertyValueFrame.Parent = rowFrame
1567-
			v.Parent = obj
1567+
1568
		local control = GetControl(object, propertyData, readOnly)
1569-
			obj[k] = v
1569+
		control.Parent = propertyValueFrame
1570
1571
		rowFrame.MouseEnter:connect(function()
1572-
	return obj
1572+
			propertyLabelFrame.BackgroundColor3 = Row.BackgroundColorMouseover
1573
			propertyValueFrame.BackgroundColor3 = Row.BackgroundColorMouseover
1574-
-- returns the ascendant ScreenGui of an object
1574+
1575-
function GetScreen(screen)
1575+
		rowFrame.MouseLeave:connect(function()
1576-
	if screen == nil then return nil end
1576+
			propertyLabelFrame.BackgroundColor3 = backColor
1577-
	while not screen:IsA("ScreenGui") do
1577+
			propertyValueFrame.BackgroundColor3 = backColor
1578-
		screen = screen.Parent
1578+
1579
1580
		propertyLabelFrame.BackgroundColor3 = backColor
1581-
	return screen
1581+
1582
1583-
-- AutoButtonColor doesn't always reset properly
1583+
		return rowFrame
1584-
function ResetButtonColor(button)
1584+
1585-
	local active = button.Active
1585+
1586-
	button.Active = not active
1586+
	function ClearPropertiesList()
1587-
	button.Active = active
1587+
		for _,instance in pairs(ContentFrame:GetChildren()) do
1588
			instance:Destroy()
1589
		end
1590-
function ArrowGraphic(size,dir,scaled,template)
1590+
1591-
	local Frame = Create('Frame',{
1591+
1592-
		Name = "Arrow Graphic";
1592+
	local selection = Gui:FindFirstChild("Selection", 1)
1593-
		BorderSizePixel = 0;
1593+
	print(selection)
1594-
		Size = UDim2.new(0,size,0,size);
1594+
1595-
		Transparency = 1;
1595+
	function displayProperties(props)
1596
		for i,v in pairs(props) do
1597-
	if not template then
1597+
1598-
		template = Instance.new("Frame")
1598+
				local a = CreateRow(v.object, v.propertyData, ((numRows % 2) == 0))
1599-
		template.BorderSizePixel = 0
1599+
				a.Position = UDim2.new(0,0,0,numRows*Row.Height)
1600
				a.Parent = ContentFrame
1601
				numRows = numRows + 1
1602-
	local transform
1602+
1603-
	if dir == nil or dir == 'Up' then
1603+
1604-
		function transform(p,s) return p,s end
1604+
1605-
	elseif dir == 'Down' then
1605+
1606-
		function transform(p,s) return UDim2.new(0,p.X.Offset,0,size-p.Y.Offset-1),s end
1606+
	function checkForDupe(prop,props)
1607-
	elseif dir == 'Left' then
1607+
		for i,v in pairs(props) do
1608-
		function transform(p,s) return UDim2.new(0,p.Y.Offset,0,p.X.Offset),UDim2.new(0,s.Y.Offset,0,s.X.Offset) end
1608+
			if v.propertyData.Name == prop.Name and v.propertyData.ValueType == prop.ValueType then
1609-
	elseif dir == 'Right' then
1609+
				return true
1610-
		function transform(p,s) return UDim2.new(0,size-p.Y.Offset-1,0,p.X.Offset),UDim2.new(0,s.Y.Offset,0,s.X.Offset) end
1610+
1611
		end
1612
		return false
1613-
	local scale
1613+
1614-
	if scaled then
1614+
1615-
		function scale(p,s) return UDim2.new(p.X.Offset/size,0,p.Y.Offset/size,0),UDim2.new(s.X.Offset/size,0,s.Y.Offset/size,0) end
1615+
	function sortProps(t)
1616
		table.sort(t, 
1617-
		function scale(p,s) return p,s end
1617+
			function(x,y) return x.propertyData.Name < y.propertyData.Name
1618
			end)
1619
	end
1620-
	local o = math.floor(size/4)
1620+
1621-
	if size%2 == 0 then
1621+
	function showProperties(obj)
1622-
		local n = size/2-1
1622+
		ClearPropertiesList()
1623-
		for i = 0,n do
1623+
		if obj == nil then return end
1624
		local propHolder = {}
1625
		local foundProps = {}
1626-
				UDim2.new(0,n-i,0,o+i),
1626+
		numRows = 0
1627-
				UDim2.new(0,(i+1)*2,0,1)
1627+
		for _,nextObj in pairs(obj) do
1628-
			))
1628+
			if not foundProps[nextObj.className] then
1629
				foundProps[nextObj.className] = true
1630
				for i,v in pairs(RbxApi.GetProperties(nextObj.className)) do
1631
					local suc, err = pcall(function()
1632
						if not (PropertyIsHidden(v)) and not checkForDupe(v,propHolder) then
1633
							if string.find(string.lower(v.Name),string.lower(propertiesSearch.Text)) or not searchingProperties() then
1634-
		local n = (size-1)/2
1634+
								table.insert(propHolder,{propertyData = v, object = nextObj})
1635-
		for i = 0,n do
1635+
1636
						end
1637
					end)
1638-
				UDim2.new(0,n-i,0,o+i),
1638+
1639-
				UDim2.new(0,i*2+1,0,1)
1639+
1640-
			))
1640+
1641
				end
1642
			end
1643
		end
1644
		sortProps(propHolder)
1645
		displayProperties(propHolder)
1646-
	if size%4 > 1 then
1646+
		ContentFrame.Size = UDim2.new(1, 0, 0, numRows * Row.Height)
1647-
		local t = template:Clone()
1647+
		scrollBar.ScrollIndex = 0
1648-
		local p,s = scale(transform(
1648+
		scrollBar.TotalSpace = numRows * Row.Height
1649-
			UDim2.new(0,0,0,size-o-1),
1649+
		scrollBar.Update()
1650-
			UDim2.new(0,size,0,1)
1650+
1651-
		))
1651+
1652-
		t.Position = p
1652+
	----------------------------------------------------------------
1653-
		t.Size = s
1653+
	-----------------------SCROLLBAR STUFF--------------------------
1654-
		t.Parent = Frame
1654+
	----------------------------------------------------------------
1655
	----------------------------------------------------------------
1656-
	return Frame
1656+
	local ScrollBarWidth = 16
1657
1658
	local ScrollStyles = {
1659-
function GripGraphic(size,dir,spacing,scaled,template)
1659+
		Background      = Color3.new(233/255, 233/255, 233/255);
1660-
	local Frame = Create('Frame',{
1660+
		Border          = Color3.new(149/255, 149/255, 149/255);
1661-
		Name = "Grip Graphic";
1661+
		Selected        = Color3.new( 63/255, 119/255, 189/255);
1662-
		BorderSizePixel = 0;
1662+
		BorderSelected  = Color3.new( 55/255, 106/255, 167/255);
1663-
		Size = UDim2.new(0,size.x,0,size.y);
1663+
		Text            = Color3.new(  0/255,   0/255,   0/255);
1664-
		Transparency = 1;
1664+
		TextDisabled    = Color3.new(128/255, 128/255, 128/255);
1665
		TextSelected    = Color3.new(255/255, 255/255, 255/255);
1666-
	if not template then
1666+
		Button          = Color3.new(221/255, 221/255, 221/255);
1667-
		template = Instance.new("Frame")
1667+
		ButtonBorder    = Color3.new(149/255, 149/255, 149/255);
1668-
		template.BorderSizePixel = 0
1668+
		ButtonSelected  = Color3.new(255/255,   0/255,   0/255);
1669
		Field           = Color3.new(255/255, 255/255, 255/255);
1670
		FieldBorder     = Color3.new(191/255, 191/255, 191/255);
1671-
	spacing = spacing or 2
1671+
		TitleBackground = Color3.new(178/255, 178/255, 178/255);
1672
	}
1673-
	local scale
1673+
	do
1674-
	if scaled then
1674+
		local ZIndexLock = {}
1675-
		function scale(p) return UDim2.new(p.X.Offset/size.x,0,p.Y.Offset/size.y,0) end
1675+
		function SetZIndex(object,z)
1676
			if not ZIndexLock[object] then
1677-
		function scale(p) return p end
1677+
				ZIndexLock[object] = true
1678
				if object:IsA'GuiObject' then
1679
					object.ZIndex = z
1680-
	if dir == 'Vertical' then
1680+
1681-
		for i=0,size.x-1,spacing do
1681+
				local children = object:GetChildren()
1682
				for i = 1,#children do
1683-
			t.Size = scale(UDim2.new(0,1,0,size.y))
1683+
					SetZIndex(children[i],z)
1684-
			t.Position = scale(UDim2.new(0,i,0,0))
1684+
1685
				ZIndexLock[object] = nil
1686
			end
1687-
	elseif dir == nil or dir == 'Horizontal' then
1687+
1688-
		for i=0,size.y-1,spacing do
1688+
1689
	function SetZIndexOnChanged(object)
1690-
			t.Size = scale(UDim2.new(0,size.x,0,1))
1690+
1691-
			t.Position = scale(UDim2.new(0,0,0,i))
1691+
1692
				SetZIndex(object,object.ZIndex)
1693
			end
1694
		end)
1695
	end
1696-
	return Frame
1696+
	function Create(ty,data)
1697
		local obj
1698
		if type(ty) == 'string' then
1699
			obj = Instance.new(ty)
1700-
	local mt = {
1700+
1701-
		__index = {
1701+
			obj = ty
1702-
			GetScrollPercent = function(self)
1702+
1703-
				return self.ScrollIndex/(self.TotalSpace-self.VisibleSpace)
1703+
		for k, v in pairs(data) do
1704
			if type(k) == 'number' then
1705-
			CanScrollDown = function(self)
1705+
				v.Parent = obj
1706-
				return self.ScrollIndex + self.VisibleSpace < self.TotalSpace
1706+
1707
				obj[k] = v
1708-
			CanScrollUp = function(self)
1708+
1709-
				return self.ScrollIndex > 0
1709+
1710
		return obj
1711-
			ScrollDown = function(self)
1711+
1712-
				self.ScrollIndex = self.ScrollIndex + self.PageIncrement
1712+
	-- returns the ascendant ScreenGui of an object
1713-
				self:Update()
1713+
	function GetScreen(screen)
1714
		if screen == nil then return nil end
1715-
			ScrollUp = function(self)
1715+
		while not screen:IsA("ScreenGui") do
1716-
				self.ScrollIndex = self.ScrollIndex - self.PageIncrement
1716+
			screen = screen.Parent
1717-
				self:Update()
1717+
			if screen == nil then return nil end
1718
		end
1719-
			ScrollTo = function(self,index)
1719+
		return screen
1720-
				self.ScrollIndex = index
1720+
1721-
				self:Update()
1721+
1722
	function ResetButtonColor(button)
1723-
			SetScrollPercent = function(self,percent)
1723+
1724-
				self.ScrollIndex = math.floor((self.TotalSpace - self.VisibleSpace)*percent + 0.5)
1724+
1725-
				self:Update()
1725+
1726
	end
1727-
		};
1727+
1728
	function ArrowGraphic(size,dir,scaled,template)
1729-
	mt.__index.CanScrollRight = mt.__index.CanScrollDown
1729+
1730-
	mt.__index.CanScrollLeft = mt.__index.CanScrollUp
1730+
1731-
	mt.__index.ScrollLeft = mt.__index.ScrollUp
1731+
1732-
	mt.__index.ScrollRight = mt.__index.ScrollDown
1732+
1733
			Transparency = 1;
1734-
	function ScrollBar(horizontal)
1734+
1735-
		-- create row scroll bar
1735+
1736-
		local ScrollFrame = Create('Frame',{
1736+
1737-
			Name = "ScrollFrame";
1737+
1738-
			Position = horizontal and UDim2.new(0,0,1,-ScrollBarWidth) or UDim2.new(1,-ScrollBarWidth,0,0);
1738+
1739-
			Size = horizontal and UDim2.new(1,0,0,ScrollBarWidth) or UDim2.new(0,ScrollBarWidth,1,0);
1739+
1740
		local transform
1741-
			Create('ImageButton',{
1741+
1742-
				Name = "ScrollDown";
1742+
1743-
				Position = horizontal and UDim2.new(1,-ScrollBarWidth,0,0) or UDim2.new(0,0,1,-ScrollBarWidth);
1743+
1744-
				Size = UDim2.new(0, ScrollBarWidth, 0, ScrollBarWidth);
1744+
1745-
				BackgroundColor3 = ScrollStyles.Button;
1745+
1746-
				BorderColor3 = ScrollStyles.Border;
1746+
1747-
				--BorderSizePixel = 0;
1747+
1748
			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
1749-
			Create('ImageButton',{
1749+
1750-
				Name = "ScrollUp";
1750+
1751-
				Size = UDim2.new(0, ScrollBarWidth, 0, ScrollBarWidth);
1751+
1752-
				BackgroundColor3 = ScrollStyles.Button;
1752+
1753-
				BorderColor3 = ScrollStyles.Border;
1753+
1754-
				--BorderSizePixel = 0;
1754+
1755
			function scale(p,s) return p,s end
1756-
			Create('ImageButton',{
1756+
1757-
				Name = "ScrollBar";
1757+
1758-
				Size = horizontal and UDim2.new(1,-ScrollBarWidth*2,1,0) or UDim2.new(1,0,1,-ScrollBarWidth*2);
1758+
1759-
				Position = horizontal and UDim2.new(0,ScrollBarWidth,0,0) or UDim2.new(0,0,0,ScrollBarWidth);
1759+
1760
			local n = size/2-1
1761-
				BackgroundColor3 = Color3.new(0.94902, 0.94902, 0.94902);
1761+
1762-
				BorderColor3 = ScrollStyles.Border;
1762+
1763-
				--BorderSizePixel = 0;
1763+
1764
					UDim2.new(0,n-i,0,o+i),
1765-
					Name = "ScrollThumb";
1765+
1766
					))
1767
				t.Position = p
1768
				t.Size = s
1769
				t.Parent = Frame
1770
			end
1771
		else
1772
			local n = (size-1)/2
1773
			for i = 0,n do
1774
				local t = template:Clone()
1775-
		local graphicTemplate = Create('Frame',{
1775+
1776-
			Name="Graphic";
1776+
1777
					UDim2.new(0,i*2+1,0,1)
1778-
			BackgroundColor3 = ScrollStyles.Border;
1778+
					))
1779
				t.Position = p
1780-
		local graphicSize = ScrollBarWidth/2
1780+
1781
				t.Parent = Frame
1782-
		local ScrollDownFrame = ScrollFrame.ScrollDown
1782+
1783
		end
1784
		if size%4 > 1 then
1785
			local t = template:Clone()
1786-
		local ScrollUpFrame = ScrollFrame.ScrollUp
1786+
1787
				UDim2.new(0,0,0,size-o-1),
1788
				UDim2.new(0,size,0,1)
1789
				))
1790-
		local ScrollBarFrame = ScrollFrame.ScrollBar
1790+
1791-
		local ScrollThumbFrame = ScrollBarFrame.ScrollThumb
1791+
1792-
		do
1792+
1793-
			local size = ScrollBarWidth*3/8
1793+
1794-
			local Decal = GripGraphic(Vector2.new(size,size),horizontal and 'Vertical' or 'Horizontal',2,graphicTemplate)
1794+
1795-
			Decal.Position = UDim2.new(0.5,-size/2,0.5,-size/2)
1795+
1796-
			Decal.Parent = ScrollThumbFrame
1796+
1797
	function GripGraphic(size,dir,spacing,scaled,template)
1798
		local Frame = Create('Frame',{
1799-
		local MouseDrag = Create('ImageButton',{
1799+
1800
			BorderSizePixel = 0;
1801
			Size = UDim2.new(0,size.x,0,size.y);
1802
			Transparency = 1;
1803
		})
1804
		if not template then
1805
			template = Instance.new("Frame")
1806
			template.BorderSizePixel = 0
1807
		end
1808
1809-
		local Class = setmetatable({
1809+
1810-
			GUI = ScrollFrame;
1810+
1811-
			ScrollIndex = 0;
1811+
1812-
			VisibleSpace = 0;
1812+
1813-
			TotalSpace = 0;
1813+
1814-
			PageIncrement = 1;
1814+
1815-
		},mt)
1815+
1816
		end
1817-
		local UpdateScrollThumb
1817+
1818-
		if horizontal then
1818+
1819-
			function UpdateScrollThumb()
1819+
1820-
				ScrollThumbFrame.Size = UDim2.new(Class.VisibleSpace/Class.TotalSpace,0,0,ScrollBarWidth)
1820+
1821-
				if ScrollThumbFrame.AbsoluteSize.x < ScrollBarWidth then
1821+
1822-
					ScrollThumbFrame.Size = UDim2.new(0,ScrollBarWidth,0,ScrollBarWidth)
1822+
1823
				t.Parent = Frame
1824-
				local barSize = ScrollBarFrame.AbsoluteSize.x
1824+
1825-
				ScrollThumbFrame.Position = UDim2.new(Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.x)/barSize,0,0,0)
1825+
1826
			for i=0,size.y-1,spacing do
1827
				local t = template:Clone()
1828-
			function UpdateScrollThumb()
1828+
1829-
				ScrollThumbFrame.Size = UDim2.new(0,ScrollBarWidth,Class.VisibleSpace/Class.TotalSpace,0)
1829+
1830-
				if ScrollThumbFrame.AbsoluteSize.y < ScrollBarWidth then
1830+
1831-
					ScrollThumbFrame.Size = UDim2.new(0,ScrollBarWidth,0,ScrollBarWidth)
1831+
1832
		end
1833-
				local barSize = ScrollBarFrame.AbsoluteSize.y
1833+
1834-
				ScrollThumbFrame.Position = UDim2.new(0,0,Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.y)/barSize,0)
1834+
1835
	end
1836
1837
	do
1838-
		local lastDown
1838+
		local mt = {
1839-
		local lastUp
1839+
			__index = {
1840-
		local scrollStyle = {BackgroundColor3=ScrollStyles.Border,BackgroundTransparency=0}
1840+
				GetScrollPercent = function(self)
1841-
		local scrollStyle_ds = {BackgroundColor3=ScrollStyles.Border,BackgroundTransparency=0.7}
1841+
					return self.ScrollIndex/(self.TotalSpace-self.VisibleSpace)
1842
				end;
1843-
		local function Update()
1843+
				CanScrollDown = function(self)
1844-
			local t = Class.TotalSpace
1844+
					return self.ScrollIndex + self.VisibleSpace < self.TotalSpace
1845-
			local v = Class.VisibleSpace
1845+
				end;
1846-
			local s = Class.ScrollIndex
1846+
				CanScrollUp = function(self)
1847-
			if v <= t then
1847+
					return self.ScrollIndex > 0
1848-
				if s > 0 then
1848+
				end;
1849-
					if s + v > t then
1849+
				ScrollDown = function(self)
1850-
						Class.ScrollIndex = t - v
1850+
					self.ScrollIndex = self.ScrollIndex + self.PageIncrement
1851
					self:Update()
1852
				end;
1853
				ScrollUp = function(self)
1854
					self.ScrollIndex = self.ScrollIndex - self.PageIncrement
1855
					self:Update()
1856-
				Class.ScrollIndex = 0
1856+
				end;
1857
				ScrollTo = function(self,index)
1858
					self.ScrollIndex = index
1859-
			if Class.UpdateCallback then
1859+
					self:Update()
1860-
				if Class.UpdateCallback(Class) == false then
1860+
				end;
1861
				SetScrollPercent = function(self,percent)
1862
					self.ScrollIndex = math.floor((self.TotalSpace - self.VisibleSpace)*percent + 0.5)
1863
					self:Update()
1864
				end;
1865-
			local down = Class:CanScrollDown()
1865+
			};
1866-
			local up = Class:CanScrollUp()
1866+
1867-
			if down ~= lastDown then
1867+
		mt.__index.CanScrollRight = mt.__index.CanScrollDown
1868-
				lastDown = down
1868+
		mt.__index.CanScrollLeft = mt.__index.CanScrollUp
1869-
				ScrollDownFrame.Active = down
1869+
		mt.__index.ScrollLeft = mt.__index.ScrollUp
1870-
				ScrollDownFrame.AutoButtonColor = down
1870+
		mt.__index.ScrollRight = mt.__index.ScrollDown
1871-
				local children = ScrollDownGraphic:GetChildren()
1871+
1872-
				local style = down and scrollStyle or scrollStyle_ds
1872+
		function ScrollBar(horizontal)
1873
			-- create row scroll bar
1874-
					Create(children[i],style)
1874+
			local ScrollFrame = Create('Frame',{
1875
				Name = "ScrollFrame";
1876
				Position = horizontal and UDim2.new(0,0,1,-ScrollBarWidth) or UDim2.new(1,-ScrollBarWidth,0,0);
1877-
			if up ~= lastUp then
1877+
				Size = horizontal and UDim2.new(1,0,0,ScrollBarWidth) or UDim2.new(0,ScrollBarWidth,1,0);
1878-
				lastUp = up
1878+
1879-
				ScrollUpFrame.Active = up
1879+
1880-
				ScrollUpFrame.AutoButtonColor = up
1880+
					Name = "ScrollDown";
1881-
				local children = ScrollUpGraphic:GetChildren()
1881+
					Position = horizontal and UDim2.new(1,-ScrollBarWidth,0,0) or UDim2.new(0,0,1,-ScrollBarWidth);
1882-
				local style = up and scrollStyle or scrollStyle_ds
1882+
1883
					BackgroundColor3 = ScrollStyles.Button;
1884-
					Create(children[i],style)
1884+
1885
					--BorderSizePixel = 0;
1886
				});
1887-
			ScrollThumbFrame.Visible = down or up
1887+
1888-
			UpdateScrollThumb()
1888+
					Name = "ScrollUp";
1889
					Size = UDim2.new(0, ScrollBarWidth, 0, ScrollBarWidth);
1890-
		Class.Update = Update
1890+
1891
					BorderColor3 = ScrollStyles.Border;
1892-
		SetZIndexOnChanged(ScrollFrame)
1892+
1893
				});
1894-
		local scrollEventID = 0
1894+
1895-
		ScrollDownFrame.MouseButton1Down:connect(function()
1895+
					Name = "ScrollBar";
1896-
			scrollEventID = tick()
1896+
					Size = horizontal and UDim2.new(1,-ScrollBarWidth*2,1,0) or UDim2.new(1,0,1,-ScrollBarWidth*2);
1897-
			local current = scrollEventID
1897+
					Position = horizontal and UDim2.new(0,ScrollBarWidth,0,0) or UDim2.new(0,0,0,ScrollBarWidth);
1898-
			local up_con
1898+
1899-
			up_con = MouseDrag.MouseButton1Up:connect(function()
1899+
					BackgroundColor3 = Color3.new(0.94902, 0.94902, 0.94902);
1900
					BorderColor3 = ScrollStyles.Border;
1901-
				MouseDrag.Parent = nil
1901+
1902-
				ResetButtonColor(ScrollDownFrame)
1902+
					Create('ImageButton',{
1903-
				up_con:disconnect(); drag = nil
1903+
						Name = "ScrollThumb";
1904
						AutoButtonColor = false;
1905-
			MouseDrag.Parent = GetScreen(ScrollFrame)
1905+
						Size = UDim2.new(0, ScrollBarWidth, 0, ScrollBarWidth);
1906-
			Class:ScrollDown()
1906+
						BackgroundColor3 = ScrollStyles.Button;
1907-
			wait(0.2) -- delay before auto scroll
1907+
						BorderColor3 = ScrollStyles.Border;
1908-
			while scrollEventID == current do
1908+
						--BorderSizePixel = 0;
1909
					});
1910-
				if not Class:CanScrollDown() then break end
1910+
1911-
				wait()
1911+
1912
1913
			local graphicTemplate = Create('Frame',{
1914
				Name="Graphic";
1915-
		ScrollDownFrame.MouseButton1Up:connect(function()
1915+
1916-
			scrollEventID = tick()
1916+
				BackgroundColor3 = ScrollStyles.Border;
1917
			})
1918
			local graphicSize = ScrollBarWidth/2
1919-
		ScrollUpFrame.MouseButton1Down:connect(function()
1919+
1920-
			scrollEventID = tick()
1920+
			local ScrollDownFrame = ScrollFrame.ScrollDown
1921-
			local current = scrollEventID
1921+
1922-
			local up_con
1922+
1923-
			up_con = MouseDrag.MouseButton1Up:connect(function()
1923+
1924
			local ScrollUpFrame = ScrollFrame.ScrollUp
1925-
				MouseDrag.Parent = nil
1925+
1926-
				ResetButtonColor(ScrollUpFrame)
1926+
1927-
				up_con:disconnect(); drag = nil
1927+
1928
			local ScrollBarFrame = ScrollFrame.ScrollBar
1929-
			MouseDrag.Parent = GetScreen(ScrollFrame)
1929+
			local ScrollThumbFrame = ScrollBarFrame.ScrollThumb
1930-
			Class:ScrollUp()
1930+
			do
1931-
			wait(0.2)
1931+
				local size = ScrollBarWidth*3/8
1932-
			while scrollEventID == current do
1932+
				local Decal = GripGraphic(Vector2.new(size,size),horizontal and 'Vertical' or 'Horizontal',2,graphicTemplate)
1933
				Decal.Position = UDim2.new(0.5,-size/2,0.5,-size/2)
1934-
				if not Class:CanScrollUp() then break end
1934+
				Decal.Parent = ScrollThumbFrame
1935-
				wait()
1935+
1936
1937
			local MouseDrag = Create('ImageButton',{
1938
				Name = "MouseDrag";
1939-
		ScrollUpFrame.MouseButton1Up:connect(function()
1939+
				Position = UDim2.new(-0.25,0,-0.25,0);
1940-
			scrollEventID = tick()
1940+
				Size = UDim2.new(1.5,0,1.5,0);
1941
				Transparency = 1;
1942
				AutoButtonColor = false;
1943-
		if horizontal then
1943+
				Active = true;
1944-
			ScrollBarFrame.MouseButton1Down:connect(function(x,y)
1944+
				ZIndex = 10;
1945
			})
1946
1947
			local Class = setmetatable({
1948
				GUI = ScrollFrame;
1949
				ScrollIndex = 0;
1950
				VisibleSpace = 0;
1951
				TotalSpace = 0;
1952
				PageIncrement = 1;
1953
			},mt)
1954
1955-
				if x > ScrollThumbFrame.AbsolutePosition.x then
1955+
			local UpdateScrollThumb
1956-
					Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
1956+
			if horizontal then
1957-
					wait(0.2)
1957+
				function UpdateScrollThumb()
1958-
					while scrollEventID == current do
1958+
					ScrollThumbFrame.Size = UDim2.new(Class.VisibleSpace/Class.TotalSpace,0,0,ScrollBarWidth)
1959-
						if x < ScrollThumbFrame.AbsolutePosition.x + ScrollThumbFrame.AbsoluteSize.x then break end
1959+
					if ScrollThumbFrame.AbsoluteSize.x < ScrollBarWidth then
1960
						ScrollThumbFrame.Size = UDim2.new(0,ScrollBarWidth,0,ScrollBarWidth)
1961-
						wait()
1961+
1962
					local barSize = ScrollBarFrame.AbsoluteSize.x
1963
					ScrollThumbFrame.Position = UDim2.new(Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.x)/barSize,0,0,0)
1964-
					Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
1964+
1965-
					wait(0.2)
1965+
1966-
					while scrollEventID == current do
1966+
				function UpdateScrollThumb()
1967-
						if x > ScrollThumbFrame.AbsolutePosition.x then break end
1967+
					ScrollThumbFrame.Size = UDim2.new(0,ScrollBarWidth,Class.VisibleSpace/Class.TotalSpace,0)
1968
					if ScrollThumbFrame.AbsoluteSize.y < ScrollBarWidth then
1969-
						wait()
1969+
						ScrollThumbFrame.Size = UDim2.new(0,ScrollBarWidth,0,ScrollBarWidth)
1970
					end
1971
					local barSize = ScrollBarFrame.AbsoluteSize.y
1972
					ScrollThumbFrame.Position = UDim2.new(0,0,Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.y)/barSize,0)
1973
				end
1974-
			ScrollBarFrame.MouseButton1Down:connect(function(x,y)
1974+
1975
1976
			local lastDown
1977
			local lastUp
1978
			local scrollStyle = {BackgroundColor3=ScrollStyles.Border,BackgroundTransparency=0}
1979
			local scrollStyle_ds = {BackgroundColor3=ScrollStyles.Border,BackgroundTransparency=0.7}
1980
1981
			local function Update()
1982
				local t = Class.TotalSpace
1983
				local v = Class.VisibleSpace
1984
				local s = Class.ScrollIndex
1985-
				if y > ScrollThumbFrame.AbsolutePosition.y then
1985+
				if v <= t then
1986-
					Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
1986+
					if s > 0 then
1987-
					wait(0.2)
1987+
						if s + v > t then
1988-
					while scrollEventID == current do
1988+
							Class.ScrollIndex = t - v
1989-
						if y < ScrollThumbFrame.AbsolutePosition.y + ScrollThumbFrame.AbsoluteSize.y then break end
1989+
1990
					else
1991-
						wait()
1991+
						Class.ScrollIndex = 0
1992
					end
1993
				else
1994-
					Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
1994+
1995-
					wait(0.2)
1995+
1996-
					while scrollEventID == current do
1996+
1997-
						if y > ScrollThumbFrame.AbsolutePosition.y then break end
1997+
				if Class.UpdateCallback then
1998
					if Class.UpdateCallback(Class) == false then
1999-
						wait()
1999+
						return
2000
					end
2001
				end
2002
2003
				local down = Class:CanScrollDown()
2004
				local up = Class:CanScrollUp()
2005-
		if horizontal then
2005+
				if down ~= lastDown then
2006-
			ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
2006+
					lastDown = down
2007
					ScrollDownFrame.Active = down
2008-
				local mouse_offset = x - ScrollThumbFrame.AbsolutePosition.x
2008+
					ScrollDownFrame.AutoButtonColor = down
2009-
				local drag_con
2009+
					local children = ScrollDownGraphic:GetChildren()
2010
					local style = down and scrollStyle or scrollStyle_ds
2011-
				drag_con = MouseDrag.MouseMoved:connect(function(x,y)
2011+
					for i = 1,#children do
2012-
					local bar_abs_pos = ScrollBarFrame.AbsolutePosition.x
2012+
						Create(children[i],style)
2013-
					local bar_drag = ScrollBarFrame.AbsoluteSize.x - ScrollThumbFrame.AbsoluteSize.x
2013+
2014-
					local bar_abs_one = bar_abs_pos + bar_drag
2014+
2015-
					x = x - mouse_offset
2015+
				if up ~= lastUp then
2016-
					x = x < bar_abs_pos and bar_abs_pos or x > bar_abs_one and bar_abs_one or x
2016+
					lastUp = up
2017-
					x = x - bar_abs_pos
2017+
					ScrollUpFrame.Active = up
2018-
					Class:SetScrollPercent(x/(bar_drag))
2018+
					ScrollUpFrame.AutoButtonColor = up
2019
					local children = ScrollUpGraphic:GetChildren()
2020
					local style = up and scrollStyle or scrollStyle_ds
2021
					for i = 1,#children do
2022
						Create(children[i],style)
2023-
					ResetButtonColor(ScrollThumbFrame)
2023+
2024-
					drag_con:disconnect(); drag_con = nil
2024+
2025
				ScrollThumbFrame.Visible = down or up
2026
				UpdateScrollThumb()
2027
			end
2028
			Class.Update = Update
2029
2030-
			ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
2030+
			SetZIndexOnChanged(ScrollFrame)
2031
2032-
				local mouse_offset = y - ScrollThumbFrame.AbsolutePosition.y
2032+
			local scrollEventID = 0
2033-
				local drag_con
2033+
			ScrollDownFrame.MouseButton1Down:connect(function()
2034
				scrollEventID = tick()
2035-
				drag_con = MouseDrag.MouseMoved:connect(function(x,y)
2035+
2036-
					local bar_abs_pos = ScrollBarFrame.AbsolutePosition.y
2036+
2037-
					local bar_drag = ScrollBarFrame.AbsoluteSize.y - ScrollThumbFrame.AbsoluteSize.y
2037+
2038-
					local bar_abs_one = bar_abs_pos + bar_drag
2038+
2039-
					y = y - mouse_offset
2039+
2040-
					y = y < bar_abs_pos and bar_abs_pos or y > bar_abs_one and bar_abs_one or y
2040+
					ResetButtonColor(ScrollDownFrame)
2041-
					y = y - bar_abs_pos
2041+
2042-
					Class:SetScrollPercent(y/(bar_drag))
2042+
2043
				MouseDrag.Parent = GetScreen(ScrollFrame)
2044
				Class:ScrollDown()
2045
				wait(0.2) -- delay before auto scroll
2046
				while scrollEventID == current do
2047-
					ResetButtonColor(ScrollThumbFrame)
2047+
					Class:ScrollDown()
2048-
					drag_con:disconnect(); drag_con = nil
2048+
					if not Class:CanScrollDown() then break end
2049
					wait()
2050
				end
2051
			end)
2052
2053
			ScrollDownFrame.MouseButton1Up:connect(function()
2054
				scrollEventID = tick()
2055-
		function Class:Destroy()
2055+
2056-
			ScrollFrame:Destroy()
2056+
2057-
			MouseDrag:Destroy()
2057+
			ScrollUpFrame.MouseButton1Down:connect(function()
2058-
			for k in pairs(Class) do
2058+
2059-
				Class[k] = nil
2059+
2060
				local up_con
2061-
			setmetatable(Class,nil)
2061+
2062
					scrollEventID = tick()
2063
					MouseDrag.Parent = nil
2064-
		Update()
2064+
2065
					up_con:disconnect(); drag = nil
2066-
		return Class
2066+
2067
				MouseDrag.Parent = GetScreen(ScrollFrame)
2068
				Class:ScrollUp()
2069
				wait(0.2)
2070-
----------------------------------------------------------------
2070+
				while scrollEventID == current do
2071-
----------------------------------------------------------------
2071+
					Class:ScrollUp()
2072-
----------------------------------------------------------------
2072+
					if not Class:CanScrollUp() then break end
2073-
----------------------------------------------------------------
2073+
					wait()
2074
				end
2075-
local MainFrame = Instance.new("Frame")
2075+
2076-
MainFrame.Name = "MainFrame"
2076+
2077-
MainFrame.Size = UDim2.new(1, -1 * ScrollBarWidth, 1, 0)
2077+
			ScrollUpFrame.MouseButton1Up:connect(function()
2078-
MainFrame.Position = UDim2.new(0, 0, 0, 0)
2078+
2079-
MainFrame.BackgroundTransparency = 1
2079+
2080-
MainFrame.ClipsDescendants = true
2080+
2081-
MainFrame.Parent = PropertiesFrame
2081+
			if horizontal then
2082
				ScrollBarFrame.MouseButton1Down:connect(function(x,y)
2083-
ContentFrame = Instance.new("Frame")
2083+
2084-
ContentFrame.Name = "ContentFrame"
2084+
					local current = scrollEventID
2085-
ContentFrame.Size = UDim2.new(1, 0, 0, 0)
2085+
					local up_con
2086-
ContentFrame.BackgroundTransparency = 1
2086+
					up_con = MouseDrag.MouseButton1Up:connect(function()
2087-
ContentFrame.Parent = MainFrame
2087+
						scrollEventID = tick()
2088
						MouseDrag.Parent = nil
2089-
scrollBar = ScrollBar(false)
2089+
						ResetButtonColor(ScrollUpFrame)
2090-
scrollBar.PageIncrement = 1
2090+
						up_con:disconnect(); drag = nil
2091-
Create(scrollBar.GUI,{
2091+
2092-
	Position = UDim2.new(1,-ScrollBarWidth,0,0);
2092+
					MouseDrag.Parent = GetScreen(ScrollFrame)
2093-
	Size = UDim2.new(0,ScrollBarWidth,1,0);
2093+
					if x > ScrollThumbFrame.AbsolutePosition.x then
2094-
	Parent = PropertiesFrame;
2094+
2095-
})
2095+
						wait(0.2)
2096
						while scrollEventID == current do
2097-
scrollBarH = ScrollBar(true)
2097+
							if x < ScrollThumbFrame.AbsolutePosition.x + ScrollThumbFrame.AbsoluteSize.x then break end
2098-
scrollBarH.PageIncrement = ScrollBarWidth
2098+
							Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
2099-
Create(scrollBarH.GUI,{
2099+
							wait()
2100-
	Position = UDim2.new(0,0,1,-ScrollBarWidth);
2100+
2101-
	Size = UDim2.new(1,-ScrollBarWidth,0,ScrollBarWidth);
2101+
2102-
	Visible = false;
2102+
2103-
	Parent = PropertiesFrame;
2103+
						wait(0.2)
2104-
})
2104+
						while scrollEventID == current do
2105
							if x > ScrollThumbFrame.AbsolutePosition.x then break end
2106
							Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
2107-
	local listEntries = {}
2107+
							wait()
2108-
	local nameConnLookup = {}
2108+
2109
					end
2110
				end)
2111-
		scrollBar.TotalSpace = ContentFrame.AbsoluteSize.Y
2111+
2112-
		scrollBar.VisibleSpace = MainFrame.AbsoluteSize.Y
2112+
				ScrollBarFrame.MouseButton1Down:connect(function(x,y)
2113-
		ContentFrame.Position = UDim2.new(ContentFrame.Position.X.Scale,ContentFrame.Position.X.Offset,0,-1*scrollBar.ScrollIndex)
2113+
2114
					local current = scrollEventID
2115
					local up_con
2116
					up_con = MouseDrag.MouseButton1Up:connect(function()
2117
						scrollEventID = tick()
2118
						MouseDrag.Parent = nil
2119
						ResetButtonColor(ScrollUpFrame)
2120-
	MainFrame.Changed:connect(function(p)
2120+
						up_con:disconnect(); drag = nil
2121-
		if p == 'AbsoluteSize' then
2121+
2122-
			scrollBarH.VisibleSpace = math.ceil(MainFrame.AbsoluteSize.x)
2122+
					MouseDrag.Parent = GetScreen(ScrollFrame)
2123
					if y > ScrollThumbFrame.AbsolutePosition.y then
2124-
			scrollBar.VisibleSpace = math.ceil(MainFrame.AbsoluteSize.y)
2124+
2125
						wait(0.2)
2126
						while scrollEventID == current do
2127
							if y < ScrollThumbFrame.AbsolutePosition.y + ScrollThumbFrame.AbsoluteSize.y then break end
2128
							Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
2129-
	local wheelAmount = Row.Height
2129+
							wait()
2130-
	PropertiesFrame.MouseWheelForward:connect(function()
2130+
2131-
		if scrollBar.VisibleSpace - 1 > wheelAmount then
2131+
2132-
			scrollBar:ScrollTo(scrollBar.ScrollIndex - wheelAmount)
2132+
2133
						wait(0.2)
2134-
			scrollBar:ScrollTo(scrollBar.ScrollIndex - scrollBar.VisibleSpace)
2134+
						while scrollEventID == current do
2135
							if y > ScrollThumbFrame.AbsolutePosition.y then break end
2136
							Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
2137-
	PropertiesFrame.MouseWheelBackward:connect(function()
2137+
							wait()
2138-
		if scrollBar.VisibleSpace - 1 > wheelAmount then
2138+
2139-
			scrollBar:ScrollTo(scrollBar.ScrollIndex + wheelAmount)
2139+
2140
				end)
2141-
			scrollBar:ScrollTo(scrollBar.ScrollIndex + scrollBar.VisibleSpace)
2141+
2142
2143
			if horizontal then
2144
				ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
2145
					scrollEventID = tick()
2146-
scrollBar.VisibleSpace = math.ceil(MainFrame.AbsoluteSize.y)
2146+
					local mouse_offset = x - ScrollThumbFrame.AbsolutePosition.x
2147-
scrollBar:Update()
2147+
					local drag_con
2148
					local up_con
2149-
showProperties(GetSelection())
2149+
					drag_con = MouseDrag.MouseMoved:connect(function(x,y)
2150
						local bar_abs_pos = ScrollBarFrame.AbsolutePosition.x
2151-
bindSelectionChanged.Event:connect(function()
2151+
						local bar_drag = ScrollBarFrame.AbsoluteSize.x - ScrollThumbFrame.AbsoluteSize.x
2152
						local bar_abs_one = bar_abs_pos + bar_drag
2153
						x = x - mouse_offset
2154
						x = x < bar_abs_pos and bar_abs_pos or x > bar_abs_one and bar_abs_one or x
2155-
bindSetAwait.Event:connect(function(obj)
2155+
						x = x - bar_abs_pos
2156-
	if AwaitingObjectValue then
2156+
						Class:SetScrollPercent(x/(bar_drag))
2157-
		AwaitingObjectValue = false
2157+
2158-
		local mySel = obj
2158+
					up_con = MouseDrag.MouseButton1Up:connect(function()
2159-
		if mySel then
2159+
						scrollEventID = tick()
2160
						MouseDrag.Parent = nil
2161-
				Set(AwaitingObjectObj, AwaitingObjectProp, mySel)
2161+
						ResetButtonColor(ScrollThumbFrame)
2162
						drag_con:disconnect(); drag_con = nil
2163
						up_con:disconnect(); drag = nil
2164
					end)
2165
					MouseDrag.Parent = GetScreen(ScrollFrame)
2166
				end)
2167-
propertiesSearch.Changed:connect(function(prop)
2167+
2168-
	if prop == "Text" then
2168+
				ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
2169
					scrollEventID = tick()
2170
					local mouse_offset = y - ScrollThumbFrame.AbsolutePosition.y
2171
					local drag_con
2172
					local up_con
2173-
bindGetApi.OnInvoke = function()
2173+
					drag_con = MouseDrag.MouseMoved:connect(function(x,y)
2174-
	return RbxApi
2174+
						local bar_abs_pos = ScrollBarFrame.AbsolutePosition.y
2175
						local bar_drag = ScrollBarFrame.AbsoluteSize.y - ScrollThumbFrame.AbsoluteSize.y
2176
						local bar_abs_one = bar_abs_pos + bar_drag
2177-
bindGetAwait.OnInvoke = function()
2177+
						y = y - mouse_offset
2178-
	return AwaitingObjectValue
2178+
						y = y < bar_abs_pos and bar_abs_pos or y > bar_abs_one and bar_abs_one or y
2179
						y = y - bar_abs_pos
2180
						Class:SetScrollPercent(y/(bar_drag))
2181
					end)
2182
					up_con = MouseDrag.MouseButton1Up:connect(function()
2183
						scrollEventID = tick()
2184
						MouseDrag.Parent = nil
2185
						ResetButtonColor(ScrollThumbFrame)
2186
						drag_con:disconnect(); drag_con = nil
2187
						up_con:disconnect(); drag = nil
2188
					end)
2189
					MouseDrag.Parent = GetScreen(ScrollFrame)
2190
				end)
2191
			end
2192
2193
			function Class:Destroy()
2194
				ScrollFrame:Destroy()
2195
				MouseDrag:Destroy()
2196
				for k in pairs(Class) do
2197
					Class[k] = nil
2198
				end
2199
				setmetatable(Class,nil)
2200
			end
2201
2202
			Update()
2203
2204
			return Class
2205
		end
2206
	end
2207
2208
	----------------------------------------------------------------
2209
	----------------------------------------------------------------
2210
	----------------------------------------------------------------
2211
	----------------------------------------------------------------
2212
2213
	local MainFrame = Instance.new("Frame")
2214
	MainFrame.Name = "MainFrame"
2215
	MainFrame.Size = UDim2.new(1, -1 * ScrollBarWidth, 1, 0)
2216
	MainFrame.Position = UDim2.new(0, 0, 0, 0)
2217
	MainFrame.BackgroundTransparency = 1
2218
	MainFrame.ClipsDescendants = true
2219
	MainFrame.Parent = PropertiesFrame
2220
2221
	ContentFrame = Instance.new("Frame")
2222
	ContentFrame.Name = "ContentFrame"
2223
	ContentFrame.Size = UDim2.new(1, 0, 0, 0)
2224
	ContentFrame.BackgroundTransparency = 1
2225
	ContentFrame.Parent = MainFrame
2226
2227
	scrollBar = ScrollBar(false)
2228
	scrollBar.PageIncrement = 1
2229
	Create(scrollBar.GUI,{
2230
		Position = UDim2.new(1,-ScrollBarWidth,0,0);
2231
		Size = UDim2.new(0,ScrollBarWidth,1,0);
2232
		Parent = PropertiesFrame;
2233
	})
2234
2235
	scrollBarH = ScrollBar(true)
2236
	scrollBarH.PageIncrement = ScrollBarWidth
2237
	Create(scrollBarH.GUI,{
2238
		Position = UDim2.new(0,0,1,-ScrollBarWidth);
2239
		Size = UDim2.new(1,-ScrollBarWidth,0,ScrollBarWidth);
2240
		Visible = false;
2241
		Parent = PropertiesFrame;
2242
	})
2243
2244
	do
2245-
-- initial states
2245+
		local listEntries = {}
2246-
local Option = {
2246+
		local nameConnLookup = {}
2247-
	-- can modify object parents in the hierarchy
2247+
2248-
	Modifiable = false;
2248+
		function scrollBar.UpdateCallback(self)
2249-
	-- can select objects
2249+
			scrollBar.TotalSpace = ContentFrame.AbsoluteSize.Y
2250-
	Selectable = true;
2250+
			scrollBar.VisibleSpace = MainFrame.AbsoluteSize.Y
2251-
}
2251+
			ContentFrame.Position = UDim2.new(ContentFrame.Position.X.Scale,ContentFrame.Position.X.Offset,0,-1*scrollBar.ScrollIndex)
2252
		end
2253-
-- MERELY
2253+
2254
		function scrollBarH.UpdateCallback(self)
2255-
Option.Modifiable = true
2255+
2256
		end
2257-
-- END MERELY
2257+
2258
		MainFrame.Changed:connect(function(p)
2259-
-- general size of GUI objects, in pixels
2259+
			if p == 'AbsoluteSize' then
2260-
local GUI_SIZE = 16
2260+
				scrollBarH.VisibleSpace = math.ceil(MainFrame.AbsoluteSize.x)
2261-
-- padding between items within each entry
2261+
2262-
local ENTRY_PADDING = 1
2262+
				scrollBar.VisibleSpace = math.ceil(MainFrame.AbsoluteSize.y)
2263-
-- padding between each entry
2263+
2264-
local ENTRY_MARGIN = 1
2264+
2265
		end)
2266-
local explorerPanel = script.Parent
2266+
2267-
local Input = game:GetService("UserInputService")
2267+
		local wheelAmount = Row.Height
2268-
local HoldingCtrl = false
2268+
		PropertiesFrame.MouseWheelForward:connect(function()
2269-
local HoldingShift = false
2269+
			if scrollBar.VisibleSpace - 1 > wheelAmount then
2270
				scrollBar:ScrollTo(scrollBar.ScrollIndex - wheelAmount)
2271-
local DexOutput = Instance.new("Folder")
2271+
2272-
DexOutput.Name = "Output"
2272+
				scrollBar:ScrollTo(scrollBar.ScrollIndex - scrollBar.VisibleSpace)
2273-
local DexOutputMain = Instance.new("ScreenGui", DexOutput)
2273+
2274-
DexOutputMain.Name = "Dex Output"
2274+
2275
		PropertiesFrame.MouseWheelBackward:connect(function()
2276-
print = function(...)
2276+
			if scrollBar.VisibleSpace - 1 > wheelAmount then
2277-
	local Obj = Instance.new("Dialog")
2277+
				scrollBar:ScrollTo(scrollBar.ScrollIndex + wheelAmount)
2278-
	Obj.Parent = DexOutputMain
2278+
2279-
	Obj.Name = ""
2279+
				scrollBar:ScrollTo(scrollBar.ScrollIndex + scrollBar.VisibleSpace)
2280-
	for i,v in pairs({...}) do
2280+
2281-
		Obj.Name = Obj.Name .. tostring(v) .. " "
2281+
2282
	end
2283
2284
	scrollBar.VisibleSpace = math.ceil(MainFrame.AbsoluteSize.y)
2285-
explorerPanel:WaitForChild("GetPrint").OnInvoke = function()
2285+
	scrollBar:Update()
2286-
	return print
2286+
2287
	showProperties(GetSelection())
2288
2289
	bindSelectionChanged.Event:connect(function()
2290
		showProperties(GetSelection())
2291
	end)
2292
2293
	bindSetAwait.Event:connect(function(obj)
2294
		if AwaitingObjectValue then
2295
			AwaitingObjectValue = false
2296
			local mySel = obj
2297
			if mySel then
2298
				pcall(function()
2299
					Set(AwaitingObjectObj, AwaitingObjectProp, mySel)
2300
				end)
2301
			end
2302
		end
2303
	end)
2304
2305
	propertiesSearch.Changed:connect(function(prop)
2306
		if prop == "Text" then
2307
			showProperties(GetSelection())
2308
		end
2309
	end)
2310
2311
	bindGetApi.OnInvoke = function()
2312
		return RbxApi
2313
	end
2314
2315
	bindGetAwait.OnInvoke = function()
2316
		return AwaitingObjectValue
2317
	end
2318
end))
2319
ModuleScript3.Name = "RawApiJson"
2320
ModuleScript3.Parent = LocalScript2
2321
Frame4.Name = "Header"
2322
Frame4.Parent = Frame1
2323
Frame4.Position = UDim2.new(0, 0, 0, -36)
2324
Frame4.Size = UDim2.new(1, 0, 0, 36)
2325
Frame4.BackgroundColor = BrickColor.new("Lily white")
2326
Frame4.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
2327
Frame4.BorderColor = BrickColor.new("Sand violet metallic")
2328
Frame4.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
2329
Frame4.BorderSizePixel = 0
2330
TextLabel5.Parent = Frame4
2331
TextLabel5.Position = UDim2.new(0, 4, 0, 0)
2332
TextLabel5.Transparency = 1
2333
TextLabel5.Size = UDim2.new(1, -4, 0.5, 0)
2334
TextLabel5.BackgroundTransparency = 1
2335
TextLabel5.Font = Enum.Font.SourceSans
2336
TextLabel5.FontSize = Enum.FontSize.Size14
2337
TextLabel5.Text = "Properties"
2338
TextLabel5.TextColor = BrickColor.new("Really black")
2339
TextLabel5.TextColor3 = Color3.new(0, 0, 0)
2340
TextLabel5.TextSize = 14
2341
TextLabel5.TextXAlignment = Enum.TextXAlignment.Left
2342
TextBox6.Parent = Frame4
2343
TextBox6.Position = UDim2.new(0, 4, 0.5, 0)
2344
TextBox6.Transparency = 0.80000001192093
2345
TextBox6.Size = UDim2.new(1, -8, 0.5, -3)
2346
TextBox6.BackgroundTransparency = 0.80000001192093
2347
TextBox6.Font = Enum.Font.SourceSans
2348
TextBox6.FontSize = Enum.FontSize.Size14
2349
TextBox6.Text = "Search Properties"
2350
TextBox6.TextColor = BrickColor.new("Really black")
2351
TextBox6.TextColor3 = Color3.new(0, 0, 0)
2352
TextBox6.TextSize = 14
2353
TextBox6.TextXAlignment = Enum.TextXAlignment.Left
2354
BindableFunction7.Name = "GetApi"
2355
BindableFunction7.Parent = Frame1
2356
BindableFunction8.Name = "GetAwaiting"
2357
BindableFunction8.Parent = Frame1
2358
BindableEvent9.Name = "SetAwaiting"
2359
BindableEvent9.Parent = Frame1
2360
Frame10.Name = "ExplorerPanel"
2361
Frame10.Parent = ScreenGui0
2362
Frame10.Position = UDim2.new(1, 0, 0, 0)
2363
Frame10.Transparency = 0.10000000149012
2364
Frame10.Size = UDim2.new(0, 300, 0.5, 0)
2365
Frame10.BackgroundColor = BrickColor.new("Institutional white")
2366
Frame10.BackgroundColor3 = Color3.new(1, 1, 1)
2367
Frame10.BackgroundTransparency = 0.10000000149012
2368
Frame10.BorderColor = BrickColor.new("Sand violet metallic")
2369
Frame10.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
2370
Frame10.BorderSizePixel = 0
2371
BindableEvent11.Name = "SelectionChanged"
2372
BindableEvent11.Parent = Frame10
2373
BindableFunction12.Name = "SetOption"
2374
BindableFunction12.Parent = Frame10
2375
BindableFunction13.Name = "SetSelection"
2376
BindableFunction13.Parent = Frame10
2377
BindableFunction14.Name = "GetOption"
2378
BindableFunction14.Parent = Frame10
2379
BindableFunction15.Name = "GetSelection"
2380
BindableFunction15.Parent = Frame10
2381
LocalScript16.Parent = Frame10
2382
table.insert(cors,sandbox(LocalScript16,function()
2383
	-- initial states
2384
	local Option = {
2385
		-- can modify object parents in the hierarchy
2386
		Modifiable = false;
2387
		-- can select objects
2388
		Selectable = true;
2389
	}
2390
2391
	-- MERELY
2392
2393
	Option.Modifiable = true
2394
2395
	-- END MERELY
2396
2397
	-- general size of GUI objects, in pixels
2398
	local GUI_SIZE = 16
2399
	-- padding between items within each entry
2400
	local ENTRY_PADDING = 1
2401
	-- padding between each entry
2402-
local ENTRY_SIZE = GUI_SIZE + ENTRY_PADDING*2
2402+
	local ENTRY_MARGIN = 1
2403-
local ENTRY_BOUND = ENTRY_SIZE + ENTRY_MARGIN
2403+
2404-
local HEADER_SIZE = ENTRY_SIZE*2
2404+
	local explorerPanel = script.Parent
2405
	local Input = game:GetService("UserInputService")
2406-
local FONT = 'SourceSans'
2406+
	local HoldingCtrl = false
2407-
local FONT_SIZE do
2407+
	local HoldingShift = false
2408-
	local size = {8,9,10,11,12,14,18,24,36,48}
2408+
2409-
	local s
2409+
	local DexOutput = Instance.new("Folder")
2410-
	local n = math.huge
2410+
	DexOutput.Name = "Output"
2411-
	for i = 1,#size do
2411+
	local DexOutputMain = Instance.new("ScreenGui", DexOutput)
2412-
		if size[i] <= GUI_SIZE then
2412+
	DexOutputMain.Name = "Dex Output"
2413-
			FONT_SIZE = i - 1
2413+
2414
	print = function(...)
2415
		local Obj = Instance.new("Dialog")
2416
		Obj.Parent = DexOutputMain
2417
		Obj.Name = ""
2418-
local GuiColor = {
2418+
		for i,v in pairs({...}) do
2419-
	Background      = Color3.new(233/255, 233/255, 233/255);
2419+
			Obj.Name = Obj.Name .. tostring(v) .. " "
2420-
	Border          = Color3.new(149/255, 149/255, 149/255);
2420+
2421-
	Selected        = Color3.new( 96/255, 140/255, 211/255);
2421+
2422-
	BorderSelected  = Color3.new( 86/255, 125/255, 188/255);
2422+
2423-
	Text            = Color3.new(  0/255,   0/255,   0/255);
2423+
	explorerPanel:WaitForChild("GetPrint").OnInvoke = function()
2424-
	TextDisabled    = Color3.new(128/255, 128/255, 128/255);
2424+
		return print
2425-
	TextSelected    = Color3.new(255/255, 255/255, 255/255);
2425+
2426-
	Button          = Color3.new(221/255, 221/255, 221/255);
2426+
2427-
	ButtonBorder    = Color3.new(149/255, 149/255, 149/255);
2427+
2428-
	ButtonSelected  = Color3.new(255/255,   0/255,   0/255);
2428+
2429-
	Field           = Color3.new(255/255, 255/255, 255/255);
2429+
2430-
	FieldBorder     = Color3.new(191/255, 191/255, 191/255);
2430+
2431-
	TitleBackground = Color3.new(178/255, 178/255, 178/255);
2431+
2432-
}
2432+
2433
2434-
----------------------------------------------------------------
2434+
2435-
----------------------------------------------------------------
2435+
2436-
----------------------------------------------------------------
2436+
2437-
----------------------------------------------------------------
2437+
2438-
---- Icon map constants
2438+
2439
	Returns an array of objects representing the objects currently
2440-
local MAP_ID = 483448923
2440+
2441
2442-
-- Indices based on implementation of Icon function.
2442+
2443-
local ACTION_CUT         	 = 160
2443+
2444-
local ACTION_COPY        	 = 161
2444+
2445-
local ACTION_PASTE       	 = 162
2445+
2446-
local ACTION_DELETE      	 = 163
2446+
2447-
local ACTION_SORT        	 = 164
2447+
2448-
local ACTION_CUT_OVER    	 = 174
2448+
2449-
local ACTION_COPY_OVER   	 = 175
2449+
2450-
local ACTION_PASTE_OVER  	 = 176
2450+
2451-
local ACTION_DELETE_OVER	 = 177
2451+
2452-
local ACTION_SORT_OVER  	 = 178
2452+
2453-
local ACTION_EDITQUICKACCESS = 190
2453+
2454-
local ACTION_FREEZE 		 = 188
2454+
2455-
local ACTION_STARRED 		 = 189
2455+
2456-
local ACTION_ADDSTAR 		 = 184
2456+
2457-
local ACTION_ADDSTAR_OVER 	 = 187
2457+
2458
2459-
local NODE_COLLAPSED      = 165
2459+
2460-
local NODE_EXPANDED       = 166
2460+
2461-
local NODE_COLLAPSED_OVER = 179
2461+
2462-
local NODE_EXPANDED_OVER  = 180
2462+
2463
	Options:
2464-
local ExplorerIndex = {
2464+
2465-
	["Accessory"] = 32;
2465+
2466-
	["Accoutrement"] = 32;
2466+
2467-
	["AdService"] = 73;
2467+
2468-
	["Animation"] = 60;
2468+
2469-
	["AnimationController"] = 60;
2469+
2470-
	["AnimationTrack"] = 60;
2470+
2471-
	["Animator"] = 60;
2471+
2472-
	["ArcHandles"] = 56;
2472+
2473-
	["AssetService"] = 72;
2473+
2474-
	["Attachment"] = 34;
2474+
2475-
	["Backpack"] = 20;
2475+
2476-
	["BadgeService"] = 75;
2476+
2477-
	["BallSocketConstraint"] = 89;
2477+
2478-
	["BillboardGui"] = 64;
2478+
2479-
	["BinaryStringValue"] = 4;
2479+
2480-
	["BindableEvent"] = 67;
2480+
2481-
	["BindableFunction"] = 66;
2481+
2482-
	["BlockMesh"] = 8;
2482+
2483-
	["BloomEffect"] = 90;
2483+
2484-
	["BlurEffect"] = 90;
2484+
2485-
	["BodyAngularVelocity"] = 14;
2485+
2486-
	["BodyForce"] = 14;
2486+
2487-
	["BodyGyro"] = 14;
2487+
2488-
	["BodyPosition"] = 14;
2488+
2489-
	["BodyThrust"] = 14;
2489+
2490-
	["BodyVelocity"] = 14;
2490+
2491-
	["BoolValue"] = 4;
2491+
2492-
	["BoxHandleAdornment"] = 54;
2492+
2493-
	["BrickColorValue"] = 4;
2493+
2494-
	["Camera"] = 5;
2494+
2495-
	["CFrameValue"] = 4;
2495+
2496-
	["CharacterMesh"] = 60;
2496+
2497-
	["Chat"] = 33;
2497+
2498-
	["ClickDetector"] = 41;
2498+
2499-
	["CollectionService"] = 30;
2499+
2500-
	["Color3Value"] = 4;
2500+
2501-
	["ColorCorrectionEffect"] = 90;
2501+
2502-
	["ConeHandleAdornment"] = 54;
2502+
2503-
	["Configuration"] = 58;
2503+
2504-
	["ContentProvider"] = 72;
2504+
2505-
	["ContextActionService"] = 41;
2505+
2506-
	["CoreGui"] = 46;
2506+
2507-
	["CoreScript"] = 18;
2507+
2508-
	["CornerWedgePart"] = 1;
2508+
2509-
	["CustomEvent"] = 4;
2509+
2510-
	["CustomEventReceiver"] = 4;
2510+
2511-
	["CylinderHandleAdornment"] = 54;
2511+
2512-
	["CylinderMesh"] = 8;
2512+
2513-
	["CylindricalConstraint"] = 89;
2513+
2514-
	["Debris"] = 30;
2514+
2515-
	["Decal"] = 7;
2515+
2516-
	["Dialog"] = 62;
2516+
2517-
	["DialogChoice"] = 63;
2517+
2518-
	["DoubleConstrainedValue"] = 4;
2518+
2519-
	["Explosion"] = 36;
2519+
2520-
	["FileMesh"] = 8;
2520+
2521-
	["Fire"] = 61;
2521+
2522-
	["Flag"] = 38;
2522+
2523-
	["FlagStand"] = 39;
2523+
2524-
	["FloorWire"] = 4;
2524+
2525-
	["Folder"] = 70;
2525+
2526-
	["ForceField"] = 37;
2526+
2527-
	["Frame"] = 48;
2527+
2528-
	["GamePassService"] = 19;
2528+
2529-
	["Glue"] = 34;
2529+
2530-
	["GuiButton"] = 52;
2530+
2531-
	["GuiMain"] = 47;
2531+
2532-
	["GuiService"] = 47;
2532+
2533-
	["Handles"] = 53;
2533+
2534-
	["HapticService"] = 84;
2534+
2535-
	["Hat"] = 45;
2535+
2536-
	["HingeConstraint"] = 89;
2536+
2537-
	["Hint"] = 33;
2537+
2538-
	["HopperBin"] = 22;
2538+
2539-
	["HttpService"] = 76;
2539+
2540-
	["Humanoid"] = 9;
2540+
	local ENTRY_SIZE = GUI_SIZE + ENTRY_PADDING*2
2541-
	["ImageButton"] = 52;
2541+
	local ENTRY_BOUND = ENTRY_SIZE + ENTRY_MARGIN
2542-
	["ImageLabel"] = 49;
2542+
	local HEADER_SIZE = ENTRY_SIZE*2
2543-
	["InsertService"] = 72;
2543+
2544-
	["IntConstrainedValue"] = 4;
2544+
	local FONT = 'SourceSans'
2545-
	["IntValue"] = 4;
2545+
	local FONT_SIZE do
2546-
	["JointInstance"] = 34;
2546+
		local size = {8,9,10,11,12,14,18,24,36,48}
2547-
	["JointsService"] = 34;
2547+
		local s
2548-
	["Keyframe"] = 60;
2548+
		local n = math.huge
2549-
	["KeyframeSequence"] = 60;
2549+
		for i = 1,#size do
2550-
	["KeyframeSequenceProvider"] = 60;
2550+
			if size[i] <= GUI_SIZE then
2551-
	["Lighting"] = 13;
2551+
				FONT_SIZE = i - 1
2552-
	["LineHandleAdornment"] = 54;
2552+
2553-
	["LocalScript"] = 18;
2553+
2554-
	["LogService"] = 87;
2554+
2555-
	["MarketplaceService"] = 46;
2555+
2556-
	["Message"] = 33;
2556+
	local GuiColor = {
2557-
	["Model"] = 2;
2557+
		Background      = Color3.new(233/255, 233/255, 233/255);
2558-
	["ModuleScript"] = 71;
2558+
		Border          = Color3.new(149/255, 149/255, 149/255);
2559-
	["Motor"] = 34;
2559+
		Selected        = Color3.new( 96/255, 140/255, 211/255);
2560-
	["Motor6D"] = 34;
2560+
		BorderSelected  = Color3.new( 86/255, 125/255, 188/255);
2561-
	["MoveToConstraint"] = 89;
2561+
		Text            = Color3.new(  0/255,   0/255,   0/255);
2562-
	["NegateOperation"] = 78;
2562+
		TextDisabled    = Color3.new(128/255, 128/255, 128/255);
2563-
	["NetworkClient"] = 16;
2563+
		TextSelected    = Color3.new(255/255, 255/255, 255/255);
2564-
	["NetworkReplicator"] = 29;
2564+
		Button          = Color3.new(221/255, 221/255, 221/255);
2565-
	["NetworkServer"] = 15;
2565+
		ButtonBorder    = Color3.new(149/255, 149/255, 149/255);
2566-
	["NumberValue"] = 4;
2566+
		ButtonSelected  = Color3.new(255/255,   0/255,   0/255);
2567-
	["ObjectValue"] = 4;
2567+
		Field           = Color3.new(255/255, 255/255, 255/255);
2568-
	["Pants"] = 44;
2568+
		FieldBorder     = Color3.new(191/255, 191/255, 191/255);
2569-
	["ParallelRampPart"] = 1;
2569+
		TitleBackground = Color3.new(178/255, 178/255, 178/255);
2570-
	["Part"] = 1;
2570+
2571-
	["ParticleEmitter"] = 69;
2571+
2572-
	["PartPairLasso"] = 57;
2572+
	----------------------------------------------------------------
2573-
	["PathfindingService"] = 37;
2573+
	----------------------------------------------------------------
2574-
	["Platform"] = 35;
2574+
	----------------------------------------------------------------
2575-
	["Player"] = 12;
2575+
	----------------------------------------------------------------
2576-
	["PlayerGui"] = 46;
2576+
	---- Icon map constants
2577-
	["Players"] = 21;
2577+
2578-
	["PlayerScripts"] = 82;
2578+
	local MAP_ID = 483448923
2579-
	["PointLight"] = 13;
2579+
2580-
	["PointsService"] = 83;
2580+
	-- Indices based on implementation of Icon function.
2581-
	["Pose"] = 60;
2581+
	local ACTION_CUT         	 = 160
2582-
	["PrismaticConstraint"] = 89;
2582+
	local ACTION_COPY        	 = 161
2583-
	["PrismPart"] = 1;
2583+
	local ACTION_PASTE       	 = 162
2584-
	["PyramidPart"] = 1;
2584+
	local ACTION_DELETE      	 = 163
2585-
	["RayValue"] = 4;
2585+
	local ACTION_SORT        	 = 164
2586-
	["ReflectionMetadata"] = 86;
2586+
	local ACTION_CUT_OVER    	 = 174
2587-
	["ReflectionMetadataCallbacks"] = 86;
2587+
	local ACTION_COPY_OVER   	 = 175
2588-
	["ReflectionMetadataClass"] = 86;
2588+
	local ACTION_PASTE_OVER  	 = 176
2589-
	["ReflectionMetadataClasses"] = 86;
2589+
	local ACTION_DELETE_OVER	 = 177
2590-
	["ReflectionMetadataEnum"] = 86;
2590+
	local ACTION_SORT_OVER  	 = 178
2591-
	["ReflectionMetadataEnumItem"] = 86;
2591+
	local ACTION_EDITQUICKACCESS = 190
2592-
	["ReflectionMetadataEnums"] = 86;
2592+
	local ACTION_FREEZE 		 = 188
2593-
	["ReflectionMetadataEvents"] = 86;
2593+
	local ACTION_STARRED 		 = 189
2594-
	["ReflectionMetadataFunctions"] = 86;
2594+
	local ACTION_ADDSTAR 		 = 184
2595-
	["ReflectionMetadataMember"] = 86;
2595+
	local ACTION_ADDSTAR_OVER 	 = 187
2596-
	["ReflectionMetadataProperties"] = 86;
2596+
2597-
	["ReflectionMetadataYieldFunctions"] = 86;
2597+
	local NODE_COLLAPSED      = 165
2598-
	["RemoteEvent"] = 80;
2598+
	local NODE_EXPANDED       = 166
2599-
	["RemoteFunction"] = 79;
2599+
	local NODE_COLLAPSED_OVER = 179
2600-
	["ReplicatedFirst"] = 72;
2600+
	local NODE_EXPANDED_OVER  = 180
2601-
	["ReplicatedStorage"] = 72;
2601+
2602-
	["RightAngleRampPart"] = 1;
2602+
	local ExplorerIndex = {
2603-
	["RocketPropulsion"] = 14;
2603+
		["Accessory"] = 32;
2604-
	["RodConstraint"] = 89;
2604+
		["Accoutrement"] = 32;
2605-
	["RopeConstraint"] = 89;
2605+
		["AdService"] = 73;
2606-
	["Rotate"] = 34;
2606+
		["Animation"] = 60;
2607-
	["RotateP"] = 34;
2607+
		["AnimationController"] = 60;
2608-
	["RotateV"] = 34;
2608+
		["AnimationTrack"] = 60;
2609-
	["RunService"] = 66;
2609+
		["Animator"] = 60;
2610-
	["ScreenGui"] = 47;
2610+
		["ArcHandles"] = 56;
2611-
	["Script"] = 6;
2611+
		["AssetService"] = 72;
2612-
	["ScrollingFrame"] = 48;
2612+
		["Attachment"] = 34;
2613-
	["Seat"] = 35;
2613+
		["Backpack"] = 20;
2614-
	["Selection"] = 55;
2614+
		["BadgeService"] = 75;
2615-
	["SelectionBox"] = 54;
2615+
		["BallSocketConstraint"] = 89;
2616-
	["SelectionPartLasso"] = 57;
2616+
		["BillboardGui"] = 64;
2617-
	["SelectionPointLasso"] = 57;
2617+
		["BinaryStringValue"] = 4;
2618-
	["SelectionSphere"] = 54;
2618+
		["BindableEvent"] = 67;
2619-
	["ServerScriptService"] = 0;
2619+
		["BindableFunction"] = 66;
2620-
	["ServerStorage"] = 74;
2620+
		["BlockMesh"] = 8;
2621-
	["Shirt"] = 43;
2621+
		["BloomEffect"] = 90;
2622-
	["ShirtGraphic"] = 40;
2622+
		["BlurEffect"] = 90;
2623-
	["SkateboardPlatform"] = 35;
2623+
		["BodyAngularVelocity"] = 14;
2624-
	["Sky"] = 28;
2624+
		["BodyForce"] = 14;
2625-
	["SlidingBallConstraint"] = 89;
2625+
		["BodyGyro"] = 14;
2626-
	["Smoke"] = 59;
2626+
		["BodyPosition"] = 14;
2627-
	["Snap"] = 34;
2627+
		["BodyThrust"] = 14;
2628-
	["Sound"] = 11;
2628+
		["BodyVelocity"] = 14;
2629-
	["SoundService"] = 31;
2629+
		["BoolValue"] = 4;
2630-
	["Sparkles"] = 42;
2630+
		["BoxHandleAdornment"] = 54;
2631-
	["SpawnLocation"] = 25;
2631+
		["BrickColorValue"] = 4;
2632-
	["SpecialMesh"] = 8;
2632+
		["Camera"] = 5;
2633-
	["SphereHandleAdornment"] = 54;
2633+
		["CFrameValue"] = 4;
2634-
	["SpotLight"] = 13;
2634+
		["CharacterMesh"] = 60;
2635-
	["SpringConstraint"] = 89;
2635+
		["Chat"] = 33;
2636-
	["StarterCharacterScripts"] = 82;
2636+
		["ClickDetector"] = 41;
2637-
	["StarterGear"] = 20;
2637+
		["CollectionService"] = 30;
2638-
	["StarterGui"] = 46;
2638+
		["Color3Value"] = 4;
2639-
	["StarterPack"] = 20;
2639+
		["ColorCorrectionEffect"] = 90;
2640-
	["StarterPlayer"] = 88;
2640+
		["ConeHandleAdornment"] = 54;
2641-
	["StarterPlayerScripts"] = 82;
2641+
		["Configuration"] = 58;
2642-
	["Status"] = 2;
2642+
		["ContentProvider"] = 72;
2643-
	["StringValue"] = 4;
2643+
		["ContextActionService"] = 41;
2644-
	["SunRaysEffect"] = 90;
2644+
		["CoreGui"] = 46;
2645-
	["SurfaceGui"] = 64;
2645+
		["CoreScript"] = 18;
2646-
	["SurfaceLight"] = 13;
2646+
		["CornerWedgePart"] = 1;
2647-
	["SurfaceSelection"] = 55;
2647+
		["CustomEvent"] = 4;
2648-
	["Team"] = 24;
2648+
		["CustomEventReceiver"] = 4;
2649-
	["Teams"] = 23;
2649+
		["CylinderHandleAdornment"] = 54;
2650-
	["TeleportService"] = 81;
2650+
		["CylinderMesh"] = 8;
2651-
	["Terrain"] = 65;
2651+
		["CylindricalConstraint"] = 89;
2652-
	["TerrainRegion"] = 65;
2652+
		["Debris"] = 30;
2653-
	["TestService"] = 68;
2653+
		["Decal"] = 7;
2654-
	["TextBox"] = 51;
2654+
		["Dialog"] = 62;
2655-
	["TextButton"] = 51;
2655+
		["DialogChoice"] = 63;
2656-
	["TextLabel"] = 50;
2656+
		["DoubleConstrainedValue"] = 4;
2657-
	["Texture"] = 10;
2657+
		["Explosion"] = 36;
2658-
	["TextureTrail"] = 4;
2658+
		["FileMesh"] = 8;
2659-
	["Tool"] = 17;
2659+
		["Fire"] = 61;
2660-
	["TouchTransmitter"] = 37;
2660+
		["Flag"] = 38;
2661-
	["TrussPart"] = 1;
2661+
		["FlagStand"] = 39;
2662-
	["UnionOperation"] = 77;
2662+
		["FloorWire"] = 4;
2663-
	["UserInputService"] = 84;
2663+
		["Folder"] = 70;
2664-
	["Vector3Value"] = 4;
2664+
		["ForceField"] = 37;
2665-
	["VehicleSeat"] = 35;
2665+
		["Frame"] = 48;
2666-
	["VelocityMotor"] = 34;
2666+
		["GamePassService"] = 19;
2667-
	["WedgePart"] = 1;
2667+
		["Glue"] = 34;
2668-
	["Weld"] = 34;
2668+
		["GuiButton"] = 52;
2669-
	["Workspace"] = 19;
2669+
		["GuiMain"] = 47;
2670-
}
2670+
		["GuiService"] = 47;
2671
		["Handles"] = 53;
2672-
----------------------------------------------------------------
2672+
		["HapticService"] = 84;
2673-
----------------------------------------------------------------
2673+
		["Hat"] = 45;
2674-
----------------------------------------------------------------
2674+
		["HingeConstraint"] = 89;
2675-
----------------------------------------------------------------
2675+
		["Hint"] = 33;
2676-
----------------------------------------------------------------
2676+
		["HopperBin"] = 22;
2677
		["HttpService"] = 76;
2678-
function Create(ty,data)
2678+
		["Humanoid"] = 9;
2679-
	local obj
2679+
		["ImageButton"] = 52;
2680-
	if type(ty) == 'string' then
2680+
		["ImageLabel"] = 49;
2681-
		obj = Instance.new(ty)
2681+
		["InsertService"] = 72;
2682
		["IntConstrainedValue"] = 4;
2683-
		obj = ty
2683+
		["IntValue"] = 4;
2684
		["JointInstance"] = 34;
2685-
	for k, v in pairs(data) do
2685+
		["JointsService"] = 34;
2686-
		if type(k) == 'number' then
2686+
		["Keyframe"] = 60;
2687-
			v.Parent = obj
2687+
		["KeyframeSequence"] = 60;
2688
		["KeyframeSequenceProvider"] = 60;
2689-
			obj[k] = v
2689+
		["Lighting"] = 13;
2690
		["LineHandleAdornment"] = 54;
2691
		["LocalScript"] = 18;
2692-
	return obj
2692+
		["LogService"] = 87;
2693
		["MarketplaceService"] = 46;
2694
		["Message"] = 33;
2695-
local barActive = false
2695+
		["Model"] = 2;
2696-
local activeOptions = {}
2696+
		["ModuleScript"] = 71;
2697
		["Motor"] = 34;
2698-
function createDDown(dBut, callback,...)
2698+
		["Motor6D"] = 34;
2699-
	if barActive then
2699+
		["MoveToConstraint"] = 89;
2700-
		for i,v in pairs(activeOptions) do
2700+
		["NegateOperation"] = 78;
2701-
			v:Destroy()
2701+
		["NetworkClient"] = 16;
2702
		["NetworkReplicator"] = 29;
2703-
		activeOptions = {}
2703+
		["NetworkServer"] = 15;
2704-
		barActive = false
2704+
		["NumberValue"] = 4;
2705-
		return
2705+
		["ObjectValue"] = 4;
2706
		["Pants"] = 44;
2707-
		barActive = true
2707+
		["ParallelRampPart"] = 1;
2708
		["Part"] = 1;
2709-
	local slots = {...}
2709+
		["ParticleEmitter"] = 69;
2710-
	local base = dBut
2710+
		["PartPairLasso"] = 57;
2711-
	for i,v in pairs(slots) do
2711+
		["PathfindingService"] = 37;
2712-
		local newOption = base:Clone()
2712+
		["Platform"] = 35;
2713-
		newOption.ZIndex = 5
2713+
		["Player"] = 12;
2714-
		newOption.Name = "Option "..tostring(i)
2714+
		["PlayerGui"] = 46;
2715-
		newOption.Parent = base.Parent.Parent.Parent
2715+
		["Players"] = 21;
2716-
		newOption.BackgroundTransparency = 0
2716+
		["PlayerScripts"] = 82;
2717-
		newOption.ZIndex = 2
2717+
		["PointLight"] = 13;
2718-
		table.insert(activeOptions,newOption)
2718+
		["PointsService"] = 83;
2719-
		newOption.Position = UDim2.new(-0.4, dBut.Position.X.Offset, dBut.Position.Y.Scale, dBut.Position.Y.Offset + (#activeOptions * dBut.Size.Y.Offset))
2719+
		["Pose"] = 60;
2720-
		newOption.Text = slots[i]
2720+
		["PrismaticConstraint"] = 89;
2721-
		newOption.MouseButton1Down:connect(function()
2721+
		["PrismPart"] = 1;
2722-
			dBut.Text = slots[i]
2722+
		["PyramidPart"] = 1;
2723-
			callback(slots[i])
2723+
		["RayValue"] = 4;
2724
		["ReflectionMetadata"] = 86;
2725
		["ReflectionMetadataCallbacks"] = 86;
2726
		["ReflectionMetadataClass"] = 86;
2727
		["ReflectionMetadataClasses"] = 86;
2728
		["ReflectionMetadataEnum"] = 86;
2729
		["ReflectionMetadataEnumItem"] = 86;
2730
		["ReflectionMetadataEnums"] = 86;
2731
		["ReflectionMetadataEvents"] = 86;
2732
		["ReflectionMetadataFunctions"] = 86;
2733-
-- Connects a function to an event such that it fires asynchronously
2733+
		["ReflectionMetadataMember"] = 86;
2734-
function Connect(event,func)
2734+
		["ReflectionMetadataProperties"] = 86;
2735-
	return event:connect(function(...)
2735+
		["ReflectionMetadataYieldFunctions"] = 86;
2736-
		local a = {...}
2736+
		["RemoteEvent"] = 80;
2737-
		spawn(function() func(unpack(a)) end)
2737+
		["RemoteFunction"] = 79;
2738
		["ReplicatedFirst"] = 72;
2739
		["ReplicatedStorage"] = 72;
2740
		["RightAngleRampPart"] = 1;
2741-
-- returns the ascendant ScreenGui of an object
2741+
		["RocketPropulsion"] = 14;
2742-
function GetScreen(screen)
2742+
		["RodConstraint"] = 89;
2743-
	if screen == nil then return nil end
2743+
		["RopeConstraint"] = 89;
2744-
	while not screen:IsA("ScreenGui") do
2744+
		["Rotate"] = 34;
2745-
		screen = screen.Parent
2745+
		["RotateP"] = 34;
2746
		["RotateV"] = 34;
2747
		["RunService"] = 66;
2748-
	return screen
2748+
		["ScreenGui"] = 47;
2749
		["Script"] = 6;
2750
		["ScrollingFrame"] = 48;
2751
		["Seat"] = 35;
2752-
	local ZIndexLock = {}
2752+
		["Selection"] = 55;
2753-
	-- Sets the ZIndex of an object and its descendants. Objects are locked so
2753+
		["SelectionBox"] = 54;
2754-
	-- that SetZIndexOnChanged doesn't spawn multiple threads that set the
2754+
		["SelectionPartLasso"] = 57;
2755-
	-- ZIndex of the same object.
2755+
		["SelectionPointLasso"] = 57;
2756-
	function SetZIndex(object,z)
2756+
		["SelectionSphere"] = 54;
2757-
		if not ZIndexLock[object] then
2757+
		["ServerScriptService"] = 0;
2758-
			ZIndexLock[object] = true
2758+
		["ServerStorage"] = 74;
2759-
			if object:IsA'GuiObject' then
2759+
		["Shirt"] = 43;
2760-
				object.ZIndex = z
2760+
		["ShirtGraphic"] = 40;
2761
		["SkateboardPlatform"] = 35;
2762-
			local children = object:GetChildren()
2762+
		["Sky"] = 28;
2763-
			for i = 1,#children do
2763+
		["SlidingBallConstraint"] = 89;
2764-
				SetZIndex(children[i],z)
2764+
		["Smoke"] = 59;
2765
		["Snap"] = 34;
2766-
			ZIndexLock[object] = nil
2766+
		["Sound"] = 11;
2767
		["SoundService"] = 31;
2768
		["Sparkles"] = 42;
2769
		["SpawnLocation"] = 25;
2770
		["SpecialMesh"] = 8;
2771
		["SphereHandleAdornment"] = 54;
2772
		["SpotLight"] = 13;
2773
		["SpringConstraint"] = 89;
2774
		["StarterCharacterScripts"] = 82;
2775
		["StarterGear"] = 20;
2776
		["StarterGui"] = 46;
2777
		["StarterPack"] = 20;
2778
		["StarterPlayer"] = 88;
2779-
---- IconMap ----
2779+
		["StarterPlayerScripts"] = 82;
2780-
-- Image size: 256px x 256px
2780+
		["Status"] = 2;
2781-
-- Icon size: 16px x 16px
2781+
		["StringValue"] = 4;
2782-
-- Padding between each icon: 2px
2782+
		["SunRaysEffect"] = 90;
2783-
-- Padding around image edge: 1px
2783+
		["SurfaceGui"] = 64;
2784-
-- Total icons: 14 x 14 (196)
2784+
		["SurfaceLight"] = 13;
2785-
local Icon do
2785+
		["SurfaceSelection"] = 55;
2786-
	local iconMap = 'http://www.roblox.com/asset/?id=' .. MAP_ID
2786+
		["Team"] = 24;
2787-
	game:GetService('ContentProvider'):Preload(iconMap)
2787+
		["Teams"] = 23;
2788-
	local iconDehash do
2788+
		["TeleportService"] = 81;
2789-
		-- 14 x 14, 0-based input, 0-based output
2789+
		["Terrain"] = 65;
2790-
		local f=math.floor
2790+
		["TerrainRegion"] = 65;
2791-
		function iconDehash(h)
2791+
		["TestService"] = 68;
2792-
			return f(h/14%14),f(h%14)
2792+
		["TextBox"] = 51;
2793
		["TextButton"] = 51;
2794
		["TextLabel"] = 50;
2795
		["Texture"] = 10;
2796-
	function Icon(IconFrame,index)
2796+
		["TextureTrail"] = 4;
2797-
		local row,col = iconDehash(index)
2797+
		["Tool"] = 17;
2798-
		local mapSize = Vector2.new(256,256)
2798+
		["TouchTransmitter"] = 37;
2799-
		local pad,border = 2,1
2799+
		["TrussPart"] = 1;
2800-
		local iconSize = 16
2800+
		["UnionOperation"] = 77;
2801
		["UserInputService"] = 84;
2802-
		local class = 'Frame'
2802+
		["Vector3Value"] = 4;
2803-
		if type(IconFrame) == 'string' then
2803+
		["VehicleSeat"] = 35;
2804-
			class = IconFrame
2804+
		["VelocityMotor"] = 34;
2805-
			IconFrame = nil
2805+
		["WedgePart"] = 1;
2806
		["Weld"] = 34;
2807
		["Workspace"] = 19;
2808-
		if not IconFrame then
2808+
2809-
			IconFrame = Create(class,{
2809+
2810-
				Name = "Icon";
2810+
	----------------------------------------------------------------
2811
	----------------------------------------------------------------
2812-
				ClipsDescendants = true;
2812+
	----------------------------------------------------------------
2813-
				Create('ImageLabel',{
2813+
	----------------------------------------------------------------
2814-
					Name = "IconMap";
2814+
	----------------------------------------------------------------
2815-
					Active = false;
2815+
2816
	function Create(ty,data)
2817-
					Image = iconMap;
2817+
		local obj
2818-
					Size = UDim2.new(mapSize.x/iconSize,0,mapSize.y/iconSize,0);
2818+
		if type(ty) == 'string' then
2819
			obj = Instance.new(ty)
2820
		else
2821
			obj = ty
2822
		end
2823-
		IconFrame.IconMap.Position = UDim2.new(-col - (pad*(col+1) + border)/iconSize,0,-row - (pad*(row+1) + border)/iconSize,0)
2823+
		for k, v in pairs(data) do
2824-
		return IconFrame
2824+
			if type(k) == 'number' then
2825
				v.Parent = obj
2826
			else
2827
				obj[k] = v
2828-
----------------------------------------------------------------
2828+
2829-
----------------------------------------------------------------
2829+
2830-
----------------------------------------------------------------
2830+
		return obj
2831-
----------------------------------------------------------------
2831+
2832-
---- ScrollBar
2832+
2833
	local barActive = false
2834
	local activeOptions = {}
2835-
	local function ResetButtonColor(button)
2835+
2836
	function createDDown(dBut, callback,...)
2837
		if barActive then
2838
			for i,v in pairs(activeOptions) do
2839
				v:Destroy()
2840
			end
2841-
	local function ArrowGraphic(size,dir,scaled,template)
2841+
2842
			barActive = false
2843
			return
2844
		else
2845
			barActive = true
2846
		end
2847
		local slots = {...}
2848
		local base = dBut
2849
		for i,v in pairs(slots) do
2850
			local newOption = base:Clone()
2851
			newOption.ZIndex = 5
2852
			newOption.Name = "Option "..tostring(i)
2853
			newOption.Parent = base.Parent.Parent.Parent
2854
			newOption.BackgroundTransparency = 0
2855
			newOption.ZIndex = 2
2856
			table.insert(activeOptions,newOption)
2857
			newOption.Position = UDim2.new(-0.4, dBut.Position.X.Offset, dBut.Position.Y.Scale, dBut.Position.Y.Offset + (#activeOptions * dBut.Size.Y.Offset))
2858
			newOption.Text = slots[i]
2859
			newOption.MouseButton1Down:connect(function()
2860
				dBut.Text = slots[i]
2861
				callback(slots[i])
2862
				for i,v in pairs(activeOptions) do
2863
					v:Destroy()
2864
				end
2865
				activeOptions = {}
2866
				barActive = false
2867
			end)
2868
		end
2869
	end
2870
2871
	-- Connects a function to an event such that it fires asynchronously
2872
	function Connect(event,func)
2873
		return event:connect(function(...)
2874
			local a = {...}
2875
			spawn(function() func(unpack(a)) end)
2876
		end)
2877
	end
2878
2879
	-- returns the ascendant ScreenGui of an object
2880
	function GetScreen(screen)
2881
		if screen == nil then return nil end
2882
		while not screen:IsA("ScreenGui") do
2883
			screen = screen.Parent
2884
			if screen == nil then return nil end
2885
		end
2886
		return screen
2887
	end
2888
2889
	do
2890
		local ZIndexLock = {}
2891
		-- Sets the ZIndex of an object and its descendants. Objects are locked so
2892
		-- that SetZIndexOnChanged doesn't spawn multiple threads that set the
2893
		-- ZIndex of the same object.
2894
		function SetZIndex(object,z)
2895
			if not ZIndexLock[object] then
2896
				ZIndexLock[object] = true
2897
				if object:IsA'GuiObject' then
2898
					object.ZIndex = z
2899
				end
2900
				local children = object:GetChildren()
2901
				for i = 1,#children do
2902-
			))
2902+
					SetZIndex(children[i],z)
2903
				end
2904
				ZIndexLock[object] = nil
2905
			end
2906
		end
2907
2908
		function SetZIndexOnChanged(object)
2909
			return object.Changed:connect(function(p)
2910
				if p == "ZIndex" then
2911-
	local function GripGraphic(size,dir,spacing,scaled,template)
2911+
					SetZIndex(object,object.ZIndex)
2912
				end
2913
			end)
2914
		end
2915
	end
2916
2917
	---- IconMap ----
2918
	-- Image size: 256px x 256px
2919
	-- Icon size: 16px x 16px
2920
	-- Padding between each icon: 2px
2921
	-- Padding around image edge: 1px
2922
	-- Total icons: 14 x 14 (196)
2923
	local Icon do
2924
		local iconMap = 'http://www.roblox.com/asset/?id=' .. MAP_ID
2925
		game:GetService('ContentProvider'):Preload(iconMap)
2926
		local iconDehash do
2927
			-- 14 x 14, 0-based input, 0-based output
2928
			local f=math.floor
2929
			function iconDehash(h)
2930
				return f(h/14%14),f(h%14)
2931
			end
2932
		end
2933
2934
		function Icon(IconFrame,index)
2935
			local row,col = iconDehash(index)
2936
			local mapSize = Vector2.new(256,256)
2937
			local pad,border = 2,1
2938
			local iconSize = 16
2939
2940
			local class = 'Frame'
2941
			if type(IconFrame) == 'string' then
2942
				class = IconFrame
2943
				IconFrame = nil
2944
			end
2945
2946
			if not IconFrame then
2947
				IconFrame = Create(class,{
2948
					Name = "Icon";
2949
					BackgroundTransparency = 1;
2950
					ClipsDescendants = true;
2951-
	local mt = {
2951+
					Create('ImageLabel',{
2952-
		__index = {
2952+
						Name = "IconMap";
2953-
			GetScrollPercent = function(self)
2953+
						Active = false;
2954-
				return self.ScrollIndex/(self.TotalSpace-self.VisibleSpace)
2954+
						BackgroundTransparency = 1;
2955
						Image = iconMap;
2956-
			CanScrollDown = function(self)
2956+
						Size = UDim2.new(mapSize.x/iconSize,0,mapSize.y/iconSize,0);
2957-
				return self.ScrollIndex + self.VisibleSpace < self.TotalSpace
2957+
					});
2958
				})
2959-
			CanScrollUp = function(self)
2959+
2960-
				return self.ScrollIndex > 0
2960+
2961
			IconFrame.IconMap.Position = UDim2.new(-col - (pad*(col+1) + border)/iconSize,0,-row - (pad*(row+1) + border)/iconSize,0)
2962-
			ScrollDown = function(self)
2962+
			return IconFrame
2963-
				self.ScrollIndex = self.ScrollIndex + self.PageIncrement
2963+
2964-
				self:Update()
2964+
2965
2966-
			ScrollUp = function(self)
2966+
	----------------------------------------------------------------
2967-
				self.ScrollIndex = self.ScrollIndex - self.PageIncrement
2967+
	----------------------------------------------------------------
2968-
				self:Update()
2968+
	----------------------------------------------------------------
2969
	----------------------------------------------------------------
2970-
			ScrollTo = function(self,index)
2970+
	---- ScrollBar
2971-
				self.ScrollIndex = index
2971+
	do
2972-
				self:Update()
2972+
		-- AutoButtonColor doesn't always reset properly
2973
		local function ResetButtonColor(button)
2974-
			SetScrollPercent = function(self,percent)
2974+
			local active = button.Active
2975-
				self.ScrollIndex = math.floor((self.TotalSpace - self.VisibleSpace)*percent + 0.5)
2975+
			button.Active = not active
2976-
				self:Update()
2976+
			button.Active = active
2977
		end
2978-
		};
2978+
2979
		local function ArrowGraphic(size,dir,scaled,template)
2980-
	mt.__index.CanScrollRight = mt.__index.CanScrollDown
2980+
			local Frame = Create('Frame',{
2981-
	mt.__index.CanScrollLeft = mt.__index.CanScrollUp
2981+
				Name = "Arrow Graphic";
2982-
	mt.__index.ScrollLeft = mt.__index.ScrollUp
2982+
2983-
	mt.__index.ScrollRight = mt.__index.ScrollDown
2983+
				Size = UDim2.new(0,size,0,size);
2984
				Transparency = 1;
2985-
	function ScrollBar(horizontal)
2985+
2986-
		-- create row scroll bar
2986+
			if not template then
2987-
		local ScrollFrame = Create('Frame',{
2987+
				template = Instance.new("Frame")
2988-
			Name = "ScrollFrame";
2988+
				template.BorderSizePixel = 0
2989-
			Position = horizontal and UDim2.new(0,0,1,-GUI_SIZE) or UDim2.new(1,-GUI_SIZE,0,0);
2989+
2990-
			Size = horizontal and UDim2.new(1,0,0,GUI_SIZE) or UDim2.new(0,GUI_SIZE,1,0);
2990+
2991
			local transform
2992-
			Create('ImageButton',{
2992+
			if dir == nil or dir == 'Up' then
2993-
				Name = "ScrollDown";
2993+
				function transform(p,s) return p,s end
2994-
				Position = horizontal and UDim2.new(1,-GUI_SIZE,0,0) or UDim2.new(0,0,1,-GUI_SIZE);
2994+
			elseif dir == 'Down' then
2995-
				Size = UDim2.new(0, GUI_SIZE, 0, GUI_SIZE);
2995+
				function transform(p,s) return UDim2.new(0,p.X.Offset,0,size-p.Y.Offset-1),s end
2996-
				BackgroundColor3 = GuiColor.Button;
2996+
			elseif dir == 'Left' then
2997-
				BorderColor3 = GuiColor.Border;
2997+
				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
2998-
				--BorderSizePixel = 0;
2998+
			elseif dir == 'Right' then
2999
				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
3000-
			Create('ImageButton',{
3000+
3001-
				Name = "ScrollUp";
3001+
3002-
				Size = UDim2.new(0, GUI_SIZE, 0, GUI_SIZE);
3002+
			local scale
3003-
				BackgroundColor3 = GuiColor.Button;
3003+
			if scaled then
3004-
				BorderColor3 = GuiColor.Border;
3004+
				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
3005-
				--BorderSizePixel = 0;
3005+
3006
				function scale(p,s) return p,s end
3007-
			Create('ImageButton',{
3007+
3008-
				Name = "ScrollBar";
3008+
3009-
				Size = horizontal and UDim2.new(1,-GUI_SIZE*2,1,0) or UDim2.new(1,0,1,-GUI_SIZE*2);
3009+
			local o = math.floor(size/4)
3010-
				Position = horizontal and UDim2.new(0,GUI_SIZE,0,0) or UDim2.new(0,0,0,GUI_SIZE);
3010+
			if size%2 == 0 then
3011
				local n = size/2-1
3012-
				BackgroundColor3 = Color3.new(0.94902, 0.94902, 0.94902);
3012+
				for i = 0,n do
3013-
				BorderColor3 = GuiColor.Border;
3013+
					local t = template:Clone()
3014-
				--BorderSizePixel = 0;
3014+
					local p,s = scale(transform(
3015
						UDim2.new(0,n-i,0,o+i),
3016-
					Name = "ScrollThumb";
3016+
						UDim2.new(0,(i+1)*2,0,1)
3017
						))
3018
					t.Position = p
3019
					t.Size = s
3020
					t.Parent = Frame
3021
				end
3022
			else
3023
				local n = (size-1)/2
3024
				for i = 0,n do
3025
					local t = template:Clone()
3026-
		local graphicTemplate = Create('Frame',{
3026+
					local p,s = scale(transform(
3027-
			Name="Graphic";
3027+
						UDim2.new(0,n-i,0,o+i),
3028
						UDim2.new(0,i*2+1,0,1)
3029-
			BackgroundColor3 = GuiColor.Border;
3029+
						))
3030
					t.Position = p
3031-
		local graphicSize = GUI_SIZE/2
3031+
					t.Size = s
3032
					t.Parent = Frame
3033-
		local ScrollDownFrame = ScrollFrame.ScrollDown
3033+
3034
			end
3035
			if size%4 > 1 then
3036
				local t = template:Clone()
3037-
		local ScrollUpFrame = ScrollFrame.ScrollUp
3037+
3038
					UDim2.new(0,0,0,size-o-1),
3039
					UDim2.new(0,size,0,1)
3040
					))
3041-
		local ScrollBarFrame = ScrollFrame.ScrollBar
3041+
3042-
		local ScrollThumbFrame = ScrollBarFrame.ScrollThumb
3042+
3043-
		do
3043+
3044-
			local size = GUI_SIZE*3/8
3044+
3045-
			local Decal = GripGraphic(Vector2.new(size,size),horizontal and 'Vertical' or 'Horizontal',2,graphicTemplate)
3045+
			return Frame
3046-
			Decal.Position = UDim2.new(0.5,-size/2,0.5,-size/2)
3046+
3047-
			Decal.Parent = ScrollThumbFrame
3047+
3048
3049
		local function GripGraphic(size,dir,spacing,scaled,template)
3050-
		local Class = setmetatable({
3050+
			local Frame = Create('Frame',{
3051-
			GUI = ScrollFrame;
3051+
				Name = "Grip Graphic";
3052-
			ScrollIndex = 0;
3052+
3053-
			VisibleSpace = 0;
3053+
				Size = UDim2.new(0,size.x,0,size.y);
3054-
			TotalSpace = 0;
3054+
				Transparency = 1;
3055-
			PageIncrement = 1;
3055+
3056-
		},mt)
3056+
			if not template then
3057
				template = Instance.new("Frame")
3058-
		local UpdateScrollThumb
3058+
				template.BorderSizePixel = 0
3059-
		if horizontal then
3059+
3060-
			function UpdateScrollThumb()
3060+
3061-
				ScrollThumbFrame.Size = UDim2.new(Class.VisibleSpace/Class.TotalSpace,0,0,GUI_SIZE)
3061+
			spacing = spacing or 2
3062-
				if ScrollThumbFrame.AbsoluteSize.x < GUI_SIZE then
3062+
3063-
					ScrollThumbFrame.Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE)
3063+
			local scale
3064
			if scaled then
3065-
				local barSize = ScrollBarFrame.AbsoluteSize.x
3065+
				function scale(p) return UDim2.new(p.X.Offset/size.x,0,p.Y.Offset/size.y,0) end
3066-
				ScrollThumbFrame.Position = UDim2.new(Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.x)/barSize,0,0,0)
3066+
3067
				function scale(p) return p end
3068
			end
3069-
			function UpdateScrollThumb()
3069+
3070-
				ScrollThumbFrame.Size = UDim2.new(0,GUI_SIZE,Class.VisibleSpace/Class.TotalSpace,0)
3070+
			if dir == 'Vertical' then
3071-
				if ScrollThumbFrame.AbsoluteSize.y < GUI_SIZE then
3071+
				for i=0,size.x-1,spacing do
3072-
					ScrollThumbFrame.Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE)
3072+
					local t = template:Clone()
3073
					t.Size = scale(UDim2.new(0,1,0,size.y))
3074-
				local barSize = ScrollBarFrame.AbsoluteSize.y
3074+
					t.Position = scale(UDim2.new(0,i,0,0))
3075-
				ScrollThumbFrame.Position = UDim2.new(0,0,Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.y)/barSize,0)
3075+
					t.Parent = Frame
3076
				end
3077
			elseif dir == nil or dir == 'Horizontal' then
3078
				for i=0,size.y-1,spacing do
3079-
		local lastDown
3079+
					local t = template:Clone()
3080-
		local lastUp
3080+
					t.Size = scale(UDim2.new(0,size.x,0,1))
3081-
		local scrollStyle = {BackgroundColor3=GuiColor.Border,BackgroundTransparency=0}
3081+
					t.Position = scale(UDim2.new(0,0,0,i))
3082-
		local scrollStyle_ds = {BackgroundColor3=GuiColor.Border,BackgroundTransparency=0.7}
3082+
					t.Parent = Frame
3083
				end
3084-
		local function Update()
3084+
3085-
			local t = Class.TotalSpace
3085+
3086-
			local v = Class.VisibleSpace
3086+
			return Frame
3087-
			local s = Class.ScrollIndex
3087+
3088-
			if v <= t then
3088+
3089-
				if s > 0 then
3089+
		local mt = {
3090-
					if s + v > t then
3090+
			__index = {
3091-
						Class.ScrollIndex = t - v
3091+
				GetScrollPercent = function(self)
3092
					return self.ScrollIndex/(self.TotalSpace-self.VisibleSpace)
3093
				end;
3094
				CanScrollDown = function(self)
3095
					return self.ScrollIndex + self.VisibleSpace < self.TotalSpace
3096
				end;
3097-
				Class.ScrollIndex = 0
3097+
				CanScrollUp = function(self)
3098
					return self.ScrollIndex > 0
3099
				end;
3100-
			if Class.UpdateCallback then
3100+
				ScrollDown = function(self)
3101-
				if Class.UpdateCallback(Class) == false then
3101+
					self.ScrollIndex = self.ScrollIndex + self.PageIncrement
3102
					self:Update()
3103
				end;
3104
				ScrollUp = function(self)
3105
					self.ScrollIndex = self.ScrollIndex - self.PageIncrement
3106-
			local down = Class:CanScrollDown()
3106+
					self:Update()
3107-
			local up = Class:CanScrollUp()
3107+
				end;
3108-
			if down ~= lastDown then
3108+
				ScrollTo = function(self,index)
3109-
				lastDown = down
3109+
					self.ScrollIndex = index
3110-
				ScrollDownFrame.Active = down
3110+
					self:Update()
3111-
				ScrollDownFrame.AutoButtonColor = down
3111+
				end;
3112-
				local children = ScrollDownGraphic:GetChildren()
3112+
				SetScrollPercent = function(self,percent)
3113-
				local style = down and scrollStyle or scrollStyle_ds
3113+
					self.ScrollIndex = math.floor((self.TotalSpace - self.VisibleSpace)*percent + 0.5)
3114
					self:Update()
3115-
					Create(children[i],style)
3115+
				end;
3116
			};
3117
		}
3118-
			if up ~= lastUp then
3118+
		mt.__index.CanScrollRight = mt.__index.CanScrollDown
3119-
				lastUp = up
3119+
		mt.__index.CanScrollLeft = mt.__index.CanScrollUp
3120-
				ScrollUpFrame.Active = up
3120+
		mt.__index.ScrollLeft = mt.__index.ScrollUp
3121-
				ScrollUpFrame.AutoButtonColor = up
3121+
		mt.__index.ScrollRight = mt.__index.ScrollDown
3122-
				local children = ScrollUpGraphic:GetChildren()
3122+
3123-
				local style = up and scrollStyle or scrollStyle_ds
3123+
		function ScrollBar(horizontal)
3124
			-- create row scroll bar
3125-
					Create(children[i],style)
3125+
			local ScrollFrame = Create('Frame',{
3126
				Name = "ScrollFrame";
3127
				Position = horizontal and UDim2.new(0,0,1,-GUI_SIZE) or UDim2.new(1,-GUI_SIZE,0,0);
3128-
			ScrollThumbFrame.Visible = down or up
3128+
				Size = horizontal and UDim2.new(1,0,0,GUI_SIZE) or UDim2.new(0,GUI_SIZE,1,0);
3129-
			UpdateScrollThumb()
3129+
3130
				Create('ImageButton',{
3131-
		Class.Update = Update
3131+
					Name = "ScrollDown";
3132
					Position = horizontal and UDim2.new(1,-GUI_SIZE,0,0) or UDim2.new(0,0,1,-GUI_SIZE);
3133-
		SetZIndexOnChanged(ScrollFrame)
3133+
3134
					BackgroundColor3 = GuiColor.Button;
3135-
		local MouseDrag = Create('ImageButton',{
3135+
3136
					--BorderSizePixel = 0;
3137
				});
3138
				Create('ImageButton',{
3139
					Name = "ScrollUp";
3140
					Size = UDim2.new(0, GUI_SIZE, 0, GUI_SIZE);
3141
					BackgroundColor3 = GuiColor.Button;
3142
					BorderColor3 = GuiColor.Border;
3143
					--BorderSizePixel = 0;
3144
				});
3145-
		local scrollEventID = 0
3145+
3146-
		ScrollDownFrame.MouseButton1Down:connect(function()
3146+
					Name = "ScrollBar";
3147-
			scrollEventID = tick()
3147+
					Size = horizontal and UDim2.new(1,-GUI_SIZE*2,1,0) or UDim2.new(1,0,1,-GUI_SIZE*2);
3148-
			local current = scrollEventID
3148+
					Position = horizontal and UDim2.new(0,GUI_SIZE,0,0) or UDim2.new(0,0,0,GUI_SIZE);
3149-
			local up_con
3149+
3150-
			up_con = MouseDrag.MouseButton1Up:connect(function()
3150+
					BackgroundColor3 = Color3.new(0.94902, 0.94902, 0.94902);
3151
					BorderColor3 = GuiColor.Border;
3152-
				MouseDrag.Parent = nil
3152+
3153-
				ResetButtonColor(ScrollDownFrame)
3153+
					Create('ImageButton',{
3154-
				up_con:disconnect(); drag = nil
3154+
						Name = "ScrollThumb";
3155
						AutoButtonColor = false;
3156-
			MouseDrag.Parent = GetScreen(ScrollFrame)
3156+
						Size = UDim2.new(0, GUI_SIZE, 0, GUI_SIZE);
3157-
			Class:ScrollDown()
3157+
						BackgroundColor3 = GuiColor.Button;
3158-
			wait(0.2) -- delay before auto scroll
3158+
						BorderColor3 = GuiColor.Border;
3159-
			while scrollEventID == current do
3159+
						--BorderSizePixel = 0;
3160
					});
3161-
				if not Class:CanScrollDown() then break end
3161+
3162-
				wait()
3162+
3163
3164
			local graphicTemplate = Create('Frame',{
3165
				Name="Graphic";
3166-
		ScrollDownFrame.MouseButton1Up:connect(function()
3166+
3167-
			scrollEventID = tick()
3167+
				BackgroundColor3 = GuiColor.Border;
3168
			})
3169
			local graphicSize = GUI_SIZE/2
3170-
		ScrollUpFrame.MouseButton1Down:connect(function()
3170+
3171-
			scrollEventID = tick()
3171+
			local ScrollDownFrame = ScrollFrame.ScrollDown
3172-
			local current = scrollEventID
3172+
3173-
			local up_con
3173+
3174-
			up_con = MouseDrag.MouseButton1Up:connect(function()
3174+
3175
			local ScrollUpFrame = ScrollFrame.ScrollUp
3176-
				MouseDrag.Parent = nil
3176+
3177-
				ResetButtonColor(ScrollUpFrame)
3177+
3178-
				up_con:disconnect(); drag = nil
3178+
3179
			local ScrollBarFrame = ScrollFrame.ScrollBar
3180-
			MouseDrag.Parent = GetScreen(ScrollFrame)
3180+
			local ScrollThumbFrame = ScrollBarFrame.ScrollThumb
3181-
			Class:ScrollUp()
3181+
			do
3182-
			wait(0.2)
3182+
				local size = GUI_SIZE*3/8
3183-
			while scrollEventID == current do
3183+
				local Decal = GripGraphic(Vector2.new(size,size),horizontal and 'Vertical' or 'Horizontal',2,graphicTemplate)
3184
				Decal.Position = UDim2.new(0.5,-size/2,0.5,-size/2)
3185-
				if not Class:CanScrollUp() then break end
3185+
				Decal.Parent = ScrollThumbFrame
3186-
				wait()
3186+
3187
3188
			local Class = setmetatable({
3189
				GUI = ScrollFrame;
3190-
		ScrollUpFrame.MouseButton1Up:connect(function()
3190+
				ScrollIndex = 0;
3191-
			scrollEventID = tick()
3191+
				VisibleSpace = 0;
3192
				TotalSpace = 0;
3193
				PageIncrement = 1;
3194-
		if horizontal then
3194+
			},mt)
3195-
			ScrollBarFrame.MouseButton1Down:connect(function(x,y)
3195+
3196
			local UpdateScrollThumb
3197
			if horizontal then
3198
				function UpdateScrollThumb()
3199
					ScrollThumbFrame.Size = UDim2.new(Class.VisibleSpace/Class.TotalSpace,0,0,GUI_SIZE)
3200
					if ScrollThumbFrame.AbsoluteSize.x < GUI_SIZE then
3201
						ScrollThumbFrame.Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE)
3202
					end
3203
					local barSize = ScrollBarFrame.AbsoluteSize.x
3204
					ScrollThumbFrame.Position = UDim2.new(Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.x)/barSize,0,0,0)
3205
				end
3206-
				if x > ScrollThumbFrame.AbsolutePosition.x then
3206+
3207-
					Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
3207+
				function UpdateScrollThumb()
3208-
					wait(0.2)
3208+
					ScrollThumbFrame.Size = UDim2.new(0,GUI_SIZE,Class.VisibleSpace/Class.TotalSpace,0)
3209-
					while scrollEventID == current do
3209+
					if ScrollThumbFrame.AbsoluteSize.y < GUI_SIZE then
3210-
						if x < ScrollThumbFrame.AbsolutePosition.x + ScrollThumbFrame.AbsoluteSize.x then break end
3210+
						ScrollThumbFrame.Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE)
3211
					end
3212-
						wait()
3212+
					local barSize = ScrollBarFrame.AbsoluteSize.y
3213
					ScrollThumbFrame.Position = UDim2.new(0,0,Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.y)/barSize,0)
3214
				end
3215-
					Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
3215+
3216-
					wait(0.2)
3216+
3217-
					while scrollEventID == current do
3217+
			local lastDown
3218-
						if x > ScrollThumbFrame.AbsolutePosition.x then break end
3218+
			local lastUp
3219
			local scrollStyle = {BackgroundColor3=GuiColor.Border,BackgroundTransparency=0}
3220-
						wait()
3220+
			local scrollStyle_ds = {BackgroundColor3=GuiColor.Border,BackgroundTransparency=0.7}
3221
3222
			local function Update()
3223
				local t = Class.TotalSpace
3224
				local v = Class.VisibleSpace
3225-
			ScrollBarFrame.MouseButton1Down:connect(function(x,y)
3225+
				local s = Class.ScrollIndex
3226
				if v <= t then
3227
					if s > 0 then
3228
						if s + v > t then
3229
							Class.ScrollIndex = t - v
3230
						end
3231
					else
3232
						Class.ScrollIndex = 0
3233
					end
3234
				else
3235
					Class.ScrollIndex = 0
3236-
				if y > ScrollThumbFrame.AbsolutePosition.y then
3236+
3237-
					Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
3237+
3238-
					wait(0.2)
3238+
				if Class.UpdateCallback then
3239-
					while scrollEventID == current do
3239+
					if Class.UpdateCallback(Class) == false then
3240-
						if y < ScrollThumbFrame.AbsolutePosition.y + ScrollThumbFrame.AbsoluteSize.y then break end
3240+
						return
3241
					end
3242-
						wait()
3242+
3243
3244
				local down = Class:CanScrollDown()
3245-
					Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
3245+
				local up = Class:CanScrollUp()
3246-
					wait(0.2)
3246+
				if down ~= lastDown then
3247-
					while scrollEventID == current do
3247+
					lastDown = down
3248-
						if y > ScrollThumbFrame.AbsolutePosition.y then break end
3248+
					ScrollDownFrame.Active = down
3249
					ScrollDownFrame.AutoButtonColor = down
3250-
						wait()
3250+
					local children = ScrollDownGraphic:GetChildren()
3251
					local style = down and scrollStyle or scrollStyle_ds
3252
					for i = 1,#children do
3253
						Create(children[i],style)
3254
					end
3255
				end
3256-
		if horizontal then
3256+
				if up ~= lastUp then
3257-
			ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
3257+
					lastUp = up
3258
					ScrollUpFrame.Active = up
3259-
				local mouse_offset = x - ScrollThumbFrame.AbsolutePosition.x
3259+
					ScrollUpFrame.AutoButtonColor = up
3260-
				local drag_con
3260+
					local children = ScrollUpGraphic:GetChildren()
3261
					local style = up and scrollStyle or scrollStyle_ds
3262-
				drag_con = MouseDrag.MouseMoved:connect(function(x,y)
3262+
					for i = 1,#children do
3263-
					local bar_abs_pos = ScrollBarFrame.AbsolutePosition.x
3263+
						Create(children[i],style)
3264-
					local bar_drag = ScrollBarFrame.AbsoluteSize.x - ScrollThumbFrame.AbsoluteSize.x
3264+
3265-
					local bar_abs_one = bar_abs_pos + bar_drag
3265+
3266-
					x = x - mouse_offset
3266+
				ScrollThumbFrame.Visible = down or up
3267-
					x = x < bar_abs_pos and bar_abs_pos or x > bar_abs_one and bar_abs_one or x
3267+
				UpdateScrollThumb()
3268-
					x = x - bar_abs_pos
3268+
3269-
					Class:SetScrollPercent(x/(bar_drag))
3269+
			Class.Update = Update
3270
3271
			SetZIndexOnChanged(ScrollFrame)
3272
3273
			local MouseDrag = Create('ImageButton',{
3274-
					ResetButtonColor(ScrollThumbFrame)
3274+
				Name = "MouseDrag";
3275-
					drag_con:disconnect(); drag_con = nil
3275+
				Position = UDim2.new(-0.25,0,-0.25,0);
3276
				Size = UDim2.new(1.5,0,1.5,0);
3277
				Transparency = 1;
3278
				AutoButtonColor = false;
3279
				Active = true;
3280
				ZIndex = 10;
3281-
			ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
3281+
3282
3283-
				local mouse_offset = y - ScrollThumbFrame.AbsolutePosition.y
3283+
			local scrollEventID = 0
3284-
				local drag_con
3284+
			ScrollDownFrame.MouseButton1Down:connect(function()
3285
				scrollEventID = tick()
3286-
				drag_con = MouseDrag.MouseMoved:connect(function(x,y)
3286+
3287-
					local bar_abs_pos = ScrollBarFrame.AbsolutePosition.y
3287+
3288-
					local bar_drag = ScrollBarFrame.AbsoluteSize.y - ScrollThumbFrame.AbsoluteSize.y
3288+
3289-
					local bar_abs_one = bar_abs_pos + bar_drag
3289+
3290-
					y = y - mouse_offset
3290+
3291-
					y = y < bar_abs_pos and bar_abs_pos or y > bar_abs_one and bar_abs_one or y
3291+
					ResetButtonColor(ScrollDownFrame)
3292-
					y = y - bar_abs_pos
3292+
3293-
					Class:SetScrollPercent(y/(bar_drag))
3293+
3294
				MouseDrag.Parent = GetScreen(ScrollFrame)
3295
				Class:ScrollDown()
3296
				wait(0.2) -- delay before auto scroll
3297
				while scrollEventID == current do
3298-
					ResetButtonColor(ScrollThumbFrame)
3298+
					Class:ScrollDown()
3299-
					drag_con:disconnect(); drag_con = nil
3299+
					if not Class:CanScrollDown() then break end
3300
					wait()
3301
				end
3302
			end)
3303
3304
			ScrollDownFrame.MouseButton1Up:connect(function()
3305
				scrollEventID = tick()
3306-
		function Class:Destroy()
3306+
3307-
			ScrollFrame:Destroy()
3307+
3308-
			MouseDrag:Destroy()
3308+
			ScrollUpFrame.MouseButton1Down:connect(function()
3309-
			for k in pairs(Class) do
3309+
3310-
				Class[k] = nil
3310+
3311
				local up_con
3312-
			setmetatable(Class,nil)
3312+
3313
					scrollEventID = tick()
3314
					MouseDrag.Parent = nil
3315-
		Update()
3315+
3316
					up_con:disconnect(); drag = nil
3317-
		return Class
3317+
3318
				MouseDrag.Parent = GetScreen(ScrollFrame)
3319
				Class:ScrollUp()
3320
				wait(0.2)
3321-
----------------------------------------------------------------
3321+
				while scrollEventID == current do
3322-
----------------------------------------------------------------
3322+
					Class:ScrollUp()
3323-
----------------------------------------------------------------
3323+
					if not Class:CanScrollUp() then break end
3324-
----------------------------------------------------------------
3324+
					wait()
3325-
---- Explorer panel
3325+
3326
			end)
3327-
Create(explorerPanel,{
3327+
3328-
	BackgroundColor3 = GuiColor.Field;
3328+
			ScrollUpFrame.MouseButton1Up:connect(function()
3329-
	BorderColor3 = GuiColor.Border;
3329+
3330-
	Active = true;
3330+
3331-
})
3331+
3332
			if horizontal then
3333-
local SettingsRemote = explorerPanel.Parent:WaitForChild("SettingsPanel"):WaitForChild("GetSetting")
3333+
				ScrollBarFrame.MouseButton1Down:connect(function(x,y)
3334-
local GetApiRemote = explorerPanel.Parent:WaitForChild("PropertiesFrame"):WaitForChild("GetApi")
3334+
3335-
local GetAwaitRemote = explorerPanel.Parent:WaitForChild("PropertiesFrame"):WaitForChild("GetAwaiting")
3335+
					local current = scrollEventID
3336-
local bindSetAwaiting = explorerPanel.Parent:WaitForChild("PropertiesFrame"):WaitForChild("SetAwaiting")
3336+
					local up_con
3337
					up_con = MouseDrag.MouseButton1Up:connect(function()
3338-
local SaveInstanceWindow = explorerPanel.Parent:WaitForChild("SaveInstance")
3338+
						scrollEventID = tick()
3339-
local ConfirmationWindow = explorerPanel.Parent:WaitForChild("Confirmation")
3339+
						MouseDrag.Parent = nil
3340-
local CautionWindow = explorerPanel.Parent:WaitForChild("Caution")
3340+
						ResetButtonColor(ScrollUpFrame)
3341-
local TableCautionWindow = explorerPanel.Parent:WaitForChild("TableCaution")
3341+
						up_con:disconnect(); drag = nil
3342
					end)
3343-
local RemoteWindow = explorerPanel.Parent:WaitForChild("CallRemote")
3343+
					MouseDrag.Parent = GetScreen(ScrollFrame)
3344
					if x > ScrollThumbFrame.AbsolutePosition.x then
3345-
local ScriptEditor = explorerPanel.Parent:WaitForChild("ScriptEditor")
3345+
3346-
local ScriptEditorEvent = ScriptEditor:WaitForChild("OpenScript")
3346+
						wait(0.2)
3347
						while scrollEventID == current do
3348-
local CurrentSaveInstanceWindow
3348+
							if x < ScrollThumbFrame.AbsolutePosition.x + ScrollThumbFrame.AbsoluteSize.x then break end
3349-
local CurrentRemoteWindow
3349+
							Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
3350
							wait()
3351-
local lastSelectedNode
3351+
3352
					else
3353-
local DexStorage
3353+
3354-
local DexStorageMain
3354+
						wait(0.2)
3355-
local DexStorageEnabled
3355+
						while scrollEventID == current do
3356
							if x > ScrollThumbFrame.AbsolutePosition.x then break end
3357-
if saveinstance then DexStorageEnabled = true end
3357+
							Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
3358
							wait()
3359-
if DexStorageEnabled then
3359+
3360-
	DexStorage = Instance.new("Folder")
3360+
3361-
	DexStorage.Name = "Dex"
3361+
3362-
	DexStorageMain = Instance.new("Folder",DexStorage)
3362+
3363-
	DexStorageMain.Name = "DexStorage"
3363+
				ScrollBarFrame.MouseButton1Down:connect(function(x,y)
3364
					scrollEventID = tick()
3365
					local current = scrollEventID
3366-
local NilStorage
3366+
					local up_con
3367-
local NilStorageMain
3367+
					up_con = MouseDrag.MouseButton1Up:connect(function()
3368-
local NilStorageEnabled
3368+
						scrollEventID = tick()
3369
						MouseDrag.Parent = nil
3370-
if get_nil_instances and IfThisFunctionWasStableEnough then NilStorageEnabled = true end
3370+
						ResetButtonColor(ScrollUpFrame)
3371
						up_con:disconnect(); drag = nil
3372-
if NilStorageEnabled then
3372+
3373-
	NilStorage = Instance.new("Folder")
3373+
					MouseDrag.Parent = GetScreen(ScrollFrame)
3374-
	NilStorage.Name = "Dex Internal Storage"
3374+
					if y > ScrollThumbFrame.AbsolutePosition.y then
3375-
	NilStorageMain = Instance.new("Folder",NilStorage)
3375+
3376-
	NilStorageMain.Name = "Nil Instances"
3376+
						wait(0.2)
3377
						while scrollEventID == current do
3378
							if y < ScrollThumbFrame.AbsolutePosition.y + ScrollThumbFrame.AbsoluteSize.y then break end
3379-
local listFrame = Create('Frame',{
3379+
							Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
3380-
	Name = "List";
3380+
							wait()
3381-
	BackgroundTransparency = 1;
3381+
3382-
	ClipsDescendants = true;
3382+
3383-
	Position = UDim2.new(0,0,0,HEADER_SIZE);
3383+
3384-
	Size = UDim2.new(1,-GUI_SIZE,1,-HEADER_SIZE);
3384+
						wait(0.2)
3385-
	Parent = explorerPanel;
3385+
						while scrollEventID == current do
3386-
})
3386+
							if y > ScrollThumbFrame.AbsolutePosition.y then break end
3387
							Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
3388-
local scrollBar = ScrollBar(false)
3388+
							wait()
3389-
scrollBar.PageIncrement = 1
3389+
3390-
Create(scrollBar.GUI,{
3390+
3391-
	Position = UDim2.new(1,-GUI_SIZE,0,HEADER_SIZE);
3391+
3392-
	Size = UDim2.new(0,GUI_SIZE,1,-HEADER_SIZE);
3392+
3393-
	Parent = explorerPanel;
3393+
3394-
})
3394+
			if horizontal then
3395
				ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
3396-
local scrollBarH = ScrollBar(true)
3396+
3397-
scrollBarH.PageIncrement = GUI_SIZE
3397+
					local mouse_offset = x - ScrollThumbFrame.AbsolutePosition.x
3398-
Create(scrollBarH.GUI,{
3398+
					local drag_con
3399-
	Position = UDim2.new(0,0,1,-GUI_SIZE);
3399+
					local up_con
3400-
	Size = UDim2.new(1,-GUI_SIZE,0,GUI_SIZE);
3400+
					drag_con = MouseDrag.MouseMoved:connect(function(x,y)
3401-
	Visible = false;
3401+
						local bar_abs_pos = ScrollBarFrame.AbsolutePosition.x
3402-
	Parent = explorerPanel;
3402+
						local bar_drag = ScrollBarFrame.AbsoluteSize.x - ScrollThumbFrame.AbsoluteSize.x
3403-
})
3403+
						local bar_abs_one = bar_abs_pos + bar_drag
3404
						x = x - mouse_offset
3405-
local headerFrame = Create('Frame',{
3405+
						x = x < bar_abs_pos and bar_abs_pos or x > bar_abs_one and bar_abs_one or x
3406-
	Name = "Header";
3406+
						x = x - bar_abs_pos
3407-
	BackgroundColor3 = GuiColor.Background;
3407+
						Class:SetScrollPercent(x/(bar_drag))
3408-
	BorderColor3 = GuiColor.Border;
3408+
3409-
	Position = UDim2.new(0,0,0,0);
3409+
					up_con = MouseDrag.MouseButton1Up:connect(function()
3410-
	Size = UDim2.new(1,0,0,HEADER_SIZE);
3410+
						scrollEventID = tick()
3411-
	Parent = explorerPanel;
3411+
						MouseDrag.Parent = nil
3412-
	Create('TextLabel',{
3412+
						ResetButtonColor(ScrollThumbFrame)
3413-
		Text = "Explorer";
3413+
						drag_con:disconnect(); drag_con = nil
3414
						up_con:disconnect(); drag = nil
3415
					end)
3416
					MouseDrag.Parent = GetScreen(ScrollFrame)
3417
				end)
3418
			else
3419-
		Position = UDim2.new(0,4,0,0);
3419+
				ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
3420-
		Size = UDim2.new(1,-4,0.5,0);
3420+
3421
					local mouse_offset = y - ScrollThumbFrame.AbsolutePosition.y
3422-
})
3422+
					local drag_con
3423
					local up_con
3424-
local explorerFilter = 	Create('TextBox',{
3424+
					drag_con = MouseDrag.MouseMoved:connect(function(x,y)
3425-
	Text = "Filter Workspace";
3425+
						local bar_abs_pos = ScrollBarFrame.AbsolutePosition.y
3426-
	BackgroundTransparency = 0.8;
3426+
						local bar_drag = ScrollBarFrame.AbsoluteSize.y - ScrollThumbFrame.AbsoluteSize.y
3427-
	TextColor3 = GuiColor.Text;
3427+
						local bar_abs_one = bar_abs_pos + bar_drag
3428-
	TextXAlignment = 'Left';
3428+
						y = y - mouse_offset
3429-
	Font = FONT;
3429+
						y = y < bar_abs_pos and bar_abs_pos or y > bar_abs_one and bar_abs_one or y
3430-
	FontSize = FONT_SIZE;
3430+
						y = y - bar_abs_pos
3431-
	Position = UDim2.new(0,4,0.5,0);
3431+
						Class:SetScrollPercent(y/(bar_drag))
3432-
	Size = UDim2.new(1,-8,0.5,-2);
3432+
3433-
});
3433+
					up_con = MouseDrag.MouseButton1Up:connect(function()
3434-
explorerFilter.Parent = headerFrame
3434+
						scrollEventID = tick()
3435
						MouseDrag.Parent = nil
3436-
SetZIndexOnChanged(explorerPanel)
3436+
						ResetButtonColor(ScrollThumbFrame)
3437
						drag_con:disconnect(); drag_con = nil
3438-
local function CreateColor3(r, g, b) return Color3.new(r/255,g/255,b/255) end
3438+
						up_con:disconnect(); drag = nil
3439
					end)
3440-
local Styles = {
3440+
					MouseDrag.Parent = GetScreen(ScrollFrame)
3441-
	Font = Enum.Font.Arial;
3441+
3442-
	Margin = 5;
3442+
3443-
	Black = CreateColor3(0,0,0);
3443+
3444-
	White = CreateColor3(255,255,255);
3444+
			function Class:Destroy()
3445-
}
3445+
				ScrollFrame:Destroy()
3446
				MouseDrag:Destroy()
3447-
local DropDown = {
3447+
				for k in pairs(Class) do
3448-
	Font = Styles.Font;
3448+
					Class[k] = nil
3449-
	FontSize = Enum.FontSize.Size14;
3449+
3450-
	TextColor = CreateColor3(0,0,0);
3450+
				setmetatable(Class,nil)
3451-
	TextColorOver = Styles.White;
3451+
3452-
	TextXAlignment = Enum.TextXAlignment.Left;
3452+
3453-
	Height = 20;
3453+
			Update()
3454-
	BackColor = Styles.White;
3454+
3455-
	BackColorOver = CreateColor3(86,125,188);
3455+
			return Class
3456-
	BorderColor = CreateColor3(216,216,216);
3456+
3457-
	BorderSizePixel = 2;
3457+
3458-
	ArrowColor = CreateColor3(160,160,160);
3458+
3459-
	ArrowColorOver = Styles.Black;
3459+
	----------------------------------------------------------------
3460-
}
3460+
	----------------------------------------------------------------
3461
	----------------------------------------------------------------
3462-
local Row = {
3462+
	----------------------------------------------------------------
3463-
	Font = Styles.Font;
3463+
	---- Explorer panel
3464-
	FontSize = Enum.FontSize.Size14;
3464+
3465-
	TextXAlignment = Enum.TextXAlignment.Left;
3465+
	Create(explorerPanel,{
3466-
	TextColor = Styles.Black;
3466+
		BackgroundColor3 = GuiColor.Field;
3467-
	TextColorOver = Styles.White;
3467+
		BorderColor3 = GuiColor.Border;
3468-
	TextLockedColor = CreateColor3(120,120,120);
3468+
3469-
	Height = 24;
3469+
3470-
	BorderColor = CreateColor3(216,216,216);
3470+
3471-
	BackgroundColor = Styles.White;
3471+
	local SettingsRemote = explorerPanel.Parent:WaitForChild("SettingsPanel"):WaitForChild("GetSetting")
3472-
	BackgroundColorAlternate = CreateColor3(246,246,246);
3472+
	local GetApiRemote = explorerPanel.Parent:WaitForChild("PropertiesFrame"):WaitForChild("GetApi")
3473-
	BackgroundColorMouseover = CreateColor3(211,224,244);
3473+
	local GetAwaitRemote = explorerPanel.Parent:WaitForChild("PropertiesFrame"):WaitForChild("GetAwaiting")
3474-
	TitleMarginLeft = 15;
3474+
	local bindSetAwaiting = explorerPanel.Parent:WaitForChild("PropertiesFrame"):WaitForChild("SetAwaiting")
3475-
}
3475+
3476
	local SaveInstanceWindow = explorerPanel.Parent:WaitForChild("SaveInstance")
3477-
local currentRightClickMenu
3477+
	local ConfirmationWindow = explorerPanel.Parent:WaitForChild("Confirmation")
3478-
local CurrentInsertObjectWindow
3478+
	local CautionWindow = explorerPanel.Parent:WaitForChild("Caution")
3479-
local CurrentFunctionCallerWindow
3479+
	local TableCautionWindow = explorerPanel.Parent:WaitForChild("TableCaution")
3480
3481-
local RbxApi
3481+
	local RemoteWindow = explorerPanel.Parent:WaitForChild("CallRemote")
3482
3483-
function ClassCanCreate(IName)
3483+
	local ScriptEditor = explorerPanel.Parent:WaitForChild("ScriptEditor")
3484-
	local success,err = pcall(function() Instance.new(IName) end)
3484+
	local ScriptEditorEvent = ScriptEditor:WaitForChild("OpenScript")
3485
3486
	local CurrentSaveInstanceWindow
3487
	local CurrentRemoteWindow
3488-
		return true
3488+
3489
	local lastSelectedNode
3490
3491
	local DexStorage
3492-
function GetClasses()
3492+
	local DexStorageMain
3493-
	if RbxApi == nil then return {} end
3493+
	local DexStorageEnabled
3494-
	local classTable = {}
3494+
3495-
	for i,v in pairs(RbxApi.Classes) do
3495+
	if saveinstance then DexStorageEnabled = true end
3496-
		if ClassCanCreate(v.Name) then
3496+
3497-
			table.insert(classTable,v.Name)
3497+
3498
		DexStorage = Instance.new("Folder")
3499
		DexStorage.Name = "Dex"
3500-
	return classTable
3500+
		DexStorageMain = Instance.new("Folder",DexStorage)
3501
		DexStorageMain.Name = "DexStorage"
3502
	end
3503-
local function sortAlphabetic(t, property)
3503+
3504-
	table.sort(t, 
3504+
	local NilStorage
3505-
		function(x,y) return x[property] < y[property]
3505+
	local NilStorageMain
3506
	local NilStorageEnabled
3507
3508
	if get_nil_instances and IfThisFunctionWasStableEnough then NilStorageEnabled = true end
3509-
local function FunctionIsHidden(functionData)
3509+
3510-
	local tags = functionData["tags"]
3510+
3511-
	for _,name in pairs(tags) do
3511+
		NilStorage = Instance.new("Folder")
3512-
		if name == "deprecated"
3512+
		NilStorage.Name = "Dex Internal Storage"
3513-
			or name == "hidden"
3513+
		NilStorageMain = Instance.new("Folder",NilStorage)
3514-
			or name == "writeonly" then
3514+
		NilStorageMain.Name = "Nil Instances"
3515
	end
3516
3517
	local listFrame = Create('Frame',{
3518-
	return false
3518+
		Name = "List";
3519
		BackgroundTransparency = 1;
3520
		ClipsDescendants = true;
3521-
local function GetAllFunctions(className)
3521+
		Position = UDim2.new(0,0,0,HEADER_SIZE);
3522-
	local class = RbxApi.Classes[className]
3522+
		Size = UDim2.new(1,-GUI_SIZE,1,-HEADER_SIZE);
3523-
	local functions = {}
3523+
3524
	})
3525-
	if not class then return functions end
3525+
3526
	local scrollBar = ScrollBar(false)
3527-
	while class do
3527+
	scrollBar.PageIncrement = 1
3528-
		if class.Name == "Instance" then break end
3528+
	Create(scrollBar.GUI,{
3529-
		for _,nextFunction in pairs(class.Functions) do
3529+
		Position = UDim2.new(1,-GUI_SIZE,0,HEADER_SIZE);
3530-
			if not FunctionIsHidden(nextFunction) then
3530+
		Size = UDim2.new(0,GUI_SIZE,1,-HEADER_SIZE);
3531-
				table.insert(functions, nextFunction)
3531+
3532
	})
3533
3534-
		class = RbxApi.Classes[class.Superclass]
3534+
	local scrollBarH = ScrollBar(true)
3535
	scrollBarH.PageIncrement = GUI_SIZE
3536
	Create(scrollBarH.GUI,{
3537-
	sortAlphabetic(functions, "Name")
3537+
		Position = UDim2.new(0,0,1,-GUI_SIZE);
3538
		Size = UDim2.new(1,-GUI_SIZE,0,GUI_SIZE);
3539-
	return functions
3539+
3540
		Parent = explorerPanel;
3541
	})
3542-
function GetFunctions()
3542+
3543-
	if RbxApi == nil then return {} end
3543+
	local headerFrame = Create('Frame',{
3544-
	local List = SelectionVar():Get()
3544+
		Name = "Header";
3545
		BackgroundColor3 = GuiColor.Background;
3546-
	if #List == 0 then return end
3546+
		BorderColor3 = GuiColor.Border;
3547
		Position = UDim2.new(0,0,0,0);
3548-
	local MyObject = List[1]
3548+
		Size = UDim2.new(1,0,0,HEADER_SIZE);
3549
		Parent = explorerPanel;
3550-
	local functionTable = {}
3550+
		Create('TextLabel',{
3551-
	for i,v in pairs(GetAllFunctions(MyObject.ClassName)) do
3551+
			Text = "Explorer";
3552-
		table.insert(functionTable,v)
3552+
3553
			TextColor3 = GuiColor.Text;
3554-
	return functionTable
3554+
			TextXAlignment = 'Left';
3555
			Font = FONT;
3556
			FontSize = FONT_SIZE;
3557-
function CreateInsertObjectMenu(choices, currentChoice, readOnly, onClick)
3557+
			Position = UDim2.new(0,4,0,0);
3558
			Size = UDim2.new(1,-4,0.5,0);
3559-
	local totalSize = explorerPanel.Parent.AbsoluteSize.y
3559+
3560-
	if #choices == 0 then return end
3560+
3561
3562-
	table.sort(choices, function(a,b) return a < b end)
3562+
	local explorerFilter = 	Create('TextBox',{
3563
		Text = "Filter Workspace";
3564-
	local frame = Instance.new("Frame")	
3564+
		BackgroundTransparency = 0.8;
3565-
	frame.Name = "InsertObject"
3565+
3566-
	frame.Size = UDim2.new(0, 200, 1, 0)
3566+
3567-
	frame.BackgroundTransparency = 1
3567+
3568-
	frame.Active = true
3568+
3569
		Position = UDim2.new(0,4,0.5,0);
3570-
	local menu = nil
3570+
		Size = UDim2.new(1,-8,0.5,-2);
3571-
	local arrow = nil
3571+
3572-
	local expanded = false
3572+
	explorerFilter.Parent = headerFrame
3573-
	local margin = DropDown.BorderSizePixel;
3573+
3574
	SetZIndexOnChanged(explorerPanel)
3575
3576
	local function CreateColor3(r, g, b) return Color3.new(r/255,g/255,b/255) end
3577
3578
	local Styles = {
3579
		Font = Enum.Font.Arial;
3580
		Margin = 5;
3581
		Black = CreateColor3(0,0,0);
3582
		White = CreateColor3(255,255,255);
3583
	}
3584
3585
	local DropDown = {
3586
		Font = Styles.Font;
3587
		FontSize = Enum.FontSize.Size14;
3588
		TextColor = CreateColor3(0,0,0);
3589
		TextColorOver = Styles.White;
3590
		TextXAlignment = Enum.TextXAlignment.Left;
3591-
	local function hideMenu()
3591+
		Height = 20;
3592-
		expanded = false
3592+
		BackColor = Styles.White;
3593-
		--showArrow(DropDown.ArrowColor)
3593+
		BackColorOver = CreateColor3(86,125,188);
3594-
		if frame then 
3594+
		BorderColor = CreateColor3(216,216,216);
3595-
			--frame:Destroy()
3595+
		BorderSizePixel = 2;
3596
		ArrowColor = CreateColor3(160,160,160);
3597
		ArrowColorOver = Styles.Black;
3598
	}
3599
3600-
	local function showMenu()
3600+
	local Row = {
3601-
		expanded = true
3601+
		Font = Styles.Font;
3602-
		menu = Instance.new("ScrollingFrame")
3602+
		FontSize = Enum.FontSize.Size14;
3603-
		menu.Size = UDim2.new(0,200,1,0)
3603+
		TextXAlignment = Enum.TextXAlignment.Left;
3604-
		menu.CanvasSize = UDim2.new(0, 200, 0, #choices * DropDown.Height)
3604+
		TextColor = Styles.Black;
3605-
		menu.Position = UDim2.new(0, margin, 0, 0)
3605+
		TextColorOver = Styles.White;
3606-
		menu.BackgroundTransparency = 0
3606+
		TextLockedColor = CreateColor3(120,120,120);
3607-
		menu.BackgroundColor3 = DropDown.BackColor
3607+
		Height = 24;
3608-
		menu.BorderColor3 = DropDown.BorderColor
3608+
		BorderColor = CreateColor3(216,216,216);
3609-
		menu.BorderSizePixel = DropDown.BorderSizePixel
3609+
		BackgroundColor = Styles.White;
3610-
		menu.TopImage = "rbxasset://textures/blackBkg_square.png"
3610+
		BackgroundColorAlternate = CreateColor3(246,246,246);
3611-
		menu.MidImage = "rbxasset://textures/blackBkg_square.png"
3611+
		BackgroundColorMouseover = CreateColor3(211,224,244);
3612-
		menu.BottomImage = "rbxasset://textures/blackBkg_square.png"
3612+
		TitleMarginLeft = 15;
3613-
		menu.Active = true
3613+
3614-
		menu.ZIndex = 5
3614+
3615-
		menu.Parent = frame
3615+
	local currentRightClickMenu
3616
	local CurrentInsertObjectWindow
3617-
		--local parentFrameHeight = script.Parent.List.Size.Y.Offset
3617+
	local CurrentFunctionCallerWindow
3618-
		--local rowHeight = mouse.Y
3618+
3619-
		--if (rowHeight + menu.Size.Y.Offset) > parentFrameHeight then
3619+
	local RbxApi
3620-
		--	menu.Position = UDim2.new(0, margin, 0, -1 * (#choices * DropDown.Height) - margin)
3620+
3621-
		--end
3621+
	function ClassCanCreate(IName)
3622-
			
3622+
		local success,err = pcall(function() Instance.new(IName) end)
3623-
		local function choice(name)
3623+
3624-
			onClick(name)
3624+
3625-
			hideMenu()
3625+
3626
			return true
3627
		end
3628-
		for i,name in pairs(choices) do
3628+
3629-
			local option = CreateRightClickMenuItem(name, function()
3629+
3630-
				choice(name)
3630+
	function GetClasses()
3631-
			end,1)
3631+
		if RbxApi == nil then return {} end
3632-
			option.Size = UDim2.new(1, 0, 0, 20)
3632+
		local classTable = {}
3633-
			option.Position = UDim2.new(0, 0, 0, (i - 1) * DropDown.Height)
3633+
		for i,v in pairs(RbxApi.Classes) do
3634-
			option.ZIndex = menu.ZIndex
3634+
			if ClassCanCreate(v.Name) then
3635-
			option.Parent = menu
3635+
				table.insert(classTable,v.Name)
3636
			end
3637
		end
3638
		return classTable
3639
	end
3640-
	showMenu()
3640+
3641
	local function sortAlphabetic(t, property)
3642
		table.sort(t, 
3643-
	return frame
3643+
			function(x,y) return x[property] < y[property]
3644
			end)
3645
	end
3646-
function CreateFunctionCallerMenu(choices, currentChoice, readOnly, onClick)
3646+
3647
	local function FunctionIsHidden(functionData)
3648-
	local totalSize = explorerPanel.Parent.AbsoluteSize.y
3648+
		local tags = functionData["tags"]
3649-
	if #choices == 0 then return end
3649+
		for _,name in pairs(tags) do
3650
			if name == "deprecated"
3651-
	table.sort(choices, function(a,b) return a.Name < b.Name end)
3651+
				or name == "hidden"
3652
				or name == "writeonly" then
3653-
	local frame = Instance.new("Frame")	
3653+
				return true
3654-
	frame.Name = "InsertObject"
3654+
3655-
	frame.Size = UDim2.new(0, 200, 1, 0)
3655+
3656-
	frame.BackgroundTransparency = 1
3656+
3657-
	frame.Active = true
3657+
3658
3659-
	local menu = nil
3659+
	local function GetAllFunctions(className)
3660-
	local arrow = nil
3660+
		local class = RbxApi.Classes[className]
3661-
	local expanded = false
3661+
		local functions = {}
3662-
	local margin = DropDown.BorderSizePixel;
3662+
3663
		if not class then return functions end
3664-
	local function hideMenu()
3664+
3665-
		expanded = false
3665+
		while class do
3666-
		--showArrow(DropDown.ArrowColor)
3666+
			if class.Name == "Instance" then break end
3667-
		if frame then 
3667+
			for _,nextFunction in pairs(class.Functions) do
3668-
			--frame:Destroy()
3668+
				if not FunctionIsHidden(nextFunction) then
3669
					table.insert(functions, nextFunction)
3670
				end
3671
			end
3672
			class = RbxApi.Classes[class.Superclass]
3673-
	local function showMenu()
3673+
3674-
		expanded = true
3674+
3675-
		menu = Instance.new("ScrollingFrame")
3675+
		sortAlphabetic(functions, "Name")
3676-
		menu.Size = UDim2.new(0,300,1,0)
3676+
3677-
		menu.CanvasSize = UDim2.new(0, 300, 0, #choices * DropDown.Height)
3677+
		return functions
3678-
		menu.Position = UDim2.new(0, margin, 0, 0)
3678+
3679-
		menu.BackgroundTransparency = 0
3679+
3680-
		menu.BackgroundColor3 = DropDown.BackColor
3680+
	function GetFunctions()
3681-
		menu.BorderColor3 = DropDown.BorderColor
3681+
		if RbxApi == nil then return {} end
3682-
		menu.BorderSizePixel = DropDown.BorderSizePixel
3682+
		local List = SelectionVar():Get()
3683-
		menu.TopImage = "rbxasset://textures/blackBkg_square.png"
3683+
3684-
		menu.MidImage = "rbxasset://textures/blackBkg_square.png"
3684+
		if #List == 0 then return end
3685-
		menu.BottomImage = "rbxasset://textures/blackBkg_square.png"
3685+
3686-
		menu.Active = true
3686+
		local MyObject = List[1]
3687-
		menu.ZIndex = 5
3687+
3688-
		menu.Parent = frame
3688+
		local functionTable = {}
3689
		for i,v in pairs(GetAllFunctions(MyObject.ClassName)) do
3690-
		--local parentFrameHeight = script.Parent.List.Size.Y.Offset
3690+
			table.insert(functionTable,v)
3691-
		--local rowHeight = mouse.Y
3691+
3692-
		--if (rowHeight + menu.Size.Y.Offset) > parentFrameHeight then
3692+
		return functionTable
3693-
		--	menu.Position = UDim2.new(0, margin, 0, -1 * (#choices * DropDown.Height) - margin)
3693+
3694-
		--end
3694+
3695
	function CreateInsertObjectMenu(choices, currentChoice, readOnly, onClick)
3696-
		local function GetParameters(functionData)
3696+
		local mouse = game:GetService("Players").LocalPlayer:GetMouse()
3697-
			local paraString = ""
3697+
		local totalSize = explorerPanel.Parent.AbsoluteSize.y
3698-
			paraString = paraString.."("
3698+
		if #choices == 0 then return end
3699-
			for i,v in pairs(functionData.Arguments) do
3699+
3700-
				paraString = paraString..v.Type.." "..v.Name
3700+
		table.sort(choices, function(a,b) return a < b end)
3701-
				if i < #functionData.Arguments then
3701+
3702-
					paraString = paraString..", "
3702+
		local frame = Instance.new("Frame")	
3703
		frame.Name = "InsertObject"
3704
		frame.Size = UDim2.new(0, 200, 1, 0)
3705-
			paraString = paraString..")"
3705+
		frame.BackgroundTransparency = 1
3706-
			return paraString
3706+
		frame.Active = true
3707
3708-
			
3708+
		local menu = nil
3709-
		local function choice(name)
3709+
		local arrow = nil
3710-
			onClick(name)
3710+
		local expanded = false
3711-
			hideMenu()
3711+
		local margin = DropDown.BorderSizePixel;
3712
3713
	--[[
3714-
		for i,name in pairs(choices) do
3714+
3715-
			local option = CreateRightClickMenuItem(name.ReturnType.." "..name.Name..GetParameters(name), function()
3715+
3716-
				choice(name)
3716+
3717-
			end,2)
3717+
3718-
			option.Size = UDim2.new(1, 0, 0, 20)
3718+
3719-
			option.Position = UDim2.new(0, 0, 0, (i - 1) * DropDown.Height)
3719+
3720-
			option.ZIndex = menu.ZIndex
3720+
3721-
			option.Parent = menu
3721+
3722
	end
3723
	button.Text = currentChoice
3724
	button.Size = UDim2.new(1, -2 * Styles.Margin, 1, 0)
3725
	button.Position = UDim2.new(0, Styles.Margin, 0, 0)
3726-
	showMenu()
3726+
3727
	--]]
3728
3729-
	return frame
3729+
		local function hideMenu()
3730
			expanded = false
3731
			--showArrow(DropDown.ArrowColor)
3732-
function CreateInsertObject()
3732+
			if frame then 
3733-
	if not CurrentInsertObjectWindow then return end
3733+
				--frame:Destroy()
3734-
	CurrentInsertObjectWindow.Visible = true
3734+
3735-
	if currentRightClickMenu and CurrentInsertObjectWindow.Visible then
3735+
3736-
		CurrentInsertObjectWindow.Position = UDim2.new(0,currentRightClickMenu.Position.X.Offset-currentRightClickMenu.Size.X.Offset-2,0,0)
3736+
3737
3738-
	if CurrentInsertObjectWindow.Visible then
3738+
		local function showMenu()
3739-
		CurrentInsertObjectWindow.Parent = explorerPanel.Parent
3739+
			expanded = true
3740
			menu = Instance.new("ScrollingFrame")
3741
			menu.Size = UDim2.new(0,200,1,0)
3742
			menu.CanvasSize = UDim2.new(0, 200, 0, #choices * DropDown.Height)
3743-
function CreateFunctionCaller(oh)
3743+
			menu.Position = UDim2.new(0, margin, 0, 0)
3744-
	if CurrentFunctionCallerWindow then
3744+
			menu.BackgroundTransparency = 0
3745-
		CurrentFunctionCallerWindow:Destroy()
3745+
			menu.BackgroundColor3 = DropDown.BackColor
3746-
		CurrentFunctionCallerWindow = nil
3746+
			menu.BorderColor3 = DropDown.BorderColor
3747
			menu.BorderSizePixel = DropDown.BorderSizePixel
3748-
	CurrentFunctionCallerWindow = CreateFunctionCallerMenu(
3748+
			menu.TopImage = "rbxasset://textures/blackBkg_square.png"
3749-
		GetFunctions(),
3749+
			menu.MidImage = "rbxasset://textures/blackBkg_square.png"
3750
			menu.BottomImage = "rbxasset://textures/blackBkg_square.png"
3751
			menu.Active = true
3752
			menu.ZIndex = 5
3753
			menu.Parent = frame
3754
3755
			--local parentFrameHeight = script.Parent.List.Size.Y.Offset
3756-
			for i,v in pairs(list) do
3756+
			--local rowHeight = mouse.Y
3757-
				pcall(function() print("Function called.", pcall(function() v[option.Name](v) end)) end)
3757+
			--if (rowHeight + menu.Size.Y.Offset) > parentFrameHeight then
3758
			--	menu.Position = UDim2.new(0, margin, 0, -1 * (#choices * DropDown.Height) - margin)
3759-
			
3759+
			--end
3760
3761
			local function choice(name)
3762
				onClick(name)
3763-
	if currentRightClickMenu and CurrentFunctionCallerWindow then
3763+
3764-
		CurrentFunctionCallerWindow.Position = UDim2.new(0,currentRightClickMenu.Position.X.Offset-currentRightClickMenu.Size.X.Offset*1.5-2,0,0)
3764+
3765
3766-
	if CurrentFunctionCallerWindow then
3766+
			for i,name in pairs(choices) do
3767-
		CurrentFunctionCallerWindow.Parent = explorerPanel.Parent
3767+
				local option = CreateRightClickMenuItem(name, function()
3768
					choice(name)
3769
				end,1)
3770
				option.Size = UDim2.new(1, 0, 0, 20)
3771-
function CreateRightClickMenuItem(text, onClick, insObj)
3771+
				option.Position = UDim2.new(0, 0, 0, (i - 1) * DropDown.Height)
3772
				option.ZIndex = menu.ZIndex
3773-
	button.Font = DropDown.Font
3773+
				option.Parent = menu
3774-
	button.FontSize = DropDown.FontSize
3774+
3775-
	button.TextColor3 = DropDown.TextColor
3775+
3776-
	button.TextXAlignment = DropDown.TextXAlignment
3776+
3777-
	button.BackgroundColor3 = DropDown.BackColor
3777+
3778-
	button.AutoButtonColor = false
3778+
		showMenu()
3779-
	button.BorderSizePixel = 0
3779+
3780-
	button.Active = true
3780+
3781-
	button.Text = text
3781+
		return frame
3782
	end
3783-
	if insObj == 1 then
3783+
3784-
		local newIcon = Icon(nil,ExplorerIndex[text] or 0)
3784+
	function CreateFunctionCallerMenu(choices, currentChoice, readOnly, onClick)
3785-
		newIcon.Position = UDim2.new(0,0,0,2)
3785+
		local mouse = game:GetService("Players").LocalPlayer:GetMouse()
3786-
		newIcon.Size = UDim2.new(0,16,0,16)
3786+
		local totalSize = explorerPanel.Parent.AbsoluteSize.y
3787-
		newIcon.IconMap.ZIndex = 5
3787+
		if #choices == 0 then return end
3788-
		newIcon.Parent = button
3788+
3789-
		button.Text = "\t\t"..button.Text
3789+
		table.sort(choices, function(a,b) return a.Name < b.Name end)
3790-
	elseif insObj == 2 then
3790+
3791-
		button.FontSize = Enum.FontSize.Size11
3791+
		local frame = Instance.new("Frame")	
3792
		frame.Name = "InsertObject"
3793
		frame.Size = UDim2.new(0, 200, 1, 0)
3794-
	button.MouseEnter:connect(function()
3794+
		frame.BackgroundTransparency = 1
3795-
		button.TextColor3 = DropDown.TextColorOver
3795+
		frame.Active = true
3796-
		button.BackgroundColor3 = DropDown.BackColorOver
3796+
3797-
		if not insObj and CurrentInsertObjectWindow then
3797+
		local menu = nil
3798-
			if CurrentInsertObjectWindow.Visible == false and button.Text == "Insert Object" then
3798+
		local arrow = nil
3799-
				CreateInsertObject()
3799+
		local expanded = false
3800-
			elseif CurrentInsertObjectWindow.Visible and button.Text ~= "Insert Object" then
3800+
		local margin = DropDown.BorderSizePixel;
3801
3802
		local function hideMenu()
3803
			expanded = false
3804-
		if not insObj then
3804+
			--showArrow(DropDown.ArrowColor)
3805-
			if CurrentFunctionCallerWindow and button.Text ~= "Call Function" then
3805+
			if frame then 
3806
				--frame:Destroy()
3807
				CurrentInsertObjectWindow.Visible = false
3808-
			elseif button.Text == "Call Function" then
3808+
3809-
				CreateFunctionCaller()
3809+
3810
3811
		local function showMenu()
3812
			expanded = true
3813-
	button.MouseLeave:connect(function()
3813+
			menu = Instance.new("ScrollingFrame")
3814
			menu.Size = UDim2.new(0,300,1,0)
3815
			menu.CanvasSize = UDim2.new(0, 300, 0, #choices * DropDown.Height)
3816
			menu.Position = UDim2.new(0, margin, 0, 0)
3817-
	button.MouseButton1Click:connect(function()
3817+
			menu.BackgroundTransparency = 0
3818
			menu.BackgroundColor3 = DropDown.BackColor
3819
			menu.BorderColor3 = DropDown.BorderColor
3820-
		onClick(text)
3820+
			menu.BorderSizePixel = DropDown.BorderSizePixel
3821-
	end)	
3821+
			menu.TopImage = "rbxasset://textures/blackBkg_square.png"
3822-
	return button
3822+
			menu.MidImage = "rbxasset://textures/blackBkg_square.png"
3823
			menu.BottomImage = "rbxasset://textures/blackBkg_square.png"
3824
			menu.Active = true
3825-
function CreateRightClickMenu(choices, currentChoice, readOnly, onClick)
3825+
			menu.ZIndex = 5
3826
			menu.Parent = frame
3827
3828-
	local frame = Instance.new("Frame")	
3828+
			--local parentFrameHeight = script.Parent.List.Size.Y.Offset
3829-
	frame.Name = "DropDown"
3829+
			--local rowHeight = mouse.Y
3830-
	frame.Size = UDim2.new(0, 200, 1, 0)
3830+
			--if (rowHeight + menu.Size.Y.Offset) > parentFrameHeight then
3831-
	frame.BackgroundTransparency = 1
3831+
			--	menu.Position = UDim2.new(0, margin, 0, -1 * (#choices * DropDown.Height) - margin)
3832-
	frame.Active = true
3832+
			--end
3833
3834-
	local menu = nil
3834+
			local function GetParameters(functionData)
3835-
	local arrow = nil
3835+
				local paraString = ""
3836-
	local expanded = false
3836+
				paraString = paraString.."("
3837-
	local margin = DropDown.BorderSizePixel;
3837+
				for i,v in pairs(functionData.Arguments) do
3838
					paraString = paraString..v.Type.." "..v.Name
3839
					if i < #functionData.Arguments then
3840
						paraString = paraString..", "
3841
					end
3842
				end
3843
				paraString = paraString..")"
3844
				return paraString
3845
			end
3846
3847
			local function choice(name)
3848
				onClick(name)
3849
				hideMenu()
3850
			end
3851
3852
			for i,name in pairs(choices) do
3853
				local option = CreateRightClickMenuItem(name.ReturnType.." "..name.Name..GetParameters(name), function()
3854
					choice(name)
3855-
	local function hideMenu()
3855+
				end,2)
3856-
		expanded = false
3856+
				option.Size = UDim2.new(1, 0, 0, 20)
3857-
		--showArrow(DropDown.ArrowColor)
3857+
				option.Position = UDim2.new(0, 0, 0, (i - 1) * DropDown.Height)
3858-
		if frame then 
3858+
				option.ZIndex = menu.ZIndex
3859-
			frame:Destroy()
3859+
				option.Parent = menu
3860
			end
3861
		end
3862
3863
3864-
	local function showMenu()
3864+
		showMenu()
3865-
		expanded = true
3865+
3866-
		menu = Instance.new("Frame")
3866+
3867-
		menu.Size = UDim2.new(0, 200, 0, #choices * DropDown.Height)
3867+
		return frame
3868-
		menu.Position = UDim2.new(0, margin, 0, 5)
3868+
3869-
		menu.BackgroundTransparency = 0
3869+
3870-
		menu.BackgroundColor3 = DropDown.BackColor
3870+
	function CreateInsertObject()
3871-
		menu.BorderColor3 = DropDown.BorderColor
3871+
		if not CurrentInsertObjectWindow then return end
3872-
		menu.BorderSizePixel = DropDown.BorderSizePixel
3872+
		CurrentInsertObjectWindow.Visible = true
3873-
		menu.Active = true
3873+
		if currentRightClickMenu and CurrentInsertObjectWindow.Visible then
3874-
		menu.ZIndex = 5
3874+
			CurrentInsertObjectWindow.Position = UDim2.new(0,currentRightClickMenu.Position.X.Offset-currentRightClickMenu.Size.X.Offset-2,0,0)
3875-
		menu.Parent = frame
3875+
3876
		if CurrentInsertObjectWindow.Visible then
3877-
		--local parentFrameHeight = script.Parent.List.Size.Y.Offset
3877+
			CurrentInsertObjectWindow.Parent = explorerPanel.Parent
3878-
		--local rowHeight = mouse.Y
3878+
3879-
		--if (rowHeight + menu.Size.Y.Offset) > parentFrameHeight then
3879+
3880-
		--	menu.Position = UDim2.new(0, margin, 0, -1 * (#choices * DropDown.Height) - margin)
3880+
3881-
		--end
3881+
	function CreateFunctionCaller(oh)
3882-
			
3882+
		if CurrentFunctionCallerWindow then
3883-
		local function choice(name)
3883+
3884-
			onClick(name)
3884+
3885-
			hideMenu()
3885+
3886
		CurrentFunctionCallerWindow = CreateFunctionCallerMenu(
3887
			GetFunctions(),
3888-
		for i,name in pairs(choices) do
3888+
			"",
3889-
			local option = CreateRightClickMenuItem(name, function()
3889+
			false,
3890-
				choice(name)
3890+
			function(option)
3891
				CurrentFunctionCallerWindow:Destroy()
3892-
			option.Size = UDim2.new(1, 0, 0, 20)
3892+
3893-
			option.Position = UDim2.new(0, 0, 0, (i - 1) * DropDown.Height)
3893+
				local list = SelectionVar():Get()
3894-
			option.ZIndex = menu.ZIndex
3894+
				for i,v in pairs(list) do
3895-
			option.Parent = menu
3895+
					pcall(function() print("Function called.", pcall(function() v[option.Name](v) end)) end)
3896
				end
3897
3898
				DestroyRightClick()
3899
			end
3900-
	showMenu()
3900+
		)
3901
		if currentRightClickMenu and CurrentFunctionCallerWindow then
3902
			CurrentFunctionCallerWindow.Position = UDim2.new(0,currentRightClickMenu.Position.X.Offset-currentRightClickMenu.Size.X.Offset*1.5-2,0,0)
3903-
	return frame
3903+
3904
		if CurrentFunctionCallerWindow then
3905
			CurrentFunctionCallerWindow.Parent = explorerPanel.Parent
3906-
function checkMouseInGui(gui)
3906+
3907-
	if gui == nil then return false end
3907+
3908-
	local plrMouse = game:GetService("Players").LocalPlayer:GetMouse()
3908+
3909-
	local guiPosition = gui.AbsolutePosition
3909+
	function CreateRightClickMenuItem(text, onClick, insObj)
3910-
	local guiSize = gui.AbsoluteSize	
3910+
		local button = Instance.new("TextButton")
3911
		button.Font = DropDown.Font
3912-
	if plrMouse.X >= guiPosition.x and plrMouse.X <= guiPosition.x + guiSize.x and plrMouse.Y >= guiPosition.y and plrMouse.Y <= guiPosition.y + guiSize.y then
3912+
		button.FontSize = DropDown.FontSize
3913-
		return true
3913+
3914
		button.TextXAlignment = DropDown.TextXAlignment
3915
		button.BackgroundColor3 = DropDown.BackColor
3916
		button.AutoButtonColor = false
3917
		button.BorderSizePixel = 0
3918
		button.Active = true
3919-
local clipboard = {}
3919+
		button.Text = text
3920-
local function delete(o)
3920+
3921-
	o.Parent = nil
3921+
		if insObj == 1 then
3922
			local newIcon = Icon(nil,ExplorerIndex[text] or 0)
3923
			newIcon.Position = UDim2.new(0,0,0,2)
3924-
local getTextWidth do
3924+
			newIcon.Size = UDim2.new(0,16,0,16)
3925-
	local text = Create('TextLabel',{
3925+
			newIcon.IconMap.ZIndex = 5
3926-
		Name = "TextWidth";
3926+
			newIcon.Parent = button
3927
			button.Text = "\t\t"..button.Text
3928-
		TextYAlignment = 'Center';
3928+
		elseif insObj == 2 then
3929
			button.FontSize = Enum.FontSize.Size11
3930
		end
3931-
		Text = "";
3931+
3932
		button.MouseEnter:connect(function()
3933-
		Size = UDim2.new(1,0,1,0);
3933+
			button.TextColor3 = DropDown.TextColorOver
3934
			button.BackgroundColor3 = DropDown.BackColorOver
3935
			if not insObj and CurrentInsertObjectWindow then
3936
				if CurrentInsertObjectWindow.Visible == false and button.Text == "Insert Object" then
3937-
	function getTextWidth(s)
3937+
					CreateInsertObject()
3938-
		text.Text = s
3938+
				elseif CurrentInsertObjectWindow.Visible and button.Text ~= "Insert Object" then
3939-
		return text.TextBounds.x
3939+
					CurrentInsertObjectWindow.Visible = false
3940
				end
3941
			end
3942
			if not insObj then
3943-
local nameScanned = false
3943+
				if CurrentFunctionCallerWindow and button.Text ~= "Call Function" then
3944-
-- Holds the game tree converted to a list.
3944+
					CurrentFunctionCallerWindow:Destroy()
3945-
local TreeList = {}
3945+
					CurrentFunctionCallerWindow = nil
3946-
-- Matches objects to their tree node representation.
3946+
				elseif button.Text == "Call Function" then
3947-
local NodeLookup = {}
3947+
					CreateFunctionCaller()
3948
				end
3949-
local nodeWidth = 0
3949+
3950
		end)
3951-
local QuickButtons = {}
3951+
3952
			button.TextColor3 = DropDown.TextColor
3953-
function filteringWorkspace()
3953+
			button.BackgroundColor3 = DropDown.BackColor
3954-
	if explorerFilter.Text ~= "" and explorerFilter.Text ~= "Filter Workspace" then
3954+
3955-
		return true
3955+
3956
			button.TextColor3 = DropDown.TextColor
3957-
	return false
3957+
			button.BackgroundColor3 = DropDown.BackColor
3958
			onClick(text)
3959
		end)	
3960-
function lookForAName(obj,name)
3960+
3961-
	for i,v in pairs(obj:GetChildren()) do
3961+
3962-
		if string.find(string.lower(v.Name),string.lower(name)) then nameScanned = true end
3962+
3963-
		lookForAName(v,name)
3963+
	function CreateRightClickMenu(choices, currentChoice, readOnly, onClick)
3964
		local mouse = game:GetService("Players").LocalPlayer:GetMouse()
3965
3966
		local frame = Instance.new("Frame")	
3967-
function scanName(obj)
3967+
		frame.Name = "DropDown"
3968-
	nameScanned = false
3968+
		frame.Size = UDim2.new(0, 200, 1, 0)
3969-
	if string.find(string.lower(obj.Name),string.lower(explorerFilter.Text)) then
3969+
		frame.BackgroundTransparency = 1
3970-
		nameScanned = true
3970+
		frame.Active = true
3971
3972-
		lookForAName(obj,explorerFilter.Text)
3972+
		local menu = nil
3973
		local arrow = nil
3974-
	return nameScanned
3974+
		local expanded = false
3975
		local margin = DropDown.BorderSizePixel;
3976
3977-
function updateActions()
3977+
3978-
	for i,v in pairs(QuickButtons) do
3978+
3979-
		if v.Cond() then
3979+
3980-
			v.Toggle(true)
3980+
3981
	button.TextXAlignment = Row.TextXAlignment
3982-
			v.Toggle(false)
3982+
3983
	button.TextColor3 = Row.TextColor
3984
	if readOnly then
3985
		button.TextColor3 = Row.TextLockedColor
3986
	end
3987-
local updateList,rawUpdateList,updateScroll,rawUpdateSize do
3987+
3988-
	local function r(t)
3988+
3989-
		for i = 1,#t do
3989+
3990-
			if not filteringWorkspace() or scanName(t[i].Object) then
3990+
3991-
				TreeList[#TreeList+1] = t[i]
3991+
3992
3993-
				local w = (t[i].Depth)*(2+ENTRY_PADDING+GUI_SIZE) + 2 + ENTRY_SIZE + 4 + getTextWidth(t[i].Object.Name) + 4
3993+
		local function hideMenu()
3994-
				if w > nodeWidth then
3994+
			expanded = false
3995-
					nodeWidth = w
3995+
			--showArrow(DropDown.ArrowColor)
3996
			if frame then 
3997-
				if t[i].Expanded or filteringWorkspace() then
3997+
				frame:Destroy()
3998-
					r(t[i])
3998+
				DestroyRightClick()
3999
			end
4000
		end
4001
4002
		local function showMenu()
4003
			expanded = true
4004-
	function rawUpdateSize()
4004+
			menu = Instance.new("Frame")
4005-
		scrollBarH.TotalSpace = nodeWidth
4005+
			menu.Size = UDim2.new(0, 200, 0, #choices * DropDown.Height)
4006-
		scrollBarH.VisibleSpace = listFrame.AbsoluteSize.x
4006+
			menu.Position = UDim2.new(0, margin, 0, 5)
4007-
		scrollBarH:Update()
4007+
			menu.BackgroundTransparency = 0
4008-
		local visible = scrollBarH:CanScrollDown() or scrollBarH:CanScrollUp()
4008+
			menu.BackgroundColor3 = DropDown.BackColor
4009-
		scrollBarH.GUI.Visible = visible
4009+
			menu.BorderColor3 = DropDown.BorderColor
4010
			menu.BorderSizePixel = DropDown.BorderSizePixel
4011-
		listFrame.Size = UDim2.new(1,-GUI_SIZE,1,-GUI_SIZE*(visible and 1 or 0) - HEADER_SIZE)
4011+
			menu.Active = true
4012
			menu.ZIndex = 5
4013
			menu.Parent = frame
4014-
		scrollBar.GUI.Size = UDim2.new(0,GUI_SIZE,1,-GUI_SIZE*(visible and 1 or 0) - HEADER_SIZE)
4014+
4015
			--local parentFrameHeight = script.Parent.List.Size.Y.Offset
4016-
		scrollBar.TotalSpace = #TreeList+1
4016+
			--local rowHeight = mouse.Y
4017-
		scrollBar:Update()
4017+
			--if (rowHeight + menu.Size.Y.Offset) > parentFrameHeight then
4018
			--	menu.Position = UDim2.new(0, margin, 0, -1 * (#choices * DropDown.Height) - margin)
4019
			--end
4020-
	function rawUpdateList()
4020+
4021-
		-- Clear then repopulate the entire list. It appears to be fast enough.
4021+
			local function choice(name)
4022-
		TreeList = {}
4022+
				onClick(name)
4023-
		nodeWidth = 0
4023+
4024-
		r(NodeLookup[workspace.Parent])
4024+
4025-
		r(NodeLookup[DexOutput])
4025+
4026
			for i,name in pairs(choices) do
4027-
			r(NodeLookup[DexStorage])
4027+
				local option = CreateRightClickMenuItem(name, function()
4028
					choice(name)
4029
				end)
4030-
			r(NodeLookup[NilStorage])
4030+
				option.Size = UDim2.new(1, 0, 0, 20)
4031
				option.Position = UDim2.new(0, 0, 0, (i - 1) * DropDown.Height)
4032-
		rawUpdateSize()
4032+
				option.ZIndex = menu.ZIndex
4033-
		updateActions()
4033+
				option.Parent = menu
4034
			end
4035
		end
4036-
	-- Adding or removing large models will cause many updates to occur. We
4036+
4037-
	-- can reduce the number of updates by creating a delay, then dropping any
4037+
4038-
	-- updates that occur during the delay.
4038+
		showMenu()
4039-
	local updatingList = false
4039+
4040-
	function updateList()
4040+
4041-
		if updatingList then return end
4041+
		return frame
4042-
		updatingList = true
4042+
4043-
		wait(0.25)
4043+
4044-
		updatingList = false
4044+
	function checkMouseInGui(gui)
4045-
		rawUpdateList()
4045+
		if gui == nil then return false end
4046
		local plrMouse = game:GetService("Players").LocalPlayer:GetMouse()
4047
		local guiPosition = gui.AbsolutePosition
4048-
	local updatingScroll = false
4048+
		local guiSize = gui.AbsoluteSize	
4049-
	function updateScroll()
4049+
4050-
		if updatingScroll then return end
4050+
		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
4051-
		updatingScroll = true
4051+
4052-
		wait(0.25)
4052+
4053-
		updatingScroll = false
4053+
4054-
		scrollBar:Update()
4054+
4055
	end
4056
4057
	local clipboard = {}
4058-
local Selection do
4058+
4059-
	local bindGetSelection = explorerPanel:FindFirstChild("GetSelection")
4059+
4060-
	if not bindGetSelection then
4060+
4061-
		bindGetSelection = Create('BindableFunction',{Name = "GetSelection"})
4061+
4062-
		bindGetSelection.Parent = explorerPanel
4062+
	local getTextWidth do
4063
		local text = Create('TextLabel',{
4064
			Name = "TextWidth";
4065-
	local bindSetSelection = explorerPanel:FindFirstChild("SetSelection")
4065+
			TextXAlignment = 'Left';
4066-
	if not bindSetSelection then
4066+
			TextYAlignment = 'Center';
4067-
		bindSetSelection = Create('BindableFunction',{Name = "SetSelection"})
4067+
4068-
		bindSetSelection.Parent = explorerPanel
4068+
4069
			Text = "";
4070
			Position = UDim2.new(0,0,0,0);
4071-
	local bindSelectionChanged = explorerPanel:FindFirstChild("SelectionChanged")
4071+
4072-
	if not bindSelectionChanged then
4072+
4073-
		bindSelectionChanged = Create('BindableEvent',{Name = "SelectionChanged"})
4073+
			Parent = explorerPanel;
4074-
		bindSelectionChanged.Parent = explorerPanel
4074+
4075
		function getTextWidth(s)
4076
			text.Text = s
4077-
	local SelectionList = {}
4077+
			return text.TextBounds.x
4078-
	local SelectionSet = {}
4078+
4079-
	local Updates = true
4079+
4080-
	Selection = {
4080+
4081-
		Selected = SelectionSet;
4081+
	local nameScanned = false
4082-
		List = SelectionList;
4082+
	-- Holds the game tree converted to a list.
4083
	local TreeList = {}
4084
	-- Matches objects to their tree node representation.
4085-
	local function addObject(object)
4085+
	local NodeLookup = {}
4086-
		-- list update
4086+
4087-
		local lupdate = false
4087+
	local nodeWidth = 0
4088-
		-- scroll update
4088+
4089-
		local supdate = false
4089+
	local QuickButtons = {}
4090
4091-
		if not SelectionSet[object] then
4091+
	function filteringWorkspace()
4092-
			local node = NodeLookup[object]
4092+
		if explorerFilter.Text ~= "" and explorerFilter.Text ~= "Filter Workspace" then
4093-
			if node then
4093+
4094-
				table.insert(SelectionList,object)
4094+
4095-
				SelectionSet[object] = true
4095+
4096-
				node.Selected = true
4096+
4097
4098-
				-- expand all ancestors so that selected node becomes visible
4098+
	function lookForAName(obj,name)
4099-
				node = node.Parent
4099+
		for i,v in pairs(obj:GetChildren()) do
4100-
				while node do
4100+
			if string.find(string.lower(v.Name),string.lower(name)) then nameScanned = true end
4101-
					if not node.Expanded then
4101+
			lookForAName(v,name)
4102-
						node.Expanded = true
4102+
4103-
						lupdate = true
4103+
4104
4105
	function scanName(obj)
4106
		nameScanned = false
4107
		if string.find(string.lower(obj.Name),string.lower(explorerFilter.Text)) then
4108
			nameScanned = true
4109
		else
4110-
		return lupdate,supdate
4110+
			lookForAName(obj,explorerFilter.Text)
4111
		end
4112
		return nameScanned
4113-
	function Selection:Set(objects)
4113+
4114-
		local lupdate = false
4114+
4115-
		local supdate = false
4115+
	function updateActions()
4116
		for i,v in pairs(QuickButtons) do
4117-
		if #SelectionList > 0 then
4117+
			if v.Cond() then
4118
				v.Toggle(true)
4119-
				local object = SelectionList[i]
4119+
4120
				v.Toggle(false)
4121
			end
4122
		end
4123
	end
4124
4125
	local updateList,rawUpdateList,updateScroll,rawUpdateSize do
4126
		local function r(t)
4127-
			SelectionList = {}
4127+
			for i = 1,#t do
4128-
			Selection.List = SelectionList
4128+
				if not filteringWorkspace() or scanName(t[i].Object) then
4129-
			supdate = true
4129+
					TreeList[#TreeList+1] = t[i]
4130
4131
					local w = (t[i].Depth)*(2+ENTRY_PADDING+GUI_SIZE) + 2 + ENTRY_SIZE + 4 + getTextWidth(t[i].Object.Name) + 4
4132-
		for i = 1,#objects do
4132+
					if w > nodeWidth then
4133-
			local l,s = addObject(objects[i])
4133+
						nodeWidth = w
4134-
			lupdate = l or lupdate
4134+
4135-
			supdate = s or supdate
4135+
					if t[i].Expanded or filteringWorkspace() then
4136
						r(t[i])
4137
					end
4138-
		if lupdate then
4138+
4139
			end
4140-
			supdate = true
4140+
4141-
		elseif supdate then
4141+
4142
		function rawUpdateSize()
4143
			scrollBarH.TotalSpace = nodeWidth
4144
			scrollBarH.VisibleSpace = listFrame.AbsoluteSize.x
4145-
		if supdate then
4145+
4146
			local visible = scrollBarH:CanScrollDown() or scrollBarH:CanScrollUp()
4147
			scrollBarH.GUI.Visible = visible
4148
4149
			listFrame.Size = UDim2.new(1,-GUI_SIZE,1,-GUI_SIZE*(visible and 1 or 0) - HEADER_SIZE)
4150
4151-
	function Selection:Add(object)
4151+
			scrollBar.VisibleSpace = math.ceil(listFrame.AbsoluteSize.y/ENTRY_BOUND)
4152-
		local l,s = addObject(object)
4152+
			scrollBar.GUI.Size = UDim2.new(0,GUI_SIZE,1,-GUI_SIZE*(visible and 1 or 0) - HEADER_SIZE)
4153-
		if l then
4153+
4154
			scrollBar.TotalSpace = #TreeList+1
4155-
			if Updates then
4155+
4156
		end
4157
4158
		function rawUpdateList()
4159-
		elseif s then
4159+
			-- Clear then repopulate the entire list. It appears to be fast enough.
4160
			TreeList = {}
4161-
			if Updates then
4161+
			nodeWidth = 0
4162
			r(NodeLookup[workspace.Parent])
4163
			r(NodeLookup[DexOutput])
4164
			if DexStorageEnabled then
4165
				r(NodeLookup[DexStorage])
4166
			end
4167
			if NilStorageEnabled then
4168-
	function Selection:StopUpdates()
4168+
				r(NodeLookup[NilStorage])
4169-
		Updates = false
4169+
4170
			rawUpdateSize()
4171
			updateActions()
4172-
	function Selection:ResumeUpdates()
4172+
4173-
		Updates = true
4173+
4174-
		bindSelectionChanged:Fire()
4174+
		-- Adding or removing large models will cause many updates to occur. We
4175-
		updateActions()
4175+
		-- can reduce the number of updates by creating a delay, then dropping any
4176
		-- updates that occur during the delay.
4177
		local updatingList = false
4178-
	function Selection:Remove(object,noupdate)
4178+
		function updateList()
4179-
		if SelectionSet[object] then
4179+
			if updatingList then return end
4180-
			local node = NodeLookup[object]
4180+
			updatingList = true
4181-
			if node then
4181+
			wait(0.25)
4182-
				node.Selected = false
4182+
			updatingList = false
4183-
				SelectionSet[object] = nil
4183+
4184
		end
4185-
					if SelectionList[i] == object then
4185+
4186-
						table.remove(SelectionList,i)
4186+
		local updatingScroll = false
4187-
						break
4187+
		function updateScroll()
4188
			if updatingScroll then return end
4189
			updatingScroll = true
4190
			wait(0.25)
4191-
				if not noupdate then
4191+
			updatingScroll = false
4192
			scrollBar:Update()
4193
		end
4194
	end
4195
4196
	local Selection do
4197
		local bindGetSelection = explorerPanel:FindFirstChild("GetSelection")
4198
		if not bindGetSelection then
4199
			bindGetSelection = Create('BindableFunction',{Name = "GetSelection"})
4200-
	function Selection:Get()
4200+
			bindGetSelection.Parent = explorerPanel
4201-
		local list = {}
4201+
4202-
		for i = 1,#SelectionList do
4202+
4203-
			list[i] = SelectionList[i]
4203+
		local bindSetSelection = explorerPanel:FindFirstChild("SetSelection")
4204
		if not bindSetSelection then
4205-
		return list
4205+
			bindSetSelection = Create('BindableFunction',{Name = "SetSelection"})
4206
			bindSetSelection.Parent = explorerPanel
4207
		end
4208-
	bindSetSelection.OnInvoke = function(...)
4208+
4209-
		Selection:Set(...)
4209+
		local bindSelectionChanged = explorerPanel:FindFirstChild("SelectionChanged")
4210
		if not bindSelectionChanged then
4211
			bindSelectionChanged = Create('BindableEvent',{Name = "SelectionChanged"})
4212-
	bindGetSelection.OnInvoke = function()
4212+
			bindSelectionChanged.Parent = explorerPanel
4213-
		return Selection:Get()
4213+
4214
4215
		local SelectionList = {}
4216
		local SelectionSet = {}
4217-
function CreateCaution(title,msg)
4217+
		local Updates = true
4218-
	local newCaution = CautionWindow
4218+
		Selection = {
4219-
	newCaution.Visible = true
4219+
			Selected = SelectionSet;
4220-
	newCaution.Title.Text = title
4220+
			List = SelectionList;
4221-
	newCaution.MainWindow.Desc.Text = msg
4221+
4222-
	newCaution.MainWindow.Ok.MouseButton1Up:connect(function()
4222+
4223-
		newCaution.Visible = false
4223+
		local function addObject(object)
4224
			-- list update
4225
			local lupdate = false
4226
			-- scroll update
4227-
function CreateTableCaution(title,msg)
4227+
			local supdate = false
4228-
	if type(msg) ~= "table" then return CreateCaution(title,tostring(msg)) end
4228+
4229-
	local newCaution = TableCautionWindow:Clone()
4229+
			if not SelectionSet[object] then
4230-
	newCaution.Title.Text = title
4230+
4231
				if node then
4232-
	local TableList = newCaution.MainWindow.TableResults
4232+
					table.insert(SelectionList,object)
4233-
	local TableTemplate = newCaution.MainWindow.TableTemplate
4233+
					SelectionSet[object] = true
4234
					node.Selected = true
4235-
	for i,v in pairs(msg) do
4235+
4236-
		local newResult = TableTemplate:Clone()
4236+
					-- expand all ancestors so that selected node becomes visible
4237-
		newResult.Type.Text = type(v)
4237+
4238-
		newResult.Value.Text = tostring(v)
4238+
					while node do
4239-
		newResult.Position = UDim2.new(0,0,0,#TableList:GetChildren() * 20)
4239+
						if not node.Expanded then
4240-
		newResult.Parent = TableList
4240+
							node.Expanded = true
4241-
		TableList.CanvasSize = UDim2.new(0,0,0,#TableList:GetChildren() * 20)
4241+
							lupdate = true
4242-
		newResult.Visible = true
4242+
4243
						node = node.Parent
4244-
	newCaution.Parent = explorerPanel.Parent
4244+
4245-
	newCaution.Visible = true
4245+
					supdate = true
4246-
	newCaution.MainWindow.Ok.MouseButton1Up:connect(function()
4246+
4247-
		newCaution:Destroy()
4247+
4248
			return lupdate,supdate
4249
		end
4250
4251-
local function Split(str, delimiter)
4251+
		function Selection:Set(objects)
4252-
	local start = 1
4252+
			local lupdate = false
4253-
	local t = {}
4253+
			local supdate = false
4254-
	while true do
4254+
4255-
		local pos = string.find (str, delimiter, start, true)
4255+
			if #SelectionList > 0 then
4256-
		if not pos then
4256+
4257-
			break
4257+
					local object = SelectionList[i]
4258
					local node = NodeLookup[object]
4259-
		table.insert (t, string.sub (str, start, pos - 1))
4259+
					if node then
4260-
		start = pos + string.len (delimiter)
4260+
						node.Selected = false
4261
						SelectionSet[object] = nil
4262-
	table.insert (t, string.sub (str, start))
4262+
4263-
	return t
4263+
4264
4265
				SelectionList = {}
4266-
local function ToValue(value,type)
4266+
				Selection.List = SelectionList
4267-
	if type == "Vector2" then
4267+
4268-
		local list = Split(value,",")
4268+
4269-
		if #list < 2 then return nil end
4269+
4270-
		local x = tonumber(list[1]) or 0
4270+
			for i = 1,#objects do
4271-
		local y = tonumber(list[2]) or 0
4271+
				local l,s = addObject(objects[i])
4272-
		return Vector2.new(x,y)
4272+
				lupdate = l or lupdate
4273-
	elseif type == "Vector3" then
4273+
				supdate = s or supdate
4274-
		local list = Split(value,",")
4274+
4275-
		if #list < 3 then return nil end
4275+
4276-
		local x = tonumber(list[1]) or 0
4276+
			if lupdate then
4277-
		local y = tonumber(list[2]) or 0
4277+
				rawUpdateList()
4278-
		local z = tonumber(list[3]) or 0
4278+
4279-
		return Vector3.new(x,y,z)
4279+
			elseif supdate then
4280-
	elseif type == "Color3" then
4280+
4281-
		local list = Split(value,",")
4281+
4282-
		if #list < 3 then return nil end
4282+
4283-
		local r = tonumber(list[1]) or 0
4283+
			if supdate then
4284-
		local g = tonumber(list[2]) or 0
4284+
4285-
		local b = tonumber(list[3]) or 0
4285+
4286-
		return Color3.new(r/255,g/255, b/255)
4286+
4287-
	elseif type == "UDim2" then
4287+
4288-
		local list = Split(string.gsub(string.gsub(value, "{", ""),"}",""),",")
4288+
4289-
		if #list < 4 then return nil end
4289+
		function Selection:Add(object)
4290-
		local xScale = tonumber(list[1]) or 0
4290+
			local l,s = addObject(object)
4291-
		local xOffset = tonumber(list[2]) or 0
4291+
			if l then
4292-
		local yScale = tonumber(list[3]) or 0
4292+
				rawUpdateList()
4293-
		local yOffset = tonumber(list[4]) or 0
4293+
				if Updates then
4294-
		return UDim2.new(xScale, xOffset, yScale, yOffset)
4294+
					bindSelectionChanged:Fire()
4295-
	elseif type == "Number" then
4295+
					updateActions()
4296-
		return tonumber(value)
4296+
4297-
	elseif type == "String" then
4297+
			elseif s then
4298-
		return value
4298+
4299-
	elseif type == "NumberRange" then
4299+
				if Updates then
4300-
		local list = Split(value,",")
4300+
					bindSelectionChanged:Fire()
4301-
		if #list == 1 then
4301+
					updateActions()
4302-
			if tonumber(list[1]) == nil then return nil end
4302+
4303-
			local newVal = tonumber(list[1]) or 0
4303+
4304-
			return NumberRange.new(newVal)
4304+
4305
4306-
		if #list < 2 then return nil end
4306+
		function Selection:StopUpdates()
4307-
		local x = tonumber(list[1]) or 0
4307+
			Updates = false
4308-
		local y = tonumber(list[2]) or 0
4308+
4309-
		return NumberRange.new(x,y)
4309+
4310-
	elseif type == "Script" then
4310+
		function Selection:ResumeUpdates()
4311
			Updates = true
4312-
		_G.D_E_X_DONOTUSETHISPLEASE = nil
4312+
4313-
		loadstring(
4313+
4314-
			"_G.D_E_X_DONOTUSETHISPLEASE = "..value
4314+
4315-
		)()
4315+
4316-
		return _G.D_E_X_DONOTUSETHISPLEASE
4316+
		function Selection:Remove(object,noupdate)
4317
			if SelectionSet[object] then
4318
				local node = NodeLookup[object]
4319
				if node then
4320
					node.Selected = false
4321
					SelectionSet[object] = nil
4322
					for i = 1,#SelectionList do
4323
						if SelectionList[i] == object then
4324
							table.remove(SelectionList,i)
4325
							break
4326-
local function ToPropValue(value,type)
4326+
4327-
	if type == "Vector2" then
4327+
4328-
		local list = Split(value,",")
4328+
4329-
		if #list < 2 then return nil end
4329+
					if not noupdate then
4330-
		local x = tonumber(list[1]) or 0
4330+
						scrollBar:Update()
4331-
		local y = tonumber(list[2]) or 0
4331+
4332-
		return Vector2.new(x,y)
4332+
					bindSelectionChanged:Fire()
4333-
	elseif type == "Vector3" then
4333+
					updateActions()
4334-
		local list = Split(value,",")
4334+
4335-
		if #list < 3 then return nil end
4335+
4336-
		local x = tonumber(list[1]) or 0
4336+
4337-
		local y = tonumber(list[2]) or 0
4337+
4338-
		local z = tonumber(list[3]) or 0
4338+
		function Selection:Get()
4339-
		return Vector3.new(x,y,z)
4339+
			local list = {}
4340-
	elseif type == "Color3" then
4340+
4341-
		local list = Split(value,",")
4341+
				list[i] = SelectionList[i]
4342-
		if #list < 3 then return nil end
4342+
4343-
		local r = tonumber(list[1]) or 0
4343+
			return list
4344-
		local g = tonumber(list[2]) or 0
4344+
4345-
		local b = tonumber(list[3]) or 0
4345+
4346-
		return Color3.new(r/255,g/255, b/255)
4346+
		bindSetSelection.OnInvoke = function(...)
4347-
	elseif type == "UDim2" then
4347+
			Selection:Set(...)
4348-
		local list = Split(string.gsub(string.gsub(value, "{", ""),"}",""),",")
4348+
4349-
		if #list < 4 then return nil end
4349+
4350-
		local xScale = tonumber(list[1]) or 0
4350+
		bindGetSelection.OnInvoke = function()
4351-
		local xOffset = tonumber(list[2]) or 0
4351+
			return Selection:Get()
4352-
		local yScale = tonumber(list[3]) or 0
4352+
4353-
		local yOffset = tonumber(list[4]) or 0
4353+
4354-
		return UDim2.new(xScale, xOffset, yScale, yOffset)
4354+
4355-
	elseif type == "Content" then
4355+
	function CreateCaution(title,msg)
4356-
		return value
4356+
		local newCaution = CautionWindow
4357-
	elseif type == "float" or type == "int" or type == "double" then
4357+
		newCaution.Visible = true
4358-
		return tonumber(value)
4358+
		newCaution.Title.Text = title
4359-
	elseif type == "string" then
4359+
		newCaution.MainWindow.Desc.Text = msg
4360-
		return value
4360+
		newCaution.MainWindow.Ok.MouseButton1Up:connect(function()
4361-
	elseif type == "NumberRange" then
4361+
			newCaution.Visible = false
4362-
		local list = Split(value,",")
4362+
4363-
		if #list == 1 then
4363+
4364-
			if tonumber(list[1]) == nil then return nil end
4364+
4365-
			local newVal = tonumber(list[1]) or 0
4365+
	function CreateTableCaution(title,msg)
4366-
			return NumberRange.new(newVal)
4366+
		if type(msg) ~= "table" then return CreateCaution(title,tostring(msg)) end
4367
		local newCaution = TableCautionWindow:Clone()
4368-
		if #list < 2 then return nil end
4368+
		newCaution.Title.Text = title
4369-
		local x = tonumber(list[1]) or 0
4369+
4370-
		local y = tonumber(list[2]) or 0
4370+
		local TableList = newCaution.MainWindow.TableResults
4371-
		return NumberRange.new(x,y)
4371+
		local TableTemplate = newCaution.MainWindow.TableTemplate
4372-
	elseif string.sub(value,1,4) == "Enum" then
4372+
4373-
		local getEnum = value
4373+
		for i,v in pairs(msg) do
4374
			local newResult = TableTemplate:Clone()
4375-
			local x,y = string.find(getEnum,".")
4375+
			newResult.Type.Text = type(v)
4376-
			if y then
4376+
			newResult.Value.Text = tostring(v)
4377-
				getEnum = string.sub(getEnum,y+1)
4377+
			newResult.Position = UDim2.new(0,0,0,#TableList:GetChildren() * 20)
4378
			newResult.Parent = TableList
4379
			TableList.CanvasSize = UDim2.new(0,0,0,#TableList:GetChildren() * 20)
4380
			newResult.Visible = true
4381
		end
4382-
		print(getEnum)
4382+
		newCaution.Parent = explorerPanel.Parent
4383-
		return getEnum
4383+
		newCaution.Visible = true
4384
		newCaution.MainWindow.Ok.MouseButton1Up:connect(function()
4385
			newCaution:Destroy()
4386
		end)
4387
	end
4388
4389-
function PromptRemoteCaller(inst)
4389+
	local function Split(str, delimiter)
4390-
	if CurrentRemoteWindow then
4390+
		local start = 1
4391-
		CurrentRemoteWindow:Destroy()
4391+
		local t = {}
4392-
		CurrentRemoteWindow = nil
4392+
4393
			local pos = string.find (str, delimiter, start, true)
4394-
	CurrentRemoteWindow = RemoteWindow:Clone()
4394+
			if not pos then
4395-
	CurrentRemoteWindow.Parent = explorerPanel.Parent
4395+
4396-
	CurrentRemoteWindow.Visible = true
4396+
4397
			table.insert (t, string.sub (str, start, pos - 1))
4398-
	local displayValues = false
4398+
			start = pos + string.len (delimiter)
4399
		end
4400-
	local ArgumentList = CurrentRemoteWindow.MainWindow.Arguments
4400+
		table.insert (t, string.sub (str, start))
4401-
	local ArgumentTemplate = CurrentRemoteWindow.MainWindow.ArgumentTemplate
4401+
		return t
4402
	end
4403-
	if inst:IsA("RemoteEvent") then
4403+
4404-
		CurrentRemoteWindow.Title.Text = "Fire Event"
4404+
	local function ToValue(value,type)
4405-
		CurrentRemoteWindow.MainWindow.Ok.Text = "Fire"
4405+
		if type == "Vector2" then
4406-
		CurrentRemoteWindow.MainWindow.DisplayReturned.Visible = false
4406+
			local list = Split(value,",")
4407-
		CurrentRemoteWindow.MainWindow.Desc2.Visible = false
4407+
			if #list < 2 then return nil end
4408
			local x = tonumber(list[1]) or 0
4409
			local y = tonumber(list[2]) or 0
4410-
	local newArgument = ArgumentTemplate:Clone()
4410+
			return Vector2.new(x,y)
4411-
	newArgument.Parent = ArgumentList
4411+
		elseif type == "Vector3" then
4412-
	newArgument.Visible = true
4412+
			local list = Split(value,",")
4413-
	newArgument.Type.MouseButton1Down:connect(function()
4413+
			if #list < 3 then return nil end
4414-
		createDDown(newArgument.Type,function(choice)
4414+
			local x = tonumber(list[1]) or 0
4415-
			newArgument.Type.Text = choice
4415+
			local y = tonumber(list[2]) or 0
4416-
		end,"Script","Number","String","Color3","Vector3","Vector2","UDim2","NumberRange")
4416+
			local z = tonumber(list[3]) or 0
4417
			return Vector3.new(x,y,z)
4418
		elseif type == "Color3" then
4419-
	CurrentRemoteWindow.MainWindow.Ok.MouseButton1Up:connect(function()
4419+
			local list = Split(value,",")
4420-
		if CurrentRemoteWindow and inst.Parent ~= nil then
4420+
			if #list < 3 then return nil end
4421-
			local MyArguments = {}
4421+
			local r = tonumber(list[1]) or 0
4422-
			for i,v in pairs(ArgumentList:GetChildren()) do
4422+
			local g = tonumber(list[2]) or 0
4423-
				table.insert(MyArguments,ToValue(v.Value.Text,v.Type.Text))
4423+
			local b = tonumber(list[3]) or 0
4424
			return Color3.new(r/255,g/255, b/255)
4425-
			if inst:IsA("RemoteFunction") then
4425+
		elseif type == "UDim2" then
4426-
				if displayValues then
4426+
			local list = Split(string.gsub(string.gsub(value, "{", ""),"}",""),",")
4427-
					spawn(function()
4427+
			if #list < 4 then return nil end
4428-
						local myResults = inst:InvokeServer(unpack(MyArguments))
4428+
			local xScale = tonumber(list[1]) or 0
4429-
						if myResults then
4429+
			local xOffset = tonumber(list[2]) or 0
4430-
							CreateTableCaution("Remote Caller",myResults)
4430+
			local yScale = tonumber(list[3]) or 0
4431
			local yOffset = tonumber(list[4]) or 0
4432-
							CreateCaution("Remote Caller","This remote did not return anything.")
4432+
			return UDim2.new(xScale, xOffset, yScale, yOffset)
4433
		elseif type == "Number" then
4434
			return tonumber(value)
4435
		elseif type == "String" then
4436-
					spawn(function()
4436+
			return value
4437-
						inst:InvokeServer(unpack(MyArguments))
4437+
		elseif type == "NumberRange" then
4438
			local list = Split(value,",")
4439
			if #list == 1 then
4440
				if tonumber(list[1]) == nil then return nil end
4441-
				inst:FireServer(unpack(MyArguments))
4441+
				local newVal = tonumber(list[1]) or 0
4442
				return NumberRange.new(newVal)
4443
			end
4444
			if #list < 2 then return nil end
4445
			local x = tonumber(list[1]) or 0
4446
			local y = tonumber(list[2]) or 0
4447
			return NumberRange.new(x,y)
4448-
	CurrentRemoteWindow.MainWindow.Add.MouseButton1Up:connect(function()
4448+
		elseif type == "Script" then
4449
			local success,err = ypcall(function()
4450-
			local newArgument = ArgumentTemplate:Clone()
4450+
				_G.D_E_X_DONOTUSETHISPLEASE = nil
4451-
			newArgument.Position = UDim2.new(0,0,0,#ArgumentList:GetChildren() * 20)
4451+
				loadstring(
4452-
			newArgument.Parent = ArgumentList
4452+
					"_G.D_E_X_DONOTUSETHISPLEASE = "..value
4453-
			ArgumentList.CanvasSize = UDim2.new(0,0,0,#ArgumentList:GetChildren() * 20)
4453+
				)()
4454-
			newArgument.Visible = true
4454+
				return _G.D_E_X_DONOTUSETHISPLEASE
4455-
			newArgument.Type.MouseButton1Down:connect(function()
4455+
4456-
				createDDown(newArgument.Type,function(choice)
4456+
			if err then
4457-
					newArgument.Type.Text = choice
4457+
				return nil
4458-
				end,"Script","Number","String","Color3","Vector3","Vector2","UDim2","NumberRange")
4458+
4459
		else
4460
			return nil
4461
		end
4462
	end
4463-
	CurrentRemoteWindow.MainWindow.Subtract.MouseButton1Up:connect(function()
4463+
4464
	local function ToPropValue(value,type)
4465-
			if #ArgumentList:GetChildren() > 1 then
4465+
		if type == "Vector2" then
4466-
				ArgumentList:GetChildren()[#ArgumentList:GetChildren()]:Destroy()
4466+
			local list = Split(value,",")
4467
			if #list < 2 then return nil end
4468
			local x = tonumber(list[1]) or 0
4469
			local y = tonumber(list[2]) or 0
4470
			return Vector2.new(x,y)
4471
		elseif type == "Vector3" then
4472-
	CurrentRemoteWindow.MainWindow.Cancel.MouseButton1Up:connect(function()
4472+
			local list = Split(value,",")
4473
			if #list < 3 then return nil end
4474
			local x = tonumber(list[1]) or 0
4475
			local y = tonumber(list[2]) or 0
4476
			local z = tonumber(list[3]) or 0
4477
			return Vector3.new(x,y,z)
4478
		elseif type == "Color3" then
4479-
	CurrentRemoteWindow.MainWindow.DisplayReturned.MouseButton1Up:connect(function()
4479+
			local list = Split(value,",")
4480-
		if displayValues then
4480+
			if #list < 3 then return nil end
4481-
			displayValues = false
4481+
			local r = tonumber(list[1]) or 0
4482-
			CurrentRemoteWindow.MainWindow.DisplayReturned.enabled.Visible = false
4482+
			local g = tonumber(list[2]) or 0
4483
			local b = tonumber(list[3]) or 0
4484-
			displayValues = true
4484+
			return Color3.new(r/255,g/255, b/255)
4485-
			CurrentRemoteWindow.MainWindow.DisplayReturned.enabled.Visible = true
4485+
		elseif type == "UDim2" then
4486
			local list = Split(string.gsub(string.gsub(value, "{", ""),"}",""),",")
4487
			if #list < 4 then return nil end
4488
			local xScale = tonumber(list[1]) or 0
4489
			local xOffset = tonumber(list[2]) or 0
4490-
function PromptSaveInstance(inst)
4490+
			local yScale = tonumber(list[3]) or 0
4491-
	if not SaveInstance and not _G.SaveInstance then CreateCaution("SaveInstance Missing","You do not have the SaveInstance function installed. Please go to RaspberryPi's thread to retrieve it.") return end
4491+
			local yOffset = tonumber(list[4]) or 0
4492-
	if CurrentSaveInstanceWindow then
4492+
			return UDim2.new(xScale, xOffset, yScale, yOffset)
4493-
		CurrentSaveInstanceWindow:Destroy()
4493+
		elseif type == "Content" then
4494-
		CurrentSaveInstanceWindow = nil
4494+
			return value
4495-
		if explorerPanel.Parent:FindFirstChild("SaveInstanceOverwriteCaution") then
4495+
		elseif type == "float" or type == "int" or type == "double" then
4496-
			explorerPanel.Parent.SaveInstanceOverwriteCaution:Destroy()
4496+
			return tonumber(value)
4497
		elseif type == "string" then
4498
			return value
4499-
	CurrentSaveInstanceWindow = SaveInstanceWindow:Clone()
4499+
		elseif type == "NumberRange" then
4500-
	CurrentSaveInstanceWindow.Parent = explorerPanel.Parent
4500+
			local list = Split(value,",")
4501-
	CurrentSaveInstanceWindow.Visible = true
4501+
			if #list == 1 then
4502
				if tonumber(list[1]) == nil then return nil end
4503-
	local filename = CurrentSaveInstanceWindow.MainWindow.FileName
4503+
				local newVal = tonumber(list[1]) or 0
4504-
	local saveObjects = true
4504+
				return NumberRange.new(newVal)
4505-
	local overwriteCaution = false
4505+
4506
			if #list < 2 then return nil end
4507-
	CurrentSaveInstanceWindow.MainWindow.Save.MouseButton1Up:connect(function()
4507+
			local x = tonumber(list[1]) or 0
4508
			local y = tonumber(list[2]) or 0
4509-
			if readfile(getelysianpath()..filename.Text..".rbxmx") then
4509+
			return NumberRange.new(x,y)
4510-
				if not overwriteCaution then
4510+
		elseif string.sub(value,1,4) == "Enum" then
4511-
					overwriteCaution = true
4511+
			local getEnum = value
4512-
					local newCaution = ConfirmationWindow:Clone()
4512+
			while true do
4513-
					newCaution.Name = "SaveInstanceOverwriteCaution"
4513+
				local x,y = string.find(getEnum,".")
4514-
					newCaution.MainWindow.Desc.Text = "The file, "..filename.Text..".rbxmx, already exists. Overwrite?"
4514+
				if y then
4515-
					newCaution.Parent = explorerPanel.Parent
4515+
					getEnum = string.sub(getEnum,y+1)
4516-
					newCaution.Visible = true
4516+
4517-
					newCaution.MainWindow.Yes.MouseButton1Up:connect(function()
4517+
					break
4518-
						ypcall(function()
4518+
4519-
							SaveInstance(inst,filename.Text..".rbxmx",not saveObjects)
4519+
4520
			print(getEnum)
4521-
						overwriteCaution = false
4521+
			return getEnum
4522-
						newCaution:Destroy()
4522+
4523-
						if CurrentSaveInstanceWindow then
4523+
4524-
							CurrentSaveInstanceWindow:Destroy()
4524+
4525-
							CurrentSaveInstanceWindow = nil
4525+
4526
4527
	function PromptRemoteCaller(inst)
4528-
					newCaution.MainWindow.No.MouseButton1Up:connect(function()
4528+
4529-
						overwriteCaution = false
4529+
4530-
						newCaution:Destroy()
4530+
4531
		end
4532
		CurrentRemoteWindow = RemoteWindow:Clone()
4533
		CurrentRemoteWindow.Parent = explorerPanel.Parent
4534
		CurrentRemoteWindow.Visible = true
4535-
					SaveInstance(inst,filename.Text..".rbxmx",not saveObjects)
4535+
4536
		local displayValues = false
4537
4538
		local ArgumentList = CurrentRemoteWindow.MainWindow.Arguments
4539
		local ArgumentTemplate = CurrentRemoteWindow.MainWindow.ArgumentTemplate
4540
4541
		if inst:IsA("RemoteEvent") then
4542
			CurrentRemoteWindow.Title.Text = "Fire Event"
4543
			CurrentRemoteWindow.MainWindow.Ok.Text = "Fire"
4544
			CurrentRemoteWindow.MainWindow.DisplayReturned.Visible = false
4545
			CurrentRemoteWindow.MainWindow.Desc2.Visible = false
4546
		end
4547-
				if SaveInstance then
4547+
4548-
					SaveInstance(inst,filename.Text..".rbxmx",not saveObjects)
4548+
		local newArgument = ArgumentTemplate:Clone()
4549
		newArgument.Parent = ArgumentList
4550-
					_G.SaveInstance(inst,filename.Text,not saveObjects)
4550+
		newArgument.Visible = true
4551
		newArgument.Type.MouseButton1Down:connect(function()
4552
			createDDown(newArgument.Type,function(choice)
4553
				newArgument.Type.Text = choice
4554
			end,"Script","Number","String","Color3","Vector3","Vector2","UDim2","NumberRange")
4555
		end)
4556
4557
		CurrentRemoteWindow.MainWindow.Ok.MouseButton1Up:connect(function()
4558
			if CurrentRemoteWindow and inst.Parent ~= nil then
4559
				local MyArguments = {}
4560
				for i,v in pairs(ArgumentList:GetChildren()) do
4561
					table.insert(MyArguments,ToValue(v.Value.Text,v.Type.Text))
4562-
	CurrentSaveInstanceWindow.MainWindow.Cancel.MouseButton1Up:connect(function()
4562+
4563
				if inst:IsA("RemoteFunction") then
4564
					if displayValues then
4565
						spawn(function()
4566
							local myResults = inst:InvokeServer(unpack(MyArguments))
4567
							if myResults then
4568
								CreateTableCaution("Remote Caller",myResults)
4569
							else
4570
								CreateCaution("Remote Caller","This remote did not return anything.")
4571-
	CurrentSaveInstanceWindow.MainWindow.SaveObjects.MouseButton1Up:connect(function()
4571+
4572-
		if saveObjects then
4572+
4573-
			saveObjects = false
4573+
4574-
			CurrentSaveInstanceWindow.MainWindow.SaveObjects.enabled.Visible = false
4574+
						spawn(function()
4575
							inst:InvokeServer(unpack(MyArguments))
4576-
			saveObjects = true
4576+
4577-
			CurrentSaveInstanceWindow.MainWindow.SaveObjects.enabled.Visible = true
4577+
4578
				else
4579
					inst:FireServer(unpack(MyArguments))
4580
				end
4581
				CurrentRemoteWindow:Destroy()
4582-
function DestroyRightClick()
4582+
				CurrentRemoteWindow = nil
4583-
	if currentRightClickMenu then
4583+
4584-
		currentRightClickMenu:Destroy()
4584+
4585-
		currentRightClickMenu = nil
4585+
4586
		CurrentRemoteWindow.MainWindow.Add.MouseButton1Up:connect(function()
4587-
	if CurrentInsertObjectWindow and CurrentInsertObjectWindow.Visible then
4587+
			if CurrentRemoteWindow then
4588-
		CurrentInsertObjectWindow.Visible = false
4588+
				local newArgument = ArgumentTemplate:Clone()
4589
				newArgument.Position = UDim2.new(0,0,0,#ArgumentList:GetChildren() * 20)
4590
				newArgument.Parent = ArgumentList
4591
				ArgumentList.CanvasSize = UDim2.new(0,0,0,#ArgumentList:GetChildren() * 20)
4592-
function rightClickMenu(sObj)
4592+
				newArgument.Visible = true
4593
				newArgument.Type.MouseButton1Down:connect(function()
4594
					createDDown(newArgument.Type,function(choice)
4595-
	currentRightClickMenu = CreateRightClickMenu(
4595+
						newArgument.Type.Text = choice
4596-
		{"Cut","Copy","Paste Into","Duplicate","Delete","Group","Ungroup","Select Children","Teleport To","Insert Part","Insert Object","View Script","Save Instance","Call Function","Call Remote"},
4596+
					end,"Script","Number","String","Color3","Vector3","Vector2","UDim2","NumberRange")
4597
				end)
4598
			end
4599
		end)
4600-
			if option == "Cut" then
4600+
4601-
				if not Option.Modifiable then return end
4601+
		CurrentRemoteWindow.MainWindow.Subtract.MouseButton1Up:connect(function()
4602-
				clipboard = {}
4602+
			if CurrentRemoteWindow then
4603-
				local list = Selection.List
4603+
				if #ArgumentList:GetChildren() > 1 then
4604-
				local cut = {}
4604+
					ArgumentList:GetChildren()[#ArgumentList:GetChildren()]:Destroy()
4605-
				for i = 1,#list do
4605+
					ArgumentList.CanvasSize = UDim2.new(0,0,0,#ArgumentList:GetChildren() * 20)
4606-
					local obj = list[i]:Clone()
4606+
4607-
					if obj then
4607+
4608-
						table.insert(clipboard,obj)
4608+
4609-
						table.insert(cut,list[i])
4609+
4610
		CurrentRemoteWindow.MainWindow.Cancel.MouseButton1Up:connect(function()
4611
			if CurrentRemoteWindow then
4612-
				for i = 1,#cut do
4612+
				CurrentRemoteWindow:Destroy()
4613-
					pcall(delete,cut[i])
4613+
				CurrentRemoteWindow = nil
4614
			end
4615
		end)
4616-
			elseif option == "Copy" then
4616+
4617-
				if not Option.Modifiable then return end
4617+
		CurrentRemoteWindow.MainWindow.DisplayReturned.MouseButton1Up:connect(function()
4618-
				clipboard = {}
4618+
			if displayValues then
4619-
				local list = Selection.List
4619+
				displayValues = false
4620-
				for i = 1,#list do
4620+
				CurrentRemoteWindow.MainWindow.DisplayReturned.enabled.Visible = false
4621-
					table.insert(clipboard,list[i]:Clone())
4621+
4622
				displayValues = true
4623
				CurrentRemoteWindow.MainWindow.DisplayReturned.enabled.Visible = true
4624-
			elseif option == "Paste Into" then
4624+
4625-
				if not Option.Modifiable then return end
4625+
4626-
				local parent = Selection.List[1] or workspace
4626+
4627-
				for i = 1,#clipboard do
4627+
4628-
					clipboard[i]:Clone().Parent = parent
4628+
	function PromptSaveInstance(inst)
4629
		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
4630-
			elseif option == "Duplicate" then
4630+
4631-
				if not Option.Modifiable then return end
4631+
4632-
				local list = Selection:Get()
4632+
4633-
				for i = 1,#list do
4633+
4634-
					list[i]:Clone().Parent = Selection.List[1].Parent or workspace
4634+
4635
			end
4636-
			elseif option == "Delete" then
4636+
4637-
				if not Option.Modifiable then return end
4637+
		CurrentSaveInstanceWindow = SaveInstanceWindow:Clone()
4638-
				local list = Selection:Get()
4638+
		CurrentSaveInstanceWindow.Parent = explorerPanel.Parent
4639-
				for i = 1,#list do
4639+
		CurrentSaveInstanceWindow.Visible = true
4640-
					pcall(delete,list[i])
4640+
4641
		local filename = CurrentSaveInstanceWindow.MainWindow.FileName
4642
		local saveObjects = true
4643-
			elseif option == "Group" then
4643+
		local overwriteCaution = false
4644-
				if not Option.Modifiable then return end
4644+
4645-
				local newModel = Instance.new("Model")
4645+
		CurrentSaveInstanceWindow.MainWindow.Save.MouseButton1Up:connect(function()
4646-
				local list = Selection:Get()
4646+
			if readfile and getelysianpath then
4647-
				newModel.Parent = Selection.List[1].Parent or workspace
4647+
				if readfile(getelysianpath()..filename.Text..".rbxmx") then
4648-
				for i = 1,#list do
4648+
					if not overwriteCaution then
4649-
					list[i].Parent = newModel
4649+
						overwriteCaution = true
4650
						local newCaution = ConfirmationWindow:Clone()
4651
						newCaution.Name = "SaveInstanceOverwriteCaution"
4652-
			elseif option == "Ungroup" then
4652+
						newCaution.MainWindow.Desc.Text = "The file, "..filename.Text..".rbxmx, already exists. Overwrite?"
4653-
				if not Option.Modifiable then return end
4653+
						newCaution.Parent = explorerPanel.Parent
4654-
				local ungrouped = {}
4654+
						newCaution.Visible = true
4655-
				local list = Selection:Get()
4655+
						newCaution.MainWindow.Yes.MouseButton1Up:connect(function()
4656-
				for i = 1,#list do
4656+
							ypcall(function()
4657-
					if list[i]:IsA("Model") then
4657+
								SaveInstance(inst,filename.Text..".rbxmx",not saveObjects)
4658
							end)
4659-
							v2.Parent = list[i].Parent or workspace
4659+
							overwriteCaution = false
4660-
							table.insert(ungrouped,v2)
4660+
							newCaution:Destroy()
4661-
						end		
4661+
							if CurrentSaveInstanceWindow then
4662-
						pcall(delete,list[i])			
4662+
								CurrentSaveInstanceWindow:Destroy()
4663
								CurrentSaveInstanceWindow = nil
4664
							end
4665
						end)
4666-
				if SettingsRemote:Invoke("SelectUngrouped") then
4666+
						newCaution.MainWindow.No.MouseButton1Up:connect(function()
4667-
					for i,v in pairs(ungrouped) do
4667+
							overwriteCaution = false
4668-
						Selection:Add(v)
4668+
							newCaution:Destroy()
4669
						end)
4670
					end
4671-
			elseif option == "Select Children" then
4671+
4672-
				if not Option.Modifiable then return end
4672+
					ypcall(function()
4673-
				local list = Selection:Get()
4673+
						SaveInstance(inst,filename.Text..".rbxmx",not saveObjects)
4674
					end)
4675-
				Selection:StopUpdates()
4675+
					if CurrentSaveInstanceWindow then
4676-
				for i = 1,#list do
4676+
						CurrentSaveInstanceWindow:Destroy()
4677-
					for i2,v2 in pairs(list[i]:GetChildren()) do
4677+
						CurrentSaveInstanceWindow = nil
4678-
						Selection:Add(v2)
4678+
						if explorerPanel.Parent:FindFirstChild("SaveInstanceOverwriteCaution") then
4679
							explorerPanel.Parent.SaveInstanceOverwriteCaution:Destroy()
4680
						end
4681-
				Selection:ResumeUpdates()
4681+
4682-
			elseif option == "Teleport To" then
4682+
4683-
				if not Option.Modifiable then return end
4683+
4684-
				local list = Selection:Get()
4684+
4685-
				for i = 1,#list do
4685+
					if SaveInstance then
4686-
					if list[i]:IsA("BasePart") then
4686+
						SaveInstance(inst,filename.Text..".rbxmx",not saveObjects)
4687
					else
4688-
							game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = list[i].CFrame
4688+
						_G.SaveInstance(inst,filename.Text,not saveObjects)
4689
					end
4690-
						break
4690+
4691
				if CurrentSaveInstanceWindow then
4692
					CurrentSaveInstanceWindow:Destroy()
4693-
			elseif option == "Insert Part" then
4693+
4694-
				if not Option.Modifiable then return end
4694+
4695-
				local insertedParts = {}
4695+
4696-
				local list = Selection:Get()
4696+
4697-
				for i = 1,#list do
4697+
4698-
					pcall(function()
4698+
4699-
						local newPart = Instance.new("Part")
4699+
4700-
						newPart.Parent = list[i]
4700+
		CurrentSaveInstanceWindow.MainWindow.Cancel.MouseButton1Up:connect(function()
4701-
						newPart.CFrame = CFrame.new(game:GetService("Players").LocalPlayer.Character.Head.Position) + Vector3.new(0,3,0)
4701+
4702-
						table.insert(insertedParts,newPart)
4702+
4703
				CurrentSaveInstanceWindow = nil
4704
				if explorerPanel.Parent:FindFirstChild("SaveInstanceOverwriteCaution") then
4705-
			elseif option == "Save Instance" then
4705+
4706-
				if not Option.Modifiable then return end
4706+
4707-
				local list = Selection:Get()
4707+
4708-
				if #list == 1 then
4708+
4709-
					list[1].Archivable = true
4709+
		CurrentSaveInstanceWindow.MainWindow.SaveObjects.MouseButton1Up:connect(function()
4710-
					ypcall(function()PromptSaveInstance(list[1]:Clone())end)
4710+
			if saveObjects then
4711-
				elseif #list > 1 then
4711+
				saveObjects = false
4712
				CurrentSaveInstanceWindow.MainWindow.SaveObjects.enabled.Visible = false
4713-
					newModel.Name = "SavedInstances"
4713+
4714
				saveObjects = true
4715-
						ypcall(function()
4715+
				CurrentSaveInstanceWindow.MainWindow.SaveObjects.enabled.Visible = true
4716-
							list[i].Archivable = true
4716+
4717-
							list[i]:Clone().Parent = newModel
4717+
4718
	end
4719
4720-
					PromptSaveInstance(newModel)
4720+
	function DestroyRightClick()
4721
		if currentRightClickMenu then
4722-
			elseif option == "Call Remote" then
4722+
			currentRightClickMenu:Destroy()
4723-
				if not Option.Modifiable then return end
4723+
			currentRightClickMenu = nil
4724-
				local list = Selection:Get()
4724+
4725-
				for i = 1,#list do
4725+
		if CurrentInsertObjectWindow and CurrentInsertObjectWindow.Visible then
4726-
					if list[i]:IsA("RemoteFunction") or list[i]:IsA("RemoteEvent") then
4726+
4727-
						PromptRemoteCaller(list[i])
4727+
4728-
						break
4728+
4729
4730
	function rightClickMenu(sObj)
4731-
			elseif option == "View Script" then
4731+
		local mouse = game:GetService("Players").LocalPlayer:GetMouse()
4732-
				if not Option.Modifiable then return end
4732+
4733-
				local list = Selection:Get()
4733+
		currentRightClickMenu = CreateRightClickMenu(
4734-
				for i = 1,#list do
4734+
			{"Cut","Copy","Paste Into","Duplicate","Delete","Group","Ungroup","Select Children","Teleport To","Insert Part","Insert Object","View Script","Save Instance","Call Function","Call Remote"},
4735-
					if list[i]:IsA("LocalScript") or list[i]:IsA("ModuleScript") then
4735+
			"",
4736-
						ScriptEditorEvent:Fire(list[i])
4736+
			false,
4737
			function(option)
4738
				if option == "Cut" then
4739
					if not Option.Modifiable then return end
4740
					clipboard = {}
4741-
	currentRightClickMenu.Parent = explorerPanel.Parent
4741+
					local list = Selection.List
4742-
	currentRightClickMenu.Position = UDim2.new(0,mouse.X,0,mouse.Y)
4742+
					local cut = {}
4743-
	if currentRightClickMenu.AbsolutePosition.X + currentRightClickMenu.AbsoluteSize.X > explorerPanel.AbsolutePosition.X + explorerPanel.AbsoluteSize.X then
4743+
4744-
		currentRightClickMenu.Position = UDim2.new(0, explorerPanel.AbsolutePosition.X + explorerPanel.AbsoluteSize.X - currentRightClickMenu.AbsoluteSize.X, 0, mouse.Y)
4744+
						local obj = list[i]:Clone()
4745
						if obj then
4746
							table.insert(clipboard,obj)
4747
							table.insert(cut,list[i])
4748-
local function cancelReparentDrag()end
4748+
4749-
local function cancelSelectDrag()end
4749+
4750
					for i = 1,#cut do
4751-
	local listEntries = {}
4751+
						pcall(delete,cut[i])
4752-
	local nameConnLookup = {}
4752+
4753
					updateActions()
4754-
	local mouseDrag = Create('ImageButton',{
4754+
				elseif option == "Copy" then
4755-
		Name = "MouseDrag";
4755+
					if not Option.Modifiable then return end
4756-
		Position = UDim2.new(-0.25,0,-0.25,0);
4756+
					clipboard = {}
4757-
		Size = UDim2.new(1.5,0,1.5,0);
4757+
					local list = Selection.List
4758-
		Transparency = 1;
4758+
4759-
		AutoButtonColor = false;
4759+
						table.insert(clipboard,list[i]:Clone())
4760
					end
4761-
		ZIndex = 10;
4761+
					updateActions()
4762
				elseif option == "Paste Into" then
4763-
	local function dragSelect(last,add,button)
4763+
					if not Option.Modifiable then return end
4764-
		local connDrag
4764+
					local parent = Selection.List[1] or workspace
4765-
		local conUp
4765+
					for i = 1,#clipboard do
4766
						clipboard[i]:Clone().Parent = parent
4767-
		conDrag = mouseDrag.MouseMoved:connect(function(x,y)
4767+
4768-
			local pos = Vector2.new(x,y) - listFrame.AbsolutePosition
4768+
				elseif option == "Duplicate" then
4769-
			local size = listFrame.AbsoluteSize
4769+
					if not Option.Modifiable then return end
4770-
			if pos.x < 0 or pos.x > size.x or pos.y < 0 or pos.y > size.y then return end
4770+
					local list = Selection:Get()
4771
					for i = 1,#list do
4772-
			local i = math.ceil(pos.y/ENTRY_BOUND) + scrollBar.ScrollIndex
4772+
						list[i]:Clone().Parent = Selection.List[1].Parent or workspace
4773-
			-- Mouse may have made a large step, so interpolate between the
4773+
4774-
			-- last index and the current.
4774+
				elseif option == "Delete" then
4775-
			for n = i<last and i or last, i>last and i or last do
4775+
					if not Option.Modifiable then return end
4776-
				local node = TreeList[n]
4776+
					local list = Selection:Get()
4777
					for i = 1,#list do
4778-
					if add then
4778+
						pcall(delete,list[i])
4779-
						Selection:Add(node.Object)
4779+
4780
					Selection:Set({})
4781-
						Selection:Remove(node.Object)
4781+
				elseif option == "Group" then
4782
					if not Option.Modifiable then return end
4783
					local newModel = Instance.new("Model")
4784
					local list = Selection:Get()
4785-
			last = i
4785+
					newModel.Parent = Selection.List[1].Parent or workspace
4786
					for i = 1,#list do
4787
						list[i].Parent = newModel
4788-
		function cancelSelectDrag()
4788+
4789-
			mouseDrag.Parent = nil
4789+
4790-
			conDrag:disconnect()
4790+
				elseif option == "Ungroup" then
4791-
			conUp:disconnect()
4791+
					if not Option.Modifiable then return end
4792-
			function cancelSelectDrag()end
4792+
					local ungrouped = {}
4793
					local list = Selection:Get()
4794
					for i = 1,#list do
4795-
		conUp = mouseDrag[button]:connect(cancelSelectDrag)
4795+
						if list[i]:IsA("Model") then
4796
							for i2,v2 in pairs(list[i]:GetChildren()) do
4797-
		mouseDrag.Parent = GetScreen(listFrame)
4797+
								v2.Parent = list[i].Parent or workspace
4798
								table.insert(ungrouped,v2)
4799
							end		
4800-
	local function dragReparent(object,dragGhost,clickPos,ghostOffset)
4800+
							pcall(delete,list[i])			
4801-
		local connDrag
4801+
4802-
		local conUp
4802+
4803-
		local conUp2
4803+
4804
					if SettingsRemote:Invoke("SelectUngrouped") then
4805-
		local parentIndex = nil
4805+
						for i,v in pairs(ungrouped) do
4806-
		local dragged = false
4806+
							Selection:Add(v)
4807
						end
4808-
		local parentHighlight = Create('Frame',{
4808+
4809
				elseif option == "Select Children" then
4810
					if not Option.Modifiable then return end
4811
					local list = Selection:Get()
4812
					Selection:Set({})
4813-
				BackgroundColor3 = Color3.new(0,0,0);
4813+
					Selection:StopUpdates()
4814-
				BackgroundTransparency = 0.1;
4814+
4815
						for i2,v2 in pairs(list[i]:GetChildren()) do
4816-
				Size = UDim2.new(1,0,0,1);
4816+
							Selection:Add(v2)
4817
						end
4818
					end
4819
					Selection:ResumeUpdates()
4820-
				BackgroundColor3 = Color3.new(0,0,0);
4820+
				elseif option == "Teleport To" then
4821-
				BackgroundTransparency = 0.1;
4821+
					if not Option.Modifiable then return end
4822-
				Position = UDim2.new(1,0,0,0);
4822+
					local list = Selection:Get()
4823-
				Size = UDim2.new(0,1,1,0);
4823+
4824
						if list[i]:IsA("BasePart") then
4825
							pcall(function()
4826
								game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = list[i].CFrame
4827-
				BackgroundColor3 = Color3.new(0,0,0);
4827+
4828-
				BackgroundTransparency = 0.1;
4828+
							break
4829-
				Position = UDim2.new(0,0,1,0);
4829+
4830-
				Size = UDim2.new(1,0,0,1);
4830+
4831
				elseif option == "Insert Part" then
4832
					if not Option.Modifiable then return end
4833
					local insertedParts = {}
4834-
				BackgroundColor3 = Color3.new(0,0,0);
4834+
					local list = Selection:Get()
4835-
				BackgroundTransparency = 0.1;
4835+
4836
						pcall(function()
4837-
				Size = UDim2.new(0,1,1,0);
4837+
							local newPart = Instance.new("Part")
4838
							newPart.Parent = list[i]
4839
							newPart.CFrame = CFrame.new(game:GetService("Players").LocalPlayer.Character.Head.Position) + Vector3.new(0,3,0)
4840-
		SetZIndex(parentHighlight,9)
4840+
							table.insert(insertedParts,newPart)
4841
						end)
4842-
		conDrag = mouseDrag.MouseMoved:connect(function(x,y)
4842+
4843-
			local dragPos = Vector2.new(x,y)
4843+
				elseif option == "Save Instance" then
4844-
			if dragged then
4844+
					if not Option.Modifiable then return end
4845-
				local pos = dragPos - listFrame.AbsolutePosition
4845+
					local list = Selection:Get()
4846
					if #list == 1 then
4847
						list[1].Archivable = true
4848-
				parentIndex = nil
4848+
						ypcall(function()PromptSaveInstance(list[1]:Clone())end)
4849-
				parentHighlight.Visible = false
4849+
					elseif #list > 1 then
4850-
				if pos.x >= 0 and pos.x <= size.x and pos.y >= 0 and pos.y <= size.y + ENTRY_SIZE*2 then
4850+
						local newModel = Instance.new("Model")
4851-
					local i = math.ceil(pos.y/ENTRY_BOUND-2)
4851+
						newModel.Name = "SavedInstances"
4852-
					local node = TreeList[i + scrollBar.ScrollIndex]
4852+
						for i = 1,#list do
4853-
					if node and node.Object ~= object and not object:IsAncestorOf(node.Object) then
4853+
							ypcall(function()
4854-
						parentIndex = i
4854+
								list[i].Archivable = true
4855-
						local entry = listEntries[i]
4855+
								list[i]:Clone().Parent = newModel
4856-
						if entry then
4856+
4857-
							parentHighlight.Visible = true
4857+
4858-
							parentHighlight.Position = UDim2.new(0,1,0,entry.AbsolutePosition.y-listFrame.AbsolutePosition.y)
4858+
						PromptSaveInstance(newModel)
4859-
							parentHighlight.Size = UDim2.new(0,size.x-4,0,entry.AbsoluteSize.y)
4859+
4860
				elseif option == "Call Remote" then
4861
					if not Option.Modifiable then return end
4862
					local list = Selection:Get()
4863
					for i = 1,#list do
4864-
				dragGhost.Position = UDim2.new(0,dragPos.x+ghostOffset.x,0,dragPos.y+ghostOffset.y)
4864+
						if list[i]:IsA("RemoteFunction") or list[i]:IsA("RemoteEvent") then
4865-
			elseif (clickPos-dragPos).magnitude > 8 then
4865+
							PromptRemoteCaller(list[i])
4866-
				dragged = true
4866+
							break
4867-
				SetZIndex(dragGhost,9)
4867+
4868-
				dragGhost.IndentFrame.Transparency = 0.25
4868+
4869-
				dragGhost.IndentFrame.EntryText.TextColor3 = GuiColor.TextSelected
4869+
				elseif option == "View Script" then
4870-
				dragGhost.Position = UDim2.new(0,dragPos.x+ghostOffset.x,0,dragPos.y+ghostOffset.y)
4870+
					if not Option.Modifiable then return end
4871-
				dragGhost.Parent = GetScreen(listFrame)
4871+
					local list = Selection:Get()
4872-
				parentHighlight.Parent = listFrame
4872+
4873
						if list[i]:IsA("LocalScript") or list[i]:IsA("ModuleScript") then
4874
							ScriptEditorEvent:Fire(list[i])
4875
						end
4876-
		function cancelReparentDrag()
4876+
4877-
			mouseDrag.Parent = nil
4877+
4878-
			conDrag:disconnect()
4878+
4879-
			conUp:disconnect()
4879+
		currentRightClickMenu.Parent = explorerPanel.Parent
4880-
			conUp2:disconnect()
4880+
		currentRightClickMenu.Position = UDim2.new(0,mouse.X,0,mouse.Y)
4881-
			dragGhost:Destroy()
4881+
		if currentRightClickMenu.AbsolutePosition.X + currentRightClickMenu.AbsoluteSize.X > explorerPanel.AbsolutePosition.X + explorerPanel.AbsoluteSize.X then
4882-
			parentHighlight:Destroy()
4882+
			currentRightClickMenu.Position = UDim2.new(0, explorerPanel.AbsolutePosition.X + explorerPanel.AbsoluteSize.X - currentRightClickMenu.AbsoluteSize.X, 0, mouse.Y)
4883-
			function cancelReparentDrag()end
4883+
4884
	end
4885
4886-
		local wasSelected = Selection.Selected[object]
4886+
	local function cancelReparentDrag()end
4887-
		if not wasSelected and Option.Selectable then
4887+
	local function cancelSelectDrag()end
4888-
			Selection:Set({object})
4888+
	do
4889
		local listEntries = {}
4890
		local nameConnLookup = {}
4891-
		conUp = mouseDrag.MouseButton1Up:connect(function()
4891+
4892-
			cancelReparentDrag()
4892+
		local mouseDrag = Create('ImageButton',{
4893-
			if dragged then
4893+
4894-
				if parentIndex then
4894+
4895-
					local parentNode = TreeList[parentIndex + scrollBar.ScrollIndex]
4895+
4896-
					if parentNode then
4896+
4897-
						parentNode.Expanded = true
4897+
4898
			Active = true;
4899-
						local parentObj = parentNode.Object
4899+
4900-
						local function parent(a,b)
4900+
4901-
							a.Parent = b
4901+
		local function dragSelect(last,add,button)
4902
			local connDrag
4903-
						if Option.Selectable then
4903+
			local conUp
4904-
							local list = Selection.List
4904+
4905-
							for i = 1,#list do
4905+
			conDrag = mouseDrag.MouseMoved:connect(function(x,y)
4906-
								pcall(parent,list[i],parentObj)
4906+
				local pos = Vector2.new(x,y) - listFrame.AbsolutePosition
4907
				local size = listFrame.AbsoluteSize
4908
				if pos.x < 0 or pos.x > size.x or pos.y < 0 or pos.y > size.y then return end
4909-
							pcall(parent,object,parentObj)
4909+
4910
				local i = math.ceil(pos.y/ENTRY_BOUND) + scrollBar.ScrollIndex
4911
				-- Mouse may have made a large step, so interpolate between the
4912
				-- last index and the current.
4913
				for n = i<last and i or last, i>last and i or last do
4914-
				-- do selection click
4914+
					local node = TreeList[n]
4915-
				if wasSelected and Option.Selectable then
4915+
					if node then
4916
						if add then
4917
							Selection:Add(node.Object)
4918
						else
4919
							Selection:Remove(node.Object)
4920-
		conUp2 = mouseDrag.MouseButton2Down:connect(function()
4920+
4921-
			cancelReparentDrag()
4921+
4922
				end
4923
				last = i
4924-
		mouseDrag.Parent = GetScreen(listFrame)
4924+
4925
4926
			function cancelSelectDrag()
4927-
	local entryTemplate = Create('ImageButton',{
4927+
				mouseDrag.Parent = nil
4928-
		Name = "Entry";
4928+
				conDrag:disconnect()
4929-
		Transparency = 1;
4929+
				conUp:disconnect()
4930-
		AutoButtonColor = false;
4930+
				function cancelSelectDrag()end
4931
			end
4932-
		Size = UDim2.new(1,0,0,ENTRY_SIZE);
4932+
4933-
		Create('Frame',{
4933+
			conUp = mouseDrag[button]:connect(cancelSelectDrag)
4934-
			Name = "IndentFrame";
4934+
4935
			mouseDrag.Parent = GetScreen(listFrame)
4936-
			BackgroundColor3 = GuiColor.Selected;
4936+
4937-
			BorderColor3 = GuiColor.BorderSelected;
4937+
4938
		local function dragReparent(object,dragGhost,clickPos,ghostOffset)
4939
			local connDrag
4940-
			Create(Icon('ImageButton',0),{
4940+
			local conUp
4941-
				Name = "Expand";
4941+
			local conUp2
4942
4943-
				Position = UDim2.new(0,-GUI_SIZE,0.5,-GUI_SIZE/2);
4943+
			local parentIndex = nil
4944
			local dragged = false
4945
4946-
			Create(Icon(nil,0),{
4946+
			local parentHighlight = Create('Frame',{
4947-
				Name = "ExplorerIcon";
4947+
				Transparency = 1;
4948-
				Position = UDim2.new(0,2+ENTRY_PADDING,0.5,-GUI_SIZE/2);
4948+
				Visible = false;
4949
				Create('Frame',{
4950
					BorderSizePixel = 0;
4951-
			Create('TextLabel',{
4951+
					BackgroundColor3 = Color3.new(0,0,0);
4952-
				Name = "EntryText";
4952+
					BackgroundTransparency = 0.1;
4953
					Position = UDim2.new(0,0,0,0);
4954-
				TextColor3 = GuiColor.Text;
4954+
					Size = UDim2.new(1,0,0,1);
4955-
				TextXAlignment = 'Left';
4955+
4956-
				TextYAlignment = 'Center';
4956+
				Create('Frame',{
4957
					BorderSizePixel = 0;
4958
					BackgroundColor3 = Color3.new(0,0,0);
4959-
				Text = "";
4959+
					BackgroundTransparency = 0.1;
4960-
				Position = UDim2.new(0,2+ENTRY_SIZE+4,0,0);
4960+
					Position = UDim2.new(1,0,0,0);
4961-
				Size = UDim2.new(1,-2,1,0);
4961+
					Size = UDim2.new(0,1,1,0);
4962
				});
4963
				Create('Frame',{
4964
					BorderSizePixel = 0;
4965
					BackgroundColor3 = Color3.new(0,0,0);
4966
					BackgroundTransparency = 0.1;
4967-
		for i = 1,self.VisibleSpace do
4967+
					Position = UDim2.new(0,0,1,0);
4968-
			local node = TreeList[i + self.ScrollIndex]
4968+
					Size = UDim2.new(1,0,0,1);
4969-
			if node then
4969+
4970
				Create('Frame',{
4971-
				if not entry then
4971+
					BorderSizePixel = 0;
4972-
					entry = Create(entryTemplate:Clone(),{
4972+
					BackgroundColor3 = Color3.new(0,0,0);
4973-
						Position = UDim2.new(0,2,0,ENTRY_BOUND*(i-1)+2);
4973+
					BackgroundTransparency = 0.1;
4974-
						Size = UDim2.new(0,nodeWidth,0,ENTRY_SIZE);
4974+
					Position = UDim2.new(0,0,0,0);
4975-
						ZIndex = listFrame.ZIndex;
4975+
					Size = UDim2.new(0,1,1,0);
4976-
					})
4976+
4977-
					listEntries[i] = entry
4977+
4978
			SetZIndex(parentHighlight,9)
4979-
					local expand = entry.IndentFrame.Expand
4979+
4980-
					expand.MouseEnter:connect(function()
4980+
			conDrag = mouseDrag.MouseMoved:connect(function(x,y)
4981-
						local node = TreeList[i + self.ScrollIndex]
4981+
				local dragPos = Vector2.new(x,y)
4982-
						if #node > 0 then
4982+
				if dragged then
4983-
							if node.Expanded then
4983+
					local pos = dragPos - listFrame.AbsolutePosition
4984-
								Icon(expand,NODE_EXPANDED_OVER)
4984+
					local size = listFrame.AbsoluteSize
4985
4986-
								Icon(expand,NODE_COLLAPSED_OVER)
4986+
					parentIndex = nil
4987
					parentHighlight.Visible = false
4988
					if pos.x >= 0 and pos.x <= size.x and pos.y >= 0 and pos.y <= size.y + ENTRY_SIZE*2 then
4989
						local i = math.ceil(pos.y/ENTRY_BOUND-2)
4990-
					expand.MouseLeave:connect(function()
4990+
						local node = TreeList[i + scrollBar.ScrollIndex]
4991-
						local node = TreeList[i + self.ScrollIndex]
4991+
						if node and node.Object ~= object and not object:IsAncestorOf(node.Object) then
4992-
						if #node > 0 then
4992+
							parentIndex = i
4993-
							if node.Expanded then
4993+
							local entry = listEntries[i]
4994-
								Icon(expand,NODE_EXPANDED)
4994+
							if entry then
4995
								parentHighlight.Visible = true
4996-
								Icon(expand,NODE_COLLAPSED)
4996+
								parentHighlight.Position = UDim2.new(0,1,0,entry.AbsolutePosition.y-listFrame.AbsolutePosition.y)
4997
								parentHighlight.Size = UDim2.new(0,size.x-4,0,entry.AbsoluteSize.y)
4998
							end
4999
						end
5000-
					expand.MouseButton1Down:connect(function()
5000+
5001-
						local node = TreeList[i + self.ScrollIndex]
5001+
5002-
						if #node > 0 then
5002+
					dragGhost.Position = UDim2.new(0,dragPos.x+ghostOffset.x,0,dragPos.y+ghostOffset.y)
5003-
							node.Expanded = not node.Expanded
5003+
				elseif (clickPos-dragPos).magnitude > 8 then
5004-
							if node.Object == explorerPanel.Parent and node.Expanded then
5004+
					dragged = true
5005-
								CreateCaution("Warning","Please be careful when editing instances inside here, this is like the System32 of Dex and modifying objects here can break Dex.")
5005+
					SetZIndex(dragGhost,9)
5006
					dragGhost.IndentFrame.Transparency = 0.25
5007-
							-- use raw update so the list updates instantly
5007+
					dragGhost.IndentFrame.EntryText.TextColor3 = GuiColor.TextSelected
5008-
							rawUpdateList()
5008+
					dragGhost.Position = UDim2.new(0,dragPos.x+ghostOffset.x,0,dragPos.y+ghostOffset.y)
5009
					dragGhost.Parent = GetScreen(listFrame)
5010
					parentHighlight.Parent = listFrame
5011
				end
5012-
					entry.MouseButton1Down:connect(function(x,y)
5012+
5013-
						local node = TreeList[i + self.ScrollIndex]
5013+
5014-
						DestroyRightClick()
5014+
			function cancelReparentDrag()
5015-
						if GetAwaitRemote:Invoke() then
5015+
				mouseDrag.Parent = nil
5016-
							bindSetAwaiting:Fire(node.Object)
5016+
				conDrag:disconnect()
5017-
							return
5017+
				conUp:disconnect()
5018
				conUp2:disconnect()
5019-
						
5019+
				dragGhost:Destroy()
5020-
						if not HoldingShift then
5020+
				parentHighlight:Destroy()
5021-
							lastSelectedNode = i + self.ScrollIndex
5021+
				function cancelReparentDrag()end
5022
			end
5023-
						
5023+
5024-
						if HoldingShift and not filteringWorkspace() then
5024+
			local wasSelected = Selection.Selected[object]
5025-
							if lastSelectedNode then
5025+
			if not wasSelected and Option.Selectable then
5026-
								if i + self.ScrollIndex - lastSelectedNode > 0 then
5026+
				Selection:Set({object})
5027-
									Selection:StopUpdates()
5027+
5028-
									for i2 = 1, i + self.ScrollIndex - lastSelectedNode do
5028+
5029-
										local newNode = TreeList[lastSelectedNode + i2]
5029+
			conUp = mouseDrag.MouseButton1Up:connect(function()
5030-
										if newNode then
5030+
				cancelReparentDrag()
5031-
											Selection:Add(newNode.Object)
5031+
				if dragged then
5032
					if parentIndex then
5033
						local parentNode = TreeList[parentIndex + scrollBar.ScrollIndex]
5034-
									Selection:ResumeUpdates()
5034+
						if parentNode then
5035
							parentNode.Expanded = true
5036-
									Selection:StopUpdates()
5036+
5037-
									for i2 = i + self.ScrollIndex - lastSelectedNode, 1 do
5037+
							local parentObj = parentNode.Object
5038-
										local newNode = TreeList[lastSelectedNode + i2]
5038+
							local function parent(a,b)
5039-
										if newNode then
5039+
								a.Parent = b
5040-
											Selection:Add(newNode.Object)
5040+
5041
							if Option.Selectable then
5042
								local list = Selection.List
5043-
									Selection:ResumeUpdates()
5043+
								for i = 1,#list do
5044
									pcall(parent,list[i],parentObj)
5045
								end
5046-
							return
5046+
5047
								pcall(parent,object,parentObj)
5048-
						
5048+
5049-
						if HoldingCtrl then
5049+
5050-
							if Selection.Selected[node.Object] then
5050+
5051-
								Selection:Remove(node.Object)
5051+
5052
					-- do selection click
5053-
								Selection:Add(node.Object)
5053+
					if wasSelected and Option.Selectable then
5054
						Selection:Set({})
5055-
							return
5055+
5056
				end
5057-
						if Option.Modifiable then
5057+
5058-
							local pos = Vector2.new(x,y)
5058+
			conUp2 = mouseDrag.MouseButton2Down:connect(function()
5059-
							dragReparent(node.Object,entry:Clone(),pos,entry.AbsolutePosition-pos)
5059+
				cancelReparentDrag()
5060-
						elseif Option.Selectable then
5060+
5061-
							if Selection.Selected[node.Object] then
5061+
5062-
								Selection:Set({})
5062+
			mouseDrag.Parent = GetScreen(listFrame)
5063
		end
5064
5065
		local entryTemplate = Create('ImageButton',{
5066-
							dragSelect(i+self.ScrollIndex,true,'MouseButton1Up')
5066+
			Name = "Entry";
5067
			Transparency = 1;
5068
			AutoButtonColor = false;
5069
			Position = UDim2.new(0,0,0,0);
5070-
					entry.MouseButton2Down:connect(function()
5070+
			Size = UDim2.new(1,0,0,ENTRY_SIZE);
5071-
						if not Option.Selectable then return end
5071+
5072-
						
5072+
				Name = "IndentFrame";
5073-
						DestroyRightClick()
5073+
5074-
						
5074+
				BackgroundColor3 = GuiColor.Selected;
5075-
						curSelect = entry
5075+
				BorderColor3 = GuiColor.BorderSelected;
5076-
						
5076+
5077-
						local node = TreeList[i + self.ScrollIndex]
5077+
				Size = UDim2.new(1,0,1,0);
5078-
						
5078+
				Create(Icon('ImageButton',0),{
5079-
						if GetAwaitRemote:Invoke() then
5079+
					Name = "Expand";
5080-
							bindSetAwaiting:Fire(node.Object)
5080+
5081-
							return
5081+
					Position = UDim2.new(0,-GUI_SIZE,0.5,-GUI_SIZE/2);
5082
					Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE);
5083-
						
5083+
5084-
						if not Selection.Selected[node.Object] then
5084+
				Create(Icon(nil,0),{
5085-
							Selection:Set({node.Object})
5085+
					Name = "ExplorerIcon";
5086
					Position = UDim2.new(0,2+ENTRY_PADDING,0.5,-GUI_SIZE/2);
5087
					Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE);
5088-
					
5088+
5089-
					
5089+
				Create('TextLabel',{
5090-
					entry.MouseButton2Up:connect(function()
5090+
					Name = "EntryText";
5091-
						if not Option.Selectable then return end
5091+
5092-
						
5092+
					TextColor3 = GuiColor.Text;
5093-
						local node = TreeList[i + self.ScrollIndex]
5093+
					TextXAlignment = 'Left';
5094-
						
5094+
					TextYAlignment = 'Center';
5095-
						if checkMouseInGui(curSelect) then
5095+
					Font = FONT;
5096-
							rightClickMenu(node.Object)
5096+
					FontSize = FONT_SIZE;
5097
					Text = "";
5098
					Position = UDim2.new(0,2+ENTRY_SIZE+4,0,0);
5099
					Size = UDim2.new(1,-2,1,0);
5100-
					entry.Parent = listFrame
5100+
5101
			});
5102
		})
5103-
				entry.Visible = true
5103+
5104
		function scrollBar.UpdateCallback(self)
5105-
				local object = node.Object
5105+
			for i = 1,self.VisibleSpace do
5106
				local node = TreeList[i + self.ScrollIndex]
5107-
				-- update expand icon
5107+
5108-
				if #node == 0 then
5108+
					local entry = listEntries[i]
5109-
					entry.IndentFrame.Expand.Visible = false
5109+
					if not entry then
5110-
				elseif node.Expanded then
5110+
						entry = Create(entryTemplate:Clone(),{
5111-
					Icon(entry.IndentFrame.Expand,NODE_EXPANDED)
5111+
							Position = UDim2.new(0,2,0,ENTRY_BOUND*(i-1)+2);
5112-
					entry.IndentFrame.Expand.Visible = true
5112+
							Size = UDim2.new(0,nodeWidth,0,ENTRY_SIZE);
5113
							ZIndex = listFrame.ZIndex;
5114-
					Icon(entry.IndentFrame.Expand,NODE_COLLAPSED)
5114+
						})
5115-
					entry.IndentFrame.Expand.Visible = true
5115+
						listEntries[i] = entry
5116
5117
						local expand = entry.IndentFrame.Expand
5118-
				-- update explorer icon
5118+
						expand.MouseEnter:connect(function()
5119-
				Icon(entry.IndentFrame.ExplorerIcon,ExplorerIndex[object.ClassName] or 0)
5119+
							local node = TreeList[i + self.ScrollIndex]
5120
							if #node > 0 then
5121-
				-- update indentation
5121+
								if node.Expanded then
5122-
				local w = (node.Depth)*(2+ENTRY_PADDING+GUI_SIZE)
5122+
									Icon(expand,NODE_EXPANDED_OVER)
5123-
				entry.IndentFrame.Position = UDim2.new(0,w,0,0)
5123+
5124-
				entry.IndentFrame.Size = UDim2.new(1,-w,1,0)
5124+
									Icon(expand,NODE_COLLAPSED_OVER)
5125
								end
5126-
				-- update name change detection
5126+
5127-
				if nameConnLookup[entry] then
5127+
5128-
					nameConnLookup[entry]:disconnect()
5128+
						expand.MouseLeave:connect(function()
5129
							local node = TreeList[i + self.ScrollIndex]
5130-
				local text = entry.IndentFrame.EntryText
5130+
							if #node > 0 then
5131-
				text.Text = object.Name
5131+
								if node.Expanded then
5132-
				nameConnLookup[entry] = node.Object.Changed:connect(function(p)
5132+
									Icon(expand,NODE_EXPANDED)
5133-
					if p == 'Name' then
5133+
5134-
						text.Text = object.Name
5134+
									Icon(expand,NODE_COLLAPSED)
5135
								end
5136
							end
5137
						end)
5138-
				-- update selection
5138+
						expand.MouseButton1Down:connect(function()
5139-
				entry.IndentFrame.Transparency = node.Selected and 0 or 1
5139+
							local node = TreeList[i + self.ScrollIndex]
5140-
				text.TextColor3 = GuiColor[node.Selected and 'TextSelected' or 'Text']
5140+
							if #node > 0 then
5141
								node.Expanded = not node.Expanded
5142-
				entry.Size = UDim2.new(0,nodeWidth,0,ENTRY_SIZE)
5142+
								if node.Object == explorerPanel.Parent and node.Expanded then
5143-
			elseif listEntries[i] then
5143+
									CreateCaution("Warning","Please be careful when editing instances inside here, this is like the System32 of Dex and modifying objects here can break Dex.")
5144-
				listEntries[i].Visible = false
5144+
5145
								-- use raw update so the list updates instantly
5146
								rawUpdateList()
5147-
		for i = self.VisibleSpace+1,self.TotalSpace do
5147+
5148-
			local entry = listEntries[i]
5148+
5149-
			if entry then
5149+
5150-
				listEntries[i] = nil
5150+
						entry.MouseButton1Down:connect(function(x,y)
5151-
				entry:Destroy()
5151+
							local node = TreeList[i + self.ScrollIndex]
5152
							DestroyRightClick()
5153
							if GetAwaitRemote:Invoke() then
5154
								bindSetAwaiting:Fire(node.Object)
5155
								return
5156
							end
5157-
		for i = 1,scrollBar.VisibleSpace do
5157+
5158-
			local node = TreeList[i + scrollBar.ScrollIndex]
5158+
							if not HoldingShift then
5159-
			if node then
5159+
								lastSelectedNode = i + self.ScrollIndex
5160
							end
5161
5162-
					entry.Position = UDim2.new(0,2 - scrollBarH.ScrollIndex,0,ENTRY_BOUND*(i-1)+2)
5162+
							if HoldingShift and not filteringWorkspace() then
5163
								if lastSelectedNode then
5164
									if i + self.ScrollIndex - lastSelectedNode > 0 then
5165
										Selection:StopUpdates()
5166
										for i2 = 1, i + self.ScrollIndex - lastSelectedNode do
5167
											local newNode = TreeList[lastSelectedNode + i2]
5168-
	Connect(listFrame.Changed,function(p)
5168+
											if newNode then
5169-
		if p == 'AbsoluteSize' then
5169+
												Selection:Add(newNode.Object)
5170
											end
5171
										end
5172
										Selection:ResumeUpdates()
5173
									else
5174-
	local wheelAmount = 6
5174+
										Selection:StopUpdates()
5175-
	explorerPanel.MouseWheelForward:connect(function()
5175+
										for i2 = i + self.ScrollIndex - lastSelectedNode, 1 do
5176-
		if scrollBar.VisibleSpace - 1 > wheelAmount then
5176+
											local newNode = TreeList[lastSelectedNode + i2]
5177-
			scrollBar:ScrollTo(scrollBar.ScrollIndex - wheelAmount)
5177+
											if newNode then
5178
												Selection:Add(newNode.Object)
5179-
			scrollBar:ScrollTo(scrollBar.ScrollIndex - scrollBar.VisibleSpace)
5179+
											end
5180
										end
5181
										Selection:ResumeUpdates()
5182-
	explorerPanel.MouseWheelBackward:connect(function()
5182+
5183-
		if scrollBar.VisibleSpace - 1 > wheelAmount then
5183+
5184-
			scrollBar:ScrollTo(scrollBar.ScrollIndex + wheelAmount)
5184+
								return
5185
							end
5186-
			scrollBar:ScrollTo(scrollBar.ScrollIndex + scrollBar.VisibleSpace)
5186+
5187
							if HoldingCtrl then
5188
								if Selection.Selected[node.Object] then
5189
									Selection:Remove(node.Object)
5190
								else
5191-
----------------------------------------------------------------
5191+
									Selection:Add(node.Object)
5192-
----------------------------------------------------------------
5192+
5193-
----------------------------------------------------------------
5193+
								return
5194-
----------------------------------------------------------------
5194+
5195-
---- Object detection
5195+
							if Option.Modifiable then
5196
								local pos = Vector2.new(x,y)
5197-
-- Inserts `v` into `t` at `i`. Also sets `Index` field in `v`.
5197+
								dragReparent(node.Object,entry:Clone(),pos,entry.AbsolutePosition-pos)
5198-
local function insert(t,i,v)
5198+
							elseif Option.Selectable then
5199-
	for n = #t,i,-1 do
5199+
								if Selection.Selected[node.Object] then
5200-
		local v = t[n]
5200+
									Selection:Set({})
5201-
		v.Index = n+1
5201+
5202-
		t[n+1] = v
5202+
									Selection:Set({node.Object})
5203
								end
5204-
	v.Index = i
5204+
								dragSelect(i+self.ScrollIndex,true,'MouseButton1Up')
5205-
	t[i] = v
5205+
5206
						end)
5207
5208-
-- Removes `i` from `t`. Also sets `Index` field in removed value.
5208+
						entry.MouseButton2Down:connect(function()
5209-
local function remove(t,i)
5209+
							if not Option.Selectable then return end
5210-
	local v = t[i]
5210+
5211-
	for n = i+1,#t do
5211+
							DestroyRightClick()
5212-
		local v = t[n]
5212+
5213-
		v.Index = n-1
5213+
							curSelect = entry
5214-
		t[n-1] = v
5214+
5215
							local node = TreeList[i + self.ScrollIndex]
5216-
	t[#t] = nil
5216+
5217-
	v.Index = 0
5217+
							if GetAwaitRemote:Invoke() then
5218-
	return v
5218+
								bindSetAwaiting:Fire(node.Object)
5219
								return
5220
							end
5221-
-- Returns how deep `o` is in the tree.
5221+
5222-
local function depth(o)
5222+
							if not Selection.Selected[node.Object] then
5223-
	local d = -1
5223+
5224-
	while o do
5224+
5225-
		o = o.Parent
5225+
5226-
		d = d + 1
5226+
5227
5228-
	return d
5228+
						entry.MouseButton2Up:connect(function()
5229
							if not Option.Selectable then return end
5230
5231
							local node = TreeList[i + self.ScrollIndex]
5232-
local connLookup = {}
5232+
5233
							if checkMouseInGui(curSelect) then
5234-
-- Returns whether a node would be present in the tree list
5234+
								rightClickMenu(node.Object)
5235-
local function nodeIsVisible(node)
5235+
5236-
	local visible = true
5236+
5237-
	node = node.Parent
5237+
5238-
	while node and visible do
5238+
						entry.Parent = listFrame
5239-
		visible = visible and node.Expanded
5239+
5240
5241
					entry.Visible = true
5242-
	return visible
5242+
5243
					local object = node.Object
5244
5245-
-- Removes an object's tree node. Called when the object stops existing in the
5245+
					-- update expand icon
5246-
-- game tree.
5246+
					if #node == 0 then
5247-
local function removeObject(object)
5247+
						entry.IndentFrame.Expand.Visible = false
5248-
	local objectNode = NodeLookup[object]
5248+
					elseif node.Expanded then
5249-
	if not objectNode then
5249+
						Icon(entry.IndentFrame.Expand,NODE_EXPANDED)
5250-
		return
5250+
						entry.IndentFrame.Expand.Visible = true
5251
					else
5252
						Icon(entry.IndentFrame.Expand,NODE_COLLAPSED)
5253-
	local visible = nodeIsVisible(objectNode)
5253+
						entry.IndentFrame.Expand.Visible = true
5254
					end
5255-
	Selection:Remove(object,true)
5255+
5256
					-- update explorer icon
5257-
	local parent = objectNode.Parent
5257+
					Icon(entry.IndentFrame.ExplorerIcon,ExplorerIndex[object.ClassName] or 0)
5258-
	remove(parent,objectNode.Index)
5258+
5259-
	NodeLookup[object] = nil
5259+
					-- update indentation
5260-
	connLookup[object]:disconnect()
5260+
					local w = (node.Depth)*(2+ENTRY_PADDING+GUI_SIZE)
5261-
	connLookup[object] = nil
5261+
					entry.IndentFrame.Position = UDim2.new(0,w,0,0)
5262
					entry.IndentFrame.Size = UDim2.new(1,-w,1,0)
5263-
	if visible then
5263+
5264
					-- update name change detection
5265-
	elseif nodeIsVisible(parent) then
5265+
					if nameConnLookup[entry] then
5266-
		updateScroll()
5266+
						nameConnLookup[entry]:disconnect()
5267
					end
5268
					local text = entry.IndentFrame.EntryText
5269
					text.Text = object.Name
5270-
-- Moves a tree node to a new parent. Called when an existing object's parent
5270+
					nameConnLookup[entry] = node.Object.Changed:connect(function(p)
5271-
-- changes.
5271+
						if p == 'Name' then
5272-
local function moveObject(object,parent)
5272+
							text.Text = object.Name
5273-
	local objectNode = NodeLookup[object]
5273+
5274-
	if not objectNode then
5274+
5275-
		return
5275+
5276
					-- update selection
5277
					entry.IndentFrame.Transparency = node.Selected and 0 or 1
5278-
	local parentNode = NodeLookup[parent]
5278+
					text.TextColor3 = GuiColor[node.Selected and 'TextSelected' or 'Text']
5279-
	if not parentNode then
5279+
5280-
		return
5280+
					entry.Size = UDim2.new(0,nodeWidth,0,ENTRY_SIZE)
5281
				elseif listEntries[i] then
5282
					listEntries[i].Visible = false
5283-
	local visible = nodeIsVisible(objectNode)
5283+
5284
			end
5285-
	remove(objectNode.Parent,objectNode.Index)
5285+
			for i = self.VisibleSpace+1,self.TotalSpace do
5286-
	objectNode.Parent = parentNode
5286+
5287
				if entry then
5288-
	objectNode.Depth = depth(object)
5288+
					listEntries[i] = nil
5289-
	local function r(node,d)
5289+
					entry:Destroy()
5290-
		for i = 1,#node do
5290+
5291-
			node[i].Depth = d
5291+
5292-
			r(node[i],d+1)
5292+
5293
5294
		function scrollBarH.UpdateCallback(self)
5295-
	r(objectNode,objectNode.Depth+1)
5295+
			for i = 1,scrollBar.VisibleSpace do
5296
				local node = TreeList[i + scrollBar.ScrollIndex]
5297-
	insert(parentNode,#parentNode+1,objectNode)
5297+
5298
					local entry = listEntries[i]
5299-
	if visible or nodeIsVisible(objectNode) then
5299+
					if entry then
5300
						entry.Position = UDim2.new(0,2 - scrollBarH.ScrollIndex,0,ENTRY_BOUND*(i-1)+2)
5301-
	elseif nodeIsVisible(objectNode.Parent) then
5301+
5302-
		updateScroll()
5302+
5303
			end
5304
		end
5305
5306-
-- ScriptContext['/Libraries/LibraryRegistration/LibraryRegistration']
5306+
		Connect(listFrame.Changed,function(p)
5307-
-- This RobloxLocked object lets me index its properties for some reason
5307+
			if p == 'AbsoluteSize' then
5308
				rawUpdateSize()
5309-
local function check(object)
5309+
5310-
	return object.AncestryChanged
5310+
5311
5312
		local wheelAmount = 6
5313-
-- Creates a new tree node from an object. Called when an object starts
5313+
		explorerPanel.MouseWheelForward:connect(function()
5314-
-- existing in the game tree.
5314+
			if scrollBar.VisibleSpace - 1 > wheelAmount then
5315-
local function addObject(object,noupdate)
5315+
				scrollBar:ScrollTo(scrollBar.ScrollIndex - wheelAmount)
5316-
	if script then
5316+
5317-
		-- protect against naughty RobloxLocked objects
5317+
				scrollBar:ScrollTo(scrollBar.ScrollIndex - scrollBar.VisibleSpace)
5318-
		local s = pcall(check,object)
5318+
5319-
		if not s then
5319+
5320
		explorerPanel.MouseWheelBackward:connect(function()
5321
			if scrollBar.VisibleSpace - 1 > wheelAmount then
5322
				scrollBar:ScrollTo(scrollBar.ScrollIndex + wheelAmount)
5323
			else
5324-
	local parentNode = NodeLookup[object.Parent]
5324+
				scrollBar:ScrollTo(scrollBar.ScrollIndex + scrollBar.VisibleSpace)
5325-
	if not parentNode then
5325+
5326-
		return
5326+
5327
	end
5328
5329-
	local objectNode = {
5329+
	----------------------------------------------------------------
5330-
		Object = object;
5330+
	----------------------------------------------------------------
5331-
		Parent = parentNode;
5331+
	----------------------------------------------------------------
5332-
		Index = 0;
5332+
	----------------------------------------------------------------
5333-
		Expanded = false;
5333+
	---- Object detection
5334-
		Selected = false;
5334+
5335-
		Depth = depth(object);
5335+
	-- Inserts `v` into `t` at `i`. Also sets `Index` field in `v`.
5336
	local function insert(t,i,v)
5337
		for n = #t,i,-1 do
5338-
	connLookup[object] = Connect(object.AncestryChanged,function(c,p)
5338+
			local v = t[n]
5339-
		if c == object then
5339+
			v.Index = n+1
5340-
			if p == nil then
5340+
			t[n+1] = v
5341-
				removeObject(c)
5341+
5342
		v.Index = i
5343-
				moveObject(c,p)
5343+
		t[i] = v
5344
	end
5345
5346
	-- Removes `i` from `t`. Also sets `Index` field in removed value.
5347
	local function remove(t,i)
5348-
	NodeLookup[object] = objectNode
5348+
		local v = t[i]
5349-
	insert(parentNode,#parentNode+1,objectNode)
5349+
		for n = i+1,#t do
5350
			local v = t[n]
5351-
	if not noupdate then
5351+
			v.Index = n-1
5352-
		if nodeIsVisible(objectNode) then
5352+
			t[n-1] = v
5353
		end
5354
		t[#t] = nil
5355
		v.Index = 0
5356
		return v
5357
	end
5358
5359
	-- Returns how deep `o` is in the tree.
5360-
local function makeObject(obj,par)
5360+
	local function depth(o)
5361-
	local newObject = Instance.new(obj.ClassName)
5361+
		local d = -1
5362-
	for i,v in pairs(obj.Properties) do
5362+
		while o do
5363-
		ypcall(function()
5363+
			o = o.Parent
5364-
			local newProp
5364+
			d = d + 1
5365-
			newProp = ToPropValue(v.Value,v.Type)
5365+
5366-
			newObject[v.Name] = newProp
5366+
		return d
5367
	end
5368
5369-
	newObject.Parent = par
5369+
5370
	local connLookup = {}
5371
5372-
local function writeObject(obj)
5372+
	-- Returns whether a node would be present in the tree list
5373-
	local newObject = {ClassName = obj.ClassName, Properties = {}}
5373+
	local function nodeIsVisible(node)
5374-
	for i,v in pairs(RbxApi.GetProperties(obj.className)) do
5374+
		local visible = true
5375-
		if v["Name"] ~= "Parent" then
5375+
5376-
			print("thispassed")
5376+
		while node and visible do
5377-
			table.insert(newObject.Properties,{Name = v["Name"], Type = v["ValueType"], Value = tostring(obj[v["Name"]])})
5377+
			visible = visible and node.Expanded
5378
			node = node.Parent
5379
		end
5380-
	return newObject
5380+
		return visible
5381
	end
5382
5383-
local function buildDexStorage()
5383+
	-- Removes an object's tree node. Called when the object stops existing in the
5384-
	local localDexStorage
5384+
	-- game tree.
5385
	local function removeObject(object)
5386
		local objectNode = NodeLookup[object]
5387-
		localDexStorage = game:GetObjects("rbxasset://DexStorage.rbxm")[1]
5387+
		if not objectNode then
5388
			return
5389
		end
5390-
	if success and localDexStorage then
5390+
5391-
		for i,v in pairs(localDexStorage:GetChildren()) do
5391+
		local visible = nodeIsVisible(objectNode)
5392
5393-
				v.Parent = DexStorageMain
5393+
		Selection:Remove(object,true)
5394
5395
		local parent = objectNode.Parent
5396
		remove(parent,objectNode.Index)
5397
		NodeLookup[object] = nil
5398-
	updateDexStorageListeners()
5398+
		connLookup[object]:disconnect()
5399
		connLookup[object] = nil
5400
5401
		if visible then
5402
			updateList()
5403
		elseif nodeIsVisible(parent) then
5404
			updateScroll()
5405
		end
5406
	end
5407
5408
	-- Moves a tree node to a new parent. Called when an existing object's parent
5409
	-- changes.
5410
	local function moveObject(object,parent)
5411
		local objectNode = NodeLookup[object]
5412-
local dexStorageDebounce = false
5412+
		if not objectNode then
5413-
local dexStorageListeners = {}
5413+
5414
		end
5415-
local function updateDexStorage()
5415+
5416-
	if dexStorageDebounce then return end
5416+
		local parentNode = NodeLookup[parent]
5417-
	dexStorageDebounce = true	
5417+
		if not parentNode then
5418
			return
5419
		end
5420
5421-
	pcall(function()
5421+
		local visible = nodeIsVisible(objectNode)
5422-
		saveinstance("content//DexStorage.rbxm",DexStorageMain)
5422+
5423
		remove(objectNode.Parent,objectNode.Index)
5424
		objectNode.Parent = parentNode
5425-
	updateDexStorageListeners()
5425+
5426
		objectNode.Depth = depth(object)
5427-
	dexStorageDebounce = false
5427+
		local function r(node,d)
5428
			for i = 1,#node do
5429
				node[i].Depth = d
5430
				r(node[i],d+1)
5431
			end
5432
		end
5433
		r(objectNode,objectNode.Depth+1)
5434
5435
		insert(parentNode,#parentNode+1,objectNode)
5436
5437
		if visible or nodeIsVisible(objectNode) then
5438
			updateList()
5439
		elseif nodeIsVisible(objectNode.Parent) then
5440
			updateScroll()
5441
		end
5442
	end
5443
5444-
function updateDexStorageListeners()
5444+
	-- ScriptContext['/Libraries/LibraryRegistration/LibraryRegistration']
5445-
	for i,v in pairs(dexStorageListeners) do
5445+
	-- This RobloxLocked object lets me index its properties for some reason
5446-
		v:Disconnect()
5446+
5447
	local function check(object)
5448-
	dexStorageListeners = {}
5448+
		return object.AncestryChanged
5449-
	for i,v in pairs(DexStorageMain:GetChildren()) do
5449+
5450
5451-
			local ev = v.Changed:connect(updateDexStorage)
5451+
	-- Creates a new tree node from an object. Called when an object starts
5452-
			table.insert(dexStorageListeners,ev)
5452+
	-- existing in the game tree.
5453
	local function addObject(object,noupdate)
5454
		if script then
5455
			-- protect against naughty RobloxLocked objects
5456
			local s = pcall(check,object)
5457
			if not s then
5458-
	NodeLookup[workspace.Parent] = {
5458+
5459-
		Object = workspace.Parent;
5459+
5460-
		Parent = nil;
5460+
5461-
		Index = 0;
5461+
5462-
		Expanded = true;
5462+
		local parentNode = NodeLookup[object.Parent]
5463
		if not parentNode then
5464
			return
5465-
	NodeLookup[DexOutput] = {
5465+
5466-
		Object = DexOutput;
5466+
5467-
		Parent = nil;
5467+
		local objectNode = {
5468-
		Index = 0;
5468+
			Object = object;
5469-
		Expanded = true;
5469+
			Parent = parentNode;
5470
			Index = 0;
5471
			Expanded = false;
5472
			Selected = false;
5473-
		NodeLookup[DexStorage] = {
5473+
			Depth = depth(object);
5474-
			Object = DexStorage;
5474+
5475
5476
		connLookup[object] = Connect(object.AncestryChanged,function(c,p)
5477
			if c == object then
5478
				if p == nil then
5479
					removeObject(c)
5480
				else
5481
					moveObject(c,p)
5482-
		NodeLookup[NilStorage] = {
5482+
5483-
			Object = NilStorage;
5483+
5484
		end)
5485
5486
		NodeLookup[object] = objectNode
5487
		insert(parentNode,#parentNode+1,objectNode)
5488
5489
		if not noupdate then
5490-
	Connect(game.DescendantAdded,addObject)
5490+
			if nodeIsVisible(objectNode) then
5491-
	Connect(game.DescendantRemoving,removeObject)
5491+
				updateList()
5492
			elseif nodeIsVisible(objectNode.Parent) then
5493-
	Connect(DexOutput.DescendantAdded,addObject)
5493+
				updateScroll()
5494-
	Connect(DexOutput.DescendantRemoving,removeObject)
5494+
5495
		end
5496
	end
5497
5498
	local function makeObject(obj,par)
5499
		local newObject = Instance.new(obj.ClassName)
5500
		for i,v in pairs(obj.Properties) do
5501
			ypcall(function()
5502
				local newProp
5503-
		buildDexStorage()
5503+
				newProp = ToPropValue(v.Value,v.Type)
5504
				newObject[v.Name] = newProp
5505-
		Connect(DexStorage.DescendantAdded,addObject)
5505+
5506-
		Connect(DexStorage.DescendantRemoving,removeObject)
5506+
5507
		newObject.Parent = par
5508-
		Connect(DexStorage.DescendantAdded,updateDexStorage)
5508+
5509-
		Connect(DexStorage.DescendantRemoving,updateDexStorage)
5509+
5510
	local function writeObject(obj)
5511
		local newObject = {ClassName = obj.ClassName, Properties = {}}
5512
		for i,v in pairs(RbxApi.GetProperties(obj.className)) do
5513-
		Connect(NilStorage.DescendantAdded,addObject)
5513+
			if v["Name"] ~= "Parent" then
5514-
		Connect(NilStorage.DescendantRemoving,removeObject)		
5514+
				print("thispassed")
5515
				table.insert(newObject.Properties,{Name = v["Name"], Type = v["ValueType"], Value = tostring(obj[v["Name"]])})
5516-
		local currentTable = get_nil_instances()	
5516+
5517
		end
5518-
		spawn(function()
5518+
		return newObject
5519-
			while wait() do
5519+
5520-
				if #currentTable ~= #get_nil_instances() then
5520+
5521-
					currentTable = get_nil_instances()
5521+
	local function buildDexStorage()
5522-
					--NilStorageMain:ClearAllChildren()
5522+
		local localDexStorage
5523-
					for i,v in pairs(get_nil_instances()) do
5523+
5524-
						if v ~= NilStorage and v ~= DexStorage then
5524+
5525
			localDexStorage = game:GetObjects("rbxasset://DexStorage.rbxm")[1]
5526-
								v.Parent = NilStorageMain
5526+
5527
5528
		if success and localDexStorage then
5529
			for i,v in pairs(localDexStorage:GetChildren()) do
5530
				ypcall(function()
5531
					v.Parent = DexStorageMain
5532
				end)
5533
			end
5534
		end
5535
5536
		updateDexStorageListeners()
5537
	--[[
5538
	local localDexStorage = readfile(getelysianpath().."DexStorage.txt")--game:GetService("CookiesService"):GetCookieValue("DexStorage")
5539
	--local success,err = pcall(function()
5540-
	local function get(o)
5540+
5541-
		return o:GetChildren()
5541+
5542
			for i,v in pairs(objTable) do
5543
				makeObject(v,DexStorageMain)
5544-
	local function r(o)
5544+
5545-
		local s,children = pcall(get,o)
5545+
5546-
		if s then
5546+
5547-
			for i = 1,#children do
5547+
5548-
				addObject(children[i],true)
5548+
5549-
				r(children[i])
5549+
5550
	local dexStorageDebounce = false
5551
	local dexStorageListeners = {}
5552
5553
	local function updateDexStorage()
5554-
	r(workspace.Parent)
5554+
		if dexStorageDebounce then return end
5555-
	r(DexOutput)
5555+
		dexStorageDebounce = true	
5556
5557-
		r(DexStorage)
5557+
		wait()
5558
5559
		pcall(function()
5560-
		r(NilStorage)
5560+
			saveinstance("content//DexStorage.rbxm",DexStorageMain)
5561
		end)
5562
5563-
	scrollBar.VisibleSpace = math.ceil(listFrame.AbsoluteSize.y/ENTRY_BOUND)
5563+
		updateDexStorageListeners()
5564-
	updateList()
5564+
5565
		dexStorageDebounce = false
5566
	--[[
5567-
----------------------------------------------------------------
5567+
5568-
----------------------------------------------------------------
5568+
5569-
----------------------------------------------------------------
5569+
5570-
----------------------------------------------------------------
5570+
5571-
---- Actions
5571+
5572
		writefile(getelysianpath().."DexStorage.txt",game:GetService("HttpService"):JSONEncode(objs))
5573-
local actionButtons do
5573+
5574-
	actionButtons = {}
5574+
5575
	if err then
5576-
	local totalActions = 1
5576+
5577-
	local currentActions = totalActions
5577+
5578-
	local function makeButton(icon,over,name,vis,cond)
5578+
5579-
		local buttonEnabled = false
5579+
5580
	end
5581-
		local button = Create(Icon('ImageButton',icon),{
5581+
5582-
			Name = name .. "Button";
5582+
	function updateDexStorageListeners()
5583-
			Visible = Option.Modifiable and Option.Selectable;
5583+
		for i,v in pairs(dexStorageListeners) do
5584-
			Position = UDim2.new(1,-(GUI_SIZE+2)*currentActions+2,0.25,-GUI_SIZE/2);
5584+
			v:Disconnect()
5585-
			Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE);
5585+
5586-
			Parent = headerFrame;
5586+
		dexStorageListeners = {}
5587
		for i,v in pairs(DexStorageMain:GetChildren()) do
5588
			pcall(function()
5589-
		local tipText = Create('TextLabel',{
5589+
				local ev = v.Changed:connect(updateDexStorage)
5590-
			Name = name .. "Text";
5590+
				table.insert(dexStorageListeners,ev)
5591-
			Text = name;
5591+
5592
		end
5593
	end
5594-
			TextXAlignment = 'Right';
5594+
5595
	do
5596
		NodeLookup[workspace.Parent] = {
5597
			Object = workspace.Parent;
5598-
			Size = UDim2.new(1,-(GUI_SIZE+2)*totalActions,1,0);
5598+
5599-
			Parent = headerFrame;
5599+
5600
			Expanded = true;
5601
		}
5602
5603
		NodeLookup[DexOutput] = {
5604-
			if buttonEnabled then
5604+
			Object = DexOutput;
5605-
				button.BackgroundTransparency = 0.9
5605+
5606
			Index = 0;
5607-
			--Icon(button,over)
5607+
5608-
			--tipText.Visible = true
5608+
5609
5610
		if DexStorageEnabled then
5611-
			button.BackgroundTransparency = 1
5611+
			NodeLookup[DexStorage] = {
5612-
			--Icon(button,icon)
5612+
				Object = DexStorage;
5613-
			--tipText.Visible = false
5613+
				Parent = nil;
5614
				Index = 0;
5615
				Expanded = true;
5616-
		currentActions = currentActions + 1
5616+
			}
5617-
		actionButtons[#actionButtons+1] = {Obj = button,Cond = cond}
5617+
5618-
		QuickButtons[#actionButtons+1] = {Obj = button,Cond = cond, Toggle = function(on)
5618+
5619
		if NilStorageEnabled then
5620-
				buttonEnabled = true
5620+
			NodeLookup[NilStorage] = {
5621-
				Icon(button,over)
5621+
				Object = NilStorage;
5622
				Parent = nil;
5623-
				buttonEnabled = false
5623+
				Index = 0;
5624-
				Icon(button,icon)
5624+
				Expanded = true;
5625
			}
5626
		end
5627
5628
		Connect(game.DescendantAdded,addObject)
5629
		Connect(game.DescendantRemoving,removeObject)
5630-
	--local clipboard = {}
5630+
5631
		Connect(DexOutput.DescendantAdded,addObject)
5632
		Connect(DexOutput.DescendantRemoving,removeObject)
5633
5634
		if DexStorageEnabled then
5635-
	makeButton(ACTION_EDITQUICKACCESS,ACTION_EDITQUICKACCESS,"Options",true,function()return true end).MouseButton1Click:connect(function()
5635+
5636
		if readfile(getelysianpath().."DexStorage.txt") == nil then
5637
			writefile(getelysianpath().."DexStorage.txt","")
5638
		end
5639
		--]]
5640-
	-- DELETE
5640+
5641-
	makeButton(ACTION_DELETE,ACTION_DELETE_OVER,"Delete",true,function() return #Selection:Get() > 0 end).MouseButton1Click:connect(function()
5641+
			buildDexStorage()
5642-
		if not Option.Modifiable then return end
5642+
5643-
		local list = Selection:Get()
5643+
			Connect(DexStorage.DescendantAdded,addObject)
5644-
		for i = 1,#list do
5644+
			Connect(DexStorage.DescendantRemoving,removeObject)
5645-
			pcall(delete,list[i])
5645+
5646
			Connect(DexStorage.DescendantAdded,updateDexStorage)
5647-
		Selection:Set({})
5647+
			Connect(DexStorage.DescendantRemoving,updateDexStorage)
5648
		end
5649
5650-
	-- PASTE
5650+
5651-
	makeButton(ACTION_PASTE,ACTION_PASTE_OVER,"Paste",true,function() return #Selection:Get() > 0 and #clipboard > 0 end).MouseButton1Click:connect(function()
5651+
			Connect(NilStorage.DescendantAdded,addObject)
5652-
		if not Option.Modifiable then return end
5652+
			Connect(NilStorage.DescendantRemoving,removeObject)		
5653-
		local parent = Selection.List[1] or workspace
5653+
5654-
		for i = 1,#clipboard do
5654+
			local currentTable = get_nil_instances()	
5655-
			clipboard[i]:Clone().Parent = parent
5655+
5656
			spawn(function()
5657
				while wait() do
5658
					if #currentTable ~= #get_nil_instances() then
5659-
	-- COPY
5659+
						currentTable = get_nil_instances()
5660-
	makeButton(ACTION_COPY,ACTION_COPY_OVER,"Copy",true,function() return #Selection:Get() > 0 end).MouseButton1Click:connect(function()
5660+
						--NilStorageMain:ClearAllChildren()
5661-
		if not Option.Modifiable then return end
5661+
						for i,v in pairs(get_nil_instances()) do
5662-
		clipboard = {}
5662+
							if v ~= NilStorage and v ~= DexStorage then
5663-
		local list = Selection.List
5663+
								pcall(function()
5664-
		for i = 1,#list do
5664+
									v.Parent = NilStorageMain
5665-
			table.insert(clipboard,list[i]:Clone())
5665+
								end)
5666
							--[[
5667-
		updateActions()
5667+
5668
							newNil.Archivable = true
5669
							newNil:Clone().Parent = NilStorageMain
5670-
	-- CUT
5670+
5671-
	makeButton(ACTION_CUT,ACTION_CUT_OVER,"Cut",true,function() return #Selection:Get() > 0 end).MouseButton1Click:connect(function()
5671+
5672-
		if not Option.Modifiable then return end
5672+
5673-
		clipboard = {}
5673+
5674-
		local list = Selection.List
5674+
5675-
		local cut = {}
5675+
5676-
		for i = 1,#list do
5676+
5677-
			local obj = list[i]:Clone()
5677+
5678-
			if obj then
5678+
		local function get(o)
5679-
				table.insert(clipboard,obj)
5679+
			return o:GetChildren()
5680-
				table.insert(cut,list[i])
5680+
5681
5682
		local function r(o)
5683-
		for i = 1,#cut do
5683+
			local s,children = pcall(get,o)
5684-
			pcall(delete,cut[i])
5684+
			if s then
5685
				for i = 1,#children do
5686-
		updateActions()
5686+
					addObject(children[i],true)
5687
					r(children[i])
5688
				end
5689-
	-- FREEZE
5689+
5690-
	makeButton(ACTION_FREEZE,ACTION_FREEZE,"Freeze",true,function() return true end)
5690+
5691
5692-
	-- ADD/REMOVE STARRED
5692+
		r(workspace.Parent)
5693-
	makeButton(ACTION_ADDSTAR,ACTION_ADDSTAR_OVER,"Star",true,function() return #Selection:Get() > 0 end)
5693+
		r(DexOutput)
5694
		if DexStorageEnabled then
5695-
	-- STARRED
5695+
			r(DexStorage)
5696-
	makeButton(ACTION_STARRED,ACTION_STARRED,"Starred",true,function() return true end)
5696+
5697
		if NilStorageEnabled then
5698
			r(NilStorage)
5699-
	-- SORT
5699+
5700-
	-- local actionSort = makeButton(ACTION_SORT,ACTION_SORT_OVER,"Sort")
5700+
5701
		scrollBar.VisibleSpace = math.ceil(listFrame.AbsoluteSize.y/ENTRY_BOUND)
5702
		updateList()
5703-
----------------------------------------------------------------
5703+
5704-
----------------------------------------------------------------
5704+
5705-
----------------------------------------------------------------
5705+
	----------------------------------------------------------------
5706-
----------------------------------------------------------------
5706+
	----------------------------------------------------------------
5707-
---- Option Bindables
5707+
	----------------------------------------------------------------
5708
	----------------------------------------------------------------
5709
	---- Actions
5710-
	local optionCallback = {
5710+
5711-
		Modifiable = function(value)
5711+
	local actionButtons do
5712-
			for i = 1,#actionButtons do
5712+
		actionButtons = {}
5713-
				actionButtons[i].Obj.Visible = value and Option.Selectable
5713+
5714
		local totalActions = 1
5715-
			cancelReparentDrag()
5715+
		local currentActions = totalActions
5716-
		end;
5716+
		local function makeButton(icon,over,name,vis,cond)
5717-
		Selectable = function(value)
5717+
			local buttonEnabled = false
5718-
			for i = 1,#actionButtons do
5718+
5719-
				actionButtons[i].Obj.Visible = value and Option.Modifiable
5719+
			local button = Create(Icon('ImageButton',icon),{
5720
				Name = name .. "Button";
5721-
			cancelSelectDrag()
5721+
				Visible = Option.Modifiable and Option.Selectable;
5722
				Position = UDim2.new(1,-(GUI_SIZE+2)*currentActions+2,0.25,-GUI_SIZE/2);
5723-
		end;
5723+
5724
				Parent = headerFrame;
5725
			})
5726-
	local bindSetOption = explorerPanel:FindFirstChild("SetOption")
5726+
5727-
	if not bindSetOption then
5727+
			local tipText = Create('TextLabel',{
5728-
		bindSetOption = Create('BindableFunction',{Name = "SetOption"})
5728+
				Name = name .. "Text";
5729-
		bindSetOption.Parent = explorerPanel
5729+
				Text = name;
5730
				Visible = false;
5731
				BackgroundTransparency = 1;
5732-
	bindSetOption.OnInvoke = function(optionName,value)
5732+
				TextXAlignment = 'Right';
5733-
		if optionCallback[optionName] then
5733+
5734-
			Option[optionName] = value
5734+
5735-
			optionCallback[optionName](value)
5735+
5736
				Size = UDim2.new(1,-(GUI_SIZE+2)*totalActions,1,0);
5737
				Parent = headerFrame;
5738
			})
5739-
	local bindGetOption = explorerPanel:FindFirstChild("GetOption")
5739+
5740-
	if not bindGetOption then
5740+
5741-
		bindGetOption = Create('BindableFunction',{Name = "GetOption"})
5741+
			button.MouseEnter:connect(function()
5742-
		bindGetOption.Parent = explorerPanel
5742+
				if buttonEnabled then
5743
					button.BackgroundTransparency = 0.9
5744
				end
5745-
	bindGetOption.OnInvoke = function(optionName)
5745+
				--Icon(button,over)
5746-
		if optionName then
5746+
				--tipText.Visible = true
5747-
			return Option[optionName]
5747+
5748
			button.MouseLeave:connect(function()
5749-
			local options = {}
5749+
				button.BackgroundTransparency = 1
5750-
			for k,v in pairs(Option) do
5750+
				--Icon(button,icon)
5751-
				options[k] = v
5751+
				--tipText.Visible = false
5752
			end)
5753-
			return options
5753+
5754
			currentActions = currentActions + 1
5755
			actionButtons[#actionButtons+1] = {Obj = button,Cond = cond}
5756
			QuickButtons[#actionButtons+1] = {Obj = button,Cond = cond, Toggle = function(on)
5757
				if on then
5758-
function SelectionVar()
5758+
					buttonEnabled = true
5759-
	return Selection
5759+
					Icon(button,over)
5760
				else
5761
					buttonEnabled = false
5762-
Input.InputBegan:connect(function(key)
5762+
					Icon(button,icon)
5763-
	if key.KeyCode == Enum.KeyCode.LeftControl then
5763+
5764-
		HoldingCtrl = true
5764+
			end}
5765
			return button
5766-
	if key.KeyCode == Enum.KeyCode.LeftShift then
5766+
5767-
		HoldingShift = true
5767+
5768
		--local clipboard = {}
5769
		local function delete(o)
5770
			o.Parent = nil
5771-
Input.InputEnded:connect(function(key)
5771+
5772-
	if key.KeyCode == Enum.KeyCode.LeftControl then
5772+
5773-
		HoldingCtrl = false
5773+
		makeButton(ACTION_EDITQUICKACCESS,ACTION_EDITQUICKACCESS,"Options",true,function()return true end).MouseButton1Click:connect(function()
5774
5775-
	if key.KeyCode == Enum.KeyCode.LeftShift then
5775+
5776-
		HoldingShift = false
5776+
5777
5778
		-- DELETE
5779
		makeButton(ACTION_DELETE,ACTION_DELETE_OVER,"Delete",true,function() return #Selection:Get() > 0 end).MouseButton1Click:connect(function()
5780-
while RbxApi == nil do
5780+
			if not Option.Modifiable then return end
5781-
	RbxApi = GetApiRemote:Invoke()
5781+
			local list = Selection:Get()
5782
			for i = 1,#list do
5783
				pcall(delete,list[i])
5784
			end
5785-
explorerFilter.Changed:connect(function(prop)
5785+
5786-
	if prop == "Text" then
5786+
5787-
		rawUpdateList()
5787+
5788
		-- PASTE
5789
		makeButton(ACTION_PASTE,ACTION_PASTE_OVER,"Paste",true,function() return #Selection:Get() > 0 and #clipboard > 0 end).MouseButton1Click:connect(function()
5790
			if not Option.Modifiable then return end
5791-
CurrentInsertObjectWindow = CreateInsertObjectMenu(
5791+
			local parent = Selection.List[1] or workspace
5792-
	GetClasses(),
5792+
			for i = 1,#clipboard do
5793-
	"",
5793+
				clipboard[i]:Clone().Parent = parent
5794-
	false,
5794+
5795-
	function(option)
5795+
5796-
		CurrentInsertObjectWindow.Visible = false
5796+
5797-
		local list = SelectionVar():Get()
5797+
		-- COPY
5798-
		for i = 1,#list do
5798+
		makeButton(ACTION_COPY,ACTION_COPY_OVER,"Copy",true,function() return #Selection:Get() > 0 end).MouseButton1Click:connect(function()
5799-
			pcall(function() Instance.new(option,list[i]) end)
5799+
			if not Option.Modifiable then return end
5800
			clipboard = {}
5801-
		DestroyRightClick()
5801+
			local list = Selection.List
5802
			for i = 1,#list do
5803-
)
5803+
				table.insert(clipboard,list[i]:Clone())
5804
			end
5805
			updateActions()
5806
		end)
5807
5808
		-- CUT
5809
		makeButton(ACTION_CUT,ACTION_CUT_OVER,"Cut",true,function() return #Selection:Get() > 0 end).MouseButton1Click:connect(function()
5810-
local Gui = script.Parent
5810+
			if not Option.Modifiable then return end
5811
			clipboard = {}
5812-
local IntroFrame = Gui:WaitForChild("IntroFrame")
5812+
			local list = Selection.List
5813
			local cut = {}
5814-
local SideMenu = Gui:WaitForChild("SideMenu")
5814+
			for i = 1,#list do
5815-
local OpenToggleButton = Gui:WaitForChild("Toggle")
5815+
				local obj = list[i]:Clone()
5816-
local CloseToggleButton = SideMenu:WaitForChild("Toggle")
5816+
				if obj then
5817-
local OpenScriptEditorButton = SideMenu:WaitForChild("OpenScriptEditor")
5817+
					table.insert(clipboard,obj)
5818
					table.insert(cut,list[i])
5819-
local ScriptEditor = Gui:WaitForChild("ScriptEditor")
5819+
5820
			end
5821-
local SlideOut = SideMenu:WaitForChild("SlideOut")
5821+
			for i = 1,#cut do
5822-
local SlideFrame = SlideOut:WaitForChild("SlideFrame")
5822+
				pcall(delete,cut[i])
5823-
local Slant = SideMenu:WaitForChild("Slant")
5823+
5824
			updateActions()
5825-
local ExplorerButton = SlideFrame:WaitForChild("Explorer")
5825+
5826-
local SettingsButton = SlideFrame:WaitForChild("Settings")
5826+
5827
		-- FREEZE
5828-
local SelectionBox = Instance.new("SelectionBox")
5828+
		makeButton(ACTION_FREEZE,ACTION_FREEZE,"Freeze",true,function() return true end)
5829-
SelectionBox.Parent = Gui
5829+
5830
		-- ADD/REMOVE STARRED
5831-
local ExplorerPanel = Gui:WaitForChild("ExplorerPanel")
5831+
		makeButton(ACTION_ADDSTAR,ACTION_ADDSTAR_OVER,"Star",true,function() return #Selection:Get() > 0 end)
5832-
local PropertiesFrame = Gui:WaitForChild("PropertiesFrame")
5832+
5833-
local SaveMapWindow = Gui:WaitForChild("SaveMapWindow")
5833+
		-- STARRED
5834-
local RemoteDebugWindow = Gui:WaitForChild("RemoteDebugWindow")
5834+
		makeButton(ACTION_STARRED,ACTION_STARRED,"Starred",true,function() return true end)
5835
5836-
local SettingsPanel = Gui:WaitForChild("SettingsPanel")
5836+
5837-
local AboutPanel = Gui:WaitForChild("About")
5837+
		-- SORT
5838-
local SettingsListener = SettingsPanel:WaitForChild("GetSetting")
5838+
		-- local actionSort = makeButton(ACTION_SORT,ACTION_SORT_OVER,"Sort")
5839-
local SettingTemplate = SettingsPanel:WaitForChild("SettingTemplate")
5839+
5840-
local SettingList = SettingsPanel:WaitForChild("SettingList")
5840+
5841
	----------------------------------------------------------------
5842-
local SaveMapCopyList = SaveMapWindow:WaitForChild("CopyList")
5842+
	----------------------------------------------------------------
5843-
local SaveMapSettingFrame = SaveMapWindow:WaitForChild("MapSettings")
5843+
	----------------------------------------------------------------
5844-
local SaveMapName = SaveMapWindow:WaitForChild("FileName")
5844+
	----------------------------------------------------------------
5845-
local SaveMapButton = SaveMapWindow:WaitForChild("Save")
5845+
	---- Option Bindables
5846-
local SaveMapCopyTemplate = SaveMapWindow:WaitForChild("Entry")
5846+
5847-
local SaveMapSettings = {
5847+
	do
5848-
	CopyWhat = {
5848+
		local optionCallback = {
5849-
		Workspace = true,
5849+
			Modifiable = function(value)
5850-
		Lighting = true,
5850+
				for i = 1,#actionButtons do
5851-
		ReplicatedStorage = true,
5851+
					actionButtons[i].Obj.Visible = value and Option.Selectable
5852-
		ReplicatedFirst = true,
5852+
5853-
		StarterPack = true,
5853+
				cancelReparentDrag()
5854-
		StarterGui = true,
5854+
5855-
		StarterPlayer = true
5855+
			Selectable = function(value)
5856-
	},
5856+
				for i = 1,#actionButtons do
5857-
	SaveScripts = true,
5857+
					actionButtons[i].Obj.Visible = value and Option.Modifiable
5858-
	SaveTerrain = true,
5858+
5859-
	LightingProperties = true,
5859+
				cancelSelectDrag()
5860-
	CameraInstances = true
5860+
5861-
}
5861+
5862
		}
5863
5864
		local bindSetOption = explorerPanel:FindFirstChild("SetOption")
5865
		if not bindSetOption then
5866
			bindSetOption = Create('BindableFunction',{Name = "SetOption"})
5867
			bindSetOption.Parent = explorerPanel
5868
		end
5869
5870-
local SelectionChanged = ExplorerPanel:WaitForChild("SelectionChanged")
5870+
		bindSetOption.OnInvoke = function(optionName,value)
5871-
local GetSelection = ExplorerPanel:WaitForChild("GetSelection")
5871+
			if optionCallback[optionName] then
5872-
local SetSelection = ExplorerPanel:WaitForChild("SetSelection")
5872+
				Option[optionName] = value
5873
				optionCallback[optionName](value)
5874-
local Player = game:GetService("Players").LocalPlayer
5874+
5875-
local Mouse = Player:GetMouse()
5875+
5876
5877-
local CurrentWindow = "Nothing c:"
5877+
		local bindGetOption = explorerPanel:FindFirstChild("GetOption")
5878-
local Windows = {
5878+
		if not bindGetOption then
5879-
	Explorer = {
5879+
			bindGetOption = Create('BindableFunction',{Name = "GetOption"})
5880-
		ExplorerPanel,
5880+
			bindGetOption.Parent = explorerPanel
5881-
		PropertiesFrame
5881+
5882-
	},
5882+
5883-
	Settings = {SettingsPanel},
5883+
		bindGetOption.OnInvoke = function(optionName)
5884-
	SaveMap = {SaveMapWindow},
5884+
			if optionName then
5885-
	Remotes = {RemoteDebugWindow},
5885+
				return Option[optionName]
5886-
	About = {AboutPanel},
5886+
5887-
}
5887+
				local options = {}
5888
				for k,v in pairs(Option) do
5889-
function switchWindows(wName,over)
5889+
					options[k] = v
5890-
	if CurrentWindow == wName and not over then return end
5890+
5891
				return options
5892-
	local count = 0
5892+
5893
		end
5894-
	for i,v in pairs(Windows) do
5894+
5895
5896-
		if i ~= wName then
5896+
	function SelectionVar()
5897-
			for _,c in pairs(v) do c:TweenPosition(UDim2.new(1, 30, count * 0.5, count * 36), "Out", "Quad", 0.5, true) count = count + 1 end
5897+
		return Selection
5898
	end
5899
5900
	Input.InputBegan:connect(function(key)
5901-
	count = 0
5901+
		if key.KeyCode == Enum.KeyCode.LeftControl then
5902
			HoldingCtrl = true
5903-
	if Windows[wName] then
5903+
5904-
		for _,c in pairs(Windows[wName]) do c:TweenPosition(UDim2.new(1, -300, count * 0.5, count * 36), "Out", "Quad", 0.5, true) count = count + 1 end
5904+
		if key.KeyCode == Enum.KeyCode.LeftShift then
5905
			HoldingShift = true
5906
		end
5907-
	if wName ~= "Nothing c:" then
5907+
5908-
		CurrentWindow = wName
5908+
5909-
		for i,v in pairs(SlideFrame:GetChildren()) do
5909+
	Input.InputEnded:connect(function(key)
5910-
			v.BackgroundTransparency = 1
5910+
		if key.KeyCode == Enum.KeyCode.LeftControl then
5911-
			v.Icon.ImageColor3 = Color3.new(70/255, 70/255, 70/255)
5911+
			HoldingCtrl = false
5912
		end
5913-
		if SlideFrame:FindFirstChild(wName) then
5913+
		if key.KeyCode == Enum.KeyCode.LeftShift then
5914-
			SlideFrame[wName].BackgroundTransparency = 0.5
5914+
			HoldingShift = false
5915-
			SlideFrame[wName].Icon.ImageColor3 = Color3.new(0,0,0)
5915+
5916
	end)
5917
5918
	while RbxApi == nil do
5919
		RbxApi = GetApiRemote:Invoke()
5920-
function toggleDex(on)
5920+
		wait()
5921-
	if on then
5921+
5922-
		SideMenu:TweenPosition(UDim2.new(1, -330, 0, 0), "Out", "Quad", 0.5, true)
5922+
5923-
		OpenToggleButton:TweenPosition(UDim2.new(1,0,0,0), "Out", "Quad", 0.5, true)
5923+
	explorerFilter.Changed:connect(function(prop)
5924-
		switchWindows(CurrentWindow,true)
5924+
		if prop == "Text" then
5925
			rawUpdateList()
5926-
		SideMenu:TweenPosition(UDim2.new(1, 0, 0, 0), "Out", "Quad", 0.5, true)
5926+
5927-
		OpenToggleButton:TweenPosition(UDim2.new(1,-40,0,0), "Out", "Quad", 0.5, true)
5927+
5928-
		switchWindows("Nothing c:")
5928+
5929
	CurrentInsertObjectWindow = CreateInsertObjectMenu(
5930
		GetClasses(),
5931
		"",
5932-
local Settings = {
5932+
5933-
	ClickSelect = false,
5933+
5934-
	SelBox = false,
5934+
5935-
	ClearProps = false,
5935+
5936-
	SelectUngrouped = true,
5936+
			for i = 1,#list do
5937-
	SaveInstanceScripts = true
5937+
				pcall(function() Instance.new(option,list[i]) end)
5938-
}
5938+
5939
			DestroyRightClick()
5940-
function ReturnSetting(set)
5940+
5941-
	if set == "ClearProps" then
5941+
5942-
		return Settings.ClearProps
5942+
5943-
	elseif set == "SelectUngrouped" then
5943+
5944-
		return Settings.SelectUngrouped
5944+
5945
LocalScript18.Name = "Selection"
5946
LocalScript18.Parent = ScreenGui0
5947
table.insert(cors,sandbox(LocalScript18,function()
5948
	local Gui = script.Parent
5949-
	toggleDex(true)
5949+
5950
	local IntroFrame = Gui:WaitForChild("IntroFrame")
5951
5952-
OpenScriptEditorButton.MouseButton1Up:connect(function()
5952+
	local SideMenu = Gui:WaitForChild("SideMenu")
5953-
	if OpenScriptEditorButton.Active then
5953+
	local OpenToggleButton = Gui:WaitForChild("Toggle")
5954-
		ScriptEditor.Visible = true
5954+
	local CloseToggleButton = SideMenu:WaitForChild("Toggle")
5955
	local OpenScriptEditorButton = SideMenu:WaitForChild("OpenScriptEditor")
5956
5957
	local ScriptEditor = Gui:WaitForChild("ScriptEditor")
5958
5959-
	if CloseToggleButton.Active then
5959+
	local SlideOut = SideMenu:WaitForChild("SlideOut")
5960-
		toggleDex(false)
5960+
	local SlideFrame = SlideOut:WaitForChild("SlideFrame")
5961
	local Slant = SideMenu:WaitForChild("Slant")
5962
5963
	local ExplorerButton = SlideFrame:WaitForChild("Explorer")
5964
	local SettingsButton = SlideFrame:WaitForChild("Settings")
5965
5966
	local SelectionBox = Instance.new("SelectionBox")
5967
	SelectionBox.Parent = Gui
5968
5969
	local ExplorerPanel = Gui:WaitForChild("ExplorerPanel")
5970
	local PropertiesFrame = Gui:WaitForChild("PropertiesFrame")
5971
	local SaveMapWindow = Gui:WaitForChild("SaveMapWindow")
5972
	local RemoteDebugWindow = Gui:WaitForChild("RemoteDebugWindow")
5973
5974
	local SettingsPanel = Gui:WaitForChild("SettingsPanel")
5975
	local AboutPanel = Gui:WaitForChild("About")
5976
	local SettingsListener = SettingsPanel:WaitForChild("GetSetting")
5977
	local SettingTemplate = SettingsPanel:WaitForChild("SettingTemplate")
5978
	local SettingList = SettingsPanel:WaitForChild("SettingList")
5979
5980
	local SaveMapCopyList = SaveMapWindow:WaitForChild("CopyList")
5981
	local SaveMapSettingFrame = SaveMapWindow:WaitForChild("MapSettings")
5982
	local SaveMapName = SaveMapWindow:WaitForChild("FileName")
5983
	local SaveMapButton = SaveMapWindow:WaitForChild("Save")
5984
	local SaveMapCopyTemplate = SaveMapWindow:WaitForChild("Entry")
5985
	local SaveMapSettings = {
5986
		CopyWhat = {
5987
			Workspace = true,
5988
			Lighting = true,
5989
			ReplicatedStorage = true,
5990
			ReplicatedFirst = true,
5991
			StarterPack = true,
5992
			StarterGui = true,
5993
			StarterPlayer = true
5994
		},
5995
		SaveScripts = true,
5996
		SaveTerrain = true,
5997
		LightingProperties = true,
5998
		CameraInstances = true
5999-
for i,v in pairs(SlideFrame:GetChildren()) do
5999+
6000-
	v.MouseButton1Click:connect(function()
6000+
6001-
		switchWindows(v.Name)
6001+
6002
local ClickSelectOption = SettingsPanel:WaitForChild("ClickSelect"):WaitForChild("Change")
6003
local SelectionBoxOption = SettingsPanel:WaitForChild("SelectionBox"):WaitForChild("Change")
6004-
	v.MouseEnter:connect(function()v.BackgroundTransparency = 0.5 end)
6004+
6005-
	v.MouseLeave:connect(function()if CurrentWindow~=v.Name then v.BackgroundTransparency = 1 end end)
6005+
6006
--]]
6007
6008
	local SelectionChanged = ExplorerPanel:WaitForChild("SelectionChanged")
6009
	local GetSelection = ExplorerPanel:WaitForChild("GetSelection")
6010
	local SetSelection = ExplorerPanel:WaitForChild("SetSelection")
6011
6012
	local Player = game:GetService("Players").LocalPlayer
6013
	local Mouse = Player:GetMouse()
6014
6015
	local CurrentWindow = "Nothing c:"
6016
	local Windows = {
6017
		Explorer = {
6018
			ExplorerPanel,
6019
			PropertiesFrame
6020
		},
6021
		Settings = {SettingsPanel},
6022
		SaveMap = {SaveMapWindow},
6023
		Remotes = {RemoteDebugWindow},
6024
		About = {AboutPanel},
6025
	}
6026
6027
	function switchWindows(wName,over)
6028
		if CurrentWindow == wName and not over then return end
6029
6030-
function createSetting(name,interName,defaultOn)
6030+
		local count = 0
6031-
	local newSetting = SettingTemplate:Clone()
6031+
6032-
	newSetting.Position = UDim2.new(0,0,0,#SettingList:GetChildren() * 60)
6032+
		for i,v in pairs(Windows) do
6033-
	newSetting.SName.Text = name
6033+
			count = 0
6034
			if i ~= wName then
6035-
	local function toggle(on)
6035+
				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
6036
			end
6037-
			newSetting.Change.Bar:TweenPosition(UDim2.new(0,32,0,-2),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
6037+
6038-
			newSetting.Change.OnBar:TweenSize(UDim2.new(0,34,0,15),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
6038+
6039-
			newSetting.Status.Text = "On"
6039+
6040-
			Settings[interName] = true
6040+
6041
		if Windows[wName] then
6042-
			newSetting.Change.Bar:TweenPosition(UDim2.new(0,-2,0,-2),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
6042+
			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
6043-
			newSetting.Change.OnBar:TweenSize(UDim2.new(0,0,0,15),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
6043+
6044-
			newSetting.Status.Text = "Off"
6044+
6045-
			Settings[interName] = false
6045+
		if wName ~= "Nothing c:" then
6046
			CurrentWindow = wName
6047-
	end	
6047+
			for i,v in pairs(SlideFrame:GetChildren()) do
6048
				v.BackgroundTransparency = 1
6049-
	newSetting.Change.MouseButton1Click:connect(function()
6049+
				v.Icon.ImageColor3 = Color3.new(70/255, 70/255, 70/255)
6050-
		toggle(not Settings[interName])
6050+
6051
			if SlideFrame:FindFirstChild(wName) then
6052
				SlideFrame[wName].BackgroundTransparency = 0.5
6053-
	newSetting.Visible = true
6053+
				SlideFrame[wName].Icon.ImageColor3 = Color3.new(0,0,0)
6054-
	newSetting.Parent = SettingList
6054+
6055
		end
6056-
	if defaultOn then
6056+
6057-
		toggle(true)
6057+
6058
	function toggleDex(on)
6059
		if on then
6060
			SideMenu:TweenPosition(UDim2.new(1, -330, 0, 0), "Out", "Quad", 0.5, true)
6061-
createSetting("Click part to select","ClickSelect",false)
6061+
			OpenToggleButton:TweenPosition(UDim2.new(1,0,0,0), "Out", "Quad", 0.5, true)
6062-
createSetting("Selection Box","SelBox",false)
6062+
			switchWindows(CurrentWindow,true)
6063-
createSetting("Clear property value on focus","ClearProps",false)
6063+
6064-
createSetting("Select ungrouped models","SelectUngrouped",true)
6064+
			SideMenu:TweenPosition(UDim2.new(1, 0, 0, 0), "Out", "Quad", 0.5, true)
6065-
createSetting("SaveInstance decompiles scripts","SaveInstanceScripts",true)
6065+
			OpenToggleButton:TweenPosition(UDim2.new(1,-40,0,0), "Out", "Quad", 0.5, true)
6066
			switchWindows("Nothing c:")
6067
		end
6068
	end
6069
6070
	local Settings = {
6071
		ClickSelect = false,
6072
		SelBox = false,
6073
		ClearProps = false,
6074
		SelectUngrouped = true,
6075
		SaveInstanceScripts = true
6076
	}
6077
6078
	function ReturnSetting(set)
6079
		if set == "ClearProps" then
6080
			return Settings.ClearProps
6081
		elseif set == "SelectUngrouped" then
6082
			return Settings.SelectUngrouped
6083
		end
6084
	end
6085
6086
	OpenToggleButton.MouseButton1Up:connect(function()
6087
		toggleDex(true)
6088
	end)
6089
6090
	OpenScriptEditorButton.MouseButton1Up:connect(function()
6091
		if OpenScriptEditorButton.Active then
6092
			ScriptEditor.Visible = true
6093
		end
6094
	end)
6095
6096
	CloseToggleButton.MouseButton1Up:connect(function()
6097
		if CloseToggleButton.Active then
6098
			toggleDex(false)
6099
		end
6100
	end)
6101
6102
--[[
6103
OpenToggleButton.MouseButton1Up:connect(function()
6104
	SideMenu:TweenPosition(UDim2.new(1, -330, 0, 0), "Out", "Quad", 0.5, true)
6105
	
6106
	if CurrentWindow == "Explorer" then
6107
		ExplorerPanel:TweenPosition(UDim2.new(1, -300, 0, 0), "Out", "Quad", 0.5, true)
6108
		PropertiesFrame:TweenPosition(UDim2.new(1, -300, 0.5, 36), "Out", "Quad", 0.5, true)
6109
	else
6110-
local function getSelection()
6110+
6111-
	local t = GetSelection:Invoke()
6111+
6112-
	if t and #t > 0 then
6112+
6113-
		return t[1]
6113+
6114
end)
6115
6116
CloseToggleButton.MouseButton1Up:connect(function()
6117
	SideMenu:TweenPosition(UDim2.new(1, 0, 0, 0), "Out", "Quad", 0.5, true)
6118
	
6119-
Mouse.Button1Down:connect(function()
6119+
6120-
	if CurrentWindow == "Explorer" and Settings.ClickSelect then
6120+
6121-
		local target = Mouse.Target
6121+
6122-
		if target then
6122+
6123-
			SetSelection:Invoke({target})
6123+
6124
end)
6125
--]]
6126
6127
--[[
6128-
SelectionChanged.Event:connect(function()
6128+
6129
	switchWindows("Explorer")
6130-
		local success,err = pcall(function()
6130+
6131-
			local selection = getSelection()
6131+
6132-
			SelectionBox.Adornee = selection
6132+
6133
	switchWindows("Settings")
6134
end)
6135-
			SelectionBox.Adornee = nil
6135+
6136
6137
	for i,v in pairs(SlideFrame:GetChildren()) do
6138
		v.MouseButton1Click:connect(function()
6139
			switchWindows(v.Name)
6140-
SettingsListener.OnInvoke = ReturnSetting
6140+
6141
6142-
-- Map Copier
6142+
		v.MouseEnter:connect(function()v.BackgroundTransparency = 0.5 end)
6143
		v.MouseLeave:connect(function()if CurrentWindow~=v.Name then v.BackgroundTransparency = 1 end end)
6144-
function createMapSetting(obj,interName,defaultOn)
6144+
6145-
	local function toggle(on)
6145+
6146
--[[
6147-
			obj.Change.Bar:TweenPosition(UDim2.new(0,32,0,-2),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
6147+
6148-
			obj.Change.OnBar:TweenSize(UDim2.new(0,34,0,15),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
6148+
6149-
			obj.Status.Text = "On"
6149+
6150-
			SaveMapSettings[interName] = true
6150+
6151
		ExplorerPanel:TweenPosition(UDim2.new(1, -300, 0, 0), "Out", "Quad", 0.5, true)
6152-
			obj.Change.Bar:TweenPosition(UDim2.new(0,-2,0,-2),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
6152+
6153-
			obj.Change.OnBar:TweenSize(UDim2.new(0,0,0,15),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
6153+
6154-
			obj.Status.Text = "Off"
6154+
6155-
			SaveMapSettings[interName] = false
6155+
6156
6157-
	end	
6157+
6158
	if CurrentWindow ~= "Settings" then
6159-
	obj.Change.MouseButton1Click:connect(function()
6159+
6160-
		toggle(not SaveMapSettings[interName])
6160+
6161
		ExplorerPanel:TweenPosition(UDim2.new(1, 0, 0, 0), "Out", "Quad", 0.5, true)
6162
		PropertiesFrame:TweenPosition(UDim2.new(1, 0, 0.5, 36), "Out", "Quad", 0.5, true)
6163-
	obj.Visible = true
6163+
6164-
	obj.Parent = SaveMapSettingFrame
6164+
6165
end)
6166-
	if defaultOn then
6166+
6167-
		toggle(true)
6167+
6168
	function createSetting(name,interName,defaultOn)
6169
		local newSetting = SettingTemplate:Clone()
6170
		newSetting.Position = UDim2.new(0,0,0,#SettingList:GetChildren() * 60)
6171-
function createCopyWhatSetting(serv)
6171+
		newSetting.SName.Text = name
6172-
	if SaveMapSettings.CopyWhat[serv] then
6172+
6173-
		local newSetting = SaveMapCopyTemplate:Clone()
6173+
6174-
		newSetting.Position = UDim2.new(0,0,0,#SaveMapCopyList:GetChildren() * 22 + 5)
6174+
6175-
		newSetting.Info.Text = serv
6175+
				newSetting.Change.Bar:TweenPosition(UDim2.new(0,32,0,-2),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
6176
				newSetting.Change.OnBar:TweenSize(UDim2.new(0,34,0,15),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
6177
				newSetting.Status.Text = "On"
6178
				Settings[interName] = true
6179-
				newSetting.Change.enabled.Visible = true
6179+
6180-
				SaveMapSettings.CopyWhat[serv] = true
6180+
				newSetting.Change.Bar:TweenPosition(UDim2.new(0,-2,0,-2),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
6181
				newSetting.Change.OnBar:TweenSize(UDim2.new(0,0,0,15),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
6182-
				newSetting.Change.enabled.Visible = false
6182+
				newSetting.Status.Text = "Off"
6183-
				SaveMapSettings.CopyWhat[serv] = false
6183+
				Settings[interName] = false
6184
			end
6185
		end	
6186
6187
		newSetting.Change.MouseButton1Click:connect(function()
6188-
			toggle(not SaveMapSettings.CopyWhat[serv])
6188+
			toggle(not Settings[interName])
6189
		end)
6190
6191
		newSetting.Visible = true
6192-
		newSetting.Parent = SaveMapCopyList
6192+
		newSetting.Parent = SettingList
6193
6194
		if defaultOn then
6195
			toggle(true)
6196-
createMapSetting(SaveMapSettingFrame.Scripts,"SaveScripts",true)
6196+
6197-
createMapSetting(SaveMapSettingFrame.Terrain,"SaveTerrain",true)
6197+
6198-
createMapSetting(SaveMapSettingFrame.Lighting,"LightingProperties",true)
6198+
6199-
createMapSetting(SaveMapSettingFrame.CameraInstances,"CameraInstances",true)
6199+
	createSetting("Click part to select","ClickSelect",false)
6200
	createSetting("Selection Box","SelBox",false)
6201-
createCopyWhatSetting("Workspace")
6201+
	createSetting("Clear property value on focus","ClearProps",false)
6202-
createCopyWhatSetting("Lighting")
6202+
	createSetting("Select ungrouped models","SelectUngrouped",true)
6203-
createCopyWhatSetting("ReplicatedStorage")
6203+
	createSetting("SaveInstance decompiles scripts","SaveInstanceScripts",true)
6204-
createCopyWhatSetting("ReplicatedFirst")
6204+
6205-
createCopyWhatSetting("StarterPack")
6205+
6206-
createCopyWhatSetting("StarterGui")
6206+
6207-
createCopyWhatSetting("StarterPlayer")
6207+
6208
		Settings.ClickSelect = false
6209-
SaveMapName.Text = tostring(game.PlaceId).."MapCopy"
6209+
6210
	else
6211-
SaveMapButton.MouseButton1Click:connect(function()
6211+
6212-
	local copyWhat = {}
6212+
6213
	end
6214-
	local copyGroup = Instance.new("Model",game:GetService('ReplicatedStorage'))
6214+
6215
6216-
	local copyScripts = SaveMapSettings.SaveScripts
6216+
6217
	if Settings.SelBox then
6218-
	local copyTerrain = SaveMapSettings.SaveTerrain
6218+
6219
		SelectionBox.Adornee = nil
6220-
	local lightingProperties = SaveMapSettings.LightingProperties
6220+
6221
	else
6222-
	local cameraInstances = SaveMapSettings.CameraInstances
6222+
6223
		SelectionBoxOption.Text = "ON"
6224-
	-----------------------------------------------------------------------------------
6224+
6225
end)
6226-
	for i,v in pairs(SaveMapSettings.CopyWhat) do
6226+
6227-
		if v then
6227+
6228-
			table.insert(copyWhat,i)
6228+
6229
		Settings.ClearProps = false
6230
		ClearPropsOption.Text = "OFF"
6231
	else
6232-
	local consoleFunc = printconsole or writeconsole
6232+
6233
		ClearPropsOption.Text = "ON"
6234-
	if consoleFunc then
6234+
6235-
		consoleFunc("Moon's place copier loaded.")
6235+
6236-
		consoleFunc("Copying map of game "..tostring(game.PlaceId)..".")
6236+
6237
SelectUngroupedOption.MouseButton1Up:connect(function()
6238
	if Settings.SelectUngrouped then
6239-
	function archivable(root)
6239+
6240-
		for i,v in pairs(root:GetChildren()) do
6240+
6241-
			if not game:GetService('Players'):GetPlayerFromCharacter(v) then
6241+
6242-
				v.Archivable = true
6242+
6243-
				archivable(v)
6243+
6244
	end
6245
end)
6246
--]]
6247
6248-
	function decompileS(root)
6248+
	local function getSelection()
6249-
		for i,v in pairs(root:GetChildren()) do
6249+
		local t = GetSelection:Invoke()
6250
		if t and #t > 0 then
6251-
				if v:IsA("LocalScript") then
6251+
			return t[1]
6252-
					local isDisabled = v.Disabled
6252+
6253-
					v.Disabled = true
6253+
6254-
					v.Source = decompile(v)
6254+
6255-
					v.Disabled = isDisabled
6255+
6256-
				
6256+
6257-
					if v.Source == "" then 
6257+
	Mouse.Button1Down:connect(function()
6258-
						if consoleFunc then consoleFunc("LocalScript "..v.Name.." had a problem decompiling.") end
6258+
		if CurrentWindow == "Explorer" and Settings.ClickSelect then
6259
			local target = Mouse.Target
6260-
						if consoleFunc then consoleFunc("LocalScript "..v.Name.." decompiled.") end
6260+
			if target then
6261
				SetSelection:Invoke({target})
6262-
				elseif v:IsA("ModuleScript") then
6262+
6263-
					v.Source = decompile(v)
6263+
6264-
				
6264+
6265-
					if v.Source == "" then 
6265+
6266-
						if consoleFunc then consoleFunc("ModuleScript "..v.Name.." had a problem decompiling.") end
6266+
	SelectionChanged.Event:connect(function()
6267
		if Settings.SelBox then
6268-
						if consoleFunc then consoleFunc("ModuleScript "..v.Name.." decompiled.") end
6268+
			local success,err = pcall(function()
6269
				local selection = getSelection()
6270
				SelectionBox.Adornee = selection
6271
			end)
6272-
			decompileS(v)
6272+
			if err then
6273
				SelectionBox.Adornee = nil
6274
			end
6275
		end
6276-
	for i,v in pairs(copyWhat) do archivable(game[v]) end
6276+
6277
6278-
	for j,obj in pairs(copyWhat) do
6278+
	SettingsListener.OnInvoke = ReturnSetting
6279-
		if obj ~= "StarterPlayer" then
6279+
6280-
			local newFolder = Instance.new("Folder",copyGroup)
6280+
	-- Map Copier
6281-
			newFolder.Name = obj
6281+
6282-
			for i,v in pairs(game[obj]:GetChildren()) do
6282+
	function createMapSetting(obj,interName,defaultOn)
6283-
				if v ~= copyGroup then
6283+
6284-
					pcall(function()
6284+
6285-
						v:Clone().Parent = newFolder
6285+
				obj.Change.Bar:TweenPosition(UDim2.new(0,32,0,-2),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
6286
				obj.Change.OnBar:TweenSize(UDim2.new(0,34,0,15),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
6287
				obj.Status.Text = "On"
6288
				SaveMapSettings[interName] = true
6289
			else
6290-
			local newFolder = Instance.new("Model",copyGroup)
6290+
				obj.Change.Bar:TweenPosition(UDim2.new(0,-2,0,-2),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
6291-
			newFolder.Name = "StarterPlayer"
6291+
				obj.Change.OnBar:TweenSize(UDim2.new(0,0,0,15),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
6292-
			for i,v in pairs(game[obj]:GetChildren()) do
6292+
				obj.Status.Text = "Off"
6293-
				local newObj = Instance.new("Folder",newFolder)
6293+
				SaveMapSettings[interName] = false
6294-
				newObj.Name = v.Name
6294+
6295-
				for _,c in pairs(v:GetChildren()) do
6295+
6296-
					if c.Name ~= "ControlScript" and c.Name ~= "CameraScript" then
6296+
6297-
						c:Clone().Parent = newObj
6297+
		obj.Change.MouseButton1Click:connect(function()
6298
			toggle(not SaveMapSettings[interName])
6299
		end)
6300
6301
		obj.Visible = true
6302
		obj.Parent = SaveMapSettingFrame
6303
6304-
	if workspace.CurrentCamera and cameraInstances then
6304+
		if defaultOn then
6305-
		local cameraFolder = Instance.new("Model",copyGroup)
6305+
			toggle(true)
6306-
		cameraFolder.Name = "CameraItems"
6306+
6307-
		for i,v in pairs(workspace.CurrentCamera:GetChildren()) do v:Clone().Parent = cameraFolder end
6307+
6308
6309
	function createCopyWhatSetting(serv)
6310-
	if copyTerrain then
6310+
		if SaveMapSettings.CopyWhat[serv] then
6311-
		local myTerrain = workspace.Terrain:CopyRegion(workspace.Terrain.MaxExtents)
6311+
			local newSetting = SaveMapCopyTemplate:Clone()
6312-
		myTerrain.Parent = copyGroup
6312+
			newSetting.Position = UDim2.new(0,0,0,#SaveMapCopyList:GetChildren() * 22 + 5)
6313
			newSetting.Info.Text = serv
6314
6315-
	function saveProp(obj,prop,par)
6315+
			local function toggle(on)
6316-
		local myProp = obj[prop]
6316+
				if on then
6317-
		if type(myProp) == "boolean" then
6317+
					newSetting.Change.enabled.Visible = true
6318-
			local newProp = Instance.new("BoolValue",par)
6318+
					SaveMapSettings.CopyWhat[serv] = true
6319-
			newProp.Name = prop
6319+
6320-
			newProp.Value = myProp
6320+
					newSetting.Change.enabled.Visible = false
6321-
		elseif type(myProp) == "number" then
6321+
					SaveMapSettings.CopyWhat[serv] = false
6322-
			local newProp = Instance.new("IntValue",par)
6322+
6323-
			newProp.Name = prop
6323+
			end	
6324-
			newProp.Value = myProp
6324+
6325-
		elseif type(myProp) == "string" then
6325+
			newSetting.Change.MouseButton1Click:connect(function()
6326-
			local newProp = Instance.new("StringValue",par)
6326+
				toggle(not SaveMapSettings.CopyWhat[serv])
6327-
			newProp.Name = prop
6327+
6328-
			newProp.Value = myProp
6328+
6329-
		elseif type(myProp) == "userdata" then -- Assume Color3
6329+
			newSetting.Visible = true
6330
			newSetting.Parent = SaveMapCopyList
6331-
				local newProp = Instance.new("Color3Value",par)
6331+
6332
	end
6333
6334
	createMapSetting(SaveMapSettingFrame.Scripts,"SaveScripts",true)
6335
	createMapSetting(SaveMapSettingFrame.Terrain,"SaveTerrain",true)
6336
	createMapSetting(SaveMapSettingFrame.Lighting,"LightingProperties",true)
6337
	createMapSetting(SaveMapSettingFrame.CameraInstances,"CameraInstances",true)
6338-
	if lightingProperties then
6338+
6339-
		local lightingProps = Instance.new("Model",copyGroup)
6339+
	createCopyWhatSetting("Workspace")
6340-
		lightingProps.Name = "LightingProperties"
6340+
	createCopyWhatSetting("Lighting")
6341
	createCopyWhatSetting("ReplicatedStorage")
6342-
		saveProp(game:GetService('Lighting'),"Ambient",lightingProps)
6342+
	createCopyWhatSetting("ReplicatedFirst")
6343-
		saveProp(game:GetService('Lighting'),"Brightness",lightingProps)
6343+
	createCopyWhatSetting("StarterPack")
6344-
		saveProp(game:GetService('Lighting'),"ColorShift_Bottom",lightingProps)
6344+
	createCopyWhatSetting("StarterGui")
6345-
		saveProp(game:GetService('Lighting'),"ColorShift_Top",lightingProps)
6345+
	createCopyWhatSetting("StarterPlayer")
6346-
		saveProp(game:GetService('Lighting'),"GlobalShadows",lightingProps)
6346+
6347-
		saveProp(game:GetService('Lighting'),"OutdoorAmbient",lightingProps)
6347+
	SaveMapName.Text = tostring(game.PlaceId).."MapCopy"
6348-
		saveProp(game:GetService('Lighting'),"Outlines",lightingProps)
6348+
6349-
		saveProp(game:GetService('Lighting'),"GeographicLatitude",lightingProps)
6349+
	SaveMapButton.MouseButton1Click:connect(function()
6350-
		saveProp(game:GetService('Lighting'),"TimeOfDay",lightingProps)
6350+
		local copyWhat = {}
6351-
		saveProp(game:GetService('Lighting'),"FogColor",lightingProps)
6351+
6352-
		saveProp(game:GetService('Lighting'),"FogEnd",lightingProps)
6352+
		local copyGroup = Instance.new("Model",game:GetService('ReplicatedStorage'))
6353-
		saveProp(game:GetService('Lighting'),"FogStart",lightingProps)
6353+
6354
		local copyScripts = SaveMapSettings.SaveScripts
6355
6356-
	if decompile and copyScripts then
6356+
		local copyTerrain = SaveMapSettings.SaveTerrain
6357-
		decompileS(copyGroup)
6357+
6358
		local lightingProperties = SaveMapSettings.LightingProperties
6359
6360-
	if SaveInstance then
6360+
		local cameraInstances = SaveMapSettings.CameraInstances
6361-
		SaveInstance(copyGroup,SaveMapName.Text..".rbxm")
6361+
6362-
	elseif saveinstance then
6362+
		-----------------------------------------------------------------------------------
6363-
		saveinstance(getelysianpath()..SaveMapName.Text..".rbxm",copyGroup)
6363+
6364
		for i,v in pairs(SaveMapSettings.CopyWhat) do
6365-
	--print("Saved!")
6365+
			if v then
6366-
	if consoleFunc then
6366+
				table.insert(copyWhat,i)
6367-
		consoleFunc("The map has been copied.")
6367+
6368
		end
6369-
	SaveMapButton.Text = "The map has been saved"
6369+
6370-
	wait(5)
6370+
		local consoleFunc = printconsole or writeconsole
6371-
	SaveMapButton.Text = "Save"
6371+
6372
		if consoleFunc then
6373
			consoleFunc("Moon's place copier loaded.")
6374-
-- End Copier
6374+
			consoleFunc("Copying map of game "..tostring(game.PlaceId)..".")
6375
		end
6376-
wait()
6376+
6377
		function archivable(root)
6378-
IntroFrame:TweenPosition(UDim2.new(1,-301,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
6378+
			for i,v in pairs(root:GetChildren()) do
6379
				if not game:GetService('Players'):GetPlayerFromCharacter(v) then
6380-
switchWindows("Explorer")
6380+
					v.Archivable = true
6381
					archivable(v)
6382-
wait(1)
6382+
6383
			end
6384-
SideMenu.Visible = true
6384+
6385
6386-
for i = 0,1,0.1 do
6386+
		function decompileS(root)
6387-
	IntroFrame.BackgroundTransparency = i
6387+
			for i,v in pairs(root:GetChildren()) do
6388-
	IntroFrame.Main.BackgroundTransparency = i
6388+
				pcall(function()
6389-
	IntroFrame.Slant.ImageTransparency = i
6389+
					if v:IsA("LocalScript") then
6390-
	IntroFrame.Title.TextTransparency = i
6390+
						local isDisabled = v.Disabled
6391-
	IntroFrame.Version.TextTransparency = i
6391+
						v.Disabled = true
6392-
	IntroFrame.Creator.TextTransparency = i
6392+
						v.Source = decompile(v)
6393-
	IntroFrame.Sad.ImageTransparency = i
6393+
						v.Disabled = isDisabled
6394
6395
						if v.Source == "" then 
6396
							if consoleFunc then consoleFunc("LocalScript "..v.Name.." had a problem decompiling.") end
6397-
IntroFrame.Visible = false
6397+
6398
							if consoleFunc then consoleFunc("LocalScript "..v.Name.." decompiled.") end
6399-
SlideFrame:TweenPosition(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
6399+
6400-
OpenScriptEditorButton:TweenPosition(UDim2.new(0,0,0,150),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
6400+
					elseif v:IsA("ModuleScript") then
6401-
CloseToggleButton:TweenPosition(UDim2.new(0,0,0,180),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
6401+
						v.Source = decompile(v)
6402-
Slant:TweenPosition(UDim2.new(0,0,0,210),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
6402+
6403
						if v.Source == "" then 
6404-
wait(0.5)
6404+
							if consoleFunc then consoleFunc("ModuleScript "..v.Name.." had a problem decompiling.") end
6405
						else
6406-
for i = 1,0,-0.1 do
6406+
							if consoleFunc then consoleFunc("ModuleScript "..v.Name.." decompiled.") end
6407-
	OpenScriptEditorButton.Icon.ImageTransparency = i
6407+
6408-
	CloseToggleButton.TextTransparency = i
6408+
6409
				end)
6410
				decompileS(v)
6411
			end
6412-
CloseToggleButton.Active = true
6412+
6413-
CloseToggleButton.AutoButtonColor = true
6413+
6414
		for i,v in pairs(copyWhat) do archivable(game[v]) end
6415-
OpenScriptEditorButton.Active = true
6415+
6416-
OpenScriptEditorButton.AutoButtonColor = true
6416+
		for j,obj in pairs(copyWhat) do
6417
			if obj ~= "StarterPlayer" then
6418
				local newFolder = Instance.new("Folder",copyGroup)
6419
				newFolder.Name = obj
6420
				for i,v in pairs(game[obj]:GetChildren()) do
6421
					if v ~= copyGroup then
6422
						pcall(function()
6423
							v:Clone().Parent = newFolder
6424
						end)
6425
					end
6426
				end
6427
			else
6428
				local newFolder = Instance.new("Model",copyGroup)
6429
				newFolder.Name = "StarterPlayer"
6430
				for i,v in pairs(game[obj]:GetChildren()) do
6431
					local newObj = Instance.new("Folder",newFolder)
6432
					newObj.Name = v.Name
6433
					for _,c in pairs(v:GetChildren()) do
6434
						if c.Name ~= "ControlScript" and c.Name ~= "CameraScript" then
6435
							c:Clone().Parent = newObj
6436
						end
6437
					end
6438
				end
6439
			end
6440
		end
6441
6442
		if workspace.CurrentCamera and cameraInstances then
6443
			local cameraFolder = Instance.new("Model",copyGroup)
6444
			cameraFolder.Name = "CameraItems"
6445
			for i,v in pairs(workspace.CurrentCamera:GetChildren()) do v:Clone().Parent = cameraFolder end
6446
		end
6447
6448
		if copyTerrain then
6449
			local myTerrain = workspace.Terrain:CopyRegion(workspace.Terrain.MaxExtents)
6450
			myTerrain.Parent = copyGroup
6451
		end
6452
6453
		function saveProp(obj,prop,par)
6454
			local myProp = obj[prop]
6455
			if type(myProp) == "boolean" then
6456
				local newProp = Instance.new("BoolValue",par)
6457
				newProp.Name = prop
6458
				newProp.Value = myProp
6459
			elseif type(myProp) == "number" then
6460
				local newProp = Instance.new("IntValue",par)
6461
				newProp.Name = prop
6462
				newProp.Value = myProp
6463
			elseif type(myProp) == "string" then
6464
				local newProp = Instance.new("StringValue",par)
6465
				newProp.Name = prop
6466
				newProp.Value = myProp
6467
			elseif type(myProp) == "userdata" then -- Assume Color3
6468
				pcall(function()
6469
					local newProp = Instance.new("Color3Value",par)
6470
					newProp.Name = prop
6471
					newProp.Value = myProp
6472
				end)
6473
			end
6474
		end
6475
6476
		if lightingProperties then
6477
			local lightingProps = Instance.new("Model",copyGroup)
6478
			lightingProps.Name = "LightingProperties"
6479
6480
			saveProp(game:GetService('Lighting'),"Ambient",lightingProps)
6481
			saveProp(game:GetService('Lighting'),"Brightness",lightingProps)
6482
			saveProp(game:GetService('Lighting'),"ColorShift_Bottom",lightingProps)
6483
			saveProp(game:GetService('Lighting'),"ColorShift_Top",lightingProps)
6484
			saveProp(game:GetService('Lighting'),"GlobalShadows",lightingProps)
6485
			saveProp(game:GetService('Lighting'),"OutdoorAmbient",lightingProps)
6486
			saveProp(game:GetService('Lighting'),"Outlines",lightingProps)
6487
			saveProp(game:GetService('Lighting'),"GeographicLatitude",lightingProps)
6488
			saveProp(game:GetService('Lighting'),"TimeOfDay",lightingProps)
6489
			saveProp(game:GetService('Lighting'),"FogColor",lightingProps)
6490
			saveProp(game:GetService('Lighting'),"FogEnd",lightingProps)
6491
			saveProp(game:GetService('Lighting'),"FogStart",lightingProps)
6492
		end
6493
6494
		if decompile and copyScripts then
6495
			decompileS(copyGroup)
6496
		end
6497
6498
		if SaveInstance then
6499
			SaveInstance(copyGroup,SaveMapName.Text..".rbxm")
6500
		elseif saveinstance then
6501
			saveinstance(getelysianpath()..SaveMapName.Text..".rbxm",copyGroup)
6502
		end
6503
		--print("Saved!")
6504
		if consoleFunc then
6505
			consoleFunc("The map has been copied.")
6506
		end
6507
		SaveMapButton.Text = "The map has been saved"
6508
		wait(5)
6509
		SaveMapButton.Text = "Save"
6510
	end)
6511
6512
	-- End Copier
6513
6514
	wait()
6515
6516
	IntroFrame:TweenPosition(UDim2.new(1,-301,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
6517
6518
	switchWindows("Explorer")
6519
6520
	wait(1)
6521
6522
	SideMenu.Visible = true
6523
6524
	for i = 0,1,0.1 do
6525
		IntroFrame.BackgroundTransparency = i
6526
		IntroFrame.Main.BackgroundTransparency = i
6527
		IntroFrame.Slant.ImageTransparency = i
6528
		IntroFrame.Title.TextTransparency = i
6529
		IntroFrame.Version.TextTransparency = i
6530
		IntroFrame.Creator.TextTransparency = i
6531
		IntroFrame.Sad.ImageTransparency = i
6532
		wait()
6533
	end
6534
6535
	IntroFrame.Visible = false
6536
6537
	SlideFrame:TweenPosition(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
6538
	OpenScriptEditorButton:TweenPosition(UDim2.new(0,0,0,150),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
6539
	CloseToggleButton:TweenPosition(UDim2.new(0,0,0,180),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
6540
	Slant:TweenPosition(UDim2.new(0,0,0,210),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
6541
6542
	wait(0.5)
6543
6544
	for i = 1,0,-0.1 do
6545
		OpenScriptEditorButton.Icon.ImageTransparency = i
6546
		CloseToggleButton.TextTransparency = i
6547
		wait()
6548
	end
6549
6550
	CloseToggleButton.Active = true
6551
	CloseToggleButton.AutoButtonColor = true
6552
6553
	OpenScriptEditorButton.Active = true
6554
	OpenScriptEditorButton.AutoButtonColor = true
6555
end))
6556
Frame19.Name = "SideMenu"
6557
Frame19.Parent = ScreenGui0
6558
Frame19.Position = UDim2.new(1, -330, 0, 0)
6559
Frame19.Visible = false
6560
Frame19.Transparency = 1
6561
Frame19.Size = UDim2.new(0, 30, 0, 180)
6562
Frame19.BackgroundColor = BrickColor.new("Lily white")
6563
Frame19.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
6564
Frame19.BackgroundTransparency = 1
6565
Frame19.BorderColor = BrickColor.new("Sand violet metallic")
6566
Frame19.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
6567
Frame19.BorderSizePixel = 0
6568
Frame19.ZIndex = 2
6569
TextButton20.Name = "Toggle"
6570
TextButton20.Parent = Frame19
6571
TextButton20.Position = UDim2.new(0, 0, 0, 60)
6572
TextButton20.Size = UDim2.new(0, 30, 0, 30)
6573
TextButton20.Active = false
6574
TextButton20.BackgroundColor = BrickColor.new("Lily white")
6575
TextButton20.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
6576
TextButton20.BorderSizePixel = 0
6577
TextButton20.AutoButtonColor = false
6578
TextButton20.Font = Enum.Font.SourceSans
6579
TextButton20.FontSize = Enum.FontSize.Size24
6580
TextButton20.Text = ">"
6581
TextButton20.TextSize = 24
6582
TextButton20.TextTransparency = 1
6583
TextButton20.TextWrap = true
6584
TextButton20.TextWrapped = true
6585
TextLabel21.Name = "Title"
6586
TextLabel21.Parent = Frame19
6587
TextLabel21.Transparency = 1
6588
TextLabel21.Size = UDim2.new(0, 30, 0, 20)
6589
TextLabel21.BackgroundColor = BrickColor.new("Institutional white")
6590
TextLabel21.BackgroundColor3 = Color3.new(1, 1, 1)
6591
TextLabel21.BackgroundTransparency = 1
6592
TextLabel21.ZIndex = 2
6593
TextLabel21.Font = Enum.Font.SourceSansBold
6594
TextLabel21.FontSize = Enum.FontSize.Size14
6595
TextLabel21.Text = "DEX"
6596
TextLabel21.TextSize = 14
6597
TextLabel21.TextWrap = true
6598
TextLabel21.TextWrapped = true
6599
TextLabel22.Name = "Version"
6600
TextLabel22.Parent = Frame19
6601
TextLabel22.Position = UDim2.new(0, 0, 0, 15)
6602
TextLabel22.Transparency = 1
6603
TextLabel22.Size = UDim2.new(0, 30, 0, 20)
6604
TextLabel22.BackgroundColor = BrickColor.new("Institutional white")
6605
TextLabel22.BackgroundColor3 = Color3.new(1, 1, 1)
6606
TextLabel22.BackgroundTransparency = 1
6607
TextLabel22.ZIndex = 2
6608
TextLabel22.Font = Enum.Font.SourceSansBold
6609
TextLabel22.FontSize = Enum.FontSize.Size12
6610
TextLabel22.Text = "v3"
6611
TextLabel22.TextSize = 12
6612
TextLabel22.TextWrap = true
6613
TextLabel22.TextWrapped = true
6614
ImageLabel23.Name = "Slant"
6615
ImageLabel23.Parent = Frame19
6616
ImageLabel23.Position = UDim2.new(0, 0, 0, 90)
6617
ImageLabel23.Rotation = 180
6618
ImageLabel23.Transparency = 1
6619
ImageLabel23.Size = UDim2.new(0, 30, 0, 30)
6620
ImageLabel23.BackgroundColor = BrickColor.new("Institutional white")
6621
ImageLabel23.BackgroundColor3 = Color3.new(1, 1, 1)
6622
ImageLabel23.BackgroundTransparency = 1
6623
ImageLabel23.Image = "rbxassetid://1513966937"
6624
ImageLabel23.ImageColor3 = Color3.new(0.913726, 0.913726, 0.913726)
6625
Frame24.Name = "Main"
6626
Frame24.Parent = Frame19
6627
Frame24.Size = UDim2.new(0, 30, 0, 30)
6628
Frame24.BackgroundColor = BrickColor.new("Lily white")
6629
Frame24.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
6630
Frame24.BorderSizePixel = 0
6631
Frame25.Name = "SlideOut"
6632
Frame25.Parent = Frame19
6633
Frame25.Position = UDim2.new(0, 0, 0, 30)
6634
Frame25.Transparency = 1
6635
Frame25.Size = UDim2.new(0, 30, 0, 150)
6636
Frame25.BackgroundColor = BrickColor.new("Quill grey")
6637
Frame25.BackgroundColor3 = Color3.new(0.862745, 0.862745, 0.862745)
6638
Frame25.BackgroundTransparency = 1
6639
Frame25.BorderSizePixel = 0
6640
Frame25.ClipsDescendants = true
6641
Frame26.Name = "SlideFrame"
6642
Frame26.Parent = Frame25
6643
Frame26.Position = UDim2.new(0, 0, 0, -120)
6644
Frame26.Size = UDim2.new(0, 30, 0, 120)
6645
Frame26.BackgroundColor = BrickColor.new("Quill grey")
6646
Frame26.BackgroundColor3 = Color3.new(0.862745, 0.862745, 0.862745)
6647
Frame26.BorderSizePixel = 0
6648
TextButton27.Name = "Explorer"
6649
TextButton27.Parent = Frame26
6650
TextButton27.Position = UDim2.new(0, 0, 0, 90)
6651
TextButton27.Transparency = 1
6652
TextButton27.Size = UDim2.new(0, 30, 0, 30)
6653
TextButton27.BackgroundColor = BrickColor.new("Institutional white")
6654
TextButton27.BackgroundColor3 = Color3.new(1, 1, 1)
6655
TextButton27.BackgroundTransparency = 1
6656
TextButton27.BorderSizePixel = 0
6657
TextButton27.AutoButtonColor = false
6658
TextButton27.Font = Enum.Font.SourceSans
6659
TextButton27.FontSize = Enum.FontSize.Size24
6660
TextButton27.Text = ""
6661
TextButton27.TextSize = 24
6662
ImageLabel28.Name = "Icon"
6663
ImageLabel28.Parent = TextButton27
6664
ImageLabel28.Position = UDim2.new(0, 5, 0, 5)
6665
ImageLabel28.Transparency = 1
6666
ImageLabel28.Size = UDim2.new(0, 20, 0, 20)
6667
ImageLabel28.BackgroundColor = BrickColor.new("Institutional white")
6668
ImageLabel28.BackgroundColor3 = Color3.new(1, 1, 1)
6669
ImageLabel28.BackgroundTransparency = 1
6670
ImageLabel28.ZIndex = 2
6671
ImageLabel28.Image = "rbxassetid://472635937"
6672
ImageLabel28.ImageColor3 = Color3.new(0.27451, 0.27451, 0.27451)
6673
TextButton29.Name = "SaveMap"
6674
TextButton29.Parent = Frame26
6675
TextButton29.Position = UDim2.new(0, 0, 0, 60)
6676
TextButton29.Transparency = 1
6677
TextButton29.Size = UDim2.new(0, 30, 0, 30)
6678
TextButton29.BackgroundColor = BrickColor.new("Institutional white")
6679
TextButton29.BackgroundColor3 = Color3.new(1, 1, 1)
6680
TextButton29.BackgroundTransparency = 1
6681
TextButton29.BorderSizePixel = 0
6682
TextButton29.AutoButtonColor = false
6683
TextButton29.Font = Enum.Font.SourceSans
6684
TextButton29.FontSize = Enum.FontSize.Size24
6685
TextButton29.Text = ""
6686
TextButton29.TextSize = 24
6687
ImageLabel30.Name = "Icon"
6688
ImageLabel30.Parent = TextButton29
6689
ImageLabel30.Position = UDim2.new(0, 5, 0, 5)
6690
ImageLabel30.Transparency = 1
6691
ImageLabel30.Size = UDim2.new(0, 20, 0, 20)
6692
ImageLabel30.BackgroundColor = BrickColor.new("Institutional white")
6693
ImageLabel30.BackgroundColor3 = Color3.new(1, 1, 1)
6694
ImageLabel30.BackgroundTransparency = 1
6695
ImageLabel30.ZIndex = 2
6696
ImageLabel30.Image = "rbxassetid://472636337"
6697
ImageLabel30.ImageColor3 = Color3.new(0.27451, 0.27451, 0.27451)
6698
TextButton31.Name = "Settings"
6699
TextButton31.Parent = Frame26
6700
TextButton31.Position = UDim2.new(0, 0, 0, 30)
6701
TextButton31.Transparency = 1
6702
TextButton31.Size = UDim2.new(0, 30, 0, 30)
6703
TextButton31.BackgroundColor = BrickColor.new("Institutional white")
6704
TextButton31.BackgroundColor3 = Color3.new(1, 1, 1)
6705
TextButton31.BackgroundTransparency = 1
6706
TextButton31.BorderSizePixel = 0
6707
TextButton31.AutoButtonColor = false
6708
TextButton31.Font = Enum.Font.SourceSans
6709
TextButton31.FontSize = Enum.FontSize.Size24
6710
TextButton31.Text = ""
6711
TextButton31.TextSize = 24
6712
ImageLabel32.Name = "Icon"
6713
ImageLabel32.Parent = TextButton31
6714
ImageLabel32.Position = UDim2.new(0, 5, 0, 5)
6715
ImageLabel32.Transparency = 1
6716
ImageLabel32.Size = UDim2.new(0, 20, 0, 20)
6717
ImageLabel32.BackgroundColor = BrickColor.new("Institutional white")
6718
ImageLabel32.BackgroundColor3 = Color3.new(1, 1, 1)
6719
ImageLabel32.BackgroundTransparency = 1
6720
ImageLabel32.ZIndex = 2
6721
ImageLabel32.Image = "rbxassetid://472635774"
6722
ImageLabel32.ImageColor3 = Color3.new(0.27451, 0.27451, 0.27451)
6723
TextButton33.Name = "About"
6724
TextButton33.Parent = Frame26
6725
TextButton33.Transparency = 1
6726
TextButton33.Size = UDim2.new(0, 30, 0, 30)
6727
TextButton33.BackgroundColor = BrickColor.new("Institutional white")
6728
TextButton33.BackgroundColor3 = Color3.new(1, 1, 1)
6729
TextButton33.BackgroundTransparency = 1
6730
TextButton33.BorderSizePixel = 0
6731
TextButton33.AutoButtonColor = false
6732
TextButton33.Font = Enum.Font.SourceSans
6733
TextButton33.FontSize = Enum.FontSize.Size24
6734
TextButton33.Text = ""
6735
TextButton33.TextSize = 24
6736
ImageLabel34.Name = "Icon"
6737
ImageLabel34.Parent = TextButton33
6738
ImageLabel34.Position = UDim2.new(0, 5, 0, 5)
6739
ImageLabel34.Transparency = 1
6740
ImageLabel34.Size = UDim2.new(0, 20, 0, 20)
6741
ImageLabel34.BackgroundColor = BrickColor.new("Institutional white")
6742
ImageLabel34.BackgroundColor3 = Color3.new(1, 1, 1)
6743
ImageLabel34.BackgroundTransparency = 1
6744
ImageLabel34.ZIndex = 2
6745
ImageLabel34.Image = "rbxassetid://476354004"
6746
ImageLabel34.ImageColor3 = Color3.new(0.27451, 0.27451, 0.27451)
6747
TextButton35.Name = "OpenScriptEditor"
6748
TextButton35.Parent = Frame19
6749
TextButton35.Position = UDim2.new(0, 0, 0, 30)
6750
TextButton35.Size = UDim2.new(0, 30, 0, 30)
6751
TextButton35.Active = false
6752
TextButton35.BackgroundColor = BrickColor.new("Lily white")
6753
TextButton35.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
6754
TextButton35.BorderSizePixel = 0
6755
TextButton35.AutoButtonColor = false
6756
TextButton35.Font = Enum.Font.SourceSans
6757
TextButton35.FontSize = Enum.FontSize.Size24
6758
TextButton35.Text = ""
6759
TextButton35.TextSize = 24
6760
ImageLabel36.Name = "Icon"
6761
ImageLabel36.Parent = TextButton35
6762
ImageLabel36.Position = UDim2.new(0, 5, 0, 5)
6763
ImageLabel36.Transparency = 1
6764
ImageLabel36.Size = UDim2.new(0, 20, 0, 20)
6765
ImageLabel36.BackgroundColor = BrickColor.new("Institutional white")
6766
ImageLabel36.BackgroundColor3 = Color3.new(1, 1, 1)
6767
ImageLabel36.BackgroundTransparency = 1
6768
ImageLabel36.BorderSizePixel = 0
6769
ImageLabel36.ZIndex = 2
6770
ImageLabel36.Image = "rbxassetid://475456048"
6771
ImageLabel36.ImageColor3 = Color3.new(0.105882, 0.164706, 0.207843)
6772
ImageLabel36.ImageTransparency = 1
6773
Frame37.Name = "SettingsPanel"
6774
Frame37.Parent = ScreenGui0
6775
Frame37.Position = UDim2.new(1, 0, 0, 0)
6776
Frame37.Transparency = 0.10000000149012
6777
Frame37.Size = UDim2.new(0, 300, 1, 0)
6778
Frame37.BackgroundColor = BrickColor.new("Institutional white")
6779
Frame37.BackgroundColor3 = Color3.new(1, 1, 1)
6780
Frame37.BackgroundTransparency = 0.10000000149012
6781
Frame37.BorderColor = BrickColor.new("Light grey")
6782
Frame37.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
6783
Frame37.BorderSizePixel = 0
6784
Frame38.Name = "Header"
6785
Frame38.Parent = Frame37
6786
Frame38.Size = UDim2.new(1, 0, 0, 17)
6787
Frame38.BackgroundColor = BrickColor.new("Lily white")
6788
Frame38.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
6789
Frame38.BorderColor = BrickColor.new("Sand violet metallic")
6790
Frame38.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
6791
Frame38.BorderSizePixel = 0
6792
TextLabel39.Parent = Frame38
6793
TextLabel39.Position = UDim2.new(0, 4, 0, 0)
6794
TextLabel39.Transparency = 1
6795
TextLabel39.Size = UDim2.new(1, -4, 1, 0)
6796
TextLabel39.BackgroundTransparency = 1
6797
TextLabel39.BorderSizePixel = 0
6798
TextLabel39.Font = Enum.Font.SourceSans
6799
TextLabel39.FontSize = Enum.FontSize.Size14
6800
TextLabel39.Text = "Settings"
6801
TextLabel39.TextColor = BrickColor.new("Really black")
6802
TextLabel39.TextColor3 = Color3.new(0, 0, 0)
6803
TextLabel39.TextSize = 14
6804
TextLabel39.TextXAlignment = Enum.TextXAlignment.Left
6805
BindableFunction40.Name = "GetSetting"
6806
BindableFunction40.Parent = Frame37
6807
Frame41.Name = "SettingTemplate"
6808
Frame41.Parent = Frame37
6809
Frame41.Position = UDim2.new(0, 0, 0, 18)
6810
Frame41.Visible = false
6811
Frame41.Transparency = 1
6812
Frame41.Size = UDim2.new(1, 0, 0, 60)
6813
Frame41.BackgroundColor = BrickColor.new("Institutional white")
6814
Frame41.BackgroundColor3 = Color3.new(1, 1, 1)
6815
Frame41.BackgroundTransparency = 1
6816
TextLabel42.Name = "SName"
6817
TextLabel42.Parent = Frame41
6818
TextLabel42.Position = UDim2.new(0, 10, 0, 0)
6819
TextLabel42.Transparency = 1
6820
TextLabel42.Size = UDim2.new(1, -20, 0, 30)
6821
TextLabel42.BackgroundColor = BrickColor.new("Institutional white")
6822
TextLabel42.BackgroundColor3 = Color3.new(1, 1, 1)
6823
TextLabel42.BackgroundTransparency = 1
6824
TextLabel42.Font = Enum.Font.SourceSans
6825
TextLabel42.FontSize = Enum.FontSize.Size18
6826
TextLabel42.Text = "SettingName"
6827
TextLabel42.TextSize = 18
6828
TextLabel42.TextXAlignment = Enum.TextXAlignment.Left
6829
TextLabel43.Name = "Status"
6830
TextLabel43.Parent = Frame41
6831
TextLabel43.Position = UDim2.new(0, 60, 0, 30)
6832
TextLabel43.Transparency = 1
6833
TextLabel43.Size = UDim2.new(0, 50, 0, 15)
6834
TextLabel43.BackgroundColor = BrickColor.new("Institutional white")
6835
TextLabel43.BackgroundColor3 = Color3.new(1, 1, 1)
6836
TextLabel43.BackgroundTransparency = 1
6837
TextLabel43.Font = Enum.Font.SourceSans
6838
TextLabel43.FontSize = Enum.FontSize.Size18
6839
TextLabel43.Text = "Off"
6840
TextLabel43.TextSize = 18
6841
TextLabel43.TextXAlignment = Enum.TextXAlignment.Left
6842
TextButton44.Name = "Change"
6843
TextButton44.Parent = Frame41
6844
TextButton44.Position = UDim2.new(0, 10, 0, 30)
6845
TextButton44.Size = UDim2.new(0, 40, 0, 15)
6846
TextButton44.BackgroundColor = BrickColor.new("Quill grey")
6847
TextButton44.BackgroundColor3 = Color3.new(0.862745, 0.862745, 0.862745)
6848
TextButton44.BorderSizePixel = 0
6849
TextButton44.Font = Enum.Font.SourceSans
6850
TextButton44.FontSize = Enum.FontSize.Size14
6851
TextButton44.Text = ""
6852
TextButton44.TextSize = 14
6853
TextLabel45.Name = "OnBar"
6854
TextLabel45.Parent = TextButton44
6855
TextLabel45.Size = UDim2.new(0, 0, 0, 15)
6856
TextLabel45.BackgroundColor = BrickColor.new("Electric blue")
6857
TextLabel45.BackgroundColor3 = Color3.new(0, 0.576471, 0.862745)
6858
TextLabel45.BorderSizePixel = 0
6859
TextLabel45.Font = Enum.Font.SourceSans
6860
TextLabel45.FontSize = Enum.FontSize.Size14
6861
TextLabel45.Text = ""
6862
TextLabel45.TextSize = 14
6863
TextLabel46.Name = "Bar"
6864
TextLabel46.Parent = TextButton44
6865
TextLabel46.Position = UDim2.new(0, -2, 0, -2)
6866
TextLabel46.Size = UDim2.new(0, 10, 0, 19)
6867
TextLabel46.BackgroundColor = BrickColor.new("Really black")
6868
TextLabel46.BackgroundColor3 = Color3.new(0, 0, 0)
6869
TextLabel46.BorderSizePixel = 0
6870
TextLabel46.ClipsDescendants = true
6871
TextLabel46.Font = Enum.Font.SourceSans
6872
TextLabel46.FontSize = Enum.FontSize.Size14
6873-
TextLabel57.Text = "Save "Object" type values"
6873+
6874
TextLabel46.TextSize = 14
6875
Frame47.Name = "SettingList"
6876
Frame47.Parent = Frame37
6877
Frame47.Position = UDim2.new(0, 0, 0, 17)
6878
Frame47.Transparency = 1
6879
Frame47.Size = UDim2.new(1, 0, 1, -17)
6880
Frame47.BackgroundColor = BrickColor.new("Institutional white")
6881
Frame47.BackgroundColor3 = Color3.new(1, 1, 1)
6882
Frame47.BackgroundTransparency = 1
6883
Frame48.Name = "SaveInstance"
6884
Frame48.Parent = ScreenGui0
6885
Frame48.Position = UDim2.new(0.300000012, 0, 0.300000012, 0)
6886
Frame48.Visible = false
6887
Frame48.Size = UDim2.new(0, 350, 0, 20)
6888
Frame48.Active = true
6889
Frame48.BackgroundColor = BrickColor.new("Lily white")
6890
Frame48.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
6891
Frame48.BorderColor = BrickColor.new("Sand violet metallic")
6892
Frame48.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
6893
Frame48.BorderSizePixel = 0
6894
Frame48.Draggable = true
6895
Frame48.ZIndex = 2
6896
TextLabel49.Name = "Title"
6897
TextLabel49.Parent = Frame48
6898
TextLabel49.Transparency = 1
6899
TextLabel49.Size = UDim2.new(1, 0, 1, 0)
6900
TextLabel49.BackgroundTransparency = 1
6901
TextLabel49.ZIndex = 2
6902
TextLabel49.Font = Enum.Font.SourceSans
6903
TextLabel49.FontSize = Enum.FontSize.Size14
6904
TextLabel49.Text = "Save Instance"
6905
TextLabel49.TextColor = BrickColor.new("Really black")
6906
TextLabel49.TextColor3 = Color3.new(0, 0, 0)
6907
TextLabel49.TextSize = 14
6908
TextLabel49.TextXAlignment = Enum.TextXAlignment.Left
6909
Frame50.Name = "MainWindow"
6910
Frame50.Parent = Frame48
6911
Frame50.Transparency = 0.10000000149012
6912
Frame50.Size = UDim2.new(1, 0, 0, 200)
6913
Frame50.BackgroundColor = BrickColor.new("Institutional white")
6914
Frame50.BackgroundColor3 = Color3.new(1, 1, 1)
6915
Frame50.BackgroundTransparency = 0.10000000149012
6916
Frame50.BorderColor = BrickColor.new("Light grey")
6917
Frame50.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
6918
TextButton51.Name = "Save"
6919
TextButton51.Parent = Frame50
6920
TextButton51.Position = UDim2.new(0.075000003, 0, 1, -40)
6921
TextButton51.Transparency = 0.5
6922
TextButton51.Size = UDim2.new(0.400000006, 0, 0, 30)
6923
TextButton51.BackgroundColor = BrickColor.new("Institutional white")
6924
TextButton51.BackgroundColor3 = Color3.new(1, 1, 1)
6925
TextButton51.BackgroundTransparency = 0.5
6926
TextButton51.BorderColor = BrickColor.new("Really black")
6927
TextButton51.BorderColor3 = Color3.new(0, 0, 0)
6928
TextButton51.Font = Enum.Font.SourceSans
6929
TextButton51.FontSize = Enum.FontSize.Size18
6930
TextButton51.Text = "Save"
6931
TextButton51.TextSize = 18
6932
TextLabel52.Name = "Desc"
6933
TextLabel52.Parent = Frame50
6934
TextLabel52.Position = UDim2.new(0, 0, 0, 20)
6935
TextLabel52.Transparency = 1
6936
TextLabel52.Size = UDim2.new(1, 0, 0, 40)
6937
TextLabel52.BackgroundColor = BrickColor.new("Institutional white")
6938
TextLabel52.BackgroundColor3 = Color3.new(1, 1, 1)
6939
TextLabel52.BackgroundTransparency = 1
6940
TextLabel52.Font = Enum.Font.SourceSans
6941
TextLabel52.FontSize = Enum.FontSize.Size14
6942
TextLabel52.Text = "This will save an instance to your PC. Type in the name for your instance. (.rbxmx will be added automatically.)"
6943
TextLabel52.TextSize = 14
6944
TextLabel52.TextWrap = true
6945
TextLabel52.TextWrapped = true
6946
TextButton53.Name = "Cancel"
6947
TextButton53.Parent = Frame50
6948
TextButton53.Position = UDim2.new(0.524999976, 0, 1, -40)
6949
TextButton53.Transparency = 0.5
6950
TextButton53.Size = UDim2.new(0.400000006, 0, 0, 30)
6951
TextButton53.BackgroundColor = BrickColor.new("Institutional white")
6952
TextButton53.BackgroundColor3 = Color3.new(1, 1, 1)
6953
TextButton53.BackgroundTransparency = 0.5
6954
TextButton53.BorderColor = BrickColor.new("Really black")
6955
TextButton53.BorderColor3 = Color3.new(0, 0, 0)
6956
TextButton53.Font = Enum.Font.SourceSans
6957
TextButton53.FontSize = Enum.FontSize.Size18
6958
TextButton53.Text = "Cancel"
6959
TextButton53.TextSize = 18
6960
TextBox54.Name = "FileName"
6961
TextBox54.Parent = Frame50
6962
TextBox54.Position = UDim2.new(0.075000003, 0, 0.400000006, 0)
6963
TextBox54.Transparency = 0.20000000298023
6964
TextBox54.Size = UDim2.new(0.850000024, 0, 0, 30)
6965
TextBox54.BackgroundColor = BrickColor.new("Institutional white")
6966
TextBox54.BackgroundColor3 = Color3.new(1, 1, 1)
6967
TextBox54.BackgroundTransparency = 0.20000000298023
6968
TextBox54.Font = Enum.Font.SourceSans
6969
TextBox54.FontSize = Enum.FontSize.Size18
6970
TextBox54.Text = ""
6971
TextBox54.TextSize = 18
6972
TextBox54.TextXAlignment = Enum.TextXAlignment.Left
6973
TextButton55.Name = "SaveObjects"
6974
TextButton55.Parent = Frame50
6975
TextButton55.Position = UDim2.new(0.075000003, 0, 0.625, 0)
6976
TextButton55.Transparency = 0.60000002384186
6977
TextButton55.Size = UDim2.new(0, 20, 0, 20)
6978
TextButton55.BackgroundColor = BrickColor.new("Institutional white")
6979
TextButton55.BackgroundColor3 = Color3.new(1, 1, 1)
6980
TextButton55.BackgroundTransparency = 0.60000002384186
6981
TextButton55.ZIndex = 2
6982
TextButton55.Font = Enum.Font.SourceSans
6983
TextButton55.FontSize = Enum.FontSize.Size18
6984
TextButton55.Text = ""
6985
TextButton55.TextColor = BrickColor.new("Institutional white")
6986
TextButton55.TextColor3 = Color3.new(1, 1, 1)
6987
TextButton55.TextSize = 18
6988
TextLabel56.Name = "enabled"
6989
TextLabel56.Parent = TextButton55
6990
TextLabel56.Position = UDim2.new(0, 3, 0, 3)
6991
TextLabel56.Transparency = 0.40000000596046
6992
TextLabel56.Size = UDim2.new(0, 14, 0, 14)
6993
TextLabel56.BackgroundColor = BrickColor.new("Dark stone grey")
6994
TextLabel56.BackgroundColor3 = Color3.new(0.380392, 0.380392, 0.380392)
6995
TextLabel56.BackgroundTransparency = 0.40000000596046
6996
TextLabel56.BorderSizePixel = 0
6997
TextLabel56.Font = Enum.Font.SourceSans
6998
TextLabel56.FontSize = Enum.FontSize.Size14
6999
TextLabel56.Text = ""
7000
TextLabel56.TextSize = 14
7001
TextLabel57.Name = "Desc2"
7002
TextLabel57.Parent = Frame50
7003
TextLabel57.Position = UDim2.new(0.075000003, 30, 0.625, 0)
7004
TextLabel57.Transparency = 1
7005
TextLabel57.Size = UDim2.new(0.925000012, -30, 0, 20)
7006
TextLabel57.BackgroundColor = BrickColor.new("Institutional white")
7007
TextLabel57.BackgroundColor3 = Color3.new(1, 1, 1)
7008
TextLabel57.BackgroundTransparency = 1
7009
TextLabel57.Font = Enum.Font.SourceSans
7010
TextLabel57.FontSize = Enum.FontSize.Size14
7011
TextLabel57.Text = "Save Object Type Values"
7012
TextLabel57.TextSize = 14
7013
TextLabel57.TextXAlignment = Enum.TextXAlignment.Left
7014
Frame58.Name = "Confirmation"
7015
Frame58.Parent = ScreenGui0
7016
Frame58.Position = UDim2.new(0.5, -175, 0.5, -75)
7017
Frame58.Visible = false
7018
Frame58.Size = UDim2.new(0, 350, 0, 20)
7019
Frame58.Active = true
7020
Frame58.BackgroundColor = BrickColor.new("Lily white")
7021
Frame58.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
7022
Frame58.BorderColor = BrickColor.new("Sand violet metallic")
7023
Frame58.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7024
Frame58.BorderSizePixel = 0
7025
Frame58.Draggable = true
7026
Frame58.ZIndex = 3
7027
TextLabel59.Name = "Title"
7028
TextLabel59.Parent = Frame58
7029
TextLabel59.Transparency = 1
7030
TextLabel59.Size = UDim2.new(1, 0, 1, 0)
7031
TextLabel59.BackgroundTransparency = 1
7032
TextLabel59.ZIndex = 3
7033
TextLabel59.Font = Enum.Font.SourceSans
7034
TextLabel59.FontSize = Enum.FontSize.Size14
7035
TextLabel59.Text = "Confirm"
7036
TextLabel59.TextColor = BrickColor.new("Really black")
7037
TextLabel59.TextColor3 = Color3.new(0, 0, 0)
7038
TextLabel59.TextSize = 14
7039
TextLabel59.TextXAlignment = Enum.TextXAlignment.Left
7040
Frame60.Name = "MainWindow"
7041
Frame60.Parent = Frame58
7042
Frame60.Transparency = 0.10000000149012
7043
Frame60.Size = UDim2.new(1, 0, 0, 150)
7044
Frame60.BackgroundColor = BrickColor.new("Institutional white")
7045
Frame60.BackgroundColor3 = Color3.new(1, 1, 1)
7046
Frame60.BackgroundTransparency = 0.10000000149012
7047
Frame60.BorderColor = BrickColor.new("Light grey")
7048
Frame60.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
7049
Frame60.ZIndex = 2
7050
TextButton61.Name = "Yes"
7051
TextButton61.Parent = Frame60
7052
TextButton61.Position = UDim2.new(0.075000003, 0, 1, -40)
7053
TextButton61.Transparency = 0.5
7054
TextButton61.Size = UDim2.new(0.400000006, 0, 0, 30)
7055
TextButton61.BackgroundColor = BrickColor.new("Institutional white")
7056
TextButton61.BackgroundColor3 = Color3.new(1, 1, 1)
7057
TextButton61.BackgroundTransparency = 0.5
7058
TextButton61.BorderColor = BrickColor.new("Really black")
7059
TextButton61.BorderColor3 = Color3.new(0, 0, 0)
7060
TextButton61.ZIndex = 2
7061
TextButton61.Font = Enum.Font.SourceSans
7062
TextButton61.FontSize = Enum.FontSize.Size18
7063
TextButton61.Text = "Yes"
7064
TextButton61.TextSize = 18
7065
TextLabel62.Name = "Desc"
7066
TextLabel62.Parent = Frame60
7067
TextLabel62.Position = UDim2.new(0, 0, 0, 20)
7068
TextLabel62.Transparency = 1
7069
TextLabel62.Size = UDim2.new(1, 0, 0, 40)
7070
TextLabel62.BackgroundColor = BrickColor.new("Institutional white")
7071
TextLabel62.BackgroundColor3 = Color3.new(1, 1, 1)
7072
TextLabel62.BackgroundTransparency = 1
7073
TextLabel62.ZIndex = 2
7074
TextLabel62.Font = Enum.Font.SourceSans
7075
TextLabel62.FontSize = Enum.FontSize.Size14
7076
TextLabel62.Text = "The file, FILENAME, already exists. Overwrite?"
7077
TextLabel62.TextSize = 14
7078
TextLabel62.TextWrap = true
7079
TextLabel62.TextWrapped = true
7080
TextButton63.Name = "No"
7081
TextButton63.Parent = Frame60
7082
TextButton63.Position = UDim2.new(0.524999976, 0, 1, -40)
7083
TextButton63.Transparency = 0.5
7084
TextButton63.Size = UDim2.new(0.400000006, 0, 0, 30)
7085
TextButton63.BackgroundColor = BrickColor.new("Institutional white")
7086
TextButton63.BackgroundColor3 = Color3.new(1, 1, 1)
7087
TextButton63.BackgroundTransparency = 0.5
7088
TextButton63.BorderColor = BrickColor.new("Really black")
7089
TextButton63.BorderColor3 = Color3.new(0, 0, 0)
7090
TextButton63.ZIndex = 2
7091
TextButton63.Font = Enum.Font.SourceSans
7092
TextButton63.FontSize = Enum.FontSize.Size18
7093
TextButton63.Text = "No"
7094
TextButton63.TextSize = 18
7095
Frame64.Name = "Caution"
7096
Frame64.Parent = ScreenGui0
7097
Frame64.Position = UDim2.new(0.5, -175, 0.5, -75)
7098
Frame64.Visible = false
7099
Frame64.Size = UDim2.new(0, 350, 0, 20)
7100
Frame64.Active = true
7101
Frame64.BackgroundColor = BrickColor.new("Lily white")
7102
Frame64.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
7103
Frame64.BorderColor = BrickColor.new("Sand violet metallic")
7104
Frame64.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7105
Frame64.BorderSizePixel = 0
7106
Frame64.Draggable = true
7107
Frame64.ZIndex = 5
7108
TextLabel65.Name = "Title"
7109
TextLabel65.Parent = Frame64
7110
TextLabel65.Transparency = 1
7111
TextLabel65.Size = UDim2.new(1, 0, 1, 0)
7112
TextLabel65.BackgroundTransparency = 1
7113
TextLabel65.ZIndex = 5
7114
TextLabel65.Font = Enum.Font.SourceSans
7115
TextLabel65.FontSize = Enum.FontSize.Size14
7116
TextLabel65.Text = "Caution"
7117
TextLabel65.TextColor = BrickColor.new("Really black")
7118
TextLabel65.TextColor3 = Color3.new(0, 0, 0)
7119
TextLabel65.TextSize = 14
7120
TextLabel65.TextXAlignment = Enum.TextXAlignment.Left
7121
Frame66.Name = "MainWindow"
7122
Frame66.Parent = Frame64
7123
Frame66.Transparency = 0.10000000149012
7124
Frame66.Size = UDim2.new(1, 0, 0, 150)
7125
Frame66.BackgroundColor = BrickColor.new("Institutional white")
7126
Frame66.BackgroundColor3 = Color3.new(1, 1, 1)
7127
Frame66.BackgroundTransparency = 0.10000000149012
7128
Frame66.BorderColor = BrickColor.new("Light grey")
7129
Frame66.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
7130
Frame66.ZIndex = 4
7131
TextLabel67.Name = "Desc"
7132
TextLabel67.Parent = Frame66
7133
TextLabel67.Position = UDim2.new(0, 0, 0, 20)
7134
TextLabel67.Transparency = 1
7135
TextLabel67.Size = UDim2.new(1, 0, 0, 42)
7136
TextLabel67.BackgroundColor = BrickColor.new("Institutional white")
7137
TextLabel67.BackgroundColor3 = Color3.new(1, 1, 1)
7138
TextLabel67.BackgroundTransparency = 1
7139
TextLabel67.ZIndex = 4
7140
TextLabel67.Font = Enum.Font.SourceSans
7141
TextLabel67.FontSize = Enum.FontSize.Size14
7142
TextLabel67.Text = "The file, FILENAME, already exists. Overwrite?"
7143
TextLabel67.TextSize = 14
7144
TextLabel67.TextWrap = true
7145
TextLabel67.TextWrapped = true
7146
TextButton68.Name = "Ok"
7147
TextButton68.Parent = Frame66
7148
TextButton68.Position = UDim2.new(0.300000012, 0, 1, -40)
7149
TextButton68.Transparency = 0.5
7150
TextButton68.Size = UDim2.new(0.400000006, 0, 0, 30)
7151
TextButton68.BackgroundColor = BrickColor.new("Institutional white")
7152
TextButton68.BackgroundColor3 = Color3.new(1, 1, 1)
7153
TextButton68.BackgroundTransparency = 0.5
7154
TextButton68.BorderColor = BrickColor.new("Really black")
7155
TextButton68.BorderColor3 = Color3.new(0, 0, 0)
7156
TextButton68.ZIndex = 4
7157
TextButton68.Font = Enum.Font.SourceSans
7158
TextButton68.FontSize = Enum.FontSize.Size18
7159
TextButton68.Text = "Ok"
7160
TextButton68.TextSize = 18
7161
Frame69.Name = "CallRemote"
7162
Frame69.Parent = ScreenGui0
7163
Frame69.Position = UDim2.new(0.5, -175, 0.5, -100)
7164
Frame69.Visible = false
7165
Frame69.Size = UDim2.new(0, 350, 0, 20)
7166
Frame69.Active = true
7167
Frame69.BackgroundColor = BrickColor.new("Lily white")
7168
Frame69.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
7169
Frame69.BorderColor = BrickColor.new("Sand violet metallic")
7170
Frame69.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7171
Frame69.BorderSizePixel = 0
7172
Frame69.Draggable = true
7173
Frame69.ZIndex = 2
7174
TextLabel70.Name = "Title"
7175
TextLabel70.Parent = Frame69
7176
TextLabel70.Transparency = 1
7177
TextLabel70.Size = UDim2.new(1, 0, 1, 0)
7178
TextLabel70.BackgroundTransparency = 1
7179
TextLabel70.ZIndex = 2
7180
TextLabel70.Font = Enum.Font.SourceSans
7181
TextLabel70.FontSize = Enum.FontSize.Size14
7182
TextLabel70.Text = "Call Remote"
7183
TextLabel70.TextColor = BrickColor.new("Really black")
7184
TextLabel70.TextColor3 = Color3.new(0, 0, 0)
7185
TextLabel70.TextSize = 14
7186
TextLabel70.TextXAlignment = Enum.TextXAlignment.Left
7187
Frame71.Name = "MainWindow"
7188
Frame71.Parent = Frame69
7189
Frame71.Transparency = 0.10000000149012
7190
Frame71.Size = UDim2.new(1, 0, 0, 200)
7191
Frame71.BackgroundColor = BrickColor.new("Institutional white")
7192
Frame71.BackgroundColor3 = Color3.new(1, 1, 1)
7193
Frame71.BackgroundTransparency = 0.10000000149012
7194
Frame71.BorderColor = BrickColor.new("Light grey")
7195
Frame71.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
7196
TextLabel72.Name = "Desc"
7197
TextLabel72.Parent = Frame71
7198
TextLabel72.Position = UDim2.new(0, 0, 0, 20)
7199
TextLabel72.Transparency = 1
7200
TextLabel72.Size = UDim2.new(1, 0, 0, 20)
7201
TextLabel72.BackgroundColor = BrickColor.new("Institutional white")
7202
TextLabel72.BackgroundColor3 = Color3.new(1, 1, 1)
7203
TextLabel72.BackgroundTransparency = 1
7204
TextLabel72.Font = Enum.Font.SourceSans
7205
TextLabel72.FontSize = Enum.FontSize.Size14
7206
TextLabel72.Text = "Arguments"
7207
TextLabel72.TextSize = 14
7208
TextLabel72.TextWrap = true
7209
TextLabel72.TextWrapped = true
7210
ScrollingFrame73.Name = "Arguments"
7211
ScrollingFrame73.Parent = Frame71
7212
ScrollingFrame73.Position = UDim2.new(0, 0, 0, 40)
7213
ScrollingFrame73.Transparency = 1
7214
ScrollingFrame73.Size = UDim2.new(1, 0, 0, 80)
7215
ScrollingFrame73.BackgroundColor = BrickColor.new("Institutional white")
7216
ScrollingFrame73.BackgroundColor3 = Color3.new(1, 1, 1)
7217
ScrollingFrame73.BackgroundTransparency = 1
7218
ScrollingFrame73.BottomImage = "rbxasset://textures/blackBkg_square.png"
7219
ScrollingFrame73.CanvasSize = UDim2.new(0, 0, 0, 0)
7220
ScrollingFrame73.MidImage = "rbxasset://textures/blackBkg_square.png"
7221
ScrollingFrame73.ScrollingDirection = Enum.ScrollingDirection.Y
7222
ScrollingFrame73.TopImage = "rbxasset://textures/blackBkg_square.png"
7223
TextButton74.Name = "DisplayReturned"
7224
TextButton74.Parent = Frame71
7225
TextButton74.Position = UDim2.new(0.075000003, 0, 0.625, 0)
7226
TextButton74.Transparency = 0.60000002384186
7227
TextButton74.Size = UDim2.new(0, 20, 0, 20)
7228
TextButton74.BackgroundColor = BrickColor.new("Institutional white")
7229
TextButton74.BackgroundColor3 = Color3.new(1, 1, 1)
7230
TextButton74.BackgroundTransparency = 0.60000002384186
7231
TextButton74.ZIndex = 2
7232
TextButton74.Font = Enum.Font.SourceSans
7233
TextButton74.FontSize = Enum.FontSize.Size18
7234
TextButton74.Text = ""
7235
TextButton74.TextColor = BrickColor.new("Institutional white")
7236
TextButton74.TextColor3 = Color3.new(1, 1, 1)
7237
TextButton74.TextSize = 18
7238
TextLabel75.Name = "enabled"
7239
TextLabel75.Parent = TextButton74
7240
TextLabel75.Position = UDim2.new(0, 3, 0, 3)
7241
TextLabel75.Visible = false
7242
TextLabel75.Transparency = 0.40000000596046
7243
TextLabel75.Size = UDim2.new(0, 14, 0, 14)
7244
TextLabel75.BackgroundColor = BrickColor.new("Dark stone grey")
7245
TextLabel75.BackgroundColor3 = Color3.new(0.380392, 0.380392, 0.380392)
7246
TextLabel75.BackgroundTransparency = 0.40000000596046
7247
TextLabel75.BorderSizePixel = 0
7248
TextLabel75.Font = Enum.Font.SourceSans
7249
TextLabel75.FontSize = Enum.FontSize.Size14
7250
TextLabel75.Text = ""
7251
TextLabel75.TextSize = 14
7252
TextLabel76.Name = "Desc2"
7253
TextLabel76.Parent = Frame71
7254
TextLabel76.Position = UDim2.new(0.075000003, 30, 0.625, 0)
7255
TextLabel76.Transparency = 1
7256
TextLabel76.Size = UDim2.new(0.925000012, -30, 0, 20)
7257
TextLabel76.BackgroundColor = BrickColor.new("Institutional white")
7258
TextLabel76.BackgroundColor3 = Color3.new(1, 1, 1)
7259
TextLabel76.BackgroundTransparency = 1
7260
TextLabel76.Font = Enum.Font.SourceSans
7261
TextLabel76.FontSize = Enum.FontSize.Size14
7262
TextLabel76.Text = "Display values returned"
7263
TextLabel76.TextSize = 14
7264
TextLabel76.TextXAlignment = Enum.TextXAlignment.Left
7265
TextButton77.Name = "Add"
7266
TextButton77.Parent = Frame71
7267
TextButton77.Position = UDim2.new(0.800000012, 0, 0.625, 0)
7268
TextButton77.Transparency = 0.5
7269
TextButton77.Size = UDim2.new(0, 20, 0, 20)
7270
TextButton77.BackgroundColor = BrickColor.new("Institutional white")
7271
TextButton77.BackgroundColor3 = Color3.new(1, 1, 1)
7272
TextButton77.BackgroundTransparency = 0.5
7273
TextButton77.BorderColor = BrickColor.new("Really black")
7274
TextButton77.BorderColor3 = Color3.new(0, 0, 0)
7275
TextButton77.Font = Enum.Font.SourceSansBold
7276
TextButton77.FontSize = Enum.FontSize.Size24
7277
TextButton77.Text = "+"
7278
TextButton77.TextSize = 24
7279
TextButton78.Name = "Subtract"
7280
TextButton78.Parent = Frame71
7281
TextButton78.Position = UDim2.new(0.899999976, 0, 0.625, 0)
7282
TextButton78.Transparency = 0.5
7283
TextButton78.Size = UDim2.new(0, 20, 0, 20)
7284
TextButton78.BackgroundColor = BrickColor.new("Institutional white")
7285
TextButton78.BackgroundColor3 = Color3.new(1, 1, 1)
7286
TextButton78.BackgroundTransparency = 0.5
7287
TextButton78.BorderColor = BrickColor.new("Really black")
7288
TextButton78.BorderColor3 = Color3.new(0, 0, 0)
7289
TextButton78.Font = Enum.Font.SourceSansBold
7290
TextButton78.FontSize = Enum.FontSize.Size24
7291
TextButton78.Text = "-"
7292
TextButton78.TextSize = 24
7293
Frame79.Name = "ArgumentTemplate"
7294
Frame79.Parent = Frame71
7295
Frame79.Visible = false
7296
Frame79.Transparency = 0.5
7297
Frame79.Size = UDim2.new(1, 0, 0, 20)
7298
Frame79.BackgroundColor = BrickColor.new("Institutional white")
7299
Frame79.BackgroundColor3 = Color3.new(1, 1, 1)
7300
Frame79.BackgroundTransparency = 0.5
7301
Frame79.BorderColor = BrickColor.new("Light grey")
7302
Frame79.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
7303
TextButton80.Name = "Type"
7304
TextButton80.Parent = Frame79
7305
TextButton80.Transparency = 0.89999997615814
7306
TextButton80.Size = UDim2.new(0.400000006, 0, 0, 20)
7307
TextButton80.BackgroundColor = BrickColor.new("Institutional white")
7308
TextButton80.BackgroundColor3 = Color3.new(1, 1, 1)
7309
TextButton80.BackgroundTransparency = 0.89999997615814
7310
TextButton80.BorderColor = BrickColor.new("Really black")
7311
TextButton80.BorderColor3 = Color3.new(0, 0, 0)
7312
TextButton80.Font = Enum.Font.SourceSans
7313
TextButton80.FontSize = Enum.FontSize.Size18
7314
TextButton80.Text = "Script"
7315
TextButton80.TextSize = 18
7316
TextBox81.Name = "Value"
7317
TextBox81.Parent = Frame79
7318
TextBox81.Position = UDim2.new(0.400000006, 0, 0, 0)
7319
TextBox81.Transparency = 0.89999997615814
7320
TextBox81.Size = UDim2.new(0.600000024, -12, 0, 20)
7321
TextBox81.BackgroundColor = BrickColor.new("Institutional white")
7322
TextBox81.BackgroundColor3 = Color3.new(1, 1, 1)
7323
TextBox81.BackgroundTransparency = 0.89999997615814
7324
TextBox81.Font = Enum.Font.SourceSans
7325
TextBox81.FontSize = Enum.FontSize.Size14
7326
TextBox81.Text = ""
7327
TextBox81.TextSize = 14
7328
TextBox81.TextXAlignment = Enum.TextXAlignment.Left
7329
TextButton82.Name = "Cancel"
7330
TextButton82.Parent = Frame71
7331
TextButton82.Position = UDim2.new(0.524999976, 0, 1, -40)
7332
TextButton82.Transparency = 0.5
7333
TextButton82.Size = UDim2.new(0.400000006, 0, 0, 30)
7334
TextButton82.BackgroundColor = BrickColor.new("Institutional white")
7335
TextButton82.BackgroundColor3 = Color3.new(1, 1, 1)
7336
TextButton82.BackgroundTransparency = 0.5
7337
TextButton82.BorderColor = BrickColor.new("Really black")
7338
TextButton82.BorderColor3 = Color3.new(0, 0, 0)
7339
TextButton82.Font = Enum.Font.SourceSans
7340
TextButton82.FontSize = Enum.FontSize.Size18
7341
TextButton82.Text = "Cancel"
7342
TextButton82.TextSize = 18
7343
TextButton83.Name = "Ok"
7344
TextButton83.Parent = Frame71
7345
TextButton83.Position = UDim2.new(0.075000003, 0, 1, -40)
7346
TextButton83.Transparency = 0.5
7347
TextButton83.Size = UDim2.new(0.400000006, 0, 0, 30)
7348
TextButton83.BackgroundColor = BrickColor.new("Institutional white")
7349
TextButton83.BackgroundColor3 = Color3.new(1, 1, 1)
7350
TextButton83.BackgroundTransparency = 0.5
7351
TextButton83.BorderColor = BrickColor.new("Really black")
7352
TextButton83.BorderColor3 = Color3.new(0, 0, 0)
7353
TextButton83.Font = Enum.Font.SourceSans
7354
TextButton83.FontSize = Enum.FontSize.Size18
7355
TextButton83.Text = "Call"
7356
TextButton83.TextSize = 18
7357
Frame84.Name = "TableCaution"
7358
Frame84.Parent = ScreenGui0
7359
Frame84.Position = UDim2.new(0.300000012, 0, 0.300000012, 0)
7360
Frame84.Visible = false
7361
Frame84.Size = UDim2.new(0, 350, 0, 20)
7362
Frame84.Active = true
7363
Frame84.BackgroundColor = BrickColor.new("Lily white")
7364
Frame84.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
7365
Frame84.BorderColor = BrickColor.new("Sand violet metallic")
7366
Frame84.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7367
Frame84.BorderSizePixel = 0
7368
Frame84.Draggable = true
7369
Frame84.ZIndex = 2
7370
Frame85.Name = "MainWindow"
7371
Frame85.Parent = Frame84
7372
Frame85.Transparency = 0.10000000149012
7373
Frame85.Size = UDim2.new(1, 0, 0, 150)
7374
Frame85.BackgroundColor = BrickColor.new("Institutional white")
7375
Frame85.BackgroundColor3 = Color3.new(1, 1, 1)
7376
Frame85.BackgroundTransparency = 0.10000000149012
7377
Frame85.BorderColor = BrickColor.new("Light grey")
7378
Frame85.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
7379
TextButton86.Name = "Ok"
7380
TextButton86.Parent = Frame85
7381
TextButton86.Position = UDim2.new(0.300000012, 0, 1, -40)
7382
TextButton86.Transparency = 0.5
7383
TextButton86.Size = UDim2.new(0.400000006, 0, 0, 30)
7384
TextButton86.BackgroundColor = BrickColor.new("Institutional white")
7385
TextButton86.BackgroundColor3 = Color3.new(1, 1, 1)
7386
TextButton86.BackgroundTransparency = 0.5
7387
TextButton86.BorderColor = BrickColor.new("Really black")
7388
TextButton86.BorderColor3 = Color3.new(0, 0, 0)
7389
TextButton86.Font = Enum.Font.SourceSans
7390
TextButton86.FontSize = Enum.FontSize.Size18
7391
TextButton86.Text = "Ok"
7392
TextButton86.TextSize = 18
7393
ScrollingFrame87.Name = "TableResults"
7394
ScrollingFrame87.Parent = Frame85
7395
ScrollingFrame87.Position = UDim2.new(0, 0, 0, 20)
7396
ScrollingFrame87.Transparency = 1
7397
ScrollingFrame87.Size = UDim2.new(1, 0, 0, 80)
7398
ScrollingFrame87.BackgroundColor = BrickColor.new("Institutional white")
7399
ScrollingFrame87.BackgroundColor3 = Color3.new(1, 1, 1)
7400
ScrollingFrame87.BackgroundTransparency = 1
7401
ScrollingFrame87.BottomImage = "rbxasset://textures/blackBkg_square.png"
7402
ScrollingFrame87.CanvasSize = UDim2.new(0, 0, 0, 0)
7403
ScrollingFrame87.MidImage = "rbxasset://textures/blackBkg_square.png"
7404
ScrollingFrame87.ScrollingDirection = Enum.ScrollingDirection.Y
7405
ScrollingFrame87.TopImage = "rbxasset://textures/blackBkg_square.png"
7406
Frame88.Name = "TableTemplate"
7407
Frame88.Parent = Frame85
7408
Frame88.Visible = false
7409
Frame88.Transparency = 0.5
7410
Frame88.Size = UDim2.new(1, 0, 0, 20)
7411
Frame88.BackgroundColor = BrickColor.new("Institutional white")
7412
Frame88.BackgroundColor3 = Color3.new(1, 1, 1)
7413
Frame88.BackgroundTransparency = 0.5
7414
Frame88.BorderColor = BrickColor.new("Light grey")
7415
Frame88.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
7416
TextLabel89.Name = "Type"
7417
TextLabel89.Parent = Frame88
7418
TextLabel89.Transparency = 0.89999997615814
7419
TextLabel89.Size = UDim2.new(0.400000006, 0, 0, 20)
7420
TextLabel89.BackgroundColor = BrickColor.new("Institutional white")
7421
TextLabel89.BackgroundColor3 = Color3.new(1, 1, 1)
7422
TextLabel89.BackgroundTransparency = 0.89999997615814
7423
TextLabel89.Font = Enum.Font.SourceSans
7424
TextLabel89.FontSize = Enum.FontSize.Size18
7425
TextLabel89.Text = "Script"
7426
TextLabel89.TextSize = 18
7427
TextLabel90.Name = "Value"
7428
TextLabel90.Parent = Frame88
7429
TextLabel90.Position = UDim2.new(0.400000006, 0, 0, 0)
7430
TextLabel90.Transparency = 0.89999997615814
7431
TextLabel90.Size = UDim2.new(0.600000024, -12, 0, 20)
7432
TextLabel90.BackgroundColor = BrickColor.new("Institutional white")
7433
TextLabel90.BackgroundColor3 = Color3.new(1, 1, 1)
7434
TextLabel90.BackgroundTransparency = 0.89999997615814
7435
TextLabel90.Font = Enum.Font.SourceSans
7436
TextLabel90.FontSize = Enum.FontSize.Size14
7437
TextLabel90.Text = "Script"
7438
TextLabel90.TextSize = 14
7439
TextLabel91.Name = "Title"
7440
TextLabel91.Parent = Frame84
7441
TextLabel91.Transparency = 1
7442
TextLabel91.Size = UDim2.new(1, 0, 1, 0)
7443
TextLabel91.BackgroundTransparency = 1
7444
TextLabel91.ZIndex = 2
7445
TextLabel91.Font = Enum.Font.SourceSans
7446
TextLabel91.FontSize = Enum.FontSize.Size14
7447
TextLabel91.Text = "Caution"
7448
TextLabel91.TextColor = BrickColor.new("Really black")
7449
TextLabel91.TextColor3 = Color3.new(0, 0, 0)
7450
TextLabel91.TextSize = 14
7451
TextLabel91.TextXAlignment = Enum.TextXAlignment.Left
7452
Frame92.Name = "ScriptEditor"
7453
Frame92.Parent = ScreenGui0
7454
Frame92.Position = UDim2.new(0.5, -258, 0.5, -208)
7455
Frame92.Visible = false
7456
Frame92.Size = UDim2.new(0, 516, 0, 20)
7457
Frame92.Active = true
7458
Frame92.BackgroundColor = BrickColor.new("Lily white")
7459
Frame92.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
7460
Frame92.BorderColor = BrickColor.new("Sand violet metallic")
7461
Frame92.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7462
Frame92.Draggable = true
7463
Frame92.ZIndex = 5
7464
TextLabel93.Name = "Title"
7465
TextLabel93.Parent = Frame92
7466
TextLabel93.Transparency = 1
7467
TextLabel93.Size = UDim2.new(1, 0, 1, 0)
7468
TextLabel93.BackgroundTransparency = 1
7469
TextLabel93.ZIndex = 5
7470
TextLabel93.Font = Enum.Font.SourceSans
7471
TextLabel93.FontSize = Enum.FontSize.Size14
7472
TextLabel93.Text = "Script Viewer"
7473
TextLabel93.TextColor = BrickColor.new("Really black")
7474
TextLabel93.TextColor3 = Color3.new(0, 0, 0)
7475
TextLabel93.TextSize = 14
7476
TextLabel93.TextXAlignment = Enum.TextXAlignment.Left
7477
Frame94.Name = "Cover"
7478
Frame94.Parent = Frame92
7479
Frame94.Position = UDim2.new(0, 0, 3, 0)
7480
Frame94.Size = UDim2.new(0, 516, 0, 416)
7481
Frame94.BackgroundColor = BrickColor.new("Institutional white")
7482
Frame94.BackgroundColor3 = Color3.new(1, 1, 1)
7483
Frame94.BorderSizePixel = 0
7484
Frame95.Name = "EditorGrid"
7485
Frame95.Parent = Frame92
7486
Frame95.Position = UDim2.new(0, 0, 3, 0)
7487
Frame95.Size = UDim2.new(0, 500, 0, 400)
7488
Frame95.BackgroundColor = BrickColor.new("Institutional white")
7489
Frame95.BackgroundColor3 = Color3.new(1, 1, 1)
7490
Frame95.BorderSizePixel = 0
7491
Frame96.Name = "TopBar"
7492
Frame96.Parent = Frame92
7493
Frame96.Size = UDim2.new(1, 0, 3, 0)
7494
Frame96.BackgroundColor = BrickColor.new("White")
7495
Frame96.BackgroundColor3 = Color3.new(0.941177, 0.941177, 0.941177)
7496
Frame96.BorderColor = BrickColor.new("Sand violet metallic")
7497
Frame96.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7498
ImageButton97.Name = "ScriptBarLeft"
7499
ImageButton97.Parent = Frame96
7500
ImageButton97.Position = UDim2.new(1, -32, 0, 40)
7501
ImageButton97.Size = UDim2.new(0, 16, 0, 20)
7502
ImageButton97.Active = false
7503
ImageButton97.BackgroundColor = BrickColor.new("Quill grey")
7504
ImageButton97.BackgroundColor3 = Color3.new(0.866667, 0.866667, 0.866667)
7505
ImageButton97.BorderColor = BrickColor.new("Sand violet metallic")
7506
ImageButton97.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7507
ImageButton97.AutoButtonColor = false
7508
Frame98.Name = "Arrow Graphic"
7509
Frame98.Parent = ImageButton97
7510
Frame98.Position = UDim2.new(0.5, -4, 0.5, -4)
7511
Frame98.Transparency = 1
7512
Frame98.Size = UDim2.new(0, 8, 0, 8)
7513
Frame98.BackgroundTransparency = 1
7514
Frame98.BorderSizePixel = 0
7515
Frame99.Name = "Graphic"
7516
Frame99.Parent = Frame98
7517
Frame99.Position = UDim2.new(0.25, 0, 0.375, 0)
7518
Frame99.Transparency = 0.69999998807907
7519
Frame99.Size = UDim2.new(0.125, 0, 0.25, 0)
7520
Frame99.BackgroundColor = BrickColor.new("Sand violet metallic")
7521
Frame99.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7522
Frame99.BackgroundTransparency = 0.69999998807907
7523
Frame99.BorderSizePixel = 0
7524
Frame100.Name = "Graphic"
7525
Frame100.Parent = Frame98
7526
Frame100.Position = UDim2.new(0.375, 0, 0.25, 0)
7527
Frame100.Transparency = 0.69999998807907
7528
Frame100.Size = UDim2.new(0.125, 0, 0.5, 0)
7529
Frame100.BackgroundColor = BrickColor.new("Sand violet metallic")
7530
Frame100.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7531
Frame100.BackgroundTransparency = 0.69999998807907
7532-
local top = script.Parent
7532+
7533
Frame101.Name = "Graphic"
7534-
local editorGrid = top:WaitForChild("EditorGrid")
7534+
7535
Frame101.Position = UDim2.new(0.5, 0, 0.125, 0)
7536-
local currentSource = ""
7536+
7537
Frame101.Size = UDim2.new(0.125, 0, 0.75, 0)
7538-
local currentEditor = {
7538+
7539-
	x = 0,
7539+
7540-
	y = 0
7540+
7541-
}
7541+
7542
Frame102.Name = "Graphic"
7543-
local userInput = game:GetService("UserInputService")
7543+
7544-
local mouse = game:GetService("Players").LocalPlayer:GetMouse()
7544+
7545
Frame102.Transparency = 0.69999998807907
7546-
local topBar = top:WaitForChild("TopBar")
7546+
7547-
local scriptBar = topBar:WaitForChild("ScriptBar")
7547+
7548-
local scriptBarLeft = topBar:WaitForChild("ScriptBarLeft")
7548+
7549-
local scriptBarRight = topBar:WaitForChild("ScriptBarRight")
7549+
7550-
local clipboardButton = topBar:WaitForChild("Clipboard")
7550+
7551
ImageButton103.Name = "ScriptBarRight"
7552-
local entryTemplate = topBar:WaitForChild("Entry")
7552+
7553
ImageButton103.Position = UDim2.new(1, -16, 0, 40)
7554-
local openEvent = top:WaitForChild("OpenScript")
7554+
7555
ImageButton103.Active = false
7556-
local closeButton = top:WaitForChild("Close")
7556+
7557
ImageButton103.BackgroundColor3 = Color3.new(0.866667, 0.866667, 0.866667)
7558-
local memoryScripts = {}
7558+
7559
ImageButton103.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7560-
local editingIndex = 0
7560+
7561
Frame104.Name = "Arrow Graphic"
7562-
-- Scrollbar
7562+
7563
Frame104.Position = UDim2.new(0.5, -4, 0.5, -4)
7564-
local ScrollBarWidth = 16
7564+
7565
Frame104.Size = UDim2.new(0, 8, 0, 8)
7566-
local ScrollStyles = {
7566+
7567-
	Background      = Color3.new(233/255, 233/255, 233/255);
7567+
7568-
	Border          = Color3.new(149/255, 149/255, 149/255);
7568+
7569-
	Selected        = Color3.new( 63/255, 119/255, 189/255);
7569+
7570-
	BorderSelected  = Color3.new( 55/255, 106/255, 167/255);
7570+
7571-
	Text            = Color3.new(  0/255,   0/255,   0/255);
7571+
7572-
	TextDisabled    = Color3.new(128/255, 128/255, 128/255);
7572+
7573-
	TextSelected    = Color3.new(255/255, 255/255, 255/255);
7573+
7574-
	Button          = Color3.new(221/255, 221/255, 221/255);
7574+
7575-
	ButtonBorder    = Color3.new(149/255, 149/255, 149/255);
7575+
7576-
	ButtonSelected  = Color3.new(255/255,   0/255,   0/255);
7576+
7577-
	Field           = Color3.new(255/255, 255/255, 255/255);
7577+
7578-
	FieldBorder     = Color3.new(191/255, 191/255, 191/255);
7578+
7579-
	TitleBackground = Color3.new(178/255, 178/255, 178/255);
7579+
7580-
}
7580+
7581
Frame106.Size = UDim2.new(0.125, 0, 0.5, 0)
7582-
	local ZIndexLock = {}
7582+
7583-
	function SetZIndex(object,z)
7583+
7584-
		if not ZIndexLock[object] then
7584+
7585-
			ZIndexLock[object] = true
7585+
7586-
			if object:IsA'GuiObject' then
7586+
7587-
				object.ZIndex = z
7587+
7588
Frame107.Position = UDim2.new(0.375, 0, 0.125, 0)
7589-
			local children = object:GetChildren()
7589+
7590-
			for i = 1,#children do
7590+
7591-
				SetZIndex(children[i],z)
7591+
7592
Frame107.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7593-
			ZIndexLock[object] = nil
7593+
7594
Frame107.BorderSizePixel = 0
7595
Frame108.Name = "Graphic"
7596
Frame108.Parent = Frame104
7597-
function SetZIndexOnChanged(object)
7597+
7598-
	return object.Changed:connect(function(p)
7598+
7599-
		if p == "ZIndex" then
7599+
7600-
			SetZIndex(object,object.ZIndex)
7600+
7601
Frame108.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7602
Frame108.BackgroundTransparency = 0.69999998807907
7603
Frame108.BorderSizePixel = 0
7604-
function Create(ty,data)
7604+
7605-
	local obj
7605+
7606-
	if type(ty) == 'string' then
7606+
7607-
		obj = Instance.new(ty)
7607+
7608
TextButton109.Size = UDim2.new(0, 80, 0, 20)
7609-
		obj = ty
7609+
7610
TextButton109.BackgroundColor3 = Color3.new(1, 1, 1)
7611-
	for k, v in pairs(data) do
7611+
7612-
		if type(k) == 'number' then
7612+
7613-
			v.Parent = obj
7613+
7614
TextButton109.Font = Enum.Font.SourceSans
7615-
			obj[k] = v
7615+
7616
TextButton109.Text = "To Clipboard"
7617
TextButton109.TextSize = 14
7618-
	return obj
7618+
7619
Frame110.Parent = Frame96
7620-
-- returns the ascendant ScreenGui of an object
7620+
7621-
function GetScreen(screen)
7621+
7622-
	if screen == nil then return nil end
7622+
7623-
	while not screen:IsA("ScreenGui") do
7623+
7624-
		screen = screen.Parent
7624+
7625
Frame110.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
7626
Frame110.ClipsDescendants = true
7627-
	return screen
7627+
7628
Frame111.Parent = Frame96
7629-
-- AutoButtonColor doesn't always reset properly
7629+
7630-
function ResetButtonColor(button)
7630+
7631-
	local active = button.Active
7631+
7632-
	button.Active = not active
7632+
7633-
	button.Active = active
7633+
7634
Frame111.BackgroundTransparency = 1
7635
TextButton112.Name = "Button"
7636-
function ArrowGraphic(size,dir,scaled,template)
7636+
7637-
	local Frame = Create('Frame',{
7637+
7638-
		Name = "Arrow Graphic";
7638+
7639-
		BorderSizePixel = 0;
7639+
7640-
		Size = UDim2.new(0,size,0,size);
7640+
7641-
		Transparency = 1;
7641+
7642
TextButton112.BorderColor = BrickColor.new("Really black")
7643-
	if not template then
7643+
7644-
		template = Instance.new("Frame")
7644+
7645-
		template.BorderSizePixel = 0
7645+
7646
TextButton112.Font = Enum.Font.SourceSans
7647
TextButton112.FontSize = Enum.FontSize.Size12
7648-
	local transform
7648+
7649-
	if dir == nil or dir == 'Up' then
7649+
7650-
		function transform(p,s) return p,s end
7650+
7651-
	elseif dir == 'Down' then
7651+
7652-
		function transform(p,s) return UDim2.new(0,p.X.Offset,0,size-p.Y.Offset-1),s end
7652+
7653-
	elseif dir == 'Left' then
7653+
7654-
		function transform(p,s) return UDim2.new(0,p.Y.Offset,0,p.X.Offset),UDim2.new(0,s.Y.Offset,0,s.X.Offset) end
7654+
7655-
	elseif dir == 'Right' then
7655+
7656-
		function transform(p,s) return UDim2.new(0,size-p.Y.Offset-1,0,p.X.Offset),UDim2.new(0,s.Y.Offset,0,s.X.Offset) end
7656+
7657
TextButton113.BackgroundColor3 = Color3.new(1, 1, 1)
7658
TextButton113.BackgroundTransparency = 1
7659-
	local scale
7659+
7660-
	if scaled then
7660+
7661-
		function scale(p,s) return UDim2.new(p.X.Offset/size,0,p.Y.Offset/size,0),UDim2.new(s.X.Offset/size,0,s.Y.Offset/size,0) end
7661+
7662
TextButton113.Font = Enum.Font.SourceSans
7663-
		function scale(p,s) return p,s end
7663+
7664
TextButton113.Text = "X"
7665
TextButton113.TextSize = 14
7666-
	local o = math.floor(size/4)
7666+
7667-
	if size%2 == 0 then
7667+
7668-
		local n = size/2-1
7668+
7669-
		for i = 0,n do
7669+
7670
	local top = script.Parent
7671
7672-
				UDim2.new(0,n-i,0,o+i),
7672+
	local editorGrid = top:WaitForChild("EditorGrid")
7673-
				UDim2.new(0,(i+1)*2,0,1)
7673+
7674-
			))
7674+
	local currentSource = ""
7675
7676
	local currentEditor = {
7677
		x = 0,
7678
		y = 0
7679
	}
7680-
		local n = (size-1)/2
7680+
7681-
		for i = 0,n do
7681+
	local userInput = game:GetService("UserInputService")
7682
	local mouse = game:GetService("Players").LocalPlayer:GetMouse()
7683
7684-
				UDim2.new(0,n-i,0,o+i),
7684+
	local topBar = top:WaitForChild("TopBar")
7685-
				UDim2.new(0,i*2+1,0,1)
7685+
	local scriptBar = topBar:WaitForChild("ScriptBar")
7686-
			))
7686+
	local scriptBarLeft = topBar:WaitForChild("ScriptBarLeft")
7687
	local scriptBarRight = topBar:WaitForChild("ScriptBarRight")
7688
	local clipboardButton = topBar:WaitForChild("Clipboard")
7689
7690
	local entryTemplate = topBar:WaitForChild("Entry")
7691
7692-
	if size%4 > 1 then
7692+
	local openEvent = top:WaitForChild("OpenScript")
7693-
		local t = template:Clone()
7693+
7694-
		local p,s = scale(transform(
7694+
	local closeButton = top:WaitForChild("Close")
7695-
			UDim2.new(0,0,0,size-o-1),
7695+
7696-
			UDim2.new(0,size,0,1)
7696+
	local memoryScripts = {}
7697-
		))
7697+
7698-
		t.Position = p
7698+
	local editingIndex = 0
7699-
		t.Size = s
7699+
7700-
		t.Parent = Frame
7700+
	-- Scrollbar
7701
7702-
	return Frame
7702+
	local ScrollBarWidth = 16
7703
7704
	local ScrollStyles = {
7705-
function GripGraphic(size,dir,spacing,scaled,template)
7705+
		Background      = Color3.new(233/255, 233/255, 233/255);
7706-
	local Frame = Create('Frame',{
7706+
		Border          = Color3.new(149/255, 149/255, 149/255);
7707-
		Name = "Grip Graphic";
7707+
		Selected        = Color3.new( 63/255, 119/255, 189/255);
7708-
		BorderSizePixel = 0;
7708+
		BorderSelected  = Color3.new( 55/255, 106/255, 167/255);
7709-
		Size = UDim2.new(0,size.x,0,size.y);
7709+
		Text            = Color3.new(  0/255,   0/255,   0/255);
7710-
		Transparency = 1;
7710+
		TextDisabled    = Color3.new(128/255, 128/255, 128/255);
7711
		TextSelected    = Color3.new(255/255, 255/255, 255/255);
7712-
	if not template then
7712+
		Button          = Color3.new(221/255, 221/255, 221/255);
7713-
		template = Instance.new("Frame")
7713+
		ButtonBorder    = Color3.new(149/255, 149/255, 149/255);
7714-
		template.BorderSizePixel = 0
7714+
		ButtonSelected  = Color3.new(255/255,   0/255,   0/255);
7715
		Field           = Color3.new(255/255, 255/255, 255/255);
7716
		FieldBorder     = Color3.new(191/255, 191/255, 191/255);
7717-
	spacing = spacing or 2
7717+
		TitleBackground = Color3.new(178/255, 178/255, 178/255);
7718
	}
7719-
	local scale
7719+
	do
7720-
	if scaled then
7720+
		local ZIndexLock = {}
7721-
		function scale(p) return UDim2.new(p.X.Offset/size.x,0,p.Y.Offset/size.y,0) end
7721+
		function SetZIndex(object,z)
7722
			if not ZIndexLock[object] then
7723-
		function scale(p) return p end
7723+
				ZIndexLock[object] = true
7724
				if object:IsA'GuiObject' then
7725
					object.ZIndex = z
7726-
	if dir == 'Vertical' then
7726+
7727-
		for i=0,size.x-1,spacing do
7727+
				local children = object:GetChildren()
7728
				for i = 1,#children do
7729-
			t.Size = scale(UDim2.new(0,1,0,size.y))
7729+
					SetZIndex(children[i],z)
7730-
			t.Position = scale(UDim2.new(0,i,0,0))
7730+
7731
				ZIndexLock[object] = nil
7732
			end
7733-
	elseif dir == nil or dir == 'Horizontal' then
7733+
7734-
		for i=0,size.y-1,spacing do
7734+
7735
	function SetZIndexOnChanged(object)
7736-
			t.Size = scale(UDim2.new(0,size.x,0,1))
7736+
7737-
			t.Position = scale(UDim2.new(0,0,0,i))
7737+
7738
				SetZIndex(object,object.ZIndex)
7739
			end
7740
		end)
7741
	end
7742-
	return Frame
7742+
	function Create(ty,data)
7743
		local obj
7744
		if type(ty) == 'string' then
7745
			obj = Instance.new(ty)
7746-
	local mt = {
7746+
7747-
		__index = {
7747+
			obj = ty
7748-
			GetScrollPercent = function(self)
7748+
7749-
				return self.ScrollIndex/(self.TotalSpace-self.VisibleSpace)
7749+
		for k, v in pairs(data) do
7750
			if type(k) == 'number' then
7751-
			CanScrollDown = function(self)
7751+
				v.Parent = obj
7752-
				return self.ScrollIndex + self.VisibleSpace < self.TotalSpace
7752+
7753
				obj[k] = v
7754-
			CanScrollUp = function(self)
7754+
7755-
				return self.ScrollIndex > 0
7755+
7756
		return obj
7757-
			ScrollDown = function(self)
7757+
7758-
				self.ScrollIndex = self.ScrollIndex + self.PageIncrement
7758+
	-- returns the ascendant ScreenGui of an object
7759-
				self:Update()
7759+
	function GetScreen(screen)
7760
		if screen == nil then return nil end
7761-
			ScrollUp = function(self)
7761+
		while not screen:IsA("ScreenGui") do
7762-
				self.ScrollIndex = self.ScrollIndex - self.PageIncrement
7762+
			screen = screen.Parent
7763-
				self:Update()
7763+
			if screen == nil then return nil end
7764
		end
7765-
			ScrollTo = function(self,index)
7765+
		return screen
7766-
				self.ScrollIndex = index
7766+
7767-
				self:Update()
7767+
7768
	function ResetButtonColor(button)
7769-
			SetScrollPercent = function(self,percent)
7769+
7770-
				self.ScrollIndex = math.floor((self.TotalSpace - self.VisibleSpace)*percent + 0.5)
7770+
7771-
				self:Update()
7771+
7772
	end
7773-
		};
7773+
7774
	function ArrowGraphic(size,dir,scaled,template)
7775-
	mt.__index.CanScrollRight = mt.__index.CanScrollDown
7775+
7776-
	mt.__index.CanScrollLeft = mt.__index.CanScrollUp
7776+
7777-
	mt.__index.ScrollLeft = mt.__index.ScrollUp
7777+
7778-
	mt.__index.ScrollRight = mt.__index.ScrollDown
7778+
7779
			Transparency = 1;
7780-
	function ScrollBar(horizontal)
7780+
7781-
		-- create row scroll bar
7781+
7782-
		local ScrollFrame = Create('Frame',{
7782+
7783-
			Name = "ScrollFrame";
7783+
7784-
			Position = horizontal and UDim2.new(0,0,1,-ScrollBarWidth) or UDim2.new(1,-ScrollBarWidth,0,0);
7784+
7785-
			Size = horizontal and UDim2.new(1,0,0,ScrollBarWidth) or UDim2.new(0,ScrollBarWidth,1,0);
7785+
7786
		local transform
7787-
			Create('ImageButton',{
7787+
7788-
				Name = "ScrollDown";
7788+
7789-
				Position = horizontal and UDim2.new(1,-ScrollBarWidth,0,0) or UDim2.new(0,0,1,-ScrollBarWidth);
7789+
7790-
				Size = UDim2.new(0, ScrollBarWidth, 0, ScrollBarWidth);
7790+
7791-
				BackgroundColor3 = ScrollStyles.Button;
7791+
7792-
				BorderColor3 = ScrollStyles.Border;
7792+
7793-
				--BorderSizePixel = 0;
7793+
7794
			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
7795-
			Create('ImageButton',{
7795+
7796-
				Name = "ScrollUp";
7796+
7797-
				Size = UDim2.new(0, ScrollBarWidth, 0, ScrollBarWidth);
7797+
7798-
				BackgroundColor3 = ScrollStyles.Button;
7798+
7799-
				BorderColor3 = ScrollStyles.Border;
7799+
7800-
				--BorderSizePixel = 0;
7800+
7801
			function scale(p,s) return p,s end
7802-
			Create('ImageButton',{
7802+
7803-
				Name = "ScrollBar";
7803+
7804-
				Size = horizontal and UDim2.new(1,-ScrollBarWidth*2,1,0) or UDim2.new(1,0,1,-ScrollBarWidth*2);
7804+
7805-
				Position = horizontal and UDim2.new(0,ScrollBarWidth,0,0) or UDim2.new(0,0,0,ScrollBarWidth);
7805+
7806
			local n = size/2-1
7807-
				BackgroundColor3 = Color3.new(0.94902, 0.94902, 0.94902);
7807+
7808-
				BorderColor3 = ScrollStyles.Border;
7808+
7809-
				--BorderSizePixel = 0;
7809+
7810
					UDim2.new(0,n-i,0,o+i),
7811-
					Name = "ScrollThumb";
7811+
7812
					))
7813
				t.Position = p
7814
				t.Size = s
7815
				t.Parent = Frame
7816
			end
7817
		else
7818
			local n = (size-1)/2
7819
			for i = 0,n do
7820
				local t = template:Clone()
7821-
		local graphicTemplate = Create('Frame',{
7821+
7822-
			Name="Graphic";
7822+
7823
					UDim2.new(0,i*2+1,0,1)
7824-
			BackgroundColor3 = ScrollStyles.Border;
7824+
					))
7825
				t.Position = p
7826-
		local graphicSize = ScrollBarWidth/2
7826+
7827
				t.Parent = Frame
7828-
		local ScrollDownFrame = ScrollFrame.ScrollDown
7828+
7829
		end
7830
		if size%4 > 1 then
7831
			local t = template:Clone()
7832-
		local ScrollUpFrame = ScrollFrame.ScrollUp
7832+
7833
				UDim2.new(0,0,0,size-o-1),
7834
				UDim2.new(0,size,0,1)
7835
				))
7836-
		local ScrollBarFrame = ScrollFrame.ScrollBar
7836+
7837-
		local ScrollThumbFrame = ScrollBarFrame.ScrollThumb
7837+
7838-
		do
7838+
7839-
			local size = ScrollBarWidth*3/8
7839+
7840-
			local Decal = GripGraphic(Vector2.new(size,size),horizontal and 'Vertical' or 'Horizontal',2,graphicTemplate)
7840+
7841-
			Decal.Position = UDim2.new(0.5,-size/2,0.5,-size/2)
7841+
7842-
			Decal.Parent = ScrollThumbFrame
7842+
7843
	function GripGraphic(size,dir,spacing,scaled,template)
7844
		local Frame = Create('Frame',{
7845-
		local MouseDrag = Create('ImageButton',{
7845+
7846
			BorderSizePixel = 0;
7847
			Size = UDim2.new(0,size.x,0,size.y);
7848
			Transparency = 1;
7849
		})
7850
		if not template then
7851
			template = Instance.new("Frame")
7852
			template.BorderSizePixel = 0
7853
		end
7854
7855-
		local Class = setmetatable({
7855+
7856-
			GUI = ScrollFrame;
7856+
7857-
			ScrollIndex = 0;
7857+
7858-
			VisibleSpace = 0;
7858+
7859-
			TotalSpace = 0;
7859+
7860-
			PageIncrement = 1;
7860+
7861-
		},mt)
7861+
7862
		end
7863-
		local UpdateScrollThumb
7863+
7864-
		if horizontal then
7864+
7865-
			function UpdateScrollThumb()
7865+
7866-
				ScrollThumbFrame.Size = UDim2.new(Class.VisibleSpace/Class.TotalSpace,0,0,ScrollBarWidth)
7866+
7867-
				if ScrollThumbFrame.AbsoluteSize.x < ScrollBarWidth then
7867+
7868-
					ScrollThumbFrame.Size = UDim2.new(0,ScrollBarWidth,0,ScrollBarWidth)
7868+
7869
				t.Parent = Frame
7870-
				local barSize = ScrollBarFrame.AbsoluteSize.x
7870+
7871-
				ScrollThumbFrame.Position = UDim2.new(Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.x)/barSize,0,0,0)
7871+
7872
			for i=0,size.y-1,spacing do
7873
				local t = template:Clone()
7874-
			function UpdateScrollThumb()
7874+
7875-
				ScrollThumbFrame.Size = UDim2.new(0,ScrollBarWidth,Class.VisibleSpace/Class.TotalSpace,0)
7875+
7876-
				if ScrollThumbFrame.AbsoluteSize.y < ScrollBarWidth then
7876+
7877-
					ScrollThumbFrame.Size = UDim2.new(0,ScrollBarWidth,0,ScrollBarWidth)
7877+
7878
		end
7879-
				local barSize = ScrollBarFrame.AbsoluteSize.y
7879+
7880-
				ScrollThumbFrame.Position = UDim2.new(0,0,Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.y)/barSize,0)
7880+
7881
	end
7882
7883
	do
7884-
		local lastDown
7884+
		local mt = {
7885-
		local lastUp
7885+
			__index = {
7886-
		local scrollStyle = {BackgroundColor3=ScrollStyles.Border,BackgroundTransparency=0}
7886+
				GetScrollPercent = function(self)
7887-
		local scrollStyle_ds = {BackgroundColor3=ScrollStyles.Border,BackgroundTransparency=0.7}
7887+
					return self.ScrollIndex/(self.TotalSpace-self.VisibleSpace)
7888
				end;
7889-
		local function Update()
7889+
				CanScrollDown = function(self)
7890-
			local t = Class.TotalSpace
7890+
					return self.ScrollIndex + self.VisibleSpace < self.TotalSpace
7891-
			local v = Class.VisibleSpace
7891+
				end;
7892-
			local s = Class.ScrollIndex
7892+
				CanScrollUp = function(self)
7893-
			if v <= t then
7893+
					return self.ScrollIndex > 0
7894-
				if s > 0 then
7894+
				end;
7895-
					if s + v > t then
7895+
				ScrollDown = function(self)
7896-
						Class.ScrollIndex = t - v
7896+
					self.ScrollIndex = self.ScrollIndex + self.PageIncrement
7897
					self:Update()
7898
				end;
7899
				ScrollUp = function(self)
7900
					self.ScrollIndex = self.ScrollIndex - self.PageIncrement
7901
					self:Update()
7902-
				Class.ScrollIndex = 0
7902+
				end;
7903
				ScrollTo = function(self,index)
7904
					self.ScrollIndex = index
7905-
			if Class.UpdateCallback then
7905+
					self:Update()
7906-
				if Class.UpdateCallback(Class) == false then
7906+
				end;
7907
				SetScrollPercent = function(self,percent)
7908
					self.ScrollIndex = math.floor((self.TotalSpace - self.VisibleSpace)*percent + 0.5)
7909
					self:Update()
7910
				end;
7911-
			local down = Class:CanScrollDown()
7911+
			};
7912-
			local up = Class:CanScrollUp()
7912+
7913-
			if down ~= lastDown then
7913+
		mt.__index.CanScrollRight = mt.__index.CanScrollDown
7914-
				lastDown = down
7914+
		mt.__index.CanScrollLeft = mt.__index.CanScrollUp
7915-
				ScrollDownFrame.Active = down
7915+
		mt.__index.ScrollLeft = mt.__index.ScrollUp
7916-
				ScrollDownFrame.AutoButtonColor = down
7916+
		mt.__index.ScrollRight = mt.__index.ScrollDown
7917-
				local children = ScrollDownGraphic:GetChildren()
7917+
7918-
				local style = down and scrollStyle or scrollStyle_ds
7918+
		function ScrollBar(horizontal)
7919
			-- create row scroll bar
7920-
					Create(children[i],style)
7920+
			local ScrollFrame = Create('Frame',{
7921
				Name = "ScrollFrame";
7922
				Position = horizontal and UDim2.new(0,0,1,-ScrollBarWidth) or UDim2.new(1,-ScrollBarWidth,0,0);
7923-
			if up ~= lastUp then
7923+
				Size = horizontal and UDim2.new(1,0,0,ScrollBarWidth) or UDim2.new(0,ScrollBarWidth,1,0);
7924-
				lastUp = up
7924+
7925-
				ScrollUpFrame.Active = up
7925+
7926-
				ScrollUpFrame.AutoButtonColor = up
7926+
					Name = "ScrollDown";
7927-
				local children = ScrollUpGraphic:GetChildren()
7927+
					Position = horizontal and UDim2.new(1,-ScrollBarWidth,0,0) or UDim2.new(0,0,1,-ScrollBarWidth);
7928-
				local style = up and scrollStyle or scrollStyle_ds
7928+
7929
					BackgroundColor3 = ScrollStyles.Button;
7930-
					Create(children[i],style)
7930+
7931
					--BorderSizePixel = 0;
7932
				});
7933-
			ScrollThumbFrame.Visible = down or up
7933+
7934-
			UpdateScrollThumb()
7934+
					Name = "ScrollUp";
7935
					Size = UDim2.new(0, ScrollBarWidth, 0, ScrollBarWidth);
7936-
		Class.Update = Update
7936+
7937
					BorderColor3 = ScrollStyles.Border;
7938-
		SetZIndexOnChanged(ScrollFrame)
7938+
7939
				});
7940-
		local scrollEventID = 0
7940+
7941-
		ScrollDownFrame.MouseButton1Down:connect(function()
7941+
					Name = "ScrollBar";
7942-
			scrollEventID = tick()
7942+
					Size = horizontal and UDim2.new(1,-ScrollBarWidth*2,1,0) or UDim2.new(1,0,1,-ScrollBarWidth*2);
7943-
			local current = scrollEventID
7943+
					Position = horizontal and UDim2.new(0,ScrollBarWidth,0,0) or UDim2.new(0,0,0,ScrollBarWidth);
7944-
			local up_con
7944+
7945-
			up_con = MouseDrag.MouseButton1Up:connect(function()
7945+
					BackgroundColor3 = Color3.new(0.94902, 0.94902, 0.94902);
7946
					BorderColor3 = ScrollStyles.Border;
7947-
				MouseDrag.Parent = nil
7947+
7948-
				ResetButtonColor(ScrollDownFrame)
7948+
					Create('ImageButton',{
7949-
				up_con:disconnect(); drag = nil
7949+
						Name = "ScrollThumb";
7950
						AutoButtonColor = false;
7951-
			MouseDrag.Parent = GetScreen(ScrollFrame)
7951+
						Size = UDim2.new(0, ScrollBarWidth, 0, ScrollBarWidth);
7952-
			Class:ScrollDown()
7952+
						BackgroundColor3 = ScrollStyles.Button;
7953-
			wait(0.2) -- delay before auto scroll
7953+
						BorderColor3 = ScrollStyles.Border;
7954-
			while scrollEventID == current do
7954+
						--BorderSizePixel = 0;
7955
					});
7956-
				if not Class:CanScrollDown() then break end
7956+
7957-
				wait()
7957+
7958
7959
			local graphicTemplate = Create('Frame',{
7960
				Name="Graphic";
7961-
		ScrollDownFrame.MouseButton1Up:connect(function()
7961+
7962-
			scrollEventID = tick()
7962+
				BackgroundColor3 = ScrollStyles.Border;
7963
			})
7964
			local graphicSize = ScrollBarWidth/2
7965-
		ScrollUpFrame.MouseButton1Down:connect(function()
7965+
7966-
			scrollEventID = tick()
7966+
			local ScrollDownFrame = ScrollFrame.ScrollDown
7967-
			local current = scrollEventID
7967+
7968-
			local up_con
7968+
7969-
			up_con = MouseDrag.MouseButton1Up:connect(function()
7969+
7970
			local ScrollUpFrame = ScrollFrame.ScrollUp
7971-
				MouseDrag.Parent = nil
7971+
7972-
				ResetButtonColor(ScrollUpFrame)
7972+
7973-
				up_con:disconnect(); drag = nil
7973+
7974
			local ScrollBarFrame = ScrollFrame.ScrollBar
7975-
			MouseDrag.Parent = GetScreen(ScrollFrame)
7975+
			local ScrollThumbFrame = ScrollBarFrame.ScrollThumb
7976-
			Class:ScrollUp()
7976+
			do
7977-
			wait(0.2)
7977+
				local size = ScrollBarWidth*3/8
7978-
			while scrollEventID == current do
7978+
				local Decal = GripGraphic(Vector2.new(size,size),horizontal and 'Vertical' or 'Horizontal',2,graphicTemplate)
7979
				Decal.Position = UDim2.new(0.5,-size/2,0.5,-size/2)
7980-
				if not Class:CanScrollUp() then break end
7980+
				Decal.Parent = ScrollThumbFrame
7981-
				wait()
7981+
7982
7983
			local MouseDrag = Create('ImageButton',{
7984
				Name = "MouseDrag";
7985-
		ScrollUpFrame.MouseButton1Up:connect(function()
7985+
				Position = UDim2.new(-0.25,0,-0.25,0);
7986-
			scrollEventID = tick()
7986+
				Size = UDim2.new(1.5,0,1.5,0);
7987
				Transparency = 1;
7988
				AutoButtonColor = false;
7989-
		if horizontal then
7989+
				Active = true;
7990-
			ScrollBarFrame.MouseButton1Down:connect(function(x,y)
7990+
				ZIndex = 10;
7991
			})
7992
7993
			local Class = setmetatable({
7994
				GUI = ScrollFrame;
7995
				ScrollIndex = 0;
7996
				VisibleSpace = 0;
7997
				TotalSpace = 0;
7998
				PageIncrement = 1;
7999
			},mt)
8000
8001-
				if x > ScrollThumbFrame.AbsolutePosition.x then
8001+
			local UpdateScrollThumb
8002-
					Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
8002+
			if horizontal then
8003-
					wait(0.2)
8003+
				function UpdateScrollThumb()
8004-
					while scrollEventID == current do
8004+
					ScrollThumbFrame.Size = UDim2.new(Class.VisibleSpace/Class.TotalSpace,0,0,ScrollBarWidth)
8005-
						if x < ScrollThumbFrame.AbsolutePosition.x + ScrollThumbFrame.AbsoluteSize.x then break end
8005+
					if ScrollThumbFrame.AbsoluteSize.x < ScrollBarWidth then
8006
						ScrollThumbFrame.Size = UDim2.new(0,ScrollBarWidth,0,ScrollBarWidth)
8007-
						wait()
8007+
8008
					local barSize = ScrollBarFrame.AbsoluteSize.x
8009
					ScrollThumbFrame.Position = UDim2.new(Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.x)/barSize,0,0,0)
8010-
					Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
8010+
8011-
					wait(0.2)
8011+
8012-
					while scrollEventID == current do
8012+
				function UpdateScrollThumb()
8013-
						if x > ScrollThumbFrame.AbsolutePosition.x then break end
8013+
					ScrollThumbFrame.Size = UDim2.new(0,ScrollBarWidth,Class.VisibleSpace/Class.TotalSpace,0)
8014
					if ScrollThumbFrame.AbsoluteSize.y < ScrollBarWidth then
8015-
						wait()
8015+
						ScrollThumbFrame.Size = UDim2.new(0,ScrollBarWidth,0,ScrollBarWidth)
8016
					end
8017
					local barSize = ScrollBarFrame.AbsoluteSize.y
8018
					ScrollThumbFrame.Position = UDim2.new(0,0,Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.y)/barSize,0)
8019
				end
8020-
			ScrollBarFrame.MouseButton1Down:connect(function(x,y)
8020+
8021
8022
			local lastDown
8023
			local lastUp
8024
			local scrollStyle = {BackgroundColor3=ScrollStyles.Border,BackgroundTransparency=0}
8025
			local scrollStyle_ds = {BackgroundColor3=ScrollStyles.Border,BackgroundTransparency=0.7}
8026
8027
			local function Update()
8028
				local t = Class.TotalSpace
8029
				local v = Class.VisibleSpace
8030
				local s = Class.ScrollIndex
8031-
				if y > ScrollThumbFrame.AbsolutePosition.y then
8031+
				if v <= t then
8032-
					Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
8032+
					if s > 0 then
8033-
					wait(0.2)
8033+
						if s + v > t then
8034-
					while scrollEventID == current do
8034+
							Class.ScrollIndex = t - v
8035-
						if y < ScrollThumbFrame.AbsolutePosition.y + ScrollThumbFrame.AbsoluteSize.y then break end
8035+
8036
					else
8037-
						wait()
8037+
						Class.ScrollIndex = 0
8038
					end
8039
				else
8040-
					Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
8040+
8041-
					wait(0.2)
8041+
8042-
					while scrollEventID == current do
8042+
8043-
						if y > ScrollThumbFrame.AbsolutePosition.y then break end
8043+
				if Class.UpdateCallback then
8044
					if Class.UpdateCallback(Class) == false then
8045-
						wait()
8045+
						return
8046
					end
8047
				end
8048
8049
				local down = Class:CanScrollDown()
8050
				local up = Class:CanScrollUp()
8051-
		if horizontal then
8051+
				if down ~= lastDown then
8052-
			ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
8052+
					lastDown = down
8053
					ScrollDownFrame.Active = down
8054-
				local mouse_offset = x - ScrollThumbFrame.AbsolutePosition.x
8054+
					ScrollDownFrame.AutoButtonColor = down
8055-
				local drag_con
8055+
					local children = ScrollDownGraphic:GetChildren()
8056
					local style = down and scrollStyle or scrollStyle_ds
8057-
				drag_con = MouseDrag.MouseMoved:connect(function(x,y)
8057+
					for i = 1,#children do
8058-
					local bar_abs_pos = ScrollBarFrame.AbsolutePosition.x
8058+
						Create(children[i],style)
8059-
					local bar_drag = ScrollBarFrame.AbsoluteSize.x - ScrollThumbFrame.AbsoluteSize.x
8059+
8060-
					local bar_abs_one = bar_abs_pos + bar_drag
8060+
8061-
					x = x - mouse_offset
8061+
				if up ~= lastUp then
8062-
					x = x < bar_abs_pos and bar_abs_pos or x > bar_abs_one and bar_abs_one or x
8062+
					lastUp = up
8063-
					x = x - bar_abs_pos
8063+
					ScrollUpFrame.Active = up
8064-
					Class:SetScrollPercent(x/(bar_drag))
8064+
					ScrollUpFrame.AutoButtonColor = up
8065
					local children = ScrollUpGraphic:GetChildren()
8066
					local style = up and scrollStyle or scrollStyle_ds
8067
					for i = 1,#children do
8068
						Create(children[i],style)
8069-
					ResetButtonColor(ScrollThumbFrame)
8069+
8070-
					drag_con:disconnect(); drag_con = nil
8070+
8071
				ScrollThumbFrame.Visible = down or up
8072
				UpdateScrollThumb()
8073
			end
8074
			Class.Update = Update
8075
8076-
			ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
8076+
			SetZIndexOnChanged(ScrollFrame)
8077
8078-
				local mouse_offset = y - ScrollThumbFrame.AbsolutePosition.y
8078+
			local scrollEventID = 0
8079-
				local drag_con
8079+
			ScrollDownFrame.MouseButton1Down:connect(function()
8080
				scrollEventID = tick()
8081-
				drag_con = MouseDrag.MouseMoved:connect(function(x,y)
8081+
8082-
					local bar_abs_pos = ScrollBarFrame.AbsolutePosition.y
8082+
8083-
					local bar_drag = ScrollBarFrame.AbsoluteSize.y - ScrollThumbFrame.AbsoluteSize.y
8083+
8084-
					local bar_abs_one = bar_abs_pos + bar_drag
8084+
8085-
					y = y - mouse_offset
8085+
8086-
					y = y < bar_abs_pos and bar_abs_pos or y > bar_abs_one and bar_abs_one or y
8086+
					ResetButtonColor(ScrollDownFrame)
8087-
					y = y - bar_abs_pos
8087+
8088-
					Class:SetScrollPercent(y/(bar_drag))
8088+
8089
				MouseDrag.Parent = GetScreen(ScrollFrame)
8090
				Class:ScrollDown()
8091
				wait(0.2) -- delay before auto scroll
8092
				while scrollEventID == current do
8093-
					ResetButtonColor(ScrollThumbFrame)
8093+
					Class:ScrollDown()
8094-
					drag_con:disconnect(); drag_con = nil
8094+
					if not Class:CanScrollDown() then break end
8095
					wait()
8096
				end
8097
			end)
8098
8099
			ScrollDownFrame.MouseButton1Up:connect(function()
8100
				scrollEventID = tick()
8101-
		function Class:Destroy()
8101+
8102-
			ScrollFrame:Destroy()
8102+
8103-
			MouseDrag:Destroy()
8103+
			ScrollUpFrame.MouseButton1Down:connect(function()
8104-
			for k in pairs(Class) do
8104+
8105-
				Class[k] = nil
8105+
8106
				local up_con
8107-
			setmetatable(Class,nil)
8107+
8108
					scrollEventID = tick()
8109
					MouseDrag.Parent = nil
8110-
		Update()
8110+
8111
					up_con:disconnect(); drag = nil
8112-
		return Class
8112+
8113
				MouseDrag.Parent = GetScreen(ScrollFrame)
8114
				Class:ScrollUp()
8115
				wait(0.2)
8116-
-- End Scrollbar
8116+
				while scrollEventID == current do
8117
					Class:ScrollUp()
8118-
local scrollBar = ScrollBar(false)
8118+
					if not Class:CanScrollUp() then break end
8119-
scrollBar.PageIncrement = 16
8119+
					wait()
8120-
Create(scrollBar.GUI,{
8120+
8121-
	Position = UDim2.new(1,0,0,0);
8121+
8122-
	Size = UDim2.new(0,ScrollBarWidth,1,0);
8122+
8123-
	Parent = editorGrid;
8123+
			ScrollUpFrame.MouseButton1Up:connect(function()
8124-
})
8124+
8125
			end)
8126-
local scrollBarH = ScrollBar(true)
8126+
8127-
scrollBarH.PageIncrement = 8
8127+
			if horizontal then
8128-
Create(scrollBarH.GUI,{
8128+
				ScrollBarFrame.MouseButton1Down:connect(function(x,y)
8129-
	Position = UDim2.new(0,0,1,0);
8129+
8130-
	Size = UDim2.new(1,0,0,ScrollBarWidth);
8130+
					local current = scrollEventID
8131-
	Parent = editorGrid;
8131+
					local up_con
8132-
})
8132+
					up_con = MouseDrag.MouseButton1Up:connect(function()
8133
						scrollEventID = tick()
8134-
local entries = {}
8134+
						MouseDrag.Parent = nil
8135
						ResetButtonColor(ScrollUpFrame)
8136-
local grid = {}
8136+
						up_con:disconnect(); drag = nil
8137
					end)
8138-
local count = 1
8138+
					MouseDrag.Parent = GetScreen(ScrollFrame)
8139-
local xCount = 1
8139+
					if x > ScrollThumbFrame.AbsolutePosition.x then
8140
						Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
8141-
local lineSpan = 0
8141+
						wait(0.2)
8142
						while scrollEventID == current do
8143-
for i = 0,490,8 do
8143+
							if x < ScrollThumbFrame.AbsolutePosition.x + ScrollThumbFrame.AbsoluteSize.x then break end
8144-
	local newRow = {}
8144+
							Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
8145-
	for j = 0,390,16 do
8145+
							wait()
8146-
		local cellText = Instance.new("TextLabel",editorGrid)
8146+
8147-
		cellText.BackgroundTransparency = 1
8147+
8148-
		cellText.BorderSizePixel = 0
8148+
8149-
		cellText.Text = ""
8149+
						wait(0.2)
8150-
		cellText.Position = UDim2.new(0,i,0,j)
8150+
						while scrollEventID == current do
8151-
		cellText.Size = UDim2.new(0,8,0,16)
8151+
							if x > ScrollThumbFrame.AbsolutePosition.x then break end
8152-
		cellText.Font = Enum.Font.SourceSans
8152+
							Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
8153-
		cellText.FontSize = Enum.FontSize.Size18
8153+
							wait()
8154-
		table.insert(newRow,cellText)
8154+
8155-
		xCount = xCount + 1
8155+
8156
				end)
8157-
	table.insert(grid,newRow)
8157+
8158-
	count = count + 1
8158+
				ScrollBarFrame.MouseButton1Down:connect(function(x,y)
8159-
	xCount = 1
8159+
8160
					local current = scrollEventID
8161
					local up_con
8162-
local syntaxHighlightList = {
8162+
					up_con = MouseDrag.MouseButton1Up:connect(function()
8163-
	{["Keyword"] = "for", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8163+
						scrollEventID = tick()
8164-
	{["Keyword"] = "local", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8164+
						MouseDrag.Parent = nil
8165-
	{["Keyword"] = "if", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8165+
						ResetButtonColor(ScrollUpFrame)
8166-
	{["Keyword"] = "then", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8166+
						up_con:disconnect(); drag = nil
8167-
	{["Keyword"] = "do", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8167+
8168-
	{["Keyword"] = "while", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8168+
					MouseDrag.Parent = GetScreen(ScrollFrame)
8169-
	{["Keyword"] = "end", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8169+
					if y > ScrollThumbFrame.AbsolutePosition.y then
8170-
	{["Keyword"] = "function", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8170+
8171-
	{["Keyword"] = "string", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8171+
						wait(0.2)
8172-
	{["Keyword"] = "table", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8172+
						while scrollEventID == current do
8173-
	{["Keyword"] = "game", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8173+
							if y < ScrollThumbFrame.AbsolutePosition.y + ScrollThumbFrame.AbsoluteSize.y then break end
8174-
	{["Keyword"] = "workspace", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8174+
							Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
8175-
	{["Keyword"] = "return", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8175+
							wait()
8176-
	{["Keyword"] = "break", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8176+
8177-
	{["Keyword"] = "elseif", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8177+
8178-
	{["Keyword"] = "in", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8178+
8179-
	{["Keyword"] = "pairs", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8179+
						wait(0.2)
8180-
	{["Keyword"] = "ipairs", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true}
8180+
						while scrollEventID == current do
8181-
}
8181+
							if y > ScrollThumbFrame.AbsolutePosition.y then break end
8182
							Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
8183-
function checkMouseInGui(gui)
8183+
							wait()
8184-
	if gui == nil then return false end
8184+
8185-
	local plrMouse = game:GetService("Players").LocalPlayer:GetMouse()
8185+
8186-
	local guiPosition = gui.AbsolutePosition
8186+
8187-
	local guiSize = gui.AbsoluteSize	
8187+
8188
8189-
	if plrMouse.X >= guiPosition.x and plrMouse.X <= guiPosition.x + guiSize.x and plrMouse.Y >= guiPosition.y and plrMouse.Y <= guiPosition.y + guiSize.y then
8189+
			if horizontal then
8190-
		return true
8190+
				ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
8191
					scrollEventID = tick()
8192
					local mouse_offset = x - ScrollThumbFrame.AbsolutePosition.x
8193
					local drag_con
8194
					local up_con
8195
					drag_con = MouseDrag.MouseMoved:connect(function(x,y)
8196-
function AddZeros(num,reach)
8196+
						local bar_abs_pos = ScrollBarFrame.AbsolutePosition.x
8197-
	local toConvert = tostring(num)
8197+
						local bar_drag = ScrollBarFrame.AbsoluteSize.x - ScrollThumbFrame.AbsoluteSize.x
8198-
	while #toConvert < reach do
8198+
						local bar_abs_one = bar_abs_pos + bar_drag
8199-
		toConvert = " "..toConvert
8199+
						x = x - mouse_offset
8200
						x = x < bar_abs_pos and bar_abs_pos or x > bar_abs_one and bar_abs_one or x
8201-
	return toConvert
8201+
						x = x - bar_abs_pos
8202
						Class:SetScrollPercent(x/(bar_drag))
8203
					end)
8204-
function buildScript(source,xOff,yOff,override)
8204+
					up_con = MouseDrag.MouseButton1Up:connect(function()
8205-
	local buildingRows = true
8205+
						scrollEventID = tick()
8206-
	local buildScr = source
8206+
						MouseDrag.Parent = nil
8207
						ResetButtonColor(ScrollThumbFrame)
8208-
	local totalLines = 0
8208+
						drag_con:disconnect(); drag_con = nil
8209
						up_con:disconnect(); drag = nil
8210-
	--print(xOff,yOff)
8210+
8211
					MouseDrag.Parent = GetScreen(ScrollFrame)
8212-
	if currentSource ~= source then
8212+
8213-
		currentSource = source
8213+
8214
				ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
8215
					scrollEventID = tick()
8216-
	if override then
8216+
					local mouse_offset = y - ScrollThumbFrame.AbsolutePosition.y
8217-
		currentSource = source
8217+
					local drag_con
8218-
		entries = {}
8218+
					local up_con
8219-
		while buildingRows do
8219+
					drag_con = MouseDrag.MouseMoved:connect(function(x,y)
8220-
			local x,y = string.find(buildScr,"\n")
8220+
						local bar_abs_pos = ScrollBarFrame.AbsolutePosition.y
8221-
			if x and y then
8221+
						local bar_drag = ScrollBarFrame.AbsoluteSize.y - ScrollThumbFrame.AbsoluteSize.y
8222-
				table.insert(entries,string.sub(buildScr,1,y))
8222+
						local bar_abs_one = bar_abs_pos + bar_drag
8223-
				buildScr = string.sub(buildScr,y+1,string.len(buildScr))
8223+
						y = y - mouse_offset
8224
						y = y < bar_abs_pos and bar_abs_pos or y > bar_abs_one and bar_abs_one or y
8225-
				buildingRows = false
8225+
						y = y - bar_abs_pos
8226-
				table.insert(entries,buildScr)
8226+
						Class:SetScrollPercent(y/(bar_drag))
8227
					end)
8228
					up_con = MouseDrag.MouseButton1Up:connect(function()
8229
						scrollEventID = tick()
8230
						MouseDrag.Parent = nil
8231-
	totalLines = #entries
8231+
						ResetButtonColor(ScrollThumbFrame)
8232-
	lineSpan = #tostring(totalLines)
8232+
						drag_con:disconnect(); drag_con = nil
8233
						up_con:disconnect(); drag = nil
8234-
	if lineSpan == 1 then lineSpan = 2 end
8234+
8235
					MouseDrag.Parent = GetScreen(ScrollFrame)
8236-
	local currentRow = 1
8236+
8237-
	local currentColumn = 2 + lineSpan
8237+
8238
8239-
	local colorTime = 0
8239+
			function Class:Destroy()
8240-
	local colorReplace = nil
8240+
				ScrollFrame:Destroy()
8241
				MouseDrag:Destroy()
8242-
	local inString = false
8242+
				for k in pairs(Class) do
8243
					Class[k] = nil
8244-
	local workingEntries = entries
8244+
8245
				setmetatable(Class,nil)
8246
			end
8247
8248
			Update()
8249
8250
			return Class
8251
		end
8252
	end
8253
8254
	-- End Scrollbar
8255
8256-
	local delayance = xOff
8256+
	local scrollBar = ScrollBar(false)
8257
	scrollBar.PageIncrement = 16
8258-
	for i = 1,#grid do
8258+
	Create(scrollBar.GUI,{
8259-
		for j = 1,#grid[i] do
8259+
		Position = UDim2.new(1,0,0,0);
8260-
			if i <= lineSpan then
8260+
		Size = UDim2.new(0,ScrollBarWidth,1,0);
8261-
				local newNum = AddZeros(yOff + j,lineSpan)
8261+
		Parent = editorGrid;
8262-
				local newDigit =  string.sub(newNum,i,i)
8262+
8263-
				if newDigit == " " then
8263+
8264
	local scrollBarH = ScrollBar(true)
8265
	scrollBarH.PageIncrement = 8
8266-
					grid[i][j].Text = newDigit
8266+
	Create(scrollBarH.GUI,{
8267
		Position = UDim2.new(0,0,1,0);
8268-
				grid[i][j].BackgroundTransparency = 0
8268+
		Size = UDim2.new(1,0,0,ScrollBarWidth);
8269-
				grid[i][j].BackgroundColor3 = Color3.new(163/255, 162/255, 165/255)
8269+
		Parent = editorGrid;
8270-
				--grid[i][j].Font = Enum.Font.SourceSansBold
8270+
8271-
			elseif i == lineSpan + 1 then
8271+
8272-
				grid[i][j].Text = ""
8272+
	local entries = {}
8273-
				grid[i][j].BackgroundTransparency = 0
8273+
8274-
				grid[i][j].BackgroundColor3 = Color3.new(200/255, 200/255, 200/255)
8274+
	local grid = {}
8275-
				--grid[i][j].Font = Enum.Font.SourceSans
8275+
8276
	local count = 1
8277-
				grid[i][j].Text = ""
8277+
	local xCount = 1
8278-
				grid[i][j].BackgroundTransparency = 1
8278+
8279-
				--grid[i][j].Font = Enum.Font.SourceSans
8279+
	local lineSpan = 0
8280
8281
	for i = 0,490,8 do
8282
		local newRow = {}
8283
		for j = 0,390,16 do
8284-
	while true do
8284+
			local cellText = Instance.new("TextLabel",editorGrid)
8285-
		if currentRow > #workingEntries or currentRow > #grid[1] then break end
8285+
			cellText.BackgroundTransparency = 1
8286-
		local entry = workingEntries[currentRow+yOff]
8286+
			cellText.BorderSizePixel = 0
8287-
		while string.len(entry) > 0 do
8287+
			cellText.Text = ""
8288-
			if string.sub(entry,1,1) == "\t" then entry = "    "..string.sub(entry,2) end
8288+
			cellText.Position = UDim2.new(0,i,0,j)
8289-
			
8289+
			cellText.Size = UDim2.new(0,8,0,16)
8290-
			if currentColumn > #grid then break end
8290+
			cellText.Font = Enum.Font.SourceSans
8291-
			
8291+
			cellText.FontSize = Enum.FontSize.Size18
8292-
			if delayance == 0 then
8292+
			table.insert(newRow,cellText)
8293-
				grid[currentColumn][currentRow].Text = string.sub(entry,1,1)
8293+
			xCount = xCount + 1
8294
		end
8295-
			
8295+
		table.insert(grid,newRow)
8296-
			-- Coloring
8296+
		count = count + 1
8297-
			
8297+
		xCount = 1
8298-
			if not inString then
8298+
8299-
				for i,v in pairs(syntaxHighlightList) do
8299+
8300-
					if string.sub(entry,1,string.len(v["Keyword"])) == v["Keyword"] then
8300+
	local syntaxHighlightList = {
8301-
						if v["Independent"] then
8301+
		{["Keyword"] = "for", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8302-
							local outCheck = string.len(v["Keyword"])+1
8302+
		{["Keyword"] = "local", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8303-
							local outEntry = string.sub(entry,outCheck,outCheck)
8303+
		{["Keyword"] = "if", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8304-
							if not string.find(outEntry,"%w") then
8304+
		{["Keyword"] = "then", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8305
		{["Keyword"] = "do", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8306
		{["Keyword"] = "while", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8307
		{["Keyword"] = "end", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8308
		{["Keyword"] = "function", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8309-
							colorTime = string.len(v["Keyword"])
8309+
		{["Keyword"] = "string", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8310-
							colorReplace = v["Color"]
8310+
		{["Keyword"] = "table", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8311
		{["Keyword"] = "game", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8312
		{["Keyword"] = "workspace", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8313
		{["Keyword"] = "return", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8314
		{["Keyword"] = "break", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8315-
			
8315+
		{["Keyword"] = "elseif", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8316-
			if string.sub(entry,1,1) == "\"" and string.match(entry,"\".+\"") then
8316+
		{["Keyword"] = "in", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8317-
				inString = true
8317+
		{["Keyword"] = "pairs", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
8318-
				colorTime = string.len(string.match(entry,"\".+\""))
8318+
		{["Keyword"] = "ipairs", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true}
8319-
				colorReplace = Color3.new(170/255, 0, 1)
8319+
8320
8321-
			
8321+
	function checkMouseInGui(gui)
8322-
			if colorTime > 0 then
8322+
		if gui == nil then return false end
8323-
				colorTime = colorTime - 1
8323+
		local plrMouse = game:GetService("Players").LocalPlayer:GetMouse()
8324-
				grid[currentColumn][currentRow].TextColor3 = colorReplace
8324+
		local guiPosition = gui.AbsolutePosition
8325-
				if colorTime == 0 then inString = false end
8325+
		local guiSize = gui.AbsoluteSize	
8326
8327-
				grid[currentColumn][currentRow].TextColor3 = Color3.new(0,0,0)
8327+
		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
8328-
				inString = false
8328+
8329
		else
8330-
			
8330+
8331-
			if delayance == 0 then
8331+
8332-
				currentColumn = currentColumn + 1
8332+
8333
8334-
				delayance = delayance - 1
8334+
	function AddZeros(num,reach)
8335
		local toConvert = tostring(num)
8336-
			entry = string.sub(entry,2,string.len(entry))
8336+
		while #toConvert < reach do
8337
			toConvert = " "..toConvert
8338-
		currentRow = currentRow + 1
8338+
8339-
		currentColumn = 2 + lineSpan
8339+
		return toConvert
8340-
		colorTime = 0
8340+
8341-
		delayance = xOff
8341+
8342-
		inString = false
8342+
	function buildScript(source,xOff,yOff,override)
8343
		local buildingRows = true
8344
		local buildScr = source
8345
8346-
function scrollBar.UpdateCallback(self)
8346+
		local totalLines = 0
8347-
	scrollBar.TotalSpace = #entries * 16
8347+
8348-
	scrollBar.VisibleSpace = editorGrid.AbsoluteSize.Y
8348+
		--print(xOff,yOff)
8349-
	buildScript(currentSource,math.floor(scrollBarH.ScrollIndex/8),math.floor(scrollBar.ScrollIndex/16))
8349+
8350
		if currentSource ~= source then
8351
			currentSource = source
8352-
function scrollBarH.UpdateCallback(self)
8352+
8353-
	scrollBarH.TotalSpace = (getLongestEntry(entries) + 1 + lineSpan) * 8
8353+
8354-
	scrollBarH.VisibleSpace = editorGrid.AbsoluteSize.X
8354+
		if override then
8355-
	buildScript(currentSource,math.floor(scrollBarH.ScrollIndex/8),math.floor(scrollBar.ScrollIndex/16))
8355+
			currentSource = source
8356
			entries = {}
8357
			while buildingRows do
8358-
function getLongestEntry(tab)
8358+
				local x,y = string.find(buildScr,"\n")
8359-
	local longest = 0
8359+
				if x and y then
8360-
	for i,v in pairs(tab) do
8360+
					table.insert(entries,string.sub(buildScr,1,y))
8361-
		if string.len(v) > longest then
8361+
					buildScr = string.sub(buildScr,y+1,string.len(buildScr))
8362-
			longest = string.len(v)
8362+
8363
					buildingRows = false
8364
					table.insert(entries,buildScr)
8365-
	return longest
8365+
8366
			end
8367
		end
8368-
function decompileS(obj)
8368+
8369-
	local src = "print(\"Hello world!\")"
8369+
		totalLines = #entries
8370-
	pcall(function()
8370+
		lineSpan = #tostring(totalLines)
8371-
		if obj.Source ~= "" then
8371+
8372-
			src = obj.Source
8372+
		if lineSpan == 1 then lineSpan = 2 end
8373
8374-
			src = decompile(obj)
8374+
		local currentRow = 1
8375
		local currentColumn = 2 + lineSpan
8376
8377-
	return src
8377+
		local colorTime = 0
8378
		local colorReplace = nil
8379
8380-
function openScript(scrObj)
8380+
		local inString = false
8381-
	if scrObj:IsA("LocalScript") then
8381+
8382-
		scrObj.Archivable = true
8382+
		local workingEntries = entries
8383-
		scrObj = scrObj:Clone()
8383+
8384-
		scrObj.Disabled = true
8384+
8385
	for i,v in pairs(entries) do
8386
		table.insert(workingEntries,v)
8387-
	local scrName = scrObj.Name
8387+
8388-
	local scrSource = decompileS(scrObj)
8388+
8389
	for i = 1,yOff do
8390-
	table.insert(memoryScripts,{Name = scrName,Source = scrSource})
8390+
8391
	end
8392-
	local newTab = entryTemplate:Clone()
8392+
8393-
	newTab.Button.Text = scrName
8393+
8394-
	newTab.Position = UDim2.new(0,#scriptBar:GetChildren() * 100,0,0)
8394+
		local delayance = xOff
8395-
	newTab.Visible = true
8395+
8396
		for i = 1,#grid do
8397-
	newTab.Button.MouseButton1Down:connect(function()
8397+
			for j = 1,#grid[i] do
8398
				if i <= lineSpan then
8399-
			if v == newTab then
8399+
					local newNum = AddZeros(yOff + j,lineSpan)
8400-
				editingIndex = i
8400+
					local newDigit =  string.sub(newNum,i,i)
8401-
				buildScript(memoryScripts[i].Source,0,0,true)
8401+
					if newDigit == " " then
8402-
				scrollBar:ScrollTo(1)
8402+
						grid[i][j].Text = ""
8403
					else
8404-
				scrollBarH:ScrollTo(1)
8404+
						grid[i][j].Text = newDigit
8405
					end
8406
					grid[i][j].BackgroundTransparency = 0
8407
					grid[i][j].BackgroundColor3 = Color3.new(163/255, 162/255, 165/255)
8408
					--grid[i][j].Font = Enum.Font.SourceSansBold
8409
				elseif i == lineSpan + 1 then
8410-
	newTab.Close.MouseButton1Click:connect(function()
8410+
8411
					grid[i][j].BackgroundTransparency = 0
8412-
			if v == newTab then
8412+
					grid[i][j].BackgroundColor3 = Color3.new(200/255, 200/255, 200/255)
8413-
				table.remove(memoryScripts,i)
8413+
					--grid[i][j].Font = Enum.Font.SourceSans
8414-
				if editingIndex == i then
8414+
8415-
					editingIndex = #memoryScripts
8415+
8416-
					if editingIndex > 0 then
8416+
					grid[i][j].BackgroundTransparency = 1
8417-
						buildScript(memoryScripts[#memoryScripts].Source,0,0,true)
8417+
					--grid[i][j].Font = Enum.Font.SourceSans
8418
				end
8419-
						buildScript("",0,0,true)
8419+
8420
		end
8421
8422-
				
8422+
8423-
				scrollBar:ScrollTo(1)
8423+
			if currentRow > #workingEntries or currentRow > #grid[1] then break end
8424
			local entry = workingEntries[currentRow+yOff]
8425-
				scrollBarH:ScrollTo(1)
8425+
			while string.len(entry) > 0 do
8426
				if string.sub(entry,1,1) == "\t" then entry = "    "..string.sub(entry,2) end
8427-
				
8427+
8428-
				for i2 = i,#scriptBar:GetChildren() do
8428+
				if currentColumn > #grid then break end
8429-
					scriptBar:GetChildren()[i2].Position = scriptBar:GetChildren()[i2].Position + UDim2.new(0,-100,0,0)
8429+
8430
				if delayance == 0 then
8431-
				if editingIndex > i then
8431+
					grid[currentColumn][currentRow].Text = string.sub(entry,1,1)
8432-
					editingIndex = editingIndex - 1
8432+
8433
8434-
				newTab:Destroy()
8434+
				-- Coloring
8435
8436
				if not inString then
8437
					for i,v in pairs(syntaxHighlightList) do
8438
						if string.sub(entry,1,string.len(v["Keyword"])) == v["Keyword"] then
8439-
	editingIndex = #memoryScripts
8439+
							if v["Independent"] then
8440-
	buildScript(scrSource,0,0,true)
8440+
								local outCheck = string.len(v["Keyword"])+1
8441
								local outEntry = string.sub(entry,outCheck,outCheck)
8442-
	newTab.Parent = scriptBar
8442+
								if not string.find(outEntry,"%w") then
8443
									colorTime = string.len(v["Keyword"])
8444
									colorReplace = v["Color"]
8445-
function updateScriptBar()
8445+
8446-
	local entryCount = 0
8446+
8447
								colorTime = string.len(v["Keyword"])
8448-
	scriptBarLeft.Active = false
8448+
8449-
	scriptBarLeft.AutoButtonColor = false
8449+
8450-
	for i,v in pairs(scriptBarLeft["Arrow Graphic"]:GetChildren()) do
8450+
8451-
		v.BackgroundTransparency = 0.7
8451+
8452
				end
8453-
	scriptBarRight.Active = false
8453+
8454-
	scriptBarRight.AutoButtonColor = false
8454+
				if string.sub(entry,1,1) == "\"" and string.match(entry,"\".+\"") then
8455-
	for i,v in pairs(scriptBarRight["Arrow Graphic"]:GetChildren()) do
8455+
					inString = true
8456-
		v.BackgroundTransparency = 0.7
8456+
					colorTime = string.len(string.match(entry,"\".+\""))
8457
					colorReplace = Color3.new(170/255, 0, 1)
8458-
	for i,v in pairs(scriptBar:GetChildren()) do
8458+
8459-
		if v.Position.X.Offset < 0 then
8459+
8460-
			scriptBarLeft.Active = true
8460+
				if colorTime > 0 then
8461-
			scriptBarLeft.AutoButtonColor = true
8461+
					colorTime = colorTime - 1
8462-
			for i,v in pairs(scriptBarLeft["Arrow Graphic"]:GetChildren()) do
8462+
					grid[currentColumn][currentRow].TextColor3 = colorReplace
8463-
				v.BackgroundTransparency = 0
8463+
					if colorTime == 0 then inString = false end
8464
				else
8465-
		elseif v.Position.X.Offset >= 0 then
8465+
					grid[currentColumn][currentRow].TextColor3 = Color3.new(0,0,0)
8466-
			entryCount = entryCount + 1
8466+
					inString = false
8467-
			if entryCount == 5 then
8467+
8468-
				scriptBarRight.Active = true
8468+
8469-
				scriptBarRight.AutoButtonColor = true
8469+
				if delayance == 0 then
8470-
				for i,v in pairs(scriptBarRight["Arrow Graphic"]:GetChildren()) do
8470+
					currentColumn = currentColumn + 1
8471
				else
8472
					delayance = delayance - 1
8473
				end
8474
				entry = string.sub(entry,2,string.len(entry))
8475
			end
8476
			currentRow = currentRow + 1
8477
			currentColumn = 2 + lineSpan
8478-
scriptBar.ChildAdded:connect(updateScriptBar)
8478+
			colorTime = 0
8479-
scriptBar.ChildRemoved:connect(updateScriptBar)
8479+
			delayance = xOff
8480
			inString = false
8481-
scriptBarLeft.MouseButton1Click:connect(function()
8481+
8482-
	if scriptBarLeft.Active == false then return end
8482+
8483-
	for i,v in pairs(scriptBar:GetChildren()) do
8483+
8484-
		v.Position = v.Position + UDim2.new(0,100,0,0)
8484+
8485
		scrollBar.TotalSpace = #entries * 16
8486-
	updateScriptBar()
8486+
		scrollBar.VisibleSpace = editorGrid.AbsoluteSize.Y
8487
		buildScript(currentSource,math.floor(scrollBarH.ScrollIndex/8),math.floor(scrollBar.ScrollIndex/16))
8488
	end
8489-
scriptBarRight.MouseButton1Click:connect(function()
8489+
8490-
	if scriptBarRight.Active == false then return end
8490+
8491-
	for i,v in pairs(scriptBar:GetChildren()) do
8491+
		scrollBarH.TotalSpace = (getLongestEntry(entries) + 1 + lineSpan) * 8
8492-
		v.Position = v.Position + UDim2.new(0,-100,0,0)
8492+
		scrollBarH.VisibleSpace = editorGrid.AbsoluteSize.X
8493
		buildScript(currentSource,math.floor(scrollBarH.ScrollIndex/8),math.floor(scrollBar.ScrollIndex/16))
8494-
	updateScriptBar()
8494+
8495
8496
	function getLongestEntry(tab)
8497-
mouse.Button1Down:connect(function()
8497+
		local longest = 0
8498-
	if checkMouseInGui(editorGrid) then
8498+
		for i,v in pairs(tab) do
8499-
		--print("LETS EDIT!")
8499+
			if string.len(v) > longest then
8500
				longest = string.len(v)
8501
			end
8502
		end
8503-
openEvent.Event:connect(function(...)
8503+
		return longest
8504-
	top.Visible = true
8504+
8505-
	local args = {...}
8505+
8506-
	if #args > 0 then
8506+
	function decompileS(obj)
8507-
		openScript(args[1])
8507+
		local src = "print(\"Hello world!\")"
8508
		pcall(function()
8509
			if obj.Source ~= "" then
8510
				src = obj.Source
8511-
clipboardButton.MouseButton1Click:connect(function()
8511+
8512-
	if Clipboard and Clipboard.set then
8512+
				src = decompile(obj)
8513-
		Clipboard.set(currentSource)
8513+
8514-
	elseif CopyString then
8514+
8515-
		CopyString(currentSource)
8515+
		return src
8516
	end
8517
8518
	function openScript(scrObj)
8519-
closeButton.MouseButton1Click:connect(function()
8519+
		if scrObj:IsA("LocalScript") then
8520-
	top.Visible = false
8520+
			scrObj.Archivable = true
8521
			scrObj = scrObj:Clone()
8522
			scrObj.Disabled = true
8523
		end
8524
8525
		local scrName = scrObj.Name
8526
		local scrSource = decompileS(scrObj)
8527
8528
		table.insert(memoryScripts,{Name = scrName,Source = scrSource})
8529
8530
		local newTab = entryTemplate:Clone()
8531-
buildScript("",0,0,true)
8531+
		newTab.Button.Text = scrName
8532
		newTab.Position = UDim2.new(0,#scriptBar:GetChildren() * 100,0,0)
8533
		newTab.Visible = true
8534
8535
		newTab.Button.MouseButton1Down:connect(function()
8536
			for i,v in pairs(scriptBar:GetChildren()) do
8537
				if v == newTab then
8538
					editingIndex = i
8539
					buildScript(memoryScripts[i].Source,0,0,true)
8540-
scrollBar:Update()
8540+
					scrollBar:ScrollTo(1)
8541-
scrollBarH:Update()
8541+
8542
					scrollBarH:ScrollTo(1)
8543
					scrollBarH:Update()
8544
				end
8545
			end
8546
		end)
8547
8548
		newTab.Close.MouseButton1Click:connect(function()
8549
			for i,v in pairs(scriptBar:GetChildren()) do
8550
				if v == newTab then
8551
					table.remove(memoryScripts,i)
8552
					if editingIndex == i then
8553
						editingIndex = #memoryScripts
8554
						if editingIndex > 0 then
8555
							buildScript(memoryScripts[#memoryScripts].Source,0,0,true)
8556
						else
8557
							buildScript("",0,0,true)
8558
						end
8559
					end
8560
8561
					scrollBar:ScrollTo(1)
8562
					scrollBar:Update()
8563
					scrollBarH:ScrollTo(1)
8564
					scrollBarH:Update()
8565
8566
					for i2 = i,#scriptBar:GetChildren() do
8567
						scriptBar:GetChildren()[i2].Position = scriptBar:GetChildren()[i2].Position + UDim2.new(0,-100,0,0)
8568
					end
8569
					if editingIndex > i then
8570
						editingIndex = editingIndex - 1
8571
					end
8572
					newTab:Destroy()
8573
				end
8574
			end
8575
		end)
8576
8577
		editingIndex = #memoryScripts
8578
		buildScript(scrSource,0,0,true)
8579
8580
		newTab.Parent = scriptBar
8581
	end
8582
8583
	function updateScriptBar()
8584
		local entryCount = 0
8585
8586
		scriptBarLeft.Active = false
8587
		scriptBarLeft.AutoButtonColor = false
8588
		for i,v in pairs(scriptBarLeft["Arrow Graphic"]:GetChildren()) do
8589
			v.BackgroundTransparency = 0.7
8590
		end
8591
		scriptBarRight.Active = false
8592
		scriptBarRight.AutoButtonColor = false
8593
		for i,v in pairs(scriptBarRight["Arrow Graphic"]:GetChildren()) do
8594
			v.BackgroundTransparency = 0.7
8595
		end
8596
		for i,v in pairs(scriptBar:GetChildren()) do
8597
			if v.Position.X.Offset < 0 then
8598
				scriptBarLeft.Active = true
8599
				scriptBarLeft.AutoButtonColor = true
8600
				for i,v in pairs(scriptBarLeft["Arrow Graphic"]:GetChildren()) do
8601
					v.BackgroundTransparency = 0
8602
				end
8603
			elseif v.Position.X.Offset >= 0 then
8604
				entryCount = entryCount + 1
8605
				if entryCount == 5 then
8606
					scriptBarRight.Active = true
8607
					scriptBarRight.AutoButtonColor = true
8608
					for i,v in pairs(scriptBarRight["Arrow Graphic"]:GetChildren()) do
8609
						v.BackgroundTransparency = 0
8610
					end
8611
				end
8612
			end
8613
		end
8614
	end
8615
8616
	scriptBar.ChildAdded:connect(updateScriptBar)
8617
	scriptBar.ChildRemoved:connect(updateScriptBar)
8618
8619
	scriptBarLeft.MouseButton1Click:connect(function()
8620
		if scriptBarLeft.Active == false then return end
8621
		for i,v in pairs(scriptBar:GetChildren()) do
8622
			v.Position = v.Position + UDim2.new(0,100,0,0)
8623
		end
8624
		updateScriptBar()
8625
	end)
8626
8627
	scriptBarRight.MouseButton1Click:connect(function()
8628
		if scriptBarRight.Active == false then return end
8629
		for i,v in pairs(scriptBar:GetChildren()) do
8630
			v.Position = v.Position + UDim2.new(0,-100,0,0)
8631
		end
8632
		updateScriptBar()
8633
	end)
8634
8635
	mouse.Button1Down:connect(function()
8636
		if checkMouseInGui(editorGrid) then
8637
			--print("LETS EDIT!")
8638
		end
8639
	end)
8640
8641
	openEvent.Event:connect(function(...)
8642
		top.Visible = true
8643
		local args = {...}
8644
		if #args > 0 then
8645
			openScript(args[1])
8646
		end
8647
	end)
8648
8649
	clipboardButton.MouseButton1Click:connect(function()
8650
		if Clipboard and Clipboard.set then
8651
			Clipboard.set(currentSource)
8652
		elseif CopyString then
8653
			CopyString(currentSource)
8654
		end
8655
	end)
8656
8657
	closeButton.MouseButton1Click:connect(function()
8658
		top.Visible = false
8659
	end)
8660
8661
--[[
8662
local scr = script.Parent:WaitForChild("Scr")
8663
local scr2 = script.Parent:WaitForChild("Scr2")
8664
local scr3 = script.Parent:WaitForChild("Scr3")
8665
local scr4 = script.Parent:WaitForChild("TOS")
8666
local scr5 = script.Parent:WaitForChild("HW")
8667
--]]
8668
8669
	buildScript("",0,0,true)
8670
--[[
8671
openScript(scr)
8672
openScript(scr2)
8673
openScript(scr3)
8674
openScript(scr4)
8675
openScript(scr5)
8676
--]]
8677
8678
	scrollBar:Update()
8679
	scrollBarH:Update()
8680
end))
8681
TextButton116.Name = "Close"
8682
TextButton116.Parent = Frame92
8683
TextButton116.Position = UDim2.new(1, -20, 0, 0)
8684
TextButton116.Transparency = 1
8685
TextButton116.Size = UDim2.new(0, 20, 0, 20)
8686
TextButton116.BackgroundColor = BrickColor.new("Institutional white")
8687
TextButton116.BackgroundColor3 = Color3.new(1, 1, 1)
8688
TextButton116.BackgroundTransparency = 1
8689
TextButton116.BorderColor = BrickColor.new("Really black")
8690
TextButton116.BorderColor3 = Color3.new(0, 0, 0)
8691
TextButton116.ZIndex = 5
8692
TextButton116.Font = Enum.Font.SourceSans
8693
TextButton116.FontSize = Enum.FontSize.Size14
8694
TextButton116.Text = "X"
8695
TextButton116.TextSize = 14
8696
Frame117.Name = "IntroFrame"
8697
Frame117.Parent = ScreenGui0
8698
Frame117.Position = UDim2.new(1, 30, 0, 0)
8699
Frame117.Size = UDim2.new(0, 301, 1, 0)
8700
Frame117.BackgroundColor = BrickColor.new("White")
8701
Frame117.BackgroundColor3 = Color3.new(0.960784, 0.960784, 0.960784)
8702
Frame117.BorderSizePixel = 0
8703
Frame117.ZIndex = 2
8704
Frame118.Name = "Main"
8705
Frame118.Parent = Frame117
8706
Frame118.Position = UDim2.new(0, -30, 0, 0)
8707
Frame118.Size = UDim2.new(0, 30, 0, 90)
8708
Frame118.BackgroundColor = BrickColor.new("White")
8709
Frame118.BackgroundColor3 = Color3.new(0.960784, 0.960784, 0.960784)
8710
Frame118.BorderSizePixel = 0
8711
Frame118.ZIndex = 2
8712
ImageLabel119.Name = "Slant"
8713
ImageLabel119.Parent = Frame117
8714
ImageLabel119.Position = UDim2.new(0, -30, 0, 90)
8715
ImageLabel119.Rotation = 180
8716
ImageLabel119.Transparency = 1
8717
ImageLabel119.Size = UDim2.new(0, 30, 0, 30)
8718
ImageLabel119.BackgroundColor = BrickColor.new("Institutional white")
8719
ImageLabel119.BackgroundColor3 = Color3.new(1, 1, 1)
8720
ImageLabel119.BackgroundTransparency = 1
8721
ImageLabel119.ZIndex = 2
8722
ImageLabel119.Image = "rbxassetid://1513966937"
8723
ImageLabel119.ImageColor3 = Color3.new(0.960784, 0.960784, 0.960784)
8724
Frame120.Name = "Main"
8725
Frame120.Parent = Frame117
8726
Frame120.Position = UDim2.new(0, -30, 0, 0)
8727
Frame120.Size = UDim2.new(0, 30, 0, 90)
8728
Frame120.BackgroundColor = BrickColor.new("White")
8729
Frame120.BackgroundColor3 = Color3.new(0.960784, 0.960784, 0.960784)
8730
Frame120.BorderSizePixel = 0
8731
Frame120.ZIndex = 2
8732
ImageLabel121.Name = "Sad"
8733
ImageLabel121.Parent = Frame117
8734
ImageLabel121.Position = UDim2.new(0, 50, 1, -250)
8735
ImageLabel121.Transparency = 1
8736
ImageLabel121.Size = UDim2.new(0, 200, 0, 200)
8737
ImageLabel121.BackgroundColor = BrickColor.new("Institutional white")
8738
ImageLabel121.BackgroundColor3 = Color3.new(1, 1, 1)
8739
ImageLabel121.BackgroundTransparency = 1
8740
ImageLabel121.ZIndex = 2
8741
ImageLabel121.Image = "rbxassetid://483437370"
8742
ImageLabel121.ImageColor3 = Color3.new(0.960784, 0.960784, 0.960784)
8743
TextLabel122.Name = "Creator"
8744
TextLabel122.Parent = Frame117
8745
TextLabel122.Position = UDim2.new(0, 80, 0, 300)
8746
TextLabel122.Transparency = 1
8747
TextLabel122.Size = UDim2.new(0, 140, 0, 30)
8748
TextLabel122.BackgroundColor = BrickColor.new("Institutional white")
8749
TextLabel122.BackgroundColor3 = Color3.new(1, 1, 1)
8750
TextLabel122.BackgroundTransparency = 1
8751
TextLabel122.ZIndex = 2
8752
TextLabel122.Font = Enum.Font.SourceSansBold
8753
TextLabel122.FontSize = Enum.FontSize.Size28
8754
TextLabel122.Text = "By Moon"
8755
TextLabel122.TextSize = 28
8756
TextLabel122.TextWrap = true
8757
TextLabel122.TextWrapped = true
8758
TextLabel123.Name = "Title"
8759
TextLabel123.Parent = Frame117
8760
TextLabel123.Position = UDim2.new(0, 100, 0, 150)
8761
TextLabel123.Transparency = 1
8762
TextLabel123.Size = UDim2.new(0, 100, 0, 60)
8763
TextLabel123.BackgroundColor = BrickColor.new("Institutional white")
8764
TextLabel123.BackgroundColor3 = Color3.new(1, 1, 1)
8765
TextLabel123.BackgroundTransparency = 1
8766
TextLabel123.ZIndex = 2
8767
TextLabel123.Font = Enum.Font.SourceSansBold
8768
TextLabel123.FontSize = Enum.FontSize.Size60
8769
TextLabel123.Text = "DEX"
8770
TextLabel123.TextSize = 60
8771
TextLabel123.TextWrap = true
8772
TextLabel123.TextWrapped = true
8773
TextLabel124.Name = "Version"
8774
TextLabel124.Parent = Frame117
8775
TextLabel124.Position = UDim2.new(0, 100, 0, 210)
8776
TextLabel124.Transparency = 1
8777
TextLabel124.Size = UDim2.new(0, 100, 0, 30)
8778
TextLabel124.BackgroundColor = BrickColor.new("Institutional white")
8779
TextLabel124.BackgroundColor3 = Color3.new(1, 1, 1)
8780
TextLabel124.BackgroundTransparency = 1
8781
TextLabel124.ZIndex = 2
8782
TextLabel124.Font = Enum.Font.SourceSansBold
8783
TextLabel124.FontSize = Enum.FontSize.Size28
8784
TextLabel124.Text = "v3"
8785
TextLabel124.TextSize = 28
8786
TextLabel124.TextWrap = true
8787
TextLabel124.TextWrapped = true
8788
Frame125.Name = "SaveMapWindow"
8789
Frame125.Parent = ScreenGui0
8790
Frame125.Position = UDim2.new(1, 0, 0, 0)
8791
Frame125.Transparency = 0.10000000149012
8792
Frame125.Size = UDim2.new(0, 300, 1, 0)
8793
Frame125.BackgroundColor = BrickColor.new("Institutional white")
8794
Frame125.BackgroundColor3 = Color3.new(1, 1, 1)
8795
Frame125.BackgroundTransparency = 0.10000000149012
8796
Frame125.BorderColor = BrickColor.new("Light grey")
8797
Frame125.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
8798
Frame125.BorderSizePixel = 0
8799
Frame126.Name = "Header"
8800
Frame126.Parent = Frame125
8801
Frame126.Size = UDim2.new(1, 0, 0, 17)
8802
Frame126.BackgroundColor = BrickColor.new("Lily white")
8803
Frame126.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
8804
Frame126.BorderColor = BrickColor.new("Sand violet metallic")
8805
Frame126.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
8806
Frame126.BorderSizePixel = 0
8807
TextLabel127.Parent = Frame126
8808
TextLabel127.Position = UDim2.new(0, 4, 0, 0)
8809
TextLabel127.Transparency = 1
8810
TextLabel127.Size = UDim2.new(1, -4, 1, 0)
8811
TextLabel127.BackgroundTransparency = 1
8812
TextLabel127.BorderSizePixel = 0
8813
TextLabel127.Font = Enum.Font.SourceSans
8814
TextLabel127.FontSize = Enum.FontSize.Size14
8815
TextLabel127.Text = "Map Downloader"
8816
TextLabel127.TextColor = BrickColor.new("Really black")
8817
TextLabel127.TextColor3 = Color3.new(0, 0, 0)
8818
TextLabel127.TextSize = 14
8819
TextLabel127.TextXAlignment = Enum.TextXAlignment.Left
8820
Frame128.Name = "MapSettings"
8821
Frame128.Parent = Frame125
8822
Frame128.Position = UDim2.new(0, 0, 0, 200)
8823
Frame128.Transparency = 1
8824
Frame128.Size = UDim2.new(1, 0, 0, 240)
8825
Frame128.BackgroundColor = BrickColor.new("Institutional white")
8826
Frame128.BackgroundColor3 = Color3.new(1, 1, 1)
8827
Frame128.BackgroundTransparency = 1
8828
Frame129.Name = "Terrain"
8829
Frame129.Parent = Frame128
8830
Frame129.Position = UDim2.new(0, 0, 0, 60)
8831
Frame129.Transparency = 1
8832
Frame129.Size = UDim2.new(1, 0, 0, 60)
8833
Frame129.BackgroundColor = BrickColor.new("Institutional white")
8834
Frame129.BackgroundColor3 = Color3.new(1, 1, 1)
8835
Frame129.BackgroundTransparency = 1
8836
TextLabel130.Name = "SName"
8837
TextLabel130.Parent = Frame129
8838
TextLabel130.Position = UDim2.new(0, 10, 0, 0)
8839
TextLabel130.Transparency = 1
8840
TextLabel130.Size = UDim2.new(1, -20, 0, 30)
8841
TextLabel130.BackgroundColor = BrickColor.new("Institutional white")
8842
TextLabel130.BackgroundColor3 = Color3.new(1, 1, 1)
8843
TextLabel130.BackgroundTransparency = 1
8844
TextLabel130.Font = Enum.Font.SourceSans
8845
TextLabel130.FontSize = Enum.FontSize.Size18
8846
TextLabel130.Text = "Save Terrain"
8847
TextLabel130.TextSize = 18
8848
TextLabel130.TextXAlignment = Enum.TextXAlignment.Left
8849
TextLabel131.Name = "Status"
8850
TextLabel131.Parent = Frame129
8851
TextLabel131.Position = UDim2.new(0, 60, 0, 30)
8852
TextLabel131.Transparency = 1
8853
TextLabel131.Size = UDim2.new(0, 50, 0, 15)
8854
TextLabel131.BackgroundColor = BrickColor.new("Institutional white")
8855
TextLabel131.BackgroundColor3 = Color3.new(1, 1, 1)
8856
TextLabel131.BackgroundTransparency = 1
8857
TextLabel131.Font = Enum.Font.SourceSans
8858
TextLabel131.FontSize = Enum.FontSize.Size18
8859
TextLabel131.Text = "Off"
8860
TextLabel131.TextSize = 18
8861
TextLabel131.TextXAlignment = Enum.TextXAlignment.Left
8862
TextButton132.Name = "Change"
8863
TextButton132.Parent = Frame129
8864
TextButton132.Position = UDim2.new(0, 10, 0, 30)
8865
TextButton132.Size = UDim2.new(0, 40, 0, 15)
8866
TextButton132.BackgroundColor = BrickColor.new("Quill grey")
8867
TextButton132.BackgroundColor3 = Color3.new(0.862745, 0.862745, 0.862745)
8868
TextButton132.BorderSizePixel = 0
8869
TextButton132.Font = Enum.Font.SourceSans
8870
TextButton132.FontSize = Enum.FontSize.Size14
8871
TextButton132.Text = ""
8872
TextButton132.TextSize = 14
8873
TextLabel133.Name = "OnBar"
8874
TextLabel133.Parent = TextButton132
8875
TextLabel133.Size = UDim2.new(0, 0, 0, 15)
8876
TextLabel133.BackgroundColor = BrickColor.new("Electric blue")
8877
TextLabel133.BackgroundColor3 = Color3.new(0, 0.576471, 0.862745)
8878
TextLabel133.BorderSizePixel = 0
8879
TextLabel133.Font = Enum.Font.SourceSans
8880
TextLabel133.FontSize = Enum.FontSize.Size14
8881
TextLabel133.Text = ""
8882
TextLabel133.TextSize = 14
8883
TextLabel134.Name = "Bar"
8884
TextLabel134.Parent = TextButton132
8885
TextLabel134.Position = UDim2.new(0, -2, 0, -2)
8886
TextLabel134.Size = UDim2.new(0, 10, 0, 19)
8887
TextLabel134.BackgroundColor = BrickColor.new("Really black")
8888
TextLabel134.BackgroundColor3 = Color3.new(0, 0, 0)
8889
TextLabel134.BorderSizePixel = 0
8890
TextLabel134.ClipsDescendants = true
8891
TextLabel134.Font = Enum.Font.SourceSans
8892
TextLabel134.FontSize = Enum.FontSize.Size14
8893
TextLabel134.Text = ""
8894
TextLabel134.TextSize = 14
8895
Frame135.Name = "Lighting"
8896
Frame135.Parent = Frame128
8897
Frame135.Position = UDim2.new(0, 0, 0, 120)
8898
Frame135.Transparency = 1
8899
Frame135.Size = UDim2.new(1, 0, 0, 60)
8900
Frame135.BackgroundColor = BrickColor.new("Institutional white")
8901
Frame135.BackgroundColor3 = Color3.new(1, 1, 1)
8902
Frame135.BackgroundTransparency = 1
8903
TextLabel136.Name = "SName"
8904
TextLabel136.Parent = Frame135
8905
TextLabel136.Position = UDim2.new(0, 10, 0, 0)
8906
TextLabel136.Transparency = 1
8907
TextLabel136.Size = UDim2.new(1, -20, 0, 30)
8908
TextLabel136.BackgroundColor = BrickColor.new("Institutional white")
8909
TextLabel136.BackgroundColor3 = Color3.new(1, 1, 1)
8910
TextLabel136.BackgroundTransparency = 1
8911
TextLabel136.Font = Enum.Font.SourceSans
8912
TextLabel136.FontSize = Enum.FontSize.Size18
8913
TextLabel136.Text = "Lighting Properties"
8914
TextLabel136.TextSize = 18
8915
TextLabel136.TextXAlignment = Enum.TextXAlignment.Left
8916
TextLabel137.Name = "Status"
8917
TextLabel137.Parent = Frame135
8918
TextLabel137.Position = UDim2.new(0, 60, 0, 30)
8919
TextLabel137.Transparency = 1
8920
TextLabel137.Size = UDim2.new(0, 50, 0, 15)
8921
TextLabel137.BackgroundColor = BrickColor.new("Institutional white")
8922
TextLabel137.BackgroundColor3 = Color3.new(1, 1, 1)
8923
TextLabel137.BackgroundTransparency = 1
8924
TextLabel137.Font = Enum.Font.SourceSans
8925
TextLabel137.FontSize = Enum.FontSize.Size18
8926
TextLabel137.Text = "Off"
8927
TextLabel137.TextSize = 18
8928
TextLabel137.TextXAlignment = Enum.TextXAlignment.Left
8929
TextButton138.Name = "Change"
8930
TextButton138.Parent = Frame135
8931
TextButton138.Position = UDim2.new(0, 10, 0, 30)
8932
TextButton138.Size = UDim2.new(0, 40, 0, 15)
8933
TextButton138.BackgroundColor = BrickColor.new("Quill grey")
8934
TextButton138.BackgroundColor3 = Color3.new(0.862745, 0.862745, 0.862745)
8935
TextButton138.BorderSizePixel = 0
8936
TextButton138.Font = Enum.Font.SourceSans
8937
TextButton138.FontSize = Enum.FontSize.Size14
8938
TextButton138.Text = ""
8939
TextButton138.TextSize = 14
8940
TextLabel139.Name = "OnBar"
8941
TextLabel139.Parent = TextButton138
8942
TextLabel139.Size = UDim2.new(0, 0, 0, 15)
8943
TextLabel139.BackgroundColor = BrickColor.new("Electric blue")
8944
TextLabel139.BackgroundColor3 = Color3.new(0, 0.576471, 0.862745)
8945
TextLabel139.BorderSizePixel = 0
8946
TextLabel139.Font = Enum.Font.SourceSans
8947
TextLabel139.FontSize = Enum.FontSize.Size14
8948
TextLabel139.Text = ""
8949
TextLabel139.TextSize = 14
8950
TextLabel140.Name = "Bar"
8951
TextLabel140.Parent = TextButton138
8952
TextLabel140.Position = UDim2.new(0, -2, 0, -2)
8953
TextLabel140.Size = UDim2.new(0, 10, 0, 19)
8954
TextLabel140.BackgroundColor = BrickColor.new("Really black")
8955
TextLabel140.BackgroundColor3 = Color3.new(0, 0, 0)
8956
TextLabel140.BorderSizePixel = 0
8957
TextLabel140.ClipsDescendants = true
8958
TextLabel140.Font = Enum.Font.SourceSans
8959
TextLabel140.FontSize = Enum.FontSize.Size14
8960
TextLabel140.Text = ""
8961
TextLabel140.TextSize = 14
8962
Frame141.Name = "CameraInstances"
8963
Frame141.Parent = Frame128
8964
Frame141.Position = UDim2.new(0, 0, 0, 180)
8965
Frame141.Transparency = 1
8966
Frame141.Size = UDim2.new(1, 0, 0, 60)
8967
Frame141.BackgroundColor = BrickColor.new("Institutional white")
8968
Frame141.BackgroundColor3 = Color3.new(1, 1, 1)
8969
Frame141.BackgroundTransparency = 1
8970
TextLabel142.Name = "SName"
8971
TextLabel142.Parent = Frame141
8972
TextLabel142.Position = UDim2.new(0, 10, 0, 0)
8973
TextLabel142.Transparency = 1
8974
TextLabel142.Size = UDim2.new(1, -20, 0, 30)
8975
TextLabel142.BackgroundColor = BrickColor.new("Institutional white")
8976
TextLabel142.BackgroundColor3 = Color3.new(1, 1, 1)
8977
TextLabel142.BackgroundTransparency = 1
8978
TextLabel142.Font = Enum.Font.SourceSans
8979
TextLabel142.FontSize = Enum.FontSize.Size18
8980
TextLabel142.Text = "Camera Instances"
8981
TextLabel142.TextSize = 18
8982
TextLabel142.TextXAlignment = Enum.TextXAlignment.Left
8983
TextLabel143.Name = "Status"
8984
TextLabel143.Parent = Frame141
8985
TextLabel143.Position = UDim2.new(0, 60, 0, 30)
8986
TextLabel143.Transparency = 1
8987
TextLabel143.Size = UDim2.new(0, 50, 0, 15)
8988
TextLabel143.BackgroundColor = BrickColor.new("Institutional white")
8989
TextLabel143.BackgroundColor3 = Color3.new(1, 1, 1)
8990
TextLabel143.BackgroundTransparency = 1
8991
TextLabel143.Font = Enum.Font.SourceSans
8992
TextLabel143.FontSize = Enum.FontSize.Size18
8993
TextLabel143.Text = "Off"
8994
TextLabel143.TextSize = 18
8995
TextLabel143.TextXAlignment = Enum.TextXAlignment.Left
8996
TextButton144.Name = "Change"
8997
TextButton144.Parent = Frame141
8998
TextButton144.Position = UDim2.new(0, 10, 0, 30)
8999
TextButton144.Size = UDim2.new(0, 40, 0, 15)
9000
TextButton144.BackgroundColor = BrickColor.new("Quill grey")
9001
TextButton144.BackgroundColor3 = Color3.new(0.862745, 0.862745, 0.862745)
9002
TextButton144.BorderSizePixel = 0
9003
TextButton144.Font = Enum.Font.SourceSans
9004
TextButton144.FontSize = Enum.FontSize.Size14
9005
TextButton144.Text = ""
9006
TextButton144.TextSize = 14
9007
TextLabel145.Name = "OnBar"
9008
TextLabel145.Parent = TextButton144
9009
TextLabel145.Size = UDim2.new(0, 0, 0, 15)
9010
TextLabel145.BackgroundColor = BrickColor.new("Electric blue")
9011
TextLabel145.BackgroundColor3 = Color3.new(0, 0.576471, 0.862745)
9012
TextLabel145.BorderSizePixel = 0
9013
TextLabel145.Font = Enum.Font.SourceSans
9014
TextLabel145.FontSize = Enum.FontSize.Size14
9015
TextLabel145.Text = ""
9016
TextLabel145.TextSize = 14
9017
TextLabel146.Name = "Bar"
9018
TextLabel146.Parent = TextButton144
9019
TextLabel146.Position = UDim2.new(0, -2, 0, -2)
9020
TextLabel146.Size = UDim2.new(0, 10, 0, 19)
9021
TextLabel146.BackgroundColor = BrickColor.new("Really black")
9022
TextLabel146.BackgroundColor3 = Color3.new(0, 0, 0)
9023
TextLabel146.BorderSizePixel = 0
9024
TextLabel146.ClipsDescendants = true
9025
TextLabel146.Font = Enum.Font.SourceSans
9026
TextLabel146.FontSize = Enum.FontSize.Size14
9027
TextLabel146.Text = ""
9028
TextLabel146.TextSize = 14
9029
Frame147.Name = "Scripts"
9030
Frame147.Parent = Frame128
9031
Frame147.Transparency = 1
9032
Frame147.Size = UDim2.new(1, 0, 0, 60)
9033
Frame147.BackgroundColor = BrickColor.new("Institutional white")
9034
Frame147.BackgroundColor3 = Color3.new(1, 1, 1)
9035
Frame147.BackgroundTransparency = 1
9036
TextLabel148.Name = "SName"
9037
TextLabel148.Parent = Frame147
9038
TextLabel148.Position = UDim2.new(0, 10, 0, 0)
9039
TextLabel148.Transparency = 1
9040
TextLabel148.Size = UDim2.new(1, -20, 0, 30)
9041
TextLabel148.BackgroundColor = BrickColor.new("Institutional white")
9042
TextLabel148.BackgroundColor3 = Color3.new(1, 1, 1)
9043
TextLabel148.BackgroundTransparency = 1
9044
TextLabel148.Font = Enum.Font.SourceSans
9045
TextLabel148.FontSize = Enum.FontSize.Size18
9046
TextLabel148.Text = "Save Scripts"
9047
TextLabel148.TextSize = 18
9048
TextLabel148.TextXAlignment = Enum.TextXAlignment.Left
9049
TextLabel149.Name = "Status"
9050
TextLabel149.Parent = Frame147
9051
TextLabel149.Position = UDim2.new(0, 60, 0, 30)
9052
TextLabel149.Transparency = 1
9053
TextLabel149.Size = UDim2.new(0, 50, 0, 15)
9054
TextLabel149.BackgroundColor = BrickColor.new("Institutional white")
9055
TextLabel149.BackgroundColor3 = Color3.new(1, 1, 1)
9056
TextLabel149.BackgroundTransparency = 1
9057
TextLabel149.Font = Enum.Font.SourceSans
9058
TextLabel149.FontSize = Enum.FontSize.Size18
9059
TextLabel149.Text = "Off"
9060
TextLabel149.TextSize = 18
9061
TextLabel149.TextXAlignment = Enum.TextXAlignment.Left
9062
TextButton150.Name = "Change"
9063
TextButton150.Parent = Frame147
9064
TextButton150.Position = UDim2.new(0, 10, 0, 30)
9065
TextButton150.Size = UDim2.new(0, 40, 0, 15)
9066
TextButton150.BackgroundColor = BrickColor.new("Quill grey")
9067
TextButton150.BackgroundColor3 = Color3.new(0.862745, 0.862745, 0.862745)
9068
TextButton150.BorderSizePixel = 0
9069
TextButton150.Font = Enum.Font.SourceSans
9070
TextButton150.FontSize = Enum.FontSize.Size14
9071
TextButton150.Text = ""
9072
TextButton150.TextSize = 14
9073
TextLabel151.Name = "OnBar"
9074
TextLabel151.Parent = TextButton150
9075
TextLabel151.Size = UDim2.new(0, 0, 0, 15)
9076
TextLabel151.BackgroundColor = BrickColor.new("Electric blue")
9077
TextLabel151.BackgroundColor3 = Color3.new(0, 0.576471, 0.862745)
9078
TextLabel151.BorderSizePixel = 0
9079
TextLabel151.Font = Enum.Font.SourceSans
9080
TextLabel151.FontSize = Enum.FontSize.Size14
9081
TextLabel151.Text = ""
9082
TextLabel151.TextSize = 14
9083
TextLabel152.Name = "Bar"
9084
TextLabel152.Parent = TextButton150
9085
TextLabel152.Position = UDim2.new(0, -2, 0, -2)
9086
TextLabel152.Size = UDim2.new(0, 10, 0, 19)
9087
TextLabel152.BackgroundColor = BrickColor.new("Really black")
9088
TextLabel152.BackgroundColor3 = Color3.new(0, 0, 0)
9089
TextLabel152.BorderSizePixel = 0
9090
TextLabel152.ClipsDescendants = true
9091
TextLabel152.Font = Enum.Font.SourceSans
9092
TextLabel152.FontSize = Enum.FontSize.Size14
9093
TextLabel152.Text = ""
9094
TextLabel152.TextSize = 14
9095
TextLabel153.Name = "ToSave"
9096
TextLabel153.Parent = Frame125
9097
TextLabel153.Position = UDim2.new(0, 0, 0, 17)
9098
TextLabel153.Transparency = 1
9099
TextLabel153.Size = UDim2.new(1, 0, 0, 20)
9100
TextLabel153.BackgroundTransparency = 1
9101
TextLabel153.Font = Enum.Font.SourceSans
9102
TextLabel153.FontSize = Enum.FontSize.Size18
9103
TextLabel153.Text = "To Save"
9104
TextLabel153.TextColor = BrickColor.new("Really black")
9105
TextLabel153.TextColor3 = Color3.new(0, 0, 0)
9106
TextLabel153.TextSize = 18
9107
Frame154.Name = "CopyList"
9108
Frame154.Parent = Frame125
9109
Frame154.Position = UDim2.new(0, 0, 0, 37)
9110
Frame154.Transparency = 0.80000001192093
9111
Frame154.Size = UDim2.new(1, 0, 0, 163)
9112
Frame154.BackgroundColor = BrickColor.new("Institutional white")
9113
Frame154.BackgroundColor3 = Color3.new(1, 1, 1)
9114
Frame154.BackgroundTransparency = 0.80000001192093
9115
Frame155.Name = "Bottom"
9116
Frame155.Parent = Frame125
9117
Frame155.Position = UDim2.new(0, 0, 1, -50)
9118
Frame155.Size = UDim2.new(1, 0, 0, 50)
9119
Frame155.BackgroundColor = BrickColor.new("Lily white")
9120
Frame155.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
9121
Frame155.BorderColor = BrickColor.new("Sand violet metallic")
9122
Frame155.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
9123
TextLabel156.Parent = Frame155
9124
TextLabel156.Position = UDim2.new(0, 4, 0, 0)
9125
TextLabel156.Transparency = 1
9126
TextLabel156.Size = UDim2.new(1, -4, 1, 0)
9127
TextLabel156.BackgroundTransparency = 1
9128
TextLabel156.Font = Enum.Font.SourceSans
9129
TextLabel156.FontSize = Enum.FontSize.Size14
9130
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."
9131
TextLabel156.TextColor = BrickColor.new("Really black")
9132
TextLabel156.TextColor3 = Color3.new(0, 0, 0)
9133
TextLabel156.TextSize = 14
9134
TextLabel156.TextWrap = true
9135
TextLabel156.TextWrapped = true
9136
TextLabel156.TextXAlignment = Enum.TextXAlignment.Left
9137
TextLabel156.TextYAlignment = Enum.TextYAlignment.Top
9138
TextButton157.Name = "Save"
9139
TextButton157.Parent = Frame125
9140
TextButton157.Position = UDim2.new(0, 0, 1, -80)
9141
TextButton157.Transparency = 0.80000001192093
9142
TextButton157.Size = UDim2.new(1, 0, 0, 30)
9143
TextButton157.BackgroundColor = BrickColor.new("White")
9144
TextButton157.BackgroundColor3 = Color3.new(0.941177, 0.941177, 0.941177)
9145
TextButton157.BackgroundTransparency = 0.80000001192093
9146
TextButton157.BorderColor = BrickColor.new("Really black")
9147
TextButton157.BorderColor3 = Color3.new(0, 0, 0)
9148
TextButton157.Font = Enum.Font.SourceSans
9149
TextButton157.FontSize = Enum.FontSize.Size18
9150
TextButton157.Text = "Save"
9151
TextButton157.TextSize = 18
9152
TextBox158.Name = "FileName"
9153
TextBox158.Parent = Frame125
9154
TextBox158.Position = UDim2.new(0, 0, 1, -105)
9155
TextBox158.Transparency = 0.60000002384186
9156
TextBox158.Size = UDim2.new(1, 0, 0, 25)
9157
TextBox158.BackgroundColor = BrickColor.new("White")
9158
TextBox158.BackgroundColor3 = Color3.new(0.941177, 0.941177, 0.941177)
9159
TextBox158.BackgroundTransparency = 0.60000002384186
9160
TextBox158.Font = Enum.Font.SourceSans
9161
TextBox158.FontSize = Enum.FontSize.Size18
9162
TextBox158.Text = "PlaceName"
9163
TextBox158.TextSize = 18
9164
TextBox158.TextXAlignment = Enum.TextXAlignment.Left
9165
Frame159.Name = "Entry"
9166
Frame159.Parent = Frame125
9167
Frame159.Visible = false
9168
Frame159.Transparency = 1
9169
Frame159.Size = UDim2.new(1, 0, 0, 22)
9170
Frame159.BackgroundColor = BrickColor.new("Institutional white")
9171
Frame159.BackgroundColor3 = Color3.new(1, 1, 1)
9172
Frame159.BackgroundTransparency = 1
9173
TextButton160.Name = "Change"
9174
TextButton160.Parent = Frame159
9175
TextButton160.Position = UDim2.new(0, 10, 0, 1)
9176
TextButton160.Transparency = 0.60000002384186
9177
TextButton160.Size = UDim2.new(0, 20, 0, 20)
9178
TextButton160.BackgroundColor = BrickColor.new("Institutional white")
9179
TextButton160.BackgroundColor3 = Color3.new(1, 1, 1)
9180
TextButton160.BackgroundTransparency = 0.60000002384186
9181
TextButton160.ZIndex = 2
9182
TextButton160.Font = Enum.Font.SourceSans
9183
TextButton160.FontSize = Enum.FontSize.Size18
9184
TextButton160.Text = ""
9185
TextButton160.TextColor = BrickColor.new("Institutional white")
9186
TextButton160.TextColor3 = Color3.new(1, 1, 1)
9187
TextButton160.TextSize = 18
9188
TextLabel161.Name = "enabled"
9189
TextLabel161.Parent = TextButton160
9190
TextLabel161.Position = UDim2.new(0, 3, 0, 3)
9191
TextLabel161.Transparency = 0.40000000596046
9192
TextLabel161.Size = UDim2.new(0, 14, 0, 14)
9193
TextLabel161.BackgroundColor = BrickColor.new("Dark stone grey")
9194
TextLabel161.BackgroundColor3 = Color3.new(0.380392, 0.380392, 0.380392)
9195
TextLabel161.BackgroundTransparency = 0.40000000596046
9196
TextLabel161.BorderSizePixel = 0
9197
TextLabel161.Font = Enum.Font.SourceSans
9198
TextLabel161.FontSize = Enum.FontSize.Size14
9199
TextLabel161.Text = ""
9200
TextLabel161.TextSize = 14
9201
TextLabel162.Name = "Info"
9202
TextLabel162.Parent = Frame159
9203
TextLabel162.Position = UDim2.new(0, 40, 0, 0)
9204
TextLabel162.Transparency = 1
9205
TextLabel162.Size = UDim2.new(1, -40, 0, 22)
9206
TextLabel162.BackgroundTransparency = 1
9207
TextLabel162.Font = Enum.Font.SourceSans
9208
TextLabel162.FontSize = Enum.FontSize.Size18
9209
TextLabel162.Text = "Workspace"
9210
TextLabel162.TextColor = BrickColor.new("Really black")
9211
TextLabel162.TextColor3 = Color3.new(0, 0, 0)
9212
TextLabel162.TextSize = 18
9213
TextLabel162.TextXAlignment = Enum.TextXAlignment.Left
9214
Frame163.Name = "RemoteDebugWindow"
9215
Frame163.Parent = ScreenGui0
9216
Frame163.Position = UDim2.new(1, 0, 0, 0)
9217
Frame163.Transparency = 0.10000000149012
9218
Frame163.Size = UDim2.new(0, 300, 1, 0)
9219
Frame163.BackgroundColor = BrickColor.new("Institutional white")
9220
Frame163.BackgroundColor3 = Color3.new(1, 1, 1)
9221
Frame163.BackgroundTransparency = 0.10000000149012
9222
Frame163.BorderColor = BrickColor.new("Light grey")
9223
Frame163.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
9224
Frame163.BorderSizePixel = 0
9225
Frame164.Name = "Header"
9226
Frame164.Parent = Frame163
9227
Frame164.Size = UDim2.new(1, 0, 0, 17)
9228
Frame164.BackgroundColor = BrickColor.new("Lily white")
9229
Frame164.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
9230
Frame164.BorderColor = BrickColor.new("Sand violet metallic")
9231
Frame164.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
9232
TextLabel165.Parent = Frame164
9233
TextLabel165.Position = UDim2.new(0, 4, 0, 0)
9234
TextLabel165.Transparency = 1
9235
TextLabel165.Size = UDim2.new(1, -4, 1, 0)
9236
TextLabel165.BackgroundTransparency = 1
9237
TextLabel165.Font = Enum.Font.SourceSans
9238
TextLabel165.FontSize = Enum.FontSize.Size14
9239
TextLabel165.Text = "Remote Debugger"
9240
TextLabel165.TextColor = BrickColor.new("Really black")
9241
TextLabel165.TextColor3 = Color3.new(0, 0, 0)
9242
TextLabel165.TextSize = 14
9243
TextLabel165.TextXAlignment = Enum.TextXAlignment.Left
9244
BindableFunction166.Name = "GetSetting"
9245
BindableFunction166.Parent = Frame163
9246
TextLabel167.Name = "Desc"
9247
TextLabel167.Parent = Frame163
9248
TextLabel167.Position = UDim2.new(0, 0, 0, 20)
9249
TextLabel167.Transparency = 1
9250
TextLabel167.Size = UDim2.new(1, 0, 0, 40)
9251
TextLabel167.BackgroundColor = BrickColor.new("Institutional white")
9252
TextLabel167.BackgroundColor3 = Color3.new(1, 1, 1)
9253
TextLabel167.BackgroundTransparency = 1
9254
TextLabel167.Font = Enum.Font.SourceSans
9255
TextLabel167.FontSize = Enum.FontSize.Size32
9256
TextLabel167.Text = "Have fun with remotes"
9257
TextLabel167.TextSize = 32
9258
TextLabel167.TextWrap = true
9259
TextLabel167.TextWrapped = true
9260
Frame168.Name = "About"
9261
Frame168.Parent = ScreenGui0
9262
Frame168.Position = UDim2.new(1, 0, 0, 0)
9263
Frame168.Size = UDim2.new(0, 300, 1, 0)
9264
Frame168.Active = true
9265
Frame168.BackgroundColor = BrickColor.new("Lily white")
9266
Frame168.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
9267
Frame168.BorderColor = BrickColor.new("Sand violet metallic")
9268
Frame168.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
9269
Frame168.BorderSizePixel = 0
9270
Frame168.Draggable = true
9271
Frame168.ZIndex = 2
9272
ImageLabel169.Name = "Sad"
9273
ImageLabel169.Parent = Frame168
9274
ImageLabel169.Position = UDim2.new(0, 50, 1, -250)
9275
ImageLabel169.Transparency = 1
9276
ImageLabel169.Size = UDim2.new(0, 200, 0, 200)
9277
ImageLabel169.BackgroundColor = BrickColor.new("Institutional white")
9278
ImageLabel169.BackgroundColor3 = Color3.new(1, 1, 1)
9279
ImageLabel169.BackgroundTransparency = 1
9280
ImageLabel169.ZIndex = 2
9281
ImageLabel169.Image = "rbxassetid://483437370"
9282
ImageLabel169.ImageColor3 = Color3.new(0.960784, 0.960784, 0.960784)
9283
TextLabel170.Name = "Creator"
9284
TextLabel170.Parent = Frame168
9285
TextLabel170.Position = UDim2.new(0, 80, 0, 300)
9286
TextLabel170.Transparency = 1
9287
TextLabel170.Size = UDim2.new(0, 140, 0, 30)
9288
TextLabel170.BackgroundColor = BrickColor.new("Institutional white")
9289
TextLabel170.BackgroundColor3 = Color3.new(1, 1, 1)
9290
TextLabel170.BackgroundTransparency = 1
9291
TextLabel170.ZIndex = 2
9292
TextLabel170.Font = Enum.Font.SourceSansBold
9293
TextLabel170.FontSize = Enum.FontSize.Size28
9294
TextLabel170.Text = "By Moon"
9295
TextLabel170.TextSize = 28
9296
TextLabel170.TextWrap = true
9297
TextLabel170.TextWrapped = true
9298
TextLabel171.Name = "Title"
9299
TextLabel171.Parent = Frame168
9300
TextLabel171.Position = UDim2.new(0, 100, 0, 150)
9301
TextLabel171.Transparency = 1
9302
TextLabel171.Size = UDim2.new(0, 100, 0, 60)
9303
TextLabel171.BackgroundColor = BrickColor.new("Institutional white")
9304
TextLabel171.BackgroundColor3 = Color3.new(1, 1, 1)
9305
TextLabel171.BackgroundTransparency = 1
9306
TextLabel171.ZIndex = 2
9307
TextLabel171.Font = Enum.Font.SourceSansBold
9308
TextLabel171.FontSize = Enum.FontSize.Size60
9309
TextLabel171.Text = "DEX"
9310
TextLabel171.TextSize = 60
9311
TextLabel171.TextWrap = true
9312
TextLabel171.TextWrapped = true
9313
TextLabel172.Name = "Version"
9314
TextLabel172.Parent = Frame168
9315
TextLabel172.Position = UDim2.new(0, 100, 0, 210)
9316
TextLabel172.Transparency = 1
9317
TextLabel172.Size = UDim2.new(0, 100, 0, 30)
9318
TextLabel172.BackgroundColor = BrickColor.new("Institutional white")
9319
TextLabel172.BackgroundColor3 = Color3.new(1, 1, 1)
9320
TextLabel172.BackgroundTransparency = 1
9321
TextLabel172.ZIndex = 2
9322
TextLabel172.Font = Enum.Font.SourceSansBold
9323
TextLabel172.FontSize = Enum.FontSize.Size28
9324
TextLabel172.Text = "v3"
9325
TextLabel172.TextSize = 28
9326
TextLabel172.TextWrap = true
9327
TextLabel172.TextWrapped = true
9328
ImageButton173.Name = "Toggle"
9329
ImageButton173.Parent = ScreenGui0
9330
ImageButton173.Position = UDim2.new(1, 0, 0, 0)
9331
ImageButton173.Rotation = 180
9332
ImageButton173.Transparency = 1
9333
ImageButton173.Size = UDim2.new(0, 40, 0, 40)
9334
ImageButton173.BackgroundColor = BrickColor.new("Institutional white")
9335
ImageButton173.BackgroundColor3 = Color3.new(1, 1, 1)
9336
ImageButton173.BackgroundTransparency = 1
9337
ImageButton173.Image = "rbxassetid://1513966937"
9338
ImageButton173.ImageColor3 = Color3.new(0.913726, 0.913726, 0.913726)
9339
TextLabel174.Parent = ImageButton173
9340
TextLabel174.Position = UDim2.new(0, 2, 0, 10)
9341
TextLabel174.Rotation = 180
9342
TextLabel174.Transparency = 1
9343
TextLabel174.Size = UDim2.new(0, 30, 0, 30)
9344
TextLabel174.BackgroundColor = BrickColor.new("Institutional white")
9345
TextLabel174.BackgroundColor3 = Color3.new(1, 1, 1)
9346
TextLabel174.BackgroundTransparency = 1
9347
TextLabel174.Font = Enum.Font.SourceSans
9348
TextLabel174.FontSize = Enum.FontSize.Size24
9349
TextLabel174.Text = "<"
9350
TextLabel174.TextSize = 24
9351
TextLabel174.TextWrap = true
9352
TextLabel174.TextWrapped = true
9353
for i,v in pairs(mas:GetChildren()) do
9354
	v.Parent = game:GetService("Players").LocalPlayer.PlayerGui
9355
	pcall(function() v:MakeJoints() end)
9356
end
9357
mas:Destroy()
9358
for i,v in pairs(cors) do
9359
	spawn(function()
9360
		pcall(v)
9361
	end)
9362
end