local function mys_custom_ui(config, tabIconsOrdered)
local _uis = game:GetService("UserInputService")
local _cg = game:GetService("CoreGui")
local _run = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
local Lighting = game:GetService("Lighting")
local Players = game:GetService("Players")
local config = _G.config
local _visible = config.startVisible
local oldBlur = Lighting:FindFirstChild("mys_customUIBlur")
if oldBlur then
oldBlur:Destroy()
end
local _blurEffect = Instance.new("BlurEffect")
_blurEffect.Name = "mys_customUIBlur"
_blurEffect.Size = _visible and 24 or 0
_blurEffect.Parent = Lighting
for _, existingUI in ipairs(_cg:GetChildren()) do
if existingUI:IsA("ScreenGui") and existingUI.Name == "mys_custom_ui" then
existingUI:Destroy()
end
end
local _coregui = Instance.new("ScreenGui")
_coregui.Name = "mys_custom_ui"
_coregui.DisplayOrder = 9999
_coregui.ResetOnSpawn = false
_coregui.IgnoreGuiInset = true
_coregui.Parent = _cg
local _blurFrame = Instance.new("Frame")
_blurFrame.Size = UDim2.new(1, 0, 1, 0)
_blurFrame.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
_blurFrame.BackgroundTransparency = 1
_blurFrame.BorderSizePixel = 0
_blurFrame.ZIndex = 0
_blurFrame.Visible = _visible
_blurFrame.Parent = _coregui
local _stars = {}
local _holder = Instance.new("Frame")
_holder.Size = UDim2.new(1, 0, 1, 0)
_holder.BackgroundTransparency = 1
_holder.ClipsDescendants = true
_holder.ZIndex = 0
_holder.Parent = _blurFrame
for i = 1, config.MAX_STARS do
local star = Instance.new("Frame")
star.Size = UDim2.new(0, 3, 0, 3)
local x, y = math.random(), math.random()
local direction = Vector2.new(1, 1).Unit * config.STAR_MOVE_SPEED
star.Position = UDim2.new(x, 0, y, 0)
star.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
star.BackgroundTransparency = 0
star.BorderSizePixel = 0
star.ZIndex = 1
star.Visible = true
star.Parent = _holder
table.insert(
_stars,
{
frame = star,
pos = Vector2.new(x, y),
direction = direction,
sparkleOffset = math.random() * math.pi * 2
}
)
end
_run.RenderStepped:Connect(
function(deltaTime)
for _, star in ipairs(_stars) do
if star.frame.Visible then
star.pos = star.pos + star.direction * deltaTime
if star.pos.X < 0 or star.pos.X > 1 or star.pos.Y < 0 or star.pos.Y > 1 then
star.pos = Vector2.new(math.random(), math.random())
star.direction = Vector2.new(1, 1).Unit * config.STAR_MOVE_SPEED
star.sparkleOffset = math.random() * math.pi * 2
end
local sparkle = math.abs(math.sin(tick() * config.STAR_SPARKLE_SPEED + star.sparkleOffset))
star.frame.BackgroundTransparency = 0.1 + sparkle * 0.7
star.frame.Position = UDim2.new(star.pos.X, 0, star.pos.Y, 0)
end
end
end
)
local _uiContainer = Instance.new("Folder")
_uiContainer.Name = "UIContainer"
_uiContainer.Parent = _coregui
local _gui = Instance.new("ScreenGui")
_gui.Name = "mys_custom_ui"
_gui.Parent = _uiContainer
_gui.ResetOnSpawn = false
_gui.DisplayOrder = 9999
local _mf = Instance.new("Frame")
_mf.Size = config.mainframesize
_mf.Position = config.mainframepos
_mf.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
_mf.BorderSizePixel = 0
_mf.Visible = _visible
_mf.BackgroundTransparency = 1
_mf.Parent = _gui
local _crnr = Instance.new("UICorner")
_crnr.CornerRadius = UDim.new(0, 6)
_crnr.Parent = _mf
local _top = Instance.new("Frame")
_top.Size = UDim2.new(1, 0, 0, 30)
_top.BackgroundTransparency = 1
_top.BorderSizePixel = 0
_top.Parent = _mf
local _tbcrnr = Instance.new("UICorner")
_tbcrnr.CornerRadius = UDim.new(0, 12)
_tbcrnr.Parent = _top
local _title = Instance.new("TextLabel")
_title.Size = UDim2.new(0, 0, 1, 0)
_title.Position = UDim2.new(0, 10, 0, 0)
_title.BackgroundTransparency = 1
_title.RichText = true
_title.TextTransparency = 1
_title.Font = Enum.Font.GothamBold
_title.TextSize = 18
_title.TextXAlignment = Enum.TextXAlignment.Left
_title.Parent = _top
local function colorToRGB(color)
return math.floor(color.R * 255),
math.floor(color.G * 255),
math.floor(color.B * 255)
end
local r1, g1, b1 = colorToRGB(config.accentcolor)
local r2, g2, b2 = colorToRGB(config.accentcolorSecondary)
_title.Text = string.format(
'<font color="rgb(%d,%d,%d)">%s</font><font color="rgb(%d,%d,%d)">%s</font>',
r1, g1, b1,
config.title or "unknown",
r2, g2, b2,
config.titleExtension or ".client [CANNOT FIND TITLE]"
)
local _version = Instance.new("TextLabel")
_version.Size = UDim2.new(0, 0, 1, 0)
_version.Position = config.pos
_version.BackgroundTransparency = 1
_version.Text = config.version
_version.TextColor3 = config.accentcolor
_version.TextTransparency = 1
_version.Font = Enum.Font.GothamBold
_version.TextSize = 14
_version.TextXAlignment = Enum.TextXAlignment.Left
_version.Parent = _top
local connection
connection = _run.Heartbeat:Connect(function()
_version.Position = UDim2.new(0, 550, 0.15, 0)
connection:Disconnect()
end)
local _divider = Instance.new("Frame")
_divider.Size = UDim2.new(0.85, 0, 0, 1)
_divider.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
_divider.BackgroundTransparency = 1
_divider.BorderSizePixel = 0
_divider.Parent = _mf
task.defer(
function()
local _pw = _mf.AbsoluteSize.X
local _dw = _divider.AbsoluteSize.X
_cx = (_pw - _dw) / 2
_divider.Position = UDim2.new(0, _cx, 0, 35)
end
)
local _scrlfrm = Instance.new("ScrollingFrame")
_scrlfrm.Name = "Content"
_scrlfrm.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
_scrlfrm.BorderSizePixel = 0
_scrlfrm.BackgroundTransparency = 1
_scrlfrm.CanvasSize = UDim2.new(0, 0, 0, 0)
_scrlfrm.ScrollBarThickness = 6
_scrlfrm.ScrollBarImageColor3 = Color3.fromRGB(100, 100, 100)
_scrlfrm.Parent = _mf
_scrlfrm.AutomaticCanvasSize = Enum.AutomaticSize.Y
_scrlfrm.ClipsDescendants = true
local _scrlcrnr = Instance.new("UICorner")
_scrlcrnr.CornerRadius = UDim.new(0, 8)
_scrlcrnr.Parent = _scrlfrm
task.defer(
function()
local _dy = _divider.Position.Y.Offset + _divider.Size.Y.Offset
local _ah = _mf.AbsoluteSize.Y - _dy - 10
_scrlfrm.Position = UDim2.new(0, 10, 0, _dy + 10)
_scrlfrm.Size = UDim2.new(1, -20, 0, _ah)
end
)
local _topBar = Instance.new("Frame")
_topBar.Size = UDim2.new(0, 235, 0, 40)
_topBar.Position = UDim2.new(0.5, -150, 0, 20)
_topBar.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
_topBar.BorderSizePixel = 0
_topBar.Visible = _visible
_topBar.BackgroundTransparency = 1
_topBar.Parent = _uiContainer
local _strokeBar = Instance.new("UIStroke")
_strokeBar.Color = Color3.fromRGB(100, 100, 100)
_strokeBar.Thickness = 0.6
_strokeBar.Transparency = 1
_strokeBar.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
_strokeBar.Parent = _topBar
local _topBarCorner = Instance.new("UICorner")
_topBarCorner.CornerRadius = UDim.new(0, 4)
_topBarCorner.Parent = _topBar
local r1, g1, b1 = colorToRGB(config.accentcolor)
local r2, g2, b2 = colorToRGB(config.accentcolorSecondary)
local _watermarktextcfg = string.format(
'<font color="rgb(%d,%d,%d)">%s</font><font color="rgb(%d,%d,%d)">%s</font>',
r1, g1, b1, config.watermark or "unknown",
r2, g2, b2, config.watermarkExtension or ".client"
)
local _watermark = Instance.new("Frame")
_watermark.Size = UDim2.new(0, 93, 0, 40)
_watermark.Position = UDim2.new(0, 1780, 0, 25)
_watermark.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
_watermark.BorderSizePixel = 0
_watermark.BackgroundTransparency = 0
_watermark.Parent = _uiContainer
local _watermarkStroke = Instance.new("UIStroke")
_watermarkStroke.Color = Color3.fromRGB(100, 100, 100)
_watermarkStroke.Thickness = 0.6
_watermarkStroke.Transparency = 1
_watermarkStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
_watermarkStroke.Parent = _watermark
local _watermarkCorner = Instance.new("UICorner")
_watermarkCorner.CornerRadius = UDim.new(0, 4)
_watermarkCorner.Parent = _watermark
local _watermarklabel = Instance.new("TextLabel")
_watermarklabel.Size = UDim2.new(0, 0, 1, 0)
_watermarklabel.Text = _watermarktextcfg
_watermarklabel.Position = UDim2.new(0, 10, 0, 0)
_watermarklabel.BackgroundTransparency = 1
_watermarklabel.TextColor3 = Color3.new(1, 1, 1)
_watermarklabel.TextTransparency = 0
_watermarklabel.Font = Enum.Font.GothamBold
_watermarklabel.TextSize = 16
_watermarklabel.TextXAlignment = Enum.TextXAlignment.Left
_watermarklabel.RichText = true
_watermarklabel.Parent = _watermark
local _watermarkDragging = false
local _watermarkDragStart
local _watermarkStartPos
local _watermarkDragInput
local _watermarkTargetPos = _watermark.Position
local _watermarkLerpSpeed = 0.05
_watermark.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
_watermarkDragging = true
_watermarkDragStart = input.Position
_watermarkStartPos = _watermark.Position
end
end)
_watermark.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement then
_watermarkDragInput = input
end
end)
_watermark.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
_watermarkDragging = false
end
end)
_run.RenderStepped:Connect(function()
if _watermarkDragging and _watermarkDragInput then
local delta = _watermarkDragInput.Position - _watermarkDragStart
_watermarkTargetPos = _watermarkStartPos + UDim2.new(0, delta.X, 0, delta.Y)
end
_watermark.Position = _watermark.Position:Lerp(_watermarkTargetPos, _watermarkLerpSpeed)
end)
local exec = "Unknown"
if identifyexecutor then
local name, version = identifyexecutor()
exec = version and (name .. " " .. version) or name
elseif getexecutorname then
exec = getexecutorname()
end
local _executorbox = Instance.new("Frame")
_executorbox.Size = UDim2.new(0, 125, 0, 40)
_executorbox.Position = UDim2.new(0, 250, 0, 20)
_executorbox.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
_executorbox.BorderSizePixel = 0
_executorbox.Visible = _visible
_executorbox.BackgroundTransparency = 1
_executorbox.Parent = _uiContainer
local _executorboxStroke = Instance.new("UIStroke")
_executorboxStroke.Color = Color3.fromRGB(100, 100, 100)
_executorboxStroke.Thickness = 0.6
_executorboxStroke.Transparency = 1
_executorboxStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
_executorboxStroke.Parent = _executorbox
local _executorboxCorner = Instance.new("UICorner")
_executorboxCorner.CornerRadius = UDim.new(0, 4)
_executorboxCorner.Parent = _executorbox
local _executorboxlabel = Instance.new("TextLabel")
_executorboxlabel.Size = UDim2.new(0, 0, 1, 0)
_executorboxlabel.Text = exec
_executorboxlabel.Position = UDim2.new(0, 10, 0, 0)
_executorboxlabel.BackgroundTransparency = 1
_executorboxlabel.TextColor3 = config.accentcolor
_executorboxlabel.BorderSizePixel = 0
_executorboxlabel.TextTransparency = 0
_executorboxlabel.Font = Enum.Font.GothamBold
_executorboxlabel.TextSize = 16
_executorboxlabel.TextXAlignment = Enum.TextXAlignment.Left
_executorboxlabel.Parent = _executorbox
local _executorboxDragging = false
local _executorboxDragStart
local _executorboxStartPos
local _executorboxDragInput
local _executorboxTargetPos = _executorbox.Position
local _executorboxLerpSpeed = 0.05
_executorbox.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
_executorboxDragging = true
_executorboxDragStart = input.Position
_executorboxStartPos = _executorbox.Position
end
end)
_executorbox.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement then
_executorboxDragInput = input
end
end)
_executorbox.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
_executorboxDragging = false
end
end)
_run.RenderStepped:Connect(function()
if _executorboxDragging and _executorboxDragInput then
local delta = _executorboxDragInput.Position - _executorboxDragStart
_executorboxTargetPos = _executorboxStartPos + UDim2.new(0, delta.X, 0, delta.Y)
end
_executorbox.Position = _executorbox.Position:Lerp(_executorboxTargetPos, _executorboxLerpSpeed)
end)
local _fpsbox = Instance.new("Frame")
_fpsbox.Size = UDim2.new(0, 45, 0, 40)
_fpsbox.Position = UDim2.new(0, 70, 0, 20)
_fpsbox.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
_fpsbox.BorderSizePixel = 0
_fpsbox.Visible = _visible
_fpsbox.BackgroundTransparency = 1
_fpsbox.Parent = _uiContainer
local _fpsboxStroke = Instance.new("UIStroke")
_fpsboxStroke.Color = Color3.fromRGB(100, 100, 100)
_fpsboxStroke.Thickness = 0.6
_fpsboxStroke.Transparency = 1
_fpsboxStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
_fpsboxStroke.Parent = _fpsbox
local _fpsboxCorner = Instance.new("UICorner")
_fpsboxCorner.CornerRadius = UDim.new(0, 4)
_fpsboxCorner.Parent = _fpsbox
local _fpslabel = Instance.new("TextLabel")
_fpslabel.Size = UDim2.new(0, 0, 1, 0)
_fpslabel.Position = UDim2.new(0, 10, 0, 0)
_fpslabel.BackgroundTransparency = 1
_fpslabel.TextColor3 = config.accentcolor
_fpslabel.BorderSizePixel = 0
_fpslabel.TextTransparency = 0
_fpslabel.Font = Enum.Font.GothamBold
_fpslabel.TextSize = 16
_fpslabel.TextXAlignment = Enum.TextXAlignment.Left
_fpslabel.Parent = _fpsbox
local updateInterval = 0.1
local accumulatedTime = 0
local _fpsDragging = false
local _fpsDragStart
local _fpsStartPos
local _fpsDragInput
local _fpsTargetPos = _fpsbox.Position
local lerpSpeed = 0.05
_run.RenderStepped:Connect(function(deltaTime)
accumulatedTime = accumulatedTime + deltaTime
if accumulatedTime >= updateInterval then
local fps = 1 / deltaTime
_fpslabel.Text = tostring(math.floor(fps))
accumulatedTime = 0
end
end)
_fpsbox.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
_fpsDragging = true
_fpsDragStart = input.Position
_fpsStartPos = _fpsbox.Position
end
end)
_fpsbox.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement then
_fpsDragInput = input
end
end)
_fpsbox.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
_fpsDragging = false
end
end)
_run.RenderStepped:Connect(function()
if _fpsDragging and _fpsDragInput then
local delta = _fpsDragInput.Position - _fpsDragStart
_fpsTargetPos = _fpsStartPos + UDim2.new(0, delta.X, 0, delta.Y)
end
_fpsbox.Position = _fpsbox.Position:Lerp(_fpsTargetPos, lerpSpeed)
end)
local _leftBar = Instance.new("Frame")
_leftBar.Size = UDim2.new(0, 235, 0, 40)
_leftBar.Position = UDim2.new(0, 20, 0, 20)
_leftBar.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
_leftBar.BorderSizePixel = 0
_leftBar.Visible = _visible
_leftBar.BackgroundTransparency = 1
_leftBar.Parent = _uiContainer
local _leftBarStroke = Instance.new("UIStroke")
_leftBarStroke.Color = Color3.fromRGB(100, 100, 100)
_leftBarStroke.Thickness = 0.6
_leftBarStroke.Transparency = 1
_leftBarStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
_leftBarStroke.Parent = _leftBar
local _leftBarCorner = Instance.new("UICorner")
_leftBarCorner.CornerRadius = UDim.new(0, 4)
_leftBarCorner.Parent = _leftBar
local _usernameLabel = Instance.new("TextLabel")
_usernameLabel.Size = UDim2.new(0, 0, 1, 0)
_usernameLabel.Position = UDim2.new(0, 10, 0, 0)
_usernameLabel.BackgroundTransparency = 1
_usernameLabel.Text = Players.LocalPlayer.DisplayName
_usernameLabel.TextColor3 = config.accentcolor
_usernameLabel.BorderSizePixel = 0
_usernameLabel.TextTransparency = 1
_usernameLabel.Font = Enum.Font.GothamBold
_usernameLabel.TextSize = 16
_usernameLabel.TextXAlignment = Enum.TextXAlignment.Left
_usernameLabel.Parent = _leftBar
local leftX = _leftBar.Position.X.Offset
local leftWidth = _leftBar.Size.X.Offset
local fpsX = leftX + leftWidth + 10
_fpsbox.Position = UDim2.new(0, fpsX, 0, 20)
_executorboxTargetPos = UDim2.new(0, fpsX + _fpsbox.Size.X.Offset + 10, 0, 20)
local _timebox = Instance.new("Frame")
_timebox.Size = UDim2.new(0, 65, 0, 40)
_timebox.Position = UDim2.new(0, 20, 0, 65)
_timebox.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
_timebox.BorderSizePixel = 0
_timebox.Visible = _visible
_timebox.BackgroundTransparency = 1
_timebox.Parent = _uiContainer
local _timeboxStroke = Instance.new("UIStroke")
_timeboxStroke.Color = Color3.fromRGB(100, 100, 100)
_timeboxStroke.Thickness = 0.6
_timeboxStroke.Transparency = 1
_timeboxStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
_timeboxStroke.Parent = _timebox
local _timeboxCorner = Instance.new("UICorner")
_timeboxCorner.CornerRadius = UDim.new(0, 4)
_timeboxCorner.Parent = _timebox
local _timeboxlabel = Instance.new("TextLabel")
_timeboxlabel.Size = UDim2.new(1, -20, 1, 0)
_timeboxlabel.Position = UDim2.new(0, 10, 0, 0)
_timeboxlabel.BackgroundTransparency = 1
_timeboxlabel.TextColor3 = config.accentcolor
_timeboxlabel.TextTransparency = 0
_timeboxlabel.Font = Enum.Font.GothamBold
_timeboxlabel.TextSize = 16
_timeboxlabel.TextXAlignment = Enum.TextXAlignment.Left
_timeboxlabel.Parent = _timebox
local function updateTime()
local currentTime = os.date("*t")
local hour = currentTime.hour
local minute = currentTime.min
local ampm = hour >= 12 and "PM" or "AM"
if hour == 0 then
hour = 12
elseif hour > 12 then
hour = hour - 12
end
_timeboxlabel.BackgroundTransparency = 1
_timeboxlabel.Text = string.format("%d:%02d %s", hour, minute, ampm)
end
updateTime()
task.spawn(function()
while true do
updateTime()
task.wait()
end
end)
local _timeboxDragging = false
local _timeboxDragStart
local _timeboxStartPos
local _timeboxDragInput
local _timeboxTargetPos = _timebox.Position
local _timeboxLerpSpeed = 0.05
_timebox.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
_timeboxDragging = true
_timeboxDragStart = input.Position
_timeboxStartPos = _timebox.Position
end
end)
_timebox.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement then
_timeboxDragInput = input
end
end)
_timebox.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
_timeboxDragging = false
end
end)
_run.RenderStepped:Connect(function()
if _timeboxDragging and _timeboxDragInput then
local delta = _timeboxDragInput.Position - _timeboxDragStart
_timeboxTargetPos = _timeboxStartPos + UDim2.new(0, delta.X, 0, delta.Y)
end
_timebox.Position = _timebox.Position:Lerp(_timeboxTargetPos, _timeboxLerpSpeed)
end)
local _iconList = Instance.new("UIListLayout")
_iconList.FillDirection = Enum.FillDirection.Horizontal
_iconList.HorizontalAlignment = Enum.HorizontalAlignment.Center
_iconList.VerticalAlignment = Enum.VerticalAlignment.Center
_iconList.Padding = UDim.new(0, 6)
_iconList.Parent = _topBar
local function loadIcons(url)
local success, result = pcall(function()
return game:HttpGet(url, true)
end)
if not success then
return {}
elseif not result then
return {}
end
local chunk, err = loadstring(result)
if not chunk then
return {}
end
local ok, data = pcall(chunk)
if not ok then
return {}
elseif not data then
return {}
end
return data
end
local function getIcon(name)
if not Icons or not Icons["48px"] then
return nil
end
name = string.match(string.lower(name), "^%s*(.-)%s*$") or ""
local r = Icons["48px"][name]
if not r then
return nil
end
local id, sizeTbl, offsetTbl = r[1], r[2], r[3]
if type(id) ~= "number" or type(sizeTbl) ~= "table" or type(offsetTbl) ~= "table" then
return nil
end
return {
id = id,
imageRectSize = Vector2.new(sizeTbl[1], sizeTbl[2]),
imageRectOffset = Vector2.new(offsetTbl[1], offsetTbl[2])
}
end
local function getAssetUri(id)
if type(id) ~= "number" then
return "rbxassetid://0"
end
return "rbxassetid://" .. id
end
local originalColor = config.accentcolor
local hoverColor = Color3.new(
math.clamp(originalColor.R + 0.2, 0, 1),
math.clamp(originalColor.G + 0.2, 0, 1),
math.clamp(originalColor.B + 0.2, 0, 1)
)
local iconButtons = {}
local tabFrames = {}
local currentTab = nil
local centerPos = UDim2.new(0.5, 0, 0.5, 0)
local function createIconButton(iconName, tabName)
local icon = getIcon(iconName)
if not icon then
return nil
end
local btn = Instance.new("ImageButton")
btn.Size = UDim2.new(0, 30, 0, 30)
btn.BackgroundTransparency = 1
btn.AutoButtonColor = false
btn.AnchorPoint = Vector2.new(0.5, 0.5)
local iconImg = Instance.new("ImageLabel")
iconImg.Size = UDim2.new(0, 20, 0, 20)
iconImg.Position = UDim2.new(0.5, -10, 0.5, -10)
iconImg.BackgroundTransparency = 1
iconImg.Image = getAssetUri(icon.id)
iconImg.ImageRectSize = icon.imageRectSize
iconImg.ImageRectOffset = icon.imageRectOffset
iconImg.ImageColor3 = originalColor
iconImg.ImageTransparency = 1
iconImg.Parent = btn
local _bCrnr = Instance.new("UICorner")
_bCrnr.CornerRadius = UDim.new(0, 4)
_bCrnr.Parent = btn
local _stroke = Instance.new("UIStroke")
_stroke.Color = Color3.fromRGB(40, 40, 40)
_stroke.Thickness = 1
_stroke.Transparency = 1
_stroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
_stroke.Parent = btn
local sound = Instance.new("Sound")
sound.SoundId = config.buttonSoundId
sound.Volume = 0.5
sound.Parent = btn
btn.MouseEnter:Connect(function()
iconImg.ImageColor3 = hoverColor
end)
btn.MouseLeave:Connect(function()
if currentTab ~= btn then
iconImg.ImageColor3 = originalColor
end
end)
btn.Parent = _topBar
btn.Position = centerPos
local tabFrame = Instance.new("Frame")
tabFrame.Name = tabName
tabFrame.Size = UDim2.new(1, -20, 0, 0)
tabFrame.AutomaticSize = Enum.AutomaticSize.Y
tabFrame.BackgroundTransparency = 1
tabFrame.Visible = false
tabFrame.Parent = _scrlfrm
local columns = Instance.new("Frame")
columns.Name = "Columns"
columns.Size = UDim2.new(1, 0, 1, 0)
columns.BackgroundTransparency = 1
columns.Parent = tabFrame
local leftColumn = Instance.new("Frame")
leftColumn.Name = "Left"
leftColumn.Size = UDim2.new(0.48, 0, 1, 0)
leftColumn.Position = UDim2.new(0, 0, 0, 0)
leftColumn.BackgroundTransparency = 1
leftColumn.Parent = columns
local leftList = Instance.new("UIListLayout")
leftList.SortOrder = Enum.SortOrder.LayoutOrder
leftList.Padding = UDim.new(0, 8)
leftList.Parent = leftColumn
local leftPad = Instance.new("UIPadding")
leftPad.PaddingTop = UDim.new(0, 10)
leftPad.PaddingBottom = UDim.new(0, 10)
leftPad.PaddingLeft = UDim.new(0, 10)
leftPad.PaddingRight = UDim.new(0, 10)
leftPad.Parent = leftColumn
local rightColumn = Instance.new("Frame")
rightColumn.Name = "Right"
rightColumn.Size = UDim2.new(0.48, 0, 1, 0)
rightColumn.Position = UDim2.new(0.52, 0, 0, 0)
rightColumn.BackgroundTransparency = 1
rightColumn.Parent = columns
local rightList = Instance.new("UIListLayout")
rightList.SortOrder = Enum.SortOrder.LayoutOrder
rightList.Padding = UDim.new(0, 8)
rightList.Parent = rightColumn
local rightPad = Instance.new("UIPadding")
rightPad.PaddingTop = UDim.new(0, 10)
rightPad.PaddingBottom = UDim.new(0, 10)
rightPad.PaddingLeft = UDim.new(0, 10)
rightPad.PaddingRight = UDim.new(0, 10)
rightPad.Parent = rightColumn
table.insert(iconButtons, btn)
table.insert(tabFrames, tabFrame)
btn.Activated:Connect(function()
if currentTab ~= btn then
sound:Play()
if currentTab then
local prevIconImg = currentTab:FindFirstChildOfClass("ImageLabel")
if prevIconImg then
prevIconImg.ImageColor3 = originalColor
end
local prevIndex = table.find(iconButtons, currentTab)
if prevIndex then
tabFrames[prevIndex].Visible = false
end
end
currentTab = btn
iconImg.ImageColor3 = hoverColor
local thisIndex = table.find(iconButtons, btn)
if thisIndex then
tabFrames[thisIndex].Visible = true
end
end
end)
return btn
end
function playAnimations(fadeIn)
if fadeIn then
_blurFrame.BackgroundTransparency = 1
_topBar.BackgroundTransparency = 1
_strokeBar.Transparency = 1
_timebox.BackgroundTransparency = 1
_timeboxStroke.Transparency = 1
_timeboxlabel.TextTransparency = 1
_executorbox.BackgroundTransparency = 1
_executorboxStroke.Transparency = 1
_executorboxlabel.TextTransparency = 1
_fpsbox.BackgroundTransparency = 1
_fpsboxStroke.Transparency = 1
_fpslabel.TextTransparency = 1
_leftBar.BackgroundTransparency = 1
_leftBarStroke.Transparency = 1
_usernameLabel.TextTransparency = 1
_scrlfrm.BackgroundTransparency = 1
_mf.BackgroundTransparency = 1
_title.TextTransparency = 1
_version.TextTransparency = 1
_divider.BackgroundTransparency = 1
_blurEffect.Size = 0
_iconList.Parent = nil
for i, btn in ipairs(iconButtons) do
btn.AnchorPoint = Vector2.new(0.5, 0.5)
btn.Position = centerPos
local iconImg = btn:FindFirstChildOfClass("ImageLabel")
local stroke = btn:FindFirstChildOfClass("UIStroke")
if iconImg then
iconImg.ImageTransparency = 1
end
if stroke then
stroke.Transparency = 1
end
end
TweenService:Create(
_blurEffect,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{Size = 24}
):Play()
TweenService:Create(
_blurFrame,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{BackgroundTransparency = 0.5}
):Play()
task.wait(0.3)
TweenService:Create(
_topBar,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{BackgroundTransparency = 0}
):Play()
TweenService:Create(
_strokeBar,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{Transparency = 0}
):Play()
task.wait(0.3)
local buttonAnimationTime = 0
for i, btn in ipairs(iconButtons) do
local iconImg = btn:FindFirstChildOfClass("ImageLabel")
local stroke = btn:FindFirstChildOfClass("UIStroke")
local sound = btn:FindFirstChildOfClass("Sound")
local targetPos = UDim2.new(0, 28 + (i - 1) * (30 + 6), 0.5, 0)
local tween = TweenService:Create(
btn,
TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
{Position = targetPos}
)
if iconImg then
TweenService:Create(
iconImg,
TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
{ImageTransparency = 0}
):Play()
end
if stroke then
TweenService:Create(
stroke,
TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
{Transparency = 0}
):Play()
end
if sound then
tween.Completed:Connect(function()
sound:Play()
end)
end
tween:Play()
task.wait(0.1)
buttonAnimationTime = buttonAnimationTime + 0.1
end
task.wait(0.2)
local mfTween = TweenService:Create(
_mf,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{BackgroundTransparency = 0}
)
mfTween.Completed:Connect(function()
local ti = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
function fadeInChildren(obj)
if obj:IsA("Frame") or obj:IsA("ScrollingFrame") then
if obj.Name == "Content" then
obj.BackgroundTransparency = 1
return
end
if obj.Name == "Content" and obj.Parent.Name ~= "ScrollingFrame" then
obj.BackgroundTransparency = 1
return
end
if obj.Name == "Content" then
obj.BackgroundTransparency = 1
return
end
if obj.Name == "Left" or obj.Name == "Right" or obj.Name == "Columns" then
obj.BackgroundTransparency = 1
end
if obj.BackgroundTransparency == 1 and not obj:GetAttribute("NoFade") then
TweenService:Create(obj, ti, {BackgroundTransparency = 0}):Play()
end
end
if obj:IsA("TextLabel") or obj:IsA("TextButton") then
if obj.TextTransparency == 1 and not obj:GetAttribute("NoFade") then
TweenService:Create(obj, ti, {TextTransparency = 0}):Play()
end
end
if obj:IsA("ImageLabel") or obj:IsA("ImageButton") then
if obj.ImageTransparency == 1 and not obj:GetAttribute("NoFade") then
TweenService:Create(obj, ti, {ImageTransparency = 0}):Play()
end
end
if obj:IsA("UIStroke") then
if obj.Transparency == 1 and not obj:GetAttribute("NoFade") then
TweenService:Create(obj, ti, {Transparency = 0.5}):Play()
end
end
for _, child in ipairs(obj:GetChildren()) do
fadeInChildren(child)
end
end
fadeInChildren(_scrlfrm)
end)
mfTween:Play()
local titleTween = TweenService:Create(
_title,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{TextTransparency = 0}
)
titleTween.Completed:Connect(function()
local nameWidth = _usernameLabel.TextBounds.X
_leftBar.Size = UDim2.new(0, nameWidth + 20, 0, 40)
end)
titleTween.Completed:Connect(function()
local executorWidth = _executorboxlabel.TextBounds.X
_executorbox.Size = UDim2.new(0, executorWidth + 20, 0, 40)
end)
titleTween.Completed:Connect(function()
local executorWidth = _timeboxlabel.TextBounds.X
_timebox.Size = UDim2.new(0, executorWidth + 20, 0, 40)
end)
titleTween:Play()
TweenService:Create(
_version,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{TextTransparency = 0.25}
):Play()
TweenService:Create(
_divider,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{BackgroundTransparency = 0}
):Play()
task.wait(buttonAnimationTime)
TweenService:Create(
_timebox,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{BackgroundTransparency = 0}
):Play()
TweenService:Create(
_timeboxStroke,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{Transparency = 0}
):Play()
TweenService:Create(
_timeboxlabel,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{TextTransparency = 0}
):Play()
TweenService:Create(
_executorbox,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{BackgroundTransparency = 0}
):Play()
TweenService:Create(
_executorboxStroke,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{Transparency = 0}
):Play()
TweenService:Create(
_executorboxlabel,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{BackgroundTransparency = 0}
):Play()
TweenService:Create(
_fpsbox,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{BackgroundTransparency = 0}
):Play()
TweenService:Create(
_fpsboxStroke,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{Transparency = 0}
):Play()
TweenService:Create(
_fpslabel,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{BackgroundTransparency = 0}
):Play()
TweenService:Create(
_leftBar,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{BackgroundTransparency = 0}
):Play()
TweenService:Create(
_leftBarStroke,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{Transparency = 0}
):Play()
TweenService:Create(
_usernameLabel,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{TextTransparency = 0}
):Play()
task.delay(0.5, function()
_mf.BackgroundTransparency = 0
_title.TextTransparency = 0
_version.TextTransparency = 0.25
_divider.BackgroundTransparency = 0
_timebox.BackgroundTransparency = 0
_timeboxStroke.Transparency = 0
_timeboxlabel.TextTransparency = 0
_executorbox.BackgroundTransparency = 0
_executorboxStroke.Transparency = 0
_executorboxlabel.TextTransparency = 0
_fpsbox.BackgroundTransparency = 0
_fpsboxStroke.Transparency = 0
_fpslabel.TextTransparency = 0
_leftBar.BackgroundTransparency = 0
_leftBarStroke.Transparency = 0
_usernameLabel.TextTransparency = 0
_iconList.Parent = _topBar
for _, btn in ipairs(iconButtons) do
btn.Position = UDim2.new(0, 0, 0, 0)
btn.AnchorPoint = Vector2.new(0, 0)
end
end)
else
TweenService:Create(
_blurEffect,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{Size = 0}
):Play()
TweenService:Create(
_blurFrame,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{BackgroundTransparency = 1}
):Play()
TweenService:Create(
_topBar,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{BackgroundTransparency = 1}
):Play()
TweenService:Create(
_strokeBar,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{Transparency = 1}
):Play()
TweenService:Create(
_timebox,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{BackgroundTransparency = 1}
):Play()
TweenService:Create(
_timeboxStroke,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{Transparency = 1}
):Play()
TweenService:Create(
_timeboxlabel,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{TextTransparency = 1}
):Play()
TweenService:Create(
_executorbox,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{BackgroundTransparency = 1}
):Play()
TweenService:Create(
_executorboxStroke,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{Transparency = 1}
):Play()
TweenService:Create(
_executorboxlabel,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{BackgroundTransparency = 1}
):Play()
TweenService:Create(
_fpsbox,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{BackgroundTransparency = 1}
):Play()
TweenService:Create(
_fpsboxStroke,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{Transparency = 1}
):Play()
TweenService:Create(
_fpslabel,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{BackgroundTransparency = 1}
):Play()
TweenService:Create(
_leftBar,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{BackgroundTransparency = 1}
):Play()
TweenService:Create(
_leftBarStroke,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{Transparency = 1}
):Play()
TweenService:Create(
_usernameLabel,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{TextTransparency = 1}
):Play()
TweenService:Create(
_mf,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{BackgroundTransparency = 1}
):Play()
TweenService:Create(
_title,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{TextTransparency = 1}
):Play()
TweenService:Create(
_version,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{TextTransparency = 1}
):Play()
TweenService:Create(
_divider,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{BackgroundTransparency = 1}
):Play()
for i, btn in ipairs(iconButtons) do
local iconImg = btn:FindFirstChildOfClass("ImageLabel")
local stroke = btn:FindFirstChildOfClass("UIStroke")
if iconImg then
TweenService:Create(
iconImg,
TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{ImageTransparency = 1}
):Play()
end
if stroke then
TweenService:Create(
stroke,
TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{Transparency = 1}
):Play()
end
end
end
end
for _, tab in ipairs(tabIconsOrdered) do
createIconButton(tab.icon, tab.name)
end
if _visible then
playAnimations(true)
if #iconButtons > 0 then
local btn = iconButtons[1]
local iconImg = btn:FindFirstChildOfClass("ImageLabel")
if iconImg then
iconImg.ImageColor3 = hoverColor
end
currentTab = btn
tabFrames[1].Visible = true
end
end
local _dragging = false
local _dragInput, _dragStart, _startPos
local _dragTweenInfo = TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
local _currentTween = nil
local _leftDragging = false
local _leftDragInput, _leftDragStart, _leftStartPos
local _leftCurrentTween = nil
_top.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
_dragging = true
_dragStart = input.Position
_startPos = _mf.Position
if _currentTween then
_currentTween:Cancel()
_currentTween = nil
end
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
_dragging = false
if _currentTween then
_currentTween:Cancel()
_currentTween = nil
end
end
end)
end
end)
_top.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement then
_dragInput = input
end
end)
_leftBar.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
_leftDragging = true
_leftDragStart = input.Position
_leftStartPos = _leftBar.Position
if _leftCurrentTween then
_leftCurrentTween:Cancel()
_leftCurrentTween = nil
end
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
_leftDragging = false
if _leftCurrentTween then
_leftCurrentTween:Cancel()
_leftCurrentTween = nil
end
end
end)
end
end)
_leftBar.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement then
_leftDragInput = input
end
end)
_uis.InputChanged:Connect(function(input)
if input == _dragInput and _dragging then
local delta = input.Position - _dragStart
local targetPos = UDim2.new(
_startPos.X.Scale,
_startPos.X.Offset + delta.X,
_startPos.Y.Scale,
_startPos.Y.Offset + delta.Y
)
if _currentTween then
_currentTween:Cancel()
end
_currentTween = TweenService:Create(_mf, _dragTweenInfo, {Position = targetPos})
_currentTween:Play()
elseif input == _leftDragInput and _leftDragging then
local delta = input.Position - _leftDragStart
local targetPos = UDim2.new(
_leftStartPos.X.Scale,
_leftStartPos.X.Offset + delta.X,
_leftStartPos.Y.Scale,
_leftStartPos.Y.Offset + delta.Y
)
if _leftCurrentTween then
_leftCurrentTween:Cancel()
end
_leftCurrentTween = TweenService:Create(_leftBar, _dragTweenInfo, {Position = targetPos})
_leftCurrentTween:Play()
end
end)
_uis.InputBegan:Connect(function(input, gpe)
if gpe then
return
end
if input.KeyCode == Enum.KeyCode.P then
_visible = not _visible
_scrlfrm.Visible = _visible
_blurFrame.Visible = _visible
_topBar.Visible = _visible
_timebox.Visible = _visible
_executorbox.Visible = _visible
_fpsbox.Visible = _visible
_leftBar.Visible = _visible
_mf.Visible = _visible
playAnimations(_visible)
end
end)
local lib = {}
local function getTabFrame(tabName)
for i, tab in ipairs(tabIconsOrdered) do
if tab.name == tabName then
return tabFrames[i]
end
end
return nil
end
local function fadeInElement(gui)
local ti = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
local function recurse(obj)
if obj:IsA("Frame") or obj:IsA("ScrollingFrame") then
if obj.BackgroundTransparency == 1 and not obj:GetAttribute("NoFade") then
TweenService:Create(obj, ti, {BackgroundTransparency = 0}):Play()
end
end
if obj:IsA("TextLabel") or obj:IsA("TextButton") then
if obj.TextTransparency == 1 and not obj:GetAttribute("NoFade") then
TweenService:Create(obj, ti, {TextTransparency = 0}):Play()
end
end
if obj:IsA("ImageLabel") or obj:IsA("ImageButton") then
if obj.ImageTransparency == 1 and not obj:GetAttribute("NoFade") then
TweenService:Create(obj, ti, {ImageTransparency = 0}):Play()
end
end
for _, st in ipairs(obj:GetChildren()) do
if st:IsA("UIStroke") then
if st.Transparency == 1 and not st:GetAttribute("NoFade") then
TweenService:Create(st, ti, {Transparency = 0.5}):Play()
end
end
end
for _, child in ipairs(obj:GetChildren()) do
recurse(child)
end
end
recurse(gui)
end
local function createSection(tabName, side, sectionTitle, sizeType)
local tabFrame = getTabFrame(tabName)
if not tabFrame then return nil end
local columnName = side == "left" and "Left" or "Right"
local column = tabFrame.Columns:FindFirstChild(columnName)
if not column then return nil end
local sizes = {
LongBox = {Height = 200, ContentHeight = 170},
ShortBox = {Height = 100, ContentHeight = 100},
BigBox = {Height = 300, ContentHeight = 270},
SmallBox = {Height = 50, ContentHeight = 20}
}
local sizeConfig = sizes[sizeType] or {Height = 150, ContentHeight = 120}
local section = Instance.new("Frame")
section.Size = UDim2.new(1, 0, 0, sizeConfig.Height)
section.BackgroundColor3 = Color3.fromRGB(3, 3, 3)
section.BackgroundTransparency = 1
section.BorderSizePixel = 0
section.Parent = column
local gradient = Instance.new("UIGradient")
gradient.Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.fromRGB(20, 20, 20)),
ColorSequenceKeypoint.new(1, config.accentcolor:Lerp(Color3.fromRGB(20, 20, 20), 0.7))
})
gradient.Rotation = 90
gradient.Transparency = NumberSequence.new({
NumberSequenceKeypoint.new(0, 0.8),
NumberSequenceKeypoint.new(1, 0.8)
})
gradient.Parent = section
local secCorner = Instance.new("UICorner")
secCorner.CornerRadius = UDim.new(0, 8)
secCorner.Parent = section
local secStroke = Instance.new("UIStroke")
secStroke.Color = config.accentcolor:Lerp(Color3.fromRGB(100, 100, 100), 0.5)
secStroke.Thickness = 1.5
secStroke.Transparency = 1
secStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
secStroke.Parent = section
local title = Instance.new("TextLabel")
title.Size = UDim2.new(1, -10, 0, 20)
title.Position = UDim2.new(0, 5, 0, 5)
title.BackgroundTransparency = 1
title.Text = sectionTitle or ""
title.TextColor3 = Color3.new(1, 1, 1)
title.TextTransparency = 1
title.Font = Enum.Font.GothamBold
title.TextSize = 14
title.TextXAlignment = Enum.TextXAlignment.Left
title.Parent = section
local contentFrame = Instance.new("Frame")
contentFrame.Name = "Content"
contentFrame.Size = UDim2.new(1, -10, 0, sizeConfig.ContentHeight)
contentFrame.Position = UDim2.new(0, 5, 0, 30)
contentFrame.BackgroundTransparency = 1
contentFrame.BorderSizePixel = 0
contentFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
contentFrame.Parent = section
contentFrame:SetAttribute("NoFade", true)
local contList = Instance.new("UIListLayout")
contList.SortOrder = Enum.SortOrder.LayoutOrder
contList.Padding = UDim.new(0, 8)
contList.Parent = contentFrame
local contPad = Instance.new("UIPadding")
contPad.PaddingLeft = UDim.new(0, 5)
contPad.PaddingRight = UDim.new(0, 5)
contPad.PaddingTop = UDim.new(0, 5)
contPad.PaddingBottom = UDim.new(0, 5)
contPad.Parent = contentFrame
fadeInElement(section)
return contentFrame
end
function lib:CreateLeftLongBox(tabName, sectionTitle)
return createSection(tabName, "left", sectionTitle, "LongBox")
end
function lib:CreateRightLongBox(tabName, sectionTitle)
return createSection(tabName, "right", sectionTitle, "LongBox")
end
function lib:CreateLeftShortBox(tabName, sectionTitle)
return createSection(tabName, "left", sectionTitle, "ShortBox")
end
function lib:CreateRightShortBox(tabName, sectionTitle)
return createSection(tabName, "right", sectionTitle, "ShortBox")
end
function lib:CreateLeftBigBox(tabName, sectionTitle)
return createSection(tabName, "left", sectionTitle, "BigBox")
end
function lib:CreateRightBigBox(tabName, sectionTitle)
return createSection(tabName, "right", sectionTitle, "BigBox")
end
function lib:CreateLeftSmallBox(tabName, sectionTitle)
return createSection(tabName, "left", sectionTitle, "SmallBox")
end
function lib:CreateRightSmallBox(tabName, sectionTitle)
return createSection(tabName, "right", sectionTitle, "SmallBox")
end
function lib:CreateToggle(parent, toggleText, default, callback)
local toggleFrame = Instance.new("Frame")
toggleFrame.Size = UDim2.new(1, -10, 0, 32)
toggleFrame.BackgroundTransparency = 1
toggleFrame.Parent = parent
local gradient = Instance.new("UIGradient")
gradient.Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.fromRGB(20, 20, 20)),
ColorSequenceKeypoint.new(1, config.accentcolor:Lerp(Color3.fromRGB(20, 20, 20), 0.7))
})
gradient.Rotation = 90
gradient.Parent = toggleFrame
local togCorner = Instance.new("UICorner")
togCorner.CornerRadius = UDim.new(0, 8)
togCorner.Parent = toggleFrame
local togStroke = Instance.new("UIStroke")
togStroke.Color = config.accentcolor:Lerp(Color3.fromRGB(80, 80, 80), 0.6)
togStroke.Thickness = 1
togStroke.Transparency = 1
togStroke.Parent = toggleFrame
local switchBg = Instance.new("Frame")
switchBg.Size = UDim2.new(0, 46, 0, 24)
switchBg.Position = UDim2.new(1, -56, 0.5, -12)
switchBg.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
switchBg.BorderSizePixel = 0
switchBg.Parent = toggleFrame
local switchCorner = Instance.new("UICorner")
switchCorner.CornerRadius = UDim.new(1, 0)
switchCorner.Parent = switchBg
local switchStroke = Instance.new("UIStroke")
switchStroke.Color = Color3.fromRGB(60, 60, 60)
switchStroke.Thickness = 1
switchStroke.Parent = switchBg
local knob = Instance.new("Frame")
knob.Size = UDim2.new(0, 20, 0, 20)
knob.Position = UDim2.new(0, 2, 0.5, -10)
knob.BackgroundColor3 = Color3.fromRGB(220, 220, 220)
knob.BorderSizePixel = 0
knob.Parent = switchBg
local knobCorner = Instance.new("UICorner")
knobCorner.CornerRadius = UDim.new(1, 0)
knobCorner.Parent = knob
local textLab = Instance.new("TextLabel")
textLab.Size = UDim2.new(1, -70, 1, 0)
textLab.Position = UDim2.new(0, 8, 0, 0)
textLab.BackgroundTransparency = 1
textLab.Text = toggleText
textLab.TextColor3 = Color3.new(1, 1, 1)
textLab.TextTransparency = 1
textLab.Font = Enum.Font.Gotham
textLab.TextSize = 14
textLab.TextXAlignment = Enum.TextXAlignment.Left
textLab.Parent = toggleFrame
local button = Instance.new("TextButton")
button.Size = UDim2.new(1, 0, 1, 0)
button.BackgroundTransparency = 1
button.Text = ""
button.Parent = toggleFrame
local state = default or false
local function updateToggle(instant)
local ti = instant and TweenInfo.new(0) or TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out)
if state then
TweenService:Create(switchBg, ti, {BackgroundColor3 = config.accentcolor}):Play()
TweenService:Create(knob, ti, {Position = UDim2.new(1, -22, 0.5, -10)}):Play()
TweenService:Create(knob, ti, {BackgroundColor3 = Color3.fromRGB(255, 255, 255)}):Play()
else
TweenService:Create(switchBg, ti, {BackgroundColor3 = Color3.fromRGB(35, 35, 35)}):Play()
TweenService:Create(knob, ti, {Position = UDim2.new(0, 2, 0.5, -10)}):Play()
TweenService:Create(knob, ti, {BackgroundColor3 = Color3.fromRGB(220, 220, 220)}):Play()
end
if callback then callback(state) end
end
updateToggle(true)
button.Activated:Connect(function()
state = not state
updateToggle()
end)
button.MouseEnter:Connect(function()
TweenService:Create(toggleFrame, TweenInfo.new(0.2), {BackgroundTransparency = 0.85}):Play()
end)
button.MouseLeave:Connect(function()
TweenService:Create(toggleFrame, TweenInfo.new(0.2), {BackgroundTransparency = 1}):Play()
end)
fadeInElement(toggleFrame)
return {
Element = toggleFrame,
Set = function(v)
state = v
updateToggle()
end
}
end
function lib:CreateButton(parent, buttonText, callback)
local buttonFrame = Instance.new("Frame")
buttonFrame.Size = UDim2.new(1, -10, 0, 32)
buttonFrame.BackgroundTransparency = 1
buttonFrame.Parent = parent
local gradient = Instance.new("UIGradient")
gradient.Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.fromRGB(20, 20, 20)),
ColorSequenceKeypoint.new(1, config.accentcolor:Lerp(Color3.fromRGB(20, 20, 20), 0.7))
})
gradient.Rotation = 90
gradient.Parent = buttonFrame
local btnCorner = Instance.new("UICorner")
btnCorner.CornerRadius = UDim.new(0, 8)
btnCorner.Parent = buttonFrame
local btnStroke = Instance.new("UIStroke")
btnStroke.Color = config.accentcolor:Lerp(Color3.fromRGB(80, 80, 80), 0.6)
btnStroke.Thickness = 1
btnStroke.Transparency = 1
btnStroke.Parent = buttonFrame
local textLab = Instance.new("TextLabel")
textLab.Size = UDim2.new(1, -10, 1, 0)
textLab.Position = UDim2.new(0, 5, 0, 0)
textLab.BackgroundTransparency = 1
textLab.Text = buttonText
textLab.TextColor3 = Color3.new(1, 1, 1)
textLab.TextTransparency = 1
textLab.Font = Enum.Font.Gotham
textLab.TextSize = 14
textLab.TextXAlignment = Enum.TextXAlignment.Center
textLab.Parent = buttonFrame
local button = Instance.new("TextButton")
button.Size = UDim2.new(1, 0, 1, 0)
button.BackgroundTransparency = 1
button.Text = ""
button.Parent = buttonFrame
button.MouseEnter:Connect(function()
TweenService:Create(buttonFrame, TweenInfo.new(0.2), {BackgroundTransparency = 0.85}):Play()
end)
button.MouseLeave:Connect(function()
TweenService:Create(buttonFrame, TweenInfo.new(0.2), {BackgroundTransparency = 1}):Play()
end)
button.Activated:Connect(function()
if callback then
callback()
end
end)
fadeInElement(buttonFrame)
return {
Element = buttonFrame
}
end
function lib:CreateSlider(parent, sliderText, minValue, maxValue, defaultValue, callback)
local sliderFrame = Instance.new("Frame")
sliderFrame.Size = UDim2.new(1, -10, 0, 38)
sliderFrame.BackgroundTransparency = 1
sliderFrame.Parent = parent
local gradient = Instance.new("UIGradient")
gradient.Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.fromRGB(20, 20, 20)),
ColorSequenceKeypoint.new(1, config.accentcolor:Lerp(Color3.fromRGB(20, 20, 20), 0.7))
})
gradient.Rotation = 90
gradient.Parent = sliderFrame
local sldCorner = Instance.new("UICorner")
sldCorner.CornerRadius = UDim.new(0, 8)
sldCorner.Parent = sliderFrame
local sldStroke = Instance.new("UIStroke")
sldStroke.Color = config.accentcolor:Lerp(Color3.fromRGB(80, 80, 80), 0.6)
sldStroke.Thickness = 1
sldStroke.Transparency = 1
sldStroke.Parent = sliderFrame
local textLab = Instance.new("TextLabel")
textLab.Size = UDim2.new(0.5, 0, 0, 20)
textLab.Position = UDim2.new(0, 8, 0, 0)
textLab.BackgroundTransparency = 1
textLab.Text = sliderText
textLab.TextColor3 = Color3.new(1, 1, 1)
textLab.TextTransparency = 1
textLab.Font = Enum.Font.Gotham
textLab.TextSize = 14
textLab.TextXAlignment = Enum.TextXAlignment.Left
textLab.Parent = sliderFrame
local valueLab = Instance.new("TextLabel")
valueLab.Size = UDim2.new(0, 40, 0, 20)
valueLab.Position = UDim2.new(1, -48, 0, 0)
valueLab.BackgroundTransparency = 1
valueLab.Text = tostring(defaultValue or minValue)
valueLab.TextColor3 = config.accentcolor
valueLab.TextTransparency = 1
valueLab.Font = Enum.Font.GothamBold
valueLab.TextSize = 14
valueLab.TextXAlignment = Enum.TextXAlignment.Right
valueLab.Parent = sliderFrame
local barBg = Instance.new("Frame")
barBg.Size = UDim2.new(1, -16, 0, 6)
barBg.Position = UDim2.new(0, 8, 0, 26)
barBg.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
barBg.BorderSizePixel = 0
barBg.Parent = sliderFrame
local barCorner = Instance.new("UICorner")
barCorner.CornerRadius = UDim.new(0, 3)
barCorner.Parent = barBg
local fillBar = Instance.new("Frame")
fillBar.Size = UDim2.new(0, 0, 1, 0)
fillBar.BackgroundColor3 = config.accentcolor
fillBar.BorderSizePixel = 0
fillBar.Parent = barBg
local fillCorner = Instance.new("UICorner")
fillCorner.CornerRadius = UDim.new(0, 3)
fillCorner.Parent = fillBar
local knob = Instance.new("Frame")
knob.Size = UDim2.new(0, 14, 0, 14)
knob.Position = UDim2.new(0, 0, 0.5, -7)
knob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
knob.BorderSizePixel = 0
knob.ZIndex = 2
knob.Parent = barBg
local knobCorner = Instance.new("UICorner")
knobCorner.CornerRadius = UDim.new(1, 0)
knobCorner.Parent = knob
local knobStroke = Instance.new("UIStroke")
knobStroke.Color = config.accentcolor
knobStroke.Thickness = 2
knobStroke.Parent = knob
local button = Instance.new("TextButton")
button.Size = UDim2.new(1, 0, 1, 0)
button.BackgroundTransparency = 1
button.Text = ""
button.Parent = sliderFrame
local currentValue = defaultValue or minValue
local range = maxValue - minValue
local function updateSlider(value, noCallback)
currentValue = math.clamp(value, minValue, maxValue)
local ratio = (currentValue - minValue) / range
TweenService:Create(fillBar, TweenInfo.new(0.15, Enum.EasingStyle.Sine), {Size = UDim2.new(ratio, 0, 1, 0)}):Play()
TweenService:Create(knob, TweenInfo.new(0.15, Enum.EasingStyle.Sine), {Position = UDim2.new(ratio, -7, 0.5, -7)}):Play()
valueLab.Text = tostring(math.floor(currentValue))
if callback and not noCallback then
callback(currentValue)
end
end
updateSlider(currentValue, true)
local dragging = false
button.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = true
local barPos = barBg.AbsolutePosition.X
local barWidth = barBg.AbsoluteSize.X
local ratio = math.clamp((input.Position.X - barPos) / barWidth, 0, 1)
updateSlider(minValue + ratio * range)
end
end)
button.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = false
end
end)
_uis.InputChanged:Connect(function(input)
if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
local barPos = barBg.AbsolutePosition.X
local barWidth = barBg.AbsoluteSize.X
local ratio = math.clamp((input.Position.X - barPos) / barWidth, 0, 1)
updateSlider(minValue + ratio * range)
end
end)
fadeInElement(sliderFrame)
return {
Element = sliderFrame,
Set = function(newValue)
updateSlider(newValue)
end
}
end
return lib
end
return mys_custom_ui