Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- ScreenGui0 = Instance.new("ScreenGui")
- Frame1 = Instance.new("Frame")
- LocalScript2 = Instance.new("LocalScript")
- BindableEvent3 = Instance.new("BindableEvent")
- BindableFunction4 = Instance.new("BindableFunction")
- BindableFunction5 = Instance.new("BindableFunction")
- BindableFunction6 = Instance.new("BindableFunction")
- BindableFunction7 = Instance.new("BindableFunction")
- Frame8 = Instance.new("Frame")
- LocalScript9 = Instance.new("LocalScript")
- Frame10 = Instance.new("Frame")
- TextLabel11 = Instance.new("TextLabel")
- Frame12 = Instance.new("Frame")
- TextLabel13 = Instance.new("TextLabel")
- Frame14 = Instance.new("Frame")
- ImageButton15 = Instance.new("ImageButton")
- Frame16 = Instance.new("Frame")
- Frame17 = Instance.new("Frame")
- Frame18 = Instance.new("Frame")
- Frame19 = Instance.new("Frame")
- Frame20 = Instance.new("Frame")
- ImageButton21 = Instance.new("ImageButton")
- Frame22 = Instance.new("Frame")
- Frame23 = Instance.new("Frame")
- Frame24 = Instance.new("Frame")
- Frame25 = Instance.new("Frame")
- Frame26 = Instance.new("Frame")
- ImageButton27 = Instance.new("ImageButton")
- ImageButton28 = Instance.new("ImageButton")
- Frame29 = Instance.new("Frame")
- Frame30 = Instance.new("Frame")
- Frame31 = Instance.new("Frame")
- Frame32 = Instance.new("Frame")
- Frame33 = Instance.new("Frame")
- Frame34 = Instance.new("Frame")
- TextLabel35 = Instance.new("TextLabel")
- TextLabel36 = Instance.new("TextLabel")
- Frame37 = Instance.new("Frame")
- Frame38 = Instance.new("Frame")
- TextLabel39 = Instance.new("TextLabel")
- TextBox40 = Instance.new("TextBox")
- ImageButton41 = Instance.new("ImageButton")
- ScreenGui0.Name = "ExplorerPropertiesGui"
- ScreenGui0.Parent = mas
- Frame1.Name = "ExplorerPanel"
- Frame1.Parent = ScreenGui0
- Frame1.Transparency = 0.10000000149012
- Frame1.Size = UDim2.new(0, 300, 0.5, 0)
- Frame1.Position = UDim2.new(1, -308, 0, 0)
- Frame1.BackgroundColor3 = Color3.new(1, 1, 1)
- Frame1.BackgroundTransparency = 0.10000000149012
- Frame1.BorderColor3 = Color3.new(0.74902, 0.74902, 0.74902)
- Frame1.Draggable = true
- LocalScript2.Name = "Explorer"
- LocalScript2.Parent = Frame1
- table.insert(cors,sandbox(LocalScript2,function()
- -- initial states
- local Option = {
- -- can modify objects
- Modifiable = true;
- -- can select objects
- Selectable = true;
- }
- -- general size of GUI objects, in pixels
- local GUI_SIZE = 16
- -- padding between items within each entry
- local ENTRY_PADDING = 1
- -- padding between each entry
- local ENTRY_MARGIN = 1
- --[[
- # Explorer Panel
- A GUI panel that displays the game hierarchy.
- ## Selection Bindables
- - `Function GetSelection ( )`
- Returns an array of objects representing the objects currently
- selected in the panel.
- - `Function SetSelection ( Objects selection )`
- Sets the objects that are selected in the panel. `selection` is an array
- of objects.
- - `Event SelectionChanged ( )`
- Fired after the selection changes.
- ## Option Bindables
- - `Function GetOption ( string optionName )`
- If `optionName` is given, returns the value of that option. Otherwise,
- returns a table of options and their current values.
- - `Function SetOption ( string optionName, bool value )`
- Sets `optionName` to `value`.
- Options:
- - Modifiable
- Whether objects can be modified by the panel.
- Note that modifying objects depends on being able to select them. If
- Selectable is false, then Actions will not be available. Reparenting
- is still possible, but only for the dragged object.
- - Selectable
- Whether objects can be selected.
- If Modifiable is false, then left-clicking will perform a drag
- selection.
- ## Updates
- - 2013-09-14
- - Added GetOption and SetOption bindables.
- - Option: Modifiable; sets whether objects can be modified by the panel.
- - Option: Selectable; sets whether objects can be selected.
- - Slight modification to left-click selection behavior.
- - Improved layout and scaling.
- - 2013-09-13
- - Added drag to reparent objects.
- - Left-click to select/deselect object.
- - Left-click and drag unselected object to reparent single object.
- - Left-click and drag selected object to move reparent entire selection.
- - Right-click while dragging to cancel.
- - 2013-09-11
- - Added explorer panel header with actions.
- - Added Cut action.
- - Added Copy action.
- - Added Paste action.
- - Added Delete action.
- - Added drag selection.
- - Left-click: Add to selection on drag.
- - Right-click: Add to or remove from selection on drag.
- - Ensured SelectionChanged fires only when the selection actually changes.
- - Added documentation and change log.
- - Fixed thread issue.
- - 2013-09-09
- - Added basic multi-selection.
- - Left-click to set selection.
- - Right-click to add to or remove from selection.
- - Removed "Selection" ObjectValue.
- - Added GetSelection BindableFunction.
- - Added SetSelection BindableFunction.
- - Added SelectionChanged BindableEvent.
- - Changed font to SourceSans.
- - 2013-08-31
- - Improved GUI sizing based off of `GUI_SIZE` constant.
- - Automatic font size detection.
- - 2013-08-27
- - Initial explorer panel.
- ## Todo
- - Sorting
- - by ExplorerOrder
- - by children
- - by name
- - Drag objects to reparent
- ]]
- local ENTRY_SIZE = GUI_SIZE + ENTRY_PADDING*2
- local ENTRY_BOUND = ENTRY_SIZE + ENTRY_MARGIN
- local HEADER_SIZE = ENTRY_SIZE
- local FONT = 'SourceSans'
- local FONT_SIZE do
- local size = {8,9,10,11,12,14,18,24,36,48}
- local s
- local n = math.huge
- for i = 1,#size do
- if size[i] <= GUI_SIZE then
- FONT_SIZE = i - 1
- end
- end
- end
- local GuiColor = {
- Background = Color3.new(233/255, 233/255, 233/255);
- Border = Color3.new(149/255, 149/255, 149/255);
- Selected = Color3.new( 96/255, 140/255, 211/255);
- BorderSelected = Color3.new( 86/255, 125/255, 188/255);
- Text = Color3.new( 0/255, 0/255, 0/255);
- TextDisabled = Color3.new(128/255, 128/255, 128/255);
- TextSelected = Color3.new(255/255, 255/255, 255/255);
- Button = Color3.new(221/255, 221/255, 221/255);
- ButtonBorder = Color3.new(149/255, 149/255, 149/255);
- ButtonSelected = Color3.new(255/255, 0/255, 0/255);
- Field = Color3.new(255/255, 255/255, 255/255);
- FieldBorder = Color3.new(191/255, 191/255, 191/255);
- TitleBackground = Color3.new(178/255, 178/255, 178/255);
- }
- ----------------------------------------------------------------
- ----------------------------------------------------------------
- ----------------------------------------------------------------
- ----------------------------------------------------------------
- ---- Icon map constants
- local MAP_ID = 129293660
- -- Indices based on implementation of Icon function.
- local ACTION_CUT = 160
- local ACTION_COPY = 161
- local ACTION_PASTE = 162
- local ACTION_DELETE = 163
- local ACTION_SORT = 164
- local ACTION_CUT_OVER = 174
- local ACTION_COPY_OVER = 175
- local ACTION_PASTE_OVER = 176
- local ACTION_DELETE_OVER = 177
- local ACTION_SORT_OVER = 178
- local NODE_COLLAPSED = 165
- local NODE_EXPANDED = 166
- local NODE_COLLAPSED_OVER = 179
- local NODE_EXPANDED_OVER = 180
- local ExplorerIndex = {
- Accoutrement = 32;
- AdvancedDragger = 0;
- Animation = 60;
- AnimationTrack = 60;
- AnimationTrackState = 60;
- Animator = 0;
- ArcHandles = 56;
- Authoring = 3;
- Backpack = 20;
- BackpackItem = 0;
- BadgeService = 0;
- BasePart = 1;
- BasePlayerGui = 46;
- BaseScript = 6;
- BevelMesh = 8;
- BillboardGui = 64;
- BindableEvent = 67;
- BindableFunction = 66;
- BlockMesh = 8;
- BodyAngularVelocity = 14;
- BodyColors = 0;
- BodyForce = 14;
- BodyGyro = 14;
- BodyMover = 14;
- BodyPosition = 14;
- BodyThrust = 14;
- BodyVelocity = 14;
- BoolValue = 4;
- BrickColorValue = 4;
- Button = 0;
- ButtonBindingWidget = 0;
- CFrameValue = 4;
- CacheableContentProvider = 0;
- Camera = 5;
- ChangeHistoryService = 0;
- CharacterAppearance = 0;
- CharacterMesh = 60;
- Chat = 0;
- ClickDetector = 41;
- Clothing = 40;
- CollectionService = 0;
- Color3Value = 4;
- Configuration = 58;
- ContentFilter = 0;
- ContentProvider = 0;
- ContextActionService = 0;
- Controller = 0;
- ControllerService = 0;
- CookiesService = 0;
- CoreGui = 0;
- CoreScript = 6;
- CornerWedgePart = 1;
- CustomEvent = 4;
- CustomEventReceiver = 4;
- CylinderMesh = 8;
- DataModel = 0;
- DataModelMesh = 8;
- Debris = 30;
- DebugSettings = 3;
- DebuggerBreakpoint = 0;
- DebuggerService = 0;
- DebuggerWatch = 0;
- Decal = 7;
- Dialog = 62;
- DialogChoice = 63;
- DoubleConstrainedValue = 4;
- Dragger = 0;
- DynamicRotate = 34;
- Explosion = 36;
- FWService = 0;
- FaceInstance = 0;
- FastLogSettings = 3;
- Feature = 0;
- FileMesh = 8;
- Fire = 61;
- Flag = 38;
- FlagStand = 39;
- FlagStandService = 0;
- FloorWire = 4;
- ForceField = 37;
- FormFactorPart = 1;
- Frame = 48;
- FriendService = 0;
- FunctionalTest = 0;
- GamePassService = 0;
- GameSettings = 3;
- GenericSettings = 3;
- Geometry = 0;
- GlobalSettings = 3;
- Glue = 34;
- GuiBase = 47;
- GuiBase2d = 0;
- GuiBase3d = 0;
- GuiButton = 51;
- GuiItem = 0;
- GuiLabel = 50;
- GuiMain = 47;
- GuiObject = 48;
- GuiRoot = 0;
- GuiService = 0;
- GuidRegistryService = 0;
- Handles = 53;
- HandlesBase = 0;
- Hat = 45;
- Hint = 33;
- Hole = 0;
- Hopper = 0;
- HopperBin = 22;
- Humanoid = 9;
- HumanoidController = 0;
- ImageButton = 52;
- ImageLabel = 49;
- InsertService = 0;
- Instance = 0;
- InstancePacketCache = 0;
- IntConstrainedValue = 4;
- IntValue = 4;
- JointInstance = 34;
- JointsService = 0;
- Keyframe = 60;
- KeyframeSequence = 0;
- KeyframeSequenceProvider = 0;
- LayerCollector = 0;
- Light = 0;
- Lighting = 13;
- LoadingGui = 46;
- LocalBackpack = 0;
- LocalScript = 18;
- LocalWorkspace = 0;
- LuaSettings = 3;
- LuaWebService = 0;
- ManualGlue = 34;
- ManualSurfaceJointInstance = 0;
- ManualWeld = 34;
- MarketplaceService = 0;
- MeshContentProvider = 0;
- Message = 33;
- Model = 2;
- Motor = 34;
- Motor6D = 34;
- MotorFeature = 0;
- Mouse = 0;
- NetworkClient = 16;
- NetworkMarker = 0;
- NetworkPeer = 0;
- NetworkReplicator = 29;
- NetworkServer = 15;
- NetworkSettings = 3;
- NotificationBox = 48;
- NotificationObject = 48;
- NumberValue = 4;
- ObjectValue = 4;
- PVAdornment = 0;
- PVInstance = 0;
- Pants = 44;
- ParallelRampPart = 1;
- Part = 1;
- PartAdornment = 0;
- PersonalServerService = 0;
- PhysicsPacketCache = 0;
- PhysicsService = 0;
- PhysicsSettings = 3;
- Platform = 1;
- Player = 12;
- PlayerGui = 46;
- PlayerHUD = 0;
- PlayerMouse = 0;
- Players = 21;
- Plugin = 0;
- PluginManager = 0;
- PluginMouse = 0;
- PointLight = 0;
- Pose = 60;
- PrismPart = 1;
- ProfilingItem = 0;
- PyramidPart = 1;
- RayValue = 4;
- ReflectionMetadata = 0;
- ReflectionMetadataCallbacks = 0;
- ReflectionMetadataClass = 0;
- ReflectionMetadataClasses = 0;
- ReflectionMetadataEvents = 0;
- ReflectionMetadataFunctions = 0;
- ReflectionMetadataItem = 0;
- ReflectionMetadataMember = 0;
- ReflectionMetadataProperties = 0;
- ReflectionMetadataYieldFunctions = 0;
- RenderHooksService = 0;
- RenderSettings = 3;
- RightAngleRampPart = 1;
- RocketPropulsion = 14;
- RootInstance = 0;
- Rotate = 34;
- RotateP = 34;
- RotateV = 34;
- RunService = 0;
- RunningAverageItemDouble = 0;
- RunningAverageItemInt = 0;
- RuntimeScriptService = 0;
- Scale9Frame = 0;
- ScreenGui = 47;
- Script = 6;
- ScriptContext = 0;
- ScriptDebugger = 0;
- ScriptInformationProvider = 0;
- ScriptService = 0;
- Seat = 35;
- Selection = 0;
- SelectionBox = 54;
- SelectionLasso = 57;
- SelectionPartLasso = 57;
- SelectionPointLasso = 57;
- ServerReplicator = 0;
- ServiceProvider = 0;
- Shirt = 43;
- ShirtGraphic = 40;
- SkateboardController = 0;
- SkateboardPlatform = 1;
- Skin = 0;
- Sky = 28;
- Smoke = 59;
- Snap = 34;
- SocialService = 0;
- Sound = 11;
- SoundService = 31;
- Sparkles = 42;
- SpawnLocation = 25;
- SpawnerService = 0;
- SpecialMesh = 8;
- SpotLight = 0;
- StarterGear = 20;
- StarterGui = 46;
- StarterPack = 20;
- StarterScript = 18;
- Stats = 0;
- StatsItem = 0;
- Status = 2;
- StockSound = 11;
- StringValue = 4;
- StudioTool = 0;
- SurfaceSelection = 55;
- TaskScheduler = 0;
- Team = 24;
- Teams = 23;
- TeleportService = 0;
- Terrain = 65;
- TestService = 68;
- TextBox = 51;
- TextButton = 51;
- TextLabel = 50;
- TextService = 0;
- Texture = 10;
- TextureContentProvider = 0;
- TextureTrail = 4;
- TimerService = 0;
- Tool = 17;
- Toolbar = 0;
- TotalCountTimeIntervalItem = 0;
- TouchTransmitter = 37;
- TrussPart = 1;
- TweenService = 0;
- UserGameSettings = 4;
- UserInputService = 0;
- UserSettings = 3;
- Vector3Value = 4;
- VehicleController = 0;
- VehicleSeat = 35;
- VelocityMotor = 34;
- VirtualUser = 0;
- Visit = 0;
- WedgePart = 1;
- Weld = 34;
- Workspace = 19;
- }
- ----------------------------------------------------------------
- ----------------------------------------------------------------
- ----------------------------------------------------------------
- ----------------------------------------------------------------
- ----------------------------------------------------------------
- function Create(ty,data)
- local obj
- if type(ty) == 'string' then
- obj = Instance.new(ty)
- else
- obj = ty
- end
- for k, v in pairs(data) do
- if type(k) == 'number' then
- v.Parent = obj
- else
- obj[k] = v
- end
- end
- return obj
- end
- -- Connects a function to an event such that it fires asynchronously
- function Connect(event,func)
- return event:connect(function(...)
- local a = {...}
- Spawn(function() func(unpack(a)) end)
- end)
- end
- -- returns the ascendant ScreenGui of an object
- function GetScreen(screen)
- if screen == nil then return nil end
- while not screen:IsA("ScreenGui") do
- screen = screen.Parent
- if screen == nil then return nil end
- end
- return screen
- end
- do
- local ZIndexLock = {}
- -- Sets the ZIndex of an object and its descendants. Objects are locked so
- -- that SetZIndexOnChanged doesn't spawn multiple threads that set the
- -- ZIndex of the same object.
- function SetZIndex(object,z)
- if not ZIndexLock[object] then
- ZIndexLock[object] = true
- if object:IsA'GuiObject' then
- object.ZIndex = z
- end
- local children = object:GetChildren()
- for i = 1,#children do
- SetZIndex(children[i],z)
- end
- ZIndexLock[object] = nil
- end
- end
- function SetZIndexOnChanged(object)
- return object.Changed:connect(function(p)
- if p == "ZIndex" then
- SetZIndex(object,object.ZIndex)
- end
- end)
- end
- end
- ---- IconMap ----
- -- Image size: 256px x 256px
- -- Icon size: 16px x 16px
- -- Padding between each icon: 2px
- -- Padding around image edge: 1px
- -- Total icons: 14 x 14 (196)
- local Icon do
- local iconMap = 'http://www.roblox.com/asset/?id=' .. MAP_ID
- Game:GetService('ContentProvider'):Preload(iconMap)
- local iconDehash do
- -- 14 x 14, 0-based input, 0-based output
- local f=math.floor
- function iconDehash(h)
- return f(h/14%14),f(h%14)
- end
- end
- function Icon(IconFrame,index)
- local row,col = iconDehash(index)
- local mapSize = Vector2.new(256,256)
- local pad,border = 2,1
- local iconSize = 16
- local class = 'Frame'
- if type(IconFrame) == 'string' then
- class = IconFrame
- IconFrame = nil
- end
- if not IconFrame then
- IconFrame = Create(class,{
- Name = "Icon";
- BackgroundTransparency = 1;
- ClipsDescendants = true;
- Create('ImageLabel',{
- Name = "IconMap";
- Active = false;
- BackgroundTransparency = 1;
- Image = iconMap;
- Size = UDim2.new(mapSize.x/iconSize,0,mapSize.y/iconSize,0);
- });
- })
- end
- IconFrame.IconMap.Position = UDim2.new(-col - (pad*(col+1) + border)/iconSize,0,-row - (pad*(row+1) + border)/iconSize,0)
- return IconFrame
- end
- end
- ----------------------------------------------------------------
- ----------------------------------------------------------------
- ----------------------------------------------------------------
- ----------------------------------------------------------------
- ---- ScrollBar
- do
- -- AutoButtonColor doesn't always reset properly
- local function ResetButtonColor(button)
- local active = button.Active
- button.Active = not active
- button.Active = active
- end
- local function ArrowGraphic(size,dir,scaled,template)
- local Frame = Create('Frame',{
- Name = "Arrow Graphic";
- BorderSizePixel = 0;
- Size = UDim2.new(0,size,0,size);
- Transparency = 1;
- })
- if not template then
- template = Instance.new("Frame")
- template.BorderSizePixel = 0
- end
- local transform
- if dir == nil or dir == 'Up' then
- function transform(p,s) return p,s end
- elseif dir == 'Down' then
- function transform(p,s) return UDim2.new(0,p.X.Offset,0,size-p.Y.Offset-1),s end
- elseif dir == 'Left' then
- 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
- elseif dir == 'Right' then
- 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
- end
- local scale
- if scaled then
- 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
- else
- function scale(p,s) return p,s end
- end
- local o = math.floor(size/4)
- if size%2 == 0 then
- local n = size/2-1
- for i = 0,n do
- local t = template:Clone()
- local p,s = scale(transform(
- UDim2.new(0,n-i,0,o+i),
- UDim2.new(0,(i+1)*2,0,1)
- ))
- t.Position = p
- t.Size = s
- t.Parent = Frame
- end
- else
- local n = (size-1)/2
- for i = 0,n do
- local t = template:Clone()
- local p,s = scale(transform(
- UDim2.new(0,n-i,0,o+i),
- UDim2.new(0,i*2+1,0,1)
- ))
- t.Position = p
- t.Size = s
- t.Parent = Frame
- end
- end
- if size%4 > 1 then
- local t = template:Clone()
- local p,s = scale(transform(
- UDim2.new(0,0,0,size-o-1),
- UDim2.new(0,size,0,1)
- ))
- t.Position = p
- t.Size = s
- t.Parent = Frame
- end
- return Frame
- end
- local function GripGraphic(size,dir,spacing,scaled,template)
- local Frame = Create('Frame',{
- Name = "Grip Graphic";
- BorderSizePixel = 0;
- Size = UDim2.new(0,size.x,0,size.y);
- Transparency = 1;
- })
- if not template then
- template = Instance.new("Frame")
- template.BorderSizePixel = 0
- end
- spacing = spacing or 2
- local scale
- if scaled then
- function scale(p) return UDim2.new(p.X.Offset/size.x,0,p.Y.Offset/size.y,0) end
- else
- function scale(p) return p end
- end
- if dir == 'Vertical' then
- for i=0,size.x-1,spacing do
- local t = template:Clone()
- t.Size = scale(UDim2.new(0,1,0,size.y))
- t.Position = scale(UDim2.new(0,i,0,0))
- t.Parent = Frame
- end
- elseif dir == nil or dir == 'Horizontal' then
- for i=0,size.y-1,spacing do
- local t = template:Clone()
- t.Size = scale(UDim2.new(0,size.x,0,1))
- t.Position = scale(UDim2.new(0,0,0,i))
- t.Parent = Frame
- end
- end
- return Frame
- end
- local mt = {
- __index = {
- GetScrollPercent = function(self)
- return self.ScrollIndex/(self.TotalSpace-self.VisibleSpace)
- end;
- CanScrollDown = function(self)
- return self.ScrollIndex + self.VisibleSpace < self.TotalSpace
- end;
- CanScrollUp = function(self)
- return self.ScrollIndex > 0
- end;
- ScrollDown = function(self)
- self.ScrollIndex = self.ScrollIndex + self.PageIncrement
- self:Update()
- end;
- ScrollUp = function(self)
- self.ScrollIndex = self.ScrollIndex - self.PageIncrement
- self:Update()
- end;
- ScrollTo = function(self,index)
- self.ScrollIndex = index
- self:Update()
- end;
- SetScrollPercent = function(self,percent)
- self.ScrollIndex = math.floor((self.TotalSpace - self.VisibleSpace)*percent + 0.5)
- self:Update()
- end;
- };
- }
- mt.__index.CanScrollRight = mt.__index.CanScrollDown
- mt.__index.CanScrollLeft = mt.__index.CanScrollUp
- mt.__index.ScrollLeft = mt.__index.ScrollUp
- mt.__index.ScrollRight = mt.__index.ScrollDown
- function ScrollBar(horizontal)
- -- create row scroll bar
- local ScrollFrame = Create('Frame',{
- Name = "ScrollFrame";
- Position = horizontal and UDim2.new(0,0,1,-GUI_SIZE) or UDim2.new(1,-GUI_SIZE,0,0);
- Size = horizontal and UDim2.new(1,0,0,GUI_SIZE) or UDim2.new(0,GUI_SIZE,1,0);
- BackgroundTransparency = 1;
- Create('ImageButton',{
- Name = "ScrollDown";
- Position = horizontal and UDim2.new(1,-GUI_SIZE,0,0) or UDim2.new(0,0,1,-GUI_SIZE);
- Size = UDim2.new(0, GUI_SIZE, 0, GUI_SIZE);
- BackgroundColor3 = GuiColor.Button;
- BorderColor3 = GuiColor.Border;
- --BorderSizePixel = 0;
- });
- Create('ImageButton',{
- Name = "ScrollUp";
- Size = UDim2.new(0, GUI_SIZE, 0, GUI_SIZE);
- BackgroundColor3 = GuiColor.Button;
- BorderColor3 = GuiColor.Border;
- --BorderSizePixel = 0;
- });
- Create('ImageButton',{
- Name = "ScrollBar";
- Size = horizontal and UDim2.new(1,-GUI_SIZE*2,1,0) or UDim2.new(1,0,1,-GUI_SIZE*2);
- Position = horizontal and UDim2.new(0,GUI_SIZE,0,0) or UDim2.new(0,0,0,GUI_SIZE);
- AutoButtonColor = false;
- BackgroundColor3 = Color3.new(0.94902, 0.94902, 0.94902);
- BorderColor3 = GuiColor.Border;
- --BorderSizePixel = 0;
- Create('ImageButton',{
- Name = "ScrollThumb";
- AutoButtonColor = false;
- Size = UDim2.new(0, GUI_SIZE, 0, GUI_SIZE);
- BackgroundColor3 = GuiColor.Button;
- BorderColor3 = GuiColor.Border;
- --BorderSizePixel = 0;
- });
- });
- })
- local graphicTemplate = Create('Frame',{
- Name="Graphic";
- BorderSizePixel = 0;
- BackgroundColor3 = GuiColor.Border;
- })
- local graphicSize = GUI_SIZE/2
- local ScrollDownFrame = ScrollFrame.ScrollDown
- local ScrollDownGraphic = ArrowGraphic(graphicSize,horizontal and 'Right' or 'Down',true,graphicTemplate)
- ScrollDownGraphic.Position = UDim2.new(0.5,-graphicSize/2,0.5,-graphicSize/2)
- ScrollDownGraphic.Parent = ScrollDownFrame
- local ScrollUpFrame = ScrollFrame.ScrollUp
- local ScrollUpGraphic = ArrowGraphic(graphicSize,horizontal and 'Left' or 'Up',true,graphicTemplate)
- ScrollUpGraphic.Position = UDim2.new(0.5,-graphicSize/2,0.5,-graphicSize/2)
- ScrollUpGraphic.Parent = ScrollUpFrame
- local ScrollBarFrame = ScrollFrame.ScrollBar
- local ScrollThumbFrame = ScrollBarFrame.ScrollThumb
- do
- local size = GUI_SIZE*3/8
- local Decal = GripGraphic(Vector2.new(size,size),horizontal and 'Vertical' or 'Horizontal',2,graphicTemplate)
- Decal.Position = UDim2.new(0.5,-size/2,0.5,-size/2)
- Decal.Parent = ScrollThumbFrame
- end
- local Class = setmetatable({
- GUI = ScrollFrame;
- ScrollIndex = 0;
- VisibleSpace = 0;
- TotalSpace = 0;
- PageIncrement = 1;
- },mt)
- local UpdateScrollThumb
- if horizontal then
- function UpdateScrollThumb()
- ScrollThumbFrame.Size = UDim2.new(Class.VisibleSpace/Class.TotalSpace,0,0,GUI_SIZE)
- if ScrollThumbFrame.AbsoluteSize.x < GUI_SIZE then
- ScrollThumbFrame.Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE)
- end
- local barSize = ScrollBarFrame.AbsoluteSize.x
- ScrollThumbFrame.Position = UDim2.new(Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.x)/barSize,0,0,0)
- end
- else
- function UpdateScrollThumb()
- ScrollThumbFrame.Size = UDim2.new(0,GUI_SIZE,Class.VisibleSpace/Class.TotalSpace,0)
- if ScrollThumbFrame.AbsoluteSize.y < GUI_SIZE then
- ScrollThumbFrame.Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE)
- end
- local barSize = ScrollBarFrame.AbsoluteSize.y
- ScrollThumbFrame.Position = UDim2.new(0,0,Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.y)/barSize,0)
- end
- end
- local lastDown
- local lastUp
- local scrollStyle = {BackgroundColor3=GuiColor.Border,BackgroundTransparency=0}
- local scrollStyle_ds = {BackgroundColor3=GuiColor.Border,BackgroundTransparency=0.7}
- local function Update()
- local t = Class.TotalSpace
- local v = Class.VisibleSpace
- local s = Class.ScrollIndex
- if v <= t then
- if s > 0 then
- if s + v > t then
- Class.ScrollIndex = t - v
- end
- else
- Class.ScrollIndex = 0
- end
- else
- Class.ScrollIndex = 0
- end
- if Class.UpdateCallback then
- if Class.UpdateCallback(Class) == false then
- return
- end
- end
- local down = Class:CanScrollDown()
- local up = Class:CanScrollUp()
- if down ~= lastDown then
- lastDown = down
- ScrollDownFrame.Active = down
- ScrollDownFrame.AutoButtonColor = down
- local children = ScrollDownGraphic:GetChildren()
- local style = down and scrollStyle or scrollStyle_ds
- for i = 1,#children do
- Create(children[i],style)
- end
- end
- if up ~= lastUp then
- lastUp = up
- ScrollUpFrame.Active = up
- ScrollUpFrame.AutoButtonColor = up
- local children = ScrollUpGraphic:GetChildren()
- local style = up and scrollStyle or scrollStyle_ds
- for i = 1,#children do
- Create(children[i],style)
- end
- end
- ScrollThumbFrame.Visible = down or up
- UpdateScrollThumb()
- end
- Class.Update = Update
- SetZIndexOnChanged(ScrollFrame)
- local MouseDrag = Create('ImageButton',{
- Name = "MouseDrag";
- Position = UDim2.new(-0.25,0,-0.25,0);
- Size = UDim2.new(1.5,0,1.5,0);
- Transparency = 1;
- AutoButtonColor = false;
- Active = true;
- ZIndex = 10;
- })
- local scrollEventID = 0
- ScrollDownFrame.MouseButton1Down:connect(function()
- scrollEventID = tick()
- local current = scrollEventID
- local up_con
- up_con = MouseDrag.MouseButton1Up:connect(function()
- scrollEventID = tick()
- MouseDrag.Parent = nil
- ResetButtonColor(ScrollDownFrame)
- up_con:disconnect(); drag = nil
- end)
- MouseDrag.Parent = GetScreen(ScrollFrame)
- Class:ScrollDown()
- wait(0.2) -- delay before auto scroll
- while scrollEventID == current do
- Class:ScrollDown()
- if not Class:CanScrollDown() then break end
- wait()
- end
- end)
- ScrollDownFrame.MouseButton1Up:connect(function()
- scrollEventID = tick()
- end)
- ScrollUpFrame.MouseButton1Down:connect(function()
- scrollEventID = tick()
- local current = scrollEventID
- local up_con
- up_con = MouseDrag.MouseButton1Up:connect(function()
- scrollEventID = tick()
- MouseDrag.Parent = nil
- ResetButtonColor(ScrollUpFrame)
- up_con:disconnect(); drag = nil
- end)
- MouseDrag.Parent = GetScreen(ScrollFrame)
- Class:ScrollUp()
- wait(0.2)
- while scrollEventID == current do
- Class:ScrollUp()
- if not Class:CanScrollUp() then break end
- wait()
- end
- end)
- ScrollUpFrame.MouseButton1Up:connect(function()
- scrollEventID = tick()
- end)
- if horizontal then
- ScrollBarFrame.MouseButton1Down:connect(function(x,y)
- scrollEventID = tick()
- local current = scrollEventID
- local up_con
- up_con = MouseDrag.MouseButton1Up:connect(function()
- scrollEventID = tick()
- MouseDrag.Parent = nil
- ResetButtonColor(ScrollUpFrame)
- up_con:disconnect(); drag = nil
- end)
- MouseDrag.Parent = GetScreen(ScrollFrame)
- if x > ScrollThumbFrame.AbsolutePosition.x then
- Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
- wait(0.2)
- while scrollEventID == current do
- if x < ScrollThumbFrame.AbsolutePosition.x + ScrollThumbFrame.AbsoluteSize.x then break end
- Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
- wait()
- end
- else
- Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
- wait(0.2)
- while scrollEventID == current do
- if x > ScrollThumbFrame.AbsolutePosition.x then break end
- Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
- wait()
- end
- end
- end)
- else
- ScrollBarFrame.MouseButton1Down:connect(function(x,y)
- scrollEventID = tick()
- local current = scrollEventID
- local up_con
- up_con = MouseDrag.MouseButton1Up:connect(function()
- scrollEventID = tick()
- MouseDrag.Parent = nil
- ResetButtonColor(ScrollUpFrame)
- up_con:disconnect(); drag = nil
- end)
- MouseDrag.Parent = GetScreen(ScrollFrame)
- if y > ScrollThumbFrame.AbsolutePosition.y then
- Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
- wait(0.2)
- while scrollEventID == current do
- if y < ScrollThumbFrame.AbsolutePosition.y + ScrollThumbFrame.AbsoluteSize.y then break end
- Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace)
- wait()
- end
- else
- Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
- wait(0.2)
- while scrollEventID == current do
- if y > ScrollThumbFrame.AbsolutePosition.y then break end
- Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace)
- wait()
- end
- end
- end)
- end
- if horizontal then
- ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
- scrollEventID = tick()
- local mouse_offset = x - ScrollThumbFrame.AbsolutePosition.x
- local drag_con
- local up_con
- drag_con = MouseDrag.MouseMoved:connect(function(x,y)
- local bar_abs_pos = ScrollBarFrame.AbsolutePosition.x
- local bar_drag = ScrollBarFrame.AbsoluteSize.x - ScrollThumbFrame.AbsoluteSize.x
- local bar_abs_one = bar_abs_pos + bar_drag
- x = x - mouse_offset
- x = x < bar_abs_pos and bar_abs_pos or x > bar_abs_one and bar_abs_one or x
- x = x - bar_abs_pos
- Class:SetScrollPercent(x/(bar_drag))
- end)
- up_con = MouseDrag.MouseButton1Up:connect(function()
- scrollEventID = tick()
- MouseDrag.Parent = nil
- ResetButtonColor(ScrollThumbFrame)
- drag_con:disconnect(); drag_con = nil
- up_con:disconnect(); drag = nil
- end)
- MouseDrag.Parent = GetScreen(ScrollFrame)
- end)
- else
- ScrollThumbFrame.MouseButton1Down:connect(function(x,y)
- scrollEventID = tick()
- local mouse_offset = y - ScrollThumbFrame.AbsolutePosition.y
- local drag_con
- local up_con
- drag_con = MouseDrag.MouseMoved:connect(function(x,y)
- local bar_abs_pos = ScrollBarFrame.AbsolutePosition.y
- local bar_drag = ScrollBarFrame.AbsoluteSize.y - ScrollThumbFrame.AbsoluteSize.y
- local bar_abs_one = bar_abs_pos + bar_drag
- y = y - mouse_offset
- y = y < bar_abs_pos and bar_abs_pos or y > bar_abs_one and bar_abs_one or y
- y = y - bar_abs_pos
- Class:SetScrollPercent(y/(bar_drag))
- end)
- up_con = MouseDrag.MouseButton1Up:connect(function()
- scrollEventID = tick()
- MouseDrag.Parent = nil
- ResetButtonColor(ScrollThumbFrame)
- drag_con:disconnect(); drag_con = nil
- up_con:disconnect(); drag = nil
- end)
- MouseDrag.Parent = GetScreen(ScrollFrame)
- end)
- end
- function Class:Destroy()
- ScrollFrame:Destroy()
- MouseDrag:Destroy()
- for k in pairs(Class) do
- Class[k] = nil
- end
- setmetatable(Class,nil)
- end
- Update()
- return Class
- end
- end
- ----------------------------------------------------------------
- ----------------------------------------------------------------
- ----------------------------------------------------------------
- ----------------------------------------------------------------
- ---- Explorer panel
- local explorerPanel = script.Parent
- Create(explorerPanel,{
- BackgroundColor3 = GuiColor.Field;
- BorderColor3 = GuiColor.Border;
- Active = true;
- })
- local listFrame = Create('Frame',{
- Name = "List";
- BackgroundTransparency = 1;
- ClipsDescendants = true;
- Position = UDim2.new(0,0,0,HEADER_SIZE);
- Size = UDim2.new(1,-GUI_SIZE,1,-HEADER_SIZE);
- Parent = explorerPanel;
- })
- local scrollBar = ScrollBar(false)
- scrollBar.PageIncrement = 1
- Create(scrollBar.GUI,{
- Position = UDim2.new(1,-GUI_SIZE,0,HEADER_SIZE);
- Size = UDim2.new(0,GUI_SIZE,1,-HEADER_SIZE);
- Parent = explorerPanel;
- })
- local scrollBarH = ScrollBar(true)
- scrollBarH.PageIncrement = GUI_SIZE
- Create(scrollBarH.GUI,{
- Position = UDim2.new(0,0,1,-GUI_SIZE);
- Size = UDim2.new(1,-GUI_SIZE,0,GUI_SIZE);
- Visible = false;
- Parent = explorerPanel;
- })
- local headerFrame = Create('Frame',{
- Name = "Header";
- BackgroundColor3 = GuiColor.Background;
- BorderColor3 = GuiColor.Border;
- Position = UDim2.new(0,0,0,0);
- Size = UDim2.new(1,0,0,HEADER_SIZE);
- Parent = explorerPanel;
- Create('TextLabel',{
- Text = "Explorer";
- BackgroundTransparency = 1;
- TextColor3 = GuiColor.Text;
- TextXAlignment = 'Left';
- Font = FONT;
- FontSize = FONT_SIZE;
- Position = UDim2.new(0,4,0,0);
- Size = UDim2.new(1,-4,1,0);
- });
- })
- SetZIndexOnChanged(explorerPanel)
- local getTextWidth do
- local text = Create('TextLabel',{
- Name = "TextWidth";
- TextXAlignment = 'Left';
- TextYAlignment = 'Center';
- Font = FONT;
- FontSize = FONT_SIZE;
- Text = "";
- Position = UDim2.new(0,0,0,0);
- Size = UDim2.new(1,0,1,0);
- Visible = false;
- Parent = explorerPanel;
- })
- function getTextWidth(s)
- text.Text = s
- return text.TextBounds.x
- end
- end
- -- Holds the game tree converted to a list.
- local TreeList = {}
- -- Matches objects to their tree node representation.
- local NodeLookup = {}
- local nodeWidth = 0
- local updateList,rawUpdateList,updateScroll,rawUpdateSize do
- local function r(t)
- for i = 1,#t do
- TreeList[#TreeList+1] = t[i]
- local w = (t[i].Depth)*(2+ENTRY_PADDING+GUI_SIZE) + 2 + ENTRY_SIZE + 4 + getTextWidth(t[i].Object.Name) + 4
- if w > nodeWidth then
- nodeWidth = w
- end
- if t[i].Expanded then
- r(t[i])
- end
- end
- end
- function rawUpdateSize()
- scrollBarH.TotalSpace = nodeWidth
- scrollBarH.VisibleSpace = listFrame.AbsoluteSize.x
- scrollBarH:Update()
- local visible = scrollBarH:CanScrollDown() or scrollBarH:CanScrollUp()
- scrollBarH.GUI.Visible = visible
- listFrame.Size = UDim2.new(1,-GUI_SIZE,1,-GUI_SIZE*(visible and 1 or 0) - HEADER_SIZE)
- scrollBar.VisibleSpace = math.ceil(listFrame.AbsoluteSize.y/ENTRY_BOUND)
- scrollBar.GUI.Size = UDim2.new(0,GUI_SIZE,1,-GUI_SIZE*(visible and 1 or 0) - HEADER_SIZE)
- scrollBar.TotalSpace = #TreeList+1
- scrollBar:Update()
- end
- function rawUpdateList()
- -- Clear then repopulate the entire list. It appears to be fast enough.
- TreeList = {}
- nodeWidth = 0
- r(NodeLookup[Game])
- rawUpdateSize()
- end
- -- Adding or removing large models will cause many updates to occur. We
- -- can reduce the number of updates by creating a delay, then dropping any
- -- updates that occur during the delay.
- local updatingList = false
- function updateList()
- if updatingList then return end
- updatingList = true
- wait(0.25)
- updatingList = false
- rawUpdateList()
- end
- local updatingScroll = false
- function updateScroll()
- if updatingScroll then return end
- updatingScroll = true
- wait(0.25)
- updatingScroll = false
- scrollBar:Update()
- end
- end
- local Selection do
- local bindGetSelection = script.Parent:FindFirstChild("GetSelection")
- if not bindGetSelection then
- bindGetSelection = Create('BindableFunction',{Name = "GetSelection"})
- bindGetSelection.Parent = script.Parent
- end
- local bindSetSelection = script.Parent:FindFirstChild("SetSelection")
- if not bindSetSelection then
- bindSetSelection = Create('BindableFunction',{Name = "SetSelection"})
- bindSetSelection.Parent = script.Parent
- end
- local bindSelectionChanged = script.Parent:FindFirstChild("SelectionChanged")
- if not bindSelectionChanged then
- bindSelectionChanged = Create('BindableEvent',{Name = "SelectionChanged"})
- bindSelectionChanged.Parent = script.Parent
- end
- local SelectionList = {}
- local SelectionSet = {}
- Selection = {
- Selected = SelectionSet;
- List = SelectionList;
- }
- local function addObject(object)
- -- list update
- local lupdate = false
- -- scroll update
- local supdate = false
- if not SelectionSet[object] then
- local node = NodeLookup[object]
- if node then
- table.insert(SelectionList,object)
- SelectionSet[object] = true
- node.Selected = true
- -- expand all ancestors so that selected node becomes visible
- node = node.Parent
- while node do
- if not node.Expanded then
- node.Expanded = true
- lupdate = true
- end
- node = node.Parent
- end
- supdate = true
- end
- end
- return lupdate,supdate
- end
- function Selection:Set(objects)
- local lupdate = false
- local supdate = false
- if #SelectionList > 0 then
- for i = 1,#SelectionList do
- local object = SelectionList[i]
- local node = NodeLookup[object]
- if node then
- node.Selected = false
- SelectionSet[object] = nil
- end
- end
- SelectionList = {}
- Selection.List = SelectionList
- supdate = true
- end
- for i = 1,#objects do
- local l,s = addObject(objects[i])
- lupdate = l or lupdate
- supdate = s or supdate
- end
- if lupdate then
- rawUpdateList()
- supdate = true
- elseif supdate then
- scrollBar:Update()
- end
- if supdate then
- bindSelectionChanged:Fire()
- end
- end
- function Selection:Add(object)
- local l,s = addObject(object)
- if l then
- rawUpdateList()
- bindSelectionChanged:Fire()
- elseif s then
- scrollBar:Update()
- bindSelectionChanged:Fire()
- end
- end
- function Selection:Remove(object,noupdate)
- if SelectionSet[object] then
- local node = NodeLookup[object]
- if node then
- node.Selected = false
- SelectionSet[object] = nil
- for i = 1,#SelectionList do
- if SelectionList[i] == object then
- table.remove(SelectionList,i)
- break
- end
- end
- if not noupdate then
- scrollBar:Update()
- end
- bindSelectionChanged:Fire()
- end
- end
- end
- function Selection:Get()
- local list = {}
- for i = 1,#SelectionList do
- list[i] = SelectionList[i]
- end
- return list
- end
- bindSetSelection.OnInvoke = function(...)
- Selection:Set(...)
- end
- bindGetSelection.OnInvoke = function()
- return Selection:Get()
- end
- end
- local function cancelReparentDrag()end
- local function cancelSelectDrag()end
- do
- local listEntries = {}
- local nameConnLookup = {}
- local mouseDrag = Create('ImageButton',{
- Name = "MouseDrag";
- Position = UDim2.new(-0.25,0,-0.25,0);
- Size = UDim2.new(1.5,0,1.5,0);
- Transparency = 1;
- AutoButtonColor = false;
- Active = true;
- ZIndex = 10;
- })
- local function dragSelect(last,add,button)
- local connDrag
- local conUp
- conDrag = mouseDrag.MouseMoved:connect(function(x,y)
- local pos = Vector2.new(x,y) - listFrame.AbsolutePosition
- local size = listFrame.AbsoluteSize
- if pos.x < 0 or pos.x > size.x or pos.y < 0 or pos.y > size.y then return end
- local i = math.ceil(pos.y/ENTRY_BOUND) + scrollBar.ScrollIndex
- -- Mouse may have made a large step, so interpolate between the
- -- last index and the current.
- for n = i<last and i or last, i>last and i or last do
- local node = TreeList[n]
- if node then
- if add then
- Selection:Add(node.Object)
- else
- Selection:Remove(node.Object)
- end
- end
- end
- last = i
- end)
- function cancelSelectDrag()
- mouseDrag.Parent = nil
- conDrag:disconnect()
- conUp:disconnect()
- function cancelSelectDrag()end
- end
- conUp = mouseDrag[button]:connect(cancelSelectDrag)
- mouseDrag.Parent = GetScreen(listFrame)
- end
- local function dragReparent(object,dragGhost,clickPos,ghostOffset)
- local connDrag
- local conUp
- local conUp2
- local parentIndex = nil
- local dragged = false
- local parentHighlight = Create('Frame',{
- Transparency = 1;
- Visible = false;
- Create('Frame',{
- BorderSizePixel = 0;
- BackgroundColor3 = Color3.new(0,0,0);
- BackgroundTransparency = 0.1;
- Position = UDim2.new(0,0,0,0);
- Size = UDim2.new(1,0,0,1);
- });
- Create('Frame',{
- BorderSizePixel = 0;
- BackgroundColor3 = Color3.new(0,0,0);
- BackgroundTransparency = 0.1;
- Position = UDim2.new(1,0,0,0);
- Size = UDim2.new(0,1,1,0);
- });
- Create('Frame',{
- BorderSizePixel = 0;
- BackgroundColor3 = Color3.new(0,0,0);
- BackgroundTransparency = 0.1;
- Position = UDim2.new(0,0,1,0);
- Size = UDim2.new(1,0,0,1);
- });
- Create('Frame',{
- BorderSizePixel = 0;
- BackgroundColor3 = Color3.new(0,0,0);
- BackgroundTransparency = 0.1;
- Position = UDim2.new(0,0,0,0);
- Size = UDim2.new(0,1,1,0);
- });
- })
- SetZIndex(parentHighlight,9)
- conDrag = mouseDrag.MouseMoved:connect(function(x,y)
- local dragPos = Vector2.new(x,y)
- if dragged then
- local pos = dragPos - listFrame.AbsolutePosition
- local size = listFrame.AbsoluteSize
- parentIndex = nil
- parentHighlight.Visible = false
- if pos.x >= 0 and pos.x <= size.x and pos.y >= 0 and pos.y <= size.y then
- local i = math.ceil(pos.y/ENTRY_BOUND)
- local node = TreeList[i + scrollBar.ScrollIndex]
- if node and node.Object ~= object and not object:IsAncestorOf(node.Object) then
- parentIndex = i
- local entry = listEntries[i]
- if entry then
- parentHighlight.Visible = true
- parentHighlight.Position = UDim2.new(0,1,0,entry.AbsolutePosition.y-listFrame.AbsolutePosition.y)
- parentHighlight.Size = UDim2.new(0,size.x-4,0,entry.AbsoluteSize.y)
- end
- end
- end
- dragGhost.Position = UDim2.new(0,dragPos.x+ghostOffset.x,0,dragPos.y+ghostOffset.y)
- elseif (clickPos-dragPos).magnitude > 8 then
- dragged = true
- SetZIndex(dragGhost,9)
- dragGhost.IndentFrame.Transparency = 0.25
- dragGhost.IndentFrame.EntryText.TextColor3 = GuiColor.TextSelected
- dragGhost.Position = UDim2.new(0,dragPos.x+ghostOffset.x,0,dragPos.y+ghostOffset.y)
- dragGhost.Parent = GetScreen(listFrame)
- parentHighlight.Parent = listFrame
- end
- end)
- function cancelReparentDrag()
- mouseDrag.Parent = nil
- conDrag:disconnect()
- conUp:disconnect()
- conUp2:disconnect()
- dragGhost:Destroy()
- parentHighlight:Destroy()
- function cancelReparentDrag()end
- end
- local wasSelected = Selection.Selected[object]
- if not wasSelected and Option.Selectable then
- Selection:Set({object})
- end
- conUp = mouseDrag.MouseButton1Up:connect(function()
- cancelReparentDrag()
- if dragged then
- if parentIndex then
- local parentNode = TreeList[parentIndex + scrollBar.ScrollIndex]
- if parentNode then
- parentNode.Expanded = true
- local parentObj = parentNode.Object
- local function parent(a,b)
- a.Parent = b
- end
- if Option.Selectable then
- local list = Selection.List
- for i = 1,#list do
- pcall(parent,list[i],parentObj)
- end
- else
- pcall(parent,object,parentObj)
- end
- end
- end
- else
- -- do selection click
- if wasSelected and Option.Selectable then
- Selection:Set({})
- end
- end
- end)
- conUp2 = mouseDrag.MouseButton2Down:connect(function()
- cancelReparentDrag()
- end)
- mouseDrag.Parent = GetScreen(listFrame)
- end
- local entryTemplate = Create('ImageButton',{
- Name = "Entry";
- Transparency = 1;
- AutoButtonColor = false;
- Position = UDim2.new(0,0,0,0);
- Size = UDim2.new(1,0,0,ENTRY_SIZE);
- Create('Frame',{
- Name = "IndentFrame";
- BackgroundTransparency = 1;
- BackgroundColor3 = GuiColor.Selected;
- BorderColor3 = GuiColor.BorderSelected;
- Position = UDim2.new(0,0,0,0);
- Size = UDim2.new(1,0,1,0);
- Create(Icon('ImageButton',0),{
- Name = "Expand";
- AutoButtonColor = false;
- Position = UDim2.new(0,-GUI_SIZE,0.5,-GUI_SIZE/2);
- Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE);
- });
- Create(Icon(nil,0),{
- Name = "ExplorerIcon";
- Position = UDim2.new(0,2+ENTRY_PADDING,0.5,-GUI_SIZE/2);
- Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE);
- });
- Create('TextLabel',{
- Name = "EntryText";
- BackgroundTransparency = 1;
- TextColor3 = GuiColor.Text;
- TextXAlignment = 'Left';
- TextYAlignment = 'Center';
- Font = FONT;
- FontSize = FONT_SIZE;
- Text = "";
- Position = UDim2.new(0,2+ENTRY_SIZE+4,0,0);
- Size = UDim2.new(1,-2,1,0);
- });
- });
- })
- function scrollBar.UpdateCallback(self)
- for i = 1,self.VisibleSpace do
- local node = TreeList[i + self.ScrollIndex]
- if node then
- local entry = listEntries[i]
- if not entry then
- entry = Create(entryTemplate:Clone(),{
- Position = UDim2.new(0,2,0,ENTRY_BOUND*(i-1)+2);
- Size = UDim2.new(0,nodeWidth,0,ENTRY_SIZE);
- ZIndex = listFrame.ZIndex;
- })
- listEntries[i] = entry
- local expand = entry.IndentFrame.Expand
- expand.MouseEnter:connect(function()
- local node = TreeList[i + self.ScrollIndex]
- if #node > 0 then
- if node.Expanded then
- Icon(expand,NODE_EXPANDED_OVER)
- else
- Icon(expand,NODE_COLLAPSED_OVER)
- end
- end
- end)
- expand.MouseLeave:connect(function()
- local node = TreeList[i + self.ScrollIndex]
- if #node > 0 then
- if node.Expanded then
- Icon(expand,NODE_EXPANDED)
- else
- Icon(expand,NODE_COLLAPSED)
- end
- end
- end)
- expand.MouseButton1Down:connect(function()
- local node = TreeList[i + self.ScrollIndex]
- if #node > 0 then
- node.Expanded = not node.Expanded
- -- use raw update so the list updates instantly
- rawUpdateList()
- end
- end)
- entry.MouseButton1Down:connect(function(x,y)
- local node = TreeList[i + self.ScrollIndex]
- if Option.Modifiable then
- local pos = Vector2.new(x,y)
- dragReparent(node.Object,entry:Clone(),pos,entry.AbsolutePosition-pos)
- elseif Option.Selectable then
- if Selection.Selected[node.Object] then
- Selection:Set({})
- else
- Selection:Set({node.Object})
- end
- dragSelect(i+self.ScrollIndex,true,'MouseButton1Up')
- end
- end)
- entry.MouseButton2Down:connect(function()
- if not Option.Selectable then return end
- local node = TreeList[i + self.ScrollIndex]
- if Selection.Selected[node.Object] then
- Selection:Remove(node.Object)
- dragSelect(i+self.ScrollIndex,false,'MouseButton2Up')
- else
- Selection:Add(node.Object)
- dragSelect(i+self.ScrollIndex,true,'MouseButton2Up')
- end
- end)
- entry.Parent = listFrame
- end
- entry.Visible = true
- local object = node.Object
- -- update expand icon
- if #node == 0 then
- entry.IndentFrame.Expand.Visible = false
- elseif node.Expanded then
- Icon(entry.IndentFrame.Expand,NODE_EXPANDED)
- entry.IndentFrame.Expand.Visible = true
- else
- Icon(entry.IndentFrame.Expand,NODE_COLLAPSED)
- entry.IndentFrame.Expand.Visible = true
- end
- -- update explorer icon
- Icon(entry.IndentFrame.ExplorerIcon,ExplorerIndex[object.ClassName] or 0)
- -- update indentation
- local w = (node.Depth)*(2+ENTRY_PADDING+GUI_SIZE)
- entry.IndentFrame.Position = UDim2.new(0,w,0,0)
- entry.IndentFrame.Size = UDim2.new(1,-w,1,0)
- -- update name change detection
- if nameConnLookup[entry] then
- nameConnLookup[entry]:disconnect()
- end
- local text = entry.IndentFrame.EntryText
- text.Text = object.Name
- nameConnLookup[entry] = node.Object.Changed:connect(function(p)
- if p == 'Name' then
- text.Text = object.Name
- end
- end)
- -- update selection
- entry.IndentFrame.Transparency = node.Selected and 0 or 1
- text.TextColor3 = GuiColor[node.Selected and 'TextSelected' or 'Text']
- entry.Size = UDim2.new(0,nodeWidth,0,ENTRY_SIZE)
- elseif listEntries[i] then
- listEntries[i].Visible = false
- end
- end
- for i = self.VisibleSpace+1,self.TotalSpace do
- local entry = listEntries[i]
- if entry then
- listEntries[i] = nil
- entry:Destroy()
- end
- end
- end
- function scrollBarH.UpdateCallback(self)
- for i = 1,scrollBar.VisibleSpace do
- local node = TreeList[i + scrollBar.ScrollIndex]
- if node then
- local entry = listEntries[i]
- if entry then
- entry.Position = UDim2.new(0,2 - scrollBarH.ScrollIndex,0,ENTRY_BOUND*(i-1)+2)
- end
- end
- end
- end
- Connect(listFrame.Changed,function(p)
- if p == 'AbsoluteSize' then
- rawUpdateSize()
- end
- end)
- local wheelAmount = 6
- explorerPanel.MouseWheelForward:connect(function()
- if scrollBar.VisibleSpace - 1 > wheelAmount then
- scrollBar:ScrollTo(scrollBar.ScrollIndex - wheelAmount)
- else
- scrollBar:ScrollTo(scrollBar.ScrollIndex - scrollBar.VisibleSpace)
- end
- end)
- explorerPanel.MouseWheelBackward:connect(function()
- if scrollBar.VisibleSpace - 1 > wheelAmount then
- scrollBar:ScrollTo(scrollBar.ScrollIndex + wheelAmount)
- else
- scrollBar:ScrollTo(scrollBar.ScrollIndex + scrollBar.VisibleSpace)
- end
- end)
- end
- ----------------------------------------------------------------
- ----------------------------------------------------------------
- ----------------------------------------------------------------
- ----------------------------------------------------------------
- ---- Object detection
- -- Inserts `v` into `t` at `i`. Also sets `Index` field in `v`.
- local function insert(t,i,v)
- for n = #t,i,-1 do
- local v = t[n]
- v.Index = n+1
- t[n+1] = v
- end
- v.Index = i
- t[i] = v
- end
- -- Removes `i` from `t`. Also sets `Index` field in removed value.
- local function remove(t,i)
- local v = t[i]
- for n = i+1,#t do
- local v = t[n]
- v.Index = n-1
- t[n-1] = v
- end
- t[#t] = nil
- v.Index = 0
- return v
- end
- -- Returns how deep `o` is in the tree.
- local function depth(o)
- local d = -1
- while o do
- o = o.Parent
- d = d + 1
- end
- return d
- end
- local connLookup = {}
- -- Returns whether a node would be present in the tree list
- local function nodeIsVisible(node)
- local visible = true
- node = node.Parent
- while node and visible do
- visible = visible and node.Expanded
- node = node.Parent
- end
- return visible
- end
- -- Removes an object's tree node. Called when the object stops existing in the
- -- game tree.
- local function removeObject(object)
- local objectNode = NodeLookup[object]
- if not objectNode then
- return
- end
- local visible = nodeIsVisible(objectNode)
- Selection:Remove(object,true)
- local parent = objectNode.Parent
- remove(parent,objectNode.Index)
- NodeLookup[object] = nil
- connLookup[object]:disconnect()
- connLookup[object] = nil
- if visible then
- updateList()
- elseif nodeIsVisible(parent) then
- updateScroll()
- end
- end
- -- Moves a tree node to a new parent. Called when an existing object's parent
- -- changes.
- local function moveObject(object,parent)
- local objectNode = NodeLookup[object]
- if not objectNode then
- return
- end
- local parentNode = NodeLookup[parent]
- if not parentNode then
- return
- end
- local visible = nodeIsVisible(objectNode)
- remove(objectNode.Parent,objectNode.Index)
- objectNode.Parent = parentNode
- objectNode.Depth = depth(object)
- local function r(node,d)
- for i = 1,#node do
- node[i].Depth = d
- r(node[i],d+1)
- end
- end
- r(objectNode,objectNode.Depth+1)
- insert(parentNode,#parentNode+1,objectNode)
- if visible or nodeIsVisible(objectNode) then
- updateList()
- elseif nodeIsVisible(objectNode.Parent) then
- updateScroll()
- end
- end
- -- ScriptContext['/Libraries/LibraryRegistration/LibraryRegistration']
- -- This RobloxLocked object lets me index its properties for some reason
- local function check(object)
- return object.AncestryChanged
- end
- -- Creates a new tree node from an object. Called when an object starts
- -- existing in the game tree.
- local function addObject(object,noupdate)
- if script then
- -- protect against naughty RobloxLocked objects
- local s = pcall(check,object)
- if not s then
- return
- end
- end
- local parentNode = NodeLookup[object.Parent]
- if not parentNode then
- return
- end
- local objectNode = {
- Object = object;
- Parent = parentNode;
- Index = 0;
- Expanded = false;
- Selected = false;
- Depth = depth(object);
- }
- connLookup[object] = Connect(object.AncestryChanged,function(c,p)
- if c == object then
- if p == nil then
- removeObject(c)
- else
- moveObject(c,p)
- end
- end
- end)
- NodeLookup[object] = objectNode
- insert(parentNode,#parentNode+1,objectNode)
- if not noupdate then
- if nodeIsVisible(objectNode) then
- updateList()
- elseif nodeIsVisible(objectNode.Parent) then
- updateScroll()
- end
- end
- end
- do
- NodeLookup[Game] = {
- Object = Game;
- Parent = nil;
- Index = 0;
- Expanded = true;
- }
- Connect(Game.DescendantAdded,addObject)
- Connect(Game.DescendantRemoving,removeObject)
- local function get(o)
- return o:GetChildren()
- end
- local function r(o)
- local s,children = pcall(get,o)
- if s then
- for i = 1,#children do
- addObject(children[i],true)
- r(children[i])
- end
- end
- end
- r(Game)
- scrollBar.VisibleSpace = math.ceil(listFrame.AbsoluteSize.y/ENTRY_BOUND)
- updateList()
- end
- ----------------------------------------------------------------
- ----------------------------------------------------------------
- ----------------------------------------------------------------
- ----------------------------------------------------------------
- ---- Actions
- local actionButtons do
- actionButtons = {}
- local totalActions = (4) + 1
- local currentActions = totalActions
- local function makeButton(icon,over,name)
- local button = Create(Icon('ImageButton',icon),{
- Name = name .. "Button";
- Visible = Option.Modifiable and Option.Selectable;
- Position = UDim2.new(1,-(GUI_SIZE+2)*currentActions+2,0.5,-GUI_SIZE/2);
- Size = UDim2.new(0,GUI_SIZE,0,GUI_SIZE);
- Parent = headerFrame;
- })
- local tipText = Create('TextLabel',{
- Name = name .. "Text";
- Text = name;
- Visible = false;
- BackgroundTransparency = 1;
- TextXAlignment = 'Right';
- Font = FONT;
- FontSize = FONT_SIZE;
- Position = UDim2.new(0,0,0,0);
- Size = UDim2.new(1,-(GUI_SIZE+2)*totalActions,1,0);
- Parent = headerFrame;
- })
- button.MouseEnter:connect(function()
- Icon(button,over)
- tipText.Visible = true
- end)
- button.MouseLeave:connect(function()
- Icon(button,icon)
- tipText.Visible = false
- end)
- currentActions = currentActions - 1
- actionButtons[#actionButtons+1] = button
- return button
- end
- local clipboard = {}
- local function delete(o)
- o.Parent = nil
- end
- -- CUT
- makeButton(ACTION_CUT,ACTION_CUT_OVER,"Cut").MouseButton1Click:connect(function()
- if not Option.Modifiable then return end
- clipboard = {}
- local list = Selection.List
- local cut = {}
- for i = 1,#list do
- local obj = list[i]:Clone()
- if obj then
- table.insert(clipboard,obj)
- table.insert(cut,list[i])
- end
- end
- for i = 1,#cut do
- pcall(delete,cut[i])
- end
- end)
- -- COPY
- makeButton(ACTION_COPY,ACTION_COPY_OVER,"Copy").MouseButton1Click:connect(function()
- if not Option.Modifiable then return end
- clipboard = {}
- local list = Selection.List
- for i = 1,#list do
- table.insert(clipboard,list[i]:Clone())
- end
- end)
- -- PASTE
- makeButton(ACTION_PASTE,ACTION_PASTE_OVER,"Paste").MouseButton1Click:connect(function()
- if not Option.Modifiable then return end
- local parent = Selection.List[1] or Workspace
- for i = 1,#clipboard do
- clipboard[i]:Clone().Parent = parent
- end
- end)
- -- DELETE
- makeButton(ACTION_DELETE,ACTION_DELETE_OVER,"Delete").MouseButton1Click:connect(function()
- if not Option.Modifiable then return end
- local list = Selection:Get()
- for i = 1,#list do
- pcall(delete,list[i])
- end
- Selection:Set({})
- end)
- -- SORT
- -- local actionSort = makeButton(ACTION_SORT,ACTION_SORT_OVER,"Sort")
- end
- ----------------------------------------------------------------
- ----------------------------------------------------------------
- ----------------------------------------------------------------
- ----------------------------------------------------------------
- ---- Option Bindables
- do
- local optionCallback = {
- Modifiable = function(value)
- for i = 1,#actionButtons do
- actionButtons[i].Visible = value and Option.Selectable
- end
- cancelReparentDrag()
- end;
- Selectable = function(value)
- for i = 1,#actionButtons do
- actionButtons[i].Visible = value and Option.Modifiable
- end
- cancelSelectDrag()
- Selection:Set({})
- end;
- }
- local bindSetOption = script.Parent:FindFirstChild("SetOption")
- if not bindSetOption then
- bindSetOption = Create('BindableFunction',{Name = "SetOption"})
- bindSetOption.Parent = script.Parent
- end
- bindSetOption.OnInvoke = function(optionName,value)
- if optionCallback[optionName] then
- Option[optionName] = value
- optionCallback[optionName](value)
- end
- end
- local bindGetOption = script.Parent:FindFirstChild("GetOption")
- if not bindGetOption then
- bindGetOption = Create('BindableFunction',{Name = "GetOption"})
- bindGetOption.Parent = script.Parent
- end
- bindGetOption.OnInvoke = function(optionName)
- if optionName then
- return Option[optionName]
- else
- local options = {}
- for k,v in pairs(Option) do
- options[k] = v
- end
- return options
- end
- end
- end
- end))
- BindableEvent3.Name = "SelectionChanged"
- BindableEvent3.Parent = Frame1
- BindableFunction4.Name = "SetOption"
- BindableFunction4.Parent = Frame1
- BindableFunction5.Name = "SetSelection"
- BindableFunction5.Parent = Frame1
- BindableFunction6.Name = "GetOption"
- BindableFunction6.Parent = Frame1
- BindableFunction7.Name = "GetSelection"
- BindableFunction7.Parent = Frame1
- Frame8.Name = "PropertiesPanel"
- Frame8.Parent = ScreenGui0
- Frame8.Transparency = 0.10000000149012
- Frame8.Size = UDim2.new(0, 300, 0.5, 0)
- Frame8.Position = UDim2.new(1, -308, 0.5, 0)
- Frame8.Active = true
- Frame8.BackgroundColor3 = Color3.new(1, 1, 1)
- Frame8.BackgroundTransparency = 0.10000000149012
- Frame8.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
- Frame8.Draggable = true
- LocalScript9.Name = "Properties"
- LocalScript9.Parent = Frame8
- table.insert(cors,sandbox(LocalScript9,function()
- wait(1)
- -- I did not try and make this efficient. I tried to make it work. #winning
- local gui = script.Parent.Parent:WaitForChild("ExplorerPanel")
- gui:WaitForChild("List")
- gui:WaitForChild("SelectionChanged")
- print("Gui loaded!")
- local Object = nil
- local prop = script.Parent
- local Properties = {
- "AbsolutePosition", "AbsoluteSize", "AbsoluteAge", "AbsoluteAgeReplicate","Active","Andornee", "AllowAmbientOcclusion","AllowTeamChangeOnTouch","AluminumQuality", "Ambient", "AmbientReverb","Anchored","Angularvelocity","AppearanceDidLoad","Archivable","AreHingesDetected","AttachmentForward","AttachmentPoint","AttachmentPos","AttachmentRight","AttachmentUp","AutoAssignable","AutoButtonColo","AutoColorCharacters","AvaliblePhisicalMemory","Axes",
- "BackgroundColor","Backgroundcolor3","BackgroundTransparency","BaseTextureId","BaseUrl","Bevel","Bevel Roundness","BinType","BlastPressure","BlastRadius","BodyColor","BodyPart","BorderColor","BorderColor3","BorderSizePixel","BrickColor","Brightness","Browsable","BubbleChat","BubbleChatLifetime","BubbleChatMaxBubbles","Bulge","Button1DownConnectionCount","Button1UpConnectionCount","Button2DownConnectionCount","Button2UpConnectionCount",
- "C0","C1","CameraMode","CameraSubject","CameraType","CanBeDropped","CanCollide","CartoonFactor","CastShadows","CelestialBodiesShown","CFrame","Cframe","Character","CharacterApperance","CharacterAutoLoads","ChatMode","ChatScrollLength","ClassicChar","ClearTextOnFocus","ClipsDescendants","CollisionSoundEnabled","CollisionSoundVolume","Color","ColorShift Bottom","ColorShift Top","ConstrainedValue","ControllingHumanoid","ControlMode","ConversationDistance","CordinateFrame","CorrodedMetalQuality","CPU","CpuCount","CpuSpeed","CreatorId","CreatorType","CurrentAngle","CurrentCamera","CycleOffset",
- "D","DataCap","DataComplexity","DataComplexityLimit","DataCost","DataReady","Deprecated","DeselectedConnectionCount","DesiredAngle","Disabled","DiamondPlateQuality","DistanceFactor","DistributedGameTime","DropplerScale","Draggable","DraggingV1","Duration",
- "EditorFont","EditorFontSize","EditorTabWidth","ElapsedTime","Elasticity","Enabled","ExplosionType","ExtentsOffset",
- "F0","F1","F2","F3","Face","FaceId","Faces","FieldOfView","Focus","FogColor","FogEnd","FogStart","Font","FontSize","Force","FormFactor","Friction","From",
- "GearGenreSetting","Genre","GreographicalLatitude","GetCanRedo","GetCanUndo","GfxCard","Graphic","GrassQuality","Grip","GripForward","GripPos","GripRight","GripUp","Guest",
- "HasBuildTools","HeadsUpDisplay","Health","Heat","Hit","Humanoid",
- "IceQuality","Icon","IdleConnectionCount","Image","InitialPrompt","InOut","InUse","InModalDialog","IsPaused","IsPlaying","IsWindows",
- "JobId","Jump",
- "KeyDownConnectionCount","KeyUpConnectionCount",
- "LeftLeg","LeftRight","LinkedSource","LocalPlayer","Location","Locked","LODX","LODY","Looped",
- "Material","MaxActivationDistace","MaxCollisionSounds","MaxExtents","MaxForce","MaxHealth","MaxItems","MaxPlayers","MaxSpeed","MaxThrust","MaxTorque","MaxValue","MaxVelocity","MembershipType","MembershipTypeReplicate","MeshId","MeshType","MinValue","Modal","MouseButton1ClickConnectionCount","MouseButton1DownConnectionCount","MouseButton2ClickConnectionCount","MouseButton2DownConnectionCount","MouseButton2UpConnectionCount","MouseDelta","MouseDragConnectionCount","MouseEnterConnectionCount","MouseHit","MouseLeaveConnectionCount","MouseLock","MouseTarget","MouseTargetFilter","MouseTargetSurface","MoveConnectionCount","MoveState","MultiLine",
- "Name","NameOcclusion","NetworkOwner","Nutral","NumPlayers",
- "Offset","Opacity","Origin","OsPlatform","OsVer","OverlayTextureId",
- "P","PantsTemplate","ParamA","ParamB","Part0","Part1","PersonalServerRank","Pitch","PixelShaderModel","PlaceId","PlasticQuality","PlatformStand","PlayCount","PlaterToHideFrom","PlayOnRemove","Point","Port","Position","Preliminary","PrimaryPart","PrivateWorkingSetBytes","Purpose",
- "RAM","RBX.lua.BevelMesh","RBX.lua.BlockMesh","RBX.lua.ChangingHistoryService","RBX.lua.ContentProvider","RBX.lua.CylinderMesh","RBX.lua.DataModelMesh","RBX.lua.DoubleConstrainedValue","RBX.lua.FileMesh","RBX.lua.Game Options","RBX.lua.GameSettings","RBX.lua.HopperBin","RBX.lua.Humanoid","RBX.lua.IntConstrainedValue","RBX.lua.PlayerMouse","RBX.lua.ReflectionMetadataClass","RBX.lua.ReflectorMetadataItem","RBX.lua.ReflectionMetadataMember","RBX.lua.RenderSettings","RBX.lua.ShirtGraphic","RBX.lua.Sound","RBX.lua.SoundService","RBX.lua.SpecialMesh","RBX.lua.StockSound","RBX.lua.TextBox",
- "Reflectance","ReplicatedSelectedConnectionCount","ResizeableFaces","ResizeIncrement","Resolution","ResponceDialog","RightLeg","RiseVelocity","RobloxLocked","RobloxVersion","RolloffScale","RotVelocity",
- "Scale","Score","ScriptsDisabled","SecondaryColor","Selected","SetRoll","ShadowColor","Shape","Shiny","ShirtTemplate","ShowDeprecatedObjects","ShowDevelopmentGui","ShowLegacyPlayerList","ShowPreliminaryObjects","Sides","Sit","Size","SizeConstraint","SizeOffset","SkinColor","SkyboxBk","SkyboxDn","SkyboxFt","SkyboxLf","SkyboxRt","SkyboxUp","SlateQuality","SoundId","Source","SparkleColor","SpecificGravity","Specular","StarCount","Steer","StickWheels","StudsBetweenTextures","StudsOffset","StudsPerTileU","StudsPerTileV","Stlye","Summary","SuperSafeChatReplicate","Surface","Surface0","Surface1","SurfaceInput",
- "TextButton","TextLabel","TouchTransmitter","Target","TargetFilter","TargetOffset","TargetPoint","TargetRadius","TargetSurface","TeamColor","Terrain","Text","TextBounds","TextColor","TextColor3","TextFits","TextScaled","TextStrokeColor3","TextStrokeTransparency","TextTransparency","Texture","TextureId","TextureSize","TextWrap","TextWrapped","TextXAlignment","TextYAlignment","Throttle","ThrustD","ThrustP","Ticket","Time","TimeOfDay","To","Tone","ToolTip","TopButtom","Torque","Torso","Transparency","TrussDetail","TurnD","TurnP","TurnSpeed",
- "UnitRay","UseLuaChat","UserDialog","UserId","userId","UserGameSettings",
- "Value","Version","VertexColor","VideoCaptureEnabled","VideoMemory","VideoQuality","ViewSizeX","ViewSizeY","Visible","Volume",
- "WalkDirection","WalkSpeed","WalkToPart","WalkToPoint","WheelBackwardConnectionCount","WheelForwardConnectionCount","WindowSize","WireRadius","WoodQuality",
- "X",
- "Y",
- "ZIndex",
- "BackSurface","BottomSurface","FrontSurface","LeftSurface","RightSurface","TopSurface",
- "ClassName",
- "Parent",
- }
- local LockedProperties = { -- cant be edited
- ClassName=1,
- Parent=1,
- userId=1,
- }
- local LockedItems = { -- cant be edited
- ["Workspace.Studio"]=1,
- ["Workspace.Terrain"]=1,
- ["Workspace.Camera"]=1,
- ["Workspace"]=1,
- ["Players"]=1,
- ["Lighting.Sky"]=1,
- }
- local SpecEnums = {-- i plan on doing stuffs with this later
- BackSurface="SurfaceType",
- BottomSurface="SurfaceType",
- FrontSurface="SurfaceType",
- LeftSurface="SurfaceType",
- RightSurface="SurfaceType",
- TopSurface="SurfaceType",
- }
- function GetProperties(obj)
- assert(pcall(function() assert(game.IsA(obj,"Instance")) end),"Should be ROBLOX instance")
- local objProper = {}
- for i,v in pairs(Properties) do
- if pcall(function() return obj[v] end) and (type(obj[v]) ~= "userdata" or not obj:FindFirstChild(v)) then
- objProper[v] = obj[v]
- end
- end
- return objProper
- end
- local Player = game:service"Players".LocalPlayer
- local Mouse = Player:GetMouse()
- Mouse.KeyDown:connect(function(k)
- if string.byte(k) == 29 then
- prop.Visible = not prop.Visible
- gui.Visible = prop.Visible
- end
- end)
- local sf = prop.ScrollFrame
- local oldScroll = 0
- sf.ScrollBar.ScrollThumb.Changed:connect(function()
- sf.ScrollBar.ScrollThumb.Position = UDim2.new(0,0,0,sf.ScrollBar.ScrollThumb.Position.Y.Offset)
- if sf.ScrollBar.ScrollThumb.Position.Y.Offset < 0 then
- sf.ScrollBar.ScrollThumb.Position = UDim2.new(0,0,0,0)
- elseif sf.ScrollBar.ScrollThumb.Position.Y.Offset > 211 then
- sf.ScrollBar.ScrollThumb.Position = UDim2.new(0,0,0,211)
- end
- if sf.ScrollBar.ScrollThumb.Position.Y.Offset == 0 then
- for _,v in pairs(sf.ScrollUp["Arrow Graphic"]:GetChildren())do
- v.BackgroundTransparency = .7
- end
- else
- for _,v in pairs(sf.ScrollUp["Arrow Graphic"]:GetChildren())do
- v.BackgroundTransparency = 0
- end
- end
- if sf.ScrollBar.ScrollThumb.Position.Y.Offset == 211 then
- for _,v in pairs(sf.ScrollDown["Arrow Graphic"]:GetChildren())do
- v.BackgroundTransparency = .7
- end
- else
- for _,v in pairs(sf.ScrollDown["Arrow Graphic"]:GetChildren())do
- v.BackgroundTransparency = 0
- end
- end
- -- move the stuffs.
- for _,v in pairs(prop.List:GetChildren())do
- v.Position = UDim2.new(0,0,0,(v.P.Value-(sf.ScrollBar.ScrollThumb.Position.Y.Offset*1.75)))
- end
- end)
- local Down = false
- local Up = false
- sf.ScrollDown.MouseButton1Down:connect(function()
- Up = false
- Down = true
- end)
- sf.ScrollDown.MouseButton1Up:connect(function()
- Up = false
- Down = false
- end)
- sf.ScrollDown.MouseLeave:connect(function()
- Up = false
- Down = false
- end)
- sf.ScrollUp.MouseButton1Down:connect(function()
- Up = true
- Down = false
- end)
- sf.ScrollUp.MouseButton1Up:connect(function()
- Up = false
- Down = false
- end)
- sf.ScrollUp.MouseLeave:connect(function()
- Up = false
- Down = false
- end)
- local dc = {}
- gui.SelectionChanged.Event:connect(function()
- Object = gui.GetSelection:Invoke()[1]
- oldScroll = 0
- sf.ScrollBar.ScrollThumb.Position = UDim2.new(0,0,0,0)
- for _,v in pairs(dc) do
- v:disconnect()
- end
- dc = {}
- for _,v in pairs(prop.List:GetChildren())do
- v:Destroy()
- end
- if Object then
- local BGC1 = Color3.new(221/255, 221/255, 222/255)
- local BGC2 = Color3.new(239/255,239/255,240/255)
- local showbg1 = true
- local Props = GetProperties(Object)
- if Props then
- if type(Props) == "table" then
- for property,value in pairs(Props) do
- if type(value) == "string" or type(value) == "number" or type(value) == "userdata" or type(value) == "boolean" then
- local CurPropGui = script.Parent.property:Clone()
- CurPropGui.Parent = prop.List
- if showbg1 then
- CurPropGui.BackgroundColor3 = BGC1
- else
- CurPropGui.BackgroundColor3 = BGC2
- end
- showbg1 = not showbg1
- CurPropGui.Position = UDim2.new(0,0,0,1+(22*(#prop.List:GetChildren()-1)))
- local p = Instance.new("NumberValue",CurPropGui)
- p.Name = "P"
- p.Value = CurPropGui.Position.Y.Offset
- CurPropGui.name.locked.Text = property
- CurPropGui.name.unlocked.Text = property
- CurPropGui.Visible = true
- local locked = LockedProperties[property]
- if LockedItems[Object:GetFullName()] then
- locked = true
- end
- if locked then
- CurPropGui.name.locked.Visible = true
- else
- CurPropGui.name.unlocked.Visible = true
- end
- local ValType = "string"
- local oldvalue = value
- if type(value) == "userdata" then
- if pcall(function()
- local swag = value.X
- swag = value.Y
- swag = value.Z
- end) then -- Vector3
- ValType = "Vector3"
- local ValueEdit = CurPropGui.edit.box
- if locked then ValueEdit = CurPropGui.edit.locked end
- ValueEdit.Visible = true
- if not locked then
- dc[#dc+1]=ValueEdit.FocusLost:connect(function()
- if not pcall(function()
- local Vals = {}
- local newval = ValueEdit.Text:gsub(" ","")
- for match in newval:gmatch("[^,]+") do
- table.insert(Vals,tonumber(match))
- end
- if #Vals == 3 then
- if Vals[1] and Vals[2] and Vals[3] then
- local vector = Vector3.new(Vals[1],Vals[2],Vals[3])
- Object[property] = vector
- oldvalue = vector
- ValueEdit.Text = value.X..", "..value.Y..", "..value.Z
- else sddfs = vector.erewrsthf.hdfhdfshdf
- end
- else sddfs = vector.erewrsthf.hdfhdfshdf
- end
- end) then
- pcall(function()
- ValueEdit.Text = oldvalue.X..", "..oldvalue.Y..", "..oldvalue.Z
- end)
- end
- end)
- end
- pcall(function()
- ValueEdit.Text = value.X..", "..value.Y..", "..value.Z
- end)
- elseif pcall(function()
- local swag = value.X.Scale
- swag = value.X.Offset
- end) then -- UDim2
- ValType = "UDim2"
- local ValueEdit = CurPropGui.edit.box
- if locked then ValueEdit = CurPropGui.edit.locked end
- ValueEdit.Visible = true
- if not locked then
- dc[#dc+1]=ValueEdit.FocusLost:connect(function()
- if not pcall(function()
- local Vals = {}
- local newval = ValueEdit.Text:gsub(" ",""):gsub("{",""):gsub("}","")
- for match in newval:gmatch("[^,]+") do
- table.insert(Vals,tonumber(match))
- end
- if #Vals == 4 then
- if Vals[1] and Vals[2] and Vals[3] and Vals[4] then
- local vector = UDim2.new(Vals[1],Vals[2],Vals[3],Vals[4])
- Object[property] = vector
- oldvalue = vector
- ValueEdit.Text = "{"..vector.X.Scale..", "..vector.X.Offset.."}, {"..vector.Y.Scale..", "..vector.Y.Offset.."}"
- else sddfs = vector.erewrsthf.hdfhdfshdf
- end
- else sddfs = vector.erewrsthf.hdfhdfshdf
- end
- end) then
- pcall(function()
- ValueEdit.Text = "{"..oldvalue.X.Scale..", "..oldvalue.X.Offset.."}, {"..oldvalue.Y.Scale..", "..oldvalue.Y.Offset.."}"
- end)
- end
- end)
- end
- pcall(function()
- ValueEdit.Text = "{"..value.X.Scale..", "..value.X.Offset.."}, {"..value.Y.Scale..", "..value.Y.Offset.."}"
- end)
- elseif pcall(function()
- local swag = value.p
- swag = value.p.X
- swag = value.p.Y
- swag = value.p.Z
- end) then -- CFrame
- ValType = "CFrame"
- local ValueEdit = CurPropGui.edit.box
- if locked then ValueEdit = CurPropGui.edit.locked end
- ValueEdit.Visible = true
- if not locked then
- dc[#dc+1]=ValueEdit.FocusLost:connect(function()
- if not pcall(function()
- local Vals = {}
- local newval = ValueEdit.Text:gsub(" ","")
- for match in newval:gmatch("[^,]+") do
- table.insert(Vals,tonumber(match))
- end
- if #Vals == 3 then
- if Vals[1] and Vals[2] and Vals[3] then
- local vector = UDim2.new(Vals[1],Vals[2],Vals[3])
- Object[property] = vector
- oldvalue = vector
- ValueEdit.Text = vector.p.X..", "..vector.p.Y..", "..vector.p.Z
- else sddfs = vector.erewrsthf.hdfhdfshdf
- end
- else sddfs = vector.erewrsthf.hdfhdfshdf
- end
- end) then
- pcall(function()
- ValueEdit.Text = oldvalue.p.X..", "..oldvalue.p.Y..", "..oldvalue.p.Z
- end)
- end
- end)
- end
- pcall(function()
- ValueEdit.Text = value.p.X..", "..value.p.Y..", "..value.p.Z
- end)
- elseif pcall(function()
- local swag = value:IsA("")
- end) then -- Object
- ValType = "Object"
- local ValueEdit = CurPropGui.edit.locked
- ValueEdit.Visible = true
- pcall(function()
- ValueEdit.Text = value.Name
- end)
- elseif pcall(function()
- local swag = value.Color
- swag = value.Color.r
- swag = value.Color.g
- swag = value.Color.b
- end) then -- BrickColor
- ValType = "BrickColor"
- local ValueEdit = CurPropGui.edit.box
- if locked then ValueEdit = CurPropGui.edit.locked end
- ValueEdit.Visible = true
- if not locked then
- dc[#dc+1]=ValueEdit.FocusLost:connect(function()
- if not pcall(function()
- local Vals = {}
- local newval = ValueEdit.Text:gsub(" ","")
- for match in newval:gmatch("[^,]+") do
- table.insert(Vals,tonumber(match))
- end
- if #Vals <= 1 then
- local vector = BrickColor.new(ValueEdit.Text)
- Object[property] = vector
- oldvalue = tostring(vector)
- ValueEdit.Text = tostring(vector)
- elseif #Vals == 3 then
- if Vals[1] and Vals[2] and Vals[3] then
- local vector = BrickColor.new(Color3.new(Vals[1]/255,Vals[2]/255,Vals[3]/255))
- Object[property] = vector
- oldvalue = tostring(vector)
- ValueEdit.Text = tostring(vector)
- else sddfs = vector.erewrsthf.hdfhdfshdf
- end
- else sddfs = vector.erewrsthf.hdfhdfshdf
- end
- end) then
- pcall(function()
- ValueEdit.Text = tostring(oldvalue)
- end)
- end
- end)
- end
- pcall(function()
- ValueEdit.Text = tostring(value)
- end)
- elseif pcall(function()
- local swag = value.r
- swag = value.g
- swag = value.b
- end) then -- Color3
- ValType = "Color3"
- local ValueEdit = CurPropGui.edit.box
- if locked then ValueEdit = CurPropGui.edit.locked end
- ValueEdit.Visible = true
- if not locked then
- dc[#dc+1]=ValueEdit.FocusLost:connect(function()
- if not pcall(function()
- local Vals = {}
- local newval = ValueEdit.Text:gsub(" ","")
- for match in newval:gmatch("[^,]+") do
- table.insert(Vals,tonumber(match))
- end
- if #Vals == 3 then
- if Vals[1] and Vals[2] and Vals[3] then
- local vector = Color3.new(Vals[1],Vals[2],Vals[3])
- Object[property] = vector
- oldvalue = vector
- ValueEdit.Text = vector.r..", "..vector.g..", "..vector.b
- else sddfs = vector.erewrsthf.hdfhdfshdf
- end
- else sddfs = vector.erewrsthf.hdfhdfshdf
- end
- end) then
- pcall(function()
- ValueEdit.Text = oldvalue.r*255 ..", "..oldvalue.g*255 ..", "..oldvalue.b*255
- end)
- end
- end)
- end
- pcall(function()
- ValueEdit.Text = value.r*255 ..", "..value.g*255 ..", "..value.b*255
- end)
- elseif pcall(function()
- local swag = Enum[property]
- end) then -- Enum
- ValType = "Enum"
- local ValueEdit = CurPropGui.edit.box
- if locked then ValueEdit = CurPropGui.edit.locked end
- ValueEdit.Visible = true
- if not locked then
- dc[#dc+1]=ValueEdit.FocusLost:connect(function()
- if not pcall(function()
- local vector = Enum[property][ValueEdit.Text]
- if not vector then local err = vector.rergh.rfhdf.fdhdfs end
- Object[property] = vector
- oldvalue = vector
- ValueEdit.Text = tostring(vector):sub(#Enum[property]+7)
- end) then
- pcall(function()
- ValueEdit.Text = tostring(oldvalue):sub(#Enum[property]+7)
- end)
- end
- end)
- end
- pcall(function()
- ValueEdit.Text = tostring(value):sub(#Enum[property]+7)
- end)
- elseif pcall(function()
- local swag = Enum[SpecEnums[property]]
- end) then -- Enum
- ValType = "Enum"
- local ValueEdit = CurPropGui.edit.box
- if locked then ValueEdit = CurPropGui.edit.locked end
- ValueEdit.Visible = true
- if not locked then
- dc[#dc+1]=ValueEdit.FocusLost:connect(function()
- if not pcall(function()
- local vector = Enum[SpecEnums[property]][ValueEdit.Text]
- if not vector then local err = vector.rergh.rfhdf.fdhdfs end
- Object[property] = vector
- oldvalue = vector
- ValueEdit.Text = tostring(vector):sub(#Enum[SpecEnums[property]]+7)
- end) then
- pcall(function()
- ValueEdit.Text = tostring(oldvalue):sub(#Enum[SpecEnums[property]]+7)
- end)
- end
- end)
- end
- pcall(function()
- ValueEdit.Text = tostring(value):sub(#Enum[SpecEnums[property]]+7)
- end)
- end
- elseif type(value) == "string" then
- local ValueEdit = CurPropGui.edit.box
- if locked then ValueEdit = CurPropGui.edit.locked end
- ValueEdit.Visible = true
- if not locked then
- dc[#dc+1]=ValueEdit.FocusLost:connect(function()
- if not pcall(function()
- Object[property] = ValueEdit.Text
- end) then
- pcall(function()
- ValueEdit.Text = tostring(oldvalue)
- oldvalue = ValueEdit.Text
- end)
- end
- end)
- end
- ValueEdit.Text = tostring(value)
- elseif type(value) == "number" then
- local ValueEdit = CurPropGui.edit.box
- if locked then ValueEdit = CurPropGui.edit.locked end
- ValueEdit.Visible = true
- if not locked then
- dc[#dc+1]=ValueEdit.FocusLost:connect(function()
- if not pcall(function()
- Object[property] = tonumber(ValueEdit.Text)
- oldvalue = ValueEdit.Text
- end) then
- pcall(function()
- ValueEdit.Text = tostring(oldvalue)
- end)
- end
- end)
- end
- ValueEdit.Text = tostring(value)
- elseif type(value) == "boolean" then
- local ValueEdit = CurPropGui.edit.check
- ValueEdit.Visible = true
- local img_checked = "http://www.roblox.com/asset/?id=48138491"
- local img_unchecked = "http://www.roblox.com/asset/?id=48138474"
- if value then
- ValueEdit.Image = img_checked
- else
- ValueEdit.Image = img_unchecked
- end
- dc[#dc+1]=Object.Changed:connect(function()
- if Object[property] then
- ValueEdit.Image = img_checked
- else
- ValueEdit.Image = img_unchecked
- end
- end)
- if not locked then
- dc[#dc+1]=ValueEdit.MouseButton1Click:connect(function()
- Object[property] = not Object[property]
- if Object[property] then
- ValueEdit.Image = img_checked
- else
- ValueEdit.Image = img_unchecked
- end
- end)
- end
- end
- end
- end
- end
- end
- end
- end)
- while wait(.0075) do -- umad?
- if Down then
- sf.ScrollBar.ScrollThumb.Position = UDim2.new(0,0,0,sf.ScrollBar.ScrollThumb.Position.Y.Offset+3)
- elseif Up then
- sf.ScrollBar.ScrollThumb.Position = UDim2.new(0,0,0,sf.ScrollBar.ScrollThumb.Position.Y.Offset-3)
- end
- end
- end))
- Frame10.Name = "Header"
- Frame10.Parent = Frame8
- Frame10.Size = UDim2.new(1, 0, 0, 18)
- Frame10.BackgroundColor3 = Color3.new(0.913726, 0.913726, 0.913726)
- Frame10.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
- TextLabel11.Parent = Frame10
- TextLabel11.Transparency = 1
- TextLabel11.Size = UDim2.new(1, -4, 1, 0)
- TextLabel11.Text = "Properties"
- TextLabel11.Position = UDim2.new(0, 4, 0, 0)
- TextLabel11.BackgroundTransparency = 1
- TextLabel11.Font = Enum.Font.SourceSans
- TextLabel11.FontSize = Enum.FontSize.Size14
- TextLabel11.TextColor3 = Color3.new(0, 0, 0)
- TextLabel11.TextXAlignment = Enum.TextXAlignment.Left
- Frame12.Name = "List"
- Frame12.Parent = Frame8
- Frame12.Transparency = 1
- Frame12.Size = UDim2.new(1, -16, 1, -18)
- Frame12.Position = UDim2.new(0, 0, 0, 18)
- Frame12.BackgroundTransparency = 1
- Frame12.ClipsDescendants = true
- TextLabel13.Name = "TextWidth"
- TextLabel13.Parent = Frame8
- TextLabel13.Size = UDim2.new(1, 0, 1, 0)
- TextLabel13.Text = "TweenService"
- TextLabel13.Visible = false
- TextLabel13.Font = Enum.Font.SourceSans
- TextLabel13.FontSize = Enum.FontSize.Size14
- TextLabel13.TextXAlignment = Enum.TextXAlignment.Left
- Frame14.Name = "ScrollFrame"
- Frame14.Parent = Frame8
- Frame14.Transparency = 1
- Frame14.Size = UDim2.new(0, 16, 1, -18)
- Frame14.Position = UDim2.new(1, -16, 0, 18)
- Frame14.BackgroundTransparency = 1
- ImageButton15.Name = "ScrollDown"
- ImageButton15.Parent = Frame14
- ImageButton15.Size = UDim2.new(0, 16, 0, 16)
- ImageButton15.Position = UDim2.new(0, 0, 1, -16)
- ImageButton15.BackgroundColor3 = Color3.new(0.866667, 0.866667, 0.866667)
- ImageButton15.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
- Frame16.Name = "Arrow Graphic"
- Frame16.Parent = ImageButton15
- Frame16.Transparency = 1
- Frame16.Size = UDim2.new(0, 8, 0, 8)
- Frame16.Position = UDim2.new(0.5, -4, 0.5, -4)
- Frame16.BackgroundTransparency = 1
- Frame16.BorderSizePixel = 0
- Frame17.Name = "Graphic"
- Frame17.Parent = Frame16
- Frame17.Size = UDim2.new(0.25, 0, 0.125, 0)
- Frame17.Position = UDim2.new(0.375, 0, 0.625, 0)
- Frame17.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
- Frame17.BorderSizePixel = 0
- Frame18.Name = "Graphic"
- Frame18.Parent = Frame16
- Frame18.Size = UDim2.new(0.5, 0, 0.125, 0)
- Frame18.Position = UDim2.new(0.25, 0, 0.5, 0)
- Frame18.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
- Frame18.BorderSizePixel = 0
- Frame19.Name = "Graphic"
- Frame19.Parent = Frame16
- Frame19.Size = UDim2.new(0.75, 0, 0.125, 0)
- Frame19.Position = UDim2.new(0.125, 0, 0.375, 0)
- Frame19.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
- Frame19.BorderSizePixel = 0
- Frame20.Name = "Graphic"
- Frame20.Parent = Frame16
- Frame20.Size = UDim2.new(1, 0, 0.125, 0)
- Frame20.Position = UDim2.new(0, 0, 0.25, 0)
- Frame20.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
- Frame20.BorderSizePixel = 0
- ImageButton21.Name = "ScrollUp"
- ImageButton21.Parent = Frame14
- ImageButton21.Size = UDim2.new(0, 16, 0, 16)
- ImageButton21.Active = false
- ImageButton21.BackgroundColor3 = Color3.new(0.866667, 0.866667, 0.866667)
- ImageButton21.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
- ImageButton21.AutoButtonColor = false
- Frame22.Name = "Arrow Graphic"
- Frame22.Parent = ImageButton21
- Frame22.Transparency = 1
- Frame22.Size = UDim2.new(0, 8, 0, 8)
- Frame22.Position = UDim2.new(0.5, -4, 0.5, -4)
- Frame22.BackgroundTransparency = 1
- Frame22.BorderSizePixel = 0
- Frame23.Name = "Graphic"
- Frame23.Parent = Frame22
- Frame23.Transparency = 0.69999998807907
- Frame23.Size = UDim2.new(0.25, 0, 0.125, 0)
- Frame23.Position = UDim2.new(0.375, 0, 0.25, 0)
- Frame23.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
- Frame23.BackgroundTransparency = 0.69999998807907
- Frame23.BorderSizePixel = 0
- Frame24.Name = "Graphic"
- Frame24.Parent = Frame22
- Frame24.Transparency = 0.69999998807907
- Frame24.Size = UDim2.new(0.5, 0, 0.125, 0)
- Frame24.Position = UDim2.new(0.25, 0, 0.375, 0)
- Frame24.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
- Frame24.BackgroundTransparency = 0.69999998807907
- Frame24.BorderSizePixel = 0
- Frame25.Name = "Graphic"
- Frame25.Parent = Frame22
- Frame25.Transparency = 0.69999998807907
- Frame25.Size = UDim2.new(0.75, 0, 0.125, 0)
- Frame25.Position = UDim2.new(0.125, 0, 0.5, 0)
- Frame25.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
- Frame25.BackgroundTransparency = 0.69999998807907
- Frame25.BorderSizePixel = 0
- Frame26.Name = "Graphic"
- Frame26.Parent = Frame22
- Frame26.Transparency = 0.69999998807907
- Frame26.Size = UDim2.new(1, 0, 0.125, 0)
- Frame26.Position = UDim2.new(0, 0, 0.625, 0)
- Frame26.BackgroundColor3 = Color3.new(0.584314, 0.584314, 0.584314)
- Frame26.BackgroundTransparency = 0.69999998807907
- Frame26.BorderSizePixel = 0
- ImageButton27.Name = "ScrollBar"
- ImageButton27.Parent = Frame14
- ImageButton27.Size = UDim2.new(1, 0, 1, -32)
- ImageButton27.Position = UDim2.new(0, 0, 0, 16)
- ImageButton27.BackgroundColor3 = Color3.new(0.94902, 0.94902, 0.94902)
- ImageButton27.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
- ImageButton27.AutoButtonColor = false
- ImageButton28.Name = "ScrollThumb"
- ImageButton28.Parent = ImageButton27
- ImageButton28.Size = UDim2.new(0, 16, 0.283333331, 0)
- ImageButton28.BackgroundColor3 = Color3.new(0.866667, 0.866667, 0.866667)
- ImageButton28.BorderColor3 = Color3.new(0.584314, 0.584314, 0.584314)
- ImageButton28.Draggable = true
- ImageButton28.AutoButtonColor = false
- Frame29.Name = "Grip Graphic"
- Frame29.Parent = ImageButton28
- Frame29.Transparency = 1
- Frame29.Size = UDim2.new(0, 6, 0, 6)
- Frame29.Position = UDim2.new(0.5, -3, 0.5, -3)
- Frame29.BackgroundTransparency = 1
- Frame29.BorderSizePixel = 0
- Frame30.Parent = Frame29
- Frame30.Size = UDim2.new(1, 0, 0.166666672, 0)
- Frame30.BorderSizePixel = 0
- Frame31.Parent = Frame29
- Frame31.Size = UDim2.new(1, 0, 0.166666672, 0)
- Frame31.Position = UDim2.new(0, 0, 0.333333343, 0)
- Frame31.BorderSizePixel = 0
- Frame32.Parent = Frame29
- Frame32.Size = UDim2.new(1, 0, 0.166666672, 0)
- Frame32.Position = UDim2.new(0, 0, 0.666666687, 0)
- Frame32.BorderSizePixel = 0
- Frame33.Name = "property"
- Frame33.Parent = Frame8
- Frame33.Size = UDim2.new(1, 0, 0, 22)
- Frame33.Position = UDim2.new(0, 0, 0, 1)
- Frame33.Visible = false
- Frame33.BackgroundColor3 = Color3.new(0.866667, 0.866667, 0.870588)
- Frame33.BorderColor3 = Color3.new(0.686275, 0.686275, 0.686275)
- Frame34.Name = "name"
- Frame34.Parent = Frame33
- Frame34.Transparency = 1
- Frame34.Size = UDim2.new(0.5, 0, 1, -1)
- Frame34.BackgroundColor3 = Color3.new(0.992157, 0.984314, 1)
- Frame34.BackgroundTransparency = 1
- TextLabel35.Name = "unlocked"
- TextLabel35.Parent = Frame34
- TextLabel35.Transparency = 1
- TextLabel35.Size = UDim2.new(1, -10, 1, 0)
- TextLabel35.Text = ""
- TextLabel35.Position = UDim2.new(0, 5, 0, 0)
- TextLabel35.Visible = false
- TextLabel35.BackgroundTransparency = 1
- TextLabel35.Font = Enum.Font.SourceSans
- TextLabel35.FontSize = Enum.FontSize.Size14
- TextLabel35.TextColor3 = Color3.new(0.0980392, 0.0980392, 0.0980392)
- TextLabel35.TextWrapped = true
- TextLabel35.TextXAlignment = Enum.TextXAlignment.Left
- TextLabel36.Name = "locked"
- TextLabel36.Parent = Frame34
- TextLabel36.Transparency = 1
- TextLabel36.Size = UDim2.new(1, -10, 1, 0)
- TextLabel36.Text = ""
- TextLabel36.Position = UDim2.new(0, 5, 0, 0)
- TextLabel36.Visible = false
- TextLabel36.BackgroundTransparency = 1
- TextLabel36.Font = Enum.Font.SourceSans
- TextLabel36.FontSize = Enum.FontSize.Size14
- TextLabel36.TextColor3 = Color3.new(0.580392, 0.580392, 0.580392)
- TextLabel36.TextWrapped = true
- TextLabel36.TextXAlignment = Enum.TextXAlignment.Left
- Frame37.Name = "border"
- Frame37.Parent = Frame33
- Frame37.Size = UDim2.new(0, 1, 1, 0)
- Frame37.Position = UDim2.new(0.5, 0, 0, 0)
- Frame37.BackgroundColor3 = Color3.new(0.686275, 0.686275, 0.686275)
- Frame37.BorderColor3 = Color3.new(0.686275, 0.686275, 0.686275)
- Frame37.BorderSizePixel = 0
- Frame38.Name = "edit"
- Frame38.Parent = Frame33
- Frame38.Transparency = 1
- Frame38.Size = UDim2.new(0.5, 0, 1, -1)
- Frame38.Position = UDim2.new(0.5, 0, 0, 0)
- Frame38.BackgroundColor3 = Color3.new(0.992157, 0.984314, 1)
- Frame38.BackgroundTransparency = 1
- TextLabel39.Name = "locked"
- TextLabel39.Parent = Frame38
- TextLabel39.Transparency = 1
- TextLabel39.Size = UDim2.new(1, -10, 1, 0)
- TextLabel39.Text = ""
- TextLabel39.Position = UDim2.new(0, 5, 0, 0)
- TextLabel39.Visible = false
- TextLabel39.BackgroundTransparency = 1
- TextLabel39.Font = Enum.Font.SourceSans
- TextLabel39.FontSize = Enum.FontSize.Size14
- TextLabel39.TextColor3 = Color3.new(0.580392, 0.580392, 0.580392)
- TextLabel39.TextWrapped = true
- TextLabel39.TextXAlignment = Enum.TextXAlignment.Left
- TextBox40.Name = "box"
- TextBox40.Parent = Frame38
- TextBox40.Transparency = 1
- TextBox40.Size = UDim2.new(1, -10, 1, 0)
- TextBox40.Text = ""
- TextBox40.Position = UDim2.new(0, 5, 0, 0)
- TextBox40.Visible = false
- TextBox40.BackgroundTransparency = 1
- TextBox40.Font = Enum.Font.SourceSans
- TextBox40.FontSize = Enum.FontSize.Size14
- TextBox40.TextColor3 = Color3.new(0.0980392, 0.0980392, 0.0980392)
- TextBox40.TextWrapped = true
- TextBox40.TextXAlignment = Enum.TextXAlignment.Left
- ImageButton41.Name = "check"
- ImageButton41.Parent = Frame38
- ImageButton41.Size = UDim2.new(0, 12, 0, 12)
- ImageButton41.Position = UDim2.new(0, 5, 0, 5)
- ImageButton41.Visible = false
- ImageButton41.BorderSizePixel = 0
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.PlayerGui
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement