Burkino

Synapse Dex Decompile

Jan 14th, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function CreateInstance(cls,props)
  2. local inst = Instance.new(cls)
  3. for i,v in pairs(props) do
  4. inst[i] = v
  5. end
  6. return inst
  7. end
  8.  
  9. function createDexWindow()
  10. local DexWindow = CreateInstance("ScreenGui",{DisplayOrder=0,Enabled=true,ResetOnSpawn=true,Name="Dex",})
  11. local DexWindow2 = CreateInstance("Frame",{Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.10000000149012,BorderColor3=Color3.new(0.74901962280273,0.74901962280273,0.74901962280273),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(1,0,0.5,36),Rotation=0,Selectable=false,Size=UDim2.new(0,300,0.5,-36),SizeConstraint=0,Visible=true,ZIndex=1,Name="PropertiesFrame",Parent = DexWindow})
  12. local DexWindow3 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.91372555494308,0.91372555494308,0.91372555494308),BackgroundTransparency=0,BorderColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,-36),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,35),SizeConstraint=0,Visible=true,ZIndex=1,Name="Header",Parent = DexWindow2})
  13. local DexWindow4 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="Properties",TextColor3=Color3.new(0,0,0),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.63921570777893,0.63529413938522,0.64705884456635),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,4,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,-4,0.5,0),SizeConstraint=0,Visible=true,ZIndex=1,Name="TextLabel",Parent = DexWindow3})
  14. local DexWindow5 = CreateInstance("TextBox",{ClearTextOnFocus=true,Font=3,FontSize=5,MultiLine=false,Text="Search Properties",TextColor3=Color3.new(0,0,0),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.63921570777893,0.63529413938522,0.64705884456635),BackgroundTransparency=0.80000001192093,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,4,0.5,0),Rotation=0,Selectable=true,Size=UDim2.new(1,-8,0.5,-3),SizeConstraint=0,Visible=true,ZIndex=1,Name="TextBox",Parent = DexWindow3})
  15. local DexWindow6 = CreateInstance("BindableFunction",{Name="GetApi",Parent = DexWindow2})
  16. local DexWindow7 = CreateInstance("BindableFunction",{Name="GetAwaiting",Parent = DexWindow2})
  17. local DexWindow8 = CreateInstance("BindableEvent",{Name="SetAwaiting",Parent = DexWindow2})
  18. local DexWindow9 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.10000000149012,BorderColor3=Color3.new(0.74901962280273,0.74901962280273,0.74901962280273),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(1,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(0,300,0.5,0),SizeConstraint=0,Visible=true,ZIndex=1,Name="ExplorerPanel",Parent = DexWindow})
  19. local DexWindow10 = CreateInstance("BindableEvent",{Name="SelectionChanged",Parent = DexWindow9})
  20. local DexWindow11 = CreateInstance("BindableFunction",{Name="SetOption",Parent = DexWindow9})
  21. local DexWindow12 = CreateInstance("BindableFunction",{Name="SetSelection",Parent = DexWindow9})
  22. local DexWindow13 = CreateInstance("BindableFunction",{Name="GetOption",Parent = DexWindow9})
  23. local DexWindow14 = CreateInstance("BindableFunction",{Name="GetSelection",Parent = DexWindow9})
  24. local DexWindow15 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.91372555494308,0.91372555494308,0.91372555494308),BackgroundTransparency=1,BorderColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(1,-330,0,0),Rotation=0,Selectable=false,Size=UDim2.new(0,30,0,180),SizeConstraint=0,Visible=false,ZIndex=2,Name="SideMenu",Parent = DexWindow})
  25. local DexWindow16 = CreateInstance("TextButton",{Font=3,FontSize=7,Text=">",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=24,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=1,TextWrapped=true,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=false,Modal=false,Selected=false,Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.91372555494308,0.91372555494308,0.91372555494308),BackgroundTransparency=0,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,60),Rotation=0,Selectable=true,Size=UDim2.new(0,30,0,30),SizeConstraint=0,Visible=true,ZIndex=1,Name="Toggle",Parent = DexWindow15})
  26. local DexWindow17 = CreateInstance("TextLabel",{Font=4,FontSize=5,Text="DEX",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=true,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(0,30,0,20),SizeConstraint=0,Visible=true,ZIndex=2,Name="Title",Parent = DexWindow15})
  27. local DexWindow18 = CreateInstance("TextLabel",{Font=4,FontSize=4,Text="V1.0.0",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=12,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=true,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,15),Rotation=0,Selectable=false,Size=UDim2.new(0,30,0,20),SizeConstraint=0,Visible=true,ZIndex=2,Name="Version",Parent = DexWindow15})
  28. local DexWindow19 = CreateInstance("ImageLabel",{Image="rbxassetid://474172996",ImageColor3=Color3.new(0.91372555494308,0.91372555494308,0.91372555494308),ImageRectOffset=Vector2.new(0,0),ImageRectSize=Vector2.new(0,0),ImageTransparency=0,ScaleType=0,SliceCenter=Rect.new(0,0,0,0),Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,90),Rotation=180,Selectable=false,Size=UDim2.new(0,30,0,30),SizeConstraint=0,Visible=true,ZIndex=1,Name="Slant",Parent = DexWindow15})
  29. local DexWindow20 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.91372555494308,0.91372555494308,0.91372555494308),BackgroundTransparency=0,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(0,30,0,30),SizeConstraint=0,Visible=true,ZIndex=1,Name="Main",Parent = DexWindow15})
  30. local DexWindow21 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.86274516582489,0.86274516582489,0.86274516582489),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=true,Draggable=false,Position=UDim2.new(0,0,0,30),Rotation=0,Selectable=false,Size=UDim2.new(0,30,0,150),SizeConstraint=0,Visible=true,ZIndex=1,Name="SlideOut",Parent = DexWindow15})
  31. local DexWindow22 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.86274516582489,0.86274516582489,0.86274516582489),BackgroundTransparency=0,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,-150),Rotation=0,Selectable=false,Size=UDim2.new(0,30,0,150),SizeConstraint=0,Visible=true,ZIndex=1,Name="SlideFrame",Parent = DexWindow21})
  32. local DexWindow23 = CreateInstance("TextButton",{Font=3,FontSize=7,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=24,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=false,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,120),Rotation=0,Selectable=true,Size=UDim2.new(0,30,0,30),SizeConstraint=0,Visible=true,ZIndex=2,Name="Explorer",Parent = DexWindow22})
  33. local DexWindow24 = CreateInstance("ImageLabel",{Image="rbxassetid://472635937",ImageColor3=Color3.new(0.27450981736183,0.27450981736183,0.27450981736183),ImageRectOffset=Vector2.new(0,0),ImageRectSize=Vector2.new(0,0),ImageTransparency=0,ScaleType=0,SliceCenter=Rect.new(0,0,0,0),Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,5,0,5),Rotation=0,Selectable=false,Size=UDim2.new(0,20,0,20),SizeConstraint=0,Visible=true,ZIndex=2,Name="Icon",Parent = DexWindow23})
  34. local DexWindow25 = CreateInstance("TextButton",{Font=3,FontSize=7,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=24,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=false,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,90),Rotation=0,Selectable=true,Size=UDim2.new(0,30,0,30),SizeConstraint=0,Visible=true,ZIndex=2,Name="SaveMap",Parent = DexWindow22})
  35. local DexWindow26 = CreateInstance("ImageLabel",{Image="rbxassetid://472636337",ImageColor3=Color3.new(0.27450981736183,0.27450981736183,0.27450981736183),ImageRectOffset=Vector2.new(0,0),ImageRectSize=Vector2.new(0,0),ImageTransparency=0,ScaleType=0,SliceCenter=Rect.new(0,0,0,0),Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,5,0,5),Rotation=0,Selectable=false,Size=UDim2.new(0,20,0,20),SizeConstraint=0,Visible=true,ZIndex=2,Name="Icon",Parent = DexWindow25})
  36. local DexWindow27 = CreateInstance("TextButton",{Font=3,FontSize=7,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=24,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=false,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,30),Rotation=0,Selectable=true,Size=UDim2.new(0,30,0,30),SizeConstraint=0,Visible=true,ZIndex=2,Name="Settings",Parent = DexWindow22})
  37. local DexWindow28 = CreateInstance("ImageLabel",{Image="rbxassetid://472635774",ImageColor3=Color3.new(0.27450981736183,0.27450981736183,0.27450981736183),ImageRectOffset=Vector2.new(0,0),ImageRectSize=Vector2.new(0,0),ImageTransparency=0,ScaleType=0,SliceCenter=Rect.new(0,0,0,0),Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,5,0,5),Rotation=0,Selectable=false,Size=UDim2.new(0,20,0,20),SizeConstraint=0,Visible=true,ZIndex=2,Name="Icon",Parent = DexWindow27})
  38. local DexWindow29 = CreateInstance("TextButton",{Font=3,FontSize=7,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=24,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=false,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,60),Rotation=0,Selectable=true,Size=UDim2.new(0,30,0,30),SizeConstraint=0,Visible=true,ZIndex=2,Name="Remotes",Parent = DexWindow22})
  39. local DexWindow30 = CreateInstance("ImageLabel",{Image="rbxassetid://472636187",ImageColor3=Color3.new(0.27450981736183,0.27450981736183,0.27450981736183),ImageRectOffset=Vector2.new(0,0),ImageRectSize=Vector2.new(0,0),ImageTransparency=0,ScaleType=0,SliceCenter=Rect.new(0,0,0,0),Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,5,0,5),Rotation=0,Selectable=false,Size=UDim2.new(0,20,0,20),SizeConstraint=0,Visible=true,ZIndex=2,Name="Icon",Parent = DexWindow29})
  40. local DexWindow31 = CreateInstance("TextButton",{Font=3,FontSize=7,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=24,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=false,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=true,Size=UDim2.new(0,30,0,30),SizeConstraint=0,Visible=true,ZIndex=2,Name="About",Parent = DexWindow22})
  41. local DexWindow32 = CreateInstance("ImageLabel",{Image="rbxassetid://476354004",ImageColor3=Color3.new(0.27450981736183,0.27450981736183,0.27450981736183),ImageRectOffset=Vector2.new(0,0),ImageRectSize=Vector2.new(0,0),ImageTransparency=0,ScaleType=0,SliceCenter=Rect.new(0,0,0,0),Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,5,0,5),Rotation=0,Selectable=false,Size=UDim2.new(0,20,0,20),SizeConstraint=0,Visible=true,ZIndex=2,Name="Icon",Parent = DexWindow31})
  42. local DexWindow33 = CreateInstance("TextButton",{Font=3,FontSize=7,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=24,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=false,Modal=false,Selected=false,Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.91372555494308,0.91372555494308,0.91372555494308),BackgroundTransparency=0,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,30),Rotation=0,Selectable=true,Size=UDim2.new(0,30,0,30),SizeConstraint=0,Visible=true,ZIndex=2,Name="OpenScriptEditor",Parent = DexWindow15})
  43. local DexWindow34 = CreateInstance("ImageLabel",{Image="rbxassetid://475456048",ImageColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),ImageRectOffset=Vector2.new(0,0),ImageRectSize=Vector2.new(0,0),ImageTransparency=1,ScaleType=0,SliceCenter=Rect.new(0,0,0,0),Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,5,0,5),Rotation=0,Selectable=false,Size=UDim2.new(0,20,0,20),SizeConstraint=0,Visible=true,ZIndex=2,Name="Icon",Parent = DexWindow33})
  44. local DexWindow35 = CreateInstance("TextButton",{Font=3,FontSize=7,Text="<",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=24,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.91372555494308,0.91372555494308,0.91372555494308),BackgroundTransparency=0,BorderColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(1,0,0,0),Rotation=0,Selectable=true,Size=UDim2.new(0,30,0,30),SizeConstraint=0,Visible=true,ZIndex=1,Name="Toggle",Parent = DexWindow})
  45. local DexWindow36 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.10000000149012,BorderColor3=Color3.new(0.74901962280273,0.74901962280273,0.74901962280273),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(1,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(0,300,1,0),SizeConstraint=0,Visible=true,ZIndex=1,Name="SettingsPanel",Parent = DexWindow})
  46. local DexWindow37 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.91372555494308,0.91372555494308,0.91372555494308),BackgroundTransparency=0,BorderColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,17),SizeConstraint=0,Visible=true,ZIndex=1,Name="Header",Parent = DexWindow36})
  47. local DexWindow38 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="Settings",TextColor3=Color3.new(0,0,0),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.63921570777893,0.63529413938522,0.64705884456635),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,4,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,-4,1,0),SizeConstraint=0,Visible=true,ZIndex=1,Name="TextLabel",Parent = DexWindow37})
  48. local DexWindow39 = CreateInstance("BindableFunction",{Name="GetSetting",Parent = DexWindow36})
  49. local DexWindow40 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,18),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,60),SizeConstraint=0,Visible=false,ZIndex=1,Name="SettingTemplate",Parent = DexWindow36})
  50. local DexWindow41 = CreateInstance("TextLabel",{Font=3,FontSize=6,Text="SettingName",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,10,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,-20,0,30),SizeConstraint=0,Visible=true,ZIndex=1,Name="SName",Parent = DexWindow40})
  51. local DexWindow42 = CreateInstance("TextLabel",{Font=3,FontSize=6,Text="Off",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,60,0,30),Rotation=0,Selectable=false,Size=UDim2.new(0,50,0,15),SizeConstraint=0,Visible=true,ZIndex=1,Name="Status",Parent = DexWindow40})
  52. local DexWindow43 = CreateInstance("TextButton",{Font=3,FontSize=5,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.86274516582489,0.86274516582489,0.86274516582489),BackgroundTransparency=0,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,10,0,30),Rotation=0,Selectable=true,Size=UDim2.new(0,40,0,15),SizeConstraint=0,Visible=true,ZIndex=1,Name="Change",Parent = DexWindow40})
  53. local DexWindow44 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0,0.57647061347961,0.86274516582489),BackgroundTransparency=0,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(0,0,0,15),SizeConstraint=0,Visible=true,ZIndex=1,Name="OnBar",Parent = DexWindow43})
  54. local DexWindow45 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0,0,0),BackgroundTransparency=0,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=true,Draggable=false,Position=UDim2.new(0,-2,0,-2),Rotation=0,Selectable=false,Size=UDim2.new(0,10,0,19),SizeConstraint=0,Visible=true,ZIndex=1,Name="Bar",Parent = DexWindow43})
  55. local DexWindow46 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,17),Rotation=0,Selectable=false,Size=UDim2.new(1,0,1,-17),SizeConstraint=0,Visible=true,ZIndex=1,Name="SettingList",Parent = DexWindow36})
  56. local DexWindow47 = CreateInstance("Frame",{Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.91372555494308,0.91372555494308,0.91372555494308),BackgroundTransparency=0,BorderColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BorderSizePixel=1,ClipsDescendants=false,Draggable=true,Position=UDim2.new(0.30000001192093,0,0.30000001192093,0),Rotation=0,Selectable=false,Size=UDim2.new(0,350,0,20),SizeConstraint=0,Visible=false,ZIndex=2,Name="SaveInstance",Parent = DexWindow})
  57. local DexWindow48 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="Save Instance",TextColor3=Color3.new(0,0,0),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.63921570777893,0.63529413938522,0.64705884456635),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,0,1,0),SizeConstraint=0,Visible=true,ZIndex=2,Name="Title",Parent = DexWindow47})
  58. local DexWindow49 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.10000000149012,BorderColor3=Color3.new(0.74901962280273,0.74901962280273,0.74901962280273),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,200),SizeConstraint=0,Visible=true,ZIndex=1,Name="MainWindow",Parent = DexWindow47})
  59. local DexWindow50 = CreateInstance("TextButton",{Font=3,FontSize=6,Text="Save",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.5,BorderColor3=Color3.new(0,0,0),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.075000002980232,0,1,-40),Rotation=0,Selectable=true,Size=UDim2.new(0.40000000596046,0,0,30),SizeConstraint=0,Visible=true,ZIndex=1,Name="Save",Parent = DexWindow49})
  60. local DexWindow51 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="This will save an instance to your PC. Type in the name for your instance. (.rbxmx will be added automatically.)",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=true,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,20),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,40),SizeConstraint=0,Visible=true,ZIndex=1,Name="Desc",Parent = DexWindow49})
  61. local DexWindow52 = CreateInstance("TextButton",{Font=3,FontSize=6,Text="Cancel",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.5,BorderColor3=Color3.new(0,0,0),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.52499997615814,0,1,-40),Rotation=0,Selectable=true,Size=UDim2.new(0.40000000596046,0,0,30),SizeConstraint=0,Visible=true,ZIndex=1,Name="Cancel",Parent = DexWindow49})
  62. local DexWindow53 = CreateInstance("TextBox",{ClearTextOnFocus=true,Font=3,FontSize=6,MultiLine=false,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.20000000298023,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.075000002980232,0,0.40000000596046,0),Rotation=0,Selectable=true,Size=UDim2.new(0.85000002384186,0,0,30),SizeConstraint=0,Visible=true,ZIndex=1,Name="FileName",Parent = DexWindow49})
  63. local DexWindow54 = CreateInstance("TextButton",{Font=3,FontSize=6,Text="",TextColor3=Color3.new(1,1,1),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.60000002384186,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.075000002980232,0,0.625,0),Rotation=0,Selectable=true,Size=UDim2.new(0,20,0,20),SizeConstraint=0,Visible=true,ZIndex=2,Name="SaveObjects",Parent = DexWindow49})
  64. local DexWindow55 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.38039219379425,0.38039219379425,0.38039219379425),BackgroundTransparency=0.40000000596046,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,3,0,3),Rotation=0,Selectable=false,Size=UDim2.new(0,14,0,14),SizeConstraint=0,Visible=true,ZIndex=1,Name="enabled",Parent = DexWindow54})
  65. local DexWindow56 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="Save \"Object\" type values",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.075000002980232,30,0.625,0),Rotation=0,Selectable=false,Size=UDim2.new(0.92500001192093,-30,0,20),SizeConstraint=0,Visible=true,ZIndex=1,Name="Desc2",Parent = DexWindow49})
  66. local DexWindow57 = CreateInstance("Frame",{Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.91372555494308,0.91372555494308,0.91372555494308),BackgroundTransparency=0,BorderColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BorderSizePixel=1,ClipsDescendants=false,Draggable=true,Position=UDim2.new(0.30000001192093,0,0.34999999403954,0),Rotation=0,Selectable=false,Size=UDim2.new(0,350,0,20),SizeConstraint=0,Visible=false,ZIndex=3,Name="Confirmation",Parent = DexWindow})
  67. local DexWindow58 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="Confirm",TextColor3=Color3.new(0,0,0),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.63921570777893,0.63529413938522,0.64705884456635),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,0,1,0),SizeConstraint=0,Visible=true,ZIndex=3,Name="Title",Parent = DexWindow57})
  68. local DexWindow59 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.10000000149012,BorderColor3=Color3.new(0.74901962280273,0.74901962280273,0.74901962280273),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,150),SizeConstraint=0,Visible=true,ZIndex=2,Name="MainWindow",Parent = DexWindow57})
  69. local DexWindow60 = CreateInstance("TextButton",{Font=3,FontSize=6,Text="Yes",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.5,BorderColor3=Color3.new(0,0,0),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.075000002980232,0,1,-40),Rotation=0,Selectable=true,Size=UDim2.new(0.40000000596046,0,0,30),SizeConstraint=0,Visible=true,ZIndex=2,Name="Yes",Parent = DexWindow59})
  70. local DexWindow61 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="The file, FILENAME, already exists. Overwrite?",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=true,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,20),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,40),SizeConstraint=0,Visible=true,ZIndex=2,Name="Desc",Parent = DexWindow59})
  71. local DexWindow62 = CreateInstance("TextButton",{Font=3,FontSize=6,Text="No",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.5,BorderColor3=Color3.new(0,0,0),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.52499997615814,0,1,-40),Rotation=0,Selectable=true,Size=UDim2.new(0.40000000596046,0,0,30),SizeConstraint=0,Visible=true,ZIndex=2,Name="No",Parent = DexWindow59})
  72. local DexWindow63 = CreateInstance("Frame",{Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.91372555494308,0.91372555494308,0.91372555494308),BackgroundTransparency=0,BorderColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BorderSizePixel=1,ClipsDescendants=false,Draggable=true,Position=UDim2.new(0.30000001192093,0,0.30000001192093,0),Rotation=0,Selectable=false,Size=UDim2.new(0,350,0,20),SizeConstraint=0,Visible=false,ZIndex=5,Name="Caution",Parent = DexWindow})
  73. local DexWindow64 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="Caution",TextColor3=Color3.new(0,0,0),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.63921570777893,0.63529413938522,0.64705884456635),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,0,1,0),SizeConstraint=0,Visible=true,ZIndex=5,Name="Title",Parent = DexWindow63})
  74. local DexWindow65 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.10000000149012,BorderColor3=Color3.new(0.74901962280273,0.74901962280273,0.74901962280273),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,150),SizeConstraint=0,Visible=true,ZIndex=4,Name="MainWindow",Parent = DexWindow63})
  75. local DexWindow66 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="The file, FILENAME, already exists. Overwrite?",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=true,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,20),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,42),SizeConstraint=0,Visible=true,ZIndex=4,Name="Desc",Parent = DexWindow65})
  76. local DexWindow67 = CreateInstance("TextButton",{Font=3,FontSize=6,Text="Ok",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.5,BorderColor3=Color3.new(0,0,0),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.30000001192093,0,1,-40),Rotation=0,Selectable=true,Size=UDim2.new(0.40000000596046,0,0,30),SizeConstraint=0,Visible=true,ZIndex=4,Name="Ok",Parent = DexWindow65})
  77. local DexWindow68 = CreateInstance("Frame",{Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.91372555494308,0.91372555494308,0.91372555494308),BackgroundTransparency=0,BorderColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BorderSizePixel=1,ClipsDescendants=false,Draggable=true,Position=UDim2.new(0.30000001192093,0,0.30000001192093,0),Rotation=0,Selectable=false,Size=UDim2.new(0,350,0,20),SizeConstraint=0,Visible=false,ZIndex=2,Name="CallRemote",Parent = DexWindow})
  78. local DexWindow69 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="Call Remote",TextColor3=Color3.new(0,0,0),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.63921570777893,0.63529413938522,0.64705884456635),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,0,1,0),SizeConstraint=0,Visible=true,ZIndex=2,Name="Title",Parent = DexWindow68})
  79. local DexWindow70 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.10000000149012,BorderColor3=Color3.new(0.74901962280273,0.74901962280273,0.74901962280273),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,200),SizeConstraint=0,Visible=true,ZIndex=1,Name="MainWindow",Parent = DexWindow68})
  80. local DexWindow71 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="Arguments",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=true,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,20),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,20),SizeConstraint=0,Visible=true,ZIndex=1,Name="Desc",Parent = DexWindow70})
  81. local DexWindow72 = CreateInstance("ScrollingFrame",{BottomImage="rbxasset://textures/blackBkg_square.png",CanvasPosition=Vector2.new(0,0),CanvasSize=UDim2.new(0,0,0,0),MidImage="rbxasset://textures/blackBkg_square.png",ScrollBarThickness=12,ScrollingEnabled=true,TopImage="rbxasset://textures/blackBkg_square.png",Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=true,Draggable=false,Position=UDim2.new(0,0,0,40),Rotation=0,Selectable=true,Size=UDim2.new(1,0,0,80),SizeConstraint=0,Visible=true,ZIndex=1,Name="Arguments",Parent = DexWindow70})
  82. local DexWindow73 = CreateInstance("TextButton",{Font=3,FontSize=6,Text="",TextColor3=Color3.new(1,1,1),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.60000002384186,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.075000002980232,0,0.625,0),Rotation=0,Selectable=true,Size=UDim2.new(0,20,0,20),SizeConstraint=0,Visible=true,ZIndex=2,Name="DisplayReturned",Parent = DexWindow70})
  83. local DexWindow74 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.38039219379425,0.38039219379425,0.38039219379425),BackgroundTransparency=0.40000000596046,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,3,0,3),Rotation=0,Selectable=false,Size=UDim2.new(0,14,0,14),SizeConstraint=0,Visible=false,ZIndex=1,Name="enabled",Parent = DexWindow73})
  84. local DexWindow75 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="Display values returned",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.075000002980232,30,0.625,0),Rotation=0,Selectable=false,Size=UDim2.new(0.92500001192093,-30,0,20),SizeConstraint=0,Visible=true,ZIndex=1,Name="Desc2",Parent = DexWindow70})
  85. local DexWindow76 = CreateInstance("TextButton",{Font=4,FontSize=7,Text="+",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=24,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.5,BorderColor3=Color3.new(0,0,0),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.80000001192093,0,0.625,0),Rotation=0,Selectable=true,Size=UDim2.new(0,20,0,20),SizeConstraint=0,Visible=true,ZIndex=1,Name="Add",Parent = DexWindow70})
  86. local DexWindow77 = CreateInstance("TextButton",{Font=4,FontSize=7,Text="-",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=24,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.5,BorderColor3=Color3.new(0,0,0),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.89999997615814,0,0.625,0),Rotation=0,Selectable=true,Size=UDim2.new(0,20,0,20),SizeConstraint=0,Visible=true,ZIndex=1,Name="Subtract",Parent = DexWindow70})
  87. local DexWindow78 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.5,BorderColor3=Color3.new(0.74901962280273,0.74901962280273,0.74901962280273),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,20),SizeConstraint=0,Visible=false,ZIndex=1,Name="ArgumentTemplate",Parent = DexWindow70})
  88. local DexWindow79 = CreateInstance("TextButton",{Font=3,FontSize=6,Text="Script",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.89999997615814,BorderColor3=Color3.new(0,0,0),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=true,Size=UDim2.new(0.40000000596046,0,0,20),SizeConstraint=0,Visible=true,ZIndex=1,Name="Type",Parent = DexWindow78})
  89. local DexWindow80 = CreateInstance("TextBox",{ClearTextOnFocus=true,Font=3,FontSize=5,MultiLine=false,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.89999997615814,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.40000000596046,0,0,0),Rotation=0,Selectable=true,Size=UDim2.new(0.60000002384186,-12,0,20),SizeConstraint=0,Visible=true,ZIndex=1,Name="Value",Parent = DexWindow78})
  90. local DexWindow81 = CreateInstance("TextButton",{Font=3,FontSize=6,Text="Cancel",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.5,BorderColor3=Color3.new(0,0,0),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.52499997615814,0,1,-40),Rotation=0,Selectable=true,Size=UDim2.new(0.40000000596046,0,0,30),SizeConstraint=0,Visible=true,ZIndex=1,Name="Cancel",Parent = DexWindow70})
  91. local DexWindow82 = CreateInstance("TextButton",{Font=3,FontSize=6,Text="Call",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.5,BorderColor3=Color3.new(0,0,0),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.075000002980232,0,1,-40),Rotation=0,Selectable=true,Size=UDim2.new(0.40000000596046,0,0,30),SizeConstraint=0,Visible=true,ZIndex=1,Name="Ok",Parent = DexWindow70})
  92. local DexWindow83 = CreateInstance("Frame",{Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.91372555494308,0.91372555494308,0.91372555494308),BackgroundTransparency=0,BorderColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BorderSizePixel=1,ClipsDescendants=false,Draggable=true,Position=UDim2.new(0.30000001192093,0,0.30000001192093,0),Rotation=0,Selectable=false,Size=UDim2.new(0,350,0,20),SizeConstraint=0,Visible=false,ZIndex=2,Name="TableCaution",Parent = DexWindow})
  93. local DexWindow84 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.10000000149012,BorderColor3=Color3.new(0.74901962280273,0.74901962280273,0.74901962280273),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,150),SizeConstraint=0,Visible=true,ZIndex=1,Name="MainWindow",Parent = DexWindow83})
  94. local DexWindow85 = CreateInstance("TextButton",{Font=3,FontSize=6,Text="Ok",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.5,BorderColor3=Color3.new(0,0,0),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.30000001192093,0,1,-40),Rotation=0,Selectable=true,Size=UDim2.new(0.40000000596046,0,0,30),SizeConstraint=0,Visible=true,ZIndex=1,Name="Ok",Parent = DexWindow84})
  95. local DexWindow86 = CreateInstance("ScrollingFrame",{BottomImage="rbxasset://textures/blackBkg_square.png",CanvasPosition=Vector2.new(0,0),CanvasSize=UDim2.new(0,0,0,0),MidImage="rbxasset://textures/blackBkg_square.png",ScrollBarThickness=12,ScrollingEnabled=true,TopImage="rbxasset://textures/blackBkg_square.png",Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=true,Draggable=false,Position=UDim2.new(0,0,0,20),Rotation=0,Selectable=true,Size=UDim2.new(1,0,0,80),SizeConstraint=0,Visible=true,ZIndex=1,Name="TableResults",Parent = DexWindow84})
  96. local DexWindow87 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.5,BorderColor3=Color3.new(0.74901962280273,0.74901962280273,0.74901962280273),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,20),SizeConstraint=0,Visible=false,ZIndex=1,Name="TableTemplate",Parent = DexWindow84})
  97. local DexWindow88 = CreateInstance("TextLabel",{Font=3,FontSize=6,Text="Script",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.89999997615814,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(0.40000000596046,0,0,20),SizeConstraint=0,Visible=true,ZIndex=1,Name="Type",Parent = DexWindow87})
  98. local DexWindow89 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="Script",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.89999997615814,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.40000000596046,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(0.60000002384186,-12,0,20),SizeConstraint=0,Visible=true,ZIndex=1,Name="Value",Parent = DexWindow87})
  99. local DexWindow90 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="Caution",TextColor3=Color3.new(0,0,0),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.63921570777893,0.63529413938522,0.64705884456635),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,0,1,0),SizeConstraint=0,Visible=true,ZIndex=2,Name="Title",Parent = DexWindow83})
  100. local DexWindow91 = CreateInstance("Frame",{Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.91372555494308,0.91372555494308,0.91372555494308),BackgroundTransparency=0,BorderColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BorderSizePixel=1,ClipsDescendants=false,Draggable=true,Position=UDim2.new(0.30000001192093,0,0.30000001192093,0),Rotation=0,Selectable=false,Size=UDim2.new(0,516,0,20),SizeConstraint=0,Visible=false,ZIndex=5,Name="ScriptEditor",Parent = DexWindow})
  101. local DexWindow92 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="Script Viewer",TextColor3=Color3.new(0,0,0),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.63921570777893,0.63529413938522,0.64705884456635),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,0,1,0),SizeConstraint=0,Visible=true,ZIndex=5,Name="Title",Parent = DexWindow91})
  102. local DexWindow93 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,3,0),Rotation=0,Selectable=false,Size=UDim2.new(0,516,0,416),SizeConstraint=0,Visible=true,ZIndex=1,Name="Cover",Parent = DexWindow91})
  103. local DexWindow94 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,3,0),Rotation=0,Selectable=false,Size=UDim2.new(0,500,0,400),SizeConstraint=0,Visible=true,ZIndex=1,Name="EditorGrid",Parent = DexWindow91})
  104. local DexWindow95 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.94117653369904,0.94117653369904,0.94117653369904),BackgroundTransparency=0,BorderColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,0,3,0),SizeConstraint=0,Visible=true,ZIndex=1,Name="TopBar",Parent = DexWindow91})
  105. local DexWindow96 = CreateInstance("ImageButton",{Image="",ImageColor3=Color3.new(1,1,1),ImageRectOffset=Vector2.new(0,0),ImageRectSize=Vector2.new(0,0),ImageTransparency=0,ScaleType=0,SliceCenter=Rect.new(0,0,0,0),AutoButtonColor=false,Modal=false,Selected=false,Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.8666667342186,0.8666667342186,0.8666667342186),BackgroundTransparency=0,BorderColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(1,-32,0,40),Rotation=0,Selectable=true,Size=UDim2.new(0,16,0,20),SizeConstraint=0,Visible=true,ZIndex=1,Name="ScriptBarLeft",Parent = DexWindow95})
  106. local DexWindow97 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.63921570777893,0.63529413938522,0.64705884456635),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.5,-4,0.5,-4),Rotation=0,Selectable=false,Size=UDim2.new(0,8,0,8),SizeConstraint=0,Visible=true,ZIndex=1,Name="Arrow Graphic",Parent = DexWindow96})
  107. local DexWindow98 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BackgroundTransparency=0.69999998807907,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.25,0,0.375,0),Rotation=0,Selectable=false,Size=UDim2.new(0.125,0,0.25,0),SizeConstraint=0,Visible=true,ZIndex=1,Name="Graphic",Parent = DexWindow97})
  108. local DexWindow99 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BackgroundTransparency=0.69999998807907,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.375,0,0.25,0),Rotation=0,Selectable=false,Size=UDim2.new(0.125,0,0.5,0),SizeConstraint=0,Visible=true,ZIndex=1,Name="Graphic",Parent = DexWindow97})
  109. local DexWindow100 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BackgroundTransparency=0.69999998807907,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.5,0,0.125,0),Rotation=0,Selectable=false,Size=UDim2.new(0.125,0,0.75,0),SizeConstraint=0,Visible=true,ZIndex=1,Name="Graphic",Parent = DexWindow97})
  110. local DexWindow101 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BackgroundTransparency=0.69999998807907,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.625,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(0.125,0,1,0),SizeConstraint=0,Visible=true,ZIndex=1,Name="Graphic",Parent = DexWindow97})
  111. local DexWindow102 = CreateInstance("ImageButton",{Image="",ImageColor3=Color3.new(1,1,1),ImageRectOffset=Vector2.new(0,0),ImageRectSize=Vector2.new(0,0),ImageTransparency=0,ScaleType=0,SliceCenter=Rect.new(0,0,0,0),AutoButtonColor=false,Modal=false,Selected=false,Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.8666667342186,0.8666667342186,0.8666667342186),BackgroundTransparency=0,BorderColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(1,-16,0,40),Rotation=0,Selectable=true,Size=UDim2.new(0,16,0,20),SizeConstraint=0,Visible=true,ZIndex=1,Name="ScriptBarRight",Parent = DexWindow95})
  112. local DexWindow103 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.63921570777893,0.63529413938522,0.64705884456635),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.5,-4,0.5,-4),Rotation=0,Selectable=false,Size=UDim2.new(0,8,0,8),SizeConstraint=0,Visible=true,ZIndex=1,Name="Arrow Graphic",Parent = DexWindow102})
  113. local DexWindow104 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BackgroundTransparency=0.69999998807907,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.625,0,0.375,0),Rotation=0,Selectable=false,Size=UDim2.new(0.125,0,0.25,0),SizeConstraint=0,Visible=true,ZIndex=1,Name="Graphic",Parent = DexWindow103})
  114. local DexWindow105 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BackgroundTransparency=0.69999998807907,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.5,0,0.25,0),Rotation=0,Selectable=false,Size=UDim2.new(0.125,0,0.5,0),SizeConstraint=0,Visible=true,ZIndex=1,Name="Graphic",Parent = DexWindow103})
  115. local DexWindow106 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BackgroundTransparency=0.69999998807907,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.375,0,0.125,0),Rotation=0,Selectable=false,Size=UDim2.new(0.125,0,0.75,0),SizeConstraint=0,Visible=true,ZIndex=1,Name="Graphic",Parent = DexWindow103})
  116. local DexWindow107 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BackgroundTransparency=0.69999998807907,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.25,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(0.125,0,1,0),SizeConstraint=0,Visible=true,ZIndex=1,Name="Graphic",Parent = DexWindow103})
  117. local DexWindow108 = CreateInstance("TextButton",{Font=3,FontSize=5,Text="To Clipboard",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.5,BorderColor3=Color3.new(0,0,0),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,20),Rotation=0,Selectable=true,Size=UDim2.new(0,80,0,20),SizeConstraint=0,Visible=true,ZIndex=1,Name="Clipboard",Parent = DexWindow95})
  118. local DexWindow109 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.82352948188782,0.82352948188782,0.82352948188782),BackgroundTransparency=0,BorderColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BorderSizePixel=1,ClipsDescendants=true,Draggable=false,Position=UDim2.new(0,0,0,40),Rotation=0,Selectable=false,Size=UDim2.new(1,-32,0,20),SizeConstraint=0,Visible=true,ZIndex=1,Name="ScriptBar",Parent = DexWindow95})
  119. local DexWindow110 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(0,100,1,0),SizeConstraint=0,Visible=false,ZIndex=1,Name="Entry",Parent = DexWindow95})
  120. local DexWindow111 = CreateInstance("TextButton",{Font=3,FontSize=4,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=12,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.60000002384186,BorderColor3=Color3.new(0,0,0),BorderSizePixel=1,ClipsDescendants=true,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=true,Size=UDim2.new(1,0,1,0),SizeConstraint=0,Visible=true,ZIndex=4,Name="Button",Parent = DexWindow110})
  121. local DexWindow112 = CreateInstance("TextButton",{Font=3,FontSize=5,Text="X",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0,0,0),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(1,-20,0,0),Rotation=0,Selectable=true,Size=UDim2.new(0,20,0,20),SizeConstraint=0,Visible=true,ZIndex=4,Name="Close",Parent = DexWindow110})
  122. local DexWindow113 = CreateInstance("BindableEvent",{Name="OpenScript",Parent = DexWindow91})
  123. local DexWindow114 = CreateInstance("TextButton",{Font=3,FontSize=5,Text="X",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0,0,0),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(1,-20,0,0),Rotation=0,Selectable=true,Size=UDim2.new(0,20,0,20),SizeConstraint=0,Visible=true,ZIndex=5,Name="Close",Parent = DexWindow91})
  124. local DexWindow115 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.96078437566757,0.96078437566757,0.96078437566757),BackgroundTransparency=0,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(1,30,0,0),Rotation=0,Selectable=false,Size=UDim2.new(0,300,1,0),SizeConstraint=0,Visible=true,ZIndex=2,Name="IntroFrame",Parent = DexWindow})
  125. local DexWindow116 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.96078437566757,0.96078437566757,0.96078437566757),BackgroundTransparency=0,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,-30,0,0),Rotation=0,Selectable=false,Size=UDim2.new(0,30,0,90),SizeConstraint=0,Visible=true,ZIndex=2,Name="Main",Parent = DexWindow115})
  126. local DexWindow117 = CreateInstance("TextLabel",{Font=4,FontSize=13,Text="DEX",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=60,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=true,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,100,0,150),Rotation=0,Selectable=false,Size=UDim2.new(0,100,0,60),SizeConstraint=0,Visible=true,ZIndex=2,Name="Title",Parent = DexWindow115})
  127. local DexWindow118 = CreateInstance("TextLabel",{Font=4,FontSize=10,Text="V1.0.0",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=28,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=true,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,100,0,210),Rotation=0,Selectable=false,Size=UDim2.new(0,100,0,30),SizeConstraint=0,Visible=true,ZIndex=2,Name="Version",Parent = DexWindow115})
  128. local DexWindow119 = CreateInstance("TextLabel",{Font=4,FontSize=10,Text="Raspberry Pi & Moon",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=28,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,80,0,300),Rotation=0,Selectable=true,Size=UDim2.new(0,140,0,50),SizeConstraint=0,Visible=true,ZIndex=2,Name="Creator",Parent = DexWindow115})
  129. local DexWindow120 = CreateInstance("ImageLabel",{Image="rbxassetid://474172996",ImageColor3=Color3.new(0.96078437566757,0.96078437566757,0.96078437566757),ImageRectOffset=Vector2.new(0,0),ImageRectSize=Vector2.new(0,0),ImageTransparency=0,ScaleType=0,SliceCenter=Rect.new(0,0,0,0),Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,-30,0,90),Rotation=180,Selectable=false,Size=UDim2.new(0,30,0,30),SizeConstraint=0,Visible=true,ZIndex=2,Name="Slant",Parent = DexWindow115})
  130. local DexWindow121 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.10000000149012,BorderColor3=Color3.new(0.74901962280273,0.74901962280273,0.74901962280273),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(1,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(0,300,1,0),SizeConstraint=0,Visible=true,ZIndex=1,Name="SaveMapWindow",Parent = DexWindow})
  131. local DexWindow122 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.91372555494308,0.91372555494308,0.91372555494308),BackgroundTransparency=0,BorderColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,17),SizeConstraint=0,Visible=true,ZIndex=1,Name="Header",Parent = DexWindow121})
  132. local DexWindow123 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="Map Downloader",TextColor3=Color3.new(0,0,0),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.63921570777893,0.63529413938522,0.64705884456635),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,4,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,-4,1,0),SizeConstraint=0,Visible=true,ZIndex=1,Name="TextLabel",Parent = DexWindow122})
  133. local DexWindow124 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,200),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,240),SizeConstraint=0,Visible=true,ZIndex=1,Name="MapSettings",Parent = DexWindow121})
  134. local DexWindow125 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,60),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,60),SizeConstraint=0,Visible=true,ZIndex=1,Name="Terrain",Parent = DexWindow124})
  135. local DexWindow126 = CreateInstance("TextLabel",{Font=3,FontSize=6,Text="Save Terrain",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,10,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,-20,0,30),SizeConstraint=0,Visible=true,ZIndex=1,Name="SName",Parent = DexWindow125})
  136. local DexWindow127 = CreateInstance("TextLabel",{Font=3,FontSize=6,Text="Off",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,60,0,30),Rotation=0,Selectable=false,Size=UDim2.new(0,50,0,15),SizeConstraint=0,Visible=true,ZIndex=1,Name="Status",Parent = DexWindow125})
  137. local DexWindow128 = CreateInstance("TextButton",{Font=3,FontSize=5,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.86274516582489,0.86274516582489,0.86274516582489),BackgroundTransparency=0,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,10,0,30),Rotation=0,Selectable=true,Size=UDim2.new(0,40,0,15),SizeConstraint=0,Visible=true,ZIndex=1,Name="Change",Parent = DexWindow125})
  138. local DexWindow129 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0,0.57647061347961,0.86274516582489),BackgroundTransparency=0,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(0,0,0,15),SizeConstraint=0,Visible=true,ZIndex=1,Name="OnBar",Parent = DexWindow128})
  139. local DexWindow130 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0,0,0),BackgroundTransparency=0,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=true,Draggable=false,Position=UDim2.new(0,-2,0,-2),Rotation=0,Selectable=false,Size=UDim2.new(0,10,0,19),SizeConstraint=0,Visible=true,ZIndex=1,Name="Bar",Parent = DexWindow128})
  140. local DexWindow131 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,120),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,60),SizeConstraint=0,Visible=true,ZIndex=1,Name="Lighting",Parent = DexWindow124})
  141. local DexWindow132 = CreateInstance("TextLabel",{Font=3,FontSize=6,Text="Lighting Properties",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,10,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,-20,0,30),SizeConstraint=0,Visible=true,ZIndex=1,Name="SName",Parent = DexWindow131})
  142. local DexWindow133 = CreateInstance("TextLabel",{Font=3,FontSize=6,Text="Off",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,60,0,30),Rotation=0,Selectable=false,Size=UDim2.new(0,50,0,15),SizeConstraint=0,Visible=true,ZIndex=1,Name="Status",Parent = DexWindow131})
  143. local DexWindow134 = CreateInstance("TextButton",{Font=3,FontSize=5,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.86274516582489,0.86274516582489,0.86274516582489),BackgroundTransparency=0,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,10,0,30),Rotation=0,Selectable=true,Size=UDim2.new(0,40,0,15),SizeConstraint=0,Visible=true,ZIndex=1,Name="Change",Parent = DexWindow131})
  144. local DexWindow135 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0,0.57647061347961,0.86274516582489),BackgroundTransparency=0,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(0,0,0,15),SizeConstraint=0,Visible=true,ZIndex=1,Name="OnBar",Parent = DexWindow134})
  145. local DexWindow136 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0,0,0),BackgroundTransparency=0,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=true,Draggable=false,Position=UDim2.new(0,-2,0,-2),Rotation=0,Selectable=false,Size=UDim2.new(0,10,0,19),SizeConstraint=0,Visible=true,ZIndex=1,Name="Bar",Parent = DexWindow134})
  146. local DexWindow137 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,180),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,60),SizeConstraint=0,Visible=true,ZIndex=1,Name="CameraInstances",Parent = DexWindow124})
  147. local DexWindow138 = CreateInstance("TextLabel",{Font=3,FontSize=6,Text="Camera Instances",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,10,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,-20,0,30),SizeConstraint=0,Visible=true,ZIndex=1,Name="SName",Parent = DexWindow137})
  148. local DexWindow139 = CreateInstance("TextLabel",{Font=3,FontSize=6,Text="Off",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,60,0,30),Rotation=0,Selectable=false,Size=UDim2.new(0,50,0,15),SizeConstraint=0,Visible=true,ZIndex=1,Name="Status",Parent = DexWindow137})
  149. local DexWindow140 = CreateInstance("TextButton",{Font=3,FontSize=5,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.86274516582489,0.86274516582489,0.86274516582489),BackgroundTransparency=0,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,10,0,30),Rotation=0,Selectable=true,Size=UDim2.new(0,40,0,15),SizeConstraint=0,Visible=true,ZIndex=1,Name="Change",Parent = DexWindow137})
  150. local DexWindow141 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0,0.57647061347961,0.86274516582489),BackgroundTransparency=0,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(0,0,0,15),SizeConstraint=0,Visible=true,ZIndex=1,Name="OnBar",Parent = DexWindow140})
  151. local DexWindow142 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0,0,0),BackgroundTransparency=0,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=true,Draggable=false,Position=UDim2.new(0,-2,0,-2),Rotation=0,Selectable=false,Size=UDim2.new(0,10,0,19),SizeConstraint=0,Visible=true,ZIndex=1,Name="Bar",Parent = DexWindow140})
  152. local DexWindow143 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,60),SizeConstraint=0,Visible=true,ZIndex=1,Name="Scripts",Parent = DexWindow124})
  153. local DexWindow144 = CreateInstance("TextLabel",{Font=3,FontSize=6,Text="Save Scripts",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,10,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,-20,0,30),SizeConstraint=0,Visible=true,ZIndex=1,Name="SName",Parent = DexWindow143})
  154. local DexWindow145 = CreateInstance("TextLabel",{Font=3,FontSize=6,Text="Off",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,60,0,30),Rotation=0,Selectable=false,Size=UDim2.new(0,50,0,15),SizeConstraint=0,Visible=true,ZIndex=1,Name="Status",Parent = DexWindow143})
  155. local DexWindow146 = CreateInstance("TextButton",{Font=3,FontSize=5,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.86274516582489,0.86274516582489,0.86274516582489),BackgroundTransparency=0,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,10,0,30),Rotation=0,Selectable=true,Size=UDim2.new(0,40,0,15),SizeConstraint=0,Visible=true,ZIndex=1,Name="Change",Parent = DexWindow143})
  156. local DexWindow147 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0,0.57647061347961,0.86274516582489),BackgroundTransparency=0,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(0,0,0,15),SizeConstraint=0,Visible=true,ZIndex=1,Name="OnBar",Parent = DexWindow146})
  157. local DexWindow148 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0,0,0),BackgroundTransparency=0,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=true,Draggable=false,Position=UDim2.new(0,-2,0,-2),Rotation=0,Selectable=false,Size=UDim2.new(0,10,0,19),SizeConstraint=0,Visible=true,ZIndex=1,Name="Bar",Parent = DexWindow146})
  158. local DexWindow149 = CreateInstance("TextLabel",{Font=3,FontSize=6,Text="To Save",TextColor3=Color3.new(0,0,0),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.63921570777893,0.63529413938522,0.64705884456635),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,17),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,20),SizeConstraint=0,Visible=true,ZIndex=1,Name="ToSave",Parent = DexWindow121})
  159. local DexWindow150 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.80000001192093,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,37),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,163),SizeConstraint=0,Visible=true,ZIndex=1,Name="CopyList",Parent = DexWindow121})
  160. local DexWindow151 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.91372555494308,0.91372555494308,0.91372555494308),BackgroundTransparency=0,BorderColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,1,-50),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,50),SizeConstraint=0,Visible=true,ZIndex=1,Name="Bottom",Parent = DexWindow121})
  161. local DexWindow152 = CreateInstance("TextLabel",{Font=3,FontSize=5,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.",TextColor3=Color3.new(0,0,0),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=true,TextXAlignment=0,TextYAlignment=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.63921570777893,0.63529413938522,0.64705884456635),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,4,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,-4,1,0),SizeConstraint=0,Visible=true,ZIndex=1,Name="TextLabel",Parent = DexWindow151})
  162. local DexWindow153 = CreateInstance("TextButton",{Font=3,FontSize=6,Text="Save",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.94117653369904,0.94117653369904,0.94117653369904),BackgroundTransparency=0.80000001192093,BorderColor3=Color3.new(0,0,0),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,1,-80),Rotation=0,Selectable=true,Size=UDim2.new(1,0,0,30),SizeConstraint=0,Visible=true,ZIndex=1,Name="Save",Parent = DexWindow121})
  163. local DexWindow154 = CreateInstance("TextBox",{ClearTextOnFocus=true,Font=3,FontSize=6,MultiLine=false,Text="PlaceName",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.94117653369904,0.94117653369904,0.94117653369904),BackgroundTransparency=0.60000002384186,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,1,-105),Rotation=0,Selectable=true,Size=UDim2.new(1,0,0,25),SizeConstraint=0,Visible=true,ZIndex=1,Name="FileName",Parent = DexWindow121})
  164. local DexWindow155 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,22),SizeConstraint=0,Visible=false,ZIndex=1,Name="Entry",Parent = DexWindow121})
  165. local DexWindow156 = CreateInstance("TextButton",{Font=3,FontSize=6,Text="",TextColor3=Color3.new(1,1,1),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,AutoButtonColor=true,Modal=false,Selected=false,Style=0,Active=true,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.60000002384186,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,10,0,1),Rotation=0,Selectable=true,Size=UDim2.new(0,20,0,20),SizeConstraint=0,Visible=true,ZIndex=2,Name="Change",Parent = DexWindow155})
  166. local DexWindow157 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.38039219379425,0.38039219379425,0.38039219379425),BackgroundTransparency=0.40000000596046,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,3,0,3),Rotation=0,Selectable=false,Size=UDim2.new(0,14,0,14),SizeConstraint=0,Visible=true,ZIndex=1,Name="enabled",Parent = DexWindow156})
  167. local DexWindow158 = CreateInstance("TextLabel",{Font=3,FontSize=6,Text="Workspace",TextColor3=Color3.new(0,0,0),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.63921570777893,0.63529413938522,0.64705884456635),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,40,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,-40,0,22),SizeConstraint=0,Visible=true,ZIndex=1,Name="Info",Parent = DexWindow155})
  168. local DexWindow159 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=0.10000000149012,BorderColor3=Color3.new(0.74901962280273,0.74901962280273,0.74901962280273),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(1,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(0,300,1,0),SizeConstraint=0,Visible=true,ZIndex=1,Name="RemoteDebugWindow",Parent = DexWindow})
  169. local DexWindow160 = CreateInstance("Frame",{Style=0,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.91372555494308,0.91372555494308,0.91372555494308),BackgroundTransparency=0,BorderColor3=Color3.new(0.58431375026703,0.58431375026703,0.58431375026703),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,17),SizeConstraint=0,Visible=true,ZIndex=1,Name="Header",Parent = DexWindow159})
  170. local DexWindow161 = CreateInstance("TextLabel",{Font=3,FontSize=5,Text="Remote Debugger",TextColor3=Color3.new(0,0,0),TextScaled=false,TextSize=14,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=0,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(0.63921570777893,0.63529413938522,0.64705884456635),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,4,0,0),Rotation=0,Selectable=false,Size=UDim2.new(1,-4,1,0),SizeConstraint=0,Visible=true,ZIndex=1,Name="TextLabel",Parent = DexWindow160})
  171. local DexWindow162 = CreateInstance("BindableFunction",{Name="GetSetting",Parent = DexWindow159})
  172. local DexWindow163 = CreateInstance("TextLabel",{Font=3,FontSize=11,Text="Have fun with remotes",TextColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),TextScaled=false,TextSize=32,TextStrokeColor3=Color3.new(0,0,0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=true,TextXAlignment=2,TextYAlignment=1,Active=false,AnchorPoint=Vector2.new(0,0),BackgroundColor3=Color3.new(1,1,1),BackgroundTransparency=1,BorderColor3=Color3.new(0.10588236153126,0.16470588743687,0.20784315466881),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0,0,0,20),Rotation=0,Selectable=false,Size=UDim2.new(1,0,0,40),SizeConstraint=0,Visible=true,ZIndex=1,Name="Desc",Parent = DexWindow159})
  173. return DexWindow
  174. end
  175.  
  176. function placeGui()
  177. if pcall(function() local d = game:GetService("CoreGui").Name end) then
  178. return game:GetService("CoreGui")
  179. else
  180. return game:GetService("Players").LocalPlayer:FindFirstChildOfClass("PlayerGui")
  181. end
  182. end
  183.  
  184. local D_E_X = createDexWindow()
  185. D_E_X.ResetOnSpawn = false
  186. D_E_X.Parent = placeGui()
  187.  
  188. spawn(function()
  189. local Gui = D_E_X
  190.  
  191. local IntroFrame = Gui:WaitForChild("IntroFrame")
  192.  
  193. local SideMenu = Gui:WaitForChild("SideMenu")
  194. local OpenToggleButton = Gui:WaitForChild("Toggle")
  195. local CloseToggleButton = SideMenu:WaitForChild("Toggle")
  196. local OpenScriptEditorButton = SideMenu:WaitForChild("OpenScriptEditor")
  197.  
  198. local ScriptEditor = Gui:WaitForChild("ScriptEditor")
  199.  
  200. local SlideOut = SideMenu:WaitForChild("SlideOut")
  201. local SlideFrame = SlideOut:WaitForChild("SlideFrame")
  202. local Slant = SideMenu:WaitForChild("Slant")
  203.  
  204. local ExplorerButton = SlideFrame:WaitForChild("Explorer")
  205. local SettingsButton = SlideFrame:WaitForChild("Settings")
  206.  
  207. local SelectionBox = Instance.new("SelectionBox")
  208. SelectionBox.Parent = Gui
  209.  
  210. local ExplorerPanel = Gui:WaitForChild("ExplorerPanel")
  211. local PropertiesFrame = Gui:WaitForChild("PropertiesFrame")
  212. local SaveMapWindow = Gui:WaitForChild("SaveMapWindow")
  213. local RemoteDebugWindow = Gui:WaitForChild("RemoteDebugWindow")
  214.  
  215. local SettingsPanel = Gui:WaitForChild("SettingsPanel")
  216. local SettingsListener = SettingsPanel:WaitForChild("GetSetting")
  217. local SettingTemplate = SettingsPanel:WaitForChild("SettingTemplate")
  218. local SettingList = SettingsPanel:WaitForChild("SettingList")
  219.  
  220. local SaveMapCopyList = SaveMapWindow:WaitForChild("CopyList")
  221. local SaveMapSettingFrame = SaveMapWindow:WaitForChild("MapSettings")
  222. local SaveMapName = SaveMapWindow:WaitForChild("FileName")
  223. local SaveMapButton = SaveMapWindow:WaitForChild("Save")
  224. local SaveMapCopyTemplate = SaveMapWindow:WaitForChild("Entry")
  225. local SaveMapSettings = {
  226. CopyWhat = {
  227. Workspace = true,
  228. Lighting = true,
  229. ReplicatedStorage = true,
  230. ReplicatedFirst = true,
  231. StarterPack = true,
  232. StarterGui = true,
  233. StarterPlayer = true
  234. },
  235. SaveScripts = true,
  236. SaveTerrain = true,
  237. LightingProperties = true,
  238. CameraInstances = true
  239. }
  240.  
  241. --[[
  242. local ClickSelectOption = SettingsPanel:WaitForChild("ClickSelect"):WaitForChild("Change")
  243. local SelectionBoxOption = SettingsPanel:WaitForChild("SelectionBox"):WaitForChild("Change")
  244. local ClearPropsOption = SettingsPanel:WaitForChild("ClearProperties"):WaitForChild("Change")
  245. local SelectUngroupedOption = SettingsPanel:WaitForChild("SelectUngrouped"):WaitForChild("Change")
  246. --]]
  247.  
  248. local SelectionChanged = ExplorerPanel:WaitForChild("SelectionChanged")
  249. local GetSelection = ExplorerPanel:WaitForChild("GetSelection")
  250. local SetSelection = ExplorerPanel:WaitForChild("SetSelection")
  251.  
  252. local Player = game:GetService("Players").LocalPlayer
  253. local Mouse = Player:GetMouse()
  254.  
  255. local CurrentWindow = "Nothing c:"
  256. local Windows = {
  257. Explorer = {
  258. ExplorerPanel,
  259. PropertiesFrame
  260. },
  261. Settings = {SettingsPanel},
  262. SaveMap = {SaveMapWindow},
  263. Remotes = {RemoteDebugWindow}
  264. }
  265.  
  266. function switchWindows(wName,over)
  267. if CurrentWindow == wName and not over then return end
  268.  
  269. local count = 0
  270.  
  271. for i,v in pairs(Windows) do
  272. count = 0
  273. if i ~= wName then
  274. 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
  275. end
  276. end
  277.  
  278. count = 0
  279.  
  280. if Windows[wName] then
  281. 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
  282. end
  283.  
  284. if wName ~= "Nothing c:" then
  285. CurrentWindow = wName
  286. for i,v in pairs(SlideFrame:GetChildren()) do
  287. v.BackgroundTransparency = 1
  288. v.Icon.ImageColor3 = Color3.new(70/255, 70/255, 70/255)
  289. end
  290. if SlideFrame:FindFirstChild(wName) then
  291. SlideFrame[wName].BackgroundTransparency = 0.5
  292. SlideFrame[wName].Icon.ImageColor3 = Color3.new(0,0,0)
  293. end
  294. end
  295. end
  296.  
  297. function toggleDex(on)
  298. if on then
  299. SideMenu:TweenPosition(UDim2.new(1, -330, 0, 0), "Out", "Quad", 0.5, true)
  300. OpenToggleButton:TweenPosition(UDim2.new(1,0,0,0), "Out", "Quad", 0.5, true)
  301. switchWindows(CurrentWindow,true)
  302. else
  303. SideMenu:TweenPosition(UDim2.new(1, 0, 0, 0), "Out", "Quad", 0.5, true)
  304. OpenToggleButton:TweenPosition(UDim2.new(1,-30,0,0), "Out", "Quad", 0.5, true)
  305. switchWindows("Nothing c:")
  306. end
  307. end
  308.  
  309. local Settings = {
  310. ClickSelect = false,
  311. SelBox = false,
  312. ClearProps = false,
  313. SelectUngrouped = true,
  314. SaveInstanceScripts = true
  315. }
  316.  
  317. function ReturnSetting(set)
  318. if set == "ClearProps" then
  319. return Settings.ClearProps
  320. elseif set == "SelectUngrouped" then
  321. return Settings.SelectUngrouped
  322. end
  323. end
  324.  
  325. OpenToggleButton.MouseButton1Up:connect(function()
  326. toggleDex(true)
  327. end)
  328.  
  329. OpenScriptEditorButton.MouseButton1Up:connect(function()
  330. if OpenScriptEditorButton.Active then
  331. ScriptEditor.Visible = true
  332. end
  333. end)
  334.  
  335. CloseToggleButton.MouseButton1Up:connect(function()
  336. if CloseToggleButton.Active then
  337. toggleDex(false)
  338. end
  339. end)
  340.  
  341. --[[
  342. OpenToggleButton.MouseButton1Up:connect(function()
  343. SideMenu:TweenPosition(UDim2.new(1, -330, 0, 0), "Out", "Quad", 0.5, true)
  344.  
  345. if CurrentWindow == "Explorer" then
  346. ExplorerPanel:TweenPosition(UDim2.new(1, -300, 0, 0), "Out", "Quad", 0.5, true)
  347. PropertiesFrame:TweenPosition(UDim2.new(1, -300, 0.5, 36), "Out", "Quad", 0.5, true)
  348. else
  349. SettingsPanel:TweenPosition(UDim2.new(1, -300, 0, 0), "Out", "Quad", 0.5, true)
  350. end
  351.  
  352. OpenToggleButton:TweenPosition(UDim2.new(1,0,0,0), "Out", "Quad", 0.5, true)
  353. end)
  354.  
  355. CloseToggleButton.MouseButton1Up:connect(function()
  356. SideMenu:TweenPosition(UDim2.new(1, 0, 0, 0), "Out", "Quad", 0.5, true)
  357.  
  358. ExplorerPanel:TweenPosition(UDim2.new(1, 30, 0, 0), "Out", "Quad", 0.5, true)
  359. PropertiesFrame:TweenPosition(UDim2.new(1, 30, 0.5, 36), "Out", "Quad", 0.5, true)
  360. SettingsPanel:TweenPosition(UDim2.new(1, 30, 0, 0), "Out", "Quad", 0.5, true)
  361.  
  362. OpenToggleButton:TweenPosition(UDim2.new(1,-30,0,0), "Out", "Quad", 0.5, true)
  363. end)
  364. --]]
  365.  
  366. --[[
  367. ExplorerButton.MouseButton1Up:connect(function()
  368. switchWindows("Explorer")
  369. end)
  370.  
  371. SettingsButton.MouseButton1Up:connect(function()
  372. switchWindows("Settings")
  373. end)
  374. --]]
  375.  
  376. for i,v in pairs(SlideFrame:GetChildren()) do
  377. v.MouseButton1Click:connect(function()
  378. switchWindows(v.Name)
  379. end)
  380.  
  381. v.MouseEnter:connect(function()v.BackgroundTransparency = 0.5 end)
  382. v.MouseLeave:connect(function()if CurrentWindow~=v.Name then v.BackgroundTransparency = 1 end end)
  383. end
  384.  
  385. --[[
  386. ExplorerButton.MouseButton1Up:connect(function()
  387. if CurrentWindow ~= "Explorer" then
  388. CurrentWindow = "Explorer"
  389.  
  390. ExplorerPanel:TweenPosition(UDim2.new(1, -300, 0, 0), "Out", "Quad", 0.5, true)
  391. PropertiesFrame:TweenPosition(UDim2.new(1, -300, 0.5, 36), "Out", "Quad", 0.5, true)
  392. SettingsPanel:TweenPosition(UDim2.new(1, 0, 0, 0), "Out", "Quad", 0.5, true)
  393. end
  394. end)
  395.  
  396. SettingsButton.MouseButton1Up:connect(function()
  397. if CurrentWindow ~= "Settings" then
  398. CurrentWindow = "Settings"
  399.  
  400. ExplorerPanel:TweenPosition(UDim2.new(1, 0, 0, 0), "Out", "Quad", 0.5, true)
  401. PropertiesFrame:TweenPosition(UDim2.new(1, 0, 0.5, 36), "Out", "Quad", 0.5, true)
  402. SettingsPanel:TweenPosition(UDim2.new(1, -300, 0, 0), "Out", "Quad", 0.5, true)
  403. end
  404. end)
  405. --]]
  406.  
  407. function createSetting(name,interName,defaultOn)
  408. local newSetting = SettingTemplate:Clone()
  409. newSetting.Position = UDim2.new(0,0,0,#SettingList:GetChildren() * 60)
  410. newSetting.SName.Text = name
  411.  
  412. local function toggle(on)
  413. if on then
  414. newSetting.Change.Bar:TweenPosition(UDim2.new(0,32,0,-2),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
  415. newSetting.Change.OnBar:TweenSize(UDim2.new(0,34,0,15),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
  416. newSetting.Status.Text = "On"
  417. Settings[interName] = true
  418. else
  419. newSetting.Change.Bar:TweenPosition(UDim2.new(0,-2,0,-2),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
  420. newSetting.Change.OnBar:TweenSize(UDim2.new(0,0,0,15),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
  421. newSetting.Status.Text = "Off"
  422. Settings[interName] = false
  423. end
  424. end
  425.  
  426. newSetting.Change.MouseButton1Click:connect(function()
  427. toggle(not Settings[interName])
  428. end)
  429.  
  430. newSetting.Visible = true
  431. newSetting.Parent = SettingList
  432.  
  433. if defaultOn then
  434. toggle(true)
  435. end
  436. end
  437.  
  438. createSetting("Click part to select","ClickSelect",false)
  439. createSetting("Selection Box","SelBox",false)
  440. createSetting("Clear property value on focus","ClearProps",false)
  441. createSetting("Select ungrouped models","SelectUngrouped",true)
  442. createSetting("SaveInstance decompiles scripts","SaveInstanceScripts",true)
  443.  
  444. --[[
  445. ClickSelectOption.MouseButton1Up:connect(function()
  446. if Settings.ClickSelect then
  447. Settings.ClickSelect = false
  448. ClickSelectOption.Text = "OFF"
  449. else
  450. Settings.ClickSelect = true
  451. ClickSelectOption.Text = "ON"
  452. end
  453. end)
  454.  
  455. SelectionBoxOption.MouseButton1Up:connect(function()
  456. if Settings.SelBox then
  457. Settings.SelBox = false
  458. SelectionBox.Adornee = nil
  459. SelectionBoxOption.Text = "OFF"
  460. else
  461. Settings.SelBox = true
  462. SelectionBoxOption.Text = "ON"
  463. end
  464. end)
  465.  
  466. ClearPropsOption.MouseButton1Up:connect(function()
  467. if Settings.ClearProps then
  468. Settings.ClearProps = false
  469. ClearPropsOption.Text = "OFF"
  470. else
  471. Settings.ClearProps = true
  472. ClearPropsOption.Text = "ON"
  473. end
  474. end)
  475.  
  476. SelectUngroupedOption.MouseButton1Up:connect(function()
  477. if Settings.SelectUngrouped then
  478. Settings.SelectUngrouped = false
  479. SelectUngroupedOption.Text = "OFF"
  480. else
  481. Settings.SelectUngrouped = true
  482. SelectUngroupedOption.Text = "ON"
  483. end
  484. end)
  485. --]]
  486.  
  487. local function getSelection()
  488. local t = GetSelection:Invoke()
  489. if t and #t > 0 then
  490. return t[1]
  491. else
  492. return nil
  493. end
  494. end
  495.  
  496. Mouse.Button1Down:connect(function()
  497. if CurrentWindow == "Explorer" and Settings.ClickSelect then
  498. local target = Mouse.Target
  499. if target then
  500. SetSelection:Invoke({target})
  501. end
  502. end
  503. end)
  504.  
  505. SelectionChanged.Event:connect(function()
  506. if Settings.SelBox then
  507. local success = pcall(function()
  508. local selection = getSelection()
  509. SelectionBox.Adornee = selection
  510. end)
  511. if not success then
  512. SelectionBox.Adornee = nil
  513. end
  514. end
  515. end)
  516.  
  517. SettingsListener.OnInvoke = ReturnSetting
  518.  
  519. -- Map Copier
  520.  
  521. function createMapSetting(obj,interName,defaultOn)
  522. local function toggle(on)
  523. if on then
  524. obj.Change.Bar:TweenPosition(UDim2.new(0,32,0,-2),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
  525. obj.Change.OnBar:TweenSize(UDim2.new(0,34,0,15),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
  526. obj.Status.Text = "On"
  527. SaveMapSettings[interName] = true
  528. else
  529. obj.Change.Bar:TweenPosition(UDim2.new(0,-2,0,-2),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
  530. obj.Change.OnBar:TweenSize(UDim2.new(0,0,0,15),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
  531. obj.Status.Text = "Off"
  532. SaveMapSettings[interName] = false
  533. end
  534. end
  535.  
  536. obj.Change.MouseButton1Click:connect(function()
  537. toggle(not SaveMapSettings[interName])
  538. end)
  539.  
  540. obj.Visible = true
  541. obj.Parent = SaveMapSettingFrame
  542.  
  543. if defaultOn then
  544. toggle(true)
  545. end
  546. end
  547.  
  548. function createCopyWhatSetting(serv)
  549. if SaveMapSettings.CopyWhat[serv] then
  550. local newSetting = SaveMapCopyTemplate:Clone()
  551. newSetting.Position = UDim2.new(0,0,0,#SaveMapCopyList:GetChildren() * 22 + 5)
  552. newSetting.Info.Text = serv
  553.  
  554. local function toggle(on)
  555. if on then
  556. newSetting.Change.enabled.Visible = true
  557. SaveMapSettings.CopyWhat[serv] = true
  558. else
  559. newSetting.Change.enabled.Visible = false
  560. SaveMapSettings.CopyWhat[serv] = false
  561. end
  562. end
  563.  
  564. newSetting.Change.MouseButton1Click:connect(function()
  565. toggle(not SaveMapSettings.CopyWhat[serv])
  566. end)
  567.  
  568. newSetting.Visible = true
  569. newSetting.Parent = SaveMapCopyList
  570. end
  571. end
  572.  
  573. createMapSetting(SaveMapSettingFrame.Scripts,"SaveScripts",true)
  574. createMapSetting(SaveMapSettingFrame.Terrain,"SaveTerrain",true)
  575. createMapSetting(SaveMapSettingFrame.Lighting,"LightingProperties",true)
  576. createMapSetting(SaveMapSettingFrame.CameraInstances,"CameraInstances",true)
  577.  
  578. createCopyWhatSetting("Workspace")
  579. createCopyWhatSetting("Lighting")
  580. createCopyWhatSetting("ReplicatedStorage")
  581. createCopyWhatSetting("ReplicatedFirst")
  582. createCopyWhatSetting("StarterPack")
  583. createCopyWhatSetting("StarterGui")
  584. createCopyWhatSetting("StarterPlayer")
  585.  
  586. SaveMapName.Text = tostring(game.PlaceId).."MapCopy"
  587.  
  588. SaveMapButton.MouseButton1Click:connect(function()
  589. local copyWhat = {}
  590.  
  591. local copyGroup = Instance.new("Model",game.ReplicatedStorage)
  592.  
  593. local copyScripts = SaveMapSettings.SaveScripts
  594.  
  595. local copyTerrain = SaveMapSettings.SaveTerrain
  596.  
  597. local lightingProperties = SaveMapSettings.LightingProperties
  598.  
  599. local cameraInstances = SaveMapSettings.CameraInstances
  600.  
  601. -----------------------------------------------------------------------------------
  602.  
  603. for i,v in pairs(SaveMapSettings.CopyWhat) do
  604. if v then
  605. table.insert(copyWhat,i)
  606. end
  607. end
  608.  
  609. local consoleFunc = printconsole or writeconsole
  610.  
  611. if consoleFunc then
  612. consoleFunc("Raspberry Pi's place copier loaded.")
  613. consoleFunc("Copying map of game "..tostring(game.PlaceId)..".")
  614. end
  615.  
  616. function archivable(root)
  617. for i,v in pairs(root:GetChildren()) do
  618. if not game.Players:GetPlayerFromCharacter(v) then
  619. v.Archivable = true
  620. archivable(v)
  621. end
  622. end
  623. end
  624.  
  625. function decompileS(root)
  626. for i,v in pairs(root:GetChildren()) do
  627. pcall(function()
  628. if v:IsA("LocalScript") then
  629. local isDisabled = v.Disabled
  630. v.Disabled = true
  631. v.Source = decompile(v)
  632. v.Disabled = isDisabled
  633.  
  634. if v.Source == "" then
  635. if consoleFunc then consoleFunc("LocalScript "..v.Name.." had a problem decompiling.") end
  636. else
  637. if consoleFunc then consoleFunc("LocalScript "..v.Name.." decompiled.") end
  638. end
  639. elseif v:IsA("ModuleScript") then
  640. v.Source = decompile(v)
  641.  
  642. if v.Source == "" then
  643. if consoleFunc then consoleFunc("ModuleScript "..v.Name.." had a problem decompiling.") end
  644. else
  645. if consoleFunc then consoleFunc("ModuleScript "..v.Name.." decompiled.") end
  646. end
  647. end
  648. end)
  649. decompileS(v)
  650. end
  651. end
  652.  
  653. for i,v in pairs(copyWhat) do archivable(game[v]) end
  654.  
  655. for j,obj in pairs(copyWhat) do
  656. if obj ~= "StarterPlayer" then
  657. local newFolder = Instance.new("Folder",copyGroup)
  658. newFolder.Name = obj
  659. for i,v in pairs(game[obj]:GetChildren()) do
  660. if v ~= copyGroup then
  661. pcall(function()
  662. v:Clone().Parent = newFolder
  663. end)
  664. end
  665. end
  666. else
  667. local newFolder = Instance.new("Model",copyGroup)
  668. newFolder.Name = "StarterPlayer"
  669. for i,v in pairs(game[obj]:GetChildren()) do
  670. local newObj = Instance.new("Folder",newFolder)
  671. newObj.Name = v.Name
  672. for _,c in pairs(v:GetChildren()) do
  673. if c.Name ~= "ControlScript" and c.Name ~= "CameraScript" then
  674. c:Clone().Parent = newObj
  675. end
  676. end
  677. end
  678. end
  679. end
  680.  
  681. if workspace.CurrentCamera and cameraInstances then
  682. local cameraFolder = Instance.new("Model",copyGroup)
  683. cameraFolder.Name = "CameraItems"
  684. for i,v in pairs(workspace.CurrentCamera:GetChildren()) do v:Clone().Parent = cameraFolder end
  685. end
  686.  
  687. if copyTerrain then
  688. local myTerrain = workspace.Terrain:CopyRegion(workspace.Terrain.MaxExtents)
  689. myTerrain.Parent = copyGroup
  690. end
  691.  
  692. function saveProp(obj,prop,par)
  693. local myProp = obj[prop]
  694. if type(myProp) == "boolean" then
  695. local newProp = Instance.new("BoolValue",par)
  696. newProp.Name = prop
  697. newProp.Value = myProp
  698. elseif type(myProp) == "number" then
  699. local newProp = Instance.new("IntValue",par)
  700. newProp.Name = prop
  701. newProp.Value = myProp
  702. elseif type(myProp) == "string" then
  703. local newProp = Instance.new("StringValue",par)
  704. newProp.Name = prop
  705. newProp.Value = myProp
  706. elseif type(myProp) == "userdata" then -- Assume Color3
  707. pcall(function()
  708. local newProp = Instance.new("Color3Value",par)
  709. newProp.Name = prop
  710. newProp.Value = myProp
  711. end)
  712. end
  713. end
  714.  
  715. if lightingProperties then
  716. local lightingProps = Instance.new("Model",copyGroup)
  717. lightingProps.Name = "LightingProperties"
  718.  
  719. saveProp(game.Lighting,"Ambient",lightingProps)
  720. saveProp(game.Lighting,"Brightness",lightingProps)
  721. saveProp(game.Lighting,"ColorShift_Bottom",lightingProps)
  722. saveProp(game.Lighting,"ColorShift_Top",lightingProps)
  723. saveProp(game.Lighting,"GlobalShadows",lightingProps)
  724. saveProp(game.Lighting,"OutdoorAmbient",lightingProps)
  725. saveProp(game.Lighting,"Outlines",lightingProps)
  726. saveProp(game.Lighting,"GeographicLatitude",lightingProps)
  727. saveProp(game.Lighting,"TimeOfDay",lightingProps)
  728. saveProp(game.Lighting,"FogColor",lightingProps)
  729. saveProp(game.Lighting,"FogEnd",lightingProps)
  730. saveProp(game.Lighting,"FogStart",lightingProps)
  731. end
  732.  
  733. if decompile and copyScripts then
  734. decompileS(copyGroup)
  735. end
  736.  
  737. if SaveInstance then
  738. SaveInstance(copyGroup,SaveMapName.Text..".rbxm")
  739. elseif saveinstance then
  740. saveinstance(getelysianpath()..SaveMapName.Text..".rbxm",copyGroup)
  741. end
  742. --print("Saved!")
  743. if consoleFunc then
  744. consoleFunc("The map has been copied.")
  745. end
  746. SaveMapButton.Text = "The map has been saved"
  747. wait(5)
  748. SaveMapButton.Text = "Save"
  749. end)
  750.  
  751. -- End Copier
  752.  
  753. wait()
  754.  
  755. IntroFrame:TweenPosition(UDim2.new(1,-300,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
  756.  
  757. switchWindows("Explorer")
  758.  
  759. wait(1)
  760.  
  761. SideMenu.Visible = true
  762.  
  763. for i = 0,1,0.1 do
  764. IntroFrame.BackgroundTransparency = i
  765. IntroFrame.Main.BackgroundTransparency = i
  766. IntroFrame.Slant.ImageTransparency = i
  767. IntroFrame.Title.TextTransparency = i
  768. IntroFrame.Version.TextTransparency = i
  769. IntroFrame.Creator.TextTransparency = i
  770. wait()
  771. end
  772.  
  773. IntroFrame.Visible = false
  774.  
  775. SlideFrame:TweenPosition(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
  776. OpenScriptEditorButton:TweenPosition(UDim2.new(0,0,0,180),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
  777. CloseToggleButton:TweenPosition(UDim2.new(0,0,0,210),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
  778. Slant:TweenPosition(UDim2.new(0,0,0,240),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.5,true)
  779.  
  780. wait(0.5)
  781.  
  782. for i = 1,0,-0.1 do
  783. OpenScriptEditorButton.Icon.ImageTransparency = i
  784. CloseToggleButton.TextTransparency = i
  785. wait()
  786. end
  787.  
  788. CloseToggleButton.Active = true
  789. CloseToggleButton.AutoButtonColor = true
  790.  
  791. OpenScriptEditorButton.Active = true
  792. OpenScriptEditorButton.AutoButtonColor = true
  793. end)
  794.  
  795. spawn(function()
  796. -- initial states
  797. local Option = {
  798. -- can modify object parents in the hierarchy
  799. Modifiable = false;
  800. -- can select objects
  801. Selectable = true;
  802. }
  803.  
  804. -- MERELY
  805.  
  806. Option.Modifiable = true
  807.  
  808. -- END MERELY
  809.  
  810. -- general size of GUI objects, in pixels
  811. local GUI_SIZE = 16
  812. -- padding between items within each entry
  813. local ENTRY_PADDING = 1
  814. -- padding between each entry
  815. local ENTRY_MARGIN = 1
  816.  
  817. local Input = game:GetService("UserInputService")
  818. local HoldingCtrl = false
  819. local HoldingShift = false
  820.  
  821. --[[
  822.  
  823. # Explorer Panel
  824.  
  825. A GUI panel that displays the game hierarchy.
  826.  
  827.  
  828. ## Selection Bindables
  829.  
  830. - `Function GetSelection ( )`
  831.  
  832. Returns an array of objects representing the objects currently
  833. selected in the panel.
  834.  
  835. - `Function SetSelection ( Objects selection )`
  836.  
  837. Sets the objects that are selected in the panel. `selection` is an array
  838. of objects.
  839.  
  840. - `Event SelectionChanged ( )`
  841.  
  842. Fired after the selection changes.
  843.  
  844.  
  845. ## Option Bindables
  846.  
  847. - `Function GetOption ( string optionName )`
  848.  
  849. If `optionName` is given, returns the value of that option. Otherwise,
  850. returns a table of options and their current values.
  851.  
  852. - `Function SetOption ( string optionName, bool value )`
  853.  
  854. Sets `optionName` to `value`.
  855.  
  856. Options:
  857.  
  858. - Modifiable
  859.  
  860. Whether objects can be modified by the panel.
  861.  
  862. Note that modifying objects depends on being able to select them. If
  863. Selectable is false, then Actions will not be available. Reparenting
  864. is still possible, but only for the dragged object.
  865.  
  866. - Selectable
  867.  
  868. Whether objects can be selected.
  869.  
  870. If Modifiable is false, then left-clicking will perform a drag
  871. selection.
  872.  
  873. ## Updates
  874.  
  875. - 2013-09-18
  876. - Fixed explorer icons to match studio explorer.
  877.  
  878. - 2013-09-14
  879. - Added GetOption and SetOption bindables.
  880. - Option: Modifiable; sets whether objects can be modified by the panel.
  881. - Option: Selectable; sets whether objects can be selected.
  882. - Slight modification to left-click selection behavior.
  883. - Improved layout and scaling.
  884.  
  885. - 2013-09-13
  886. - Added drag to reparent objects.
  887. - Left-click to select/deselect object.
  888. - Left-click and drag unselected object to reparent single object.
  889. - Left-click and drag selected object to move reparent entire selection.
  890. - Right-click while dragging to cancel.
  891.  
  892. - 2013-09-11
  893. - Added explorer panel header with actions.
  894. - Added Cut action.
  895. - Added Copy action.
  896. - Added Paste action.
  897. - Added Delete action.
  898. - Added drag selection.
  899. - Left-click: Add to selection on drag.
  900. - Right-click: Add to or remove from selection on drag.
  901. - Ensured SelectionChanged fires only when the selection actually changes.
  902. - Added documentation and change log.
  903. - Fixed thread issue.
  904.  
  905. - 2013-09-09
  906. - Added basic multi-selection.
  907. - Left-click to set selection.
  908. - Right-click to add to or remove from selection.
  909. - Removed "Selection" ObjectValue.
  910. - Added GetSelection BindableFunction.
  911. - Added SetSelection BindableFunction.
  912. - Added SelectionChanged BindableEvent.
  913. - Changed font to SourceSans.
  914.  
  915. - 2013-08-31
  916. - Improved GUI sizing based off of `GUI_SIZE` constant.
  917. - Automatic font size detection.
  918.  
  919. - 2013-08-27
  920. - Initial explorer panel.
  921.  
  922.  
  923. ## Todo
  924.  
  925. - Sorting
  926. - by ExplorerOrder
  927. - by children
  928. - by name
  929. - Drag objects to reparent
  930.  
  931. ]]
  932.  
  933. local ENTRY_SIZE = GUI_SIZE + ENTRY_PADDING*2
  934. local ENTRY_BOUND = ENTRY_SIZE + ENTRY_MARGIN
  935. local HEADER_SIZE = ENTRY_SIZE*2
  936.  
  937. local FONT = 'SourceSans'
  938. local FONT_SIZE do
  939. local size = {8,9,10,11,12,14,18,24,36,48}
  940. local s
  941. local n = math.huge
  942. for i = 1,#size do
  943. if size[i] <= GUI_SIZE then
  944. FONT_SIZE = i - 1
  945. end
  946. end
  947. end
  948.  
  949. local GuiColor = {
  950. Background = Color3.new(233/255, 233/255, 233/255);
  951. Border = Color3.new(149/255, 149/255, 149/255);
  952. Selected = Color3.new( 96/255, 140/255, 211/255);
  953. BorderSelected = Color3.new( 86/255, 125/255, 188/255);
  954. Text = Color3.new( 0/255, 0/255, 0/255);
  955. TextDisabled = Color3.new(128/255, 128/255, 128/255);
  956. TextSelected = Color3.new(255/255, 255/255, 255/255);
  957. Button = Color3.new(221/255, 221/255, 221/255);
  958. ButtonBorder = Color3.new(149/255, 149/255, 149/255);
  959. ButtonSelected = Color3.new(255/255, 0/255, 0/255);
  960. Field = Color3.new(255/255, 255/255, 255/255);
  961. FieldBorder = Color3.new(191/255, 191/255, 191/255);
  962. TitleBackground = Color3.new(178/255, 178/255, 178/255);
  963. }
  964.  
  965. ----------------------------------------------------------------
  966. ----------------------------------------------------------------
  967. ----------------------------------------------------------------
  968. ----------------------------------------------------------------
  969. ---- Icon map constants
  970.  
  971. local MAP_ID = 483448923
  972.  
  973. -- Indices based on implementation of Icon function.
  974. local ACTION_CUT = 160
  975. local ACTION_COPY = 161
  976. local ACTION_PASTE = 162
  977. local ACTION_DELETE = 163
  978. local ACTION_SORT = 164
  979. local ACTION_CUT_OVER = 174
  980. local ACTION_COPY_OVER = 175
  981. local ACTION_PASTE_OVER = 176
  982. local ACTION_DELETE_OVER = 177
  983. local ACTION_SORT_OVER = 178
  984. local ACTION_EDITQUICKACCESS = 190
  985. local ACTION_FREEZE = 188
  986. local ACTION_STARRED = 189
  987. local ACTION_ADDSTAR = 184
  988. local ACTION_ADDSTAR_OVER = 187
  989.  
  990. local NODE_COLLAPSED = 165
  991. local NODE_EXPANDED = 166
  992. local NODE_COLLAPSED_OVER = 179
  993. local NODE_EXPANDED_OVER = 180
  994.  
  995. local ExplorerIndex = {
  996. ["Accessory"] = 32;
  997. ["Accoutrement"] = 32;
  998. ["AdService"] = 73;
  999. ["Animation"] = 60;
  1000. ["AnimationController"] = 60;
  1001. ["AnimationTrack"] = 60;
  1002. ["Animator"] = 60;
  1003. ["ArcHandles"] = 56;
  1004. ["AssetService"] = 72;
  1005. ["Attachment"] = 34;
  1006. ["Backpack"] = 20;
  1007. ["BadgeService"] = 75;
  1008. ["BallSocketConstraint"] = 89;
  1009. ["BillboardGui"] = 64;
  1010. ["BinaryStringValue"] = 4;
  1011. ["BindableEvent"] = 67;
  1012. ["BindableFunction"] = 66;
  1013. ["BlockMesh"] = 8;
  1014. ["BloomEffect"] = 90;
  1015. ["BlurEffect"] = 90;
  1016. ["BodyAngularVelocity"] = 14;
  1017. ["BodyForce"] = 14;
  1018. ["BodyGyro"] = 14;
  1019. ["BodyPosition"] = 14;
  1020. ["BodyThrust"] = 14;
  1021. ["BodyVelocity"] = 14;
  1022. ["BoolValue"] = 4;
  1023. ["BoxHandleAdornment"] = 54;
  1024. ["BrickColorValue"] = 4;
  1025. ["Camera"] = 5;
  1026. ["CFrameValue"] = 4;
  1027. ["CharacterMesh"] = 60;
  1028. ["Chat"] = 33;
  1029. ["ClickDetector"] = 41;
  1030. ["CollectionService"] = 30;
  1031. ["Color3Value"] = 4;
  1032. ["ColorCorrectionEffect"] = 90;
  1033. ["ConeHandleAdornment"] = 54;
  1034. ["Configuration"] = 58;
  1035. ["ContentProvider"] = 72;
  1036. ["ContextActionService"] = 41;
  1037. ["CoreGui"] = 46;
  1038. ["CoreScript"] = 18;
  1039. ["CornerWedgePart"] = 1;
  1040. ["CustomEvent"] = 4;
  1041. ["CustomEventReceiver"] = 4;
  1042. ["CylinderHandleAdornment"] = 54;
  1043. ["CylinderMesh"] = 8;
  1044. ["CylindricalConstraint"] = 89;
  1045. ["Debris"] = 30;
  1046. ["Decal"] = 7;
  1047. ["Dialog"] = 62;
  1048. ["DialogChoice"] = 63;
  1049. ["DoubleConstrainedValue"] = 4;
  1050. ["Explosion"] = 36;
  1051. ["FileMesh"] = 8;
  1052. ["Fire"] = 61;
  1053. ["Flag"] = 38;
  1054. ["FlagStand"] = 39;
  1055. ["FloorWire"] = 4;
  1056. ["Folder"] = 70;
  1057. ["ForceField"] = 37;
  1058. ["Frame"] = 48;
  1059. ["GamePassService"] = 19;
  1060. ["Glue"] = 34;
  1061. ["GuiButton"] = 52;
  1062. ["GuiMain"] = 47;
  1063. ["GuiService"] = 47;
  1064. ["Handles"] = 53;
  1065. ["HapticService"] = 84;
  1066. ["Hat"] = 45;
  1067. ["HingeConstraint"] = 89;
  1068. ["Hint"] = 33;
  1069. ["HopperBin"] = 22;
  1070. ["HttpService"] = 76;
  1071. ["Humanoid"] = 9;
  1072. ["ImageButton"] = 52;
  1073. ["ImageLabel"] = 49;
  1074. ["InsertService"] = 72;
  1075. ["IntConstrainedValue"] = 4;
  1076. ["IntValue"] = 4;
  1077. ["JointInstance"] = 34;
  1078. ["JointsService"] = 34;
  1079. ["Keyframe"] = 60;
  1080. ["KeyframeSequence"] = 60;
  1081. ["KeyframeSequenceProvider"] = 60;
  1082. ["Lighting"] = 13;
  1083. ["LineHandleAdornment"] = 54;
  1084. ["LocalScript"] = 18;
  1085. ["LogService"] = 87;
  1086. ["MarketplaceService"] = 46;
  1087. ["Message"] = 33;
  1088. ["Model"] = 2;
  1089. ["ModuleScript"] = 71;
  1090. ["Motor"] = 34;
  1091. ["Motor6D"] = 34;
  1092. ["MoveToConstraint"] = 89;
  1093. ["NegateOperation"] = 78;
  1094. ["NetworkClient"] = 16;
  1095. ["NetworkReplicator"] = 29;
  1096. ["NetworkServer"] = 15;
  1097. ["NumberValue"] = 4;
  1098. ["ObjectValue"] = 4;
  1099. ["Pants"] = 44;
  1100. ["ParallelRampPart"] = 1;
  1101. ["Part"] = 1;
  1102. ["ParticleEmitter"] = 69;
  1103. ["PartPairLasso"] = 57;
  1104. ["PathfindingService"] = 37;
  1105. ["Platform"] = 35;
  1106. ["Player"] = 12;
  1107. ["PlayerGui"] = 46;
  1108. ["Players"] = 21;
  1109. ["PlayerScripts"] = 82;
  1110. ["PointLight"] = 13;
  1111. ["PointsService"] = 83;
  1112. ["Pose"] = 60;
  1113. ["PrismaticConstraint"] = 89;
  1114. ["PrismPart"] = 1;
  1115. ["PyramidPart"] = 1;
  1116. ["RayValue"] = 4;
  1117. ["ReflectionMetadata"] = 86;
  1118. ["ReflectionMetadataCallbacks"] = 86;
  1119. ["ReflectionMetadataClass"] = 86;
  1120. ["ReflectionMetadataClasses"] = 86;
  1121. ["ReflectionMetadataEnum"] = 86;
  1122. ["ReflectionMetadataEnumItem"] = 86;
  1123. ["ReflectionMetadataEnums"] = 86;
  1124. ["ReflectionMetadataEvents"] = 86;
  1125. ["ReflectionMetadataFunctions"] = 86;
  1126. ["ReflectionMetadataMember"] = 86;
  1127. ["ReflectionMetadataProperties"] = 86;
  1128. ["ReflectionMetadataYieldFunctions"] = 86;
  1129. ["RemoteEvent"] = 80;
  1130. ["RemoteFunction"] = 79;
  1131. ["ReplicatedFirst"] = 72;
  1132. ["ReplicatedStorage"] = 72;
  1133. ["RightAngleRampPart"] = 1;
  1134. ["RocketPropulsion"] = 14;
  1135. ["RodConstraint"] = 89;
  1136. ["RopeConstraint"] = 89;
  1137. ["Rotate"] = 34;
  1138. ["RotateP"] = 34;
  1139. ["RotateV"] = 34;
  1140. ["RunService"] = 66;
  1141. ["ScreenGui"] = 47;
  1142. ["Script"] = 6;
  1143. ["ScrollingFrame"] = 48;
  1144. ["Seat"] = 35;
  1145. ["Selection"] = 55;
  1146. ["SelectionBox"] = 54;
  1147. ["SelectionPartLasso"] = 57;
  1148. ["SelectionPointLasso"] = 57;
  1149. ["SelectionSphere"] = 54;
  1150. ["ServerScriptService"] = 0;
  1151. ["ServerStorage"] = 74;
  1152. ["Shirt"] = 43;
  1153. ["ShirtGraphic"] = 40;
  1154. ["SkateboardPlatform"] = 35;
  1155. ["Sky"] = 28;
  1156. ["SlidingBallConstraint"] = 89;
  1157. ["Smoke"] = 59;
  1158. ["Snap"] = 34;
  1159. ["Sound"] = 11;
  1160. ["SoundService"] = 31;
  1161. ["Sparkles"] = 42;
  1162. ["SpawnLocation"] = 25;
  1163. ["SpecialMesh"] = 8;
  1164. ["SphereHandleAdornment"] = 54;
  1165. ["SpotLight"] = 13;
  1166. ["SpringConstraint"] = 89;
  1167. ["StarterCharacterScripts"] = 82;
  1168. ["StarterGear"] = 20;
  1169. ["StarterGui"] = 46;
  1170. ["StarterPack"] = 20;
  1171. ["StarterPlayer"] = 88;
  1172. ["StarterPlayerScripts"] = 82;
  1173. ["Status"] = 2;
  1174. ["StringValue"] = 4;
  1175. ["SunRaysEffect"] = 90;
  1176. ["SurfaceGui"] = 64;
  1177. ["SurfaceLight"] = 13;
  1178. ["SurfaceSelection"] = 55;
  1179. ["Team"] = 24;
  1180. ["Teams"] = 23;
  1181. ["TeleportService"] = 81;
  1182. ["Terrain"] = 65;
  1183. ["TerrainRegion"] = 65;
  1184. ["TestService"] = 68;
  1185. ["TextBox"] = 51;
  1186. ["TextButton"] = 51;
  1187. ["TextLabel"] = 50;
  1188. ["Texture"] = 10;
  1189. ["TextureTrail"] = 4;
  1190. ["Tool"] = 17;
  1191. ["TouchTransmitter"] = 37;
  1192. ["TrussPart"] = 1;
  1193. ["UnionOperation"] = 77;
  1194. ["UserInputService"] = 84;
  1195. ["Vector3Value"] = 4;
  1196. ["VehicleSeat"] = 35;
  1197. ["VelocityMotor"] = 34;
  1198. ["WedgePart"] = 1;
  1199. ["Weld"] = 34;
  1200. ["Workspace"] = 19;
  1201. }
  1202.  
  1203. ----------------------------------------------------------------
  1204. ----------------------------------------------------------------
  1205. ----------------------------------------------------------------
  1206. ----------------------------------------------------------------
  1207. ----------------------------------------------------------------
  1208.  
  1209. function Create(ty,data)
  1210. local obj
  1211. if type(ty) == 'string' then
  1212. obj = Instance.new(ty)
  1213. else
  1214. obj = ty
  1215. end
  1216. for k, v in pairs(data) do
  1217. if type(k) == 'number' then
  1218. v.Parent = obj
  1219. else
  1220. obj[k] = v
  1221. end
  1222. end
  1223. return obj
  1224. end
  1225.  
  1226. local barActive = false
  1227. local activeOptions = {}
  1228.  
  1229. function createDDown(dBut, callback,...)
  1230. if barActive then
  1231. for i,v in pairs(activeOptions) do
  1232. v:Destroy()
  1233. end
  1234. activeOptions = {}
  1235. barActive = false
  1236. return
  1237. else
  1238. barActive = true
  1239. end
  1240. local slots = {...}
  1241. local base = dBut
  1242. for i,v in pairs(slots) do
  1243. local newOption = base:Clone()
  1244. newOption.ZIndex = 5
  1245. newOption.Name = "Option "..tostring(i)
  1246. newOption.Parent = base.Parent.Parent.Parent
  1247. newOption.BackgroundTransparency = 0
  1248. newOption.ZIndex = 2
  1249. table.insert(activeOptions,newOption)
  1250. newOption.Position = UDim2.new(-0.4, dBut.Position.X.Offset, dBut.Position.Y.Scale, dBut.Position.Y.Offset + (#activeOptions * dBut.Size.Y.Offset))
  1251. newOption.Text = slots[i]
  1252. newOption.MouseButton1Down:connect(function()
  1253. dBut.Text = slots[i]
  1254. callback(slots[i])
  1255. for i,v in pairs(activeOptions) do
  1256. v:Destroy()
  1257. end
  1258. activeOptions = {}
  1259. barActive = false
  1260. end)
  1261. end
  1262. end
  1263.  
  1264. -- Connects a function to an event such that it fires asynchronously
  1265. function Connect(event,func)
  1266. return event:connect(function(...)
  1267. local a = {...}
  1268. spawn(function() func(unpack(a)) end)
  1269. end)
  1270. end
  1271.  
  1272. -- returns the ascendant ScreenGui of an object
  1273. function GetScreen(screen)
  1274. if screen == nil then return nil end
  1275. while not screen:IsA("ScreenGui") do
  1276. screen = screen.Parent
  1277. if screen == nil then return nil end
  1278. end
  1279. return screen
  1280. end
  1281.  
  1282. do
  1283. local ZIndexLock = {}
  1284. -- Sets the ZIndex of an object and its descendants. Objects are locked so
  1285. -- that SetZIndexOnChanged doesn't spawn multiple threads that set the
  1286. -- ZIndex of the same object.
  1287. function SetZIndex(object,z)
  1288. if not ZIndexLock[object] then
  1289. ZIndexLock[object] = true
  1290. if object:IsA'GuiObject' then
  1291. object.ZIndex = z
  1292. end
  1293. local children = object:GetChildren()
  1294. for i = 1,#children do
  1295. SetZIndex(children[i],z)
  1296. end
  1297. ZIndexLock[object] = nil
  1298. end
  1299. end
  1300.  
  1301. function SetZIndexOnChanged(object)
  1302. return object.Changed:connect(function(p)
  1303. if p == "ZIndex" then
  1304. SetZIndex(object,object.ZIndex)
  1305. end
  1306. end)
  1307. end
  1308. end
  1309.  
  1310. ---- IconMap ----
  1311. -- Image size: 256px x 256px
  1312. -- Icon size: 16px x 16px
  1313. -- Padding between each icon: 2px
  1314. -- Padding around image edge: 1px
  1315. -- Total icons: 14 x 14 (196)
  1316. local Icon do
  1317. local iconMap = 'http://www.roblox.com/asset/?id=' .. MAP_ID
  1318. game:GetService('ContentProvider'):Preload(iconMap)
  1319. local iconDehash do
  1320. -- 14 x 14, 0-based input, 0-based output
  1321. local f=math.floor
  1322. function iconDehash(h)
  1323. return f(h/14%14),f(h%14)
  1324. end
  1325. end
  1326.  
  1327. function Icon(IconFrame,index)
  1328. local row,col = iconDehash(index)
  1329. local mapSize = Vector2.new(256,256)
  1330. local pad,border = 2,1
  1331. local iconSize = 16
  1332.  
  1333. local class = 'Frame'
  1334. if type(IconFrame) == 'string' then
  1335. class = IconFrame
  1336. IconFrame = nil
  1337. end
  1338.  
  1339. if not IconFrame then
  1340. IconFrame = Create(class,{
  1341. Name = "Icon";
  1342. BackgroundTransparency = 1;
  1343. ClipsDescendants = true;
  1344. Create('ImageLabel',{
  1345. Name = "IconMap";
  1346. Active = false;
  1347. BackgroundTransparency = 1;
  1348. Image = iconMap;
  1349. Size = UDim2.new(mapSize.x/iconSize,0,mapSize.y/iconSize,0);
  1350. });
  1351. })
  1352. end
  1353.  
  1354. IconFrame.IconMap.Position = UDim2.new(-col - (pad*(col+1) + border)/iconSize,0,-row - (pad*(row+1) + border)/iconSize,0)
  1355. return IconFrame
  1356. end
  1357. end
  1358.  
  1359. ----------------------------------------------------------------
  1360. ----------------------------------------------------------------
  1361. ----------------------------------------------------------------
  1362. ----------------------------------------------------------------
  1363. ---- ScrollBar
  1364. do
  1365. -- AutoButtonColor doesn't always reset properly
  1366. local function ResetButtonColor(button)
  1367. local active = button.Active
  1368. button.Active = not active
  1369. button.Active = active
  1370. end
  1371.  
  1372. local function ArrowGraphic(size,dir,scaled,template)
  1373. local Frame = Create('Frame',{
  1374. Name = "Arrow Graphic";
  1375. BorderSizePixel = 0;
  1376. Size = UDim2.new(0,size,0,size);
  1377. Transparency = 1;
  1378. })
  1379. if not template then
  1380. template = Instance.new("Frame")
  1381. template.BorderSizePixel = 0
  1382. end
  1383.  
  1384. local transform
  1385. if dir == nil or dir == 'Up' then
  1386. function transform(p,s) return p,s end
  1387. elseif dir == 'Down' then
  1388. function transform(p,s) return UDim2.new(0,p.X.Offset,0,size-p.Y.Offset-1),s end
  1389. elseif dir == 'Left' then
  1390. 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
  1391. elseif dir == 'Right' then
  1392. 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
  1393. end
  1394.  
  1395. local scale
  1396. if scaled then
  1397. 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
  1398. else
  1399. function scale(p,s) return p,s end
  1400. end
  1401.  
  1402. local o = math.floor(size/4)
  1403. if size%2 == 0 then
  1404. local n = size/2-1
  1405. for i = 0,n do
  1406. local t = template:Clone()
  1407. local p,s = scale(transform(
  1408. UDim2.new(0,n-i,0,o+i),
  1409. UDim2.new(0,(i+1)*2,0,1)
  1410. ))
  1411. t.Position = p
  1412. t.Size = s
  1413. t.Parent = Frame
  1414. end
  1415. else
  1416. local n = (size-1)/2
  1417. for i = 0,n do
  1418. local t = template:Clone()
  1419. local p,s = scale(transform(
  1420. UDim2.new(0,n-i,0,o+i),
  1421. UDim2.new(0,i*2+1,0,1)
  1422. ))
  1423. t.Position = p
  1424. t.Size = s
  1425. t.Parent = Frame
  1426. end
  1427. end
  1428. if size%4 > 1 then
  1429. local t = template:Clone()
  1430. local p,s = scale(transform(
  1431. UDim2.new(0,0,0,size-o-1),
  1432. UDim2.new(0,size,0,1)
  1433. ))
  1434. t.Position = p
  1435. t.Size = s
  1436. t.Parent = Frame
  1437. end
  1438. return Frame
  1439. end
  1440.  
  1441.  
  1442. local function GripGraphic(size,dir,spacing,scaled,template)
  1443. local Frame = Create('Frame',{
  1444. Name = "Grip Graphic";
  1445. BorderSizePixel = 0;
  1446. Size = UDim2.new(0,size.x,0,size.y);
  1447. Transparency = 1;
  1448. })
  1449. if not template then
  1450. template = Instance.new("Frame")
  1451. template.BorderSizePixel = 0
  1452. end
  1453.  
  1454. spacing = spacing or 2
  1455.  
  1456. local scale
  1457. if scaled then
  1458. function scale(p) return UDim2.new(p.X.Offset/size.x,0,p.Y.Offset/size.y,0) end
  1459. else
  1460. function scale(p) return p end
  1461. end
  1462.  
  1463. if dir == 'Vertical' then
  1464. for i=0,size.x-1,spacing do
  1465. local t = template:Clone()
  1466. t.Size = scale(UDim2.new(0,1,0,size.y))
  1467. t.Position = scale(UDim2.new(0,i,0,0))
  1468. t.Parent = Frame
  1469. end
  1470. elseif dir == nil or dir == 'Horizontal' then
  1471. for i=0,size.y-1,spacing do
  1472. local t = template:Clone()
  1473. t.Size = scale(UDim2.new(0,size.x,0,1))
  1474. t.Position = scale(UDim2.new(0,0,0,i))
  1475. t.Parent = Frame
  1476. end
  1477. end
  1478.  
  1479. return Frame
  1480. end
  1481.  
  1482. local mt = {
  1483. __index = {
  1484. GetScrollPercent = function(self)
  1485. return self.ScrollIndex/(self.TotalSpace-self.VisibleSpace)
  1486. end;
  1487. CanScrollDown = function(self)
  1488. return self.ScrollIndex + self.VisibleSpace < self.TotalSpace
  1489. end;
  1490. CanScrollUp = function(self)
  1491. return self.ScrollIndex > 0
  1492. end;
  1493. ScrollDown = function(self)
  1494. self.ScrollIndex = self.ScrollIndex + self.PageIncrement
  1495. self:Update()
  1496. end;
  1497. ScrollUp = function(self)
  1498. self.ScrollIndex = self.ScrollIndex - self.PageIncrement
  1499. self:Update()
  1500. end;
  1501. ScrollTo = function(self,index)
  1502. self.ScrollIndex = index
  1503. self:Update()
  1504. end;
  1505. SetScrollPercent = function(self,percent)
  1506. self.ScrollIndex = math.floor((self.TotalSpace - self.VisibleSpace)*percent + 0.5)
  1507. self:Update()
  1508. end;
  1509. };
  1510. }
  1511. mt.__index.CanScrollRight = mt.__index.CanScrollDown
  1512. mt.__index.CanScrollLeft = mt.__index.CanScrollUp
  1513. mt.__index.ScrollLeft = mt.__index.ScrollUp
  1514. mt.__index.ScrollRight = mt.__index.ScrollDown
  1515.  
  1516. function ScrollBar(horizontal)
  1517. -- create row scroll bar
  1518. local ScrollFrame = Create('Frame',{
  1519. Name = "ScrollFrame";
  1520. Position = horizontal and UDim2.new(0,0,1,-GUI_SIZE) or UDim2.new(1,-GUI_SIZE,0,0);
  1521. Size = horizontal and UDim2.new(1,0,0,GUI_SIZE) or UDim2.new(0,GUI_SIZE,1,0);
  1522. BackgroundTransparency = 1;
  1523. Create('ImageButton',{
  1524. Name = "ScrollDown";
  1525. Position = horizontal and UDim2.new(1,-GUI_SIZE,0,0) or UDim2.new(0,0,1,-GUI_SIZE);
  1526. Size = UDim2.new(0, GUI_SIZE, 0, GUI_SIZE);
  1527. BackgroundColor3 = GuiColor.Button;
  1528. BorderColor3 = GuiColor.Border;
  1529. --BorderSizePixel = 0;
  1530. });
  1531. Create('ImageButton',{
  1532. Name = "ScrollUp";
  1533. Size = UDim2.new(0, GUI_SIZE, 0, GUI_SIZE);
  1534. BackgroundColor3 = GuiColor.Button;
  1535. BorderColor3 = GuiColor.Border;
  1536. --BorderSizePixel = 0;
  1537. });
  1538. Create('ImageButton',{
  1539. Name = "ScrollBar";
  1540. Size = horizontal and UDim2.new(1,-GUI_SIZE*2,1,0) or UDim2.new(1,0,1,-GUI_SIZE*2);
  1541. Position = horizontal and UDim2.new(0,GUI_SIZE,0,0) or UDim2.new(0,0,0,GUI_SIZE);
  1542. AutoButtonColor = false;
  1543. BackgroundColor3 = Color3.new(0.94902, 0.94902, 0.94902);
  1544. BorderColor3 = GuiColor.Border;
  1545. --BorderSizePixel = 0;
  1546. Create('ImageButton',{
  1547. Name = "ScrollThumb";
  1548. AutoButtonColor = false;
  1549. Size = UDim2.new(0, GUI_SIZE, 0, GUI_SIZE);
  1550. BackgroundColor3 = GuiColor.Button;
  1551. BorderColor3 = GuiColor.Border;
  1552. --BorderSizePixel = 0;
  1553. });
  1554. });
  1555. })
  1556.  
  1557. local graphicTemplate = Create('Frame',{
  1558. Name="Graphic";
  1559. BorderSizePixel = 0;
  1560. BackgroundColor3 = GuiColor.Border;
  1561. })
  1562. local graphicSize = GUI_SIZE/2
  1563.  
  1564. local ScrollDownFrame = ScrollFrame.ScrollDown
  1565. local ScrollDownGraphic = ArrowGraphic(graphicSize,horizontal and 'Right' or 'Down',true,graphicTemplate)
  1566. ScrollDownGraphic.Position = UDim2.new(0.5,-graphicSize/2,0.5,-graphicSize/2)
  1567. ScrollDownGraphic.Parent = ScrollDownFrame
  1568. local ScrollUpFrame = ScrollFrame.ScrollUp
  1569. local ScrollUpGraphic = ArrowGraphic(graphicSize,horizontal and 'Left' or 'Up',true,graphicTemplate)
  1570. ScrollUpGraphic.Position = UDim2.new(0.5,-graphicSize/2,0.5,-graphicSize/2)
  1571. ScrollUpGraphic.Parent = ScrollUpFrame
  1572. local ScrollBarFrame = ScrollFrame.ScrollBar
  1573. local ScrollThumbFrame = ScrollBarFrame.ScrollThumb
  1574. do
  1575. local size = GUI_SIZE*3/8
  1576. local Decal = GripGraphic(Vector2.new(size,size),horizontal and 'Vertical' or 'Horizontal',2,graphicTemplate)
  1577. Decal.Position = UDim2.new(0.5,-size/2,0.5,-size/2)
  1578. Decal.Parent = ScrollThumbFrame
  1579. end
  1580.  
  1581. local Class = setmetatable({
  1582. GUI = ScrollFrame;
  1583. ScrollIndex = 0;
  1584. VisibleSpace = 0;
  1585. TotalSpace = 0;
  1586. PageIncrement = 1;
  1587. },mt)
  1588.  
  1589. local UpdateScrollThumb
  1590. if horizontal then
  1591. function UpdateScrollThumb()
  1592. ScrollThumbFrame.Size = UDim2.new(Class.VisibleSpace/Class.TotalSpace,0,0,GUI_SIZE)
  1593. if ScrollThumbFrame.AbsoluteSize.x < GUI_SIZE then
  1594. ScrollThumbFrame.Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE)
  1595. end
  1596. local barSize = ScrollBarFrame.AbsoluteSize.x
  1597. ScrollThumbFrame.Position = UDim2.new(Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.x)/barSize,0,0,0)
  1598. end
  1599. else
  1600. function UpdateScrollThumb()
  1601. ScrollThumbFrame.Size = UDim2.new(0,GUI_SIZE,Class.VisibleSpace/Class.TotalSpace,0)
  1602. if ScrollThumbFrame.AbsoluteSize.y < GUI_SIZE then
  1603. ScrollThumbFrame.Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE)
  1604. end
  1605. local barSize = ScrollBarFrame.AbsoluteSize.y
  1606. ScrollThumbFrame.Position = UDim2.new(0,0,Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.y)/barSize,0)
  1607. end
  1608. end
  1609.  
  1610. local lastDown
  1611. local lastUp
  1612. local scrollStyle = {BackgroundColor3=GuiColor.Border,BackgroundTransparency=0}
  1613. local scrollStyle_ds = {BackgroundColor3=GuiColor.Border,BackgroundTransparency=0.7}
  1614.  
  1615. local function Update()
  1616. local t = Class.TotalSpace
  1617. local v = Class.VisibleSpace
  1618. local s = Class.ScrollIndex
  1619. if v <= t then
  1620. if s > 0 then
  1621. if s + v > t then
  1622. Class.ScrollIndex = t - v
  1623. end
  1624. else
  1625. Class.ScrollIndex = 0
  1626. end
  1627. else
  1628. Class.ScrollIndex = 0
  1629. end
  1630.  
  1631. if Class.UpdateCallback then
  1632. if Class.UpdateCallback(Class) == false then
  1633. return
  1634. end
  1635. end
  1636.  
  1637. local down = Class:CanScrollDown()
  1638. local up = Class:CanScrollUp()
  1639. if down ~= lastDown then
  1640. lastDown = down
  1641. ScrollDownFrame.Active = down
  1642. ScrollDownFrame.AutoButtonColor = down
  1643. local children = ScrollDownGraphic:GetChildren()
  1644. local style = down and scrollStyle or scrollStyle_ds
  1645. for i = 1,#children do
  1646. Create(children[i],style)
  1647. end
  1648. end
  1649. if up ~= lastUp then
  1650. lastUp = up
  1651. ScrollUpFrame.Active = up
  1652. ScrollUpFrame.AutoButtonColor = up
  1653. local children = ScrollUpGraphic:GetChildren()
  1654. local style = up and scrollStyle or scrollStyle_ds
  1655. for i = 1,#children do
  1656. Create(children[i],style)
  1657. end
  1658. end
  1659. ScrollThumbFrame.Visible = down or up
  1660. UpdateScrollThumb()
  1661. end
  1662. Class.Update = Update
  1663.  
  1664. SetZIndexOnChanged(ScrollFrame)
  1665.  
  1666. local MouseDrag = Create('ImageButton',{
  1667. Name = "MouseDrag";
  1668. Position = UDim2.new(-0.25,0,-0.25,0);
  1669. Size = UDim2.new(1.5,0,1.5,0);
  1670. Transparency = 1;
  1671. AutoButtonColor = false;
  1672. Active = true;
  1673. ZIndex = 10;
  1674. })
  1675.  
  1676. local scrollEventID = 0
  1677. ScrollDownFrame.MouseButton1Down:connect(function()
  1678. scrollEventID = tick()
  1679. local current = scrollEventID
  1680. local up_con
  1681. up_con = MouseDrag.MouseButton1Up:connect(function()
  1682. scrollEventID = tick()
  1683. MouseDrag.Parent = nil
  1684. ResetButtonColor(ScrollDownFrame)
  1685. up_con:disconnect(); drag = nil
  1686. end)
  1687. MouseDrag.Parent = GetScreen(ScrollFrame)
  1688. Class:ScrollDown()
  1689. wait(0.2) -- delay before auto scroll
  1690. while scrollEventID == current do
  1691. Class:ScrollDown()
  1692. if not Class:CanScrollDown() then break end
  1693. wait()
  1694. end
  1695. end)
  1696.  
  1697. ScrollDownFrame.MouseButton1Up:connect(function()
  1698. scrollEventID = tick()
  1699. end)
  1700.  
  1701. ScrollUpFrame.MouseButton1Down:connect(function()
  1702. scrollEventID = tick()
  1703. local current = scrollEventID
  1704. local up_con
  1705. up_con = MouseDrag.MouseButton1Up:connect(function()
  1706. scrollEventID = tick()
  1707. MouseDrag.Parent = nil
  1708. ResetButtonColor(ScrollUpFrame)
  1709. up_con:disconnect(); drag = nil
  1710. end)
  1711. MouseDrag.Parent = GetScreen(ScrollFrame)
  1712. Class:ScrollUp()
  1713. wait(0.2)
  1714. while scrollEventID == current do
  1715. Class:ScrollUp()
  1716. if not Class:CanScrollUp() then break end
  1717. wait()
  1718. end
  1719. end)
  1720.  
  1721. ScrollUpFrame.MouseButton1Up:connect(function()
  1722. scrollEventID = tick()
  1723. end)
  1724.  
  1725. if horizontal then
  1726. ScrollBarFrame.MouseButton1Down:connect(function(x,y)
  1727. scrollEventID = tick()
  1728. local current = scrollEventID
  1729. local up_con
  1730. up_con = MouseDrag.MouseButton1Up:connect(function()
  1731. scrollEventID = tick()
  1732. MouseDrag.Parent = nil
  1733. ResetButtonColor(ScrollUpFrame)
  1734. up_con:disconnect(); drag = nil
  1735. end)
  1736. MouseDrag.Parent = GetScreen(ScrollFrame)
  1737. if x > ScrollThumbFrame.AbsolutePosition.x then
  1738. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  1739. wait(0.2)
  1740. while scrollEventID == current do
  1741. if x < ScrollThumbFrame.AbsolutePosition.x + ScrollThumbFrame.AbsoluteSize.x then break end
  1742. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  1743. wait()
  1744. end
  1745. else
  1746. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  1747. wait(0.2)
  1748. while scrollEventID == current do
  1749. if x > ScrollThumbFrame.AbsolutePosition.x then break end
  1750. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  1751. wait()
  1752. end
  1753. end
  1754. end)
  1755. else
  1756. ScrollBarFrame.MouseButton1Down:connect(function(x,y)
  1757. scrollEventID = tick()
  1758. local current = scrollEventID
  1759. local up_con
  1760. up_con = MouseDrag.MouseButton1Up:connect(function()
  1761. scrollEventID = tick()
  1762. MouseDrag.Parent = nil
  1763. ResetButtonColor(ScrollUpFrame)
  1764. up_con:disconnect(); drag = nil
  1765. end)
  1766. MouseDrag.Parent = GetScreen(ScrollFrame)
  1767. if y > ScrollThumbFrame.AbsolutePosition.y then
  1768. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  1769. wait(0.2)
  1770. while scrollEventID == current do
  1771. if y < ScrollThumbFrame.AbsolutePosition.y + ScrollThumbFrame.AbsoluteSize.y then break end
  1772. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  1773. wait()
  1774. end
  1775. else
  1776. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  1777. wait(0.2)
  1778. while scrollEventID == current do
  1779. if y > ScrollThumbFrame.AbsolutePosition.y then break end
  1780. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  1781. wait()
  1782. end
  1783. end
  1784. end)
  1785. end
  1786.  
  1787. if horizontal then
  1788. ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
  1789. scrollEventID = tick()
  1790. local mouse_offset = x - ScrollThumbFrame.AbsolutePosition.x
  1791. local drag_con
  1792. local up_con
  1793. drag_con = MouseDrag.MouseMoved:connect(function(x,y)
  1794. local bar_abs_pos = ScrollBarFrame.AbsolutePosition.x
  1795. local bar_drag = ScrollBarFrame.AbsoluteSize.x - ScrollThumbFrame.AbsoluteSize.x
  1796. local bar_abs_one = bar_abs_pos + bar_drag
  1797. x = x - mouse_offset
  1798. x = x < bar_abs_pos and bar_abs_pos or x > bar_abs_one and bar_abs_one or x
  1799. x = x - bar_abs_pos
  1800. Class:SetScrollPercent(x/(bar_drag))
  1801. end)
  1802. up_con = MouseDrag.MouseButton1Up:connect(function()
  1803. scrollEventID = tick()
  1804. MouseDrag.Parent = nil
  1805. ResetButtonColor(ScrollThumbFrame)
  1806. drag_con:disconnect(); drag_con = nil
  1807. up_con:disconnect(); drag = nil
  1808. end)
  1809. MouseDrag.Parent = GetScreen(ScrollFrame)
  1810. end)
  1811. else
  1812. ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
  1813. scrollEventID = tick()
  1814. local mouse_offset = y - ScrollThumbFrame.AbsolutePosition.y
  1815. local drag_con
  1816. local up_con
  1817. drag_con = MouseDrag.MouseMoved:connect(function(x,y)
  1818. local bar_abs_pos = ScrollBarFrame.AbsolutePosition.y
  1819. local bar_drag = ScrollBarFrame.AbsoluteSize.y - ScrollThumbFrame.AbsoluteSize.y
  1820. local bar_abs_one = bar_abs_pos + bar_drag
  1821. y = y - mouse_offset
  1822. y = y < bar_abs_pos and bar_abs_pos or y > bar_abs_one and bar_abs_one or y
  1823. y = y - bar_abs_pos
  1824. Class:SetScrollPercent(y/(bar_drag))
  1825. end)
  1826. up_con = MouseDrag.MouseButton1Up:connect(function()
  1827. scrollEventID = tick()
  1828. MouseDrag.Parent = nil
  1829. ResetButtonColor(ScrollThumbFrame)
  1830. drag_con:disconnect(); drag_con = nil
  1831. up_con:disconnect(); drag = nil
  1832. end)
  1833. MouseDrag.Parent = GetScreen(ScrollFrame)
  1834. end)
  1835. end
  1836.  
  1837. function Class:Destroy()
  1838. ScrollFrame:Destroy()
  1839. MouseDrag:Destroy()
  1840. for k in pairs(Class) do
  1841. Class[k] = nil
  1842. end
  1843. setmetatable(Class,nil)
  1844. end
  1845.  
  1846. Update()
  1847.  
  1848. return Class
  1849. end
  1850. end
  1851.  
  1852. ----------------------------------------------------------------
  1853. ----------------------------------------------------------------
  1854. ----------------------------------------------------------------
  1855. ----------------------------------------------------------------
  1856. ---- Explorer panel
  1857.  
  1858. local explorerPanel = D_E_X.ExplorerPanel
  1859. Create(explorerPanel,{
  1860. BackgroundColor3 = GuiColor.Field;
  1861. BorderColor3 = GuiColor.Border;
  1862. Active = true;
  1863. })
  1864.  
  1865. local SettingsRemote = explorerPanel.Parent:WaitForChild("SettingsPanel"):WaitForChild("GetSetting")
  1866. local GetApiRemote = explorerPanel.Parent:WaitForChild("PropertiesFrame"):WaitForChild("GetApi")
  1867. local GetAwaitRemote = explorerPanel.Parent:WaitForChild("PropertiesFrame"):WaitForChild("GetAwaiting")
  1868. local bindSetAwaiting = explorerPanel.Parent:WaitForChild("PropertiesFrame"):WaitForChild("SetAwaiting")
  1869.  
  1870. local SaveInstanceWindow = explorerPanel.Parent:WaitForChild("SaveInstance")
  1871. local ConfirmationWindow = explorerPanel.Parent:WaitForChild("Confirmation")
  1872. local CautionWindow = explorerPanel.Parent:WaitForChild("Caution")
  1873. local TableCautionWindow = explorerPanel.Parent:WaitForChild("TableCaution")
  1874.  
  1875. local RemoteWindow = explorerPanel.Parent:WaitForChild("CallRemote")
  1876.  
  1877. local ScriptEditor = explorerPanel.Parent:WaitForChild("ScriptEditor")
  1878. local ScriptEditorEvent = ScriptEditor:WaitForChild("OpenScript")
  1879.  
  1880. local CurrentSaveInstanceWindow
  1881. local CurrentRemoteWindow
  1882.  
  1883. local lastSelectedNode
  1884.  
  1885. local DexStorage
  1886. local DexStorageMain
  1887. local DexStorageEnabled
  1888.  
  1889. if saveinstance then DexStorageEnabled = true end
  1890.  
  1891. if DexStorageEnabled then
  1892. DexStorage = Instance.new("Folder")
  1893. DexStorage.Name = "Dex"
  1894. DexStorageMain = Instance.new("Folder",DexStorage)
  1895. DexStorageMain.Name = "DexStorage"
  1896. end
  1897.  
  1898. local NilStorage
  1899. local NilStorageMain
  1900. local NilStorageEnabled = false
  1901.  
  1902. if NilStorageEnabled then
  1903. NilStorage = Instance.new("Folder")
  1904. NilStorage.Name = "Dex Internal Storage"
  1905. NilStorageMain = Instance.new("Folder", NilStorage)
  1906. NilStorageMain.Name = "Nil Instances"
  1907. end
  1908.  
  1909. local listFrame = Create('Frame',{
  1910. Name = "List";
  1911. BackgroundTransparency = 1;
  1912. ClipsDescendants = true;
  1913. Position = UDim2.new(0,0,0,HEADER_SIZE);
  1914. Size = UDim2.new(1,-GUI_SIZE,1,-HEADER_SIZE);
  1915. Parent = explorerPanel;
  1916. })
  1917.  
  1918. local scrollBar = ScrollBar(false)
  1919. scrollBar.PageIncrement = 1
  1920. Create(scrollBar.GUI,{
  1921. Position = UDim2.new(1,-GUI_SIZE,0,HEADER_SIZE);
  1922. Size = UDim2.new(0,GUI_SIZE,1,-HEADER_SIZE);
  1923. Parent = explorerPanel;
  1924. })
  1925.  
  1926. local scrollBarH = ScrollBar(true)
  1927. scrollBarH.PageIncrement = GUI_SIZE
  1928. Create(scrollBarH.GUI,{
  1929. Position = UDim2.new(0,0,1,-GUI_SIZE);
  1930. Size = UDim2.new(1,-GUI_SIZE,0,GUI_SIZE);
  1931. Visible = false;
  1932. Parent = explorerPanel;
  1933. })
  1934.  
  1935. local headerFrame = Create('Frame',{
  1936. Name = "Header";
  1937. BackgroundColor3 = GuiColor.Background;
  1938. BorderColor3 = GuiColor.Border;
  1939. Position = UDim2.new(0,0,0,0);
  1940. Size = UDim2.new(1,0,0,HEADER_SIZE);
  1941. Parent = explorerPanel;
  1942. Create('TextLabel',{
  1943. Text = "Explorer";
  1944. BackgroundTransparency = 1;
  1945. TextColor3 = GuiColor.Text;
  1946. TextXAlignment = 'Left';
  1947. Font = FONT;
  1948. FontSize = FONT_SIZE;
  1949. Position = UDim2.new(0,4,0,0);
  1950. Size = UDim2.new(1,-4,0.5,0);
  1951. });
  1952. })
  1953.  
  1954. local explorerFilter = Create('TextBox',{
  1955. Text = "Filter Workspace";
  1956. BackgroundTransparency = 0.8;
  1957. TextColor3 = GuiColor.Text;
  1958. TextXAlignment = 'Left';
  1959. Font = FONT;
  1960. FontSize = FONT_SIZE;
  1961. Position = UDim2.new(0,4,0.5,0);
  1962. Size = UDim2.new(1,-8,0.5,-2);
  1963. });
  1964. explorerFilter.Parent = headerFrame
  1965.  
  1966. SetZIndexOnChanged(explorerPanel)
  1967.  
  1968. local function CreateColor3(r, g, b) return Color3.new(r/255,g/255,b/255) end
  1969.  
  1970. local Styles = {
  1971. Font = Enum.Font.Arial;
  1972. Margin = 5;
  1973. Black = CreateColor3(0,0,0);
  1974. White = CreateColor3(255,255,255);
  1975. }
  1976.  
  1977. local DropDown = {
  1978. Font = Styles.Font;
  1979. FontSize = Enum.FontSize.Size14;
  1980. TextColor = CreateColor3(0,0,0);
  1981. TextColorOver = Styles.White;
  1982. TextXAlignment = Enum.TextXAlignment.Left;
  1983. Height = 20;
  1984. BackColor = Styles.White;
  1985. BackColorOver = CreateColor3(86,125,188);
  1986. BorderColor = CreateColor3(216,216,216);
  1987. BorderSizePixel = 2;
  1988. ArrowColor = CreateColor3(160,160,160);
  1989. ArrowColorOver = Styles.Black;
  1990. }
  1991.  
  1992. local Row = {
  1993. Font = Styles.Font;
  1994. FontSize = Enum.FontSize.Size14;
  1995. TextXAlignment = Enum.TextXAlignment.Left;
  1996. TextColor = Styles.Black;
  1997. TextColorOver = Styles.White;
  1998. TextLockedColor = CreateColor3(120,120,120);
  1999. Height = 24;
  2000. BorderColor = CreateColor3(216,216,216);
  2001. BackgroundColor = Styles.White;
  2002. BackgroundColorAlternate = CreateColor3(246,246,246);
  2003. BackgroundColorMouseover = CreateColor3(211,224,244);
  2004. TitleMarginLeft = 15;
  2005. }
  2006.  
  2007. local currentRightClickMenu
  2008. local CurrentInsertObjectWindow
  2009. local CurrentFunctionCallerWindow
  2010.  
  2011. local RbxApi
  2012.  
  2013. function ClassCanCreate(IName)
  2014. local success = pcall(function() Instance.new(IName) end)
  2015. if not success then
  2016. return false
  2017. else
  2018. return true
  2019. end
  2020. end
  2021.  
  2022. function GetClasses()
  2023. if RbxApi == nil then return {} end
  2024. local classTable = {}
  2025. for i,v in pairs(RbxApi.Classes) do
  2026. if ClassCanCreate(v.Name) then
  2027. table.insert(classTable,v.Name)
  2028. end
  2029. end
  2030. return classTable
  2031. end
  2032.  
  2033. local function sortAlphabetic(t, property)
  2034. table.sort(t,
  2035. function(x,y) return x[property] < y[property]
  2036. end)
  2037. end
  2038.  
  2039. local function FunctionIsHidden(functionData)
  2040. local tags = functionData["tags"]
  2041. for _,name in pairs(tags) do
  2042. if name == "deprecated"
  2043. or name == "hidden"
  2044. or name == "writeonly" then
  2045. return true
  2046. end
  2047. end
  2048. return false
  2049. end
  2050.  
  2051. local function GetAllFunctions(className)
  2052. local class = RbxApi.Classes[className]
  2053. local functions = {}
  2054.  
  2055. if not class then return functions end
  2056.  
  2057. while class do
  2058. if class.Name == "Instance" then break end
  2059. for _,nextFunction in pairs(class.Functions) do
  2060. if not FunctionIsHidden(nextFunction) then
  2061. table.insert(functions, nextFunction)
  2062. end
  2063. end
  2064. class = RbxApi.Classes[class.Superclass]
  2065. end
  2066.  
  2067. sortAlphabetic(functions, "Name")
  2068.  
  2069. return functions
  2070. end
  2071.  
  2072. function GetFunctions()
  2073. if RbxApi == nil then return {} end
  2074. local List = SelectionVar():Get()
  2075.  
  2076. if #List == 0 then return end
  2077.  
  2078. local MyObject = List[1]
  2079.  
  2080. local functionTable = {}
  2081. for i,v in pairs(GetAllFunctions(MyObject.ClassName)) do
  2082. table.insert(functionTable,v)
  2083. end
  2084. return functionTable
  2085. end
  2086.  
  2087. function CreateInsertObjectMenu(choices, currentChoice, readOnly, onClick)
  2088. local mouse = game.Players.LocalPlayer:GetMouse()
  2089. local totalSize = explorerPanel.Parent.AbsoluteSize.y
  2090. if #choices == 0 then return end
  2091.  
  2092. table.sort(choices, function(a,b) return a < b end)
  2093.  
  2094. local frame = Instance.new("Frame")
  2095. frame.Name = "InsertObject"
  2096. frame.Size = UDim2.new(0, 200, 1, 0)
  2097. frame.BackgroundTransparency = 1
  2098. frame.Active = true
  2099.  
  2100. local menu = nil
  2101. local arrow = nil
  2102. local expanded = false
  2103. local margin = DropDown.BorderSizePixel;
  2104.  
  2105. --[[
  2106. local button = Instance.new("TextButton")
  2107. button.Font = Row.Font
  2108. button.FontSize = Row.FontSize
  2109. button.TextXAlignment = Row.TextXAlignment
  2110. button.BackgroundTransparency = 1
  2111. button.TextColor3 = Row.TextColor
  2112. if readOnly then
  2113. button.TextColor3 = Row.TextLockedColor
  2114. end
  2115. button.Text = currentChoice
  2116. button.Size = UDim2.new(1, -2 * Styles.Margin, 1, 0)
  2117. button.Position = UDim2.new(0, Styles.Margin, 0, 0)
  2118. button.Parent = frame
  2119. --]]
  2120.  
  2121. local function hideMenu()
  2122. expanded = false
  2123. --showArrow(DropDown.ArrowColor)
  2124. if frame then
  2125. --frame:Destroy()
  2126. CurrentInsertObjectWindow.Visible = false
  2127. end
  2128. end
  2129.  
  2130. local function showMenu()
  2131. expanded = true
  2132. menu = Instance.new("ScrollingFrame")
  2133. menu.Size = UDim2.new(0,200,1,0)
  2134. menu.CanvasSize = UDim2.new(0, 200, 0, #choices * DropDown.Height)
  2135. menu.Position = UDim2.new(0, margin, 0, 0)
  2136. menu.BackgroundTransparency = 0
  2137. menu.BackgroundColor3 = DropDown.BackColor
  2138. menu.BorderColor3 = DropDown.BorderColor
  2139. menu.BorderSizePixel = DropDown.BorderSizePixel
  2140. menu.TopImage = "rbxasset://textures/blackBkg_square.png"
  2141. menu.MidImage = "rbxasset://textures/blackBkg_square.png"
  2142. menu.BottomImage = "rbxasset://textures/blackBkg_square.png"
  2143. menu.Active = true
  2144. menu.ZIndex = 5
  2145. menu.Parent = frame
  2146.  
  2147. --local parentFrameHeight = script.Parent.List.Size.Y.Offset
  2148. --local rowHeight = mouse.Y
  2149. --if (rowHeight + menu.Size.Y.Offset) > parentFrameHeight then
  2150. -- menu.Position = UDim2.new(0, margin, 0, -1 * (#choices * DropDown.Height) - margin)
  2151. --end
  2152.  
  2153. local function choice(name)
  2154. onClick(name)
  2155. hideMenu()
  2156. end
  2157.  
  2158. for i,name in pairs(choices) do
  2159. local option = CreateRightClickMenuItem(name, function()
  2160. choice(name)
  2161. end,1)
  2162. option.Size = UDim2.new(1, 0, 0, 20)
  2163. option.Position = UDim2.new(0, 0, 0, (i - 1) * DropDown.Height)
  2164. option.ZIndex = menu.ZIndex
  2165. option.Parent = menu
  2166. end
  2167. end
  2168.  
  2169.  
  2170. showMenu()
  2171.  
  2172.  
  2173. return frame
  2174. end
  2175.  
  2176. function CreateFunctionCallerMenu(choices, currentChoice, readOnly, onClick)
  2177. local mouse = game.Players.LocalPlayer:GetMouse()
  2178. local totalSize = explorerPanel.Parent.AbsoluteSize.y
  2179. if #choices == 0 then return end
  2180.  
  2181. table.sort(choices, function(a,b) return a.Name < b.Name end)
  2182.  
  2183. local frame = Instance.new("Frame")
  2184. frame.Name = "InsertObject"
  2185. frame.Size = UDim2.new(0, 200, 1, 0)
  2186. frame.BackgroundTransparency = 1
  2187. frame.Active = true
  2188.  
  2189. local menu = nil
  2190. local arrow = nil
  2191. local expanded = false
  2192. local margin = DropDown.BorderSizePixel;
  2193.  
  2194. local function hideMenu()
  2195. expanded = false
  2196. --showArrow(DropDown.ArrowColor)
  2197. if frame then
  2198. --frame:Destroy()
  2199. CurrentInsertObjectWindow.Visible = false
  2200. end
  2201. end
  2202.  
  2203. local function showMenu()
  2204. expanded = true
  2205. menu = Instance.new("ScrollingFrame")
  2206. menu.Size = UDim2.new(0,300,1,0)
  2207. menu.CanvasSize = UDim2.new(0, 300, 0, #choices * DropDown.Height)
  2208. menu.Position = UDim2.new(0, margin, 0, 0)
  2209. menu.BackgroundTransparency = 0
  2210. menu.BackgroundColor3 = DropDown.BackColor
  2211. menu.BorderColor3 = DropDown.BorderColor
  2212. menu.BorderSizePixel = DropDown.BorderSizePixel
  2213. menu.TopImage = "rbxasset://textures/blackBkg_square.png"
  2214. menu.MidImage = "rbxasset://textures/blackBkg_square.png"
  2215. menu.BottomImage = "rbxasset://textures/blackBkg_square.png"
  2216. menu.Active = true
  2217. menu.ZIndex = 5
  2218. menu.Parent = frame
  2219.  
  2220. --local parentFrameHeight = script.Parent.List.Size.Y.Offset
  2221. --local rowHeight = mouse.Y
  2222. --if (rowHeight + menu.Size.Y.Offset) > parentFrameHeight then
  2223. -- menu.Position = UDim2.new(0, margin, 0, -1 * (#choices * DropDown.Height) - margin)
  2224. --end
  2225.  
  2226. local function GetParameters(functionData)
  2227. local paraString = ""
  2228. paraString = paraString.."("
  2229. for i,v in pairs(functionData.Arguments) do
  2230. paraString = paraString..v.Type.." "..v.Name
  2231. if i < #functionData.Arguments then
  2232. paraString = paraString..", "
  2233. end
  2234. end
  2235. paraString = paraString..")"
  2236. return paraString
  2237. end
  2238.  
  2239. local function choice(name)
  2240. onClick(name)
  2241. hideMenu()
  2242. end
  2243.  
  2244. for i,name in pairs(choices) do
  2245. local option = CreateRightClickMenuItem(name.ReturnType.." "..name.Name..GetParameters(name), function()
  2246. choice(name)
  2247. end,2)
  2248. option.Size = UDim2.new(1, 0, 0, 20)
  2249. option.Position = UDim2.new(0, 0, 0, (i - 1) * DropDown.Height)
  2250. option.ZIndex = menu.ZIndex
  2251. option.Parent = menu
  2252. end
  2253. end
  2254.  
  2255.  
  2256. showMenu()
  2257.  
  2258.  
  2259. return frame
  2260. end
  2261.  
  2262. function CreateInsertObject()
  2263. if not CurrentInsertObjectWindow then return end
  2264. CurrentInsertObjectWindow.Visible = true
  2265. if currentRightClickMenu and CurrentInsertObjectWindow.Visible then
  2266. CurrentInsertObjectWindow.Position = UDim2.new(0,currentRightClickMenu.Position.X.Offset-currentRightClickMenu.Size.X.Offset-2,0,0)
  2267. end
  2268. if CurrentInsertObjectWindow.Visible then
  2269. CurrentInsertObjectWindow.Parent = explorerPanel.Parent
  2270. end
  2271. end
  2272.  
  2273. function CreateFunctionCaller()
  2274. if CurrentFunctionCallerWindow then
  2275. CurrentFunctionCallerWindow:Destroy()
  2276. CurrentFunctionCallerWindow = nil
  2277. end
  2278. CurrentFunctionCallerWindow = CreateFunctionCallerMenu(
  2279. GetFunctions(),
  2280. "",
  2281. false,
  2282. function(option)
  2283. CurrentFunctionCallerWindow:Destroy()
  2284. CurrentFunctionCallerWindow = nil
  2285. local list = SelectionVar():Get()
  2286. for i = 1,#list do
  2287. pcall(function() Instance.new(option,list[i]) end)
  2288. end
  2289. print(option.Name .. " selected to be called. Function caller being added soon, please wait!")
  2290. --CallFunction()
  2291. DestroyRightClick()
  2292. end
  2293. )
  2294. if currentRightClickMenu and CurrentFunctionCallerWindow then
  2295. CurrentFunctionCallerWindow.Position = UDim2.new(0,currentRightClickMenu.Position.X.Offset-currentRightClickMenu.Size.X.Offset*1.5-2,0,0)
  2296. end
  2297. if CurrentFunctionCallerWindow then
  2298. CurrentFunctionCallerWindow.Parent = explorerPanel.Parent
  2299. end
  2300. end
  2301.  
  2302. function CreateRightClickMenuItem(text, onClick, insObj)
  2303. local button = Instance.new("TextButton")
  2304. button.Font = DropDown.Font
  2305. button.FontSize = DropDown.FontSize
  2306. button.TextColor3 = DropDown.TextColor
  2307. button.TextXAlignment = DropDown.TextXAlignment
  2308. button.BackgroundColor3 = DropDown.BackColor
  2309. button.AutoButtonColor = false
  2310. button.BorderSizePixel = 0
  2311. button.Active = true
  2312. button.Text = text
  2313.  
  2314. if insObj == 1 then
  2315. local newIcon = Icon(nil,ExplorerIndex[text] or 0)
  2316. newIcon.Position = UDim2.new(0,0,0,2)
  2317. newIcon.Size = UDim2.new(0,16,0,16)
  2318. newIcon.IconMap.ZIndex = 5
  2319. newIcon.Parent = button
  2320. button.Text = "\t\t"..button.Text
  2321. elseif insObj == 2 then
  2322. button.FontSize = Enum.FontSize.Size11
  2323. end
  2324.  
  2325. button.MouseEnter:connect(function()
  2326. button.TextColor3 = DropDown.TextColorOver
  2327. button.BackgroundColor3 = DropDown.BackColorOver
  2328. if not insObj and CurrentInsertObjectWindow then
  2329. if CurrentInsertObjectWindow.Visible == false and button.Text == "Insert Object" then
  2330. CreateInsertObject()
  2331. elseif CurrentInsertObjectWindow.Visible and button.Text ~= "Insert Object" then
  2332. CurrentInsertObjectWindow.Visible = false
  2333. end
  2334. end
  2335. if not insObj then
  2336. if CurrentFunctionCallerWindow and button.Text ~= "Call Function" then
  2337. CurrentFunctionCallerWindow:Destroy()
  2338. CurrentFunctionCallerWindow = nil
  2339. elseif button.Text == "Call Function" then
  2340. CreateFunctionCaller()
  2341. end
  2342. end
  2343. end)
  2344. button.MouseLeave:connect(function()
  2345. button.TextColor3 = DropDown.TextColor
  2346. button.BackgroundColor3 = DropDown.BackColor
  2347. end)
  2348. button.MouseButton1Click:connect(function()
  2349. button.TextColor3 = DropDown.TextColor
  2350. button.BackgroundColor3 = DropDown.BackColor
  2351. onClick(text)
  2352. end)
  2353. return button
  2354. end
  2355.  
  2356. function CreateRightClickMenu(choices, currentChoice, readOnly, onClick)
  2357. local mouse = game.Players.LocalPlayer:GetMouse()
  2358.  
  2359. local frame = Instance.new("Frame")
  2360. frame.Name = "DropDown"
  2361. frame.Size = UDim2.new(0, 200, 1, 0)
  2362. frame.BackgroundTransparency = 1
  2363. frame.Active = true
  2364.  
  2365. local menu = nil
  2366. local arrow = nil
  2367. local expanded = false
  2368. local margin = DropDown.BorderSizePixel;
  2369.  
  2370. --[[
  2371. local button = Instance.new("TextButton")
  2372. button.Font = Row.Font
  2373. button.FontSize = Row.FontSize
  2374. button.TextXAlignment = Row.TextXAlignment
  2375. button.BackgroundTransparency = 1
  2376. button.TextColor3 = Row.TextColor
  2377. if readOnly then
  2378. button.TextColor3 = Row.TextLockedColor
  2379. end
  2380. button.Text = currentChoice
  2381. button.Size = UDim2.new(1, -2 * Styles.Margin, 1, 0)
  2382. button.Position = UDim2.new(0, Styles.Margin, 0, 0)
  2383. button.Parent = frame
  2384. --]]
  2385.  
  2386. local function hideMenu()
  2387. expanded = false
  2388. --showArrow(DropDown.ArrowColor)
  2389. if frame then
  2390. frame:Destroy()
  2391. DestroyRightClick()
  2392. end
  2393. end
  2394.  
  2395. local function showMenu()
  2396. expanded = true
  2397. menu = Instance.new("Frame")
  2398. menu.Size = UDim2.new(0, 200, 0, #choices * DropDown.Height)
  2399. menu.Position = UDim2.new(0, margin, 0, 5)
  2400. menu.BackgroundTransparency = 0
  2401. menu.BackgroundColor3 = DropDown.BackColor
  2402. menu.BorderColor3 = DropDown.BorderColor
  2403. menu.BorderSizePixel = DropDown.BorderSizePixel
  2404. menu.Active = true
  2405. menu.ZIndex = 5
  2406. menu.Parent = frame
  2407.  
  2408. --local parentFrameHeight = script.Parent.List.Size.Y.Offset
  2409. --local rowHeight = mouse.Y
  2410. --if (rowHeight + menu.Size.Y.Offset) > parentFrameHeight then
  2411. -- menu.Position = UDim2.new(0, margin, 0, -1 * (#choices * DropDown.Height) - margin)
  2412. --end
  2413.  
  2414. local function choice(name)
  2415. onClick(name)
  2416. hideMenu()
  2417. end
  2418.  
  2419. for i,name in pairs(choices) do
  2420. local option = CreateRightClickMenuItem(name, function()
  2421. choice(name)
  2422. end)
  2423. option.Size = UDim2.new(1, 0, 0, 20)
  2424. option.Position = UDim2.new(0, 0, 0, (i - 1) * DropDown.Height)
  2425. option.ZIndex = menu.ZIndex
  2426. option.Parent = menu
  2427. end
  2428. end
  2429.  
  2430.  
  2431. showMenu()
  2432.  
  2433.  
  2434. return frame
  2435. end
  2436.  
  2437. function checkMouseInGui(gui)
  2438. if gui == nil then return false end
  2439. local plrMouse = game.Players.LocalPlayer:GetMouse()
  2440. local guiPosition = gui.AbsolutePosition
  2441. local guiSize = gui.AbsoluteSize
  2442.  
  2443. 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
  2444. return true
  2445. else
  2446. return false
  2447. end
  2448. end
  2449.  
  2450. local clipboard = {}
  2451. local function delete(o)
  2452. o.Parent = nil
  2453. end
  2454.  
  2455. local getTextWidth do
  2456. local text = Create('TextLabel',{
  2457. Name = "TextWidth";
  2458. TextXAlignment = 'Left';
  2459. TextYAlignment = 'Center';
  2460. Font = FONT;
  2461. FontSize = FONT_SIZE;
  2462. Text = "";
  2463. Position = UDim2.new(0,0,0,0);
  2464. Size = UDim2.new(1,0,1,0);
  2465. Visible = false;
  2466. Parent = explorerPanel;
  2467. })
  2468. function getTextWidth(s)
  2469. text.Text = s
  2470. return text.TextBounds.x
  2471. end
  2472. end
  2473.  
  2474. local nameScanned = false
  2475. -- Holds the game tree converted to a list.
  2476. local TreeList = {}
  2477. -- Matches objects to their tree node representation.
  2478. local NodeLookup = {}
  2479.  
  2480. local nodeWidth = 0
  2481.  
  2482. local QuickButtons = {}
  2483.  
  2484. function filteringWorkspace()
  2485. if explorerFilter.Text ~= "" and explorerFilter.Text ~= "Filter Workspace" then
  2486. return true
  2487. end
  2488. return false
  2489. end
  2490.  
  2491. function lookForAName(obj,name)
  2492. for i,v in pairs(obj:GetChildren()) do
  2493. if string.find(string.lower(v.Name),string.lower(name)) then nameScanned = true end
  2494. lookForAName(v,name)
  2495. end
  2496. end
  2497.  
  2498. function scanName(obj)
  2499. nameScanned = false
  2500. if string.find(string.lower(obj.Name),string.lower(explorerFilter.Text)) then
  2501. nameScanned = true
  2502. else
  2503. lookForAName(obj,explorerFilter.Text)
  2504. end
  2505. return nameScanned
  2506. end
  2507.  
  2508. function updateActions()
  2509. for i,v in pairs(QuickButtons) do
  2510. if v.Cond() then
  2511. v.Toggle(true)
  2512. else
  2513. v.Toggle(false)
  2514. end
  2515. end
  2516. end
  2517.  
  2518. local updateList,rawUpdateList,updateScroll,rawUpdateSize do
  2519. local function r(t)
  2520. for i = 1,#t do
  2521. if not filteringWorkspace() or scanName(t[i].Object) then
  2522. TreeList[#TreeList+1] = t[i]
  2523.  
  2524. local w = (t[i].Depth)*(2+ENTRY_PADDING+GUI_SIZE) + 2 + ENTRY_SIZE + 4 + getTextWidth(t[i].Object.Name) + 4
  2525. if w > nodeWidth then
  2526. nodeWidth = w
  2527. end
  2528. if t[i].Expanded or filteringWorkspace() then
  2529. r(t[i])
  2530. end
  2531. end
  2532. end
  2533. end
  2534.  
  2535. function rawUpdateSize()
  2536. scrollBarH.TotalSpace = nodeWidth
  2537. scrollBarH.VisibleSpace = listFrame.AbsoluteSize.x
  2538. scrollBarH:Update()
  2539. local visible = scrollBarH:CanScrollDown() or scrollBarH:CanScrollUp()
  2540. scrollBarH.GUI.Visible = visible
  2541.  
  2542. listFrame.Size = UDim2.new(1,-GUI_SIZE,1,-GUI_SIZE*(visible and 1 or 0) - HEADER_SIZE)
  2543.  
  2544. scrollBar.VisibleSpace = math.ceil(listFrame.AbsoluteSize.y/ENTRY_BOUND)
  2545. scrollBar.GUI.Size = UDim2.new(0,GUI_SIZE,1,-GUI_SIZE*(visible and 1 or 0) - HEADER_SIZE)
  2546.  
  2547. scrollBar.TotalSpace = #TreeList+1
  2548. scrollBar:Update()
  2549. end
  2550.  
  2551. function rawUpdateList()
  2552. -- Clear then repopulate the entire list. It appears to be fast enough.
  2553. TreeList = {}
  2554. nodeWidth = 0
  2555. r(NodeLookup[workspace.Parent:GetDebugId(10)])
  2556. if DexStorageEnabled then
  2557. r(NodeLookup[DexStorage:GetDebugId(10)])
  2558. end
  2559. if NilStorageEnabled then
  2560. r(NodeLookup[NilStorage:GetDebugId(10)])
  2561. end
  2562. rawUpdateSize()
  2563. updateActions()
  2564. end
  2565.  
  2566. -- Adding or removing large models will cause many updates to occur. We
  2567. -- can reduce the number of updates by creating a delay, then dropping any
  2568. -- updates that occur during the delay.
  2569. local updatingList = false
  2570. function updateList()
  2571. if updatingList then return end
  2572. updatingList = true
  2573. wait(0.25)
  2574. updatingList = false
  2575. rawUpdateList()
  2576. end
  2577.  
  2578. local updatingScroll = false
  2579. function updateScroll()
  2580. if updatingScroll then return end
  2581. updatingScroll = true
  2582. wait(0.25)
  2583. updatingScroll = false
  2584. scrollBar:Update()
  2585. end
  2586. end
  2587.  
  2588. local Selection do
  2589. local bindGetSelection = explorerPanel:FindFirstChild("GetSelection")
  2590. if not bindGetSelection then
  2591. bindGetSelection = Create('BindableFunction',{Name = "GetSelection"})
  2592. bindGetSelection.Parent = explorerPanel
  2593. end
  2594.  
  2595. local bindSetSelection = explorerPanel:FindFirstChild("SetSelection")
  2596. if not bindSetSelection then
  2597. bindSetSelection = Create('BindableFunction',{Name = "SetSelection"})
  2598. bindSetSelection.Parent = explorerPanel
  2599. end
  2600.  
  2601. local bindSelectionChanged = explorerPanel:FindFirstChild("SelectionChanged")
  2602. if not bindSelectionChanged then
  2603. bindSelectionChanged = Create('BindableEvent',{Name = "SelectionChanged"})
  2604. bindSelectionChanged.Parent = explorerPanel
  2605. end
  2606.  
  2607. local SelectionList = {}
  2608. local SelectionSet = {}
  2609. local Updates = true
  2610. Selection = {
  2611. Selected = SelectionSet;
  2612. List = SelectionList;
  2613. }
  2614.  
  2615. local function addObject(object)
  2616. -- list update
  2617. local lupdate = false
  2618. -- scroll update
  2619. local supdate = false
  2620.  
  2621. if not SelectionSet[object] then
  2622. local node = NodeLookup[object:GetDebugId(10)]
  2623. if node then
  2624. table.insert(SelectionList,object)
  2625. SelectionSet[object] = true
  2626. node.Selected = true
  2627.  
  2628. -- expand all ancestors so that selected node becomes visible
  2629. node = node.Parent
  2630. while node do
  2631. if not node.Expanded then
  2632. node.Expanded = true
  2633. lupdate = true
  2634. end
  2635. node = node.Parent
  2636. end
  2637. supdate = true
  2638. end
  2639. end
  2640. return lupdate,supdate
  2641. end
  2642.  
  2643. function Selection:Set(objects)
  2644. local lupdate = false
  2645. local supdate = false
  2646.  
  2647. if #SelectionList > 0 then
  2648. for i = 1,#SelectionList do
  2649. local object = SelectionList[i]
  2650. local node = NodeLookup[object:GetDebugId(10)]
  2651. if node then
  2652. node.Selected = false
  2653. SelectionSet[object] = nil
  2654. end
  2655. end
  2656.  
  2657. SelectionList = {}
  2658. Selection.List = SelectionList
  2659. supdate = true
  2660. end
  2661.  
  2662. for i = 1,#objects do
  2663. local l,s = addObject(objects[i])
  2664. lupdate = l or lupdate
  2665. supdate = s or supdate
  2666. end
  2667.  
  2668. if lupdate then
  2669. rawUpdateList()
  2670. supdate = true
  2671. elseif supdate then
  2672. scrollBar:Update()
  2673. end
  2674.  
  2675. if supdate then
  2676. bindSelectionChanged:Fire()
  2677. updateActions()
  2678. end
  2679. end
  2680.  
  2681. function Selection:Add(object)
  2682. local l,s = addObject(object)
  2683. if l then
  2684. rawUpdateList()
  2685. if Updates then
  2686. bindSelectionChanged:Fire()
  2687. updateActions()
  2688. end
  2689. elseif s then
  2690. scrollBar:Update()
  2691. if Updates then
  2692. bindSelectionChanged:Fire()
  2693. updateActions()
  2694. end
  2695. end
  2696. end
  2697.  
  2698. function Selection:StopUpdates()
  2699. Updates = false
  2700. end
  2701.  
  2702. function Selection:ResumeUpdates()
  2703. Updates = true
  2704. bindSelectionChanged:Fire()
  2705. updateActions()
  2706. end
  2707.  
  2708. function Selection:Remove(object,noupdate)
  2709. if SelectionSet[object] then
  2710. local node = NodeLookup[object:GetDebugId(10)]
  2711. if node then
  2712. node.Selected = false
  2713. SelectionSet[object] = nil
  2714. for i = 1,#SelectionList do
  2715. if SelectionList[i] == object then
  2716. table.remove(SelectionList,i)
  2717. break
  2718. end
  2719. end
  2720.  
  2721. if not noupdate then
  2722. scrollBar:Update()
  2723. end
  2724. bindSelectionChanged:Fire()
  2725. updateActions()
  2726. end
  2727. end
  2728. end
  2729.  
  2730. function Selection:Get()
  2731. local list = {}
  2732. for i = 1,#SelectionList do
  2733. list[i] = SelectionList[i]
  2734. end
  2735. return list
  2736. end
  2737.  
  2738. bindSetSelection.OnInvoke = function(...)
  2739. Selection:Set(...)
  2740. end
  2741.  
  2742. bindGetSelection.OnInvoke = function()
  2743. return Selection:Get()
  2744. end
  2745. end
  2746.  
  2747. function CreateCaution(title,msg)
  2748. local newCaution = CautionWindow:Clone()
  2749. newCaution.Title.Text = title
  2750. newCaution.MainWindow.Desc.Text = msg
  2751. newCaution.Parent = explorerPanel.Parent
  2752. newCaution.Visible = true
  2753. newCaution.MainWindow.Ok.MouseButton1Up:connect(function()
  2754. newCaution:Destroy()
  2755. end)
  2756. end
  2757.  
  2758. function CreateTableCaution(title,msg)
  2759. if type(msg) ~= "table" then return CreateCaution(title,tostring(msg)) end
  2760. local newCaution = TableCautionWindow:Clone()
  2761. newCaution.Title.Text = title
  2762.  
  2763. local TableList = newCaution.MainWindow.TableResults
  2764. local TableTemplate = newCaution.MainWindow.TableTemplate
  2765.  
  2766. for i,v in pairs(msg) do
  2767. local newResult = TableTemplate:Clone()
  2768. newResult.Type.Text = type(v)
  2769. newResult.Value.Text = tostring(v)
  2770. newResult.Position = UDim2.new(0,0,0,#TableList:GetChildren() * 20)
  2771. newResult.Parent = TableList
  2772. TableList.CanvasSize = UDim2.new(0,0,0,#TableList:GetChildren() * 20)
  2773. newResult.Visible = true
  2774. end
  2775. newCaution.Parent = explorerPanel.Parent
  2776. newCaution.Visible = true
  2777. newCaution.MainWindow.Ok.MouseButton1Up:connect(function()
  2778. newCaution:Destroy()
  2779. end)
  2780. end
  2781.  
  2782. local function Split(str, delimiter)
  2783. local start = 1
  2784. local t = {}
  2785. while true do
  2786. local pos = string.find (str, delimiter, start, true)
  2787. if not pos then
  2788. break
  2789. end
  2790. table.insert (t, string.sub (str, start, pos - 1))
  2791. start = pos + string.len (delimiter)
  2792. end
  2793. table.insert (t, string.sub (str, start))
  2794. return t
  2795. end
  2796.  
  2797. local function ToValue(value,type)
  2798. if type == "Vector2" then
  2799. local list = Split(value,",")
  2800. if #list < 2 then return nil end
  2801. local x = tonumber(list[1]) or 0
  2802. local y = tonumber(list[2]) or 0
  2803. return Vector2.new(x,y)
  2804. elseif type == "Vector3" then
  2805. local list = Split(value,",")
  2806. if #list < 3 then return nil end
  2807. local x = tonumber(list[1]) or 0
  2808. local y = tonumber(list[2]) or 0
  2809. local z = tonumber(list[3]) or 0
  2810. return Vector3.new(x,y,z)
  2811. elseif type == "Color3" then
  2812. local list = Split(value,",")
  2813. if #list < 3 then return nil end
  2814. local r = tonumber(list[1]) or 0
  2815. local g = tonumber(list[2]) or 0
  2816. local b = tonumber(list[3]) or 0
  2817. return Color3.new(r/255,g/255, b/255)
  2818. elseif type == "UDim2" then
  2819. local list = Split(string.gsub(string.gsub(value, "{", ""),"}",""),",")
  2820. if #list < 4 then return nil end
  2821. local xScale = tonumber(list[1]) or 0
  2822. local xOffset = tonumber(list[2]) or 0
  2823. local yScale = tonumber(list[3]) or 0
  2824. local yOffset = tonumber(list[4]) or 0
  2825. return UDim2.new(xScale, xOffset, yScale, yOffset)
  2826. elseif type == "Number" then
  2827. return tonumber(value)
  2828. elseif type == "String" then
  2829. return value
  2830. elseif type == "NumberRange" then
  2831. local list = Split(value,",")
  2832. if #list == 1 then
  2833. if tonumber(list[1]) == nil then return nil end
  2834. local newVal = tonumber(list[1]) or 0
  2835. return NumberRange.new(newVal)
  2836. end
  2837. if #list < 2 then return nil end
  2838. local x = tonumber(list[1]) or 0
  2839. local y = tonumber(list[2]) or 0
  2840. return NumberRange.new(x,y)
  2841. elseif type == "Script" then
  2842. local success,err = ypcall(function()
  2843. _G.D_E_X_DONOTUSETHISPLEASE = nil
  2844. loadstring(
  2845. "_G.D_E_X_DONOTUSETHISPLEASE = "..value
  2846. )()
  2847. return _G.D_E_X_DONOTUSETHISPLEASE
  2848. end)
  2849. if err then
  2850. return nil
  2851. end
  2852. else
  2853. return nil
  2854. end
  2855. end
  2856.  
  2857. local function ToPropValue(value,type)
  2858. if type == "Vector2" then
  2859. local list = Split(value,",")
  2860. if #list < 2 then return nil end
  2861. local x = tonumber(list[1]) or 0
  2862. local y = tonumber(list[2]) or 0
  2863. return Vector2.new(x,y)
  2864. elseif type == "Vector3" then
  2865. local list = Split(value,",")
  2866. if #list < 3 then return nil end
  2867. local x = tonumber(list[1]) or 0
  2868. local y = tonumber(list[2]) or 0
  2869. local z = tonumber(list[3]) or 0
  2870. return Vector3.new(x,y,z)
  2871. elseif type == "Color3" then
  2872. local list = Split(value,",")
  2873. if #list < 3 then return nil end
  2874. local r = tonumber(list[1]) or 0
  2875. local g = tonumber(list[2]) or 0
  2876. local b = tonumber(list[3]) or 0
  2877. return Color3.new(r/255,g/255, b/255)
  2878. elseif type == "UDim2" then
  2879. local list = Split(string.gsub(string.gsub(value, "{", ""),"}",""),",")
  2880. if #list < 4 then return nil end
  2881. local xScale = tonumber(list[1]) or 0
  2882. local xOffset = tonumber(list[2]) or 0
  2883. local yScale = tonumber(list[3]) or 0
  2884. local yOffset = tonumber(list[4]) or 0
  2885. return UDim2.new(xScale, xOffset, yScale, yOffset)
  2886. elseif type == "Content" then
  2887. return value
  2888. elseif type == "float" or type == "int" or type == "double" then
  2889. return tonumber(value)
  2890. elseif type == "string" then
  2891. return value
  2892. elseif type == "NumberRange" then
  2893. local list = Split(value,",")
  2894. if #list == 1 then
  2895. if tonumber(list[1]) == nil then return nil end
  2896. local newVal = tonumber(list[1]) or 0
  2897. return NumberRange.new(newVal)
  2898. end
  2899. if #list < 2 then return nil end
  2900. local x = tonumber(list[1]) or 0
  2901. local y = tonumber(list[2]) or 0
  2902. return NumberRange.new(x,y)
  2903. elseif string.sub(value,1,4) == "Enum" then
  2904. local getEnum = value
  2905. while true do
  2906. local x,y = string.find(getEnum,".")
  2907. if y then
  2908. getEnum = string.sub(getEnum,y+1)
  2909. else
  2910. break
  2911. end
  2912. end
  2913. print(getEnum)
  2914. return getEnum
  2915. else
  2916. return nil
  2917. end
  2918. end
  2919.  
  2920. function PromptRemoteCaller(inst)
  2921. if CurrentRemoteWindow then
  2922. CurrentRemoteWindow:Destroy()
  2923. CurrentRemoteWindow = nil
  2924. end
  2925. CurrentRemoteWindow = RemoteWindow:Clone()
  2926. CurrentRemoteWindow.Parent = explorerPanel.Parent
  2927. CurrentRemoteWindow.Visible = true
  2928.  
  2929. local displayValues = false
  2930.  
  2931. local ArgumentList = CurrentRemoteWindow.MainWindow.Arguments
  2932. local ArgumentTemplate = CurrentRemoteWindow.MainWindow.ArgumentTemplate
  2933.  
  2934. if inst:IsA("RemoteEvent") then
  2935. CurrentRemoteWindow.Title.Text = "Fire Event"
  2936. CurrentRemoteWindow.MainWindow.Ok.Text = "Fire"
  2937. CurrentRemoteWindow.MainWindow.DisplayReturned.Visible = false
  2938. CurrentRemoteWindow.MainWindow.Desc2.Visible = false
  2939. end
  2940.  
  2941. local newArgument = ArgumentTemplate:Clone()
  2942. newArgument.Parent = ArgumentList
  2943. newArgument.Visible = true
  2944. newArgument.Type.MouseButton1Down:connect(function()
  2945. createDDown(newArgument.Type,function(choice)
  2946. newArgument.Type.Text = choice
  2947. end,"Script","Number","String","Color3","Vector3","Vector2","UDim2","NumberRange")
  2948. end)
  2949.  
  2950. CurrentRemoteWindow.MainWindow.Ok.MouseButton1Up:connect(function()
  2951. if CurrentRemoteWindow and inst.Parent ~= nil then
  2952. local MyArguments = {}
  2953. for i,v in pairs(ArgumentList:GetChildren()) do
  2954. table.insert(MyArguments,ToValue(v.Value.Text,v.Type.Text))
  2955. end
  2956. if inst:IsA("RemoteFunction") then
  2957. if displayValues then
  2958. spawn(function()
  2959. local myResults = inst:InvokeServer(unpack(MyArguments))
  2960. if myResults then
  2961. CreateTableCaution("Remote Caller",myResults)
  2962. else
  2963. CreateCaution("Remote Caller","This remote did not return anything.")
  2964. end
  2965. end)
  2966. else
  2967. spawn(function()
  2968. inst:InvokeServer(unpack(MyArguments))
  2969. end)
  2970. end
  2971. else
  2972. inst:FireServer(unpack(MyArguments))
  2973. end
  2974. CurrentRemoteWindow:Destroy()
  2975. CurrentRemoteWindow = nil
  2976. end
  2977. end)
  2978.  
  2979. CurrentRemoteWindow.MainWindow.Add.MouseButton1Up:connect(function()
  2980. if CurrentRemoteWindow then
  2981. local newArgument = ArgumentTemplate:Clone()
  2982. newArgument.Position = UDim2.new(0,0,0,#ArgumentList:GetChildren() * 20)
  2983. newArgument.Parent = ArgumentList
  2984. ArgumentList.CanvasSize = UDim2.new(0,0,0,#ArgumentList:GetChildren() * 20)
  2985. newArgument.Visible = true
  2986. newArgument.Type.MouseButton1Down:connect(function()
  2987. createDDown(newArgument.Type,function(choice)
  2988. newArgument.Type.Text = choice
  2989. end,"Script","Number","String","Color3","Vector3","Vector2","UDim2","NumberRange")
  2990. end)
  2991. end
  2992. end)
  2993.  
  2994. CurrentRemoteWindow.MainWindow.Subtract.MouseButton1Up:connect(function()
  2995. if CurrentRemoteWindow then
  2996. if #ArgumentList:GetChildren() > 1 then
  2997. ArgumentList:GetChildren()[#ArgumentList:GetChildren()]:Destroy()
  2998. ArgumentList.CanvasSize = UDim2.new(0,0,0,#ArgumentList:GetChildren() * 20)
  2999. end
  3000. end
  3001. end)
  3002.  
  3003. CurrentRemoteWindow.MainWindow.Cancel.MouseButton1Up:connect(function()
  3004. if CurrentRemoteWindow then
  3005. CurrentRemoteWindow:Destroy()
  3006. CurrentRemoteWindow = nil
  3007. end
  3008. end)
  3009.  
  3010. CurrentRemoteWindow.MainWindow.DisplayReturned.MouseButton1Up:connect(function()
  3011. if displayValues then
  3012. displayValues = false
  3013. CurrentRemoteWindow.MainWindow.DisplayReturned.enabled.Visible = false
  3014. else
  3015. displayValues = true
  3016. CurrentRemoteWindow.MainWindow.DisplayReturned.enabled.Visible = true
  3017. end
  3018. end)
  3019. end
  3020.  
  3021. function PromptSaveInstance(inst)
  3022. 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
  3023. if CurrentSaveInstanceWindow then
  3024. CurrentSaveInstanceWindow:Destroy()
  3025. CurrentSaveInstanceWindow = nil
  3026. if explorerPanel.Parent:FindFirstChild("SaveInstanceOverwriteCaution") then
  3027. explorerPanel.Parent.SaveInstanceOverwriteCaution:Destroy()
  3028. end
  3029. end
  3030. CurrentSaveInstanceWindow = SaveInstanceWindow:Clone()
  3031. CurrentSaveInstanceWindow.Parent = explorerPanel.Parent
  3032. CurrentSaveInstanceWindow.Visible = true
  3033.  
  3034. local filename = CurrentSaveInstanceWindow.MainWindow.FileName
  3035. local saveObjects = true
  3036. local overwriteCaution = false
  3037.  
  3038. CurrentSaveInstanceWindow.MainWindow.Save.MouseButton1Up:connect(function()
  3039. if readfile and getelysianpath then
  3040. if readfile(getelysianpath()..filename.Text..".rbxmx") then
  3041. if not overwriteCaution then
  3042. overwriteCaution = true
  3043. local newCaution = ConfirmationWindow:Clone()
  3044. newCaution.Name = "SaveInstanceOverwriteCaution"
  3045. newCaution.MainWindow.Desc.Text = "The file, "..filename.Text..".rbxmx, already exists. Overwrite?"
  3046. newCaution.Parent = explorerPanel.Parent
  3047. newCaution.Visible = true
  3048. newCaution.MainWindow.Yes.MouseButton1Up:connect(function()
  3049. ypcall(function()
  3050. SaveInstance(inst,filename.Text..".rbxmx",not saveObjects)
  3051. end)
  3052. overwriteCaution = false
  3053. newCaution:Destroy()
  3054. if CurrentSaveInstanceWindow then
  3055. CurrentSaveInstanceWindow:Destroy()
  3056. CurrentSaveInstanceWindow = nil
  3057. end
  3058. end)
  3059. newCaution.MainWindow.No.MouseButton1Up:connect(function()
  3060. overwriteCaution = false
  3061. newCaution:Destroy()
  3062. end)
  3063. end
  3064. else
  3065. ypcall(function()
  3066. SaveInstance(inst,filename.Text..".rbxmx",not saveObjects)
  3067. end)
  3068. if CurrentSaveInstanceWindow then
  3069. CurrentSaveInstanceWindow:Destroy()
  3070. CurrentSaveInstanceWindow = nil
  3071. if explorerPanel.Parent:FindFirstChild("SaveInstanceOverwriteCaution") then
  3072. explorerPanel.Parent.SaveInstanceOverwriteCaution:Destroy()
  3073. end
  3074. end
  3075. end
  3076. else
  3077. ypcall(function()
  3078. if SaveInstance then
  3079. SaveInstance(inst,filename.Text..".rbxmx",not saveObjects)
  3080. else
  3081. _G.SaveInstance(inst,filename.Text,not saveObjects)
  3082. end
  3083. end)
  3084. if CurrentSaveInstanceWindow then
  3085. CurrentSaveInstanceWindow:Destroy()
  3086. CurrentSaveInstanceWindow = nil
  3087. if explorerPanel.Parent:FindFirstChild("SaveInstanceOverwriteCaution") then
  3088. explorerPanel.Parent.SaveInstanceOverwriteCaution:Destroy()
  3089. end
  3090. end
  3091. end
  3092. end)
  3093. CurrentSaveInstanceWindow.MainWindow.Cancel.MouseButton1Up:connect(function()
  3094. if CurrentSaveInstanceWindow then
  3095. CurrentSaveInstanceWindow:Destroy()
  3096. CurrentSaveInstanceWindow = nil
  3097. if explorerPanel.Parent:FindFirstChild("SaveInstanceOverwriteCaution") then
  3098. explorerPanel.Parent.SaveInstanceOverwriteCaution:Destroy()
  3099. end
  3100. end
  3101. end)
  3102. CurrentSaveInstanceWindow.MainWindow.SaveObjects.MouseButton1Up:connect(function()
  3103. if saveObjects then
  3104. saveObjects = false
  3105. CurrentSaveInstanceWindow.MainWindow.SaveObjects.enabled.Visible = false
  3106. else
  3107. saveObjects = true
  3108. CurrentSaveInstanceWindow.MainWindow.SaveObjects.enabled.Visible = true
  3109. end
  3110. end)
  3111. end
  3112.  
  3113. function DestroyRightClick()
  3114. if currentRightClickMenu then
  3115. currentRightClickMenu:Destroy()
  3116. currentRightClickMenu = nil
  3117. end
  3118. if CurrentInsertObjectWindow and CurrentInsertObjectWindow.Visible then
  3119. CurrentInsertObjectWindow.Visible = false
  3120. end
  3121. end
  3122.  
  3123. function rightClickMenu(sObj)
  3124. local mouse = game.Players.LocalPlayer:GetMouse()
  3125.  
  3126. currentRightClickMenu = CreateRightClickMenu(
  3127. {"Cut","Copy","Paste Into","Duplicate","Delete","Group","Ungroup","Select Children","Teleport To","Insert Part","Insert Object","View Script","Save Instance","Call Function","Call Remote"},
  3128. "",
  3129. false,
  3130. function(option)
  3131. if option == "Cut" then
  3132. if not Option.Modifiable then return end
  3133. clipboard = {}
  3134. local list = Selection.List
  3135. local cut = {}
  3136. for i = 1,#list do
  3137. local obj = list[i]:Clone()
  3138. if obj then
  3139. table.insert(clipboard,obj)
  3140. table.insert(cut,list[i])
  3141. end
  3142. end
  3143. for i = 1,#cut do
  3144. pcall(delete,cut[i])
  3145. end
  3146. updateActions()
  3147. elseif option == "Copy" then
  3148. if not Option.Modifiable then return end
  3149. clipboard = {}
  3150. local list = Selection.List
  3151. for i = 1,#list do
  3152. table.insert(clipboard,list[i]:Clone())
  3153. end
  3154. updateActions()
  3155. elseif option == "Paste Into" then
  3156. if not Option.Modifiable then return end
  3157. local parent = Selection.List[1] or workspace
  3158. for i = 1,#clipboard do
  3159. clipboard[i]:Clone().Parent = parent
  3160. end
  3161. elseif option == "Duplicate" then
  3162. if not Option.Modifiable then return end
  3163. local list = Selection:Get()
  3164. for i = 1,#list do
  3165. list[i]:Clone().Parent = Selection.List[1].Parent or workspace
  3166. end
  3167. elseif option == "Delete" then
  3168. if not Option.Modifiable then return end
  3169. local list = Selection:Get()
  3170. for i = 1,#list do
  3171. pcall(delete,list[i])
  3172. end
  3173. Selection:Set({})
  3174. elseif option == "Group" then
  3175. if not Option.Modifiable then return end
  3176. local newModel = Instance.new("Model")
  3177. local list = Selection:Get()
  3178. newModel.Parent = Selection.List[1].Parent or workspace
  3179. for i = 1,#list do
  3180. list[i].Parent = newModel
  3181. end
  3182. Selection:Set({})
  3183. elseif option == "Ungroup" then
  3184. if not Option.Modifiable then return end
  3185. local ungrouped = {}
  3186. local list = Selection:Get()
  3187. for i = 1,#list do
  3188. if list[i]:IsA("Model") then
  3189. for i2,v2 in pairs(list[i]:GetChildren()) do
  3190. v2.Parent = list[i].Parent or workspace
  3191. table.insert(ungrouped,v2)
  3192. end
  3193. pcall(delete,list[i])
  3194. end
  3195. end
  3196. Selection:Set({})
  3197. if SettingsRemote:Invoke("SelectUngrouped") then
  3198. for i,v in pairs(ungrouped) do
  3199. Selection:Add(v)
  3200. end
  3201. end
  3202. elseif option == "Select Children" then
  3203. if not Option.Modifiable then return end
  3204. local list = Selection:Get()
  3205. Selection:Set({})
  3206. Selection:StopUpdates()
  3207. for i = 1,#list do
  3208. for i2,v2 in pairs(list[i]:GetChildren()) do
  3209. Selection:Add(v2)
  3210. end
  3211. end
  3212. Selection:ResumeUpdates()
  3213. elseif option == "Teleport To" then
  3214. if not Option.Modifiable then return end
  3215. local list = Selection:Get()
  3216. for i = 1,#list do
  3217. if list[i]:IsA("BasePart") then
  3218. pcall(function()
  3219. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = list[i].CFrame
  3220. end)
  3221. break
  3222. end
  3223. end
  3224. elseif option == "Insert Part" then
  3225. if not Option.Modifiable then return end
  3226. local insertedParts = {}
  3227. local list = Selection:Get()
  3228. for i = 1,#list do
  3229. pcall(function()
  3230. local newPart = Instance.new("Part")
  3231. newPart.Parent = list[i]
  3232. newPart.CFrame = CFrame.new(game.Players.LocalPlayer.Character.Head.Position) + Vector3.new(0,3,0)
  3233. table.insert(insertedParts,newPart)
  3234. end)
  3235. end
  3236. elseif option == "Save Instance" then
  3237. if not Option.Modifiable then return end
  3238. local list = Selection:Get()
  3239. if #list == 1 then
  3240. list[1].Archivable = true
  3241. ypcall(function()PromptSaveInstance(list[1]:Clone())end)
  3242. elseif #list > 1 then
  3243. local newModel = Instance.new("Model")
  3244. newModel.Name = "SavedInstances"
  3245. for i = 1,#list do
  3246. ypcall(function()
  3247. list[i].Archivable = true
  3248. list[i]:Clone().Parent = newModel
  3249. end)
  3250. end
  3251. PromptSaveInstance(newModel)
  3252. end
  3253. elseif option == "Call Remote" then
  3254. if not Option.Modifiable then return end
  3255. local list = Selection:Get()
  3256. for i = 1,#list do
  3257. if list[i]:IsA("RemoteFunction") or list[i]:IsA("RemoteEvent") then
  3258. PromptRemoteCaller(list[i])
  3259. break
  3260. end
  3261. end
  3262. elseif option == "View Script" then
  3263. if not Option.Modifiable then return end
  3264. local list = Selection:Get()
  3265. for i = 1,#list do
  3266. if list[i]:IsA("LocalScript") or list[i]:IsA("ModuleScript") then
  3267. ScriptEditorEvent:Fire(list[i])
  3268. end
  3269. end
  3270. end
  3271. end)
  3272. currentRightClickMenu.Parent = explorerPanel.Parent
  3273. currentRightClickMenu.Position = UDim2.new(0,mouse.X,0,mouse.Y)
  3274. if currentRightClickMenu.AbsolutePosition.X + currentRightClickMenu.AbsoluteSize.X > explorerPanel.AbsolutePosition.X + explorerPanel.AbsoluteSize.X then
  3275. currentRightClickMenu.Position = UDim2.new(0, explorerPanel.AbsolutePosition.X + explorerPanel.AbsoluteSize.X - currentRightClickMenu.AbsoluteSize.X, 0, mouse.Y)
  3276. end
  3277. end
  3278.  
  3279. local function cancelReparentDrag()end
  3280. local function cancelSelectDrag()end
  3281. do
  3282. local listEntries = {}
  3283. local nameConnLookup = {}
  3284.  
  3285. local mouseDrag = Create('ImageButton',{
  3286. Name = "MouseDrag";
  3287. Position = UDim2.new(-0.25,0,-0.25,0);
  3288. Size = UDim2.new(1.5,0,1.5,0);
  3289. Transparency = 1;
  3290. AutoButtonColor = false;
  3291. Active = true;
  3292. ZIndex = 10;
  3293. })
  3294. local function dragSelect(last,add,button)
  3295. local connDrag
  3296. local conUp
  3297.  
  3298. conDrag = mouseDrag.MouseMoved:connect(function(x,y)
  3299. local pos = Vector2.new(x,y) - listFrame.AbsolutePosition
  3300. local size = listFrame.AbsoluteSize
  3301. if pos.x < 0 or pos.x > size.x or pos.y < 0 or pos.y > size.y then return end
  3302.  
  3303. local i = math.ceil(pos.y/ENTRY_BOUND) + scrollBar.ScrollIndex
  3304. -- Mouse may have made a large step, so interpolate between the
  3305. -- last index and the current.
  3306. for n = i<last and i or last, i>last and i or last do
  3307. local node = TreeList[n]
  3308. if node then
  3309. if add then
  3310. Selection:Add(node.Object)
  3311. else
  3312. Selection:Remove(node.Object)
  3313. end
  3314. end
  3315. end
  3316. last = i
  3317. end)
  3318.  
  3319. function cancelSelectDrag()
  3320. mouseDrag.Parent = nil
  3321. conDrag:disconnect()
  3322. conUp:disconnect()
  3323. function cancelSelectDrag()end
  3324. end
  3325.  
  3326. conUp = mouseDrag[button]:connect(cancelSelectDrag)
  3327.  
  3328. mouseDrag.Parent = GetScreen(listFrame)
  3329. end
  3330.  
  3331. local function dragReparent(object,dragGhost,clickPos,ghostOffset)
  3332. local connDrag
  3333. local conUp
  3334. local conUp2
  3335.  
  3336. local parentIndex = nil
  3337. local dragged = false
  3338.  
  3339. local parentHighlight = Create('Frame',{
  3340. Transparency = 1;
  3341. Visible = false;
  3342. Create('Frame',{
  3343. BorderSizePixel = 0;
  3344. BackgroundColor3 = Color3.new(0,0,0);
  3345. BackgroundTransparency = 0.1;
  3346. Position = UDim2.new(0,0,0,0);
  3347. Size = UDim2.new(1,0,0,1);
  3348. });
  3349. Create('Frame',{
  3350. BorderSizePixel = 0;
  3351. BackgroundColor3 = Color3.new(0,0,0);
  3352. BackgroundTransparency = 0.1;
  3353. Position = UDim2.new(1,0,0,0);
  3354. Size = UDim2.new(0,1,1,0);
  3355. });
  3356. Create('Frame',{
  3357. BorderSizePixel = 0;
  3358. BackgroundColor3 = Color3.new(0,0,0);
  3359. BackgroundTransparency = 0.1;
  3360. Position = UDim2.new(0,0,1,0);
  3361. Size = UDim2.new(1,0,0,1);
  3362. });
  3363. Create('Frame',{
  3364. BorderSizePixel = 0;
  3365. BackgroundColor3 = Color3.new(0,0,0);
  3366. BackgroundTransparency = 0.1;
  3367. Position = UDim2.new(0,0,0,0);
  3368. Size = UDim2.new(0,1,1,0);
  3369. });
  3370. })
  3371. SetZIndex(parentHighlight,9)
  3372.  
  3373. conDrag = mouseDrag.MouseMoved:connect(function(x,y)
  3374. local dragPos = Vector2.new(x,y)
  3375. if dragged then
  3376. local pos = dragPos - listFrame.AbsolutePosition
  3377. local size = listFrame.AbsoluteSize
  3378.  
  3379. parentIndex = nil
  3380. parentHighlight.Visible = false
  3381. if pos.x >= 0 and pos.x <= size.x and pos.y >= 0 and pos.y <= size.y + ENTRY_SIZE*2 then
  3382. local i = math.ceil(pos.y/ENTRY_BOUND-2)
  3383. local node = TreeList[i + scrollBar.ScrollIndex]
  3384. if node and node.Object ~= object and not object:IsAncestorOf(node.Object) then
  3385. parentIndex = i
  3386. local entry = listEntries[i]
  3387. if entry then
  3388. parentHighlight.Visible = true
  3389. parentHighlight.Position = UDim2.new(0,1,0,entry.AbsolutePosition.y-listFrame.AbsolutePosition.y)
  3390. parentHighlight.Size = UDim2.new(0,size.x-4,0,entry.AbsoluteSize.y)
  3391. end
  3392. end
  3393. end
  3394.  
  3395. dragGhost.Position = UDim2.new(0,dragPos.x+ghostOffset.x,0,dragPos.y+ghostOffset.y)
  3396. elseif (clickPos-dragPos).magnitude > 8 then
  3397. dragged = true
  3398. SetZIndex(dragGhost,9)
  3399. dragGhost.IndentFrame.Transparency = 0.25
  3400. dragGhost.IndentFrame.EntryText.TextColor3 = GuiColor.TextSelected
  3401. dragGhost.Position = UDim2.new(0,dragPos.x+ghostOffset.x,0,dragPos.y+ghostOffset.y)
  3402. dragGhost.Parent = GetScreen(listFrame)
  3403. parentHighlight.Parent = listFrame
  3404. end
  3405. end)
  3406.  
  3407. function cancelReparentDrag()
  3408. mouseDrag.Parent = nil
  3409. conDrag:disconnect()
  3410. conUp:disconnect()
  3411. conUp2:disconnect()
  3412. dragGhost:Destroy()
  3413. parentHighlight:Destroy()
  3414. function cancelReparentDrag()end
  3415. end
  3416.  
  3417. local wasSelected = Selection.Selected[object]
  3418. if not wasSelected and Option.Selectable then
  3419. Selection:Set({object})
  3420. end
  3421.  
  3422. conUp = mouseDrag.MouseButton1Up:connect(function()
  3423. cancelReparentDrag()
  3424. if dragged then
  3425. if parentIndex then
  3426. local parentNode = TreeList[parentIndex + scrollBar.ScrollIndex]
  3427. if parentNode then
  3428. parentNode.Expanded = true
  3429.  
  3430. local parentObj = parentNode.Object
  3431. local function parent(a,b)
  3432. a.Parent = b
  3433. end
  3434. if Option.Selectable then
  3435. local list = Selection.List
  3436. for i = 1,#list do
  3437. pcall(parent,list[i],parentObj)
  3438. end
  3439. else
  3440. pcall(parent,object,parentObj)
  3441. end
  3442. end
  3443. end
  3444. else
  3445. -- do selection click
  3446. if wasSelected and Option.Selectable then
  3447. Selection:Set({})
  3448. end
  3449. end
  3450. end)
  3451. conUp2 = mouseDrag.MouseButton2Down:connect(function()
  3452. cancelReparentDrag()
  3453. end)
  3454.  
  3455. mouseDrag.Parent = GetScreen(listFrame)
  3456. end
  3457.  
  3458. local entryTemplate = Create('ImageButton',{
  3459. Name = "Entry";
  3460. Transparency = 1;
  3461. AutoButtonColor = false;
  3462. Position = UDim2.new(0,0,0,0);
  3463. Size = UDim2.new(1,0,0,ENTRY_SIZE);
  3464. Create('Frame',{
  3465. Name = "IndentFrame";
  3466. BackgroundTransparency = 1;
  3467. BackgroundColor3 = GuiColor.Selected;
  3468. BorderColor3 = GuiColor.BorderSelected;
  3469. Position = UDim2.new(0,0,0,0);
  3470. Size = UDim2.new(1,0,1,0);
  3471. Create(Icon('ImageButton',0),{
  3472. Name = "Expand";
  3473. AutoButtonColor = false;
  3474. Position = UDim2.new(0,-GUI_SIZE,0.5,-GUI_SIZE/2);
  3475. Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE);
  3476. });
  3477. Create(Icon(nil,0),{
  3478. Name = "ExplorerIcon";
  3479. Position = UDim2.new(0,2+ENTRY_PADDING,0.5,-GUI_SIZE/2);
  3480. Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE);
  3481. });
  3482. Create('TextLabel',{
  3483. Name = "EntryText";
  3484. BackgroundTransparency = 1;
  3485. TextColor3 = GuiColor.Text;
  3486. TextXAlignment = 'Left';
  3487. TextYAlignment = 'Center';
  3488. Font = FONT;
  3489. FontSize = FONT_SIZE;
  3490. Text = "";
  3491. Position = UDim2.new(0,2+ENTRY_SIZE+4,0,0);
  3492. Size = UDim2.new(1,-2,1,0);
  3493. });
  3494. });
  3495. })
  3496.  
  3497. function scrollBar.UpdateCallback(self)
  3498. for i = 1,self.VisibleSpace do
  3499. local node = TreeList[i + self.ScrollIndex]
  3500. if node then
  3501. local entry = listEntries[i]
  3502. if not entry then
  3503. entry = Create(entryTemplate:Clone(),{
  3504. Position = UDim2.new(0,2,0,ENTRY_BOUND*(i-1)+2);
  3505. Size = UDim2.new(0,nodeWidth,0,ENTRY_SIZE);
  3506. ZIndex = listFrame.ZIndex;
  3507. })
  3508. listEntries[i] = entry
  3509.  
  3510. local expand = entry.IndentFrame.Expand
  3511. expand.MouseEnter:connect(function()
  3512. local node = TreeList[i + self.ScrollIndex]
  3513. if #node > 0 then
  3514. if node.Expanded then
  3515. Icon(expand,NODE_EXPANDED_OVER)
  3516. else
  3517. Icon(expand,NODE_COLLAPSED_OVER)
  3518. end
  3519. end
  3520. end)
  3521. expand.MouseLeave:connect(function()
  3522. local node = TreeList[i + self.ScrollIndex]
  3523. if #node > 0 then
  3524. if node.Expanded then
  3525. Icon(expand,NODE_EXPANDED)
  3526. else
  3527. Icon(expand,NODE_COLLAPSED)
  3528. end
  3529. end
  3530. end)
  3531. expand.MouseButton1Down:connect(function()
  3532. local node = TreeList[i + self.ScrollIndex]
  3533. if #node > 0 then
  3534. node.Expanded = not node.Expanded
  3535. if node.Object == explorerPanel.Parent and node.Expanded then
  3536. CreateCaution("Warning","Please be careful when editing instances inside here, this is like the System32 of Dex and modifying objects here can break Dex.")
  3537. end
  3538. -- use raw update so the list updates instantly
  3539. rawUpdateList()
  3540. end
  3541. end)
  3542.  
  3543. entry.MouseButton1Down:connect(function(x,y)
  3544. local node = TreeList[i + self.ScrollIndex]
  3545. DestroyRightClick()
  3546. if GetAwaitRemote:Invoke() then
  3547. bindSetAwaiting:Fire(node.Object)
  3548. return
  3549. end
  3550.  
  3551. if not HoldingShift then
  3552. lastSelectedNode = i + self.ScrollIndex
  3553. end
  3554.  
  3555. if HoldingShift and not filteringWorkspace() then
  3556. if lastSelectedNode then
  3557. if i + self.ScrollIndex - lastSelectedNode > 0 then
  3558. Selection:StopUpdates()
  3559. for i2 = 1, i + self.ScrollIndex - lastSelectedNode do
  3560. local newNode = TreeList[lastSelectedNode + i2]
  3561. if newNode then
  3562. Selection:Add(newNode.Object)
  3563. end
  3564. end
  3565. Selection:ResumeUpdates()
  3566. else
  3567. Selection:StopUpdates()
  3568. for i2 = i + self.ScrollIndex - lastSelectedNode, 1 do
  3569. local newNode = TreeList[lastSelectedNode + i2]
  3570. if newNode then
  3571. Selection:Add(newNode.Object)
  3572. end
  3573. end
  3574. Selection:ResumeUpdates()
  3575. end
  3576. end
  3577. return
  3578. end
  3579.  
  3580. if HoldingCtrl then
  3581. if Selection.Selected[node.Object] then
  3582. Selection:Remove(node.Object)
  3583. else
  3584. Selection:Add(node.Object)
  3585. end
  3586. return
  3587. end
  3588. if Option.Modifiable then
  3589. local pos = Vector2.new(x,y)
  3590. dragReparent(node.Object,entry:Clone(),pos,entry.AbsolutePosition-pos)
  3591. elseif Option.Selectable then
  3592. if Selection.Selected[node.Object] then
  3593. Selection:Set({})
  3594. else
  3595. Selection:Set({node.Object})
  3596. end
  3597. dragSelect(i+self.ScrollIndex,true,'MouseButton1Up')
  3598. end
  3599. end)
  3600.  
  3601. entry.MouseButton2Down:connect(function()
  3602. if not Option.Selectable then return end
  3603.  
  3604. DestroyRightClick()
  3605.  
  3606. curSelect = entry
  3607.  
  3608. local node = TreeList[i + self.ScrollIndex]
  3609.  
  3610. if GetAwaitRemote:Invoke() then
  3611. bindSetAwaiting:Fire(node.Object)
  3612. return
  3613. end
  3614.  
  3615. if not Selection.Selected[node.Object] then
  3616. Selection:Set({node.Object})
  3617. end
  3618. end)
  3619.  
  3620.  
  3621. entry.MouseButton2Up:connect(function()
  3622. if not Option.Selectable then return end
  3623.  
  3624. local node = TreeList[i + self.ScrollIndex]
  3625.  
  3626. if checkMouseInGui(curSelect) then
  3627. rightClickMenu(node.Object)
  3628. end
  3629. end)
  3630.  
  3631. entry.Parent = listFrame
  3632. end
  3633.  
  3634. entry.Visible = true
  3635.  
  3636. local object = node.Object
  3637.  
  3638. -- update expand icon
  3639. if #node == 0 then
  3640. entry.IndentFrame.Expand.Visible = false
  3641. elseif node.Expanded then
  3642. Icon(entry.IndentFrame.Expand,NODE_EXPANDED)
  3643. entry.IndentFrame.Expand.Visible = true
  3644. else
  3645. Icon(entry.IndentFrame.Expand,NODE_COLLAPSED)
  3646. entry.IndentFrame.Expand.Visible = true
  3647. end
  3648.  
  3649. -- update explorer icon
  3650. Icon(entry.IndentFrame.ExplorerIcon,ExplorerIndex[object.ClassName] or 0)
  3651.  
  3652. -- update indentation
  3653. local w = (node.Depth)*(2+ENTRY_PADDING+GUI_SIZE)
  3654. entry.IndentFrame.Position = UDim2.new(0,w,0,0)
  3655. entry.IndentFrame.Size = UDim2.new(1,-w,1,0)
  3656.  
  3657. -- update name change detection
  3658. if nameConnLookup[entry:GetDebugId(10)] then
  3659. nameConnLookup[entry:GetDebugId(10)]:disconnect()
  3660. end
  3661. local text = entry.IndentFrame.EntryText
  3662. text.Text = object.Name
  3663. nameConnLookup[entry:GetDebugId(10)] = node.Object.Changed:connect(function(p)
  3664. if p == 'Name' then
  3665. text.Text = object.Name
  3666. end
  3667. end)
  3668.  
  3669. -- update selection
  3670. entry.IndentFrame.Transparency = node.Selected and 0 or 1
  3671. text.TextColor3 = GuiColor[node.Selected and 'TextSelected' or 'Text']
  3672.  
  3673. entry.Size = UDim2.new(0,nodeWidth,0,ENTRY_SIZE)
  3674. elseif listEntries[i] then
  3675. listEntries[i].Visible = false
  3676. end
  3677. end
  3678. for i = self.VisibleSpace+1,self.TotalSpace do
  3679. local entry = listEntries[i]
  3680. if entry then
  3681. listEntries[i] = nil
  3682. entry:Destroy()
  3683. end
  3684. end
  3685. end
  3686.  
  3687. function scrollBarH.UpdateCallback(self)
  3688. for i = 1,scrollBar.VisibleSpace do
  3689. local node = TreeList[i + scrollBar.ScrollIndex]
  3690. if node then
  3691. local entry = listEntries[i]
  3692. if entry then
  3693. entry.Position = UDim2.new(0,2 - scrollBarH.ScrollIndex,0,ENTRY_BOUND*(i-1)+2)
  3694. end
  3695. end
  3696. end
  3697. end
  3698.  
  3699. Connect(listFrame.Changed,function(p)
  3700. if p == 'AbsoluteSize' then
  3701. rawUpdateSize()
  3702. end
  3703. end)
  3704.  
  3705. local wheelAmount = 6
  3706. explorerPanel.MouseWheelForward:connect(function()
  3707. if scrollBar.VisibleSpace - 1 > wheelAmount then
  3708. scrollBar:ScrollTo(scrollBar.ScrollIndex - wheelAmount)
  3709. else
  3710. scrollBar:ScrollTo(scrollBar.ScrollIndex - scrollBar.VisibleSpace)
  3711. end
  3712. end)
  3713. explorerPanel.MouseWheelBackward:connect(function()
  3714. if scrollBar.VisibleSpace - 1 > wheelAmount then
  3715. scrollBar:ScrollTo(scrollBar.ScrollIndex + wheelAmount)
  3716. else
  3717. scrollBar:ScrollTo(scrollBar.ScrollIndex + scrollBar.VisibleSpace)
  3718. end
  3719. end)
  3720. end
  3721.  
  3722. ----------------------------------------------------------------
  3723. ----------------------------------------------------------------
  3724. ----------------------------------------------------------------
  3725. ----------------------------------------------------------------
  3726. ---- Object detection
  3727.  
  3728. -- Inserts `v` into `t` at `i`. Also sets `Index` field in `v`.
  3729. local function insert(t,i,v)
  3730. for n = #t,i,-1 do
  3731. local v = t[n]
  3732. v.Index = n+1
  3733. t[n+1] = v
  3734. end
  3735. v.Index = i
  3736. t[i] = v
  3737. end
  3738.  
  3739. -- Removes `i` from `t`. Also sets `Index` field in removed value.
  3740. local function remove(t,i)
  3741. local v = t[i]
  3742. for n = i+1,#t do
  3743. local v = t[n]
  3744. v.Index = n-1
  3745. t[n-1] = v
  3746. end
  3747. t[#t] = nil
  3748. v.Index = 0
  3749. return v
  3750. end
  3751.  
  3752. -- Returns how deep `o` is in the tree.
  3753. local function depth(o)
  3754. local d = -1
  3755. while o do
  3756. o = o.Parent
  3757. d = d + 1
  3758. end
  3759. return d
  3760. end
  3761.  
  3762.  
  3763. local connLookup = {}
  3764.  
  3765. -- Returns whether a node would be present in the tree list
  3766. local function nodeIsVisible(node)
  3767. local visible = true
  3768. node = node.Parent
  3769. while node and visible do
  3770. visible = visible and node.Expanded
  3771. node = node.Parent
  3772. end
  3773. return visible
  3774. end
  3775.  
  3776. -- Removes an object's tree node. Called when the object stops existing in the
  3777. -- game tree.
  3778. local function removeObject(object)
  3779. local objectNode = NodeLookup[object:GetDebugId(10)]
  3780. if not objectNode then
  3781. return
  3782. end
  3783.  
  3784. local visible = nodeIsVisible(objectNode)
  3785.  
  3786. Selection:Remove(object,true)
  3787.  
  3788. local parent = objectNode.Parent
  3789. remove(parent,objectNode.Index)
  3790. NodeLookup[object:GetDebugId(10)] = nil
  3791. connLookup[object:GetDebugId(10)]:disconnect()
  3792. connLookup[object:GetDebugId(10)] = nil
  3793.  
  3794. if visible then
  3795. updateList()
  3796. elseif nodeIsVisible(parent) then
  3797. updateScroll()
  3798. end
  3799. end
  3800.  
  3801. -- Moves a tree node to a new parent. Called when an existing object's parent
  3802. -- changes.
  3803. local function moveObject(object,parent)
  3804. local objectNode = NodeLookup[object:GetDebugId(10)]
  3805. if not objectNode then
  3806. return
  3807. end
  3808.  
  3809. local parentNode = NodeLookup[parent:GetDebugId(10)]
  3810. if not parentNode then
  3811. return
  3812. end
  3813.  
  3814. local visible = nodeIsVisible(objectNode)
  3815.  
  3816. remove(objectNode.Parent,objectNode.Index)
  3817. objectNode.Parent = parentNode
  3818.  
  3819. objectNode.Depth = depth(object)
  3820. local function r(node,d)
  3821. for i = 1,#node do
  3822. node[i].Depth = d
  3823. r(node[i],d+1)
  3824. end
  3825. end
  3826. r(objectNode,objectNode.Depth+1)
  3827.  
  3828. insert(parentNode,#parentNode+1,objectNode)
  3829.  
  3830. if visible or nodeIsVisible(objectNode) then
  3831. updateList()
  3832. elseif nodeIsVisible(objectNode.Parent) then
  3833. updateScroll()
  3834. end
  3835. end
  3836.  
  3837. -- ScriptContext['/Libraries/LibraryRegistration/LibraryRegistration']
  3838. -- This RobloxLocked object lets me index its properties for some reason
  3839.  
  3840. local function check(object)
  3841. return object.AncestryChanged
  3842. end
  3843.  
  3844. -- Creates a new tree node from an object. Called when an object starts
  3845. -- existing in the game tree.
  3846. local function addObject(object,noupdate)
  3847. if script then
  3848. -- protect against naughty RobloxLocked objects
  3849. local s = pcall(check,object)
  3850. if not s then
  3851. return
  3852. end
  3853. end
  3854.  
  3855. local parentNode = NodeLookup[object.Parent:GetDebugId(10)]
  3856. if not parentNode then
  3857. return
  3858. end
  3859.  
  3860. local objectNode = {
  3861. Object = object;
  3862. Parent = parentNode;
  3863. Index = 0;
  3864. Expanded = false;
  3865. Selected = false;
  3866. Depth = depth(object);
  3867. }
  3868.  
  3869. connLookup[object:GetDebugId(10)] = Connect(object.AncestryChanged,function(c,p)
  3870. if c == object then
  3871. if p == nil then
  3872. removeObject(c)
  3873. else
  3874. moveObject(c,p)
  3875. end
  3876. end
  3877. end)
  3878.  
  3879. NodeLookup[object:GetDebugId(10)] = objectNode
  3880. insert(parentNode,#parentNode+1,objectNode)
  3881.  
  3882. if not noupdate then
  3883. if nodeIsVisible(objectNode) then
  3884. updateList()
  3885. elseif nodeIsVisible(objectNode.Parent) then
  3886. updateScroll()
  3887. end
  3888. end
  3889. end
  3890.  
  3891. local function makeObject(obj,par)
  3892. local newObject = Instance.new(obj.ClassName)
  3893. for i,v in pairs(obj.Properties) do
  3894. ypcall(function()
  3895. local newProp
  3896. newProp = ToPropValue(v.Value,v.Type)
  3897. newObject[v.Name] = newProp
  3898. end)
  3899. end
  3900. newObject.Parent = par
  3901. end
  3902.  
  3903. local function writeObject(obj)
  3904. local newObject = {ClassName = obj.ClassName, Properties = {}}
  3905. for i,v in pairs(RbxApi.GetProperties(obj.className)) do
  3906. if v["Name"] ~= "Parent" then
  3907. print("thispassed")
  3908. table.insert(newObject.Properties,{Name = v["Name"], Type = v["ValueType"], Value = tostring(obj[v["Name"]])})
  3909. end
  3910. end
  3911. return newObject
  3912. end
  3913.  
  3914. local function buildDexStorage()
  3915. local localDexStorage
  3916.  
  3917. local success,err = ypcall(function()
  3918. localDexStorage = game:GetObjects("rbxasset://DexStorage.rbxm")[1]
  3919. end)
  3920.  
  3921. if success and localDexStorage then
  3922. for i,v in pairs(localDexStorage:GetChildren()) do
  3923. ypcall(function()
  3924. v.Parent = DexStorageMain
  3925. end)
  3926. end
  3927. end
  3928.  
  3929. updateDexStorageListeners()
  3930. --[[
  3931. local localDexStorage = readfile(getelysianpath().."DexStorage.txt")--game:GetService("CookiesService"):GetCookieValue("DexStorage")
  3932. --local success,err = pcall(function()
  3933. if localDexStorage then
  3934. local objTable = game:GetService("HttpService"):JSONDecode(localDexStorage)
  3935. for i,v in pairs(objTable) do
  3936. makeObject(v,DexStorageMain)
  3937. end
  3938. end
  3939. --end)
  3940. --]]
  3941. end
  3942.  
  3943. local dexStorageDebounce = false
  3944. local dexStorageListeners = {}
  3945.  
  3946. local function updateDexStorage()
  3947. if dexStorageDebounce then return end
  3948. dexStorageDebounce = true
  3949.  
  3950. wait()
  3951.  
  3952. pcall(function()
  3953. saveinstance("content//DexStorage.rbxm",DexStorageMain)
  3954. end)
  3955.  
  3956. updateDexStorageListeners()
  3957.  
  3958. dexStorageDebounce = false
  3959. --[[
  3960. local success,err = ypcall(function()
  3961. local objs = {}
  3962. for i,v in pairs(DexStorageMain:GetChildren()) do
  3963. table.insert(objs,writeObject(v))
  3964. end
  3965. writefile(getelysianpath().."DexStorage.txt",game:GetService("HttpService"):JSONEncode(objs))
  3966. --game:GetService("CookiesService"):SetCookieValue("DexStorage",game:GetService("HttpService"):JSONEncode(objs))
  3967. end)
  3968. if err then
  3969. CreateCaution("DexStorage Save Fail!","DexStorage broke! If you see this message, report to Raspberry Pi!")
  3970. end
  3971. print("hi")
  3972. --]]
  3973. end
  3974.  
  3975. function updateDexStorageListeners()
  3976. for i, v in pairs(dexStorageListeners) do
  3977. v:Disconnect()
  3978. end
  3979. dexStorageListeners = {}
  3980. for i,v in pairs(DexStorageMain:GetChildren()) do
  3981. pcall(function()
  3982. local ev = v.Changed:connect(updateDexStorage)
  3983. table.insert(dexStorageListeners,ev)
  3984. end)
  3985. end
  3986. end
  3987.  
  3988. do
  3989. NodeLookup[workspace.Parent:GetDebugId(10)] = {
  3990. Object = workspace.Parent;
  3991. Parent = nil;
  3992. Index = 0;
  3993. Expanded = true;
  3994. }
  3995.  
  3996. if DexStorageEnabled then
  3997. NodeLookup[DexStorage:GetDebugId(10)] = {
  3998. Object = DexStorage;
  3999. Parent = nil;
  4000. Index = 0;
  4001. Expanded = true;
  4002. }
  4003. end
  4004.  
  4005. if NilStorageEnabled then
  4006. NodeLookup[NilStorage:GetDebugId(10)] = {
  4007. Object = NilStorage;
  4008. Parent = nil;
  4009. Index = 0;
  4010. Expanded = true;
  4011. }
  4012. end
  4013.  
  4014. Connect(game.DescendantAdded,addObject)
  4015. Connect(game.DescendantRemoving,removeObject)
  4016.  
  4017. if DexStorageEnabled then
  4018. --[[
  4019. if readfile(getelysianpath().."DexStorage.txt") == nil then
  4020. writefile(getelysianpath().."DexStorage.txt","")
  4021. end
  4022. --]]
  4023. buildDexStorage()
  4024.  
  4025. Connect(DexStorage.DescendantAdded,addObject)
  4026. Connect(DexStorage.DescendantRemoving,removeObject)
  4027.  
  4028. Connect(DexStorage.DescendantAdded,updateDexStorage)
  4029. Connect(DexStorage.DescendantRemoving,updateDexStorage)
  4030. end
  4031. local allowed = {LocalScript=true, ModuleScript=true}
  4032.  
  4033. if NilStorageEnabled then
  4034. Connect(NilStorage.DescendantAdded,addObject)
  4035. Connect(NilStorage.DescendantRemoving,removeObject)
  4036.  
  4037. local currentTable = Synapse:GetNilInstances()
  4038.  
  4039. spawn(function()
  4040. while wait() do
  4041. if #currentTable ~= #Synapse:GetNilInstances() then
  4042. currentTable = Synapse:GetNilInstances()
  4043. --NilStorageMain:ClearAllChildren()
  4044. for i,v in pairs(Synapse:GetNilInstances()) do
  4045. if allowed[v.ClassName] then
  4046. if v ~= NilStorage and v ~= DexStorage then
  4047. pcall(function()
  4048. v.Parent = NilStorageMain
  4049. end)
  4050. --[[
  4051. local newNil = v
  4052. newNil.Archivable = true
  4053. newNil:Clone().Parent = NilStorageMain
  4054. --]]
  4055. end
  4056. end
  4057. end
  4058. end
  4059. end
  4060. end)
  4061. end
  4062.  
  4063. local function get(o)
  4064. return o:GetChildren()
  4065. end
  4066.  
  4067. local function r(o)
  4068. pcall(function()
  4069. local children = get(o)
  4070. for i = 1,#children do
  4071. addObject(children[i],true)
  4072. r(children[i])
  4073. end
  4074. end)
  4075. end
  4076.  
  4077. r(workspace.Parent)
  4078. if DexStorageEnabled then
  4079. r(DexStorage)
  4080. end
  4081. if NilStorageEnabled then
  4082. r(NilStorage)
  4083. end
  4084.  
  4085. scrollBar.VisibleSpace = math.ceil(listFrame.AbsoluteSize.y/ENTRY_BOUND)
  4086. updateList()
  4087. end
  4088.  
  4089. ----------------------------------------------------------------
  4090. ----------------------------------------------------------------
  4091. ----------------------------------------------------------------
  4092. ----------------------------------------------------------------
  4093. ---- Actions
  4094.  
  4095. local actionButtons do
  4096. actionButtons = {}
  4097.  
  4098. local totalActions = 1
  4099. local currentActions = totalActions
  4100. local function makeButton(icon,over,name,vis,cond)
  4101. local buttonEnabled = false
  4102.  
  4103. local button = Create(Icon('ImageButton',icon),{
  4104. Name = name .. "Button";
  4105. Visible = Option.Modifiable and Option.Selectable;
  4106. Position = UDim2.new(1,-(GUI_SIZE+2)*currentActions+2,0.25,-GUI_SIZE/2);
  4107. Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE);
  4108. Parent = headerFrame;
  4109. })
  4110.  
  4111. local tipText = Create('TextLabel',{
  4112. Name = name .. "Text";
  4113. Text = name;
  4114. Visible = false;
  4115. BackgroundTransparency = 1;
  4116. TextXAlignment = 'Right';
  4117. Font = FONT;
  4118. FontSize = FONT_SIZE;
  4119. Position = UDim2.new(0,0,0,0);
  4120. Size = UDim2.new(1,-(GUI_SIZE+2)*totalActions,1,0);
  4121. Parent = headerFrame;
  4122. })
  4123.  
  4124.  
  4125. button.MouseEnter:connect(function()
  4126. if buttonEnabled then
  4127. button.BackgroundTransparency = 0.9
  4128. end
  4129. --Icon(button,over)
  4130. --tipText.Visible = true
  4131. end)
  4132. button.MouseLeave:connect(function()
  4133. button.BackgroundTransparency = 1
  4134. --Icon(button,icon)
  4135. --tipText.Visible = false
  4136. end)
  4137.  
  4138. currentActions = currentActions + 1
  4139. actionButtons[#actionButtons+1] = {Obj = button,Cond = cond}
  4140. QuickButtons[#actionButtons+1] = {Obj = button,Cond = cond, Toggle = function(on)
  4141. if on then
  4142. buttonEnabled = true
  4143. Icon(button,over)
  4144. else
  4145. buttonEnabled = false
  4146. Icon(button,icon)
  4147. end
  4148. end}
  4149. return button
  4150. end
  4151.  
  4152. --local clipboard = {}
  4153. local function delete(o)
  4154. o.Parent = nil
  4155. end
  4156.  
  4157. makeButton(ACTION_EDITQUICKACCESS,ACTION_EDITQUICKACCESS,"Options",true,function()return true end).MouseButton1Click:connect(function()
  4158.  
  4159. end)
  4160.  
  4161.  
  4162. -- DELETE
  4163. makeButton(ACTION_DELETE,ACTION_DELETE_OVER,"Delete",true,function() return #Selection:Get() > 0 end).MouseButton1Click:connect(function()
  4164. if not Option.Modifiable then return end
  4165. local list = Selection:Get()
  4166. for i = 1,#list do
  4167. pcall(delete,list[i])
  4168. end
  4169. Selection:Set({})
  4170. end)
  4171.  
  4172. -- PASTE
  4173. makeButton(ACTION_PASTE,ACTION_PASTE_OVER,"Paste",true,function() return #Selection:Get() > 0 and #clipboard > 0 end).MouseButton1Click:connect(function()
  4174. if not Option.Modifiable then return end
  4175. local parent = Selection.List[1] or workspace
  4176. for i = 1,#clipboard do
  4177. clipboard[i]:Clone().Parent = parent
  4178. end
  4179. end)
  4180.  
  4181. -- COPY
  4182. makeButton(ACTION_COPY,ACTION_COPY_OVER,"Copy",true,function() return #Selection:Get() > 0 end).MouseButton1Click:connect(function()
  4183. if not Option.Modifiable then return end
  4184. clipboard = {}
  4185. local list = Selection.List
  4186. for i = 1,#list do
  4187. table.insert(clipboard,list[i]:Clone())
  4188. end
  4189. updateActions()
  4190. end)
  4191.  
  4192. -- CUT
  4193. makeButton(ACTION_CUT,ACTION_CUT_OVER,"Cut",true,function() return #Selection:Get() > 0 end).MouseButton1Click:connect(function()
  4194. if not Option.Modifiable then return end
  4195. clipboard = {}
  4196. local list = Selection.List
  4197. local cut = {}
  4198. for i = 1,#list do
  4199. local obj = list[i]:Clone()
  4200. if obj then
  4201. table.insert(clipboard,obj)
  4202. table.insert(cut,list[i])
  4203. end
  4204. end
  4205. for i = 1,#cut do
  4206. pcall(delete,cut[i])
  4207. end
  4208. updateActions()
  4209. end)
  4210.  
  4211. -- FREEZE
  4212. makeButton(ACTION_FREEZE,ACTION_FREEZE,"Freeze",true,function() return true end)
  4213.  
  4214. -- ADD/REMOVE STARRED
  4215. makeButton(ACTION_ADDSTAR,ACTION_ADDSTAR_OVER,"Star",true,function() return #Selection:Get() > 0 end)
  4216.  
  4217. -- STARRED
  4218. makeButton(ACTION_STARRED,ACTION_STARRED,"Starred",true,function() return true end)
  4219.  
  4220.  
  4221. -- SORT
  4222. -- local actionSort = makeButton(ACTION_SORT,ACTION_SORT_OVER,"Sort")
  4223. end
  4224.  
  4225. ----------------------------------------------------------------
  4226. ----------------------------------------------------------------
  4227. ----------------------------------------------------------------
  4228. ----------------------------------------------------------------
  4229. ---- Option Bindables
  4230.  
  4231. do
  4232. local optionCallback = {
  4233. Modifiable = function(value)
  4234. for i = 1,#actionButtons do
  4235. actionButtons[i].Obj.Visible = value and Option.Selectable
  4236. end
  4237. cancelReparentDrag()
  4238. end;
  4239. Selectable = function(value)
  4240. for i = 1,#actionButtons do
  4241. actionButtons[i].Obj.Visible = value and Option.Modifiable
  4242. end
  4243. cancelSelectDrag()
  4244. Selection:Set({})
  4245. end;
  4246. }
  4247.  
  4248. local bindSetOption = explorerPanel:FindFirstChild("SetOption")
  4249. if not bindSetOption then
  4250. bindSetOption = Create('BindableFunction',{Name = "SetOption"})
  4251. bindSetOption.Parent = explorerPanel
  4252. end
  4253.  
  4254. bindSetOption.OnInvoke = function(optionName,value)
  4255. if optionCallback[optionName] then
  4256. Option[optionName] = value
  4257. optionCallback[optionName](value)
  4258. end
  4259. end
  4260.  
  4261. local bindGetOption = explorerPanel:FindFirstChild("GetOption")
  4262. if not bindGetOption then
  4263. bindGetOption = Create('BindableFunction',{Name = "GetOption"})
  4264. bindGetOption.Parent = explorerPanel
  4265. end
  4266.  
  4267. bindGetOption.OnInvoke = function(optionName)
  4268. if optionName then
  4269. return Option[optionName]
  4270. else
  4271. local options = {}
  4272. for k,v in pairs(Option) do
  4273. options[k] = v
  4274. end
  4275. return options
  4276. end
  4277. end
  4278. end
  4279.  
  4280. function SelectionVar()
  4281. return Selection
  4282. end
  4283.  
  4284. Input.InputBegan:connect(function(key)
  4285. if key.KeyCode == Enum.KeyCode.LeftControl then
  4286. HoldingCtrl = true
  4287. end
  4288. if key.KeyCode == Enum.KeyCode.LeftShift then
  4289. HoldingShift = true
  4290. end
  4291. end)
  4292.  
  4293. Input.InputEnded:connect(function(key)
  4294. if key.KeyCode == Enum.KeyCode.LeftControl then
  4295. HoldingCtrl = false
  4296. end
  4297. if key.KeyCode == Enum.KeyCode.LeftShift then
  4298. HoldingShift = false
  4299. end
  4300. end)
  4301.  
  4302. while RbxApi == nil do
  4303. RbxApi = GetApiRemote:Invoke()
  4304. wait()
  4305. end
  4306.  
  4307. explorerFilter.Changed:connect(function(prop)
  4308. if prop == "Text" then
  4309. rawUpdateList()
  4310. end
  4311. end)
  4312.  
  4313. CurrentInsertObjectWindow = CreateInsertObjectMenu(
  4314. GetClasses(),
  4315. "",
  4316. false,
  4317. function(option)
  4318. CurrentInsertObjectWindow.Visible = false
  4319. local list = SelectionVar():Get()
  4320. for i = 1,#list do
  4321. pcall(function() Instance.new(option,list[i]) end)
  4322. end
  4323. DestroyRightClick()
  4324. end
  4325. )
  4326. end)
  4327.  
  4328. spawn(function()
  4329. --[[
  4330.  
  4331. Change log:
  4332.  
  4333. 09/18
  4334. Fixed checkbox mouseover sprite
  4335. Encapsulated checkbox creation into separate method
  4336. Fixed another checkbox issue
  4337.  
  4338. 09/15
  4339. Invalid input is ignored instead of setting to default of that data type
  4340. Consolidated control methods and simplified them
  4341. All input goes through ToValue method
  4342. Fixed position of BrickColor palette
  4343. Made DropDown appear above row if it would otherwise exceed the page height
  4344. Cleaned up stylesheets
  4345.  
  4346. 09/14
  4347. Made properties window scroll when mouse wheel scrolled
  4348. Object/Instance and Color3 data types handled properly
  4349. Multiple BrickColor controls interfering with each other fixed
  4350. Added support for Content data type
  4351.  
  4352. --]]
  4353.  
  4354. wait(0.2)
  4355.  
  4356. local print = function(s)
  4357. print(tostring(s))
  4358. end
  4359.  
  4360. -- Services
  4361. local Teams = game:GetService("Teams")
  4362. local Workspace = game:GetService("Workspace")
  4363. local Debris = game:GetService("Debris")
  4364. local ContentProvider = game:GetService("ContentProvider")
  4365. local Players = game:GetService("Players")
  4366. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  4367.  
  4368. -- Functions
  4369. function httpGet(url)
  4370. return game:HttpGet(url,true)
  4371. end
  4372.  
  4373. -- RbxApi Stuff
  4374.  
  4375. local apiUrl = "http://anaminus.github.io/rbx/json/api/latest.json"
  4376. local maxChunkSize = 100 * 1000
  4377. local ApiJson = ""
  4378.  
  4379. function getLocalApiJson()
  4380. local rawApiJson = require(ApiJson)()
  4381. return rawApiJson
  4382. end
  4383.  
  4384. function getCurrentApiJson()
  4385. if true then return Synapse:DownloadString("http://anaminus.github.io/rbx/json/api/latest.json") end
  4386. local jsonStr = nil
  4387. if readfile and getelysianpath then
  4388. if readfile(getelysianpath().."Xpl0rerApi.txt") then
  4389. print("Api found in folder!")
  4390. jsonStr = readfile(getelysianpath().."Xpl0rerApi.txt")
  4391. return jsonStr
  4392. end
  4393. end
  4394. local success, err = pcall(function()
  4395. jsonStr = httpGet(apiUrl)
  4396. print("Fetched json successfully")
  4397. end)
  4398. if success then
  4399. print("Returning json")
  4400. --print(jsonStr:sub(1,500))
  4401. return jsonStr
  4402. else
  4403. print("Error fetching json: " .. tostring(err))
  4404. print("Falling back to local copy")
  4405. return getLocalApiJson()
  4406. end
  4407. end
  4408.  
  4409. function splitStringIntoChunks(jsonStr)
  4410. -- Splits up a string into a table with a given size
  4411. local t = {}
  4412. for i = 1, math.ceil(string.len(jsonStr)/maxChunkSize) do
  4413. local str = jsonStr:sub((i-1)*maxChunkSize+1, i*maxChunkSize)
  4414. table.insert(t, str)
  4415. end
  4416. return t
  4417. end
  4418.  
  4419. local jsonToParse = getCurrentApiJson()
  4420. local apiChunks = splitStringIntoChunks(jsonToParse)
  4421.  
  4422. function getRbxApi()
  4423. --[[
  4424. Api.Classes
  4425. Api.Enums
  4426. Api.GetProperties(className)
  4427. Api.IsEnum(valueType)
  4428. --]]
  4429.  
  4430. -- Services
  4431. local HttpService = game:GetService("HttpService")
  4432. local ServerStorage = game:GetService("ServerStorage")
  4433. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  4434.  
  4435. -- Remotes
  4436. --local Remotes = ReplicatedStorage:WaitForChild("OnlineStudio"):WaitForChild("Remotes")
  4437. --local GetApiJsonFunction = Remotes:WaitForChild("GetApiJson")
  4438.  
  4439. -- Functions
  4440. local JsonDecode = function(s) return HttpService:JSONDecode(s) end
  4441.  
  4442. local function GetApiRemoteFunction(index)
  4443. if (apiChunks[index]) then
  4444. return apiChunks[index], #apiChunks
  4445. else
  4446. print("Bad index for GetApiJson")
  4447. return nil
  4448. end
  4449. end
  4450.  
  4451. local function getApiJson()
  4452. local apiTable = {}
  4453. local firstPage, pageCount = GetApiRemoteFunction(1)
  4454. table.insert(apiTable, firstPage)
  4455. for i = 2, pageCount do
  4456. --print("Fetching API page # " .. tostring(i))
  4457. local result = GetApiRemoteFunction(i)
  4458. table.insert(apiTable, result)
  4459. end
  4460. return table.concat(apiTable)
  4461. end
  4462.  
  4463. local json = getApiJson()
  4464. local apiDump = JsonDecode(json)
  4465.  
  4466. local Classes = {}
  4467. local Enums = {}
  4468.  
  4469. local function sortAlphabetic(t, property)
  4470. table.sort(t,
  4471. function(x,y) return x[property] < y[property]
  4472. end)
  4473. end
  4474.  
  4475. local function isEnum(name)
  4476. return Enums[name] ~= nil
  4477. end
  4478.  
  4479. local function getProperties(className)
  4480. local class = Classes[className]
  4481. local properties = {}
  4482.  
  4483. if not class then return properties end
  4484.  
  4485. while class do
  4486. for _,property in pairs(class.Properties) do
  4487. table.insert(properties, property)
  4488. end
  4489. class = Classes[class.Superclass]
  4490. end
  4491.  
  4492. sortAlphabetic(properties, "Name")
  4493.  
  4494. return properties
  4495. end
  4496.  
  4497. for _,item in pairs(apiDump) do
  4498. local itemType = item.type
  4499. -- Classes --
  4500. if (itemType == 'Class') then
  4501. Classes[item.Name] = item
  4502. item.Properties = {}
  4503. item.Functions = {}
  4504. item.YieldFunctions = {}
  4505. item.Events = {}
  4506. item.Callbacks = {}
  4507. -- Members --
  4508. elseif (itemType == 'Property') then
  4509. table.insert(Classes[item.Class].Properties, item)
  4510. elseif (itemType == 'Function') then
  4511. table.insert(Classes[item.Class].Functions, item)
  4512. elseif (itemType == 'YieldFunction') then
  4513. table.insert(Classes[item.Class].YieldFunctions, item)
  4514. elseif (itemType == 'Event') then
  4515. table.insert(Classes[item.Class].Events, item)
  4516. elseif (itemType == 'Callback') then
  4517. table.insert(Classes[item.Class].Callbacks, item)
  4518. -- Enums --
  4519. elseif (itemType == 'Enum') then
  4520. Enums[item.Name] = item
  4521. item.EnumItems = {}
  4522. elseif (itemType == 'EnumItem') then
  4523. Enums[item.Enum].EnumItems[item.Name] = item
  4524. end
  4525. end
  4526.  
  4527. return {
  4528. Classes = Classes;
  4529. Enums = Enums;
  4530. GetProperties = getProperties;
  4531. IsEnum = isEnum;
  4532. }
  4533. end
  4534.  
  4535. -- Modules
  4536. local Permissions = {CanEdit = true}
  4537. local RbxApi = getRbxApi()
  4538.  
  4539. --[[
  4540. RbxApi.Classes
  4541. RbxApi.Enums
  4542. RbxApi.GetProperties(className)
  4543. RbxApi.IsEnum(valueType)
  4544. --]]
  4545.  
  4546. -- Styles
  4547.  
  4548. local function CreateColor3(r, g, b) return Color3.new(r/255,g/255,b/255) end
  4549.  
  4550. local Styles = {
  4551. Font = Enum.Font.Arial;
  4552. Margin = 5;
  4553. Black = CreateColor3(0,0,0);
  4554. White = CreateColor3(255,255,255);
  4555. }
  4556.  
  4557. local Row = {
  4558. Font = Styles.Font;
  4559. FontSize = Enum.FontSize.Size14;
  4560. TextXAlignment = Enum.TextXAlignment.Left;
  4561. TextColor = Styles.Black;
  4562. TextColorOver = Styles.White;
  4563. TextLockedColor = CreateColor3(120,120,120);
  4564. Height = 24;
  4565. BorderColor = CreateColor3(216,216,216);
  4566. BackgroundColor = Styles.White;
  4567. BackgroundColorAlternate = CreateColor3(246,246,246);
  4568. BackgroundColorMouseover = CreateColor3(211,224,244);
  4569. TitleMarginLeft = 15;
  4570. }
  4571.  
  4572. local DropDown = {
  4573. Font = Styles.Font;
  4574. FontSize = Enum.FontSize.Size14;
  4575. TextColor = CreateColor3(0,0,0);
  4576. TextColorOver = Styles.White;
  4577. TextXAlignment = Enum.TextXAlignment.Left;
  4578. Height = 16;
  4579. BackColor = Styles.White;
  4580. BackColorOver = CreateColor3(86,125,188);
  4581. BorderColor = CreateColor3(216,216,216);
  4582. BorderSizePixel = 2;
  4583. ArrowColor = CreateColor3(160,160,160);
  4584. ArrowColorOver = Styles.Black;
  4585. }
  4586.  
  4587. local BrickColors = {
  4588. BoxSize = 13;
  4589. BorderSizePixel = 1;
  4590. BorderColor = CreateColor3(160,160,160);
  4591. FrameColor = CreateColor3(160,160,160);
  4592. Size = 20;
  4593. Padding = 4;
  4594. ColorsPerRow = 8;
  4595. OuterBorder = 1;
  4596. OuterBorderColor = Styles.Black;
  4597. }
  4598.  
  4599. wait(1)
  4600.  
  4601. local Gui = D_E_X
  4602. local PropertiesFrame = Gui:WaitForChild("PropertiesFrame")
  4603. local ExplorerFrame = Gui:WaitForChild("ExplorerPanel")
  4604.  
  4605. local bindGetSelection = ExplorerFrame.GetSelection
  4606. local bindSelectionChanged = ExplorerFrame.SelectionChanged
  4607. local bindGetApi = PropertiesFrame.GetApi
  4608. local bindGetAwait = PropertiesFrame.GetAwaiting
  4609. local bindSetAwait = PropertiesFrame.SetAwaiting
  4610.  
  4611. local ContentUrl = ContentProvider.BaseUrl .. "asset/?id="
  4612.  
  4613. local SettingsRemote = Gui:WaitForChild("SettingsPanel"):WaitForChild("GetSetting")
  4614.  
  4615. local propertiesSearch = PropertiesFrame.Header.TextBox
  4616.  
  4617. local AwaitingObjectValue = false
  4618. local AwaitingObjectObj
  4619. local AwaitingObjectProp
  4620.  
  4621. function searchingProperties()
  4622. if propertiesSearch.Text ~= "" and propertiesSearch.Text ~= "Search Properties" then
  4623. return true
  4624. end
  4625. return false
  4626. end
  4627.  
  4628. local function GetSelection()
  4629. local selection = bindGetSelection:Invoke()
  4630. if #selection == 0 then
  4631. return nil
  4632. else
  4633. return selection
  4634. end
  4635. end
  4636.  
  4637. -- Number
  4638.  
  4639. local function Round(number, decimalPlaces)
  4640. return tonumber(string.format("%." .. (decimalPlaces or 0) .. "f", number))
  4641. end
  4642.  
  4643. -- Strings
  4644.  
  4645. local function Split(str, delimiter)
  4646. local start = 1
  4647. local t = {}
  4648. while true do
  4649. local pos = string.find (str, delimiter, start, true)
  4650. if not pos then
  4651. break
  4652. end
  4653. table.insert (t, string.sub (str, start, pos - 1))
  4654. start = pos + string.len (delimiter)
  4655. end
  4656. table.insert (t, string.sub (str, start))
  4657. return t
  4658. end
  4659.  
  4660. -- Data Type Handling
  4661.  
  4662. local function ToString(value, type)
  4663. if type == "float" then
  4664. return tostring(Round(value,2))
  4665. elseif type == "Content" then
  4666. if string.find(value,"/asset") then
  4667. local match = string.find(value, "=") + 1
  4668. local id = string.sub(value, match)
  4669. return id
  4670. else
  4671. return tostring(value)
  4672. end
  4673. elseif type == "Vector2" then
  4674. local x = value.x
  4675. local y = value.y
  4676. return string.format("%g, %g", x,y)
  4677. elseif type == "Vector3" then
  4678. local x = value.x
  4679. local y = value.y
  4680. local z = value.z
  4681. return string.format("%g, %g, %g", x,y,z)
  4682. elseif type == "Color3" then
  4683. local r = value.r
  4684. local g = value.g
  4685. local b = value.b
  4686. return string.format("%d, %d, %d", r*255,g*255,b*255)
  4687. elseif type == "UDim2" then
  4688. local xScale = value.X.Scale
  4689. local xOffset = value.X.Offset
  4690. local yScale = value.Y.Scale
  4691. local yOffset = value.Y.Offset
  4692. return string.format("{%d, %d}, {%d, %d}", xScale, xOffset, yScale, yOffset)
  4693. else
  4694. return tostring(value)
  4695. end
  4696. end
  4697.  
  4698. local function ToValue(value,type)
  4699. if type == "Vector2" then
  4700. local list = Split(value,",")
  4701. if #list < 2 then return nil end
  4702. local x = tonumber(list[1]) or 0
  4703. local y = tonumber(list[2]) or 0
  4704. return Vector2.new(x,y)
  4705. elseif type == "Vector3" then
  4706. local list = Split(value,",")
  4707. if #list < 3 then return nil end
  4708. local x = tonumber(list[1]) or 0
  4709. local y = tonumber(list[2]) or 0
  4710. local z = tonumber(list[3]) or 0
  4711. return Vector3.new(x,y,z)
  4712. elseif type == "Color3" then
  4713. local list = Split(value,",")
  4714. if #list < 3 then return nil end
  4715. local r = tonumber(list[1]) or 0
  4716. local g = tonumber(list[2]) or 0
  4717. local b = tonumber(list[3]) or 0
  4718. return Color3.new(r/255,g/255, b/255)
  4719. elseif type == "UDim2" then
  4720. local list = Split(string.gsub(string.gsub(value, "{", ""),"}",""),",")
  4721. if #list < 4 then return nil end
  4722. local xScale = tonumber(list[1]) or 0
  4723. local xOffset = tonumber(list[2]) or 0
  4724. local yScale = tonumber(list[3]) or 0
  4725. local yOffset = tonumber(list[4]) or 0
  4726. return UDim2.new(xScale, xOffset, yScale, yOffset)
  4727. elseif type == "Content" then
  4728. if tonumber(value) ~= nil then
  4729. value = ContentUrl .. value
  4730. end
  4731. return value
  4732. elseif type == "float" or type == "int" or type == "double" then
  4733. return tonumber(value)
  4734. elseif type == "string" then
  4735. return value
  4736. elseif type == "NumberRange" then
  4737. local list = Split(value,",")
  4738. if #list == 1 then
  4739. if tonumber(list[1]) == nil then return nil end
  4740. local newVal = tonumber(list[1]) or 0
  4741. return NumberRange.new(newVal)
  4742. end
  4743. if #list < 2 then return nil end
  4744. local x = tonumber(list[1]) or 0
  4745. local y = tonumber(list[2]) or 0
  4746. return NumberRange.new(x,y)
  4747. else
  4748. return nil
  4749. end
  4750. end
  4751.  
  4752.  
  4753. -- Tables
  4754.  
  4755. local function CopyTable(T)
  4756. local t2 = {}
  4757. for k,v in pairs(T) do
  4758. t2[k] = v
  4759. end
  4760. return t2
  4761. end
  4762.  
  4763. local function SortTable(T)
  4764. table.sort(T,
  4765. function(x,y) return x.Name < y.Name
  4766. end)
  4767. end
  4768.  
  4769. -- Spritesheet
  4770. local Sprite = {
  4771. Width = 13;
  4772. Height = 13;
  4773. }
  4774.  
  4775. local Spritesheet = {
  4776. Image = "http://www.roblox.com/asset/?id=128896947";
  4777. Height = 256;
  4778. Width = 256;
  4779. }
  4780.  
  4781. local Images = {
  4782. "unchecked",
  4783. "checked",
  4784. "unchecked_over",
  4785. "checked_over",
  4786. "unchecked_disabled",
  4787. "checked_disabled"
  4788. }
  4789.  
  4790. local function SpritePosition(spriteName)
  4791. local x = 0
  4792. local y = 0
  4793. for i,v in pairs(Images) do
  4794. if (v == spriteName) then
  4795. return {x, y}
  4796. end
  4797. x = x + Sprite.Height
  4798. if (x + Sprite.Width) > Spritesheet.Width then
  4799. x = 0
  4800. y = y + Sprite.Height
  4801. end
  4802. end
  4803. end
  4804.  
  4805. local function GetCheckboxImageName(checked, readOnly, mouseover)
  4806. if checked then
  4807. if readOnly then
  4808. return "checked_disabled"
  4809. elseif mouseover then
  4810. return "checked_over"
  4811. else
  4812. return "checked"
  4813. end
  4814. else
  4815. if readOnly then
  4816. return "unchecked_disabled"
  4817. elseif mouseover then
  4818. return "unchecked_over"
  4819. else
  4820. return "unchecked"
  4821. end
  4822. end
  4823. end
  4824.  
  4825. local MAP_ID = 418720155
  4826.  
  4827. -- Gui Controls --
  4828.  
  4829. ---- IconMap ----
  4830. -- Image size: 256px x 256px
  4831. -- Icon size: 16px x 16px
  4832. -- Padding between each icon: 2px
  4833. -- Padding around image edge: 1px
  4834. -- Total icons: 14 x 14 (196)
  4835. local Icon do
  4836. local iconMap = 'http://www.roblox.com/asset/?id=' .. MAP_ID
  4837. game:GetService('ContentProvider'):Preload(iconMap)
  4838. local iconDehash do
  4839. -- 14 x 14, 0-based input, 0-based output
  4840. local f=math.floor
  4841. function iconDehash(h)
  4842. return f(h/14%14),f(h%14)
  4843. end
  4844. end
  4845.  
  4846. function Icon(IconFrame,index)
  4847. local row,col = iconDehash(index)
  4848. local mapSize = Vector2.new(256,256)
  4849. local pad,border = 2,1
  4850. local iconSize = 16
  4851.  
  4852. local class = 'Frame'
  4853. if type(IconFrame) == 'string' then
  4854. class = IconFrame
  4855. IconFrame = nil
  4856. end
  4857.  
  4858. if not IconFrame then
  4859. IconFrame = Create(class,{
  4860. Name = "Icon";
  4861. BackgroundTransparency = 1;
  4862. ClipsDescendants = true;
  4863. Create('ImageLabel',{
  4864. Name = "IconMap";
  4865. Active = false;
  4866. BackgroundTransparency = 1;
  4867. Image = iconMap;
  4868. Size = UDim2.new(mapSize.x/iconSize,0,mapSize.y/iconSize,0);
  4869. });
  4870. })
  4871. end
  4872.  
  4873. IconFrame.IconMap.Position = UDim2.new(-col - (pad*(col+1) + border)/iconSize,0,-row - (pad*(row+1) + border)/iconSize,0)
  4874. return IconFrame
  4875. end
  4876. end
  4877.  
  4878. local function CreateCell()
  4879. local tableCell = Instance.new("Frame")
  4880. tableCell.Size = UDim2.new(0.5, -1, 1, 0)
  4881. tableCell.BackgroundColor3 = Row.BackgroundColor
  4882. tableCell.BorderColor3 = Row.BorderColor
  4883. return tableCell
  4884. end
  4885.  
  4886. local function CreateLabel(readOnly)
  4887. local label = Instance.new("TextLabel")
  4888. label.Font = Row.Font
  4889. label.FontSize = Row.FontSize
  4890. label.TextXAlignment = Row.TextXAlignment
  4891. label.BackgroundTransparency = 1
  4892.  
  4893. if readOnly then
  4894. label.TextColor3 = Row.TextLockedColor
  4895. else
  4896. label.TextColor3 = Row.TextColor
  4897. end
  4898. return label
  4899. end
  4900.  
  4901. local function CreateTextButton(readOnly, onClick)
  4902. local button = Instance.new("TextButton")
  4903. button.Font = Row.Font
  4904. button.FontSize = Row.FontSize
  4905. button.TextXAlignment = Row.TextXAlignment
  4906. button.BackgroundTransparency = 1
  4907. if readOnly then
  4908. button.TextColor3 = Row.TextLockedColor
  4909. else
  4910. button.TextColor3 = Row.TextColor
  4911. button.MouseButton1Click:connect(function()
  4912. onClick()
  4913. end)
  4914. end
  4915. return button
  4916. end
  4917.  
  4918. local function CreateObject(readOnly)
  4919. local button = Instance.new("TextButton")
  4920. button.Font = Row.Font
  4921. button.FontSize = Row.FontSize
  4922. button.TextXAlignment = Row.TextXAlignment
  4923. button.BackgroundTransparency = 1
  4924. if readOnly then
  4925. button.TextColor3 = Row.TextLockedColor
  4926. else
  4927. button.TextColor3 = Row.TextColor
  4928. end
  4929. local cancel = Create(Icon('ImageButton',177),{
  4930. Name = "Cancel";
  4931. Visible = false;
  4932. Position = UDim2.new(1,-20,0,0);
  4933. Size = UDim2.new(0,20,0,20);
  4934. Parent = button;
  4935. })
  4936. return button
  4937. end
  4938.  
  4939. local function CreateTextBox(readOnly)
  4940. if readOnly then
  4941. local box = CreateLabel(readOnly)
  4942. return box
  4943. else
  4944. local box = Instance.new("TextBox")
  4945. if not SettingsRemote:Invoke("ClearProps") then
  4946. box.ClearTextOnFocus = false
  4947. end
  4948. box.Font = Row.Font
  4949. box.FontSize = Row.FontSize
  4950. box.TextXAlignment = Row.TextXAlignment
  4951. box.BackgroundTransparency = 1
  4952. box.TextColor3 = Row.TextColor
  4953. return box
  4954. end
  4955. end
  4956.  
  4957. local function CreateDropDownItem(text, onClick)
  4958. local button = Instance.new("TextButton")
  4959. button.Font = DropDown.Font
  4960. button.FontSize = DropDown.FontSize
  4961. button.TextColor3 = DropDown.TextColor
  4962. button.TextXAlignment = DropDown.TextXAlignment
  4963. button.BackgroundColor3 = DropDown.BackColor
  4964. button.AutoButtonColor = false
  4965. button.BorderSizePixel = 0
  4966. button.Active = true
  4967. button.Text = text
  4968.  
  4969. button.MouseEnter:connect(function()
  4970. button.TextColor3 = DropDown.TextColorOver
  4971. button.BackgroundColor3 = DropDown.BackColorOver
  4972. end)
  4973. button.MouseLeave:connect(function()
  4974. button.TextColor3 = DropDown.TextColor
  4975. button.BackgroundColor3 = DropDown.BackColor
  4976. end)
  4977. button.MouseButton1Click:connect(function()
  4978. onClick(text)
  4979. end)
  4980. return button
  4981. end
  4982.  
  4983. local function CreateDropDown(choices, currentChoice, readOnly, onClick)
  4984. local frame = Instance.new("Frame")
  4985. frame.Name = "DropDown"
  4986. frame.Size = UDim2.new(1, 0, 1, 0)
  4987. frame.BackgroundTransparency = 1
  4988. frame.Active = true
  4989.  
  4990. local menu = nil
  4991. local arrow = nil
  4992. local expanded = false
  4993. local margin = DropDown.BorderSizePixel;
  4994.  
  4995. local button = Instance.new("TextButton")
  4996. button.Font = Row.Font
  4997. button.FontSize = Row.FontSize
  4998. button.TextXAlignment = Row.TextXAlignment
  4999. button.BackgroundTransparency = 1
  5000. button.TextColor3 = Row.TextColor
  5001. if readOnly then
  5002. button.TextColor3 = Row.TextLockedColor
  5003. end
  5004. button.Text = currentChoice
  5005. button.Size = UDim2.new(1, -2 * Styles.Margin, 1, 0)
  5006. button.Position = UDim2.new(0, Styles.Margin, 0, 0)
  5007. button.Parent = frame
  5008.  
  5009. local function showArrow(color)
  5010. if arrow then arrow:Destroy() end
  5011.  
  5012. local graphicTemplate = Create('Frame',{
  5013. Name="Graphic";
  5014. BorderSizePixel = 0;
  5015. BackgroundColor3 = color;
  5016. })
  5017. local graphicSize = 16/2
  5018.  
  5019. arrow = ArrowGraphic(graphicSize,'Down',true,graphicTemplate)
  5020. arrow.Position = UDim2.new(1,-graphicSize * 2,0.5,-graphicSize/2)
  5021. arrow.Parent = frame
  5022. end
  5023.  
  5024. local function hideMenu()
  5025. expanded = false
  5026. showArrow(DropDown.ArrowColor)
  5027. if menu then menu:Destroy() end
  5028. end
  5029.  
  5030. local function showMenu()
  5031. expanded = true
  5032. menu = Instance.new("Frame")
  5033. menu.Size = UDim2.new(1, -2 * margin, 0, #choices * DropDown.Height)
  5034. menu.Position = UDim2.new(0, margin, 0, Row.Height + margin)
  5035. menu.BackgroundTransparency = 0
  5036. menu.BackgroundColor3 = DropDown.BackColor
  5037. menu.BorderColor3 = DropDown.BorderColor
  5038. menu.BorderSizePixel = DropDown.BorderSizePixel
  5039. menu.Active = true
  5040. menu.ZIndex = 5
  5041. menu.Parent = frame
  5042.  
  5043. local parentFrameHeight = menu.Parent.Parent.Parent.Parent.Size.Y.Offset
  5044. local rowHeight = menu.Parent.Parent.Parent.Position.Y.Offset
  5045. if (rowHeight + menu.Size.Y.Offset) > math.max(parentFrameHeight,PropertiesFrame.AbsoluteSize.y) then
  5046. menu.Position = UDim2.new(0, margin, 0, -1 * (#choices * DropDown.Height) - margin)
  5047. end
  5048.  
  5049. local function choice(name)
  5050. onClick(name)
  5051. hideMenu()
  5052. end
  5053.  
  5054. for i,name in pairs(choices) do
  5055. local option = CreateDropDownItem(name, function()
  5056. choice(name)
  5057. end)
  5058. option.Size = UDim2.new(1, 0, 0, 16)
  5059. option.Position = UDim2.new(0, 0, 0, (i - 1) * DropDown.Height)
  5060. option.ZIndex = menu.ZIndex
  5061. option.Parent = menu
  5062. end
  5063. end
  5064.  
  5065. showArrow(DropDown.ArrowColor)
  5066.  
  5067. if not readOnly then
  5068.  
  5069. button.MouseEnter:connect(function()
  5070. button.TextColor3 = Row.TextColor
  5071. showArrow(DropDown.ArrowColorOver)
  5072. end)
  5073. button.MouseLeave:connect(function()
  5074. button.TextColor3 = Row.TextColor
  5075. if not expanded then
  5076. showArrow(DropDown.ArrowColor)
  5077. end
  5078. end)
  5079. button.MouseButton1Click:connect(function()
  5080. if expanded then
  5081. hideMenu()
  5082. else
  5083. showMenu()
  5084. end
  5085. end)
  5086. end
  5087.  
  5088. return frame,button
  5089. end
  5090.  
  5091. local function CreateBrickColor(readOnly, onClick)
  5092. local frame = Instance.new("Frame")
  5093. frame.Size = UDim2.new(1,0,1,0)
  5094. frame.BackgroundTransparency = 1
  5095.  
  5096. local colorPalette = Instance.new("Frame")
  5097. colorPalette.BackgroundTransparency = 0
  5098. colorPalette.SizeConstraint = Enum.SizeConstraint.RelativeXX
  5099. colorPalette.Size = UDim2.new(1, -2 * BrickColors.OuterBorder, 1, -2 * BrickColors.OuterBorder)
  5100. colorPalette.BorderSizePixel = BrickColors.BorderSizePixel
  5101. colorPalette.BorderColor3 = BrickColors.BorderColor
  5102. colorPalette.Position = UDim2.new(0, BrickColors.OuterBorder, 0, BrickColors.OuterBorder + Row.Height)
  5103. colorPalette.ZIndex = 5
  5104. colorPalette.Visible = false
  5105. colorPalette.BorderSizePixel = BrickColors.OuterBorder
  5106. colorPalette.BorderColor3 = BrickColors.OuterBorderColor
  5107. colorPalette.Parent = frame
  5108.  
  5109. local function show()
  5110. colorPalette.Visible = true
  5111. end
  5112.  
  5113. local function hide()
  5114. colorPalette.Visible = false
  5115. end
  5116.  
  5117. local function toggle()
  5118. colorPalette.Visible = not colorPalette.Visible
  5119. end
  5120.  
  5121. local colorBox = Instance.new("TextButton", frame)
  5122. colorBox.Position = UDim2.new(0, Styles.Margin, 0, Styles.Margin)
  5123. colorBox.Size = UDim2.new(0, BrickColors.BoxSize, 0, BrickColors.BoxSize)
  5124. colorBox.Text = ""
  5125. colorBox.MouseButton1Click:connect(function()
  5126. if not readOnly then
  5127. toggle()
  5128. end
  5129. end)
  5130.  
  5131. if readOnly then
  5132. colorBox.AutoButtonColor = false
  5133. end
  5134.  
  5135. local spacingBefore = (Styles.Margin * 2) + BrickColors.BoxSize
  5136.  
  5137. local propertyLabel = CreateTextButton(readOnly, function()
  5138. if not readOnly then
  5139. toggle()
  5140. end
  5141. end)
  5142. propertyLabel.Size = UDim2.new(1, (-1 * spacingBefore) - Styles.Margin, 1, 0)
  5143. propertyLabel.Position = UDim2.new(0, spacingBefore, 0, 0)
  5144. propertyLabel.Parent = frame
  5145.  
  5146. local size = (1 / BrickColors.ColorsPerRow)
  5147.  
  5148. for index = 0, 127 do
  5149. local brickColor = BrickColor.palette(index)
  5150. local color3 = brickColor.Color
  5151.  
  5152. local x = size * (index % BrickColors.ColorsPerRow)
  5153. local y = size * math.floor(index / BrickColors.ColorsPerRow)
  5154.  
  5155. local brickColorBox = Instance.new("TextButton")
  5156. brickColorBox.Text = ""
  5157. brickColorBox.Size = UDim2.new(size,0,size,0)
  5158. brickColorBox.BackgroundColor3 = color3
  5159. brickColorBox.Position = UDim2.new(x, 0, y, 0)
  5160. brickColorBox.ZIndex = colorPalette.ZIndex
  5161. brickColorBox.Parent = colorPalette
  5162.  
  5163. brickColorBox.MouseButton1Click:connect(function()
  5164. hide()
  5165. onClick(brickColor)
  5166. end)
  5167. end
  5168.  
  5169. return frame,propertyLabel,colorBox
  5170. end
  5171.  
  5172. local function CreateColor3Control(readOnly, onClick)
  5173. local frame = Instance.new("Frame")
  5174. frame.Size = UDim2.new(1,0,1,0)
  5175. frame.BackgroundTransparency = 1
  5176.  
  5177. local colorBox = Instance.new("TextButton", frame)
  5178. colorBox.Position = UDim2.new(0, Styles.Margin, 0, Styles.Margin)
  5179. colorBox.Size = UDim2.new(0, BrickColors.BoxSize, 0, BrickColors.BoxSize)
  5180. colorBox.Text = ""
  5181. colorBox.AutoButtonColor = false
  5182.  
  5183. local spacingBefore = (Styles.Margin * 2) + BrickColors.BoxSize
  5184. local box = CreateTextBox(readOnly)
  5185. box.Size = UDim2.new(1, (-1 * spacingBefore) - Styles.Margin, 1, 0)
  5186. box.Position = UDim2.new(0, spacingBefore, 0, 0)
  5187. box.Parent = frame
  5188.  
  5189. return frame,box,colorBox
  5190. end
  5191.  
  5192. function CreateCheckbox(value, readOnly, onClick)
  5193. local checked = value
  5194. local mouseover = false
  5195.  
  5196. local checkboxFrame = Instance.new("ImageButton")
  5197. checkboxFrame.Size = UDim2.new(0, Sprite.Width, 0, Sprite.Height)
  5198. checkboxFrame.BackgroundTransparency = 1
  5199. checkboxFrame.ClipsDescendants = true
  5200. --checkboxFrame.Position = UDim2.new(0, Styles.Margin, 0, Styles.Margin)
  5201.  
  5202. local spritesheetImage = Instance.new("ImageLabel", checkboxFrame)
  5203. spritesheetImage.Name = "SpritesheetImageLabel"
  5204. spritesheetImage.Size = UDim2.new(0, Spritesheet.Width, 0, Spritesheet.Height)
  5205. spritesheetImage.Image = Spritesheet.Image
  5206. spritesheetImage.BackgroundTransparency = 1
  5207.  
  5208. local function updateSprite()
  5209. local spriteName = GetCheckboxImageName(checked, readOnly, mouseover)
  5210. local spritePosition = SpritePosition(spriteName)
  5211. spritesheetImage.Position = UDim2.new(0, -1 * spritePosition[1], 0, -1 * spritePosition[2])
  5212. end
  5213.  
  5214. local function setValue(val)
  5215. checked = val
  5216. updateSprite()
  5217. end
  5218.  
  5219. if not readOnly then
  5220. checkboxFrame.MouseEnter:connect(function() mouseover = true updateSprite() end)
  5221. checkboxFrame.MouseLeave:connect(function() mouseover = false updateSprite() end)
  5222. checkboxFrame.MouseButton1Click:connect(function()
  5223. onClick(checked)
  5224. end)
  5225. end
  5226.  
  5227. updateSprite()
  5228.  
  5229. return checkboxFrame, setValue
  5230. end
  5231.  
  5232.  
  5233.  
  5234. -- Code for handling controls of various data types --
  5235.  
  5236. local Controls = {}
  5237.  
  5238. Controls["default"] = function(object, propertyData, readOnly)
  5239. local propertyName = propertyData["Name"]
  5240. local propertyType = propertyData["ValueType"]
  5241.  
  5242. local box = CreateTextBox(readOnly)
  5243. box.Size = UDim2.new(1, -2 * Styles.Margin, 1, 0)
  5244. box.Position = UDim2.new(0, Styles.Margin, 0, 0)
  5245.  
  5246. local function update()
  5247. local value = object[propertyName]
  5248. box.Text = ToString(value, propertyType)
  5249. end
  5250.  
  5251. if not readOnly then
  5252. box.FocusLost:connect(function(enterPressed)
  5253. Set(object, propertyData, ToValue(box.Text,propertyType))
  5254. update()
  5255. end)
  5256. end
  5257.  
  5258. update()
  5259.  
  5260. object.Changed:connect(function(property)
  5261. if (property == propertyName) then
  5262. update()
  5263. end
  5264. end)
  5265.  
  5266. return box
  5267. end
  5268.  
  5269. Controls["bool"] = function(object, propertyData, readOnly)
  5270. local propertyName = propertyData["Name"]
  5271. local checked = object[propertyName]
  5272.  
  5273. local checkbox, setValue = CreateCheckbox(checked, readOnly, function(value)
  5274. Set(object, propertyData, not checked)
  5275. end)
  5276. checkbox.Position = UDim2.new(0, Styles.Margin, 0, Styles.Margin)
  5277.  
  5278. setValue(checked)
  5279.  
  5280. local function update()
  5281. checked = object[propertyName]
  5282. setValue(checked)
  5283. end
  5284.  
  5285. object.Changed:connect(function(property)
  5286. if (property == propertyName) then
  5287. update()
  5288. end
  5289. end)
  5290.  
  5291. if object:IsA("BoolValue") then
  5292. object.Changed:connect(function(val)
  5293. update()
  5294. end)
  5295. end
  5296.  
  5297. update()
  5298.  
  5299. return checkbox
  5300. end
  5301.  
  5302. Controls["BrickColor"] = function(object, propertyData, readOnly)
  5303. local propertyName = propertyData["Name"]
  5304.  
  5305. local frame,label,brickColorBox = CreateBrickColor(readOnly, function(brickColor)
  5306. Set(object, propertyData, brickColor)
  5307. end)
  5308.  
  5309. local function update()
  5310. local value = object[propertyName]
  5311. brickColorBox.BackgroundColor3 = value.Color
  5312. label.Text = tostring(value)
  5313. end
  5314.  
  5315. update()
  5316.  
  5317. object.Changed:connect(function(property)
  5318. if (property == propertyName) then
  5319. update()
  5320. end
  5321. end)
  5322.  
  5323. return frame
  5324. end
  5325.  
  5326. Controls["Color3"] = function(object, propertyData, readOnly)
  5327. local propertyName = propertyData["Name"]
  5328.  
  5329. local frame,textBox,colorBox = CreateColor3Control(readOnly)
  5330.  
  5331. textBox.FocusLost:connect(function(enterPressed)
  5332. Set(object, propertyData, ToValue(textBox.Text,"Color3"))
  5333. local value = object[propertyName]
  5334. colorBox.BackgroundColor3 = value
  5335. textBox.Text = ToString(value, "Color3")
  5336. end)
  5337.  
  5338. local function update()
  5339. local value = object[propertyName]
  5340. colorBox.BackgroundColor3 = value
  5341. textBox.Text = ToString(value, "Color3")
  5342. end
  5343.  
  5344. update()
  5345.  
  5346. object.Changed:connect(function(property)
  5347. if (property == propertyName) then
  5348. update()
  5349. end
  5350. end)
  5351.  
  5352. return frame
  5353. end
  5354.  
  5355. Controls["Enum"] = function(object, propertyData, readOnly)
  5356. local propertyName = propertyData["Name"]
  5357. local propertyType = propertyData["ValueType"]
  5358.  
  5359. local enumName = object[propertyName].Name
  5360.  
  5361. local enumNames = {}
  5362. for _,enum in pairs(Enum[tostring(propertyType)]:GetEnumItems()) do
  5363. table.insert(enumNames, enum.Name)
  5364. end
  5365.  
  5366. local dropdown, propertyLabel = CreateDropDown(enumNames, enumName, readOnly, function(value)
  5367. Set(object, propertyData, value)
  5368. end)
  5369. --dropdown.Parent = frame
  5370.  
  5371. local function update()
  5372. local value = object[propertyName].Name
  5373. propertyLabel.Text = tostring(value)
  5374. end
  5375.  
  5376. update()
  5377.  
  5378. object.Changed:connect(function(property)
  5379. if (property == propertyName) then
  5380. update()
  5381. end
  5382. end)
  5383.  
  5384. return dropdown
  5385. end
  5386.  
  5387. Controls["Object"] = function(object, propertyData, readOnly)
  5388. local propertyName = propertyData["Name"]
  5389. local propertyType = propertyData["ValueType"]
  5390.  
  5391. local box = CreateObject(readOnly,function()end)
  5392. box.Size = UDim2.new(1, -2 * Styles.Margin, 1, 0)
  5393. box.Position = UDim2.new(0, Styles.Margin, 0, 0)
  5394.  
  5395. local function update()
  5396. if AwaitingObjectObj == object then
  5397. if AwaitingObjectValue == true then
  5398. box.Text = "Select an Object"
  5399. return
  5400. end
  5401. end
  5402. local value = object[propertyName]
  5403. box.Text = ToString(value, propertyType)
  5404. end
  5405.  
  5406. if not readOnly then
  5407. box.MouseButton1Click:connect(function()
  5408. if AwaitingObjectValue then
  5409. AwaitingObjectValue = false
  5410. update()
  5411. return
  5412. end
  5413. AwaitingObjectValue = true
  5414. AwaitingObjectObj = object
  5415. AwaitingObjectProp = propertyData
  5416. box.Text = "Select an Object"
  5417. end)
  5418.  
  5419. box.Cancel.Visible = true
  5420. box.Cancel.MouseButton1Click:connect(function()
  5421. object[propertyName] = nil
  5422. end)
  5423. end
  5424.  
  5425. update()
  5426.  
  5427. object.Changed:connect(function(property)
  5428. if (property == propertyName) then
  5429. update()
  5430. end
  5431. end)
  5432.  
  5433. if object:IsA("ObjectValue") then
  5434. object.Changed:connect(function(val)
  5435. update()
  5436. end)
  5437. end
  5438.  
  5439. return box
  5440. end
  5441.  
  5442. function GetControl(object, propertyData, readOnly)
  5443. local propertyType = propertyData["ValueType"]
  5444. local control = nil
  5445.  
  5446. if Controls[propertyType] then
  5447. control = Controls[propertyType](object, propertyData, readOnly)
  5448. elseif RbxApi.IsEnum(propertyType) then
  5449. control = Controls["Enum"](object, propertyData, readOnly)
  5450. else
  5451. control = Controls["default"](object, propertyData, readOnly)
  5452. end
  5453. return control
  5454. end
  5455. -- Permissions
  5456.  
  5457. function CanEditObject(object)
  5458. local player = Players.LocalPlayer
  5459. local character = player.Character
  5460. return Permissions.CanEdit
  5461. end
  5462.  
  5463. function CanEditProperty(object,propertyData)
  5464. local tags = propertyData["tags"]
  5465. for _,name in pairs(tags) do
  5466. if name == "readonly" then
  5467. return false
  5468. end
  5469. end
  5470. return CanEditObject(object)
  5471. end
  5472.  
  5473. --RbxApi
  5474. local function PropertyIsHidden(propertyData)
  5475. local tags = propertyData["tags"]
  5476. for _,name in pairs(tags) do
  5477. if name == "deprecated"
  5478. or name == "hidden"
  5479. or name == "writeonly" then
  5480. return true
  5481. end
  5482. end
  5483. return false
  5484. end
  5485.  
  5486. function Set(object, propertyData, value)
  5487. local propertyName = propertyData["Name"]
  5488. local propertyType = propertyData["ValueType"]
  5489.  
  5490. if value == nil then return end
  5491.  
  5492. for i,v in pairs(GetSelection()) do
  5493. if CanEditProperty(v,propertyData) then
  5494. pcall(function()
  5495. --print("Setting " .. propertyName .. " to " .. tostring(value))
  5496. v[propertyName] = value
  5497. end)
  5498. end
  5499. end
  5500. end
  5501.  
  5502. function CreateRow(object, propertyData, isAlternateRow)
  5503. local propertyName = propertyData["Name"]
  5504. local propertyType = propertyData["ValueType"]
  5505. local propertyValue = object[propertyName]
  5506. --rowValue, rowValueType, isAlternate
  5507. local backColor = Row.BackgroundColor;
  5508. if (isAlternateRow) then
  5509. backColor = Row.BackgroundColorAlternate
  5510. end
  5511.  
  5512. local readOnly = not CanEditProperty(object, propertyData)
  5513. if propertyType == "Instance" or propertyName == "Parent" then readOnly = true end
  5514.  
  5515. local rowFrame = Instance.new("Frame")
  5516. rowFrame.Size = UDim2.new(1,0,0,Row.Height)
  5517. rowFrame.BackgroundTransparency = 1
  5518. rowFrame.Name = 'Row'
  5519.  
  5520. local propertyLabelFrame = CreateCell()
  5521. propertyLabelFrame.Parent = rowFrame
  5522. propertyLabelFrame.ClipsDescendants = true
  5523.  
  5524. local propertyLabel = CreateLabel(readOnly)
  5525. propertyLabel.Text = propertyName
  5526. propertyLabel.Size = UDim2.new(1, -1 * Row.TitleMarginLeft, 1, 0)
  5527. propertyLabel.Position = UDim2.new(0, Row.TitleMarginLeft, 0, 0)
  5528. propertyLabel.Parent = propertyLabelFrame
  5529.  
  5530. local propertyValueFrame = CreateCell()
  5531. propertyValueFrame.Size = UDim2.new(0.5, -1, 1, 0)
  5532. propertyValueFrame.Position = UDim2.new(0.5, 0, 0, 0)
  5533. propertyValueFrame.Parent = rowFrame
  5534.  
  5535. local control = GetControl(object, propertyData, readOnly)
  5536. control.Parent = propertyValueFrame
  5537.  
  5538. rowFrame.MouseEnter:connect(function()
  5539. propertyLabelFrame.BackgroundColor3 = Row.BackgroundColorMouseover
  5540. propertyValueFrame.BackgroundColor3 = Row.BackgroundColorMouseover
  5541. end)
  5542. rowFrame.MouseLeave:connect(function()
  5543. propertyLabelFrame.BackgroundColor3 = backColor
  5544. propertyValueFrame.BackgroundColor3 = backColor
  5545. end)
  5546.  
  5547. propertyLabelFrame.BackgroundColor3 = backColor
  5548. propertyValueFrame.BackgroundColor3 = backColor
  5549.  
  5550. return rowFrame
  5551. end
  5552.  
  5553. function ClearPropertiesList()
  5554. for _,instance in pairs(ContentFrame:GetChildren()) do
  5555. instance:Destroy()
  5556. end
  5557. end
  5558.  
  5559. local selection = Gui:FindFirstChild("Selection", 1)
  5560. print(selection)
  5561.  
  5562. function displayProperties(props)
  5563. for i,v in pairs(props) do
  5564. pcall(function()
  5565. local a = CreateRow(v.object, v.propertyData, ((numRows % 2) == 0))
  5566. a.Position = UDim2.new(0,0,0,numRows*Row.Height)
  5567. a.Parent = ContentFrame
  5568. numRows = numRows + 1
  5569. end)
  5570. end
  5571. end
  5572.  
  5573. function checkForDupe(prop,props)
  5574. for i,v in pairs(props) do
  5575. if v.propertyData.Name == prop.Name and v.propertyData.ValueType == prop.ValueType then
  5576. return true
  5577. end
  5578. end
  5579. return false
  5580. end
  5581.  
  5582. function sortProps(t)
  5583. table.sort(t,
  5584. function(x,y) return x.propertyData.Name < y.propertyData.Name
  5585. end)
  5586. end
  5587.  
  5588. function showProperties(obj)
  5589. ClearPropertiesList()
  5590. if obj == nil then return end
  5591. local propHolder = {}
  5592. local foundProps = {}
  5593. numRows = 0
  5594. for _,nextObj in pairs(obj) do
  5595. if not foundProps[nextObj.className] then
  5596. foundProps[nextObj.className] = true
  5597. for i,v in pairs(RbxApi.GetProperties(nextObj.className)) do
  5598. local suc, err = pcall(function()
  5599. if not (PropertyIsHidden(v)) and not checkForDupe(v,propHolder) then
  5600. if string.find(string.lower(v.Name),string.lower(propertiesSearch.Text)) or not searchingProperties() then
  5601. table.insert(propHolder,{propertyData = v, object = nextObj})
  5602. end
  5603. end
  5604. end)
  5605. --[[if not suc then
  5606. warn("Problem getting the value of property " .. v.Name .. " | " .. err)
  5607. end --]]
  5608. end
  5609. end
  5610. end
  5611. sortProps(propHolder)
  5612. displayProperties(propHolder)
  5613. ContentFrame.Size = UDim2.new(1, 0, 0, numRows * Row.Height)
  5614. scrollBar.ScrollIndex = 0
  5615. scrollBar.TotalSpace = numRows * Row.Height
  5616. scrollBar.Update()
  5617. end
  5618.  
  5619. ----------------------------------------------------------------
  5620. -----------------------SCROLLBAR STUFF--------------------------
  5621. ----------------------------------------------------------------
  5622. ----------------------------------------------------------------
  5623. local ScrollBarWidth = 16
  5624.  
  5625. local ScrollStyles = {
  5626. Background = Color3.new(233/255, 233/255, 233/255);
  5627. Border = Color3.new(149/255, 149/255, 149/255);
  5628. Selected = Color3.new( 63/255, 119/255, 189/255);
  5629. BorderSelected = Color3.new( 55/255, 106/255, 167/255);
  5630. Text = Color3.new( 0/255, 0/255, 0/255);
  5631. TextDisabled = Color3.new(128/255, 128/255, 128/255);
  5632. TextSelected = Color3.new(255/255, 255/255, 255/255);
  5633. Button = Color3.new(221/255, 221/255, 221/255);
  5634. ButtonBorder = Color3.new(149/255, 149/255, 149/255);
  5635. ButtonSelected = Color3.new(255/255, 0/255, 0/255);
  5636. Field = Color3.new(255/255, 255/255, 255/255);
  5637. FieldBorder = Color3.new(191/255, 191/255, 191/255);
  5638. TitleBackground = Color3.new(178/255, 178/255, 178/255);
  5639. }
  5640. do
  5641. local ZIndexLock = {}
  5642. function SetZIndex(object,z)
  5643. if not ZIndexLock[object] then
  5644. ZIndexLock[object] = true
  5645. if object:IsA'GuiObject' then
  5646. object.ZIndex = z
  5647. end
  5648. local children = object:GetChildren()
  5649. for i = 1,#children do
  5650. SetZIndex(children[i],z)
  5651. end
  5652. ZIndexLock[object] = nil
  5653. end
  5654. end
  5655. end
  5656. function SetZIndexOnChanged(object)
  5657. return object.Changed:connect(function(p)
  5658. if p == "ZIndex" then
  5659. SetZIndex(object,object.ZIndex)
  5660. end
  5661. end)
  5662. end
  5663. function Create(ty,data)
  5664. local obj
  5665. if type(ty) == 'string' then
  5666. obj = Instance.new(ty)
  5667. else
  5668. obj = ty
  5669. end
  5670. for k, v in pairs(data) do
  5671. if type(k) == 'number' then
  5672. v.Parent = obj
  5673. else
  5674. obj[k] = v
  5675. end
  5676. end
  5677. return obj
  5678. end
  5679. -- returns the ascendant ScreenGui of an object
  5680. function GetScreen(screen)
  5681. if screen == nil then return nil end
  5682. while not screen:IsA("ScreenGui") do
  5683. screen = screen.Parent
  5684. if screen == nil then return nil end
  5685. end
  5686. return screen
  5687. end
  5688. -- AutoButtonColor doesn't always reset properly
  5689. function ResetButtonColor(button)
  5690. local active = button.Active
  5691. button.Active = not active
  5692. button.Active = active
  5693. end
  5694.  
  5695. function ArrowGraphic(size,dir,scaled,template)
  5696. local Frame = Create('Frame',{
  5697. Name = "Arrow Graphic";
  5698. BorderSizePixel = 0;
  5699. Size = UDim2.new(0,size,0,size);
  5700. Transparency = 1;
  5701. })
  5702. if not template then
  5703. template = Instance.new("Frame")
  5704. template.BorderSizePixel = 0
  5705. end
  5706.  
  5707. local transform
  5708. if dir == nil or dir == 'Up' then
  5709. function transform(p,s) return p,s end
  5710. elseif dir == 'Down' then
  5711. function transform(p,s) return UDim2.new(0,p.X.Offset,0,size-p.Y.Offset-1),s end
  5712. elseif dir == 'Left' then
  5713. 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
  5714. elseif dir == 'Right' then
  5715. 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
  5716. end
  5717.  
  5718. local scale
  5719. if scaled then
  5720. 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
  5721. else
  5722. function scale(p,s) return p,s end
  5723. end
  5724.  
  5725. local o = math.floor(size/4)
  5726. if size%2 == 0 then
  5727. local n = size/2-1
  5728. for i = 0,n do
  5729. local t = template:Clone()
  5730. local p,s = scale(transform(
  5731. UDim2.new(0,n-i,0,o+i),
  5732. UDim2.new(0,(i+1)*2,0,1)
  5733. ))
  5734. t.Position = p
  5735. t.Size = s
  5736. t.Parent = Frame
  5737. end
  5738. else
  5739. local n = (size-1)/2
  5740. for i = 0,n do
  5741. local t = template:Clone()
  5742. local p,s = scale(transform(
  5743. UDim2.new(0,n-i,0,o+i),
  5744. UDim2.new(0,i*2+1,0,1)
  5745. ))
  5746. t.Position = p
  5747. t.Size = s
  5748. t.Parent = Frame
  5749. end
  5750. end
  5751. if size%4 > 1 then
  5752. local t = template:Clone()
  5753. local p,s = scale(transform(
  5754. UDim2.new(0,0,0,size-o-1),
  5755. UDim2.new(0,size,0,1)
  5756. ))
  5757. t.Position = p
  5758. t.Size = s
  5759. t.Parent = Frame
  5760. end
  5761. return Frame
  5762. end
  5763.  
  5764. function GripGraphic(size,dir,spacing,scaled,template)
  5765. local Frame = Create('Frame',{
  5766. Name = "Grip Graphic";
  5767. BorderSizePixel = 0;
  5768. Size = UDim2.new(0,size.x,0,size.y);
  5769. Transparency = 1;
  5770. })
  5771. if not template then
  5772. template = Instance.new("Frame")
  5773. template.BorderSizePixel = 0
  5774. end
  5775.  
  5776. spacing = spacing or 2
  5777.  
  5778. local scale
  5779. if scaled then
  5780. function scale(p) return UDim2.new(p.X.Offset/size.x,0,p.Y.Offset/size.y,0) end
  5781. else
  5782. function scale(p) return p end
  5783. end
  5784.  
  5785. if dir == 'Vertical' then
  5786. for i=0,size.x-1,spacing do
  5787. local t = template:Clone()
  5788. t.Size = scale(UDim2.new(0,1,0,size.y))
  5789. t.Position = scale(UDim2.new(0,i,0,0))
  5790. t.Parent = Frame
  5791. end
  5792. elseif dir == nil or dir == 'Horizontal' then
  5793. for i=0,size.y-1,spacing do
  5794. local t = template:Clone()
  5795. t.Size = scale(UDim2.new(0,size.x,0,1))
  5796. t.Position = scale(UDim2.new(0,0,0,i))
  5797. t.Parent = Frame
  5798. end
  5799. end
  5800.  
  5801. return Frame
  5802. end
  5803.  
  5804. do
  5805. local mt = {
  5806. __index = {
  5807. GetScrollPercent = function(self)
  5808. return self.ScrollIndex/(self.TotalSpace-self.VisibleSpace)
  5809. end;
  5810. CanScrollDown = function(self)
  5811. return self.ScrollIndex + self.VisibleSpace < self.TotalSpace
  5812. end;
  5813. CanScrollUp = function(self)
  5814. return self.ScrollIndex > 0
  5815. end;
  5816. ScrollDown = function(self)
  5817. self.ScrollIndex = self.ScrollIndex + self.PageIncrement
  5818. self:Update()
  5819. end;
  5820. ScrollUp = function(self)
  5821. self.ScrollIndex = self.ScrollIndex - self.PageIncrement
  5822. self:Update()
  5823. end;
  5824. ScrollTo = function(self,index)
  5825. self.ScrollIndex = index
  5826. self:Update()
  5827. end;
  5828. SetScrollPercent = function(self,percent)
  5829. self.ScrollIndex = math.floor((self.TotalSpace - self.VisibleSpace)*percent + 0.5)
  5830. self:Update()
  5831. end;
  5832. };
  5833. }
  5834. mt.__index.CanScrollRight = mt.__index.CanScrollDown
  5835. mt.__index.CanScrollLeft = mt.__index.CanScrollUp
  5836. mt.__index.ScrollLeft = mt.__index.ScrollUp
  5837. mt.__index.ScrollRight = mt.__index.ScrollDown
  5838.  
  5839. function ScrollBar(horizontal)
  5840. -- create row scroll bar
  5841. local ScrollFrame = Create('Frame',{
  5842. Name = "ScrollFrame";
  5843. Position = horizontal and UDim2.new(0,0,1,-ScrollBarWidth) or UDim2.new(1,-ScrollBarWidth,0,0);
  5844. Size = horizontal and UDim2.new(1,0,0,ScrollBarWidth) or UDim2.new(0,ScrollBarWidth,1,0);
  5845. BackgroundTransparency = 1;
  5846. Create('ImageButton',{
  5847. Name = "ScrollDown";
  5848. Position = horizontal and UDim2.new(1,-ScrollBarWidth,0,0) or UDim2.new(0,0,1,-ScrollBarWidth);
  5849. Size = UDim2.new(0, ScrollBarWidth, 0, ScrollBarWidth);
  5850. BackgroundColor3 = ScrollStyles.Button;
  5851. BorderColor3 = ScrollStyles.Border;
  5852. --BorderSizePixel = 0;
  5853. });
  5854. Create('ImageButton',{
  5855. Name = "ScrollUp";
  5856. Size = UDim2.new(0, ScrollBarWidth, 0, ScrollBarWidth);
  5857. BackgroundColor3 = ScrollStyles.Button;
  5858. BorderColor3 = ScrollStyles.Border;
  5859. --BorderSizePixel = 0;
  5860. });
  5861. Create('ImageButton',{
  5862. Name = "ScrollBar";
  5863. Size = horizontal and UDim2.new(1,-ScrollBarWidth*2,1,0) or UDim2.new(1,0,1,-ScrollBarWidth*2);
  5864. Position = horizontal and UDim2.new(0,ScrollBarWidth,0,0) or UDim2.new(0,0,0,ScrollBarWidth);
  5865. AutoButtonColor = false;
  5866. BackgroundColor3 = Color3.new(0.94902, 0.94902, 0.94902);
  5867. BorderColor3 = ScrollStyles.Border;
  5868. --BorderSizePixel = 0;
  5869. Create('ImageButton',{
  5870. Name = "ScrollThumb";
  5871. AutoButtonColor = false;
  5872. Size = UDim2.new(0, ScrollBarWidth, 0, ScrollBarWidth);
  5873. BackgroundColor3 = ScrollStyles.Button;
  5874. BorderColor3 = ScrollStyles.Border;
  5875. --BorderSizePixel = 0;
  5876. });
  5877. });
  5878. })
  5879.  
  5880. local graphicTemplate = Create('Frame',{
  5881. Name="Graphic";
  5882. BorderSizePixel = 0;
  5883. BackgroundColor3 = ScrollStyles.Border;
  5884. })
  5885. local graphicSize = ScrollBarWidth/2
  5886.  
  5887. local ScrollDownFrame = ScrollFrame.ScrollDown
  5888. local ScrollDownGraphic = ArrowGraphic(graphicSize,horizontal and 'Right' or 'Down',true,graphicTemplate)
  5889. ScrollDownGraphic.Position = UDim2.new(0.5,-graphicSize/2,0.5,-graphicSize/2)
  5890. ScrollDownGraphic.Parent = ScrollDownFrame
  5891. local ScrollUpFrame = ScrollFrame.ScrollUp
  5892. local ScrollUpGraphic = ArrowGraphic(graphicSize,horizontal and 'Left' or 'Up',true,graphicTemplate)
  5893. ScrollUpGraphic.Position = UDim2.new(0.5,-graphicSize/2,0.5,-graphicSize/2)
  5894. ScrollUpGraphic.Parent = ScrollUpFrame
  5895. local ScrollBarFrame = ScrollFrame.ScrollBar
  5896. local ScrollThumbFrame = ScrollBarFrame.ScrollThumb
  5897. do
  5898. local size = ScrollBarWidth*3/8
  5899. local Decal = GripGraphic(Vector2.new(size,size),horizontal and 'Vertical' or 'Horizontal',2,graphicTemplate)
  5900. Decal.Position = UDim2.new(0.5,-size/2,0.5,-size/2)
  5901. Decal.Parent = ScrollThumbFrame
  5902. end
  5903.  
  5904. local MouseDrag = Create('ImageButton',{
  5905. Name = "MouseDrag";
  5906. Position = UDim2.new(-0.25,0,-0.25,0);
  5907. Size = UDim2.new(1.5,0,1.5,0);
  5908. Transparency = 1;
  5909. AutoButtonColor = false;
  5910. Active = true;
  5911. ZIndex = 10;
  5912. })
  5913.  
  5914. local Class = setmetatable({
  5915. GUI = ScrollFrame;
  5916. ScrollIndex = 0;
  5917. VisibleSpace = 0;
  5918. TotalSpace = 0;
  5919. PageIncrement = 1;
  5920. },mt)
  5921.  
  5922. local UpdateScrollThumb
  5923. if horizontal then
  5924. function UpdateScrollThumb()
  5925. ScrollThumbFrame.Size = UDim2.new(Class.VisibleSpace/Class.TotalSpace,0,0,ScrollBarWidth)
  5926. if ScrollThumbFrame.AbsoluteSize.x < ScrollBarWidth then
  5927. ScrollThumbFrame.Size = UDim2.new(0,ScrollBarWidth,0,ScrollBarWidth)
  5928. end
  5929. local barSize = ScrollBarFrame.AbsoluteSize.x
  5930. ScrollThumbFrame.Position = UDim2.new(Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.x)/barSize,0,0,0)
  5931. end
  5932. else
  5933. function UpdateScrollThumb()
  5934. ScrollThumbFrame.Size = UDim2.new(0,ScrollBarWidth,Class.VisibleSpace/Class.TotalSpace,0)
  5935. if ScrollThumbFrame.AbsoluteSize.y < ScrollBarWidth then
  5936. ScrollThumbFrame.Size = UDim2.new(0,ScrollBarWidth,0,ScrollBarWidth)
  5937. end
  5938. local barSize = ScrollBarFrame.AbsoluteSize.y
  5939. ScrollThumbFrame.Position = UDim2.new(0,0,Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.y)/barSize,0)
  5940. end
  5941. end
  5942.  
  5943. local lastDown
  5944. local lastUp
  5945. local scrollStyle = {BackgroundColor3=ScrollStyles.Border,BackgroundTransparency=0}
  5946. local scrollStyle_ds = {BackgroundColor3=ScrollStyles.Border,BackgroundTransparency=0.7}
  5947.  
  5948. local function Update()
  5949. local t = Class.TotalSpace
  5950. local v = Class.VisibleSpace
  5951. local s = Class.ScrollIndex
  5952. if v <= t then
  5953. if s > 0 then
  5954. if s + v > t then
  5955. Class.ScrollIndex = t - v
  5956. end
  5957. else
  5958. Class.ScrollIndex = 0
  5959. end
  5960. else
  5961. Class.ScrollIndex = 0
  5962. end
  5963.  
  5964. if Class.UpdateCallback then
  5965. if Class.UpdateCallback(Class) == false then
  5966. return
  5967. end
  5968. end
  5969.  
  5970. local down = Class:CanScrollDown()
  5971. local up = Class:CanScrollUp()
  5972. if down ~= lastDown then
  5973. lastDown = down
  5974. ScrollDownFrame.Active = down
  5975. ScrollDownFrame.AutoButtonColor = down
  5976. local children = ScrollDownGraphic:GetChildren()
  5977. local style = down and scrollStyle or scrollStyle_ds
  5978. for i = 1,#children do
  5979. Create(children[i],style)
  5980. end
  5981. end
  5982. if up ~= lastUp then
  5983. lastUp = up
  5984. ScrollUpFrame.Active = up
  5985. ScrollUpFrame.AutoButtonColor = up
  5986. local children = ScrollUpGraphic:GetChildren()
  5987. local style = up and scrollStyle or scrollStyle_ds
  5988. for i = 1,#children do
  5989. Create(children[i],style)
  5990. end
  5991. end
  5992. ScrollThumbFrame.Visible = down or up
  5993. UpdateScrollThumb()
  5994. end
  5995. Class.Update = Update
  5996.  
  5997. SetZIndexOnChanged(ScrollFrame)
  5998.  
  5999. local scrollEventID = 0
  6000. ScrollDownFrame.MouseButton1Down:connect(function()
  6001. scrollEventID = tick()
  6002. local current = scrollEventID
  6003. local up_con
  6004. up_con = MouseDrag.MouseButton1Up:connect(function()
  6005. scrollEventID = tick()
  6006. MouseDrag.Parent = nil
  6007. ResetButtonColor(ScrollDownFrame)
  6008. up_con:disconnect(); drag = nil
  6009. end)
  6010. MouseDrag.Parent = GetScreen(ScrollFrame)
  6011. Class:ScrollDown()
  6012. wait(0.2) -- delay before auto scroll
  6013. while scrollEventID == current do
  6014. Class:ScrollDown()
  6015. if not Class:CanScrollDown() then break end
  6016. wait()
  6017. end
  6018. end)
  6019.  
  6020. ScrollDownFrame.MouseButton1Up:connect(function()
  6021. scrollEventID = tick()
  6022. end)
  6023.  
  6024. ScrollUpFrame.MouseButton1Down:connect(function()
  6025. scrollEventID = tick()
  6026. local current = scrollEventID
  6027. local up_con
  6028. up_con = MouseDrag.MouseButton1Up:connect(function()
  6029. scrollEventID = tick()
  6030. MouseDrag.Parent = nil
  6031. ResetButtonColor(ScrollUpFrame)
  6032. up_con:disconnect(); drag = nil
  6033. end)
  6034. MouseDrag.Parent = GetScreen(ScrollFrame)
  6035. Class:ScrollUp()
  6036. wait(0.2)
  6037. while scrollEventID == current do
  6038. Class:ScrollUp()
  6039. if not Class:CanScrollUp() then break end
  6040. wait()
  6041. end
  6042. end)
  6043.  
  6044. ScrollUpFrame.MouseButton1Up:connect(function()
  6045. scrollEventID = tick()
  6046. end)
  6047.  
  6048. if horizontal then
  6049. ScrollBarFrame.MouseButton1Down:connect(function(x,y)
  6050. scrollEventID = tick()
  6051. local current = scrollEventID
  6052. local up_con
  6053. up_con = MouseDrag.MouseButton1Up:connect(function()
  6054. scrollEventID = tick()
  6055. MouseDrag.Parent = nil
  6056. ResetButtonColor(ScrollUpFrame)
  6057. up_con:disconnect(); drag = nil
  6058. end)
  6059. MouseDrag.Parent = GetScreen(ScrollFrame)
  6060. if x > ScrollThumbFrame.AbsolutePosition.x then
  6061. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  6062. wait(0.2)
  6063. while scrollEventID == current do
  6064. if x < ScrollThumbFrame.AbsolutePosition.x + ScrollThumbFrame.AbsoluteSize.x then break end
  6065. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  6066. wait()
  6067. end
  6068. else
  6069. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  6070. wait(0.2)
  6071. while scrollEventID == current do
  6072. if x > ScrollThumbFrame.AbsolutePosition.x then break end
  6073. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  6074. wait()
  6075. end
  6076. end
  6077. end)
  6078. else
  6079. ScrollBarFrame.MouseButton1Down:connect(function(x,y)
  6080. scrollEventID = tick()
  6081. local current = scrollEventID
  6082. local up_con
  6083. up_con = MouseDrag.MouseButton1Up:connect(function()
  6084. scrollEventID = tick()
  6085. MouseDrag.Parent = nil
  6086. ResetButtonColor(ScrollUpFrame)
  6087. up_con:disconnect(); drag = nil
  6088. end)
  6089. MouseDrag.Parent = GetScreen(ScrollFrame)
  6090. if y > ScrollThumbFrame.AbsolutePosition.y then
  6091. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  6092. wait(0.2)
  6093. while scrollEventID == current do
  6094. if y < ScrollThumbFrame.AbsolutePosition.y + ScrollThumbFrame.AbsoluteSize.y then break end
  6095. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  6096. wait()
  6097. end
  6098. else
  6099. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  6100. wait(0.2)
  6101. while scrollEventID == current do
  6102. if y > ScrollThumbFrame.AbsolutePosition.y then break end
  6103. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  6104. wait()
  6105. end
  6106. end
  6107. end)
  6108. end
  6109.  
  6110. if horizontal then
  6111. ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
  6112. scrollEventID = tick()
  6113. local mouse_offset = x - ScrollThumbFrame.AbsolutePosition.x
  6114. local drag_con
  6115. local up_con
  6116. drag_con = MouseDrag.MouseMoved:connect(function(x,y)
  6117. local bar_abs_pos = ScrollBarFrame.AbsolutePosition.x
  6118. local bar_drag = ScrollBarFrame.AbsoluteSize.x - ScrollThumbFrame.AbsoluteSize.x
  6119. local bar_abs_one = bar_abs_pos + bar_drag
  6120. x = x - mouse_offset
  6121. x = x < bar_abs_pos and bar_abs_pos or x > bar_abs_one and bar_abs_one or x
  6122. x = x - bar_abs_pos
  6123. Class:SetScrollPercent(x/(bar_drag))
  6124. end)
  6125. up_con = MouseDrag.MouseButton1Up:connect(function()
  6126. scrollEventID = tick()
  6127. MouseDrag.Parent = nil
  6128. ResetButtonColor(ScrollThumbFrame)
  6129. drag_con:disconnect(); drag_con = nil
  6130. up_con:disconnect(); drag = nil
  6131. end)
  6132. MouseDrag.Parent = GetScreen(ScrollFrame)
  6133. end)
  6134. else
  6135. ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
  6136. scrollEventID = tick()
  6137. local mouse_offset = y - ScrollThumbFrame.AbsolutePosition.y
  6138. local drag_con
  6139. local up_con
  6140. drag_con = MouseDrag.MouseMoved:connect(function(x,y)
  6141. local bar_abs_pos = ScrollBarFrame.AbsolutePosition.y
  6142. local bar_drag = ScrollBarFrame.AbsoluteSize.y - ScrollThumbFrame.AbsoluteSize.y
  6143. local bar_abs_one = bar_abs_pos + bar_drag
  6144. y = y - mouse_offset
  6145. y = y < bar_abs_pos and bar_abs_pos or y > bar_abs_one and bar_abs_one or y
  6146. y = y - bar_abs_pos
  6147. Class:SetScrollPercent(y/(bar_drag))
  6148. end)
  6149. up_con = MouseDrag.MouseButton1Up:connect(function()
  6150. scrollEventID = tick()
  6151. MouseDrag.Parent = nil
  6152. ResetButtonColor(ScrollThumbFrame)
  6153. drag_con:disconnect(); drag_con = nil
  6154. up_con:disconnect(); drag = nil
  6155. end)
  6156. MouseDrag.Parent = GetScreen(ScrollFrame)
  6157. end)
  6158. end
  6159.  
  6160. function Class:Destroy()
  6161. ScrollFrame:Destroy()
  6162. MouseDrag:Destroy()
  6163. for k in pairs(Class) do
  6164. Class[k] = nil
  6165. end
  6166. setmetatable(Class,nil)
  6167. end
  6168.  
  6169. Update()
  6170.  
  6171. return Class
  6172. end
  6173. end
  6174.  
  6175. ----------------------------------------------------------------
  6176. ----------------------------------------------------------------
  6177. ----------------------------------------------------------------
  6178. ----------------------------------------------------------------
  6179.  
  6180. local MainFrame = Instance.new("Frame")
  6181. MainFrame.Name = "MainFrame"
  6182. MainFrame.Size = UDim2.new(1, -1 * ScrollBarWidth, 1, 0)
  6183. MainFrame.Position = UDim2.new(0, 0, 0, 0)
  6184. MainFrame.BackgroundTransparency = 1
  6185. MainFrame.ClipsDescendants = true
  6186. MainFrame.Parent = PropertiesFrame
  6187.  
  6188. ContentFrame = Instance.new("Frame")
  6189. ContentFrame.Name = "ContentFrame"
  6190. ContentFrame.Size = UDim2.new(1, 0, 0, 0)
  6191. ContentFrame.BackgroundTransparency = 1
  6192. ContentFrame.Parent = MainFrame
  6193.  
  6194. scrollBar = ScrollBar(false)
  6195. scrollBar.PageIncrement = 1
  6196. Create(scrollBar.GUI,{
  6197. Position = UDim2.new(1,-ScrollBarWidth,0,0);
  6198. Size = UDim2.new(0,ScrollBarWidth,1,0);
  6199. Parent = PropertiesFrame;
  6200. })
  6201.  
  6202. scrollBarH = ScrollBar(true)
  6203. scrollBarH.PageIncrement = ScrollBarWidth
  6204. Create(scrollBarH.GUI,{
  6205. Position = UDim2.new(0,0,1,-ScrollBarWidth);
  6206. Size = UDim2.new(1,-ScrollBarWidth,0,ScrollBarWidth);
  6207. Visible = false;
  6208. Parent = PropertiesFrame;
  6209. })
  6210.  
  6211. do
  6212. local listEntries = {}
  6213. local nameConnLookup = {}
  6214.  
  6215. function scrollBar.UpdateCallback(self)
  6216. scrollBar.TotalSpace = ContentFrame.AbsoluteSize.Y
  6217. scrollBar.VisibleSpace = MainFrame.AbsoluteSize.Y
  6218. ContentFrame.Position = UDim2.new(ContentFrame.Position.X.Scale,ContentFrame.Position.X.Offset,0,-1*scrollBar.ScrollIndex)
  6219. end
  6220.  
  6221. function scrollBarH.UpdateCallback(self)
  6222.  
  6223. end
  6224.  
  6225. MainFrame.Changed:connect(function(p)
  6226. if p == 'AbsoluteSize' then
  6227. scrollBarH.VisibleSpace = math.ceil(MainFrame.AbsoluteSize.x)
  6228. scrollBarH:Update()
  6229. scrollBar.VisibleSpace = math.ceil(MainFrame.AbsoluteSize.y)
  6230. scrollBar:Update()
  6231. end
  6232. end)
  6233.  
  6234. local wheelAmount = Row.Height
  6235. PropertiesFrame.MouseWheelForward:connect(function()
  6236. if scrollBar.VisibleSpace - 1 > wheelAmount then
  6237. scrollBar:ScrollTo(scrollBar.ScrollIndex - wheelAmount)
  6238. else
  6239. scrollBar:ScrollTo(scrollBar.ScrollIndex - scrollBar.VisibleSpace)
  6240. end
  6241. end)
  6242. PropertiesFrame.MouseWheelBackward:connect(function()
  6243. if scrollBar.VisibleSpace - 1 > wheelAmount then
  6244. scrollBar:ScrollTo(scrollBar.ScrollIndex + wheelAmount)
  6245. else
  6246. scrollBar:ScrollTo(scrollBar.ScrollIndex + scrollBar.VisibleSpace)
  6247. end
  6248. end)
  6249. end
  6250.  
  6251. scrollBar.VisibleSpace = math.ceil(MainFrame.AbsoluteSize.y)
  6252. scrollBar:Update()
  6253.  
  6254. showProperties(GetSelection())
  6255.  
  6256. bindSelectionChanged.Event:connect(function()
  6257. showProperties(GetSelection())
  6258. end)
  6259.  
  6260. bindSetAwait.Event:connect(function(obj)
  6261. if AwaitingObjectValue then
  6262. AwaitingObjectValue = false
  6263. local mySel = obj
  6264. if mySel then
  6265. pcall(function()
  6266. Set(AwaitingObjectObj, AwaitingObjectProp, mySel)
  6267. end)
  6268. end
  6269. end
  6270. end)
  6271.  
  6272. propertiesSearch.Changed:connect(function(prop)
  6273. if prop == "Text" then
  6274. showProperties(GetSelection())
  6275. end
  6276. end)
  6277.  
  6278. bindGetApi.OnInvoke = function()
  6279. return RbxApi
  6280. end
  6281.  
  6282. bindGetAwait.OnInvoke = function()
  6283. return AwaitingObjectValue
  6284. end
  6285. end)
  6286.  
  6287. spawn(function()
  6288. local top = D_E_X.ScriptEditor
  6289.  
  6290. local editorGrid = top:WaitForChild("EditorGrid")
  6291.  
  6292. local currentSource = ""
  6293.  
  6294. local currentEditor = {
  6295. x = 0,
  6296. y = 0
  6297. }
  6298.  
  6299. local userInput = game:GetService("UserInputService")
  6300. local mouse = game.Players.LocalPlayer:GetMouse()
  6301.  
  6302. local topBar = top:WaitForChild("TopBar")
  6303. local scriptBar = topBar:WaitForChild("ScriptBar")
  6304. local scriptBarLeft = topBar:WaitForChild("ScriptBarLeft")
  6305. local scriptBarRight = topBar:WaitForChild("ScriptBarRight")
  6306. local clipboardButton = topBar:WaitForChild("Clipboard")
  6307.  
  6308. local entryTemplate = topBar:WaitForChild("Entry")
  6309.  
  6310. local openEvent = top:WaitForChild("OpenScript")
  6311.  
  6312. local closeButton = top:WaitForChild("Close")
  6313.  
  6314. local memoryScripts = {}
  6315.  
  6316. local editingIndex = 0
  6317.  
  6318. -- Scrollbar
  6319.  
  6320. local ScrollBarWidth = 16
  6321.  
  6322. local ScrollStyles = {
  6323. Background = Color3.new(233/255, 233/255, 233/255);
  6324. Border = Color3.new(149/255, 149/255, 149/255);
  6325. Selected = Color3.new( 63/255, 119/255, 189/255);
  6326. BorderSelected = Color3.new( 55/255, 106/255, 167/255);
  6327. Text = Color3.new( 0/255, 0/255, 0/255);
  6328. TextDisabled = Color3.new(128/255, 128/255, 128/255);
  6329. TextSelected = Color3.new(255/255, 255/255, 255/255);
  6330. Button = Color3.new(221/255, 221/255, 221/255);
  6331. ButtonBorder = Color3.new(149/255, 149/255, 149/255);
  6332. ButtonSelected = Color3.new(255/255, 0/255, 0/255);
  6333. Field = Color3.new(255/255, 255/255, 255/255);
  6334. FieldBorder = Color3.new(191/255, 191/255, 191/255);
  6335. TitleBackground = Color3.new(178/255, 178/255, 178/255);
  6336. }
  6337. do
  6338. local ZIndexLock = {}
  6339. function SetZIndex(object,z)
  6340. if not ZIndexLock[object] then
  6341. ZIndexLock[object] = true
  6342. if object:IsA'GuiObject' then
  6343. object.ZIndex = z
  6344. end
  6345. local children = object:GetChildren()
  6346. for i = 1,#children do
  6347. SetZIndex(children[i],z)
  6348. end
  6349. ZIndexLock[object] = nil
  6350. end
  6351. end
  6352. end
  6353. function SetZIndexOnChanged(object)
  6354. return object.Changed:connect(function(p)
  6355. if p == "ZIndex" then
  6356. SetZIndex(object,object.ZIndex)
  6357. end
  6358. end)
  6359. end
  6360. function Create(ty,data)
  6361. local obj
  6362. if type(ty) == 'string' then
  6363. obj = Instance.new(ty)
  6364. else
  6365. obj = ty
  6366. end
  6367. for k, v in pairs(data) do
  6368. if type(k) == 'number' then
  6369. v.Parent = obj
  6370. else
  6371. obj[k] = v
  6372. end
  6373. end
  6374. return obj
  6375. end
  6376. -- returns the ascendant ScreenGui of an object
  6377. function GetScreen(screen)
  6378. if screen == nil then return nil end
  6379. while not screen:IsA("ScreenGui") do
  6380. screen = screen.Parent
  6381. if screen == nil then return nil end
  6382. end
  6383. return screen
  6384. end
  6385. -- AutoButtonColor doesn't always reset properly
  6386. function ResetButtonColor(button)
  6387. local active = button.Active
  6388. button.Active = not active
  6389. button.Active = active
  6390. end
  6391.  
  6392. function ArrowGraphic(size,dir,scaled,template)
  6393. local Frame = Create('Frame',{
  6394. Name = "Arrow Graphic";
  6395. BorderSizePixel = 0;
  6396. Size = UDim2.new(0,size,0,size);
  6397. Transparency = 1;
  6398. })
  6399. if not template then
  6400. template = Instance.new("Frame")
  6401. template.BorderSizePixel = 0
  6402. end
  6403.  
  6404. local transform
  6405. if dir == nil or dir == 'Up' then
  6406. function transform(p,s) return p,s end
  6407. elseif dir == 'Down' then
  6408. function transform(p,s) return UDim2.new(0,p.X.Offset,0,size-p.Y.Offset-1),s end
  6409. elseif dir == 'Left' then
  6410. 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
  6411. elseif dir == 'Right' then
  6412. 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
  6413. end
  6414.  
  6415. local scale
  6416. if scaled then
  6417. 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
  6418. else
  6419. function scale(p,s) return p,s end
  6420. end
  6421.  
  6422. local o = math.floor(size/4)
  6423. if size%2 == 0 then
  6424. local n = size/2-1
  6425. for i = 0,n do
  6426. local t = template:Clone()
  6427. local p,s = scale(transform(
  6428. UDim2.new(0,n-i,0,o+i),
  6429. UDim2.new(0,(i+1)*2,0,1)
  6430. ))
  6431. t.Position = p
  6432. t.Size = s
  6433. t.Parent = Frame
  6434. end
  6435. else
  6436. local n = (size-1)/2
  6437. for i = 0,n do
  6438. local t = template:Clone()
  6439. local p,s = scale(transform(
  6440. UDim2.new(0,n-i,0,o+i),
  6441. UDim2.new(0,i*2+1,0,1)
  6442. ))
  6443. t.Position = p
  6444. t.Size = s
  6445. t.Parent = Frame
  6446. end
  6447. end
  6448. if size%4 > 1 then
  6449. local t = template:Clone()
  6450. local p,s = scale(transform(
  6451. UDim2.new(0,0,0,size-o-1),
  6452. UDim2.new(0,size,0,1)
  6453. ))
  6454. t.Position = p
  6455. t.Size = s
  6456. t.Parent = Frame
  6457. end
  6458. return Frame
  6459. end
  6460.  
  6461. function GripGraphic(size,dir,spacing,scaled,template)
  6462. local Frame = Create('Frame',{
  6463. Name = "Grip Graphic";
  6464. BorderSizePixel = 0;
  6465. Size = UDim2.new(0,size.x,0,size.y);
  6466. Transparency = 1;
  6467. })
  6468. if not template then
  6469. template = Instance.new("Frame")
  6470. template.BorderSizePixel = 0
  6471. end
  6472.  
  6473. spacing = spacing or 2
  6474.  
  6475. local scale
  6476. if scaled then
  6477. function scale(p) return UDim2.new(p.X.Offset/size.x,0,p.Y.Offset/size.y,0) end
  6478. else
  6479. function scale(p) return p end
  6480. end
  6481.  
  6482. if dir == 'Vertical' then
  6483. for i=0,size.x-1,spacing do
  6484. local t = template:Clone()
  6485. t.Size = scale(UDim2.new(0,1,0,size.y))
  6486. t.Position = scale(UDim2.new(0,i,0,0))
  6487. t.Parent = Frame
  6488. end
  6489. elseif dir == nil or dir == 'Horizontal' then
  6490. for i=0,size.y-1,spacing do
  6491. local t = template:Clone()
  6492. t.Size = scale(UDim2.new(0,size.x,0,1))
  6493. t.Position = scale(UDim2.new(0,0,0,i))
  6494. t.Parent = Frame
  6495. end
  6496. end
  6497.  
  6498. return Frame
  6499. end
  6500.  
  6501. do
  6502. local mt = {
  6503. __index = {
  6504. GetScrollPercent = function(self)
  6505. return self.ScrollIndex/(self.TotalSpace-self.VisibleSpace)
  6506. end;
  6507. CanScrollDown = function(self)
  6508. return self.ScrollIndex + self.VisibleSpace < self.TotalSpace
  6509. end;
  6510. CanScrollUp = function(self)
  6511. return self.ScrollIndex > 0
  6512. end;
  6513. ScrollDown = function(self)
  6514. self.ScrollIndex = self.ScrollIndex + self.PageIncrement
  6515. self:Update()
  6516. end;
  6517. ScrollUp = function(self)
  6518. self.ScrollIndex = self.ScrollIndex - self.PageIncrement
  6519. self:Update()
  6520. end;
  6521. ScrollTo = function(self,index)
  6522. self.ScrollIndex = index
  6523. self:Update()
  6524. end;
  6525. SetScrollPercent = function(self,percent)
  6526. self.ScrollIndex = math.floor((self.TotalSpace - self.VisibleSpace)*percent + 0.5)
  6527. self:Update()
  6528. end;
  6529. };
  6530. }
  6531. mt.__index.CanScrollRight = mt.__index.CanScrollDown
  6532. mt.__index.CanScrollLeft = mt.__index.CanScrollUp
  6533. mt.__index.ScrollLeft = mt.__index.ScrollUp
  6534. mt.__index.ScrollRight = mt.__index.ScrollDown
  6535.  
  6536. function ScrollBar(horizontal)
  6537. -- create row scroll bar
  6538. local ScrollFrame = Create('Frame',{
  6539. Name = "ScrollFrame";
  6540. Position = horizontal and UDim2.new(0,0,1,-ScrollBarWidth) or UDim2.new(1,-ScrollBarWidth,0,0);
  6541. Size = horizontal and UDim2.new(1,0,0,ScrollBarWidth) or UDim2.new(0,ScrollBarWidth,1,0);
  6542. BackgroundTransparency = 1;
  6543. Create('ImageButton',{
  6544. Name = "ScrollDown";
  6545. Position = horizontal and UDim2.new(1,-ScrollBarWidth,0,0) or UDim2.new(0,0,1,-ScrollBarWidth);
  6546. Size = UDim2.new(0, ScrollBarWidth, 0, ScrollBarWidth);
  6547. BackgroundColor3 = ScrollStyles.Button;
  6548. BorderColor3 = ScrollStyles.Border;
  6549. --BorderSizePixel = 0;
  6550. });
  6551. Create('ImageButton',{
  6552. Name = "ScrollUp";
  6553. Size = UDim2.new(0, ScrollBarWidth, 0, ScrollBarWidth);
  6554. BackgroundColor3 = ScrollStyles.Button;
  6555. BorderColor3 = ScrollStyles.Border;
  6556. --BorderSizePixel = 0;
  6557. });
  6558. Create('ImageButton',{
  6559. Name = "ScrollBar";
  6560. Size = horizontal and UDim2.new(1,-ScrollBarWidth*2,1,0) or UDim2.new(1,0,1,-ScrollBarWidth*2);
  6561. Position = horizontal and UDim2.new(0,ScrollBarWidth,0,0) or UDim2.new(0,0,0,ScrollBarWidth);
  6562. AutoButtonColor = false;
  6563. BackgroundColor3 = Color3.new(0.94902, 0.94902, 0.94902);
  6564. BorderColor3 = ScrollStyles.Border;
  6565. --BorderSizePixel = 0;
  6566. Create('ImageButton',{
  6567. Name = "ScrollThumb";
  6568. AutoButtonColor = false;
  6569. Size = UDim2.new(0, ScrollBarWidth, 0, ScrollBarWidth);
  6570. BackgroundColor3 = ScrollStyles.Button;
  6571. BorderColor3 = ScrollStyles.Border;
  6572. --BorderSizePixel = 0;
  6573. });
  6574. });
  6575. })
  6576.  
  6577. local graphicTemplate = Create('Frame',{
  6578. Name="Graphic";
  6579. BorderSizePixel = 0;
  6580. BackgroundColor3 = ScrollStyles.Border;
  6581. })
  6582. local graphicSize = ScrollBarWidth/2
  6583.  
  6584. local ScrollDownFrame = ScrollFrame.ScrollDown
  6585. local ScrollDownGraphic = ArrowGraphic(graphicSize,horizontal and 'Right' or 'Down',true,graphicTemplate)
  6586. ScrollDownGraphic.Position = UDim2.new(0.5,-graphicSize/2,0.5,-graphicSize/2)
  6587. ScrollDownGraphic.Parent = ScrollDownFrame
  6588. local ScrollUpFrame = ScrollFrame.ScrollUp
  6589. local ScrollUpGraphic = ArrowGraphic(graphicSize,horizontal and 'Left' or 'Up',true,graphicTemplate)
  6590. ScrollUpGraphic.Position = UDim2.new(0.5,-graphicSize/2,0.5,-graphicSize/2)
  6591. ScrollUpGraphic.Parent = ScrollUpFrame
  6592. local ScrollBarFrame = ScrollFrame.ScrollBar
  6593. local ScrollThumbFrame = ScrollBarFrame.ScrollThumb
  6594. do
  6595. local size = ScrollBarWidth*3/8
  6596. local Decal = GripGraphic(Vector2.new(size,size),horizontal and 'Vertical' or 'Horizontal',2,graphicTemplate)
  6597. Decal.Position = UDim2.new(0.5,-size/2,0.5,-size/2)
  6598. Decal.Parent = ScrollThumbFrame
  6599. end
  6600.  
  6601. local MouseDrag = Create('ImageButton',{
  6602. Name = "MouseDrag";
  6603. Position = UDim2.new(-0.25,0,-0.25,0);
  6604. Size = UDim2.new(1.5,0,1.5,0);
  6605. Transparency = 1;
  6606. AutoButtonColor = false;
  6607. Active = true;
  6608. ZIndex = 10;
  6609. })
  6610.  
  6611. local Class = setmetatable({
  6612. GUI = ScrollFrame;
  6613. ScrollIndex = 0;
  6614. VisibleSpace = 0;
  6615. TotalSpace = 0;
  6616. PageIncrement = 1;
  6617. },mt)
  6618.  
  6619. local UpdateScrollThumb
  6620. if horizontal then
  6621. function UpdateScrollThumb()
  6622. ScrollThumbFrame.Size = UDim2.new(Class.VisibleSpace/Class.TotalSpace,0,0,ScrollBarWidth)
  6623. if ScrollThumbFrame.AbsoluteSize.x < ScrollBarWidth then
  6624. ScrollThumbFrame.Size = UDim2.new(0,ScrollBarWidth,0,ScrollBarWidth)
  6625. end
  6626. local barSize = ScrollBarFrame.AbsoluteSize.x
  6627. ScrollThumbFrame.Position = UDim2.new(Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.x)/barSize,0,0,0)
  6628. end
  6629. else
  6630. function UpdateScrollThumb()
  6631. ScrollThumbFrame.Size = UDim2.new(0,ScrollBarWidth,Class.VisibleSpace/Class.TotalSpace,0)
  6632. if ScrollThumbFrame.AbsoluteSize.y < ScrollBarWidth then
  6633. ScrollThumbFrame.Size = UDim2.new(0,ScrollBarWidth,0,ScrollBarWidth)
  6634. end
  6635. local barSize = ScrollBarFrame.AbsoluteSize.y
  6636. ScrollThumbFrame.Position = UDim2.new(0,0,Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.y)/barSize,0)
  6637. end
  6638. end
  6639.  
  6640. local lastDown
  6641. local lastUp
  6642. local scrollStyle = {BackgroundColor3=ScrollStyles.Border,BackgroundTransparency=0}
  6643. local scrollStyle_ds = {BackgroundColor3=ScrollStyles.Border,BackgroundTransparency=0.7}
  6644.  
  6645. local function Update()
  6646. local t = Class.TotalSpace
  6647. local v = Class.VisibleSpace
  6648. local s = Class.ScrollIndex
  6649. if v <= t then
  6650. if s > 0 then
  6651. if s + v > t then
  6652. Class.ScrollIndex = t - v
  6653. end
  6654. else
  6655. Class.ScrollIndex = 0
  6656. end
  6657. else
  6658. Class.ScrollIndex = 0
  6659. end
  6660.  
  6661. if Class.UpdateCallback then
  6662. if Class.UpdateCallback(Class) == false then
  6663. return
  6664. end
  6665. end
  6666.  
  6667. local down = Class:CanScrollDown()
  6668. local up = Class:CanScrollUp()
  6669. if down ~= lastDown then
  6670. lastDown = down
  6671. ScrollDownFrame.Active = down
  6672. ScrollDownFrame.AutoButtonColor = down
  6673. local children = ScrollDownGraphic:GetChildren()
  6674. local style = down and scrollStyle or scrollStyle_ds
  6675. for i = 1,#children do
  6676. Create(children[i],style)
  6677. end
  6678. end
  6679. if up ~= lastUp then
  6680. lastUp = up
  6681. ScrollUpFrame.Active = up
  6682. ScrollUpFrame.AutoButtonColor = up
  6683. local children = ScrollUpGraphic:GetChildren()
  6684. local style = up and scrollStyle or scrollStyle_ds
  6685. for i = 1,#children do
  6686. Create(children[i],style)
  6687. end
  6688. end
  6689. ScrollThumbFrame.Visible = down or up
  6690. UpdateScrollThumb()
  6691. end
  6692. Class.Update = Update
  6693.  
  6694. SetZIndexOnChanged(ScrollFrame)
  6695.  
  6696. local scrollEventID = 0
  6697. ScrollDownFrame.MouseButton1Down:connect(function()
  6698. scrollEventID = tick()
  6699. local current = scrollEventID
  6700. local up_con
  6701. up_con = MouseDrag.MouseButton1Up:connect(function()
  6702. scrollEventID = tick()
  6703. MouseDrag.Parent = nil
  6704. ResetButtonColor(ScrollDownFrame)
  6705. up_con:disconnect(); drag = nil
  6706. end)
  6707. MouseDrag.Parent = GetScreen(ScrollFrame)
  6708. Class:ScrollDown()
  6709. wait(0.2) -- delay before auto scroll
  6710. while scrollEventID == current do
  6711. Class:ScrollDown()
  6712. if not Class:CanScrollDown() then break end
  6713. wait()
  6714. end
  6715. end)
  6716.  
  6717. ScrollDownFrame.MouseButton1Up:connect(function()
  6718. scrollEventID = tick()
  6719. end)
  6720.  
  6721. ScrollUpFrame.MouseButton1Down:connect(function()
  6722. scrollEventID = tick()
  6723. local current = scrollEventID
  6724. local up_con
  6725. up_con = MouseDrag.MouseButton1Up:connect(function()
  6726. scrollEventID = tick()
  6727. MouseDrag.Parent = nil
  6728. ResetButtonColor(ScrollUpFrame)
  6729. up_con:disconnect(); drag = nil
  6730. end)
  6731. MouseDrag.Parent = GetScreen(ScrollFrame)
  6732. Class:ScrollUp()
  6733. wait(0.2)
  6734. while scrollEventID == current do
  6735. Class:ScrollUp()
  6736. if not Class:CanScrollUp() then break end
  6737. wait()
  6738. end
  6739. end)
  6740.  
  6741. ScrollUpFrame.MouseButton1Up:connect(function()
  6742. scrollEventID = tick()
  6743. end)
  6744.  
  6745. if horizontal then
  6746. ScrollBarFrame.MouseButton1Down:connect(function(x,y)
  6747. scrollEventID = tick()
  6748. local current = scrollEventID
  6749. local up_con
  6750. up_con = MouseDrag.MouseButton1Up:connect(function()
  6751. scrollEventID = tick()
  6752. MouseDrag.Parent = nil
  6753. ResetButtonColor(ScrollUpFrame)
  6754. up_con:disconnect(); drag = nil
  6755. end)
  6756. MouseDrag.Parent = GetScreen(ScrollFrame)
  6757. if x > ScrollThumbFrame.AbsolutePosition.x then
  6758. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  6759. wait(0.2)
  6760. while scrollEventID == current do
  6761. if x < ScrollThumbFrame.AbsolutePosition.x + ScrollThumbFrame.AbsoluteSize.x then break end
  6762. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  6763. wait()
  6764. end
  6765. else
  6766. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  6767. wait(0.2)
  6768. while scrollEventID == current do
  6769. if x > ScrollThumbFrame.AbsolutePosition.x then break end
  6770. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  6771. wait()
  6772. end
  6773. end
  6774. end)
  6775. else
  6776. ScrollBarFrame.MouseButton1Down:connect(function(x,y)
  6777. scrollEventID = tick()
  6778. local current = scrollEventID
  6779. local up_con
  6780. up_con = MouseDrag.MouseButton1Up:connect(function()
  6781. scrollEventID = tick()
  6782. MouseDrag.Parent = nil
  6783. ResetButtonColor(ScrollUpFrame)
  6784. up_con:disconnect(); drag = nil
  6785. end)
  6786. MouseDrag.Parent = GetScreen(ScrollFrame)
  6787. if y > ScrollThumbFrame.AbsolutePosition.y then
  6788. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  6789. wait(0.2)
  6790. while scrollEventID == current do
  6791. if y < ScrollThumbFrame.AbsolutePosition.y + ScrollThumbFrame.AbsoluteSize.y then break end
  6792. Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
  6793. wait()
  6794. end
  6795. else
  6796. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  6797. wait(0.2)
  6798. while scrollEventID == current do
  6799. if y > ScrollThumbFrame.AbsolutePosition.y then break end
  6800. Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
  6801. wait()
  6802. end
  6803. end
  6804. end)
  6805. end
  6806.  
  6807. if horizontal then
  6808. ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
  6809. scrollEventID = tick()
  6810. local mouse_offset = x - ScrollThumbFrame.AbsolutePosition.x
  6811. local drag_con
  6812. local up_con
  6813. drag_con = MouseDrag.MouseMoved:connect(function(x,y)
  6814. local bar_abs_pos = ScrollBarFrame.AbsolutePosition.x
  6815. local bar_drag = ScrollBarFrame.AbsoluteSize.x - ScrollThumbFrame.AbsoluteSize.x
  6816. local bar_abs_one = bar_abs_pos + bar_drag
  6817. x = x - mouse_offset
  6818. x = x < bar_abs_pos and bar_abs_pos or x > bar_abs_one and bar_abs_one or x
  6819. x = x - bar_abs_pos
  6820. Class:SetScrollPercent(x/(bar_drag))
  6821. end)
  6822. up_con = MouseDrag.MouseButton1Up:connect(function()
  6823. scrollEventID = tick()
  6824. MouseDrag.Parent = nil
  6825. ResetButtonColor(ScrollThumbFrame)
  6826. drag_con:disconnect(); drag_con = nil
  6827. up_con:disconnect(); drag = nil
  6828. end)
  6829. MouseDrag.Parent = GetScreen(ScrollFrame)
  6830. end)
  6831. else
  6832. ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
  6833. scrollEventID = tick()
  6834. local mouse_offset = y - ScrollThumbFrame.AbsolutePosition.y
  6835. local drag_con
  6836. local up_con
  6837. drag_con = MouseDrag.MouseMoved:connect(function(x,y)
  6838. local bar_abs_pos = ScrollBarFrame.AbsolutePosition.y
  6839. local bar_drag = ScrollBarFrame.AbsoluteSize.y - ScrollThumbFrame.AbsoluteSize.y
  6840. local bar_abs_one = bar_abs_pos + bar_drag
  6841. y = y - mouse_offset
  6842. y = y < bar_abs_pos and bar_abs_pos or y > bar_abs_one and bar_abs_one or y
  6843. y = y - bar_abs_pos
  6844. Class:SetScrollPercent(y/(bar_drag))
  6845. end)
  6846. up_con = MouseDrag.MouseButton1Up:connect(function()
  6847. scrollEventID = tick()
  6848. MouseDrag.Parent = nil
  6849. ResetButtonColor(ScrollThumbFrame)
  6850. drag_con:disconnect(); drag_con = nil
  6851. up_con:disconnect(); drag = nil
  6852. end)
  6853. MouseDrag.Parent = GetScreen(ScrollFrame)
  6854. end)
  6855. end
  6856.  
  6857. function Class:Destroy()
  6858. ScrollFrame:Destroy()
  6859. MouseDrag:Destroy()
  6860. for k in pairs(Class) do
  6861. Class[k] = nil
  6862. end
  6863. setmetatable(Class,nil)
  6864. end
  6865.  
  6866. Update()
  6867.  
  6868. return Class
  6869. end
  6870. end
  6871.  
  6872. -- End Scrollbar
  6873.  
  6874. local scrollBar = ScrollBar(false)
  6875. scrollBar.PageIncrement = 16
  6876. Create(scrollBar.GUI,{
  6877. Position = UDim2.new(1,0,0,0);
  6878. Size = UDim2.new(0,ScrollBarWidth,1,0);
  6879. Parent = editorGrid;
  6880. })
  6881.  
  6882. local scrollBarH = ScrollBar(true)
  6883. scrollBarH.PageIncrement = 8
  6884. Create(scrollBarH.GUI,{
  6885. Position = UDim2.new(0,0,1,0);
  6886. Size = UDim2.new(1,0,0,ScrollBarWidth);
  6887. Parent = editorGrid;
  6888. })
  6889.  
  6890. local entries = {}
  6891.  
  6892. local grid = {}
  6893.  
  6894. local count = 1
  6895. local xCount = 1
  6896.  
  6897. local lineSpan = 0
  6898.  
  6899. for i = 0,490,8 do
  6900. local newRow = {}
  6901. for j = 0,390,16 do
  6902. local cellText = Instance.new("TextLabel",editorGrid)
  6903. cellText.BackgroundTransparency = 1
  6904. cellText.BorderSizePixel = 0
  6905. cellText.Text = ""
  6906. cellText.Position = UDim2.new(0,i,0,j)
  6907. cellText.Size = UDim2.new(0,8,0,16)
  6908. cellText.Font = Enum.Font.SourceSans
  6909. cellText.FontSize = Enum.FontSize.Size18
  6910. table.insert(newRow,cellText)
  6911. xCount = xCount + 1
  6912. end
  6913. table.insert(grid,newRow)
  6914. count = count + 1
  6915. xCount = 1
  6916. end
  6917.  
  6918. local syntaxHighlightList = {
  6919. {["Keyword"] = "for", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  6920. {["Keyword"] = "local", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  6921. {["Keyword"] = "if", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  6922. {["Keyword"] = "then", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  6923. {["Keyword"] = "do", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  6924. {["Keyword"] = "while", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  6925. {["Keyword"] = "end", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  6926. {["Keyword"] = "function", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  6927. {["Keyword"] = "string", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  6928. {["Keyword"] = "table", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  6929. {["Keyword"] = "game", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  6930. {["Keyword"] = "workspace", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  6931. {["Keyword"] = "return", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  6932. {["Keyword"] = "break", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  6933. {["Keyword"] = "elseif", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  6934. {["Keyword"] = "in", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  6935. {["Keyword"] = "pairs", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
  6936. {["Keyword"] = "ipairs", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true}
  6937. }
  6938.  
  6939. function checkMouseInGui(gui)
  6940. if gui == nil then return false end
  6941. local plrMouse = game.Players.LocalPlayer:GetMouse()
  6942. local guiPosition = gui.AbsolutePosition
  6943. local guiSize = gui.AbsoluteSize
  6944.  
  6945. 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
  6946. return true
  6947. else
  6948. return false
  6949. end
  6950. end
  6951.  
  6952. function AddZeros(num,reach)
  6953. local toConvert = tostring(num)
  6954. while #toConvert < reach do
  6955. toConvert = " "..toConvert
  6956. end
  6957. return toConvert
  6958. end
  6959.  
  6960. function buildScript(source,xOff,yOff,override)
  6961. local buildingRows = true
  6962. local buildScr = source
  6963.  
  6964. local totalLines = 0
  6965.  
  6966. --print(xOff,yOff)
  6967.  
  6968. if currentSource ~= source then
  6969. currentSource = source
  6970. end
  6971.  
  6972. if override then
  6973. currentSource = source
  6974. entries = {}
  6975. while buildingRows do
  6976. local x,y = string.find(buildScr,"\n")
  6977. if x and y then
  6978. table.insert(entries,string.sub(buildScr,1,y))
  6979. buildScr = string.sub(buildScr,y+1,string.len(buildScr))
  6980. else
  6981. buildingRows = false
  6982. table.insert(entries,buildScr)
  6983. end
  6984. end
  6985. end
  6986.  
  6987. totalLines = #entries
  6988. lineSpan = #tostring(totalLines)
  6989.  
  6990. if lineSpan == 1 then lineSpan = 2 end
  6991.  
  6992. local currentRow = 1
  6993. local currentColumn = 2 + lineSpan
  6994.  
  6995. local colorTime = 0
  6996. local colorReplace = nil
  6997.  
  6998. local inString = false
  6999.  
  7000. local workingEntries = entries
  7001.  
  7002. --[[
  7003. for i,v in pairs(entries) do
  7004. table.insert(workingEntries,v)
  7005. end
  7006.  
  7007. for i = 1,yOff do
  7008. table.remove(workingEntries,1)
  7009. end
  7010. --]]
  7011.  
  7012. local delayance = xOff
  7013.  
  7014. for i = 1,#grid do
  7015. for j = 1,#grid[i] do
  7016. if i <= lineSpan then
  7017. local newNum = AddZeros(yOff + j,lineSpan)
  7018. local newDigit = string.sub(newNum,i,i)
  7019. if newDigit == " " then
  7020. grid[i][j].Text = ""
  7021. else
  7022. grid[i][j].Text = newDigit
  7023. end
  7024. grid[i][j].BackgroundTransparency = 0
  7025. grid[i][j].BackgroundColor3 = Color3.new(163/255, 162/255, 165/255)
  7026. --grid[i][j].Font = Enum.Font.SourceSansBold
  7027. elseif i == lineSpan + 1 then
  7028. grid[i][j].Text = ""
  7029. grid[i][j].BackgroundTransparency = 0
  7030. grid[i][j].BackgroundColor3 = Color3.new(200/255, 200/255, 200/255)
  7031. --grid[i][j].Font = Enum.Font.SourceSans
  7032. else
  7033. grid[i][j].Text = ""
  7034. grid[i][j].BackgroundTransparency = 1
  7035. --grid[i][j].Font = Enum.Font.SourceSans
  7036. end
  7037. end
  7038. end
  7039.  
  7040. while true do
  7041. if currentRow > #workingEntries or currentRow > #grid[1] then break end
  7042. local entry = workingEntries[currentRow+yOff]
  7043. while string.len(entry) > 0 do
  7044. if string.sub(entry,1,1) == "\t" then entry = " "..string.sub(entry,2) end
  7045.  
  7046. if currentColumn > #grid then break end
  7047.  
  7048. if delayance == 0 then
  7049. grid[currentColumn][currentRow].Text = string.sub(entry,1,1)
  7050. end
  7051.  
  7052. -- Coloring
  7053.  
  7054. if not inString then
  7055. for i,v in pairs(syntaxHighlightList) do
  7056. if string.sub(entry,1,string.len(v["Keyword"])) == v["Keyword"] then
  7057. if v["Independent"] then
  7058. local outCheck = string.len(v["Keyword"])+1
  7059. local outEntry = string.sub(entry,outCheck,outCheck)
  7060. if not string.find(outEntry,"%w") then
  7061. colorTime = string.len(v["Keyword"])
  7062. colorReplace = v["Color"]
  7063. end
  7064. else
  7065. colorTime = string.len(v["Keyword"])
  7066. colorReplace = v["Color"]
  7067. end
  7068. end
  7069. end
  7070. end
  7071.  
  7072. if string.sub(entry,1,1) == "\"" and string.match(entry,"\".+\"") then
  7073. inString = true
  7074. colorTime = string.len(string.match(entry,"\".+\""))
  7075. colorReplace = Color3.new(170/255, 0, 1)
  7076. end
  7077.  
  7078. if colorTime > 0 then
  7079. colorTime = colorTime - 1
  7080. grid[currentColumn][currentRow].TextColor3 = colorReplace
  7081. if colorTime == 0 then inString = false end
  7082. else
  7083. grid[currentColumn][currentRow].TextColor3 = Color3.new(0,0,0)
  7084. inString = false
  7085. end
  7086.  
  7087. if delayance == 0 then
  7088. currentColumn = currentColumn + 1
  7089. else
  7090. delayance = delayance - 1
  7091. end
  7092. entry = string.sub(entry,2,string.len(entry))
  7093. end
  7094. currentRow = currentRow + 1
  7095. currentColumn = 2 + lineSpan
  7096. colorTime = 0
  7097. delayance = xOff
  7098. inString = false
  7099. end
  7100. end
  7101.  
  7102. function scrollBar.UpdateCallback(self)
  7103. scrollBar.TotalSpace = #entries * 16
  7104. scrollBar.VisibleSpace = editorGrid.AbsoluteSize.Y
  7105. buildScript(currentSource,math.floor(scrollBarH.ScrollIndex/8),math.floor(scrollBar.ScrollIndex/16))
  7106. end
  7107.  
  7108. function scrollBarH.UpdateCallback(self)
  7109. scrollBarH.TotalSpace = (getLongestEntry(entries) + 1 + lineSpan) * 8
  7110. scrollBarH.VisibleSpace = editorGrid.AbsoluteSize.X
  7111. buildScript(currentSource,math.floor(scrollBarH.ScrollIndex/8),math.floor(scrollBar.ScrollIndex/16))
  7112. end
  7113.  
  7114. function getLongestEntry(tab)
  7115. local longest = 0
  7116. for i,v in pairs(tab) do
  7117. if string.len(v) > longest then
  7118. longest = string.len(v)
  7119. end
  7120. end
  7121. return longest
  7122. end
  7123.  
  7124. function openScript(scrObj)
  7125. if scrObj:IsA("LocalScript") then
  7126. scrObj.Archivable = true
  7127. scrObj = scrObj:Clone()
  7128. scrObj.Disabled = true
  7129. end
  7130.  
  7131. local scrName = scrObj.Name
  7132. local scrSource = decompile(scrObj)
  7133.  
  7134. table.insert(memoryScripts,{Name = scrName,Source = scrSource})
  7135.  
  7136. local newTab = entryTemplate:Clone()
  7137. newTab.Button.Text = scrName
  7138. newTab.Position = UDim2.new(0,#scriptBar:GetChildren() * 100,0,0)
  7139. newTab.Visible = true
  7140.  
  7141. newTab.Button.MouseButton1Down:connect(function()
  7142. for i,v in pairs(scriptBar:GetChildren()) do
  7143. if v == newTab then
  7144. editingIndex = i
  7145. buildScript(memoryScripts[i].Source,0,0,true)
  7146. scrollBar:ScrollTo(1)
  7147. scrollBar:Update()
  7148. scrollBarH:ScrollTo(1)
  7149. scrollBarH:Update()
  7150. end
  7151. end
  7152. end)
  7153.  
  7154. newTab.Close.MouseButton1Click:connect(function()
  7155. for i,v in pairs(scriptBar:GetChildren()) do
  7156. if v == newTab then
  7157. table.remove(memoryScripts,i)
  7158. if editingIndex == i then
  7159. editingIndex = #memoryScripts
  7160. if editingIndex > 0 then
  7161. buildScript(memoryScripts[#memoryScripts].Source,0,0,true)
  7162. else
  7163. buildScript("",0,0,true)
  7164. end
  7165. end
  7166.  
  7167. scrollBar:ScrollTo(1)
  7168. scrollBar:Update()
  7169. scrollBarH:ScrollTo(1)
  7170. scrollBarH:Update()
  7171.  
  7172. for i2 = i,#scriptBar:GetChildren() do
  7173. scriptBar:GetChildren()[i2].Position = scriptBar:GetChildren()[i2].Position + UDim2.new(0,-100,0,0)
  7174. end
  7175. if editingIndex > i then
  7176. editingIndex = editingIndex - 1
  7177. end
  7178. newTab:Destroy()
  7179. end
  7180. end
  7181. end)
  7182.  
  7183. editingIndex = #memoryScripts
  7184. buildScript(scrSource,0,0,true)
  7185.  
  7186. newTab.Parent = scriptBar
  7187. end
  7188.  
  7189. function updateScriptBar()
  7190. local entryCount = 0
  7191.  
  7192. scriptBarLeft.Active = false
  7193. scriptBarLeft.AutoButtonColor = false
  7194. for i,v in pairs(scriptBarLeft["Arrow Graphic"]:GetChildren()) do
  7195. v.BackgroundTransparency = 0.7
  7196. end
  7197. scriptBarRight.Active = false
  7198. scriptBarRight.AutoButtonColor = false
  7199. for i,v in pairs(scriptBarRight["Arrow Graphic"]:GetChildren()) do
  7200. v.BackgroundTransparency = 0.7
  7201. end
  7202. for i,v in pairs(scriptBar:GetChildren()) do
  7203. if v.Position.X.Offset < 0 then
  7204. scriptBarLeft.Active = true
  7205. scriptBarLeft.AutoButtonColor = true
  7206. for i,v in pairs(scriptBarLeft["Arrow Graphic"]:GetChildren()) do
  7207. v.BackgroundTransparency = 0
  7208. end
  7209. elseif v.Position.X.Offset >= 0 then
  7210. entryCount = entryCount + 1
  7211. if entryCount == 5 then
  7212. scriptBarRight.Active = true
  7213. scriptBarRight.AutoButtonColor = true
  7214. for i,v in pairs(scriptBarRight["Arrow Graphic"]:GetChildren()) do
  7215. v.BackgroundTransparency = 0
  7216. end
  7217. end
  7218. end
  7219. end
  7220. end
  7221.  
  7222. scriptBar.ChildAdded:connect(updateScriptBar)
  7223. scriptBar.ChildRemoved:connect(updateScriptBar)
  7224.  
  7225. scriptBarLeft.MouseButton1Click:connect(function()
  7226. if scriptBarLeft.Active == false then return end
  7227. for i,v in pairs(scriptBar:GetChildren()) do
  7228. v.Position = v.Position + UDim2.new(0,100,0,0)
  7229. end
  7230. updateScriptBar()
  7231. end)
  7232.  
  7233. scriptBarRight.MouseButton1Click:connect(function()
  7234. if scriptBarRight.Active == false then return end
  7235. for i,v in pairs(scriptBar:GetChildren()) do
  7236. v.Position = v.Position + UDim2.new(0,-100,0,0)
  7237. end
  7238. updateScriptBar()
  7239. end)
  7240.  
  7241. mouse.Button1Down:connect(function()
  7242. if checkMouseInGui(editorGrid) then
  7243. --print("LETS EDIT!")
  7244. end
  7245. end)
  7246.  
  7247. openEvent.Event:connect(function(...)
  7248. top.Visible = true
  7249. local args = {...}
  7250. if #args > 0 then
  7251. openScript(args[1])
  7252. end
  7253. end)
  7254.  
  7255. clipboardButton.MouseButton1Click:connect(function()
  7256. Synapse:CopyString(currentSource)
  7257. end)
  7258.  
  7259. closeButton.MouseButton1Click:connect(function()
  7260. top.Visible = false
  7261. end)
  7262.  
  7263. --[[
  7264. local scr = script.Parent:WaitForChild("Scr")
  7265. local scr2 = script.Parent:WaitForChild("Scr2")
  7266. local scr3 = script.Parent:WaitForChild("Scr3")
  7267. local scr4 = script.Parent:WaitForChild("TOS")
  7268. local scr5 = script.Parent:WaitForChild("HW")
  7269. --]]
  7270.  
  7271. buildScript("",0,0,true)
  7272. --[[
  7273. openScript(scr)
  7274. openScript(scr2)
  7275. openScript(scr3)
  7276. openScript(scr4)
  7277. openScript(scr5)
  7278. --]]
  7279.  
  7280. scrollBar:Update()
  7281. scrollBarH:Update()
  7282. end)
Add Comment
Please, Sign In to add comment