· 6 years ago · Jul 23, 2019, 02:34 PM
1script.Parent.MouseButton1Click:Connect(function()
2local print = function() end
3local warn = function() end
4local error = function() end
5
6math.randomseed(tick())
7
8function RandomCharacters(length)
9 local STR = ''
10
11 for i = 1, length do
12 STR = STR .. string.char(math.random(65,90))
13 end
14
15 return STR
16end
17
18if getgenv().dex_ui ~= nil then getgenv().dex_ui:remove() getgenv().dex_ui = nil end
19
20CreateGui = function()
21local ROBLOX = Instance.new("ScreenGui")
22local PropertiesFrame = Instance.new("Frame")
23local Header = Instance.new("Frame")
24local TextLabel = Instance.new("TextLabel")
25local TextBox = Instance.new("TextBox")
26local ExplorerPanel = Instance.new("Frame")
27local SideMenu = Instance.new("Frame")
28local Toggle = Instance.new("TextButton")
29local Title = Instance.new("TextLabel")
30local Version = Instance.new("TextLabel")
31local Slant = Instance.new("ImageLabel")
32local Main = Instance.new("Frame")
33local SlideOut = Instance.new("Frame")
34local SlideFrame = Instance.new("Frame")
35local Explorer = Instance.new("TextButton")
36local Icon = Instance.new("ImageLabel")
37local SaveMap = Instance.new("TextButton")
38local Icon_2 = Instance.new("ImageLabel")
39local Settings = Instance.new("TextButton")
40local Icon_3 = Instance.new("ImageLabel")
41local Remotes = Instance.new("TextButton")
42local Icon_4 = Instance.new("ImageLabel")
43local About = Instance.new("TextButton")
44local Icon_5 = Instance.new("ImageLabel")
45local OpenScriptEditor = Instance.new("TextButton")
46local Icon_6 = Instance.new("ImageLabel")
47local Toggle_2 = Instance.new("TextButton")
48local SettingsPanel = Instance.new("Frame")
49local Header_2 = Instance.new("Frame")
50local TextLabel_2 = Instance.new("TextLabel")
51local SettingTemplate = Instance.new("Frame")
52local SName = Instance.new("TextLabel")
53local Status = Instance.new("TextLabel")
54local Change = Instance.new("TextButton")
55local OnBar = Instance.new("TextLabel")
56local Bar = Instance.new("TextLabel")
57local SettingList = Instance.new("Frame")
58local SaveInstance = Instance.new("Frame")
59local Title_2 = Instance.new("TextLabel")
60local MainWindow = Instance.new("Frame")
61local Save = Instance.new("TextButton")
62local Desc = Instance.new("TextLabel")
63local Cancel = Instance.new("TextButton")
64local FileName = Instance.new("TextBox")
65local SaveObjects = Instance.new("TextButton")
66local enabled = Instance.new("TextLabel")
67local Desc2 = Instance.new("TextLabel")
68local Confirmation = Instance.new("Frame")
69local Title_3 = Instance.new("TextLabel")
70local MainWindow_2 = Instance.new("Frame")
71local Yes = Instance.new("TextButton")
72local Desc_2 = Instance.new("TextLabel")
73local No = Instance.new("TextButton")
74local Caution = Instance.new("Frame")
75local Title_4 = Instance.new("TextLabel")
76local MainWindow_3 = Instance.new("Frame")
77local Desc_3 = Instance.new("TextLabel")
78local Ok = Instance.new("TextButton")
79local CallRemote = Instance.new("Frame")
80local Title_5 = Instance.new("TextLabel")
81local MainWindow_4 = Instance.new("Frame")
82local Desc_4 = Instance.new("TextLabel")
83local Arguments = Instance.new("ScrollingFrame")
84local DisplayReturned = Instance.new("TextButton")
85local enabled_2 = Instance.new("TextLabel")
86local Desc2_2 = Instance.new("TextLabel")
87local Add = Instance.new("TextButton")
88local Subtract = Instance.new("TextButton")
89local ArgumentTemplate = Instance.new("Frame")
90local Type = Instance.new("TextButton")
91local Value = Instance.new("TextBox")
92local Cancel_2 = Instance.new("TextButton")
93local Ok_2 = Instance.new("TextButton")
94local TableCaution = Instance.new("Frame")
95local MainWindow_5 = Instance.new("Frame")
96local Ok_3 = Instance.new("TextButton")
97local TableResults = Instance.new("ScrollingFrame")
98local TableTemplate = Instance.new("Frame")
99local Type_2 = Instance.new("TextLabel")
100local Value_2 = Instance.new("TextLabel")
101local Title_6 = Instance.new("TextLabel")
102local ScriptEditor = Instance.new("Frame")
103local Title_7 = Instance.new("TextLabel")
104local Cover = Instance.new("Frame")
105local EditorGrid = Instance.new("Frame")
106local TopBar = Instance.new("Frame")
107local ScriptBarLeft = Instance.new("ImageButton")
108local ArrowGraphic = Instance.new("Frame")
109local Graphic = Instance.new("Frame")
110local Graphic_2 = Instance.new("Frame")
111local Graphic_3 = Instance.new("Frame")
112local Graphic_4 = Instance.new("Frame")
113local ScriptBarRight = Instance.new("ImageButton")
114local ArrowGraphic_2 = Instance.new("Frame")
115local Graphic_5 = Instance.new("Frame")
116local Graphic_6 = Instance.new("Frame")
117local Graphic_7 = Instance.new("Frame")
118local Graphic_8 = Instance.new("Frame")
119local Clipboard = Instance.new("TextButton")
120local SaveScript = Instance.new("TextButton")
121local ScriptBar = Instance.new("Frame")
122local Entry = Instance.new("Frame")
123local Button = Instance.new("TextButton")
124local Close = Instance.new("TextButton")
125local Close_2 = Instance.new("TextButton")
126local IntroFrame = Instance.new("Frame")
127local Main_2 = Instance.new("Frame")
128local ImageLabel = Instance.new("ImageLabel")
129local Title_8 = Instance.new("TextLabel")
130local Version_2 = Instance.new("TextLabel")
131local Creator = Instance.new("TextLabel")
132local BG = Instance.new("ImageLabel")
133local Slant_2 = Instance.new("Frame")
134local ImageLabel_2 = Instance.new("ImageLabel")
135local SaveMapWindow = Instance.new("Frame")
136local Header_3 = Instance.new("Frame")
137local TextLabel_3 = Instance.new("TextLabel")
138local MapSettings = Instance.new("Frame")
139local Terrain = Instance.new("Frame")
140local SName_2 = Instance.new("TextLabel")
141local Status_2 = Instance.new("TextLabel")
142local Change_2 = Instance.new("TextButton")
143local OnBar_2 = Instance.new("TextLabel")
144local Bar_2 = Instance.new("TextLabel")
145local Lighting = Instance.new("Frame")
146local SName_3 = Instance.new("TextLabel")
147local Status_3 = Instance.new("TextLabel")
148local Change_3 = Instance.new("TextButton")
149local OnBar_3 = Instance.new("TextLabel")
150local Bar_3 = Instance.new("TextLabel")
151local CameraInstances = Instance.new("Frame")
152local SName_4 = Instance.new("TextLabel")
153local Status_4 = Instance.new("TextLabel")
154local Change_4 = Instance.new("TextButton")
155local OnBar_4 = Instance.new("TextLabel")
156local Bar_4 = Instance.new("TextLabel")
157local Scripts = Instance.new("Frame")
158local SName_5 = Instance.new("TextLabel")
159local Status_5 = Instance.new("TextLabel")
160local Change_5 = Instance.new("TextButton")
161local OnBar_5 = Instance.new("TextLabel")
162local Bar_5 = Instance.new("TextLabel")
163local ToSave = Instance.new("TextLabel")
164local CopyList = Instance.new("Frame")
165local Bottom = Instance.new("Frame")
166local TextLabel_4 = Instance.new("TextLabel")
167local Save_2 = Instance.new("TextButton")
168local FileName_2 = Instance.new("TextBox")
169local Entry_2 = Instance.new("Frame")
170local Change_6 = Instance.new("TextButton")
171local enabled_3 = Instance.new("TextLabel")
172local Info = Instance.new("TextLabel")
173local RemoteDebugWindow = Instance.new("Frame")
174local Header_4 = Instance.new("Frame")
175local TextLabel_5 = Instance.new("TextLabel")
176local Desc_5 = Instance.new("TextLabel")
177local AboutWindow = Instance.new("Frame")
178local Header_5 = Instance.new("Frame")
179local TextLabel_6 = Instance.new("TextLabel")
180local Desc_6 = Instance.new("TextLabel")
181
182ROBLOX.Name = RandomCharacters(16, 64)
183
184PropertiesFrame.Name = "PropertiesFrame"
185PropertiesFrame.Parent = ROBLOX
186PropertiesFrame.Active = true
187PropertiesFrame.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
188PropertiesFrame.BorderColor3 = Color3.fromRGB(191, 191, 191)
189PropertiesFrame.BorderSizePixel = 0
190PropertiesFrame.Position = UDim2.new(1, 0, 0.5, 36)
191PropertiesFrame.Size = UDim2.new(0, 300, 0.5, -36)
192
193Header.Name = "Header"
194Header.Parent = PropertiesFrame
195Header.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
196Header.BorderColor3 = Color3.fromRGB(149, 149, 149)
197Header.BorderSizePixel = 0
198Header.Position = UDim2.new(0, 0, 0, -35)
199Header.Size = UDim2.new(1, 0, 0, 35)
200
201TextLabel.Parent = Header
202TextLabel.BackgroundTransparency = 1
203TextLabel.Position = UDim2.new(0, 4, 0, 0)
204TextLabel.Size = UDim2.new(1, -4, 0.5, 0)
205TextLabel.Font = Enum.Font.SourceSans
206TextLabel.Text = "Properties"
207TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
208TextLabel.TextSize = 14
209TextLabel.TextXAlignment = Enum.TextXAlignment.Left
210
211TextBox.Parent = Header
212TextBox.BackgroundTransparency = 0.8
213TextBox.Position = UDim2.new(0, 4, 0.5, 0)
214TextBox.Size = UDim2.new(1, -8, 0.5, -3)
215TextBox.Font = Enum.Font.SourceSans
216TextBox.PlaceholderText = "Search Properties"
217TextBox.Text = ""
218TextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
219TextBox.TextSize = 14
220TextBox.TextXAlignment = Enum.TextXAlignment.Left
221
222ExplorerPanel.Name = "ExplorerPanel"
223ExplorerPanel.Parent = ROBLOX
224ExplorerPanel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
225ExplorerPanel.BorderColor3 = Color3.fromRGB(191, 191, 191)
226ExplorerPanel.BorderSizePixel = 0
227ExplorerPanel.Position = UDim2.new(1, 0, 0, 1)
228ExplorerPanel.Size = UDim2.new(0, 300, 0.5, 0)
229
230SideMenu.Name = "SideMenu"
231SideMenu.Parent = ROBLOX
232SideMenu.BackgroundColor3 = Color3.fromRGB(233, 233, 233)
233SideMenu.BackgroundTransparency = 1
234SideMenu.BorderColor3 = Color3.fromRGB(149, 149, 149)
235SideMenu.BorderSizePixel = 0
236SideMenu.Position = UDim2.new(1, -330, 0, 0)
237SideMenu.Size = UDim2.new(0, 30, 0, 180)
238SideMenu.Visible = false
239SideMenu.ZIndex = 2
240
241Toggle.Name = "Toggle"
242Toggle.Parent = SideMenu
243Toggle.Active = false
244Toggle.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
245Toggle.BorderSizePixel = 0
246Toggle.Position = UDim2.new(0, 0, 0, 60)
247Toggle.Size = UDim2.new(0, 30, 0, 30)
248Toggle.AutoButtonColor = false
249Toggle.Font = Enum.Font.SourceSans
250Toggle.Text = ">"
251Toggle.TextColor3 = Color3.fromRGB(255, 255, 255)
252Toggle.TextSize = 24
253Toggle.TextTransparency = 1
254Toggle.TextWrapped = true
255
256Title.Name = "Title"
257Title.Parent = SideMenu
258Title.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
259Title.BackgroundTransparency = 1
260Title.Size = UDim2.new(0, 30, 0, 20)
261Title.ZIndex = 2
262Title.Font = Enum.Font.SourceSansBold
263Title.Text = "DEX"
264Title.TextColor3 = Color3.fromRGB(255, 255, 255)
265Title.TextSize = 14
266Title.TextWrapped = true
267
268Version.Name = "Version"
269Version.Parent = SideMenu
270Version.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
271Version.BackgroundTransparency = 1
272Version.Position = UDim2.new(0, 0, 0, 15)
273Version.Size = UDim2.new(0, 30, 0, 20)
274Version.ZIndex = 2
275Version.Font = Enum.Font.SourceSansBold
276Version.Text = "V2.0.0"
277Version.TextColor3 = Color3.fromRGB(255, 255, 255)
278Version.TextSize = 12
279Version.TextWrapped = true
280
281Slant.Name = "Slant"
282Slant.Parent = SideMenu
283Slant.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
284Slant.BackgroundTransparency = 1
285Slant.Position = UDim2.new(0, 0, 0, 90)
286Slant.Rotation = 180
287Slant.Size = UDim2.new(0, 30, 0, 30)
288Slant.Image = "rbxassetid://474172996"
289Slant.ImageColor3 = Color3.fromRGB(43, 43, 43)
290
291Main.Name = "Main"
292Main.Parent = SideMenu
293Main.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
294Main.BorderSizePixel = 0
295Main.Size = UDim2.new(0, 30, 0, 30)
296
297SlideOut.Name = "SlideOut"
298SlideOut.Parent = SideMenu
299SlideOut.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
300SlideOut.BackgroundTransparency = 1
301SlideOut.BorderSizePixel = 0
302SlideOut.ClipsDescendants = true
303SlideOut.Position = UDim2.new(0, 0, 0, 30)
304SlideOut.Size = UDim2.new(0, 30, 0, 150)
305
306SlideFrame.Name = "SlideFrame"
307SlideFrame.Parent = SlideOut
308SlideFrame.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
309SlideFrame.BorderSizePixel = 0
310SlideFrame.Position = UDim2.new(0, 0, 0, -150)
311SlideFrame.Size = UDim2.new(0, 30, 0, 150)
312
313Explorer.Name = "Explorer"
314Explorer.Parent = SlideFrame
315Explorer.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
316Explorer.BackgroundTransparency = 1
317Explorer.BorderSizePixel = 0
318Explorer.Position = UDim2.new(0, 0, 0, 120)
319Explorer.Size = UDim2.new(0, 30, 0, 30)
320Explorer.ZIndex = 2
321Explorer.AutoButtonColor = false
322Explorer.Font = Enum.Font.SourceSans
323Explorer.Text = ""
324Explorer.TextSize = 24
325
326Icon.Name = "Icon"
327Icon.Parent = Explorer
328Icon.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
329Icon.BackgroundTransparency = 1
330Icon.Position = UDim2.new(0, 5, 0, 5)
331Icon.Size = UDim2.new(0, 20, 0, 20)
332Icon.ZIndex = 2
333Icon.Image = "rbxassetid://472635937"
334
335SaveMap.Name = "SaveMap"
336SaveMap.Parent = SlideFrame
337SaveMap.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
338SaveMap.BackgroundTransparency = 1
339SaveMap.BorderSizePixel = 0
340SaveMap.Position = UDim2.new(0, 0, 0, 90)
341SaveMap.Size = UDim2.new(0, 30, 0, 30)
342SaveMap.ZIndex = 2
343SaveMap.AutoButtonColor = false
344SaveMap.Font = Enum.Font.SourceSans
345SaveMap.Text = ""
346SaveMap.TextSize = 24
347
348Icon_2.Name = "Icon"
349Icon_2.Parent = SaveMap
350Icon_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
351Icon_2.BackgroundTransparency = 1
352Icon_2.Position = UDim2.new(0, 5, 0, 5)
353Icon_2.Size = UDim2.new(0, 20, 0, 20)
354Icon_2.ZIndex = 2
355Icon_2.Image = "rbxassetid://472636337"
356
357Settings.Name = "Settings"
358Settings.Parent = SlideFrame
359Settings.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
360Settings.BackgroundTransparency = 1
361Settings.BorderSizePixel = 0
362Settings.Position = UDim2.new(0, 0, 0, 30)
363Settings.Size = UDim2.new(0, 30, 0, 30)
364Settings.ZIndex = 2
365Settings.AutoButtonColor = false
366Settings.Font = Enum.Font.SourceSans
367Settings.Text = ""
368Settings.TextSize = 24
369
370Icon_3.Name = "Icon"
371Icon_3.Parent = Settings
372Icon_3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
373Icon_3.BackgroundTransparency = 1
374Icon_3.Position = UDim2.new(0, 5, 0, 5)
375Icon_3.Size = UDim2.new(0, 20, 0, 20)
376Icon_3.ZIndex = 2
377Icon_3.Image = "rbxassetid://472635774"
378
379Remotes.Name = "Remotes"
380Remotes.Parent = SlideFrame
381Remotes.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
382Remotes.BackgroundTransparency = 1
383Remotes.BorderSizePixel = 0
384Remotes.Position = UDim2.new(0, 0, 0, 60)
385Remotes.Size = UDim2.new(0, 30, 0, 30)
386Remotes.ZIndex = 2
387Remotes.AutoButtonColor = false
388Remotes.Font = Enum.Font.SourceSans
389Remotes.Text = ""
390Remotes.TextSize = 24
391
392Icon_4.Name = "Icon"
393Icon_4.Parent = Remotes
394Icon_4.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
395Icon_4.BackgroundTransparency = 1
396Icon_4.Position = UDim2.new(0, 5, 0, 5)
397Icon_4.Size = UDim2.new(0, 20, 0, 20)
398Icon_4.ZIndex = 2
399Icon_4.Image = "rbxassetid://472636187"
400
401About.Name = "About"
402About.Parent = SlideFrame
403About.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
404About.BackgroundTransparency = 1
405About.BorderSizePixel = 0
406About.Size = UDim2.new(0, 30, 0, 30)
407About.ZIndex = 2
408About.AutoButtonColor = false
409About.Font = Enum.Font.SourceSans
410About.Text = ""
411About.TextSize = 24
412
413Icon_5.Archivable = false
414Icon_5.Name = "Icon"
415Icon_5.Parent = About
416Icon_5.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
417Icon_5.BackgroundTransparency = 1
418Icon_5.Position = UDim2.new(0, 5, 0, 5)
419Icon_5.Size = UDim2.new(0, 20, 0, 20)
420Icon_5.ZIndex = 2
421Icon_5.Image = "rbxassetid://476354004"
422
423OpenScriptEditor.Name = "OpenScriptEditor"
424OpenScriptEditor.Parent = SideMenu
425OpenScriptEditor.Active = false
426OpenScriptEditor.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
427OpenScriptEditor.BorderSizePixel = 0
428OpenScriptEditor.Position = UDim2.new(0, 0, 0, 30)
429OpenScriptEditor.Size = UDim2.new(0, 30, 0, 30)
430OpenScriptEditor.ZIndex = 2
431OpenScriptEditor.AutoButtonColor = false
432OpenScriptEditor.Font = Enum.Font.SourceSans
433OpenScriptEditor.Text = ""
434OpenScriptEditor.TextSize = 24
435
436Icon_6.Name = "Icon"
437Icon_6.Parent = OpenScriptEditor
438Icon_6.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
439Icon_6.BackgroundTransparency = 1
440Icon_6.Position = UDim2.new(0, 5, 0, 5)
441Icon_6.Size = UDim2.new(0, 20, 0, 20)
442Icon_6.ZIndex = 2
443Icon_6.Image = "rbxassetid://475456048"
444Icon_6.ImageTransparency = 1
445
446Toggle_2.Name = "Toggle"
447Toggle_2.Parent = ROBLOX
448Toggle_2.BackgroundColor3 = Color3.fromRGB(233, 233, 233)
449Toggle_2.BorderColor3 = Color3.fromRGB(149, 149, 149)
450Toggle_2.Position = UDim2.new(1, 0, 0, 0)
451Toggle_2.Size = UDim2.new(0, 30, 0, 30)
452Toggle_2.Font = Enum.Font.SourceSans
453Toggle_2.Text = "<"
454Toggle_2.TextSize = 24
455
456SettingsPanel.Name = "SettingsPanel"
457SettingsPanel.Parent = ROBLOX
458SettingsPanel.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
459SettingsPanel.BorderColor3 = Color3.fromRGB(191, 191, 191)
460SettingsPanel.BorderSizePixel = 0
461SettingsPanel.Position = UDim2.new(1, 0, 0, 1)
462SettingsPanel.Size = UDim2.new(0, 300, 1, 0)
463
464Header_2.Name = "Header"
465Header_2.Parent = SettingsPanel
466Header_2.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
467Header_2.BorderColor3 = Color3.fromRGB(30, 30, 30)
468Header_2.Size = UDim2.new(1, 0, 0, 17)
469
470TextLabel_2.Parent = Header_2
471TextLabel_2.BackgroundTransparency = 1
472TextLabel_2.Position = UDim2.new(0, 4, 0, 0)
473TextLabel_2.Size = UDim2.new(1, -4, 1, 0)
474TextLabel_2.Font = Enum.Font.SourceSans
475TextLabel_2.Text = "Settings"
476TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
477TextLabel_2.TextSize = 14
478TextLabel_2.TextXAlignment = Enum.TextXAlignment.Left
479
480SettingTemplate.Name = "SettingTemplate"
481SettingTemplate.Parent = SettingsPanel
482SettingTemplate.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
483SettingTemplate.BackgroundTransparency = 1
484SettingTemplate.Position = UDim2.new(0, 0, 0, 18)
485SettingTemplate.Size = UDim2.new(1, 0, 0, 60)
486SettingTemplate.Visible = false
487
488SName.Name = "SName"
489SName.Parent = SettingTemplate
490SName.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
491SName.BackgroundTransparency = 1
492SName.Position = UDim2.new(0, 10, 0, 0)
493SName.Size = UDim2.new(1, -20, 0, 30)
494SName.Font = Enum.Font.SourceSans
495SName.Text = "SettingName"
496SName.TextColor3 = Color3.fromRGB(255, 255, 255)
497SName.TextSize = 18
498SName.TextXAlignment = Enum.TextXAlignment.Left
499
500Status.Name = "Status"
501Status.Parent = SettingTemplate
502Status.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
503Status.BackgroundTransparency = 1
504Status.Position = UDim2.new(0, 60, 0, 30)
505Status.Size = UDim2.new(0, 50, 0, 15)
506Status.Font = Enum.Font.SourceSans
507Status.Text = "Off"
508Status.TextColor3 = Color3.fromRGB(255, 255, 255)
509Status.TextSize = 18
510Status.TextXAlignment = Enum.TextXAlignment.Left
511
512Change.Name = "Change"
513Change.Parent = SettingTemplate
514Change.BackgroundColor3 = Color3.fromRGB(81, 81, 81)
515Change.BorderSizePixel = 0
516Change.Position = UDim2.new(0, 10, 0, 30)
517Change.Size = UDim2.new(0, 40, 0, 15)
518Change.Font = Enum.Font.SourceSans
519Change.Text = ""
520Change.TextColor3 = Color3.fromRGB(255, 255, 255)
521Change.TextSize = 14
522
523OnBar.Name = "OnBar"
524OnBar.Parent = Change
525OnBar.BackgroundColor3 = Color3.fromRGB(209, 125, 0)
526OnBar.BorderSizePixel = 0
527OnBar.Size = UDim2.new(0, 0, 0, 15)
528OnBar.Font = Enum.Font.SourceSans
529OnBar.Text = ""
530OnBar.TextColor3 = Color3.fromRGB(255, 255, 255)
531OnBar.TextSize = 14
532
533Bar.Name = "Bar"
534Bar.Parent = Change
535Bar.BackgroundColor3 = Color3.fromRGB(255, 153, 0)
536Bar.BorderSizePixel = 0
537Bar.ClipsDescendants = true
538Bar.Position = UDim2.new(0, -2, 0, -2)
539Bar.Size = UDim2.new(0, 10, 0, 19)
540Bar.Font = Enum.Font.SourceSans
541Bar.Text = ""
542Bar.TextColor3 = Color3.fromRGB(255, 255, 255)
543Bar.TextSize = 14
544
545SettingList.Name = "SettingList"
546SettingList.Parent = SettingsPanel
547SettingList.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
548SettingList.BackgroundTransparency = 1
549SettingList.Position = UDim2.new(0, 0, 0, 17)
550SettingList.Size = UDim2.new(1, 0, 1, -17)
551
552SaveInstance.Name = "SaveInstance"
553SaveInstance.Parent = ROBLOX
554SaveInstance.Active = true
555SaveInstance.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
556SaveInstance.BorderColor3 = Color3.fromRGB(30, 30, 30)
557SaveInstance.Draggable = true
558SaveInstance.Position = UDim2.new(0.3, 0, 0.3, 0)
559SaveInstance.Size = UDim2.new(0, 350, 0, 20)
560SaveInstance.Visible = false
561SaveInstance.ZIndex = 2
562
563Title_2.Name = "Title"
564Title_2.Parent = SaveInstance
565Title_2.BackgroundTransparency = 1
566Title_2.Size = UDim2.new(1, 0, 1, 0)
567Title_2.ZIndex = 2
568Title_2.Font = Enum.Font.SourceSans
569Title_2.Text = "Save Instance"
570Title_2.TextColor3 = Color3.fromRGB(255, 255, 255)
571Title_2.TextSize = 14
572Title_2.TextXAlignment = Enum.TextXAlignment.Left
573
574MainWindow.Name = "MainWindow"
575MainWindow.Parent = SaveInstance
576MainWindow.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
577MainWindow.BackgroundTransparency = 0.1
578MainWindow.BorderColor3 = Color3.fromRGB(30, 30, 30)
579MainWindow.Size = UDim2.new(1, 0, 0, 200)
580
581Save.Name = "Save"
582Save.Parent = MainWindow
583Save.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
584Save.BackgroundTransparency = 0.5
585Save.BorderColor3 = Color3.fromRGB(40, 40, 40)
586Save.Position = UDim2.new(0.075, 0, 1, -40)
587Save.Size = UDim2.new(0.4, 0, 0, 30)
588Save.Font = Enum.Font.SourceSans
589Save.Text = "Save"
590Save.TextColor3 = Color3.fromRGB(255, 255, 255)
591Save.TextSize = 18
592
593Desc.Name = "Desc"
594Desc.Parent = MainWindow
595Desc.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
596Desc.BackgroundTransparency = 1
597Desc.Position = UDim2.new(0, 0, 0, 20)
598Desc.Size = UDim2.new(1, 0, 0, 40)
599Desc.Font = Enum.Font.SourceSans
600Desc.Text = "This will save an instance to your PC. Type in the name for your instance. (.rbxmx will be added automatically.)"
601Desc.TextColor3 = Color3.fromRGB(255, 255, 255)
602Desc.TextSize = 14
603Desc.TextWrapped = true
604
605Cancel.Name = "Cancel"
606Cancel.Parent = MainWindow
607Cancel.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
608Cancel.BackgroundTransparency = 0.5
609Cancel.BorderColor3 = Color3.fromRGB(40, 40, 40)
610Cancel.Position = UDim2.new(0.524, 0, 1, -40)
611Cancel.Size = UDim2.new(0.4, 0, 0, 30)
612Cancel.Font = Enum.Font.SourceSans
613Cancel.Text = "Cancel"
614Cancel.TextColor3 = Color3.fromRGB(255, 255, 255)
615Cancel.TextSize = 18
616
617FileName.Name = "FileName"
618FileName.Parent = MainWindow
619FileName.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
620FileName.BackgroundTransparency = 0.2
621FileName.BorderColor3 = Color3.fromRGB(40, 40, 40)
622FileName.Position = UDim2.new(0.075, 0, 0.4, 0)
623FileName.Size = UDim2.new(0.85, 0, 0, 30)
624FileName.Font = Enum.Font.SourceSans
625FileName.Text = ""
626FileName.TextColor3 = Color3.fromRGB(255, 255, 255)
627FileName.TextSize = 18
628FileName.TextXAlignment = Enum.TextXAlignment.Left
629
630SaveObjects.Name = "SaveObjects"
631SaveObjects.Parent = MainWindow
632SaveObjects.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
633SaveObjects.BackgroundTransparency = 0.6
634SaveObjects.BorderColor3 = Color3.fromRGB(40, 40, 40)
635SaveObjects.Position = UDim2.new(0.075, 0, 0.625, 0)
636SaveObjects.Size = UDim2.new(0, 20, 0, 20)
637SaveObjects.ZIndex = 2
638SaveObjects.Font = Enum.Font.SourceSans
639SaveObjects.Text = ""
640SaveObjects.TextColor3 = Color3.fromRGB(255, 255, 255)
641SaveObjects.TextSize = 18
642
643enabled.Name = "enabled"
644enabled.Parent = SaveObjects
645enabled.BackgroundColor3 = Color3.fromRGB(96, 96, 96)
646enabled.BackgroundTransparency = 0.4
647enabled.BorderSizePixel = 0
648enabled.Position = UDim2.new(0, 3, 0, 3)
649enabled.Size = UDim2.new(0, 14, 0, 14)
650enabled.Font = Enum.Font.SourceSans
651enabled.Text = ""
652enabled.TextSize = 14
653
654Desc2.Name = "Desc2"
655Desc2.Parent = MainWindow
656Desc2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
657Desc2.BackgroundTransparency = 1
658Desc2.Position = UDim2.new(0.075, 30, 0.625, 0)
659Desc2.Size = UDim2.new(0.925, -30, 0, 20)
660Desc2.Font = Enum.Font.SourceSans
661Desc2.Text = "Save \"Object\" type values"
662Desc2.TextColor3 = Color3.fromRGB(255, 255, 255)
663Desc2.TextSize = 14
664Desc2.TextXAlignment = Enum.TextXAlignment.Left
665
666Confirmation.Name = "Confirmation"
667Confirmation.Parent = ROBLOX
668Confirmation.Active = true
669Confirmation.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
670Confirmation.BorderColor3 = Color3.fromRGB(30, 30, 30)
671Confirmation.Draggable = true
672Confirmation.Position = UDim2.new(0.3, 0, 0.349, 0)
673Confirmation.Size = UDim2.new(0, 350, 0, 20)
674Confirmation.Visible = false
675Confirmation.ZIndex = 3
676
677Title_3.Name = "Title"
678Title_3.Parent = Confirmation
679Title_3.BackgroundTransparency = 1
680Title_3.Size = UDim2.new(1, 0, 1, 0)
681Title_3.ZIndex = 3
682Title_3.Font = Enum.Font.SourceSans
683Title_3.Text = " Confirm"
684Title_3.TextColor3 = Color3.fromRGB(255, 255, 255)
685Title_3.TextSize = 14
686Title_3.TextXAlignment = Enum.TextXAlignment.Left
687
688MainWindow_2.Name = "MainWindow"
689MainWindow_2.Parent = Confirmation
690MainWindow_2.BackgroundColor3 = Color3.fromRGB(55, 55, 55)
691MainWindow_2.BackgroundTransparency = 0.1
692MainWindow_2.BorderColor3 = Color3.fromRGB(40, 40, 40)
693MainWindow_2.Size = UDim2.new(1, 0, 0, 150)
694MainWindow_2.ZIndex = 2
695
696Yes.Name = "Yes"
697Yes.Parent = MainWindow_2
698Yes.BackgroundColor3 = Color3.fromRGB(55, 55, 55)
699Yes.BackgroundTransparency = 0.5
700Yes.BorderColor3 = Color3.fromRGB(0, 0, 0)
701Yes.Position = UDim2.new(0.075, 0, 1, -40)
702Yes.Size = UDim2.new(0.4, 0, 0, 30)
703Yes.ZIndex = 2
704Yes.Font = Enum.Font.SourceSans
705Yes.Text = "Yes"
706Yes.TextColor3 = Color3.fromRGB(255, 255, 255)
707Yes.TextSize = 18
708
709Desc_2.Name = "Desc"
710Desc_2.Parent = MainWindow_2
711Desc_2.BackgroundColor3 = Color3.fromRGB(55, 55, 55)
712Desc_2.BackgroundTransparency = 1
713Desc_2.Position = UDim2.new(0, 0, 0, 20)
714Desc_2.Size = UDim2.new(1, 0, 0, 40)
715Desc_2.ZIndex = 2
716Desc_2.Font = Enum.Font.SourceSans
717Desc_2.Text = "The file, FILENAME, already exists. Overwrite?"
718Desc_2.TextColor3 = Color3.fromRGB(255, 255, 255)
719Desc_2.TextSize = 14
720Desc_2.TextWrapped = true
721
722No.Name = "No"
723No.Parent = MainWindow_2
724No.BackgroundColor3 = Color3.fromRGB(55, 55, 55)
725No.BackgroundTransparency = 0.5
726No.BorderColor3 = Color3.fromRGB(0, 0, 0)
727No.Position = UDim2.new(0.524, 0, 1, -40)
728No.Size = UDim2.new(0.4, 0, 0, 30)
729No.ZIndex = 2
730No.Font = Enum.Font.SourceSans
731No.Text = "No"
732No.TextColor3 = Color3.fromRGB(255, 255, 255)
733No.TextSize = 18
734
735Caution.Name = "Caution"
736Caution.Parent = ROBLOX
737Caution.Active = true
738Caution.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
739Caution.BorderColor3 = Color3.fromRGB(30, 30, 30)
740Caution.Draggable = true
741Caution.Position = UDim2.new(0.3, 0, 0.3, 0)
742Caution.Size = UDim2.new(0, 350, 0, 20)
743Caution.Visible = false
744Caution.ZIndex = 5
745
746Title_4.Name = "Title"
747Title_4.Parent = Caution
748Title_4.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
749Title_4.BackgroundTransparency = 1
750Title_4.Size = UDim2.new(1, 0, 1, 0)
751Title_4.ZIndex = 5
752Title_4.Font = Enum.Font.SourceSans
753Title_4.Text = " Caution"
754Title_4.TextColor3 = Color3.fromRGB(255, 255, 255)
755Title_4.TextSize = 14
756Title_4.TextStrokeColor3 = Color3.fromRGB(30, 30, 30)
757Title_4.TextXAlignment = Enum.TextXAlignment.Left
758
759MainWindow_3.Name = "MainWindow"
760MainWindow_3.Parent = Caution
761MainWindow_3.BackgroundColor3 = Color3.fromRGB(55, 55, 55)
762MainWindow_3.BackgroundTransparency = 0.1
763MainWindow_3.BorderColor3 = Color3.fromRGB(40, 40, 40)
764MainWindow_3.Size = UDim2.new(1, 0, 0, 150)
765MainWindow_3.ZIndex = 4
766
767Desc_3.Name = "Desc"
768Desc_3.Parent = MainWindow_3
769Desc_3.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
770Desc_3.BackgroundTransparency = 1
771Desc_3.Position = UDim2.new(0, 0, 0, 20)
772Desc_3.Size = UDim2.new(1, 0, 0, 42)
773Desc_3.ZIndex = 4
774Desc_3.Font = Enum.Font.SourceSans
775Desc_3.Text = "The file, FILENAME, already exists. Overwrite?"
776Desc_3.TextColor3 = Color3.fromRGB(255, 255, 255)
777Desc_3.TextSize = 14
778Desc_3.TextStrokeColor3 = Color3.fromRGB(30, 30, 30)
779Desc_3.TextWrapped = true
780
781Ok.Name = "Ok"
782Ok.Parent = MainWindow_3
783Ok.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
784Ok.BackgroundTransparency = 0.5
785Ok.BorderColor3 = Color3.fromRGB(0, 0, 0)
786Ok.Position = UDim2.new(0.3, 0, 1, -40)
787Ok.Size = UDim2.new(0.4, 0, 0, 30)
788Ok.ZIndex = 4
789Ok.Font = Enum.Font.SourceSans
790Ok.Text = "Ok"
791Ok.TextColor3 = Color3.fromRGB(255, 255, 255)
792Ok.TextSize = 18
793Ok.TextStrokeColor3 = Color3.fromRGB(30, 30, 30)
794
795CallRemote.Name = "CallRemote"
796CallRemote.Parent = ROBLOX
797CallRemote.Active = true
798CallRemote.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
799CallRemote.BorderColor3 = Color3.fromRGB(40, 40, 40)
800CallRemote.Draggable = true
801CallRemote.Position = UDim2.new(0.3, 0, 0.3, 0)
802CallRemote.Size = UDim2.new(0, 350, 0, 20)
803CallRemote.Visible = false
804CallRemote.ZIndex = 2
805
806Title_5.Name = "Title"
807Title_5.Parent = CallRemote
808Title_5.BackgroundTransparency = 1
809Title_5.Size = UDim2.new(1, 0, 1, 0)
810Title_5.ZIndex = 2
811Title_5.Font = Enum.Font.SourceSans
812Title_5.Text = "Call Remote"
813Title_5.TextColor3 = Color3.fromRGB(255, 255, 255)
814Title_5.TextSize = 14
815Title_5.TextXAlignment = Enum.TextXAlignment.Left
816
817MainWindow_4.Name = "MainWindow"
818MainWindow_4.Parent = CallRemote
819MainWindow_4.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
820MainWindow_4.BackgroundTransparency = 0.1
821MainWindow_4.BorderColor3 = Color3.fromRGB(40, 40, 40)
822MainWindow_4.Size = UDim2.new(1, 0, 0, 200)
823
824Desc_4.Name = "Desc"
825Desc_4.Parent = MainWindow_4
826Desc_4.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
827Desc_4.BackgroundTransparency = 1
828Desc_4.BorderColor3 = Color3.fromRGB(30, 30, 30)
829Desc_4.Position = UDim2.new(0, 0, 0, 20)
830Desc_4.Size = UDim2.new(1, 0, 0, 20)
831Desc_4.Font = Enum.Font.SourceSans
832Desc_4.Text = "Arguments"
833Desc_4.TextColor3 = Color3.fromRGB(255, 255, 255)
834Desc_4.TextSize = 14
835Desc_4.TextWrapped = true
836
837Arguments.Name = "Arguments"
838Arguments.Parent = MainWindow_4
839Arguments.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
840Arguments.BackgroundTransparency = 1
841Arguments.BorderColor3 = Color3.fromRGB(30, 30, 30)
842Arguments.Position = UDim2.new(0, 0, 0, 40)
843Arguments.Size = UDim2.new(1, 0, 0, 80)
844Arguments.BottomImage = "rbxasset://textures/blackBkg_square.png"
845Arguments.CanvasSize = UDim2.new(0, 0, 0, 0)
846Arguments.MidImage = "rbxasset://textures/blackBkg_square.png"
847Arguments.TopImage = "rbxasset://textures/blackBkg_square.png"
848
849DisplayReturned.Name = "DisplayReturned"
850DisplayReturned.Parent = MainWindow_4
851DisplayReturned.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
852DisplayReturned.BackgroundTransparency = 0.6
853DisplayReturned.BorderColor3 = Color3.fromRGB(30, 30, 30)
854DisplayReturned.Position = UDim2.new(0.075, 0, 0.625, 0)
855DisplayReturned.Size = UDim2.new(0, 20, 0, 20)
856DisplayReturned.ZIndex = 2
857DisplayReturned.Font = Enum.Font.SourceSans
858DisplayReturned.Text = ""
859DisplayReturned.TextColor3 = Color3.fromRGB(255, 255, 255)
860DisplayReturned.TextSize = 18
861
862enabled_2.Name = "enabled"
863enabled_2.Parent = DisplayReturned
864enabled_2.BackgroundColor3 = Color3.fromRGB(96, 96, 96)
865enabled_2.BackgroundTransparency = 0.4
866enabled_2.BorderSizePixel = 0
867enabled_2.Position = UDim2.new(0, 3, 0, 3)
868enabled_2.Size = UDim2.new(0, 14, 0, 14)
869enabled_2.Visible = false
870enabled_2.Font = Enum.Font.SourceSans
871enabled_2.Text = ""
872enabled_2.TextSize = 14
873
874Desc2_2.Name = "Desc2"
875Desc2_2.Parent = MainWindow_4
876Desc2_2.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
877Desc2_2.BackgroundTransparency = 1
878Desc2_2.BorderColor3 = Color3.fromRGB(30, 30, 30)
879Desc2_2.Position = UDim2.new(0.075, 30, 0.625, 0)
880Desc2_2.Size = UDim2.new(0.925, -30, 0, 20)
881Desc2_2.Font = Enum.Font.SourceSans
882Desc2_2.Text = "Display values returned"
883Desc2_2.TextColor3 = Color3.fromRGB(255, 255, 255)
884Desc2_2.TextSize = 14
885Desc2_2.TextXAlignment = Enum.TextXAlignment.Left
886
887Add.Name = "Add"
888Add.Parent = MainWindow_4
889Add.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
890Add.BackgroundTransparency = 0.5
891Add.BorderColor3 = Color3.fromRGB(30, 30, 30)
892Add.Position = UDim2.new(0.8, 0, 0.625, 0)
893Add.Size = UDim2.new(0, 20, 0, 20)
894Add.Font = Enum.Font.SourceSansBold
895Add.Text = "+"
896Add.TextColor3 = Color3.fromRGB(255, 255, 255)
897Add.TextSize = 24
898
899Subtract.Name = "Subtract"
900Subtract.Parent = MainWindow_4
901Subtract.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
902Subtract.BackgroundTransparency = 0.5
903Subtract.BorderColor3 = Color3.fromRGB(30, 30, 30)
904Subtract.Position = UDim2.new(0.899, 0, 0.625, 0)
905Subtract.Size = UDim2.new(0, 20, 0, 20)
906Subtract.Font = Enum.Font.SourceSansBold
907Subtract.Text = "-"
908Subtract.TextColor3 = Color3.fromRGB(255, 255, 255)
909Subtract.TextSize = 24
910
911ArgumentTemplate.Name = "ArgumentTemplate"
912ArgumentTemplate.Parent = MainWindow_4
913ArgumentTemplate.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
914ArgumentTemplate.BackgroundTransparency = 0.5
915ArgumentTemplate.BorderColor3 = Color3.fromRGB(40, 40, 40)
916ArgumentTemplate.Size = UDim2.new(1, 0, 0, 20)
917ArgumentTemplate.Visible = false
918
919Type.Name = "Type"
920Type.Parent = ArgumentTemplate
921Type.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
922Type.BackgroundTransparency = 0.899
923Type.BorderColor3 = Color3.fromRGB(30, 30, 30)
924Type.Size = UDim2.new(0.4, 0, 0, 20)
925Type.Font = Enum.Font.SourceSans
926Type.Text = "Script"
927Type.TextSize = 18
928
929Value.Name = "Value"
930Value.Parent = ArgumentTemplate
931Value.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
932Value.BackgroundTransparency = 0.899
933Value.BorderColor3 = Color3.fromRGB(30, 30, 30)
934Value.Position = UDim2.new(0.4, 0, 0, 0)
935Value.Size = UDim2.new(0.6, -12, 0, 20)
936Value.Font = Enum.Font.SourceSans
937Value.Text = ""
938Value.TextSize = 14
939Value.TextXAlignment = Enum.TextXAlignment.Left
940
941Cancel_2.Name = "Cancel"
942Cancel_2.Parent = MainWindow_4
943Cancel_2.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
944Cancel_2.BackgroundTransparency = 0.5
945Cancel_2.BorderColor3 = Color3.fromRGB(30, 30, 30)
946Cancel_2.Size = UDim2.new(0.4, 0, 0, 30)
947Cancel_2.Font = Enum.Font.SourceSans
948Cancel_2.Text = "Cancel"
949Cancel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
950Cancel_2.TextSize = 18
951
952Ok_2.Name = "Ok"
953Ok_2.Parent = MainWindow_4
954Ok_2.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
955Ok_2.BackgroundTransparency = 0.5
956Ok_2.BorderColor3 = Color3.fromRGB(30, 30, 30)
957Ok_2.Position = UDim2.new(0.075, 0, 1, -40)
958Ok_2.Size = UDim2.new(0.4, 0, 0, 30)
959Ok_2.Font = Enum.Font.SourceSans
960Ok_2.Text = "Call"
961Ok_2.TextColor3 = Color3.fromRGB(255, 255, 255)
962Ok_2.TextSize = 18
963
964TableCaution.Name = "TableCaution"
965TableCaution.Parent = ROBLOX
966TableCaution.Active = true
967TableCaution.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
968TableCaution.BorderColor3 = Color3.fromRGB(43, 43, 43)
969TableCaution.Draggable = true
970TableCaution.Position = UDim2.new(0.3, 0, 0.3, 0)
971TableCaution.Size = UDim2.new(0, 350, 0, 20)
972TableCaution.Visible = false
973TableCaution.ZIndex = 2
974
975MainWindow_5.Name = "MainWindow"
976MainWindow_5.Parent = TableCaution
977MainWindow_5.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
978MainWindow_5.BackgroundTransparency = 0.1
979MainWindow_5.BorderColor3 = Color3.fromRGB(43, 43, 43)
980MainWindow_5.Size = UDim2.new(1, 0, 0, 150)
981
982Ok_3.Name = "Ok"
983Ok_3.Parent = MainWindow_5
984Ok_3.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
985Ok_3.BackgroundTransparency = 0.5
986Ok_3.BorderColor3 = Color3.fromRGB(30, 30, 30)
987Ok_3.Position = UDim2.new(0.3, 0, 1, -40)
988Ok_3.Size = UDim2.new(0.4, 0, 0, 30)
989Ok_3.Font = Enum.Font.SourceSans
990Ok_3.Text = "Ok"
991Ok_3.TextColor3 = Color3.fromRGB(255, 255, 255)
992Ok_3.TextSize = 18
993
994TableResults.Name = "TableResults"
995TableResults.Parent = MainWindow_5
996TableResults.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
997TableResults.BackgroundTransparency = 1
998TableResults.Position = UDim2.new(0, 0, 0, 20)
999TableResults.Size = UDim2.new(1, 0, 0, 80)
1000TableResults.BottomImage = "rbxasset://textures/blackBkg_square.png"
1001TableResults.CanvasSize = UDim2.new(0, 0, 0, 0)
1002TableResults.MidImage = "rbxasset://textures/blackBkg_square.png"
1003TableResults.TopImage = "rbxasset://textures/blackBkg_square.png"
1004
1005TableTemplate.Name = "TableTemplate"
1006TableTemplate.Parent = MainWindow_5
1007TableTemplate.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1008TableTemplate.BackgroundTransparency = 0.5
1009TableTemplate.BorderColor3 = Color3.fromRGB(191, 191, 191)
1010TableTemplate.Size = UDim2.new(1, 0, 0, 20)
1011TableTemplate.Visible = false
1012
1013Type_2.Name = "Type"
1014Type_2.Parent = TableTemplate
1015Type_2.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1016Type_2.BackgroundTransparency = 0.899
1017Type_2.BorderColor3 = Color3.fromRGB(30, 30, 30)
1018Type_2.Size = UDim2.new(0.4, 0, 0, 20)
1019Type_2.Font = Enum.Font.SourceSans
1020Type_2.Text = "Script"
1021Type_2.TextColor3 = Color3.fromRGB(255, 255, 255)
1022Type_2.TextSize = 18
1023
1024Value_2.Name = "Value"
1025Value_2.Parent = TableTemplate
1026Value_2.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1027Value_2.BackgroundTransparency = 0.899
1028Value_2.BorderColor3 = Color3.fromRGB(30, 30, 30)
1029Value_2.Position = UDim2.new(0.4, 0, 0, 0)
1030Value_2.Size = UDim2.new(0.6, -12, 0, 20)
1031Value_2.Font = Enum.Font.SourceSans
1032Value_2.Text = "Script"
1033Value_2.TextColor3 = Color3.fromRGB(255, 255, 255)
1034Value_2.TextSize = 14
1035
1036Title_6.Name = "Title"
1037Title_6.Parent = TableCaution
1038Title_6.BackgroundTransparency = 1
1039Title_6.Size = UDim2.new(1, 0, 1, 0)
1040Title_6.ZIndex = 2
1041Title_6.Font = Enum.Font.SourceSans
1042Title_6.Text = "Caution"
1043Title_6.TextColor3 = Color3.fromRGB(255, 255, 255)
1044Title_6.TextSize = 14
1045Title_6.TextXAlignment = Enum.TextXAlignment.Left
1046
1047ScriptEditor.Name = "ScriptEditor"
1048ScriptEditor.Parent = ROBLOX
1049ScriptEditor.Active = true
1050ScriptEditor.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1051ScriptEditor.BorderColor3 = Color3.fromRGB(30, 30, 30)
1052ScriptEditor.Draggable = true
1053ScriptEditor.Position = UDim2.new(0.3, 0, 0.3, 0)
1054ScriptEditor.Size = UDim2.new(0, 916, 0, 20)
1055ScriptEditor.Visible = false
1056ScriptEditor.ZIndex = 5
1057
1058Title_7.Name = "Title"
1059Title_7.Parent = ScriptEditor
1060Title_7.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1061Title_7.BackgroundTransparency = 1
1062Title_7.Size = UDim2.new(1, 0, 1, 0)
1063Title_7.ZIndex = 5
1064Title_7.Font = Enum.Font.SourceSans
1065Title_7.Text = "Script Viewer"
1066Title_7.TextColor3 = Color3.fromRGB(255, 255, 255)
1067Title_7.TextSize = 14
1068Title_7.TextXAlignment = Enum.TextXAlignment.Left
1069
1070Cover.Name = "Cover"
1071Cover.Parent = ScriptEditor
1072Cover.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
1073Cover.BorderColor3 = Color3.fromRGB(30, 30, 30)
1074Cover.Position = UDim2.new(0, 0, 3, 0)
1075Cover.Size = UDim2.new(0, 916, 0, 416)
1076
1077EditorGrid.Name = "EditorGrid"
1078EditorGrid.Parent = ScriptEditor
1079EditorGrid.Active = true
1080EditorGrid.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1081EditorGrid.BorderColor3 = Color3.fromRGB(30, 30, 30)
1082EditorGrid.Position = UDim2.new(0, 0, 3, 0)
1083EditorGrid.Size = UDim2.new(1, -16, 0, 400)
1084
1085TopBar.Name = "TopBar"
1086TopBar.Parent = ScriptEditor
1087TopBar.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
1088TopBar.BorderColor3 = Color3.fromRGB(30, 30, 30)
1089TopBar.Size = UDim2.new(1, 0, 3, 0)
1090
1091ScriptBarLeft.Name = "ScriptBarLeft"
1092ScriptBarLeft.Parent = TopBar
1093ScriptBarLeft.Active = false
1094ScriptBarLeft.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1095ScriptBarLeft.BorderColor3 = Color3.fromRGB(30, 30, 30)
1096ScriptBarLeft.Position = UDim2.new(1, -32, 0, 40)
1097ScriptBarLeft.Size = UDim2.new(0, 16, 0, 20)
1098ScriptBarLeft.AutoButtonColor = false
1099
1100ArrowGraphic.Name = "Arrow Graphic"
1101ArrowGraphic.Parent = ScriptBarLeft
1102ArrowGraphic.BackgroundTransparency = 1
1103ArrowGraphic.BorderSizePixel = 0
1104ArrowGraphic.Position = UDim2.new(0.5, -4, 0.5, -4)
1105ArrowGraphic.Size = UDim2.new(0, 8, 0, 8)
1106
1107Graphic.Name = "Graphic"
1108Graphic.Parent = ArrowGraphic
1109Graphic.BackgroundColor3 = Color3.fromRGB(149, 149, 149)
1110Graphic.BackgroundTransparency = 0.699
1111Graphic.BorderSizePixel = 0
1112Graphic.Position = UDim2.new(0.25, 0, 0.375, 0)
1113Graphic.Size = UDim2.new(0.125, 0, 0.25, 0)
1114
1115Graphic_2.Name = "Graphic"
1116Graphic_2.Parent = ArrowGraphic
1117Graphic_2.BackgroundColor3 = Color3.fromRGB(149, 149, 149)
1118Graphic_2.BackgroundTransparency = 0.699
1119Graphic_2.BorderSizePixel = 0
1120Graphic_2.Position = UDim2.new(0.375, 0, 0.25, 0)
1121Graphic_2.Size = UDim2.new(0.125, 0, 0.5, 0)
1122
1123Graphic_3.Name = "Graphic"
1124Graphic_3.Parent = ArrowGraphic
1125Graphic_3.BackgroundColor3 = Color3.fromRGB(149, 149, 149)
1126Graphic_3.BackgroundTransparency = 0.699
1127Graphic_3.BorderSizePixel = 0
1128Graphic_3.Position = UDim2.new(0.5, 0, 0.125, 0)
1129Graphic_3.Size = UDim2.new(0.125, 0, 0.75, 0)
1130
1131Graphic_4.Name = "Graphic"
1132Graphic_4.Parent = ArrowGraphic
1133Graphic_4.BackgroundColor3 = Color3.fromRGB(149, 149, 149)
1134Graphic_4.BackgroundTransparency = 0.699
1135Graphic_4.BorderSizePixel = 0
1136Graphic_4.Position = UDim2.new(0.625, 0, 0, 0)
1137Graphic_4.Size = UDim2.new(0.125, 0, 1, 0)
1138
1139ScriptBarRight.Name = "ScriptBarRight"
1140ScriptBarRight.Parent = TopBar
1141ScriptBarRight.Active = false
1142ScriptBarRight.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1143ScriptBarRight.BorderColor3 = Color3.fromRGB(30, 30, 30)
1144ScriptBarRight.Position = UDim2.new(1, -16, 0, 40)
1145ScriptBarRight.Size = UDim2.new(0, 16, 0, 20)
1146ScriptBarRight.AutoButtonColor = false
1147
1148ArrowGraphic_2.Name = "Arrow Graphic"
1149ArrowGraphic_2.Parent = ScriptBarRight
1150ArrowGraphic_2.BackgroundTransparency = 1
1151ArrowGraphic_2.BorderSizePixel = 0
1152ArrowGraphic_2.Position = UDim2.new(0.5, -4, 0.5, -4)
1153ArrowGraphic_2.Size = UDim2.new(0, 8, 0, 8)
1154
1155Graphic_5.Name = "Graphic"
1156Graphic_5.Parent = ArrowGraphic_2
1157Graphic_5.BackgroundColor3 = Color3.fromRGB(149, 149, 149)
1158Graphic_5.BackgroundTransparency = 0.699
1159Graphic_5.BorderSizePixel = 0
1160Graphic_5.Position = UDim2.new(0.625, 0, 0.375, 0)
1161Graphic_5.Size = UDim2.new(0.125, 0, 0.25, 0)
1162
1163Graphic_6.Name = "Graphic"
1164Graphic_6.Parent = ArrowGraphic_2
1165Graphic_6.BackgroundColor3 = Color3.fromRGB(149, 149, 149)
1166Graphic_6.BackgroundTransparency = 0.699
1167Graphic_6.BorderSizePixel = 0
1168Graphic_6.Position = UDim2.new(0.5, 0, 0.25, 0)
1169Graphic_6.Size = UDim2.new(0.125, 0, 0.5, 0)
1170
1171Graphic_7.Name = "Graphic"
1172Graphic_7.Parent = ArrowGraphic_2
1173Graphic_7.BackgroundColor3 = Color3.fromRGB(149, 149, 149)
1174Graphic_7.BackgroundTransparency = 0.699
1175Graphic_7.BorderSizePixel = 0
1176Graphic_7.Position = UDim2.new(0.375, 0, 0.125, 0)
1177Graphic_7.Size = UDim2.new(0.125, 0, 0.75, 0)
1178
1179Graphic_8.Name = "Graphic"
1180Graphic_8.Parent = ArrowGraphic_2
1181Graphic_8.BackgroundColor3 = Color3.fromRGB(149, 149, 149)
1182Graphic_8.BackgroundTransparency = 0.699
1183Graphic_8.BorderSizePixel = 0
1184Graphic_8.Position = UDim2.new(0.25, 0, 0, 0)
1185Graphic_8.Size = UDim2.new(0.125, 0, 1, 0)
1186
1187Clipboard.Name = "Clipboard"
1188Clipboard.Parent = TopBar
1189Clipboard.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1190Clipboard.BackgroundTransparency = 0.5
1191Clipboard.BorderColor3 = Color3.fromRGB(0, 0, 0)
1192Clipboard.Position = UDim2.new(0, 0, 0, 20)
1193Clipboard.Size = UDim2.new(0, 80, 0, 20)
1194Clipboard.AutoButtonColor = false
1195Clipboard.Font = Enum.Font.SourceSans
1196Clipboard.Text = "To Clipboard"
1197Clipboard.TextColor3 = Color3.fromRGB(255, 255, 255)
1198Clipboard.TextSize = 14
1199
1200SaveScript.Name = "SaveScript"
1201SaveScript.Parent = TopBar
1202SaveScript.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1203SaveScript.BackgroundTransparency = 0.5
1204SaveScript.BorderColor3 = Color3.fromRGB(0, 0, 0)
1205SaveScript.Position = UDim2.new(0, 80, 0, 20)
1206SaveScript.Size = UDim2.new(0, 80, 0, 20)
1207SaveScript.AutoButtonColor = false
1208SaveScript.Font = Enum.Font.SourceSans
1209SaveScript.Text = "Save Script"
1210SaveScript.TextColor3 = Color3.fromRGB(255, 255, 255)
1211SaveScript.TextSize = 14
1212
1213ScriptBar.Name = "ScriptBar"
1214ScriptBar.Parent = TopBar
1215ScriptBar.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
1216ScriptBar.BorderColor3 = Color3.fromRGB(30, 30, 30)
1217ScriptBar.ClipsDescendants = true
1218ScriptBar.Position = UDim2.new(0, 0, 0, 40)
1219ScriptBar.Size = UDim2.new(1, -32, 0, 20)
1220
1221Entry.Name = "Entry"
1222Entry.Parent = TopBar
1223Entry.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
1224Entry.BackgroundTransparency = 1
1225Entry.Size = UDim2.new(0, 100, 1, 0)
1226Entry.Visible = false
1227
1228Button.Name = "Button"
1229Button.Parent = Entry
1230Button.BackgroundColor3 = Color3.fromRGB(90, 90, 90)
1231Button.BackgroundTransparency = .6
1232Button.BorderColor3 = Color3.fromRGB(0, 0, 0)
1233Button.ClipsDescendants = true
1234Button.Size = UDim2.new(1, 0, 1, 0)
1235Button.ZIndex = 4
1236Button.Font = Enum.Font.SourceSans
1237Button.Text = ""
1238Button.TextSize = 12
1239Button.TextColor3 = Color3.fromRGB(255, 255, 255);
1240Button.TextXAlignment = Enum.TextXAlignment.Left
1241
1242Close.Name = "Close"
1243Close.Parent = Entry
1244Close.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
1245Close.BackgroundTransparency = 1
1246Close.BorderColor3 = Color3.fromRGB(0, 0, 0)
1247Close.Position = UDim2.new(1, -20, 0, 0)
1248Close.Size = UDim2.new(0, 20, 0, 20)
1249Close.ZIndex = 4
1250Close.Font = Enum.Font.SourceSans
1251Close.Text = "X"
1252Close.TextSize = 14
1253Close.TextColor3 = Color3.fromRGB(255, 255, 255)
1254
1255Close_2.Name = "Close"
1256Close_2.Parent = ScriptEditor
1257Close_2.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1258Close_2.BackgroundTransparency = 1
1259Close_2.BorderColor3 = Color3.fromRGB(0, 0, 0)
1260Close_2.Position = UDim2.new(1, -20, 0, 0)
1261Close_2.Size = UDim2.new(0, 20, 0, 20)
1262Close_2.ZIndex = 5
1263Close_2.Font = Enum.Font.SourceSans
1264Close_2.Text = "X"
1265Close_2.TextColor3 = Color3.fromRGB(255, 255, 255)
1266Close_2.TextSize = 14
1267
1268IntroFrame.Name = "IntroFrame"
1269IntroFrame.Parent = ROBLOX
1270IntroFrame.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1271IntroFrame.BorderSizePixel = 0
1272IntroFrame.Position = UDim2.new(1, 30, 0, 0)
1273IntroFrame.Size = UDim2.new(0, 300, 1, 0)
1274IntroFrame.ZIndex = 2
1275
1276Main_2.Name = "Main"
1277Main_2.Parent = IntroFrame
1278Main_2.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1279Main_2.BorderSizePixel = 0
1280Main_2.Position = UDim2.new(0, -30, 0, 0)
1281Main_2.Size = UDim2.new(0, 30, 0, 90)
1282Main_2.ZIndex = 4
1283
1284ImageLabel.Parent = Main_2
1285ImageLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
1286ImageLabel.BackgroundTransparency = 1
1287ImageLabel.BorderSizePixel = 0
1288ImageLabel.Size = UDim2.new(1, 0, 1, 0)
1289ImageLabel.ZIndex = 5
1290ImageLabel.Image = "rbxassetid://969742484"
1291ImageLabel.ScaleType = Enum.ScaleType.Tile
1292ImageLabel.TileSize = UDim2.new(25, 0, 6, 0)
1293
1294Title_8.Name = "Title"
1295Title_8.Parent = IntroFrame
1296Title_8.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
1297Title_8.BackgroundTransparency = 1
1298Title_8.Position = UDim2.new(0, 100, 0, 150)
1299Title_8.Size = UDim2.new(0, 100, 0, 60)
1300Title_8.ZIndex = 4
1301Title_8.Font = Enum.Font.SourceSansBold
1302Title_8.Text = "DEX"
1303Title_8.TextColor3 = Color3.fromRGB(255, 255, 255)
1304Title_8.TextSize = 60
1305Title_8.TextWrapped = true
1306
1307Version_2.Name = "Version"
1308Version_2.Parent = IntroFrame
1309Version_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
1310Version_2.BackgroundTransparency = 1
1311Version_2.Position = UDim2.new(0, 100, 0, 210)
1312Version_2.Size = UDim2.new(0, 100, 0, 30)
1313Version_2.ZIndex = 4
1314Version_2.Font = Enum.Font.SourceSansBold
1315Version_2.Text = "V2.0.0"
1316Version_2.TextColor3 = Color3.fromRGB(255, 255, 255)
1317Version_2.TextSize = 28
1318Version_2.TextWrapped = true
1319
1320Creator.Name = "Creator"
1321Creator.Parent = IntroFrame
1322Creator.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
1323Creator.BackgroundTransparency = 1
1324Creator.Position = UDim2.new(0, 80, 0, 300)
1325Creator.Size = UDim2.new(0, 140, 0, 30)
1326Creator.ZIndex = 4
1327Creator.Font = Enum.Font.SourceSansBold
1328Creator.Text = ""
1329Creator.TextColor3 = Color3.fromRGB(255, 255, 255)
1330Creator.TextSize = 28
1331Creator.TextWrapped = true
1332
1333BG.Name = "BG"
1334BG.Parent = IntroFrame
1335BG.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
1336BG.BackgroundTransparency = 1
1337BG.BorderSizePixel = 0
1338BG.Size = UDim2.new(1, 0, 1, 0)
1339BG.ZIndex = 3
1340BG.Image = "rbxassetid://969742484"
1341BG.ScaleType = Enum.ScaleType.Tile
1342BG.TileSize = UDim2.new(4, 0, 1, 0)
1343
1344Slant_2.Name = "Slant"
1345Slant_2.Parent = IntroFrame
1346Slant_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
1347Slant_2.BackgroundTransparency = 1
1348Slant_2.BorderSizePixel = 0
1349Slant_2.ClipsDescendants = true
1350Slant_2.Position = UDim2.new(0, -27, 0, 86)
1351Slant_2.Rotation = 45
1352Slant_2.Size = UDim2.new(0, 60, 0, 30)
1353Slant_2.ZIndex = 3
1354
1355ImageLabel_2.Parent = Slant_2
1356ImageLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
1357ImageLabel_2.BackgroundTransparency = 1
1358ImageLabel_2.BorderSizePixel = 0
1359ImageLabel_2.Size = UDim2.new(1, 0, 1, 0)
1360ImageLabel_2.ZIndex = 2
1361ImageLabel_2.Image = "rbxassetid://969742484"
1362ImageLabel_2.ScaleType = Enum.ScaleType.Tile
1363ImageLabel_2.TileSize = UDim2.new(25, 0, 6, 0)
1364
1365SaveMapWindow.Name = "SaveMapWindow"
1366SaveMapWindow.Parent = ROBLOX
1367SaveMapWindow.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1368SaveMapWindow.BorderColor3 = Color3.fromRGB(191, 191, 191)
1369SaveMapWindow.BorderSizePixel = 0
1370SaveMapWindow.Position = UDim2.new(1, 0, 0, 1)
1371SaveMapWindow.Size = UDim2.new(0, 300, 1, 0)
1372
1373Header_3.Name = "Header"
1374Header_3.Parent = SaveMapWindow
1375Header_3.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1376Header_3.BorderColor3 = Color3.fromRGB(30, 30, 30)
1377Header_3.Size = UDim2.new(1, 0, 0, 17)
1378
1379TextLabel_3.Parent = Header_3
1380TextLabel_3.BackgroundTransparency = 1
1381TextLabel_3.Position = UDim2.new(0, 4, 0, 0)
1382TextLabel_3.Size = UDim2.new(1, -4, 1, 0)
1383TextLabel_3.Font = Enum.Font.SourceSans
1384TextLabel_3.Text = "Map Downloader"
1385TextLabel_3.TextColor3 = Color3.fromRGB(255, 255, 255)
1386TextLabel_3.TextSize = 14
1387TextLabel_3.TextXAlignment = Enum.TextXAlignment.Left
1388
1389MapSettings.Name = "MapSettings"
1390MapSettings.Parent = SaveMapWindow
1391MapSettings.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1392MapSettings.BackgroundTransparency = 1
1393MapSettings.BorderSizePixel = 0
1394MapSettings.Position = UDim2.new(0, 0, 0, 200)
1395MapSettings.Size = UDim2.new(1, 0, 0, 240)
1396
1397Terrain.Name = "Terrain"
1398Terrain.Parent = MapSettings
1399Terrain.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1400Terrain.BackgroundTransparency = 1
1401Terrain.BorderSizePixel = 0
1402Terrain.Position = UDim2.new(0, 0, 0, 60)
1403Terrain.Size = UDim2.new(1, 0, 0, 60)
1404
1405SName_2.Name = "SName"
1406SName_2.Parent = Terrain
1407SName_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
1408SName_2.BackgroundTransparency = 1
1409SName_2.BorderColor3 = Color3.fromRGB(40, 40, 40)
1410SName_2.Position = UDim2.new(0, 10, 0, 0)
1411SName_2.Size = UDim2.new(1, -20, 0, 30)
1412SName_2.Font = Enum.Font.SourceSans
1413SName_2.Text = "Save Terrain"
1414SName_2.TextColor3 = Color3.fromRGB(255, 255, 255)
1415SName_2.TextSize = 18
1416SName_2.TextXAlignment = Enum.TextXAlignment.Left
1417
1418Status_2.Name = "Status"
1419Status_2.Parent = Terrain
1420Status_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
1421Status_2.BackgroundTransparency = 1
1422Status_2.BorderColor3 = Color3.fromRGB(40, 40, 40)
1423Status_2.Position = UDim2.new(0, 60, 0, 30)
1424Status_2.Size = UDim2.new(0, 50, 0, 15)
1425Status_2.Font = Enum.Font.SourceSans
1426Status_2.Text = "Off"
1427Status_2.TextColor3 = Color3.fromRGB(255, 255, 255)
1428Status_2.TextSize = 18
1429Status_2.TextXAlignment = Enum.TextXAlignment.Left
1430
1431Change_2.Name = "Change"
1432Change_2.Parent = Terrain
1433Change_2.BackgroundColor3 = Color3.fromRGB(81, 81, 81)
1434Change_2.BorderColor3 = Color3.fromRGB(40, 40, 40)
1435Change_2.BorderSizePixel = 0
1436Change_2.Position = UDim2.new(0, 10, 0, 30)
1437Change_2.Size = UDim2.new(0, 40, 0, 15)
1438Change_2.Font = Enum.Font.SourceSans
1439Change_2.Text = ""
1440Change_2.TextColor3 = Color3.fromRGB(255, 255, 255)
1441Change_2.TextSize = 14
1442
1443OnBar_2.Name = "OnBar"
1444OnBar_2.Parent = Change_2
1445OnBar_2.BackgroundColor3 = Color3.fromRGB(209, 125, 0)
1446OnBar_2.BorderSizePixel = 0
1447OnBar_2.Size = UDim2.new(0, 0, 0, 15)
1448OnBar_2.Font = Enum.Font.SourceSans
1449OnBar_2.Text = ""
1450OnBar_2.TextSize = 14
1451
1452Bar_2.Name = "Bar"
1453Bar_2.Parent = Change_2
1454Bar_2.BackgroundColor3 = Color3.fromRGB(255, 153, 0)
1455Bar_2.BorderSizePixel = 0
1456Bar_2.ClipsDescendants = true
1457Bar_2.Position = UDim2.new(0, -2, 0, -2)
1458Bar_2.Size = UDim2.new(0, 10, 0, 19)
1459Bar_2.Font = Enum.Font.SourceSans
1460Bar_2.Text = ""
1461Bar_2.TextSize = 14
1462
1463Lighting.Name = "Lighting"
1464Lighting.Parent = MapSettings
1465Lighting.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1466Lighting.BackgroundTransparency = 1
1467Lighting.BorderSizePixel = 0
1468Lighting.Position = UDim2.new(0, 0, 0, 120)
1469Lighting.Size = UDim2.new(1, 0, 0, 60)
1470
1471SName_3.Name = "SName"
1472SName_3.Parent = Lighting
1473SName_3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
1474SName_3.BackgroundTransparency = 1
1475SName_3.BorderColor3 = Color3.fromRGB(40, 40, 40)
1476SName_3.Position = UDim2.new(0, 10, 0, 0)
1477SName_3.Size = UDim2.new(1, -20, 0, 30)
1478SName_3.Font = Enum.Font.SourceSans
1479SName_3.Text = "Lighting Properties"
1480SName_3.TextColor3 = Color3.fromRGB(255, 255, 255)
1481SName_3.TextSize = 18
1482SName_3.TextXAlignment = Enum.TextXAlignment.Left
1483
1484Status_3.Name = "Status"
1485Status_3.Parent = Lighting
1486Status_3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
1487Status_3.BackgroundTransparency = 1
1488Status_3.BorderColor3 = Color3.fromRGB(40, 40, 40)
1489Status_3.Position = UDim2.new(0, 60, 0, 30)
1490Status_3.Size = UDim2.new(0, 50, 0, 15)
1491Status_3.Font = Enum.Font.SourceSans
1492Status_3.Text = "Off"
1493Status_3.TextColor3 = Color3.fromRGB(255, 255, 255)
1494Status_3.TextSize = 18
1495Status_3.TextXAlignment = Enum.TextXAlignment.Left
1496
1497Change_3.Name = "Change"
1498Change_3.Parent = Lighting
1499Change_3.BackgroundColor3 = Color3.fromRGB(81, 81, 81)
1500Change_3.BorderColor3 = Color3.fromRGB(40, 40, 40)
1501Change_3.BorderSizePixel = 0
1502Change_3.Position = UDim2.new(0, 10, 0, 30)
1503Change_3.Size = UDim2.new(0, 40, 0, 15)
1504Change_3.Font = Enum.Font.SourceSans
1505Change_3.Text = ""
1506Change_3.TextColor3 = Color3.fromRGB(255, 255, 255)
1507Change_3.TextSize = 14
1508
1509OnBar_3.Name = "OnBar"
1510OnBar_3.Parent = Change_3
1511OnBar_3.BackgroundColor3 = Color3.fromRGB(209, 125, 0)
1512OnBar_3.BorderSizePixel = 0
1513OnBar_3.Size = UDim2.new(0, 0, 0, 15)
1514OnBar_3.Font = Enum.Font.SourceSans
1515OnBar_3.Text = ""
1516OnBar_3.TextSize = 14
1517
1518Bar_3.Name = "Bar"
1519Bar_3.Parent = Change_3
1520Bar_3.BackgroundColor3 = Color3.fromRGB(255, 153, 0)
1521Bar_3.BorderSizePixel = 0
1522Bar_3.ClipsDescendants = true
1523Bar_3.Position = UDim2.new(0, -2, 0, -2)
1524Bar_3.Size = UDim2.new(0, 10, 0, 19)
1525Bar_3.Font = Enum.Font.SourceSans
1526Bar_3.Text = ""
1527Bar_3.TextSize = 14
1528
1529CameraInstances.Name = "CameraInstances"
1530CameraInstances.Parent = MapSettings
1531CameraInstances.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1532CameraInstances.BackgroundTransparency = 1
1533CameraInstances.BorderSizePixel = 0
1534CameraInstances.Position = UDim2.new(0, 0, 0, 180)
1535CameraInstances.Size = UDim2.new(1, 0, 0, 60)
1536
1537SName_4.Name = "SName"
1538SName_4.Parent = CameraInstances
1539SName_4.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
1540SName_4.BackgroundTransparency = 1
1541SName_4.BorderColor3 = Color3.fromRGB(40, 40, 40)
1542SName_4.Position = UDim2.new(0, 10, 0, 0)
1543SName_4.Size = UDim2.new(1, -20, 0, 30)
1544SName_4.Font = Enum.Font.SourceSans
1545SName_4.Text = "Camera Instances"
1546SName_4.TextColor3 = Color3.fromRGB(255, 255, 255)
1547SName_4.TextSize = 18
1548SName_4.TextXAlignment = Enum.TextXAlignment.Left
1549
1550Status_4.Name = "Status"
1551Status_4.Parent = CameraInstances
1552Status_4.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
1553Status_4.BackgroundTransparency = 1
1554Status_4.BorderColor3 = Color3.fromRGB(40, 40, 40)
1555Status_4.Position = UDim2.new(0, 60, 0, 30)
1556Status_4.Size = UDim2.new(0, 50, 0, 15)
1557Status_4.Font = Enum.Font.SourceSans
1558Status_4.Text = "Off"
1559Status_4.TextColor3 = Color3.fromRGB(255, 255, 255)
1560Status_4.TextSize = 18
1561Status_4.TextXAlignment = Enum.TextXAlignment.Left
1562
1563Change_4.Name = "Change"
1564Change_4.Parent = CameraInstances
1565Change_4.BackgroundColor3 = Color3.fromRGB(81, 81, 81)
1566Change_4.BorderColor3 = Color3.fromRGB(40, 40, 40)
1567Change_4.BorderSizePixel = 0
1568Change_4.Position = UDim2.new(0, 10, 0, 30)
1569Change_4.Size = UDim2.new(0, 40, 0, 15)
1570Change_4.Font = Enum.Font.SourceSans
1571Change_4.Text = ""
1572Change_4.TextColor3 = Color3.fromRGB(255, 255, 255)
1573Change_4.TextSize = 14
1574
1575OnBar_4.Name = "OnBar"
1576OnBar_4.Parent = Change_4
1577OnBar_4.BackgroundColor3 = Color3.fromRGB(209, 125, 0)
1578OnBar_4.BorderSizePixel = 0
1579OnBar_4.Size = UDim2.new(0, 0, 0, 15)
1580OnBar_4.Font = Enum.Font.SourceSans
1581OnBar_4.Text = ""
1582OnBar_4.TextSize = 14
1583
1584Bar_4.Name = "Bar"
1585Bar_4.Parent = Change_4
1586Bar_4.BackgroundColor3 = Color3.fromRGB(255, 153, 0)
1587Bar_4.BorderSizePixel = 0
1588Bar_4.ClipsDescendants = true
1589Bar_4.Position = UDim2.new(0, -2, 0, -2)
1590Bar_4.Size = UDim2.new(0, 10, 0, 19)
1591Bar_4.Font = Enum.Font.SourceSans
1592Bar_4.Text = ""
1593Bar_4.TextSize = 14
1594
1595Scripts.Name = "Scripts"
1596Scripts.Parent = MapSettings
1597Scripts.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1598Scripts.BackgroundTransparency = 1
1599Scripts.BorderSizePixel = 0
1600Scripts.Size = UDim2.new(1, 0, 0, 60)
1601
1602SName_5.Name = "SName"
1603SName_5.Parent = Scripts
1604SName_5.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
1605SName_5.BackgroundTransparency = 1
1606SName_5.BorderColor3 = Color3.fromRGB(40, 40, 40)
1607SName_5.Position = UDim2.new(0, 10, 0, 0)
1608SName_5.Size = UDim2.new(1, -20, 0, 30)
1609SName_5.Font = Enum.Font.SourceSans
1610SName_5.Text = "Save Scripts"
1611SName_5.TextColor3 = Color3.fromRGB(255, 255, 255)
1612SName_5.TextSize = 18
1613SName_5.TextXAlignment = Enum.TextXAlignment.Left
1614
1615Status_5.Name = "Status"
1616Status_5.Parent = Scripts
1617Status_5.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
1618Status_5.BackgroundTransparency = 1
1619Status_5.BorderColor3 = Color3.fromRGB(40, 40, 40)
1620Status_5.Position = UDim2.new(0, 60, 0, 30)
1621Status_5.Size = UDim2.new(0, 50, 0, 15)
1622Status_5.Font = Enum.Font.SourceSans
1623Status_5.Text = "Off"
1624Status_5.TextColor3 = Color3.fromRGB(255, 255, 255)
1625Status_5.TextSize = 18
1626Status_5.TextXAlignment = Enum.TextXAlignment.Left
1627
1628Change_5.Name = "Change"
1629Change_5.Parent = Scripts
1630Change_5.BackgroundColor3 = Color3.fromRGB(81, 81, 81)
1631Change_5.BorderColor3 = Color3.fromRGB(40, 40, 40)
1632Change_5.BorderSizePixel = 0
1633Change_5.Position = UDim2.new(0, 10, 0, 30)
1634Change_5.Size = UDim2.new(0, 40, 0, 15)
1635Change_5.Font = Enum.Font.SourceSans
1636Change_5.Text = ""
1637Change_5.TextColor3 = Color3.fromRGB(255, 255, 255)
1638Change_5.TextSize = 14
1639
1640OnBar_5.Name = "OnBar"
1641OnBar_5.Parent = Change_5
1642OnBar_5.BackgroundColor3 = Color3.fromRGB(209, 125, 0)
1643OnBar_5.BorderSizePixel = 0
1644OnBar_5.Size = UDim2.new(0, 0, 0, 15)
1645OnBar_5.Font = Enum.Font.SourceSans
1646OnBar_5.Text = ""
1647OnBar_5.TextSize = 14
1648
1649Bar_5.Name = "Bar"
1650Bar_5.Parent = Change_5
1651Bar_5.BackgroundColor3 = Color3.fromRGB(255, 153, 0)
1652Bar_5.BorderSizePixel = 0
1653Bar_5.ClipsDescendants = true
1654Bar_5.Position = UDim2.new(0, -2, 0, -2)
1655Bar_5.Size = UDim2.new(0, 10, 0, 19)
1656Bar_5.Font = Enum.Font.SourceSans
1657Bar_5.Text = ""
1658Bar_5.TextSize = 14
1659
1660ToSave.Name = "ToSave"
1661ToSave.Parent = SaveMapWindow
1662ToSave.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1663ToSave.BackgroundTransparency = 1
1664ToSave.Position = UDim2.new(0, 0, 0, 17)
1665ToSave.Size = UDim2.new(1, 0, 0, 20)
1666ToSave.Font = Enum.Font.SourceSans
1667ToSave.Text = "To Save"
1668ToSave.TextColor3 = Color3.fromRGB(255, 255, 255)
1669ToSave.TextSize = 18
1670
1671CopyList.Name = "CopyList"
1672CopyList.Parent = SaveMapWindow
1673CopyList.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1674CopyList.BackgroundTransparency = 0.4
1675CopyList.BorderSizePixel = 0
1676CopyList.Position = UDim2.new(0, 0, 0, 37)
1677CopyList.Size = UDim2.new(1, 0, 0, 163)
1678
1679Bottom.Name = "Bottom"
1680Bottom.Parent = SaveMapWindow
1681Bottom.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
1682Bottom.BorderColor3 = Color3.fromRGB(30, 30, 30)
1683Bottom.BorderSizePixel = 0
1684Bottom.Position = UDim2.new(0, 0, 1, -50)
1685Bottom.Size = UDim2.new(1, 0, 0, 50)
1686
1687TextLabel_4.Parent = Bottom
1688TextLabel_4.BackgroundTransparency = 1
1689TextLabel_4.Position = UDim2.new(0, 4, 0, 0)
1690TextLabel_4.Size = UDim2.new(1, -4, 1, 0)
1691TextLabel_4.Font = Enum.Font.SourceSans
1692TextLabel_4.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."
1693TextLabel_4.TextColor3 = Color3.fromRGB(255, 255, 255)
1694TextLabel_4.TextSize = 14
1695TextLabel_4.TextWrapped = true
1696TextLabel_4.TextXAlignment = Enum.TextXAlignment.Left
1697TextLabel_4.TextYAlignment = Enum.TextYAlignment.Top
1698
1699Save_2.Name = "Save"
1700Save_2.Parent = SaveMapWindow
1701Save_2.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
1702Save_2.BackgroundTransparency = 0.4
1703Save_2.BorderColor3 = Color3.fromRGB(0, 0, 0)
1704Save_2.BorderSizePixel = 0
1705Save_2.Position = UDim2.new(0, 0, 1, -80)
1706Save_2.Size = UDim2.new(1, 0, 0, 30)
1707Save_2.Font = Enum.Font.SourceSans
1708Save_2.Text = "Save"
1709Save_2.TextColor3 = Color3.fromRGB(255, 255, 255)
1710Save_2.TextSize = 18
1711
1712FileName_2.Name = "FileName"
1713FileName_2.Parent = SaveMapWindow
1714FileName_2.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1715FileName_2.BackgroundTransparency = 0.4
1716FileName_2.BorderSizePixel = 0
1717FileName_2.Position = UDim2.new(0, 0, 1, -105)
1718FileName_2.Size = UDim2.new(1, 0, 0, 25)
1719FileName_2.Font = Enum.Font.SourceSans
1720FileName_2.Text = " PlaceName"
1721FileName_2.TextColor3 = Color3.fromRGB(255, 255, 255)
1722FileName_2.TextSize = 18
1723FileName_2.TextXAlignment = Enum.TextXAlignment.Left
1724
1725Entry_2.Name = "Entry"
1726Entry_2.Parent = SaveMapWindow
1727Entry_2.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1728Entry_2.BackgroundTransparency = 1
1729Entry_2.BorderSizePixel = 0
1730Entry_2.Size = UDim2.new(1, 0, 0, 22)
1731Entry_2.Visible = false
1732
1733Change_6.Name = "Change"
1734Change_6.Parent = Entry_2
1735Change_6.BackgroundColor3 = Color3.fromRGB(255, 149, 0)
1736Change_6.BackgroundTransparency = 0.6
1737Change_6.Position = UDim2.new(0, 10, 0, 1)
1738Change_6.Size = UDim2.new(0, 20, 0, 20)
1739Change_6.ZIndex = 2
1740Change_6.Font = Enum.Font.SourceSans
1741Change_6.Text = ""
1742Change_6.TextColor3 = Color3.fromRGB(255, 255, 255)
1743Change_6.TextSize = 18
1744
1745enabled_3.Name = "enabled"
1746enabled_3.Parent = Change_6
1747enabled_3.BackgroundColor3 = Color3.fromRGB(209, 125, 0)
1748enabled_3.BackgroundTransparency = 0.4
1749enabled_3.BorderSizePixel = 0
1750enabled_3.Position = UDim2.new(0, 3, 0, 3)
1751enabled_3.Size = UDim2.new(0, 14, 0, 14)
1752enabled_3.Font = Enum.Font.SourceSans
1753enabled_3.Text = ""
1754enabled_3.TextColor3 = Color3.fromRGB(255, 255, 255)
1755enabled_3.TextSize = 14
1756
1757Info.Name = "Info"
1758Info.Parent = Entry_2
1759Info.BackgroundTransparency = 1
1760Info.Position = UDim2.new(0, 40, 0, 0)
1761Info.Size = UDim2.new(1, -40, 0, 22)
1762Info.Font = Enum.Font.SourceSans
1763Info.Text = "Workspace"
1764Info.TextColor3 = Color3.fromRGB(255, 255, 255)
1765Info.TextSize = 18
1766Info.TextXAlignment = Enum.TextXAlignment.Left
1767
1768RemoteDebugWindow.Name = "RemoteDebugWindow"
1769RemoteDebugWindow.Parent = ROBLOX
1770RemoteDebugWindow.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1771RemoteDebugWindow.BorderColor3 = Color3.fromRGB(191, 191, 191)
1772RemoteDebugWindow.BorderSizePixel = 0
1773RemoteDebugWindow.Position = UDim2.new(1, 0, 0, 1)
1774RemoteDebugWindow.Size = UDim2.new(0, 300, 1, 0)
1775
1776Header_4.Name = "Header"
1777Header_4.Parent = RemoteDebugWindow
1778Header_4.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1779Header_4.BorderColor3 = Color3.fromRGB(30, 30, 30)
1780Header_4.Size = UDim2.new(1, 0, 0, 17)
1781
1782TextLabel_5.Parent = Header_4
1783TextLabel_5.BackgroundTransparency = 1
1784TextLabel_5.Position = UDim2.new(0, 4, 0, 0)
1785TextLabel_5.Size = UDim2.new(1, -4, 1, 0)
1786TextLabel_5.Font = Enum.Font.SourceSans
1787TextLabel_5.Text = "Remote Debugger"
1788TextLabel_5.TextColor3 = Color3.fromRGB(255, 255, 255)
1789TextLabel_5.TextSize = 14
1790TextLabel_5.TextXAlignment = Enum.TextXAlignment.Left
1791
1792Desc_5.Name = "Desc"
1793Desc_5.Parent = RemoteDebugWindow
1794Desc_5.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
1795Desc_5.BackgroundTransparency = 1
1796Desc_5.Position = UDim2.new(0, 0, 0, 20)
1797Desc_5.Size = UDim2.new(1, 0, 0, 40)
1798Desc_5.Font = Enum.Font.SourceSans
1799Desc_5.Text = "Have fun with remotes"
1800Desc_5.TextColor3 = Color3.fromRGB(255, 255, 255)
1801Desc_5.TextSize = 32
1802Desc_5.TextWrapped = true
1803
1804AboutWindow.Name = "AboutWindow"
1805AboutWindow.Parent = ROBLOX
1806AboutWindow.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1807AboutWindow.BorderColor3 = Color3.fromRGB(191, 191, 191)
1808AboutWindow.BorderSizePixel = 0
1809AboutWindow.Position = UDim2.new(1, 0, 0, 1)
1810AboutWindow.Size = UDim2.new(0, 300, 1, 0)
1811
1812Header_5.Name = "Header"
1813Header_5.Parent = AboutWindow
1814Header_5.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
1815Header_5.BorderColor3 = Color3.fromRGB(30, 30, 30)
1816Header_5.Size = UDim2.new(1, 0, 0, 17)
1817
1818TextLabel_6.Parent = Header_5
1819TextLabel_6.BackgroundTransparency = 1
1820TextLabel_6.Position = UDim2.new(0, 4, 0, 0)
1821TextLabel_6.Size = UDim2.new(1, -4, 1, 0)
1822TextLabel_6.Font = Enum.Font.SourceSans
1823TextLabel_6.Text = "About"
1824TextLabel_6.TextColor3 = Color3.fromRGB(255, 255, 255)
1825TextLabel_6.TextSize = 14
1826TextLabel_6.TextXAlignment = Enum.TextXAlignment.Left
1827
1828Desc_6.Name = "Desc"
1829Desc_6.Parent = AboutWindow
1830Desc_6.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
1831Desc_6.BackgroundTransparency = 1
1832Desc_6.Position = UDim2.new(0.1, 0, 0.1, 0)
1833Desc_6.Size = UDim2.new(0.8, 0, 0, 200)
1834Desc_6.Font = Enum.Font.SourceSans
1835Desc_6.Text = "Dex v2.0"
1836Desc_6.TextColor3 = Color3.fromRGB(255, 255, 255)
1837Desc_6.TextSize = 24
1838Desc_6.TextWrapped = true
1839
1840local NewGuiPart153 = Instance.new("BindableFunction")
1841local NewGuiPart154 = Instance.new("BindableFunction")
1842local NewGuiPart155 = Instance.new("BindableFunction")
1843local NewGuiPart156 = Instance.new("BindableFunction")
1844local NewGuiPart157 = Instance.new("BindableEvent")
1845local NewGuiPart158 = Instance.new("BindableFunction")
1846local NewGuiPart159 = Instance.new("BindableFunction")
1847local NewGuiPart160 = Instance.new("BindableEvent")
1848local NewGuiPart161 = Instance.new("BindableFunction")
1849local NewGuiPart162 = Instance.new("BindableFunction")
1850local NewGuiPart163 = Instance.new("BindableEvent")
1851
1852NewGuiPart158.Name = "GetApi"
1853NewGuiPart158.Parent = PropertiesFrame
1854NewGuiPart158.Archivable = true
1855
1856NewGuiPart159.Name = "GetAwaiting"
1857NewGuiPart159.Parent = PropertiesFrame
1858NewGuiPart159.Archivable = true
1859
1860NewGuiPart160.Name = "SetAwaiting"
1861NewGuiPart160.Parent = PropertiesFrame
1862NewGuiPart160.Archivable = true
1863
1864NewGuiPart153.Name = "GetOption"
1865NewGuiPart153.Parent = ExplorerPanel
1866NewGuiPart153.Archivable = true
1867
1868NewGuiPart154.Name = "GetSelection"
1869NewGuiPart154.Parent = ExplorerPanel
1870NewGuiPart154.Archivable = true
1871
1872NewGuiPart155.Name = "SetOption"
1873NewGuiPart155.Parent = ExplorerPanel
1874NewGuiPart155.Archivable = true
1875
1876NewGuiPart156.Name = "SetSelection"
1877NewGuiPart156.Parent = ExplorerPanel
1878NewGuiPart156.Archivable = true
1879
1880NewGuiPart157.Name = "SelectionChanged"
1881NewGuiPart157.Parent = ExplorerPanel
1882NewGuiPart157.Archivable = true
1883
1884NewGuiPart161.Name = "GetSetting"
1885NewGuiPart161.Parent = RemoteDebugWindow
1886NewGuiPart161.Archivable = true
1887
1888NewGuiPart162.Name = "GetSetting"
1889NewGuiPart162.Parent = SettingsPanel
1890NewGuiPart162.Archivable = true
1891
1892NewGuiPart163.Name = "OpenScript"
1893NewGuiPart163.Parent = ScriptEditor
1894NewGuiPart163.Archivable = true
1895
1896return ROBLOX
1897end
1898
1899local D_E_X = CreateGui()
1900D_E_X.Parent = game.CoreGui.RobloxGui;
1901
1902spawn(function()
1903
1904local Gui = D_E_X
1905
1906local IntroFrame = Gui:WaitForChild("IntroFrame")
1907
1908local SideMenu = Gui:WaitForChild("SideMenu")
1909local OpenToggleButton = Gui:WaitForChild("Toggle")
1910local CloseToggleButton = SideMenu:WaitForChild("Toggle")
1911local OpenScriptEditorButton = SideMenu:WaitForChild("OpenScriptEditor")
1912
1913local ScriptEditor = Gui:WaitForChild("ScriptEditor")
1914
1915local SlideOut = SideMenu:WaitForChild("SlideOut")
1916local SlideFrame = SlideOut:WaitForChild("SlideFrame")
1917local Slant = SideMenu:WaitForChild("Slant")
1918
1919local ExplorerButton = SlideFrame:WaitForChild("Explorer")
1920local SettingsButton = SlideFrame:WaitForChild("Settings")
1921
1922local SelectionBox = Instance.new("SelectionBox")
1923SelectionBox.Parent = Gui
1924
1925local ExplorerPanel = Gui:WaitForChild("ExplorerPanel")
1926local PropertiesFrame = Gui:WaitForChild("PropertiesFrame")
1927local SaveMapWindow = Gui:WaitForChild("SaveMapWindow")
1928local RemoteDebugWindow = Gui:WaitForChild("RemoteDebugWindow")
1929local AboutWindow = Gui:WaitForChild("AboutWindow")
1930
1931local SettingsPanel = Gui:WaitForChild("SettingsPanel")
1932local SettingsListener = SettingsPanel:WaitForChild("GetSetting")
1933local SettingTemplate = SettingsPanel:WaitForChild("SettingTemplate")
1934local SettingList = SettingsPanel:WaitForChild("SettingList")
1935
1936local SaveMapCopyList = SaveMapWindow:WaitForChild("CopyList")
1937local SaveMapSettingFrame = SaveMapWindow:WaitForChild("MapSettings")
1938local SaveMapName = SaveMapWindow:WaitForChild("FileName")
1939local SaveMapButton = SaveMapWindow:WaitForChild("Save")
1940local SaveMapCopyTemplate = SaveMapWindow:WaitForChild("Entry")
1941local SaveMapSettings = {
1942 CopyWhat = {
1943 Workspace = true,
1944 Lighting = true,
1945 ReplicatedStorage = true,
1946 ReplicatedFirst = true,
1947 StarterPack = true,
1948 StarterGui = true,
1949 StarterPlayer = true
1950 },
1951 SaveScripts = true,
1952 SaveTerrain = true,
1953 LightingProperties = true,
1954 CameraInstances = true
1955}
1956
1957local SelectionChanged = ExplorerPanel:WaitForChild("SelectionChanged")
1958local GetSelection = ExplorerPanel:WaitForChild("GetSelection")
1959local SetSelection = ExplorerPanel:WaitForChild("SetSelection")
1960
1961local Player = game:GetService("Players").LocalPlayer
1962local Mouse = Player:GetMouse()
1963
1964local CurrentWindow = "Nothing c:"
1965local Windows = {
1966 Explorer = {
1967 ExplorerPanel,
1968 PropertiesFrame
1969 },
1970 Settings = {SettingsPanel},
1971 SaveMap = {SaveMapWindow},
1972 Remotes = {RemoteDebugWindow},
1973 About = {AboutWindow}
1974}
1975
1976function switchWindows(wName,over)
1977 if CurrentWindow == wName and not over then return end
1978
1979 local count = 0
1980
1981 for i,v in pairs(Windows) do
1982 count = 0
1983 if i ~= wName then
1984 for _,c in pairs(v) do c:TweenPosition(UDim2.new(1, 30, c.Position.Y.Scale, c.Position.Y.Offset), "Out", "Quad", 0.5, true) count = count + 1 end
1985 -- 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
1986 end
1987 end
1988
1989 count = 0
1990
1991 if Windows[wName] then
1992 for _,c in pairs(Windows[wName]) do c:TweenPosition(UDim2.new(1, -300, c.Position.Y.Scale, c.Position.Y.Offset), "Out", "Quad", 0.5, true) count = count + 1 end
1993 -- 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
1994 end
1995
1996 if wName ~= "Nothing c:" then
1997 CurrentWindow = wName
1998 for i,v in pairs(SlideFrame:GetChildren()) do
1999 v.AutoButtonColor = false;
2000 v.BackgroundTransparency = 1
2001 v.Icon.ImageColor3 = Color3.fromRGB(185, 185, 185)
2002 end
2003 if SlideFrame:FindFirstChild(wName) then
2004 -- SlideFrame[wName].BackgroundTransparency = 1
2005 SlideFrame[wName].Icon.ImageColor3 = Color3.new(255,255,255)
2006 end
2007 end
2008end
2009
2010function toggleDex(on)
2011 if on then
2012 SideMenu:TweenPosition(UDim2.new(1, -330, 0, 0), "Out", "Quad", 0.5, true)
2013 OpenToggleButton:TweenPosition(UDim2.new(1,0,0,0), "Out", "Quad", 0.5, true)
2014 switchWindows(CurrentWindow,true)
2015 else
2016 SideMenu:TweenPosition(UDim2.new(1, 0, 0, 0), "Out", "Quad", 0.5, true)
2017 OpenToggleButton:TweenPosition(UDim2.new(1,-30,0,0), "Out", "Quad", 0.5, true)
2018 switchWindows("Nothing c:")
2019 end
2020end
2021
2022local Settings = {
2023 ClickSelect = false;
2024 SelBox = false;
2025 ClearProps = false;
2026 SelectUngrouped = true;
2027 SaveInstanceScripts = true;
2028}
2029
2030function ReturnSetting(set)
2031 if set == "ClearProps" then
2032 return Settings.ClearProps
2033 elseif set == "SelectUngrouped" then
2034 return Settings.SelectUngrouped
2035 end
2036end
2037
2038OpenToggleButton.MouseButton1Up:connect(function()
2039 toggleDex(true)
2040end)
2041
2042OpenScriptEditorButton.MouseButton1Up:connect(function()
2043 if OpenScriptEditorButton.Active then
2044 ScriptEditor.Visible = true
2045 end
2046end)
2047
2048CloseToggleButton.MouseButton1Up:connect(function()
2049 if CloseToggleButton.Active then
2050 toggleDex(false)
2051 end
2052end)
2053
2054for i,v in pairs(SlideFrame:GetChildren()) do
2055 v.MouseButton1Click:connect(function()
2056 switchWindows(v.Name)
2057 end)
2058
2059 -- v.MouseEnter:connect(function()v.BackgroundTransparency = 0.5 end)
2060 -- v.MouseLeave:connect(function()if CurrentWindow~=v.Name then v.BackgroundTransparency = 1 end end)
2061end
2062
2063
2064function createSetting(name, interName, defaultOn, func)
2065 local newSetting = SettingTemplate:Clone()
2066 newSetting.Position = UDim2.new(0,0,0,#SettingList:GetChildren() * 60)
2067 newSetting.SName.Text = name
2068
2069 local function toggle(on)
2070 if on then
2071 newSetting.Change.Bar:TweenPosition(UDim2.new(0,32,0,-2),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
2072 newSetting.Change.OnBar:TweenSize(UDim2.new(0,34,0,15),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
2073 newSetting.Status.Text = "On"
2074 Settings[interName] = true
2075 else
2076 newSetting.Change.Bar:TweenPosition(UDim2.new(0,-2,0,-2),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
2077 newSetting.Change.OnBar:TweenSize(UDim2.new(0,0,0,15),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
2078 newSetting.Status.Text = "Off"
2079 Settings[interName] = false
2080 end
2081 end
2082
2083 newSetting.Change.MouseButton1Click:connect(function()
2084 toggle(not Settings[interName])
2085 if func then pcall(func, Settings[interName]) end
2086 end)
2087
2088 newSetting.Visible = true
2089 newSetting.Parent = SettingList
2090
2091 if defaultOn then
2092 toggle(true)
2093 end
2094end
2095
2096createSetting("Click part to select","ClickSelect",false)
2097createSetting("Selection Box","SelBox",false)
2098createSetting("Clear property value on focus","ClearProps",false)
2099createSetting("Select ungrouped models","SelectUngrouped",true)
2100createSetting("SaveInstance decompiles scripts","SaveInstanceScripts",true)
2101
2102local function getSelection()
2103 local t = GetSelection:Invoke()
2104 if t and #t > 0 then
2105 return t[1]
2106 else
2107 return nil
2108 end
2109end
2110
2111Mouse.Button1Down:connect(function()
2112 if CurrentWindow == "Explorer" and Settings.ClickSelect then
2113 local target = Mouse.Target
2114 if target then
2115 SetSelection:Invoke({target})
2116 end
2117 end
2118end)
2119
2120SelectionChanged.Event:connect(function()
2121 if Settings.SelBox then
2122 local success,err = pcall(function()
2123 local selection = getSelection()
2124 SelectionBox.Adornee = selection
2125 end)
2126 if err then
2127 SelectionBox.Adornee = nil
2128 end
2129 end
2130end)
2131
2132SettingsListener.OnInvoke = ReturnSetting
2133
2134-- Map Copier
2135
2136function createMapSetting(obj,interName,defaultOn)
2137 local function toggle(on)
2138 if on then
2139 obj.Change.Bar:TweenPosition(UDim2.new(0,32,0,-2),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
2140 obj.Change.OnBar:TweenSize(UDim2.new(0,34,0,15),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
2141 obj.Status.Text = "On"
2142 SaveMapSettings[interName] = true
2143 else
2144 obj.Change.Bar:TweenPosition(UDim2.new(0,-2,0,-2),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
2145 obj.Change.OnBar:TweenSize(UDim2.new(0,0,0,15),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
2146 obj.Status.Text = "Off"
2147 SaveMapSettings[interName] = false
2148 end
2149 end
2150
2151 obj.Change.MouseButton1Click:connect(function()
2152 toggle(not SaveMapSettings[interName])
2153 end)
2154
2155 obj.Visible = true
2156 obj.Parent = SaveMapSettingFrame
2157
2158 if defaultOn then
2159 toggle(true)
2160 end
2161end
2162
2163function createCopyWhatSetting(serv)
2164 if SaveMapSettings.CopyWhat[serv] then
2165 local newSetting = SaveMapCopyTemplate:Clone()
2166 newSetting.Position = UDim2.new(0,0,0,#SaveMapCopyList:GetChildren() * 22 + 5)
2167 newSetting.Info.Text = serv
2168
2169 local function toggle(on)
2170 if on then
2171 newSetting.Change.enabled.Visible = true
2172 SaveMapSettings.CopyWhat[serv] = true
2173 else
2174 newSetting.Change.enabled.Visible = false
2175 SaveMapSettings.CopyWhat[serv] = false
2176 end
2177 end
2178
2179 newSetting.Change.MouseButton1Click:connect(function()
2180 toggle(not SaveMapSettings.CopyWhat[serv])
2181 end)
2182
2183 newSetting.Visible = true
2184 newSetting.Parent = SaveMapCopyList
2185 end
2186end
2187
2188createMapSetting(SaveMapSettingFrame.Scripts,"SaveScripts",true)
2189createMapSetting(SaveMapSettingFrame.Terrain,"SaveTerrain",true)
2190createMapSetting(SaveMapSettingFrame.Lighting,"LightingProperties",true)
2191createMapSetting(SaveMapSettingFrame.CameraInstances,"CameraInstances",true)
2192
2193createCopyWhatSetting("Workspace")
2194createCopyWhatSetting("Lighting")
2195createCopyWhatSetting("ReplicatedStorage")
2196createCopyWhatSetting("ReplicatedFirst")
2197createCopyWhatSetting("StarterPack")
2198createCopyWhatSetting("StarterGui")
2199createCopyWhatSetting("StarterPlayer")
2200
2201SaveMapName.Text = tostring(game.PlaceId).."MapCopy"
2202
2203SaveMapButton.MouseButton1Click:connect(function()
2204 local copyWhat = {}
2205
2206 local copyGroup = Instance.new("Model",game:GetService'ReplicatedStorage')
2207
2208 local copyScripts = SaveMapSettings.SaveScripts
2209
2210 local copyTerrain = SaveMapSettings.SaveTerrain
2211
2212 local lightingProperties = SaveMapSettings.LightingProperties
2213
2214 local cameraInstances = SaveMapSettings.CameraInstances
2215
2216 -----------------------------------------------------------------------------------
2217
2218 for i,v in pairs(SaveMapSettings.CopyWhat) do
2219 if v then
2220 table.insert(copyWhat,i)
2221 end
2222 end
2223
2224 local consoleFunc = printconsole or writeconsole
2225
2226 if consoleFunc then
2227 consoleFunc("Raspberry Pi's place copier loaded.")
2228 consoleFunc("Copying map of game "..tostring(game.PlaceId)..".")
2229 end
2230
2231 function archivable(root)
2232 for i,v in pairs(root:GetChildren()) do
2233 if not game:GetService'Players':GetPlayerFromCharacter(v) then
2234 v.Archivable = true
2235 archivable(v)
2236 end
2237 end
2238 end
2239
2240 function decompileS(root)
2241 for i,v in pairs(root:GetChildren()) do
2242 pcall(function()
2243 if v:IsA("LocalScript") then
2244 local isDisabled = v.Disabled
2245 v.Disabled = true
2246 v.Source = decompile(v)
2247 v.Disabled = isDisabled
2248
2249 if v.Source == "" then
2250 if consoleFunc then consoleFunc("LocalScript "..v.Name.." had a problem decompiling.") end
2251 else
2252 if consoleFunc then consoleFunc("LocalScript "..v.Name.." decompiled.") end
2253 end
2254 elseif v:IsA("ModuleScript") then
2255 v.Source = decompile(v)
2256
2257 if v.Source == "" then
2258 if consoleFunc then consoleFunc("ModuleScript "..v.Name.." had a problem decompiling.") end
2259 else
2260 if consoleFunc then consoleFunc("ModuleScript "..v.Name.." decompiled.") end
2261 end
2262 end
2263 end)
2264 decompileS(v)
2265 end
2266 end
2267
2268 for i,v in pairs(copyWhat) do archivable(game[v]) end
2269
2270 for j,obj in pairs(copyWhat) do
2271 if obj ~= "StarterPlayer" then
2272 local newFolder = Instance.new("Folder",copyGroup)
2273 newFolder.Name = obj
2274 for i,v in pairs(game[obj]:GetChildren()) do
2275 if v ~= copyGroup then
2276 pcall(function()
2277 v:Clone().Parent = newFolder
2278 end)
2279 end
2280 end
2281 else
2282 local newFolder = Instance.new("Model",copyGroup)
2283 newFolder.Name = "StarterPlayer"
2284 for i,v in pairs(game[obj]:GetChildren()) do
2285 local newObj = Instance.new("Folder",newFolder)
2286 newObj.Name = v.Name
2287 for _,c in pairs(v:GetChildren()) do
2288 if c.Name ~= "ControlScript" and c.Name ~= "CameraScript" then
2289 c:Clone().Parent = newObj
2290 end
2291 end
2292 end
2293 end
2294 end
2295
2296 if workspace.CurrentCamera and cameraInstances then
2297 local cameraFolder = Instance.new("Model",copyGroup)
2298 cameraFolder.Name = "CameraItems"
2299 for i,v in pairs(workspace.CurrentCamera:GetChildren()) do v:Clone().Parent = cameraFolder end
2300 end
2301
2302 if copyTerrain then
2303 local myTerrain = workspace.Terrain:CopyRegion(workspace.Terrain.MaxExtents)
2304 myTerrain.Parent = copyGroup
2305 end
2306
2307 function saveProp(obj,prop,par)
2308 local myProp = obj[prop]
2309 if type(myProp) == "boolean" then
2310 local newProp = Instance.new("BoolValue",par)
2311 newProp.Name = prop
2312 newProp.Value = myProp
2313 elseif type(myProp) == "number" then
2314 local newProp = Instance.new("IntValue",par)
2315 newProp.Name = prop
2316 newProp.Value = myProp
2317 elseif type(myProp) == "string" then
2318 local newProp = Instance.new("StringValue",par)
2319 newProp.Name = prop
2320 newProp.Value = myProp
2321 elseif type(myProp) == "userdata" then -- Assume Color3
2322 pcall(function()
2323 local newProp = Instance.new("Color3Value",par)
2324 newProp.Name = prop
2325 newProp.Value = myProp
2326 end)
2327 end
2328 end
2329
2330 if lightingProperties then
2331 local lightingProps = Instance.new("Model",copyGroup)
2332 lightingProps.Name = "LightingProperties"
2333
2334 saveProp(game:GetService'Lighting',"Ambient",lightingProps)
2335 saveProp(game:GetService'Lighting',"Brightness",lightingProps)
2336 saveProp(game:GetService'Lighting',"ColorShift_Bottom",lightingProps)
2337 saveProp(game:GetService'Lighting',"ColorShift_Top",lightingProps)
2338 saveProp(game:GetService'Lighting',"GlobalShadows",lightingProps)
2339 saveProp(game:GetService'Lighting',"OutdoorAmbient",lightingProps)
2340 saveProp(game:GetService'Lighting',"Outlines",lightingProps)
2341 saveProp(game:GetService'Lighting',"GeographicLatitude",lightingProps)
2342 saveProp(game:GetService'Lighting',"TimeOfDay",lightingProps)
2343 saveProp(game:GetService'Lighting',"FogColor",lightingProps)
2344 saveProp(game:GetService'Lighting',"FogEnd",lightingProps)
2345 saveProp(game:GetService'Lighting',"FogStart",lightingProps)
2346 end
2347
2348 if decompile and copyScripts then
2349 decompileS(copyGroup)
2350 end
2351
2352 if SaveInstance then
2353 SaveInstance(copyGroup,SaveMapName.Text..".rbxm")
2354 elseif saveinstance then
2355 saveinstance(SaveMapName.Text..".rbxm", copyGroup)
2356 end
2357 --print("Saved!")
2358 if consoleFunc then
2359 consoleFunc("The map has been copied.")
2360 end
2361 SaveMapButton.Text = "The map has been saved"
2362 wait(5)
2363 SaveMapButton.Text = "Save"
2364end)
2365
2366-- End Copier
2367
2368wait()
2369
2370IntroFrame:TweenPosition(UDim2.new(1,-300,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
2371
2372switchWindows("Explorer")
2373
2374wait(1)
2375
2376SideMenu.Visible = true
2377
2378for i = 0,1,0.1 do
2379 IntroFrame.BackgroundTransparency = i
2380 IntroFrame.Main.BackgroundTransparency = i
2381 IntroFrame.Slant.ImageLabel.ImageTransparency = i
2382 IntroFrame.Title.TextTransparency = i
2383 IntroFrame.Version.TextTransparency = i
2384 IntroFrame.Creator.TextTransparency = i
2385 wait()
2386end
2387
2388IntroFrame.Visible = false
2389
2390SlideFrame:TweenPosition(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
2391OpenScriptEditorButton:TweenPosition(UDim2.new(0,0,0,180),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
2392CloseToggleButton:TweenPosition(UDim2.new(0,0,0,210),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
2393Slant:TweenPosition(UDim2.new(0,0,0,240),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
2394
2395wait(0.5)
2396
2397for i = 1,0,-0.1 do
2398 OpenScriptEditorButton.Icon.ImageTransparency = i
2399 CloseToggleButton.TextTransparency = i
2400 wait()
2401end
2402
2403CloseToggleButton.Active = true
2404CloseToggleButton.AutoButtonColor = true
2405
2406OpenScriptEditorButton.Active = true
2407OpenScriptEditorButton.AutoButtonColor = true
2408end)
2409spawn(function()
2410 -- initial states
2411local Option = {
2412 -- can modify object parents in the hierarchy
2413 Modifiable = false;
2414 -- can select objects
2415 Selectable = true;
2416}
2417
2418-- MERELY
2419
2420Option.Modifiable = true
2421
2422-- END MERELY
2423
2424-- general size of GUI objects, in pixels
2425local GUI_SIZE = 16
2426-- padding between items within each entry
2427local ENTRY_PADDING = 1
2428-- padding between each entry
2429local ENTRY_MARGIN = 1
2430
2431local Input = game:GetService("UserInputService")
2432local HoldingCtrl = false
2433local HoldingShift = false
2434
2435--[[
2436
2437# Explorer Panel
2438
2439A GUI panel that displays the game hierarchy.
2440
2441
2442## Selection Bindables
2443
2444- `Function GetSelection ( )`
2445
2446 Returns an array of objects representing the objects currently
2447 selected in the panel.
2448
2449- `Function SetSelection ( Objects selection )`
2450
2451 Sets the objects that are selected in the panel. `selection` is an array
2452 of objects.
2453
2454- `Event SelectionChanged ( )`
2455
2456 Fired after the selection changes.
2457
2458
2459## Option Bindables
2460
2461- `Function GetOption ( string optionName )`
2462
2463 If `optionName` is given, returns the value of that option. Otherwise,
2464 returns a table of options and their current values.
2465
2466- `Function SetOption ( string optionName, bool value )`
2467
2468 Sets `optionName` to `value`.
2469
2470 Options:
2471
2472 - Modifiable
2473
2474 Whether objects can be modified by the panel.
2475
2476 Note that modifying objects depends on being able to select them. If
2477 Selectable is false, then Actions will not be available. Reparenting
2478 is still possible, but only for the dragged object.
2479
2480 - Selectable
2481
2482 Whether objects can be selected.
2483
2484 If Modifiable is false, then left-clicking will perform a drag
2485 selection.
2486
2487## Updates
2488
2489- 2013-09-18
2490 - Fixed explorer icons to match studio explorer.
2491
2492- 2013-09-14
2493 - Added GetOption and SetOption bindables.
2494 - Option: Modifiable; sets whether objects can be modified by the panel.
2495 - Option: Selectable; sets whether objects can be selected.
2496 - Slight modification to left-click selection behavior.
2497 - Improved layout and scaling.
2498
2499- 2013-09-13
2500 - Added drag to reparent objects.
2501 - Left-click to select/deselect object.
2502 - Left-click and drag unselected object to reparent single object.
2503 - Left-click and drag selected object to move reparent entire selection.
2504 - Right-click while dragging to cancel.
2505
2506- 2013-09-11
2507 - Added explorer panel header with actions.
2508 - Added Cut action.
2509 - Added Copy action.
2510 - Added Paste action.
2511 - Added Delete action.
2512 - Added drag selection.
2513 - Left-click: Add to selection on drag.
2514 - Right-click: Add to or remove from selection on drag.
2515 - Ensured SelectionChanged fires only when the selection actually changes.
2516 - Added documentation and change log.
2517 - Fixed thread issue.
2518
2519- 2013-09-09
2520 - Added basic multi-selection.
2521 - Left-click to set selection.
2522 - Right-click to add to or remove from selection.
2523 - Removed "Selection" ObjectValue.
2524 - Added GetSelection BindableFunction.
2525 - Added SetSelection BindableFunction.
2526 - Added SelectionChanged BindableEvent.
2527 - Changed font to SourceSans.
2528
2529- 2013-08-31
2530 - Improved GUI sizing based off of `GUI_SIZE` constant.
2531 - Automatic font size detection.
2532
2533- 2013-08-27
2534 - Initial explorer panel.
2535
2536
2537## Todo
2538
2539- Sorting
2540 - by ExplorerOrder
2541 - by children
2542 - by name
2543- Drag objects to reparent
2544
2545]]
2546
2547local ENTRY_SIZE = GUI_SIZE + ENTRY_PADDING*2
2548local ENTRY_BOUND = ENTRY_SIZE + ENTRY_MARGIN
2549local HEADER_SIZE = ENTRY_SIZE*2
2550
2551local FONT = 'SourceSans'
2552local FONT_SIZE do
2553 local size = {8,9,10,11,12,14,18,24,36,48}
2554 local s
2555 local n = math.huge
2556 for i = 1,#size do
2557 if size[i] <= GUI_SIZE then
2558 FONT_SIZE = i - 1
2559 end
2560 end
2561end
2562
2563local GuiColor = {
2564 Background = Color3.fromRGB( 43, 43, 43);
2565 Border = Color3.fromRGB( 20, 20, 20);
2566 Selected = Color3.fromRGB(215, 125, 0);
2567 BorderSelected = Color3.fromRGB(188, 118, 4);
2568 Text = Color3.fromRGB(245, 245, 245);
2569 TextDisabled = Color3.fromRGB(188, 188, 188);
2570 TextSelected = Color3.fromRGB(255, 255, 255);
2571 Button = Color3.fromRGB( 33, 33, 33);
2572 ButtonBorder = Color3.fromRGB(133, 133, 133);
2573 ButtonSelected = Color3.fromRGB(255, 188, 0);
2574 Field = Color3.fromRGB( 43, 43, 43);
2575 FieldBorder = Color3.fromRGB( 50, 50, 50);
2576 TitleBackground = Color3.fromRGB( 11, 11, 11);
2577}
2578
2579--[[
2580Background = Color3.fromRGB(233, 233, 233);
2581Border = Color3.fromRGB(149, 149, 149);
2582Selected = Color3.fromRGB( 96, 140, 211);
2583BorderSelected = Color3.fromRGB( 86, 125, 188);
2584Text = Color3.fromRGB( 0, 0, 0);
2585TextDisabled = Color3.fromRGB(128, 128, 128);
2586TextSelected = Color3.fromRGB(255, 255, 255);
2587Button = Color3.fromRGB(221, 221, 221);
2588ButtonBorder = Color3.fromRGB(149, 149, 149);
2589ButtonSelected = Color3.fromRGB(255, 0, 0);
2590Field = Color3.fromRGB(255, 255, 255);
2591FieldBorder = Color3.fromRGB(191, 191, 191);
2592TitleBackground = Color3.fromRGB(178, 178, 178);
2593]]
2594
2595----------------------------------------------------------------
2596----------------------------------------------------------------
2597----------------------------------------------------------------
2598----------------------------------------------------------------
2599---- Icon map constants
2600
2601local MAP_ID = 483448923
2602
2603-- Indices based on implementation of Icon function.
2604local ACTION_CUT = 160
2605local ACTION_COPY = 161
2606local ACTION_PASTE = 162
2607local ACTION_DELETE = 163
2608local ACTION_SORT = 164
2609local ACTION_CUT_OVER = 174
2610local ACTION_COPY_OVER = 175
2611local ACTION_PASTE_OVER = 176
2612local ACTION_DELETE_OVER = 177
2613local ACTION_SORT_OVER = 178
2614local ACTION_EDITQUICKACCESS = 190
2615local ACTION_FREEZE = 188
2616local ACTION_STARRED = 189
2617local ACTION_ADDSTAR = 184
2618local ACTION_ADDSTAR_OVER = 187
2619
2620local NODE_COLLAPSED = 165
2621local NODE_EXPANDED = 166
2622local NODE_COLLAPSED_OVER = 179
2623local NODE_EXPANDED_OVER = 180
2624
2625local ExplorerIndex = {
2626 ["Accessory"] = 32;
2627 ["Accoutrement"] = 32;
2628 ["AdService"] = 73;
2629 ["Animation"] = 60;
2630 ["AnimationController"] = 60;
2631 ["AnimationTrack"] = 60;
2632 ["Animator"] = 60;
2633 ["ArcHandles"] = 56;
2634 ["AssetService"] = 72;
2635 ["Attachment"] = 34;
2636 ["Backpack"] = 20;
2637 ["BadgeService"] = 75;
2638 ["BallSocketConstraint"] = 89;
2639 ["BillboardGui"] = 64;
2640 ["BinaryStringValue"] = 4;
2641 ["BindableEvent"] = 67;
2642 ["BindableFunction"] = 66;
2643 ["BlockMesh"] = 8;
2644 ["BloomEffect"] = 90;
2645 ["BlurEffect"] = 90;
2646 ["BodyAngularVelocity"] = 14;
2647 ["BodyForce"] = 14;
2648 ["BodyGyro"] = 14;
2649 ["BodyPosition"] = 14;
2650 ["BodyThrust"] = 14;
2651 ["BodyVelocity"] = 14;
2652 ["BoolValue"] = 4;
2653 ["BoxHandleAdornment"] = 54;
2654 ["BrickColorValue"] = 4;
2655 ["Camera"] = 5;
2656 ["CFrameValue"] = 4;
2657 ["CharacterMesh"] = 60;
2658 ["Chat"] = 33;
2659 ["ClickDetector"] = 41;
2660 ["CollectionService"] = 30;
2661 ["Color3Value"] = 4;
2662 ["ColorCorrectionEffect"] = 90;
2663 ["ConeHandleAdornment"] = 54;
2664 ["Configuration"] = 58;
2665 ["ContentProvider"] = 72;
2666 ["ContextActionService"] = 41;
2667 ["CoreGui"] = 46;
2668 ["CoreScript"] = 18;
2669 ["CornerWedgePart"] = 1;
2670 ["CustomEvent"] = 4;
2671 ["CustomEventReceiver"] = 4;
2672 ["CylinderHandleAdornment"] = 54;
2673 ["CylinderMesh"] = 8;
2674 ["CylindricalConstraint"] = 89;
2675 ["Debris"] = 30;
2676 ["Decal"] = 7;
2677 ["Dialog"] = 62;
2678 ["DialogChoice"] = 63;
2679 ["DoubleConstrainedValue"] = 4;
2680 ["Explosion"] = 36;
2681 ["FileMesh"] = 8;
2682 ["Fire"] = 61;
2683 ["Flag"] = 38;
2684 ["FlagStand"] = 39;
2685 ["FloorWire"] = 4;
2686 ["Folder"] = 70;
2687 ["ForceField"] = 37;
2688 ["Frame"] = 48;
2689 ["GamePassService"] = 19;
2690 ["Glue"] = 34;
2691 ["GuiButton"] = 52;
2692 ["GuiMain"] = 47;
2693 ["GuiService"] = 47;
2694 ["Handles"] = 53;
2695 ["HapticService"] = 84;
2696 ["Hat"] = 45;
2697 ["HingeConstraint"] = 89;
2698 ["Hint"] = 33;
2699 ["HopperBin"] = 22;
2700 ["HttpService"] = 76;
2701 ["Humanoid"] = 9;
2702 ["ImageButton"] = 52;
2703 ["ImageLabel"] = 49;
2704 ["InsertService"] = 72;
2705 ["IntConstrainedValue"] = 4;
2706 ["IntValue"] = 4;
2707 ["JointInstance"] = 34;
2708 ["JointsService"] = 34;
2709 ["Keyframe"] = 60;
2710 ["KeyframeSequence"] = 60;
2711 ["KeyframeSequenceProvider"] = 60;
2712 ["Lighting"] = 13;
2713 ["LineHandleAdornment"] = 54;
2714 ["LocalScript"] = 18;
2715 ["LogService"] = 87;
2716 ["MarketplaceService"] = 46;
2717 ["Message"] = 33;
2718 ["Model"] = 2;
2719 ["ModuleScript"] = 71;
2720 ["Motor"] = 34;
2721 ["Motor6D"] = 34;
2722 ["MoveToConstraint"] = 89;
2723 ["NegateOperation"] = 78;
2724 ["NetworkClient"] = 16;
2725 ["NetworkReplicator"] = 29;
2726 ["NetworkServer"] = 15;
2727 ["NumberValue"] = 4;
2728 ["ObjectValue"] = 4;
2729 ["Pants"] = 44;
2730 ["ParallelRampPart"] = 1;
2731 ["Part"] = 1;
2732 ["ParticleEmitter"] = 69;
2733 ["PartPairLasso"] = 57;
2734 ["PathfindingService"] = 37;
2735 ["Platform"] = 35;
2736 ["Player"] = 12;
2737 ["PlayerGui"] = 46;
2738 ["Players"] = 21;
2739 ["PlayerScripts"] = 82;
2740 ["PointLight"] = 13;
2741 ["PointsService"] = 83;
2742 ["Pose"] = 60;
2743 ["PrismaticConstraint"] = 89;
2744 ["PrismPart"] = 1;
2745 ["PyramidPart"] = 1;
2746 ["RayValue"] = 4;
2747 ["ReflectionMetadata"] = 86;
2748 ["ReflectionMetadataCallbacks"] = 86;
2749 ["ReflectionMetadataClass"] = 86;
2750 ["ReflectionMetadataClasses"] = 86;
2751 ["ReflectionMetadataEnum"] = 86;
2752 ["ReflectionMetadataEnumItem"] = 86;
2753 ["ReflectionMetadataEnums"] = 86;
2754 ["ReflectionMetadataEvents"] = 86;
2755 ["ReflectionMetadataFunctions"] = 86;
2756 ["ReflectionMetadataMember"] = 86;
2757 ["ReflectionMetadataProperties"] = 86;
2758 ["ReflectionMetadataYieldFunctions"] = 86;
2759 ["RemoteEvent"] = 80;
2760 ["RemoteFunction"] = 79;
2761 ["ReplicatedFirst"] = 72;
2762 ["ReplicatedStorage"] = 72;
2763 ["RightAngleRampPart"] = 1;
2764 ["RocketPropulsion"] = 14;
2765 ["RodConstraint"] = 89;
2766 ["RopeConstraint"] = 89;
2767 ["Rotate"] = 34;
2768 ["RotateP"] = 34;
2769 ["RotateV"] = 34;
2770 ["RunService"] = 66;
2771 ["ScreenGui"] = 47;
2772 ["Script"] = 6;
2773 ["ScrollingFrame"] = 48;
2774 ["Seat"] = 35;
2775 ["Selection"] = 55;
2776 ["SelectionBox"] = 54;
2777 ["SelectionPartLasso"] = 57;
2778 ["SelectionPointLasso"] = 57;
2779 ["SelectionSphere"] = 54;
2780 ["ServerScriptService"] = 0;
2781 ["ServerStorage"] = 74;
2782 ["Shirt"] = 43;
2783 ["ShirtGraphic"] = 40;
2784 ["SkateboardPlatform"] = 35;
2785 ["Sky"] = 28;
2786 ["SlidingBallConstraint"] = 89;
2787 ["Smoke"] = 59;
2788 ["Snap"] = 34;
2789 ["Sound"] = 11;
2790 ["SoundService"] = 31;
2791 ["Sparkles"] = 42;
2792 ["SpawnLocation"] = 25;
2793 ["SpecialMesh"] = 8;
2794 ["SphereHandleAdornment"] = 54;
2795 ["SpotLight"] = 13;
2796 ["SpringConstraint"] = 89;
2797 ["StarterCharacterScripts"] = 82;
2798 ["StarterGear"] = 20;
2799 ["StarterGui"] = 46;
2800 ["StarterPack"] = 20;
2801 ["StarterPlayer"] = 88;
2802 ["StarterPlayerScripts"] = 82;
2803 ["Status"] = 2;
2804 ["StringValue"] = 4;
2805 ["SunRaysEffect"] = 90;
2806 ["SurfaceGui"] = 64;
2807 ["SurfaceLight"] = 13;
2808 ["SurfaceSelection"] = 55;
2809 ["Team"] = 24;
2810 ["Teams"] = 23;
2811 ["TeleportService"] = 81;
2812 ["Terrain"] = 65;
2813 ["TerrainRegion"] = 65;
2814 ["TestService"] = 68;
2815 ["TextBox"] = 51;
2816 ["TextButton"] = 51;
2817 ["TextLabel"] = 50;
2818 ["Texture"] = 10;
2819 ["TextureTrail"] = 4;
2820 ["Tool"] = 17;
2821 ["TouchTransmitter"] = 37;
2822 ["TrussPart"] = 1;
2823 ["UnionOperation"] = 77;
2824 ["UserInputService"] = 84;
2825 ["Vector3Value"] = 4;
2826 ["VehicleSeat"] = 35;
2827 ["VelocityMotor"] = 34;
2828 ["WedgePart"] = 1;
2829 ["Weld"] = 34;
2830 ["Workspace"] = 19;
2831}
2832
2833----------------------------------------------------------------
2834----------------------------------------------------------------
2835----------------------------------------------------------------
2836----------------------------------------------------------------
2837----------------------------------------------------------------
2838
2839function Create(ty,data)
2840 local obj
2841 if type(ty) == 'string' then
2842 obj = Instance.new(ty)
2843 else
2844 obj = ty
2845 end
2846 for k, v in pairs(data) do
2847 if type(k) == 'number' then
2848 v.Parent = obj
2849 else
2850 obj[k] = v
2851 end
2852 end
2853 return obj
2854end
2855
2856local barActive = false
2857local activeOptions = {}
2858
2859function createDDown(dBut, callback,...)
2860 if barActive then
2861 for i,v in pairs(activeOptions) do
2862 v:Destroy()
2863 end
2864 activeOptions = {}
2865 barActive = false
2866 return
2867 else
2868 barActive = true
2869 end
2870 local slots = {...}
2871 local base = dBut
2872 for i,v in pairs(slots) do
2873 local newOption = base:Clone()
2874 newOption.ZIndex = 5
2875 newOption.Name = "Option "..tostring(i)
2876 newOption.Parent = base.Parent.Parent.Parent
2877 newOption.BackgroundTransparency = 0
2878 newOption.ZIndex = 2
2879 table.insert(activeOptions,newOption)
2880 newOption.Position = UDim2.new(-0.4, dBut.Position.X.Offset, dBut.Position.Y.Scale, dBut.Position.Y.Offset + (#activeOptions * dBut.Size.Y.Offset))
2881 newOption.Text = slots[i]
2882 newOption.MouseButton1Down:connect(function()
2883 dBut.Text = slots[i]
2884 callback(slots[i])
2885 for i,v in pairs(activeOptions) do
2886 v:Destroy()
2887 end
2888 activeOptions = {}
2889 barActive = false
2890 end)
2891 end
2892end
2893
2894-- Connects a function to an event such that it fires asynchronously
2895function Connect(event,func)
2896 return event:connect(function(...)
2897 local a = {...}
2898 spawn(function() func(unpack(a)) end)
2899 end)
2900end
2901
2902-- returns the ascendant ScreenGui of an object
2903function GetScreen(screen)
2904 if screen == nil then return nil end
2905 while not screen:IsA("ScreenGui") do
2906 screen = screen.Parent
2907 if screen == nil then return nil end
2908 end
2909 return screen
2910end
2911
2912do
2913 local ZIndexLock = {}
2914 -- Sets the ZIndex of an object and its descendants. Objects are locked so
2915 -- that SetZIndexOnChanged doesn't spawn multiple threads that set the
2916 -- ZIndex of the same object.
2917 function SetZIndex(object,z)
2918 if not ZIndexLock[object] then
2919 ZIndexLock[object] = true
2920 if object:IsA'GuiObject' then
2921 object.ZIndex = z
2922 end
2923 local children = object:GetChildren()
2924 for i = 1,#children do
2925 SetZIndex(children[i],z)
2926 end
2927 ZIndexLock[object] = nil
2928 end
2929 end
2930
2931 function SetZIndexOnChanged(object)
2932 return object.Changed:connect(function(p)
2933 if p == "ZIndex" then
2934 SetZIndex(object,object.ZIndex)
2935 end
2936 end)
2937 end
2938end
2939
2940---- IconMap ----
2941-- Image size: 256px x 256px
2942-- Icon size: 16px x 16px
2943-- Padding between each icon: 2px
2944-- Padding around image edge: 1px
2945-- Total icons: 14 x 14 (196)
2946local Icon do
2947 local iconMap = 'http://www.roblox.com/asset/?id=' .. MAP_ID
2948 game:GetService('ContentProvider'):Preload(iconMap)
2949 local iconDehash do
2950 -- 14 x 14, 0-based input, 0-based output
2951 local f=math.floor
2952 function iconDehash(h)
2953 return f(h/14%14),f(h%14)
2954 end
2955 end
2956
2957 function Icon(IconFrame,index)
2958 local row,col = iconDehash(index)
2959 local mapSize = Vector2.new(256,256)
2960 local pad,border = 2,1
2961 local iconSize = 16
2962
2963 local class = 'Frame'
2964 if type(IconFrame) == 'string' then
2965 class = IconFrame
2966 IconFrame = nil
2967 end
2968
2969 if not IconFrame then
2970 IconFrame = Create(class,{
2971 Name = "Icon";
2972 BackgroundTransparency = 1;
2973 ClipsDescendants = true;
2974 Create('ImageLabel',{
2975 Name = "IconMap";
2976 Active = false;
2977 BackgroundTransparency = 1;
2978 Image = iconMap;
2979 Size = UDim2.new(mapSize.x/iconSize,0,mapSize.y/iconSize,0);
2980 });
2981 })
2982 end
2983
2984 IconFrame.IconMap.Position = UDim2.new(-col - (pad*(col+1) + border)/iconSize,0,-row - (pad*(row+1) + border)/iconSize,0)
2985 return IconFrame
2986 end
2987end
2988
2989----------------------------------------------------------------
2990----------------------------------------------------------------
2991----------------------------------------------------------------
2992----------------------------------------------------------------
2993---- ScrollBar
2994do
2995 -- AutoButtonColor doesn't always reset properly
2996 local function ResetButtonColor(button)
2997 local active = button.Active
2998 button.Active = not active
2999 button.Active = active
3000 end
3001
3002 local function ArrowGraphic(size,dir,scaled,template)
3003 local Frame = Create('Frame',{
3004 Name = "Arrow Graphic";
3005 BorderSizePixel = 0;
3006 Size = UDim2.new(0,size,0,size);
3007 Transparency = 1;
3008 })
3009 if not template then
3010 template = Instance.new("Frame")
3011 template.BorderSizePixel = 0
3012 end
3013
3014 template.BackgroundColor3 = Color3.new(1, 1, 1);
3015
3016 local transform
3017 if dir == nil or dir == 'Up' then
3018 function transform(p,s) return p,s end
3019 elseif dir == 'Down' then
3020 function transform(p,s) return UDim2.new(0,p.X.Offset,0,size-p.Y.Offset-1),s end
3021 elseif dir == 'Left' then
3022 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
3023 elseif dir == 'Right' then
3024 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
3025 end
3026
3027 local scale
3028 if scaled then
3029 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
3030 else
3031 function scale(p,s) return p,s end
3032 end
3033
3034 local o = math.floor(size/4)
3035 if size%2 == 0 then
3036 local n = size/2-1
3037 for i = 0,n do
3038 local t = template:Clone()
3039 local p,s = scale(transform(
3040 UDim2.new(0,n-i,0,o+i),
3041 UDim2.new(0,(i+1)*2,0,1)
3042 ))
3043 t.Position = p
3044 t.Size = s
3045 t.Parent = Frame
3046 end
3047 else
3048 local n = (size-1)/2
3049 for i = 0,n do
3050 local t = template:Clone()
3051 local p,s = scale(transform(
3052 UDim2.new(0,n-i,0,o+i),
3053 UDim2.new(0,i*2+1,0,1)
3054 ))
3055 t.Position = p
3056 t.Size = s
3057 t.Parent = Frame
3058 end
3059 end
3060 if size%4 > 1 then
3061 local t = template:Clone()
3062 local p,s = scale(transform(
3063 UDim2.new(0,0,0,size-o-1),
3064 UDim2.new(0,size,0,1)
3065 ))
3066 t.Position = p
3067 t.Size = s
3068 t.Parent = Frame
3069 end
3070
3071 for i,v in pairs(Frame:GetChildren()) do
3072 v.BackgroundColor3 = Color3.new(1, 1, 1);
3073 end
3074
3075 return Frame
3076 end
3077
3078
3079 local function GripGraphic(size,dir,spacing,scaled,template)
3080 local Frame = Create('Frame',{
3081 Name = "Grip Graphic";
3082 BorderSizePixel = 0;
3083 Size = UDim2.new(0,size.x,0,size.y);
3084 Transparency = 1;
3085 })
3086 if not template then
3087 template = Instance.new("Frame")
3088 template.BorderSizePixel = 0
3089 end
3090
3091 spacing = spacing or 2
3092
3093 local scale
3094 if scaled then
3095 function scale(p) return UDim2.new(p.X.Offset/size.x,0,p.Y.Offset/size.y,0) end
3096 else
3097 function scale(p) return p end
3098 end
3099
3100 if dir == 'Vertical' then
3101 for i=0,size.x-1,spacing do
3102 local t = template:Clone()
3103 t.Size = scale(UDim2.new(0,1,0,size.y))
3104 t.Position = scale(UDim2.new(0,i,0,0))
3105 t.Parent = Frame
3106 end
3107 elseif dir == nil or dir == 'Horizontal' then
3108 for i=0,size.y-1,spacing do
3109 local t = template:Clone()
3110 t.Size = scale(UDim2.new(0,size.x,0,1))
3111 t.Position = scale(UDim2.new(0,0,0,i))
3112 t.Parent = Frame
3113 end
3114 end
3115
3116 return Frame
3117 end
3118
3119 local mt = {
3120 __index = {
3121 GetScrollPercent = function(self)
3122 return self.ScrollIndex/(self.TotalSpace-self.VisibleSpace)
3123 end;
3124 CanScrollDown = function(self)
3125 return self.ScrollIndex + self.VisibleSpace < self.TotalSpace
3126 end;
3127 CanScrollUp = function(self)
3128 return self.ScrollIndex > 0
3129 end;
3130 ScrollDown = function(self)
3131 self.ScrollIndex = self.ScrollIndex + self.PageIncrement
3132 self:Update()
3133 end;
3134 ScrollUp = function(self)
3135 self.ScrollIndex = self.ScrollIndex - self.PageIncrement
3136 self:Update()
3137 end;
3138 ScrollTo = function(self,index)
3139 self.ScrollIndex = index
3140 self:Update()
3141 end;
3142 SetScrollPercent = function(self,percent)
3143 self.ScrollIndex = math.floor((self.TotalSpace - self.VisibleSpace)*percent + 0.5)
3144 self:Update()
3145 end;
3146 };
3147 }
3148 mt.__index.CanScrollRight = mt.__index.CanScrollDown
3149 mt.__index.CanScrollLeft = mt.__index.CanScrollUp
3150 mt.__index.ScrollLeft = mt.__index.ScrollUp
3151 mt.__index.ScrollRight = mt.__index.ScrollDown
3152
3153 local ScrollStyles = {
3154 Background = Color3.fromRGB(233, 233, 233);
3155 Border = Color3.fromRGB(149, 149, 149);
3156 Selected = Color3.fromRGB( 63, 119, 189);
3157 BorderSelected = Color3.fromRGB( 55, 106, 167);
3158 Text = Color3.fromRGB( 0, 0, 0);
3159 TextDisabled = Color3.fromRGB(128, 128, 128);
3160 TextSelected = Color3.fromRGB(255, 255, 255);
3161 Button = Color3.fromRGB( 35, 35, 35);
3162 ButtonBorder = Color3.fromRGB(149, 149, 149);
3163 ButtonSelected = Color3.fromRGB(255, 0, 0);
3164 Field = Color3.fromRGB(255, 255, 255);
3165 FieldBorder = Color3.fromRGB(191, 191, 191);
3166 TitleBackground = Color3.fromRGB(178, 178, 178);
3167 }
3168
3169 function ScrollBar(horizontal)
3170 -- create row scroll bar
3171 local ScrollBarWidth = GUI_SIZE;
3172 local ScrollFrame = Create('Frame',{
3173 Name = "ScrollFrame";
3174 Position = horizontal and UDim2.new(0,0,1,-ScrollBarWidth) or UDim2.new(1,-ScrollBarWidth,0,0);
3175 Size = horizontal and UDim2.new(1,0,0,ScrollBarWidth) or UDim2.new(0,ScrollBarWidth,1,0);
3176 BackgroundTransparency = 1;
3177 Create('ImageButton',{
3178 Name = "ScrollDown";
3179 Position = horizontal and UDim2.new(1,-ScrollBarWidth,0,0) or UDim2.new(0,0,1,-ScrollBarWidth);
3180 Size = UDim2.new(0, ScrollBarWidth, 0, ScrollBarWidth);
3181 BackgroundColor3 = ScrollStyles.Button;
3182 BorderColor3 = ScrollStyles.Border;
3183 BorderSizePixel = 0;
3184 });
3185 Create('ImageButton',{
3186 Name = "ScrollUp";
3187 Size = UDim2.new(0, ScrollBarWidth, 0, ScrollBarWidth);
3188 BackgroundColor3 = ScrollStyles.Button;
3189 BorderColor3 = ScrollStyles.Border;
3190 BorderSizePixel = 0;
3191 });
3192 Create('ImageButton',{
3193 Name = "ScrollBar";
3194 Size = horizontal and UDim2.new(1,-ScrollBarWidth*2,1,0) or UDim2.new(1,0,1,-ScrollBarWidth*2);
3195 Position = horizontal and UDim2.new(0,ScrollBarWidth,0,0) or UDim2.new(0,0,0,ScrollBarWidth);
3196 AutoButtonColor = false;
3197 BackgroundColor3 = Color3.fromRGB(20, 20, 20);
3198 BorderColor3 = ScrollStyles.Border;
3199 BorderSizePixel = 0;
3200 Create('ImageButton',{
3201 Name = "ScrollThumb";
3202 AutoButtonColor = false;
3203 Size = UDim2.new(0, ScrollBarWidth, 0, ScrollBarWidth);
3204 BackgroundColor3 = ScrollStyles.Button;
3205 BorderColor3 = ScrollStyles.Border;
3206 BorderSizePixel = 0;
3207 });
3208 });
3209 })
3210
3211 local graphicTemplate = Create('Frame',{
3212 Name="Graphic";
3213 BorderSizePixel = 0;
3214 BackgroundColor3 = Color3.new(1, 1, 1);
3215 })
3216 local graphicSize = GUI_SIZE/2
3217
3218 local ScrollDownFrame = ScrollFrame.ScrollDown
3219 local ScrollDownGraphic = ArrowGraphic(graphicSize,horizontal and 'Right' or 'Down',true,graphicTemplate)
3220 ScrollDownGraphic.Position = UDim2.new(0.5,-graphicSize/2,0.5,-graphicSize/2)
3221 ScrollDownGraphic.Parent = ScrollDownFrame
3222 local ScrollUpFrame = ScrollFrame.ScrollUp
3223 local ScrollUpGraphic = ArrowGraphic(graphicSize,horizontal and 'Left' or 'Up',true,graphicTemplate)
3224 ScrollUpGraphic.Position = UDim2.new(0.5,-graphicSize/2,0.5,-graphicSize/2)
3225 ScrollUpGraphic.Parent = ScrollUpFrame
3226 local ScrollBarFrame = ScrollFrame.ScrollBar
3227 local ScrollThumbFrame = ScrollBarFrame.ScrollThumb
3228 do
3229 local size = GUI_SIZE*3/8
3230 local Decal = GripGraphic(Vector2.new(size,size),horizontal and 'Vertical' or 'Horizontal',2,graphicTemplate)
3231 Decal.Position = UDim2.new(0.5,-size/2,0.5,-size/2)
3232 Decal.Parent = ScrollThumbFrame
3233 end
3234
3235 local Class = setmetatable({
3236 GUI = ScrollFrame;
3237 ScrollIndex = 0;
3238 VisibleSpace = 0;
3239 TotalSpace = 0;
3240 PageIncrement = 1;
3241 },mt)
3242
3243 local UpdateScrollThumb
3244 if horizontal then
3245 function UpdateScrollThumb()
3246 ScrollThumbFrame.Size = UDim2.new(Class.VisibleSpace/Class.TotalSpace,0,0,GUI_SIZE)
3247 if ScrollThumbFrame.AbsoluteSize.x < GUI_SIZE then
3248 ScrollThumbFrame.Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE)
3249 end
3250 local barSize = ScrollBarFrame.AbsoluteSize.x
3251 ScrollThumbFrame.Position = UDim2.new(Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.x)/barSize,0,0,0)
3252 end
3253 else
3254 function UpdateScrollThumb()
3255 ScrollThumbFrame.Size = UDim2.new(0,GUI_SIZE,Class.VisibleSpace/Class.TotalSpace,0)
3256 if ScrollThumbFrame.AbsoluteSize.y < GUI_SIZE then
3257 ScrollThumbFrame.Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE)
3258 end
3259 local barSize = ScrollBarFrame.AbsoluteSize.y
3260 ScrollThumbFrame.Position = UDim2.new(0,0,Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.y)/barSize,0)
3261 end
3262 end
3263
3264 local lastDown
3265 local lastUp
3266 local scrollStyle = {BackgroundColor3=Color3.new(1, 1, 1),BackgroundTransparency=0}
3267 local scrollStyle_ds = {BackgroundColor3=Color3.new(1, 1, 1),BackgroundTransparency=0.7}
3268
3269 local function Update()
3270 local t = Class.TotalSpace
3271 local v = Class.VisibleSpace
3272 local s = Class.ScrollIndex
3273 if v <= t then
3274 if s > 0 then
3275 if s + v > t then
3276 Class.ScrollIndex = t - v
3277 end
3278 else
3279 Class.ScrollIndex = 0
3280 end
3281 else
3282 Class.ScrollIndex = 0
3283 end
3284
3285 if Class.UpdateCallback then
3286 if Class.UpdateCallback(Class) == false then
3287 return
3288 end
3289 end
3290
3291 local down = Class:CanScrollDown()
3292 local up = Class:CanScrollUp()
3293 if down ~= lastDown then
3294 lastDown = down
3295 ScrollDownFrame.Active = down
3296 ScrollDownFrame.AutoButtonColor = down
3297 local children = ScrollDownGraphic:GetChildren()
3298 local style = down and scrollStyle or scrollStyle_ds
3299 for i = 1,#children do
3300 Create(children[i],style)
3301 end
3302 end
3303 if up ~= lastUp then
3304 lastUp = up
3305 ScrollUpFrame.Active = up
3306 ScrollUpFrame.AutoButtonColor = up
3307 local children = ScrollUpGraphic:GetChildren()
3308 local style = up and scrollStyle or scrollStyle_ds
3309 for i = 1,#children do
3310 Create(children[i],style)
3311 end
3312 end
3313 ScrollThumbFrame.Visible = down or up
3314 UpdateScrollThumb()
3315 end
3316 Class.Update = Update
3317
3318 SetZIndexOnChanged(ScrollFrame)
3319
3320 local MouseDrag = Create('ImageButton',{
3321 Name = "MouseDrag";
3322 Position = UDim2.new(-0.25,0,-0.25,0);
3323 Size = UDim2.new(1.5,0,1.5,0);
3324 Transparency = 1;
3325 AutoButtonColor = false;
3326 Active = true;
3327 ZIndex = 10;
3328 })
3329
3330 local scrollEventID = 0
3331 ScrollDownFrame.MouseButton1Down:connect(function()
3332 scrollEventID = tick()
3333 local current = scrollEventID
3334 local up_con
3335 up_con = MouseDrag.MouseButton1Up:connect(function()
3336 scrollEventID = tick()
3337 MouseDrag.Parent = nil
3338 ResetButtonColor(ScrollDownFrame)
3339 up_con:disconnect(); drag = nil
3340 end)
3341 MouseDrag.Parent = GetScreen(ScrollFrame)
3342 Class:ScrollDown()
3343 wait(0.2) -- delay before auto scroll
3344 while scrollEventID == current do
3345 Class:ScrollDown()
3346 if not Class:CanScrollDown() then break end
3347 wait()
3348 end
3349 end)
3350
3351 ScrollDownFrame.MouseButton1Up:connect(function()
3352 scrollEventID = tick()
3353 end)
3354
3355 ScrollUpFrame.MouseButton1Down:connect(function()
3356 scrollEventID = tick()
3357 local current = scrollEventID
3358 local up_con
3359 up_con = MouseDrag.MouseButton1Up:connect(function()
3360 scrollEventID = tick()
3361 MouseDrag.Parent = nil
3362 ResetButtonColor(ScrollUpFrame)
3363 up_con:disconnect(); drag = nil
3364 end)
3365 MouseDrag.Parent = GetScreen(ScrollFrame)
3366 Class:ScrollUp()
3367 wait(0.2)
3368 while scrollEventID == current do
3369 Class:ScrollUp()
3370 if not Class:CanScrollUp() then break end
3371 wait()
3372 end
3373 end)
3374
3375 ScrollUpFrame.MouseButton1Up:connect(function()
3376 scrollEventID = tick()
3377 end)
3378
3379 if horizontal then
3380 ScrollBarFrame.MouseButton1Down:connect(function(x,y)
3381 scrollEventID = tick()
3382 local current = scrollEventID
3383 local up_con
3384 up_con = MouseDrag.MouseButton1Up:connect(function()
3385 scrollEventID = tick()
3386 MouseDrag.Parent = nil
3387 ResetButtonColor(ScrollUpFrame)
3388 up_con:disconnect(); drag = nil
3389 end)
3390 MouseDrag.Parent = GetScreen(ScrollFrame)
3391 if x > ScrollThumbFrame.AbsolutePosition.x then
3392 Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
3393 wait(0.2)
3394 while scrollEventID == current do
3395 if x < ScrollThumbFrame.AbsolutePosition.x + ScrollThumbFrame.AbsoluteSize.x then break end
3396 Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
3397 wait()
3398 end
3399 else
3400 Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
3401 wait(0.2)
3402 while scrollEventID == current do
3403 if x > ScrollThumbFrame.AbsolutePosition.x then break end
3404 Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
3405 wait()
3406 end
3407 end
3408 end)
3409 else
3410 ScrollBarFrame.MouseButton1Down:connect(function(x,y)
3411 scrollEventID = tick()
3412 local current = scrollEventID
3413 local up_con
3414 up_con = MouseDrag.MouseButton1Up:connect(function()
3415 scrollEventID = tick()
3416 MouseDrag.Parent = nil
3417 ResetButtonColor(ScrollUpFrame)
3418 up_con:disconnect(); drag = nil
3419 end)
3420 MouseDrag.Parent = GetScreen(ScrollFrame)
3421 if y > ScrollThumbFrame.AbsolutePosition.y then
3422 Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
3423 wait(0.2)
3424 while scrollEventID == current do
3425 if y < ScrollThumbFrame.AbsolutePosition.y + ScrollThumbFrame.AbsoluteSize.y then break end
3426 Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
3427 wait()
3428 end
3429 else
3430 Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
3431 wait(0.2)
3432 while scrollEventID == current do
3433 if y > ScrollThumbFrame.AbsolutePosition.y then break end
3434 Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
3435 wait()
3436 end
3437 end
3438 end)
3439 end
3440
3441 if horizontal then
3442 ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
3443 scrollEventID = tick()
3444 local mouse_offset = x - ScrollThumbFrame.AbsolutePosition.x
3445 local drag_con
3446 local up_con
3447 drag_con = MouseDrag.MouseMoved:connect(function(x,y)
3448 if not game:GetService'UserInputService':IsMouseButtonPressed'MouseButton1' then
3449 scrollEventID = tick()
3450 MouseDrag.Parent = nil
3451 ResetButtonColor(ScrollThumbFrame)
3452 drag_con:disconnect(); drag_con = nil
3453 up_con:disconnect(); drag = nil
3454 end
3455 local bar_abs_pos = ScrollBarFrame.AbsolutePosition.x
3456 local bar_drag = ScrollBarFrame.AbsoluteSize.x - ScrollThumbFrame.AbsoluteSize.x
3457 local bar_abs_one = bar_abs_pos + bar_drag
3458 x = x - mouse_offset
3459 x = x < bar_abs_pos and bar_abs_pos or x > bar_abs_one and bar_abs_one or x
3460 x = x - bar_abs_pos
3461 Class:SetScrollPercent(x/(bar_drag))
3462 end)
3463 up_con = MouseDrag.MouseButton1Up:connect(function()
3464 scrollEventID = tick()
3465 MouseDrag.Parent = nil
3466 ResetButtonColor(ScrollThumbFrame)
3467 drag_con:disconnect(); drag_con = nil
3468 up_con:disconnect(); drag = nil
3469 end)
3470 MouseDrag.Parent = GetScreen(ScrollFrame)
3471 end)
3472 else
3473 ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
3474 scrollEventID = tick()
3475 local mouse_offset = y - ScrollThumbFrame.AbsolutePosition.y
3476 local drag_con
3477 local up_con
3478 drag_con = MouseDrag.MouseMoved:connect(function(x,y)
3479 if not game:GetService'UserInputService':IsMouseButtonPressed'MouseButton1' then
3480 scrollEventID = tick()
3481 MouseDrag.Parent = nil
3482 ResetButtonColor(ScrollThumbFrame)
3483 drag_con:disconnect(); drag_con = nil
3484 up_con:disconnect(); drag = nil
3485 end
3486 local bar_abs_pos = ScrollBarFrame.AbsolutePosition.y
3487 local bar_drag = ScrollBarFrame.AbsoluteSize.y - ScrollThumbFrame.AbsoluteSize.y
3488 local bar_abs_one = bar_abs_pos + bar_drag
3489 y = y - mouse_offset
3490 y = y < bar_abs_pos and bar_abs_pos or y > bar_abs_one and bar_abs_one or y
3491 y = y - bar_abs_pos
3492 Class:SetScrollPercent(y/(bar_drag))
3493 end)
3494 up_con = MouseDrag.MouseButton1Up:connect(function()
3495 scrollEventID = tick()
3496 MouseDrag.Parent = nil
3497 ResetButtonColor(ScrollThumbFrame)
3498 drag_con:disconnect(); drag_con = nil
3499 up_con:disconnect(); drag = nil
3500 end)
3501 MouseDrag.Parent = GetScreen(ScrollFrame)
3502 end)
3503 end
3504
3505 function Class:Destroy()
3506 ScrollFrame:Destroy()
3507 MouseDrag:Destroy()
3508 for k in pairs(Class) do
3509 Class[k] = nil
3510 end
3511 setmetatable(Class,nil)
3512 end
3513
3514 Update()
3515
3516 return Class
3517 end
3518end
3519
3520----------------------------------------------------------------
3521----------------------------------------------------------------
3522----------------------------------------------------------------
3523----------------------------------------------------------------
3524---- Explorer panel
3525
3526local explorerPanel = D_E_X.ExplorerPanel
3527Create(explorerPanel,{
3528 BackgroundColor3 = GuiColor.Field;
3529 BorderColor3 = GuiColor.Border;
3530 Active = true;
3531})
3532
3533local SettingsRemote = explorerPanel.Parent:WaitForChild("SettingsPanel"):WaitForChild("GetSetting")
3534local GetApiRemote = explorerPanel.Parent:WaitForChild("PropertiesFrame"):WaitForChild("GetApi")
3535local GetAwaitRemote = explorerPanel.Parent:WaitForChild("PropertiesFrame"):WaitForChild("GetAwaiting")
3536local bindSetAwaiting = explorerPanel.Parent:WaitForChild("PropertiesFrame"):WaitForChild("SetAwaiting")
3537
3538local SaveInstanceWindow = explorerPanel.Parent:WaitForChild("SaveInstance")
3539local ConfirmationWindow = explorerPanel.Parent:WaitForChild("Confirmation")
3540local CautionWindow = explorerPanel.Parent:WaitForChild("Caution")
3541local TableCautionWindow = explorerPanel.Parent:WaitForChild("TableCaution")
3542
3543local RemoteWindow = explorerPanel.Parent:WaitForChild("CallRemote")
3544
3545local ScriptEditor = explorerPanel.Parent:WaitForChild("ScriptEditor")
3546local ScriptEditorEvent = ScriptEditor:WaitForChild("OpenScript")
3547
3548local CurrentSaveInstanceWindow
3549local CurrentRemoteWindow
3550
3551local lastSelectedNode
3552
3553local DexStorage
3554local DexStorageMain
3555local DexStorageEnabled
3556
3557if saveinstance then DexStorageEnabled = true end
3558
3559if DexStorageEnabled then
3560 DexStorage = Instance.new("Folder")
3561 DexStorage.Name = "Dex"
3562 DexStorageMain = Instance.new("Folder", DexStorage)
3563 DexStorageMain.Name = "DexStorage"
3564end
3565
3566local RunningScriptsStorage
3567local RunningScriptsStorageMain
3568local RunningScriptsStorageEnabled
3569
3570if getscripts then RunningScriptsStorageEnabled = true end
3571
3572if RunningScriptsStorageEnabled then
3573 RunningScriptsStorage = Instance.new("Folder")
3574 RunningScriptsStorage.Name = "Dex Internal Storage"
3575 RunningScriptsStorageMain = Instance.new("Folder", RunningScriptsStorage)
3576 RunningScriptsStorageMain.Name = "Running Scripts"
3577end
3578
3579local UpvalueStorage
3580local UpvalueStorageVariables
3581local UpvalueStorageFunctions
3582local UpvalueStorageEnabled
3583
3584if vars and funcs then UpvalueStorageEnabled = true end
3585
3586if UpvalueStorageEnabled then
3587 UpvalueStorage = Instance.new('Folder')
3588 UpvalueStorage.Name = 'Upvalue Storage'
3589 UpvalueStorageVariables = Instance.new("Folder", UpvalueStorage)
3590 UpvalueStorageVariables.Name = "Upvalue Variables"
3591 UpvalueStorageFunctions = Instance.new("Folder", UpvalueStorage)
3592 UpvalueStorageFunctions.Name = "Upvalue Functions"
3593 for i, v in pairs(vars) do
3594 pcall(function()
3595 local n = Instance.new('StringValue', UpvalueStorageVariables)
3596 n.Name = tostring(i);
3597 n.Value = tostring(v);
3598 end)
3599 end
3600 for i, v in pairs(funcs) do
3601 pcall(function()
3602 local n = Instance.new('StringValue', UpvalueStorageFunctions)
3603 n.Name = tostring(i);
3604 n.Value = tostring(v);
3605 end)
3606 end
3607end
3608
3609local listFrame = Create('Frame',{
3610 Name = "List";
3611 BackgroundTransparency = 1;
3612 ClipsDescendants = true;
3613 Position = UDim2.new(0,0,0,HEADER_SIZE);
3614 Size = UDim2.new(1,-GUI_SIZE,1,-HEADER_SIZE);
3615 Parent = explorerPanel;
3616})
3617
3618local scrollBar = ScrollBar(false)
3619scrollBar.PageIncrement = 1
3620Create(scrollBar.GUI,{
3621 Position = UDim2.new(1,-GUI_SIZE,0,HEADER_SIZE);
3622 Size = UDim2.new(0,GUI_SIZE,1,-HEADER_SIZE);
3623 Parent = explorerPanel;
3624})
3625
3626local scrollBarH = ScrollBar(true)
3627scrollBarH.PageIncrement = GUI_SIZE
3628Create(scrollBarH.GUI,{
3629 Position = UDim2.new(0,0,1,-GUI_SIZE);
3630 Size = UDim2.new(1,-GUI_SIZE,0,GUI_SIZE);
3631 Visible = false;
3632 Parent = explorerPanel;
3633})
3634
3635local headerFrame = Create('Frame',{
3636 Name = "Header";
3637 BackgroundColor3 = GuiColor.Background;
3638 BorderColor3 = GuiColor.Border;
3639 Position = UDim2.new(0,0,0,0);
3640 Size = UDim2.new(1,0,0,HEADER_SIZE);
3641 Parent = explorerPanel;
3642 Create('TextLabel',{
3643 Text = "Explorer";
3644 BackgroundTransparency = 1;
3645 TextColor3 = GuiColor.Text;
3646 TextXAlignment = 'Left';
3647 Font = FONT;
3648 FontSize = FONT_SIZE;
3649 Position = UDim2.new(0,4,0,0);
3650 Size = UDim2.new(1,-4,0.5,0);
3651 });
3652})
3653
3654local explorerFilter = Create('TextBox',{
3655 Text = "Filter Workspace";
3656 BackgroundTransparency = 0.8;
3657 TextColor3 = GuiColor.Text;
3658 TextXAlignment = 'Left';
3659 Font = FONT;
3660 FontSize = FONT_SIZE;
3661 Position = UDim2.new(0,4,0.5,0);
3662 Size = UDim2.new(1,-8,0.5,-2);
3663});
3664explorerFilter.Parent = headerFrame
3665
3666SetZIndexOnChanged(explorerPanel)
3667
3668local function CreateColor3(r, g, b) return Color3.new(r/255,g/255,b/255) end
3669
3670local Styles = {
3671 Font = Enum.Font.Arial;
3672 Margin = 5;
3673 Black = CreateColor3(0,0,0);
3674 White = CreateColor3(24,24,24);
3675}
3676
3677local Row = {
3678 Font = Styles.Font;
3679 FontSize = Enum.FontSize.Size14;
3680 TextXAlignment = Enum.TextXAlignment.Left;
3681 TextColor = Styles.Black;
3682 TextColorOver = Styles.White;
3683 TextLockedColor = CreateColor3(155,155,155);
3684 Height = 24;
3685 BorderColor = CreateColor3(216/4,216/4,216/4);
3686 BackgroundColor = Styles.White;
3687 BackgroundColorAlternate = CreateColor3(32, 32, 32);
3688 BackgroundColorMouseover = CreateColor3(40, 40, 40);
3689 TitleMarginLeft = 15;
3690}
3691
3692local DropDown = {
3693 Font = Styles.Font;
3694 FontSize = Enum.FontSize.Size14;
3695 TextColor = CreateColor3(255,255,255);
3696 TextColorOver = Color3.new(1, 1, 1);
3697 TextXAlignment = Enum.TextXAlignment.Left;
3698 Height = 16;
3699 BackColor = Styles.White;
3700 BackColorOver = CreateColor3(190, 90, 0);
3701 BorderColor = CreateColor3(45,45,45);
3702 BorderSizePixel = 2;
3703 ArrowColor = CreateColor3(160/2,160/2,160/2);
3704 ArrowColorOver = Styles.Black;
3705}
3706
3707local currentRightClickMenu
3708local CurrentInsertObjectWindow
3709local CurrentFunctionCallerWindow
3710
3711local RbxApi
3712
3713function ClassCanCreate(IName)
3714 local success,err = pcall(function() Instance.new(IName) end)
3715 if err then
3716 return false
3717 else
3718 return true
3719 end
3720end
3721
3722function GetClasses()
3723 if RbxApi == nil then return {} end
3724 local classTable = {}
3725 for i,v in pairs(RbxApi.Classes) do
3726 if ClassCanCreate(v.Name) then
3727 table.insert(classTable,v.Name)
3728 end
3729 end
3730 return classTable
3731end
3732
3733local function sortAlphabetic(t, property)
3734 table.sort(t,
3735 function(x,y) return x[property] < y[property]
3736 end)
3737end
3738
3739local function FunctionIsHidden(functionData)
3740 local tags = functionData["tags"]
3741 for _,name in pairs(tags) do
3742 if name == "deprecated"
3743 or name == "hidden"
3744 or name == "writeonly" then
3745 return true
3746 end
3747 end
3748 return false
3749end
3750
3751local function GetAllFunctions(className)
3752 local class = RbxApi.Classes[className]
3753 local functions = {}
3754
3755 if not class then return functions end
3756
3757 while class do
3758 if class.Name == "Instance" then break end
3759 for _,nextFunction in pairs(class.Functions) do
3760 if not FunctionIsHidden(nextFunction) then
3761 table.insert(functions, nextFunction)
3762 end
3763 end
3764 class = RbxApi.Classes[class.Superclass]
3765 end
3766
3767 sortAlphabetic(functions, "Name")
3768
3769 return functions
3770end
3771
3772function GetFunctions()
3773 if RbxApi == nil then return {} end
3774 local List = SelectionVar():Get()
3775
3776 if #List == 0 then return end
3777
3778 local MyObject = List[1]
3779
3780 local functionTable = {}
3781 for i,v in pairs(GetAllFunctions(MyObject.ClassName)) do
3782 table.insert(functionTable,v)
3783 end
3784 return functionTable
3785end
3786
3787function CreateInsertObjectMenu(choices, currentChoice, readOnly, onClick)
3788 local mouse = game:GetService'Players'.LocalPlayer:GetMouse()
3789 local totalSize = explorerPanel.Parent.AbsoluteSize.y
3790 if #choices == 0 then return end
3791
3792 table.sort(choices, function(a,b) return a < b end)
3793
3794 local frame = Instance.new("Frame")
3795 frame.Name = "InsertObject"
3796 frame.Size = UDim2.new(0, 200, 1, 0)
3797 frame.BackgroundTransparency = 1
3798 frame.Active = true
3799
3800 local menu = nil
3801 local arrow = nil
3802 local expanded = false
3803 local margin = DropDown.BorderSizePixel;
3804
3805 --[[
3806 local button = Instance.new("TextButton")
3807 button.Font = Row.Font
3808 button.FontSize = Row.FontSize
3809 button.TextXAlignment = Row.TextXAlignment
3810 button.BackgroundTransparency = 1
3811 button.TextColor3 = Row.TextColor
3812 if readOnly then
3813 button.TextColor3 = Row.TextLockedColor
3814 end
3815 button.Text = currentChoice
3816 button.Size = UDim2.new(1, -2 * Styles.Margin, 1, 0)
3817 button.Position = UDim2.new(0, Styles.Margin, 0, 0)
3818 button.Parent = frame
3819 --]]
3820
3821 local function hideMenu()
3822 expanded = false
3823 --showArrow(DropDown.ArrowColor)
3824 if frame then
3825 --frame:Destroy()
3826 CurrentInsertObjectWindow.Visible = false
3827 end
3828 end
3829
3830 local function showMenu()
3831 expanded = true
3832 menu = Instance.new("ScrollingFrame")
3833 menu.Size = UDim2.new(0,200,1,0)
3834 menu.CanvasSize = UDim2.new(0, 200, 0, #choices * DropDown.Height)
3835 menu.Position = UDim2.new(0, margin, 0, 0)
3836 menu.BackgroundTransparency = 0
3837 menu.BackgroundColor3 = DropDown.BackColor
3838 menu.BorderColor3 = DropDown.BorderColor
3839 menu.BorderSizePixel = DropDown.BorderSizePixel
3840 menu.TopImage = "rbxasset://textures/blackBkg_square.png"
3841 menu.MidImage = "rbxasset://textures/blackBkg_square.png"
3842 menu.BottomImage = "rbxasset://textures/blackBkg_square.png"
3843 menu.Active = true
3844 menu.ZIndex = 5
3845 menu.Parent = frame
3846
3847 --local parentFrameHeight = script.Parent.List.Size.Y.Offset
3848 --local rowHeight = mouse.Y
3849 --if (rowHeight + menu.Size.Y.Offset) > parentFrameHeight then
3850 -- menu.Position = UDim2.new(0, margin, 0, -1 * (#choices * DropDown.Height) - margin)
3851 --end
3852
3853 local function choice(name)
3854 onClick(name)
3855 hideMenu()
3856 end
3857
3858 for i,name in pairs(choices) do
3859 local option = CreateRightClickMenuItem(name, function()
3860 choice(name)
3861 end,1)
3862 option.Size = UDim2.new(1, 0, 0, 20)
3863 option.Position = UDim2.new(0, 0, 0, (i - 1) * DropDown.Height)
3864 option.ZIndex = menu.ZIndex
3865 option.Parent = menu
3866 end
3867 end
3868
3869
3870 showMenu()
3871
3872
3873 return frame
3874end
3875
3876function CreateFunctionCallerMenu(choices, currentChoice, readOnly, onClick)
3877 local mouse = game:GetService'Players'.LocalPlayer:GetMouse()
3878 local totalSize = explorerPanel.Parent.AbsoluteSize.y
3879 if #choices == 0 then return end
3880
3881 table.sort(choices, function(a,b) return a.Name < b.Name end)
3882
3883 local frame = Instance.new("Frame")
3884 frame.Name = "InsertObject"
3885 frame.Size = UDim2.new(0, 200, 1, 0)
3886 frame.BackgroundTransparency = 1
3887 frame.Active = true
3888
3889 local menu = nil
3890 local arrow = nil
3891 local expanded = false
3892 local margin = DropDown.BorderSizePixel;
3893
3894 local function hideMenu()
3895 expanded = false
3896 --showArrow(DropDown.ArrowColor)
3897 if frame then
3898 --frame:Destroy()
3899 CurrentInsertObjectWindow.Visible = false
3900 end
3901 end
3902
3903 local function showMenu()
3904 expanded = true
3905 menu = Instance.new("ScrollingFrame")
3906 menu.Size = UDim2.new(0,300,1,0)
3907 menu.CanvasSize = UDim2.new(0, 300, 0, #choices * DropDown.Height)
3908 menu.Position = UDim2.new(0, margin, 0, 0)
3909 menu.BackgroundTransparency = 0
3910 menu.BackgroundColor3 = DropDown.BackColor
3911 menu.BorderColor3 = DropDown.BorderColor
3912 menu.BorderSizePixel = DropDown.BorderSizePixel
3913 menu.TopImage = "rbxasset://textures/blackBkg_square.png"
3914 menu.MidImage = "rbxasset://textures/blackBkg_square.png"
3915 menu.BottomImage = "rbxasset://textures/blackBkg_square.png"
3916 menu.Active = true
3917 menu.ZIndex = 5
3918 menu.Parent = frame
3919
3920 --local parentFrameHeight = script.Parent.List.Size.Y.Offset
3921 --local rowHeight = mouse.Y
3922 --if (rowHeight + menu.Size.Y.Offset) > parentFrameHeight then
3923 -- menu.Position = UDim2.new(0, margin, 0, -1 * (#choices * DropDown.Height) - margin)
3924 --end
3925
3926 local function GetParameters(functionData)
3927 local paraString = ""
3928 paraString = paraString.."("
3929 for i,v in pairs(functionData.Arguments) do
3930 paraString = paraString..v.Type.." "..v.Name
3931 if i < #functionData.Arguments then
3932 paraString = paraString..", "
3933 end
3934 end
3935 paraString = paraString..")"
3936 return paraString
3937 end
3938
3939 local function choice(name)
3940 onClick(name)
3941 hideMenu()
3942 end
3943
3944 for i,name in pairs(choices) do
3945 local option = CreateRightClickMenuItem(name.ReturnType.." "..name.Name..GetParameters(name), function()
3946 choice(name)
3947 end,2)
3948 option.Size = UDim2.new(1, 0, 0, 20)
3949 option.Position = UDim2.new(0, 0, 0, (i - 1) * DropDown.Height)
3950 option.ZIndex = menu.ZIndex
3951 option.Parent = menu
3952 end
3953 end
3954
3955
3956 showMenu()
3957
3958
3959 return frame
3960end
3961
3962function CreateInsertObject()
3963 if not CurrentInsertObjectWindow then return end
3964 CurrentInsertObjectWindow.Visible = true
3965 if currentRightClickMenu and CurrentInsertObjectWindow.Visible then
3966 CurrentInsertObjectWindow.Position = UDim2.new(0,currentRightClickMenu.Position.X.Offset-currentRightClickMenu.Size.X.Offset-2,0,0)
3967 end
3968 if CurrentInsertObjectWindow.Visible then
3969 CurrentInsertObjectWindow.Parent = explorerPanel.Parent
3970 end
3971end
3972
3973function CreateFunctionCaller()
3974 if CurrentFunctionCallerWindow then
3975 CurrentFunctionCallerWindow:Destroy()
3976 CurrentFunctionCallerWindow = nil
3977 end
3978 CurrentFunctionCallerWindow = CreateFunctionCallerMenu(
3979 GetFunctions(),
3980 "",
3981 false,
3982 function(option)
3983 CurrentFunctionCallerWindow:Destroy()
3984 CurrentFunctionCallerWindow = nil
3985 local list = SelectionVar():Get()
3986 for i = 1,#list do
3987 pcall(function() Instance.new(option,list[i]) end)
3988 end
3989 -- print(option.Name .. " selected to be called. Function caller being added soon, please wait!")
3990 --CallFunction()
3991 DestroyRightClick()
3992 end
3993 )
3994 if currentRightClickMenu and CurrentFunctionCallerWindow then
3995 CurrentFunctionCallerWindow.Position = UDim2.new(0,currentRightClickMenu.Position.X.Offset-currentRightClickMenu.Size.X.Offset*1.5-2,0,0)
3996 end
3997 if CurrentFunctionCallerWindow then
3998 CurrentFunctionCallerWindow.Parent = explorerPanel.Parent
3999 end
4000end
4001
4002local UserInputService = game:GetService'UserInputService';
4003
4004function GetMouseLocation()
4005 return UserInputService:GetMouseLocation() - Vector2.new(0, 36);
4006end
4007
4008function MouseHoveringOver(GuiObject)
4009 local MLocation = GetMouseLocation();
4010
4011 return (MLocation.x >= GuiObject.AbsolutePosition.X and MLocation.x <= (GuiObject.AbsolutePosition.X + GuiObject.AbsoluteSize.X)) and (MLocation.y >= GuiObject.AbsolutePosition.Y and MLocation.y <= (GuiObject.AbsolutePosition.Y + GuiObject.AbsoluteSize.Y));
4012end
4013
4014function CreateRightClickMenuItem(text, onClick, insObj)
4015 local button = Instance.new("TextButton")
4016 button.Font = DropDown.Font
4017 button.FontSize = DropDown.FontSize
4018 button.TextColor3 = DropDown.TextColor
4019 button.TextXAlignment = DropDown.TextXAlignment
4020 button.BackgroundColor3 = DropDown.BackColor
4021 button.AutoButtonColor = false
4022 button.BorderSizePixel = 0
4023 button.Active = true
4024 button.Text = text
4025
4026 if insObj == 1 then
4027 local newIcon = Icon(nil,ExplorerIndex[text] or 0)
4028 newIcon.Position = UDim2.new(0,0,0,2)
4029 newIcon.Size = UDim2.new(0,16,0,16)
4030 newIcon.IconMap.ZIndex = 5
4031 newIcon.Parent = button
4032 button.Text = "\t\t"..button.Text
4033 elseif insObj == 2 then
4034 button.FontSize = Enum.FontSize.Size11
4035 end
4036
4037 spawn(function()
4038 while button.Parent ~= nil and button.Parent.Parent ~= nil do
4039 game:service'RunService'.Stepped:wait();
4040 if not MouseHoveringOver(button) then
4041 button.TextColor3 = DropDown.TextColor
4042 button.BackgroundColor3 = DropDown.BackColor
4043 end
4044 end
4045 end)
4046
4047 button.MouseEnter:connect(function()
4048 button.TextColor3 = DropDown.TextColorOver
4049 button.BackgroundColor3 = DropDown.BackColorOver
4050 if not insObj and CurrentInsertObjectWindow then
4051 if CurrentInsertObjectWindow.Visible == false and button.Text == "Insert Object" then
4052 CreateInsertObject()
4053 elseif CurrentInsertObjectWindow.Visible and button.Text ~= "Insert Object" then
4054 CurrentInsertObjectWindow.Visible = false
4055 end
4056 end
4057 if not insObj then
4058 if CurrentFunctionCallerWindow and button.Text ~= "Call Function" then
4059 CurrentFunctionCallerWindow:Destroy()
4060 CurrentFunctionCallerWindow = nil
4061 elseif button.Text == "Call Function" then
4062 CreateFunctionCaller()
4063 end
4064 end
4065 end)
4066 button.MouseLeave:connect(function()
4067 button.TextColor3 = DropDown.TextColor
4068 button.BackgroundColor3 = DropDown.BackColor
4069 end)
4070 button.MouseButton1Click:connect(function()
4071 button.TextColor3 = DropDown.TextColor
4072 button.BackgroundColor3 = DropDown.BackColor
4073 onClick(text)
4074 end)
4075 return button
4076end
4077
4078function CreateRightClickMenu(choices, currentChoice, readOnly, onClick)
4079 local mouse = game:GetService'Players'.LocalPlayer:GetMouse()
4080
4081 local frame = Instance.new("Frame")
4082 frame.Name = "DropDown"
4083 frame.Size = UDim2.new(0, 200, 1, 0)
4084 frame.BackgroundTransparency = 1
4085 frame.Active = true
4086
4087 local menu = nil
4088 local arrow = nil
4089 local expanded = false
4090 local margin = DropDown.BorderSizePixel;
4091
4092 --[[
4093 local button = Instance.new("TextButton")
4094 button.Font = Row.Font
4095 button.FontSize = Row.FontSize
4096 button.TextXAlignment = Row.TextXAlignment
4097 button.BackgroundTransparency = 1
4098 button.TextColor3 = Row.TextColor
4099 if readOnly then
4100 button.TextColor3 = Row.TextLockedColor
4101 end
4102 button.Text = currentChoice
4103 button.Size = UDim2.new(1, -2 * Styles.Margin, 1, 0)
4104 button.Position = UDim2.new(0, Styles.Margin, 0, 0)
4105 button.Parent = frame
4106 --]]
4107
4108 local function hideMenu()
4109 expanded = false
4110 --showArrow(DropDown.ArrowColor)
4111 if frame then
4112 frame:Destroy()
4113 DestroyRightClick()
4114 end
4115 end
4116
4117 local function showMenu()
4118 expanded = true
4119 menu = Instance.new("Frame")
4120 menu.Size = UDim2.new(0, 200, 0, #choices * DropDown.Height)
4121 menu.Position = UDim2.new(0, margin, 0, 5)
4122 menu.BackgroundTransparency = 0
4123 menu.BackgroundColor3 = DropDown.BackColor
4124 menu.BorderColor3 = DropDown.BorderColor
4125 menu.BorderSizePixel = DropDown.BorderSizePixel
4126 menu.Active = true
4127 menu.ZIndex = 5
4128 menu.Parent = frame
4129
4130 --local parentFrameHeight = script.Parent.List.Size.Y.Offset
4131 --local rowHeight = mouse.Y
4132 --if (rowHeight + menu.Size.Y.Offset) > parentFrameHeight then
4133 -- menu.Position = UDim2.new(0, margin, 0, -1 * (#choices * DropDown.Height) - margin)
4134 --end
4135
4136 local function choice(name)
4137 onClick(name)
4138 hideMenu()
4139 end
4140
4141 for i,name in pairs(choices) do
4142 local option = CreateRightClickMenuItem(name, function()
4143 choice(name)
4144 end)
4145 option.Size = UDim2.new(1, 0, 0, 20)
4146 option.Position = UDim2.new(0, 0, 0, (i - 1) * DropDown.Height)
4147 option.ZIndex = menu.ZIndex
4148 option.Parent = menu
4149 end
4150 end
4151
4152
4153 showMenu()
4154
4155
4156 return frame
4157end
4158
4159function checkMouseInGui(gui)
4160 if gui == nil then return false end
4161 local plrMouse = game:GetService'Players'.LocalPlayer:GetMouse()
4162 local guiPosition = gui.AbsolutePosition
4163 local guiSize = gui.AbsoluteSize
4164
4165 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
4166 return true
4167 else
4168 return false
4169 end
4170end
4171
4172local clipboard = {}
4173local function delete(o)
4174 o.Parent = nil
4175end
4176
4177local getTextWidth do
4178 local text = Create('TextLabel',{
4179 Name = "TextWidth";
4180 TextXAlignment = 'Left';
4181 TextYAlignment = 'Center';
4182 Font = FONT;
4183 FontSize = FONT_SIZE;
4184 Text = "";
4185 Position = UDim2.new(0,0,0,0);
4186 Size = UDim2.new(1,0,1,0);
4187 Visible = false;
4188 Parent = explorerPanel;
4189 })
4190 function getTextWidth(s)
4191 text.Text = s
4192 return text.TextBounds.x
4193 end
4194end
4195
4196local nameScanned = false
4197-- Holds the game tree converted to a list.
4198local TreeList = {}
4199-- Matches objects to their tree node representation.
4200local NodeLookup = {}
4201
4202local nodeWidth = 0
4203
4204local QuickButtons = {}
4205
4206function filteringWorkspace()
4207 if explorerFilter.Text ~= "" and explorerFilter.Text ~= "Filter Workspace" then
4208 return true
4209 end
4210 return false
4211end
4212
4213function lookForAName(obj,name)
4214 for i,v in pairs(obj:GetDescendants()) do
4215 if string.find(string.lower(v.Name),string.lower(name)) then nameScanned = true end
4216 -- lookForAName(v,name)
4217 end
4218end
4219
4220function scanName(obj)
4221 nameScanned = false
4222 if string.find(string.lower(obj.Name),string.lower(explorerFilter.Text)) then
4223 nameScanned = true
4224 else
4225 lookForAName(obj,explorerFilter.Text)
4226 end
4227 return nameScanned
4228end
4229
4230function updateActions()
4231 for i,v in pairs(QuickButtons) do
4232 if v.Cond() then
4233 v.Toggle(true)
4234 else
4235 v.Toggle(false)
4236 end
4237 end
4238end
4239
4240local updateList,rawUpdateList,updateScroll,rawUpdateSize do
4241 local function r(t)
4242 for i = 1,#t do
4243 if not filteringWorkspace() or scanName(t[i].Object) then
4244 TreeList[#TreeList+1] = t[i]
4245
4246 local w = (t[i].Depth)*(2+ENTRY_PADDING+GUI_SIZE) + 2 + ENTRY_SIZE + 4 + getTextWidth(t[i].Object.Name) + 4
4247 if w > nodeWidth then
4248 nodeWidth = w
4249 end
4250 if t[i].Expanded or filteringWorkspace() then
4251 r(t[i])
4252 end
4253 end
4254 end
4255 end
4256
4257 function rawUpdateSize()
4258 scrollBarH.TotalSpace = nodeWidth
4259 scrollBarH.VisibleSpace = listFrame.AbsoluteSize.x
4260 scrollBarH:Update()
4261 local visible = scrollBarH:CanScrollDown() or scrollBarH:CanScrollUp()
4262 scrollBarH.GUI.Visible = visible
4263
4264 listFrame.Size = UDim2.new(1,-GUI_SIZE,1,-GUI_SIZE*(visible and 1 or 0) - HEADER_SIZE)
4265
4266 scrollBar.VisibleSpace = math.ceil(listFrame.AbsoluteSize.y/ENTRY_BOUND)
4267 scrollBar.GUI.Size = UDim2.new(0,GUI_SIZE,1,-GUI_SIZE*(visible and 1 or 0) - HEADER_SIZE)
4268
4269 scrollBar.TotalSpace = #TreeList+1
4270 scrollBar:Update()
4271 end
4272
4273 function rawUpdateList()
4274 -- Clear then repopulate the entire list. It appears to be fast enough.
4275 TreeList = {}
4276 nodeWidth = 0
4277 r(NodeLookup[workspace.Parent])
4278 if DexStorageEnabled then
4279 r(NodeLookup[DexStorage])
4280 end
4281 if RunningScriptsStorageEnabled then
4282 r(NodeLookup[RunningScriptsStorage])
4283 end
4284 if UpvalueStorageEnabled then
4285 r(NodeLookup[UpvalueStorage])
4286 end
4287 rawUpdateSize()
4288 updateActions()
4289 end
4290
4291 -- Adding or removing large models will cause many updates to occur. We
4292 -- can reduce the number of updates by creating a delay, then dropping any
4293 -- updates that occur during the delay.
4294 local updatingList = false
4295 function updateList()
4296 if updatingList then return end
4297 updatingList = true
4298 wait(2.25)
4299 updatingList = false
4300 rawUpdateList()
4301 end
4302
4303 local updatingScroll = false
4304 function updateScroll()
4305 if updatingScroll then return end
4306 updatingScroll = true
4307 wait(2.25)
4308 updatingScroll = false
4309 scrollBar:Update()
4310 end
4311end
4312
4313local Selection do
4314 local bindGetSelection = explorerPanel:FindFirstChild("GetSelection")
4315 if not bindGetSelection then
4316 bindGetSelection = Create('BindableFunction',{Name = "GetSelection"})
4317 bindGetSelection.Parent = explorerPanel
4318 end
4319
4320 local bindSetSelection = explorerPanel:FindFirstChild("SetSelection")
4321 if not bindSetSelection then
4322 bindSetSelection = Create('BindableFunction',{Name = "SetSelection"})
4323 bindSetSelection.Parent = explorerPanel
4324 end
4325
4326 local bindSelectionChanged = explorerPanel:FindFirstChild("SelectionChanged")
4327 if not bindSelectionChanged then
4328 bindSelectionChanged = Create('BindableEvent',{Name = "SelectionChanged"})
4329 bindSelectionChanged.Parent = explorerPanel
4330 end
4331
4332 local SelectionList = {}
4333 local SelectionSet = {}
4334 local Updates = true
4335 Selection = {
4336 Selected = SelectionSet;
4337 List = SelectionList;
4338 }
4339
4340 local function addObject(object)
4341 -- list update
4342 local lupdate = false
4343 -- scroll update
4344 local supdate = false
4345
4346 if not SelectionSet[object] then
4347 local node = NodeLookup[object]
4348 if node then
4349 table.insert(SelectionList,object)
4350 SelectionSet[object] = true
4351 node.Selected = true
4352
4353 -- expand all ancestors so that selected node becomes visible
4354 node = node.Parent
4355 while node do
4356 if not node.Expanded then
4357 node.Expanded = true
4358 lupdate = true
4359 end
4360 node = node.Parent
4361 end
4362 supdate = true
4363 end
4364 end
4365 return lupdate,supdate
4366 end
4367
4368 function Selection:Set(objects)
4369 local lupdate = false
4370 local supdate = false
4371
4372 if #SelectionList > 0 then
4373 for i = 1,#SelectionList do
4374 local object = SelectionList[i]
4375 local node = NodeLookup[object]
4376 if node then
4377 node.Selected = false
4378 SelectionSet[object] = nil
4379 end
4380 end
4381
4382 SelectionList = {}
4383 Selection.List = SelectionList
4384 supdate = true
4385 end
4386
4387 for i = 1,#objects do
4388 local l,s = addObject(objects[i])
4389 lupdate = l or lupdate
4390 supdate = s or supdate
4391 end
4392
4393 if lupdate then
4394 rawUpdateList()
4395 supdate = true
4396 elseif supdate then
4397 scrollBar:Update()
4398 end
4399
4400 if supdate then
4401 bindSelectionChanged:Fire()
4402 updateActions()
4403 end
4404 end
4405
4406 function Selection:Add(object)
4407 local l,s = addObject(object)
4408 if l then
4409 rawUpdateList()
4410 if Updates then
4411 bindSelectionChanged:Fire()
4412 updateActions()
4413 end
4414 elseif s then
4415 scrollBar:Update()
4416 if Updates then
4417 bindSelectionChanged:Fire()
4418 updateActions()
4419 end
4420 end
4421 end
4422
4423 function Selection:StopUpdates()
4424 Updates = false
4425 end
4426
4427 function Selection:ResumeUpdates()
4428 Updates = true
4429 bindSelectionChanged:Fire()
4430 updateActions()
4431 end
4432
4433 function Selection:Remove(object,noupdate)
4434 if SelectionSet[object] then
4435 local node = NodeLookup[object]
4436 if node then
4437 node.Selected = false
4438 SelectionSet[object] = nil
4439 for i = 1,#SelectionList do
4440 if SelectionList[i] == object then
4441 table.remove(SelectionList,i)
4442 break
4443 end
4444 end
4445
4446 if not noupdate then
4447 scrollBar:Update()
4448 end
4449 bindSelectionChanged:Fire()
4450 updateActions()
4451 end
4452 end
4453 end
4454
4455 function Selection:Get()
4456 local list = {}
4457 for i = 1,#SelectionList do
4458 list[i] = SelectionList[i]
4459 end
4460 return list
4461 end
4462
4463 bindSetSelection.OnInvoke = function(...)
4464 Selection:Set(...)
4465 end
4466
4467 bindGetSelection.OnInvoke = function()
4468 return Selection:Get()
4469 end
4470end
4471
4472function CreateCaution(title,msg)
4473 local newCaution = CautionWindow:Clone()
4474 newCaution.Title.Text = title
4475 newCaution.MainWindow.Desc.Text = msg
4476 newCaution.Parent = explorerPanel.Parent
4477 newCaution.Visible = true
4478 newCaution.MainWindow.Ok.MouseButton1Up:connect(function()
4479 newCaution:Destroy()
4480 end)
4481end
4482
4483function CreateTableCaution(title,msg)
4484 if type(msg) ~= "table" then return CreateCaution(title,tostring(msg)) end
4485 local newCaution = TableCautionWindow:Clone()
4486 newCaution.Title.Text = title
4487
4488 local TableList = newCaution.MainWindow.TableResults
4489 local TableTemplate = newCaution.MainWindow.TableTemplate
4490
4491 for i,v in pairs(msg) do
4492 local newResult = TableTemplate:Clone()
4493 newResult.Type.Text = type(v)
4494 newResult.Value.Text = tostring(v)
4495 newResult.Position = UDim2.new(0,0,0,#TableList:GetChildren() * 20)
4496 newResult.Parent = TableList
4497 TableList.CanvasSize = UDim2.new(0,0,0,#TableList:GetChildren() * 20)
4498 newResult.Visible = true
4499 end
4500 newCaution.Parent = explorerPanel.Parent
4501 newCaution.Visible = true
4502 newCaution.MainWindow.Ok.MouseButton1Up:connect(function()
4503 newCaution:Destroy()
4504 end)
4505end
4506
4507local function Split(str, delimiter)
4508 local start = 1
4509 local t = {}
4510 while true do
4511 local pos = string.find (str, delimiter, start, true)
4512 if not pos then
4513 break
4514 end
4515 table.insert (t, string.sub (str, start, pos - 1))
4516 start = pos + string.len (delimiter)
4517 end
4518 table.insert (t, string.sub (str, start))
4519 return t
4520end
4521
4522local function ToValue(value,type)
4523 if type == "Vector2" then
4524 local list = Split(value,",")
4525 if #list < 2 then return nil end
4526 local x = tonumber(list[1]) or 0
4527 local y = tonumber(list[2]) or 0
4528 return Vector2.new(x,y)
4529 elseif type == "Vector3" then
4530 local list = Split(value,",")
4531 if #list < 3 then return nil end
4532 local x = tonumber(list[1]) or 0
4533 local y = tonumber(list[2]) or 0
4534 local z = tonumber(list[3]) or 0
4535 return Vector3.new(x,y,z)
4536 elseif type == "Color3" then
4537 local list = Split(value,",")
4538 if #list < 3 then return nil end
4539 local r = tonumber(list[1]) or 0
4540 local g = tonumber(list[2]) or 0
4541 local b = tonumber(list[3]) or 0
4542 return Color3.new(r/255,g/255, b/255)
4543 elseif type == "UDim2" then
4544 local list = Split(string.gsub(string.gsub(value, "{", ""),"}",""),",")
4545 if #list < 4 then return nil end
4546 local xScale = tonumber(list[1]) or 0
4547 local xOffset = tonumber(list[2]) or 0
4548 local yScale = tonumber(list[3]) or 0
4549 local yOffset = tonumber(list[4]) or 0
4550 return UDim2.new(xScale, xOffset, yScale, yOffset)
4551 elseif type == "Number" then
4552 return tonumber(value)
4553 elseif type == "String" then
4554 return value
4555 elseif type == "NumberRange" then
4556 local list = Split(value,",")
4557 if #list == 1 then
4558 if tonumber(list[1]) == nil then return nil end
4559 local newVal = tonumber(list[1]) or 0
4560 return NumberRange.new(newVal)
4561 end
4562 if #list < 2 then return nil end
4563 local x = tonumber(list[1]) or 0
4564 local y = tonumber(list[2]) or 0
4565 return NumberRange.new(x,y)
4566 elseif type == "Script" then
4567 local success,err = ypcall(function()
4568 _G.D_E_X_DONOTUSETHISPLEASE = nil
4569 loadstring(
4570 "_G.D_E_X_DONOTUSETHISPLEASE = "..value
4571 )()
4572 return _G.D_E_X_DONOTUSETHISPLEASE
4573 end)
4574 if err then
4575 return nil
4576 end
4577 else
4578 return nil
4579 end
4580end
4581
4582local function ToPropValue(value,type)
4583 if type == "Vector2" then
4584 local list = Split(value,",")
4585 if #list < 2 then return nil end
4586 local x = tonumber(list[1]) or 0
4587 local y = tonumber(list[2]) or 0
4588 return Vector2.new(x,y)
4589 elseif type == "Vector3" then
4590 local list = Split(value,",")
4591 if #list < 3 then return nil end
4592 local x = tonumber(list[1]) or 0
4593 local y = tonumber(list[2]) or 0
4594 local z = tonumber(list[3]) or 0
4595 return Vector3.new(x,y,z)
4596 elseif type == "Color3" then
4597 local list = Split(value,",")
4598 if #list < 3 then return nil end
4599 local r = tonumber(list[1]) or 0
4600 local g = tonumber(list[2]) or 0
4601 local b = tonumber(list[3]) or 0
4602 return Color3.new(r/255,g/255, b/255)
4603 elseif type == "UDim2" then
4604 local list = Split(string.gsub(string.gsub(value, "{", ""),"}",""),",")
4605 if #list < 4 then return nil end
4606 local xScale = tonumber(list[1]) or 0
4607 local xOffset = tonumber(list[2]) or 0
4608 local yScale = tonumber(list[3]) or 0
4609 local yOffset = tonumber(list[4]) or 0
4610 return UDim2.new(xScale, xOffset, yScale, yOffset)
4611 elseif type == "Content" then
4612 return value
4613 elseif type == "float" or type == "int" or type == "double" then
4614 return tonumber(value)
4615 elseif type == "string" then
4616 return value
4617 elseif type == "NumberRange" then
4618 local list = Split(value,",")
4619 if #list == 1 then
4620 if tonumber(list[1]) == nil then return nil end
4621 local newVal = tonumber(list[1]) or 0
4622 return NumberRange.new(newVal)
4623 end
4624 if #list < 2 then return nil end
4625 local x = tonumber(list[1]) or 0
4626 local y = tonumber(list[2]) or 0
4627 return NumberRange.new(x,y)
4628 elseif string.sub(value,1,4) == "Enum" then
4629 local getEnum = value
4630 while true do
4631 local x,y = string.find(getEnum,".")
4632 if y then
4633 getEnum = string.sub(getEnum,y+1)
4634 else
4635 break
4636 end
4637 end
4638 -- print(getEnum)
4639 return getEnum
4640 else
4641 return nil
4642 end
4643end
4644
4645function PromptRemoteCaller(inst)
4646 if CurrentRemoteWindow then
4647 CurrentRemoteWindow:Destroy()
4648 CurrentRemoteWindow = nil
4649 end
4650 CurrentRemoteWindow = RemoteWindow:Clone()
4651 CurrentRemoteWindow.Parent = explorerPanel.Parent
4652 CurrentRemoteWindow.Visible = true
4653
4654 local displayValues = false
4655
4656 local ArgumentList = CurrentRemoteWindow.MainWindow.Arguments
4657 local ArgumentTemplate = CurrentRemoteWindow.MainWindow.ArgumentTemplate
4658
4659 if inst:IsA("RemoteEvent") then
4660 CurrentRemoteWindow.Title.Text = "Fire Event"
4661 CurrentRemoteWindow.MainWindow.Ok.Text = "Fire"
4662 CurrentRemoteWindow.MainWindow.DisplayReturned.Visible = false
4663 CurrentRemoteWindow.MainWindow.Desc2.Visible = false
4664 end
4665
4666 local newArgument = ArgumentTemplate:Clone()
4667 newArgument.Parent = ArgumentList
4668 newArgument.Visible = true
4669 newArgument.Type.MouseButton1Down:connect(function()
4670 createDDown(newArgument.Type,function(choice)
4671 newArgument.Type.Text = choice
4672 end,"Script","Number","String","Color3","Vector3","Vector2","UDim2","NumberRange")
4673 end)
4674
4675 CurrentRemoteWindow.MainWindow.Ok.MouseButton1Up:connect(function()
4676 if CurrentRemoteWindow and inst.Parent ~= nil then
4677 local MyArguments = {}
4678 for i,v in pairs(ArgumentList:GetChildren()) do
4679 table.insert(MyArguments,ToValue(v.Value.Text,v.Type.Text))
4680 end
4681 if inst:IsA("RemoteFunction") then
4682 if displayValues then
4683 spawn(function()
4684 local myResults = inst:InvokeServer(unpack(MyArguments))
4685 if myResults then
4686 CreateTableCaution("Remote Caller",myResults)
4687 else
4688 CreateCaution("Remote Caller","This remote did not return anything.")
4689 end
4690 end)
4691 else
4692 spawn(function()
4693 inst:InvokeServer(unpack(MyArguments))
4694 end)
4695 end
4696 else
4697 inst:FireServer(unpack(MyArguments))
4698 end
4699 CurrentRemoteWindow:Destroy()
4700 CurrentRemoteWindow = nil
4701 end
4702 end)
4703
4704 CurrentRemoteWindow.MainWindow.Add.MouseButton1Up:connect(function()
4705 if CurrentRemoteWindow then
4706 local newArgument = ArgumentTemplate:Clone()
4707 newArgument.Position = UDim2.new(0,0,0,#ArgumentList:GetChildren() * 20)
4708 newArgument.Parent = ArgumentList
4709 ArgumentList.CanvasSize = UDim2.new(0,0,0,#ArgumentList:GetChildren() * 20)
4710 newArgument.Visible = true
4711 newArgument.Type.MouseButton1Down:connect(function()
4712 createDDown(newArgument.Type,function(choice)
4713 newArgument.Type.Text = choice
4714 end,"Script","Number","String","Color3","Vector3","Vector2","UDim2","NumberRange")
4715 end)
4716 end
4717 end)
4718
4719 CurrentRemoteWindow.MainWindow.Subtract.MouseButton1Up:connect(function()
4720 if CurrentRemoteWindow then
4721 if #ArgumentList:GetChildren() > 1 then
4722 ArgumentList:GetChildren()[#ArgumentList:GetChildren()]:Destroy()
4723 ArgumentList.CanvasSize = UDim2.new(0,0,0,#ArgumentList:GetChildren() * 20)
4724 end
4725 end
4726 end)
4727
4728 CurrentRemoteWindow.MainWindow.Cancel.MouseButton1Up:connect(function()
4729 if CurrentRemoteWindow then
4730 CurrentRemoteWindow:Destroy()
4731 CurrentRemoteWindow = nil
4732 end
4733 end)
4734
4735 CurrentRemoteWindow.MainWindow.DisplayReturned.MouseButton1Up:connect(function()
4736 if displayValues then
4737 displayValues = false
4738 CurrentRemoteWindow.MainWindow.DisplayReturned.enabled.Visible = false
4739 else
4740 displayValues = true
4741 CurrentRemoteWindow.MainWindow.DisplayReturned.enabled.Visible = true
4742 end
4743 end)
4744end
4745
4746function PromptSaveInstance(inst)
4747 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
4748 if CurrentSaveInstanceWindow then
4749 CurrentSaveInstanceWindow:Destroy()
4750 CurrentSaveInstanceWindow = nil
4751 if explorerPanel.Parent:FindFirstChild("SaveInstanceOverwriteCaution") then
4752 explorerPanel.Parent.SaveInstanceOverwriteCaution:Destroy()
4753 end
4754 end
4755 CurrentSaveInstanceWindow = SaveInstanceWindow:Clone()
4756 CurrentSaveInstanceWindow.Parent = explorerPanel.Parent
4757 CurrentSaveInstanceWindow.Visible = true
4758
4759 local filename = CurrentSaveInstanceWindow.MainWindow.FileName
4760 local saveObjects = true
4761 local overwriteCaution = false
4762
4763 CurrentSaveInstanceWindow.MainWindow.Save.MouseButton1Up:connect(function()
4764 if readfile and getelysianpath then
4765 if readfile(getelysianpath()..filename.Text..".rbxmx") then
4766 if not overwriteCaution then
4767 overwriteCaution = true
4768 local newCaution = ConfirmationWindow:Clone()
4769 newCaution.Name = "SaveInstanceOverwriteCaution"
4770 newCaution.MainWindow.Desc.Text = "The file, "..filename.Text..".rbxmx, already exists. Overwrite?"
4771 newCaution.Parent = explorerPanel.Parent
4772 newCaution.Visible = true
4773 newCaution.MainWindow.Yes.MouseButton1Up:connect(function()
4774 ypcall(function()
4775 SaveInstance(inst,filename.Text..".rbxmx",not saveObjects)
4776 end)
4777 overwriteCaution = false
4778 newCaution:Destroy()
4779 if CurrentSaveInstanceWindow then
4780 CurrentSaveInstanceWindow:Destroy()
4781 CurrentSaveInstanceWindow = nil
4782 end
4783 end)
4784 newCaution.MainWindow.No.MouseButton1Up:connect(function()
4785 overwriteCaution = false
4786 newCaution:Destroy()
4787 end)
4788 end
4789 else
4790 ypcall(function()
4791 SaveInstance(inst,filename.Text..".rbxmx",not saveObjects)
4792 end)
4793 if CurrentSaveInstanceWindow then
4794 CurrentSaveInstanceWindow:Destroy()
4795 CurrentSaveInstanceWindow = nil
4796 if explorerPanel.Parent:FindFirstChild("SaveInstanceOverwriteCaution") then
4797 explorerPanel.Parent.SaveInstanceOverwriteCaution:Destroy()
4798 end
4799 end
4800 end
4801 else
4802 ypcall(function()
4803 if SaveInstance then
4804 SaveInstance(inst,filename.Text..".rbxmx",not saveObjects)
4805 else
4806 _G.SaveInstance(inst,filename.Text,not saveObjects)
4807 end
4808 end)
4809 if CurrentSaveInstanceWindow then
4810 CurrentSaveInstanceWindow:Destroy()
4811 CurrentSaveInstanceWindow = nil
4812 if explorerPanel.Parent:FindFirstChild("SaveInstanceOverwriteCaution") then
4813 explorerPanel.Parent.SaveInstanceOverwriteCaution:Destroy()
4814 end
4815 end
4816 end
4817 end)
4818 CurrentSaveInstanceWindow.MainWindow.Cancel.MouseButton1Up:connect(function()
4819 if CurrentSaveInstanceWindow then
4820 CurrentSaveInstanceWindow:Destroy()
4821 CurrentSaveInstanceWindow = nil
4822 if explorerPanel.Parent:FindFirstChild("SaveInstanceOverwriteCaution") then
4823 explorerPanel.Parent.SaveInstanceOverwriteCaution:Destroy()
4824 end
4825 end
4826 end)
4827 CurrentSaveInstanceWindow.MainWindow.SaveObjects.MouseButton1Up:connect(function()
4828 if saveObjects then
4829 saveObjects = false
4830 CurrentSaveInstanceWindow.MainWindow.SaveObjects.enabled.Visible = false
4831 else
4832 saveObjects = true
4833 CurrentSaveInstanceWindow.MainWindow.SaveObjects.enabled.Visible = true
4834 end
4835 end)
4836end
4837
4838function DestroyRightClick()
4839 if currentRightClickMenu then
4840 currentRightClickMenu:Destroy()
4841 currentRightClickMenu = nil
4842 end
4843 if CurrentInsertObjectWindow and CurrentInsertObjectWindow.Visible then
4844 CurrentInsertObjectWindow.Visible = false
4845 end
4846end
4847
4848function rightClickMenu(sObj)
4849 local mouse = game:GetService'Players'.LocalPlayer:GetMouse()
4850
4851 local extra = (sObj == RunningScriptsStorageMain and 'Refresh Instances' or nil)
4852
4853 currentRightClickMenu = CreateRightClickMenu(
4854 {
4855 'Cut',
4856 'Copy',
4857 'Paste Into',
4858 'Duplicate',
4859 'Delete',
4860 -- 'Group',
4861 -- 'Ungroup',
4862 'Select Children',
4863 'Teleport To',
4864 -- 'Track',
4865 -- 'Insert Part',
4866 -- 'Insert Object',
4867 'View Script',
4868 'Save Script',
4869 'Dump Function',
4870 'Save Instance',
4871 'Call Function',
4872 'Call Remote',
4873 'Try Get Values',
4874 extra
4875 },
4876 "",
4877 false,
4878 function(option)
4879 if option == "Cut" then
4880 if not Option.Modifiable then return end
4881 clipboard = {}
4882 local list = Selection.List
4883 local cut = {}
4884 for i = 1,#list do
4885 local obj = list[i]:Clone()
4886 if obj then
4887 table.insert(clipboard,obj)
4888 table.insert(cut,list[i])
4889 end
4890 end
4891 for i = 1,#cut do
4892 pcall(delete,cut[i])
4893 end
4894 updateActions()
4895 elseif option == "Copy" then
4896 if not Option.Modifiable then return end
4897 clipboard = {}
4898 local list = Selection.List
4899 for i = 1,#list do
4900 table.insert(clipboard,list[i]:Clone())
4901 end
4902 updateActions()
4903 elseif option == "Paste Into" then
4904 if not Option.Modifiable then return end
4905 local parent = Selection.List[1] or workspace
4906 for i = 1,#clipboard do
4907 clipboard[i]:Clone().Parent = parent
4908 end
4909 elseif option == "Duplicate" then
4910 if not Option.Modifiable then return end
4911 local list = Selection:Get()
4912 for i = 1,#list do
4913 list[i]:Clone().Parent = Selection.List[1].Parent or workspace
4914 end
4915 elseif option == "Delete" then
4916 if not Option.Modifiable then return end
4917 local list = Selection:Get()
4918 for i = 1,#list do
4919 pcall(delete,list[i])
4920 end
4921 Selection:Set({})
4922 elseif option == "Group" then
4923 if not Option.Modifiable then return end
4924 local newModel = Instance.new("Model")
4925 local list = Selection:Get()
4926 newModel.Parent = Selection.List[1].Parent or workspace
4927 for i = 1,#list do
4928 list[i].Parent = newModel
4929 end
4930 Selection:Set({})
4931 elseif option == "Ungroup" then
4932 if not Option.Modifiable then return end
4933 local ungrouped = {}
4934 local list = Selection:Get()
4935 for i = 1,#list do
4936 if list[i]:IsA("Model") then
4937 for i2,v2 in pairs(list[i]:GetChildren()) do
4938 v2.Parent = list[i].Parent or workspace
4939 table.insert(ungrouped,v2)
4940 end
4941 pcall(delete,list[i])
4942 end
4943 end
4944 Selection:Set({})
4945 if SettingsRemote:Invoke("SelectUngrouped") then
4946 for i,v in pairs(ungrouped) do
4947 Selection:Add(v)
4948 end
4949 end
4950 elseif option == "Select Children" then
4951 if not Option.Modifiable then return end
4952 local list = Selection:Get()
4953 Selection:Set({})
4954 Selection:StopUpdates()
4955 for i = 1,#list do
4956 for i2,v2 in pairs(list[i]:GetChildren()) do
4957 Selection:Add(v2)
4958 end
4959 end
4960 Selection:ResumeUpdates()
4961 elseif option == "Teleport To" then
4962 if not Option.Modifiable then return end
4963 local list = Selection:Get()
4964 for i = 1,#list do
4965 if list[i]:IsA("BasePart") then
4966 pcall(function()
4967 game:GetService'Players'.LocalPlayer.Character.HumanoidRootPart.CFrame = list[i].CFrame
4968 end)
4969 break
4970 end
4971 end
4972 elseif option == "Insert Part" then
4973 if not Option.Modifiable then return end
4974 local insertedParts = {}
4975 local list = Selection:Get()
4976 for i = 1,#list do
4977 pcall(function()
4978 local newPart = Instance.new("Part")
4979 newPart.Parent = list[i]
4980 newPart.CFrame = CFrame.new(game:GetService'Players'.LocalPlayer.Character.Head.Position) + Vector3.new(0,3,0)
4981 table.insert(insertedParts,newPart)
4982 end)
4983 end
4984 elseif option == "Save Instance" then
4985 if not Option.Modifiable then return end
4986 local list = Selection:Get()
4987 if #list == 1 then
4988 list[1].Archivable = true
4989 ypcall(function()PromptSaveInstance(list[1]:Clone())end)
4990 elseif #list > 1 then
4991 local newModel = Instance.new("Model")
4992 newModel.Name = "SavedInstances"
4993 for i = 1,#list do
4994 ypcall(function()
4995 list[i].Archivable = true
4996 list[i]:Clone().Parent = newModel
4997 end)
4998 end
4999 PromptSaveInstance(newModel)
5000 end
5001 elseif option == "Call Remote" then
5002 if not Option.Modifiable then return end
5003 local list = Selection:Get()
5004 for i = 1,#list do
5005 if list[i]:IsA("RemoteFunction") or list[i]:IsA("RemoteEvent") then
5006 PromptRemoteCaller(list[i])
5007 break
5008 end
5009 end
5010 elseif option == "Save Script" then
5011 if not Option.Modifiable then return end
5012 local list = Selection:Get()
5013 for i = 1,#list do
5014 if list[i]:IsA("LocalScript") or list[i]:IsA("ModuleScript") then
5015 if Synapse then
5016 Synapse:WriteFile(game.PlaceId .. '_' .. list[i].Name:gsub('%W', '') .. '_' .. math.random(100000, 999999) .. '.lua', decompile(list[i]))
5017 elseif writefile then
5018 writefile(game.PlaceId .. '_' .. list[i].Name:gsub('%W', '') .. '_' .. math.random(100000, 999999) .. '.lua', decompile(list[i]));
5019 end
5020 end
5021 end
5022 elseif option == "View Script" then
5023 -- if not Option.Modifiable then return end
5024 local list = Selection:Get()
5025 for i = 1,#list do
5026 if list[i]:IsA("LocalScript") or list[i]:IsA("ModuleScript") then
5027 ScriptEditorEvent:Fire(list[i])
5028 end
5029 end
5030 elseif option == 'Try Get Values' then
5031 for i, sObj in pairs(Selection:Get()) do
5032 if vars[sObj.Name] or funcs[sObj.Name] then
5033 local var = vars[sObj.Name] or funcs[sObj.Name]
5034 if var then
5035 if type(var) == 'table' then
5036 local T = var;
5037 -- table.sort(T, cmp)
5038 for i,v in pairs(T) do
5039 local n = Instance.new('StringValue', sObj);
5040 n.Name = tostring(i);
5041 local a, b = pcall(function()
5042 return tostring(v);
5043 end)
5044 n.Value = a and b or '.undefined';
5045 if (type(v) == 'function') then
5046 funcs[i] = v;
5047 else
5048 vars[i] = v;
5049 end
5050 end
5051 elseif type(var) == 'function' then
5052 local T = debug.getupvalues(var);
5053 -- table.sort(T, cmp)
5054 for i,v in pairs(T) do
5055 local n = Instance.new('StringValue', sObj);
5056 n.Name = tostring(i);
5057 local a, b = pcall(function()
5058 return tostring(v);
5059 end)
5060 n.Value = a and b or '.undefined';
5061 if (type(v) == 'function') then
5062 funcs[i] = v;
5063 else
5064 vars[i] = v;
5065 end
5066 end
5067 end
5068 end
5069 end
5070 if typeof(sObj) == 'Instance' and (sObj:IsA'LocalScript' or sObj:IsA'ModuleScript') then
5071 do -- get script env values
5072 local T = getsenv(sObj);
5073 for i,v in pairs(T) do
5074 if not sObj:FindFirstChild(tostring(i)) then
5075 local n = Instance.new('StringValue', sObj);
5076 n.Name = tostring(i);
5077 local a, b = pcall(function()
5078 return tostring(v);
5079 end)
5080 n.Value = a and b or '.undefined';
5081 if (type(v) == 'function') then
5082 funcs[i] = v;
5083 for fn, p in pairs(debug.getupvalues(v)) do
5084 if not sObj:FindFirstChild(tostring(fn)) then
5085 local n = Instance.new('StringValue', sObj);
5086 n.Name = tostring(fn);
5087 local a, b = pcall(function()
5088 return tostring(p);
5089 end)
5090 n.Value = a and b or '.undefined';
5091 if (type(p) == 'function') then
5092 funcs[fn] = p;
5093 else
5094 vars[fn] = p;
5095 end
5096 end
5097 end
5098 else
5099 vars[i] = v;
5100 end
5101 end
5102 end
5103 end
5104 --[[do -- attempt to get upvalue variables
5105 for i,v in pairs(getreg()) do
5106 if typeof(v) == 'function' then
5107 local T = debug.getupvalues(v);
5108 for i,v in pairs(T) do
5109 if not sObj:FindFirstChild(tostring(i)) then
5110 local n = Instance.new('StringValue', sObj);
5111 n.Name = tostring(i);
5112 local a, b = pcall(function()
5113 return tostring(v);
5114 end)
5115 n.Value = a and b or '.undefined';
5116 if (type(v) == 'function') then
5117 for _, p in pairs(debug.getupvalues(v)) do
5118 if not sObj:FindFirstChild(tostring(_)) then
5119 local n = Instance.new('StringValue', sObj);
5120 n.Name = tostring(_);
5121 local a, b = pcall(function()
5122 return tostring(p);
5123 end)
5124 n.Value = a and b or '.undefined';
5125 end
5126 end
5127 end
5128 end
5129 end
5130 end
5131 end
5132 end]]
5133 end
5134 end
5135 elseif option == 'Dump Function' then
5136 if funcs[sObj.Name] then
5137 local var = funcs[sObj.Name]
5138 if var then
5139 if type(var) == 'function' then
5140 if writefile then
5141 writefile(game.PlaceId .. '_' .. 'DF' .. '_' .. math.random(100000, 999999) .. '.lua', decompile(var));
5142 end
5143 end
5144 end
5145 end
5146 elseif option == 'Refresh Instances' then
5147 for i,v in pairs(getscripts()) do
5148 if v ~= RunningScriptsStorage and v ~= DexStorage and v ~= UpvalueStorage then
5149 if (v:IsA'LocalScript' or v:IsA'ModuleScript' or v:IsA'Script') then
5150 v.Archivable = true;
5151 local ls = v:clone()
5152 if v:IsA'LocalScript' or v:IsA'Script' then ls.Disabled = true; end
5153 ls.Parent = RunningScriptsStorageMain
5154 end
5155 end
5156 end
5157 elseif option == 'Track' then
5158 if not Option.Modifiable then return end
5159 local list = Selection:Get()
5160 for i = 1,#list do
5161 pcall(function()
5162 local name = list[i].Name;
5163 if list[i].Parent:FindFirstChildOfClass'Humanoid' then
5164 name = list[i].Parent.Name;
5165 end
5166 _G.Track(list[i], name, list[i].BrickColor.Color);
5167 end)
5168 end
5169 end
5170 end)
5171 currentRightClickMenu.Parent = explorerPanel.Parent
5172 currentRightClickMenu.Position = UDim2.new(0,mouse.X,0,mouse.Y)
5173 if currentRightClickMenu.AbsolutePosition.X + currentRightClickMenu.AbsoluteSize.X > explorerPanel.AbsolutePosition.X + explorerPanel.AbsoluteSize.X then
5174 currentRightClickMenu.Position = UDim2.new(0, explorerPanel.AbsolutePosition.X + explorerPanel.AbsoluteSize.X - currentRightClickMenu.AbsoluteSize.X, 0, mouse.Y)
5175 end
5176end
5177
5178local function cancelReparentDrag()end
5179local function cancelSelectDrag()end
5180do
5181 local listEntries = {}
5182 local nameConnLookup = {}
5183
5184 local mouseDrag = Create('ImageButton',{
5185 Name = "MouseDrag";
5186 Position = UDim2.new(-0.25,0,-0.25,0);
5187 Size = UDim2.new(1.5,0,1.5,0);
5188 Transparency = 1;
5189 AutoButtonColor = false;
5190 Active = true;
5191 ZIndex = 10;
5192 })
5193 local function dragSelect(last,add,button)
5194 local connDrag
5195 local conUp
5196
5197 conDrag = mouseDrag.MouseMoved:connect(function(x,y)
5198 local pos = Vector2.new(x,y) - listFrame.AbsolutePosition
5199 local size = listFrame.AbsoluteSize
5200 if pos.x < 0 or pos.x > size.x or pos.y < 0 or pos.y > size.y then return end
5201
5202 local i = math.ceil(pos.y/ENTRY_BOUND) + scrollBar.ScrollIndex
5203 -- Mouse may have made a large step, so interpolate between the
5204 -- last index and the current.
5205 for n = i<last and i or last, i>last and i or last do
5206 local node = TreeList[n]
5207 if node then
5208 if add then
5209 Selection:Add(node.Object)
5210 else
5211 Selection:Remove(node.Object)
5212 end
5213 end
5214 end
5215 last = i
5216 end)
5217
5218 function cancelSelectDrag()
5219 mouseDrag.Parent = nil
5220 conDrag:disconnect()
5221 conUp:disconnect()
5222 function cancelSelectDrag()end
5223 end
5224
5225 conUp = mouseDrag[button]:connect(cancelSelectDrag)
5226
5227 mouseDrag.Parent = GetScreen(listFrame)
5228 end
5229
5230 local function dragReparent(object,dragGhost,clickPos,ghostOffset)
5231 local connDrag
5232 local conUp
5233 local conUp2
5234
5235 local parentIndex = nil
5236 local dragged = false
5237
5238 local parentHighlight = Create('Frame',{
5239 Transparency = 1;
5240 Visible = false;
5241 Create('Frame',{
5242 BorderSizePixel = 0;
5243 BackgroundColor3 = Color3.new(0,0,0);
5244 BackgroundTransparency = 0.1;
5245 Position = UDim2.new(0,0,0,0);
5246 Size = UDim2.new(1,0,0,1);
5247 });
5248 Create('Frame',{
5249 BorderSizePixel = 0;
5250 BackgroundColor3 = Color3.new(0,0,0);
5251 BackgroundTransparency = 0.1;
5252 Position = UDim2.new(1,0,0,0);
5253 Size = UDim2.new(0,1,1,0);
5254 });
5255 Create('Frame',{
5256 BorderSizePixel = 0;
5257 BackgroundColor3 = Color3.new(0,0,0);
5258 BackgroundTransparency = 0.1;
5259 Position = UDim2.new(0,0,1,0);
5260 Size = UDim2.new(1,0,0,1);
5261 });
5262 Create('Frame',{
5263 BorderSizePixel = 0;
5264 BackgroundColor3 = Color3.new(0,0,0);
5265 BackgroundTransparency = 0.1;
5266 Position = UDim2.new(0,0,0,0);
5267 Size = UDim2.new(0,1,1,0);
5268 });
5269 })
5270 SetZIndex(parentHighlight,9)
5271
5272 conDrag = mouseDrag.MouseMoved:connect(function(x,y)
5273 local dragPos = Vector2.new(x,y)
5274 if dragged then
5275 local pos = dragPos - listFrame.AbsolutePosition
5276 local size = listFrame.AbsoluteSize
5277
5278 parentIndex = nil
5279 parentHighlight.Visible = false
5280 if pos.x >= 0 and pos.x <= size.x and pos.y >= 0 and pos.y <= size.y + ENTRY_SIZE*2 then
5281 local i = math.ceil(pos.y/ENTRY_BOUND-2)
5282 local node = TreeList[i + scrollBar.ScrollIndex]
5283 if node and node.Object ~= object and not object:IsAncestorOf(node.Object) then
5284 parentIndex = i
5285 local entry = listEntries[i]
5286 if entry then
5287 parentHighlight.Visible = true
5288 parentHighlight.Position = UDim2.new(0,1,0,entry.AbsolutePosition.y-listFrame.AbsolutePosition.y)
5289 parentHighlight.Size = UDim2.new(0,size.x-4,0,entry.AbsoluteSize.y)
5290 end
5291 end
5292 end
5293
5294 dragGhost.Position = UDim2.new(0,dragPos.x+ghostOffset.x,0,dragPos.y+ghostOffset.y)
5295 elseif (clickPos-dragPos).magnitude > 8 then
5296 dragged = true
5297 SetZIndex(dragGhost,9)
5298 dragGhost.IndentFrame.Transparency = 0.25
5299 dragGhost.IndentFrame.EntryText.TextColor3 = GuiColor.TextSelected
5300 dragGhost.Position = UDim2.new(0,dragPos.x+ghostOffset.x,0,dragPos.y+ghostOffset.y)
5301 dragGhost.Parent = GetScreen(listFrame)
5302 parentHighlight.Parent = listFrame
5303 end
5304 end)
5305
5306 function cancelReparentDrag()
5307 mouseDrag.Parent = nil
5308 conDrag:disconnect()
5309 conUp:disconnect()
5310 conUp2:disconnect()
5311 dragGhost:Destroy()
5312 parentHighlight:Destroy()
5313 function cancelReparentDrag()end
5314 end
5315
5316 local wasSelected = Selection.Selected[object]
5317 if not wasSelected and Option.Selectable then
5318 Selection:Set({object})
5319 end
5320
5321 conUp = mouseDrag.MouseButton1Up:connect(function()
5322 cancelReparentDrag()
5323 if dragged then
5324 if parentIndex then
5325 local parentNode = TreeList[parentIndex + scrollBar.ScrollIndex]
5326 if parentNode then
5327 parentNode.Expanded = true
5328
5329 local parentObj = parentNode.Object
5330 local function parent(a,b)
5331 a.Parent = b
5332 end
5333 if Option.Selectable then
5334 local list = Selection.List
5335 for i = 1,#list do
5336 pcall(parent,list[i],parentObj)
5337 end
5338 else
5339 pcall(parent,object,parentObj)
5340 end
5341 end
5342 end
5343 else
5344 -- do selection click
5345 if wasSelected and Option.Selectable then
5346 Selection:Set({})
5347 end
5348 end
5349 end)
5350 conUp2 = mouseDrag.MouseButton2Down:connect(function()
5351 cancelReparentDrag()
5352 end)
5353
5354 mouseDrag.Parent = GetScreen(listFrame)
5355 end
5356
5357 local entryTemplate = Create('ImageButton',{
5358 Name = "Entry";
5359 Transparency = 1;
5360 AutoButtonColor = false;
5361 Position = UDim2.new(0,0,0,0);
5362 Size = UDim2.new(1,0,0,ENTRY_SIZE);
5363 Create('Frame',{
5364 Name = "IndentFrame";
5365 BackgroundTransparency = 1;
5366 BackgroundColor3 = GuiColor.Selected;
5367 BorderColor3 = GuiColor.BorderSelected;
5368 Position = UDim2.new(0,0,0,0);
5369 Size = UDim2.new(1,0,1,0);
5370 Create(Icon('ImageButton',0),{
5371 Name = "Expand";
5372 AutoButtonColor = false;
5373 Position = UDim2.new(0,-GUI_SIZE,0.5,-GUI_SIZE/2);
5374 Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE);
5375 });
5376 Create(Icon(nil,0),{
5377 Name = "ExplorerIcon";
5378 Position = UDim2.new(0,2+ENTRY_PADDING,0.5,-GUI_SIZE/2);
5379 Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE);
5380 });
5381 Create('TextLabel',{
5382 Name = "EntryText";
5383 BackgroundTransparency = 1;
5384 TextColor3 = GuiColor.Text;
5385 TextXAlignment = 'Left';
5386 TextYAlignment = 'Center';
5387 Font = FONT;
5388 FontSize = FONT_SIZE;
5389 Text = "";
5390 Position = UDim2.new(0,2+ENTRY_SIZE+4,0,0);
5391 Size = UDim2.new(1,-2,1,0);
5392 });
5393 });
5394 })
5395
5396 function scrollBar.UpdateCallback(self)
5397 for i = 1,self.VisibleSpace do
5398 local node = TreeList[i + self.ScrollIndex]
5399 if node then
5400 local entry = listEntries[i]
5401 if not entry then
5402 entry = Create(entryTemplate:Clone(),{
5403 Position = UDim2.new(0,2,0,ENTRY_BOUND*(i-1)+2);
5404 Size = UDim2.new(0,nodeWidth,0,ENTRY_SIZE);
5405 ZIndex = listFrame.ZIndex;
5406 })
5407 listEntries[i] = entry
5408
5409 local expand = entry.IndentFrame.Expand
5410 expand.MouseEnter:connect(function()
5411 local node = TreeList[i + self.ScrollIndex]
5412 if #node > 0 then
5413 if node.Expanded then
5414 Icon(expand,NODE_EXPANDED_OVER)
5415 else
5416 Icon(expand,NODE_COLLAPSED_OVER)
5417 end
5418 end
5419 end)
5420 expand.MouseLeave:connect(function()
5421 local node = TreeList[i + self.ScrollIndex]
5422 if #node > 0 then
5423 if node.Expanded then
5424 Icon(expand,NODE_EXPANDED)
5425 else
5426 Icon(expand,NODE_COLLAPSED)
5427 end
5428 end
5429 end)
5430 expand.MouseButton1Down:connect(function()
5431 local node = TreeList[i + self.ScrollIndex]
5432 if #node > 0 then
5433 node.Expanded = not node.Expanded
5434 if node.Object == explorerPanel.Parent and node.Expanded then
5435 CreateCaution("Warning","Please be careful when editing instances inside here, this is like the System32 of Dex and modifying objects here can break Dex.")
5436 end
5437 -- use raw update so the list updates instantly
5438 rawUpdateList()
5439 end
5440 end)
5441
5442 entry.MouseButton1Down:connect(function(x,y)
5443 local node = TreeList[i + self.ScrollIndex]
5444 DestroyRightClick()
5445 if GetAwaitRemote:Invoke() then
5446 bindSetAwaiting:Fire(node.Object)
5447 return
5448 end
5449
5450 if not HoldingShift then
5451 lastSelectedNode = i + self.ScrollIndex
5452 end
5453
5454 if HoldingShift and not filteringWorkspace() then
5455 if lastSelectedNode then
5456 if i + self.ScrollIndex - lastSelectedNode > 0 then
5457 Selection:StopUpdates()
5458 for i2 = 1, i + self.ScrollIndex - lastSelectedNode do
5459 local newNode = TreeList[lastSelectedNode + i2]
5460 if newNode then
5461 Selection:Add(newNode.Object)
5462 end
5463 end
5464 Selection:ResumeUpdates()
5465 else
5466 Selection:StopUpdates()
5467 for i2 = i + self.ScrollIndex - lastSelectedNode, 1 do
5468 local newNode = TreeList[lastSelectedNode + i2]
5469 if newNode then
5470 Selection:Add(newNode.Object)
5471 end
5472 end
5473 Selection:ResumeUpdates()
5474 end
5475 end
5476 return
5477 end
5478
5479 if HoldingCtrl then
5480 if Selection.Selected[node.Object] then
5481 Selection:Remove(node.Object)
5482 else
5483 Selection:Add(node.Object)
5484 end
5485 return
5486 end
5487 if Option.Modifiable then
5488 local pos = Vector2.new(x,y)
5489 dragReparent(node.Object,entry:Clone(),pos,entry.AbsolutePosition-pos)
5490 elseif Option.Selectable then
5491 if Selection.Selected[node.Object] then
5492 Selection:Set({})
5493 else
5494 Selection:Set({node.Object})
5495 end
5496 dragSelect(i+self.ScrollIndex,true,'MouseButton1Up')
5497 end
5498 end)
5499
5500 entry.MouseButton2Down:connect(function()
5501 if not Option.Selectable then return end
5502
5503 DestroyRightClick()
5504
5505 curSelect = entry
5506
5507 local node = TreeList[i + self.ScrollIndex]
5508
5509 if GetAwaitRemote:Invoke() then
5510 bindSetAwaiting:Fire(node.Object)
5511 return
5512 end
5513
5514 if not Selection.Selected[node.Object] then
5515 Selection:Set({node.Object})
5516 end
5517 end)
5518
5519
5520 entry.MouseButton2Up:connect(function()
5521 if not Option.Selectable then return end
5522
5523 local node = TreeList[i + self.ScrollIndex]
5524
5525 if checkMouseInGui(curSelect) then
5526 rightClickMenu(node.Object)
5527 end
5528 end)
5529
5530 entry.Parent = listFrame
5531 end
5532
5533 entry.Visible = true
5534
5535 local object = node.Object
5536
5537 -- update expand icon
5538 if #node == 0 then
5539 entry.IndentFrame.Expand.Visible = false
5540 elseif node.Expanded then
5541 Icon(entry.IndentFrame.Expand,NODE_EXPANDED)
5542 entry.IndentFrame.Expand.Visible = true
5543 else
5544 Icon(entry.IndentFrame.Expand,NODE_COLLAPSED)
5545 entry.IndentFrame.Expand.Visible = true
5546 end
5547
5548 -- update explorer icon
5549 Icon(entry.IndentFrame.ExplorerIcon,ExplorerIndex[object.ClassName] or 0)
5550
5551 -- update indentation
5552 local w = (node.Depth)*(2+ENTRY_PADDING+GUI_SIZE)
5553 entry.IndentFrame.Position = UDim2.new(0,w,0,0)
5554 entry.IndentFrame.Size = UDim2.new(1,-w,1,0)
5555
5556 -- update name change detection
5557 if nameConnLookup[entry] then
5558 nameConnLookup[entry]:disconnect()
5559 end
5560 local text = entry.IndentFrame.EntryText
5561 text.Text = object.Name
5562 nameConnLookup[entry] = node.Object.Changed:connect(function(p)
5563 if p == 'Name' then
5564 text.Text = object.Name
5565 end
5566 end)
5567
5568 -- update selection
5569 entry.IndentFrame.Transparency = node.Selected and 0 or 1
5570 text.TextColor3 = GuiColor[node.Selected and 'TextSelected' or 'Text']
5571
5572 entry.Size = UDim2.new(0,nodeWidth,0,ENTRY_SIZE)
5573 elseif listEntries[i] then
5574 listEntries[i].Visible = false
5575 end
5576 end
5577 for i = self.VisibleSpace+1,self.TotalSpace do
5578 local entry = listEntries[i]
5579 if entry then
5580 listEntries[i] = nil
5581 entry:Destroy()
5582 end
5583 end
5584 end
5585
5586 function scrollBarH.UpdateCallback(self)
5587 for i = 1,scrollBar.VisibleSpace do
5588 local node = TreeList[i + scrollBar.ScrollIndex]
5589 if node then
5590 local entry = listEntries[i]
5591 if entry then
5592 entry.Position = UDim2.new(0,2 - scrollBarH.ScrollIndex,0,ENTRY_BOUND*(i-1)+2)
5593 end
5594 end
5595 end
5596 end
5597
5598 Connect(listFrame.Changed,function(p)
5599 if p == 'AbsoluteSize' then
5600 rawUpdateSize()
5601 end
5602 end)
5603
5604 local wheelAmount = 6
5605
5606 explorerPanel.MouseWheelForward:connect(function()
5607 if input ~= nil and input.down ~= nil and input.down.leftshift then
5608 if scrollBarH.VisibleSpace - 1 > wheelAmount then
5609 scrollBarH:ScrollTo(scrollBarH.ScrollIndex - wheelAmount)
5610 else
5611 scrollBarH:ScrollTo(scrollBarH.ScrollIndex - scrollBarH.VisibleSpace)
5612 end
5613 else
5614 if scrollBar.VisibleSpace - 1 > wheelAmount then
5615 scrollBar:ScrollTo(scrollBar.ScrollIndex - wheelAmount)
5616 else
5617 scrollBar:ScrollTo(scrollBar.ScrollIndex - scrollBar.VisibleSpace)
5618 end
5619 end
5620 end)
5621 explorerPanel.MouseWheelBackward:connect(function()
5622 if input ~= nil and input.down ~= nil and input.down.leftshift then
5623 if scrollBarH.VisibleSpace - 1 > wheelAmount then
5624 scrollBarH:ScrollTo(scrollBarH.ScrollIndex + wheelAmount)
5625 else
5626 scrollBarH:ScrollTo(scrollBarH.ScrollIndex + scrollBarH.VisibleSpace)
5627 end
5628 else
5629 if scrollBar.VisibleSpace - 1 > wheelAmount then
5630 scrollBar:ScrollTo(scrollBar.ScrollIndex + wheelAmount)
5631 else
5632 scrollBar:ScrollTo(scrollBar.ScrollIndex + scrollBar.VisibleSpace)
5633 end
5634 end
5635 end)
5636end
5637
5638----------------------------------------------------------------
5639----------------------------------------------------------------
5640----------------------------------------------------------------
5641----------------------------------------------------------------
5642---- Object detection
5643
5644-- Inserts `v` into `t` at `i`. Also sets `Index` field in `v`.
5645local function insert(t,i,v)
5646 for n = #t,i,-1 do
5647 local v = t[n]
5648 v.Index = n+1
5649 t[n+1] = v
5650 end
5651 v.Index = i
5652 t[i] = v
5653end
5654
5655-- Removes `i` from `t`. Also sets `Index` field in removed value.
5656local function remove(t,i)
5657 local v = t[i]
5658 for n = i+1,#t do
5659 local v = t[n]
5660 v.Index = n-1
5661 t[n-1] = v
5662 end
5663 t[#t] = nil
5664 v.Index = 0
5665 return v
5666end
5667
5668-- Returns how deep `o` is in the tree.
5669local function depth(o)
5670 local d = -1
5671 while o do
5672 o = o.Parent
5673 d = d + 1
5674 end
5675 return d
5676end
5677
5678
5679local connLookup = {}
5680
5681-- Returns whether a node would be present in the tree list
5682local function nodeIsVisible(node)
5683 local visible = true
5684 node = node.Parent
5685 while node and visible do
5686 visible = visible and node.Expanded
5687 node = node.Parent
5688 end
5689 return visible
5690end
5691
5692-- Removes an object's tree node. Called when the object stops existing in the
5693-- game tree.
5694local function removeObject(object)
5695 local objectNode = NodeLookup[object]
5696 if not objectNode then
5697 return
5698 end
5699
5700 local visible = nodeIsVisible(objectNode)
5701
5702 Selection:Remove(object,true)
5703
5704 local parent = objectNode.Parent
5705 remove(parent,objectNode.Index)
5706 NodeLookup[object] = nil
5707 connLookup[object]:disconnect()
5708 connLookup[object] = nil
5709
5710 if visible then
5711 updateList()
5712 elseif nodeIsVisible(parent) then
5713 updateScroll()
5714 end
5715end
5716
5717-- Moves a tree node to a new parent. Called when an existing object's parent
5718-- changes.
5719local function moveObject(object,parent)
5720 local objectNode = NodeLookup[object]
5721 if not objectNode then
5722 return
5723 end
5724
5725 local parentNode = NodeLookup[parent]
5726 if not parentNode then
5727 return
5728 end
5729
5730 local visible = nodeIsVisible(objectNode)
5731
5732 remove(objectNode.Parent,objectNode.Index)
5733 objectNode.Parent = parentNode
5734
5735 objectNode.Depth = depth(object)
5736 local function r(node,d)
5737 for i = 1,#node do
5738 node[i].Depth = d
5739 r(node[i],d+1)
5740 end
5741 end
5742 r(objectNode,objectNode.Depth+1)
5743
5744 insert(parentNode,#parentNode+1,objectNode)
5745
5746 if visible or nodeIsVisible(objectNode) then
5747 updateList()
5748 elseif nodeIsVisible(objectNode.Parent) then
5749 updateScroll()
5750 end
5751end
5752
5753-- ScriptContext['/Libraries/LibraryRegistration/LibraryRegistration']
5754-- This RobloxLocked object lets me index its properties for some reason
5755
5756local function check(object)
5757 return object.AncestryChanged
5758end
5759
5760-- Creates a new tree node from an object. Called when an object starts
5761-- existing in the game tree.
5762local function addObject(object,noupdate)
5763 if script then
5764 -- protect against naughty RobloxLocked objects
5765 local s = pcall(check,object)
5766 if not s then
5767 return
5768 end
5769 end
5770
5771 local parentNode = NodeLookup[object.Parent]
5772 if not parentNode then
5773 return
5774 end
5775
5776 local objectNode = {
5777 Object = object;
5778 Parent = parentNode;
5779 Index = 0;
5780 Expanded = false;
5781 Selected = false;
5782 Depth = depth(object);
5783 }
5784
5785 connLookup[object] = Connect(object.AncestryChanged,function(c,p)
5786 if c == object then
5787 if p == nil then
5788 removeObject(c)
5789 else
5790 moveObject(c,p)
5791 end
5792 end
5793 end)
5794
5795 NodeLookup[object] = objectNode
5796 insert(parentNode,#parentNode+1,objectNode)
5797
5798 if not noupdate then
5799 if nodeIsVisible(objectNode) then
5800 updateList()
5801 elseif nodeIsVisible(objectNode.Parent) then
5802 updateScroll()
5803 end
5804 end
5805end
5806
5807local function makeObject(obj,par)
5808 local newObject = Instance.new(obj.ClassName)
5809 for i,v in pairs(obj.Properties) do
5810 ypcall(function()
5811 local newProp
5812 newProp = ToPropValue(v.Value,v.Type)
5813 newObject[v.Name] = newProp
5814 end)
5815 end
5816 newObject.Parent = par
5817end
5818
5819local function writeObject(obj)
5820 local newObject = {ClassName = obj.ClassName, Properties = {}}
5821 for i,v in pairs(RbxApi.GetProperties(obj.className)) do
5822 if v["Name"] ~= "Parent" then
5823 table.insert(newObject.Properties,{Name = v["Name"], Type = v["ValueType"], Value = tostring(obj[v["Name"]])})
5824 end
5825 end
5826 return newObject
5827end
5828
5829local function buildDexStorage()
5830 --[[local localDexStorage
5831
5832 local success,err = ypcall(function()
5833 localDexStorage = game:GetObjects("rbxasset://DexStorage.rbxm")
5834 end)
5835
5836 if success and localDexStorage then
5837 for i,v in pairs(localDexStorage:GetChildren()) do
5838 ypcall(function()
5839 v.Parent = DexStorageMain
5840 end)
5841 end
5842 end]]
5843
5844 updateDexStorageListeners()
5845 --[[
5846 local localDexStorage = readfile(getelysianpath().."DexStorage.txt")--game:GetService("CookiesService"):GetCookieValue("DexStorage")
5847 --local success,err = pcall(function()
5848 if localDexStorage then
5849 local objTable = game:GetService("HttpService"):JSONDecode(localDexStorage)
5850 for i,v in pairs(objTable) do
5851 makeObject(v,DexStorageMain)
5852 end
5853 end
5854 --end)
5855 --]]
5856end
5857
5858local dexStorageDebounce = false
5859local dexStorageListeners = {}
5860
5861local function updateDexStorage()
5862 if dexStorageDebounce then return end
5863 dexStorageDebounce = true
5864
5865 wait()
5866
5867 pcall(function()
5868 saveinstance("content//DexStorage.rbxm",DexStorageMain)
5869 end)
5870
5871 updateDexStorageListeners()
5872
5873 dexStorageDebounce = false
5874 --[[
5875 local success,err = ypcall(function()
5876 local objs = {}
5877 for i,v in pairs(DexStorageMain:GetChildren()) do
5878 table.insert(objs,writeObject(v))
5879 end
5880 writefile(getelysianpath().."DexStorage.txt",game:GetService("HttpService"):JSONEncode(objs))
5881 --game:GetService("CookiesService"):SetCookieValue("DexStorage",game:GetService("HttpService"):JSONEncode(objs))
5882 end)
5883 if err then
5884 CreateCaution("DexStorage Save Fail!","DexStorage broke! If you see this message, report to Raspberry Pi!")
5885 end
5886 print("hi")
5887 --]]
5888end
5889
5890function updateDexStorageListeners()
5891 for i,v in pairs(dexStorageListeners) do
5892 v:Disconnect()
5893 end
5894 dexStorageListeners = {}
5895 for i,v in pairs(DexStorageMain:GetChildren()) do
5896 pcall(function()
5897 local ev = v.Changed:connect(updateDexStorage)
5898 table.insert(dexStorageListeners,ev)
5899 end)
5900 end
5901end