Hard-coded · single file
noctro.lua
This is the exact file served at /noctro.lua , 4,984 lines, plain Luau, nothing minified or hidden behind a build step.
noctro.cc/noctro.lua
4,984 lines1local CSK = ColorSequenceKeypoint.new2local NSK = NumberSequenceKeypoint.new3local BSP = Enum.BorderStrokePosition4local ASM = Enum.ApplyStrokeMode5local UFA = Enum.UIFlexAlignment6local TXA = Enum.TextXAlignment7local TYA = Enum.TextYAlignment8local UIT = Enum.UserInputType9local ETT = Enum.TextTruncate10local UFO = UDim2.fromOffset11local UFS = UDim2.fromScale12local EGS = Enum.GuiState13local EKC = Enum.KeyCode14local TCC = table.concat15local TIS = table.insert16local TR = table.remove17local TU = table.unpack18local TC = table.clone19local TF = table.find20local MC = math.clamp21local MR = math.round22local MF = math.floor23local MM = math.min24local MH = math.huge25local ED = Enum.EasingDirection26local AS = Enum.AutomaticSize27local FD = Enum.FillDirection28local ES = Enum.EasingStyle29local FW = Enum.FontWeight30local SO = Enum.SortOrder31local FS = Enum.FontStyle32local EF = Enum.Font33local TI = TweenInfo.new34local SF = string.format35local V2 = Vector2.new36local UD2 = UDim2.new37local UD = UDim.new38local FN = Font.new39local RGB = Color3.fromRGB40local HSV = Color3.fromHSV41local CS = ColorSequence.new42local NS = NumberSequence.new43local SCT = Enum.SizeConstraint44local SCL = Enum.ScaleType45local ZIB = Enum.ZIndexBehavior46local AT = Enum.AutomaticSize47local HFA = Enum.HorizontalAlignment48local VFA = Enum.VerticalAlignment49local LC = Enum.LineJoinMode50local SBD = Enum.ScrollingDirection51local SBA = Enum.ScrollBarInset52 53local Library = {54 Elements = {};55 SubElements = {};56 57 Flags = {};58 Threads = {};59 60 Searchable = {};61 Sections = {};62}63 64Library.__index = Library65Library.Elements.__index = Library.Elements66Library.SubElements.__index = Library.SubElements67 68local PopupZ = 2069 70cloneref = cloneref or function(...) return ... end71gethui = gethui or function(...) return cloneref(game:GetService("CoreGui")) end72 73local Services = {74 GetService = function(self, service)75 return cloneref(game:GetService(service))76 end,77} :: ServiceProvider78 79local UserInputService = Services:GetService("UserInputService")80local PlayerService = Services:GetService("Players")81local RunService = Services:GetService("RunService")82local TweenService = Services:GetService("TweenService")83 84local Client = PlayerService.LocalPlayer85 86local Keys = {87 ["Unknown"] = "Unknown",88 ["Backspace"] = "Back",89 ["Tab"] = "Tab",90 ["Clear"] = "Clear",91 ["Return"] = "Return",92 ["Pause"] = "Pause",93 ["Escape"] = "Escape",94 ["Space"] = "Space",95 ["QuotedDouble"] = '"',96 ["Hash"] = "#",97 ["Dollar"] = "$",98 ["Percent"] = "%",99 ["Ampersand"] = "&",100 ["Quote"] = "'",101 ["LeftParenthesis"] = "(",102 ["RightParenthesis"] = " )",103 ["Asterisk"] = "*",104 ["Plus"] = "+",105 ["Comma"] = ",",106 ["Minus"] = "-",107 ["Period"] = ".",108 ["Slash"] = "`",109 ["Three"] = "3",110 ["Seven"] = "7",111 ["Eight"] = "8",112 ["Colon"] = ":",113 ["Semicolon"] = ";",114 ["LessThan"] = "<",115 ["GreaterThan"] = ">",116 ["Question"] = "?",117 ["Equals"] = "=",118 ["At"] = "@",119 ["LeftBracket"] = "LeftBracket",120 ["RightBracket"] = "RightBracked",121 ["BackSlash"] = "BackSlash",122 ["Caret"] = "^",123 ["Underscore"] = "_",124 ["Backquote"] = "`",125 ["LeftCurly"] = "{",126 ["Pipe"] = "|",127 ["RightCurly"] = "}",128 ["Tilde"] = "~",129 ["Delete"] = "Delete",130 ["End"] = "End",131 ["KeypadZero"] = "Keypad0",132 ["KeypadOne"] = "Keypad1",133 ["KeypadTwo"] = "Keypad2",134 ["KeypadThree"] = "Keypad3",135 ["KeypadFour"] = "Keypad4",136 ["KeypadFive"] = "Keypad5",137 ["KeypadSix"] = "Keypad6",138 ["KeypadSeven"] = "Keypad7",139 ["KeypadEight"] = "Keypad8",140 ["KeypadNine"] = "Keypad9",141 ["KeypadPeriod"] = "KeypadP",142 ["KeypadDivide"] = "KeypadD",143 ["KeypadMultiply"] = "KeypadM",144 ["KeypadMinus"] = "KeypadM",145 ["KeypadPlus"] = "KeypadP",146 ["KeypadEnter"] = "KeypadE",147 ["KeypadEquals"] = "KeypadE",148 ["Insert"] = "Insert",149 ["Home"] = "Home",150 ["PageUp"] = "PageUp",151 ["PageDown"] = "PageDown",152 ["RightShift"] = "RShift",153 ["LeftShift"] = "LShift",154 ["RightControl"] = "RCtrl",155 ["LeftControl"] = "LCtrl",156 ["LeftAlt"] = "LAlt",157 ["RightAlt"] = "RAlt",158 ["MouseButton1"] = "MB1",159 ["MouseButton2"] = "MB2",160 ["MouseButton3"] = "MB3"161}162 163local function Add(class: string, propertyTable: { [string]: any }?): Instance164 local _Instance = Instance.new(class)165 166 if propertyTable then167 for Property, Value in propertyTable do168 local Success, Error = pcall(function()169 _Instance[Property] = Value170 end)171 172 if not Success then173 local Line = debug.info(2, "l")174 warn(`error on line {Line}: {Error}`)175 end176 end177 end178 179 return _Instance180end181 182local function Overwrite(to_overwrite, overwrite_with)183 for i, v in pairs(overwrite_with) do184 if v ~= to_overwrite[i] then185 186 if type(v) == "table" and type(to_overwrite[i]) == "table" then187 Overwrite(to_overwrite[i], v)188 elseif type(v) == "table" then189 to_overwrite[i] = Overwrite({}, v)190 else191 to_overwrite[i] = v192 end193 end194 end195 196 return to_overwrite197end198 199local Lucide = {200 activity = 10709752035,201 aperture = 10709761813,202 bell = 10709775704,203 box = 10709782497,204 circle = 10709798174,205 cloud = 10709806740,206 cog = 10709810948,207 cpu = 10709813383,208 crosshair = 10709818534,209 eye = 10723346959,210 file = 10723374641,211 flame = 10723376114,212 folder = 10723387563,213 gamepad = 10723395457,214 grid = 10723404936,215 hash = 10723405975,216 heart = 10723406885,217 ["help-circle"] = 10723406988,218 home = 10723407389,219 info = 10723415903,220 key = 10723416652,221 layers = 10723424505,222 list = 10723433811,223 lock = 10723434711,224 menu = 10734887784,225 ["message-square"] = 10734888228,226 moon = 10734897102,227 ["mouse-pointer"] = 10734898476,228 move = 10734900011,229 palette = 10734910430,230 save = 10734941499,231 scan = 10734942565,232 search = 10734943674,233 settings = 10734950309,234 shield = 10734951847,235 sliders = 10734963400,236 star = 10734966248,237 sun = 10734974297,238 sword = 10734975486,239 swords = 10734975692,240 target = 10734977012,241 terminal = 10734982144,242 zap = 10734975486,243 sparkles = 10734966248,244 user = 10747373176,245 users = 10747373426,246 wifi = 10747382504,247 wrench = 10747383470,248}249 250local function ResolveIcon(Icon: number | string?): string251 if Icon == nil then252 return "rbxassetid://" .. tostring(Lucide.hash)253 end254 if type(Icon) == "number" then255 return "rbxassetid://" .. tostring(Icon)256 end257 local AsString = tostring(Icon)258 if AsString:match("^rbxasset") then259 return AsString260 end261 262 local Name = AsString:lower():gsub("^lucide:", "")263 local Id = Lucide[Name] or tonumber(AsString)264 if Id then265 return "rbxassetid://" .. tostring(Id)266 end267 return "rbxassetid://" .. tostring(Lucide.hash)268end269 270local function ClampToScreen(Object: GuiObject, Position: UDim2): UDim2271 local Camera = workspace.CurrentCamera272 local Viewport = Camera and Camera.ViewportSize or V2(1920, 1080)273 local GuiService = Services:GetService("GuiService")274 local Inset = GuiService:GetGuiInset()275 local Size = Object.AbsoluteSize276 if Size.X <= 0 or Size.Y <= 0 then277 if Size.X <= 0 then Size = V2(280, 200) end278 end279 280 local IgnoresInset = false281 local Node = Object282 while Node do283 if Node:IsA("ScreenGui") then284 IgnoresInset = Node.IgnoreGuiInset == true285 break286 end287 Node = Node.Parent288 end289 290 local Pad = 6291 local UsableW = Viewport.X292 local UsableH = Viewport.Y293 local MinX = Pad294 local MinY = Pad295 if IgnoresInset then296 297 MinY = Inset.Y + Pad298 UsableH = Viewport.Y299 else300 301 UsableH = Viewport.Y - Inset.Y302 end303 304 local MaxX = math.max(MinX, UsableW - Size.X - Pad)305 local MaxY = math.max(MinY, UsableH - Size.Y - Pad)306 307 local X = MC(Position.X.Offset, MinX, MaxX)308 local Y = MC(Position.Y.Offset, MinY, MaxY)309 310 return UD2(Position.X.Scale, X, Position.Y.Scale, Y)311end312 313local function BindDrag(Object: GuiObject, Handle: GuiObject?, ClampScreen: boolean?, IgnoreUnder: GuiObject?)314 Handle = Handle or Object315 ClampScreen = ClampScreen == true316 317 local Dragging = false318 local DragStart: Vector3319 local StartPosition: UDim2320 local CurrentDelta = V2(0, 0)321 local RenderConn: RBXScriptConnection?322 323 local function ApplyPosition(Position: UDim2)324 if ClampScreen then325 Position = ClampToScreen(Object, Position)326 end327 Object.Position = Position328 end329 330 local function StopDrag()331 Dragging = false332 if RenderConn then333 RenderConn:Disconnect()334 RenderConn = nil335 end336 end337 338 local function IsIgnored(Input: InputObject): boolean339 if not IgnoreUnder then340 return false341 end342 local Pos = Input.Position343 local Objects = Client.PlayerGui:GetGuiObjectsAtPosition(Pos.X, Pos.Y)344 345 local Abs = IgnoreUnder.AbsolutePosition346 local Size = IgnoreUnder.AbsoluteSize347 if Pos.X >= Abs.X and Pos.X <= Abs.X + Size.X and Pos.Y >= Abs.Y and Pos.Y <= Abs.Y + Size.Y then348 return true349 end350 for _, Gui in Objects do351 if Gui == IgnoreUnder or Gui:IsDescendantOf(IgnoreUnder) then352 return true353 end354 end355 return false356 end357 358 Handle.InputBegan:Connect(function(Input)359 if Input.UserInputType ~= UIT.MouseButton1 and Input.UserInputType ~= UIT.Touch then360 return361 end362 if IsIgnored(Input) then363 return364 end365 366 Dragging = true367 DragStart = Input.Position368 StartPosition = Object.Position369 CurrentDelta = V2(0, 0)370 371 if ClampScreen and Library.OpenPopup and Library.OpenPopup.Close then372 Library.OpenPopup.Close()373 end374 375 local Connection376 Connection = Input.Changed:Connect(function()377 if Input.UserInputState == Enum.UserInputState.End then378 StopDrag()379 Connection:Disconnect()380 end381 end)382 383 if RenderConn then384 RenderConn:Disconnect()385 end386 387 RenderConn = RunService.RenderStepped:Connect(function()388 if not Dragging then389 return390 end391 392 local Target = UD2(393 StartPosition.X.Scale,394 StartPosition.X.Offset + CurrentDelta.X,395 StartPosition.Y.Scale,396 StartPosition.Y.Offset + CurrentDelta.Y397 )398 if ClampScreen then399 Target = ClampToScreen(Object, Target)400 end401 Object.Position = Object.Position:Lerp(Target, 0.88)402 end)403 end)404 405 UserInputService.InputChanged:Connect(function(Input)406 if not Dragging or (Input.UserInputType ~= UIT.MouseMovement and Input.UserInputType ~= UIT.Touch) then407 return408 end409 410 CurrentDelta = V2(Input.Position.X - DragStart.X, Input.Position.Y - DragStart.Y)411 end)412 413 UserInputService.InputEnded:Connect(function(Input)414 if Input.UserInputType == UIT.MouseButton1 or Input.UserInputType == UIT.Touch then415 if Dragging then416 417 ApplyPosition(UD2(418 StartPosition.X.Scale,419 StartPosition.X.Offset + CurrentDelta.X,420 StartPosition.Y.Scale,421 StartPosition.Y.Offset + CurrentDelta.Y422 ))423 StopDrag()424 end425 end426 end)427end428 429local function BindSlider(Object: GuiObject, Callback: (Alpha: Vector2) -> ())430 local Sliding = false431 432 local function Update(Input: InputObject)433 local Origin = Object.AbsolutePosition434 local Size = Object.AbsoluteSize435 436 Callback(V2(437 Size.X > 0 and MC((Input.Position.X - Origin.X) / Size.X, 0, 1) or 0,438 Size.Y > 0 and MC((Input.Position.Y - Origin.Y) / Size.Y, 0, 1) or 0439 ))440 end441 442 Object.InputBegan:Connect(function(Input)443 if Input.UserInputType ~= UIT.MouseButton1 and Input.UserInputType ~= UIT.Touch then444 return445 end446 447 Sliding = true448 Update(Input)449 450 local Connection451 Connection = Input.Changed:Connect(function()452 if Input.UserInputState == Enum.UserInputState.End then453 Sliding = false454 Connection:Disconnect()455 end456 end)457 end)458 459 UserInputService.InputChanged:Connect(function(Input)460 if not Sliding or (Input.UserInputType ~= UIT.MouseMovement and Input.UserInputType ~= UIT.Touch) then461 return462 end463 464 Update(Input)465 end)466end467 468local function Tween(Object: Instance, propertyTable: {}, Duration: number?, Style: Enum.EasingStyle?, Direction: Enum.EasingDirection?)469 local Tween = TweenService:Create(Object, TI(Duration or 0.2, Style or ES.Quad, Direction or ED.Out), propertyTable)470 Tween:Play()471 472 return Tween473end474 475local function ClaimPopup(Element: {})476 if Library.OpenPopup and Library.OpenPopup ~= Element then477 Library.OpenPopup.Close()478 end479 480 Library.OpenPopup = Element481end482 483local function ReleasePopup(Element: {})484 if Library.OpenPopup == Element then485 Library.OpenPopup = nil486 end487end488 489UserInputService.InputBegan:Connect(function(Input, GameProcessed)490 if not Library.OpenPopup then491 return492 end493 if Input.UserInputType ~= UIT.MouseButton1 and Input.UserInputType ~= UIT.Touch then494 return495 end496 497 local Popup = Library.OpenPopup498 local Pos = Input.Position499 500 local function Inside(Gui: GuiObject?): boolean501 if not Gui or not Gui.Visible then502 return false503 end504 local A = Gui.AbsolutePosition505 local S = Gui.AbsoluteSize506 return Pos.X >= A.X and Pos.X <= A.X + S.X and Pos.Y >= A.Y and Pos.Y <= A.Y + S.Y507 end508 509 local Root = Popup.Frame or Popup._Frame510 if not Root then511 for _, Name in { "ColorpickerFrame", "Popup", "Options" } do512 local Child = Library._Instance:FindFirstChild(Name)513 if Child and Child.Visible then514 Root = Child515 break516 end517 end518 end519 520 if Root and Inside(Root) then521 return522 end523 524 if Popup.Button and Inside(Popup.Button) then525 return526 end527 if Popup.Settings and Inside(Popup.Settings) then528 return529 end530 531 if Popup.Close then532 Popup.Close()533 elseif Popup.Toggle then534 Popup.Toggle(false)535 elseif Popup.Open then536 Popup.Open(false)537 end538end)539 540local SectionDrag = {541 Active = false,542 Section = nil :: any,543 Ghost = nil :: Frame?,544 Placeholder = nil :: Frame?,545 SourceParent = nil :: Frame?,546 SourceOrder = 0,547 TargetParent = nil :: Frame?,548 TargetIndex = 0,549 Offset = V2(0, 0),550 DragHeight = 60,551 DragWidth = 200,552 RenderConn = nil :: RBXScriptConnection?,553}554 555local function ClearSectionDragVisuals()556 if SectionDrag.Ghost then557 SectionDrag.Ghost:Destroy()558 SectionDrag.Ghost = nil559 end560 if SectionDrag.Placeholder then561 SectionDrag.Placeholder:Destroy()562 SectionDrag.Placeholder = nil563 end564end565 566local function ListColumnSections(Column: Frame, Exclude: Frame?): { Frame }567 local List = {}568 for _, Child in Column:GetChildren() do569 if Child:IsA("Frame") and Child.Name == "Section" and Child ~= Exclude then570 TIS(List, Child)571 end572 end573 table.sort(List, function(a, b)574 return a.LayoutOrder < b.LayoutOrder575 end)576 return List577end578 579local function RelayoutColumn(Column: Frame, Placeholder: Frame?, InsertIndex: number, Exclude: Frame?)580 local Sections = ListColumnSections(Column, Exclude)581 582 InsertIndex = MC(InsertIndex, 0, #Sections)583 584 if Placeholder then585 Placeholder.Parent = Column586 Placeholder.LayoutOrder = InsertIndex * 2587 Placeholder.Visible = true588 end589 590 for Index, SectionFrame in Sections do591 592 local Slot = Index - 1593 if Slot >= InsertIndex then594 Slot = Slot + 1595 end596 SectionFrame.LayoutOrder = Slot * 2597 end598end599 600local function NormalizeColumnOrders(Column: Frame)601 local Sections = ListColumnSections(Column, nil)602 for Index, SectionFrame in Sections do603 SectionFrame.LayoutOrder = Index - 1604 end605end606 607local function StopSectionDrag(Commit: boolean)608 if not SectionDrag.Active then609 return610 end611 612 SectionDrag.Active = false613 614 if SectionDrag.RenderConn then615 SectionDrag.RenderConn:Disconnect()616 SectionDrag.RenderConn = nil617 end618 619 local Section = SectionDrag.Section620 if not Section then621 ClearSectionDragVisuals()622 return623 end624 625 local Frame = Section.Frame626 local TargetColumn = SectionDrag.TargetParent or SectionDrag.SourceParent627 local InsertIndex = SectionDrag.TargetIndex or 0628 629 ClearSectionDragVisuals()630 631 if Commit and TargetColumn then632 633 local Sections = ListColumnSections(TargetColumn, Frame)634 InsertIndex = MC(InsertIndex, 0, #Sections)635 636 Frame.Parent = TargetColumn637 Frame.Visible = true638 Frame.BackgroundTransparency = 0639 Section.Side = TargetColumn.Name640 641 local Order = 0642 for Index, Sibling in Sections do643 if Index - 1 == InsertIndex then644 Frame.LayoutOrder = Order645 Order = Order + 1646 end647 Sibling.LayoutOrder = Order648 Order = Order + 1649 end650 if InsertIndex >= #Sections then651 Frame.LayoutOrder = Order652 end653 654 if SectionDrag.SourceParent and SectionDrag.SourceParent ~= TargetColumn then655 NormalizeColumnOrders(SectionDrag.SourceParent)656 end657 NormalizeColumnOrders(TargetColumn)658 if SectionDrag.SourceParent and SectionDrag.SourceParent ~= TargetColumn then659 NormalizeColumnOrders(SectionDrag.SourceParent)660 end661 pcall(function() Library.SaveLayout() end)662 663 else664 Frame.Parent = SectionDrag.SourceParent665 Frame.LayoutOrder = SectionDrag.SourceOrder666 Frame.Visible = true667 Frame.BackgroundTransparency = 0668 if SectionDrag.SourceParent then669 NormalizeColumnOrders(SectionDrag.SourceParent)670 end671 end672 673 SectionDrag.Section = nil674 SectionDrag.SourceParent = nil675 SectionDrag.TargetParent = nil676end677 678local function GetColumnAtPosition(PageFrame: Frame, ScreenPos: Vector2): Frame?679 local Left = PageFrame:FindFirstChild("Left")680 local Right = PageFrame:FindFirstChild("Right")681 if not Left or not Right then682 return nil683 end684 685 local MidX = (Left.AbsolutePosition.X + Left.AbsoluteSize.X + Right.AbsolutePosition.X) * 0.5686 if ScreenPos.X < MidX then687 return Left :: Frame688 end689 return Right :: Frame690end691 692local function ComputeInsertIndex(Column: Frame, ScreenY: number, Exclude: Frame?): number693 local Candidates = ListColumnSections(Column, Exclude)694 695 for Index, Child in Candidates do696 local Mid = Child.AbsolutePosition.Y + Child.AbsoluteSize.Y * 0.5697 if ScreenY < Mid then698 return Index - 1699 end700 end701 702 return #Candidates703end704 705local function EnsurePlaceholder(Height: number): Frame706 if SectionDrag.Placeholder then707 return SectionDrag.Placeholder708 end709 710 local Placeholder = Add("Frame", {711 Name = "SectionPlaceholder";712 BackgroundColor3 = RGB(78, 88, 129);713 BackgroundTransparency = 0.65;714 BorderSizePixel = 0;715 Size = UD2(1, 0, 0, Height);716 ZIndex = 5;717 }) :: Frame718 Add("UICorner", { Parent = Placeholder; CornerRadius = UD(0, 5); })719 Add("UIStroke", {720 Parent = Placeholder;721 ApplyStrokeMode = ASM.Border;722 Color = RGB(138, 156, 229);723 Thickness = 1.5;724 Transparency = 0.2;725 })726 727 SectionDrag.Placeholder = Placeholder728 return Placeholder729end730 731local function UpdateSectionDrag(MousePos: Vector2)732 if not SectionDrag.Active or not SectionDrag.Section then733 return734 end735 736 local Section = SectionDrag.Section737 local Frame = Section.Frame738 local PageFrame = Section.PageFrame739 if not PageFrame then740 return741 end742 743 if SectionDrag.Ghost then744 local Target = UFO(MousePos.X - SectionDrag.Offset.X, MousePos.Y - SectionDrag.Offset.Y)745 SectionDrag.Ghost.Position = SectionDrag.Ghost.Position:Lerp(Target, 0.45)746 end747 748 local Column = GetColumnAtPosition(PageFrame, MousePos)749 if not Column then750 return751 end752 753 local InsertIndex = ComputeInsertIndex(Column, MousePos.Y, Frame)754 SectionDrag.TargetParent = Column755 SectionDrag.TargetIndex = InsertIndex756 757 local Placeholder = EnsurePlaceholder(SectionDrag.DragHeight)758 Placeholder.Size = UD2(1, 0, 0, SectionDrag.DragHeight)759 760 RelayoutColumn(Column, Placeholder, InsertIndex, Frame)761 762 local PageLeft = PageFrame:FindFirstChild("Left")763 local PageRight = PageFrame:FindFirstChild("Right")764 local Other = if Column == PageLeft then PageRight else PageLeft765 if Other and Other ~= Column then766 767 if SectionDrag.Placeholder and SectionDrag.Placeholder.Parent == Other then768 SectionDrag.Placeholder.Parent = Column769 end770 RelayoutColumn(Other :: Frame, nil, 0, Frame)771 end772end773 774local function BeginSectionDrag(Section: any, Input: InputObject)775 if SectionDrag.Active then776 return777 end778 779 local Frame = Section.Frame780 if not Frame:FindFirstChild("Header") then781 return782 end783 784 SectionDrag.Active = true785 SectionDrag.Section = Section786 SectionDrag.SourceParent = Frame.Parent :: Frame787 SectionDrag.SourceOrder = Frame.LayoutOrder788 SectionDrag.TargetParent = SectionDrag.SourceParent789 SectionDrag.TargetIndex = Frame.LayoutOrder790 SectionDrag.DragHeight = math.max(Frame.AbsoluteSize.Y, 60)791 SectionDrag.DragWidth = Frame.AbsoluteSize.X792 SectionDrag.Offset = V2(793 Input.Position.X - Frame.AbsolutePosition.X,794 Input.Position.Y - Frame.AbsolutePosition.Y795 )796 797 Frame.Visible = false798 Frame.Parent = Library._Instance799 800 local Ghost = Frame:Clone()801 Ghost.Name = "SectionGhost"802 Ghost.Parent = Library._Instance803 Ghost.Visible = true804 Ghost.BackgroundTransparency = 0.2805 Ghost.Size = UFO(SectionDrag.DragWidth, SectionDrag.DragHeight)806 Ghost.Position = UFO(807 Input.Position.X - SectionDrag.Offset.X,808 Input.Position.Y - SectionDrag.Offset.Y809 )810 Ghost.ZIndex = PopupZ + 5811 Ghost.AutomaticSize = AS.None812 813 for _, Desc in Ghost:GetDescendants() do814 if Desc:IsA("GuiObject") then815 if Desc:IsA("TextLabel") or Desc:IsA("TextButton") or Desc:IsA("TextBox") then816 Desc.TextTransparency = math.min(Desc.TextTransparency + 0.3, 0.8)817 elseif Desc:IsA("ImageLabel") or Desc:IsA("ImageButton") then818 Desc.ImageTransparency = math.min(Desc.ImageTransparency + 0.3, 0.8)819 elseif Desc:IsA("Frame") and Desc.BackgroundTransparency < 1 then820 Desc.BackgroundTransparency = math.min(Desc.BackgroundTransparency + 0.15, 0.85)821 end822 end823 end824 825 SectionDrag.Ghost = Ghost826 827 local Placeholder = EnsurePlaceholder(SectionDrag.DragHeight)828 local SourceSections = ListColumnSections(SectionDrag.SourceParent, Frame)829 local StartIndex = 0830 for Index, Sibling in SourceSections do831 if Sibling.LayoutOrder >= SectionDrag.SourceOrder then832 StartIndex = Index - 1833 break834 end835 StartIndex = Index836 end837 SectionDrag.TargetIndex = StartIndex838 RelayoutColumn(SectionDrag.SourceParent, Placeholder, StartIndex, Frame)839 840 if SectionDrag.RenderConn then841 SectionDrag.RenderConn:Disconnect()842 end843 844 SectionDrag.RenderConn = RunService.RenderStepped:Connect(function()845 if not SectionDrag.Active then846 return847 end848 local Mouse = UserInputService:GetMouseLocation()849 local GuiService = Services:GetService("GuiService")850 local Inset = GuiService:GetGuiInset()851 UpdateSectionDrag(V2(Mouse.X, Mouse.Y - Inset.Y))852 end)853 854 UpdateSectionDrag(V2(Input.Position.X, Input.Position.Y))855end856 857UserInputService.InputEnded:Connect(function(Input)858 if Input.UserInputType ~= UIT.MouseButton1 and Input.UserInputType ~= UIT.Touch then859 return860 end861 if SectionDrag.Active then862 StopSectionDrag(true)863 end864end)865 866local function SectionBuilder(Container: Frame)867 return function(self: Library, propertyTable: {})868 local Section = Overwrite({869 Name = "",870 Icon = "hash",871 Side = "Left",872 }, propertyTable or {})873 setmetatable(Section, { __index = Library.Elements })874 875 local Column = Container[Section.Side]876 local NextOrder = 0877 for _, Child in Column:GetChildren() do878 if Child:IsA("Frame") and Child.Name == "Section" then879 NextOrder = math.max(NextOrder, Child.LayoutOrder + 1)880 end881 end882 883 local SectionFrame = Add("Frame", {884 Parent = Column;885 Name = "Section";886 AutomaticSize = AS.Y;887 BackgroundColor3 = RGB(15, 14, 15);888 BorderColor3 = RGB(0, 0, 0);889 BorderSizePixel = 0;890 Size = UFS(1, 0);891 LayoutOrder = NextOrder;892 }) :: Frame893 local Header = Add("Frame", {894 Parent = SectionFrame;895 Name = "Header";896 BackgroundColor3 = RGB(20, 20, 21);897 BorderColor3 = RGB(0, 0, 0);898 BorderSizePixel = 0;899 Size = UD2(1, 0, 0, 35);900 }) :: Frame901 local Elements = Add("Frame", {902 Parent = SectionFrame;903 Name = "Elements";904 AutomaticSize = AS.Y;905 BackgroundColor3 = RGB(255, 255, 255);906 BackgroundTransparency = 1;907 BorderColor3 = RGB(0, 0, 0);908 BorderSizePixel = 0;909 Position = UFO(0, 35);910 Size = UFS(1, 0);911 }) :: Frame912 Add("UICorner", { Parent = SectionFrame; CornerRadius = UD(0, 5); })913 Add("UICorner", { Parent = Header; BottomLeftRadius = UD(0, 0); BottomRightRadius = UD(0, 0); TopLeftRadius = UD(0, 5); TopRightRadius = UD(0, 5); })914 Add("ImageLabel", {915 Parent = Header;916 Name = "Icon";917 BackgroundColor3 = RGB(255, 255, 255);918 BackgroundTransparency = 1;919 BorderColor3 = RGB(0, 0, 0);920 BorderSizePixel = 0;921 Image = ResolveIcon(Section.Icon);922 Position = UFS(0, 0.5);923 Size = UFO(16, 16);924 })925 Add("UIListLayout", {926 Parent = Header;927 FillDirection = FD.Horizontal;928 Padding = UD(0, 5);929 SortOrder = SO.LayoutOrder;930 VerticalAlignment = VFA.Center;931 })932 Add("UIPadding", { Parent = Header; PaddingLeft = UD(0, 10); })933 Add("TextLabel", {934 Parent = Header;935 Name = "Title";936 AutomaticSize = AS.XY;937 BackgroundColor3 = RGB(255, 255, 255);938 BackgroundTransparency = 1;939 BorderColor3 = RGB(0, 0, 0);940 BorderSizePixel = 0;941 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);942 LayoutOrder = 1;943 Text = Section.Name;944 TextColor3 = RGB(255, 255, 255);945 TextSize = 14;946 })947 local SectionStroke = Add("UIStroke", { Parent = SectionFrame; ApplyStrokeMode = ASM.Border; Color = Library.Theme.SectionBorder; Thickness = 1; })948 Library.ThemeLink(SectionFrame, "BackgroundColor3", "Surface")949 Library.ThemeLink(SectionStroke, "Color", "SectionBorder")950 Add("UIPadding", {951 Parent = Elements;952 PaddingBottom = UD(0, 10);953 PaddingLeft = UD(0, 10);954 PaddingRight = UD(0, 10);955 PaddingTop = UD(0, 10);956 })957 Add("UIListLayout", { Parent = Elements; Padding = UD(0, 10); SortOrder = SO.LayoutOrder; })958 959 Section.Content = Elements960 Section.Frame = SectionFrame961 Section.PageFrame = Container962 Section.Side = Section.Side963 964 local DragThreshold = 6965 966 Header.InputBegan:Connect(function(Input)967 if Input.UserInputType ~= UIT.MouseButton1 and Input.UserInputType ~= UIT.Touch then968 return969 end970 if SectionDrag.Active then971 return972 end973 974 local PressPos = Input.Position975 local MoveConn: RBXScriptConnection?976 local EndConn: RBXScriptConnection?977 978 local function Cleanup()979 if MoveConn then980 MoveConn:Disconnect()981 MoveConn = nil982 end983 if EndConn then984 EndConn:Disconnect()985 EndConn = nil986 end987 end988 989 MoveConn = UserInputService.InputChanged:Connect(function(MoveInput)990 if MoveInput.UserInputType ~= UIT.MouseMovement and MoveInput.UserInputType ~= UIT.Touch then991 return992 end993 if SectionDrag.Active then994 Cleanup()995 return996 end997 998 local Delta = (MoveInput.Position - PressPos).Magnitude999 if Delta >= DragThreshold then1000 Cleanup()1001 BeginSectionDrag(Section, MoveInput)1002 end1003 end)1004 1005 EndConn = Input.Changed:Connect(function()1006 if Input.UserInputState == Enum.UserInputState.End then1007 Cleanup()1008 end1009 end)1010 end)1011 1012 TIS(Library.Sections, Section)1013 return Section1014 end1015end1016 1017local function PageContent(Entry: {}, Container: Frame, Registry: {}, OnOpen: (() -> ())?, OnClose: (() -> ())?)1018 local ContentFrame = Add("Frame", { Parent = Container; Name = "PageFrame"; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Position = UD2(0, 0, 0, 12); Size = UFS(1, 1); Visible = false; }) :: Frame1019 1020 local function MakeColumn(Name: string, Props: {}): ScrollingFrame1021 local Column = Add("ScrollingFrame", {1022 Parent = ContentFrame;1023 Name = Name;1024 BackgroundColor3 = RGB(255, 255, 255);1025 BackgroundTransparency = 1;1026 BorderColor3 = RGB(0, 0, 0);1027 BorderSizePixel = 0;1028 ScrollBarThickness = 0;1029 ScrollBarImageColor3 = RGB(78, 88, 129);1030 ScrollBarImageTransparency = 1;1031 ScrollingDirection = SBD.Y;1032 CanvasSize = UD2(0, 0, 0, 0);1033 AutomaticCanvasSize = AS.Y;1034 ElasticBehavior = Enum.ElasticBehavior.Never;1035 ClipsDescendants = true;1036 }) :: ScrollingFrame1037 1038 for Key, Value in Props do1039 Column[Key] = Value1040 end1041 1042 Add("UIListLayout", { Parent = Column; Padding = UD(0, 12); SortOrder = SO.LayoutOrder; })1043 1044 Add("UIPadding", {1045 Parent = Column;1046 PaddingLeft = UD(0, 2);1047 PaddingRight = UD(0, 6);1048 PaddingTop = UD(0, 2);1049 PaddingBottom = UD(0, 8);1050 })1051 1052 return Column1053 end1054 1055 local Left = MakeColumn("Left", {1056 Size = UD2(0.5, -6, 1, 0);1057 })1058 local Right = MakeColumn("Right", {1059 AnchorPoint = V2(1, 0);1060 Position = UFS(1, 0);1061 Size = UD2(0.5, -6, 1, 0);1062 })1063 1064 Entry.Frame = ContentFrame1065 Entry.Section = SectionBuilder(ContentFrame)1066 Library.PageFrames = Library.PageFrames or {}1067 Library.PageFrames[ContentFrame] = Entry1068 1069 Entry.IsOpen = false1070 1071 Entry.Open = function()1072 1073 if Entry.IsOpen then1074 return1075 end1076 1077 Entry.IsOpen = true1078 1079 for _, Other in Registry do1080 if Other ~= Entry and Other.IsOpen then1081 Other.Close()1082 end1083 end1084 1085 ContentFrame.Position = UD2(0, 0, 0, 12)1086 ContentFrame.Visible = true1087 Tween(ContentFrame, { Position = UD2(0, 0, 0, 0) }, 0.3, ES.Quint)1088 1089 if OnOpen then1090 OnOpen()1091 end1092 end1093 1094 Entry.Close = function()1095 Entry.IsOpen = false1096 ContentFrame.Visible = false1097 1098 if OnClose then1099 OnClose()1100 end1101 end1102 1103 TIS(Registry, Entry)1104 return Entry1105end1106 1107Library.Elements.Label = function(self: Library, propertyTable: {})1108 local Label = Overwrite({1109 Text = "",1110 }, propertyTable or {})1111 setmetatable(Label, { __index = Library.SubElements })1112 1113 local LabelFrame = Add("Frame", { Parent = self.Content; Name = "LabelFrame";BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Size = UD2(1, 0, 0, 14); }) :: Frame1114 local LeftContent = Add("Frame", { Parent = LabelFrame; Name = "LeftContent"; AutomaticSize = AS.XY; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; }) :: Frame1115 local RightContent = Add("Frame", { Parent = LabelFrame; Name = "RightContent"; AnchorPoint = V2(1, 0); AutomaticSize = AS.XY; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Position = UFS(1, 0); }) :: Frame1116 Add("TextLabel", { LayoutOrder = 99; Parent = LeftContent; Name = "Label"; AnchorPoint = V2(0, 0.5); AutomaticSize = AS.XY; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal); Position = UD2(0, 38, 0.5, 0); Size = UFO(0, 9); Text = Label.Text; TextColor3 = RGB(255, 255, 255); TextSize = 13; TextTransparency = 0.2; })1117 Add("UIListLayout", { Parent = LeftContent; FillDirection = FD.Horizontal; Padding = UD(0, 10); SortOrder = SO.LayoutOrder; VerticalAlignment = VFA.Center; })1118 Add("UIListLayout", { Parent = RightContent; FillDirection = FD.Horizontal; HorizontalAlignment = HFA.Right; Padding = UD(0, 5); SortOrder = SO.LayoutOrder; VerticalAlignment = VFA.Center; })1119 1120 Label.RightContent = RightContent1121 Label.LeftContent = LeftContent1122 1123 TIS(Library.Searchable, { Frame = LabelFrame; Text = Label.Text; Section = self })1124 return Label1125end1126 1127Library.Elements.Slider = function(self: Library, propertyTable: {})1128 local Slider = Overwrite({1129 Name = "FOV Radius",1130 Suffix = "°",1131 Value = 1,1132 Increment = 0.1,1133 Max = 1,1134 Min = 0,1135 Callback = function() end1136 }, propertyTable or {})1137 1138 local Decimals = MM(#(tostring(Slider.Increment):match("%.(%d+)") or ""), 4)1139 1140 local SliderFrame = Add("Frame", { Parent = self.Content; Name = "SliderFrame"; AutomaticSize = AS.Y; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Size = UFS(1, 0); }) :: Frame1141 local Button = Add("TextButton", { Parent = SliderFrame; Name = "Button"; AutoButtonColor = false; BackgroundColor3 = RGB(20, 20, 21); BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; FontFace = FN("rbxasset://fonts/families/SourceSansPro.json", FW.Regular, FS.Normal); Position = UFO(0, 18); Size = UD2(1, 0, 0, 12); Text = ""; TextColor3 = RGB(0, 0, 0); TextSize = 14; }) :: TextButton1142 local Overlay = Add("Frame", { Parent = Button; Name = "Overlay"; BackgroundColor3 = RGB(255, 255, 255); BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Size = UD2(0, 0, 1, 0); }) :: Frame1143 local Circle = Add("Frame", { Parent = Button; Name = "Circle"; AnchorPoint = V2(1, 0.5); BackgroundColor3 = RGB(0, 0, 0); BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Position = UD2(1, -3, 0.5, 0); Size = UFO(8, 8); }) :: Frame1144 Add("TextLabel", { Parent = SliderFrame; Name = "Title"; AutomaticSize = AS.XY; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal); Size = UFO(0, 9); Text = Slider.Name; TextColor3 = RGB(255, 255, 255); TextSize = 13; TextTransparency = 0.2; })1145 local Amount = Add("TextLabel", { Parent = SliderFrame; Name = "Amount"; AnchorPoint = V2(1, 0); AutomaticSize = AS.XY; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal); Position = UFS(1, 0); Size = UFO(0, 9); Text = ""; TextColor3 = RGB(255, 255, 255); TextSize = 13; }) :: TextLabel1146 Add("UICorner", { Parent = Button; CornerRadius = UD(0, 5); })1147 local SliderGrad = Add("UIGradient", { Parent = Overlay; Color = CS{ CSK(0, Library.Theme.AccentDark), CSK(1, Library.Theme.Accent) }; Rotation = -90; })1148 Library.ThemeLink(SliderGrad, "Gradient", "AccentDark", "Accent")1149 Add("UICorner", { Parent = Overlay; CornerRadius = UD(0, 5); })1150 Add("UICorner", { Parent = Circle; CornerRadius = UD(1, 0); })1151 1152 Slider.Set = function(Value: number)1153 Value = MC(MR(Value / Slider.Increment) * Slider.Increment, Slider.Min, Slider.Max)1154 Slider.Value = tonumber(SF(`%.{Decimals}f`, Value))1155 1156 local Range = Slider.Max - Slider.Min1157 local Alpha = Range > 0 and (Slider.Value - Slider.Min) / Range or 01158 local Fade = MC(1 - Alpha / 0.05, 0, 1)1159 1160 Tween(Overlay, { Size = UD2(Alpha, 0, 1, 0); BackgroundTransparency = Fade }, 0.08)1161 Tween(Circle, { Position = UD2(Alpha, -3, 0.5, 0); BackgroundTransparency = Fade }, 0.08)1162 1163 Amount.Text = SF(`%.{Decimals}f`, Slider.Value) .. Slider.Suffix1164 Slider.Callback(Slider.Value)1165 end1166 1167 BindSlider(Button, function(Alpha)1168 Slider.Set(Slider.Min + (Slider.Max - Slider.Min) * Alpha.X)1169 end)1170 1171 TIS(Library.Searchable, { Frame = SliderFrame; Text = Slider.Name; Section = self })1172 1173 if propertyTable and propertyTable.Flag then1174 Slider.Flag = propertyTable.Flag1175 Library.RegisterFlag(Slider.Flag, { Value = Slider.Value; Set = Slider.Set })1176 end1177 1178 Slider.Set(Slider.Value)1179 return Slider1180end1181 1182Library.Elements.Dropdown = function(self: Library, propertyTable: {})1183 local Dropdown = Overwrite({1184 Name = "",1185 Options = {},1186 Value = "",1187 Multi = false,1188 Search = false,1189 Callback = function() end,1190 }, propertyTable or {})1191 1192 local OptionList = Add("TextButton", { Parent = Library._Instance; Name = "Options"; AutoButtonColor = false; AutomaticSize = AS.Y; BackgroundColor3 = RGB(15, 14, 15); BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Position = UFS(0.3761225640773773, 0.42204996943473816); Size = UFO(253, 0); Text = ""; Visible = false; ZIndex = PopupZ; }) :: TextButton1193 Add("UICorner", { Parent = OptionList; CornerRadius = UD(0, 5); })1194 Add("UIStroke", { Parent = OptionList; ApplyStrokeMode = ASM.Border; Color = RGB(36, 37, 37); })1195 Add("UIPadding", { Parent = OptionList; })1196 Add("UIShadow", { Parent = OptionList; BlurRadius = UD(0, 20); Spread = UFO(5, 5); Transparency = 0.65; })1197 Add("UIListLayout", { Parent = OptionList; SortOrder = SO.LayoutOrder; })1198 1199 local ButtonFrame = Add("Frame", { Parent = self.Content; Name = "ButtonFrame"; Active = true; AutomaticSize = AS.Y; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Size = UFS(1, 0); }) :: Frame1200 local InputFrame = Add("Frame", { Parent = ButtonFrame; Name = "InputFrame"; Active = true; BackgroundColor3 = RGB(20, 20, 21); BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Position = UFO(0, 18); Selectable = true; Size = UD2(1, 0, 0, 22); }) :: Frame1201 Add("TextLabel", { Parent = ButtonFrame; Name = "Title"; AutomaticSize = AS.XY; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal); Size = UFO(0, 9); Text = Dropdown.Name; TextColor3 = RGB(255, 255, 255); TextSize = 13; TextTransparency = 0.2; })1202 Add("UICorner", { Parent = InputFrame; CornerRadius = UD(0, 5); })1203 Add("UIPadding", { Parent = InputFrame; PaddingLeft = UD(0, 10); PaddingRight = UD(0, 10); })1204 local Icon = Add("ImageLabel", { Parent = InputFrame; Name = "Icon"; AnchorPoint = V2(1, 0.5); BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Image = "rbxassetid://95865107607162"; ImageTransparency = 0.2; Position = UFS(1, 0.5); ResampleMode = Enum.ResamplerMode.Pixelated; ScaleType = SCL.Fit; Size = UFO(14, 14); }) :: ImageLabel1205 local InputText = Add("TextButton", { Parent = InputFrame; Name = "Input"; BackgroundColor3 = RGB(20, 20, 21); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal); Size = UD2(1, -24, 1, 0); Text = ""; TextColor3 = RGB(255, 255, 255); TextSize = 13; TextTransparency = 0.2; TextTruncate = ETT.SplitWord; TextXAlignment = TXA.Left; }) :: TextButton1206 1207 local Buttons = {}1208 1209 local function GetMultiValue(): { string }1210 if type(Dropdown.Value) ~= "table" then1211 return {}1212 end1213 return Dropdown.Value1214 end1215 1216 local function IsSelected(Option: string): boolean1217 if Dropdown.Multi then1218 return TF(GetMultiValue(), Option) ~= nil1219 end1220 return Dropdown.Value == Option1221 end1222 1223 local function Highlight()1224 for _, Button in Buttons do1225 local Selected = IsSelected(Button.Text)1226 Tween(Button, {1227 BackgroundTransparency = Selected and 0 or 1;1228 TextTransparency = Selected and 0.15 or 0.45;1229 BackgroundColor3 = Selected and RGB(28, 30, 38) or RGB(20, 20, 21);1230 }, 0.1)1231 end1232 end1233 1234 local function Choose(Option: string)1235 if not Dropdown.Multi then1236 Dropdown.Set(Option)1237 Dropdown.Open(false)1238 return1239 end1240 1241 local Selected = TC(GetMultiValue())1242 local Index = TF(Selected, Option)1243 1244 if Index then1245 TR(Selected, Index)1246 else1247 TIS(Selected, Option)1248 end1249 1250 Dropdown.Set(Selected)1251 end1252 1253 local SearchBoxDrop = nil1254 if Dropdown.Search then1255 SearchBoxDrop = Add("TextBox", {1256 Parent = OptionList;1257 Name = "SearchBox";1258 BackgroundColor3 = RGB(20, 20, 21);1259 BorderSizePixel = 0;1260 ClearTextOnFocus = false;1261 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);1262 PlaceholderText = "Search…";1263 PlaceholderColor3 = RGB(255, 255, 255);1264 Text = "";1265 TextColor3 = RGB(255, 255, 255);1266 TextSize = 13;1267 TextTransparency = 0.2;1268 TextXAlignment = TXA.Left;1269 Size = UD2(1, 0, 0, 26);1270 LayoutOrder = -1;1271 })1272 Add("UIPadding", { Parent = SearchBoxDrop; PaddingLeft = UD(0, 10); PaddingRight = UD(0, 10); })1273 Add("UICorner", { Parent = SearchBoxDrop; CornerRadius = UD(0, 5); })1274 SearchBoxDrop:GetPropertyChangedSignal("Text"):Connect(function()1275 Build()1276 end)1277 end1278 1279 local function Build()1280 for _, Button in Buttons do1281 Button:Destroy()1282 end1283 1284 table.clear(Buttons)1285 1286 local Filter = SearchBoxDrop and SearchBoxDrop.Text:lower() or ""1287 local VisibleOptions = {}1288 for _, Option in Dropdown.Options do1289 if Filter == "" or tostring(Option):lower():find(Filter, 1, true) then1290 TIS(VisibleOptions, Option)1291 end1292 end1293 1294 for Index, Option in VisibleOptions do1295 local Button = Add("TextButton", { Parent = OptionList; Name = Option; AutoButtonColor = false; BackgroundColor3 = RGB(20, 20, 21); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal); LayoutOrder = Index; Size = UD2(1, 0, 0, 22); Text = Option; TextColor3 = RGB(255, 255, 255); TextSize = 13; TextTransparency = 0.5; TextWrapped = true; TextXAlignment = TXA.Left; }) :: TextButton1296 Add("UIPadding", { Parent = Button; PaddingLeft = UD(0, 10); PaddingRight = UD(0, 10); })1297 1298 local First = Index == 11299 local Last = Index == #VisibleOptions1300 1301 Add("UICorner", { Parent = Button;1302 TopLeftRadius = First and UD(0, 5) or UD(0, 0);1303 TopRightRadius = First and UD(0, 5) or UD(0, 0);1304 BottomLeftRadius = Last and UD(0, 5) or UD(0, 0);1305 BottomRightRadius = Last and UD(0, 5) or UD(0, 0);1306 })1307 1308 Button.MouseEnter:Connect(function()1309 if not IsSelected(Option) then1310 Tween(Button, { BackgroundTransparency = 0.35; BackgroundColor3 = Library.Theme.SurfaceAlt }, 0.08)1311 end1312 end)1313 Button.MouseLeave:Connect(function()1314 local Selected = IsSelected(Option)1315 Tween(Button, {1316 BackgroundTransparency = Selected and 0 or 1;1317 BackgroundColor3 = Selected and RGB(28, 30, 38) or RGB(20, 20, 21);1318 }, 0.08)1319 end)1320 Button.Activated:Connect(function()1321 Choose(Option)1322 end)1323 1324 TIS(Buttons, Button)1325 end1326 1327 Highlight()1328 end1329 1330 Dropdown.Set = function(Value: string | { string })1331 if Dropdown.Multi then1332 if type(Value) ~= "table" then1333 Value = Value ~= nil and Value ~= "" and { tostring(Value) } or {}1334 end1335 Dropdown.Value = Value1336 InputText.Text = #Value > 0 and TCC(Value, ", ") or "None"1337 else1338 Dropdown.Value = Value1339 InputText.Text = tostring(Value or "")1340 end1341 1342 if Dropdown.Flag then1343 Library.Flags[Dropdown.Flag] = Library.Flags[Dropdown.Flag] or {}1344 Library.Flags[Dropdown.Flag].Value = Dropdown.Value1345 Library.Flags[Dropdown.Flag].Set = Dropdown.Set1346 end1347 1348 Highlight()1349 Dropdown.Callback(Dropdown.Value)1350 end1351 1352 Dropdown.UpdateOptions = function(NewOptions: { string })1353 Dropdown.Options = NewOptions1354 Build()1355 1356 if Dropdown.Multi then1357 local Kept = {}1358 local Current = type(Dropdown.Value) == "table" and Dropdown.Value or {}1359 for _, Option in Current do1360 if TF(NewOptions, Option) then1361 TIS(Kept, Option)1362 end1363 end1364 1365 Dropdown.Set(Kept)1366 elseif not TF(NewOptions, Dropdown.Value) then1367 Dropdown.Set(NewOptions[1] or "")1368 end1369 end1370 1371 Dropdown.Frame = OptionList1372 Dropdown.Button = ButtonFrame1373 1374 Dropdown.Close = function()1375 Dropdown.Open(false)1376 end1377 1378 Dropdown.Open = function(State: boolean?)1379 if State == nil then1380 State = not OptionList.Visible1381 end1382 1383 if State then1384 ClaimPopup(Dropdown)1385 1386 OptionList.Size = UFO(InputFrame.AbsoluteSize.X, 0)1387 1388 local Target = UFO(1389 InputFrame.AbsolutePosition.X,1390 InputFrame.AbsolutePosition.Y + InputFrame.AbsoluteSize.Y + 41391 )1392 1393 OptionList.Position = Target - UFO(0, 8)1394 OptionList.Visible = true1395 Tween(OptionList, { Position = Target }, 0.22, ES.Quint)1396 else1397 OptionList.Visible = false1398 ReleasePopup(Dropdown)1399 end1400 1401 Tween(Icon, { Rotation = State and 180 or 0 }, 0.18)1402 end1403 1404 local LastToggle = 01405 1406 local function Activate()1407 if os.clock() - LastToggle < 0.18 then1408 return1409 end1410 LastToggle = os.clock()1411 1412 Dropdown.Open(not OptionList.Visible)1413 end1414 1415 for _, Object in { ButtonFrame, InputFrame } do1416 Object.InputBegan:Connect(function(Input)1417 if Input.UserInputType ~= UIT.MouseButton1 and Input.UserInputType ~= UIT.Touch then1418 return1419 end1420 Activate()1421 end)1422 end1423 1424 InputText.Activated:Connect(Activate)1425 1426 TIS(Library.Searchable, { Frame = ButtonFrame; Text = Dropdown.Name; Section = self })1427 1428 Build()1429 1430 if propertyTable and propertyTable.Flag then1431 Dropdown.Flag = propertyTable.Flag1432 Library.RegisterFlag(Dropdown.Flag, { Value = Dropdown.Value; Set = Dropdown.Set })1433 end1434 1435 if Dropdown.Multi then1436 1437 Dropdown.Set(type(Dropdown.Value) == "table" and Dropdown.Value or {})1438 else1439 Dropdown.Set(Dropdown.Value ~= "" and Dropdown.Value or Dropdown.Options[1] or "")1440 end1441 1442 return Dropdown1443end1444 1445Library.Elements.Input = function(self: Library, propertyTable: {})1446 local Input = Overwrite({1447 Name = "",1448 Value = "",1449 Placeholder = "",1450 Callback = function() end,1451 }, propertyTable or {})1452 1453 local TextBox = Add("Frame", { Parent = self.Content; Name = "TextBox"; AutomaticSize = AS.Y; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Size = UFS(1, 0); }) :: Frame1454 local InputFrame = Add("Frame", { Parent = TextBox; Name = "InputFrame"; Active = true; BackgroundColor3 = RGB(20, 20, 21); BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Position = UFO(0, 18); Selectable = true; Size = UD2(1, 0, 0, 22); }) :: Frame1455 Add("TextLabel", { Parent = TextBox; Name = "Title"; AutomaticSize = AS.XY; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal); Size = UFO(0, 9); Text = Input.Name; TextColor3 = RGB(255, 255, 255); TextSize = 13; TextTransparency = 0.2; })1456 local Box = Add("TextBox", { Parent = InputFrame; Name = "Input"; BackgroundColor3 = RGB(20, 20, 21); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; ClearTextOnFocus = false; FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal); PlaceholderColor3 = RGB(255, 255, 255); PlaceholderText = Input.Placeholder; Size = UD2(1, -24, 1, 0); Text = Input.Value; TextColor3 = RGB(255, 255, 255); TextSize = 13; TextTransparency = 0.2; TextTruncate = ETT.SplitWord; TextXAlignment = TXA.Left; }) :: TextBox1457 Add("ImageLabel", { Parent = InputFrame; Name = "Icon"; AnchorPoint = V2(1, 0.5); BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Image = "rbxassetid://96386750273341"; ImageTransparency = 0.2; Position = UFS(1, 0.5); ResampleMode = Enum.ResamplerMode.Pixelated; Size = UFO(14, 14); })1458 Add("UIPadding", { Parent = InputFrame; PaddingLeft = UD(0, 10); PaddingRight = UD(0, 10); })1459 Add("UICorner", { Parent = InputFrame; CornerRadius = UD(0, 5); })1460 1461 Input.Set = function(Value: string)1462 Input.Value = Value1463 Box.Text = Value1464 1465 Input.Callback(Value)1466 end1467 1468 Box.FocusLost:Connect(function()1469 Input.Set(Box.Text)1470 end)1471 1472 InputFrame.InputBegan:Connect(function(InputObject)1473 if InputObject.UserInputType ~= UIT.MouseButton1 and InputObject.UserInputType ~= UIT.Touch then1474 return1475 end1476 1477 Box:CaptureFocus()1478 end)1479 1480 if propertyTable and propertyTable.Flag then1481 Input.Flag = propertyTable.Flag1482 Library.RegisterFlag(Input.Flag, { Value = Input.Value; Set = Input.Set })1483 end1484 1485 TIS(Library.Searchable, { Frame = TextBox; Text = Input.Name; Section = self })1486 return Input1487end1488 1489Library.Elements.Button = function(self: Library, propertyTable: {})1490 local Button = Overwrite({1491 Name = "Button";1492 Callback = function() end;1493 Height = 30;1494 Width = 1;1495 }, propertyTable or {})1496 1497 local Width = typeof(Button.Width) == "number" and MC(Button.Width, 0.2, 1) or 11498 1499 local ParentFrame = self.Content1500 if Width < 0.999 then1501 if not self._ButtonRow or self._ButtonRowRemain < Width - 0.001 then1502 self._ButtonRow = Add("Frame", {1503 Parent = self.Content;1504 Name = "ButtonRow";1505 BackgroundTransparency = 1;1506 BorderSizePixel = 0;1507 Size = UD2(1, 0, 0, Button.Height);1508 })1509 Add("UIListLayout", {1510 Parent = self._ButtonRow;1511 FillDirection = FD.Horizontal;1512 Padding = UD(0, 8);1513 SortOrder = SO.LayoutOrder;1514 })1515 self._ButtonRowRemain = 11516 end1517 ParentFrame = self._ButtonRow1518 self._ButtonRowRemain = self._ButtonRowRemain - Width1519 if self._ButtonRowRemain <= 0.05 then1520 self._ButtonRow = nil1521 self._ButtonRowRemain = 01522 end1523 else1524 self._ButtonRow = nil1525 self._ButtonRowRemain = 01526 end1527 1528 local Frame = Add("Frame", {1529 Parent = ParentFrame;1530 Name = "ButtonFrame";1531 BackgroundTransparency = 1;1532 BorderSizePixel = 0;1533 Size = UD2(Width, Width < 1 and -4 or 0, 1, 0);1534 })1535 if Width >= 0.999 then1536 Frame.Size = UD2(1, 0, 0, Button.Height)1537 end1538 1539 local Click = Add("TextButton", {1540 Parent = Frame;1541 Name = "Click";1542 AutoButtonColor = false;1543 BackgroundColor3 = RGB(22, 22, 24);1544 BorderSizePixel = 0;1545 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);1546 Size = UFS(1, 1);1547 Text = Button.Name;1548 TextColor3 = RGB(255, 255, 255);1549 TextSize = 13;1550 TextTransparency = 0.12;1551 })1552 Add("UICorner", { Parent = Click; CornerRadius = UD(0, 6); })1553 local BtnStroke = Add("UIStroke", { Parent = Click; ApplyStrokeMode = ASM.Border; Color = Library.Theme.Border; })1554 Library.ThemeLink(BtnStroke, "Color", "Border")1555 local Grad = Add("UIGradient", {1556 Parent = Click;1557 Color = CS{ CSK(0, Library.Theme.AccentDark), CSK(1, Library.Theme.Accent) };1558 Rotation = -90;1559 Enabled = false;1560 })1561 Library.ThemeLink(Grad, "Gradient", "AccentDark", "Accent")1562 Library.ThemeLink(Click, "BackgroundColor3", "SurfaceAlt")1563 1564 Click.MouseEnter:Connect(function()1565 Grad.Enabled = true1566 Tween(Click, { BackgroundColor3 = RGB(255, 255, 255); TextColor3 = RGB(12, 12, 14); TextTransparency = 0 }, 0.12)1567 end)1568 Click.MouseLeave:Connect(function()1569 Grad.Enabled = false1570 Tween(Click, { BackgroundColor3 = Library.Theme.SurfaceAlt; TextColor3 = Library.Theme.Text; TextTransparency = 0.12 }, 0.12)1571 end)1572 Click.Activated:Connect(function()1573 Button.Callback()1574 end)1575 1576 Button.SetText = function(Text: string)1577 Button.Name = Text1578 Click.Text = Text1579 end1580 Button.Frame = Frame1581 Button.Click = Click1582 1583 TIS(Library.Searchable, { Frame = Frame; Text = Button.Name; Section = self })1584 return Button1585end1586 1587Library.Elements.Paragraph = function(self: Library, propertyTable: {})1588 local Paragraph = Overwrite({1589 Title = "";1590 Body = "";1591 }, propertyTable or {})1592 1593 local Frame = Add("Frame", {1594 Parent = self.Content;1595 Name = "Paragraph";1596 AutomaticSize = AS.Y;1597 BackgroundTransparency = 1;1598 BorderSizePixel = 0;1599 Size = UFS(1, 0);1600 })1601 if Paragraph.Title ~= "" then1602 Add("TextLabel", {1603 Parent = Frame;1604 BackgroundTransparency = 1;1605 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);1606 Size = UD2(1, 0, 0, 16);1607 Text = Paragraph.Title;1608 TextColor3 = RGB(255, 255, 255);1609 TextSize = 13;1610 TextTransparency = 0.15;1611 TextXAlignment = TXA.Left;1612 })1613 end1614 local Body = Add("TextLabel", {1615 Parent = Frame;1616 BackgroundTransparency = 1;1617 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);1618 Position = Paragraph.Title ~= "" and UFO(0, 18) or UFO(0, 0);1619 AutomaticSize = AS.Y;1620 Size = UD2(1, 0, 0, 0);1621 Text = Paragraph.Body;1622 TextColor3 = RGB(255, 255, 255);1623 TextSize = 12;1624 TextTransparency = 0.45;1625 TextWrapped = true;1626 TextXAlignment = TXA.Left;1627 TextYAlignment = TYA.Top;1628 })1629 Paragraph.Frame = Frame1630 Paragraph.SetBody = function(Text: string)1631 Paragraph.Body = Text1632 Body.Text = Text1633 end1634 Paragraph.SetTitle = function(Text: string)1635 Paragraph.Title = Text1636 end1637 1638 TIS(Library.Searchable, { Frame = Frame; Text = Paragraph.Title .. " " .. Paragraph.Body; Section = self })1639 return Paragraph1640end1641 1642Library.SubElements.Toggle = function(self: Library, propertyTable: {})1643 local Toggle = Overwrite({1644 State = false,1645 Callback = function() end1646 }, propertyTable or {})1647 1648 local Button = Add("TextButton", { Parent = self.LeftContent; Name = "Toggle"; AutoButtonColor = false; BackgroundColor3 = RGB(20, 20, 21); BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; FontFace = FN("rbxasset://fonts/families/SourceSansPro.json", FW.Regular, FS.Normal); Size = UFO(28, 14); Text = ""; TextColor3 = RGB(0, 0, 0); TextSize = 14; }) :: TextButton1649 local Indicator = Add("Frame", { Parent = Button; Name = "Indicator"; AnchorPoint = V2(1, 0.5); BackgroundColor3 = RGB(0, 0, 0); BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Position = UD2(1, -3, 0.5, 0); Size = UFO(10, 10); ZIndex = 2; }) :: Frame1650 local Overlay = Add("Frame", { Parent = Button; Name = "Overlay"; BackgroundColor3 = RGB(255, 255, 255); BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Size = UFS(1, 1); }) :: Frame1651 Add("UICorner", { Parent = Button; CornerRadius = UD(0, 6); })1652 Add("UICorner", { Parent = Indicator; CornerRadius = UD(1, 0); })1653 Add("UICorner", { Parent = Overlay; CornerRadius = UD(0, 6); })1654 local ToggleGrad = Add("UIGradient", { Parent = Overlay; Color = CS{ CSK(0, Library.Theme.AccentDark), CSK(1, Library.Theme.Accent) }; Rotation = -90; })1655 Library.ThemeLink(ToggleGrad, "Gradient", "AccentDark", "Accent")1656 1657 Toggle.Set = function(state: boolean?, Silent: boolean?)1658 state = state or not Toggle.State1659 Toggle.State = state1660 1661 Tween(Overlay, { BackgroundTransparency = state and 0 or 1 }, 0.1)1662 Tween(Indicator, { Position = state and UD2(1, -3, 0.5, 0) or UD2(0, 3, 0.5, 0), AnchorPoint = state and V2(1, 0.5) or V2(0, 0.5)}, 0.1)1663 1664 if Toggle.Flag then1665 Library.Flags[Toggle.Flag] = Library.Flags[Toggle.Flag] or {}1666 Library.Flags[Toggle.Flag].Value = state1667 Library.Flags[Toggle.Flag].Set = Toggle.Set1668 end1669 1670 if not Silent and Library.NotifyToggles and Library.Notify then1671 local Label = self.Text or Toggle.Flag or "Toggle"1672 Library.Notify({1673 Title = Label;1674 Text = state and "Enabled" or "Disabled";1675 Type = state and "Success" or "Info";1676 Duration = 1.6;1677 })1678 end1679 1680 Toggle.Callback(state)1681 end1682 1683 if propertyTable and propertyTable.Flag then1684 Toggle.Flag = propertyTable.Flag1685 Library.RegisterFlag(Toggle.Flag, { Value = Toggle.State; Set = Toggle.Set })1686 end1687 1688 Button.Activated:Connect(function()1689 Toggle.Set()1690 end)1691 1692 Toggle.Set(Toggle.State, true)1693 return Toggle1694end1695 1696Library.SubElements.Keybind = function(self: Library, propertyTable: {})1697 local Keybind = Overwrite({1698 Title = "",1699 State = false,1700 Type = "Toggle",1701 Callback = function() end,1702 }, propertyTable or {})1703 1704 local Settings = Add("ImageButton", { Parent = self.RightContent; Name = "Settings"; AutoButtonColor = false; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Image = "rbxassetid://132030186847627"; ImageTransparency = 0.5; ResampleMode = Enum.ResamplerMode.Pixelated; Size = UFO(15, 15); }) :: ImageButton1705 Keybind.Settings = Settings1706 1707 local Popup = Add("Frame", { Parent = Library._Instance; Name = "Popup"; Active = true; BackgroundColor3 = RGB(9, 8, 8); BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Position = UFS(0.3753760755062103, 0.30920326709747314); Size = UFO(180, 119); Visible = false; ZIndex = PopupZ; }) :: Frame1708 Keybind.Frame = Popup1709 1710 Add("TextButton", { Parent = Popup; Name = "Catcher"; AutoButtonColor = false; BackgroundTransparency = 1; BorderSizePixel = 0; Size = UFS(1, 1); Text = ""; })1711 local Header = Add("Frame", { Parent = Popup; Name = "Header"; BackgroundColor3 = RGB(20, 20, 21); BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Size = UD2(1, 0, 0, 35); }) :: Frame1712 local Page = Add("Frame", { Parent = Popup; Name = "Page"; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Position = UFO(0, 35); Size = UD2(1, 0, 1, -35); }) :: Frame1713 local KeyButton = Add("TextButton", { Parent = Page; Name = "KeyButton"; AutoButtonColor = false; BackgroundColor3 = RGB(20, 20, 21); BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal); Size = UD2(1, 0, 0, 25); Text = ""; TextColor3 = RGB(255, 255, 255); TextSize = 13; TextTransparency = 0.5; }) :: TextButton1714 local Options = Add("Frame", { Parent = Page; Name = "Options"; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Position = UFO(0, 35); Size = UD2(1, 0, 1, -35); }) :: Frame1715 local HoldButton = Add("TextButton", { Parent = Options; Name = "HoldButton"; AutoButtonColor = false; AutomaticSize = AS.X; BackgroundColor3 = RGB(255, 255, 255); BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; FontFace = FN("rbxasset://fonts/families/SourceSansPro.json", FW.Regular, FS.Normal); Size = UFS(0, 1); Text = ""; TextColor3 = RGB(0, 0, 0); TextSize = 14; }) :: TextButton1716 local ToggleButton = Add("TextButton", { Parent = Options; Name = "ToggleButton"; AutoButtonColor = false; AutomaticSize = AS.X; BackgroundColor3 = RGB(20, 20, 21); BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; FontFace = FN("rbxasset://fonts/families/SourceSansPro.json", FW.Regular, FS.Normal); Size = UFS(0, 1); Text = ""; TextColor3 = RGB(0, 0, 0); TextSize = 14; }) :: TextButton1717 Add("UICorner", { Parent = Popup; CornerRadius = UD(0, 5); })1718 Add("UIStroke", { Parent = Popup; ApplyStrokeMode = ASM.Border; Color = RGB(36, 37, 37); })1719 Add("UIShadow", { Parent = Popup; BlurRadius = UD(0, 20); Spread = UFO(5, 5); Transparency = 0.65; })1720 Add("UICorner", { Parent = Header; BottomLeftRadius = UD(0, 0); BottomRightRadius = UD(0, 0); TopLeftRadius = UD(0, 5); TopRightRadius = UD(0, 5); })1721 Add("UIStroke", { Parent = Header; ApplyStrokeMode = ASM.Border; Color = RGB(36, 37, 37); })1722 Add("UIPadding", { Parent = Header; PaddingBottom = UD(0, 10); PaddingLeft = UD(0, 10); PaddingRight = UD(0, 10); PaddingTop = UD(0, 10); })1723 Add("UIListLayout", { Parent = Header; FillDirection = FD.Horizontal; HorizontalFlex = UFA.SpaceBetween; SortOrder = SO.LayoutOrder; VerticalAlignment = VFA.Center; })1724 Add("TextLabel", { Parent = Header; Name = "Label"; AnchorPoint = V2(0, 0.5); AutomaticSize = AS.XY; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal); Position = UD2(0, 38, 0.5, 0); Size = UFO(0, 9); Text = Keybind.Title ~= "" and Keybind.Title or self.Text; TextColor3 = RGB(255, 255, 255); TextSize = 13; })1725 local CloseButton = Add("ImageButton", { Parent = Header; Name = "CloseButton"; AutoButtonColor = false; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Image = "rbxassetid://76308464050634"; Size = UFO(15, 15); }) :: ImageButton1726 Add("UIStroke", { Parent = KeyButton; ApplyStrokeMode = ASM.Border; Color = RGB(36, 37, 37); })1727 Add("UICorner", { Parent = KeyButton; CornerRadius = UD(0, 5); })1728 Add("UIPadding", { Parent = Page; PaddingBottom = UD(0, 12); PaddingLeft = UD(0, 12); PaddingRight = UD(0, 12); PaddingTop = UD(0, 12); })1729 Add("UIListLayout", { Parent = Options; FillDirection = FD.Horizontal; HorizontalAlignment = HFA.Center; HorizontalFlex = UFA.Fill; Padding = UD(0, 10); SortOrder = SO.LayoutOrder; VerticalAlignment = VFA.Center; })1730 local HoldLabel = Add("TextLabel", { Parent = HoldButton; Name = "Label"; AutomaticSize = AS.XY; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal); Size = UFS(1, 1); Text = "Hold"; TextColor3 = RGB(0, 0, 0); TextSize = 14; }) :: TextLabel1731 Add("UIPadding", { Parent = HoldButton; PaddingLeft = UD(0, 14); PaddingRight = UD(0, 14); })1732 Add("UICorner", { Parent = HoldButton; CornerRadius = UD(0, 5); })1733 local HoldGradient = Add("UIGradient", { Parent = HoldButton; Color = CS{ CSK(0, RGB(78, 88, 129)), CSK(1, RGB(138, 156, 229)) }; Rotation = -90; }) :: UIGradient1734 local ToggleGradient = Add("UIGradient", { Parent = ToggleButton; Color = CS{ CSK(0, RGB(78, 88, 129)), CSK(1, RGB(138, 156, 229)) }; Enabled = false; Rotation = -90; }) :: UIGradient1735 local ToggleLabel = Add("TextLabel", { Parent = ToggleButton; Name = "Label"; AutomaticSize = AS.XY; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal); Size = UFS(1, 1); Text = "Toggle"; TextColor3 = RGB(255, 255, 255); TextSize = 14; TextTransparency = 0.5; }) :: TextLabel1736 Add("UIPadding", { Parent = ToggleButton; PaddingLeft = UD(0, 14); PaddingRight = UD(0, 14); })1737 Add("UICorner", { Parent = ToggleButton; CornerRadius = UD(0, 5); })1738 1739 local Listening = false1740 1741 local function Format(Key: EnumItem?): string1742 if not Key then1743 return "—"1744 end1745 return Keys[Key.Name] or Key.Name1746 end1747 1748 local function Matches(Input: InputObject): boolean1749 return Keybind.Key ~= nil and (Input.KeyCode == Keybind.Key or Input.UserInputType == Keybind.Key)1750 end1751 1752 Keybind.Set = function(Key: EnumItem?)1753 Keybind.Key = Key1754 KeyButton.Text = Format(Key)1755 local Title = Keybind.Title ~= "" and Keybind.Title or (self.Text or "Keybind")1756 Library.KeybindRegistry = Library.KeybindRegistry or {}1757 Library.KeybindRegistry[Title] = {1758 Name = Title;1759 KeyText = Format(Key);1760 Active = Keybind.State == true;1761 Mode = Keybind.Type or "Toggle";1762 }1763 Library.UpdateKeybindList(Title, Format(Key), Keybind.State, Keybind.Type)1764 end1765 1766 Keybind.SetType = function(Type: string)1767 Keybind.Type = Type1768 local Held = Type == "Hold"1769 1770 local function Mode(Button: TextButton, Gradient: UIGradient, Label: TextLabel, Active: boolean)1771 if Active then1772 Gradient.Enabled = true1773 end1774 1775 local Fade = Tween(Button, { BackgroundColor3 = Active and RGB(255, 255, 255) or RGB(20, 20, 21) }, 0.15)1776 Tween(Label, { TextColor3 = Active and RGB(0, 0, 0) or RGB(255, 255, 255); TextTransparency = Active and 0 or 0.5 }, 0.15)1777 1778 if not Active then1779 Fade.Completed:Once(function()1780 1781 if Keybind.Type == Type then1782 Gradient.Enabled = false1783 end1784 end)1785 end1786 end1787 1788 Mode(HoldButton, HoldGradient, HoldLabel, Held)1789 Mode(ToggleButton, ToggleGradient, ToggleLabel, not Held)1790 1791 if Held and Keybind.State then1792 Keybind.State = false1793 Keybind.Callback(false)1794 end1795 end1796 1797 Keybind.Close = function()1798 Keybind.Open(false)1799 end1800 1801 Keybind.Open = function(State: boolean?)1802 if State == nil then1803 State = not Popup.Visible1804 end1805 1806 if State then1807 ClaimPopup(Keybind)1808 1809 local Target = UFO(1810 Settings.AbsolutePosition.X + Settings.AbsoluteSize.X - Popup.AbsoluteSize.X,1811 Settings.AbsolutePosition.Y + Settings.AbsoluteSize.Y + 81812 )1813 1814 Popup.Position = Target - UFO(0, 10)1815 Popup.Visible = true1816 Tween(Popup, { Position = Target }, 0.25, ES.Quint)1817 else1818 Listening = false1819 Keybind.Set(Keybind.Key)1820 Popup.Visible = false1821 ReleasePopup(Keybind)1822 end1823 1824 Tween(Settings, { ImageTransparency = State and 0 or 0.5 }, 0.15)1825 end1826 1827 KeyButton.Activated:Connect(function()1828 Listening = true1829 KeyButton.Text = "..."1830 end)1831 1832 HoldButton.Activated:Connect(function()1833 Keybind.SetType("Hold")1834 end)1835 1836 ToggleButton.Activated:Connect(function()1837 Keybind.SetType("Toggle")1838 end)1839 1840 Settings.Activated:Connect(function()1841 Keybind.Open()1842 end)1843 1844 CloseButton.Activated:Connect(function()1845 Keybind.Open(false)1846 end)1847 1848 UserInputService.InputBegan:Connect(function(Input, GameProcessed)1849 if Listening then1850 1851 if Input.UserInputType == UIT.MouseButton1 and KeyButton.GuiState ~= EGS.Idle then1852 return1853 end1854 1855 Listening = false1856 1857 if Input.KeyCode == EKC.Backspace or Input.KeyCode == EKC.Escape then1858 Keybind.Set(nil)1859 elseif Input.UserInputType == UIT.Keyboard then1860 Keybind.Set(Input.KeyCode)1861 elseif Input.UserInputType == UIT.MouseButton1 or Input.UserInputType == UIT.MouseButton2 or Input.UserInputType == UIT.MouseButton3 then1862 Keybind.Set(Input.UserInputType)1863 else1864 Keybind.Set(Keybind.Key)1865 end1866 1867 return1868 end1869 1870 if GameProcessed or not Matches(Input) then1871 return1872 end1873 1874 Keybind.State = Keybind.Type == "Hold" or not Keybind.State1875 local Title = Keybind.Title ~= "" and Keybind.Title or (self.Text or "Keybind")1876 Library.KeybindRegistry = Library.KeybindRegistry or {}1877 if Library.KeybindRegistry[Title] then1878 Library.KeybindRegistry[Title].Active = Keybind.State == true1879 Library.KeybindRegistry[Title].Mode = Keybind.Type or "Toggle"1880 end1881 Library.UpdateKeybindList(Title, Format(Keybind.Key), Keybind.State, Keybind.Type)1882 Keybind.Callback(Keybind.State)1883 end)1884 1885 UserInputService.InputEnded:Connect(function(Input)1886 if Keybind.Type ~= "Hold" or not Keybind.State or not Matches(Input) then1887 return1888 end1889 1890 Keybind.State = false1891 local Title = Keybind.Title ~= "" and Keybind.Title or (self.Text or "Keybind")1892 Library.KeybindRegistry = Library.KeybindRegistry or {}1893 if Library.KeybindRegistry[Title] then1894 Library.KeybindRegistry[Title].Active = false1895 end1896 Library.UpdateKeybindList(Title, Format(Keybind.Key), false, Keybind.Type)1897 Keybind.Callback(false)1898 end)1899 1900 BindDrag(Popup, Header)1901 1902 if propertyTable and propertyTable.Flag then1903 Keybind.Flag = propertyTable.Flag1904 Library.RegisterFlag(Keybind.Flag, { Value = Keybind.Key; Set = Keybind.Set })1905 end1906 1907 Keybind.SetType(Keybind.Type)1908 Keybind.Set(Keybind.Key)1909 1910 task.defer(function()1911 local Title = Keybind.Title ~= "" and Keybind.Title or (self.Text or "Keybind")1912 Library.UpdateKeybindList(Title, Format(Keybind.Key), false, Keybind.Type)1913 end)1914 return Keybind1915end1916 1917Library.SubElements.Colorpicker = function(self: Library, propertyTable: {})1918 local Colorpicker = Overwrite({1919 Title = "",1920 Color = RGB(255, 0, 0),1921 Transparency = 0,1922 Callback = function() end,1923 }, propertyTable or {})1924 1925 local Hue, Saturation, Value = Colorpicker.Color:ToHSV()1926 1927 local Button = Add("TextButton", { Parent = self.RightContent; Name = "Button"; AutoButtonColor = false; BackgroundColor3 = RGB(255, 255, 255); BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; FontFace = FN("rbxasset://fonts/families/SourceSansPro.json", FW.Regular, FS.Normal); Size = UFO(15, 15); Text = ""; TextColor3 = RGB(0, 0, 0); TextSize = 14; }) :: TextButton1928 Add("UICorner", { Parent = Button; CornerRadius = UD(0, 7); })1929 Add("UIGradient", { Parent = Button; Color = CS{ CSK(0, RGB(163, 163, 163)), CSK(1, RGB(255, 255, 255)) }; Rotation = -90; })1930 1931 Colorpicker.Button = Button1932 1933 local ColorpickerFrame = Add("Frame", { Parent = Library._Instance; Name = "ColorpickerFrame"; Active = true; AutomaticSize = AS.Y; BackgroundColor3 = RGB(9, 8, 8); BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Position = UFS(0.3759043514728546, 0.058557264506816864); Size = UFO(199, 0); Visible = false; ZIndex = PopupZ; }) :: Frame1934 Colorpicker.Frame = ColorpickerFrame1935 1936 Add("TextButton", { Parent = ColorpickerFrame; Name = "Catcher"; AutoButtonColor = false; BackgroundTransparency = 1; BorderSizePixel = 0; Size = UFS(1, 1); Text = ""; })1937 local Header = Add("Frame", { Parent = ColorpickerFrame; Name = "Header"; BackgroundColor3 = RGB(20, 20, 21); BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Size = UD2(1, 0, 0, 35); }) :: Frame1938 1939 local Page = Add("Frame", { Parent = ColorpickerFrame; Name = "Page"; AutomaticSize = AS.Y; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Position = UFO(0, 35); Size = UD2(1, 0, 0, 0); }) :: Frame1940 local SaturationBox = Add("Frame", { Parent = Page; Name = "SaturationBox"; BackgroundColor3 = RGB(255, 255, 255); BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Size = UD2(1, 0, 0, 175); }) :: Frame1941 local ValueOverlay = Add("Frame", { Parent = SaturationBox; Name = "ValueOverlay"; BackgroundColor3 = RGB(255, 255, 255); BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Size = UFS(1, 1); }) :: Frame1942 local SaturationCursor = Add("TextButton", { Parent = SaturationBox; Name = "SaturationCursor"; AnchorPoint = V2(0.5, 0.5); AutoButtonColor = false; BackgroundColor3 = RGB(255, 0, 0); BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; FontFace = FN("rbxasset://fonts/families/SourceSansPro.json", FW.Regular, FS.Normal); Position = UFS(1, 0); Size = UFO(10, 10); Text = ""; TextColor3 = RGB(0, 0, 0); TextSize = 14; }) :: TextButton1943 local HueSlider = Add("Frame", { Parent = Page; Name = "HueSlider"; BackgroundColor3 = RGB(255, 255, 255); BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Size = UD2(1, 0, 0, 12); }) :: Frame1944 local HueCursor = Add("Frame", { Parent = HueSlider; Name = "HueCursor"; BackgroundColor3 = RGB(255, 255, 255); BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Position = UFO(0, -2); Size = UD2(0, 10, 1, 4); }) :: Frame1945 local AlphaSlider = Add("Frame", { Parent = Page; Name = "AlphaSlider"; BackgroundColor3 = RGB(255, 255, 255); BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Size = UD2(1, 0, 0, 12); }) :: Frame1946 local AlphaCursor = Add("Frame", { Parent = AlphaSlider; Name = "AlphaCursor"; AnchorPoint = V2(1, 0); BackgroundColor3 = RGB(255, 255, 255); BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Position = UD2(1, 0, 0, -2); Size = UD2(0, 10, 1, 4); }) :: Frame1947 Add("UICorner", { Parent = ColorpickerFrame; CornerRadius = UD(0, 5); })1948 Add("UIStroke", { Parent = ColorpickerFrame; ApplyStrokeMode = ASM.Border; Color = RGB(36, 37, 37); })1949 Add("UIShadow", { Parent = ColorpickerFrame; BlurRadius = UD(0, 20); Spread = UFO(5, 5); Transparency = 0.65; })1950 Add("UICorner", { Parent = Header; BottomLeftRadius = UD(0, 0); BottomRightRadius = UD(0, 0); TopLeftRadius = UD(0, 5); TopRightRadius = UD(0, 5); })1951 Add("UIStroke", { Parent = Header; ApplyStrokeMode = ASM.Border; Color = RGB(36, 37, 37); })1952 Add("UIPadding", { Parent = Header; PaddingBottom = UD(0, 10); PaddingLeft = UD(0, 10); PaddingRight = UD(0, 10); PaddingTop = UD(0, 10); })1953 Add("UIListLayout", { Parent = Header; FillDirection = FD.Horizontal; HorizontalFlex = UFA.SpaceBetween; SortOrder = SO.LayoutOrder; VerticalAlignment = VFA.Center; })1954 Add("TextLabel", { Parent = Header; Name = "Label"; AnchorPoint = V2(0, 0.5); AutomaticSize = AS.XY; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal); Position = UD2(0, 38, 0.5, 0); Size = UFO(0, 9); Text = Colorpicker.Title ~= "" and Colorpicker.Title or self.Text; TextColor3 = RGB(255, 255, 255); TextSize = 13; })1955 local CloseButton = Add("ImageButton", { Parent = Header; Name = "CloseButton"; AutoButtonColor = false; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Image = "rbxassetid://76308464050634"; Size = UFO(15, 15); }) :: ImageButton1956 Add("UIPadding", { Parent = Page; PaddingBottom = UD(0, 12); PaddingLeft = UD(0, 12); PaddingRight = UD(0, 12); PaddingTop = UD(0, 12); })1957 Add("UICorner", { Parent = SaturationBox; CornerRadius = UD(0, 5); })1958 Add("UIGradient", { Parent = ValueOverlay; Color = CS{ CSK(0, RGB(0, 0, 0)), CSK(1, RGB(0, 0, 0)) }; Rotation = -90; Transparency = NS{ NSK(0, 0), NSK(1, 1) }; })1959 Add("UICorner", { Parent = ValueOverlay; CornerRadius = UD(0, 4); })1960 local SaturationGradient = Add("UIGradient", { Parent = SaturationBox; Color = CS{ CSK(0, RGB(255, 255, 255)), CSK(1, RGB(255, 0, 0)) }; }) :: UIGradient1961 Add("UIStroke", { Parent = SaturationBox; ApplyStrokeMode = ASM.Border; Color = RGB(36, 37, 37); })1962 Add("UICorner", { Parent = SaturationCursor; CornerRadius = UD(1, 0); })1963 Add("UIShadow", { Parent = SaturationCursor; BlurRadius = UD(0, 5); Spread = UFO(5, 5); Transparency = 0.48; })1964 Add("UIStroke", { Parent = SaturationCursor; ApplyStrokeMode = ASM.Border; Color = RGB(255, 255, 255); })1965 Add("UIListLayout", { Parent = Page; Padding = UD(0, 10); SortOrder = SO.LayoutOrder; })1966 Add("UICorner", { Parent = HueSlider; CornerRadius = UD(0, 5); })1967 Add("UICorner", { Parent = HueCursor; CornerRadius = UD(0, 3); })1968 Add("UIShadow", { Parent = HueCursor; BlurRadius = UD(0, 5); Spread = UFO(5, 5); Transparency = 0.48; })1969 Add("UIGradient", { Parent = HueSlider; Color = CS{ CSK(0, RGB(255, 0, 1)), CSK(0.167, RGB(255, 0, 255)), CSK(0.333, RGB(0, 0, 255)), CSK(0.5, RGB(0, 255, 225)), CSK(0.667, RGB(0, 255, 0)), CSK(0.833, RGB(255, 255, 0)), CSK(1, RGB(255, 0, 0)) }; Transparency = NS{ NSK(0, 0), NSK(0.481, 0.29374998807907104), NSK(1, 0) }; })1970 Add("UICorner", { Parent = AlphaSlider; CornerRadius = UD(0, 5); })1971 Add("UICorner", { Parent = AlphaCursor; CornerRadius = UD(0, 3); })1972 Add("UIShadow", { Parent = AlphaCursor; BlurRadius = UD(0, 5); Spread = UFO(5, 5); Transparency = 0.48; })1973 local AlphaGradient = Add("UIGradient", { Parent = AlphaSlider; Color = CS{ CSK(0, RGB(255, 255, 255)), CSK(1, RGB(255, 0, 0)) }; }) :: UIGradient1974 1975 local function Update()1976 Colorpicker.Color = HSV(Hue, Saturation, Value)1977 1978 SaturationGradient.Color = CS{ CSK(0, RGB(255, 255, 255)), CSK(1, HSV(Hue, 1, 1)) }1979 AlphaGradient.Color = CS{ CSK(0, RGB(255, 255, 255)), CSK(1, Colorpicker.Color) }1980 1981 Tween(SaturationCursor, { Position = UFS(Saturation, 1 - Value), BackgroundColor3 = Colorpicker.Color }, 0.08)1982 Tween(HueCursor, { AnchorPoint = V2(1 - Hue, 0), Position = UD2(1 - Hue, 0, 0, -2) }, 0.08)1983 Tween(AlphaCursor, { AnchorPoint = V2(1 - Colorpicker.Transparency, 0), Position = UD2(1 - Colorpicker.Transparency, 0, 0, -2) }, 0.08)1984 1985 Tween(Button, { BackgroundColor3 = Colorpicker.Color, BackgroundTransparency = Colorpicker.Transparency }, 0.15)1986 1987 if Colorpicker.Flag and Library.Flags[Colorpicker.Flag] then1988 Library.Flags[Colorpicker.Flag].Value = Colorpicker.Color1989 Library.Flags[Colorpicker.Flag].Transparency = Colorpicker.Transparency1990 end1991 1992 Colorpicker.Callback(Colorpicker.Color, Colorpicker.Transparency)1993 end1994 1995 Colorpicker.Set = function(Color: Color3?, Transparency: number?)1996 if Color then1997 Hue, Saturation, Value = Color:ToHSV()1998 end1999 2000 Colorpicker.Transparency = MC(Transparency or Colorpicker.Transparency, 0, 1)2001 Update()2002 end2003 2004 Colorpicker.Close = function()2005 Colorpicker.Toggle(false)2006 end2007 2008 Colorpicker.Toggle = function(State: boolean?)2009 if State == nil then2010 State = not ColorpickerFrame.Visible2011 end2012 2013 if State then2014 ClaimPopup(Colorpicker)2015 2016 local Target = UFO(2017 Button.AbsolutePosition.X + Button.AbsoluteSize.X - ColorpickerFrame.AbsoluteSize.X,2018 Button.AbsolutePosition.Y + Button.AbsoluteSize.Y + 82019 )2020 2021 ColorpickerFrame.Position = Target - UFO(0, 10)2022 ColorpickerFrame.Visible = true2023 Tween(ColorpickerFrame, { Position = Target }, 0.25, ES.Quint)2024 else2025 ColorpickerFrame.Visible = false2026 ReleasePopup(Colorpicker)2027 end2028 end2029 2030 BindSlider(HueSlider, function(Alpha)2031 Hue = 1 - Alpha.X2032 Update()2033 end)2034 2035 BindSlider(SaturationBox, function(Alpha)2036 Saturation, Value = Alpha.X, 1 - Alpha.Y2037 Update()2038 end)2039 2040 BindSlider(AlphaSlider, function(Alpha)2041 Colorpicker.Transparency = 1 - Alpha.X2042 Update()2043 end)2044 2045 Button.Activated:Connect(function()2046 Colorpicker.Toggle()2047 end)2048 2049 CloseButton.Activated:Connect(function()2050 Colorpicker.Toggle(false)2051 end)2052 2053 BindDrag(ColorpickerFrame, Header)2054 2055 if propertyTable and propertyTable.Flag then2056 Colorpicker.Flag = propertyTable.Flag2057 Library.RegisterFlag(Colorpicker.Flag, {2058 Value = Colorpicker.Color;2059 Transparency = Colorpicker.Transparency;2060 Set = Colorpicker.Set;2061 })2062 end2063 2064 Colorpicker.Set(Colorpicker.Color, Colorpicker.Transparency)2065 return Colorpicker2066end2067 2068Library._Instance = Add("ScreenGui", { Parent = RunService:IsStudio() and Client.PlayerGui or Services:GetService("CoreGui"); Name = "Window"; ZIndexBehavior = ZIB.Sibling; }) :: ScreenGui2069 2070Library.Window = function(self: Library, propertyTable: {})2071 local Window = Overwrite({2072 Title = "",2073 Footer = "",2074 Logo = nil,2075 Icon = nil,2076 }, propertyTable or {})2077 2078 local Canvas = Add("Frame", { Parent = self._Instance; Name = "Canvas"; BackgroundColor3 = Library.Theme.Background; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Size = UFO(658, 461); }) :: Frame2079 Library.ThemeLink(Canvas, "BackgroundColor3", "Background")2080 local Sidebar = Add("Frame", { Parent = Canvas; Name = "Sidebar"; BackgroundColor3 = Library.Theme.Surface; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Size = UD2(0, 75, 1, 0); }) :: Frame2081 Library.ThemeLink(Sidebar, "BackgroundColor3", "Surface")2082 2083 -- Author logo (top left) with top padding from window edge2084 local LogoWrap = Add("Frame", {2085 Parent = Sidebar;2086 Name = "Logo";2087 BackgroundTransparency = 1;2088 Size = UD2(1, 0, 0, 58);2089 BorderSizePixel = 0;2090 })2091 Add("UIPadding", {2092 Parent = LogoWrap;2093 PaddingTop = UD(0, 10);2094 })2095 local LogoBtn = Add("ImageLabel", {2096 Parent = LogoWrap;2097 AnchorPoint = V2(0.5, 0.5);2098 Position = UFS(0.5, 0.55);2099 Size = UFO(32, 32);2100 BackgroundTransparency = 1;2101 Image = ResolveIcon(Window.Logo or Window.Icon or "hash");2102 ImageColor3 = RGB(255, 255, 255);2103 ImageTransparency = 0;2104 ScaleType = SCL.Fit;2105 ZIndex = 3;2106 })2107 local LogoGlow = Add("ImageLabel", {2108 Parent = LogoWrap;2109 AnchorPoint = V2(0.5, 0.5);2110 Position = UFS(0.5, 0.55);2111 Size = UFO(64, 64);2112 BackgroundTransparency = 1;2113 Image = "rbxassetid://8992230677";2114 ImageColor3 = Library.Theme.Accent;2115 ImageTransparency = 0.75;2116 ZIndex = 1;2117 })2118 Library.ThemeLink(LogoGlow, "ImageColor3", "Accent")2119 local LogoGlow2 = Add("ImageLabel", {2120 Parent = LogoWrap;2121 AnchorPoint = V2(0.5, 0.5);2122 Position = UFS(0.5, 0.55);2123 Size = UFO(42, 42);2124 BackgroundTransparency = 1;2125 Image = "rbxassetid://8992230677";2126 ImageColor3 = Library.Theme.Accent;2127 ImageTransparency = 0.88;2128 ZIndex = 2;2129 })2130 Library.ThemeLink(LogoGlow2, "ImageColor3", "Accent")2131 Window.LogoImage = LogoBtn2132 Window.SetLogo = function(_, Icon)2133 LogoBtn.Image = ResolveIcon(Icon)2134 end2135 2136 local PageButtons = Add("ScrollingFrame", {2137 Parent = Sidebar;2138 Name = "PageButtons";2139 BackgroundTransparency = 1;2140 BorderSizePixel = 0;2141 Position = UFO(0, 58);2142 Size = UD2(1, 0, 1, -58);2143 CanvasSize = UD2(0, 0, 0, 0);2144 AutomaticCanvasSize = AS.Y;2145 ScrollBarThickness = 0;2146 ScrollingDirection = SBD.Y;2147 ClipsDescendants = true;2148 Active = true;2149 Selectable = false;2150 })2151 Add("UIListLayout", {2152 Parent = PageButtons;2153 Padding = UD(0, 5);2154 HorizontalAlignment = HFA.Center;2155 SortOrder = SO.LayoutOrder;2156 })2157 2158 Window.TabEditMode = false2159 -- Very small lock/reorder toggle2160 local EditRow = Add("Frame", {2161 Parent = Sidebar;2162 Name = "TabEdit";2163 AnchorPoint = V2(0.5, 1);2164 Position = UD2(0.5, 0, 1, -6);2165 Size = UFO(22, 10);2166 BackgroundTransparency = 1;2167 ZIndex = 5;2168 })2169 local EditTrack = Add("Frame", {2170 Parent = EditRow;2171 Size = UFS(1, 1);2172 BackgroundColor3 = Library.Theme.SurfaceAlt;2173 BorderSizePixel = 0;2174 })2175 Add("UICorner", { Parent = EditTrack; CornerRadius = UD(1, 0); })2176 Library.ThemeLink(EditTrack, "BackgroundColor3", "SurfaceAlt")2177 local EditKnob = Add("Frame", {2178 Parent = EditTrack;2179 Size = UFO(8, 8);2180 Position = UD2(0, 1, 0.5, 0);2181 AnchorPoint = V2(0, 0.5);2182 BackgroundColor3 = RGB(140, 144, 155);2183 BorderSizePixel = 0;2184 ZIndex = 6;2185 })2186 Add("UICorner", { Parent = EditKnob; CornerRadius = UD(1, 0); })2187 local EditHit = Add("TextButton", {2188 Parent = EditRow;2189 Size = UFS(1, 1);2190 BackgroundTransparency = 1;2191 Text = "";2192 ZIndex = 7;2193 })2194 EditHit.Activated:Connect(function()2195 Window.TabEditMode = not Window.TabEditMode2196 local On = Window.TabEditMode2197 Tween(EditKnob, {2198 Position = On and UD2(1, -1, 0.5, 0) or UD2(0, 1, 0.5, 0);2199 AnchorPoint = On and V2(1, 0.5) or V2(0, 0.5);2200 BackgroundColor3 = On and Library.Theme.Accent or RGB(180, 184, 200);2201 }, 0.12)2202 Tween(EditTrack, {2203 BackgroundColor3 = On and Library.Theme.AccentDark or Library.Theme.SurfaceAlt;2204 }, 0.12)2205 Library.Notify({2206 Title = "Tabs";2207 Text = On and "Drag tabs to rearrange" or "Tab order locked";2208 Type = "Info";2209 Duration = 1.5;2210 })2211 end)2212 Window.TabEditButton = EditHit2213 PageButtons.Size = UD2(1, 0, 1, -58 - 28)2214 local Header = Add("Frame", { Parent = Canvas; Name = "Header"; BackgroundColor3 = Library.Theme.SurfaceAlt; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Position = UFO(75, 0); Size = UD2(1, -75, 0, 50); }) :: Frame2215 Library.ThemeLink(Header, "BackgroundColor3", "SurfaceAlt")2216 local SubPages = Add("Frame", { Parent = Header; Name = "SubPages"; AutomaticSize = AS.X; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Size = UFS(0, 1); }) :: Frame2217 local Search = Add("Frame", { Parent = Header; Name = "Search"; LayoutOrder = 1; Active = true; AnchorPoint = V2(1, 0); AutomaticSize = AS.X; BackgroundColor3 = Library.Theme.Background; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Position = UFS(1, 0); Selectable = true; Size = UD2(0, 200, 1, 0); }) :: Frame2218 local Pages = Add("Frame", { Parent = Canvas; Name = "Pages"; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Position = UFO(75, 50); Size = UD2(1, -75, 1, -75); }) :: Frame2219 local Footer = Add("Frame", { Parent = Canvas; Name = "Footer"; AnchorPoint = V2(0, 1); BackgroundColor3 = Library.Theme.Surface; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Position = UD2(0, 75, 1, 0); Size = UD2(1, -75, 0, 25); }) :: Frame2220 Library.ThemeLink(Footer, "BackgroundColor3", "Surface")2221 local SearchBox = Add("TextBox", { Parent = Search; Name = "TextLabel"; Active = false; AutomaticSize = AS.X; ClearTextOnFocus = false; LayoutOrder = 1; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal); PlaceholderColor3 = RGB(255, 255, 255); PlaceholderText = "Search function"; Selectable = false; Size = UFS(0, 1); Text = ""; TextColor3 = RGB(255, 255, 255); TextSize = 14; TextTransparency = 0.5; }) :: TextBox2222 Add("UIStroke", { Parent = Canvas; ApplyStrokeMode = ASM.Border; Color = RGB(36, 37, 37); })2223 Add("UICorner", { Parent = Canvas; CornerRadius = UD(0, 5); })2224 Add("UICorner", { Parent = Sidebar; BottomLeftRadius = UD(0, 5); BottomRightRadius = UD(0, 0); TopLeftRadius = UD(0, 5); TopRightRadius = UD(0, 0); })2225 Add("UIStroke", { Parent = Sidebar; ApplyStrokeMode = ASM.Border; Color = RGB(36, 37, 37); })2226 Add("UICorner", { Parent = Header; BottomLeftRadius = UD(0, 0); BottomRightRadius = UD(0, 0); TopLeftRadius = UD(0, 0); TopRightRadius = UD(0, 5); })2227 Add("UIStroke", { Parent = Header; ApplyStrokeMode = ASM.Border; Color = RGB(36, 37, 37); })2228 Add("UIListLayout", { Parent = SubPages; FillDirection = FD.Horizontal; Padding = UD(0, 10); SortOrder = SO.LayoutOrder; VerticalAlignment = VFA.Center; })2229 Add("UIPadding", { Parent = Header; PaddingBottom = UD(0, 10); PaddingLeft = UD(0, 10); PaddingRight = UD(0, 10); PaddingTop = UD(0, 10); })2230 Add("UIPadding", { Parent = Search; PaddingLeft = UD(0, 8); PaddingRight = UD(0, 8); })2231 Add("UICorner", { Parent = Search; CornerRadius = UD(0, 5); })2232 Add("UIListLayout", { Parent = Search; FillDirection = FD.Horizontal; Padding = UD(0, 5); SortOrder = SO.LayoutOrder; VerticalAlignment = VFA.Center; })2233 Add("ImageLabel", { Parent = Search; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; LayoutOrder = 0; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; Image = "rbxassetid://82536262318754"; ImageTransparency = 0.5; ResampleMode = Enum.ResamplerMode.Pixelated; Size = UFO(15, 15); })2234 Add("UIListLayout", { Parent = Header; FillDirection = FD.Horizontal; HorizontalFlex = UFA.SpaceBetween; SortOrder = SO.LayoutOrder; VerticalAlignment = VFA.Center; })2235 Add("UIPadding", { Parent = Pages; PaddingBottom = UD(0, 12); PaddingLeft = UD(0, 12); PaddingRight = UD(0, 12); PaddingTop = UD(0, 12); })2236 Add("UIShadow", { Parent = Canvas; BlurRadius = UD(0, 20); Spread = UFO(5, 5); Transparency = 0.65; })2237 Add("UICorner", { Parent = Footer; BottomLeftRadius = UD(0, 0); BottomRightRadius = UD(0, 5); TopLeftRadius = UD(0, 0); TopRightRadius = UD(0, 0); })2238 Add("UIStroke", { Parent = Footer; ApplyStrokeMode = ASM.Border; Color = RGB(36, 37, 37); })2239 Add("UIPadding", { Parent = Footer; PaddingBottom = UD(0, 10); PaddingLeft = UD(0, 10); PaddingRight = UD(0, 10); PaddingTop = UD(0, 10); })2240 Add("TextLabel", { Parent = Footer; AnchorPoint = V2(0, 0.5); AutomaticSize = AS.X; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal); Position = UFS(0, 0.5); Size = UFO(0, 13); Text = Window.Title; TextColor3 = RGB(255, 255, 255); TextSize = 13; TextTransparency = 0.5; })2241 Add("TextLabel", { Parent = Footer; AnchorPoint = V2(1, 0.5); AutomaticSize = AS.X; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal); Position = UFS(1, 0.5); Size = UFO(0, 13); Text = Window.Footer; TextColor3 = RGB(255, 255, 255); TextSize = 13; TextTransparency = 0.5; })2242 BindDrag(Canvas, Header, true, Search)2243 2244 Window.Canvas = Canvas2245 TIS(Library.Windows, Window)2246 Add("UIScale", { Parent = Canvas; Scale = Library.UIScale })2247 2248 local function CenterCanvas()2249 local Camera = workspace.CurrentCamera2250 if not Camera or not Canvas.Parent then2251 return2252 end2253 local Viewport = Camera.ViewportSize2254 local W, H = 658, 4612255 local Scale = Library.UIScale or 12256 local GuiService = Services:GetService("GuiService")2257 local Inset = GuiService:GetGuiInset()2258 local X = math.floor((Viewport.X - W * Scale) * 0.5)2259 local Y = math.floor((Viewport.Y - Inset.Y - H * Scale) * 0.5)2260 Canvas.Position = ClampToScreen(Canvas, UFO(math.max(4, X), math.max(4, Y)))2261 end2262 CenterCanvas()2263 task.defer(CenterCanvas)2264 task.delay(0.05, CenterCanvas)2265 2266 Library.SetWatermark(Library.Watermark.Text, Library.Watermark.Enabled)2267 Library.SetKeybindList(Library.KeybindList.Enabled)2268 if Library._MountKeySystem then2269 Library._MountKeySystem(Window)2270 end2271 task.defer(CenterCanvas)2272 2273 do2274 local Cam = workspace.CurrentCamera2275 if Cam then2276 Cam:GetPropertyChangedSignal("ViewportSize"):Connect(function()2277 if Canvas and Canvas.Parent then2278 Canvas.Position = ClampToScreen(Canvas, Canvas.Position)2279 end2280 end)2281 end2282 end2283 2284 Search.InputBegan:Connect(function(Input)2285 if Input.UserInputType == UIT.MouseButton1 or Input.UserInputType == UIT.Touch then2286 SearchBox:CaptureFocus()2287 end2288 end)2289 2290 SearchBox:GetPropertyChangedSignal("Text"):Connect(function()2291 local Query = SearchBox.Text:lower()2292 local Matched = {}2293 local FirstOwner = nil2294 2295 for _, Entry in Library.Searchable do2296 local Visible = Query == "" or Entry.Text:lower():find(Query, 1, true) ~= nil2297 Entry.Frame.Visible = Visible2298 2299 if Visible then2300 Matched[Entry.Section] = true2301 if Query ~= "" and not FirstOwner and Entry.Section and Entry.Section.PageFrame then2302 FirstOwner = (Library.PageFrames or {})[Entry.Section.PageFrame]2303 end2304 end2305 end2306 2307 for _, Section in Library.Sections do2308 Section.Frame.Visible = Query == "" or Matched[Section] == true2309 end2310 2311 if Query ~= "" and FirstOwner then2312 local Owner = FirstOwner2313 if Owner.ParentPage then2314 if not Owner.ParentPage.IsOpen then2315 Owner.ParentPage.Open()2316 end2317 if not Owner.IsOpen then2318 Owner.Open()2319 end2320 elseif not Owner.IsOpen then2321 Owner.Open()2322 end2323 end2324 end)2325 2326 Window.Pages = {}2327 Window.Page = function(self: Library, propertyTable: {})2328 local Page = Overwrite({2329 Icon = "box"2330 }, propertyTable or {})2331 2332 Page.SubPages = {}2333 Page.ActiveSubPage = nil2334 Page.Opened = false2335 2336 local PageButton = Add("TextButton", {2337 Parent = PageButtons;2338 Name = "PageButton";2339 AutoButtonColor = false;2340 BackgroundTransparency = 1;2341 BorderSizePixel = 0;2342 Size = UFO(45, 45);2343 Text = "";2344 ClipsDescendants = false;2345 LayoutOrder = #Window.Pages;2346 }) :: TextButton2347 2348 -- Soft radial selection bloom (centered behind icon)2349 local GlowImage = Add("ImageLabel", {2350 Parent = PageButton;2351 Name = "GlowImage";2352 AnchorPoint = V2(0.5, 0.5);2353 Position = UFS(0.5, 0.5);2354 Size = UFO(52, 52);2355 BackgroundTransparency = 1;2356 Image = "rbxassetid://8992230677";2357 ImageColor3 = Library.Theme.Accent;2358 ImageTransparency = 1;2359 ZIndex = 1;2360 BorderSizePixel = 0;2361 })2362 Library.ThemeLink(GlowImage, "ImageColor3", "Accent")2363 local GlowInner = Add("ImageLabel", {2364 Parent = PageButton;2365 Name = "GlowInner";2366 AnchorPoint = V2(0.5, 0.5);2367 Position = UFS(0.5, 0.5);2368 Size = UFO(36, 36);2369 BackgroundTransparency = 1;2370 Image = "rbxassetid://8992230677";2371 ImageColor3 = Library.Theme.Accent;2372 ImageTransparency = 1;2373 ZIndex = 2;2374 BorderSizePixel = 0;2375 })2376 Library.ThemeLink(GlowInner, "ImageColor3", "Accent")2377 2378 local PageIcon = Add("ImageLabel", {2379 Parent = PageButton;2380 BackgroundTransparency = 1;2381 BorderSizePixel = 0;2382 Image = ResolveIcon(Page.Icon);2383 ImageTransparency = 0.45;2384 ImageColor3 = RGB(255, 255, 255);2385 ScaleType = SCL.Fit;2386 Size = UFS(1, 1);2387 ZIndex = 3;2388 }) :: ImageLabel2389 Add("UIPadding", {2390 Parent = PageButton;2391 PaddingBottom = UD(0, 12);2392 PaddingLeft = UD(0, 12);2393 PaddingRight = UD(0, 12);2394 PaddingTop = UD(0, 12);2395 })2396 2397 Page.Button = PageButton2398 Page.GlowImage = GlowImage2399 Page.GlowInner = GlowInner2400 Page.IconLabel = PageIcon2401 Page.LayoutOrder = PageButton.LayoutOrder2402 2403 PageContent(Page, Pages, Window.Pages, function()2404 Page.Opened = true2405 Tween(GlowImage, { ImageTransparency = 0.62 }, 0.22)2406 Tween(GlowInner, { ImageTransparency = 0.78 }, 0.22)2407 Tween(PageIcon, { ImageTransparency = 0, ImageColor3 = Library.Theme.Accent }, 0.2)2408 2409 for _, SubPage in Page.SubPages do2410 SubPage.Button.Visible = true2411 end2412 2413 if Page.ActiveSubPage then2414 Page.Frame.Visible = false2415 Page.ActiveSubPage.Open()2416 end2417 end, function()2418 Page.Opened = false2419 Tween(GlowImage, { ImageTransparency = 1 }, 0.16)2420 Tween(GlowInner, { ImageTransparency = 1 }, 0.16)2421 Tween(PageIcon, { ImageTransparency = 0.45, ImageColor3 = RGB(255, 255, 255) }, 0.16)2422 2423 for _, SubPage in Page.SubPages do2424 SubPage.Button.Visible = false2425 end2426 2427 if Page.ActiveSubPage then2428 Page.ActiveSubPage.Close()2429 end2430 end)2431 2432 -- Drag-reorder: ghost snaps in-list only2433 do2434 local Dragging = false2435 local Ghost = nil2436 local Placeholder = nil2437 2438 local function ClearGhost()2439 if Ghost then pcall(function() Ghost:Destroy() end) Ghost = nil end2440 if Placeholder then pcall(function() Placeholder:Destroy() end) Placeholder = nil end2441 end2442 2443 local function OrderedPages()2444 local List = {}2445 for _, P in Window.Pages do2446 if P ~= Page and P.Button and P.Button.Parent then2447 TIS(List, P)2448 end2449 end2450 table.sort(List, function(a, b)2451 return (a.Button.LayoutOrder or 0) < (b.Button.LayoutOrder or 0)2452 end)2453 return List2454 end2455 2456 local function ApplyInsert(InsertIndex)2457 local List = OrderedPages()2458 InsertIndex = MC(InsertIndex, 0, #List)2459 if Placeholder then2460 Placeholder.LayoutOrder = InsertIndex * 22461 end2462 for Index, P in List do2463 local Slot = Index - 12464 if Slot >= InsertIndex then2465 Slot = Slot + 12466 end2467 P.Button.LayoutOrder = Slot * 22468 P.LayoutOrder = P.Button.LayoutOrder2469 end2470 end2471 2472 PageButton.InputBegan:Connect(function(Input)2473 if not Window.TabEditMode then return end2474 if Input.UserInputType ~= UIT.MouseButton1 and Input.UserInputType ~= UIT.Touch then return end2475 if Dragging then return end2476 Dragging = true2477 local OriginOrder = PageButton.LayoutOrder2478 2479 ClearGhost()2480 PageButton.Visible = false2481 2482 -- Outline-only slot (no solid blue fill)2483 Placeholder = Add("Frame", {2484 Parent = PageButtons;2485 Name = "TabPlaceholder";2486 Size = UFO(45, 45);2487 BackgroundTransparency = 1;2488 BorderSizePixel = 0;2489 LayoutOrder = OriginOrder;2490 })2491 local PhStroke = Add("UIStroke", {2492 Parent = Placeholder;2493 Color = Library.Theme.Accent;2494 Transparency = 0.35;2495 Thickness = 1.5;2496 })2497 Add("UICorner", { Parent = Placeholder; CornerRadius = UD(0, 8); })2498 2499 Ghost = Add("Frame", {2500 Parent = Library._Instance;2501 Name = "TabGhost";2502 Size = UFO(45, 45);2503 BackgroundTransparency = 1;2504 ZIndex = 120;2505 })2506 Add("ImageLabel", {2507 Parent = Ghost;2508 BackgroundTransparency = 1;2509 Size = UFS(1, 1);2510 Image = PageIcon.Image;2511 ImageColor3 = Library.Theme.Accent;2512 ImageTransparency = 0.2;2513 ScaleType = SCL.Fit;2514 })2515 Add("UIPadding", {2516 Parent = Ghost;2517 PaddingBottom = UD(0, 12);2518 PaddingLeft = UD(0, 12);2519 PaddingRight = UD(0, 12);2520 PaddingTop = UD(0, 12);2521 })2522 2523 local function ClampGhostY(MouseY)2524 local Top = PageButtons.AbsolutePosition.Y2525 local Bot = Top + PageButtons.AbsoluteSize.Y - 452526 local GX = PageButtons.AbsolutePosition.X + (PageButtons.AbsoluteSize.X - 45) * 0.52527 local GY = MC(MouseY - 22, Top, math.max(Top, Bot))2528 return GX, GY2529 end2530 2531 local Abs = PageButton.AbsolutePosition2532 local GX, GY = ClampGhostY(Abs.Y + 22)2533 Ghost.Position = UFO(GX, GY)2534 2535 local MoveConn2536 local EndConn2537 MoveConn = UserInputService.InputChanged:Connect(function(Move)2538 if not Dragging then return end2539 if Move.UserInputType ~= UIT.MouseMovement and Move.UserInputType ~= UIT.Touch then return end2540 local gx, gy = ClampGhostY(Move.Position.Y)2541 if Ghost then2542 Ghost.Position = UFO(gx, gy)2543 end2544 local List = OrderedPages()2545 local Insert = #List2546 for Index, P in List do2547 local Mid = P.Button.AbsolutePosition.Y + P.Button.AbsoluteSize.Y * 0.52548 if Move.Position.Y < Mid then2549 Insert = Index - 12550 break2551 end2552 Insert = Index2553 end2554 ApplyInsert(Insert)2555 end)2556 EndConn = UserInputService.InputEnded:Connect(function(End)2557 if End.UserInputType ~= UIT.MouseButton1 and End.UserInputType ~= UIT.Touch then return end2558 if not Dragging then return end2559 Dragging = false2560 if MoveConn then MoveConn:Disconnect() end2561 if EndConn then EndConn:Disconnect() end2562 local FinalOrder = Placeholder and Placeholder.LayoutOrder or OriginOrder2563 ClearGhost()2564 PageButton.Visible = true2565 PageButton.LayoutOrder = FinalOrder2566 Page.LayoutOrder = FinalOrder2567 local All = {}2568 for _, P in Window.Pages do2569 if P.Button and P.Button.Parent then2570 TIS(All, P)2571 end2572 end2573 table.sort(All, function(a, b)2574 return (a.Button.LayoutOrder or 0) < (b.Button.LayoutOrder or 0)2575 end)2576 for Index, P in All do2577 P.Button.LayoutOrder = Index - 12578 P.LayoutOrder = Index - 12579 end2580 pcall(function() Library.SaveLayout() end)2581 end)2582 end)2583 end2584 2585 Page.SubPage = function(self: Library, propertyTable: {})2586 local SubPage = Overwrite({2587 Name = "",2588 }, propertyTable or {})2589 2590 local SubPageButton = Add("TextButton", { Parent = SubPages; Name = "SubPageButton"; AutoButtonColor = false; AutomaticSize = AS.X; BackgroundColor3 = Library.Theme.Background; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; FontFace = FN("rbxasset://fonts/families/SourceSansPro.json", FW.Regular, FS.Normal); Size = UFS(0, 1); Text = ""; TextColor3 = RGB(0, 0, 0); TextSize = 14; Visible = Page.Opened; }) :: TextButton2591 local SubGrad = Add("UIGradient", { Parent = SubPageButton; Color = CS{ CSK(0, Library.Theme.AccentDark), CSK(1, Library.Theme.Accent) }; Rotation = -70; })2592 Library.ThemeLink(SubGrad, "Gradient", "AccentDark", "Accent")2593 local SubPageLabel = Add("TextLabel", { Parent = SubPageButton; Name = "Label"; AutomaticSize = AS.XY; BackgroundColor3 = RGB(255, 255, 255); BackgroundTransparency = 1; BorderColor3 = RGB(0, 0, 0); BorderSizePixel = 0; FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal); Size = UFS(1, 1); Text = SubPage.Name; TextColor3 = RGB(255, 255, 255); TextSize = 14; TextTransparency = 0.5; }) :: TextLabel2594 Add("UIPadding", { Parent = SubPageButton; PaddingLeft = UD(0, 14); PaddingRight = UD(0, 14); })2595 Add("UICorner", { Parent = SubPageButton; CornerRadius = UD(0, 5); })2596 2597 SubPage.Button = SubPageButton2598 2599 SubPage.ParentPage = Page2600 PageContent(SubPage, Pages, Page.SubPages, function()2601 2602 Page.ActiveSubPage = SubPage2603 Page.Frame.Visible = false2604 2605 Tween(SubPageButton, { BackgroundColor3 = RGB(255, 255, 255) }, 0.15)2606 Tween(SubPageLabel, { TextTransparency = 0 }, 0.15)2607 end, function()2608 Tween(SubPageButton, { BackgroundColor3 = Library.Theme.Background }, 0.15)2609 Tween(SubPageLabel, { TextTransparency = 0.5 }, 0.15)2610 end)2611 2612 SubPageButton.Activated:Connect(SubPage.Open)2613 2614 if #Page.SubPages == 1 then2615 Page.ActiveSubPage = SubPage2616 2617 if Page.Opened then2618 SubPage.Open()2619 end2620 else2621 SubPage.Close()2622 end2623 2624 return SubPage2625 end2626 2627 PageButton.Activated:Connect(Page.Open)2628 2629 if #Window.Pages == 1 then2630 Page.Open()2631 else2632 Page.Close()2633 end2634 2635 return Page2636 end2637 2638 return Window2639end2640 2641Library.Theme = {2642 Accent = RGB(138, 156, 229),2643 AccentDark = RGB(78, 88, 129),2644 Background = RGB(9, 8, 8),2645 Surface = RGB(15, 14, 15),2646 SurfaceAlt = RGB(20, 20, 21),2647 Border = RGB(36, 37, 37),2648 SectionBorder = RGB(32, 33, 36),2649 Text = RGB(255, 255, 255),2650 TextDim = RGB(180, 184, 200),2651}2652 2653Library.DefaultTheme = {2654 Accent = RGB(138, 156, 229),2655 AccentDark = RGB(78, 88, 129),2656 Background = RGB(9, 8, 8),2657 Surface = RGB(15, 14, 15),2658 SurfaceAlt = RGB(20, 20, 21),2659 Border = RGB(36, 37, 37),2660 SectionBorder = RGB(32, 33, 36),2661 Text = RGB(255, 255, 255),2662 TextDim = RGB(180, 184, 200),2663}2664 2665Library.ThemeLinks = {}2666 2667Library.ThemeLink = function(Object: Instance, Property: string, Key: string, Key2: string?)2668 if not Object then2669 return2670 end2671 TIS(Library.ThemeLinks, { Object = Object; Property = Property; Key = Key; Key2 = Key2 })2672end2673 2674Library.ApplyTheme = function()2675 local T = Library.Theme2676 if not T then2677 return2678 end2679 2680 -- Always derive AccentDark from Accent when accent changes2681 if T.Accent then2682 local H, S, V = T.Accent:ToHSV()2683 T.AccentDark = HSV(H, math.clamp(S * 0.95, 0, 1), math.max(V * 0.55, 0.12))2684 end2685 2686 local function PaintGrad(Grad: UIGradient?)2687 if Grad and Grad:IsA("UIGradient") then2688 Grad.Color = CS{ CSK(0, T.AccentDark or T.Accent), CSK(1, T.Accent) }2689 end2690 end2691 2692 -- ThemeLink registry2693 local Alive = {}2694 for _, Link in Library.ThemeLinks do2695 if Link.Object and Link.Object.Parent then2696 TIS(Alive, Link)2697 if Link.Property == "Gradient" and Link.Object:IsA("UIGradient") then2698 PaintGrad(Link.Object)2699 elseif Link.Property and T[Link.Key] ~= nil then2700 pcall(function()2701 Link.Object[Link.Property] = T[Link.Key]2702 end)2703 end2704 end2705 end2706 Library.ThemeLinks = Alive2707 2708 for _, Win in Library.Windows do2709 local Canvas = Win.Canvas2710 if not Canvas then2711 continue2712 end2713 pcall(function() Canvas.BackgroundColor3 = T.Background end)2714 local Stroke = Canvas:FindFirstChildOfClass("UIStroke")2715 if Stroke then pcall(function() Stroke.Color = T.Border end) end2716 2717 local Header = Canvas:FindFirstChild("Header")2718 if Header then2719 Header.BackgroundColor3 = T.SurfaceAlt2720 local Hs = Header:FindFirstChildOfClass("UIStroke")2721 if Hs then Hs.Color = T.Border end2722 local Search = Header:FindFirstChild("Search")2723 if Search and Search:IsA("GuiObject") then2724 Search.BackgroundColor3 = T.Background2725 end2726 end2727 local Footer = Canvas:FindFirstChild("Footer")2728 if Footer then2729 Footer.BackgroundColor3 = T.Surface2730 local Fs = Footer:FindFirstChildOfClass("UIStroke")2731 if Fs then Fs.Color = T.Border end2732 for _, L in Footer:GetChildren() do2733 if L:IsA("TextLabel") then2734 L.TextColor3 = T.Text2735 end2736 end2737 end2738 local Sidebar = Canvas:FindFirstChild("Sidebar")2739 if Sidebar then2740 Sidebar.BackgroundColor3 = T.Surface2741 local Logo = Sidebar:FindFirstChild("Logo")2742 if Logo then2743 for _, Ch in Logo:GetChildren() do2744 if Ch:IsA("ImageLabel") then2745 Ch.ImageColor3 = T.Accent2746 end2747 end2748 end2749 local PB = Sidebar:FindFirstChild("PageButtons")2750 if PB and PB:IsA("ScrollingFrame") then2751 PB.ScrollBarImageColor3 = T.Accent2752 end2753 end2754 2755 for _, Page in (Win.Pages or {}) do2756 if Page.Gradient then PaintGrad(Page.Gradient) end2757 if Page.Indicator then2758 pcall(function() Page.Indicator.BackgroundColor3 = RGB(255, 255, 255) end)2759 end2760 if Page.IndicatorGlow then2761 pcall(function()2762 if Page.IndicatorGlow:IsA("Frame") then2763 Page.IndicatorGlow.BackgroundColor3 = T.Accent2764 elseif Page.IndicatorGlow:IsA("ImageLabel") then2765 Page.IndicatorGlow.ImageColor3 = T.Accent2766 end2767 end)2768 end2769 if Page.IndicatorBloom then2770 pcall(function() Page.IndicatorBloom.ImageColor3 = T.Accent end)2771 end2772 if Page.IconLabel then2773 if Page.Opened then2774 Page.IconLabel.ImageTransparency = 02775 Page.IconLabel.ImageColor3 = RGB(255, 255, 255)2776 else2777 Page.IconLabel.ImageTransparency = 0.52778 Page.IconLabel.ImageColor3 = RGB(255, 255, 255)2779 end2780 end2781 for _, Sub in (Page.SubPages or {}) do2782 local Btn = Sub.Button2783 if Btn then2784 local Grad = Btn:FindFirstChildOfClass("UIGradient")2785 PaintGrad(Grad)2786 if not (Page.ActiveSubPage == Sub) then2787 Btn.BackgroundColor3 = T.Background2788 end2789 end2790 end2791 end2792 end2793 2794 -- Sections / elements walk2795 for _, Section in (Library.Sections or {}) do2796 local Frame = Section.Frame2797 if Frame and Frame.Parent then2798 pcall(function() Frame.BackgroundColor3 = T.Surface end)2799 local St = Frame:FindFirstChildOfClass("UIStroke")2800 if St then pcall(function() St.Color = T.SectionBorder or T.Border end) end2801 end2802 end2803 2804 if Library.Watermark and Library.Watermark.Frame then2805 Library.Watermark.Frame.BackgroundColor3 = T.Surface2806 local Stroke = Library.Watermark.Frame:FindFirstChildOfClass("UIStroke")2807 if Stroke then Stroke.Color = T.Border end2808 if Library.Watermark.Accent then2809 Library.Watermark.Accent.BackgroundColor3 = T.Accent2810 PaintGrad(Library.Watermark.Accent:FindFirstChildOfClass("UIGradient"))2811 end2812 if Library.Watermark.Label then2813 Library.Watermark.Label.TextColor3 = T.Text2814 end2815 end2816 if Library.KeybindList and Library.KeybindList.Frame then2817 Library.KeybindList.Frame.BackgroundColor3 = T.Surface2818 local Stroke = Library.KeybindList.Frame:FindFirstChildOfClass("UIStroke")2819 if Stroke then Stroke.Color = T.Border end2820 if Library.KeybindList.Accent then2821 Library.KeybindList.Accent.BackgroundColor3 = T.Accent2822 PaintGrad(Library.KeybindList.Accent:FindFirstChildOfClass("UIGradient"))2823 end2824 local Header = Library.KeybindList.Frame:FindFirstChild("Header")2825 if Header then Header.BackgroundColor3 = T.SurfaceAlt end2826 end2827end2828 2829Library.Folder = "Noctro"2830Library.ConfigExtension = ".json"2831Library.Autoload = nil2832Library.MenuKey = EKC.LeftAlt2833Library.MenuOpen = true2834Library.Windows = {}2835Library.Auth = {2836 Enabled = false;2837 Validated = true;2838 Token = nil;2839 ExpiresAt = nil;2840 ShowExpiry = false;2841 WatermarkExpiry = false;2842 Options = nil;2843}2844 2845local function HasFS(): boolean2846 return typeof(writefile) == "function" and typeof(readfile) == "function"2847end2848 2849local function EnsureFolder()2850 if typeof(isfolder) == "function" and typeof(makefolder) == "function" then2851 if not isfolder(Library.Folder) then2852 pcall(makefolder, Library.Folder)2853 end2854 end2855end2856 2857Library.SetConfigFolder = function(Path: string)2858 if type(Path) ~= "string" or Path == "" then2859 return Library.Folder2860 end2861 Path = Path:gsub("^/+", ""):gsub("/+$", ""):gsub("%.%.", "")2862 if Path == "" then2863 Path = "Noctro"2864 end2865 Library.Folder = Path2866 EnsureFolder()2867 return Library.Folder2868end2869 2870local function ConfigPath(Name: string): string2871 return Library.Folder .. "/" .. Name .. Library.ConfigExtension2872end2873 2874local function EncodeColor(Color: Color3): { number }2875 return { MR(Color.R * 255), MR(Color.G * 255), MR(Color.B * 255) }2876end2877 2878local function DecodeColor(Value: any): Color3?2879 if typeof(Value) == "Color3" then2880 return Value2881 end2882 if type(Value) == "table" and #Value >= 3 then2883 return RGB(Value[1], Value[2], Value[3])2884 end2885 return nil2886end2887 2888 2889Library.GetLayout = function()2890 local Layout = {2891 Tabs = {};2892 Sections = {};2893 KeybindList = nil;2894 Watermark = nil;2895 }2896 for _, Win in Library.Windows do2897 for _, Page in (Win.Pages or {}) do2898 local Id = tostring(Page.Icon or "") .. ":" .. tostring(Page.Button and Page.Button.LayoutOrder or 0)2899 if Page.Button then2900 TIS(Layout.Tabs, {2901 Icon = Page.Icon;2902 Order = Page.Button.LayoutOrder;2903 })2904 end2905 for _, Sub in (Page.SubPages or {}) do2906 -- sections live under subpages via Library.Sections2907 end2908 end2909 end2910 for _, Section in (Library.Sections or {}) do2911 if Section.Frame then2912 TIS(Layout.Sections, {2913 Name = Section.Name;2914 Side = Section.Side;2915 Order = Section.Frame.LayoutOrder;2916 })2917 end2918 end2919 if Library.KeybindList and Library.KeybindList.Frame then2920 local P = Library.KeybindList.Frame.Position2921 Layout.KeybindList = { X = P.X.Offset; Y = P.Y.Offset }2922 end2923 if Library.Watermark and Library.Watermark.Frame then2924 local P = Library.Watermark.Frame.Position2925 Layout.Watermark = { X = P.X.Offset; Y = P.Y.Offset }2926 end2927 return Layout2928end2929 2930Library.SaveLayout = function()2931 -- persisted via next config save; also write layout.json if FS available2932 if not HasFS or not HasFS() then2933 return2934 end2935 EnsureFolder()2936 local Ok, Enc = pcall(function()2937 return game:GetService("HttpService"):JSONEncode(Library.GetLayout())2938 end)2939 if Ok and Enc and writefile then2940 pcall(writefile, Library.Folder .. "/layout.json", Enc)2941 end2942end2943 2944Library.ApplyLayout = function(Layout)2945 if type(Layout) ~= "table" then return end2946 if type(Layout.Tabs) == "table" then2947 for _, Win in Library.Windows do2948 for _, Entry in Layout.Tabs do2949 for _, Page in (Win.Pages or {}) do2950 if Page.Icon == Entry.Icon and Page.Button and type(Entry.Order) == "number" then2951 Page.Button.LayoutOrder = Entry.Order2952 Page.LayoutOrder = Entry.Order2953 end2954 end2955 end2956 end2957 end2958 if type(Layout.Sections) == "table" then2959 for _, Entry in Layout.Sections do2960 for _, Section in (Library.Sections or {}) do2961 if Section.Name == Entry.Name and Section.Frame then2962 if Entry.Order then Section.Frame.LayoutOrder = Entry.Order end2963 if Entry.Side and Section.Side ~= Entry.Side then2964 -- move column if possible2965 local Frame = Section.Frame2966 local Parent = Frame.Parent and Frame.Parent.Parent2967 if Parent then2968 local Col = Parent:FindFirstChild(Entry.Side)2969 if Col then2970 Frame.Parent = Col2971 Section.Side = Entry.Side2972 end2973 end2974 end2975 end2976 end2977 end2978 end2979 if Layout.KeybindList and Library.KeybindList and Library.KeybindList.Frame then2980 local X, Y = Layout.KeybindList.X, Layout.KeybindList.Y2981 if type(X) == "number" and type(Y) == "number" then2982 Library.KeybindList.Frame.Position = ClampToScreen(Library.KeybindList.Frame, UFO(X, Y))2983 end2984 end2985 if Layout.Watermark and Library.Watermark and Library.Watermark.Frame then2986 local X, Y = Layout.Watermark.X, Layout.Watermark.Y2987 if type(X) == "number" and type(Y) == "number" then2988 Library.Watermark.Frame.Position = ClampToScreen(Library.Watermark.Frame, UFO(X, Y))2989 end2990 end2991end2992 2993Library.GetConfig = function()2994 local Data = {2995 Flags = {};2996 Theme = {};2997 Layout = Library.GetLayout and Library.GetLayout() or {};2998 MenuKey = Library.MenuKey and Library.MenuKey.Name or "LeftAlt";2999 }3000 3001 for Flag, Entry in Library.Flags do3002 local Value = Entry.Value3003 if typeof(Value) == "Color3" then3004 Data.Flags[Flag] = {3005 Type = "Color3";3006 Color = EncodeColor(Value);3007 Transparency = Entry.Transparency or 0;3008 }3009 elseif typeof(Value) == "EnumItem" then3010 Data.Flags[Flag] = { Type = "Enum"; EnumType = tostring(Value.EnumType); Name = Value.Name }3011 elseif type(Value) == "table" then3012 Data.Flags[Flag] = { Type = "table"; Value = Value }3013 else3014 Data.Flags[Flag] = { Type = type(Value); Value = Value }3015 end3016 end3017 3018 for Key, Color in Library.Theme do3019 if typeof(Color) == "Color3" then3020 Data.Theme[Key] = EncodeColor(Color)3021 end3022 end3023 3024 if Library.KeybindList and Library.KeybindList.Frame then3025 local P = Library.KeybindList.Frame.Position3026 Data.KeybindListPos = { X = P.X.Offset; Y = P.Y.Offset }3027 elseif Library.KeybindList and Library.KeybindList.SavedPos then3028 Data.KeybindListPos = Library.KeybindList.SavedPos3029 end3030 3031 return Data3032end3033 3034Library.SetFlag = function(Flag: string, Value: any, Transparency: number?)3035 local Entry = Library.Flags[Flag]3036 if not Entry then3037 return3038 end3039 if Entry.Set then3040 if Transparency ~= nil then3041 Entry.Set(Value, Transparency)3042 elseif type(Value) == "boolean" then3043 3044 Entry.Set(Value, true)3045 else3046 Entry.Set(Value)3047 end3048 else3049 Entry.Value = Value3050 end3051end3052 3053Library.LoadConfigData = function(Data: {})3054 if type(Data) ~= "table" then3055 return3056 end3057 3058 if type(Data.Theme) == "table" then3059 for Key, Value in Data.Theme do3060 local Color = DecodeColor(Value)3061 if Color then3062 Library.Theme[Key] = Color3063 end3064 end3065 end3066 3067 if type(Data.KeybindListPos) == "table" then3068 Library.KeybindList = Library.KeybindList or {}3069 Library.KeybindList.SavedPos = {3070 X = tonumber(Data.KeybindListPos.X) or 18;3071 Y = tonumber(Data.KeybindListPos.Y) or 200;3072 }3073 if Library.KeybindList.Frame then3074 local Pos = UFO(Library.KeybindList.SavedPos.X, Library.KeybindList.SavedPos.Y)3075 Library.KeybindList.Frame.Position = ClampToScreen(Library.KeybindList.Frame, Pos)3076 end3077 end3078 3079 if type(Data.MenuKey) == "string" and EKC[Data.MenuKey] then3080 Library.MenuKey = EKC[Data.MenuKey]3081 end3082 3083 if type(Data.Flags) == "table" then3084 for Flag, Packed in Data.Flags do3085 local Entry = Library.Flags[Flag]3086 if Entry and type(Packed) == "table" then3087 local Type = Packed.Type3088 if Type == "Color3" then3089 local Color = DecodeColor(Packed.Color)3090 if Color then3091 Library.SetFlag(Flag, Color, Packed.Transparency)3092 end3093 elseif Type == "Enum" and Packed.Name then3094 local EnumRoot = Enum3095 local EnumType = EnumRoot[Packed.EnumType]3096 if EnumType and EnumType[Packed.Name] then3097 Library.SetFlag(Flag, EnumType[Packed.Name])3098 end3099 elseif Type == "table" then3100 Library.SetFlag(Flag, Packed.Value)3101 else3102 Library.SetFlag(Flag, Packed.Value)3103 end3104 end3105 end3106 end3107end3108 3109Library.SaveConfig = function(Name: string)3110 if not HasFS() then3111 warn("[Noctro] writefile/readfile unavailable in this environment")3112 return false3113 end3114 EnsureFolder()3115 Name = tostring(Name or "default"):gsub("[^%w%-%_ ]", "")3116 if Name == "" then Name = "default" end3117 local Data = Library.GetConfig()3118 Data.Name = Name3119 Data.SavedAt = os.date("%Y-%m-%d %H:%M:%S")3120 local Ok, Encoded = pcall(function()3121 return game:GetService("HttpService"):JSONEncode(Data)3122 end)3123 if not Ok then3124 warn("[Noctro] failed to encode config", Encoded)3125 return false3126 end3127 local Path = ConfigPath(Name)3128 local WOk, WErr = pcall(writefile, Path, Encoded)3129 if not WOk then3130 warn("[Noctro] writefile failed", WErr)3131 return false3132 end3133 return true3134end3135 3136Library.LoadConfig = function(Name: string)3137 if not HasFS() then3138 warn("[Noctro] writefile/readfile unavailable in this environment")3139 return false3140 end3141 Name = tostring(Name or "default")3142 local Path = ConfigPath(Name)3143 local Exists = true3144 if typeof(isfile) == "function" then3145 Exists = isfile(Path)3146 end3147 if not Exists then3148 warn("[Noctro] config not found:", Name)3149 return false3150 end3151 local ROk, Raw = pcall(readfile, Path)3152 if not ROk then3153 warn("[Noctro] readfile failed", Raw)3154 return false3155 end3156 local Ok, Data = pcall(function()3157 return game:GetService("HttpService"):JSONDecode(Raw)3158 end)3159 if not Ok or type(Data) ~= "table" then3160 warn("[Noctro] invalid config:", Name)3161 return false3162 end3163 Library.LoadConfigData(Data)3164 if Library.ApplyTheme then3165 Library.ApplyTheme()3166 end3167 if Library.SyncThemePickers then3168 Library.SyncThemePickers()3169 end3170 return true3171end3172 3173Library.DeleteConfig = function(Name: string)3174 if not delfile or not isfile then3175 return false3176 end3177 local Path = ConfigPath(Name)3178 if isfile(Path) then3179 delfile(Path)3180 return true3181 end3182 return false3183end3184 3185Library.ListConfigs = function(): { string }3186 local List = {}3187 if not listfiles then3188 return List3189 end3190 EnsureFolder()3191 local Ok, Files = pcall(listfiles, Library.Folder)3192 if not Ok or type(Files) ~= "table" then3193 return List3194 end3195 for _, Path in Files do3196 local Name = tostring(Path):match("([^/\\]+)%.json$")3197 if Name then3198 TIS(List, Name)3199 end3200 end3201 table.sort(List)3202 return List3203end3204 3205Library.SetAutoload = function(Name: string?)3206 Library.Autoload = Name3207 if writefile then3208 EnsureFolder()3209 writefile(Library.Folder .. "/autoload.txt", Name or "")3210 end3211end3212 3213Library.GetAutoload = function(): string?3214 if Library.Autoload then3215 return Library.Autoload3216 end3217 if isfile and isfile(Library.Folder .. "/autoload.txt") then3218 local Name = readfile(Library.Folder .. "/autoload.txt")3219 if Name ~= "" then3220 Library.Autoload = Name3221 return Name3222 end3223 end3224 return nil3225end3226 3227Library.RegisterFlag = function(Flag: string, Entry: {})3228 if not Flag or Flag == "" then3229 return3230 end3231 Library.Flags[Flag] = Entry3232end3233 3234Library.LoadingScreen = function(self: Library, propertyTable: {})3235 local Props = Overwrite({3236 Title = "Noctro";3237 Subtitle = "Loading…";3238 Duration = 1.6;3239 }, propertyTable or {})3240 3241 local Gui = Add("ScreenGui", {3242 Parent = RunService:IsStudio() and Client.PlayerGui or Services:GetService("CoreGui");3243 Name = "NoctroLoading";3244 ZIndexBehavior = ZIB.Sibling;3245 IgnoreGuiInset = true;3246 })3247 3248 local Card = Add("Frame", {3249 Parent = Gui;3250 AnchorPoint = V2(0.5, 0.5);3251 Position = UFS(0.5, 0.5);3252 Size = UFO(280, 120);3253 BackgroundColor3 = Library.Theme.Surface;3254 BorderSizePixel = 0;3255 ZIndex = 50;3256 })3257 Add("UIShadow", { Parent = Card; BlurRadius = UD(0, 24); Spread = UFO(6, 6); Transparency = 0.55; })3258 Add("UICorner", { Parent = Card; CornerRadius = UD(0, 8); })3259 Add("UIStroke", { Parent = Card; ApplyStrokeMode = ASM.Border; Color = Library.Theme.Border; })3260 Add("TextLabel", {3261 Parent = Card;3262 BackgroundTransparency = 1;3263 Position = UFO(0, 28);3264 Size = UD2(1, 0, 0, 22);3265 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);3266 Text = Props.Title;3267 TextColor3 = Library.Theme.Text;3268 TextSize = 18;3269 })3270 Add("TextLabel", {3271 Parent = Card;3272 BackgroundTransparency = 1;3273 Position = UFO(0, 54);3274 Size = UD2(1, 0, 0, 18);3275 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);3276 Text = Props.Subtitle;3277 TextColor3 = Library.Theme.Text;3278 TextTransparency = 0.45;3279 TextSize = 13;3280 })3281 local BarBG = Add("Frame", {3282 Parent = Card;3283 BackgroundColor3 = Library.Theme.SurfaceAlt;3284 BorderSizePixel = 0;3285 Position = UD2(0.5, 0, 1, -28);3286 AnchorPoint = V2(0.5, 0);3287 Size = UD2(0.7, 0, 0, 6);3288 })3289 Add("UICorner", { Parent = BarBG; CornerRadius = UD(1, 0); })3290 local Bar = Add("Frame", {3291 Parent = BarBG;3292 BackgroundColor3 = Library.Theme.Accent;3293 BorderSizePixel = 0;3294 Size = UD2(0, 0, 1, 0);3295 })3296 Add("UICorner", { Parent = Bar; CornerRadius = UD(1, 0); })3297 Add("UIGradient", {3298 Parent = Bar;3299 Color = CS{ CSK(0, Library.Theme.AccentDark), CSK(1, Library.Theme.Accent) };3300 Rotation = -90;3301 })3302 3303 Tween(Bar, { Size = UD2(1, 0, 1, 0) }, Props.Duration, ES.Quad, ED.Out)3304 3305 local Done = Instance.new("BindableEvent")3306 task.delay(Props.Duration + 0.15, function()3307 Tween(Card, { BackgroundTransparency = 1 }, 0.3)3308 for _, D in Card:GetDescendants() do3309 if D:IsA("TextLabel") then3310 Tween(D, { TextTransparency = 1 }, 0.25)3311 elseif D:IsA("Frame") and D ~= Card then3312 Tween(D, { BackgroundTransparency = 1 }, 0.25)3313 end3314 end3315 task.wait(0.35)3316 Gui:Destroy()3317 Done:Fire()3318 end)3319 3320 Done.Event:Wait()3321 Done:Destroy()3322 return Gui3323end3324 3325Library.UIScale = 13326 3327Library.SetScale = function(Scale: number)3328 Scale = MC(Scale / (Scale > 2 and 100 or 1), 0.75, 1.25)3329 Library.UIScale = Scale3330 for _, Win in Library.Windows do3331 if Win.Canvas then3332 local Existing = Win.Canvas:FindFirstChildOfClass("UIScale")3333 if not Existing then3334 Existing = Add("UIScale", { Parent = Win.Canvas })3335 end3336 3337 local Abs = Win.Canvas.AbsolutePosition3338 local Size = Win.Canvas.AbsoluteSize3339 local Center = Abs + Size * 0.53340 Existing.Scale = Scale3341 task.defer(function()3342 if not Win.Canvas or not Win.Canvas.Parent then return end3343 local NewSize = Win.Canvas.AbsoluteSize3344 local NewPos = Center - NewSize * 0.53345 Win.Canvas.Position = ClampToScreen(Win.Canvas, UFO(NewPos.X, NewPos.Y))3346 end)3347 end3348 end3349end3350 3351Library.Watermark = {3352 Enabled = true;3353 Text = "Noctro";3354 Frame = nil :: Frame?;3355}3356 3357Library.KeybindList = {3358 Enabled = true;3359 Frame = nil :: Frame?;3360 Rows = {} :: { [string]: Frame };3361}3362 3363local function EnsureOverlayGui()3364 if Library._Overlay then3365 return Library._Overlay3366 end3367 Library._Overlay = Add("ScreenGui", {3368 Parent = RunService:IsStudio() and Client.PlayerGui or Services:GetService("CoreGui");3369 Name = "NoctroOverlay";3370 ZIndexBehavior = ZIB.Sibling;3371 IgnoreGuiInset = true;3372 })3373 return Library._Overlay3374end3375 3376Library.NotifyPosition = "Top Right"3377Library.Notifications = {}3378 3379Library.SetWatermark = function(Text: string?, Enabled: boolean?)3380 if Enabled ~= nil then3381 Library.Watermark.Enabled = Enabled3382 end3383 if Text ~= nil then3384 Library.Watermark.Text = Text3385 end3386 3387 local Gui = EnsureOverlayGui()3388 if Library.Watermark.Frame then3389 Library.Watermark.Frame:Destroy()3390 Library.Watermark.Frame = nil3391 end3392 3393 local Frame = Add("Frame", {3394 Parent = Gui;3395 Name = "Watermark";3396 AnchorPoint = V2(0.5, 0);3397 Position = UD2(0.5, 0, 0, 12);3398 AutomaticSize = AS.X;3399 Size = UFO(0, 32);3400 BackgroundColor3 = Library.Theme.Surface;3401 BorderSizePixel = 0;3402 ZIndex = 120;3403 Visible = Library.Watermark.Enabled == true;3404 })3405 Add("UICorner", { Parent = Frame; CornerRadius = UD(0, 7); })3406 Add("UIStroke", { Parent = Frame; ApplyStrokeMode = ASM.Border; Color = Library.Theme.Border; })3407 Add("UIShadow", { Parent = Frame; BlurRadius = UD(0, 16); Spread = UFO(4, 4); Transparency = 0.7; })3408 Add("UIPadding", { Parent = Frame; PaddingLeft = UD(0, 10); PaddingRight = UD(0, 12); })3409 Add("UIListLayout", {3410 Parent = Frame;3411 FillDirection = FD.Horizontal;3412 Padding = UD(0, 8);3413 VerticalAlignment = VFA.Center;3414 SortOrder = SO.LayoutOrder;3415 })3416 3417 local Logo = Add("Frame", {3418 Parent = Frame;3419 BackgroundColor3 = Library.Theme.Accent;3420 BorderSizePixel = 0;3421 Size = UFO(16, 16);3422 LayoutOrder = 0;3423 })3424 Add("UICorner", { Parent = Logo; CornerRadius = UD(0, 4); })3425 Add("UIGradient", {3426 Parent = Logo;3427 Color = CS{ CSK(0, Library.Theme.AccentDark), CSK(1, Library.Theme.Accent) };3428 Rotation = -45;3429 })3430 3431 local function Chip(Text: string, Order: number, Dim: boolean?): TextLabel3432 return Add("TextLabel", {3433 Parent = Frame;3434 BackgroundTransparency = 1;3435 AutomaticSize = AS.X;3436 Size = UFO(0, 32);3437 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);3438 Text = Text;3439 TextColor3 = Dim and RGB(150, 154, 170) or RGB(235, 236, 240);3440 TextSize = 12;3441 LayoutOrder = Order;3442 })3443 end3444 3445 local function Sep(Order: number)3446 return Chip("-", Order, true)3447 end3448 3449 local CleanText = tostring(Library.Watermark.Text or "Noctro")3450 3451 local Built = {}3452 for i = 1, #CleanText do3453 local c = CleanText:sub(i, i)3454 local b = string.byte(c)3455 if (b >= 48 and b <= 57) or (b >= 65 and b <= 90) or (b >= 97 and b <= 122) or c == " " or c == "-" or c == "_" then3456 table.insert(Built, c)3457 else3458 table.insert(Built, " ")3459 end3460 end3461 CleanText = table.concat(Built)3462 CleanText = CleanText:gsub("%s+", " ")3463 CleanText = CleanText:gsub("^%s+", ""):gsub("%s+$", "")3464 if CleanText == "" then3465 CleanText = "Noctro"3466 end3467 3468 if CleanText:match("^%d+$") then3469 CleanText = "Noctro"3470 end3471 3472 local Title = Chip(CleanText, 1, false)3473 local Order = 23474 if Library.Auth and Library.Auth.Validated and Library.Auth.WatermarkExpiry and Library.Auth.ExpiresAt and Library.FormatExpiry then3475 Sep(Order)3476 Order = Order + 13477 Chip(Library.FormatExpiry(Library.Auth.ExpiresAt), Order, true)3478 Order = Order + 13479 end3480 Sep(Order)3481 Order = Order + 13482 local FpsL = Chip("0 fps", Order, true)3483 Order = Order + 13484 Sep(Order)3485 Order = Order + 13486 local PingL = Chip("0 ms", Order, true)3487 Order = Order + 13488 Sep(Order)3489 Order = Order + 13490 local TimeL = Chip(os.date("%H:%M:%S"), Order, true)3491 3492 Library.Watermark.Frame = Frame3493 Library.Watermark.Label = Title3494 Library.Watermark.Stats = FpsL3495 Library.Watermark.Accent = Logo3496 3497 if Library.Watermark._StatsConn then3498 Library.Watermark._StatsConn:Disconnect()3499 end3500 local Frames, Last = 0, os.clock()3501 Library.Watermark._StatsConn = RunService.RenderStepped:Connect(function()3502 if not Library.Watermark.Enabled or not Frame.Parent then3503 return3504 end3505 Frames = Frames + 13506 local Now = os.clock()3507 if Now - Last >= 1 then3508 FpsL.Text = string.format("%d fps", Frames)3509 local Ping = 03510 pcall(function()3511 Ping = math.floor(game:GetService("Stats").Network.ServerStatsItem["Data Ping"]:GetValue())3512 end)3513 PingL.Text = string.format("%d ms", Ping)3514 TimeL.Text = os.date("%H:%M:%S")3515 Frames = 03516 Last = Now3517 end3518 end)3519end3520 3521Library.SetKeybindList = function(Enabled: boolean?)3522 if Enabled ~= nil then3523 Library.KeybindList.Enabled = Enabled3524 end3525 3526 local Gui = EnsureOverlayGui()3527 if Library.KeybindList.Frame then3528 Library.KeybindList.Frame:Destroy()3529 Library.KeybindList.Frame = nil3530 Library.KeybindList.Rows = {}3531 end3532 3533 local T = Library.Theme3534 local Panel = Add("Frame", {3535 Parent = Gui;3536 Name = "KeybindList";3537 Position = UFO(18, math.floor((workspace.CurrentCamera and workspace.CurrentCamera.ViewportSize.Y or 800) * 0.35));3538 Size = UFO(280, 0);3539 AutomaticSize = AS.Y;3540 BackgroundColor3 = T.Surface;3541 BorderSizePixel = 0;3542 Visible = Library.KeybindList.Enabled == true;3543 ZIndex = 120;3544 Active = true;3545 })3546 Add("UICorner", { Parent = Panel; CornerRadius = UD(0, 10); })3547 Add("UIStroke", { Parent = Panel; ApplyStrokeMode = ASM.Border; Color = RGB(30, 30, 36); })3548 Add("UIPadding", {3549 Parent = Panel;3550 PaddingTop = UD(0, 12);3551 PaddingBottom = UD(0, 10);3552 PaddingLeft = UD(0, 12);3553 PaddingRight = UD(0, 12);3554 })3555 Add("UIListLayout", {3556 Parent = Panel;3557 SortOrder = SO.LayoutOrder;3558 Padding = UD(0, 10);3559 })3560 3561 local Header = Add("TextButton", {3562 Parent = Panel;3563 Name = "Header";3564 Size = UD2(1, 0, 0, 22);3565 BackgroundTransparency = 1;3566 Text = "";3567 AutoButtonColor = false;3568 LayoutOrder = 0;3569 ZIndex = 121;3570 })3571 local HeaderIcon = Add("Frame", {3572 Parent = Header;3573 BackgroundColor3 = T.Accent;3574 Size = UFO(8, 8);3575 Position = UFO(0, 7);3576 BorderSizePixel = 0;3577 })3578 Add("UICorner", { Parent = HeaderIcon; CornerRadius = UD(1, 0); })3579 Add("UIGradient", {3580 Parent = HeaderIcon;3581 Color = CS{ CSK(0, T.AccentDark), CSK(1, T.Accent) };3582 Rotation = -90;3583 })3584 Add("TextLabel", {3585 Parent = Header;3586 BackgroundTransparency = 1;3587 Position = UFO(16, 0);3588 Size = UD2(1, -16, 1, 0);3589 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);3590 Text = "Keybind list";3591 TextColor3 = T.Text;3592 TextSize = 14;3593 TextXAlignment = TXA.Left;3594 })3595 3596 local Body = Add("Frame", {3597 Parent = Panel;3598 Name = "Body";3599 BackgroundTransparency = 1;3600 Size = UD2(1, 0, 0, 0);3601 AutomaticSize = AS.Y;3602 LayoutOrder = 1;3603 ClipsDescendants = true;3604 })3605 Add("UIListLayout", { Parent = Body; SortOrder = SO.LayoutOrder; Padding = UD(0, 8); })3606 3607 local Cols = Add("Frame", {3608 Parent = Body;3609 Name = "Cols";3610 BackgroundTransparency = 1;3611 Size = UD2(1, 0, 0, 16);3612 LayoutOrder = 1;3613 })3614 local function Col(Text: string, Pos: UDim2, Size: UDim2, Align: Enum.TextXAlignment)3615 Add("TextLabel", {3616 Parent = Cols;3617 BackgroundTransparency = 1;3618 Position = Pos;3619 Size = Size;3620 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);3621 Text = Text;3622 TextColor3 = RGB(160, 160, 165);3623 TextSize = 12;3624 TextXAlignment = Align;3625 })3626 end3627 Col("Function", UFO(6, 0), UFO(118, 16), TXA.Left)3628 Col("Hotkey", UFO(128, 0), UFO(72, 16), TXA.Center)3629 Col("Status", UFO(200, 0), UFO(56, 16), TXA.Right)3630 3631 Add("Frame", {3632 Parent = Body;3633 Name = "Divider";3634 Size = UD2(1, 0, 0, 1);3635 BackgroundColor3 = RGB(21, 21, 23);3636 BorderSizePixel = 0;3637 LayoutOrder = 2;3638 })3639 3640 local Rows = Add("Frame", {3641 Parent = Body;3642 Name = "Rows";3643 BackgroundTransparency = 1;3644 Size = UD2(1, 0, 0, 0);3645 AutomaticSize = AS.Y;3646 LayoutOrder = 3;3647 })3648 Add("UIListLayout", { Parent = Rows; SortOrder = SO.LayoutOrder; Padding = UD(0, 2); })3649 3650 BindDrag(Panel, Header, true)3651 Panel:GetPropertyChangedSignal("Position"):Connect(function()3652 local P = Panel.Position3653 Library.KeybindList.SavedPos = { X = P.X.Offset; Y = P.Y.Offset }3654 end)3655 task.defer(function()3656 if not (Panel and Panel.Parent) then return end3657 if Library.KeybindList.SavedPos then3658 Panel.Position = ClampToScreen(Panel, UFO(Library.KeybindList.SavedPos.X, Library.KeybindList.SavedPos.Y))3659 else3660 Panel.Position = ClampToScreen(Panel, Panel.Position)3661 end3662 end)3663 3664 Library.KeybindList.Frame = Panel3665 Library.KeybindList.Body = Body3666 Library.KeybindList.RowsFolder = Rows3667 Library.KeybindList.Rows = {}3668 Library.KeybindList.Accent = HeaderIcon3669 3670 for _, Entry in pairs(Library.KeybindRegistry or {}) do3671 Library.UpdateKeybindList(Entry.Name, Entry.KeyText, Entry.Active, Entry.Mode)3672 end3673end3674 3675Library.UpdateKeybindList = function(Name: string, KeyText: string, Active: boolean?, Mode: string?)3676 if not Library.KeybindList.Enabled then3677 return3678 end3679 if not Library.KeybindList.Frame or not Library.KeybindList.RowsFolder then3680 Library.SetKeybindList(true)3681 end3682 3683 Mode = Mode or "Toggle"3684 KeyText = KeyText or "—"3685 local Rows = Library.KeybindList.Rows3686 local Folder = Library.KeybindList.RowsFolder3687 local T = Library.Theme3688 local Row = Rows[Name]3689 3690 if not Row then3691 local Frame = Add("TextButton", {3692 Parent = Folder;3693 Text = "";3694 AutoButtonColor = false;3695 BackgroundColor3 = RGB(25, 25, 29);3696 BackgroundTransparency = 1;3697 Size = UD2(1, 0, 0, 26);3698 BorderSizePixel = 0;3699 ZIndex = 122;3700 })3701 Add("UICorner", { Parent = Frame; CornerRadius = UD(0, 6); })3702 3703 local NameLbl = Add("TextLabel", {3704 Parent = Frame;3705 Name = "Name";3706 BackgroundTransparency = 1;3707 Position = UFO(6, 0);3708 Size = UFO(118, 26);3709 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);3710 Text = Name;3711 TextColor3 = T.Text;3712 TextSize = 12;3713 TextXAlignment = TXA.Left;3714 TextTruncate = ETT.AtEnd;3715 })3716 local KeyLbl = Add("TextLabel", {3717 Parent = Frame;3718 Name = "Key";3719 BackgroundTransparency = 1;3720 Position = UFO(128, 0);3721 Size = UFO(72, 26);3722 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);3723 Text = KeyText;3724 TextColor3 = T.Text;3725 TextSize = 12;3726 TextXAlignment = TXA.Center;3727 TextTruncate = ETT.AtEnd;3728 })3729 local StatusLbl = Add("TextLabel", {3730 Parent = Frame;3731 Name = "Status";3732 BackgroundTransparency = 1;3733 Position = UFO(200, 0);3734 Size = UFO(56, 26);3735 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);3736 Text = Mode;3737 TextColor3 = RGB(160, 160, 165);3738 TextSize = 12;3739 TextXAlignment = TXA.Right;3740 })3741 3742 Frame.MouseEnter:Connect(function()3743 if Frame:GetAttribute("Active") then return end3744 Tween(Frame, { BackgroundTransparency = 0.55 }, 0.12)3745 end)3746 Frame.MouseLeave:Connect(function()3747 if Frame:GetAttribute("Active") then3748 Tween(Frame, { BackgroundTransparency = 0 }, 0.12)3749 else3750 Tween(Frame, { BackgroundTransparency = 1 }, 0.12)3751 end3752 end)3753 3754 Row = { Frame = Frame; Name = NameLbl; Key = KeyLbl; Status = StatusLbl }3755 Rows[Name] = Row3756 end3757 3758 Row.Key.Text = KeyText3759 Row.Status.Text = Mode3760 Row.Frame:SetAttribute("Active", Active == true)3761 3762 if Active then3763 Tween(Row.Frame, { BackgroundTransparency = 0 }, 0.12)3764 Row.Name.TextColor3 = T.Text3765 Row.Key.TextColor3 = T.Accent3766 Row.Status.TextColor3 = T.Accent3767 else3768 Tween(Row.Frame, { BackgroundTransparency = 1 }, 0.12)3769 Row.Name.TextColor3 = T.Text3770 Row.Key.TextColor3 = T.Text3771 Row.Status.TextColor3 = RGB(160, 160, 165)3772 end3773end3774 3775Library._NotifyOrder = 03776Library._Toasts = {}3777Library.MaxNotifications = 43778Library.NotifyToggles = true3779 3780Library.Notify = function(propertyTable: {})3781 local Props = Overwrite({3782 Title = "Notification";3783 Text = "";3784 Content = nil;3785 Duration = 4;3786 Type = "Info";3787 Icon = nil;3788 }, propertyTable or {})3789 3790 local Content = Props.Content or Props.Text or Props.Message or ""3791 local Duration = Props.Duration or 43792 local T = Library.Theme3793 3794 local TypeColor = T.Text3795 if Props.Type == "Success" then3796 TypeColor = RGB(150, 220, 170)3797 elseif Props.Type == "Warning" or Props.Type == "Warn" then3798 TypeColor = RGB(240, 176, 108)3799 elseif Props.Type == "Error" then3800 TypeColor = RGB(240, 120, 120)3801 end3802 3803 local Gui = EnsureOverlayGui()3804 if not Library._NotifyHost then3805 Library._NotifyHost = Add("Frame", {3806 Parent = Gui;3807 Name = "Notifications";3808 BackgroundTransparency = 1;3809 Size = UFO(220, 0);3810 AutomaticSize = AS.Y;3811 ZIndex = 200;3812 })3813 Add("UIListLayout", {3814 Parent = Library._NotifyHost;3815 Padding = UD(0, 10);3816 SortOrder = SO.LayoutOrder;3817 HorizontalAlignment = HFA.Right;3818 })3819 end3820 3821 local Pos = Library.NotifyPosition or "Top Right"3822 local Layout = Library._NotifyHost:FindFirstChildOfClass("UIListLayout")3823 if Pos == "Top Left" then3824 Library._NotifyHost.AnchorPoint = V2(0, 0)3825 Library._NotifyHost.Position = UFO(16, 16)3826 Layout.HorizontalAlignment = HFA.Left3827 elseif Pos == "Bottom Left" then3828 Library._NotifyHost.AnchorPoint = V2(0, 1)3829 Library._NotifyHost.Position = UD2(0, 16, 1, -16)3830 Layout.HorizontalAlignment = HFA.Left3831 elseif Pos == "Bottom Right" then3832 Library._NotifyHost.AnchorPoint = V2(1, 1)3833 Library._NotifyHost.Position = UD2(1, -16, 1, -16)3834 Layout.HorizontalAlignment = HFA.Right3835 else3836 Library._NotifyHost.AnchorPoint = V2(1, 0)3837 Library._NotifyHost.Position = UD2(1, -16, 0, 16)3838 Layout.HorizontalAlignment = HFA.Right3839 end3840 3841 Library._NotifyOrder = (Library._NotifyOrder or 0) + 13842 3843 local HasBody = Content ~= ""3844 local CardH = HasBody and 52 or 363845 local SlideDir = (string.find(Pos, "Left") and -1) or 13846 3847 local Slot = Add("Frame", {3848 Parent = Library._NotifyHost;3849 Size = UD2(1, 0, 0, CardH + 4);3850 BackgroundTransparency = 1;3851 LayoutOrder = Library._NotifyOrder;3852 ClipsDescendants = false;3853 })3854 3855 local Shell = Add("Frame", {3856 Parent = Slot;3857 Position = UFO(280 * SlideDir, 0);3858 Size = UD2(1, 0, 0, CardH);3859 BackgroundTransparency = 1;3860 })3861 3862 local Shadow = Add("ImageLabel", {3863 Parent = Shell;3864 Position = UFO(-12, -12);3865 Size = UD2(1, 24, 1, 24);3866 BackgroundTransparency = 1;3867 Image = "rbxassetid://6014261993";3868 ImageColor3 = RGB(0, 0, 0);3869 ImageTransparency = 1;3870 ScaleType = SCL.Slice;3871 SliceCenter = Rect.new(49, 49, 450, 450);3872 ZIndex = 0;3873 })3874 3875 local Card = Add("CanvasGroup", {3876 Parent = Shell;3877 Size = UFS(1, 1);3878 BackgroundColor3 = T.Background or RGB(14, 14, 16);3879 BorderSizePixel = 0;3880 GroupTransparency = 1;3881 ZIndex = 1;3882 })3883 Add("UICorner", { Parent = Card; CornerRadius = UD(0, 8); })3884 local CardStroke = Add("UIStroke", {3885 Parent = Card;3886 ApplyStrokeMode = ASM.Border;3887 Color = T.Border or RGB(30, 30, 36);3888 Thickness = 1;3889 })3890 3891 Add("Frame", {3892 Parent = Card;3893 Size = UD2(1, 0, 0, 1);3894 BackgroundColor3 = RGB(255, 255, 255);3895 BackgroundTransparency = 0.93;3896 BorderSizePixel = 0;3897 ZIndex = 2;3898 })3899 3900 local Body = Add("Frame", {3901 Parent = Card;3902 Size = UD2(1, 0, 1, -6);3903 BackgroundTransparency = 1;3904 ZIndex = 3;3905 })3906 Add("UIPadding", {3907 Parent = Body;3908 PaddingLeft = UD(0, 10);3909 PaddingRight = UD(0, 6);3910 PaddingTop = UD(0, 6);3911 PaddingBottom = UD(0, 4);3912 })3913 3914 Add("TextLabel", {3915 Parent = Body;3916 BackgroundTransparency = 1;3917 Size = UD2(1, -16, 0, 14);3918 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);3919 Text = Props.Title or "Notification";3920 TextColor3 = TypeColor;3921 TextSize = 12;3922 TextXAlignment = TXA.Left;3923 TextTruncate = ETT.AtEnd;3924 ZIndex = 4;3925 })3926 3927 local Close = Add("TextButton", {3928 Parent = Body;3929 AnchorPoint = V2(1, 0);3930 Position = UD2(1, 0, 0, -2);3931 Size = UFO(16, 16);3932 BackgroundTransparency = 1;3933 Text = "x";3934 TextColor3 = RGB(140, 144, 155);3935 TextSize = 12;3936 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);3937 AutoButtonColor = false;3938 ZIndex = 5;3939 })3940 Close.MouseEnter:Connect(function()3941 Tween(Close, { TextColor3 = T.Text }, 0.12)3942 end)3943 Close.MouseLeave:Connect(function()3944 Tween(Close, { TextColor3 = RGB(140, 144, 155) }, 0.15)3945 end)3946 3947 if HasBody then3948 Add("TextLabel", {3949 Parent = Body;3950 BackgroundTransparency = 1;3951 Position = UFO(0, 15);3952 Size = UD2(1, -4, 0, 14);3953 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);3954 Text = Content;3955 TextColor3 = RGB(155, 158, 168);3956 TextSize = 11;3957 TextXAlignment = TXA.Left;3958 TextTruncate = ETT.AtEnd;3959 ZIndex = 4;3960 })3961 end3962 3963 local BarBG = Add("Frame", {3964 Parent = Card;3965 AnchorPoint = V2(0, 1);3966 Position = UD2(0, 10, 1, -4);3967 Size = UD2(1, -20, 0, 2);3968 BackgroundColor3 = T.SurfaceAlt or RGB(28, 28, 30);3969 BorderSizePixel = 0;3970 ZIndex = 5;3971 })3972 Add("UICorner", { Parent = BarBG; CornerRadius = UD(1, 0); })3973 local Bar = Add("Frame", {3974 Parent = BarBG;3975 Size = UFS(1, 1);3976 BackgroundColor3 = T.Accent;3977 BorderSizePixel = 0;3978 })3979 Add("UICorner", { Parent = Bar; CornerRadius = UD(1, 0); })3980 3981 Tween(Shell, { Position = UFO(0, 0) }, 0.35, ES.Quint)3982 Tween(Card, { GroupTransparency = 0 }, 0.22)3983 Tween(Shadow, { ImageTransparency = 0.7 }, 0.3)3984 Tween(Bar, { Size = UD2(0, 0, 1, 0) }, Duration, ES.Linear)3985 3986 local Closed = false3987 local function Dismiss()3988 if Closed then return end3989 Closed = true3990 for i, Fn in Library._Toasts do3991 if Fn == Dismiss then3992 table.remove(Library._Toasts, i)3993 break3994 end3995 end3996 Slot.ClipsDescendants = true3997 Tween(Shell, { Position = UFO(280 * SlideDir, 0) }, 0.25, ES.Quint)3998 Tween(Card, { GroupTransparency = 1 }, 0.18)3999 Tween(CardStroke, { Transparency = 1 }, 0.12)4000 Tween(Shadow, { ImageTransparency = 1 }, 0.18)4001 task.delay(0.2, function()4002 Tween(Slot, { Size = UD2(1, 0, 0, 0) }, 0.18, ES.Quint)4003 task.delay(0.2, function()4004 Slot:Destroy()4005 end)4006 end)4007 end4008 4009 task.delay(Duration, Dismiss)4010 Close.Activated:Connect(Dismiss)4011 TIS(Library._Toasts, Dismiss)4012 4013 while #Library._Toasts > (Library.MaxNotifications or 4) do4014 local Oldest = table.remove(Library._Toasts, 1)4015 if Oldest then Oldest() end4016 end4017 4018 return { Dismiss = Dismiss }4019end4020 4021Library.Unload = function()4022 Library.ToggleMenu(false)4023 if Library.Watermark.Frame then Library.Watermark.Frame.Visible = false end4024 if Library.KeybindList.Frame then Library.KeybindList.Frame.Visible = false end4025 if Library._NotifyHost then Library._NotifyHost.Visible = false end4026 for _, Win in Library.Windows do4027 if Win.Canvas then4028 Win.Canvas:Destroy()4029 end4030 end4031 table.clear(Library.Windows)4032 if Library._Instance then4033 Library._Instance:Destroy()4034 end4035 Library.Notify({ Title = "Noctro"; Text = "Unloaded"; Duration = 2 })4036end4037 4038Library.ToggleMenu = function(State: boolean?)4039 if Library.Auth and Library.Auth.Enabled and not Library.Auth.Validated then4040 State = true4041 end4042 if State == nil then4043 State = not Library.MenuOpen4044 end4045 Library.MenuOpen = State4046 for _, Win in Library.Windows do4047 if Win.Canvas then4048 Win.Canvas.Visible = State4049 end4050 end4051 if Library.OpenPopup and Library.OpenPopup.Close then4052 Library.OpenPopup.Close()4053 end4054end4055 4056UserInputService.InputBegan:Connect(function(Input, GameProcessed)4057 if GameProcessed then4058 return4059 end4060 if Library.MenuKey and Input.KeyCode == Library.MenuKey then4061 Library.ToggleMenu()4062 end4063end)4064 4065Library.BuildConfigPage = function(self: Library, Window: any)4066 local Page = Window:Page({ Icon = "save" })4067 local Manager = Page:SubPage({ Name = "Configs" })4068 local ThemePage = Page:SubPage({ Name = "Theme" })4069 local MenuPage = Page:SubPage({ Name = "Menu" })4070 4071 local ListSection = Manager:Section({ Name = "Configs"; Side = "Left"; Icon = "folder" })4072 local ActionsSection = Manager:Section({ Name = "Actions"; Side = "Right"; Icon = "settings" })4073 local ThemeSection = ThemePage:Section({ Name = "Colors"; Side = "Left"; Icon = "palette" })4074 local ThemePrev = ThemePage:Section({ Name = "Preview"; Side = "Right"; Icon = "eye" })4075 local MenuSection = MenuPage:Section({ Name = "Menu"; Side = "Left"; Icon = "settings" })4076 local NotifySection = MenuPage:Section({ Name = "Notifications"; Side = "Right"; Icon = "bell" })4077 4078 local Selected = { Name = nil :: string? }4079 local ListRows = {} :: { [string]: TextButton }4080 4081 local ListHost = Add("Frame", {4082 Parent = ListSection.Content;4083 Name = "ConfigList";4084 BackgroundColor3 = Library.Theme.Background;4085 BorderSizePixel = 0;4086 Size = UD2(1, 0, 0, 160);4087 })4088 Add("UICorner", { Parent = ListHost; CornerRadius = UD(0, 6); })4089 Add("UIStroke", { Parent = ListHost; ApplyStrokeMode = ASM.Border; Color = Library.Theme.Border; })4090 local ListScroll = Add("ScrollingFrame", {4091 Parent = ListHost;4092 BackgroundTransparency = 1;4093 BorderSizePixel = 0;4094 Size = UFS(1, 1);4095 CanvasSize = UD2(0, 0, 0, 0);4096 AutomaticCanvasSize = AS.Y;4097 ScrollBarThickness = 2;4098 ScrollBarImageColor3 = Library.Theme.Accent;4099 })4100 Add("UIListLayout", { Parent = ListScroll; Padding = UD(0, 2); SortOrder = SO.LayoutOrder; })4101 Add("UIPadding", { Parent = ListScroll; PaddingTop = UD(0, 4); PaddingBottom = UD(0, 4); PaddingLeft = UD(0, 4); PaddingRight = UD(0, 4); })4102 4103 local function PaintRows()4104 for Name, Row in ListRows do4105 local On = Selected.Name == Name4106 Row.TextColor3 = On and Library.Theme.Accent or RGB(200, 204, 220)4107 Row.BackgroundTransparency = On and 0.85 or 14108 Row.BackgroundColor3 = Library.Theme.Accent4109 end4110 end4111 4112 local function SelectConfig(Name: string)4113 Selected.Name = Name4114 if ConfigInput then4115 ConfigInput.Set(Name)4116 end4117 PaintRows()4118 end4119 4120 local function RebuildList()4121 for _, Row in ListRows do4122 Row:Destroy()4123 end4124 table.clear(ListRows)4125 local Names = Library.ListConfigs()4126 if #Names == 0 then4127 local Empty = Add("TextLabel", {4128 Parent = ListScroll;4129 BackgroundTransparency = 1;4130 Size = UD2(1, 0, 0, 28);4131 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);4132 Text = "No configs yet";4133 TextColor3 = RGB(120, 124, 140);4134 TextSize = 12;4135 })4136 ListRows["__empty"] = Empty :: any4137 else4138 for i, Name in Names do4139 local Row = Add("TextButton", {4140 Parent = ListScroll;4141 AutoButtonColor = false;4142 BackgroundColor3 = Library.Theme.Accent;4143 BackgroundTransparency = 1;4144 BorderSizePixel = 0;4145 Size = UD2(1, 0, 0, 26);4146 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);4147 Text = " " .. Name;4148 TextColor3 = RGB(200, 204, 220);4149 TextSize = 13;4150 TextXAlignment = TXA.Left;4151 LayoutOrder = i;4152 })4153 Add("UICorner", { Parent = Row; CornerRadius = UD(0, 4); })4154 Row.Activated:Connect(function()4155 SelectConfig(Name)4156 end)4157 ListRows[Name] = Row4158 end4159 end4160 if Selected.Name and ListRows[Selected.Name] then4161 PaintRows()4162 elseif #Names > 0 then4163 SelectConfig(Names[1])4164 end4165 end4166 4167 local ConfigInput = ActionsSection:Input({4168 Name = "New name (for Save)";4169 Value = "default";4170 Placeholder = "name";4171 Flag = "ConfigName";4172 4173 })4174 4175 local function SelectedName(): string?4176 return Selected.Name4177 end4178 4179 ActionsSection:Button({4180 Name = "Save";4181 Width = 0.5;4182 Callback = function()4183 local Name = Selected.Name4184 if not Name or Name == "" then4185 local Typed = ConfigInput and ConfigInput.Value4186 if type(Typed) == "string" and Typed ~= "" then4187 Name = Typed4188 else4189 Library.Notify({ Title = "Config"; Content = "Select a config or type a name"; Type = "Warning" })4190 return4191 end4192 end4193 if Library.SaveConfig(Name) then4194 SelectConfig(Name)4195 RebuildList()4196 Library.Notify({ Title = "Config"; Content = "Saved " .. Name; Type = "Success" })4197 else4198 Library.Notify({ Title = "Config"; Content = "Save failed — executor FS?"; Type = "Error" })4199 end4200 end;4201 })4202 ActionsSection:Button({4203 Name = "Load";4204 Width = 0.5;4205 Callback = function()4206 local Name = SelectedName()4207 if not Name then4208 Library.Notify({ Title = "Config"; Content = "Select a config in the list first"; Type = "Warning" })4209 return4210 end4211 if Library.LoadConfig(Name) then4212 Library.ApplyTheme()4213 if Library.SyncThemePickers then4214 Library.SyncThemePickers()4215 end4216 SelectConfig(Name)4217 Library.Notify({ Title = "Config"; Content = "Loaded " .. Name; Type = "Success" })4218 else4219 Library.Notify({ Title = "Config"; Content = "Failed to load " .. Name; Type = "Error" })4220 end4221 end;4222 })4223 ActionsSection:Button({4224 Name = "Delete";4225 Width = 0.5;4226 Callback = function()4227 local Name = SelectedName()4228 if not Name then4229 Library.Notify({ Title = "Config"; Content = "Select a config in the list first"; Type = "Warning" })4230 return4231 end4232 Library.DeleteConfig(Name)4233 Selected.Name = nil4234 RebuildList()4235 Library.Notify({ Title = "Config"; Content = "Deleted " .. Name; Type = "Info" })4236 end;4237 })4238 ActionsSection:Button({4239 Name = "Refresh";4240 Width = 0.5;4241 Callback = function()4242 RebuildList()4243 Library.Notify({ Title = "Config"; Content = "List refreshed"; Type = "Info"; Duration = 1.5 })4244 end;4245 })4246 ActionsSection:Button({4247 Name = "Set autoload";4248 Callback = function()4249 local Name = SelectedName()4250 if not Name then4251 Library.Notify({ Title = "Config"; Content = "Select a config in the list first"; Type = "Warning" })4252 return4253 end4254 Library.SetAutoload(Name)4255 Library.Notify({ Title = "Config"; Content = "Autoload set to " .. Name; Type = "Success" })4256 end;4257 })4258 4259 RebuildList()4260 4261 local ThemePickers = {}4262 4263 local function ThemePicker(LabelText: string, Key: string)4264 local Row = ThemeSection:Label({ Text = LabelText })4265 local Picker = Row:Colorpicker({4266 Color = Library.Theme[Key];4267 Flag = "Theme" .. Key;4268 Callback = function(Color)4269 Library.Theme[Key] = Color4270 if Key == "Accent" then4271 local H, S, V = Color:ToHSV()4272 Library.Theme.AccentDark = HSV(H, S, math.max(V * 0.55, 0.15))4273 end4274 Library.ApplyTheme()4275 end;4276 })4277 ThemePickers[Key] = Picker4278 end4279 4280 ThemePicker("Accent", "Accent")4281 ThemePicker("Background", "Background")4282 ThemePicker("Surface", "Surface")4283 ThemePicker("Surface alt", "SurfaceAlt")4284 ThemePicker("Border", "Border")4285 ThemePicker("Section border", "SectionBorder")4286 ThemePicker("Text", "Text")4287 4288 Library.SyncThemePickers = function()4289 for Key, Picker in pairs(ThemePickers) do4290 local Color = Library.Theme[Key]4291 if Color and Picker and Picker.Set then4292 Picker.Set(Color, 0)4293 end4294 end4295 end4296 4297 ThemePrev:Paragraph({4298 Title = "Live theme";4299 Body = "Changes apply immediately to the menu, watermark, and keybind list.";4300 })4301 ThemePrev:Button({4302 Name = "Reset theme";4303 Callback = function()4304 for Key, Color in pairs(Library.DefaultTheme) do4305 Library.Theme[Key] = Color4306 end4307 Library.ApplyTheme()4308 if Library.SyncThemePickers then4309 Library.SyncThemePickers()4310 end4311 Library.Notify({ Title = "Theme"; Content = "Reset to default"; Type = "Info" })4312 end;4313 })4314 4315 local MenuKeyLabel = MenuSection:Label({ Text = "Menu key" })4316 MenuKeyLabel:Keybind({4317 Title = "Menu";4318 Key = Library.MenuKey;4319 Type = "Toggle";4320 Flag = "MenuKeybind";4321 Callback = function() end;4322 })4323 task.defer(function()4324 local Flag = Library.Flags["MenuKeybind"]4325 if Flag then4326 local OldSet = Flag.Set4327 Flag.Set = function(Key)4328 if OldSet then OldSet(Key) end4329 if Key then Library.MenuKey = Key end4330 end4331 end4332 end)4333 4334 MenuSection:Slider({4335 Name = "UI scale";4336 Suffix = "%";4337 Value = math.floor(Library.UIScale * 100);4338 Min = 75;4339 Max = 125;4340 Increment = 5;4341 Flag = "UIScale";4342 Callback = function(Value)4343 Library.SetScale(Value / 100)4344 end;4345 })4346 local WM = MenuSection:Label({ Text = "Watermark" })4347 WM:Toggle({4348 State = Library.Watermark.Enabled;4349 Flag = "WatermarkEnabled";4350 Callback = function(State)4351 Library.SetWatermark(nil, State)4352 end;4353 })4354 local KBL = MenuSection:Label({ Text = "Keybind list" })4355 KBL:Toggle({4356 State = Library.KeybindList.Enabled;4357 Flag = "KeybindListEnabled";4358 Callback = function(State)4359 Library.SetKeybindList(State)4360 end;4361 })4362 MenuSection:Button({4363 Name = "Hide menu";4364 Width = 0.5;4365 Callback = function()4366 Library.ToggleMenu(false)4367 Library.Notify({ Title = "Noctro"; Text = "Menu hidden - press menu key"; Duration = 2 })4368 end;4369 })4370 MenuSection:Button({4371 Name = "Unload";4372 Width = 0.5;4373 Callback = function()4374 Library.Unload()4375 end;4376 })4377 if Library.Auth and Library.Auth.Enabled then4378 MenuSection:Button({4379 Name = "Sign out";4380 Callback = function()4381 Library.SignOut()4382 end;4383 })4384 end4385 4386 NotifySection:Dropdown({4387 Name = "Position";4388 Options = { "Top Left", "Top Right", "Bottom Left", "Bottom Right" };4389 Value = Library.NotifyPosition;4390 Flag = "NotifyPosition";4391 Callback = function(Value)4392 Library.NotifyPosition = Value4393 end;4394 })4395 local NT = NotifySection:Label({ Text = "Notify on toggles" })4396 NT:Toggle({4397 State = Library.NotifyToggles ~= false;4398 Flag = "NotifyToggles";4399 Callback = function(State)4400 Library.NotifyToggles = State4401 end;4402 })4403 NotifySection:Button({4404 Name = "Test notification";4405 Callback = function()4406 Library.Notify({ Title = "Noctro"; Text = "This is a test notification"; Type = "Success" })4407 end;4408 })4409 4410 local Autoload = Library.GetAutoload()4411 if Autoload then4412 Library.LoadConfig(Autoload)4413 Library.ApplyTheme()4414 if Library.SyncThemePickers then4415 Library.SyncThemePickers()4416 end4417 SelectConfig(Autoload)4418 end4419 4420 return Page4421end4422 4423 4424Library.FormatExpiry = function(ExpiresAt)4425 if not ExpiresAt or type(ExpiresAt) ~= "number" then4426 return "Lifetime"4427 end4428 local Left = math.floor(ExpiresAt - os.time())4429 if Left <= 0 then4430 return "Expired"4431 end4432 local Days = math.floor(Left / 86400)4433 local Hours = math.floor((Left % 86400) / 3600)4434 local Mins = math.floor((Left % 3600) / 60)4435 local Parts = {}4436 if Days > 0 then4437 table.insert(Parts, string.format("%dd", Days))4438 end4439 if Hours > 0 then4440 table.insert(Parts, string.format("%dh", Hours))4441 end4442 if Mins > 0 and Days == 0 then4443 table.insert(Parts, string.format("%dm", Mins))4444 end4445 if #Parts == 0 then4446 return "1m"4447 end4448 return table.concat(Parts, " ")4449end4450 4451Library.GetKeyExpiryText = function()4452 if not Library.Auth or not Library.Auth.Validated then4453 return ""4454 end4455 return Library.FormatExpiry(Library.Auth.ExpiresAt)4456end4457 4458Library.KeySystem = function(self, propertyTable)4459 local Opts = Overwrite({4460 Title = "Login";4461 Note = "";4462 Placeholder = "License key";4463 ButtonText = "Sign in";4464 Remember = true;4465 RememberFile = "auth_key.txt";4466 ShowExpiry = true;4467 WatermarkExpiry = false;4468 GetKey = nil;4469 Validate = nil;4470 }, propertyTable or {})4471 4472 Library.Auth.Enabled = true4473 Library.Auth.Validated = false4474 Library.Auth.Token = nil4475 Library.Auth.ExpiresAt = nil4476 Library.Auth.ShowExpiry = Opts.ShowExpiry == true4477 Library.Auth.WatermarkExpiry = Opts.WatermarkExpiry == true4478 Library.Auth.Options = Opts4479 return Opts4480end4481 4482local function AuthRememberPath()4483 local Opts = Library.Auth and Library.Auth.Options4484 local Name = (Opts and Opts.RememberFile) or "auth_key.txt"4485 return Library.Folder .. "/" .. Name4486end4487 4488local function ReadRememberedKey()4489 if not HasFS() then4490 return nil4491 end4492 local Path = AuthRememberPath()4493 local Ok, Data = pcall(function()4494 if isfile and isfile(Path) then4495 return readfile(Path)4496 end4497 return nil4498 end)4499 if Ok and type(Data) == "string" and Data ~= "" then4500 return Data4501 end4502 return nil4503end4504 4505local function WriteRememberedKey(Key, Remember)4506 if not HasFS() then4507 return4508 end4509 EnsureFolder()4510 local Path = AuthRememberPath()4511 if Remember and Key and Key ~= "" then4512 pcall(writefile, Path, Key)4513 else4514 pcall(function()4515 if isfile and isfile(Path) and delfile then4516 delfile(Path)4517 elseif writefile then4518 writefile(Path, "")4519 end4520 end)4521 end4522end4523 4524local function RunValidate(Key, Finish)4525 local Opts = Library.Auth.Options4526 if not Opts or type(Opts.Validate) ~= "function" then4527 Finish(true, nil, nil)4528 return4529 end4530 local called = false4531 local function SafeFinish(Success, ExpiresAt, Err)4532 if called then return end4533 called = true4534 Finish(Success, ExpiresAt, Err)4535 end4536 local Ok, A, B, C = pcall(function()4537 return Opts.Validate(Key, SafeFinish)4538 end)4539 if not Ok then4540 SafeFinish(false, nil, tostring(A))4541 return4542 end4543 if A == true or A == false then4544 SafeFinish(A, B, C)4545 end4546end4547 4548 4549Library.SignOut = function()4550 if not Library.Auth or not Library.Auth.Enabled then4551 return4552 end4553 WriteRememberedKey(nil, false)4554 Library.Auth.Validated = false4555 Library.Auth.Token = nil4556 Library.Auth.ExpiresAt = nil4557 for _, Win in Library.Windows do4558 if Win.Canvas then4559 local Footer = Win.Canvas:FindFirstChild("Footer")4560 if Footer then4561 local Exp = Footer:FindFirstChild("KeyExpiry")4562 if Exp then Exp:Destroy() end4563 end4564 if Library._MountKeySystem then4565 Library._MountKeySystem(Win)4566 end4567 end4568 end4569 Library.Notify({ Title = "Key system"; Content = "Signed out"; Type = "Info"; Duration = 2 })4570end4571 4572Library._MountKeySystem = function(Window)4573 if not Library.Auth or not Library.Auth.Enabled or Library.Auth.Validated then4574 return4575 end4576 local Canvas = Window and Window.Canvas4577 if not Canvas then4578 return4579 end4580 local Opts = Library.Auth.Options or {}4581 local T = Library.Theme4582 4583 local Hidden = {}4584 for _, Ch in ipairs(Canvas:GetChildren()) do4585 if Ch:IsA("GuiObject") and Ch.Name ~= "UIScale" then4586 Hidden[Ch] = Ch.Visible4587 Ch.Visible = false4588 end4589 end4590 4591 task.defer(function()4592 local Camera = workspace.CurrentCamera4593 if Camera and Canvas.Parent then4594 local Viewport = Camera.ViewportSize4595 local Size = Canvas.AbsoluteSize4596 if Size.X <= 0 then Size = V2(658, 461) end4597 local GuiService = Services:GetService("GuiService")4598 local Inset = GuiService:GetGuiInset()4599 Canvas.Position = ClampToScreen(Canvas, UFO(4600 math.floor((Viewport.X - Size.X) * 0.5),4601 math.floor((Viewport.Y - Inset.Y - Size.Y) * 0.5)4602 ))4603 end4604 end)4605 4606 local Layer = Add("Frame", {4607 Parent = Canvas;4608 Name = "KeySystem";4609 Size = UFS(1, 1);4610 BackgroundColor3 = T.Background or RGB(9, 8, 8);4611 BorderSizePixel = 0;4612 ZIndex = 80;4613 Active = true;4614 })4615 Add("UICorner", { Parent = Layer; CornerRadius = UD(0, 5); })4616 Add("UIStroke", { Parent = Layer; ApplyStrokeMode = ASM.Border; Color = T.Border or RGB(36, 37, 37); })4617 Add("UIShadow", { Parent = Layer; BlurRadius = UD(0, 20); Spread = UFO(5, 5); Transparency = 0.65; })4618 Library.ThemeLink(Layer, "BackgroundColor3", "Background")4619 BindDrag(Canvas, Layer, true)4620 4621 local Hair = Add("Frame", {4622 Parent = Layer;4623 Size = UD2(1, 0, 0, 1);4624 BackgroundColor3 = RGB(255, 255, 255);4625 BackgroundTransparency = 0.93;4626 BorderSizePixel = 0;4627 ZIndex = 81;4628 })4629 4630 local AccentGlow = Add("ImageLabel", {4631 Parent = Layer;4632 AnchorPoint = V2(0.5, 0.5);4633 Position = UFS(0.5, 0.42);4634 Size = UFO(480, 360);4635 BackgroundTransparency = 1;4636 Image = "rbxassetid://8992230677";4637 ImageColor3 = T.Accent;4638 ImageTransparency = 0.9;4639 ZIndex = 80;4640 })4641 Library.ThemeLink(AccentGlow, "ImageColor3", "Accent")4642 4643 local SideGlow = Add("ImageLabel", {4644 Parent = Layer;4645 AnchorPoint = V2(0, 1);4646 Position = UD2(0, -20, 1, 20);4647 Size = UFO(220, 180);4648 BackgroundTransparency = 1;4649 Image = "rbxassetid://8992230677";4650 ImageColor3 = T.AccentDark or T.Accent;4651 ImageTransparency = 0.92;4652 ZIndex = 80;4653 })4654 4655 local Form = Add("Frame", {4656 Parent = Layer;4657 AnchorPoint = V2(0.5, 0.5);4658 Position = UFS(0.5, 0.5);4659 Size = UFO(300, 0);4660 AutomaticSize = AS.Y;4661 BackgroundTransparency = 1;4662 ZIndex = 81;4663 })4664 4665 Add("TextLabel", {4666 Parent = Form;4667 BackgroundTransparency = 1;4668 Size = UD2(1, 0, 0, 28);4669 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);4670 Text = Opts.Title or "Login";4671 TextColor3 = T.Text or RGB(255, 255, 255);4672 TextSize = 22;4673 ZIndex = 82;4674 })4675 4676 local Under = Add("Frame", {4677 Parent = Form;4678 AnchorPoint = V2(0.5, 0);4679 Position = UD2(0.5, 0, 0, 32);4680 Size = UFO(56, 2);4681 BackgroundColor3 = T.Accent;4682 BorderSizePixel = 0;4683 ZIndex = 82;4684 })4685 Library.ThemeLink(Under, "BackgroundColor3", "Accent")4686 4687 local KeyWrap = Add("Frame", {4688 Parent = Form;4689 Position = UFO(0, 52);4690 Size = UD2(1, 0, 0, 42);4691 BackgroundColor3 = T.Surface or RGB(15, 14, 15);4692 BorderSizePixel = 0;4693 ZIndex = 82;4694 })4695 Add("UICorner", { Parent = KeyWrap; CornerRadius = UD(0, 6); })4696 Add("UIStroke", { Parent = KeyWrap; ApplyStrokeMode = ASM.Border; Color = T.Border or RGB(36, 37, 37); })4697 Library.ThemeLink(KeyWrap, "BackgroundColor3", "Surface")4698 local KeyIcon = Add("ImageLabel", {4699 Parent = KeyWrap;4700 AnchorPoint = V2(0, 0.5);4701 Position = UD2(0, 12, 0.5, 0);4702 Size = UFO(14, 14);4703 BackgroundTransparency = 1;4704 ImageColor3 = RGB(140, 144, 155);4705 ZIndex = 83;4706 })4707 pcall(function() KeyIcon.Image = ResolveIcon("key-round") end)4708 local KeyBox = Add("TextBox", {4709 Parent = KeyWrap;4710 Position = UFO(36, 0);4711 Size = UD2(1, -48, 1, 0);4712 BackgroundTransparency = 1;4713 PlaceholderText = Opts.Placeholder or "License key";4714 PlaceholderColor3 = RGB(120, 124, 135);4715 Text = "";4716 TextColor3 = T.Text;4717 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);4718 TextSize = 13;4719 TextXAlignment = TXA.Left;4720 ClearTextOnFocus = false;4721 ZIndex = 83;4722 })4723 4724 local SignIn = Add("TextButton", {4725 Parent = Form;4726 Position = UFO(0, 106);4727 Size = UD2(1, 0, 0, 42);4728 BackgroundColor3 = RGB(255, 255, 255);4729 AutoButtonColor = false;4730 Text = Opts.ButtonText or "Sign in";4731 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);4732 TextSize = 14;4733 TextColor3 = RGB(0, 0, 0);4734 BorderSizePixel = 0;4735 ZIndex = 82;4736 })4737 Add("UICorner", { Parent = SignIn; CornerRadius = UD(0, 6); })4738 local SignGrad = Add("UIGradient", {4739 Parent = SignIn;4740 Color = CS{ CSK(0, T.AccentDark or RGB(78, 88, 129)), CSK(1, T.Accent or RGB(138, 156, 229)) };4741 Rotation = -70;4742 })4743 Library.ThemeLink(SignGrad, "Gradient", "AccentDark", "Accent")4744 4745 local RememberOn = Opts.Remember ~= false4746 local RememberRow = Add("Frame", {4747 Parent = Form;4748 Position = UFO(0, 158);4749 Size = UD2(1, 0, 0, 20);4750 BackgroundTransparency = 1;4751 ZIndex = 82;4752 })4753 local RememberBtn = Add("TextButton", {4754 Parent = RememberRow;4755 Size = UFO(18, 18);4756 BackgroundColor3 = T.Surface or RGB(15, 14, 15);4757 Text = "";4758 AutoButtonColor = false;4759 BorderSizePixel = 0;4760 ZIndex = 83;4761 })4762 Add("UICorner", { Parent = RememberBtn; CornerRadius = UD(0, 4); })4763 local RemStroke = Add("UIStroke", { Parent = RememberBtn; Color = T.Border or RGB(36, 37, 37); Thickness = 1; })4764 local Check = Add("TextLabel", {4765 Parent = RememberBtn;4766 Size = UFS(1, 1);4767 BackgroundTransparency = 1;4768 Text = "✓";4769 TextColor3 = T.Accent;4770 TextSize = 13;4771 Font = Enum.Font.GothamBold;4772 TextTransparency = RememberOn and 0 or 1;4773 ZIndex = 84;4774 })4775 if RememberOn then4776 RememberBtn.BackgroundColor3 = T.Accent4777 Check.TextColor3 = RGB(255, 255, 255)4778 RemStroke.Transparency = 14779 end4780 Add("TextLabel", {4781 Parent = RememberRow;4782 Position = UFO(22, 0);4783 Size = UD2(1, -22, 1, 0);4784 BackgroundTransparency = 1;4785 Text = "Remember me";4786 TextColor3 = RGB(160, 160, 165);4787 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);4788 TextSize = 12;4789 TextXAlignment = TXA.Left;4790 ZIndex = 83;4791 })4792 RememberBtn.Activated:Connect(function()4793 RememberOn = not RememberOn4794 Tween(RememberBtn, { BackgroundColor3 = RememberOn and Library.Theme.Accent or Library.Theme.Surface }, 0.12)4795 Tween(Check, { TextTransparency = RememberOn and 0 or 1; TextColor3 = RememberOn and RGB(255, 255, 255) or Library.Theme.Accent }, 0.12)4796 Tween(RemStroke, { Transparency = RememberOn and 1 or 0 }, 0.12)4797 end)4798 4799 local Error = Add("TextLabel", {4800 Parent = Form;4801 Position = UFO(0, 198);4802 Size = UD2(1, 0, 0, 16);4803 BackgroundTransparency = 1;4804 Text = "";4805 TextColor3 = RGB(240, 120, 120);4806 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);4807 TextSize = 12;4808 ZIndex = 82;4809 })4810 4811 local NoteY = 1784812 if type(Opts.GetKey) == "string" and Opts.GetKey ~= "" then4813 local GetBtn = Add("TextButton", {4814 Parent = Form;4815 Position = UFO(0, NoteY);4816 Size = UD2(1, 0, 0, 16);4817 BackgroundTransparency = 1;4818 Text = "Get a key";4819 TextColor3 = T.Accent;4820 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);4821 TextSize = 12;4822 AutoButtonColor = false;4823 ZIndex = 82;4824 })4825 GetBtn.Activated:Connect(function()4826 pcall(function()4827 if setclipboard then4828 setclipboard(Opts.GetKey)4829 Library.Notify({ Title = "Key system"; Content = "Link copied"; Type = "Info"; Duration = 2 })4830 end4831 end)4832 end)4833 end4834 4835 local Loading = Add("Frame", {4836 Parent = Canvas;4837 Name = "AuthLoading";4838 Size = UFS(1, 1);4839 BackgroundColor3 = T.Background or RGB(9, 8, 8);4840 BorderSizePixel = 0;4841 Visible = false;4842 ZIndex = 90;4843 })4844 Add("UICorner", { Parent = Loading; CornerRadius = UD(0, 5); })4845 Add("UIStroke", { Parent = Loading; ApplyStrokeMode = ASM.Border; Color = T.Border or RGB(36, 37, 37); })4846 Add("UIShadow", { Parent = Loading; BlurRadius = UD(0, 20); Spread = UFO(5, 5); Transparency = 0.65; })4847 Library.ThemeLink(Loading, "BackgroundColor3", "Background")4848 local Spin = Add("ImageLabel", {4849 Parent = Loading;4850 AnchorPoint = V2(0.5, 0.5);4851 Position = UD2(0.5, 0, 0.48, 0);4852 Size = UFO(40, 40);4853 BackgroundTransparency = 1;4854 Image = "rbxassetid://4965945816";4855 ImageColor3 = T.Accent;4856 ZIndex = 91;4857 })4858 Library.ThemeLink(Spin, "ImageColor3", "Accent")4859 Add("TextLabel", {4860 Parent = Loading;4861 AnchorPoint = V2(0.5, 0);4862 Position = UD2(0.5, 0, 0.48, 28);4863 Size = UFO(160, 18);4864 BackgroundTransparency = 1;4865 Text = "Signing in...";4866 TextColor3 = RGB(160, 160, 165);4867 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);4868 TextSize = 13;4869 ZIndex = 91;4870 })4871 local SpinConn = RunService.RenderStepped:Connect(function(dt)4872 if Loading.Visible then4873 Spin.Rotation = (Spin.Rotation + dt * 240) % 3604874 end4875 end)4876 4877 local function RevealMenu()4878 Layer:Destroy()4879 Loading:Destroy()4880 if SpinConn then SpinConn:Disconnect() end4881 for Ch, Vis in pairs(Hidden) do4882 if Ch and Ch.Parent then4883 Ch.Visible = Vis ~= false4884 end4885 end4886 if Library.Auth.ShowExpiry and Library.Auth.ExpiresAt and Window.Canvas then4887 local Footer = Window.Canvas:FindFirstChild("Footer")4888 if Footer then4889 local Exp = Footer:FindFirstChild("KeyExpiry")4890 if not Exp then4891 Exp = Add("TextLabel", {4892 Parent = Footer;4893 Name = "KeyExpiry";4894 AnchorPoint = V2(0.5, 0.5);4895 Position = UFS(0.5, 0.5);4896 AutomaticSize = AS.X;4897 Size = UFO(0, 13);4898 BackgroundTransparency = 1;4899 FontFace = FN("rbxassetid://12187365364", FW.SemiBold, FS.Normal);4900 TextColor3 = Library.Theme.Accent;4901 TextSize = 12;4902 TextTransparency = 0.15;4903 })4904 Library.ThemeLink(Exp, "TextColor3", "Accent")4905 end4906 local function Tick()4907 if not Exp or not Exp.Parent then return end4908 Exp.Text = "Key · " .. Library.FormatExpiry(Library.Auth.ExpiresAt)4909 if Library.Auth.ExpiresAt and os.time() >= Library.Auth.ExpiresAt then4910 Library.Auth.Validated = false4911 Library.Auth.Token = nil4912 Library.Notify({ Title = "Key system"; Content = "License expired"; Type = "Error" })4913 pcall(function() Library.Unload() end)4914 end4915 end4916 Tick()4917 task.spawn(function()4918 while Exp and Exp.Parent and Library.Auth and Library.Auth.Validated do4919 Tick()4920 task.wait(30)4921 end4922 end)4923 end4924 end4925 if Library.Auth.WatermarkExpiry and Library.SetWatermark then4926 local Base = Library.Watermark.BaseText or Library.Watermark.Text or "Noctro"4927 Library.SetWatermark(Base, Library.Watermark.Enabled)4928 end4929 Library.Notify({ Title = "Key system"; Content = "Welcome back"; Type = "Success"; Duration = 2.5 })4930 end4931 4932 local Busy = false4933 local function Attempt(Key)4934 if Busy then return end4935 Key = tostring(Key or ""):gsub("^%s+", ""):gsub("%s+$", "")4936 if Key == "" then4937 Error.Text = "Enter a license key."4938 return4939 end4940 Busy = true4941 Error.Text = ""4942 Layer.Visible = false4943 Loading.Visible = true4944 4945 local finished = false4946 local function Finish(Success, ExpiresAt, Err)4947 if finished then return end4948 finished = true4949 if Success then4950 Library.Auth.Validated = true4951 Library.Auth.Token = tostring(os.clock()) .. tostring(math.random(100000, 999999))4952 Library.Auth.ExpiresAt = (type(ExpiresAt) == "number" and ExpiresAt) or nil4953 WriteRememberedKey(Key, RememberOn)4954 task.delay(0.55, RevealMenu)4955 else4956 Loading.Visible = false4957 Layer.Visible = true4958 Error.Text = Err or "Invalid key."4959 Busy = false4960 end4961 end4962 4963 task.spawn(function()4964 RunValidate(Key, Finish)4965 end)4966 end4967 4968 SignIn.Activated:Connect(function()4969 Attempt(KeyBox.Text)4970 end)4971 KeyBox.FocusLost:Connect(function(Enter)4972 if Enter then Attempt(KeyBox.Text) end4973 end)4974 4975 local Saved = ReadRememberedKey()4976 if Saved then4977 KeyBox.Text = Saved4978 task.defer(function() Attempt(Saved) end)4979 end4980end4981 4982 4983return Library4984