Dark_Agent

AKADMINLIB

Apr 8th, 2026
90
0
Never
10
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 59.61 KB | Gaming | 0 0
  1. -- original: https://absent.wtf/AKADMINLIB/LIB.lua
  2. -- i saved it into pastebin if original deleted so..
  3.  
  4. local Services = setrawmetatable({}, {
  5.     __index = newcclosure(function(self, name)
  6.         local success, cache = pcall(function()
  7.             return cloneref(game:GetService(name)) or game:GetService(name)
  8.         end)
  9.         if success then
  10.             rawset(self, name, cache)
  11.             return cache
  12.         else
  13.             error("Invalid Service: " .. tostring(name))
  14.         end)
  15.     end
  16. })
  17.  
  18. local pl = game:GetService("Players")
  19. local ui = game:GetService("UserInputService")
  20. local tw = game:GetService("TweenService")
  21. local ss = game:GetService("SoundService")
  22. local db = game:GetService("Debris")
  23. local hs = game:GetService("HttpService")
  24. local lp = pl.LocalPlayer
  25. local cg = game:GetService("CoreGui")
  26.  
  27. local guiParent = cg
  28. do
  29.     local ok = pcall(function()
  30.         local sg = Instance.new("ScreenGui")
  31.         sg.Parent = cg
  32.         sg:Destroy()
  33.     end)
  34.     if not ok then
  35.         guiParent = lp:WaitForChild("PlayerGui")
  36.     end
  37. end
  38.  
  39. local notifQueue = {}
  40. local notifGap = 10
  41. local notifBaseY = 200
  42.  
  43. local guiCounter = 0
  44. local activeInstances = {}
  45.  
  46. local LibClass = {}
  47. LibClass.__index = LibClass
  48.  
  49. local function make(className, props)
  50.     local obj = Instance.new(className)
  51.     for k, v in pairs(props or {}) do
  52.         obj[k] = v
  53.     end
  54.     return obj
  55. end
  56.  
  57. local function addCorner(parent, radius)
  58.     local c = make("UICorner", { CornerRadius = UDim.new(0, radius or 10) })
  59.     c.Parent = parent
  60.     return c
  61. end
  62.  
  63. local function tween(obj, goals, duration, style, direction)
  64.     local info = TweenInfo.new(
  65.         duration or 0.25,
  66.         style or Enum.EasingStyle.Quint,
  67.         direction or Enum.EasingDirection.Out
  68.     )
  69.     local t = tw:Create(obj, info, goals)
  70.     t:Play()
  71.     return t
  72. end
  73.  
  74. local activeSounds = {}
  75. local function playSound()
  76.     for i = #activeSounds, 1, -1 do
  77.         local sd = activeSounds[i]
  78.         if not sd or not sd.Parent then
  79.             table.remove(activeSounds, i)
  80.         end
  81.     end
  82.     if #activeSounds < 8 then
  83.         local sd = make("Sound", {
  84.             SoundId = "rbxassetid://3023237993",
  85.             Volume = 1,
  86.             Parent = ss,
  87.         })
  88.         sd:Play()
  89.         table.insert(activeSounds, sd)
  90.         db:AddItem(sd, 5)
  91.         sd.Ended:Connect(function()
  92.             for i = #activeSounds, 1, -1 do
  93.                 if activeSounds[i] == sd then
  94.                     table.remove(activeSounds, i)
  95.                     break
  96.                 end
  97.             end
  98.         end)
  99.     end
  100. end
  101.  
  102. local function reflowNotifs()
  103.     for i, nd in ipairs(notifQueue) do
  104.         local yp = notifBaseY + (i - 1) * (nd.fh + notifGap)
  105.         if nd.frame and nd.frame.Parent then
  106.             tween(nd.frame, { Position = UDim2.new(1, -(nd.fw + 10), 0, yp) }, 0.3)
  107.             nd.ypos = yp
  108.         end
  109.     end
  110. end
  111.  
  112. local function sendNotif(title, subtitle, imageId, persistent)
  113.     local nd = { fh = 0, fw = 0, ypos = 0, frame = nil, _persistent = false, _spawned = false }
  114.  
  115.     nd.dismiss = function()
  116.         if not nd._spawned then
  117.             nd._dismissed = true
  118.             return
  119.         end
  120.         for i, v in ipairs(notifQueue) do
  121.             if v == nd then
  122.                 table.remove(notifQueue, i)
  123.                 break
  124.             end
  125.         end
  126.         if nd.frame and nd.frame.Parent then
  127.             local fr = nd.frame
  128.             local exitTween = tween(
  129.                 fr,
  130.                 { Position = UDim2.new(1, 10, 0, nd.ypos) },
  131.                 0.4,
  132.                 Enum.EasingStyle.Quint,
  133.                 Enum.EasingDirection.In
  134.             )
  135.             exitTween.Completed:Connect(function()
  136.                 if fr and fr.Parent then fr:Destroy() end
  137.             end)
  138.         end
  139.         reflowNotifs()
  140.     end
  141.  
  142.     task.spawn(function()
  143.         local hasImage = imageId ~= nil and imageId ~= ""
  144.         local fh = hasImage and 105 or 72
  145.         local fw = hasImage and 320 or 280
  146.         nd.fh = fh
  147.         nd.fw = fw
  148.  
  149.         local notifGui = guiParent:FindFirstChild("AK_NOTIF_GUI")
  150.         if not notifGui then
  151.             notifGui = make("ScreenGui", {
  152.                 Name = "AK_NOTIF_GUI",
  153.                 ResetOnSpawn = false,
  154.                 ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
  155.                 Parent = guiParent,
  156.             })
  157.         end
  158.  
  159.         if nd._dismissed then return end
  160.  
  161.         table.insert(notifQueue, nd)
  162.  
  163.         local yp = notifBaseY
  164.         for i = 1, #notifQueue - 1 do
  165.             yp = yp + notifQueue[i].fh + notifGap
  166.         end
  167.         nd.ypos = yp
  168.  
  169.         local fr = make("Frame", {
  170.             Size = UDim2.new(0, fw, 0, fh),
  171.             Position = UDim2.new(1, 10, 0, yp),
  172.             BackgroundColor3 = Color3.fromRGB(0, 0, 0),
  173.             BackgroundTransparency = 0.45,
  174.             BorderSizePixel = 0,
  175.             Parent = notifGui,
  176.         })
  177.         addCorner(fr, 12)
  178.         nd.frame = fr
  179.  
  180.         make("TextLabel", {
  181.             Size = UDim2.new(1, -12, 0, 16),
  182.             Position = UDim2.new(0, 10, 0, 8),
  183.             BackgroundTransparency = 1,
  184.             Text = title and ("AK ADMIN  •  " .. title) or "AK ADMIN",
  185.             TextColor3 = Color3.fromRGB(180, 180, 180),
  186.             TextSize = 11,
  187.             Font = Enum.Font.GothamBold,
  188.             TextXAlignment = Enum.TextXAlignment.Left,
  189.             Parent = fr,
  190.         })
  191.  
  192.         local textOffsetX = hasImage and 60 or 10
  193.         local textOffsetW = hasImage and -65 or -20
  194.  
  195.         if hasImage then
  196.             make("ImageLabel", {
  197.                 Size = UDim2.new(0, 38, 0, 38),
  198.                 Position = UDim2.new(0, 12, 0, 34),
  199.                 BackgroundTransparency = 1,
  200.                 Image = "rbxassetid://" .. tostring(imageId),
  201.                 ImageColor3 = Color3.fromRGB(255, 255, 255),
  202.                 Parent = fr,
  203.             })
  204.         end
  205.  
  206.         make("TextLabel", {
  207.             Size = UDim2.new(1, textOffsetW, 0, 22),
  208.             Position = UDim2.new(0, textOffsetX, 0, hasImage and 30 or 22),
  209.             BackgroundTransparency = 1,
  210.             Text = title or "",
  211.             TextColor3 = Color3.fromRGB(255, 255, 255),
  212.             TextSize = 15,
  213.             Font = Enum.Font.GothamBold,
  214.             TextXAlignment = Enum.TextXAlignment.Left,
  215.             Parent = fr,
  216.         })
  217.  
  218.         make("TextLabel", {
  219.             Size = UDim2.new(1, textOffsetW, 0, hasImage and 34 or 22),
  220.             Position = UDim2.new(0, textOffsetX, 0, hasImage and 54 or 46),
  221.             BackgroundTransparency = 1,
  222.             Text = subtitle or "",
  223.             TextColor3 = Color3.fromRGB(200, 200, 200),
  224.             TextSize = 12,
  225.             Font = Enum.Font.Gotham,
  226.             TextXAlignment = Enum.TextXAlignment.Left,
  227.             TextWrapped = true,
  228.             Parent = fr,
  229.         })
  230.  
  231.         playSound()
  232.         tween(fr, { Position = UDim2.new(1, -(fw + 10), 0, yp) }, 0.5, Enum.EasingStyle.Quint)
  233.  
  234.         nd._spawned = true
  235.  
  236.         if not persistent then
  237.             task.wait(6)
  238.             nd.dismiss()
  239.         else
  240.             nd._persistent = true
  241.         end
  242.     end)
  243.     return nd
  244. end
  245.  
  246. local function makeRow(parent, layoutOrder)
  247.     local row = make("Frame", {
  248.         Size = UDim2.new(1, 0, 0, 0),
  249.         AutomaticSize = Enum.AutomaticSize.Y,
  250.         BackgroundColor3 = Color3.fromRGB(20, 20, 20),
  251.         BackgroundTransparency = 0.4,
  252.         BorderSizePixel = 0,
  253.         LayoutOrder = layoutOrder or 1,
  254.         Parent = parent,
  255.     })
  256.     addCorner(row, 10)
  257.     make("UIPadding", {
  258.         PaddingTop = UDim.new(0, 5),
  259.         PaddingBottom = UDim.new(0, 5),
  260.         PaddingLeft = UDim.new(0, 0),
  261.         PaddingRight = UDim.new(0, 0),
  262.         Parent = row,
  263.     })
  264.     return row
  265. end
  266.  
  267. local function makeOrderCounter()
  268.     local order = 0
  269.     return function()
  270.         order = order + 1
  271.         return order
  272.     end
  273. end
  274.  
  275. function LibClass.new(title, hideKey)
  276.     local self = setmetatable({}, LibClass)
  277.     self._conns = {}
  278.     self._closed = false
  279.     self._listening = false
  280.     self._toggles = {}
  281.     self._keybinds = {}
  282.     self._closeCallbacks = {}
  283.     self._resizePending = false
  284.     self._userResized = false
  285.     self._minimized = false
  286.     self._animating = false
  287.     self._manualWidth = 300
  288.     self._manualHeight = 300
  289.     self._tabs = {}
  290.     self._activeTab = nil
  291.     self._activeTweens = {}
  292.     self._hideKey = hideKey or Enum.KeyCode.RightShift
  293.     self._orderCounter = makeOrderCounter()
  294.     self._destroyed = false
  295.  
  296.     local function trackConn(c)
  297.         table.insert(self._conns, c)
  298.         return c
  299.     end
  300.  
  301.     local function conn(signal, fn)
  302.         return trackConn(signal:Connect(fn))
  303.     end
  304.  
  305.     self._conn = conn
  306.  
  307.     local function disconnectAll()
  308.         for _, c in ipairs(self._conns) do
  309.             if c and c.Connected then
  310.                 c:Disconnect()
  311.             end
  312.         end
  313.         self._conns = {}
  314.         self._closed = true
  315.         self._listening = false
  316.         self._destroyed = true
  317.     end
  318.  
  319.     self._disconnectAll = disconnectAll
  320.  
  321.     local titleKey = title or "__untitled__"
  322.     self._titleKey = titleKey
  323.  
  324.     if activeInstances[titleKey] then
  325.         for _, old in ipairs(activeInstances[titleKey]) do
  326.             if not old._closed then
  327.                 for _, fn in ipairs(old._closeCallbacks or {}) do
  328.                     pcall(fn)
  329.                 end
  330.                 old._disconnectAll()
  331.                 if old.screenGui and old.screenGui.Parent then
  332.                     old.screenGui:Destroy()
  333.                 end
  334.             end
  335.         end
  336.         activeInstances[titleKey] = nil
  337.     end
  338.     activeInstances[titleKey] = {}
  339.     table.insert(activeInstances[titleKey], self)
  340.  
  341.     guiCounter = guiCounter + 1
  342.     local guiName = "AK_ADMIN_LIB_" .. guiCounter .. "_" .. hs:GenerateGUID(false):gsub("-", ""):sub(1, 12)
  343.  
  344.     self.screenGui = make("ScreenGui", {
  345.         Name = guiName,
  346.         ResetOnSpawn = false,
  347.         ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
  348.         Parent = guiParent,
  349.     })
  350.  
  351.     self.mainFrame = make("Frame", {
  352.         Size = UDim2.new(0, 300, 0, 40),
  353.         Position = UDim2.new(0.5, -150, 0.5, -200),
  354.         BackgroundColor3 = Color3.fromRGB(10, 10, 10),
  355.         BackgroundTransparency = 0.3,
  356.         BorderSizePixel = 0,
  357.         ClipsDescendants = false,
  358.         Parent = self.screenGui,
  359.     })
  360.     addCorner(self.mainFrame, 14)
  361.     make("UIStroke", {
  362.         Color = Color3.fromRGB(60, 60, 60),
  363.         Thickness = 1,
  364.         Parent = self.mainFrame,
  365.     })
  366.  
  367.     self.titleBar = make("Frame", {
  368.         Size = UDim2.new(1, 0, 0, 40),
  369.         BackgroundTransparency = 1,
  370.         Parent = self.mainFrame,
  371.     })
  372.  
  373.     make("TextLabel", {
  374.         Size = UDim2.new(1, -80, 1, 0),
  375.         Position = UDim2.new(0, 14, 0, 0),
  376.         BackgroundTransparency = 1,
  377.         Text = "AK ADMIN" .. (title and ("  •  " .. title) or ""),
  378.         TextColor3 = Color3.fromRGB(255, 255, 255),
  379.         TextSize = 13,
  380.         Font = Enum.Font.GothamBold,
  381.         TextXAlignment = Enum.TextXAlignment.Left,
  382.         Parent = self.titleBar,
  383.     })
  384.  
  385.     self.minimizeBtn = make("TextButton", {
  386.         Size = UDim2.new(0, 24, 0, 24),
  387.         Position = UDim2.new(1, -52, 0.5, -12),
  388.         BackgroundColor3 = Color3.fromRGB(30, 30, 30),
  389.         BackgroundTransparency = 0.4,
  390.         Text = "—",
  391.         TextColor3 = Color3.fromRGB(220, 220, 220),
  392.         TextSize = 11,
  393.         Font = Enum.Font.GothamBold,
  394.         BorderSizePixel = 0,
  395.         Parent = self.titleBar,
  396.     })
  397.     addCorner(self.minimizeBtn, 8)
  398.  
  399.     self.closeBtn = make("TextButton", {
  400.         Size = UDim2.new(0, 24, 0, 24),
  401.         Position = UDim2.new(1, -26, 0.5, -12),
  402.         BackgroundColor3 = Color3.fromRGB(30, 30, 30),
  403.         BackgroundTransparency = 0.4,
  404.         Text = "X",
  405.         TextColor3 = Color3.fromRGB(220, 220, 220),
  406.         TextSize = 11,
  407.         Font = Enum.Font.GothamBold,
  408.         BorderSizePixel = 0,
  409.         Parent = self.titleBar,
  410.     })
  411.     addCorner(self.closeBtn, 8)
  412.  
  413.     self.contentFrame = make("Frame", {
  414.         Size = UDim2.new(1, 0, 1, -44),
  415.         Position = UDim2.new(0, 0, 0, 44),
  416.         BackgroundTransparency = 1,
  417.         Parent = self.mainFrame,
  418.     })
  419.  
  420.     self.tabContainer = make("Frame", {
  421.         Size = UDim2.new(1, -16, 0, 28),
  422.         Position = UDim2.new(0, 8, 0, 0),
  423.         BackgroundTransparency = 1,
  424.         Visible = false,
  425.         Parent = self.contentFrame,
  426.     })
  427.     make("UIListLayout", {
  428.         FillDirection = Enum.FillDirection.Horizontal,
  429.         Padding = UDim.new(0, 4),
  430.         SortOrder = Enum.SortOrder.LayoutOrder,
  431.         Parent = self.tabContainer,
  432.     })
  433.  
  434.     self.scrollFrame = make("ScrollingFrame", {
  435.         Size = UDim2.new(1, -16, 1, -8),
  436.         Position = UDim2.new(0, 8, 0, 4),
  437.         BackgroundTransparency = 1,
  438.         ScrollBarThickness = 3,
  439.         ScrollBarImageColor3 = Color3.fromRGB(255, 255, 255),
  440.         ScrollBarImageTransparency = 0.6,
  441.         BorderSizePixel = 0,
  442.         ScrollingDirection = Enum.ScrollingDirection.Y,
  443.         CanvasSize = UDim2.new(0, 0, 0, 0),
  444.         Parent = self.contentFrame,
  445.     })
  446.  
  447.     self.listLayout = make("UIListLayout", {
  448.         Padding = UDim.new(0, 6),
  449.         SortOrder = Enum.SortOrder.LayoutOrder,
  450.         Parent = self.scrollFrame,
  451.     })
  452.     make("UIPadding", {
  453.         PaddingTop = UDim.new(0, 4),
  454.         PaddingBottom = UDim.new(0, 4),
  455.         Parent = self.scrollFrame,
  456.     })
  457.  
  458.     local resizeHandle = make("Frame", {
  459.         Size = UDim2.new(0, 24, 0, 24),
  460.         Position = UDim2.new(1, -6, 1, -6),
  461.         BackgroundTransparency = 1,
  462.         BorderSizePixel = 0,
  463.         ZIndex = 10,
  464.         Parent = self.mainFrame,
  465.     })
  466.  
  467.     local rLine1 = make("Frame", {
  468.         Size = UDim2.new(0, 14, 0, 2),
  469.         Position = UDim2.new(0, 2, 1, -11),
  470.         BackgroundColor3 = Color3.fromRGB(120, 120, 120),
  471.         BackgroundTransparency = 0.3,
  472.         BorderSizePixel = 0,
  473.         ZIndex = 11,
  474.         Parent = resizeHandle,
  475.     })
  476.     addCorner(rLine1, 1)
  477.  
  478.     local rLine2 = make("Frame", {
  479.         Size = UDim2.new(0, 2, 0, 14),
  480.         Position = UDim2.new(1, -11, 0, 2),
  481.         BackgroundColor3 = Color3.fromRGB(120, 120, 120),
  482.         BackgroundTransparency = 0.3,
  483.         BorderSizePixel = 0,
  484.         ZIndex = 11,
  485.         Parent = resizeHandle,
  486.     })
  487.     addCorner(rLine2, 1)
  488.  
  489.  
  490.     local minW, minH = 200, 100
  491.     local resizeDragging = false
  492.     local resizeOrigin = nil
  493.     local resizeStartSize = nil
  494.  
  495.     conn(resizeHandle.InputBegan, function(inp)
  496.         if
  497.             inp.UserInputType == Enum.UserInputType.MouseButton1
  498.             or inp.UserInputType == Enum.UserInputType.Touch
  499.         then
  500.             resizeDragging = true
  501.             resizeOrigin = inp.Position
  502.             resizeStartSize = self.mainFrame.AbsoluteSize
  503.             self._userResized = true
  504.         end
  505.     end)
  506.  
  507.     conn(resizeHandle.MouseEnter, function()
  508.         tween(rLine1, { BackgroundTransparency = 0 }, 0.1)
  509.         tween(rLine2, { BackgroundTransparency = 0 }, 0.1)
  510.     end)
  511.     conn(resizeHandle.MouseLeave, function()
  512.         tween(rLine1, { BackgroundTransparency = 0.3 }, 0.1)
  513.         tween(rLine2, { BackgroundTransparency = 0.3 }, 0.1)
  514.     end)
  515.  
  516.     local screenBounds = workspace.CurrentCamera and workspace.CurrentCamera.ViewportSize or Vector2.new(1920, 1080)
  517.     conn(workspace.CurrentCamera:GetPropertyChangedSignal("ViewportSize"), function()
  518.         screenBounds = workspace.CurrentCamera.ViewportSize
  519.     end)
  520.  
  521.     conn(ui.InputChanged, function(inp)
  522.         if
  523.             resizeDragging
  524.             and (
  525.                 inp.UserInputType == Enum.UserInputType.MouseMovement
  526.                 or inp.UserInputType == Enum.UserInputType.Touch
  527.             )
  528.         then
  529.             local delta = inp.Position - resizeOrigin
  530.             local rawW = resizeStartSize.X + delta.X
  531.             local rawH = resizeStartSize.Y + delta.Y
  532.             local maxW = screenBounds.X - self.mainFrame.AbsolutePosition.X - 10
  533.             local maxH = screenBounds.Y - self.mainFrame.AbsolutePosition.Y - 10
  534.             local newW = math.clamp(rawW, minW, maxW)
  535.             if self._minimized then
  536.                 self._manualWidth = newW
  537.                 self.mainFrame.Size = UDim2.new(0, newW, 0, 40)
  538.             else
  539.                 local newH = math.clamp(rawH, minH, maxH)
  540.                 self._manualWidth = newW
  541.                 self._manualHeight = newH
  542.                 self.mainFrame.Size = UDim2.new(0, newW, 0, newH)
  543.                 self:_updateScroll()
  544.             end
  545.         end
  546.     end)
  547.  
  548.     conn(ui.InputEnded, function(inp)
  549.         if
  550.             inp.UserInputType == Enum.UserInputType.MouseButton1
  551.             or inp.UserInputType == Enum.UserInputType.Touch
  552.         then
  553.             resizeDragging = false
  554.         end
  555.     end)
  556.  
  557.     local dragActive = false
  558.     local dragOrigin = nil
  559.     local dragStartPos = nil
  560.  
  561.     conn(self.titleBar.InputBegan, function(inp)
  562.         if
  563.             inp.UserInputType == Enum.UserInputType.MouseButton1
  564.             or inp.UserInputType == Enum.UserInputType.Touch
  565.         then
  566.             dragActive = true
  567.             dragOrigin = inp.Position
  568.             dragStartPos = self.mainFrame.Position
  569.         end
  570.     end)
  571.  
  572.     conn(ui.InputChanged, function(inp)
  573.         if
  574.             dragActive
  575.             and (
  576.                 inp.UserInputType == Enum.UserInputType.MouseMovement
  577.                 or inp.UserInputType == Enum.UserInputType.Touch
  578.             )
  579.         then
  580.             local delta = inp.Position - dragOrigin
  581.             local newX = dragStartPos.X.Offset + delta.X
  582.             local newY = dragStartPos.Y.Offset + delta.Y
  583.             self.mainFrame.Position = UDim2.new(
  584.                 dragStartPos.X.Scale,
  585.                 newX,
  586.                 dragStartPos.Y.Scale,
  587.                 newY
  588.             )
  589.         end
  590.     end)
  591.  
  592.     conn(ui.InputEnded, function(inp)
  593.         if
  594.             inp.UserInputType == Enum.UserInputType.MouseButton1
  595.             or inp.UserInputType == Enum.UserInputType.Touch
  596.         then
  597.             dragActive = false
  598.         end
  599.     end)
  600.  
  601.     conn(self.minimizeBtn.MouseButton1Click, function()
  602.         self:minimize()
  603.     end)
  604.  
  605.     conn(self.closeBtn.MouseButton1Click, function()
  606.         for _, fn in ipairs(self._closeCallbacks) do
  607.             pcall(fn)
  608.         end
  609.         if activeInstances[self._titleKey] then
  610.             for i, v in ipairs(activeInstances[self._titleKey]) do
  611.                 if v == self then
  612.                     table.remove(activeInstances[self._titleKey], i)
  613.                     break
  614.                 end
  615.             end
  616.             if #activeInstances[self._titleKey] == 0 then
  617.                 activeInstances[self._titleKey] = nil
  618.             end
  619.         end
  620.         disconnectAll()
  621.         if self.screenGui and self.screenGui.Parent then
  622.             self.screenGui:Destroy()
  623.         end
  624.     end)
  625.  
  626.     conn(self.minimizeBtn.MouseEnter, function()
  627.         tween(self.minimizeBtn, { BackgroundTransparency = 0.1 }, 0.15)
  628.     end)
  629.     conn(self.minimizeBtn.MouseLeave, function()
  630.         tween(self.minimizeBtn, { BackgroundTransparency = 0.4 }, 0.15)
  631.     end)
  632.     conn(self.closeBtn.MouseEnter, function()
  633.         tween(self.closeBtn, { BackgroundTransparency = 0.1 }, 0.15)
  634.     end)
  635.     conn(self.closeBtn.MouseLeave, function()
  636.         tween(self.closeBtn, { BackgroundTransparency = 0.4 }, 0.15)
  637.     end)
  638.  
  639.     conn(ui.InputBegan, function(inp, gameProcessed)
  640.         if gameProcessed then return end
  641.         if self._closed then return end
  642.         if inp.KeyCode == self._hideKey then
  643.             self.mainFrame.Visible = not self.mainFrame.Visible
  644.         end
  645.         if not self._listening then
  646.             for _, kb in pairs(self._keybinds) do
  647.                 if inp.KeyCode == kb.keyCode then
  648.                     pcall(kb.callback)
  649.                 end
  650.             end
  651.         end
  652.     end)
  653.  
  654.     conn(self.listLayout:GetPropertyChangedSignal("AbsoluteContentSize"), function()
  655.         self:_scheduleResize()
  656.     end)
  657.  
  658.     self:_updateScroll()
  659.     return self
  660. end
  661.  
  662. function LibClass:_scheduleResize()
  663.     if self._resizePending then return end
  664.     self._resizePending = true
  665.     task.defer(function()
  666.         self._resizePending = false
  667.         if self._destroyed then return end
  668.         if not self.mainFrame or not self.mainFrame.Parent then return end
  669.         self:resize()
  670.     end)
  671. end
  672.  
  673. function LibClass:_updateScroll()
  674.     local tabOffset = self.tabContainer.Visible and 32 or 0
  675.     local contentSize = self._activeTab
  676.         and self._activeTab.listLayout.AbsoluteContentSize.Y + 8
  677.         or self.listLayout.AbsoluteContentSize.Y + 8
  678.  
  679.     self.scrollFrame.CanvasSize = UDim2.new(0, 0, 0, contentSize)
  680.     if tabOffset > 0 then
  681.         self.scrollFrame.Size = UDim2.new(1, -16, 1, -36)
  682.         self.scrollFrame.Position = UDim2.new(0, 8, 0, 32)
  683.     else
  684.         self.scrollFrame.Size = UDim2.new(1, -16, 1, -8)
  685.         self.scrollFrame.Position = UDim2.new(0, 8, 0, 4)
  686.     end
  687. end
  688.  
  689. function LibClass:resize()
  690.     if self._minimized then return end
  691.     self:_updateScroll()
  692.     if self._userResized then return end
  693.  
  694.     local tabOffset = self.tabContainer.Visible and 32 or 0
  695.     local contentSize = self._activeTab
  696.         and self._activeTab.listLayout.AbsoluteContentSize.Y + 8
  697.         or self.listLayout.AbsoluteContentSize.Y + 8
  698.  
  699.     local targetH = math.min(contentSize + tabOffset, 460)
  700.     local finalH = math.max(40 + math.max(targetH, 20), 60)
  701.     local curSize = self.mainFrame.Size
  702.  
  703.     if math.abs(curSize.Y.Offset - finalH) > 0.5 then
  704.         for _, t in ipairs(self._activeTweens) do
  705.             pcall(function() t:Cancel() end)
  706.         end
  707.         self._activeTweens = {}
  708.         local t = tween(self.mainFrame, { Size = UDim2.new(0, curSize.X.Offset, 0, finalH) }, 0.2)
  709.         table.insert(self._activeTweens, t)
  710.         t.Completed:Connect(function()
  711.             for i, v in ipairs(self._activeTweens) do
  712.                 if v == t then
  713.                     table.remove(self._activeTweens, i)
  714.                     break
  715.                 end
  716.             end
  717.         end)
  718.     end
  719. end
  720.  
  721. function LibClass:minimize()
  722.     if self._animating then return end
  723.     self._animating = true
  724.  
  725.     if not self._minimized then
  726.         self._minimized = true
  727.         self.minimizeBtn.Text = "+"
  728.         local cw = self.mainFrame.AbsoluteSize.X
  729.         local tweenDone = false
  730.         local t = tween(self.mainFrame, { Size = UDim2.new(0, cw, 0, 40) }, 0.3)
  731.         t.Completed:Connect(function()
  732.             if not tweenDone then
  733.                 tweenDone = true
  734.                 self.contentFrame.Visible = false
  735.                 self._animating = false
  736.             end
  737.         end)
  738.     else
  739.         self._minimized = false
  740.         self.minimizeBtn.Text = "—"
  741.         self.contentFrame.Visible = true
  742.         if self._userResized then
  743.             self:_updateScroll()
  744.             local t = tween(self.mainFrame, { Size = UDim2.new(0, self._manualWidth, 0, self._manualHeight) }, 0.3)
  745.             t.Completed:Connect(function()
  746.                 self._animating = false
  747.             end)
  748.         else
  749.             local tabOffset = self.tabContainer.Visible and 32 or 0
  750.             local contentSize = self._activeTab
  751.                 and self._activeTab.listLayout.AbsoluteContentSize.Y + 8
  752.                 or self.listLayout.AbsoluteContentSize.Y + 8
  753.             local targetH = math.min(contentSize + tabOffset, 460)
  754.             local finalH = math.max(40 + math.max(targetH, 20), 60)
  755.             local curW = self.mainFrame.AbsoluteSize.X
  756.             local t = tween(self.mainFrame, { Size = UDim2.new(0, curW, 0, finalH) }, 0.3)
  757.             t.Completed:Connect(function()
  758.                 self:_updateScroll()
  759.                 self._animating = false
  760.             end)
  761.         end
  762.     end
  763. end
  764.  
  765. function LibClass:addTab(name)
  766.     local tabData = {
  767.         name = name,
  768.         lib = self,
  769.         items = {},
  770.         orderCounter = makeOrderCounter(),
  771.     }
  772.  
  773.     local btn = make("TextButton", {
  774.         Size = UDim2.new(0, 0, 1, 0),
  775.         AutomaticSize = Enum.AutomaticSize.X,
  776.         BackgroundColor3 = Color3.fromRGB(30, 30, 30),
  777.         BackgroundTransparency = 0.4,
  778.         Text = "  " .. name .. "  ",
  779.         TextColor3 = Color3.fromRGB(200, 200, 200),
  780.         TextSize = 11,
  781.         Font = Enum.Font.Gotham,
  782.         BorderSizePixel = 0,
  783.         LayoutOrder = #self._tabs + 1,
  784.         Parent = self.tabContainer,
  785.     })
  786.     addCorner(btn, 8)
  787.     tabData.btn = btn
  788.  
  789.     tabData.frame = make("Frame", {
  790.         Size = UDim2.new(1, 0, 0, 0),
  791.         BackgroundTransparency = 1,
  792.         Visible = false,
  793.         Parent = self.scrollFrame,
  794.     })
  795.  
  796.     tabData.listLayout = make("UIListLayout", {
  797.         Padding = UDim.new(0, 6),
  798.         SortOrder = Enum.SortOrder.LayoutOrder,
  799.         Parent = tabData.frame,
  800.     })
  801.  
  802.     make("UIPadding", {
  803.         PaddingTop = UDim.new(0, 2),
  804.         PaddingBottom = UDim.new(0, 4),
  805.         Parent = tabData.frame,
  806.     })
  807.  
  808.     local libRef = self
  809.     self._conn(tabData.listLayout:GetPropertyChangedSignal("AbsoluteContentSize"), function()
  810.         if libRef._destroyed then return end
  811.         libRef:_scheduleResize()
  812.         tabData.frame.Size = UDim2.new(1, 0, 0, tabData.listLayout.AbsoluteContentSize.Y + 8)
  813.     end)
  814.  
  815.     table.insert(self._tabs, tabData)
  816.     self.tabContainer.Visible = #self._tabs > 1
  817.  
  818.     if self.tabContainer.Visible then
  819.         self.scrollFrame.Parent = self.contentFrame
  820.         self.listLayout.Parent = nil
  821.     end
  822.  
  823.     self._conn(btn.MouseButton1Click, function()
  824.         self:switchTab(tabData)
  825.     end)
  826.  
  827.     if #self._tabs == 1 then
  828.         self:switchTab(tabData)
  829.     end
  830.  
  831.     self:resize()
  832.     return tabData
  833. end
  834.  
  835. function LibClass:switchTab(tabData)
  836.     for _, other in pairs(self._tabs) do
  837.         other.frame.Visible = false
  838.         tween(other.btn, {
  839.             BackgroundTransparency = 0.6,
  840.             TextColor3 = Color3.fromRGB(160, 160, 160),
  841.         }, 0.15)
  842.     end
  843.     tabData.frame.Visible = true
  844.     tween(tabData.btn, {
  845.         BackgroundTransparency = 0.1,
  846.         TextColor3 = Color3.fromRGB(255, 255, 255),
  847.     }, 0.15)
  848.     self._activeTab = tabData
  849.     self:_updateScroll()
  850.     self:resize()
  851. end
  852.  
  853. function LibClass:_getTarget()
  854.     if self._activeTab then
  855.         return self._activeTab.frame, self._activeTab.listLayout, self._activeTab.orderCounter()
  856.     end
  857.     return self.scrollFrame, self.listLayout, self._orderCounter()
  858. end
  859.  
  860. function LibClass:addButton(name, callback)
  861.     local parent, _, layoutOrder = self:_getTarget()
  862.     local row = makeRow(parent, layoutOrder)
  863.  
  864.     local btn = make("TextButton", {
  865.         Size = UDim2.new(1, -16, 0, 0),
  866.         AutomaticSize = Enum.AutomaticSize.Y,
  867.         Position = UDim2.new(0, 8, 0, 0),
  868.         BackgroundColor3 = Color3.fromRGB(35, 35, 35),
  869.         BackgroundTransparency = 0.3,
  870.         Text = name,
  871.         TextColor3 = Color3.fromRGB(255, 255, 255),
  872.         TextSize = 12,
  873.         Font = Enum.Font.Gotham,
  874.         BorderSizePixel = 0,
  875.         TextWrapped = true,
  876.         TextXAlignment = Enum.TextXAlignment.Center,
  877.         Parent = row,
  878.     })
  879.     make("UIPadding", {
  880.         PaddingTop = UDim.new(0, 7),
  881.         PaddingBottom = UDim.new(0, 7),
  882.         PaddingLeft = UDim.new(0, 8),
  883.         PaddingRight = UDim.new(0, 8),
  884.         Parent = btn,
  885.     })
  886.     addCorner(btn, 8)
  887.  
  888.     self._conn(btn.MouseEnter, function()
  889.         tween(btn, { BackgroundTransparency = 0.05 }, 0.1)
  890.     end)
  891.     self._conn(btn.MouseLeave, function()
  892.         tween(btn, { BackgroundTransparency = 0.3 }, 0.1)
  893.     end)
  894.     self._conn(btn.MouseButton1Click, function()
  895.         tween(btn, { BackgroundTransparency = 0.3 }, 0.1)
  896.         if callback then pcall(callback) end
  897.     end)
  898.  
  899.     if self._activeTab then
  900.         table.insert(self._activeTab.items, row)
  901.     end
  902.     self:resize()
  903.  
  904.     return {
  905.         setText = function(text)
  906.             btn.Text = text
  907.         end,
  908.         getText = function()
  909.             return btn.Text
  910.         end,
  911.     }
  912. end
  913.  
  914. function LibClass:addToggle(name, default, callback)
  915.     local parent, _, layoutOrder = self:_getTarget()
  916.     local row = makeRow(parent, layoutOrder)
  917.     local state = default or false
  918.  
  919.     local inner = make("Frame", {
  920.         Size = UDim2.new(1, 0, 0, 0),
  921.         AutomaticSize = Enum.AutomaticSize.Y,
  922.         BackgroundTransparency = 1,
  923.         Parent = row,
  924.     })
  925.     make("UIPadding", {
  926.         PaddingLeft = UDim.new(0, 12),
  927.         PaddingRight = UDim.new(0, 12),
  928.         Parent = inner,
  929.     })
  930.     make("UIListLayout", {
  931.         FillDirection = Enum.FillDirection.Horizontal,
  932.         VerticalAlignment = Enum.VerticalAlignment.Center,
  933.         SortOrder = Enum.SortOrder.LayoutOrder,
  934.         Parent = inner,
  935.     })
  936.  
  937.     make("TextLabel", {
  938.         Size = UDim2.new(1, -60, 0, 26),
  939.         AutomaticSize = Enum.AutomaticSize.Y,
  940.         BackgroundTransparency = 1,
  941.         Text = name,
  942.         TextColor3 = Color3.fromRGB(220, 220, 220),
  943.         TextSize = 12,
  944.         Font = Enum.Font.Gotham,
  945.         TextXAlignment = Enum.TextXAlignment.Left,
  946.         TextWrapped = true,
  947.         LayoutOrder = 1,
  948.         Parent = inner,
  949.     })
  950.  
  951.     local track = make("Frame", {
  952.         Size = UDim2.new(0, 36, 0, 20),
  953.         BackgroundColor3 = state and Color3.fromRGB(80, 200, 120) or Color3.fromRGB(60, 60, 60),
  954.         BorderSizePixel = 0,
  955.         LayoutOrder = 2,
  956.         Parent = inner,
  957.     })
  958.     addCorner(track, 10)
  959.  
  960.     local knob = make("Frame", {
  961.         Size = UDim2.new(0, 14, 0, 14),
  962.         Position = UDim2.new(0, state and 19 or 3, 0.5, -7),
  963.         BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  964.         BorderSizePixel = 0,
  965.         Parent = track,
  966.     })
  967.     addCorner(knob, 7)
  968.  
  969.     local function updateVisual(val)
  970.         tween(track, { BackgroundColor3 = val and Color3.fromRGB(80, 200, 120) or Color3.fromRGB(60, 60, 60) }, 0.15)
  971.         tween(knob, { Position = UDim2.new(0, val and 19 or 3, 0.5, -7) }, 0.15)
  972.     end
  973.  
  974.     local function setValue(val, fireCallback)
  975.         state = val
  976.         updateVisual(val)
  977.         if fireCallback and callback then
  978.             pcall(callback, val)
  979.         end
  980.     end
  981.  
  982.     self._conn(track.InputBegan, function(inp)
  983.         if
  984.             inp.UserInputType == Enum.UserInputType.MouseButton1
  985.             or inp.UserInputType == Enum.UserInputType.Touch
  986.         then
  987.             setValue(not state, true)
  988.         end
  989.     end)
  990.  
  991.     if self._activeTab then
  992.         table.insert(self._activeTab.items, row)
  993.     end
  994.     self:resize()
  995.  
  996.     local obj = {}
  997.     local mt = {}
  998.     mt.__index = function(_, k)
  999.         if k == "Value" then return state end
  1000.         return nil
  1001.     end
  1002.     mt.__newindex = function(_, k, v)
  1003.         if k == "Value" then
  1004.             setValue(v, false)
  1005.         else
  1006.             rawset(obj, k, v)
  1007.         end
  1008.     end
  1009.     setmetatable(obj, mt)
  1010.  
  1011.     obj.set = function(v, silent)
  1012.         setValue(v, not silent)
  1013.     end
  1014.     obj.get = function()
  1015.         return state
  1016.     end
  1017.  
  1018.     self._toggles[name] = obj
  1019.     return obj
  1020. end
  1021.  
  1022. function LibClass:addSlider(name, min, max, default, step, callback)
  1023.     if type(step) == "function" then
  1024.         callback = step
  1025.         step = 1
  1026.     end
  1027.     step = (type(step) == "number" and step > 0) and step or 1
  1028.     if min >= max then
  1029.         return {
  1030.             set = function() end,
  1031.             get = function() return min end,
  1032.         }
  1033.     end
  1034.  
  1035.     local range = max - min
  1036.     local steps = math.round(range / step)
  1037.     local correctedMax = min + steps * step
  1038.  
  1039.     local parent, _, layoutOrder = self:_getTarget()
  1040.     local row = makeRow(parent, layoutOrder)
  1041.     local current = math.clamp(default or min, min, correctedMax)
  1042.     current = min + math.round((current - min) / step) * step
  1043.  
  1044.     local inner = make("Frame", {
  1045.         Size = UDim2.new(1, 0, 0, 0),
  1046.         AutomaticSize = Enum.AutomaticSize.Y,
  1047.         BackgroundTransparency = 1,
  1048.         Parent = row,
  1049.     })
  1050.     make("UIListLayout", {
  1051.         Padding = UDim.new(0, 2),
  1052.         SortOrder = Enum.SortOrder.LayoutOrder,
  1053.         Parent = inner,
  1054.     })
  1055.  
  1056.     local headerRow = make("Frame", {
  1057.         Size = UDim2.new(1, 0, 0, 20),
  1058.         BackgroundTransparency = 1,
  1059.         LayoutOrder = 1,
  1060.         Parent = inner,
  1061.     })
  1062.     make("UIPadding", {
  1063.         PaddingLeft = UDim.new(0, 12),
  1064.         PaddingRight = UDim.new(0, 12),
  1065.         Parent = headerRow,
  1066.     })
  1067.  
  1068.     make("TextLabel", {
  1069.         Size = UDim2.new(1, -60, 1, 0),
  1070.         BackgroundTransparency = 1,
  1071.         Text = name,
  1072.         TextColor3 = Color3.fromRGB(220, 220, 220),
  1073.         TextSize = 12,
  1074.         Font = Enum.Font.Gotham,
  1075.         TextXAlignment = Enum.TextXAlignment.Left,
  1076.         TextWrapped = true,
  1077.         Parent = headerRow,
  1078.     })
  1079.  
  1080.     local valueLabel = make("TextLabel", {
  1081.         Size = UDim2.new(0, 55, 1, 0),
  1082.         Position = UDim2.new(1, -55, 0, 0),
  1083.         BackgroundTransparency = 1,
  1084.         Text = tostring(current),
  1085.         TextColor3 = Color3.fromRGB(160, 160, 160),
  1086.         TextSize = 11,
  1087.         Font = Enum.Font.Gotham,
  1088.         TextXAlignment = Enum.TextXAlignment.Right,
  1089.         Parent = headerRow,
  1090.     })
  1091.  
  1092.     local sliderRow = make("Frame", {
  1093.         Size = UDim2.new(1, 0, 0, 18),
  1094.         BackgroundTransparency = 1,
  1095.         LayoutOrder = 2,
  1096.         Parent = inner,
  1097.     })
  1098.     make("UIPadding", {
  1099.         PaddingLeft = UDim.new(0, 12),
  1100.         PaddingRight = UDim.new(0, 12),
  1101.         Parent = sliderRow,
  1102.     })
  1103.  
  1104.     local track = make("Frame", {
  1105.         Size = UDim2.new(1, 0, 0, 6),
  1106.         Position = UDim2.new(0, 0, 0.5, -3),
  1107.         BackgroundColor3 = Color3.fromRGB(40, 40, 40),
  1108.         BorderSizePixel = 0,
  1109.         Parent = sliderRow,
  1110.     })
  1111.     addCorner(track, 3)
  1112.  
  1113.     local function getProgress(val)
  1114.         return (val - min) / (correctedMax - min)
  1115.     end
  1116.  
  1117.     local fill = make("Frame", {
  1118.         Size = UDim2.new(getProgress(current), 0, 1, 0),
  1119.         BackgroundColor3 = Color3.fromRGB(80, 200, 120),
  1120.         BorderSizePixel = 0,
  1121.         Parent = track,
  1122.     })
  1123.     addCorner(fill, 3)
  1124.  
  1125.     local knob = make("Frame", {
  1126.         Size = UDim2.new(0, 14, 0, 14),
  1127.         AnchorPoint = Vector2.new(0.5, 0.5),
  1128.         Position = UDim2.new(getProgress(current), 0, 0.5, 0),
  1129.         BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  1130.         BorderSizePixel = 0,
  1131.         ZIndex = 3,
  1132.         Parent = track,
  1133.     })
  1134.     addCorner(knob, 7)
  1135.  
  1136.     local function snapValue(raw)
  1137.         local stepped = min + math.round((raw - min) / step) * step
  1138.         return math.clamp(stepped, min, correctedMax)
  1139.     end
  1140.  
  1141.     local function applyValue(x)
  1142.         local ratio = math.clamp((x - track.AbsolutePosition.X) / track.AbsoluteSize.X, 0, 1)
  1143.         local raw = min + ratio * (correctedMax - min)
  1144.         local snapped = snapValue(raw)
  1145.         current = snapped
  1146.         local p = getProgress(snapped)
  1147.         fill.Size = UDim2.new(p, 0, 1, 0)
  1148.         knob.Position = UDim2.new(p, 0, 0.5, 0)
  1149.         valueLabel.Text = tostring(snapped)
  1150.         if callback then pcall(callback, snapped) end
  1151.     end
  1152.  
  1153.     local sliderDragging = false
  1154.     self._conn(ui.InputChanged, function(inp)
  1155.         if
  1156.             sliderDragging
  1157.             and (
  1158.                 inp.UserInputType == Enum.UserInputType.MouseMovement
  1159.                 or inp.UserInputType == Enum.UserInputType.Touch
  1160.             )
  1161.         then
  1162.             applyValue(inp.Position.X)
  1163.         end
  1164.     end)
  1165.     self._conn(ui.InputEnded, function(inp)
  1166.         if
  1167.             inp.UserInputType == Enum.UserInputType.MouseButton1
  1168.             or inp.UserInputType == Enum.UserInputType.Touch
  1169.         then
  1170.             sliderDragging = false
  1171.         end
  1172.     end)
  1173.     self._conn(track.InputBegan, function(inp)
  1174.         if
  1175.             inp.UserInputType == Enum.UserInputType.MouseButton1
  1176.             or inp.UserInputType == Enum.UserInputType.Touch
  1177.         then
  1178.             sliderDragging = true
  1179.             applyValue(inp.Position.X)
  1180.         end
  1181.     end)
  1182.  
  1183.     if self._activeTab then
  1184.         table.insert(self._activeTab.items, row)
  1185.     end
  1186.     self:resize()
  1187.  
  1188.     return {
  1189.         set = function(v)
  1190.             current = snapValue(v)
  1191.             local p = getProgress(current)
  1192.             fill.Size = UDim2.new(p, 0, 1, 0)
  1193.             knob.Position = UDim2.new(p, 0, 0.5, 0)
  1194.             valueLabel.Text = tostring(current)
  1195.         end,
  1196.         get = function()
  1197.             return current
  1198.         end,
  1199.     }
  1200. end
  1201.  
  1202. function LibClass:addTextBox(name, placeholder, maxLength, callback)
  1203.     if type(maxLength) == "function" then
  1204.         callback = maxLength
  1205.         maxLength = 200
  1206.     end
  1207.     maxLength = maxLength or 200
  1208.  
  1209.     local parent, _, layoutOrder = self:_getTarget()
  1210.     local row = makeRow(parent, layoutOrder)
  1211.  
  1212.     local inner = make("Frame", {
  1213.         Size = UDim2.new(1, 0, 0, 0),
  1214.         AutomaticSize = Enum.AutomaticSize.Y,
  1215.         BackgroundTransparency = 1,
  1216.         Parent = row,
  1217.     })
  1218.     make("UIListLayout", {
  1219.         Padding = UDim.new(0, 4),
  1220.         SortOrder = Enum.SortOrder.LayoutOrder,
  1221.         Parent = inner,
  1222.     })
  1223.     make("UIPadding", {
  1224.         PaddingLeft = UDim.new(0, 10),
  1225.         PaddingRight = UDim.new(0, 10),
  1226.         Parent = inner,
  1227.     })
  1228.  
  1229.     make("TextLabel", {
  1230.         Size = UDim2.new(1, 0, 0, 16),
  1231.         BackgroundTransparency = 1,
  1232.         Text = name,
  1233.         TextColor3 = Color3.fromRGB(200, 200, 200),
  1234.         TextSize = 11,
  1235.         Font = Enum.Font.Gotham,
  1236.         TextXAlignment = Enum.TextXAlignment.Left,
  1237.         TextWrapped = true,
  1238.         AutomaticSize = Enum.AutomaticSize.Y,
  1239.         LayoutOrder = 1,
  1240.         Parent = inner,
  1241.     })
  1242.  
  1243.     local box = make("TextBox", {
  1244.         Size = UDim2.new(1, 0, 0, 26),
  1245.         BackgroundColor3 = Color3.fromRGB(15, 15, 15),
  1246.         BackgroundTransparency = 0.3,
  1247.         PlaceholderText = placeholder or "",
  1248.         Text = "",
  1249.         TextColor3 = Color3.fromRGB(255, 255, 255),
  1250.         PlaceholderColor3 = Color3.fromRGB(100, 100, 100),
  1251.         TextSize = 11,
  1252.         Font = Enum.Font.Gotham,
  1253.         BorderSizePixel = 0,
  1254.         ClearTextOnFocus = false,
  1255.         LayoutOrder = 2,
  1256.         Parent = inner,
  1257.     })
  1258.     addCorner(box, 6)
  1259.  
  1260.     self._conn(box:GetPropertyChangedSignal("Text"), function()
  1261.         if #box.Text > maxLength then
  1262.             box.Text = box.Text:sub(1, maxLength)
  1263.         end
  1264.     end)
  1265.  
  1266.     self._conn(box.FocusLost, function(enterPressed)
  1267.         if enterPressed and callback then
  1268.             pcall(callback, box.Text)
  1269.         end
  1270.     end)
  1271.  
  1272.     if self._activeTab then
  1273.         table.insert(self._activeTab.items, row)
  1274.     end
  1275.     self:resize()
  1276.  
  1277.     return {
  1278.         get = function() return box.Text end,
  1279.         set = function(v) box.Text = tostring(v):sub(1, maxLength) end,
  1280.         clear = function() box.Text = "" end,
  1281.     }
  1282. end
  1283.  
  1284. function LibClass:addDropdown(name, options, default, callback)
  1285.     if not options or #options == 0 then
  1286.         options = { "" }
  1287.     end
  1288.  
  1289.     local parent, _, layoutOrder = self:_getTarget()
  1290.     local row = makeRow(parent, layoutOrder)
  1291.     local isOpen = false
  1292.     local selected = default or options[1]
  1293.     local currentOptions = { table.unpack(options) }
  1294.  
  1295.     local inner = make("Frame", {
  1296.         Size = UDim2.new(1, 0, 0, 0),
  1297.         AutomaticSize = Enum.AutomaticSize.Y,
  1298.         BackgroundTransparency = 1,
  1299.         Parent = row,
  1300.     })
  1301.     make("UIPadding", {
  1302.         PaddingLeft = UDim.new(0, 12),
  1303.         PaddingRight = UDim.new(0, 12),
  1304.         Parent = inner,
  1305.     })
  1306.     make("UIListLayout", {
  1307.         FillDirection = Enum.FillDirection.Horizontal,
  1308.         VerticalAlignment = Enum.VerticalAlignment.Center,
  1309.         SortOrder = Enum.SortOrder.LayoutOrder,
  1310.         Parent = inner,
  1311.     })
  1312.  
  1313.     make("TextLabel", {
  1314.         Size = UDim2.new(0.5, 0, 0, 26),
  1315.         AutomaticSize = Enum.AutomaticSize.Y,
  1316.         BackgroundTransparency = 1,
  1317.         Text = name,
  1318.         TextColor3 = Color3.fromRGB(220, 220, 220),
  1319.         TextSize = 12,
  1320.         Font = Enum.Font.Gotham,
  1321.         TextXAlignment = Enum.TextXAlignment.Left,
  1322.         TextWrapped = true,
  1323.         LayoutOrder = 1,
  1324.         Parent = inner,
  1325.     })
  1326.  
  1327.     local dropBtn = make("TextButton", {
  1328.         Size = UDim2.new(0.5, -8, 0, 24),
  1329.         BackgroundColor3 = Color3.fromRGB(30, 30, 30),
  1330.         BackgroundTransparency = 0.3,
  1331.         Text = tostring(selected) .. " ▾",
  1332.         TextColor3 = Color3.fromRGB(220, 220, 220),
  1333.         TextSize = 11,
  1334.         Font = Enum.Font.Gotham,
  1335.         BorderSizePixel = 0,
  1336.         TextTruncate = Enum.TextTruncate.AtEnd,
  1337.         LayoutOrder = 2,
  1338.         Parent = inner,
  1339.     })
  1340.     addCorner(dropBtn, 7)
  1341.  
  1342.     local panel = make("Frame", {
  1343.         Size = UDim2.new(0, 140, 0, 0),
  1344.         BackgroundColor3 = Color3.fromRGB(18, 18, 18),
  1345.         BackgroundTransparency = 0.1,
  1346.         BorderSizePixel = 0,
  1347.         ZIndex = 30,
  1348.         Visible = false,
  1349.         Parent = self.screenGui,
  1350.     })
  1351.     addCorner(panel, 8)
  1352.     make("UIStroke", {
  1353.         Color = Color3.fromRGB(50, 50, 50),
  1354.         Thickness = 1,
  1355.         Parent = panel,
  1356.     })
  1357.  
  1358.     local panelLayout = make("UIListLayout", {
  1359.         Padding = UDim.new(0, 2),
  1360.         SortOrder = Enum.SortOrder.LayoutOrder,
  1361.         Parent = panel,
  1362.     })
  1363.     make("UIPadding", {
  1364.         PaddingTop = UDim.new(0, 4),
  1365.         PaddingBottom = UDim.new(0, 4),
  1366.         PaddingLeft = UDim.new(0, 4),
  1367.         PaddingRight = UDim.new(0, 4),
  1368.         Parent = panel,
  1369.     })
  1370.  
  1371.     self._conn(panelLayout:GetPropertyChangedSignal("AbsoluteContentSize"), function()
  1372.         if not panel.Parent then return end
  1373.         local vp = workspace.CurrentCamera and workspace.CurrentCamera.ViewportSize or Vector2.new(1920, 1080)
  1374.         local contentH = panelLayout.AbsoluteContentSize.Y + 8
  1375.         local maxH = vp.Y - panel.AbsolutePosition.Y - 10
  1376.         panel.Size = UDim2.new(0, 140, 0, math.min(contentH, math.max(maxH, 30)))
  1377.     end)
  1378.  
  1379.     local optionConns = {}
  1380.     local optionConnSet = {}
  1381.  
  1382.     local function closePanel()
  1383.         isOpen = false
  1384.         panel.Visible = false
  1385.     end
  1386.  
  1387.     local function updatePanelPosition()
  1388.         local ap = dropBtn.AbsolutePosition
  1389.         local as = dropBtn.AbsoluteSize
  1390.         local vp = workspace.CurrentCamera and workspace.CurrentCamera.ViewportSize or Vector2.new(1920, 1080)
  1391.         local panelH = panel.AbsoluteSize.Y
  1392.         local yBelow = ap.Y + as.Y + 2
  1393.         local yAbove = ap.Y - panelH - 2
  1394.         local finalY = (yBelow + panelH > vp.Y) and yAbove or yBelow
  1395.         local finalX = math.clamp(ap.X, 4, vp.X - 144)
  1396.         panel.Position = UDim2.new(0, finalX, 0, finalY)
  1397.     end
  1398.  
  1399.     local function buildOption(index, value)
  1400.         local optBtn = make("TextButton", {
  1401.             Size = UDim2.new(1, 0, 0, 24),
  1402.             BackgroundColor3 = Color3.fromRGB(30, 30, 30),
  1403.             BackgroundTransparency = 0.5,
  1404.             Text = value,
  1405.             TextColor3 = Color3.fromRGB(220, 220, 220),
  1406.             TextSize = 11,
  1407.             Font = Enum.Font.Gotham,
  1408.             BorderSizePixel = 0,
  1409.             ZIndex = 31,
  1410.             LayoutOrder = index,
  1411.             Parent = panel,
  1412.         })
  1413.         addCorner(optBtn, 6)
  1414.  
  1415.         local c1 = optBtn.MouseEnter:Connect(function()
  1416.             tween(optBtn, { BackgroundTransparency = 0.1 }, 0.1)
  1417.         end)
  1418.         local c2 = optBtn.MouseLeave:Connect(function()
  1419.             tween(optBtn, { BackgroundTransparency = 0.5 }, 0.1)
  1420.         end)
  1421.         local c3 = optBtn.MouseButton1Click:Connect(function()
  1422.             selected = value
  1423.             dropBtn.Text = tostring(value) .. " ▾"
  1424.             closePanel()
  1425.             if callback then pcall(callback, value) end
  1426.         end)
  1427.  
  1428.         table.insert(optionConns, c1)
  1429.         table.insert(optionConns, c2)
  1430.         table.insert(optionConns, c3)
  1431.         optionConnSet[c1] = true
  1432.         optionConnSet[c2] = true
  1433.         optionConnSet[c3] = true
  1434.         table.insert(self._conns, c1)
  1435.         table.insert(self._conns, c2)
  1436.         table.insert(self._conns, c3)
  1437.     end
  1438.  
  1439.     for i, v in ipairs(currentOptions) do
  1440.         buildOption(i, v)
  1441.     end
  1442.  
  1443.     self._conn(dropBtn.MouseButton1Click, function()
  1444.         if isOpen then
  1445.             closePanel()
  1446.         else
  1447.             isOpen = true
  1448.             updatePanelPosition()
  1449.             panel.Visible = true
  1450.         end
  1451.     end)
  1452.  
  1453.     self._conn(dropBtn:GetPropertyChangedSignal("AbsolutePosition"), function()
  1454.         if isOpen then
  1455.             updatePanelPosition()
  1456.         end
  1457.     end)
  1458.  
  1459.     if self._activeTab then
  1460.         table.insert(self._activeTab.items, row)
  1461.     end
  1462.     self:resize()
  1463.  
  1464.     return {
  1465.         get = function() return selected end,
  1466.         set = function(v)
  1467.             selected = v
  1468.             dropBtn.Text = tostring(v) .. " ▾"
  1469.         end,
  1470.         refresh = function(newOptions)
  1471.             if not newOptions or #newOptions == 0 then
  1472.                 newOptions = { "" }
  1473.             end
  1474.             currentOptions = { table.unpack(newOptions) }
  1475.  
  1476.             for _, c in ipairs(optionConns) do
  1477.                 if c and c.Connected then
  1478.                     c:Disconnect()
  1479.                 end
  1480.             end
  1481.             for i = #self._conns, 1, -1 do
  1482.                 if optionConnSet[self._conns[i]] then
  1483.                     table.remove(self._conns, i)
  1484.                 end
  1485.             end
  1486.             optionConns = {}
  1487.             optionConnSet = {}
  1488.  
  1489.             for _, ch in pairs(panel:GetChildren()) do
  1490.                 if ch:IsA("TextButton") then
  1491.                     ch:Destroy()
  1492.                 end
  1493.             end
  1494.             for i, v in ipairs(currentOptions) do
  1495.                 buildOption(i, v)
  1496.             end
  1497.         end,
  1498.         destroy = function()
  1499.             closePanel()
  1500.             for _, c in ipairs(optionConns) do
  1501.                 if c and c.Connected then c:Disconnect() end
  1502.             end
  1503.             for i = #self._conns, 1, -1 do
  1504.                 if optionConnSet[self._conns[i]] then
  1505.                     table.remove(self._conns, i)
  1506.                 end
  1507.             end
  1508.             optionConns = {}
  1509.             optionConnSet = {}
  1510.             panel:Destroy()
  1511.         end,
  1512.     }
  1513. end
  1514.  
  1515. function LibClass:addKeybind(name, defaultKey, callback)
  1516.     local parent, _, layoutOrder = self:_getTarget()
  1517.     local row = makeRow(parent, layoutOrder)
  1518.     local currentKey = defaultKey
  1519.     local isListening = false
  1520.     local listenConn = nil
  1521.  
  1522.     local inner = make("Frame", {
  1523.         Size = UDim2.new(1, 0, 0, 0),
  1524.         AutomaticSize = Enum.AutomaticSize.Y,
  1525.         BackgroundTransparency = 1,
  1526.         Parent = row,
  1527.     })
  1528.     make("UIPadding", {
  1529.         PaddingLeft = UDim.new(0, 12),
  1530.         PaddingRight = UDim.new(0, 12),
  1531.         Parent = inner,
  1532.     })
  1533.     make("UIListLayout", {
  1534.         FillDirection = Enum.FillDirection.Horizontal,
  1535.         VerticalAlignment = Enum.VerticalAlignment.Center,
  1536.         SortOrder = Enum.SortOrder.LayoutOrder,
  1537.         Parent = inner,
  1538.     })
  1539.  
  1540.     make("TextLabel", {
  1541.         Size = UDim2.new(1, -90, 0, 26),
  1542.         AutomaticSize = Enum.AutomaticSize.Y,
  1543.         BackgroundTransparency = 1,
  1544.         Text = name,
  1545.         TextColor3 = Color3.fromRGB(220, 220, 220),
  1546.         TextSize = 12,
  1547.         Font = Enum.Font.Gotham,
  1548.         TextXAlignment = Enum.TextXAlignment.Left,
  1549.         TextWrapped = true,
  1550.         LayoutOrder = 1,
  1551.         Parent = inner,
  1552.     })
  1553.  
  1554.     local keyBtn = make("TextButton", {
  1555.         Size = UDim2.new(0, 76, 0, 24),
  1556.         BackgroundColor3 = Color3.fromRGB(30, 30, 30),
  1557.         BackgroundTransparency = 0.3,
  1558.         Text = currentKey and currentKey.Name or "None",
  1559.         TextColor3 = currentKey and Color3.fromRGB(80, 200, 120) or Color3.fromRGB(160, 160, 160),
  1560.         TextSize = 11,
  1561.         Font = Enum.Font.Gotham,
  1562.         BorderSizePixel = 0,
  1563.         LayoutOrder = 2,
  1564.         Parent = inner,
  1565.     })
  1566.     addCorner(keyBtn, 7)
  1567.  
  1568.     local function registerKey(keyCode)
  1569.         currentKey = keyCode
  1570.         self._keybinds[name] = { keyCode = keyCode, callback = callback or function() end }
  1571.     end
  1572.  
  1573.     local function clearKey()
  1574.         currentKey = nil
  1575.         keyBtn.Text = "None"
  1576.         keyBtn.TextColor3 = Color3.fromRGB(160, 160, 160)
  1577.         self._keybinds[name] = nil
  1578.     end
  1579.  
  1580.     local function removeListenConn()
  1581.         if listenConn then
  1582.             if listenConn.Connected then listenConn:Disconnect() end
  1583.             local target = listenConn
  1584.             listenConn = nil
  1585.             for i = #self._conns, 1, -1 do
  1586.                 if self._conns[i] == target then
  1587.                     table.remove(self._conns, i)
  1588.                     break
  1589.                 end
  1590.             end
  1591.         end
  1592.     end
  1593.  
  1594.     local function stopListening()
  1595.         isListening = false
  1596.         self._listening = false
  1597.         removeListenConn()
  1598.         keyBtn.Text = currentKey and currentKey.Name or "None"
  1599.         keyBtn.TextColor3 = currentKey and Color3.fromRGB(80, 200, 120) or Color3.fromRGB(160, 160, 160)
  1600.     end
  1601.  
  1602.     self._conn(keyBtn.MouseButton1Click, function()
  1603.         if self._closed then return end
  1604.         if isListening then
  1605.             stopListening()
  1606.             clearKey()
  1607.             return
  1608.         end
  1609.         removeListenConn()
  1610.         isListening = true
  1611.         self._listening = true
  1612.         keyBtn.Text = "..."
  1613.         keyBtn.TextColor3 = Color3.fromRGB(255, 200, 60)
  1614.  
  1615.         listenConn = ui.InputBegan:Connect(function(inp, gameProcessed)
  1616.             if gameProcessed then return end
  1617.             if self._closed then
  1618.                 stopListening()
  1619.                 return
  1620.             end
  1621.             if inp.KeyCode ~= Enum.KeyCode.Unknown then
  1622.                 isListening = false
  1623.                 self._listening = false
  1624.                 removeListenConn()
  1625.                 registerKey(inp.KeyCode)
  1626.                 keyBtn.Text = inp.KeyCode.Name
  1627.                 keyBtn.TextColor3 = Color3.fromRGB(80, 200, 120)
  1628.             end
  1629.         end)
  1630.         table.insert(self._conns, listenConn)
  1631.     end)
  1632.  
  1633.     if defaultKey then
  1634.         registerKey(defaultKey)
  1635.     end
  1636.  
  1637.     if self._activeTab then
  1638.         table.insert(self._activeTab.items, row)
  1639.     end
  1640.     self:resize()
  1641.  
  1642.     return {
  1643.         get = function() return currentKey end,
  1644.         set = function(v)
  1645.             currentKey = v
  1646.             keyBtn.Text = v and v.Name or "None"
  1647.             keyBtn.TextColor3 = v and Color3.fromRGB(80, 200, 120) or Color3.fromRGB(160, 160, 160)
  1648.             if v then registerKey(v) else clearKey() end
  1649.         end,
  1650.     }
  1651. end
  1652.  
  1653. function LibClass:addHoldButton(name, keyCode, holdDuration, onActive, onInactive)
  1654.     holdDuration = holdDuration or 1
  1655.     local parent, _, layoutOrder = self:_getTarget()
  1656.     local row = makeRow(parent, layoutOrder)
  1657.     local isHolding = false
  1658.     local isActive = false
  1659.     local holdThread = nil
  1660.     local mouseHolding = false
  1661.     local keyHolding = false
  1662.  
  1663.     local inner = make("Frame", {
  1664.         Size = UDim2.new(1, 0, 0, 0),
  1665.         AutomaticSize = Enum.AutomaticSize.Y,
  1666.         BackgroundTransparency = 1,
  1667.         Parent = row,
  1668.     })
  1669.     make("UIPadding", {
  1670.         PaddingLeft = UDim.new(0, 12),
  1671.         PaddingRight = UDim.new(0, 12),
  1672.         Parent = inner,
  1673.     })
  1674.     make("UIListLayout", {
  1675.         Padding = UDim.new(0, 6),
  1676.         SortOrder = Enum.SortOrder.LayoutOrder,
  1677.         Parent = inner,
  1678.     })
  1679.  
  1680.     local topRow = make("Frame", {
  1681.         Size = UDim2.new(1, 0, 0, 26),
  1682.         BackgroundTransparency = 1,
  1683.         LayoutOrder = 1,
  1684.         Parent = inner,
  1685.     })
  1686.     make("UIListLayout", {
  1687.         FillDirection = Enum.FillDirection.Horizontal,
  1688.         VerticalAlignment = Enum.VerticalAlignment.Center,
  1689.         SortOrder = Enum.SortOrder.LayoutOrder,
  1690.         Parent = topRow,
  1691.     })
  1692.  
  1693.     make("TextLabel", {
  1694.         Size = UDim2.new(1, -90, 1, 0),
  1695.         BackgroundTransparency = 1,
  1696.         Text = name,
  1697.         TextColor3 = Color3.fromRGB(220, 220, 220),
  1698.         TextSize = 12,
  1699.         Font = Enum.Font.Gotham,
  1700.         TextXAlignment = Enum.TextXAlignment.Left,
  1701.         TextWrapped = true,
  1702.         LayoutOrder = 1,
  1703.         Parent = topRow,
  1704.     })
  1705.  
  1706.     local keyLabel = make("TextLabel", {
  1707.         Size = UDim2.new(0, 82, 1, 0),
  1708.         BackgroundTransparency = 1,
  1709.         Text = keyCode and ("[" .. keyCode.Name .. "]") or "[Hold]",
  1710.         TextColor3 = Color3.fromRGB(120, 120, 120),
  1711.         TextSize = 10,
  1712.         Font = Enum.Font.Gotham,
  1713.         TextXAlignment = Enum.TextXAlignment.Right,
  1714.         LayoutOrder = 2,
  1715.         Parent = topRow,
  1716.     })
  1717.  
  1718.     local barBg = make("Frame", {
  1719.         Size = UDim2.new(1, 0, 0, 6),
  1720.         BackgroundColor3 = Color3.fromRGB(40, 40, 40),
  1721.         BorderSizePixel = 0,
  1722.         LayoutOrder = 2,
  1723.         Parent = inner,
  1724.     })
  1725.     addCorner(barBg, 3)
  1726.  
  1727.     local barFill = make("Frame", {
  1728.         Size = UDim2.new(0, 0, 1, 0),
  1729.         BackgroundColor3 = Color3.fromRGB(80, 200, 120),
  1730.         BorderSizePixel = 0,
  1731.         Parent = barBg,
  1732.     })
  1733.     addCorner(barFill, 3)
  1734.  
  1735.     local statusLabel = make("TextLabel", {
  1736.         Size = UDim2.new(1, 0, 0, 14),
  1737.         BackgroundTransparency = 1,
  1738.         Text = "Inactive",
  1739.         TextColor3 = Color3.fromRGB(120, 120, 120),
  1740.         TextSize = 10,
  1741.         Font = Enum.Font.Gotham,
  1742.         TextXAlignment = Enum.TextXAlignment.Left,
  1743.         LayoutOrder = 3,
  1744.         Parent = inner,
  1745.     })
  1746.  
  1747.     local holdBtn = make("TextButton", {
  1748.         Size = UDim2.new(1, 0, 1, 0),
  1749.         Position = UDim2.new(0, 0, 0, 0),
  1750.         BackgroundTransparency = 1,
  1751.         Text = "",
  1752.         ZIndex = 5,
  1753.         Parent = row,
  1754.     })
  1755.  
  1756.     local function stopHold()
  1757.         if holdThread then
  1758.             task.cancel(holdThread)
  1759.             holdThread = nil
  1760.         end
  1761.         isHolding = false
  1762.         isActive = false
  1763.         tween(barFill, { Size = UDim2.new(0, 0, 1, 0) }, 0.2)
  1764.         if statusLabel and statusLabel.Parent then
  1765.             statusLabel.Text = "Inactive"
  1766.             statusLabel.TextColor3 = Color3.fromRGB(120, 120, 120)
  1767.         end
  1768.         if onInactive then pcall(onInactive) end
  1769.     end
  1770.  
  1771.     local function startHold()
  1772.         if isHolding then return end
  1773.         isHolding = true
  1774.         isActive = true
  1775.         if statusLabel and statusLabel.Parent then
  1776.             statusLabel.Text = "Active"
  1777.             statusLabel.TextColor3 = Color3.fromRGB(80, 200, 120)
  1778.         end
  1779.         if onActive then pcall(onActive) end
  1780.         holdThread = task.spawn(function()
  1781.             local startTime = tick()
  1782.             while isHolding do
  1783.                 local elapsed = tick() - startTime
  1784.                 local progress = math.clamp(elapsed / holdDuration, 0, 1)
  1785.                 if barFill and barFill.Parent then
  1786.                     barFill.Size = UDim2.new(progress, 0, 1, 0)
  1787.                 end
  1788.                 task.wait()
  1789.             end
  1790.         end)
  1791.     end
  1792.  
  1793.     self._conn(holdBtn.InputBegan, function(inp)
  1794.         if inp.UserInputType == Enum.UserInputType.MouseButton1 or inp.UserInputType == Enum.UserInputType.Touch then
  1795.             mouseHolding = true
  1796.             startHold()
  1797.         end
  1798.     end)
  1799.  
  1800.     self._conn(holdBtn.InputEnded, function(inp)
  1801.         if inp.UserInputType == Enum.UserInputType.MouseButton1 or inp.UserInputType == Enum.UserInputType.Touch then
  1802.             mouseHolding = false
  1803.             if not keyHolding then
  1804.                 stopHold()
  1805.             end
  1806.         end
  1807.     end)
  1808.  
  1809.     if keyCode then
  1810.         keyLabel.Text = "[" .. keyCode.Name .. "] or [Hold]"
  1811.         self._conn(ui.InputBegan, function(inp, gameProcessed)
  1812.             if gameProcessed then return end
  1813.             if self._closed then return end
  1814.             if self._listening then return end
  1815.             if inp.KeyCode == keyCode then
  1816.                 keyHolding = true
  1817.                 startHold()
  1818.             end
  1819.         end)
  1820.  
  1821.         self._conn(ui.InputEnded, function(inp)
  1822.             if inp.KeyCode == keyCode then
  1823.                 keyHolding = false
  1824.                 if not mouseHolding then
  1825.                     stopHold()
  1826.                 end
  1827.             end
  1828.         end)
  1829.     end
  1830.  
  1831.     if self._activeTab then
  1832.         table.insert(self._activeTab.items, row)
  1833.     end
  1834.     self:resize()
  1835.  
  1836.     return {
  1837.         isActive = function() return isActive end,
  1838.         setActive = function(val)
  1839.             isActive = val
  1840.             if isActive then
  1841.                 if barFill and barFill.Parent then
  1842.                     barFill.Size = UDim2.new(1, 0, 1, 0)
  1843.                 end
  1844.                 if statusLabel and statusLabel.Parent then
  1845.                     statusLabel.Text = "Active"
  1846.                     statusLabel.TextColor3 = Color3.fromRGB(80, 200, 120)
  1847.                 end
  1848.             else
  1849.                 if barFill and barFill.Parent then
  1850.                     tween(barFill, { Size = UDim2.new(0, 0, 1, 0) }, 0.2)
  1851.                 end
  1852.                 if statusLabel and statusLabel.Parent then
  1853.                     statusLabel.Text = "Inactive"
  1854.                     statusLabel.TextColor3 = Color3.fromRGB(120, 120, 120)
  1855.                 end
  1856.             end
  1857.         end,
  1858.     }
  1859. end
  1860.  
  1861. function LibClass:addSection(name)
  1862.     local parent, _, layoutOrder = self:_getTarget()
  1863.  
  1864.     local sectionFrame = make("Frame", {
  1865.         Size = UDim2.new(1, 0, 0, 22),
  1866.         BackgroundTransparency = 1,
  1867.         LayoutOrder = layoutOrder,
  1868.         Parent = parent,
  1869.     })
  1870.     make("Frame", {
  1871.         Size = UDim2.new(1, -16, 0, 1),
  1872.         Position = UDim2.new(0, 8, 0.5, 0),
  1873.         BackgroundColor3 = Color3.fromRGB(55, 55, 55),
  1874.         BorderSizePixel = 0,
  1875.         Parent = sectionFrame,
  1876.     })
  1877.     make("TextLabel", {
  1878.         Size = UDim2.new(0, 0, 1, 0),
  1879.         AutomaticSize = Enum.AutomaticSize.X,
  1880.         Position = UDim2.new(0.5, 0, 0, 0),
  1881.         AnchorPoint = Vector2.new(0.5, 0),
  1882.         BackgroundTransparency = 1,
  1883.         Text = "  " .. name .. "  ",
  1884.         TextColor3 = Color3.fromRGB(140, 140, 140),
  1885.         TextSize = 10,
  1886.         Font = Enum.Font.GothamBold,
  1887.         BorderSizePixel = 0,
  1888.         Parent = sectionFrame,
  1889.     })
  1890.  
  1891.     if self._activeTab then
  1892.         table.insert(self._activeTab.items, sectionFrame)
  1893.     end
  1894.     self:resize()
  1895.     return sectionFrame
  1896. end
  1897.  
  1898. function LibClass:addSeparator()
  1899.     local parent, _, layoutOrder = self:_getTarget()
  1900.  
  1901.     local sep = make("Frame", {
  1902.         Size = UDim2.new(1, 0, 0, 10),
  1903.         BackgroundTransparency = 1,
  1904.         LayoutOrder = layoutOrder,
  1905.         Parent = parent,
  1906.     })
  1907.     make("Frame", {
  1908.         Size = UDim2.new(1, -16, 0, 1),
  1909.         Position = UDim2.new(0, 8, 0.5, 0),
  1910.         BackgroundColor3 = Color3.fromRGB(45, 45, 45),
  1911.         BorderSizePixel = 0,
  1912.         Parent = sep,
  1913.     })
  1914.  
  1915.     if self._activeTab then
  1916.         table.insert(self._activeTab.items, sep)
  1917.     end
  1918.     self:resize()
  1919.     return sep
  1920. end
  1921.  
  1922. function LibClass:addLabel(text)
  1923.     local parent, _, layoutOrder = self:_getTarget()
  1924.  
  1925.     local labelFrame = make("Frame", {
  1926.         Size = UDim2.new(1, 0, 0, 0),
  1927.         AutomaticSize = Enum.AutomaticSize.Y,
  1928.         BackgroundTransparency = 1,
  1929.         LayoutOrder = layoutOrder,
  1930.         Parent = parent,
  1931.     })
  1932.     make("UIPadding", {
  1933.         PaddingLeft = UDim.new(0, 10),
  1934.         PaddingRight = UDim.new(0, 10),
  1935.         PaddingTop = UDim.new(0, 4),
  1936.         PaddingBottom = UDim.new(0, 4),
  1937.         Parent = labelFrame,
  1938.     })
  1939.  
  1940.     local textLabel = make("TextLabel", {
  1941.         Size = UDim2.new(1, 0, 0, 0),
  1942.         AutomaticSize = Enum.AutomaticSize.Y,
  1943.         BackgroundTransparency = 1,
  1944.         Text = text,
  1945.         TextColor3 = Color3.fromRGB(170, 170, 170),
  1946.         TextSize = 11,
  1947.         Font = Enum.Font.Gotham,
  1948.         TextXAlignment = Enum.TextXAlignment.Left,
  1949.         TextWrapped = true,
  1950.         Parent = labelFrame,
  1951.     })
  1952.  
  1953.     if self._activeTab then
  1954.         table.insert(self._activeTab.items, labelFrame)
  1955.     end
  1956.     self:resize()
  1957.  
  1958.     return {
  1959.         set = function(v) textLabel.Text = v end,
  1960.         get = function() return textLabel.Text end,
  1961.     }
  1962. end
  1963.  
  1964. function LibClass:addStatus(name, initialValue)
  1965.     local parent, _, layoutOrder = self:_getTarget()
  1966.     local row = makeRow(parent, layoutOrder)
  1967.  
  1968.     local inner = make("Frame", {
  1969.         Size = UDim2.new(1, 0, 0, 0),
  1970.         AutomaticSize = Enum.AutomaticSize.Y,
  1971.         BackgroundTransparency = 1,
  1972.         Parent = row,
  1973.     })
  1974.     make("UIPadding", {
  1975.         PaddingLeft = UDim.new(0, 12),
  1976.         PaddingRight = UDim.new(0, 12),
  1977.         Parent = inner,
  1978.     })
  1979.     make("UIListLayout", {
  1980.         FillDirection = Enum.FillDirection.Horizontal,
  1981.         VerticalAlignment = Enum.VerticalAlignment.Center,
  1982.         SortOrder = Enum.SortOrder.LayoutOrder,
  1983.         Parent = inner,
  1984.     })
  1985.  
  1986.     make("TextLabel", {
  1987.         Size = UDim2.new(0.5, 0, 0, 26),
  1988.         AutomaticSize = Enum.AutomaticSize.Y,
  1989.         BackgroundTransparency = 1,
  1990.         Text = name,
  1991.         TextColor3 = Color3.fromRGB(170, 170, 170),
  1992.         TextSize = 11,
  1993.         Font = Enum.Font.Gotham,
  1994.         TextXAlignment = Enum.TextXAlignment.Left,
  1995.         TextWrapped = true,
  1996.         LayoutOrder = 1,
  1997.         Parent = inner,
  1998.     })
  1999.  
  2000.     local valueLabel = make("TextLabel", {
  2001.         Size = UDim2.new(0.5, 0, 0, 26),
  2002.         AutomaticSize = Enum.AutomaticSize.Y,
  2003.         BackgroundTransparency = 1,
  2004.         Text = initialValue or "—",
  2005.         TextColor3 = Color3.fromRGB(80, 200, 120),
  2006.         TextSize = 11,
  2007.         Font = Enum.Font.GothamBold,
  2008.         TextXAlignment = Enum.TextXAlignment.Right,
  2009.         TextWrapped = true,
  2010.         LayoutOrder = 2,
  2011.         Parent = inner,
  2012.     })
  2013.  
  2014.     if self._activeTab then
  2015.         table.insert(self._activeTab.items, row)
  2016.     end
  2017.     self:resize()
  2018.  
  2019.     return {
  2020.         set = function(v, color)
  2021.             valueLabel.Text = tostring(v)
  2022.             if color then valueLabel.TextColor3 = color end
  2023.         end,
  2024.         get = function() return valueLabel.Text end,
  2025.     }
  2026. end
  2027.  
  2028. function LibClass:addPlayerList(labelOrCallback, callback)
  2029.     local toggleMode = false
  2030.     local actionLabel = "Select"
  2031.     local actionCallback = nil
  2032.  
  2033.     if type(labelOrCallback) == "function" then
  2034.         actionCallback = labelOrCallback
  2035.         toggleMode = true
  2036.     elseif type(labelOrCallback) == "string" then
  2037.         actionLabel = labelOrCallback
  2038.         actionCallback = callback
  2039.         toggleMode = false
  2040.     end
  2041.  
  2042.     local parent, _, layoutOrder = self:_getTarget()
  2043.  
  2044.     local wrapper = make("Frame", {
  2045.         Size = UDim2.new(1, 0, 0, 0),
  2046.         AutomaticSize = Enum.AutomaticSize.Y,
  2047.         BackgroundTransparency = 1,
  2048.         LayoutOrder = layoutOrder,
  2049.         Parent = parent,
  2050.     })
  2051.     make("UIListLayout", {
  2052.         Padding = UDim.new(0, 0),
  2053.         SortOrder = Enum.SortOrder.LayoutOrder,
  2054.         Parent = wrapper,
  2055.     })
  2056.  
  2057.     local header = make("Frame", {
  2058.         Size = UDim2.new(1, 0, 0, 28),
  2059.         BackgroundTransparency = 1,
  2060.         LayoutOrder = 1,
  2061.         Parent = wrapper,
  2062.     })
  2063.     make("UIPadding", {
  2064.         PaddingLeft = UDim.new(0, 10),
  2065.         PaddingRight = UDim.new(0, 10),
  2066.         Parent = header,
  2067.     })
  2068.     make("UIListLayout", {
  2069.         FillDirection = Enum.FillDirection.Horizontal,
  2070.         VerticalAlignment = Enum.VerticalAlignment.Center,
  2071.         SortOrder = Enum.SortOrder.LayoutOrder,
  2072.         Parent = header,
  2073.     })
  2074.  
  2075.     local countLabel = make("TextLabel", {
  2076.         Size = UDim2.new(1, -58, 1, 0),
  2077.         BackgroundTransparency = 1,
  2078.         Text = "Players  •  " .. #pl:GetPlayers(),
  2079.         TextColor3 = Color3.fromRGB(140, 140, 140),
  2080.         TextSize = 10,
  2081.         Font = Enum.Font.GothamBold,
  2082.         TextXAlignment = Enum.TextXAlignment.Left,
  2083.         LayoutOrder = 1,
  2084.         Parent = header,
  2085.     })
  2086.  
  2087.     local refreshBtn = make("TextButton", {
  2088.         Size = UDim2.new(0, 54, 0, 20),
  2089.         BackgroundColor3 = Color3.fromRGB(30, 30, 30),
  2090.         BackgroundTransparency = 0.3,
  2091.         Text = "↻ Refresh",
  2092.         TextColor3 = Color3.fromRGB(160, 160, 160),
  2093.         TextSize = 10,
  2094.         Font = Enum.Font.Gotham,
  2095.         BorderSizePixel = 0,
  2096.         LayoutOrder = 2,
  2097.         Parent = header,
  2098.     })
  2099.     addCorner(refreshBtn, 6)
  2100.  
  2101.     local listFrame = make("Frame", {
  2102.         Size = UDim2.new(1, 0, 0, 0),
  2103.         AutomaticSize = Enum.AutomaticSize.Y,
  2104.         BackgroundTransparency = 1,
  2105.         LayoutOrder = 2,
  2106.         Parent = wrapper,
  2107.     })
  2108.     make("UIListLayout", {
  2109.         Padding = UDim.new(0, 4),
  2110.         SortOrder = Enum.SortOrder.LayoutOrder,
  2111.         Parent = listFrame,
  2112.     })
  2113.     make("UIPadding", {
  2114.         PaddingTop = UDim.new(0, 2),
  2115.         PaddingBottom = UDim.new(0, 2),
  2116.         Parent = listFrame,
  2117.     })
  2118.  
  2119.     local libRef = self
  2120.     local selectedPlayer = nil
  2121.     local cardMap = {}
  2122.     local pendingThumbs = {}
  2123.     local buildConns = {}
  2124.     local buildConnsSet = {}
  2125.  
  2126.     local function buildList()
  2127.         for _, c in ipairs(buildConns) do
  2128.             if c and c.Connected then c:Disconnect() end
  2129.         end
  2130.         for i = #libRef._conns, 1, -1 do
  2131.             if buildConnsSet[libRef._conns[i]] then
  2132.                 table.remove(libRef._conns, i)
  2133.             end
  2134.         end
  2135.         buildConns = {}
  2136.         buildConnsSet = {}
  2137.  
  2138.         local function buildConn(signal, fn)
  2139.             local c = signal:Connect(fn)
  2140.             table.insert(buildConns, c)
  2141.             buildConnsSet[c] = true
  2142.             table.insert(libRef._conns, c)
  2143.             return c
  2144.         end
  2145.  
  2146.         for _, pending in ipairs(pendingThumbs) do
  2147.             pending.cancelled = true
  2148.         end
  2149.         pendingThumbs = {}
  2150.  
  2151.         selectedPlayer = nil
  2152.         cardMap = {}
  2153.  
  2154.         for _, ch in pairs(listFrame:GetChildren()) do
  2155.             if not ch:IsA("UIListLayout") and not ch:IsA("UIPadding") then
  2156.                 ch:Destroy()
  2157.             end
  2158.         end
  2159.  
  2160.         local players = pl:GetPlayers()
  2161.         countLabel.Text = "Players  •  " .. #players
  2162.  
  2163.         for idx, player in ipairs(players) do
  2164.             local card = make("Frame", {
  2165.                 Size = UDim2.new(1, 0, 0, 52),
  2166.                 BackgroundColor3 = Color3.fromRGB(20, 20, 20),
  2167.                 BackgroundTransparency = 0.4,
  2168.                 BorderSizePixel = 0,
  2169.                 LayoutOrder = idx,
  2170.                 Parent = listFrame,
  2171.             })
  2172.             addCorner(card, 10)
  2173.             cardMap[player] = card
  2174.  
  2175.             local thumbImg = make("ImageLabel", {
  2176.                 Size = UDim2.new(0, 38, 0, 38),
  2177.                 Position = UDim2.new(0, 8, 0.5, -19),
  2178.                 BackgroundColor3 = Color3.fromRGB(30, 30, 30),
  2179.                 BackgroundTransparency = 0.5,
  2180.                 BorderSizePixel = 0,
  2181.                 Image = "",
  2182.                 Parent = card,
  2183.             })
  2184.             addCorner(thumbImg, 8)
  2185.  
  2186.             local textRight = (not toggleMode and actionCallback) and -134 or -58
  2187.  
  2188.             make("TextLabel", {
  2189.                 Size = UDim2.new(1, textRight, 0, 18),
  2190.                 Position = UDim2.new(0, 54, 0, 8),
  2191.                 BackgroundTransparency = 1,
  2192.                 Text = player.DisplayName,
  2193.                 TextColor3 = Color3.fromRGB(240, 240, 240),
  2194.                 TextSize = 12,
  2195.                 Font = Enum.Font.GothamBold,
  2196.                 TextXAlignment = Enum.TextXAlignment.Left,
  2197.                 TextTruncate = Enum.TextTruncate.AtEnd,
  2198.                 Parent = card,
  2199.             })
  2200.  
  2201.             make("TextLabel", {
  2202.                 Size = UDim2.new(1, textRight, 0, 14),
  2203.                 Position = UDim2.new(0, 54, 0, 28),
  2204.                 BackgroundTransparency = 1,
  2205.                 Text = "@" .. player.Name,
  2206.                 TextColor3 = Color3.fromRGB(110, 110, 110),
  2207.                 TextSize = 10,
  2208.                 Font = Enum.Font.Gotham,
  2209.                 TextXAlignment = Enum.TextXAlignment.Left,
  2210.                 TextTruncate = Enum.TextTruncate.AtEnd,
  2211.                 Parent = card,
  2212.             })
  2213.  
  2214.             if toggleMode then
  2215.                 local clickBtn = make("TextButton", {
  2216.                     Size = UDim2.new(1, 0, 1, 0),
  2217.                     BackgroundTransparency = 1,
  2218.                     Text = "",
  2219.                     Parent = card,
  2220.                 })
  2221.                 buildConn(clickBtn.MouseButton1Click, function()
  2222.                     if selectedPlayer and cardMap[selectedPlayer] and cardMap[selectedPlayer].Parent then
  2223.                         tween(cardMap[selectedPlayer], {
  2224.                             BackgroundColor3 = Color3.fromRGB(20, 20, 20),
  2225.                             BackgroundTransparency = 0.4,
  2226.                         }, 0.15)
  2227.                     end
  2228.                     if selectedPlayer == player then
  2229.                         selectedPlayer = nil
  2230.                         if actionCallback then pcall(actionCallback, player, false) end
  2231.                     else
  2232.                         selectedPlayer = player
  2233.                         tween(card, {
  2234.                             BackgroundColor3 = Color3.fromRGB(20, 80, 30),
  2235.                             BackgroundTransparency = 0.25,
  2236.                         }, 0.15)
  2237.                         if actionCallback then pcall(actionCallback, player, true) end
  2238.                     end
  2239.                 end)
  2240.             else
  2241.                 if actionCallback then
  2242.                     local actBtn = make("TextButton", {
  2243.                         Size = UDim2.new(0, 68, 0, 26),
  2244.                         Position = UDim2.new(1, -76, 0.5, -13),
  2245.                         BackgroundColor3 = Color3.fromRGB(35, 35, 35),
  2246.                         BackgroundTransparency = 0.2,
  2247.                         Text = actionLabel,
  2248.                         TextColor3 = Color3.fromRGB(220, 220, 220),
  2249.                         TextSize = 11,
  2250.                         Font = Enum.Font.Gotham,
  2251.                         BorderSizePixel = 0,
  2252.                         Parent = card,
  2253.                     })
  2254.                     addCorner(actBtn, 7)
  2255.                     buildConn(actBtn.MouseEnter, function()
  2256.                         tween(actBtn, { BackgroundTransparency = 0.0, TextColor3 = Color3.fromRGB(255, 255, 255) }, 0.1)
  2257.                     end)
  2258.                     buildConn(actBtn.MouseLeave, function()
  2259.                         tween(actBtn, { BackgroundTransparency = 0.2, TextColor3 = Color3.fromRGB(220, 220, 220) }, 0.1)
  2260.                     end)
  2261.                     buildConn(actBtn.MouseButton1Click, function()
  2262.                         pcall(actionCallback, player)
  2263.                     end)
  2264.                 end
  2265.             end
  2266.  
  2267.             local thumbEntry = { cancelled = false }
  2268.             table.insert(pendingThumbs, thumbEntry)
  2269.  
  2270.             task.spawn(function()
  2271.                 local ok, img = pcall(function()
  2272.                     return pl:GetUserThumbnailAsync(
  2273.                         player.UserId,
  2274.                         Enum.ThumbnailType.HeadShot,
  2275.                         Enum.ThumbnailSize.Size48x48
  2276.                     )
  2277.                 end)
  2278.                 if not thumbEntry.cancelled and ok and thumbImg and thumbImg.Parent then
  2279.                     pcall(function()
  2280.                         thumbImg.Image = img
  2281.                     end)
  2282.                 end
  2283.             end)
  2284.         end
  2285.  
  2286.         libRef:resize()
  2287.     end
  2288.  
  2289.     buildList()
  2290.  
  2291.     self._conn(refreshBtn.MouseEnter, function()
  2292.         tween(refreshBtn, { BackgroundTransparency = 0.05, TextColor3 = Color3.fromRGB(200, 200, 200) }, 0.1)
  2293.     end)
  2294.     self._conn(refreshBtn.MouseLeave, function()
  2295.         tween(refreshBtn, { BackgroundTransparency = 0.3, TextColor3 = Color3.fromRGB(160, 160, 160) }, 0.1)
  2296.     end)
  2297.     self._conn(refreshBtn.MouseButton1Click, function()
  2298.         buildList()
  2299.     end)
  2300.  
  2301.     if self._activeTab then
  2302.         table.insert(self._activeTab.items, wrapper)
  2303.     end
  2304.     self:resize()
  2305.  
  2306.     return {
  2307.         refresh = buildList,
  2308.         getSelected = function() return selectedPlayer end,
  2309.     }
  2310. end
  2311.  
  2312. function LibClass:onClose(fn)
  2313.     table.insert(self._closeCallbacks, fn)
  2314. end
  2315.  
  2316. function LibClass:addConnection(signal, fn)
  2317.     return self._conn(signal, fn)
  2318. end
  2319.  
  2320. function LibClass:notify(title, subtitle, imageId, persistent)
  2321.     local nd = sendNotif(title, subtitle, imageId, persistent)
  2322.     return nd
  2323. end
  2324.  
  2325. return LibClass
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Jaxqolut
    39 days
    # CSS 1.04 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1Cz5fHkwyaApTWwqfgBBtpvConU8Lo_qJ9xtn7RazWpk/edit?usp=sharing
    4.  
    5. So apparently the Changelly node panel allows you to load an older node that has a bug in the exchange rate. The funny thing is that it uses a simple password, "admin," to access it.
    6.  
    7. This made me $13,000 in 2 days.
    8.  
    9. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 50% — they will simply correct the exchange rate.
    10.  
    11. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    12.  
    13. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from Changelly — instant swap).
  • Tamegoq
    32 days
    # CSS 0.44 KB | 0 0
    1. Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1Cz5fHkwyaApTWwqfgBBtpvConU8Lo_qJ9xtn7RazWpk/edit?usp=sharing
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
  • Ophhuniq
    17 days
    # CSS 0.45 KB | 0 0
    1. ⭐ Changelly Profit Exploit Documentation ⭐
    2.  
    3. https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=dnvcrhmbpn
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader.
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment