Further improvements to corescript structure and formatting

This commit is contained in:
Lewin Kelly 2024-03-17 09:49:20 +00:00
parent 5d7fb019b4
commit 4d5f484abd
6 changed files with 942 additions and 1097 deletions

View File

@ -5,8 +5,7 @@ for _ = 1, 8 do
end end
--Include --Include
local Create: (instance: string) -> ({ [string]: any }) -> Instance = local New = require "../Modules/New"
assert(LoadLibrary "RbxUtility").Create
-- A Few Script Globals -- A Few Script Globals
local gui local gui
@ -18,7 +17,7 @@ end
-- Dev-Console Root -- Dev-Console Root
local Dev_Container = Create "Frame" { local Dev_Container = New "Frame" {
Name = "DevConsoleContainer", Name = "DevConsoleContainer",
Parent = gui, Parent = gui,
BackgroundColor3 = Color3.new(0, 0, 0), BackgroundColor3 = Color3.new(0, 0, 0),
@ -28,7 +27,7 @@ local Dev_Container = Create "Frame" {
Visible = false, Visible = false,
} }
local ToggleConsole = Create "BindableFunction" { local ToggleConsole = New "BindableFunction" {
Name = "ToggleDevConsole", Name = "ToggleDevConsole",
Parent = gui, Parent = gui,
} }
@ -67,16 +66,55 @@ function initializeDeveloperConsole()
--Create Dev-Console --Create Dev-Console
local Dev_Body = Create "Frame" { local Dev_Body = New "Frame" {
Name = "Body", Name = "Body",
Parent = Dev_Container, Parent = Dev_Container,
BackgroundColor3 = Color3.new(0, 0, 0), BackgroundColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 0.5, BackgroundTransparency = 0.5,
Position = UDim2.new(0, 0, 0, 21), Position = UDim2.new(0, 0, 0, 21),
Size = UDim2.new(1, 0, 1, -25), Size = UDim2.new(1, 0, 1, -25),
New "TextButton" {
Name = "LocalConsole",
BackgroundColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 0.6,
Position = UDim2.new(0, 7, 0, 5),
Size = UDim2.new(0, 90, 0, 20),
Font = "SourceSansBold",
FontSize = Enum.FontSize.Size14,
Text = "Local Console",
TextColor3 = Color3.new(1, 1, 1),
TextYAlignment = Enum.TextYAlignment.Center,
},
New "TextButton" {
Name = "ServerConsole",
BackgroundColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 0.8,
Position = UDim2.new(0, 102, 0, 5),
Size = UDim2.new(0, 90, 0, 17),
Font = "SourceSansBold",
FontSize = Enum.FontSize.Size14,
Text = "Server Console",
TextColor3 = Color3.new(1, 1, 1),
TextYAlignment = Enum.TextYAlignment.Center,
},
New "ImageButton" {
Name = "ResizeButton",
BackgroundColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 0.5,
Position = UDim2.new(1, -20, 1, -20),
Size = UDim2.new(0, 20, 0, 20),
New "ImageLabel" {
Name = "ImageLabel",
BackgroundTransparency = 1,
Position = UDim2.new(0, 6, 0, 6),
Size = UDim2.new(0.8, 0, 0.8, 0),
Rotation = 135,
Image = "http://banland.xyz/Asset?id=151205813",
},
},
} }
local Dev_OptionsHolder = Create "Frame" { local Dev_OptionsHolder = New "Frame" {
Name = "OptionsHolder", Name = "OptionsHolder",
Parent = Dev_Body, Parent = Dev_Body,
BackgroundColor3 = Color3.new(0, 0, 0), BackgroundColor3 = Color3.new(0, 0, 0),
@ -86,151 +124,127 @@ function initializeDeveloperConsole()
ClipsDescendants = true, ClipsDescendants = true,
} }
local Dev_OptionsBar = Create "Frame" { local Dev_OptionsBar = New "Frame" {
Name = "OptionsBar", Name = "OptionsBar",
Parent = Dev_OptionsHolder, Parent = Dev_OptionsHolder,
BackgroundColor3 = Color3.new(0, 0, 0), BackgroundColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(0, -250, 0, 4), Position = UDim2.new(0, -250, 0, 4),
Size = UDim2.new(0, 234, 0, 18), Size = UDim2.new(0, 234, 0, 18),
New "TextButton" {
Name = "ErrorToggleButton",
BackgroundColor3 = Color3.new(0, 0, 0),
BorderColor3 = Color3.new(1, 0, 0),
Position = UDim2.new(0, 115, 0, 0),
Size = UDim2.new(0, 18, 0, 18),
Font = "SourceSansBold",
FontSize = Enum.FontSize.Size14,
Text = "",
TextColor3 = Color3.new(1, 0, 0),
New "Frame" {
Name = "CheckFrame",
BackgroundColor3 = Color3.new(1, 0, 0),
BorderColor3 = Color3.new(1, 0, 0),
Position = UDim2.new(0, 4, 0, 4),
Size = UDim2.new(0, 10, 0, 10),
},
},
New "TextButton" {
Name = "InfoToggleButton",
BackgroundColor3 = Color3.new(0, 0, 0),
BorderColor3 = Color3.new(0.4, 0.5, 1.0),
Position = UDim2.new(0, 65, 0, 0),
Size = UDim2.new(0, 18, 0, 18),
Font = "SourceSansBold",
FontSize = Enum.FontSize.Size14,
Text = "",
TextColor3 = Color3.new(0.4, 0.5, 1.0),
New "Frame" {
Name = "CheckFrame",
BackgroundColor3 = Color3.new(0.4, 0.5, 1.0),
BorderColor3 = Color3.new(0.4, 0.5, 1.0),
Position = UDim2.new(0, 4, 0, 4),
Size = UDim2.new(0, 10, 0, 10),
},
},
New "TextButton" {
Name = "OutputToggleButton",
BackgroundColor3 = Color3.new(0, 0, 0),
BorderColor3 = Color3.new(1, 1, 1.0),
Position = UDim2.new(0, 40, 0, 0),
Size = UDim2.new(0, 18, 0, 18),
Font = "SourceSansBold",
FontSize = Enum.FontSize.Size14,
Text = "",
TextColor3 = Color3.new(1, 1, 1.0),
New "Frame" {
Name = "CheckFrame",
BackgroundColor3 = Color3.new(1, 1, 1.0),
BorderColor3 = Color3.new(1, 1, 1.0),
Position = UDim2.new(0, 4, 0, 4),
Size = UDim2.new(0, 10, 0, 10),
},
},
New "TextButton" {
Name = "WarningToggleButton",
BackgroundColor3 = Color3.new(0, 0, 0),
BorderColor3 = Color3.new(1, 0.6, 0.4),
Position = UDim2.new(0, 90, 0, 0),
Size = UDim2.new(0, 18, 0, 18),
Font = "SourceSansBold",
FontSize = Enum.FontSize.Size14,
Text = "",
TextColor3 = Color3.new(1, 0.6, 0.4),
New "Frame" {
Name = "CheckFrame",
BackgroundColor3 = Color3.new(1, 0.6, 0.4),
BorderColor3 = Color3.new(1, 0.6, 0.4),
Position = UDim2.new(0, 4, 0, 4),
Size = UDim2.new(0, 10, 0, 10),
},
},
New "TextButton" {
Name = "WordWrapToggleButton",
BackgroundColor3 = Color3.new(0, 0, 0),
BorderColor3 = Color3.new(0.8, 0.8, 0.8),
Position = UDim2.new(0, 215, 0, 0),
Size = UDim2.new(0, 18, 0, 18),
Font = "SourceSansBold",
FontSize = Enum.FontSize.Size14,
Text = "",
TextColor3 = Color3.new(0.8, 0.8, 0.8),
New "Frame" {
Name = "CheckFrame",
BackgroundColor3 = Color3.new(0.8, 0.8, 0.8),
BorderColor3 = Color3.new(0.8, 0.8, 0.8),
Position = UDim2.new(0, 4, 0, 4),
Size = UDim2.new(0, 10, 0, 10),
Visible = false,
},
},
New "TextLabel" {
Name = "Filter",
BackgroundTransparency = 1,
Position = UDim2.new(0, 0, 0, 0),
Size = UDim2.new(0, 40, 0, 18),
Font = "SourceSansBold",
FontSize = Enum.FontSize.Size14,
Text = "Filter",
TextColor3 = Color3.new(1, 1, 1),
},
New "TextLabel" {
Name = "WordWrap",
BackgroundTransparency = 1,
Position = UDim2.new(0, 150, 0, 0),
Size = UDim2.new(0, 50, 0, 18),
Font = "SourceSansBold",
FontSize = Enum.FontSize.Size14,
Text = "Word Wrap",
TextColor3 = Color3.new(1, 1, 1),
},
} }
local Dev_ErrorToggleFilter = Create "TextButton" { local Dev_ScrollBar = New "Frame" {
Name = "ErrorToggleButton",
Parent = Dev_OptionsBar,
BackgroundColor3 = Color3.new(0, 0, 0),
BorderColor3 = Color3.new(1, 0, 0),
Position = UDim2.new(0, 115, 0, 0),
Size = UDim2.new(0, 18, 0, 18),
Font = "SourceSansBold",
FontSize = Enum.FontSize.Size14,
Text = "",
TextColor3 = Color3.new(1, 0, 0),
}
Create "Frame" {
Name = "CheckFrame",
Parent = Dev_ErrorToggleFilter,
BackgroundColor3 = Color3.new(1, 0, 0),
BorderColor3 = Color3.new(1, 0, 0),
Position = UDim2.new(0, 4, 0, 4),
Size = UDim2.new(0, 10, 0, 10),
}
local Dev_InfoToggleFilter = Create "TextButton" {
Name = "InfoToggleButton",
Parent = Dev_OptionsBar,
BackgroundColor3 = Color3.new(0, 0, 0),
BorderColor3 = Color3.new(0.4, 0.5, 1.0),
Position = UDim2.new(0, 65, 0, 0),
Size = UDim2.new(0, 18, 0, 18),
Font = "SourceSansBold",
FontSize = Enum.FontSize.Size14,
Text = "",
TextColor3 = Color3.new(0.4, 0.5, 1.0),
}
Create "Frame" {
Name = "CheckFrame",
Parent = Dev_InfoToggleFilter,
BackgroundColor3 = Color3.new(0.4, 0.5, 1.0),
BorderColor3 = Color3.new(0.4, 0.5, 1.0),
Position = UDim2.new(0, 4, 0, 4),
Size = UDim2.new(0, 10, 0, 10),
}
local Dev_OutputToggleFilter = Create "TextButton" {
Name = "OutputToggleButton",
Parent = Dev_OptionsBar,
BackgroundColor3 = Color3.new(0, 0, 0),
BorderColor3 = Color3.new(1, 1, 1.0),
Position = UDim2.new(0, 40, 0, 0),
Size = UDim2.new(0, 18, 0, 18),
Font = "SourceSansBold",
FontSize = Enum.FontSize.Size14,
Text = "",
TextColor3 = Color3.new(1, 1, 1.0),
}
Create "Frame" {
Name = "CheckFrame",
Parent = Dev_OutputToggleFilter,
BackgroundColor3 = Color3.new(1, 1, 1.0),
BorderColor3 = Color3.new(1, 1, 1.0),
Position = UDim2.new(0, 4, 0, 4),
Size = UDim2.new(0, 10, 0, 10),
}
local Dev_WarningToggleFilter = Create "TextButton" {
Name = "WarningToggleButton",
Parent = Dev_OptionsBar,
BackgroundColor3 = Color3.new(0, 0, 0),
BorderColor3 = Color3.new(1, 0.6, 0.4),
Position = UDim2.new(0, 90, 0, 0),
Size = UDim2.new(0, 18, 0, 18),
Font = "SourceSansBold",
FontSize = Enum.FontSize.Size14,
Text = "",
TextColor3 = Color3.new(1, 0.6, 0.4),
}
Create "Frame" {
Name = "CheckFrame",
Parent = Dev_WarningToggleFilter,
BackgroundColor3 = Color3.new(1, 0.6, 0.4),
BorderColor3 = Color3.new(1, 0.6, 0.4),
Position = UDim2.new(0, 4, 0, 4),
Size = UDim2.new(0, 10, 0, 10),
}
local Dev_WordWrapToggle = Create "TextButton" {
Name = "WordWrapToggleButton",
Parent = Dev_OptionsBar,
BackgroundColor3 = Color3.new(0, 0, 0),
BorderColor3 = Color3.new(0.8, 0.8, 0.8),
Position = UDim2.new(0, 215, 0, 0),
Size = UDim2.new(0, 18, 0, 18),
Font = "SourceSansBold",
FontSize = Enum.FontSize.Size14,
Text = "",
TextColor3 = Color3.new(0.8, 0.8, 0.8),
}
Create "Frame" {
Name = "CheckFrame",
Parent = Dev_WordWrapToggle,
BackgroundColor3 = Color3.new(0.8, 0.8, 0.8),
BorderColor3 = Color3.new(0.8, 0.8, 0.8),
Position = UDim2.new(0, 4, 0, 4),
Size = UDim2.new(0, 10, 0, 10),
Visible = false,
}
Create "TextLabel" {
Name = "Filter",
Parent = Dev_OptionsBar,
BackgroundTransparency = 1,
Position = UDim2.new(0, 0, 0, 0),
Size = UDim2.new(0, 40, 0, 18),
Font = "SourceSansBold",
FontSize = Enum.FontSize.Size14,
Text = "Filter",
TextColor3 = Color3.new(1, 1, 1),
}
Create "TextLabel" {
Name = "WordWrap",
Parent = Dev_OptionsBar,
BackgroundTransparency = 1,
Position = UDim2.new(0, 150, 0, 0),
Size = UDim2.new(0, 50, 0, 18),
Font = "SourceSansBold",
FontSize = Enum.FontSize.Size14,
Text = "Word Wrap",
TextColor3 = Color3.new(1, 1, 1),
}
local Dev_ScrollBar = Create "Frame" {
Name = "ScrollBar", Name = "ScrollBar",
Parent = Dev_Body, Parent = Dev_Body,
BackgroundColor3 = Color3.new(0, 0, 0), BackgroundColor3 = Color3.new(0, 0, 0),
@ -238,73 +252,61 @@ function initializeDeveloperConsole()
Position = UDim2.new(1, -20, 0, 26), Position = UDim2.new(1, -20, 0, 26),
Size = UDim2.new(0, 20, 1, -50), Size = UDim2.new(0, 20, 1, -50),
Visible = false, Visible = false,
New "ImageButton" {
Name = "Down",
BackgroundColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 0.5,
Position = UDim2.new(0, 0, 1, -20),
Size = UDim2.new(0, 20, 0, 20),
New "ImageLabel" {
Name = "ImageLabel",
BackgroundTransparency = 1,
Position = UDim2.new(0, 3, 0, 3),
Size = UDim2.new(0, 14, 0, 14),
Rotation = 180,
Image = "http://banland.xyz/Asset?id=151205813",
},
},
New "ImageButton" {
Name = "Up",
BackgroundColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 0.5,
Position = UDim2.new(0, 0, 0, 0),
Size = UDim2.new(0, 20, 0, 20),
New "ImageLabel" {
Name = "ImageLabel",
BackgroundTransparency = 1,
Position = UDim2.new(0, 3, 0, 3),
Size = UDim2.new(0, 14, 0, 14),
Image = "http://banland.xyz/Asset?id=151205813",
},
},
} }
local Dev_ScrollArea = Create "Frame" { local Dev_ScrollArea = New "Frame" {
Name = "ScrollArea", Name = "ScrollArea",
Parent = Dev_ScrollBar, Parent = Dev_ScrollBar,
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(0, 0, 0, 23), Position = UDim2.new(0, 0, 0, 23),
Size = UDim2.new(1, 0, 1, -46), Size = UDim2.new(1, 0, 1, -46),
New "ImageButton" {
Name = "Handle",
BackgroundColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 0.5,
Position = UDim2.new(0, 0, 0.2, 0),
Size = UDim2.new(0, 20, 0, 40),
New "ImageLabel" {
Name = "ImageLabel",
BackgroundTransparency = 1,
Position = UDim2.new(0, 0, 0.5, -8),
Rotation = 180,
Size = UDim2.new(1, 0, 0, 16),
Image = "http://banland.xyz/Asset?id=151205881",
},
},
} }
local Dev_Handle = Create "ImageButton" { local Dev_TextBox = New "Frame" {
Name = "Handle",
Parent = Dev_ScrollArea,
BackgroundColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 0.5,
Position = UDim2.new(0, 0, 0.2, 0),
Size = UDim2.new(0, 20, 0, 40),
}
Create "ImageLabel" {
Name = "ImageLabel",
Parent = Dev_Handle,
BackgroundTransparency = 1,
Position = UDim2.new(0, 0, 0.5, -8),
Rotation = 180,
Size = UDim2.new(1, 0, 0, 16),
Image = "http://banland.xyz/Asset?id=151205881",
}
local Dev_DownButton = Create "ImageButton" {
Name = "Down",
Parent = Dev_ScrollBar,
BackgroundColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 0.5,
Position = UDim2.new(0, 0, 1, -20),
Size = UDim2.new(0, 20, 0, 20),
}
Create "ImageLabel" {
Name = "ImageLabel",
Parent = Dev_DownButton,
BackgroundTransparency = 1,
Position = UDim2.new(0, 3, 0, 3),
Size = UDim2.new(0, 14, 0, 14),
Rotation = 180,
Image = "http://banland.xyz/Asset?id=151205813",
}
local Dev_UpButton = Create "ImageButton" {
Name = "Up",
Parent = Dev_ScrollBar,
BackgroundColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 0.5,
Position = UDim2.new(0, 0, 0, 0),
Size = UDim2.new(0, 20, 0, 20),
}
Create "ImageLabel" {
Name = "ImageLabel",
Parent = Dev_UpButton,
BackgroundTransparency = 1,
Position = UDim2.new(0, 3, 0, 3),
Size = UDim2.new(0, 14, 0, 14),
Image = "http://banland.xyz/Asset?id=151205813",
}
local Dev_TextBox = Create "Frame" {
Name = "TextBox", Name = "TextBox",
Parent = Dev_Body, Parent = Dev_Body,
BackgroundColor3 = Color3.new(0, 0, 0), BackgroundColor3 = Color3.new(0, 0, 0),
@ -314,7 +316,7 @@ function initializeDeveloperConsole()
ClipsDescendants = true, ClipsDescendants = true,
} }
local Dev_TextHolder = Create "Frame" { local Dev_TextHolder = New "Frame" {
Name = "TextHolder", Name = "TextHolder",
Parent = Dev_TextBox, Parent = Dev_TextBox,
BackgroundTransparency = 1, BackgroundTransparency = 1,
@ -322,121 +324,64 @@ function initializeDeveloperConsole()
Size = UDim2.new(1, 0, 1, 0), Size = UDim2.new(1, 0, 1, 0),
} }
local Dev_OptionsButton = Create "ImageButton" { local Dev_OptionsButton = New "ImageButton" {
Name = "OptionsButton", Name = "OptionsButton",
Parent = Dev_Body, Parent = Dev_Body,
BackgroundColor3 = Color3.new(0, 0, 0), BackgroundColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(0, 200, 0, 2), Position = UDim2.new(0, 200, 0, 2),
Size = UDim2.new(0, 20, 0, 20), Size = UDim2.new(0, 20, 0, 20),
New "ImageLabel" {
Name = "ImageLabel",
BackgroundTransparency = 1,
Position = UDim2.new(0, 0, 0, 0),
Size = UDim2.new(1, 0, 1, 0),
Rotation = 0,
Image = "http://banland.xyz/Asset?id=152093917",
},
} }
Create "ImageLabel" { local Dev_TitleBar = New "Frame" {
Name = "ImageLabel",
Parent = Dev_OptionsButton,
BackgroundTransparency = 1,
Position = UDim2.new(0, 0, 0, 0),
Size = UDim2.new(1, 0, 1, 0),
Rotation = 0,
Image = "http://banland.xyz/Asset?id=152093917",
}
local Dev_ResizeButton = Create "ImageButton" {
Name = "ResizeButton",
Parent = Dev_Body,
BackgroundColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 0.5,
Position = UDim2.new(1, -20, 1, -20),
Size = UDim2.new(0, 20, 0, 20),
}
Create "ImageLabel" {
Name = "ImageLabel",
Parent = Dev_ResizeButton,
BackgroundTransparency = 1,
Position = UDim2.new(0, 6, 0, 6),
Size = UDim2.new(0.8, 0, 0.8, 0),
Rotation = 135,
Image = "http://banland.xyz/Asset?id=151205813",
}
Create "TextButton" {
Name = "LocalConsole",
Parent = Dev_Body,
BackgroundColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 0.6,
Position = UDim2.new(0, 7, 0, 5),
Size = UDim2.new(0, 90, 0, 20),
Font = "SourceSansBold",
FontSize = Enum.FontSize.Size14,
Text = "Local Console",
TextColor3 = Color3.new(1, 1, 1),
TextYAlignment = Enum.TextYAlignment.Center,
}
Create "TextButton" {
Name = "ServerConsole",
Parent = Dev_Body,
BackgroundColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 0.8,
Position = UDim2.new(0, 102, 0, 5),
Size = UDim2.new(0, 90, 0, 17),
Font = "SourceSansBold",
FontSize = Enum.FontSize.Size14,
Text = "Server Console",
TextColor3 = Color3.new(1, 1, 1),
TextYAlignment = Enum.TextYAlignment.Center,
}
local Dev_TitleBar = Create "Frame" {
Name = "TitleBar", Name = "TitleBar",
Parent = Dev_Container, Parent = Dev_Container,
BackgroundColor3 = Color3.new(0, 0, 0), BackgroundColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 0.5, BackgroundTransparency = 0.5,
Position = UDim2.new(0, 0, 0, 0), Position = UDim2.new(0, 0, 0, 0),
Size = UDim2.new(1, 0, 0, 20), Size = UDim2.new(1, 0, 0, 20),
} New "ImageButton" {
Name = "CloseButton",
local Dev_CloseButton = Create "ImageButton" { BackgroundColor3 = Color3.new(0, 0, 0),
Name = "CloseButton", BackgroundTransparency = 0.5,
Parent = Dev_TitleBar, Position = UDim2.new(1, -20, 0, 0),
BackgroundColor3 = Color3.new(0, 0, 0), Size = UDim2.new(0, 20, 0, 20),
BackgroundTransparency = 0.5, New "ImageLabel" {
Position = UDim2.new(1, -20, 0, 0), BackgroundColor3 = Color3.new(0, 0, 0),
Size = UDim2.new(0, 20, 0, 20), BackgroundTransparency = 1,
} Position = UDim2.new(0, 3, 0, 3),
Size = UDim2.new(0, 14, 0, 14),
Create "ImageLabel" { Image = "http://banland.xyz/Asset?id=151205852",
Parent = Dev_CloseButton, },
BackgroundColor3 = Color3.new(0, 0, 0), },
BackgroundTransparency = 1, New "TextButton" {
Position = UDim2.new(0, 3, 0, 3), Name = "TextButton",
Size = UDim2.new(0, 14, 0, 14), BackgroundColor3 = Color3.new(0, 0, 0),
Image = "http://banland.xyz/Asset?id=151205852", BackgroundTransparency = 0.5,
} Position = UDim2.new(0, 0, 0, 0),
Size = UDim2.new(1, -23, 1, 0),
Create "TextButton" { Text = "",
Name = "TextButton", },
Parent = Dev_TitleBar, New "TextLabel" {
BackgroundColor3 = Color3.new(0, 0, 0), Name = "TitleText",
BackgroundTransparency = 0.5, BackgroundTransparency = 1,
Position = UDim2.new(0, 0, 0, 0), Position = UDim2.new(0, 0, 0, 0),
Size = UDim2.new(1, -23, 1, 0), Size = UDim2.new(0, 185, 0, 20),
Text = "", Font = "SourceSansBold",
} FontSize = Enum.FontSize.Size18,
-- Text = "Server Console",
Create "TextLabel" { TextColor3 = Color3.new(1, 1, 1),
Name = "TitleText", Text = "Roblox Developer Console",
Parent = Dev_TitleBar, TextYAlignment = Enum.TextYAlignment.Top,
BackgroundTransparency = 1, },
Position = UDim2.new(0, 0, 0, 0),
Size = UDim2.new(0, 185, 0, 20),
Font = "SourceSansBold",
FontSize = Enum.FontSize.Size18,
-- Text = "Server Console",
TextColor3 = Color3.new(1, 1, 1),
Text = "Roblox Developer Console",
TextYAlignment = Enum.TextYAlignment.Top,
} }
---Saved Mouse Information ---Saved Mouse Information
@ -556,6 +501,76 @@ function initializeDeveloperConsole()
startAnimation() startAnimation()
end) end)
--Refresh Dev-Console Message Positions
local function repositionList()
if currentConsole == LOCAL_CONSOLE then
localOffset = math.min(
math.max(localOffset, 0),
textHolderSize - Dev_Container.Body.TextBox.AbsoluteSize.Y
)
Dev_TextHolder.Size = UDim2.new(1, 0, 0, textHolderSize)
elseif currentConsole == SERVER_CONSOLE then
serverOffset = math.min(
math.max(serverOffset, 0),
textHolderSize - Dev_Container.Body.TextBox.AbsoluteSize.Y
)
Dev_TextHolder.Size = UDim2.new(1, 0, 0, textHolderSize)
end
local ratio = Dev_Container.Body.TextBox.AbsoluteSize.Y
/ Dev_TextHolder.AbsoluteSize.Y
if ratio >= 1 then
Dev_Container.Body.ScrollBar.Visible = false
Dev_Container.Body.TextBox.Size = UDim2.new(1, -4, 1, -28)
if
currentConsole == LOCAL_CONSOLE
or currentConsole == SERVER_CONSOLE
then
Dev_TextHolder.Position = UDim2.new(0, 0, 1, 0 - textHolderSize)
end
else
Dev_Container.Body.ScrollBar.Visible = true
Dev_Container.Body.TextBox.Size = UDim2.new(1, -25, 1, -28)
local backRatio = 1 - ratio
local offsetRatio
if currentConsole == LOCAL_CONSOLE then
offsetRatio = localOffset / Dev_TextHolder.AbsoluteSize.Y
elseif currentConsole == SERVER_CONSOLE then
offsetRatio = serverOffset / Dev_TextHolder.AbsoluteSize.Y
end
local topRatio = math.max(0, backRatio - offsetRatio)
local scrollHandleSize =
math.max(Dev_ScrollArea.AbsoluteSize.Y * ratio, 21)
local scrollRatio = scrollHandleSize / Dev_ScrollArea.AbsoluteSize.Y
local ratioConversion = (1 - scrollRatio) / (1 - ratio)
local topScrollRatio = topRatio * ratioConversion
local sPos = math.min(
Dev_ScrollArea.AbsoluteSize.Y * topScrollRatio,
Dev_ScrollArea.AbsoluteSize.Y - scrollHandleSize
)
Dev_ScrollArea.Handle.Size = UDim2.new(1, 0, 0, scrollHandleSize)
Dev_ScrollArea.Handle.Position = UDim2.new(0, 0, 0, sPos)
if currentConsole == LOCAL_CONSOLE then
Dev_TextHolder.Position =
UDim2.new(0, 0, 1, 0 - textHolderSize + localOffset)
elseif currentConsole == SERVER_CONSOLE then
Dev_TextHolder.Position =
UDim2.new(0, 0, 1, 0 - textHolderSize + serverOffset)
end
end
end
--Scroll Position --Scroll Position
local function changeOffset(value) local function changeOffset(value)
@ -592,7 +607,7 @@ function initializeDeveloperConsole()
local movePosition = false local movePosition = false
if i > #childMessages then if i > #childMessages then
message = Create "TextLabel" { message = New "TextLabel" {
Name = "Message", Name = "Message",
Parent = Dev_TextHolder, Parent = Dev_TextHolder,
BackgroundTransparency = 1, BackgroundTransparency = 1,
@ -786,76 +801,6 @@ function initializeDeveloperConsole()
return true return true
end end
--Refresh Dev-Console Message Positions
function repositionList()
if currentConsole == LOCAL_CONSOLE then
localOffset = math.min(
math.max(localOffset, 0),
textHolderSize - Dev_Container.Body.TextBox.AbsoluteSize.Y
)
Dev_TextHolder.Size = UDim2.new(1, 0, 0, textHolderSize)
elseif currentConsole == SERVER_CONSOLE then
serverOffset = math.min(
math.max(serverOffset, 0),
textHolderSize - Dev_Container.Body.TextBox.AbsoluteSize.Y
)
Dev_TextHolder.Size = UDim2.new(1, 0, 0, textHolderSize)
end
local ratio = Dev_Container.Body.TextBox.AbsoluteSize.Y
/ Dev_TextHolder.AbsoluteSize.Y
if ratio >= 1 then
Dev_Container.Body.ScrollBar.Visible = false
Dev_Container.Body.TextBox.Size = UDim2.new(1, -4, 1, -28)
if
currentConsole == LOCAL_CONSOLE
or currentConsole == SERVER_CONSOLE
then
Dev_TextHolder.Position = UDim2.new(0, 0, 1, 0 - textHolderSize)
end
else
Dev_Container.Body.ScrollBar.Visible = true
Dev_Container.Body.TextBox.Size = UDim2.new(1, -25, 1, -28)
local backRatio = 1 - ratio
local offsetRatio
if currentConsole == LOCAL_CONSOLE then
offsetRatio = localOffset / Dev_TextHolder.AbsoluteSize.Y
elseif currentConsole == SERVER_CONSOLE then
offsetRatio = serverOffset / Dev_TextHolder.AbsoluteSize.Y
end
local topRatio = math.max(0, backRatio - offsetRatio)
local scrollHandleSize =
math.max(Dev_ScrollArea.AbsoluteSize.Y * ratio, 21)
local scrollRatio = scrollHandleSize / Dev_ScrollArea.AbsoluteSize.Y
local ratioConversion = (1 - scrollRatio) / (1 - ratio)
local topScrollRatio = topRatio * ratioConversion
local sPos = math.min(
Dev_ScrollArea.AbsoluteSize.Y * topScrollRatio,
Dev_ScrollArea.AbsoluteSize.Y - scrollHandleSize
)
Dev_ScrollArea.Handle.Size = UDim2.new(1, 0, 0, scrollHandleSize)
Dev_ScrollArea.Handle.Position = UDim2.new(0, 0, 0, sPos)
if currentConsole == LOCAL_CONSOLE then
Dev_TextHolder.Position =
UDim2.new(0, 0, 1, 0 - textHolderSize + localOffset)
elseif currentConsole == SERVER_CONSOLE then
Dev_TextHolder.Position =
UDim2.new(0, 0, 1, 0 - textHolderSize + serverOffset)
end
end
end
-- Easy, fast, and working nicely -- Easy, fast, and working nicely
local function numberWithZero(num) local function numberWithZero(num)
return (num < 10 and "0" or "") .. num return (num < 10 and "0" or "") .. num

View File

@ -954,10 +954,10 @@ RbxGui.CreateTrueScrollingFrame = function()
scrollBottom.Name = "ScrollBottom" scrollBottom.Name = "ScrollBottom"
scrollBottom.Parent = controlFrame scrollBottom.Parent = controlFrame
local scrollUp = Instance.new "BoolValue" local scrollUpValue = Instance.new "BoolValue"
scrollUp.Value = false scrollUpValue.Value = false
scrollUp.Name = "scrollUp" scrollUpValue.Name = "scrollUp"
scrollUp.Parent = controlFrame scrollUpValue.Parent = controlFrame
local scrollUpButton = Instance.new "TextButton" local scrollUpButton = Instance.new "TextButton"
scrollUpButton.Name = "ScrollUpButton" scrollUpButton.Name = "ScrollUpButton"
@ -1109,13 +1109,13 @@ RbxGui.CreateTrueScrollingFrame = function()
if newScaleYPos + relativeSize > 1 then if newScaleYPos + relativeSize > 1 then
newScaleYPos = 1 - relativeSize newScaleYPos = 1 - relativeSize
scrollBottom.Value = true scrollBottom.Value = true
scrollUp.Value = false scrollUpValue.Value = false
elseif newScaleYPos <= 0 then elseif newScaleYPos <= 0 then
newScaleYPos = 0 newScaleYPos = 0
scrollUp.Value = true scrollUpValue.Value = true
scrollBottom.Value = false scrollBottom.Value = false
else else
scrollUp.Value = false scrollUpValue.Value = false
scrollBottom.Value = false scrollBottom.Value = false
end end
scrollbar.Position = UDim2.new( scrollbar.Position = UDim2.new(
@ -1325,7 +1325,7 @@ RbxGui.CreateTrueScrollingFrame = function()
local scrollStamp local scrollStamp
local function scrollUp(mouseYPos) local function scrollUp()
if scrollUpButton.Active then if scrollUpButton.Active then
scrollStamp = tick() scrollStamp = tick()
local current = scrollStamp local current = scrollStamp
@ -1341,9 +1341,6 @@ RbxGui.CreateTrueScrollingFrame = function()
local w = 0.1 local w = 0.1
while scrollStamp == current do while scrollStamp == current do
doScrollUp() doScrollUp()
if mouseYPos and mouseYPos > scrollbar.AbsolutePosition.y then
break
end
if not scrollUpButton.Active then if not scrollUpButton.Active then
break break
end end

View File

@ -1,8 +1,8 @@
-- CoreGui.RobloxGui.CoreScripts/PlayerListScript -- CoreGui.RobloxGui.CoreScripts/PlayerListScript
print "[Mercury]: Loaded corescript 48488235" print "[Mercury]: Loaded corescript 48488235"
--new playerlist by Zach Lindblad (fusroblox) local New = require "../Modules/New"
--contact him for any revisions/issues
-------------------- --------------------
-- Super Util -- Super Util
-------------------- --------------------
@ -40,24 +40,6 @@ local BASE_TWEEN = 0.25
local MOUSE_DRAG_DISTANCE = 15 local MOUSE_DRAG_DISTANCE = 15
--[[
Generic object Create function, which I am using to create Gui's
Thanks to Stravant!
--]]
local function Create(guiType)
return function(data)
local obj = Instance.new(guiType)
for k, v in pairs(data) do
if type(k) == "number" then
v.Parent = obj
else
obj[k] = v
end
end
return obj
end
end
--[[ --[[
makes a full sized background for a guiobject makes a full sized background for a guiobject
@Args: @Args:
@ -65,7 +47,7 @@ end
@Return: background gui object @Return: background gui object
--]] --]]
local function MakeBackgroundGuiObj(imgName) local function MakeBackgroundGuiObj(imgName)
return Create "ImageLabel" { return New "ImageLabel" {
Name = "Background", Name = "Background",
BackgroundTransparency = 1, BackgroundTransparency = 1,
Image = imgName, Image = imgName,
@ -132,13 +114,13 @@ local HeaderFrame
@Return: a popup menu button @Return: a popup menu button
--]] --]]
local function MakePopupButton(nparent, ntext, index, last) local function MakePopupButton(nparent, ntext, index, last)
local tobj = Create "ImageButton" { local tobj = New "ImageButton" {
Name = "ReportButton", Name = "ReportButton",
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(0, 0, 1 * index, 0), Position = UDim2.new(0, 0, 1 * index, 0),
Size = UDim2.new(1, 0, 1, 0), Size = UDim2.new(1, 0, 1, 0),
ZIndex = 7, ZIndex = 7,
Create "TextLabel" { New "TextLabel" {
Name = "ButtonText", Name = "ButtonText",
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(0.07, 0, 0.07, 0), Position = UDim2.new(0.07, 0, 0.07, 0),
@ -188,13 +170,13 @@ end
local LocalPlayer = Players.LocalPlayer local LocalPlayer = Players.LocalPlayer
local Mouse = LocalPlayer:GetMouse() local Mouse = LocalPlayer:GetMouse()
local ScreenGui = Create "Frame" { local ScreenGui = New "Frame" {
Name = "PlayerListScreen", Name = "PlayerListScreen",
Size = UDim2.new(1, 0, 1, 0), Size = UDim2.new(1, 0, 1, 0),
BackgroundTransparency = 1, BackgroundTransparency = 1,
Parent = script.Parent, Parent = script.Parent,
} }
local MainFrame = Create "Frame" { local MainFrame = New "Frame" {
Name = "LeaderBoardFrame", Name = "LeaderBoardFrame",
Position = UDim2.new(1, -150, 0.005, 0), Position = UDim2.new(1, -150, 0.005, 0),
Size = UDim2.new(0, 150, 0, 800), Size = UDim2.new(0, 150, 0, 800),
@ -203,7 +185,7 @@ local MainFrame = Create "Frame" {
} }
--frame used for expanding leaderstats when frame is 'focused' --frame used for expanding leaderstats when frame is 'focused'
local FocusFrame = Create "Frame" { local FocusFrame = New "Frame" {
Name = "FocusFrame", Name = "FocusFrame",
Position = UDim2.new(0, 0, 0, 0), Position = UDim2.new(0, 0, 0, 0),
Size = UDim2.new(1, 0, 0, 100), Size = UDim2.new(1, 0, 0, 100),
@ -213,7 +195,7 @@ local FocusFrame = Create "Frame" {
} }
-- HEADER -- HEADER
HeaderFrame = Create "Frame" { HeaderFrame = New "Frame" {
Name = "Header", Name = "Header",
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(0, 0, 0, 0), Position = UDim2.new(0, 0, 0, 0),
@ -222,7 +204,7 @@ HeaderFrame = Create "Frame" {
MakeBackgroundGuiObj "http://banland.xyz/asset?id=94692054", MakeBackgroundGuiObj "http://banland.xyz/asset?id=94692054",
} }
local HeaderFrameHeight = HeaderFrame.Size.Y.Scale local HeaderFrameHeight = HeaderFrame.Size.Y.Scale
local MaximizeButton = Create "ImageButton" { local MaximizeButton = New "ImageButton" {
Name = "MaximizeButton", Name = "MaximizeButton",
Active = true, Active = true,
BackgroundTransparency = 1, BackgroundTransparency = 1,
@ -230,7 +212,7 @@ local MaximizeButton = Create "ImageButton" {
Size = UDim2.new(1, 0, 1, 0), Size = UDim2.new(1, 0, 1, 0),
Parent = HeaderFrame, Parent = HeaderFrame,
} }
local HeaderName = Create "TextLabel" { local HeaderName = New "TextLabel" {
Name = "PlayerName", Name = "PlayerName",
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(0, 0, 0.01, 0), Position = UDim2.new(0, 0, 0.01, 0),
@ -246,7 +228,7 @@ local HeaderName = Create "TextLabel" {
TextXAlignment = "Right", TextXAlignment = "Right",
TextYAlignment = "Center", TextYAlignment = "Center",
} }
local HeaderScore = Create "TextLabel" { local HeaderScore = New "TextLabel" {
Name = "PlayerScore", Name = "PlayerScore",
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(0, 0, 0.4, 0), Position = UDim2.new(0, 0, 0.4, 0),
@ -263,14 +245,14 @@ local HeaderScore = Create "TextLabel" {
} }
-- BOTTOM -- BOTTOM
--used for shifting bottom frame for mouse over effects --used for shifting bottom frame for mouse over effects
local BottomShiftFrame = Create "Frame" { local BottomShiftFrame = New "Frame" {
Name = "BottomShiftFrame", Name = "BottomShiftFrame",
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(0, 0, HeaderFrameHeight, 0), Position = UDim2.new(0, 0, HeaderFrameHeight, 0),
Size = UDim2.new(1, 0, 1, 0), Size = UDim2.new(1, 0, 1, 0),
Parent = MainFrame, Parent = MainFrame,
} }
local BottomFrame = Create "Frame" { local BottomFrame = New "Frame" {
Name = "Bottom", Name = "Bottom",
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(0, 0, 0.07, 0), Position = UDim2.new(0, 0, 0.07, 0),
@ -278,7 +260,7 @@ local BottomFrame = Create "Frame" {
Parent = BottomShiftFrame, Parent = BottomShiftFrame,
MakeBackgroundGuiObj "http://banland.xyz/asset?id=94754966", MakeBackgroundGuiObj "http://banland.xyz/asset?id=94754966",
} }
local ExtendButton = Create "ImageButton" { local ExtendButton = New "ImageButton" {
Name = "bigbutton", Name = "bigbutton",
Active = true, Active = true,
BackgroundTransparency = 1, BackgroundTransparency = 1,
@ -287,7 +269,7 @@ local ExtendButton = Create "ImageButton" {
ZIndex = 3, ZIndex = 3,
Parent = BottomFrame, Parent = BottomFrame,
} }
local ExtendTab = Create "ImageButton" { local ExtendTab = New "ImageButton" {
Name = "extendTab", Name = "extendTab",
Active = true, Active = true,
BackgroundTransparency = 1, BackgroundTransparency = 1,
@ -296,7 +278,7 @@ local ExtendTab = Create "ImageButton" {
Size = UDim2.new(0.3, 0, 0.7, 0), Size = UDim2.new(0.3, 0, 0.7, 0),
Parent = BottomFrame, Parent = BottomFrame,
} }
local TopClipFrame = Create "Frame" { local TopClipFrame = New "Frame" {
Name = "ListFrame", Name = "ListFrame",
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(-1, 0, 0.07, 0), Position = UDim2.new(-1, 0, 0.07, 0),
@ -304,7 +286,7 @@ local TopClipFrame = Create "Frame" {
Parent = MainFrame, Parent = MainFrame,
ClipsDescendants = true, ClipsDescendants = true,
} }
local BottomClipFrame = Create "Frame" { local BottomClipFrame = New "Frame" {
Name = "BottomFrame", Name = "BottomFrame",
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(0, 0, -0.8, 0), Position = UDim2.new(0, 0, -0.8, 0),
@ -312,14 +294,14 @@ local BottomClipFrame = Create "Frame" {
Parent = TopClipFrame, Parent = TopClipFrame,
ClipsDescendants = true, ClipsDescendants = true,
} }
local ScrollBarFrame = Create "Frame" { local ScrollBarFrame = New "Frame" {
Name = "ScrollBarFrame", Name = "ScrollBarFrame",
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(0.987, 0, 0.8, 0), Position = UDim2.new(0.987, 0, 0.8, 0),
Size = UDim2.new(0.01, 0, 0.2, 0), Size = UDim2.new(0.01, 0, 0.2, 0),
Parent = BottomClipFrame, Parent = BottomClipFrame,
} }
local ScrollBar = Create "Frame" { local ScrollBar = New "Frame" {
Name = "ScrollBar", Name = "ScrollBar",
BackgroundTransparency = 0, BackgroundTransparency = 0,
BackgroundColor3 = Color3.new(0.2, 0.2, 0.2), BackgroundColor3 = Color3.new(0.2, 0.2, 0.2),
@ -328,14 +310,14 @@ local ScrollBar = Create "Frame" {
ZIndex = 5, ZIndex = 5,
Parent = ScrollBarFrame, Parent = ScrollBarFrame,
} }
local ListFrame = Create "Frame" { local ListFrame = New "Frame" {
Name = "SubFrame", Name = "SubFrame",
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(0, 0, 0.8, 0), Position = UDim2.new(0, 0, 0.8, 0),
Size = UDim2.new(1, 0, 1, 0), Size = UDim2.new(1, 0, 1, 0),
Parent = BottomClipFrame, Parent = BottomClipFrame,
} }
local PopUpClipFrame = Create "Frame" { local PopUpClipFrame = New "Frame" {
Name = "PopUpFrame", Name = "PopUpFrame",
BackgroundTransparency = 1, BackgroundTransparency = 1,
SizeConstraint = "RelativeXX", SizeConstraint = "RelativeXX",
@ -346,7 +328,7 @@ local PopUpClipFrame = Create "Frame" {
ZIndex = 7, ZIndex = 7,
} }
local PopUpPanel local PopUpPanel
local PopUpPanelTemplate = Create "Frame" { local PopUpPanelTemplate = New "Frame" {
Name = "Panel", Name = "Panel",
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(1, 0, 0, 0), Position = UDim2.new(1, 0, 0, 0),
@ -354,7 +336,7 @@ local PopUpPanelTemplate = Create "Frame" {
Parent = PopUpClipFrame, Parent = PopUpClipFrame,
} }
local StatTitles = Create "Frame" { local StatTitles = New "Frame" {
Name = "StatTitles", Name = "StatTitles",
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(0, 0, 1, -10), Position = UDim2.new(0, 0, 1, -10),
@ -367,12 +349,12 @@ local IsMaximized = Instance.new "BoolValue"
local IsTabified = Instance.new "BoolValue" local IsTabified = Instance.new "BoolValue"
local AreNamesExpanded = Instance.new "BoolValue" local AreNamesExpanded = Instance.new "BoolValue"
local MiddleTemplate = Create "Frame" { local MiddleTemplate = New "Frame" {
Name = "MidTemplate", Name = "MidTemplate",
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(100, 0, 0.07, 0), Position = UDim2.new(100, 0, 0.07, 0),
Size = UDim2.new(0.5, 0, 0.025, 0), --UDim2.new(1, 0, .03, 0), Size = UDim2.new(0.5, 0, 0.025, 0), --UDim2.new(1, 0, .03, 0),
Create "ImageLabel" { New "ImageLabel" {
Name = "BCLabel", Name = "BCLabel",
Active = true, Active = true,
BackgroundTransparency = 1, BackgroundTransparency = 1,
@ -382,7 +364,7 @@ local MiddleTemplate = Create "Frame" {
Image = "", Image = "",
ZIndex = 3, ZIndex = 3,
}, },
Create "ImageLabel" { New "ImageLabel" {
Name = "FriendLabel", Name = "FriendLabel",
Active = true, Active = true,
BackgroundTransparency = 1, BackgroundTransparency = 1,
@ -392,7 +374,7 @@ local MiddleTemplate = Create "Frame" {
Image = "", Image = "",
ZIndex = 3, ZIndex = 3,
}, },
Create "ImageButton" { New "ImageButton" {
Name = "ClickListener", Name = "ClickListener",
Active = true, Active = true,
BackgroundTransparency = 1, BackgroundTransparency = 1,
@ -400,13 +382,13 @@ local MiddleTemplate = Create "Frame" {
Size = UDim2.new(0.96, 0, 1, 0), Size = UDim2.new(0.96, 0, 1, 0),
ZIndex = 3, ZIndex = 3,
}, },
Create "Frame" { New "Frame" {
Name = "TitleFrame", Name = "TitleFrame",
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(0.01, 0, 0, 0), Position = UDim2.new(0.01, 0, 0, 0),
Size = UDim2.new(0, 140, 1, 0), Size = UDim2.new(0, 140, 1, 0),
ClipsDescendants = true, ClipsDescendants = true,
Create "TextLabel" { New "TextLabel" {
Name = "Title", Name = "Title",
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(0, 5, 0, 0), Position = UDim2.new(0, 5, 0, 0),
@ -420,7 +402,7 @@ local MiddleTemplate = Create "Frame" {
}, },
}, },
Create "TextLabel" { New "TextLabel" {
Name = "PlayerScore", Name = "PlayerScore",
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(0, 0, 0, 0), Position = UDim2.new(0, 0, 0, 0),
@ -438,7 +420,7 @@ local MiddleTemplate = Create "Frame" {
--Create'IntValue'{Name = 'Score'}, --Create'IntValue'{Name = 'Score'},
ZIndex = 3, ZIndex = 3,
} }
local MiddleBGTemplate = Create "Frame" { local MiddleBGTemplate = New "Frame" {
Name = "MidBGTemplate", Name = "MidBGTemplate",
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(100, 0, 0.07, 0), Position = UDim2.new(100, 0, 0.07, 0),
@ -448,7 +430,7 @@ local MiddleBGTemplate = Create "Frame" {
-- REPORT ABUSE OBJECTS -- REPORT ABUSE OBJECTS
local ReportAbuseShield = Create "TextButton" { local ReportAbuseShield = New "TextButton" {
Name = "ReportAbuseShield", Name = "ReportAbuseShield",
Text = "", Text = "",
AutoButtonColor = false, AutoButtonColor = false,
@ -460,7 +442,7 @@ local ReportAbuseShield = Create "TextButton" {
BackgroundTransparency = 1, BackgroundTransparency = 1,
} }
local ReportAbuseFrame = Create "Frame" { local ReportAbuseFrame = New "Frame" {
Name = "Settings", Name = "Settings",
Position = UDim2.new(0.5, -250, 0.5, -200), Position = UDim2.new(0.5, -250, 0.5, -200),
Size = UDim2.new(0, 500, 0, 400), Size = UDim2.new(0, 500, 0, 400),
@ -469,13 +451,13 @@ local ReportAbuseFrame = Create "Frame" {
Parent = ReportAbuseShield, Parent = ReportAbuseShield,
} }
local AbuseSettingsFrame = Create "Frame" { local AbuseSettingsFrame = New "Frame" {
Name = "ReportAbuseStyle", Name = "ReportAbuseStyle",
Size = UDim2.new(1, 0, 1, 0), Size = UDim2.new(1, 0, 1, 0),
Active = true, Active = true,
BackgroundTransparency = 1, BackgroundTransparency = 1,
MakeBackgroundGuiObj "http://banland.xyz/asset?id=96488767", -- 96480351'), MakeBackgroundGuiObj "http://banland.xyz/asset?id=96488767", -- 96480351",
Create "TextLabel" { New "TextLabel" {
Name = "Title", Name = "Title",
Text = "Report Abuse", Text = "Report Abuse",
TextColor3 = Color3I(221, 221, 221), TextColor3 = Color3I(221, 221, 221),
@ -483,7 +465,7 @@ local AbuseSettingsFrame = Create "Frame" {
Font = Enum.Font.ArialBold, Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size36, FontSize = Enum.FontSize.Size36,
}, },
Create "TextLabel" { New "TextLabel" {
Name = "Description", Name = "Description",
Text = "This will send a complete report to a moderator. The moderator will review the chat log and take appropriate action.", Text = "This will send a complete report to a moderator. The moderator will review the chat log and take appropriate action.",
TextColor3 = Color3I(221, 221, 221), TextColor3 = Color3I(221, 221, 221),
@ -496,7 +478,7 @@ local AbuseSettingsFrame = Create "Frame" {
TextXAlignment = Enum.TextXAlignment.Left, TextXAlignment = Enum.TextXAlignment.Left,
TextYAlignment = Enum.TextYAlignment.Top, TextYAlignment = Enum.TextYAlignment.Top,
}, },
Create "TextLabel" { New "TextLabel" {
Name = "AbuseLabel", Name = "AbuseLabel",
Text = "What did they do?", Text = "What did they do?",
Font = Enum.Font.Arial, Font = Enum.Font.Arial,
@ -507,7 +489,7 @@ local AbuseSettingsFrame = Create "Frame" {
TextColor3 = Color3I(255, 255, 255), TextColor3 = Color3I(255, 255, 255),
TextXAlignment = Enum.TextXAlignment.Left, TextXAlignment = Enum.TextXAlignment.Left,
}, },
Create "TextLabel" { New "TextLabel" {
Name = "ShortDescriptionLabel", Name = "ShortDescriptionLabel",
Text = "Short Description: (optional)", Text = "Short Description: (optional)",
Font = Enum.Font.Arial, Font = Enum.Font.Arial,
@ -518,7 +500,7 @@ local AbuseSettingsFrame = Create "Frame" {
TextXAlignment = Enum.TextXAlignment.Left, TextXAlignment = Enum.TextXAlignment.Left,
BackgroundTransparency = 1, BackgroundTransparency = 1,
}, },
Create "TextLabel" { New "TextLabel" {
Name = "ReportingPlayerLabel", Name = "ReportingPlayerLabel",
Text = "Reporting Player", Text = "Reporting Player",
BackgroundTransparency = 1, BackgroundTransparency = 1,
@ -533,7 +515,7 @@ local AbuseSettingsFrame = Create "Frame" {
Parent = ReportAbuseFrame, Parent = ReportAbuseFrame,
} }
local AbusePlayerLabel = Create "TextLabel" { local AbusePlayerLabel = New "TextLabel" {
Name = "PlayerLabel", Name = "PlayerLabel",
Text = "", Text = "",
BackgroundTransparency = 1, BackgroundTransparency = 1,
@ -546,7 +528,7 @@ local AbusePlayerLabel = Create "TextLabel" {
Parent = AbuseSettingsFrame, Parent = AbuseSettingsFrame,
} }
local SubmitReportButton = Create "ImageButton" { local SubmitReportButton = New "ImageButton" {
Name = "SubmitReportBtn", Name = "SubmitReportBtn",
Active = false, Active = false,
BackgroundTransparency = 1, BackgroundTransparency = 1,
@ -557,7 +539,7 @@ local SubmitReportButton = Create "ImageButton" {
Parent = AbuseSettingsFrame, Parent = AbuseSettingsFrame,
} }
local CancelReportButton = Create "ImageButton" { local CancelReportButton = New "ImageButton" {
Name = "CancelBtn", Name = "CancelBtn",
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(0.5, 50, 1, -80), Position = UDim2.new(0.5, 50, 1, -80),
@ -567,7 +549,7 @@ local CancelReportButton = Create "ImageButton" {
Parent = AbuseSettingsFrame, Parent = AbuseSettingsFrame,
} }
local AbuseDescriptionWrapper = Create "Frame" { local AbuseDescriptionWrapper = New "Frame" {
Name = "AbuseDescriptionWrapper", Name = "AbuseDescriptionWrapper",
Position = UDim2.new(0.025, 0, 0, 220), Position = UDim2.new(0.025, 0, 0, 220),
Size = UDim2.new(0.95, 0, 1, -310), Size = UDim2.new(0.95, 0, 1, -310),
@ -578,7 +560,7 @@ local AbuseDescriptionWrapper = Create "Frame" {
local AbuseDescriptionBox local AbuseDescriptionBox
local OriginalAbuseDescriptionBox = Create "TextBox" { local OriginalAbuseDescriptionBox = New "TextBox" {
Name = "TextBox", Name = "TextBox",
Text = "", Text = "",
ClearTextOnFocus = false, ClearTextOnFocus = false,
@ -594,13 +576,13 @@ local OriginalAbuseDescriptionBox = Create "TextBox" {
BorderSizePixel = 0, BorderSizePixel = 0,
} }
local CalmingAbuseBox = Create "Frame" { local CalmingAbuseBox = New "Frame" {
Name = "AbuseFeedbackBox", Name = "AbuseFeedbackBox",
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(0.25, 0, 0.300000012, 0), Position = UDim2.new(0.25, 0, 0.300000012, 0),
Size = UDim2.new(0.5, 0, 0.370000005, 0), Size = UDim2.new(0.5, 0, 0.370000005, 0),
MakeBackgroundGuiObj "http://banland.xyz/asset?id=96506233", MakeBackgroundGuiObj "http://banland.xyz/asset?id=96506233",
Create "TextLabel" { New "TextLabel" {
Name = "Header", Name = "Header",
Position = UDim2.new(0, 10, 0.05, 0), Position = UDim2.new(0, 10, 0.05, 0),
Size = UDim2.new(1, -30, 0.15, 0), Size = UDim2.new(1, -30, 0.15, 0),
@ -613,7 +595,7 @@ local CalmingAbuseBox = Create "Frame" {
FontSize = Enum.FontSize.Size48, FontSize = Enum.FontSize.Size48,
Font = "ArialBold", Font = "ArialBold",
}, },
Create "TextLabel" { New "TextLabel" {
Name = "content", Name = "content",
Position = UDim2.new(0, 10, 0.20, 0), Position = UDim2.new(0, 10, 0.20, 0),
Size = UDim2.new(1, -30, 0.40, 0), Size = UDim2.new(1, -30, 0.40, 0),
@ -626,7 +608,7 @@ local CalmingAbuseBox = Create "Frame" {
FontSize = Enum.FontSize.Size24, FontSize = Enum.FontSize.Size24,
Font = "Arial", Font = "Arial",
}, },
Create "ImageButton" { New "ImageButton" {
Name = "OkButton", Name = "OkButton",
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(0.5, -75, 1, -80), Position = UDim2.new(0.5, -75, 1, -80),
@ -635,13 +617,13 @@ local CalmingAbuseBox = Create "Frame" {
Image = "http://banland.xyz/asset?id=96507959", Image = "http://banland.xyz/asset?id=96507959",
}, },
} }
local NormalAbuseBox = Create "Frame" { local NormalAbuseBox = New "Frame" {
Name = "AbuseFeedbackBox", Name = "AbuseFeedbackBox",
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(0.25, 0, 0.300000012, 0), Position = UDim2.new(0.25, 0, 0.300000012, 0),
Size = UDim2.new(0.5, 0, 0.370000005, 0), Size = UDim2.new(0.5, 0, 0.370000005, 0),
MakeBackgroundGuiObj "http://banland.xyz/asset?id=96506233", MakeBackgroundGuiObj "http://banland.xyz/asset?id=96506233",
Create "TextLabel" { New "TextLabel" {
Name = "Header", Name = "Header",
Position = UDim2.new(0, 10, 0.05, 0), Position = UDim2.new(0, 10, 0.05, 0),
Size = UDim2.new(1, -30, 0.15, 0), Size = UDim2.new(1, -30, 0.15, 0),
@ -654,7 +636,7 @@ local NormalAbuseBox = Create "Frame" {
FontSize = Enum.FontSize.Size48, FontSize = Enum.FontSize.Size48,
Font = "ArialBold", Font = "ArialBold",
}, },
Create "TextLabel" { New "TextLabel" {
Name = "content", Name = "content",
Position = UDim2.new(0, 10, 0.20, 0), Position = UDim2.new(0, 10, 0.20, 0),
Size = UDim2.new(1, -30, 0.15, 0), Size = UDim2.new(1, -30, 0.15, 0),
@ -667,7 +649,7 @@ local NormalAbuseBox = Create "Frame" {
FontSize = Enum.FontSize.Size24, FontSize = Enum.FontSize.Size24,
Font = "Arial", Font = "Arial",
}, },
Create "ImageButton" { New "ImageButton" {
Name = "OkButton", Name = "OkButton",
BackgroundTransparency = 1, BackgroundTransparency = 1,
Position = UDim2.new(0.5, -75, 1, -80), Position = UDim2.new(0.5, -75, 1, -80),
@ -685,7 +667,7 @@ BigButton.Visible = false
--BigButton.Active=false --BigButton.Active=false
BigButton.Parent = ScreenGui BigButton.Parent = ScreenGui
local debugFrame = Create "Frame" { local debugFrame = New "Frame" {
Name = "debugframe", Name = "debugframe",
--Position = UDim2.new(0, 0, 0, 0), --Position = UDim2.new(0, 0, 0, 0),
--Size = UDim2.new(0, 150, 0, 800),--0.99000001 --Size = UDim2.new(0, 150, 0, 800),--0.99000001
@ -695,7 +677,7 @@ local debugFrame = Create "Frame" {
Size = UDim2.new(0.5, 0, 0.370000005, 0), Size = UDim2.new(0.5, 0, 0.370000005, 0),
MakeBackgroundGuiObj "http://banland.xyz/asset?id=96506233", MakeBackgroundGuiObj "http://banland.xyz/asset?id=96506233",
} }
local debugOutput = Create "TextLabel" { local debugOutput = New "TextLabel" {
BackgroundTransparency = 0.8, BackgroundTransparency = 0.8,
Position = UDim2.new(0, 0, 0.5, 0), Position = UDim2.new(0, 0, 0.5, 0),
Size = UDim2.new(1, 0, 0.5, 0), Size = UDim2.new(1, 0, 0.5, 0),
@ -939,13 +921,13 @@ local function WaitForClick(frameParent, polledFunction, exitFunction)
if connection2 then if connection2 then
connection2:disconnect() connection2:disconnect()
end end
--debugprint('mouse up!') -- debugprint "mouse up!"
end) end)
connection2 = BigButton.MouseMoved:connect(function(nx, ny) connection2 = BigButton.MouseMoved:connect(function(nx, ny)
polledFunction(nx, ny) polledFunction(nx, ny)
end) end)
--debugprint('waiting for click!') -- debugprint "waiting for click!"
BigButton.Visible = true BigButton.Visible = true
BigButton.Active = true BigButton.Active = true
BigButton.Parent = frameParent BigButton.Parent = frameParent
@ -1071,7 +1053,7 @@ end
local function CloseAbuseDialog() local function CloseAbuseDialog()
AbuseName = nil AbuseName = nil
SubmitReportButton.Active = false SubmitReportButton.Active = false
SubmitReportButton.Image = "http://banland.xyz/asset?id=96502438" -- 96501119', SubmitReportButton.Image = "http://banland.xyz/asset?id=96502438" -- 96501119",
AbuseDescriptionBox:Destroy() AbuseDescriptionBox:Destroy()
CalmingAbuseBox.Parent = nil CalmingAbuseBox.Parent = nil
NormalAbuseBox.Parent = nil NormalAbuseBox.Parent = nil
@ -1742,7 +1724,7 @@ local function TeamListModeUpdate()
SortTeams(TeamFrames) SortTeams(TeamFrames)
if NeutralTeam then if NeutralTeam then
AddTeamScores(NeutralTeam) AddTeamScores(NeutralTeam)
--RecreateScoreColumns(NeutralTeam['MyPlayers']) -- RecreateScoreColumns(NeutralTeam.MyPlayers)
end end
UnrollTeams(TeamFrames, MiddleFrames) UnrollTeams(TeamFrames, MiddleFrames)
end end
@ -1774,7 +1756,7 @@ local function BaseUpdate()
wait() wait()
end end
BaseUpdateLock = true BaseUpdateLock = true
--print ('baseupdate') -- print "baseupdate"
UpdateStatNames() UpdateStatNames()
if #TeamFrames == 0 and not NeutralTeam then if #TeamFrames == 0 and not NeutralTeam then
@ -1803,7 +1785,7 @@ local function BaseUpdate()
UpdateScrollPosition() UpdateScrollPosition()
UpdateScrollBarVisibility() UpdateScrollBarVisibility()
--debugprint('EndBaseUpdate') -- debugprint "EndBaseUpdate"
BaseUpdateLock = false BaseUpdateLock = false
end end
@ -1816,7 +1798,7 @@ RecreateScoreColumns = function(ptable)
local nscoretxt = panel:FindFirstChild("PlayerScore"):Clone() local nscoretxt = panel:FindFirstChild("PlayerScore"):Clone()
local thisScore local thisScore
--here lies the resting place of a once great and terrible bug --here lies the resting place of a once great and terrible bug
--may its treachery never be forgoten, lest its survivors fall for it again --may its treachery never be forgotten, lest its survivors fall for it again
--RIP the leaderstat bug, oct 2012-nov 2012 --RIP the leaderstat bug, oct 2012-nov 2012
wait() wait()
if if
@ -1891,7 +1873,7 @@ RecreateScoreColumns = function(ptable)
and not entry.MyTeam.Frame:FindFirstChild(scoreval.Name) and not entry.MyTeam.Frame:FindFirstChild(scoreval.Name)
then then
local ntitle = nentry:Clone() local ntitle = nentry:Clone()
--ntitle.TextXAlignment = 'Right' -- ntitle.TextXAlignment = "Right"
ntitle.Parent = entry.MyTeam.Frame ntitle.Parent = entry.MyTeam.Frame
end end
end end
@ -2083,8 +2065,8 @@ end
property Name of stat changed property Name of stat changed
--]] --]]
local function StatChanged(_, _) --playerEntry, property) local function StatChanged(_, _) --playerEntry, property)
-- if(playerEntry['MyTeam']) then -- if playerEntry["MyTeam"] then
-- UpdateSingleTeam(playerEntry['MyTeam']) -- UpdateSingleTeam(playerEntry["MyTeam"])
-- else -- else
BaseUpdate() BaseUpdate()
-- end -- end
@ -2500,7 +2482,7 @@ local function StartMinimizeDrag()
local startTime = tick() local startTime = tick()
debugprint "Got Click2" debugprint "Got Click2"
local function dragExit() local function dragExit()
--debugprint('undone click2') -- debugprint "undone click2"
if tick() - startTime < 0.25 then --was click if tick() - startTime < 0.25 then --was click
ToggleMinimize() ToggleMinimize()
else --was drag else --was drag
@ -2636,7 +2618,7 @@ local function AddMiddleBGFrame()
table.insert(MiddleFrameBackgrounds, nBGFrame) table.insert(MiddleFrameBackgrounds, nBGFrame)
if #MiddleFrameBackgrounds < DefaultListSize and not DidMinimizeDrag then if #MiddleFrameBackgrounds < DefaultListSize and not DidMinimizeDrag then
--print('readjusting bottom clip') -- print "readjusting bottom clip"
DefaultBottomClipPos = -1 DefaultBottomClipPos = -1
+ (#MiddleFrameBackgrounds * MiddleBGTemplate.Size.Y.Scale) + (#MiddleFrameBackgrounds * MiddleBGTemplate.Size.Y.Scale)
end end
@ -3109,7 +3091,9 @@ Players.ChildRemoved:connect(RemovePlayerFrame)
local function OnFriendshipChanged(player, friendStatus) local function OnFriendshipChanged(player, friendStatus)
Delay(0.5, function() Delay(0.5, function()
debugprint( debugprint(
`friend status changed for {player.Name} {friendStatus} vs {GetFriendStatus(player)}` `friend status changed for {player.Name} {friendStatus} vs {GetFriendStatus(
player
)}`
) )
for _, entry in ipairs(PlayerFrames) do for _, entry in ipairs(PlayerFrames) do
if entry.Player == player then if entry.Player == player then

View File

@ -1,75 +1,75 @@
-- CoreGui.RobloxGui.CoreScripts/PopupScript -- CoreGui.RobloxGui.CoreScripts/PopupScript
print "[Mercury]: Loaded corescript 48488451" print "[Mercury]: Loaded corescript 48488451"
local New = require "../Modules/New"
--build our gui --build our gui
local popupFrame = Instance.new "Frame" local popupFrame = New "Frame" {
popupFrame.Position = UDim2.new(0.5, -165, 0.5, -175) Name = "Popup",
popupFrame.Size = UDim2.new(0, 330, 0, 350) Position = UDim2.new(0.5, -165, 0.5, -175),
popupFrame.Style = Enum.FrameStyle.RobloxRound Size = UDim2.new(0, 330, 0, 350),
popupFrame.ZIndex = 4 Style = Enum.FrameStyle.RobloxRound,
popupFrame.Name = "Popup" ZIndex = 4,
popupFrame.Visible = false Visible = false,
popupFrame.Parent = script.Parent Parent = script.Parent,
New "ImageLabel" {
local darken = popupFrame:clone() Name = "PopupImage",
darken.Size = UDim2.new(1, 16, 1, 16) BackgroundTransparency = 1,
darken.Position = UDim2.new(0, -8, 0, -8) Position = UDim2.new(0.5, -140, 0, 0),
darken.Name = "Darken" Size = UDim2.new(0, 280, 0, 280),
darken.ZIndex = 1 ZIndex = 3,
darken.Parent = popupFrame New "ImageLabel" {
Name = "Backing",
local acceptButton = Instance.new "TextButton" BackgroundTransparency = 1,
acceptButton.Position = UDim2.new(0, 20, 0, 270) Size = UDim2.new(1, 0, 1, 0),
acceptButton.Size = UDim2.new(0, 100, 0, 50) Image = "http://banland.xyz/asset/?id=47574181",
acceptButton.Font = Enum.Font.ArialBold ZIndex = 2,
acceptButton.FontSize = Enum.FontSize.Size24 },
acceptButton.Style = Enum.ButtonStyle.RobloxButton },
acceptButton.TextColor3 = Color3.new(248 / 255, 248 / 255, 248 / 255) New "TextLabel" {
acceptButton.Text = "Yes" Name = "PopupText",
acceptButton.ZIndex = 5 Size = UDim2.new(1, 0, 0.8, 0),
acceptButton.Name = "AcceptButton" Font = Enum.Font.ArialBold,
acceptButton.Parent = popupFrame FontSize = Enum.FontSize.Size36,
BackgroundTransparency = 1,
local declineButton = acceptButton:clone() Text = "Hello I'm a popup",
declineButton.Position = UDim2.new(1, -120, 0, 270) TextColor3 = Color3.new(248 / 255, 248 / 255, 248 / 255),
declineButton.Text = "No" TextWrap = true,
declineButton.Name = "DeclineButton" ZIndex = 5,
declineButton.Parent = popupFrame },
}
local okButton = acceptButton:clone() New(popupFrame:clone()) {
okButton.Name = "OKButton" Name = "Darken",
okButton.Text = "OK" Size = UDim2.new(1, 16, 1, 16),
okButton.Position = UDim2.new(0.5, -50, 0, 270) Position = UDim2.new(0, -8, 0, -8),
okButton.Visible = false ZIndex = 1,
okButton.Parent = popupFrame Parent = popupFrame,
}
local popupImage = Instance.new "ImageLabel" local acceptButton = New "TextButton" {
popupImage.BackgroundTransparency = 1 Name = "AcceptButton",
popupImage.Position = UDim2.new(0.5, -140, 0, 0) Position = UDim2.new(0, 20, 0, 270),
popupImage.Size = UDim2.new(0, 280, 0, 280) Size = UDim2.new(0, 100, 0, 50),
popupImage.ZIndex = 3 Font = Enum.Font.ArialBold,
popupImage.Name = "PopupImage" FontSize = Enum.FontSize.Size24,
popupImage.Parent = popupFrame Style = Enum.ButtonStyle.RobloxButton,
TextColor3 = Color3.new(248 / 255, 248 / 255, 248 / 255),
local backing = Instance.new "ImageLabel" Text = "Yes",
backing.BackgroundTransparency = 1 ZIndex = 5,
backing.Size = UDim2.new(1, 0, 1, 0) Parent = popupFrame,
backing.Image = "http://banland.xyz/asset/?id=47574181" }
backing.Name = "Backing" New(acceptButton:clone()) {
backing.ZIndex = 2 Name = "DeclineButton",
backing.Parent = popupImage Text = "No",
Position = UDim2.new(1, -120, 0, 270),
local popupText = Instance.new "TextLabel" Parent = popupFrame,
popupText.Name = "PopupText" }
popupText.Size = UDim2.new(1, 0, 0.8, 0) New(acceptButton:clone()) {
popupText.Font = Enum.Font.ArialBold Name = "OKButton",
popupText.FontSize = Enum.FontSize.Size36 Text = "OK",
popupText.BackgroundTransparency = 1 Position = UDim2.new(0.5, -50, 0, 270),
popupText.Text = "Hello I'm a popup" Visible = false,
popupText.TextColor3 = Color3.new(248 / 255, 248 / 255, 248 / 255) Parent = popupFrame,
popupText.TextWrap = true }
popupText.ZIndex = 5
popupText.Parent = popupFrame
script:remove() script:remove()

File diff suppressed because it is too large Load Diff

View File

@ -39,7 +39,6 @@ local closeButton = backpack.Tabs.CloseButton
waitForChild(backpack.Tabs, "InventoryButton") waitForChild(backpack.Tabs, "InventoryButton")
local inventoryButton = backpack.Tabs.InventoryButton local inventoryButton = backpack.Tabs.InventoryButton
local wardrobeButton
waitForChild(backpack.Parent, "ControlFrame") waitForChild(backpack.Parent, "ControlFrame")
local backpackButton = local backpackButton =
waitForChild(backpack.Parent.ControlFrame, "BackpackButton") waitForChild(backpack.Parent.ControlFrame, "BackpackButton")
@ -297,9 +296,7 @@ function updateTabGui(selectedTab)
if selectedTab == "gear" then if selectedTab == "gear" then
setSelected(inventoryButton) setSelected(inventoryButton)
setUnselected(wardrobeButton)
elseif selectedTab == "wardrobe" then elseif selectedTab == "wardrobe" then
setSelected(wardrobeButton)
setUnselected(inventoryButton) setUnselected(inventoryButton)
end end
end end