Run it
Copy the script and paste it into your executor.
TweenService = :()
UserInputService = :()
RunService = :()
GuiService = :()
BACKGROUND_IMAGE_URL =
BACKGROUND_IMAGE_FALLBACK =
BACKGROUND_IMAGE_TRANSPARENCY =
SIDEBAR_BACKGROUND_IMAGE_URL =
OVERLAY_TRANSPARENCY =
IconLibraryURL =
IconLibrary = (:(IconLibraryURL))()
IconLibrary.()
Library = {}
Library.__index = Library
(iconName, parent, color)
iconName parent
()
success, iconData = (()
IconLibrary.(iconName, , )
)
success iconData
( .. iconName)
iconLabel = .()
iconLabel.Name =
iconLabel.Size = .(, , , )
iconLabel.BackgroundTransparency =
iconLabel.Image = iconData[]
iconLabel.ImageRectSize = iconData[].ImageRectSize
iconLabel.ImageRectOffset = iconData[].ImageRectPosition
iconLabel.ImageColor3 = color .(, , )
iconLabel.ScaleType = .ScaleType.Fit
iconLabel.Parent = parent
iconLabel
.LoadLucideIcon = LoadLucideIcon
.IconLibrary = IconLibrary
.HideUsernameEnabled =
()
hasTouchNoKeyboard = UserInputService.TouchEnabled UserInputService.KeyboardEnabled
viewportSize = .CurrentCamera.ViewportSize
isSmallScreen = (viewportSize.X < viewportSize.Y < )
aspectRatio = viewportSize.Y / viewportSize.X
isMobileAspectRatio = (aspectRatio > ) (aspectRatio < aspectRatio > )
isSmallDisplay = GuiService.ViewportDisplaySize == .DisplaySize.Small
isTenFoot = GuiService:()
isTenFoot
hasTouchNoKeyboard
UserInputService.TouchEnabled (isSmallScreen isMobileAspectRatio isSmallDisplay)
()
()
viewportSize = .CurrentCamera.ViewportSize
baseWidth =
baseHeight =
scaleX = viewportSize.X / baseWidth
scaleY = viewportSize.Y / baseHeight
scale = .(scaleX, scaleY)
viewportSize.Y > viewportSize.X
scale = scale *
scale = scale *
.(scale, , )
(baseSize, minSize, maxSize)
viewportSize = .CurrentCamera.ViewportSize
isMobile = ()
baseWidth = baseSize.X.Offset
baseHeight = baseSize.Y.Offset
targetWidth, targetHeight
isMobile
isPortrait = viewportSize.Y > viewportSize.X
isPortrait
targetWidth = viewportSize.X *
targetHeight = viewportSize.Y *
targetWidth = viewportSize.X *
targetHeight = viewportSize.Y *
targetWidth = .(baseWidth, viewportSize.X * )
targetHeight = .(baseHeight, viewportSize.Y * )
baseWidth < viewportSize.X * baseHeight < viewportSize.Y *
targetWidth = baseWidth
targetHeight = baseHeight
targetWidth = .(targetWidth, minSize.X)
targetHeight = .(targetHeight, minSize.Y)
targetWidth = .(targetWidth, maxSize.X)
targetHeight = .(targetHeight, maxSize.Y)
marginX = isMobile
marginY = isMobile
targetWidth = .(targetWidth, viewportSize.X - marginX)
targetHeight = .(targetHeight, viewportSize.Y - marginY)
targetWidth = .(targetWidth)
targetHeight = .(targetHeight)
.(, targetWidth, , targetHeight)
Theme = {
MainBackground = .(, , ),
SidebarBackground = .(, , ),
AccentColor = .(, , ),
AccentHover = .(, , ),
TextColor = .(, , ),
TextSecondary = .(, , ),
SeparatorColor = .(, , ),
ToggleOn = .(, , ),
ToggleOff = .(, , ),
SuccessColor = .(, , ),
ErrorColor = .(, , ),
WarningColor = .(, , ),
}
TweenPresets = {
Fast = TweenInfo.(, .EasingStyle.Quad, .EasingDirection.Out),
Medium = TweenInfo.(, .EasingStyle.Quad, .EasingDirection.Out),
Smooth = TweenInfo.(, .EasingStyle.Sine, .EasingDirection.Out),
}
(instance, properties, tweenInfo)
tweenInfo = tweenInfo TweenPresets.Fast
tween = TweenService:(instance, tweenInfo, properties)
tween:()
tween
(frame)
frame.BackgroundTransparency =
blur = .()
blur.Name =
blur.Size = .(, , , )
blur.Position = .(, , , )
blur.BackgroundTransparency =
blur.Image =
blur.ImageTransparency =
blur.ScaleType = .ScaleType.Tile
blur.TileSize = .(, , , )
blur.ZIndex = frame.ZIndex -
blur.Parent = frame
blur
NotificationContainer =
ActiveNotifications = {}
Library:(config)
config = config {}
title = config.Title
content = config.Content
duration = config.Duration
icon = config.Icon
iconThemed = config.IconThemed
NotificationContainer NotificationContainer.Parent
screenGui = .()
screenGui.Name =
screenGui.ResetOnSpawn =
screenGui.ZIndexBehavior = .ZIndexBehavior.Sibling
screenGui.DisplayOrder =
screenGui.Parent = :()
NotificationContainer = .()
NotificationContainer.Name =
NotificationContainer.Size = .(, , , -)
NotificationContainer.Position = .(, -, , )
NotificationContainer.BackgroundTransparency =
NotificationContainer.Parent = screenGui
listLayout = .()
listLayout.SortOrder = .SortOrder.LayoutOrder
listLayout.Padding = .(, )
listLayout.VerticalAlignment = .VerticalAlignment.Top
listLayout.Parent = NotificationContainer
notifFrame = .()
notifFrame.Name =
notifFrame.Size = .(, , , )
notifFrame.BackgroundColor3 = Theme.SidebarBackground
notifFrame.BackgroundTransparency =
notifFrame.BorderSizePixel =
notifFrame.ClipsDescendants =
notifFrame.LayoutOrder = #ActiveNotifications +
notifFrame.Parent = NotificationContainer
notifCorner = .()
notifCorner.CornerRadius = .(, )
notifCorner.Parent = notifFrame
notifStroke = .()
notifStroke.Color = Theme.SeparatorColor
notifStroke.Transparency =
notifStroke.Thickness =
notifStroke.ApplyStrokeMode = .ApplyStrokeMode.Border
notifStroke.Parent = notifFrame
(notifFrame)
contentContainer = .()
contentContainer.Name =
contentContainer.Size = .(, -, , -)
contentContainer.Position = .(, , , )
contentContainer.BackgroundTransparency =
contentContainer.Parent = notifFrame
contentLayout = .()
contentLayout.SortOrder = .SortOrder.LayoutOrder
contentLayout.Padding = .(, )
contentLayout.FillDirection = .FillDirection.Vertical
contentLayout.Parent = contentContainer
headerFrame = .()
headerFrame.Name =
headerFrame.Size = .(, , , )
headerFrame.BackgroundTransparency =
headerFrame.LayoutOrder =
headerFrame.Parent = contentContainer
icon
iconContainer = .()
iconContainer.Name =
iconContainer.Size = .(, , , )
iconContainer.Position = .(, , , )
iconContainer.BackgroundTransparency =
iconContainer.Parent = headerFrame
icon:()
iconName = icon:(, )
(iconName, iconContainer, iconThemed Theme.AccentColor Theme.TextColor)
icon:() icon:()
iconImage = .()
iconImage.Size = .(, , , )
iconImage.BackgroundTransparency =
iconImage.Image = icon
iconImage.ImageColor3 = iconThemed Theme.AccentColor Theme.TextColor
iconImage.Parent = iconContainer
(icon, iconContainer, iconThemed Theme.AccentColor Theme.TextColor)
titleLabel = .()
titleLabel.Name =
titleLabel.Size = .(, icon - , , )
titleLabel.Position = .(, icon , , )
titleLabel.BackgroundTransparency =
titleLabel.Text = title
titleLabel.TextColor3 = Theme.TextColor
titleLabel.TextSize =
titleLabel.Font = .Font.GothamBold
titleLabel.TextXAlignment = .TextXAlignment.Left
titleLabel.TextTruncate = .TextTruncate.AtEnd
titleLabel.Parent = headerFrame
content content ~=
contentLabel = .()
contentLabel.Name =
contentLabel.Size = .(, , , )
contentLabel.BackgroundTransparency =
contentLabel.Text = content
contentLabel.TextColor3 = Theme.TextSecondary
contentLabel.TextSize =
contentLabel.Font = .Font.Gotham
contentLabel.TextXAlignment = .TextXAlignment.Left
contentLabel.TextYAlignment = .TextYAlignment.Top
contentLabel.TextWrapped =
contentLabel.AutomaticSize = .AutomaticSize.Y
contentLabel.LayoutOrder =
contentLabel.Parent = contentContainer
.()
finalHeight = contentLayout.AbsoluteContentSize.Y +
notifFrame.Size = .(, , , )
notifFrame.Position = .(, , , )
(notifFrame, {
Size = .(, , , finalHeight),
Position = .(, , , )
}, TweenPresets.Smooth)
.(ActiveNotifications, notifFrame)
.(duration, ()
notifFrame notifFrame.Parent
(notifFrame, {
Size = .(, , , ),
Position = .(, , , )
}, TweenPresets.Fast)
(notifStroke, {Transparency = }, TweenPresets.Fast)
.()
notifFrame notifFrame.Parent
notifFrame:()
i, notif (ActiveNotifications)
notif == notifFrame
.(ActiveNotifications, i)
)
notifFrame
Library:(config)
config = config {}
title = config.Title
content = config.Content
icon = config.Icon
iconThemed = config.IconThemed
buttons = config.Buttons {{Title = , Variant = }}
popupScreenGui = .()
popupScreenGui.Name =
popupScreenGui.ResetOnSpawn =
popupScreenGui.ZIndexBehavior = .ZIndexBehavior.Sibling
popupScreenGui.DisplayOrder =
popupScreenGui.Parent = :()
popupOverlay = .()
popupOverlay.Name =
popupOverlay.Size = .(, , , )
popupOverlay.Position = .(, , , )
popupOverlay.BackgroundColor3 = .(, , )
popupOverlay.BackgroundTransparency =
popupOverlay.BorderSizePixel =
popupOverlay.Parent = popupScreenGui
popupContainer = .()
popupContainer.Name =
popupContainer.Size = .(, , , )
popupContainer.Position = .(, -, , )
popupContainer.AnchorPoint = .(, )
popupContainer.BackgroundColor3 = Theme.MainBackground
popupContainer.BackgroundTransparency =
popupContainer.BorderSizePixel =
popupContainer.ClipsDescendants =
popupContainer.Parent = popupOverlay
popupCorner = .()
popupCorner.CornerRadius = .(, )
popupCorner.Parent = popupContainer
popupStroke = .()
popupStroke.Color = Theme.SeparatorColor
popupStroke.Transparency =
popupStroke.Thickness =
popupStroke.ApplyStrokeMode = .ApplyStrokeMode.Border
popupStroke.Parent = popupContainer
(popupContainer)
contentArea = .()
contentArea.Name =
contentArea.Size = .(, -, , -)
contentArea.Position = .(, , , )
contentArea.BackgroundTransparency =
contentArea.Parent = popupContainer
contentLayout = .()
contentLayout.SortOrder = .SortOrder.LayoutOrder
contentLayout.Padding = .(, )
contentLayout.FillDirection = .FillDirection.Vertical
contentLayout.Parent = contentArea
headerFrame = .()
headerFrame.Name =
headerFrame.Size = .(, , , )
headerFrame.BackgroundTransparency =
headerFrame.LayoutOrder =
headerFrame.Parent = contentArea
icon
iconContainer = .()
iconContainer.Name =
iconContainer.Size = .(, , , )
iconContainer.Position = .(, , , )
iconContainer.BackgroundTransparency =
iconContainer.Parent = headerFrame
icon:()
iconName = icon:(, )
(iconName, iconContainer, iconThemed Theme.AccentColor Theme.TextColor)
icon:() icon:()
iconImage = .()
iconImage.Size = .(, , , )
iconImage.BackgroundTransparency =
iconImage.Image = icon
iconImage.ImageColor3 = iconThemed Theme.AccentColor Theme.TextColor
iconImage.Parent = iconContainer
(icon, iconContainer, iconThemed Theme.AccentColor Theme.TextColor)
titleLabel = .()
titleLabel.Name =
titleLabel.Size = .(, icon - , , )
titleLabel.Position = .(, icon , , )
titleLabel.BackgroundTransparency =
titleLabel.Text = title
titleLabel.TextColor3 = Theme.TextColor
titleLabel.TextSize =
titleLabel.Font = .Font.GothamBold
titleLabel.TextXAlignment = .TextXAlignment.Left
titleLabel.TextYAlignment = .TextYAlignment.Center
titleLabel.TextTruncate = .TextTruncate.AtEnd
titleLabel.Parent = headerFrame
contentLabel = .()
contentLabel.Name =
contentLabel.Size = .(, , , )
contentLabel.BackgroundTransparency =
contentLabel.Text = content
contentLabel.TextColor3 = Theme.TextSecondary
contentLabel.TextSize =
contentLabel.Font = .Font.Gotham
contentLabel.TextXAlignment = .TextXAlignment.Left
contentLabel.TextYAlignment = .TextYAlignment.Top
contentLabel.TextWrapped =
contentLabel.AutomaticSize = .AutomaticSize.Y
contentLabel.LayoutOrder =
contentLabel.Parent = contentArea
buttonsFrame = .()
buttonsFrame.Name =
buttonsFrame.Size = .(, , , )
buttonsFrame.BackgroundTransparency =
buttonsFrame.LayoutOrder =
buttonsFrame.Parent = contentArea
buttonsLayout = .()
buttonsLayout.SortOrder = .SortOrder.LayoutOrder
buttonsLayout.Padding = .(, )
buttonsLayout.FillDirection = .FillDirection.Horizontal
buttonsLayout.HorizontalAlignment = .HorizontalAlignment.Right
buttonsLayout.Parent = buttonsFrame
()
(popupOverlay, {BackgroundTransparency = }, TweenPresets.Fast)
(popupContainer, {
Size = .(, , , ),
Position = .(, -, , )
}, TweenPresets.Fast)
.()
popupScreenGui popupScreenGui.Parent
popupScreenGui:()
i, buttonConfig (buttons)
btnTitle = buttonConfig.Title
btnIcon = buttonConfig.Icon
btnVariant = buttonConfig.Variant
btnCallback = buttonConfig.Callback
totalButtons = #buttons
totalPadding = (totalButtons - ) *
buttonWidth = (buttonsFrame.AbsoluteSize.X - totalPadding) / totalButtons
button = .()
button.Name = .. i
button.Size = .(, buttonWidth, , )
button.BackgroundColor3 = btnVariant == Theme.AccentColor
btnVariant == Theme.SidebarBackground
Theme.MainBackground
button.BackgroundTransparency = btnVariant ==
button.BorderSizePixel =
button.Text =
button.AutoButtonColor =
button.LayoutOrder = i
button.Parent = buttonsFrame
btnCorner = .()
btnCorner.CornerRadius = .(, )
btnCorner.Parent = button
contentContainer = .()
contentContainer.Size = .(, -, , )
contentContainer.Position = .(, , , )
contentContainer.BackgroundTransparency =
contentContainer.Parent = button
contentContainerLayout = .()
contentContainerLayout.FillDirection = .FillDirection.Horizontal
contentContainerLayout.HorizontalAlignment = .HorizontalAlignment.Center
contentContainerLayout.VerticalAlignment = .VerticalAlignment.Center
contentContainerLayout.Padding = .(, )
contentContainerLayout.Parent = contentContainer
btnIcon
btnIconContainer = .()
btnIconContainer.Name =
btnIconContainer.Size = .(, , , )
btnIconContainer.BackgroundTransparency =
btnIconContainer.LayoutOrder =
btnIconContainer.Parent = contentContainer
(btnIcon, btnIconContainer, Theme.TextColor)
btnLabel = .()
btnLabel.Size = .(, , , )
btnLabel.AutomaticSize = .AutomaticSize.XY
btnLabel.BackgroundTransparency =
btnLabel.Text = btnTitle
btnLabel.TextColor3 = Theme.TextColor
btnLabel.TextSize =
btnLabel.Font = .Font.GothamSemibold
btnLabel.LayoutOrder =
btnLabel.Parent = contentContainer
button.MouseButton1Click:(()
btnCallback
success, err = (btnCallback)
success
(, err)
()
)
button.MouseEnter:(()
(button, {
BackgroundColor3 = btnVariant == Theme.AccentHover Theme.AccentColor
})
)
button.MouseLeave:(()
(button, {
BackgroundColor3 = btnVariant == Theme.AccentColor
btnVariant == Theme.SidebarBackground
Theme.MainBackground
})
)
.()
finalHeight = contentLayout.AbsoluteContentSize.Y +
popupContainer.Size = .(, , , )
(popupOverlay, {BackgroundTransparency = }, TweenPresets.Medium)
(popupContainer, {
Size = .(, , , finalHeight)
}, TweenPresets.Smooth)
{
Close = closePopup
}
Library:(config)
config = config {}
line1 = config.Line1
line2 = config.Line2
nameColor = config.NameColor .(, , )
discordColor = config.DiscordColor .(, , )
outlineColor = config.OutlineColor .(, , )
Players = :()
localPlayer = Players.LocalPlayer
isHidden =
characterConnection =
currentBillboard =
(character)
character
head = character:(, )
humanoid = character:(, )
head humanoid
_, child (head:())
child:()
child:()
humanoid.DisplayDistanceType = .HumanoidDisplayDistanceType.None
billboard = .()
billboard.Name =
billboard.Size = .(, , , )
billboard.StudsOffset = .(, , )
billboard.AlwaysOnTop =
billboard.Parent = head
nameLabel1 = .()
nameLabel1.Name =
nameLabel1.Size = .(, , , )
nameLabel1.Position = .(, , , )
nameLabel1.BackgroundTransparency =
nameLabel1.Text = line1
nameLabel1.TextColor3 = nameColor
nameLabel1.TextStrokeTransparency =
nameLabel1.TextStrokeColor3 = outlineColor
nameLabel1.Font = .Font.GothamBold
nameLabel1.TextSize =
nameLabel1.TextScaled =
nameLabel1.Parent = billboard
stroke1 = .()
stroke1.Color = outlineColor
stroke1.Thickness =
stroke1.Parent = nameLabel1
nameLabel2 = .()
nameLabel2.Name =
nameLabel2.Size = .(, , , )
nameLabel2.Position = .(, , , )
nameLabel2.BackgroundTransparency =
nameLabel2.Text = line2
nameLabel2.TextColor3 = discordColor
nameLabel2.TextStrokeTransparency =
nameLabel2.TextStrokeColor3 = outlineColor
nameLabel2.Font = .Font.GothamBold
nameLabel2.TextSize =
nameLabel2.TextScaled =
nameLabel2.Parent = billboard
stroke2 = .()
stroke2.Color = outlineColor
stroke2.Thickness =
stroke2.Parent = nameLabel2
currentBillboard = billboard
(character)
character
head = character:()
humanoid = character:()
head humanoid
_, child (head:())
child:() child.Name ==
child:()
humanoid.DisplayDistanceType = .HumanoidDisplayDistanceType.Viewer
currentBillboard =
(character)
.()
isHidden
(character)
(character)
(state)
isHidden = state
localPlayer.Character
isHidden
(localPlayer.Character)
(localPlayer.Character)
characterConnection
characterConnection:()
characterConnection = localPlayer.CharacterAdded:(setupCharacter)
{
Toggle = toggle,
IsHidden = () isHidden ,
Disconnect = ()
characterConnection
characterConnection:()
localPlayer.Character
(localPlayer.Character)
}
Window = {}
Window.__index = Window
Library:(config)
config = config {}
windowTitle = config.Title
(windowTitle) ~=
()
windowTitle =
baseSize = config.Size .(, , , )
minSize = config.MinSize .(, )
maxSize = config.MaxSize .(, )
minSize.X < minSize.Y <
()
minSize = .(.(, minSize.X), .(, minSize.Y))
maxSize.X < minSize.X maxSize.Y < minSize.Y
()
maxSize = .(.(maxSize.X, minSize.X + ), .(maxSize.Y, minSize.Y + ))
windowSize = (baseSize, minSize, maxSize)
self = ({}, Window)
self.Tabs = {}
self.CurrentTab =
self.InProfileView =
self.BaseSize = baseSize
self.MinSize = minSize
self.MaxSize = maxSize
self.IsMinimized =
self.MinimizedPosition =
self.MinimizedIconPosition =
self.OriginalSize = windowSize
self.Connections = {}
self.IsDestroyed =
self.IsMobile = ()
self.MobileScale = ()
self.ScreenGui = .()
self.ScreenGui.Name =
self.ScreenGui.ResetOnSpawn =
self.ScreenGui.ZIndexBehavior = .ZIndexBehavior.Sibling
self.ScreenGui.Parent = :()
self.MainFrame = .()
self.MainFrame.Name =
self.MainFrame.Size = windowSize
self.MainFrame.Position = .(, -windowSize.X.Offset/, , -windowSize.Y.Offset/)
self.MainFrame.BackgroundColor3 = Theme.MainBackground
self.MainFrame.BackgroundTransparency =
self.MainFrame.BorderSizePixel =
self.MainFrame.ClipsDescendants =
self.MainFrame.Parent = self.ScreenGui
self.IsMobile
uiScale = .()
uiScale.Name =
uiScale.Scale = self.MobileScale
uiScale.Parent = self.MainFrame
self.MainFrame.Position = .(, , , )
self.MainFrame.AnchorPoint = .(, )
mainCorner = .()
mainCorner.CornerRadius = .(, )
mainCorner.Parent = self.MainFrame
backgroundImage = .()
backgroundImage.Name =
backgroundImage.Size = .(, , , )
backgroundImage.Position = .(, , , )
backgroundImage.BackgroundTransparency =
backgroundImage.ImageTransparency = BACKGROUND_IMAGE_TRANSPARENCY
backgroundImage.ScaleType = .ScaleType.Crop
backgroundImage.ZIndex =
backgroundImage.Parent = self.MainFrame
()
success =
(()
imageData = :(BACKGROUND_IMAGE_URL)
imageData #imageData >
base64Data = :():(imageData)
mimeType =
BACKGROUND_IMAGE_URL:():()
mimeType =
BACKGROUND_IMAGE_URL:():()
mimeType =
backgroundImage.Image = .. mimeType .. .. base64Data
success =
)
success (getcustomasset writefile readfile)
(()
imageData = :(BACKGROUND_IMAGE_URL)
writefile readfile getcustomasset
fileName =
(fileName, imageData)
backgroundImage.Image = (fileName)
success =
)
success
backgroundImage.Image = BACKGROUND_IMAGE_FALLBACK
(()
:()
:():({backgroundImage})
)
.(LoadBackgroundImage)
bgCorner = .()
bgCorner.CornerRadius = .(, )
bgCorner.Parent = backgroundImage
overlay = .()
overlay.Name =
overlay.Size = .(, , , )
overlay.Position = .(, , , )
overlay.BackgroundColor3 = .(, , )
overlay.BackgroundTransparency = OVERLAY_TRANSPARENCY
overlay.BorderSizePixel =
overlay.ZIndex =
overlay.Parent = self.MainFrame
overlayCorner = .()
overlayCorner.CornerRadius = .(, )
overlayCorner.Parent = overlay
gradient = .()
gradient.Color = ColorSequence.{
ColorSequenceKeypoint.(, .(, , )),
ColorSequenceKeypoint.(, .(, , )),
ColorSequenceKeypoint.(, .(, , ))
}
gradient.Transparency = NumberSequence.{
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, )
}
gradient.Rotation =
gradient.Parent = overlay
(self.MainFrame)
contentClipper = .()
contentClipper.Name =
contentClipper.Size = .(, , , )
contentClipper.Position = .(, , , )
contentClipper.BackgroundTransparency =
contentClipper.ClipsDescendants =
contentClipper.ZIndex =
contentClipper.Parent = self.MainFrame
self.Sidebar = .()
self.Sidebar.Name =
self.Sidebar.Size = .(, , , )
self.Sidebar.Position = .(, , , )
self.Sidebar.BackgroundColor3 = Theme.SidebarBackground
self.Sidebar.BackgroundTransparency =
self.Sidebar.BorderSizePixel =
self.Sidebar.ClipsDescendants =
self.Sidebar.ZIndex =
self.Sidebar.Parent = self.MainFrame
sidebarCorner = .()
sidebarCorner.CornerRadius = .(, )
sidebarCorner.Parent = self.Sidebar
topRightPatch = .()
topRightPatch.Size = .(, , , )
topRightPatch.Position = .(, -, , )
topRightPatch.BackgroundColor3 = Theme.SidebarBackground
topRightPatch.BackgroundTransparency =
topRightPatch.BorderSizePixel =
topRightPatch.Parent = self.Sidebar
bottomRightPatch = .()
bottomRightPatch.Size = .(, , , )
bottomRightPatch.Position = .(, -, , -)
bottomRightPatch.BackgroundColor3 = Theme.SidebarBackground
bottomRightPatch.BorderSizePixel =
bottomRightPatch.Parent = self.Sidebar
sidebarBackgroundImage = .()
sidebarBackgroundImage.Name =
sidebarBackgroundImage.Size = .(, , , )
sidebarBackgroundImage.Position = .(, , , )
sidebarBackgroundImage.BackgroundTransparency =
sidebarBackgroundImage.ImageTransparency =
sidebarBackgroundImage.ScaleType = .ScaleType.Crop
sidebarBackgroundImage.ZIndex =
sidebarBackgroundImage.Parent = self.Sidebar
()
success =
(()
imageData = :(SIDEBAR_BACKGROUND_IMAGE_URL)
imageData #imageData >
base64Data = :():(imageData)
mimeType =
SIDEBAR_BACKGROUND_IMAGE_URL:():()
mimeType =
SIDEBAR_BACKGROUND_IMAGE_URL:():()
mimeType =
sidebarBackgroundImage.Image = .. mimeType .. .. base64Data
success =
)
success (getcustomasset writefile readfile)
(()
imageData = :(SIDEBAR_BACKGROUND_IMAGE_URL)
writefile readfile getcustomasset
fileName =
(fileName, imageData)
sidebarBackgroundImage.Image = (fileName)
success =
)
success
sidebarBackgroundImage.Image = BACKGROUND_IMAGE_FALLBACK
(()
:()
:():({sidebarBackgroundImage})
)
.(LoadSidebarBackgroundImage)
sidebarBgCorner = .()
sidebarBgCorner.CornerRadius = .(, )
sidebarBgCorner.Parent = sidebarBackgroundImage
sidebarOverlay = .()
sidebarOverlay.Name =
sidebarOverlay.Size = .(, , , )
sidebarOverlay.Position = .(, , , )
sidebarOverlay.BackgroundColor3 = .(, , )
sidebarOverlay.BackgroundTransparency =
sidebarOverlay.BorderSizePixel =
sidebarOverlay.ZIndex =
sidebarOverlay.Parent = self.Sidebar
sidebarOverlayCorner = .()
sidebarOverlayCorner.CornerRadius = .(, )
sidebarOverlayCorner.Parent = sidebarOverlay
titleBar = .()
titleBar.Name =
titleBar.Size = .(, -, , )
titleBar.Position = .(, , , )
titleBar.BackgroundTransparency =
titleBar.BorderSizePixel =
titleBar.ZIndex =
titleBar.Parent = self.MainFrame
controlsFrame = .()
controlsFrame.Name =
controlsFrame.Size = .(, , , )
controlsFrame.Position = .(, -, , -)
controlsFrame.BackgroundTransparency =
controlsFrame.Parent = titleBar
minimizeBtn = .()
minimizeBtn.Name =
minimizeBtn.Size = .(, , , )
minimizeBtn.Position = .(, , , )
minimizeBtn.BackgroundColor3 = Theme.SidebarBackground
minimizeBtn.BackgroundTransparency =
minimizeBtn.BorderSizePixel =
minimizeBtn.Text =
minimizeBtn.TextColor3 = Theme.TextColor
minimizeBtn.TextSize =
minimizeBtn.Font = .Font.GothamBold
minimizeBtn.AutoButtonColor =
minimizeBtn.Parent = controlsFrame
minCorner = .()
minCorner.CornerRadius = .(, )
minCorner.Parent = minimizeBtn
self.Connections.MinimizeButton = minimizeBtn.MouseButton1Click:(()
self:()
)
minimizeBtn.MouseEnter:(()
(minimizeBtn, {BackgroundTransparency = })
)
minimizeBtn.MouseLeave:(()
(minimizeBtn, {BackgroundTransparency = })
)
closeBtn = .()
closeBtn.Name =
closeBtn.Size = .(, , , )
closeBtn.Position = .(, , , )
closeBtn.BackgroundColor3 = .(, , )
closeBtn.BackgroundTransparency =
closeBtn.BorderSizePixel =
closeBtn.Text =
closeBtn.AutoButtonColor =
closeBtn.Parent = controlsFrame
closeIcon = .()
closeIcon.Size = .(, , , )
closeIcon.Position = .(, -, , -)
closeIcon.BackgroundTransparency =
closeIcon.ImageColor3 = Theme.TextColor
closeIcon.Parent = closeBtn
(, closeIcon, Theme.TextColor)
closeCorner = .()
closeCorner.CornerRadius = .(, )
closeCorner.Parent = closeBtn
self.Connections.CloseButton = closeBtn.MouseButton1Click:(()
self:()
)
closeBtn.MouseEnter:(()
(closeBtn, {BackgroundTransparency = , BackgroundColor3 = .(, , )})
)
closeBtn.MouseLeave:(()
(closeBtn, {BackgroundTransparency = , BackgroundColor3 = .(, , )})
)
header = .()
header.Name =
header.Size = .(, , , )
header.BackgroundTransparency =
header.Parent = self.Sidebar
logoIcon = .()
logoIcon.Name =
logoIcon.Size = .(, , , )
logoIcon.Position = .(, , , )
logoIcon.BackgroundTransparency =
logoIcon.Image =
logoIcon.ImageColor3 = Theme.AccentColor
logoIcon.Parent = header
titleLabel = .()
titleLabel.Name =
titleLabel.Size = .(, -, , )
titleLabel.Position = .(, , , )
titleLabel.BackgroundTransparency =
titleLabel.Text =
titleLabel.TextColor3 = Theme.TextColor
titleLabel.TextSize =
titleLabel.Font = .Font.GothamBold
titleLabel.TextXAlignment = .TextXAlignment.Left
titleLabel.Parent = header
subtitle = .()
subtitle.Name =
subtitle.Size = .(, -, , )
subtitle.Position = .(, , , )
subtitle.BackgroundTransparency =
subtitle.Text =
subtitle.TextColor3 = Theme.TextSecondary
subtitle.TextSize =
subtitle.Font = .Font.Gotham
subtitle.TextXAlignment = .TextXAlignment.Left
subtitle.Parent = header
headerSeparator = .()
headerSeparator.Name =
headerSeparator.Size = .(, -, , )
headerSeparator.Position = .(, , , )
headerSeparator.BackgroundColor3 = Theme.SeparatorColor
headerSeparator.BorderSizePixel =
headerSeparator.Parent = header
profileCard = .()
profileCard.Name =
profileCard.Size = .(, -, , )
profileCard.Position = .(, , , )
profileCard.BackgroundColor3 = Theme.SidebarBackground
profileCard.BackgroundTransparency =
profileCard.BorderSizePixel =
profileCard.Text =
profileCard.AutoButtonColor =
profileCard.Parent = self.Sidebar
profileCorner = .()
profileCorner.CornerRadius = .(, )
profileCorner.Parent = profileCard
profileStroke = .()
profileStroke.Color = Theme.SeparatorColor
profileStroke.Transparency =
profileStroke.Thickness =
profileStroke.ApplyStrokeMode = .ApplyStrokeMode.Border
profileStroke.Parent = profileCard
Players = :()
LocalPlayer = Players.LocalPlayer
avatarImage = .()
avatarImage.Name =
avatarImage.Size = .(, , , )
avatarImage.Position = .(, , , -)
avatarImage.BackgroundColor3 = Theme.ToggleOff
avatarImage.BorderSizePixel =
avatarImage.Image = Players:(LocalPlayer.UserId, .ThumbnailType.HeadShot, .ThumbnailSize.Size150x150)
avatarImage.Parent = profileCard
avatarCorner = .()
avatarCorner.CornerRadius = .(, )
avatarCorner.Parent = avatarImage
usernameLabel = .()
usernameLabel.Name =
usernameLabel.Size = .(, -, , )
usernameLabel.Position = .(, , , )
usernameLabel.BackgroundTransparency =
usernameLabel.Text = .HideUsernameEnabled LocalPlayer.Name
usernameLabel.TextColor3 = Theme.TextColor
usernameLabel.TextSize =
usernameLabel.Font = .Font.GothamBold
usernameLabel.TextXAlignment = .TextXAlignment.Left
usernameLabel.TextTruncate = .TextTruncate.AtEnd
usernameLabel.Parent = profileCard
displayNameLabel = .()
displayNameLabel.Name =
displayNameLabel.Size = .(, -, , )
displayNameLabel.Position = .(, , , )
displayNameLabel.BackgroundTransparency =
displayNameLabel.Text = .HideUsernameEnabled ( .. LocalPlayer.Name)
displayNameLabel.TextColor3 = Theme.TextSecondary
displayNameLabel.TextSize =
displayNameLabel.Font = .Font.Gotham
displayNameLabel.TextXAlignment = .TextXAlignment.Left
displayNameLabel.TextTruncate = .TextTruncate.AtEnd
displayNameLabel.Parent = profileCard
.HideUsernameEnabled LocalPlayer.DisplayName ~= LocalPlayer.Name
usernameLabel.Text = LocalPlayer.DisplayName
displayNameLabel.Text = .. LocalPlayer.Name
self.ProfileUsernameLabel = usernameLabel
self.ProfileDisplayNameLabel = displayNameLabel
profileCard.MouseEnter:(()
(profileCard, {BackgroundTransparency = })
(profileStroke, {Transparency = })
)
profileCard.MouseLeave:(()
(profileCard, {BackgroundTransparency = })
(profileStroke, {Transparency = })
)
self.ProfileCard = profileCard
profileCard.MouseButton1Click:(()
self:()
)
profileSeparator = .()
profileSeparator.Name =
profileSeparator.Size = .(, -, , )
profileSeparator.Position = .(, , , )
profileSeparator.BackgroundColor3 = Theme.SeparatorColor
profileSeparator.BorderSizePixel =
profileSeparator.Parent = self.Sidebar
self.TabContainer = .()
self.TabContainer.Name =
self.TabContainer.Size = .(, -, , -)
self.TabContainer.Position = .(, , , )
self.TabContainer.BackgroundTransparency =
self.TabContainer.BorderSizePixel =
self.TabContainer.ScrollBarThickness = self.IsMobile
self.TabContainer.ScrollBarImageColor3 = Theme.AccentColor
self.TabContainer.ScrollBarImageTransparency = self.IsMobile
self.TabContainer.CanvasSize = .(, , , )
self.TabContainer.ScrollingDirection = .ScrollingDirection.Y
self.TabContainer.VerticalScrollBarInset = .ScrollBarInset.ScrollBar
self.TabContainer.ElasticBehavior = .ElasticBehavior.WhenScrollable
self.TabContainer.ScrollingEnabled =
self.TabContainer.Active =
self.TabContainer.Selectable =
self.TabContainer.AutomaticCanvasSize = .AutomaticSize.Y
self.TabContainer.Parent = self.Sidebar
tabLayout = .()
tabLayout.SortOrder = .SortOrder.LayoutOrder
tabLayout.Padding = .(, )
tabLayout.Parent = self.TabContainer
()
contentHeight = tabLayout.AbsoluteContentSize.Y
padding = self.IsMobile
self.TabContainer.CanvasSize = .(, , , contentHeight + padding)
self.Connections.TabLayoutChanged = tabLayout:():(updateCanvasSize)
.(()
.()
()
self.IsMobile
.()
()
)
tabPadding = .()
tabPadding.PaddingLeft = .(, )
tabPadding.PaddingRight = .(, )
tabPadding.Parent = self.TabContainer
contentBackground = .()
contentBackground.Name =
contentBackground.Size = .(, -, , -)
contentBackground.Position = .(, , , )
contentBackground.BackgroundColor3 = Theme.SidebarBackground
contentBackground.BackgroundTransparency =
contentBackground.BorderSizePixel =
contentBackground.ZIndex =
contentBackground.Parent = contentClipper
contentBgCorner = .()
contentBgCorner.CornerRadius = .(, )
contentBgCorner.Parent = contentBackground
self.ContentArea = .()
self.ContentArea.Name =
self.ContentArea.Size = .(, , , )
self.ContentArea.Position = .(, , , )
self.ContentArea.BackgroundTransparency =
self.ContentArea.ZIndex =
self.ContentArea.Parent = contentBackground
self.ContentScroll = .()
self.ContentScroll.Name =
self.ContentScroll.Size = .(, -, , )
self.ContentScroll.Position = .(, , , )
self.ContentScroll.BackgroundTransparency =
self.ContentScroll.BorderSizePixel =
self.ContentScroll.ScrollBarThickness =
self.ContentScroll.ScrollBarImageColor3 = Theme.AccentColor
self.ContentScroll.ScrollBarImageTransparency =
self.ContentScroll.CanvasSize = .(, , , )
self.ContentScroll.AutomaticCanvasSize = .AutomaticSize.Y
self.ContentScroll.Parent = self.ContentArea
contentLayout = .()
contentLayout.SortOrder = .SortOrder.LayoutOrder
contentLayout.Padding = .(, )
contentLayout.HorizontalAlignment = .HorizontalAlignment.Center
contentLayout.Parent = self.ContentScroll
contentPadding = .()
contentPadding.PaddingLeft = .(, )
contentPadding.PaddingRight = .(, )
contentPadding.PaddingTop = .(, )
contentPadding.PaddingBottom = .(, )
contentPadding.Parent = self.ContentScroll
self:()
self:()
self.IsMobile
self:()
self.MainFrame.Size = .(, , , )
(self.MainFrame, {Size = windowSize}, TweenPresets.Smooth)
self
Window:()
self.IsDestroyed
self.IsMinimized
self.IsMinimized =
self.Sidebar.Visible =
titleBar = self.MainFrame:()
titleBar titleBar.Visible =
contentClipper = self.MainFrame:()
contentClipper contentClipper.Visible =
minimizeIcon = self.MainFrame:()
minimizeIcon minimizeIcon:()
self.MainFrame self.MainFrame.Parent
closeTween = (self.MainFrame, {
Size = .(, , , ),
Position = .(, , , )
}, TweenPresets.Smooth)
closeTween
closeTween.Completed:()
.()
self:()
Window:()
self.IsDestroyed
self.IsDestroyed =
name, connection (self.Connections)
connection (connection) ==
connection:()
self.Connections = {}
self.Tabs = {}
self.CurrentTab =
self.ScreenGui
(()
self.ScreenGui:()
)
self.ScreenGui =
self.MainFrame =
self.Sidebar =
self.TabContainer =
self.ContentArea =
self.ContentScroll =
Window:()
dragging =
dragInput, mousePos, framePos
(input)
delta = input.Position - mousePos
(self.MainFrame, {
Position = .(framePos.X.Scale, framePos.X.Offset + delta.X, framePos.Y.Scale, framePos.Y.Offset + delta.Y)
}, TweenPresets.Fast)
(element)
element.InputBegan:((input)
input.UserInputType == .UserInputType.MouseButton1 input.UserInputType == .UserInputType.Touch
dragging =
mousePos = input.Position
framePos = self.MainFrame.Position
input.Changed:(()
input.UserInputState == .UserInputState.End
dragging =
)
)
element.InputChanged:((input)
input.UserInputType == .UserInputType.MouseMovement input.UserInputType == .UserInputType.Touch
dragInput = input
)
titleBar = self.MainFrame:()
sidebarHeader = self.Sidebar:()
titleBar
(titleBar)
sidebarHeader
(sidebarHeader)
self.Connections.DragInputChanged = UserInputService.InputChanged:((input)
input == dragInput dragging
(input)
)
Window:()
self.IsDestroyed
self.IsMinimized
self:()
Window:()
self.IsDestroyed
self.IsMinimized
self:()
Window:()
self.IsDestroyed
_, child (self.ScreenGui:())
child:() child.Name:()
child.Visible =
child.Size = .(, child.AbsoluteSize.X, , )
self.IsMinimized
self.IsMinimized =
self.MinimizedIconPosition = self.MainFrame.Position
self.Connections.MinimizeIconDrag
self.Connections.MinimizeIconDrag:()
self.Connections.MinimizeIconDrag =
restorePosition = self.MinimizedPosition .(, , , )
self.Sidebar.Visible =
titleBar = self.MainFrame:()
titleBar
titleBar.Visible =
contentClipper = self.MainFrame:()
contentClipper
contentClipper.Visible =
resizeHandle = self.MainFrame:()
resizeHandle
resizeHandle.Visible =
(self.MainFrame, {
Size = self.OriginalSize,
Position = restorePosition
}, TweenPresets.Medium)
minimizeIcon = self.MainFrame:()
minimizeIcon
minimizeIcon:()
self.IsMinimized =
self.MinimizedPosition = self.MainFrame.Position
self.OriginalSize = self.MainFrame.Size
self.Sidebar.Visible =
titleBar = self.MainFrame:()
titleBar
titleBar.Visible =
contentClipper = self.MainFrame:()
contentClipper
contentClipper.Visible =
resizeHandle = self.MainFrame:()
resizeHandle
resizeHandle.Visible =
iconPosition = self.MinimizedIconPosition self.MainFrame.Position
minimizeIcon = .()
minimizeIcon.Name =
minimizeIcon.Size = .(, , , )
minimizeIcon.Position = .(, , , )
minimizeIcon.BackgroundTransparency =
minimizeIcon.Image =
minimizeIcon.ImageColor3 = Theme.AccentColor
minimizeIcon.ZIndex =
minimizeIcon.Parent = self.MainFrame
isDragging =
dragStart =
startPos =
minimizeIcon.MouseButton1Down:(()
dragStart = UserInputService:()
startPos = self.MainFrame.Position
isDragging =
)
minimizeIcon.MouseButton1Up:(()
isDragging
self:()
dragStart =
)
self.Connections.MinimizeIconDrag = UserInputService.InputChanged:((input)
dragStart (input.UserInputType == .UserInputType.MouseMovement input.UserInputType == .UserInputType.Touch)
currentPos = UserInputService:()
delta = currentPos - dragStart
.(delta.X) > .(delta.Y) >
isDragging =
self.MainFrame self.MainFrame.Parent
self.MainFrame.Position = .(
startPos.X.Scale,
startPos.X.Offset + delta.X,
startPos.Y.Scale,
startPos.Y.Offset + delta.Y
)
)
minimizeIcon.MouseEnter:(()
(minimizeIcon, {ImageColor3 = Theme.AccentHover})
)
minimizeIcon.MouseLeave:(()
(minimizeIcon, {ImageColor3 = Theme.AccentColor})
)
(self.MainFrame, {
Size = .(, , , ),
Position = iconPosition
}, TweenPresets.Medium)
end
end
function Window:MakeResizable()
if self.IsMobile then
return
end
local resizeHandle = Instance.new("ImageButton")
resizeHandle.Name = "ResizeHandle"
resizeHandle.Size = UDim2.new(0, 20, 0, 20)
resizeHandle.Position = UDim2.new(1, -20, 1, -20)
resizeHandle.BackgroundColor3 = Theme.AccentColor
resizeHandle.BackgroundTransparency = 0.3
resizeHandle.BorderSizePixel = 0
resizeHandle.Image = ""
resizeHandle.ZIndex = 10
resizeHandle.Parent = self.MainFrame
local handleCorner = Instance.new("UICorner")
handleCorner.CornerRadius = UDim.new(0, 6)
handleCorner.Parent = resizeHandle
local resizeIconContainer = Instance.new("Frame")
resizeIconContainer.Name = "IconContainer"
resizeIconContainer.Size = UDim2.new(0, 14, 0, 14)
resizeIconContainer.Position = UDim2.new(0.5, -7, 0.5, -7)
resizeIconContainer.BackgroundTransparency = 1
resizeIconContainer.ZIndex = 11
resizeIconContainer.Parent = resizeHandle
LoadLucideIcon("maximize-2", resizeIconContainer, Theme.TextColor)
local resizing = false
local startPos, startSize
resizeHandle.MouseButton1Down:Connect(function()
resizing = true
startPos = UserInputService:GetMouseLocation()
startSize = self.MainFrame.AbsoluteSize
end)
self.Connections.ResizeInputEnded = UserInputService.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
resizing = false
end
end)
self.Connections.ResizeRenderStepped = RunService.RenderStepped:Connect(function()
if resizing and self.MainFrame and self.MainFrame.Parent then
local mousePos = UserInputService:GetMouseLocation()
local delta = mousePos - startPos
local newWidth = math.max(self.MinSize.X, startSize.X + delta.X)
local newHeight = math.max(self.MinSize.Y, startSize.Y + delta.Y)
self.MainFrame.Size = UDim2.new(0, newWidth, 0, newHeight)
end
end)
resizeHandle.MouseEnter:Connect(function()
CreateTween(resizeHandle, {BackgroundTransparency = 0.1})
end)
resizeHandle.MouseLeave:Connect(function()
CreateTween(resizeHandle, {BackgroundTransparency = 0.3})
end)
end
function Window:SetupMobileViewportMonitoring()
if self.IsDestroyed or not self.IsMobile then return end
local camera = workspace.CurrentCamera
local lastViewportSize = camera.ViewportSize
local lastOrientation = lastViewportSize.Y > lastViewportSize.X and "Portrait" or "Landscape"
self.Connections.ViewportMonitor = RunService.RenderStepped:Connect(function()
if self.IsDestroyed or not self.MainFrame or not self.MainFrame.Parent then
if self.Connections.ViewportMonitor then
self.Connections.ViewportMonitor:Disconnect()
self.Connections.ViewportMonitor = nil
end
return
end
local currentViewportSize = camera.ViewportSize
local currentOrientation = currentViewportSize.Y > currentViewportSize.X and "Portrait" or "Landscape"
local viewportChanged = (currentViewportSize - lastViewportSize).Magnitude > 10
local orientationChanged = currentOrientation ~= lastOrientation
if viewportChanged or orientationChanged then
lastViewportSize = currentViewportSize
lastOrientation = currentOrientation
self.IsMobile = IsMobileDevice()
local newScale = GetMobileScale()
self.MobileScale = newScale
local uiScale = self.MainFrame:FindFirstChild("MobileScale")
if self.IsMobile then
if not uiScale then
uiScale = Instance.new("UIScale")
uiScale.Name = "MobileScale"
uiScale.Parent = self.MainFrame
end
CreateTween(uiScale, {Scale = newScale}, TweenPresets.Medium)
elseif uiScale then
uiScale:Destroy()
end
if not self.IsMinimized then
local newSize = CalculateResponsiveSize(self.BaseSize, self.MinSize, self.MaxSize)
local currentSize = self.MainFrame.Size
local sizeDiffX = math.abs(newSize.X.Offset - currentSize.X.Offset)
local sizeDiffY = math.abs(newSize.Y.Offset - currentSize.Y.Offset)
if sizeDiffX > 20 or sizeDiffY > 20 then
CreateTween(self.MainFrame, {Size = newSize}, TweenPresets.Medium)
local newPosition = UDim2.new(0.5, -newSize.X.Offset/2, 0.5, -newSize.Y.Offset/2)
if self.IsMobile then
newPosition = UDim2.new(0.5, 0, 0.5, 0)
end
CreateTween(self.MainFrame, {Position = newPosition}, TweenPresets.Medium)
end
end
end
end)
end
function Window:AddSidebarSeparator()
if self.IsDestroyed then
warn("GAeroUI: Cannot add separator to destroyed window")
return nil
end
local separator = Instance.new("Frame")
separator.Name = "SidebarSeparator"
separator.Size = UDim2.new(1, 0, 0, 1)
separator.BackgroundColor3 = Theme.SeparatorColor
separator.BorderSizePixel = 0
separator.Parent = self.TabContainer
local separatorPadding = Instance.new("UIPadding")
separatorPadding.PaddingTop = UDim.new(0, 8)
separatorPadding.PaddingBottom = UDim.new(0, 8)
separatorPadding.Parent = separator
return separator
end
function Window:ShowProfileInfo()
if self.IsDestroyed then return end
for _, tab in ipairs(self.Tabs) do
if tab.Button then
CreateTween(tab.Button, {BackgroundTransparency = 1})
CreateTween(tab.Icon, {ImageColor3 = Theme.TextSecondary})
CreateTween(tab.Label, {TextColor3 = Theme.TextSecondary})
end
for _, element in ipairs(tab.Elements) do
if element.Instance then
element.Instance.Visible = false
end
end
end
self.CurrentTab = nil
self.InProfileView = true
self:BuildProfileContent()
end
function Window:UpdateProfileCard()
if self.IsDestroyed then return end
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
if self.ProfileUsernameLabel then
if _G.HideUsernameEnabled then
self.ProfileUsernameLabel.Text = "Gatinero_Hub"
else
self.ProfileUsernameLabel.Text = LocalPlayer.DisplayName ~= LocalPlayer.Name and LocalPlayer.DisplayName or LocalPlayer.Name
end
end
if self.ProfileDisplayNameLabel then
if _G.HideUsernameEnabled then
self.ProfileDisplayNameLabel.Text = "dsc.gg/gatinero"
else
self.ProfileDisplayNameLabel.Text = "@" .. LocalPlayer.Name
end
end
end
function Window:BuildProfileContent()
if self.IsDestroyed then return end
for _, child in ipairs(self.ContentScroll:GetChildren()) do
if child:IsA("Frame") and child.Name:match("Profile") then
child:Destroy()
end
end
local userData = _G.GatineroUserData or {}
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local function createInfoSection(title, items, layoutOrder)
local section = Instance.new("Frame")
section.Name = "ProfileSection_" .. title
section.Size = UDim2.new(1, 0, 0, 0)
section.BackgroundColor3 = Theme.SidebarBackground
section.BackgroundTransparency = 0.3
section.BorderSizePixel = 0
section.LayoutOrder = layoutOrder
section.AutomaticSize = Enum.AutomaticSize.Y
section.Parent = self.ContentScroll
local sectionCorner = Instance.new("UICorner")
sectionCorner.CornerRadius = UDim.new(0, 10)
sectionCorner.Parent = section
local sectionLayout = Instance.new("UIListLayout")
sectionLayout.SortOrder = Enum.SortOrder.LayoutOrder
sectionLayout.Padding = UDim.new(0, 8)
sectionLayout.Parent = section
local sectionPadding = Instance.new("UIPadding")
sectionPadding.PaddingLeft = UDim.new(0, 16)
sectionPadding.PaddingRight = UDim.new(0, 16)
sectionPadding.PaddingTop = UDim.new(0, 16)
sectionPadding.PaddingBottom = UDim.new(0, 16)
sectionPadding.Parent = section
local titleLabel = Instance.new("TextLabel")
titleLabel.Size = UDim2.new(1, 0, 0, 24)
titleLabel.BackgroundTransparency = 1
titleLabel.Text = title
titleLabel.TextColor3 = Theme.AccentColor
titleLabel.TextSize = 18
titleLabel.Font = Enum.Font.GothamBold
titleLabel.TextXAlignment = Enum.TextXAlignment.Left
titleLabel.LayoutOrder = 0
titleLabel.Parent = section
for i, item in ipairs(items) do
local itemFrame = Instance.new("Frame")
itemFrame.Size = UDim2.new(1, 0, 0, 0)
itemFrame.BackgroundTransparency = 1
itemFrame.LayoutOrder = i
itemFrame.AutomaticSize = Enum.AutomaticSize.Y
itemFrame.Parent = section
local itemLabel = Instance.new("TextLabel")
itemLabel.Size = UDim2.new(1, 0, 0, 16)
itemLabel.BackgroundTransparency = 1
itemLabel.Text = item.label
itemLabel.TextColor3 = Theme.TextSecondary
itemLabel.TextSize = 12
itemLabel.Font = Enum.Font.Gotham
itemLabel.TextXAlignment = Enum.TextXAlignment.Left
itemLabel.TextYAlignment = Enum.TextYAlignment.Top
itemLabel.Parent = itemFrame
local itemValue = Instance.new("TextLabel")
itemValue.Size = UDim2.new(1, 0, 0, 0)
itemValue.Position = UDim2.new(0, 0, 0, 16)
itemValue.BackgroundTransparency = 1
itemValue.Text = item.value
itemValue.TextColor3 = item.color or Theme.TextColor
itemValue.TextSize = 15
itemValue.Font = Enum.Font.GothamBold
itemValue.TextXAlignment = Enum.TextXAlignment.Left
itemValue.TextYAlignment = Enum.TextYAlignment.Top
itemValue.TextWrapped = true
itemValue.AutomaticSize = Enum.AutomaticSize.Y
itemValue.Parent = itemFrame
end
return section
end
-- Use Junkie runtime variables with fallback support
local isPremium = false
local expiresAt = nil
local discordId = nil
local createdAt = nil
local serviceName = nil
local isInvalidated = false
local isHwidBanned = false
pcall(function()
-- Try modern Junkie runtime variables (JD_*) first
if JD_IS_PREMIUM ~= nil then
isPremium = JD_IS_PREMIUM or false
end
if JD_EXPIRES_AT ~= nil then
expiresAt = JD_EXPIRES_AT
end
if JD_DISCORD_ID ~= nil then
discordId = JD_DISCORD_ID
end
if JD_CREATED_AT ~= nil then
createdAt = JD_CREATED_AT
end
if JD_SERVICE_NAME ~= nil then
serviceName = JD_SERVICE_NAME
end
if JD_IS_INVALIDATED ~= nil then
isInvalidated = JD_IS_INVALIDATED or false
end
if JD_IS_HWID_BANNED ~= nil then
isHwidBanned = JD_IS_HWID_BANNED or false
end
-- Fallback to JunkieCore if JD_* variables are not set
if not isPremium and not expiresAt and JunkieCore then
isPremium = JunkieCore.GetIsPremium() or false
expiresAt = JunkieCore.GetExpiresAt()
discordId = JunkieCore.GetDiscordId()
createdAt = JunkieCore.GetCreatedAt()
serviceName = JunkieCore.GetServiceName()
isInvalidated = JunkieCore.GetIsInvalidated() or false
isHwidBanned = JunkieCore.GetIsHwidBanned() or false
end
end)
if not isPremium and userData.isVIP then
isPremium = userData.isVIP
end
if (not expiresAt or expiresAt == 0) and userData.expiresAt then
expiresAt = userData.expiresAt
end
if not discordId and userData.discordId then
discordId = userData.discordId
end
if not createdAt and userData.createdAt then
createdAt = userData.createdAt
end
if not serviceName and userData.serviceId then
serviceName = userData.serviceId
end
if expiresAt and (expiresAt <= 0 or type(expiresAt) ~= "number") then
expiresAt = nil
end
-- Detect if timestamp is in seconds or milliseconds
-- Timestamps after year 2000 in seconds: > 946684800
-- Timestamps after year 2000 in milliseconds: > 946684800000
local function normalizeTimestamp(timestamp)
if not timestamp or type(timestamp) ~= "number" or timestamp <= 0 then
return nil
end
-- If timestamp is less than 10 billion, it's in seconds (before year 2286)
-- If timestamp is greater, it's in milliseconds
if timestamp < 10000000000 then
return timestamp * 1000 -- Convert seconds to milliseconds
else
return timestamp -- Already in milliseconds
end
end
expiresAt = normalizeTimestamp(expiresAt)
createdAt = normalizeTimestamp(createdAt)
local expirationText = "Never"
local daysLeft = "Permanent"
if expiresAt and type(expiresAt) == "number" and expiresAt > 0 then
local currentTime = os.time() * 1000
local timeLeft = (expiresAt - currentTime) / 1000
if timeLeft > 0 then
local days = math.floor(timeLeft / 86400)
local hours = math.floor((timeLeft % 86400) / 3600)
local minutes = math.floor((timeLeft % 3600) / 60)
if days > 0 then
daysLeft = string.format("%d days, %d hours", days, hours)
elseif hours > 0 then
daysLeft = string.format("%d hours, %d minutes", hours, minutes)
else
daysLeft = string.format("%d minutes", minutes)
end
expirationText = os.date("%Y-%m-%d %H:%M", expiresAt / 1000)
else
expirationText = "Expired"
daysLeft = "Expired"
end
else
expirationText = "Never"
daysLeft = "Permanent"
end
local createdText = "Unknown"
if createdAt and type(createdAt) == "number" and createdAt > 0 then
createdText = os.date("%Y-%m-%d %H:%M", createdAt / 1000)
end
local aboutSection = Instance.new("Frame")
aboutSection.Name = "ProfileSection_About"
aboutSection.Size = UDim2.new(1, 0, 0, 0)
aboutSection.BackgroundColor3 = Theme.SidebarBackground
aboutSection.BackgroundTransparency = 0.3
aboutSection.BorderSizePixel = 0
aboutSection.LayoutOrder = 1
aboutSection.AutomaticSize = Enum.AutomaticSize.Y
aboutSection.Parent = self.ContentScroll
local aboutCorner = Instance.new("UICorner")
aboutCorner.CornerRadius = UDim.new(0, 10)
aboutCorner.Parent = aboutSection
local aboutPadding = Instance.new("UIPadding")
aboutPadding.PaddingLeft = UDim.new(0, 20)
aboutPadding.PaddingRight = UDim.new(0, 20)
aboutPadding.PaddingTop = UDim.new(0, 20)
aboutPadding.PaddingBottom = UDim.new(0, 20)
aboutPadding.Parent = aboutSection
local headerContainer = Instance.new("Frame")
headerContainer.Size = UDim2.new(1, 0, 0, 80)
headerContainer.BackgroundTransparency = 1
headerContainer.Parent = aboutSection
local logo = Instance.new("ImageLabel")
logo.Name = "Logo"
logo.Size = UDim2.new(0, 80, 0, 80)
logo.Position = UDim2.new(0, 0, 0, 0)
logo.BackgroundTransparency = 1
logo.Image = "rbxassetid://88183417608118"
logo.ImageColor3 = Theme.AccentColor
logo.Parent = headerContainer
local textContainer = Instance.new("Frame")
textContainer.Size = UDim2.new(1, -90, 1, 0)
textContainer.Position = UDim2.new(0, 90, 0, 0)
textContainer.BackgroundTransparency = 1
textContainer.Parent = headerContainer
local titleLabel = Instance.new("TextLabel")
titleLabel.Size = UDim2.new(1, 0, 0, 32)
titleLabel.Position = UDim2.new(0, 0, 0, 8)
titleLabel.BackgroundTransparency = 1
titleLabel.Text = "Gatinero Hub"
titleLabel.TextColor3 = Theme.TextColor
titleLabel.TextSize = 28
titleLabel.Font = Enum.Font.GothamBold
titleLabel.TextXAlignment = Enum.TextXAlignment.Left
titleLabel.Parent = textContainer
local subtitleLabel = Instance.new("TextLabel")
subtitleLabel.Size = UDim2.new(1, 0, 0, 18)
subtitleLabel.Position = UDim2.new(0, 0, 0, 42)
subtitleLabel.BackgroundTransparency = 1
subtitleLabel.Text = "Mount Menu • V2.4.0 • 090126"
subtitleLabel.TextColor3 = Theme.TextSecondary
subtitleLabel.TextSize = 14
subtitleLabel.Font = Enum.Font.Gotham
subtitleLabel.TextXAlignment = Enum.TextXAlignment.Left
subtitleLabel.Parent = textContainer
local authorLabel = Instance.new("TextLabel")
authorLabel.Size = UDim2.new(1, 0, 0, 16)
authorLabel.Position = UDim2.new(0, 0, 0, 62)
authorLabel.BackgroundTransparency = 1
authorLabel.Text = "Author: Bousterd"
authorLabel.TextColor3 = Theme.TextSecondary
authorLabel.TextSize = 13
authorLabel.Font = Enum.Font.Gotham
authorLabel.TextXAlignment = Enum.TextXAlignment.Left
authorLabel.Parent = textContainer
local keyStatusColor = isPremium and Theme.SuccessColor or Theme.WarningColor
local statusItems = {
{label = "Status", value = isPremium and "VIP" or "FREE", color = keyStatusColor},
{label = "Expires", value = expirationText},
{label = "Time Remaining", value = daysLeft},
{label = "Key Created", value = createdText},
}
if isInvalidated then
table.insert(statusItems, {label = "Warning", value = "⚠️ KEY INVALIDATED", color = Theme.ErrorColor})
end
if isHwidBanned then
table.insert(statusItems, {label = "Warning", value = "🚫 HWID BANNED", color = Theme.ErrorColor})
end
-- Create separate buttons section (LayoutOrder 1.5 to appear between header and status)
local buttonsSection = Instance.new("Frame")
buttonsSection.Name = "ProfileSection_SocialButtons"
buttonsSection.Size = UDim2.new(1, 0, 0, 44)
buttonsSection.BackgroundTransparency = 1
buttonsSection.BorderSizePixel = 0
buttonsSection.LayoutOrder = 1.5
buttonsSection.Parent = self.ContentScroll
-- Join Discord Button
local discordButton = Instance.new("TextButton")
discordButton.Name = "DiscordButton"
discordButton.Size = UDim2.new(0.5, -4, 1, 0)
discordButton.Position = UDim2.new(0, 0, 0, 0)
discordButton.BackgroundColor3 = Theme.SidebarBackground
discordButton.BorderSizePixel = 0
discordButton.Text = ""
discordButton.AutoButtonColor = false
discordButton.Parent = buttonsSection
local discordCorner = Instance.new("UICorner")
discordCorner.CornerRadius = UDim.new(0, 10)
discordCorner.Parent = discordButton
local discordIconContainer = Instance.new("Frame")
discordIconContainer.Name = "IconContainer"
discordIconContainer.Size = UDim2.new(0, 18, 0, 18)
discordIconContainer.Position = UDim2.new(0, 12, 0.5, -9)
discordIconContainer.BackgroundTransparency = 1
discordIconContainer.Parent = discordButton
LoadLucideIcon("message-circle", discordIconContainer, Theme.TextColor)
local discordLabel = Instance.new("TextLabel")
discordLabel.Size = UDim2.new(1, -40, 1, 0)
discordLabel.Position = UDim2.new(0, 35, 0, 0)
discordLabel.BackgroundTransparency = 1
discordLabel.Text = "Join Discord"
discordLabel.TextColor3 = Theme.TextColor
discordLabel.TextSize = 14
discordLabel.Font = Enum.Font.GothamSemibold
discordLabel.TextXAlignment = Enum.TextXAlignment.Left
discordLabel.Parent = discordButton
-- Website Button
local websiteButton = Instance.new("TextButton")
websiteButton.Name = "WebsiteButton"
websiteButton.Size = UDim2.new(0.5, -4, 1, 0)
websiteButton.Position = UDim2.new(0.5, 4, 0, 0)
websiteButton.BackgroundColor3 = Theme.SidebarBackground
websiteButton.BorderSizePixel = 0
websiteButton.Text = ""
websiteButton.AutoButtonColor = false
websiteButton.Parent = buttonsSection
local websiteCorner = Instance.new("UICorner")
websiteCorner.CornerRadius = UDim.new(0, 10)
websiteCorner.Parent = websiteButton
local websiteIconContainer = Instance.new("Frame")
websiteIconContainer.Name = "IconContainer"
websiteIconContainer.Size = UDim2.new(0, 18, 0, 18)
websiteIconContainer.Position = UDim2.new(0, 12, 0.5, -9)
websiteIconContainer.BackgroundTransparency = 1
websiteIconContainer.Parent = websiteButton
LoadLucideIcon("globe", websiteIconContainer, Theme.TextColor)
local websiteLabel = Instance.new("TextLabel")
websiteLabel.Size = UDim2.new(1, -40, 1, 0)
websiteLabel.Position = UDim2.new(0, 35, 0, 0)
websiteLabel.BackgroundTransparency = 1
websiteLabel.Text = "Website"
websiteLabel.TextColor3 = Theme.TextColor
websiteLabel.TextSize = 14
websiteLabel.Font = Enum.Font.GothamSemibold
websiteLabel.TextXAlignment = Enum.TextXAlignment.Left
websiteLabel.Parent = websiteButton
-- Button hover and click effects (matching regular buttons)
discordButton.MouseEnter:Connect(function()
CreateTween(discordButton, {BackgroundColor3 = Theme.AccentHover})
CreateTween(discordLabel, {TextColor3 = Color3.fromRGB(255, 255, 255)})
if discordIconContainer:FindFirstChildOfClass("ImageLabel") then
CreateTween(discordIconContainer:FindFirstChildOfClass("ImageLabel"), {ImageColor3 = Color3.fromRGB(255, 255, 255)})
end
end)
discordButton.MouseLeave:Connect(function()
CreateTween(discordButton, {BackgroundColor3 = Theme.SidebarBackground})
CreateTween(discordLabel, {TextColor3 = Theme.TextColor})
if discordIconContainer:FindFirstChildOfClass("ImageLabel") then
CreateTween(discordIconContainer:FindFirstChildOfClass("ImageLabel"), {ImageColor3 = Theme.TextColor})
end
end)
discordButton.MouseButton1Click:Connect(function()
CreateTween(discordButton, {BackgroundColor3 = Theme.AccentColor}, TweenPresets.Fast)
CreateTween(discordLabel, {TextColor3 = Color3.fromRGB(255, 255, 255)}, TweenPresets.Fast)
task.wait(0.15)
if discordButton and discordButton.Parent then
CreateTween(discordButton, {BackgroundColor3 = Theme.SidebarBackground}, TweenPresets.Fast)
CreateTween(discordLabel, {TextColor3 = Theme.TextColor}, TweenPresets.Fast)
end
local discordInvite = "discord.gg/z2jpWZ4nwx"
if setclipboard then
setclipboard("https://" .. discordInvite)
Library:Notify({
Title = "Discord Link Copied!",
Description = "Discord invite link copied to clipboard: " .. discordInvite,
Duration = 3
})
else
Library:Notify({
Title = "Join Discord",
Description = "Discord: " .. discordInvite,
Duration = 5
})
end
end)
websiteButton.MouseEnter:Connect(function()
CreateTween(websiteButton, {BackgroundColor3 = Theme.AccentHover})
CreateTween(websiteLabel, {TextColor3 = Color3.fromRGB(255, 255, 255)})
if websiteIconContainer:FindFirstChildOfClass("ImageLabel") then
CreateTween(websiteIconContainer:FindFirstChildOfClass("ImageLabel"), {ImageColor3 = Color3.fromRGB(255, 255, 255)})
end
end)
websiteButton.MouseLeave:Connect(function()
CreateTween(websiteButton, {BackgroundColor3 = Theme.SidebarBackground})
CreateTween(websiteLabel, {TextColor3 = Theme.TextColor})
if websiteIconContainer:FindFirstChildOfClass("ImageLabel") then
CreateTween(websiteIconContainer:FindFirstChildOfClass("ImageLabel"), {ImageColor3 = Theme.TextColor})
end
end)
websiteButton.MouseButton1Click:Connect(function()
CreateTween(websiteButton, {BackgroundColor3 = Theme.AccentColor}, TweenPresets.Fast)
CreateTween(websiteLabel, {TextColor3 = Color3.fromRGB(255, 255, 255)}, TweenPresets.Fast)
task.wait(0.15)
if websiteButton and websiteButton.Parent then
CreateTween(websiteButton, {BackgroundColor3 = Theme.SidebarBackground}, TweenPresets.Fast)
CreateTween(websiteLabel, {TextColor3 = Theme.TextColor}, TweenPresets.Fast)
end
local websiteUrl = "raw.gatinero.xyz"
if setclipboard then
setclipboard("https://" .. websiteUrl)
Library:Notify({
Title = "Website Link Copied!",
Description = "Website link copied to clipboard: " .. websiteUrl,
Duration = 3
})
else
Library:Notify({
Title = "Visit Website",
Description = "Website: " .. websiteUrl,
Duration = 5
})
end
end)
createInfoSection("Status", statusItems, 2)
createInfoSection("User Information", {
{label = "Display Name", value = _G.HideUsernameEnabled and "Gatinero_Hub" or LocalPlayer.DisplayName},
{label = "Username", value = _G.HideUsernameEnabled and "dsc.gg/gatinero" or ("@" .. LocalPlayer.Name)},
{label = "Account Age", value = LocalPlayer.AccountAge .. " days"},
{label = "User ID", value = tostring(LocalPlayer.UserId)},
{label = "Discord ID", value = discordId or "Not Linked"},
}, 3)
-- Get map/place information
local placeId = game.PlaceId
local placeName = "Loading..."
local mapInfoSection = createInfoSection("Map Information", {
{label = "Place Name", value = placeName},
{label = "Place ID", value = tostring(placeId)},
}, 4)
-- Try to get place name asynchronously and update the label
task.spawn(function()
pcall(function()
local MarketplaceService = game:GetService("MarketplaceService")
local productInfo = MarketplaceService:GetProductInfo(placeId)
placeName = productInfo.Name
-- Find and update the Place Name value label
for _, child in ipairs(mapInfoSection:GetChildren()) do
if child:IsA("Frame") then
for _, subChild in ipairs(child:GetChildren()) do
if subChild:IsA("TextLabel") and subChild.Text == "Loading..." then
subChild.Text = placeName
break
end
end
end
end
end)
end)
end
function Window:AddTab(name, iconId)
if self.IsDestroyed then
warn("GAeroUI: Cannot add tab to destroyed window")
return nil
end
if not name or type(name) ~= "string" or name == "" then
warn("GAeroUI: Tab name must be a non-empty string")
return nil
end
local tab = {}
tab.Name = name
tab.Elements = {}
tab.Window = self
local tabButton = Instance.new("TextButton")
tabButton.Name = name
tabButton.Size = UDim2.new(1, 0, 0, 38)
tabButton.BackgroundColor3 = Theme.SidebarBackground
tabButton.BackgroundTransparency = 1
tabButton.BorderSizePixel = 0
tabButton.Text = ""
tabButton.AutoButtonColor = false
tabButton.Parent = self.TabContainer
local tabCorner = Instance.new("UICorner")
tabCorner.CornerRadius = UDim.new(0, 8)
tabCorner.Parent = tabButton
local icon = Instance.new("ImageLabel")
if iconId and iconId:match("^lucide%-") then
local iconName = iconId:gsub("^lucide%-", "")
local iconContainer = Instance.new("Frame")
iconContainer.Name = "IconContainer"
iconContainer.Size = UDim2.new(0, 20, 0, 20)
iconContainer.Position = UDim2.new(0, 10, 0.5, -10)
iconContainer.BackgroundTransparency = 1
iconContainer.Parent = tabButton
LoadLucideIcon(iconName, iconContainer, Theme.TextSecondary)
else
icon.Name = "Icon"
icon.Size = UDim2.new(0, 20, 0, 20)
icon.Position = UDim2.new(0, 10, 0.5, -10)
icon.BackgroundTransparency = 1
icon.ImageColor3 = Theme.TextSecondary
icon.Image = iconId or "rbxassetid://7733960981"
icon.Parent = tabButton
end
local label = Instance.new("TextLabel")
label.Name = "Label"
label.Size = UDim2.new(1, -45, 1, 0)
label.Position = UDim2.new(0, 38, 0, 0)
label.BackgroundTransparency = 1
label.Text = name
label.TextColor3 = Theme.TextSecondary
label.TextSize = 14
label.Font = Enum.Font.GothamMedium
label.TextXAlignment = Enum.TextXAlignment.Left
label.Parent = tabButton
tab.Button = tabButton
tab.Icon = icon
tab.Label = label
tabButton.MouseButton1Click:Connect(function()
self:SelectTab(tab)
end)
tabButton.MouseEnter:Connect(function()
if self.CurrentTab ~= tab then
CreateTween(tabButton, {BackgroundTransparency = 0.9})
CreateTween(icon, {ImageColor3 = Theme.TextColor})
CreateTween(label, {TextColor3 = Theme.TextColor})
end
end)
tabButton.MouseLeave:Connect(function()
if self.CurrentTab ~= tab then
CreateTween(tabButton, {BackgroundTransparency = 1})
CreateTween(icon, {ImageColor3 = Theme.TextSecondary})
CreateTween(label, {TextColor3 = Theme.TextSecondary})
end
end)
table.insert(self.Tabs, tab)
if #self.Tabs == 1 then
self:SelectTab(tab)
end
-- Update canvas size after adding tab (important for mobile scrolling)
task.spawn(function()
task.wait(0.05)
if self.TabContainer then
local tabLayout = self.TabContainer:FindFirstChildOfClass("UIListLayout")
if tabLayout then
local contentHeight = tabLayout.AbsoluteContentSize.Y
local padding = self.IsMobile and 30 or 20
self.TabContainer.CanvasSize = UDim2.new(0, 0, 0, contentHeight + padding)
end
end
end)
return setmetatable(tab, {__index = self:GetTabMethods()})
end
function Window:SelectTab(tab)
if self.InProfileView then
for _, child in ipairs(self.ContentScroll:GetChildren()) do
if child:IsA("Frame") and child.Name:match("ProfileSection_") then
child:Destroy()
end
end
self.InProfileView = false
end
-- Close any open dropdowns when switching tabs
for _, child in ipairs(self.ScreenGui:GetChildren()) do
if child:IsA("ScrollingFrame") and child.Name:match("^OptionsList_") then
child.Visible = false
child.Size = UDim2.new(0, child.AbsoluteSize.X, 0, 0)
end
end
if self.CurrentTab then
CreateTween(self.CurrentTab.Button, {BackgroundTransparency = 1})
CreateTween(self.CurrentTab.Icon, {ImageColor3 = Theme.TextSecondary})
CreateTween(self.CurrentTab.Label, {TextColor3 = Theme.TextSecondary})
for _, element in ipairs(self.CurrentTab.Elements) do
if element.Instance then
element.Instance.Visible = false
end
end
end
self.CurrentTab = tab
CreateTween(tab.Button, {BackgroundTransparency = 0.85, BackgroundColor3 = Theme.AccentColor})
CreateTween(tab.Icon, {ImageColor3 = Theme.TextColor})
CreateTween(tab.Label, {TextColor3 = Theme.TextColor})
for _, element in ipairs(tab.Elements) do
if element.Instance then
local manuallyHidden = element.Instance:GetAttribute("ManuallyHidden")
if not manuallyHidden then
element.Instance.Visible = true
end
end
end
end
function Window:Tag(config)
if self.IsDestroyed then
warn("GAeroUI: Cannot create tag on destroyed window")
return nil
end
config = config or {}
local title = config.Title or "Tag"
local icon = config.Icon
local color = config.Color or Theme.AccentColor
local radius = config.Radius or 13
local titleBar = self.MainFrame:FindFirstChild("TitleBar")
if not titleBar then
warn("GAeroUI: TitleBar not found")
return nil
end
local tagFrame = Instance.new("Frame")
tagFrame.Name = "Tag_" .. title
tagFrame.Size = UDim2.new(0, 0, 0, 24)
tagFrame.Position = UDim2.new(0, 10, 0.5, -12)
tagFrame.BackgroundColor3 = color
tagFrame.BackgroundTransparency = 0.2
tagFrame.BorderSizePixel = 0
tagFrame.AutomaticSize = Enum.AutomaticSize.X
tagFrame.ZIndex = 11
tagFrame.Parent = titleBar
local tagCorner = Instance.new("UICorner")
tagCorner.CornerRadius = UDim.new(0, radius)
tagCorner.Parent = tagFrame
local tagLayout = Instance.new("UIListLayout")
tagLayout.FillDirection = Enum.FillDirection.Horizontal
tagLayout.VerticalAlignment = Enum.VerticalAlignment.Center
tagLayout.Padding = UDim.new(0, 6)
tagLayout.Parent = tagFrame
local tagPadding = Instance.new("UIPadding")
tagPadding.PaddingLeft = UDim.new(0, 10)
tagPadding.PaddingRight = UDim.new(0, 10)
tagPadding.Parent = tagFrame
if icon then
local iconContainer = Instance.new("Frame")
iconContainer.Name = "IconContainer"
iconContainer.Size = UDim2.new(0, 16, 0, 16)
iconContainer.BackgroundTransparency = 1
iconContainer.LayoutOrder = 1
iconContainer.Parent = tagFrame
LoadLucideIcon(icon, iconContainer, Theme.TextColor)
end
local tagLabel = Instance.new("TextLabel")
tagLabel.Name = "Label"
tagLabel.Size = UDim2.new(0, 0, 0, 0)
tagLabel.AutomaticSize = Enum.AutomaticSize.XY
tagLabel.BackgroundTransparency = 1
tagLabel.Text = title
tagLabel.TextColor3 = Theme.TextColor
tagLabel.TextSize = 12
tagLabel.Font = Enum.Font.GothamBold
tagLabel.LayoutOrder = 2
tagLabel.Parent = tagFrame
return {
Frame = tagFrame,
SetTitle = function(newTitle)
tagLabel.Text = newTitle
end,
SetColor = function(newColor)
tagFrame.BackgroundColor3 = newColor
end,
Destroy = function()
if tagFrame and tagFrame.Parent then
tagFrame:Destroy()
end
end
}
end
function Window:Divider()
if self.IsDestroyed then
warn("GAeroUI: Cannot add divider to destroyed window")
return nil
end
local divider = Instance.new("Frame")
divider.Name = "Divider"
divider.Size = UDim2.new(1, -10, 0, 1)
divider.BackgroundColor3 = Theme.SeparatorColor
divider.BorderSizePixel = 0
divider.Parent = self.TabContainer
local dividerPadding = Instance.new("UIPadding")
dividerPadding.PaddingLeft = UDim.new(0, 5)
dividerPadding.PaddingRight = UDim.new(0, 5)
dividerPadding.PaddingTop = UDim.new(0, 4)
dividerPadding.PaddingBottom = UDim.new(0, 4)
dividerPadding.Parent = divider
return divider
end
function Window:Space(height)
if self.IsDestroyed then
warn("GAeroUI: Cannot add space to destroyed window")
return nil
end
height = height or 10
local space = Instance.new("Frame")
space.Name = "Space"
space.Size = UDim2.new(1, 0, 0, height)
space.BackgroundTransparency = 1
space.Parent = self.TabContainer
return space
end
function Window:Section(config)
if self.IsDestroyed then
warn("GAeroUI: Cannot add tab section to destroyed window")
return nil
end
config = config or {}
local title = config.Title or "Section"
local icon = config.Icon
local iconThemed = config.IconThemed or false
local opened = config.Opened ~= false
local sectionContainer = Instance.new("Frame")
sectionContainer.Name = "TabSection_" .. title
sectionContainer.Size = UDim2.new(1, 0, 0, 0)
sectionContainer.BackgroundTransparency = 1
sectionContainer.AutomaticSize = Enum.AutomaticSize.Y
sectionContainer.Parent = self.TabContainer
local sectionLayout = Instance.new("UIListLayout")
sectionLayout.SortOrder = Enum.SortOrder.LayoutOrder
sectionLayout.Padding = UDim.new(0, 6)
sectionLayout.Parent = sectionContainer
local headerButton = Instance.new("TextButton")
headerButton.Name = "SectionHeader"
headerButton.Size = UDim2.new(1, 0, 0, 32)
headerButton.BackgroundColor3 = Theme.SidebarBackground
headerButton.BackgroundTransparency = 0.7
headerButton.BorderSizePixel = 0
headerButton.Text = ""
headerButton.AutoButtonColor = false
headerButton.LayoutOrder = 1
headerButton.Parent = sectionContainer
local headerCorner = Instance.new("UICorner")
headerCorner.CornerRadius = UDim.new(0, 8)
headerCorner.Parent = headerButton
if icon then
local iconContainer = Instance.new("Frame")
iconContainer.Name = "IconContainer"
iconContainer.Size = UDim2.new(0, 18, 0, 18)
iconContainer.Position = UDim2.new(0, 10, 0.5, -9)
iconContainer.BackgroundTransparency = 1
iconContainer.Parent = headerButton
if icon:match("^lucide%-") then
local iconName = icon:gsub("^lucide%-", "")
LoadLucideIcon(iconName, iconContainer, iconThemed and Theme.AccentColor or Theme.TextSecondary)
elseif icon:match("^rbxassetid://") or icon:match("^http") then
local iconImage = Instance.new("ImageLabel")
iconImage.Size = UDim2.new(1, 0, 1, 0)
iconImage.BackgroundTransparency = 1
iconImage.Image = icon
iconImage.ImageColor3 = iconThemed and Theme.AccentColor or Theme.TextSecondary
iconImage.Parent = iconContainer
else
LoadLucideIcon(icon, iconContainer, iconThemed and Theme.AccentColor or Theme.TextSecondary)
end
end
local titleLabel = Instance.new("TextLabel")
titleLabel.Name = "Title"
titleLabel.Size = UDim2.new(1, icon and -60 or -36, 1, 0)
titleLabel.Position = UDim2.new(0, icon and 36 or 10, 0, 0)
titleLabel.BackgroundTransparency = 1
titleLabel.Text = title
titleLabel.TextColor3 = Theme.TextSecondary
titleLabel.TextSize = 12
titleLabel.Font = Enum.Font.GothamBold
titleLabel.TextXAlignment = Enum.TextXAlignment.Left
titleLabel.TextTruncate = Enum.TextTruncate.AtEnd
titleLabel.Parent = headerButton
local arrowContainer = Instance.new("Frame")
arrowContainer.Name = "ArrowContainer"
arrowContainer.Size = UDim2.new(0, 14, 0, 14)
arrowContainer.Position = UDim2.new(1, -24, 0.5, -7)
arrowContainer.BackgroundTransparency = 1
arrowContainer.Rotation = opened and 0 or -90
arrowContainer.Parent = headerButton
LoadLucideIcon("chevron-down", arrowContainer, Theme.TextSecondary)
local contentContainer = Instance.new("Frame")
contentContainer.Name = "SectionContent"
contentContainer.Size = UDim2.new(1, 0, 0, 0)
contentContainer.BackgroundTransparency = 1
contentContainer.Visible = opened
contentContainer.AutomaticSize = Enum.AutomaticSize.Y
contentContainer.LayoutOrder = 2
contentContainer.Parent = sectionContainer
local contentLayout = Instance.new("UIListLayout")
contentLayout.SortOrder = Enum.SortOrder.LayoutOrder
contentLayout.Padding = UDim.new(0, 6)
contentLayout.Parent = contentContainer
headerButton.MouseButton1Click:Connect(function()
opened = not opened
contentContainer.Visible = opened
CreateTween(arrowContainer, {
Rotation = opened and 0 or -90
}, TweenPresets.Fast)
end)
headerButton.MouseEnter:Connect(function()
CreateTween(headerButton, {BackgroundTransparency = 0.5}, TweenPresets.Fast)
end)
headerButton.MouseLeave:Connect(function()
CreateTween(headerButton, {BackgroundTransparency = 0.7}, TweenPresets.Fast)
end)
return {
Container = sectionContainer,
ContentContainer = contentContainer,
AddTab = function(name, iconId)
return self:AddTab(name, iconId)
end
}
end
function Window:Dialog(config)
if self.IsDestroyed then
warn("GAeroUI: Cannot create dialog on destroyed window")
return nil
end
config = config or {}
local title = config.Title or "Dialog"
local content = config.Content or ""
local icon = config.Icon
local iconThemed = config.IconThemed or false
local buttons = config.Buttons or {{Title = "OK"}}
local dialogOverlay = Instance.new("Frame")
dialogOverlay.Name = "DialogOverlay"
dialogOverlay.Size = UDim2.new(1, 0, 1, 0)
dialogOverlay.Position = UDim2.new(0, 0, 0, 0)
dialogOverlay.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
dialogOverlay.BackgroundTransparency = 1
dialogOverlay.BorderSizePixel = 0
dialogOverlay.ZIndex = 1000
dialogOverlay.Parent = self.ScreenGui
local dialogContainer = Instance.new("Frame")
dialogContainer.Name = "DialogContainer"
dialogContainer.Size = UDim2.new(0, 400, 0, 0)
dialogContainer.Position = UDim2.new(0.5, -200, 0.5, 0)
dialogContainer.AnchorPoint = Vector2.new(0.5, 0.5)
dialogContainer.BackgroundColor3 = Theme.MainBackground
dialogContainer.BackgroundTransparency = 0.1
dialogContainer.BorderSizePixel = 0
dialogContainer.ClipsDescendants = true
dialogContainer.ZIndex = 1001
dialogContainer.Parent = dialogOverlay
local dialogCorner = Instance.new("UICorner")
dialogCorner.CornerRadius = UDim.new(0, 16)
dialogCorner.Parent = dialogContainer
local dialogStroke = Instance.new("UIStroke")
dialogStroke.Color = Theme.SeparatorColor
dialogStroke.Transparency = 0.3
dialogStroke.Thickness = 1
dialogStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
dialogStroke.Parent = dialogContainer
ApplyGlassmorphism(dialogContainer)
local contentArea = Instance.new("Frame")
contentArea.Name = "ContentArea"
contentArea.Size = UDim2.new(1, -48, 1, -48)
contentArea.Position = UDim2.new(0, 24, 0, 24)
contentArea.BackgroundTransparency = 1
contentArea.ZIndex = 1002
contentArea.Parent = dialogContainer
local contentLayout = Instance.new("UIListLayout")
contentLayout.SortOrder = Enum.SortOrder.LayoutOrder
contentLayout.Padding = UDim.new(0, 16)
contentLayout.FillDirection = Enum.FillDirection.Vertical
contentLayout.Parent = contentArea
local headerFrame = Instance.new("Frame")
headerFrame.Name = "Header"
headerFrame.Size = UDim2.new(1, 0, 0, 32)
headerFrame.BackgroundTransparency = 1
headerFrame.LayoutOrder = 1
headerFrame.Parent = contentArea
if icon then
local iconContainer = Instance.new("Frame")
iconContainer.Name = "IconContainer"
iconContainer.Size = UDim2.new(0, 32, 0, 32)
iconContainer.Position = UDim2.new(0, 0, 0, 0)
iconContainer.BackgroundTransparency = 1
iconContainer.Parent = headerFrame
if icon:match("^lucide%-") then
local iconName = icon:gsub("^lucide%-", "")
LoadLucideIcon(iconName, iconContainer, iconThemed and Theme.AccentColor or Theme.TextColor)
elseif icon:match("^rbxassetid://") or icon:match("^http") then
local iconImage = Instance.new("ImageLabel")
iconImage.Size = UDim2.new(1, 0, 1, 0)
iconImage.BackgroundTransparency = 1
iconImage.Image = icon
iconImage.ImageColor3 = iconThemed and Theme.AccentColor or Theme.TextColor
iconImage.Parent = iconContainer
else
LoadLucideIcon(icon, iconContainer, iconThemed and Theme.AccentColor or Theme.TextColor)
end
end
local titleLabel = Instance.new("TextLabel")
titleLabel.Name = "Title"
titleLabel.Size = UDim2.new(1, icon and -40 or 0, 1, 0)
titleLabel.Position = UDim2.new(0, icon and 40 or 0, 0, 0)
titleLabel.BackgroundTransparency = 1
titleLabel.Text = title
titleLabel.TextColor3 = Theme.TextColor
titleLabel.TextSize = 18
titleLabel.Font = Enum.Font.GothamBold
titleLabel.TextXAlignment = Enum.TextXAlignment.Left
titleLabel.TextTruncate = Enum.TextTruncate.AtEnd
titleLabel.Parent = headerFrame
local contentLabel = Instance.new("TextLabel")
contentLabel.Name = "ContentText"
contentLabel.Size = UDim2.new(1, 0, 0, 0)
contentLabel.BackgroundTransparency = 1
contentLabel.Text = content
contentLabel.TextColor3 = Theme.TextSecondary
contentLabel.TextSize = 14
contentLabel.Font = Enum.Font.Gotham
contentLabel.TextXAlignment = Enum.TextXAlignment.Left
contentLabel.TextYAlignment = Enum.TextYAlignment.Top
contentLabel.TextWrapped = true
contentLabel.AutomaticSize = Enum.AutomaticSize.Y
contentLabel.LayoutOrder = 2
contentLabel.Parent = contentArea
local buttonsFrame = Instance.new("Frame")
buttonsFrame.Name = "Buttons"
buttonsFrame.Size = UDim2.new(1, 0, 0, 44)
buttonsFrame.BackgroundTransparency = 1
buttonsFrame.LayoutOrder = 3
buttonsFrame.Parent = contentArea
local buttonsLayout = Instance.new("UIListLayout")
buttonsLayout.SortOrder = Enum.SortOrder.LayoutOrder
buttonsLayout.Padding = UDim.new(0, 8)
buttonsLayout.FillDirection = Enum.FillDirection.Horizontal
buttonsLayout.HorizontalAlignment = Enum.HorizontalAlignment.Right
buttonsLayout.Parent = buttonsFrame
local function closeDialog()
CreateTween(dialogOverlay, {BackgroundTransparency = 1}, TweenPresets.Fast)
CreateTween(dialogContainer, {
Size = UDim2.new(0, 400, 0, 0),
Position = UDim2.new(0.5, -200, 0.5, 0)
}, TweenPresets.Fast)
task.wait(0.2)
if dialogOverlay and dialogOverlay.Parent then
dialogOverlay:Destroy()
end
end
for i, buttonConfig in ipairs(buttons) do
local btnTitle = buttonConfig.Title or "Button"
local btnIcon = buttonConfig.Icon
local btnVariant = buttonConfig.Variant or "Primary"
local btnCallback = buttonConfig.Callback
local button = Instance.new("TextButton")
button.Name = "DialogButton_" .. i
button.Size = UDim2.new(0, 100, 1, 0)
button.BackgroundColor3 = btnVariant == "Primary" and Theme.AccentColor or
btnVariant == "Secondary" and Theme.SidebarBackground or
Theme.MainBackground
button.BackgroundTransparency = btnVariant == "Tertiary" and 0.5 or 0
button.BorderSizePixel = 0
button.Text = ""
button.AutoButtonColor = false
button.LayoutOrder = i
button.Parent = buttonsFrame
local btnCorner = Instance.new("UICorner")
btnCorner.CornerRadius = UDim.new(0, 10)
btnCorner.Parent = button
if btnIcon then
local btnIconContainer = Instance.new("Frame")
btnIconContainer.Name = "IconContainer"
btnIconContainer.Size = UDim2.new(0, 16, 0, 16)
btnIconContainer.Position = UDim2.new(0, 8, 0.5, -8)
btnIconContainer.BackgroundTransparency = 1
btnIconContainer.Parent = button
LoadLucideIcon(btnIcon, btnIconContainer, Theme.TextColor)
end
local btnLabel = Instance.new("TextLabel")
btnLabel.Size = UDim2.new(1, btnIcon and -32 or -16, 1, 0)
btnLabel.Position = UDim2.new(0, btnIcon and 28 or 8, 0, 0)
btnLabel.BackgroundTransparency = 1
btnLabel.Text = btnTitle
btnLabel.TextColor3 = Theme.TextColor
btnLabel.TextSize = 13
btnLabel.Font = Enum.Font.GothamSemibold
btnLabel.TextXAlignment = Enum.TextXAlignment.Center
btnLabel.Parent = button
button.MouseButton1Click:Connect(function()
if btnCallback then
local success, err = pcall(btnCallback)
if not success then
warn("GAeroUI Dialog Button Error:", err)
end
end
closeDialog()
end)
button.MouseEnter:Connect(function()
CreateTween(button, {
BackgroundColor3 = btnVariant == "Primary" and Theme.AccentHover or Theme.AccentColor
})
end)
button.MouseLeave:Connect(function()
CreateTween(button, {
BackgroundColor3 = btnVariant == "Primary" and Theme.AccentColor or
btnVariant == "Secondary" and Theme.SidebarBackground or
Theme.MainBackground
})
end)
end
task.wait()
local finalHeight = contentLayout.AbsoluteContentSize.Y + 48
dialogContainer.Size = UDim2.new(0, 400, 0, 0)
CreateTween(dialogOverlay, {BackgroundTransparency = 0.5}, TweenPresets.Medium)
CreateTween(dialogContainer, {
Size = UDim2.new(0, 400, 0, finalHeight)
}, TweenPresets.Smooth)
return {
Close = closeDialog,
Show = function()
dialogOverlay.Visible = true
end
}
end
function Window:GetTabMethods()
local TabMethods = {}
function TabMethods:AddButton(text, callback)
if self.Window.IsDestroyed then
warn("GAeroUI: Cannot add button to destroyed window")
return nil
end
if not text or type(text) ~= "string" or text == "" then
warn("GAeroUI: Button text must be a non-empty string")
return nil
end
if callback and type(callback) ~= "function" then
warn("GAeroUI: Button callback must be a function")
return nil
end
local buttonContainer = Instance.new("Frame")
buttonContainer.Name = "ButtonContainer_" .. text
buttonContainer.Size = UDim2.new(1, 0, 0, 44)
buttonContainer.BackgroundTransparency = 1
buttonContainer.Visible = (self.Window.CurrentTab == self)
buttonContainer.Parent = self.Window.ContentScroll
local button = Instance.new("TextButton")
button.Name = "Button"
button.Size = UDim2.new(1, 0, 1, 0)
button.BackgroundColor3 = Theme.SidebarBackground
button.BorderSizePixel = 0
button.Text = ""
button.AutoButtonColor = false
button.Parent = buttonContainer
local btnCorner = Instance.new("UICorner")
btnCorner.CornerRadius = UDim.new(0, 10)
btnCorner.Parent = button
local buttonLabel = Instance.new("TextLabel")
buttonLabel.Name = "Label"
buttonLabel.Size = UDim2.new(1, -24, 1, 0)
buttonLabel.Position = UDim2.new(0, 12, 0, 0)
buttonLabel.BackgroundTransparency = 1
buttonLabel.Text = text
buttonLabel.TextColor3 = Theme.TextColor
buttonLabel.TextSize = 14
buttonLabel.Font = Enum.Font.GothamSemibold
buttonLabel.TextXAlignment = Enum.TextXAlignment.Left
buttonLabel.TextTruncate = Enum.TextTruncate.AtEnd
buttonLabel.Parent = button
button.MouseButton1Click:Connect(function()
CreateTween(button, {BackgroundColor3 = Theme.AccentColor}, TweenPresets.Fast)
CreateTween(buttonLabel, {TextColor3 = Color3.fromRGB(255, 255, 255)}, TweenPresets.Fast)
task.wait(0.15)
if button and button.Parent then
CreateTween(button, {BackgroundColor3 = Theme.SidebarBackground}, TweenPresets.Fast)
CreateTween(buttonLabel, {TextColor3 = Theme.TextColor}, TweenPresets.Fast)
end
if callback then
local success, err = pcall(callback)
if not success then
warn("GAeroUI Button Error:", err)
end
end
end)
button.MouseEnter:Connect(function()
CreateTween(button, {BackgroundColor3 = Theme.AccentHover})
CreateTween(buttonLabel, {TextColor3 = Color3.fromRGB(255, 255, 255)})
end)
button.MouseLeave:Connect(function()
CreateTween(button, {BackgroundColor3 = Theme.SidebarBackground})
CreateTween(buttonLabel, {TextColor3 = Theme.TextColor})
end)
table.insert(self.Elements, {Instance = buttonContainer, Type = "Button"})
return buttonContainer
end
function TabMethods:AddToggle(text, defaultState, callback)
if self.Window.IsDestroyed then
warn("GAeroUI: Cannot add toggle to destroyed window")
return nil
end
if not text or type(text) ~= "string" or text == "" then
warn("GAeroUI: Toggle text must be a non-empty string")
return nil
end
if callback and type(callback) ~= "function" then
warn("GAeroUI: Toggle callback must be a function")
return nil
end
defaultState = defaultState or false
if type(defaultState) ~= "boolean" then
warn("GAeroUI: Toggle defaultState must be a boolean, using false")
defaultState = false
end
local toggleContainer = Instance.new("Frame")
toggleContainer.Name = "ToggleContainer_" .. text
toggleContainer.Size = UDim2.new(1, 0, 0, 44)
toggleContainer.BackgroundTransparency = 1
toggleContainer.Visible = (self.Window.CurrentTab == self)
toggleContainer.Parent = self.Window.ContentScroll
local toggleFrame = Instance.new("Frame")
toggleFrame.Name = "ToggleFrame"
toggleFrame.Size = UDim2.new(1, 0, 1, 0)
toggleFrame.BackgroundColor3 = Theme.SidebarBackground
toggleFrame.BorderSizePixel = 0
toggleFrame.Parent = toggleContainer
local toggleCorner = Instance.new("UICorner")
toggleCorner.CornerRadius = UDim.new(0, 10)
toggleCorner.Parent = toggleFrame
local label = Instance.new("TextLabel")
label.Name = "Label"
label.Size = UDim2.new(1, -80, 1, 0)
label.Position = UDim2.new(0, 12, 0, 0)
label.BackgroundTransparency = 1
label.Text = text
label.TextColor3 = Theme.TextColor
label.TextSize = 14
label.Font = Enum.Font.GothamSemibold
label.TextXAlignment = Enum.TextXAlignment.Left
label.TextTruncate = Enum.TextTruncate.AtEnd
label.Parent = toggleFrame
local toggleButton = Instance.new("TextButton")
toggleButton.Name = "ToggleButton"
toggleButton.Size = UDim2.new(0, 52, 0, 26)
toggleButton.Position = UDim2.new(1, -64, 0.5, -13)
toggleButton.BackgroundColor3 = defaultState and Theme.ToggleOn or Theme.ToggleOff
toggleButton.BorderSizePixel = 0
toggleButton.Text = ""
toggleButton.AutoButtonColor = false
toggleButton.Parent = toggleFrame
local toggleBtnCorner = Instance.new("UICorner")
toggleBtnCorner.CornerRadius = UDim.new(1, 0)
toggleBtnCorner.Parent = toggleButton
local toggleDot = Instance.new("Frame")
toggleDot.Name = "Dot"
toggleDot.Size = UDim2.new(0, 20, 0, 20)
toggleDot.Position = defaultState and UDim2.new(1, -23, 0.5, -10) or UDim2.new(0, 3, 0.5, -10)
toggleDot.BackgroundColor3 = Theme.TextColor
toggleDot.BorderSizePixel = 0
toggleDot.Parent = toggleButton
local dotCorner = Instance.new("UICorner")
dotCorner.CornerRadius = UDim.new(1, 0)
dotCorner.Parent = toggleDot
local toggled = defaultState
toggleButton.MouseButton1Click:Connect(function()
toggled = not toggled
CreateTween(toggleButton, {BackgroundColor3 = toggled and Theme.ToggleOn or Theme.ToggleOff}, TweenPresets.Medium)
CreateTween(toggleDot, {Position = toggled and UDim2.new(1, -23, 0.5, -10) or UDim2.new(0, 3, 0.5, -10)}, TweenPresets.Medium)
if callback then
local success, err = pcall(callback, toggled)
if not success then
warn("GAeroUI Toggle Error:", err)
end
end
end)
toggleFrame.MouseEnter:Connect(function()
CreateTween(toggleFrame, {BackgroundColor3 = Color3.fromRGB(30, 30, 45)})
end)
toggleFrame.MouseLeave:Connect(function()
CreateTween(toggleFrame, {BackgroundColor3 = Theme.SidebarBackground})
end)
table.insert(self.Elements, {Instance = toggleContainer, Type = "Toggle"})
return toggleContainer
end
function TabMethods:AddSeparator()
if self.Window.IsDestroyed then
warn("GAeroUI: Cannot add separator to destroyed window")
return nil
end
local separatorContainer = Instance.new("Frame")
separatorContainer.Name = "SeparatorContainer"
separatorContainer.Size = UDim2.new(1, 0, 0, 12)
separatorContainer.BackgroundTransparency = 1
separatorContainer.Visible = (self.Window.CurrentTab == self)
separatorContainer.Parent = self.Window.ContentScroll
local separator = Instance.new("Frame")
separator.Name = "Separator"
separator.Size = UDim2.new(1, 0, 0, 1)
separator.Position = UDim2.new(0, 0, 0.5, 0)
separator.BackgroundColor3 = Theme.SeparatorColor
separator.BorderSizePixel = 0
separator.Parent = separatorContainer
table.insert(self.Elements, {Instance = separatorContainer, Type = "Separator"})
return separatorContainer
end
function TabMethods:AddLabel(text)
if self.Window.IsDestroyed then
warn("GAeroUI: Cannot add label to destroyed window")
return nil
end
local labelContainer = Instance.new("Frame")
labelContainer.Name = "LabelContainer"
labelContainer.Size = UDim2.new(1, 0, 0, 28)
labelContainer.BackgroundTransparency = 1
labelContainer.Visible = (self.Window.CurrentTab == self)
labelContainer.Parent = self.Window.ContentScroll
local label = Instance.new("TextLabel")
label.Name = "Label"
label.Size = UDim2.new(1, 0, 1, 0)
label.BackgroundTransparency = 1
label.Text = text or ""
label.TextColor3 = Theme.TextSecondary
label.TextSize = 13
label.Font = Enum.Font.Gotham
label.TextXAlignment = Enum.TextXAlignment.Left
label.TextWrapped = true
label.Parent = labelContainer
table.insert(self.Elements, {Instance = labelContainer, Type = "Label"})
return {
UpdateText = function(newText)
label.Text = newText or ""
end,
SetColor = function(color)
label.TextColor3 = color
end,
Instance = labelContainer
}
end
function TabMethods:AddLabeledSeparator(text)
if self.Window.IsDestroyed then
warn("GAeroUI: Cannot add labeled separator to destroyed window")
return nil
end
local separatorContainer = Instance.new("Frame")
separatorContainer.Name = "LabeledSeparatorContainer"
separatorContainer.Size = UDim2.new(1, 0, 0, 28)
separatorContainer.BackgroundTransparency = 1
separatorContainer.Visible = (self.Window.CurrentTab == self)
separatorContainer.Parent = self.Window.ContentScroll
local label = Instance.new("TextLabel")
label.Name = "SeparatorLabel"
label.Size = UDim2.new(0, 0, 1, 0)
label.Position = UDim2.new(0, 0, 0, 0)
label.BackgroundTransparency = 1
label.Text = text or ""
label.TextColor3 = Theme.TextSecondary
label.TextSize = 12
label.Font = Enum.Font.GothamBold
label.TextXAlignment = Enum.TextXAlignment.Left
label.AutomaticSize = Enum.AutomaticSize.X
label.Parent = separatorContainer
local leftSeparator = Instance.new("Frame")
leftSeparator.Name = "LeftSeparator"
leftSeparator.Size = UDim2.new(0, 0, 0, 1)
leftSeparator.Position = UDim2.new(0, 0, 0.5, 0)
leftSeparator.BackgroundColor3 = Theme.SeparatorColor
leftSeparator.BorderSizePixel = 0
leftSeparator.Visible = false
leftSeparator.Parent = separatorContainer
local rightSeparator = Instance.new("Frame")
rightSeparator.Name = "RightSeparator"
rightSeparator.Size = UDim2.new(1, -10, 0, 1)
rightSeparator.Position = UDim2.new(0, 0, 0.5, 0)
rightSeparator.BackgroundColor3 = Theme.SeparatorColor
rightSeparator.BorderSizePixel = 0
rightSeparator.Parent = separatorContainer
label:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
local labelWidth = label.AbsoluteSize.X
if labelWidth > 0 then
leftSeparator.Visible = false
rightSeparator.Size = UDim2.new(1, -(labelWidth + 10), 0, 1)
rightSeparator.Position = UDim2.new(0, labelWidth + 10, 0.5, 0)
else
leftSeparator.Visible = false
rightSeparator.Size = UDim2.new(1, 0, 0, 1)
rightSeparator.Position = UDim2.new(0, 0, 0.5, 0)
end
end)
table.insert(self.Elements, {Instance = separatorContainer, Type = "LabeledSeparator"})
return {
UpdateText = function(newText)
label.Text = newText or ""
end,
SetColor = function(color)
label.TextColor3 = color
end,
Instance = separatorContainer
}
end
function TabMethods:AddDropdown(text, options, defaultOption, callback)
if self.Window.IsDestroyed then
warn("GAeroUI: Cannot add dropdown to destroyed window")
return nil
end
if not text or type(text) ~= "string" or text == "" then
warn("GAeroUI: Dropdown text must be a non-empty string")
return nil
end
if not options or type(options) ~= "table" or #options == 0 then
warn("GAeroUI: Dropdown options must be a non-empty table")
return nil
end
if callback and type(callback) ~= "function" then
warn("GAeroUI: Dropdown callback must be a function")
return nil
end
defaultOption = defaultOption or options[1]
local selectedValue = defaultOption
local isOpen = false
local dropdownContainer = Instance.new("Frame")
dropdownContainer.Name = "DropdownContainer_" .. text
dropdownContainer.Size = UDim2.new(1, 0, 0, 50)
dropdownContainer.BackgroundTransparency = 1
dropdownContainer.Visible = (self.Window.CurrentTab == self)
dropdownContainer.Parent = self.Window.ContentScroll
local dropdownFrame = Instance.new("Frame")
dropdownFrame.Name = "DropdownFrame"
dropdownFrame.Size = UDim2.new(1, 0, 1, 0)
dropdownFrame.BackgroundColor3 = Theme.SidebarBackground
dropdownFrame.BorderSizePixel = 0
dropdownFrame.Parent = dropdownContainer
local dropdownCorner = Instance.new("UICorner")
dropdownCorner.CornerRadius = UDim.new(0, 10)
dropdownCorner.Parent = dropdownFrame
local label = Instance.new("TextLabel")
label.Name = "Label"
label.Size = UDim2.new(0, 180, 1, 0)
label.Position = UDim2.new(0, 16, 0, 0)
label.BackgroundTransparency = 1
label.Text = text
label.TextColor3 = Theme.TextColor
label.TextSize = 14
label.Font = Enum.Font.GothamSemibold
label.TextXAlignment = Enum.TextXAlignment.Left
label.TextYAlignment = Enum.TextYAlignment.Center
label.TextTruncate = Enum.TextTruncate.AtEnd
label.Parent = dropdownFrame
local dropdownButton = Instance.new("TextButton")
dropdownButton.Name = "DropdownButton"
dropdownButton.Size = UDim2.new(1, -212, 0, 36)
dropdownButton.Position = UDim2.new(0, 200, 0.5, -18)
dropdownButton.BackgroundColor3 = Theme.ToggleOff
dropdownButton.BorderSizePixel = 0
dropdownButton.Text = ""
dropdownButton.AutoButtonColor = false
dropdownButton.Parent = dropdownFrame
local buttonCorner = Instance.new("UICorner")
buttonCorner.CornerRadius = UDim.new(0, 8)
buttonCorner.Parent = dropdownButton
local selectedLabel = Instance.new("TextLabel")
selectedLabel.Name = "SelectedLabel"
selectedLabel.Size = UDim2.new(1, -44, 1, 0)
selectedLabel.Position = UDim2.new(0, 14, 0, 0)
selectedLabel.BackgroundTransparency = 1
selectedLabel.Text = tostring(selectedValue)
selectedLabel.TextColor3 = Theme.TextColor
selectedLabel.TextSize = 13
selectedLabel.Font = Enum.Font.GothamMedium
selectedLabel.TextXAlignment = Enum.TextXAlignment.Left
selectedLabel.TextYAlignment = Enum.TextYAlignment.Center
selectedLabel.TextTruncate = Enum.TextTruncate.AtEnd
selectedLabel.Parent = dropdownButton
local arrowIcon = Instance.new("TextLabel")
arrowIcon.Name = "ArrowIcon"
arrowIcon.Size = UDim2.new(0, 24, 1, 0)
arrowIcon.Position = UDim2.new(1, -28, 0, 0)
arrowIcon.BackgroundTransparency = 1
arrowIcon.Text = "▼"
arrowIcon.TextColor3 = Theme.TextSecondary
arrowIcon.TextSize = 10
arrowIcon.Font = Enum.Font.GothamBold
arrowIcon.TextYAlignment = Enum.TextYAlignment.Center
arrowIcon.Parent = dropdownButton
local optionsList = Instance.new("ScrollingFrame")
optionsList.Name = "OptionsList_" .. text
optionsList.Size = UDim2.new(0, 0, 0, 0)
optionsList.Position = UDim2.new(0, 0, 0, 0)
optionsList.BackgroundColor3 = Color3.fromRGB(16, 16, 24)
optionsList.BorderSizePixel = 0
optionsList.ScrollBarThickness = 5
optionsList.ScrollBarImageColor3 = Theme.AccentColor
optionsList.ScrollBarImageTransparency = 0.2
optionsList.Visible = false
optionsList.ZIndex = 10000
optionsList.Active = true
optionsList.ClipsDescendants = true
optionsList.Parent = self.Window.ScreenGui
local listStroke = Instance.new("UIStroke")
listStroke.Color = Theme.AccentColor
listStroke.Transparency = 0.6
listStroke.Thickness = 1.5
listStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
listStroke.Parent = optionsList
local listCorner = Instance.new("UICorner")
listCorner.CornerRadius = UDim.new(0, 10)
listCorner.Parent = optionsList
local listLayout = Instance.new("UIListLayout")
listLayout.SortOrder = Enum.SortOrder.LayoutOrder
listLayout.Padding = UDim.new(0, 4)
listLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
listLayout.Parent = optionsList
local listPadding = Instance.new("UIPadding")
listPadding.PaddingLeft = UDim.new(0, 8)
listPadding.PaddingRight = UDim.new(0, 8)
listPadding.PaddingTop = UDim.new(0, 8)
listPadding.PaddingBottom = UDim.new(0, 8)
listPadding.Parent = optionsList
-- Track scroll connection for cleanup
local scrollConnection = nil
-- Declare closeDropdown as a variable first so it can be referenced in updateOptions
local closeDropdown
local function updateOptions(newOptions)
for _, child in pairs(optionsList:GetChildren()) do
if child:IsA("TextButton") then
child:Destroy()
end
end
for i, option in ipairs(newOptions) do
local optionButton = Instance.new("TextButton")
optionButton.Name = "Option_" .. i
optionButton.Size = UDim2.new(1, 0, 0, 36)
optionButton.BackgroundColor3 = Color3.fromRGB(22, 22, 34)
optionButton.BackgroundTransparency = 0
optionButton.BorderSizePixel = 0
optionButton.Text = ""
optionButton.AutoButtonColor = false
optionButton.ZIndex = 1001
optionButton.Parent = optionsList
local optionCorner = Instance.new("UICorner")
optionCorner.CornerRadius = UDim.new(0, 8)
optionCorner.Parent = optionButton
local optionText = Instance.new("TextLabel")
optionText.Name = "OptionText"
optionText.Size = UDim2.new(1, -24, 1, 0)
optionText.Position = UDim2.new(0, 14, 0, 0)
optionText.BackgroundTransparency = 1
optionText.Text = tostring(option)
optionText.TextColor3 = Theme.TextColor
optionText.TextSize = 13
optionText.Font = Enum.Font.GothamMedium
optionText.TextXAlignment = Enum.TextXAlignment.Left
optionText.TextYAlignment = Enum.TextYAlignment.Center
optionText.TextTruncate = Enum.TextTruncate.AtEnd
optionText.ZIndex = 1002
optionText.Parent = optionButton
local selectionIndicator = Instance.new("Frame")
selectionIndicator.Name = "SelectionIndicator"
selectionIndicator.Size = UDim2.new(0, 3, 0, 20)
selectionIndicator.Position = UDim2.new(0, 4, 0.5, -10)
selectionIndicator.BackgroundColor3 = Theme.AccentColor
selectionIndicator.BorderSizePixel = 0
selectionIndicator.Visible = (tostring(option) == tostring(selectedValue))
selectionIndicator.ZIndex = 1002
selectionIndicator.Parent = optionButton
local indicatorCorner = Instance.new("UICorner")
indicatorCorner.CornerRadius = UDim.new(1, 0)
indicatorCorner.Parent = selectionIndicator
optionButton.MouseButton1Click:Connect(function()
selectedValue = option
selectedLabel.Text = tostring(option)
for _, child in pairs(optionsList:GetChildren()) do
if child:IsA("TextButton") then
local indicator = child:FindFirstChild("SelectionIndicator")
if indicator then
indicator.Visible = false
end
end
end
selectionIndicator.Visible = true
closeDropdown()
if callback then
task.spawn(function()
local success, err = pcall(callback, option)
if not success then
warn("GAeroUI Dropdown Error:", err)
end
end)
end
end)
optionButton.MouseEnter:Connect(function()
CreateTween(optionButton, {BackgroundColor3 = Theme.AccentColor}, TweenPresets.Fast)
CreateTween(optionText, {TextColor3 = Color3.fromRGB(255, 255, 255)}, TweenPresets.Fast)
end)
optionButton.MouseLeave:Connect(function()
CreateTween(optionButton, {BackgroundColor3 = Color3.fromRGB(22, 22, 34)}, TweenPresets.Fast)
CreateTween(optionText, {TextColor3 = Theme.TextColor}, TweenPresets.Fast)
end)
end
optionsList.CanvasSize = UDim2.new(0, 0, 0, listLayout.AbsoluteContentSize.Y + 16)
end
-- Define closeDropdown function (now that it's declared above, it can be used in updateOptions)
closeDropdown = function()
isOpen = false
CreateTween(optionsList, {Size = UDim2.new(0, optionsList.AbsoluteSize.X, 0, 0)}, TweenPresets.Medium)
CreateTween(arrowIcon, {Rotation = 0}, TweenPresets.Medium)
CreateTween(dropdownButton, {BackgroundColor3 = Theme.ToggleOff}, TweenPresets.Fast)
task.wait(0.3)
optionsList.Visible = false
-- Disconnect scroll listener
if scrollConnection then
scrollConnection:Disconnect()
scrollConnection = nil
end
end
updateOptions(options)
dropdownButton.MouseButton1Click:Connect(function()
isOpen = not isOpen
if isOpen then
-- Calculate available space below dropdown for mobile compatibility
local viewportSize = workspace.CurrentCamera.ViewportSize
local containerAbsPos = dropdownContainer.AbsolutePosition
local containerAbsSize = dropdownContainer.AbsoluteSize
local dropdownBottomY = containerAbsPos.Y + containerAbsSize.Y
-- Account for mobile scaling if applicable
local availableSpaceBelow = viewportSize.Y - dropdownBottomY - 40 -- 40px margin for safety
local maxHeight = math.min(280, math.max(120, availableSpaceBelow))
local optionHeight = 40
local totalHeight = (#options * optionHeight) + 16
local contentHeight = math.min(totalHeight, maxHeight)
-- Calculate position in absolute screen coordinates
local dropdownX = containerAbsPos.X + 16
local dropdownY = containerAbsPos.Y + containerAbsSize.Y + 4
local dropdownWidth = containerAbsSize.X - 32
optionsList.Position = UDim2.new(0, dropdownX, 0, dropdownY)
optionsList.Size = UDim2.new(0, dropdownWidth, 0, 0)
optionsList.Visible = true
CreateTween(optionsList, {Size = UDim2.new(0, dropdownWidth, 0, contentHeight)}, TweenPresets.Medium)
CreateTween(arrowIcon, {Rotation = 180}, TweenPresets.Medium)
CreateTween(dropdownButton, {BackgroundColor3 = Color3.fromRGB(50, 50, 70)}, TweenPresets.Fast)
-- Monitor ContentScroll for scrolling and close dropdown when user scrolls
if scrollConnection then
scrollConnection:Disconnect()
end
scrollConnection = self.Window.ContentScroll:GetPropertyChangedSignal("CanvasPosition"):Connect(function()
closeDropdown()
end)
else
closeDropdown()
end
end)
dropdownFrame.MouseEnter:Connect(function()
if not isOpen then
CreateTween(dropdownFrame, {BackgroundColor3 = Color3.fromRGB(28, 28, 42)}, TweenPresets.Fast)
end
end)
dropdownFrame.MouseLeave:Connect(function()
if not isOpen then
CreateTween(dropdownFrame, {BackgroundColor3 = Theme.SidebarBackground}, TweenPresets.Fast)
end
end)
dropdownButton.MouseEnter:Connect(function()
if not isOpen then
CreateTween(dropdownButton, {BackgroundColor3 = Color3.fromRGB(50, 50, 70)}, TweenPresets.Fast)
end
end)
dropdownButton.MouseLeave:Connect(function()
if not isOpen then
CreateTween(dropdownButton, {BackgroundColor3 = Theme.ToggleOff}, TweenPresets.Fast)
end
end)
table.insert(self.Elements, {Instance = dropdownContainer, Type = "Dropdown"})
-- Cleanup when dropdown container is destroyed
dropdownContainer.Destroying:Connect(function()
if scrollConnection then
scrollConnection:Disconnect()
scrollConnection = nil
end
if optionsList and optionsList.Parent then
optionsList:Destroy()
end
end)
return {
Container = dropdownContainer,
SetValue = function(value)
selectedValue = value
selectedLabel.Text = tostring(value)
end,
GetValue = function()
return selectedValue
end,
UpdateOptions = function(newOptions)
options = newOptions
updateOptions(newOptions)
end,
Refresh = function()
updateOptions(options)
end,
Close = function()
closeDropdown()
end
}
end
function TabMethods:AddSlider(text, min, max, defaultValue, callback)
if self.Window.IsDestroyed then
warn("GAeroUI: Cannot add slider to destroyed window")
return nil
end
if not text or type(text) ~= "string" or text == "" then
warn("GAeroUI: Slider text must be a non-empty string")
return nil
end
if callback and type(callback) ~= "function" then
warn("GAeroUI: Slider callback must be a function")
return nil
end
min = min or 0
max = max or 100
defaultValue = defaultValue or min
if type(min) ~= "number" or type(max) ~= "number" or type(defaultValue) ~= "number" then
warn("GAeroUI: Slider min, max, and defaultValue must be numbers")
return nil
end
if min >= max then
warn("GAeroUI: Slider min must be less than max")
return nil
end
defaultValue = math.clamp(defaultValue, min, max)
local sliderContainer = Instance.new("Frame")
sliderContainer.Name = "SliderContainer_" .. text
sliderContainer.Size = UDim2.new(1, 0, 0, 54)
sliderContainer.BackgroundTransparency = 1
sliderContainer.Visible = (self.Window.CurrentTab == self)
sliderContainer.Parent = self.Window.ContentScroll
local sliderFrame = Instance.new("Frame")
sliderFrame.Name = "SliderFrame"
sliderFrame.Size = UDim2.new(1, 0, 1, 0)
sliderFrame.BackgroundColor3 = Theme.SidebarBackground
sliderFrame.BorderSizePixel = 0
sliderFrame.Parent = sliderContainer
local sliderCorner = Instance.new("UICorner")
sliderCorner.CornerRadius = UDim.new(0, 10)
sliderCorner.Parent = sliderFrame
local label = Instance.new("TextLabel")
label.Name = "Label"
label.Size = UDim2.new(1, -24, 0, 18)
label.Position = UDim2.new(0, 12, 0, 8)
label.BackgroundTransparency = 1
label.Text = text
label.TextColor3 = Theme.TextColor
label.TextSize = 14
label.Font = Enum.Font.GothamSemibold
label.TextXAlignment = Enum.TextXAlignment.Left
label.TextTruncate = Enum.TextTruncate.AtEnd
label.Parent = sliderFrame
local valueLabel = Instance.new("TextLabel")
valueLabel.Name = "ValueLabel"
valueLabel.Size = UDim2.new(0, 60, 0, 18)
valueLabel.Position = UDim2.new(1, -72, 0, 8)
valueLabel.BackgroundTransparency = 1
valueLabel.Text = tostring(math.floor(defaultValue))
valueLabel.TextColor3 = Theme.AccentColor
valueLabel.TextSize = 14
valueLabel.Font = Enum.Font.GothamBold
valueLabel.TextXAlignment = Enum.TextXAlignment.Right
valueLabel.Parent = sliderFrame
local sliderTrack = Instance.new("Frame")
sliderTrack.Name = "SliderTrack"
sliderTrack.Size = UDim2.new(1, -24, 0, 6)
sliderTrack.Position = UDim2.new(0, 12, 1, -16)
sliderTrack.BackgroundColor3 = Theme.ToggleOff
sliderTrack.BorderSizePixel = 0
sliderTrack.Parent = sliderFrame
local trackCorner = Instance.new("UICorner")
trackCorner.CornerRadius = UDim.new(1, 0)
trackCorner.Parent = sliderTrack
local sliderFill = Instance.new("Frame")
sliderFill.Name = "SliderFill"
sliderFill.Size = UDim2.new((defaultValue - min) / (max - min), 0, 1, 0)
sliderFill.BackgroundColor3 = Theme.AccentColor
sliderFill.BorderSizePixel = 0
sliderFill.Parent = sliderTrack
local fillCorner = Instance.new("UICorner")
fillCorner.CornerRadius = UDim.new(1, 0)
fillCorner.Parent = sliderFill
local sliderThumb = Instance.new("Frame")
sliderThumb.Name = "SliderThumb"
sliderThumb.Size = UDim2.new(0, 16, 0, 16)
sliderThumb.Position = UDim2.new((defaultValue - min) / (max - min), -8, 0.5, -8)
sliderThumb.BackgroundColor3 = Theme.TextColor
sliderThumb.BorderSizePixel = 0
sliderThumb.Parent = sliderTrack
local thumbCorner = Instance.new("UICorner")
thumbCorner.CornerRadius = UDim.new(1, 0)
thumbCorner.Parent = sliderThumb
local currentValue = defaultValue
local dragging = false
local function updateSlider(value)
value = math.clamp(value, min, max)
currentValue = value
local percentage = (value - min) / (max - min)
CreateTween(sliderFill, {Size = UDim2.new(percentage, 0, 1, 0)}, TweenPresets.Fast)
CreateTween(sliderThumb, {Position = UDim2.new(percentage, -8, 0.5, -8)}, TweenPresets.Fast)
-- Display decimal values with 1 decimal place if value has decimals
local displayValue = value
if math.abs(value - math.floor(value)) > 0.001 then
valueLabel.Text = string.format("%.1f", value)
else
valueLabel.Text = tostring(math.floor(value))
end
if callback then
local success, err = pcall(callback, value)
if not success then
warn("GAeroUI Slider Error:", err)
end
end
end
local function getValueFromPosition(inputPosition)
local trackPosition = sliderTrack.AbsolutePosition.X
local trackSize = sliderTrack.AbsoluteSize.X
local relativePosition = math.clamp(inputPosition.X - trackPosition, 0, trackSize)
local percentage = relativePosition / trackSize
return min + (percentage * (max - min))
end
sliderTrack.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging = true
local value = getValueFromPosition(input.Position)
updateSlider(value)
end
end)
sliderTrack.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging = false
end
end)
sliderThumb.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging = true
end
end)
sliderThumb.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging = false
end
end)
UserInputService.InputChanged:Connect(function(input)
if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
local value = getValueFromPosition(input.Position)
updateSlider(value)
end
end)
sliderFrame.MouseEnter:Connect(function()
CreateTween(sliderFrame, {BackgroundColor3 = Color3.fromRGB(30, 30, 45)})
CreateTween(sliderThumb, {Size = UDim2.new(0, 18, 0, 18), Position = UDim2.new((currentValue - min) / (max - min), -9, 0.5, -9)}, TweenPresets.Fast)
end)
sliderFrame.MouseLeave:Connect(function()
if not dragging then
CreateTween(sliderFrame, {BackgroundColor3 = Theme.SidebarBackground})
CreateTween(sliderThumb, {Size = UDim2.new(0, 16, 0, 16), Position = UDim2.new((currentValue - min) / (max - min), -8, 0.5, -8)}, TweenPresets.Fast)
end
end)
table.insert(self.Elements, {Instance = sliderContainer, Type = "Slider"})
return {
Container = sliderContainer,
SetValue = function(value)
updateSlider(value)
end,
GetValue = function()
return currentValue
end,
SetMin = function(newMin)
min = newMin
if currentValue < min then
updateSlider(min)
end
end,
SetMax = function(newMax)
max = newMax
if currentValue > max then
updateSlider(max)
end
end
}
end
function TabMethods:AddStepperButtons(decreaseText, increaseText, onDecrease, onIncrease)
if self.Window.IsDestroyed then
warn("GAeroUI: Cannot add stepper buttons to destroyed window")
return nil
end
decreaseText = decreaseText or "- Decrease"
increaseText = increaseText or "+ Increase"
if onDecrease and type(onDecrease) ~= "function" then
warn("GAeroUI: onDecrease must be a function")
return nil
end
if onIncrease and type(onIncrease) ~= "function" then
warn("GAeroUI: onIncrease must be a function")
return nil
end
local stepperContainer = Instance.new("Frame")
stepperContainer.Name = "StepperContainer"
stepperContainer.Size = UDim2.new(1, 0, 0, 40)
stepperContainer.BackgroundTransparency = 1
stepperContainer.Visible = (self.Window.CurrentTab == self)
stepperContainer.Parent = self.Window.ContentScroll
local decreaseButton = Instance.new("TextButton")
decreaseButton.Name = "DecreaseButton"
decreaseButton.Size = UDim2.new(0.48, -4, 1, 0)
decreaseButton.Position = UDim2.new(0, 0, 0, 0)
decreaseButton.BackgroundColor3 = Theme.SidebarBackground
decreaseButton.BorderSizePixel = 0
decreaseButton.Text = decreaseText
decreaseButton.TextColor3 = Theme.TextColor
decreaseButton.TextSize = 14
decreaseButton.Font = Enum.Font.GothamSemibold
decreaseButton.AutoButtonColor = false
decreaseButton.Parent = stepperContainer
local decreaseCorner = Instance.new("UICorner")
decreaseCorner.CornerRadius = UDim.new(0, 10)
decreaseCorner.Parent = decreaseButton
local increaseButton = Instance.new("TextButton")
increaseButton.Name = "IncreaseButton"
increaseButton.Size = UDim2.new(0.48, -4, 1, 0)
increaseButton.Position = UDim2.new(0.52, 4, 0, 0)
increaseButton.BackgroundColor3 = Theme.SidebarBackground
increaseButton.BorderSizePixel = 0
increaseButton.Text = increaseText
increaseButton.TextColor3 = Theme.TextColor
increaseButton.TextSize = 14
increaseButton.Font = Enum.Font.GothamSemibold
increaseButton.AutoButtonColor = false
increaseButton.Parent = stepperContainer
local increaseCorner = Instance.new("UICorner")
increaseCorner.CornerRadius = UDim.new(0, 10)
increaseCorner.Parent = increaseButton
decreaseButton.MouseEnter:Connect(function()
CreateTween(decreaseButton, {BackgroundColor3 = Color3.fromRGB(30, 30, 45)}, TweenPresets.Fast)
end)
decreaseButton.MouseLeave:Connect(function()
CreateTween(decreaseButton, {BackgroundColor3 = Theme.SidebarBackground}, TweenPresets.Fast)
end)
increaseButton.MouseEnter:Connect(function()
CreateTween(increaseButton, {BackgroundColor3 = Color3.fromRGB(30, 30, 45)}, TweenPresets.Fast)
end)
increaseButton.MouseLeave:Connect(function()
CreateTween(increaseButton, {BackgroundColor3 = Theme.SidebarBackground}, TweenPresets.Fast)
end)
decreaseButton.MouseButton1Click:Connect(function()
if onDecrease then
local success, err = pcall(onDecrease)
if not success then
warn("GAeroUI StepperButtons Decrease Error:", err)
end
end
end)
increaseButton.MouseButton1Click:Connect(function()
if onIncrease then
local success, err = pcall(onIncrease)
if not success then
warn("GAeroUI StepperButtons Increase Error:", err)
end
end
end)
table.insert(self.Elements, {Instance = stepperContainer, Type = "StepperButtons"})
return {
Container = stepperContainer,
SetDecreaseText = function(text)
decreaseButton.Text = text
end,
SetIncreaseText = function(text)
increaseButton.Text = text
end,
SetEnabled = function(enabled)
decreaseButton.Active = enabled
increaseButton.Active = enabled
decreaseButton.TextTransparency = enabled and 0 or 0.5
increaseButton.TextTransparency = enabled and 0 or 0.5
end
}
end
function TabMethods:AddTextBox(text, placeholder, defaultValue, callback)
if self.Window.IsDestroyed then
warn("GAeroUI: Cannot add textbox to destroyed window")
return nil
end
if not text or type(text) ~= "string" or text == "" then
warn("GAeroUI: TextBox text must be a non-empty string")
return nil
end
if callback and type(callback) ~= "function" then
warn("GAeroUI: TextBox callback must be a function")
return nil
end
placeholder = placeholder or "Enter text..."
defaultValue = defaultValue or ""
local textBoxContainer = Instance.new("Frame")
textBoxContainer.Name = "TextBoxContainer_" .. text
textBoxContainer.Size = UDim2.new(1, 0, 0, 50)
textBoxContainer.BackgroundTransparency = 1
textBoxContainer.Visible = (self.Window.CurrentTab == self)
textBoxContainer.Parent = self.Window.ContentScroll
local textBoxFrame = Instance.new("Frame")
textBoxFrame.Name = "TextBoxFrame"
textBoxFrame.Size = UDim2.new(1, 0, 1, 0)
textBoxFrame.BackgroundColor3 = Theme.SidebarBackground
textBoxFrame.BorderSizePixel = 0
textBoxFrame.Parent = textBoxContainer
local textBoxCorner = Instance.new("UICorner")
textBoxCorner.CornerRadius = UDim.new(0, 10)
textBoxCorner.Parent = textBoxFrame
local label = Instance.new("TextLabel")
label.Name = "Label"
label.Size = UDim2.new(0, 180, 1, 0)
label.Position = UDim2.new(0, 16, 0, 0)
label.BackgroundTransparency = 1
label.Text = text
label.TextColor3 = Theme.TextColor
label.TextSize = 14
label.Font = Enum.Font.GothamSemibold
label.TextXAlignment = Enum.TextXAlignment.Left
label.TextYAlignment = Enum.TextYAlignment.Center
label.TextTruncate = Enum.TextTruncate.AtEnd
label.Parent = textBoxFrame
local textBoxInput = Instance.new("TextBox")
textBoxInput.Name = "TextBoxInput"
textBoxInput.Size = UDim2.new(1, -212, 0, 36)
textBoxInput.Position = UDim2.new(0, 200, 0.5, -18)
textBoxInput.BackgroundColor3 = Theme.ToggleOff
textBoxInput.BorderSizePixel = 0
textBoxInput.Text = defaultValue
textBoxInput.PlaceholderText = placeholder
textBoxInput.TextColor3 = Theme.TextColor
textBoxInput.PlaceholderColor3 = Theme.TextSecondary
textBoxInput.TextSize = 13
textBoxInput.Font = Enum.Font.GothamMedium
textBoxInput.TextXAlignment = Enum.TextXAlignment.Left
textBoxInput.ClearTextOnFocus = false
textBoxInput.Parent = textBoxFrame
local inputCorner = Instance.new("UICorner")
inputCorner.CornerRadius = UDim.new(0, 8)
inputCorner.Parent = textBoxInput
local inputPadding = Instance.new("UIPadding")
inputPadding.PaddingLeft = UDim.new(0, 14)
inputPadding.PaddingRight = UDim.new(0, 14)
inputPadding.Parent = textBoxInput
local onChangeCallback = nil
textBoxInput:GetPropertyChangedSignal("Text"):Connect(function()
if onChangeCallback then
local success, err = pcall(onChangeCallback, textBoxInput.Text)
if not success then
warn("GAeroUI TextBox OnChange Error:", err)
end
end
end)
textBoxInput.FocusLost:Connect(function(enterPressed)
if callback then
local success, err = pcall(callback, textBoxInput.Text, enterPressed)
if not success then
warn("GAeroUI TextBox Error:", err)
end
end
end)
textBoxInput.Focused:Connect(function()
CreateTween(textBoxInput, {BackgroundColor3 = Color3.fromRGB(50, 50, 70)}, TweenPresets.Fast)
end)
textBoxInput.FocusLost:Connect(function()
CreateTween(textBoxInput, {BackgroundColor3 = Theme.ToggleOff}, TweenPresets.Fast)
end)
textBoxFrame.MouseEnter:Connect(function()
CreateTween(textBoxFrame, {BackgroundColor3 = Color3.fromRGB(28, 28, 42)}, TweenPresets.Fast)
end)
textBoxFrame.MouseLeave:Connect(function()
CreateTween(textBoxFrame, {BackgroundColor3 = Theme.SidebarBackground}, TweenPresets.Fast)
end)
table.insert(self.Elements, {Instance = textBoxContainer, Type = "TextBox"})
return {
Container = textBoxContainer,
SetValue = function(value)
textBoxInput.Text = tostring(value)
end,
GetValue = function()
return textBoxInput.Text
end,
Clear = function()
textBoxInput.Text = ""
end,
SetPlaceholder = function(newPlaceholder)
textBoxInput.PlaceholderText = newPlaceholder
end,
OnChange = function(changeCallback)
onChangeCallback = changeCallback
end
}
end
function TabMethods:AddLoadingBar(text)
if self.Window.IsDestroyed then
warn("GAeroUI: Cannot add loading bar to destroyed window")
return nil
end
text = text or "Loading..."
local loadingContainer = Instance.new("Frame")
loadingContainer.Name = "LoadingBarContainer"
loadingContainer.Size = UDim2.new(1, 0, 0, 70)
loadingContainer.BackgroundTransparency = 1
loadingContainer.Visible = (self.Window.CurrentTab == self)
loadingContainer.Parent = self.Window.ContentScroll
local loadingFrame = Instance.new("Frame")
loadingFrame.Name = "LoadingFrame"
loadingFrame.Size = UDim2.new(1, 0, 1, 0)
loadingFrame.BackgroundColor3 = Theme.SidebarBackground
loadingFrame.BorderSizePixel = 0
loadingFrame.Parent = loadingContainer
local loadingCorner = Instance.new("UICorner")
loadingCorner.CornerRadius = UDim.new(0, 10)
loadingCorner.Parent = loadingFrame
local label = Instance.new("TextLabel")
label.Name = "Label"
label.Size = UDim2.new(1, -24, 0, 18)
label.Position = UDim2.new(0, 12, 0, 8)
label.BackgroundTransparency = 1
label.Text = text
label.TextColor3 = Theme.TextColor
label.TextSize = 14
label.Font = Enum.Font.GothamSemibold
label.TextXAlignment = Enum.TextXAlignment.Left
label.TextTruncate = Enum.TextTruncate.AtEnd
label.Parent = loadingFrame
local progressTrack = Instance.new("Frame")
progressTrack.Name = "ProgressTrack"
progressTrack.Size = UDim2.new(1, -24, 0, 8)
progressTrack.Position = UDim2.new(0, 12, 1, -20)
progressTrack.BackgroundColor3 = Theme.ToggleOff
progressTrack.BorderSizePixel = 0
progressTrack.Parent = loadingFrame
local trackCorner = Instance.new("UICorner")
trackCorner.CornerRadius = UDim.new(1, 0)
trackCorner.Parent = progressTrack
local progressFill = Instance.new("Frame")
progressFill.Name = "ProgressFill"
progressFill.Size = UDim2.new(0, 0, 1, 0)
progressFill.BackgroundColor3 = Theme.AccentColor
progressFill.BorderSizePixel = 0
progressFill.Parent = progressTrack
local fillCorner = Instance.new("UICorner")
fillCorner.CornerRadius = UDim.new(1, 0)
fillCorner.Parent = progressFill
local progressGlow = Instance.new("Frame")
progressGlow.Name = "ProgressGlow"
progressGlow.Size = UDim2.new(0, 40, 1, 4)
progressGlow.Position = UDim2.new(1, -20, 0, -2)
progressGlow.BackgroundColor3 = Theme.AccentHover
progressGlow.BackgroundTransparency = 0.3
progressGlow.BorderSizePixel = 0
progressGlow.Parent = progressFill
local glowCorner = Instance.new("UICorner")
glowCorner.CornerRadius = UDim.new(1, 0)
glowCorner.Parent = progressGlow
local glowGradient = Instance.new("UIGradient")
glowGradient.Transparency = NumberSequence.new({
NumberSequenceKeypoint.new(0, 1),
NumberSequenceKeypoint.new(0.5, 0.3),
NumberSequenceKeypoint.new(1, 1)
})
glowGradient.Rotation = 0
glowGradient.Parent = progressGlow
local percentLabel = Instance.new("TextLabel")
percentLabel.Name = "PercentLabel"
percentLabel.Size = UDim2.new(0, 60, 0, 18)
percentLabel.Position = UDim2.new(1, -72, 0, 8)
percentLabel.BackgroundTransparency = 1
percentLabel.Text = "0%"
percentLabel.TextColor3 = Theme.AccentColor
percentLabel.TextSize = 13
percentLabel.Font = Enum.Font.GothamBold
percentLabel.TextXAlignment = Enum.TextXAlignment.Right
percentLabel.Parent = loadingFrame
local animationConnection = nil
local isIndeterminate = true
local function startIndeterminateAnimation()
if animationConnection then
animationConnection:Disconnect()
end
isIndeterminate = true
local animationTime = 0
animationConnection = RunService.Heartbeat:Connect(function(deltaTime)
if not isIndeterminate or not progressFill or not progressFill.Parent then
if animationConnection then
animationConnection:Disconnect()
animationConnection = nil
end
return
end
animationTime = animationTime + deltaTime
local progress = (math.sin(animationTime * 2) + 1) / 2
progressFill.Size = UDim2.new(0.3 + (progress * 0.4), 0, 1, 0)
percentLabel.Text = "..."
end)
end
startIndeterminateAnimation()
table.insert(self.Elements, {Instance = loadingContainer, Type = "LoadingBar"})
return {
Container = loadingContainer,
SetProgress = function(percent)
if not progressFill or not progressFill.Parent then return end
isIndeterminate = false
if animationConnection then
animationConnection:Disconnect()
animationConnection = nil
end
percent = math.clamp(percent, 0, 100)
local scale = percent / 100
CreateTween(progressFill, {Size = UDim2.new(scale, 0, 1, 0)}, TweenPresets.Fast)
percentLabel.Text = string.format("%d%%", math.floor(percent))
if percent >= 100 and progressGlow and progressGlow.Parent then
CreateTween(progressGlow, {BackgroundTransparency = 1}, TweenPresets.Fast)
end
end,
SetText = function(newText)
if label and label.Parent then
label.Text = newText
end
end,
Complete = function()
if not progressFill or not progressFill.Parent then return end
isIndeterminate = false
if animationConnection then
animationConnection:Disconnect()
animationConnection = nil
end
CreateTween(progressFill, {Size = UDim2.new(1, 0, 1, 0)}, TweenPresets.Medium)
percentLabel.Text = "100%"
task.wait(0.5)
if loadingContainer and loadingContainer.Parent then
CreateTween(loadingContainer, {
Size = UDim2.new(1, 0, 0, 0),
BackgroundTransparency = 1
}, TweenPresets.Fast)
task.wait(0.2)
if loadingContainer and loadingContainer.Parent then
loadingContainer:Destroy()
end
end
end,
Destroy = function()
isIndeterminate = false
if animationConnection then
animationConnection:Disconnect()
animationConnection = nil
end
if loadingContainer and loadingContainer.Parent then
loadingContainer:Destroy()
end
end
}
end
function TabMethods:AddColorpicker(text, defaultColor, transparency, callback)
if self.Window.IsDestroyed then
warn("GAeroUI: Cannot add colorpicker to destroyed window")
return nil
end
if not text or type(text) ~= "string" or text == "" then
warn("GAeroUI: Colorpicker text must be a non-empty string")
return nil
end
defaultColor = defaultColor or Color3.fromRGB(255, 255, 255)
local hasTransparency = transparency ~= nil
local currentTransparency = transparency or 0
local colorpickerContainer = Instance.new("Frame")
colorpickerContainer.Name = "ColorpickerContainer_" .. text
colorpickerContainer.Size = UDim2.new(1, 0, 0, 44)
colorpickerContainer.BackgroundTransparency = 1
colorpickerContainer.Visible = (self.Window.CurrentTab == self)
colorpickerContainer.Parent = self.Window.ContentScroll
local colorpickerFrame = Instance.new("Frame")
colorpickerFrame.Name = "ColorpickerFrame"
colorpickerFrame.Size = UDim2.new(1, 0, 1, 0)
colorpickerFrame.BackgroundColor3 = Theme.SidebarBackground
colorpickerFrame.BorderSizePixel = 0
colorpickerFrame.Parent = colorpickerContainer
local colorpickerCorner = Instance.new("UICorner")
colorpickerCorner.CornerRadius = UDim.new(0, 10)
colorpickerCorner.Parent = colorpickerFrame
local label = Instance.new("TextLabel")
label.Name = "Label"
label.Size = UDim2.new(1, -100, 1, 0)
label.Position = UDim2.new(0, 12, 0, 0)
label.BackgroundTransparency = 1
label.Text = text
label.TextColor3 = Theme.TextColor
label.TextSize = 14
label.Font = Enum.Font.GothamSemibold
label.TextXAlignment = Enum.TextXAlignment.Left
label.TextTruncate = Enum.TextTruncate.AtEnd
label.Parent = colorpickerFrame
local currentColor = defaultColor
local colorPreview = Instance.new("TextButton")
colorPreview.Name = "ColorPreview"
colorPreview.Size = UDim2.new(0, 80, 0, 32)
colorPreview.Position = UDim2.new(1, -92, 0.5, -16)
colorPreview.BackgroundColor3 = currentColor
colorPreview.BackgroundTransparency = hasTransparency and currentTransparency or 0
colorPreview.BorderSizePixel = 0
colorPreview.Text = ""
colorPreview.AutoButtonColor = false
colorPreview.Parent = colorpickerFrame
local previewCorner = Instance.new("UICorner")
previewCorner.CornerRadius = UDim.new(0, 8)
previewCorner.Parent = colorPreview
local previewStroke = Instance.new("UIStroke")
previewStroke.Color = Theme.SeparatorColor
previewStroke.Transparency = 0.5
previewStroke.Thickness = 1
previewStroke.Parent = colorPreview
local pickerOpen = false
colorPreview.MouseButton1Click:Connect(function()
if pickerOpen then return end
pickerOpen = true
local pickerOverlay = Instance.new("Frame")
pickerOverlay.Name = "ColorPickerOverlay"
pickerOverlay.Size = UDim2.new(1, 0, 1, 0)
pickerOverlay.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
pickerOverlay.BackgroundTransparency = 0.5
pickerOverlay.BorderSizePixel = 0
pickerOverlay.ZIndex = 500
pickerOverlay.Parent = self.Window.ScreenGui
local pickerFrame = Instance.new("Frame")
pickerFrame.Name = "ColorPicker"
pickerFrame.Size = UDim2.new(0, 280, 0, hasTransparency and 340 or 300)
pickerFrame.Position = UDim2.new(0.5, -140, 0.5, hasTransparency and -170 or -150)
pickerFrame.BackgroundColor3 = Theme.MainBackground
pickerFrame.BackgroundTransparency = 0.1
pickerFrame.BorderSizePixel = 0
pickerFrame.ZIndex = 501
pickerFrame.Parent = pickerOverlay
local pickerCorner = Instance.new("UICorner")
pickerCorner.CornerRadius = UDim.new(0, 12)
pickerCorner.Parent = pickerFrame
ApplyGlassmorphism(pickerFrame)
local function createSlider(name, yPos, defaultValue)
local sliderLabel = Instance.new("TextLabel")
sliderLabel.Size = UDim2.new(0, 30, 0, 20)
sliderLabel.Position = UDim2.new(0, 20, 0, yPos)
sliderLabel.BackgroundTransparency = 1
sliderLabel.Text = name
sliderLabel.TextColor3 = Theme.TextColor
sliderLabel.TextSize = 13
sliderLabel.Font = Enum.Font.GothamBold
sliderLabel.TextXAlignment = Enum.TextXAlignment.Left
sliderLabel.ZIndex = 502
sliderLabel.Parent = pickerFrame
local sliderTrack = Instance.new("Frame")
sliderTrack.Size = UDim2.new(0, 180, 0, 6)
sliderTrack.Position = UDim2.new(0, 60, 0, yPos + 7)
sliderTrack.BackgroundColor3 = Theme.ToggleOff
sliderTrack.BorderSizePixel = 0
sliderTrack.ZIndex = 502
sliderTrack.Parent = pickerFrame
local trackCorner = Instance.new("UICorner")
trackCorner.CornerRadius = UDim.new(1, 0)
trackCorner.Parent = sliderTrack
local sliderFill = Instance.new("Frame")
sliderFill.Size = UDim2.new(defaultValue / 255, 0, 1, 0)
sliderFill.BackgroundColor3 = name == "R" and Color3.fromRGB(231, 76, 60) or
name == "G" and Color3.fromRGB(46, 204, 113) or
Color3.fromRGB(52, 152, 219)
sliderFill.BorderSizePixel = 0
sliderFill.ZIndex = 503
sliderFill.Parent = sliderTrack
local fillCorner = Instance.new("UICorner")
fillCorner.CornerRadius = UDim.new(1, 0)
fillCorner.Parent = sliderFill
local valueLabel = Instance.new("TextLabel")
valueLabel.Size = UDim2.new(0, 30, 0, 20)
valueLabel.Position = UDim2.new(0, 245, 0, yPos)
valueLabel.BackgroundTransparency = 1
valueLabel.Text = tostring(math.floor(defaultValue))
valueLabel.TextColor3 = Theme.TextSecondary
valueLabel.TextSize = 12
valueLabel.Font = Enum.Font.Gotham
valueLabel.TextXAlignment = Enum.TextXAlignment.Right
valueLabel.ZIndex = 502
valueLabel.Parent = pickerFrame
local dragging = false
local sliderButton = Instance.new("TextButton")
sliderButton.Size = UDim2.new(1, 0, 1, 0)
sliderButton.BackgroundTransparency = 1
sliderButton.Text = ""
sliderButton.ZIndex = 504
sliderButton.Parent = sliderTrack
sliderButton.MouseButton1Down:Connect(function()
dragging = true
end)
UserInputService.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = false
end
end)
UserInputService.InputChanged:Connect(function(input)
if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
local mousePos = UserInputService:GetMouseLocation()
local relativePos = mousePos.X - sliderTrack.AbsolutePosition.X
local percentage = math.clamp(relativePos / sliderTrack.AbsoluteSize.X, 0, 1)
local value = math.floor(percentage * 255)
sliderFill.Size = UDim2.new(percentage, 0, 1, 0)
valueLabel.Text = tostring(value)
return value
end
end)
return {
GetValue = function()
return math.floor((sliderFill.Size.X.Scale) * 255)
end,
SetValue = function(value)
sliderFill.Size = UDim2.new(value / 255, 0, 1, 0)
valueLabel.Text = tostring(math.floor(value))
end
}
end
local rSlider = createSlider("R", 30, currentColor.R * 255)
local gSlider = createSlider("G", 70, currentColor.G * 255)
local bSlider = createSlider("B", 110, currentColor.B * 255)
local alphaSlider
if hasTransparency then
alphaSlider = createSlider("A", 150, (1 - currentTransparency) * 255)
end
local applyButton = Instance.new("TextButton")
applyButton.Size = UDim2.new(0, 120, 0, 36)
applyButton.Position = UDim2.new(0.5, -60, 1, hasTransparency and -50 or -50)
applyButton.BackgroundColor3 = Theme.AccentColor
applyButton.BorderSizePixel = 0
applyButton.Text = "Apply"
applyButton.TextColor3 = Theme.TextColor
applyButton.TextSize = 14
applyButton.Font = Enum.Font.GothamBold
applyButton.AutoButtonColor = false
applyButton.ZIndex = 502
applyButton.Parent = pickerFrame
local applyCorner = Instance.new("UICorner")
applyCorner.CornerRadius = UDim.new(0, 10)
applyCorner.Parent = applyButton
applyButton.MouseButton1Click:Connect(function()
local r = rSlider.GetValue()
local g = gSlider.GetValue()
local b = bSlider.GetValue()
currentColor = Color3.fromRGB(r, g, b)
if hasTransparency and alphaSlider then
currentTransparency = 1 - (alphaSlider.GetValue() / 255)
colorPreview.BackgroundTransparency = currentTransparency
end
colorPreview.BackgroundColor3 = currentColor
if callback then
pcall(callback, currentColor, currentTransparency)
end
pickerOverlay:Destroy()
pickerOpen = false
end)
applyButton.MouseEnter:Connect(function()
CreateTween(applyButton, {BackgroundColor3 = Theme.AccentHover})
end)
applyButton.MouseLeave:Connect(function()
CreateTween(applyButton, {BackgroundColor3 = Theme.AccentColor})
end)
pickerOverlay.MouseButton1Click:Connect(function()
pickerOverlay:Destroy()
pickerOpen = false
end)
end)
colorpickerFrame.MouseEnter:Connect(function()
CreateTween(colorpickerFrame, {BackgroundColor3 = Color3.fromRGB(28, 28, 42)}, TweenPresets.Fast)
end)
colorpickerFrame.MouseLeave:Connect(function()
CreateTween(colorpickerFrame, {BackgroundColor3 = Theme.SidebarBackground}, TweenPresets.Fast)
end)
table.insert(self.Elements, {Instance = colorpickerContainer, Type = "Colorpicker"})
return {
Container = colorpickerContainer,
SetColor = function(color, alpha)
currentColor = color
colorPreview.BackgroundColor3 = color
if hasTransparency and alpha then
currentTransparency = alpha
colorPreview.BackgroundTransparency = alpha
end
if callback then
pcall(callback, color, alpha or currentTransparency)
end
end,
GetColor = function()
return currentColor, currentTransparency
end
}
end
function TabMethods:AddCode(config)
if self.Window.IsDestroyed then
warn("GAeroUI: Cannot add code to destroyed window")
return nil
end
config = config or {}
local title = config.Title or "Code"
local code = config.Code or ""
local codeContainer = Instance.new("Frame")
codeContainer.Name = "CodeContainer_" .. title
codeContainer.Size = UDim2.new(1, 0, 0, 0)
codeContainer.BackgroundTransparency = 1
codeContainer.Visible = (self.Window.CurrentTab == self)
codeContainer.AutomaticSize = Enum.AutomaticSize.Y
codeContainer.Parent = self.Window.ContentScroll
local codeFrame = Instance.new("Frame")
codeFrame.Name = "CodeFrame"
codeFrame.Size = UDim2.new(1, 0, 0, 0)
codeFrame.BackgroundColor3 = Theme.SidebarBackground
codeFrame.BackgroundTransparency = 0.3
codeFrame.BorderSizePixel = 0
codeFrame.AutomaticSize = Enum.AutomaticSize.Y
codeFrame.Parent = codeContainer
local codeCorner = Instance.new("UICorner")
codeCorner.CornerRadius = UDim.new(0, 10)
codeCorner.Parent = codeFrame
local contentArea = Instance.new("Frame")
contentArea.Name = "ContentArea"
contentArea.Size = UDim2.new(1, -24, 0, 0)
contentArea.Position = UDim2.new(0, 12, 0, 12)
contentArea.BackgroundTransparency = 1
contentArea.AutomaticSize = Enum.AutomaticSize.Y
contentArea.Parent = codeFrame
local contentLayout = Instance.new("UIListLayout")
contentLayout.SortOrder = Enum.SortOrder.LayoutOrder
contentLayout.Padding = UDim.new(0, 8)
contentLayout.Parent = contentArea
local headerFrame = Instance.new("Frame")
headerFrame.Name = "Header"
headerFrame.Size = UDim2.new(1, 0, 0, 24)
headerFrame.BackgroundTransparency = 1
headerFrame.LayoutOrder = 1
headerFrame.Parent = contentArea
local titleLabel = Instance.new("TextLabel")
titleLabel.Name = "Title"
titleLabel.Size = UDim2.new(1, -80, 1, 0)
titleLabel.BackgroundTransparency = 1
titleLabel.Text = title
titleLabel.TextColor3 = Theme.AccentColor
titleLabel.TextSize = 14
titleLabel.Font = Enum.Font.GothamBold
titleLabel.TextXAlignment = Enum.TextXAlignment.Left
titleLabel.Parent = headerFrame
local copyButton = Instance.new("TextButton")
copyButton.Name = "CopyButton"
copyButton.Size = UDim2.new(0, 70, 0, 24)
copyButton.Position = UDim2.new(1, -70, 0, 0)
copyButton.BackgroundColor3 = Theme.AccentColor
copyButton.BackgroundTransparency = 0.2
copyButton.BorderSizePixel = 0
copyButton.Text = ""
copyButton.AutoButtonColor = false
copyButton.Parent = headerFrame
local copyCorner = Instance.new("UICorner")
copyCorner.CornerRadius = UDim.new(0, 6)
copyCorner.Parent = copyButton
local copyIconContainer = Instance.new("Frame")
copyIconContainer.Name = "IconContainer"
copyIconContainer.Size = UDim2.new(0, 14, 0, 14)
copyIconContainer.Position = UDim2.new(0, 8, 0.5, -7)
copyIconContainer.BackgroundTransparency = 1
copyIconContainer.Parent = copyButton
LoadLucideIcon("copy", copyIconContainer, Theme.TextColor)
local copyLabel = Instance.new("TextLabel")
copyLabel.Size = UDim2.new(1, -26, 1, 0)
copyLabel.Position = UDim2.new(0, 26, 0, 0)
copyLabel.BackgroundTransparency = 1
copyLabel.Text = "Copy"
copyLabel.TextColor3 = Theme.TextColor
copyLabel.TextSize = 12
copyLabel.Font = Enum.Font.GothamSemibold
copyLabel.TextXAlignment = Enum.TextXAlignment.Left
copyLabel.Parent = copyButton
local codeBox = Instance.new("Frame")
codeBox.Name = "CodeBox"
codeBox.Size = UDim2.new(1, 0, 0, 0)
codeBox.BackgroundColor3 = Theme.ToggleOff
codeBox.BorderSizePixel = 0
codeBox.AutomaticSize = Enum.AutomaticSize.Y
codeBox.LayoutOrder = 2
codeBox.Parent = contentArea
local codeBoxCorner = Instance.new("UICorner")
codeBoxCorner.CornerRadius = UDim.new(0, 8)
codeBoxCorner.Parent = codeBox
local codeLabel = Instance.new("TextLabel")
codeLabel.Name = "CodeText"
codeLabel.Size = UDim2.new(1, -16, 0, 0)
codeLabel.Position = UDim2.new(0, 8, 0, 8)
codeLabel.BackgroundTransparency = 1
codeLabel.Text = code
codeLabel.TextColor3 = Theme.TextColor
codeLabel.TextSize = 12
codeLabel.Font = Enum.Font.Code
codeLabel.TextXAlignment = Enum.TextXAlignment.Left
codeLabel.TextYAlignment = Enum.TextYAlignment.Top
codeLabel.TextWrapped = true
codeLabel.AutomaticSize = Enum.AutomaticSize.Y
codeLabel.Parent = codeBox
local codePadding = Instance.new("UIPadding")
codePadding.PaddingBottom = UDim.new(0, 8)
codePadding.Parent = codeBox
local bottomPadding = Instance.new("Frame")
bottomPadding.Size = UDim2.new(1, 0, 0, 12)
bottomPadding.BackgroundTransparency = 1
bottomPadding.LayoutOrder = 999
bottomPadding.Parent = contentArea
local onCopyCallback = nil
copyButton.MouseButton1Click:Connect(function()
if setclipboard then
setclipboard(code)
copyLabel.Text = "Copied!"
CreateTween(copyButton, {BackgroundColor3 = Theme.SuccessColor})
task.wait(1.5)
copyLabel.Text = "Copy"
CreateTween(copyButton, {BackgroundColor3 = Theme.AccentColor})
if onCopyCallback then
pcall(onCopyCallback)
end
else
copyLabel.Text = "Failed"
CreateTween(copyButton, {BackgroundColor3 = Theme.ErrorColor})
task.wait(1.5)
copyLabel.Text = "Copy"
CreateTween(copyButton, {BackgroundColor3 = Theme.AccentColor})
end
end)
copyButton.MouseEnter:Connect(function()
if copyLabel.Text == "Copy" then
CreateTween(copyButton, {BackgroundTransparency = 0})
end
end)
copyButton.MouseLeave:Connect(function()
if copyLabel.Text == "Copy" then
CreateTween(copyButton, {BackgroundTransparency = 0.2})
end
end)
table.insert(self.Elements, {Instance = codeContainer, Type = "Code"})
return {
Container = codeContainer,
SetCode = function(newCode)
code = newCode
codeLabel.Text = newCode
end,
OnCopy = function(callback)
onCopyCallback = callback
end
}
end
function TabMethods:AddImage(config)
if self.Window.IsDestroyed then
warn("GAeroUI: Cannot add image to destroyed window")
return nil
end
config = config or {}
local image = config.Image or ""
local aspectRatio = config.AspectRatio or "16:9"
local radius = config.Radius or 12
local ratioWidth, ratioHeight = aspectRatio:match("(%d+):(%d+)")
ratioWidth = tonumber(ratioWidth) or 16
ratioHeight = tonumber(ratioHeight) or 9
local heightScale = ratioHeight / ratioWidth
local imageContainer = Instance.new("Frame")
imageContainer.Name = "ImageContainer"
imageContainer.Size = UDim2.new(1, 0, 0, 0)
imageContainer.BackgroundTransparency = 1
imageContainer.Visible = (self.Window.CurrentTab == self)
imageContainer.Parent = self.Window.ContentScroll
local imageFrame = Instance.new("Frame")
imageFrame.Name = "ImageFrame"
imageFrame.Size = UDim2.new(1, 0, 0, 0)
imageFrame.BackgroundColor3 = Theme.ToggleOff
imageFrame.BorderSizePixel = 0
imageFrame.Parent = imageContainer
local imageCorner = Instance.new("UICorner")
imageCorner.CornerRadius = UDim.new(0, radius)
imageCorner.Parent = imageFrame
local imageLabel = Instance.new("ImageLabel")
imageLabel.Name = "Image"
imageLabel.Size = UDim2.new(1, 0, 1, 0)
imageLabel.BackgroundTransparency = 1
imageLabel.Image = image
imageLabel.ScaleType = Enum.ScaleType.Crop
imageLabel.Parent = imageFrame
local imageLabelCorner = Instance.new("UICorner")
imageLabelCorner.CornerRadius = UDim.new(0, radius)
imageLabelCorner.Parent = imageLabel
task.wait()
local containerWidth = imageContainer.AbsoluteSize.X
local calculatedHeight = containerWidth * heightScale
imageContainer.Size = UDim2.new(1, 0, 0, calculatedHeight)
imageFrame.Size = UDim2.new(1, 0, 1, 0)
table.insert(self.Elements, {Instance = imageContainer, Type = "Image"})
return {
Container = imageContainer,
SetImage = function(newImage)
imageLabel.Image = newImage
end
}
end
function TabMethods:AddParagraph(config)
if self.Window.IsDestroyed then
warn("GAeroUI: Cannot add paragraph to destroyed window")
return nil
end
config = config or {}
local title = config.Title or "Paragraph"
local desc = config.Desc or ""
local image = config.Image
local imageSize = config.ImageSize or 22
local iconThemed = config.IconThemed or false
local thumbnail = config.Thumbnail
local thumbnailSize = config.ThumbnailSize or 80
local buttons = config.Buttons or {}
local paragraphContainer = Instance.new("Frame")
paragraphContainer.Name = "ParagraphContainer_" .. title
paragraphContainer.Size = UDim2.new(1, 0, 0, 0)
paragraphContainer.BackgroundTransparency = 1
paragraphContainer.Visible = (self.Window.CurrentTab == self)
paragraphContainer.AutomaticSize = Enum.AutomaticSize.Y
paragraphContainer.Parent = self.Window.ContentScroll
local paragraphFrame = Instance.new("Frame")
paragraphFrame.Name = "ParagraphFrame"
paragraphFrame.Size = UDim2.new(1, 0, 0, 0)
paragraphFrame.BackgroundColor3 = Theme.SidebarBackground
paragraphFrame.BackgroundTransparency = 0.3
paragraphFrame.BorderSizePixel = 0
paragraphFrame.AutomaticSize = Enum.AutomaticSize.Y
paragraphFrame.Parent = paragraphContainer
local paragraphCorner = Instance.new("UICorner")
paragraphCorner.CornerRadius = UDim.new(0, 10)
paragraphCorner.Parent = paragraphFrame
local contentArea = Instance.new("Frame")
contentArea.Name = "ContentArea"
contentArea.Size = UDim2.new(1, -24, 0, 0)
contentArea.Position = UDim2.new(0, 12, 0, 12)
contentArea.BackgroundTransparency = 1
contentArea.AutomaticSize = Enum.AutomaticSize.Y
contentArea.Parent = paragraphFrame
local contentLayout = Instance.new("UIListLayout")
contentLayout.SortOrder = Enum.SortOrder.LayoutOrder
contentLayout.Padding = UDim.new(0, 10)
contentLayout.Parent = contentArea
if thumbnail then
local thumbnailFrame = Instance.new("Frame")
thumbnailFrame.Name = "Thumbnail"
thumbnailFrame.Size = UDim2.new(1, 0, 0, thumbnailSize)
thumbnailFrame.BackgroundTransparency = 1
thumbnailFrame.LayoutOrder = 1
thumbnailFrame.Parent = contentArea
local thumbnailImage = Instance.new("ImageLabel")
thumbnailImage.Size = UDim2.new(1, 0, 1, 0)
thumbnailImage.BackgroundColor3 = Theme.ToggleOff
thumbnailImage.BorderSizePixel = 0
thumbnailImage.Image = thumbnail
thumbnailImage.ScaleType = Enum.ScaleType.Crop
thumbnailImage.Parent = thumbnailFrame
local thumbnailCorner = Instance.new("UICorner")
thumbnailCorner.CornerRadius = UDim.new(0, 8)
thumbnailCorner.Parent = thumbnailImage
end
local headerFrame = Instance.new("Frame")
headerFrame.Name = "Header"
headerFrame.Size = UDim2.new(1, 0, 0, 24)
headerFrame.BackgroundTransparency = 1
headerFrame.LayoutOrder = 2
headerFrame.Parent = contentArea
if image then
local iconContainer = Instance.new("Frame")
iconContainer.Name = "IconContainer"
iconContainer.Size = UDim2.new(0, imageSize, 0, imageSize)
iconContainer.Position = UDim2.new(0, 0, 0, 0)
iconContainer.BackgroundTransparency = 1
iconContainer.Parent = headerFrame
if image:match("^lucide%-") then
local iconName = image:gsub("^lucide%-", "")
LoadLucideIcon(iconName, iconContainer, iconThemed and Theme.AccentColor or Theme.TextColor)
elseif image:match("^rbxassetid://") or image:match("^http") then
local iconImage = Instance.new("ImageLabel")
iconImage.Size = UDim2.new(1, 0, 1, 0)
iconImage.BackgroundTransparency = 1
iconImage.Image = image
iconImage.ImageColor3 = iconThemed and Theme.AccentColor or Theme.TextColor
iconImage.Parent = iconContainer
else
LoadLucideIcon(image, iconContainer, iconThemed and Theme.AccentColor or Theme.TextColor)
end
end
local titleLabel = Instance.new("TextLabel")
titleLabel.Name = "Title"
titleLabel.Size = UDim2.new(1, image and -(imageSize + 8) or 0, 1, 0)
titleLabel.Position = UDim2.new(0, image and (imageSize + 8) or 0, 0, 0)
titleLabel.BackgroundTransparency = 1
titleLabel.Text = title
titleLabel.TextColor3 = Theme.TextColor
titleLabel.TextSize = 16
titleLabel.Font = Enum.Font.GothamBold
titleLabel.TextXAlignment = Enum.TextXAlignment.Left
titleLabel.TextTruncate = Enum.TextTruncate.AtEnd
titleLabel.Parent = headerFrame
if desc and desc ~= "" then
local descLabel = Instance.new("TextLabel")
descLabel.Name = "Description"
descLabel.Size = UDim2.new(1, 0, 0, 0)
descLabel.BackgroundTransparency = 1
descLabel.Text = desc
descLabel.TextColor3 = Theme.TextSecondary
descLabel.TextSize = 13
descLabel.Font = Enum.Font.Gotham
descLabel.TextXAlignment = Enum.TextXAlignment.Left
descLabel.TextYAlignment = Enum.TextYAlignment.Top
descLabel.TextWrapped = true
descLabel.AutomaticSize = Enum.AutomaticSize.Y
descLabel.LayoutOrder = 3
descLabel.Parent = contentArea
end
if #buttons > 0 then
local buttonsFrame = Instance.new("Frame")
buttonsFrame.Name = "Buttons"
buttonsFrame.Size = UDim2.new(1, 0, 0, 0)
buttonsFrame.BackgroundTransparency = 1
buttonsFrame.AutomaticSize = Enum.AutomaticSize.Y
buttonsFrame.LayoutOrder = 4
buttonsFrame.Parent = contentArea
local buttonsLayout = Instance.new("UIListLayout")
buttonsLayout.SortOrder = Enum.SortOrder.LayoutOrder
buttonsLayout.Padding = UDim.new(0, 6)
buttonsLayout.Parent = buttonsFrame
for i, buttonConfig in ipairs(buttons) do
local btnTitle = buttonConfig.Title or "Button"
local btnIcon = buttonConfig.Icon
local btnCallback = buttonConfig.Callback
local button = Instance.new("TextButton")
button.Name = "ParagraphButton_" .. i
button.Size = UDim2.new(1, 0, 0, 36)
button.BackgroundColor3 = Theme.AccentColor
button.BackgroundTransparency = 0.1
button.BorderSizePixel = 0
button.Text = ""
button.AutoButtonColor = false
button.LayoutOrder = i
button.Parent = buttonsFrame
local btnCorner = Instance.new("UICorner")
btnCorner.CornerRadius = UDim.new(0, 8)
btnCorner.Parent = button
if btnIcon then
local btnIconContainer = Instance.new("Frame")
btnIconContainer.Name = "IconContainer"
btnIconContainer.Size = UDim2.new(0, 18, 0, 18)
btnIconContainer.Position = UDim2.new(0, 10, 0.5, -9)
btnIconContainer.BackgroundTransparency = 1
btnIconContainer.Parent = button
LoadLucideIcon(btnIcon, btnIconContainer, Theme.TextColor)
end
local btnLabel = Instance.new("TextLabel")
btnLabel.Size = UDim2.new(1, btnIcon and -40 or -20, 1, 0)
btnLabel.Position = UDim2.new(0, btnIcon and 36 or 10, 0, 0)
btnLabel.BackgroundTransparency = 1
btnLabel.Text = btnTitle
btnLabel.TextColor3 = Theme.TextColor
btnLabel.TextSize = 13
btnLabel.Font = Enum.Font.GothamSemibold
btnLabel.TextXAlignment = Enum.TextXAlignment.Left
btnLabel.Parent = button
button.MouseButton1Click:Connect(function()
if btnCallback then
local success, err = pcall(btnCallback)
if not success then
warn("GAeroUI Paragraph Button Error:", err)
end
end
end)
button.MouseEnter:Connect(function()
CreateTween(button, {BackgroundTransparency = 0, BackgroundColor3 = Theme.AccentHover})
end)
button.MouseLeave:Connect(function()
CreateTween(button, {BackgroundTransparency = 0.1, BackgroundColor3 = Theme.AccentColor})
end)
end
end
local bottomPadding = Instance.new("Frame")
bottomPadding.Size = UDim2.new(1, 0, 0, 12)
bottomPadding.BackgroundTransparency = 1
bottomPadding.LayoutOrder = 999
bottomPadding.Parent = contentArea
table.insert(self.Elements, {Instance = paragraphContainer, Type = "Paragraph"})
return {
Container = paragraphContainer,
SetTitle = function(newTitle)
titleLabel.Text = newTitle
end,
SetDesc = function(newDesc)
if desc and desc ~= "" then
local descLabel = contentArea:FindFirstChild("Description")
if descLabel then
descLabel.Text = newDesc
end
end
end,
SetImage = function(newImage, size)
if image then
local iconContainer = headerFrame:FindFirstChild("IconContainer")
if iconContainer then
iconContainer:ClearAllChildren()
if newImage:match("^lucide%-") then
local iconName = newImage:gsub("^lucide%-", "")
LoadLucideIcon(iconName, iconContainer, iconThemed and Theme.AccentColor or Theme.TextColor)
else
local iconImage = Instance.new("ImageLabel")
iconImage.Size = UDim2.new(1, 0, 1, 0)
iconImage.BackgroundTransparency = 1
iconImage.Image = newImage
iconImage.ImageColor3 = iconThemed and Theme.AccentColor or Theme.TextColor
iconImage.Parent = iconContainer
end
if size then
iconContainer.Size = UDim2.new(0, size, 0, size)
end
end
end
end,
SetThumbnail = function(newThumbnail, size)
local thumbnailFrame = contentArea:FindFirstChild("Thumbnail")
if thumbnailFrame then
local thumbnailImage = thumbnailFrame:FindFirstChildOfClass("ImageLabel")
if thumbnailImage then
Loads code from the internet. It downloads more code when it runs (loadstring + HttpGet), which can change after it was posted. From: raw.gatinero.xyz, raw.githubusercontent.com.
Library Gatinero Open Source

Universal