-- // OpenLua UI Library — dark / orange restyle if getgenv().Library then pcall(function() getgenv().Library:Unload() end) end local Library do local UserInputService = game:GetService("UserInputService") local Players = game:GetService("Players") local Workspace = game:GetService("Workspace") local HttpService = game:GetService("HttpService") local TweenService = game:GetService("TweenService") local RunService = game:GetService("RunService") local CoreGui = cloneref and cloneref(game:GetService("CoreGui")) or game:GetService("CoreGui") gethui = gethui or function() return CoreGui end local LocalPlayer = Players.LocalPlayer local Camera = Workspace.CurrentCamera local Mouse = LocalPlayer:GetMouse() local FromRGB = Color3.fromRGB local FromHSV = Color3.fromHSV local FromHex = Color3.fromHex local RGBSequence = ColorSequence.new local RGBSequenceKeypoint = ColorSequenceKeypoint.new local NumSequence = NumberSequence.new local NumSequenceKeypoint = NumberSequenceKeypoint.new local UDim2New = UDim2.new local UDimNew = UDim.new local Vector2New = Vector2.new local InstanceNew = Instance.new local TweenInfoNew = TweenInfo.new local RectNew = Rect.new local MathClamp, MathFloor, MathAbs, MathSin, MathCos, MathRad = math.clamp, math.floor, math.abs, math.sin, math.cos, math.rad local TableInsert, TableFind, TableRemove, TableConcat, TableClone, TableUnpack = table.insert, table.find, table.remove, table.concat, table.clone, table.unpack local StringFormat, StringFind, StringGSub, StringLower, StringUpper, StringSub = string.format, string.find, string.gsub, string.lower, string.upper, string.sub Library = { Flags = { }, SetFlags = { }, MenuKeybind = tostring(Enum.KeyCode.Z), Tween = { Time = 0.18, Style = Enum.EasingStyle.Quad, Direction = Enum.EasingDirection.Out }, Folders = { Directory = "zoophack", Configs = "zoophack/Configs", Assets = "zoophack/Assets", Themes = "zoophack/Themes" }, Images = { ["Saturation"] = { "Saturation.png", "https://github.com/sametexe001/images/blob/main/saturation.png?raw=true" }, ["Value"] = { "Value.png", "https://github.com/sametexe001/images/blob/main/value.png?raw=true" }, ["Hue"] = { "Hue.png", "https://github.com/sametexe001/images/blob/main/horizontalhue.png?raw=true" }, ["Checkers"] = { "Checkers.png", "https://github.com/sametexe001/images/blob/main/checkers.png?raw=true" }, ["Scrollbar"] = { "Scrollbar.png", "https://github.com/sametexe001/images/blob/main/scrollbar.png?raw=true" }, }, -- named procedural icons can be swapped for image assets here -- e.g. Library.IconImages["Crosshair"] = "rbxassetid://1234567890" IconImages = { }, -- Ignore below Pages = { }, Sections = { }, Connections = { }, Threads = { }, Keybinds = { }, ThemeMap = { }, ThemeItems = { }, Themes = { }, CurrentFrames = { }, ThemeColorpickers = { }, UnnamedConnections = 0, UnnamedFlags = 0, Holder = nil, UnusedHolder = nil, NotifHolder = nil, Font = nil, BoldFont = nil, } local Keys = { ["Unknown"] = "Unknown", ["Backspace"] = "Back", ["Tab"] = "Tab", ["Clear"] = "Clear", ["Return"] = "Return", ["Pause"] = "Pause", ["Escape"] = "Escape", ["Space"] = "Space", ["QuotedDouble"] = '"', ["Hash"] = "#", ["Dollar"] = "$", ["Percent"] = "%", ["Ampersand"] = "&", ["Quote"] = "'", ["LeftParenthesis"] = "(", ["RightParenthesis"] = " )", ["Asterisk"] = "*", ["Plus"] = "+", ["Comma"] = ",", ["Minus"] = "-", ["Period"] = ".", ["Slash"] = "`", ["Three"] = "3", ["Seven"] = "7", ["Eight"] = "8", ["Colon"] = ":", ["Semicolon"] = ";", ["LessThan"] = "<", ["GreaterThan"] = ">", ["Question"] = "?", ["Equals"] = "=", ["At"] = "@", ["LeftBracket"] = "LeftBracket", ["RightBracket"] = "RightBracked", ["BackSlash"] = "BackSlash", ["Caret"] = "^", ["Underscore"] = "_", ["Backquote"] = "`", ["LeftCurly"] = "{", ["Pipe"] = "|", ["RightCurly"] = "}", ["Tilde"] = "~", ["Delete"] = "Delete", ["End"] = "End", ["KeypadZero"] = "Keypad0", ["KeypadOne"] = "Keypad1", ["KeypadTwo"] = "Keypad2", ["KeypadThree"] = "Keypad3", ["KeypadFour"] = "Keypad4", ["KeypadFive"] = "Keypad5", ["KeypadSix"] = "Keypad6", ["KeypadSeven"] = "Keypad7", ["KeypadEight"] = "Keypad8", ["KeypadNine"] = "Keypad9", ["KeypadPeriod"] = "KeypadP", ["KeypadDivide"] = "KeypadD", ["KeypadMultiply"] = "KeypadM", ["KeypadMinus"] = "KeypadM", ["KeypadPlus"] = "KeypadP", ["KeypadEnter"] = "KeypadE", ["KeypadEquals"] = "KeypadE", ["Insert"] = "Insert", ["Home"] = "Home", ["PageUp"] = "PageUp", ["PageDown"] = "PageDown", ["RightShift"] = "RightShift", ["LeftShift"] = "LeftShift", ["RightControl"] = "RightControl", ["LeftControl"] = "LeftControl", ["LeftAlt"] = "LeftAlt", ["RightAlt"] = "RightAlt" } Library.__index = Library Library.Pages.__index = Library.Pages Library.Sections.__index = Library.Sections -- folders + local assets for _, Path in { Library.Folders.Directory, Library.Folders.Configs, Library.Folders.Assets, Library.Folders.Themes } do pcall(function() if not isfolder(Path) then makefolder(Path) end end) end for _, Image in Library.Images do pcall(function() local Path = Library.Folders.Assets .. "/" .. Image[1] if not isfile(Path) then local Data = game:HttpGet(Image[2]) if type(Data) == "string" and #Data > 0 then writefile(Path, Data) end end end) end local AssetCache = { } local Themes = { ["Default"] = { ["Background"] = FromRGB(16, 16, 18), ["Inline"] = FromRGB(21, 22, 25), ["Element"] = FromRGB(31, 32, 37), ["Off"] = FromRGB(58, 59, 65), ["Border"] = FromRGB(38, 39, 45), ["Text"] = FromRGB(255, 255, 255), ["SubText"] = FromRGB(122, 126, 134), ["Image"] = FromRGB(255, 255, 255), ["Accent"] = FromRGB(224, 138, 43), ["Light Accent"] = FromRGB(255, 169, 77), } } Library.Theme = TableClone(Themes["Default"]) Library.Themes = Themes -- Accepts either a raw Instance or an Instances wrapper table local function Raw(Item) if typeof(Item) == "Instance" then return Item elseif type(Item) == "table" then return Item.Instance end return Item end -- Tweening local Tween = { } do Tween.__index = Tween Tween.Create = function(self, Item, Info, Goal, IsRawItem) Item = IsRawItem and Item or Item.Instance Info = Info or TweenInfoNew(Library.Tween.Time, Library.Tween.Style, Library.Tween.Direction) local NewTween = { Tween = TweenService:Create(Item, Info, Goal), Info = Info, Goal = Goal, Item = Item } NewTween.Tween:Play() setmetatable(NewTween, Tween) return NewTween end Tween.Get = function(self) if not self.Tween then return end return self.Tween, self.Info, self.Goal end Tween.Pause = function(self) if not self.Tween then return end self.Tween:Pause() end Tween.Play = function(self) if not self.Tween then return end self.Tween:Play() end Tween.Clean = function(self) if not self.Tween then return end self.Tween:Pause() self = nil end end -- Instances local Instances = { } do Instances.__index = Instances Instances.Create = function(self, Class, Properties) local NewItem = { Instance = InstanceNew(Class), Properties = Properties or { }, Class = Class } setmetatable(NewItem, Instances) for Property, Value in pairs(NewItem.Properties) do if Value ~= nil then NewItem.Instance[Property] = Value end end return NewItem end Instances.AddToTheme = function(self, Properties) if not self.Instance then return end Library:AddToTheme(self, Properties) return self end Instances.ChangeItemTheme = function(self, Properties) if not self.Instance then return end Library:ChangeItemTheme(self, Properties) return self end Instances.Set = function(self, Properties) if not self.Instance then return end for Property, Value in pairs(Properties) do if Value ~= nil then self.Instance[Property] = Value end end return self end Instances.Connect = function(self, Event, Callback, Name) if not self.Instance then return end if not self.Instance[Event] then return end return Library:Connect(self.Instance[Event], Callback, Name) end Instances.Tween = function(self, Info, Goal) if not self.Instance then return end return Tween:Create(self, Info, Goal) end Instances.Disconnect = function(self, Name) if not self.Instance then return end return Library:Disconnect(Name) end Instances.Clean = function(self) if not self.Instance then return end self.Instance:Destroy() self = nil end Instances.MakeDraggable = function(self, Region) if not self.Instance then return end local RawGui = self local Gui = self.Instance local DragRegion = Raw(Region) or Gui local Dragging = false local Armed = false local DragStart, StartPosition local function IsInteractive(Target) local Node = Target while Node and Node ~= DragRegion.Parent do if Node:IsA("TextButton") or Node:IsA("ImageButton") or Node:IsA("TextBox") or Node:IsA("ScrollingFrame") then return true end Node = Node.Parent end return false end local Set = function(Input) local DragDelta = Input.Position - DragStart Gui.Position = UDim2New(StartPosition.X.Scale, StartPosition.X.Offset + DragDelta.X, StartPosition.Y.Scale, StartPosition.Y.Offset + DragDelta.Y) end Library:Connect(DragRegion.InputBegan, function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then Dragging = true Armed = false DragStart = Input.Position StartPosition = Gui.Position RawGui.Debounce = true end end) Library:Connect(DragRegion.InputEnded, function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then Dragging = false Armed = false RawGui.Debounce = false end end) Library:Connect(UserInputService.InputChanged, function(Input) if Input.UserInputType == Enum.UserInputType.MouseMovement or Input.UserInputType == Enum.UserInputType.Touch then if Dragging then if not Armed then local Delta = Input.Position - DragStart if MathAbs(Delta.X) + MathAbs(Delta.Y) < 4 then return end if Input.Target and IsInteractive(Input.Target) then Dragging = false RawGui.Debounce = false return end Armed = true end RawGui.Debounce = true Set(Input) end end end) return Dragging end Instances.MakeResizeable = function(self, Minimum, Maximum) if not self.Instance then return end local RawGui = self local Gui = self.Instance local Resizing = false local Start = UDim2New() local Delta = UDim2New() local ResizeButton = Instances:Create("TextButton", { Parent = Gui, AnchorPoint = Vector2New(1, 1), Size = UDim2New(0, 12, 0, 12), Position = UDim2New(1, 0, 1, 0), Name = "\0", BackgroundTransparency = 1, AutoButtonColor = false, ZIndex = 2000, Visible = true, Text = "" }) ResizeButton:Connect("InputBegan", function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then Resizing = true Start = Gui.Size - UDim2New(0, Input.Position.X, 0, Input.Position.Y) end end) ResizeButton:Connect("InputEnded", function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then Resizing = false end end) Library:Connect(UserInputService.InputChanged, function(Input) if (Input.UserInputType == Enum.UserInputType.MouseMovement or Input.UserInputType == Enum.UserInputType.Touch) and Resizing then local ResizeMax = Maximum or Gui.Parent.AbsoluteSize - Gui.AbsoluteSize Delta = Start + UDim2New(0, Input.Position.X, 0, Input.Position.Y) Delta = UDim2New(0, MathClamp(Delta.X.Offset, Minimum.X, ResizeMax.X), 0, MathClamp(Delta.Y.Offset, Minimum.Y, ResizeMax.Y)) Gui.Size = Delta end end) return Resizing end Instances.OnHover = function(self, Function) if not self.Instance then return end return Library:Connect(self.Instance.MouseEnter, Function) end Instances.OnHoverLeave = function(self, Function) if not self.Instance then return end return Library:Connect(self.Instance.MouseLeave, Function) end end -- Fonts local function SafeAsset(Path) local Ok, Result = pcall(function() return getcustomasset(Path) end) if Ok then return Result end return nil end Library.GetImage = function(self, Image) if AssetCache[Image] then return AssetCache[Image] end local ImageData = self.Images[Image] if not ImageData then return nil end local Path = SafeAsset(self.Folders.Assets .. "/" .. ImageData[1]) if Path then AssetCache[Image] = Path end return Path end local CustomFont = { } do local function Load(Name, Weight, Style, Url) local JsonPath = Library.Folders.Assets .. "/" .. Name .. ".json" local TtfPath = Library.Folders.Assets .. "/" .. Name .. ".ttf" if not isfile(JsonPath) then local Ok = pcall(function() if not isfile(TtfPath) then local Data = game:HttpGet(Url) if type(Data) ~= "string" or #Data == 0 then error("empty font download") end writefile(TtfPath, Data) end local FontData = { name = Name, faces = { { name = "Regular", weight = Weight, style = Style, assetId = getcustomasset(TtfPath) } } } writefile(JsonPath, HttpService:JSONEncode(FontData)) end) if not Ok then return false end end return true end function CustomFont:New(Name, Weight, Style, Data) if Load(Name, Weight, Style, Data.Url) then local Path = SafeAsset(Library.Folders.Assets .. "/" .. Name .. ".json") if Path then local Ok, Face = pcall(function() return Font.new(Path) end) if Ok then return Face end end end return nil end function CustomFont:Get(Name) local Path = SafeAsset(Library.Folders.Assets .. "/" .. Name .. ".json") if not Path then return nil end local Ok, Face = pcall(function() return Font.new(Path) end) if Ok then return Face end return nil end end local function FallbackFont(Weight) local Ok, Face = pcall(function() return Font.new("rbxasset://fonts/families/Roboto.json", Weight) end) if Ok then return Face end return Font.fromEnum(Enum.Font.Gotham) end CustomFont:New("Inter", 200, "Regular", { Url = "https://github.com/sametexe001/luas/raw/refs/heads/main/fonts/Inter.ttf" }) CustomFont:New("InterBold", 200, "Bold", { Url = "https://github.com/sametexe001/luas/raw/refs/heads/main/fonts/InterBold.ttf" }) Library.Font = CustomFont:Get("Inter") or FallbackFont(Enum.FontWeight.Regular) Library.BoldFont = CustomFont:Get("InterBold") or FallbackFont(Enum.FontWeight.Bold) -- Icons (procedural, 16x16 design grid) local Icons = { } do local function Ctx(Holder, Size, Color, ZIndex) local K = Size / 16 local function Add(Class, Props) local Item = InstanceNew(Class) for Property, Value in pairs(Props) do if Value ~= nil then Item[Property] = Value end end Item.Parent = Holder return Item end local function Rect(X, Y, W, H, Radius, Rotation) local Item = Add("Frame", { AnchorPoint = Vector2New(0.5, 0.5), Position = UDim2New(0, X * K, 0, Y * K), Size = UDim2New(0, W * K, 0, H * K), BackgroundColor3 = Color, BorderSizePixel = 0, Rotation = Rotation or 0, ZIndex = ZIndex }) if Radius then Add("UICorner", { CornerRadius = UDimNew(Radius, 0) }) end return Item end local function Ring(X, Y, Diameter, Thickness) local Item = Add("Frame", { AnchorPoint = Vector2New(0.5, 0.5), Position = UDim2New(0, X * K, 0, Y * K), Size = UDim2New(0, Diameter * K, 0, Diameter * K), BackgroundTransparency = 1, BorderSizePixel = 0, ZIndex = ZIndex }) Add("UICorner", { CornerRadius = UDimNew(1, 0) }) Add("UIStroke", { Color = Color, Thickness = (Thickness or 1.4) * K, ApplyStrokeMode = Enum.ApplyStrokeMode.Border }) return Item end local function Oval(X, Y, W, H, Thickness) local Item = Add("Frame", { AnchorPoint = Vector2New(0.5, 0.5), Position = UDim2New(0, X * K, 0, Y * K), Size = UDim2New(0, W * K, 0, H * K), BackgroundTransparency = 1, BorderSizePixel = 0, ZIndex = ZIndex }) Add("UICorner", { CornerRadius = UDimNew(0.5, 0) }) Add("UIStroke", { Color = Color, Thickness = (Thickness or 1.4) * K, ApplyStrokeMode = Enum.ApplyStrokeMode.Border }) return Item end return { Rect = Rect, Ring = Ring, Oval = Oval, K = K } end local Builders = { } Builders["Crosshair"] = function(C) C.Ring(8, 8, 10, 1.4) C.Rect(8, 8, 1.8, 1.8, 1) C.Rect(8, 2.4, 1.4, 2.8, 0.7) C.Rect(8, 13.6, 1.4, 2.8, 0.7) C.Rect(2.4, 8, 2.8, 1.4, 0.7) C.Rect(13.6, 8, 2.8, 1.4, 0.7) end Builders["Eye"] = function(C) C.Oval(8, 8, 15, 9.5, 1.4) C.Rect(8, 8, 4.4, 4.4, 1) end Builders["Globe"] = function(C) C.Ring(8, 8, 13, 1.4) C.Oval(8, 8, 6.4, 13, 1.3) C.Rect(8, 8, 13, 1.4, 0.7) end Builders["Person"] = function(C) C.Ring(8, 5.4, 4.8, 1.4) C.Rect(8, 12.6, 10.6, 6.6, 0.5) end Builders["People"] = function(C) C.Ring(6, 5.6, 4.2, 1.3) C.Rect(6, 12.6, 9, 6.2, 0.5) C.Ring(12.4, 6.4, 3.4, 1.2) C.Rect(12.4, 12, 6.4, 5.2, 0.5) end Builders["Car"] = function(C) C.Rect(8, 9.8, 15, 5, 1.2) C.Rect(8, 6.6, 7.6, 3.6, 1) C.Rect(5, 13, 3, 3, 1) C.Rect(11, 13, 3, 3, 1) end Builders["Settings"] = function(C) for Index = 1, 8 do local Angle = Index * 45 C.Rect(8 + MathCos(MathRad(Angle)) * 6, 8 + MathSin(MathRad(Angle)) * 6, 2.2, 3.6, 1, Angle) end C.Ring(8, 8, 8.6, 1.5) C.Ring(8, 8, 2.4, 1.4) end Builders["Folder"] = function(C) C.Rect(8, 9.4, 14.4, 9.4, 1.6) C.Rect(6.4, 4.4, 6, 3, 0.9) end Builders["Search"] = function(C) C.Ring(7, 7, 10.4, 1.5) C.Rect(12.4, 12.4, 1.6, 5.4, 0.8, -45) end Builders["Keyboard"] = function(C) C.Rect(8, 7.6, 15, 10, 1.6) C.Rect(4.6, 6.4, 1.4, 1.4, 0.7) C.Rect(8, 6.4, 1.4, 1.4, 0.7) C.Rect(11.4, 6.4, 1.4, 1.4, 0.7) C.Rect(8, 9.4, 6.4, 1.3, 0.6) end Builders["Cart"] = function(C) C.Rect(3.4, 4.2, 3.6, 1.4, 0.7, 32) C.Rect(9.2, 9.6, 11.2, 6.6, 1.2) C.Rect(6.8, 13.8, 2.2, 2.2, 1) C.Rect(11.6, 13.8, 2.2, 2.2, 1) end Builders["Check"] = function(C) C.Rect(5.2, 10, 1.8, 4.6, 0.9, 42) C.Rect(9.6, 8.2, 1.8, 9, 0.9, -46) end Builders["Chevron"] = function(C) C.Rect(6.4, 9, 1.5, 4.2, 0.75, 42) C.Rect(9.6, 9, 1.5, 4.2, 0.75, -42) end Builders["Dots"] = function(C) C.Rect(4.6, 8, 1.8, 1.8, 1) C.Rect(8, 8, 1.8, 1.8, 1) C.Rect(11.4, 8, 1.8, 1.8, 1) end Builders["Bolt"] = function(C) C.Rect(8.4, 5.2, 2.4, 7, 0.9, 22) C.Rect(7.6, 10.8, 2.4, 7, 0.9, 22) end Builders["Shield"] = function(C) C.Rect(8, 8, 11, 12, 1.6) C.Ring(8, 8, 5, 1.4) end Builders["Sword"] = function(C) C.Rect(8.4, 7, 1.8, 12, 0.9, 45) C.Rect(4.8, 11.2, 1.6, 5, 0.8, -45) end Builders["Bug"] = function(C) C.Ring(8, 8, 7.4, 1.4) C.Rect(8, 3.6, 1.4, 3, 0.7, -30) C.Rect(8, 3.6, 1.4, 3, 0.7, 30) C.Rect(8, 8, 1.4, 8, 0.7) end function Icons.Draw(Name, Parent, Size, Color) if not Name then return nil end local Image = Library.IconImages[Name] if not Image and (StringFind(tostring(Name), "^%d") or StringFind(tostring(Name), "rbxassetid")) then Image = StringFind(tostring(Name), "rbxassetid") and Name or ("rbxassetid://" .. Name) end if Image then local Label = Instances:Create("ImageLabel", { Parent = Parent, BackgroundTransparency = 1, BorderSizePixel = 0, Size = UDim2New(0, Size, 0, Size), Image = Image, ImageColor3 = Color, ZIndex = (Parent.ZIndex or 1) + 1 }) return Label end local Builder = Builders[Name] if not Builder then Builder = Builders["Dots"] end local Holder = Instances:Create("Frame", { Parent = Parent, BackgroundTransparency = 1, BorderSizePixel = 0, Size = UDim2New(0, Size, 0, Size), ZIndex = (Parent.ZIndex or 1) + 1 }) Builder(Ctx(Holder.Instance, Size, Color, Holder.Instance.ZIndex)) return Holder end function Icons.Set(Name, Builder) Builders[Name] = Builder end Library.Icons = Icons end -- Library (core) Library.Holder = Instances:Create("ScreenGui", { Parent = gethui(), Name = "\0", ZIndexBehavior = Enum.ZIndexBehavior.Global, IgnoreGuiInset = true, ResetOnSpawn = false }) Library.UnusedHolder = Instances:Create("ScreenGui", { Parent = gethui(), Name = "\0", ZIndexBehavior = Enum.ZIndexBehavior.Global, IgnoreGuiInset = true, ResetOnSpawn = false, Enabled = false }) Library.NotifHolder = Instances:Create("Frame", { Parent = Library.Holder.Instance, Name = "\0", BackgroundTransparency = 1, AnchorPoint = Vector2New(1, 1), Position = UDim2New(1, -16, 1, -16), Size = UDim2New(0, 280, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, BorderSizePixel = 0, ZIndex = 5000 }) Instances:Create("UIListLayout", { Parent = Library.NotifHolder.Instance, Padding = UDimNew(0, 8), SortOrder = Enum.SortOrder.LayoutOrder, VerticalAlignment = Enum.VerticalAlignment.Bottom }) Instances:Create("UIPadding", { Parent = Library.NotifHolder.Instance, PaddingLeft = UDimNew(0, 10) }) Library.Holder.Instance:SetAttribute("OpenLuaUI", true) Library.UnusedHolder.Instance:SetAttribute("OpenLuaUI", true) Library.Round = function(self, Number, Float) local Multiplier = 1 / (Float or 1) return MathFloor(Number * Multiplier) / Multiplier end Library.IsMouseOverFrame = function(self, Frame) Frame = Raw(Frame) local AbsolutePosition = Frame.AbsolutePosition local AbsoluteSize = Frame.AbsoluteSize local MouseX, MouseY = Mouse.X, Mouse.Y if MouseY < 0 and UserInputService.TouchEnabled then local Touch = UserInputService:GetMouseLocation() MouseX, MouseY = Touch.X, Touch.Y end if MouseX >= AbsolutePosition.X and MouseX <= AbsolutePosition.X + AbsoluteSize.X and MouseY >= AbsolutePosition.Y and MouseY <= AbsolutePosition.Y + AbsoluteSize.Y then return true end return false end Library.Unload = function(self) for _, Value in self.Connections do pcall(function() Value.Connection:Disconnect() end) end for _, Value in self.Threads do pcall(function() coroutine.close(Value) end) end if self.Holder then self.Holder:Clean() end if self.UnusedHolder then self.UnusedHolder:Clean() end self.Connections = { } self.Threads = { } getgenv().Library = nil Library = nil end Library.Thread = function(self, Function) local NewThread = coroutine.create(Function) coroutine.wrap(function() local Success, Error = coroutine.resume(NewThread) if not Success and Error then warn("[Library] thread error: " .. tostring(Error)) end end)() TableInsert(self.Threads, NewThread) return NewThread end Library.SafeCall = function(self, Function, ...) local Arguments = { ... } local Success, Result = pcall(Function, TableUnpack(Arguments)) if not Success then Library:Notification("Error", tostring(Result), 5) return false end return Success end Library.Connect = function(self, Event, Callback, Name) if not Event or not Callback then return end self.UnnamedConnections += 1 local NewConnection = { Event = Event, Callback = Callback, Name = Name or StringFormat("Connection_%s", self.UnnamedConnections), Connection = nil } NewConnection.Connection = Event:Connect(Callback) TableInsert(self.Connections, NewConnection) return NewConnection end Library.Disconnect = function(self, Name) for _, Connection in self.Connections do if Connection.Name == Name then pcall(function() Connection.Connection:Disconnect() end) break end end end Library.NextFlag = function(self) self.UnnamedFlags += 1 return StringFormat("Flag %s", self.UnnamedFlags) end Library.AddToTheme = function(self, Item, Properties) Item = Raw(Item) local ThemeData = { Item = Item, Properties = Properties, } for Property, Value in pairs(ThemeData.Properties) do if type(Value) == "string" then Item[Property] = self.Theme[Value] or Item[Property] else Item[Property] = Value end end TableInsert(self.ThemeItems, ThemeData) self.ThemeMap[Item] = ThemeData return ThemeData end Library.ChangeItemTheme = function(self, Item, Properties) Item = Raw(Item) local ThemeData = self.ThemeMap[Item] if not ThemeData then return end for Property, Value in pairs(Properties) do ThemeData.Properties[Property] = Value end for Property, Value in pairs(ThemeData.Properties) do if type(Value) == "string" then Item[Property] = self.Theme[Value] or Item[Property] end end end Library.ChangeTheme = function(self, Theme, Color) self.Theme[Theme] = Color for _, Item in self.ThemeItems do if Item.Item and Item.Item.Parent then for Property, Value in pairs(Item.Properties) do if type(Value) == "string" and Value == Theme then Item.Item[Property] = Color end end end end end Library.GetTransparencyPropertyFromItem = function(self, Item) if Item:IsA("Frame") then return {"BackgroundTransparency"} elseif Item:IsA("TextLabel") or Item:IsA("TextButton") or Item:IsA("TextBox") then return { "TextTransparency", "BackgroundTransparency" } elseif Item:IsA("ImageLabel") or Item:IsA("ImageButton") then return { "BackgroundTransparency", "ImageTransparency" } elseif Item:IsA("ScrollingFrame") then return { "BackgroundTransparency", "ScrollBarImageTransparency" } elseif Item:IsA("UIStroke") then return { "Transparency" } end return nil end Library.FadeItem = function(self, Item, Property, Visibility, Speed) local OldTransparency = Item[Property] Item[Property] = Visibility and 1 or OldTransparency local NewTween = Tween:Create(Item, TweenInfoNew(Speed or Library.Tween.Time, Library.Tween.Style, Library.Tween.Direction), { [Property] = Visibility and OldTransparency or 1 }, true) Library:Connect(NewTween.Tween.Completed, function() if not Visibility then task.wait() Item[Property] = OldTransparency end end) return NewTween end Library.Fade = function(self, Gui, Visibility, Speed) Gui = Raw(Gui) if Visibility then Gui.Visible = true end local Descendants = Gui:GetDescendants() TableInsert(Descendants, Gui) local NewTween for _, Value in Descendants do local ValueIndex = Library:GetTransparencyPropertyFromItem(Value) if not ValueIndex then continue end if type(ValueIndex) == "table" then for _, Property in ValueIndex do NewTween = Library:FadeItem(Value, Property, Visibility, Speed) end else NewTween = Library:FadeItem(Value, ValueIndex, Visibility, Speed) end end return NewTween end -- Configs Library.GetConfig = function(self) local Config = { } for Index, Value in self.Flags do if type(Value) == "table" and Value.Key then Config[Index] = { Key = tostring(Value.Key), Mode = Value.Mode, Toggled = Value.Toggled } elseif type(Value) == "table" and Value.Color then Config[Index] = { Color = Value.HexValue, Alpha = Value.Alpha } else Config[Index] = Value end end return HttpService:JSONEncode(Config) end Library.LoadConfig = function(self, Config) local Success, Decoded = pcall(function() return HttpService:JSONDecode(Config) end) if not Success then self:Notification("Error", "Invalid config file", 5) return end for Index, Value in Decoded do local SetFunction = self.SetFlags[Index] if not SetFunction then continue end if type(Value) == "table" and Value.Key then SetFunction(Value) elseif type(Value) == "table" and Value.Color then SetFunction(Value.Color, Value.Alpha) else SetFunction(Value) end end end Library.DeleteConfig = function(self, Config) if not Config then return end local Path = self.Folders.Configs .. "/" .. Config if not StringFind(Config, "%.json$") then Path = Path .. ".json" end local Ok = pcall(function() if isfile(Path) then delfile(Path) end end) if Ok then self:Notification("Config", "Deleted " .. Config, 3) end end Library.SaveConfig = function(self, Config) if not Config or Config == "" then return end local Path = self.Folders.Configs .. "/" .. Config if not StringFind(Config, "%.json$") then Path = Path .. ".json" end local Ok = pcall(writefile, Path, self:GetConfig()) if Ok then self:Notification("Config", "Saved " .. Config, 3) else self:Notification("Error", "Failed to save " .. Config, 3) end end Library.RefreshConfigsList = function(self, Element) local List = { } local Ok, Files = pcall(function() return listfiles(self.Folders.Configs) end) if Ok and Files then for _, Full in Files do local Name = StringGSub(tostring(Full), "^.*[\\/]", "") Name = StringGSub(Name, "%.json$", "") if Name ~= "" then TableInsert(List, Name) end end end if Element then Element:Refresh(List) end return List end -- Notifications Library.Notification = function(self, Text, Description, Duration) Duration = Duration or 4 local Items = { } Items["Notification"] = Instances:Create("Frame", { Parent = Library.NotifHolder.Instance, Name = "\0", Size = UDim2New(1, 0, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, BackgroundColor3 = FromRGB(21, 22, 25), BorderSizePixel = 0, ZIndex = 5001, BackgroundTransparency = 1 }) Items["Notification"]:AddToTheme({ BackgroundColor3 = "Inline" }) Instances:Create("UICorner", { Parent = Items["Notification"].Instance, CornerRadius = UDimNew(0, 6) }) Instances:Create("UIStroke", { Parent = Items["Notification"].Instance, Color = FromRGB(38, 39, 45), ApplyStrokeMode = Enum.ApplyStrokeMode.Border, Transparency = 1 }):AddToTheme({ Color = "Border" }) Items["Accent"] = Instances:Create("Frame", { Parent = Items["Notification"].Instance, Size = UDim2New(0, 2, 1, -16), Position = UDim2New(0, 8, 0, 8), BackgroundColor3 = FromRGB(224, 138, 43), BorderSizePixel = 0, ZIndex = 5002, BackgroundTransparency = 1 }) Items["Accent"]:AddToTheme({ BackgroundColor3 = "Accent" }) Instances:Create("UICorner", { Parent = Items["Accent"].Instance, CornerRadius = UDimNew(1, 0) }) Instances:Create("UIPadding", { Parent = Items["Notification"].Instance, PaddingTop = UDimNew(0, 10), PaddingBottom = UDimNew(0, 10), PaddingLeft = UDimNew(0, 16), PaddingRight = UDimNew(0, 12) }) Instances:Create("UIListLayout", { Parent = Items["Notification"].Instance, Padding = UDimNew(0, 3), SortOrder = Enum.SortOrder.LayoutOrder }) Items["Title"] = Instances:Create("TextLabel", { Parent = Items["Notification"].Instance, FontFace = Library.BoldFont, Text = tostring(Text), Size = UDim2New(1, 0, 0, 15), AutomaticSize = Enum.AutomaticSize.Y, BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, TextYAlignment = Enum.TextYAlignment.Center, TextWrapped = true, TextSize = 13, TextColor3 = FromRGB(255, 255, 255), TextTransparency = 1, BorderSizePixel = 0, ZIndex = 5002, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Title"]:AddToTheme({ TextColor3 = "Text" }) Items["Description"] = Instances:Create("TextLabel", { Parent = Items["Notification"].Instance, FontFace = Library.Font, Text = tostring(Description or ""), Size = UDim2New(1, 0, 0, 15), AutomaticSize = Enum.AutomaticSize.Y, BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, TextYAlignment = Enum.TextYAlignment.Center, TextWrapped = true, TextSize = 12, TextColor3 = FromRGB(122, 126, 134), TextTransparency = 1, BorderSizePixel = 0, ZIndex = 5002, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Description"]:AddToTheme({ TextColor3 = "SubText" }) local FadeItems = { Items["Notification"].Instance, Items["Accent"].Instance, Items["Title"].Instance, Items["Description"].Instance } local function SetTransparency(Value, Speed) for _, Item in FadeItems do local Props = Library:GetTransparencyPropertyFromItem(Item) for _, Property in Props do if Property == "BackgroundTransparency" and Item ~= Items["Notification"].Instance and Item ~= Items["Accent"].Instance then continue end Tween:Create(Item, TweenInfoNew(Speed or 0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { [Property] = Value }, true) end end end SetTransparency(0, 0.2) task.delay(Duration, function() SetTransparency(1, 0.25) task.wait(0.3) pcall(function() Items["Notification"]:Clean() end) end) return Items["Notification"] end -- Colorpicker Library.CreateColorpicker = function(self, Data) Data = Data or { } local Colorpicker = { Window = Data.Window, Tab = Data.Tab, Section = Data.Section, Flag = Data.Flag, Hue = 0, Saturation = 0, Value = 0, Alpha = 0, Color = FromRGB(255, 255, 255), HexValue = "", IsOpen = false, } Library.Flags[Colorpicker.Flag] = { } local Items = { } Items["Button"] = Instances:Create("TextButton", { Parent = Data.Parent.Instance, Text = "", Name = "\0", AutoButtonColor = false, AnchorPoint = Vector2New(1, 0.5), Position = UDim2New(1, Data.Offset or 0, 0.5, 0), Size = UDim2New(0, 20, 0, 20), ZIndex = 6, BorderSizePixel = 0, BackgroundColor3 = Data.Default or FromRGB(255, 255, 255) }) Instances:Create("UICorner", { Parent = Items["Button"].Instance, CornerRadius = UDimNew(0, 4) }) Instances:Create("UIStroke", { Parent = Items["Button"].Instance, Color = FromRGB(38, 39, 45), ApplyStrokeMode = Enum.ApplyStrokeMode.Border }):AddToTheme({ Color = "Border" }) local function Place(Parent, Offset) local X = (Parent.AbsolutePosition.X + Parent.AbsoluteSize.X) + 10 local Y = Parent.AbsolutePosition.Y + (Offset or 0) local Viewport = Camera.ViewportSize X = MathClamp(X, 8, Viewport.X - 246) Y = MathClamp(Y, 8, Viewport.Y - 220) return UDim2New(0, X, 0, Y) end Items["Window"] = Instances:Create("Frame", { Parent = Library.Holder.Instance, Name = "\0", Position = UDim2New(0, 0, 0, 0), Size = UDim2New(0, 236, 0, 210), Visible = false, ZIndex = 3000, BorderSizePixel = 0, BackgroundColor3 = FromRGB(16, 16, 18) }) Items["Window"]:AddToTheme({ BackgroundColor3 = "Background" }) Instances:Create("UICorner", { Parent = Items["Window"].Instance, CornerRadius = UDimNew(0, 6) }) Instances:Create("UIStroke", { Parent = Items["Window"].Instance, Color = FromRGB(38, 39, 45), ApplyStrokeMode = Enum.ApplyStrokeMode.Border }):AddToTheme({ Color = "Border" }) Items["Palette"] = Instances:Create("TextButton", { Parent = Items["Window"].Instance, Text = "", Name = "\0", AutoButtonColor = false, Position = UDim2New(0, 10, 0, 10), Size = UDim2New(1, -20, 0, 118), ZIndex = 3001, BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 0, 0) }) Instances:Create("UICorner", { Parent = Items["Palette"].Instance, CornerRadius = UDimNew(0, 5) }) Items["SaturationLayer"] = Instances:Create("Frame", { Parent = Items["Palette"].Instance, Size = UDim2New(1, 0, 1, 0), BackgroundColor3 = FromRGB(255, 255, 255), BorderSizePixel = 0, ZIndex = 3002 }) Instances:Create("UICorner", { Parent = Items["SaturationLayer"].Instance, CornerRadius = UDimNew(0, 5) }) Instances:Create("UIGradient", { Parent = Items["SaturationLayer"].Instance, Transparency = NumSequence { NumSequenceKeypoint(0, 0), NumSequenceKeypoint(1, 1) } }) Items["ValueLayer"] = Instances:Create("Frame", { Parent = Items["Palette"].Instance, Size = UDim2New(1, 0, 1, 0), BackgroundColor3 = FromRGB(0, 0, 0), BorderSizePixel = 0, ZIndex = 3003 }) Instances:Create("UICorner", { Parent = Items["ValueLayer"].Instance, CornerRadius = UDimNew(0, 5) }) Instances:Create("UIGradient", { Parent = Items["ValueLayer"].Instance, Transparency = NumSequence { NumSequenceKeypoint(0, 1), NumSequenceKeypoint(1, 0) } }) Items["PaletteDragger"] = Instances:Create("Frame", { Parent = Items["Palette"].Instance, Name = "\0", BackgroundTransparency = 1, Position = UDim2New(0, 10, 0, 10), Size = UDim2New(0, 10, 0, 10), AnchorPoint = Vector2New(0.5, 0.5), ZIndex = 3005, BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UIStroke", { Parent = Items["PaletteDragger"].Instance, Color = FromRGB(255, 255, 255), Thickness = 2, ApplyStrokeMode = Enum.ApplyStrokeMode.Border }) Instances:Create("UICorner", { Parent = Items["PaletteDragger"].Instance, CornerRadius = UDimNew(1, 0) }) Items["Hue"] = Instances:Create("ImageButton", { Parent = Items["Window"].Instance, Name = "\0", AutoButtonColor = false, Position = UDim2New(0, 10, 0, 138), Size = UDim2New(1, -20, 0, 12), ZIndex = 3001, BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255), Image = self:GetImage("Hue") }) Instances:Create("UIGradient", { Parent = Items["Hue"].Instance, Color = RGBSequence { RGBSequenceKeypoint(0, FromRGB(255, 0, 0)), RGBSequenceKeypoint(0.17, FromRGB(255, 255, 0)), RGBSequenceKeypoint(0.33, FromRGB(0, 255, 0)), RGBSequenceKeypoint(0.5, FromRGB(0, 255, 255)), RGBSequenceKeypoint(0.67, FromRGB(0, 0, 255)), RGBSequenceKeypoint(0.83, FromRGB(255, 0, 255)), RGBSequenceKeypoint(1, FromRGB(255, 0, 0)) } }) Instances:Create("UICorner", { Parent = Items["Hue"].Instance, CornerRadius = UDimNew(1, 0) }) Items["HueDragger"] = Instances:Create("Frame", { Parent = Items["Hue"].Instance, Name = "\0", BackgroundTransparency = 1, Position = UDim2New(0, 6, 0.5, 0), Size = UDim2New(0, 12, 0, 12), AnchorPoint = Vector2New(0.5, 0.5), ZIndex = 3005, BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UIStroke", { Parent = Items["HueDragger"].Instance, Color = FromRGB(255, 255, 255), Thickness = 2, ApplyStrokeMode = Enum.ApplyStrokeMode.Border }) Instances:Create("UICorner", { Parent = Items["HueDragger"].Instance, CornerRadius = UDimNew(1, 0) }) Items["Alpha"] = Instances:Create("ImageButton", { Parent = Items["Window"].Instance, Name = "\0", AutoButtonColor = false, Position = UDim2New(0, 10, 0, 158), Size = UDim2New(1, -20, 0, 12), ZIndex = 3001, BorderSizePixel = 0, BackgroundColor3 = FromRGB(70, 71, 78), Image = self:GetImage("Checkers") }) Instances:Create("UICorner", { Parent = Items["Alpha"].Instance, CornerRadius = UDimNew(1, 0) }) Items["AlphaLayer"] = Instances:Create("Frame", { Parent = Items["Alpha"].Instance, Size = UDim2New(1, 0, 1, 0), BackgroundColor3 = FromRGB(255, 255, 255), BorderSizePixel = 0, ZIndex = 3002 }) Instances:Create("UICorner", { Parent = Items["AlphaLayer"].Instance, CornerRadius = UDimNew(1, 0) }) Instances:Create("UIGradient", { Parent = Items["AlphaLayer"].Instance, Transparency = NumSequence { NumSequenceKeypoint(0, 1), NumSequenceKeypoint(1, 0) } }) Items["AlphaDragger"] = Instances:Create("Frame", { Parent = Items["Alpha"].Instance, Name = "\0", BackgroundTransparency = 1, Position = UDim2New(0, 6, 0.5, 0), Size = UDim2New(0, 12, 0, 12), AnchorPoint = Vector2New(0.5, 0.5), ZIndex = 3005, BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UIStroke", { Parent = Items["AlphaDragger"].Instance, Color = FromRGB(255, 255, 255), Thickness = 2, ApplyStrokeMode = Enum.ApplyStrokeMode.Border }) Instances:Create("UICorner", { Parent = Items["AlphaDragger"].Instance, CornerRadius = UDimNew(1, 0) }) Items["Rainbow"] = Instances:Create("TextButton", { Parent = Items["Window"].Instance, Name = "\0", Text = "", AutoButtonColor = false, Position = UDim2New(0, 10, 0, 180), Size = UDim2New(1, -20, 0, 18), BackgroundTransparency = 1, ZIndex = 3001, BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["RainbowText"] = Instances:Create("TextLabel", { Parent = Items["Rainbow"].Instance, FontFace = Library.Font, Text = "Rainbow", Name = "\0", TextSize = 13, TextColor3 = FromRGB(122, 126, 134), BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, Size = UDim2New(1, 0, 1, 0), BorderSizePixel = 0, ZIndex = 3002, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["RainbowText"]:AddToTheme({ TextColor3 = "SubText" }) Items["RainbowTrack"] = Instances:Create("Frame", { Parent = Items["Rainbow"].Instance, AnchorPoint = Vector2New(1, 0.5), Position = UDim2New(1, 0, 0.5, 0), Size = UDim2New(0, 32, 0, 16), BackgroundColor3 = FromRGB(58, 59, 65), BorderSizePixel = 0, ZIndex = 3002 }) Items["RainbowTrack"]:AddToTheme({ BackgroundColor3 = "Off" }) Instances:Create("UICorner", { Parent = Items["RainbowTrack"].Instance, CornerRadius = UDimNew(1, 0) }) Items["RainbowKnob"] = Instances:Create("Frame", { Parent = Items["RainbowTrack"].Instance, AnchorPoint = Vector2New(0, 0.5), Position = UDim2New(0, 2, 0.5, 0), Size = UDim2New(0, 12, 0, 12), BackgroundColor3 = FromRGB(140, 143, 150), BorderSizePixel = 0, ZIndex = 3003 }) Instances:Create("UICorner", { Parent = Items["RainbowKnob"].Instance, CornerRadius = UDimNew(1, 0) }) local SlidingPalette = false local SlidingHue = false local SlidingAlpha = false local Debounce = false local IsRainbow = false local OnRainbowToggled local SetRainbow = function(Bool) IsRainbow = Bool Library.Flags[Data.Flag .. "RainbowToggle"] = IsRainbow Items["RainbowTrack"]:ChangeItemTheme({ BackgroundColor3 = Bool and "Accent" or "Off" }) Items["RainbowKnob"]:Tween(nil, { Position = Bool and UDim2New(0, 18, 0.5, 0) or UDim2New(0, 2, 0.5, 0), BackgroundColor3 = Bool and Library.Theme.Text or FromRGB(140, 143, 150) }) Items["RainbowText"]:ChangeItemTheme({ TextColor3 = Bool and "Text" or "SubText" }) if OnRainbowToggled then OnRainbowToggled(IsRainbow) end end Items["Rainbow"]:Connect("MouseButton1Down", function() SetRainbow(not IsRainbow) end) Library.SetFlags[Data.Flag .. "RainbowToggle"] = SetRainbow function Colorpicker:SlidePalette(Input) if not Input or not SlidingPalette then return end local Palette = Items["Palette"].Instance self.Saturation = MathClamp((Input.Position.X - Palette.AbsolutePosition.X) / Palette.AbsoluteSize.X, 0, 1) self.Value = MathClamp(1 - (Input.Position.Y - Palette.AbsolutePosition.Y) / Palette.AbsoluteSize.Y, 0, 1) Items["PaletteDragger"]:Tween(TweenInfoNew(0.12, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Position = UDim2New(self.Saturation, 0, 1 - self.Value, 0) }) self:Update() end function Colorpicker:SlideHue(Input) if not Input or not SlidingHue then return end local Hue = Items["Hue"].Instance self.Hue = MathClamp((Input.Position.X - Hue.AbsolutePosition.X) / Hue.AbsoluteSize.X, 0, 1) Items["HueDragger"]:Tween(TweenInfoNew(0.12, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Position = UDim2New(self.Hue, 0, 0.5, 0) }) self:Update() end function Colorpicker:SlideAlpha(Input) if not Input or not SlidingAlpha then return end local Alpha = Items["Alpha"].Instance self.Alpha = MathClamp((Input.Position.X - Alpha.AbsolutePosition.X) / Alpha.AbsoluteSize.X, 0, 1) Items["AlphaDragger"]:Tween(TweenInfoNew(0.12, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Position = UDim2New(self.Alpha, 0, 0.5, 0) }) self:Update(true) end function Colorpicker:Update(IsFromAlpha) self.Color = FromHSV(self.Hue, self.Saturation, self.Value) self.HexValue = self.Color:ToHex() Library.Flags[Data.Flag] = { Color = self.Color, HexValue = self.HexValue, Alpha = self.Alpha } Items["Palette"]:Tween(TweenInfoNew(0.12, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { BackgroundColor3 = FromHSV(self.Hue, 1, 1) }) if not IsFromAlpha then Items["AlphaLayer"]:Tween(TweenInfoNew(0.12, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { BackgroundColor3 = self.Color }) end if Data.Callback then Library:SafeCall(Data.Callback, self.Color, self.Alpha) end end function Colorpicker:Set(Color, Alpha) if type(Color) == "table" then Alpha = Color[4] or Alpha Color = FromRGB(Color[1], Color[2], Color[3]) elseif type(Color) == "string" then Color = FromHex(Color) end if typeof(Color) ~= "Color3" then return end self.Hue, self.Saturation, self.Value = Color:ToHSV() self.Alpha = Alpha or 0 Items["PaletteDragger"]:Tween(TweenInfoNew(0.12, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Position = UDim2New(self.Saturation, 0, 1 - self.Value, 0) }) Items["HueDragger"]:Tween(TweenInfoNew(0.12, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Position = UDim2New(self.Hue, 0, 0.5, 0) }) Items["AlphaDragger"]:Tween(TweenInfoNew(0.12, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Position = UDim2New(self.Alpha, 0, 0.5, 0) }) Items["Button"]:Tween(TweenInfoNew(0.12, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { BackgroundColor3 = Color }) self:Update() end function Colorpicker:Get() return self.Color, self.Alpha end function Colorpicker:SetVisibility(Bool) Items["Button"].Instance.Visible = Bool end function Colorpicker:SetOpen(Bool) if Debounce then return end Colorpicker.IsOpen = Bool Debounce = true if Bool then Items["Window"].Instance.Position = Place(Items["Button"].Instance, -30) end local NewTween = Library:Fade(Items["Window"].Instance, Bool, Colorpicker.Window and Colorpicker.Window.FadeSpeed or 0.15) if NewTween then Library:Connect(NewTween.Tween.Completed, function() Debounce = false Items["Window"].Instance.Visible = Bool end) else Debounce = false Items["Window"].Instance.Visible = Bool end end local OldColor = Colorpicker.Color OnRainbowToggled = function(Bool) if Bool then OldColor = Colorpicker.Color Library:Thread(function() while task.wait() do if not IsRainbow then Colorpicker:Set(OldColor, Colorpicker.Alpha) break end local RainbowHue = MathAbs(MathSin(tick() * 0.32)) Colorpicker:Set(FromHSV(RainbowHue, 1, 1), Colorpicker.Alpha) end end) end end Items["Palette"]:Connect("InputBegan", function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then SlidingPalette = true Colorpicker:SlidePalette(Input) Input.Changed:Connect(function() if Input.UserInputState == Enum.UserInputState.End then SlidingPalette = false end end) end end) Items["Hue"]:Connect("InputBegan", function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then SlidingHue = true Colorpicker:SlideHue(Input) Input.Changed:Connect(function() if Input.UserInputState == Enum.UserInputState.End then SlidingHue = false end end) end end) Items["Alpha"]:Connect("InputBegan", function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then SlidingAlpha = true Colorpicker:SlideAlpha(Input) Input.Changed:Connect(function() if Input.UserInputState == Enum.UserInputState.End then SlidingAlpha = false end end) end end) Items["Button"]:Connect("MouseButton1Down", function() Colorpicker:SetOpen(not Colorpicker.IsOpen) end) Library:Connect(UserInputService.InputChanged, function(Input) if Input.UserInputType == Enum.UserInputType.MouseMovement or Input.UserInputType == Enum.UserInputType.Touch then if SlidingPalette then Colorpicker:SlidePalette(Input) elseif SlidingHue then Colorpicker:SlideHue(Input) elseif SlidingAlpha then Colorpicker:SlideAlpha(Input) end end end) Library:Connect(UserInputService.InputBegan, function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 and Colorpicker.IsOpen and not Library:IsMouseOverFrame(Items["Window"].Instance) and not Library:IsMouseOverFrame(Items["Button"].Instance) then Colorpicker:SetOpen(false) end end) if Data.Default then Colorpicker:Set(Data.Default, Data.Alpha) else Colorpicker:Update() end Library.SetFlags[Data.Flag] = function(Color, Alpha) Colorpicker:Set(Color, Alpha) end return Colorpicker end -- Icon painting helper local function PaintIcon(Icon, Color) if not Icon then return end if Icon.Instance and Icon.Instance:IsA("ImageLabel") then Icon:Tween(TweenInfoNew(0.12, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { ImageColor3 = Color }) elseif Icon.Instance then for _, Part in Icon.Instance:GetDescendants() do if Part:IsA("Frame") then Part.BackgroundColor3 = Color elseif Part:IsA("UIStroke") then Part.Color = Color end end end end -- Window Library.Window = function(self, Data) Data = Data or { } local Window = { Logo = Data.Logo or Data.logo or "Cart", Title = Data.Title or Data.title or "UI Market", Size = Data.Size or Data.size or UDim2New(0, 800, 0, 520), FadeSpeed = Data.FadeSpeed or Data.fadespeed or 0.16, SidebarWidth = Data.SidebarWidth or Data.sidebarwidth or 182, User = Data.User or Data.user or (LocalPlayer and LocalPlayer.Name or "Player"), Pages = { }, SubPages = { }, Items = { }, ActivePage = nil, IsOpen = false } local Items = { } do Items["MainFrame"] = Instances:Create("Frame", { Parent = Library.Holder.Instance, Name = "\0", AnchorPoint = Vector2New(0.5, 0.5), Position = UDim2New(0.5, 0, 0.5, 0), Size = Window.Size, Visible = false, ZIndex = 2, BorderSizePixel = 0, BackgroundColor3 = FromRGB(16, 16, 18) }) Items["MainFrame"]:AddToTheme({ BackgroundColor3 = "Background" }) Instances:Create("UICorner", { Parent = Items["MainFrame"].Instance, CornerRadius = UDimNew(0, 8) }) Instances:Create("UIStroke", { Parent = Items["MainFrame"].Instance, Color = FromRGB(38, 39, 45), ApplyStrokeMode = Enum.ApplyStrokeMode.Border, Transparency = 0.25 }):AddToTheme({ Color = "Border" }) Items["Shadow"] = Instances:Create("ImageLabel", { Parent = Items["MainFrame"].Instance, ImageColor3 = FromRGB(0, 0, 0), ImageTransparency = 0.6, AnchorPoint = Vector2New(0.5, 0.5), Image = "rbxassetid://112971167999062", ZIndex = 1, BorderSizePixel = 0, SliceCenter = RectNew(Vector2New(112, 112), Vector2New(147, 147)), ScaleType = Enum.ScaleType.Slice, BackgroundTransparency = 1, Position = UDim2New(0.5, 0, 0.5, 0), SliceScale = 0.6, Name = "\0", Size = UDim2New(1, 40, 1, 40), BackgroundColor3 = FromRGB(255, 255, 255) }) -- Sidebar Items["Sidebar"] = Instances:Create("Frame", { Parent = Items["MainFrame"].Instance, Name = "\0", Size = UDim2New(0, Window.SidebarWidth, 1, 0), BackgroundTransparency = 1, BorderSizePixel = 0, ZIndex = 3, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["SidebarLine"] = Instances:Create("Frame", { Parent = Items["Sidebar"].Instance, Name = "\0", Size = UDim2New(0, 1, 1, -20), Position = UDim2New(1, -1, 0, 10), BackgroundColor3 = FromRGB(38, 39, 45), BorderSizePixel = 0, ZIndex = 3 }) Items["SidebarLine"]:AddToTheme({ BackgroundColor3 = "Border" }) Items["Logo"] = Instances:Create("Frame", { Parent = Items["Sidebar"].Instance, Name = "\0", BackgroundTransparency = 1, Size = UDim2New(1, 0, 0, 52), BorderSizePixel = 0, ZIndex = 4, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["LogoIcon"] = Instances:Create("Frame", { Parent = Items["Logo"].Instance, Name = "\0", BackgroundTransparency = 1, AnchorPoint = Vector2New(0, 0.5), Position = UDim2New(0, 18, 0.5, 0), Size = UDim2New(0, 16, 0, 16), BorderSizePixel = 0, ZIndex = 5, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["LogoText"] = Instances:Create("TextLabel", { Parent = Items["Logo"].Instance, FontFace = Library.BoldFont, Text = Window.Title, Name = "\0", TextSize = 15, TextColor3 = FromRGB(255, 255, 255), BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, AnchorPoint = Vector2New(0, 0.5), Position = UDim2New(0, 42, 0.5, 1), Size = UDim2New(1, -50, 0, 20), BorderSizePixel = 0, ZIndex = 5, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["LogoText"]:AddToTheme({ TextColor3 = "Text" }) Items["LogoLine"] = Instances:Create("Frame", { Parent = Items["Logo"].Instance, Name = "\0", Size = UDim2New(1, 0, 0, 1), Position = UDim2New(0, 0, 1, 0), BackgroundColor3 = FromRGB(38, 39, 45), BorderSizePixel = 0, ZIndex = 3 }) Items["LogoLine"]:AddToTheme({ BackgroundColor3 = "Border" }) Icons.Draw(Window.Logo, Items["LogoIcon"].Instance, 16, Library.Theme.Text) Items["Pages"] = Instances:Create("ScrollingFrame", { Parent = Items["Sidebar"].Instance, Name = "\0", BackgroundTransparency = 1, Position = UDim2New(0, 0, 0, 52), Size = UDim2New(1, 0, 1, -118), CanvasSize = UDim2New(0, 0, 0, 0), AutomaticCanvasSize = Enum.AutomaticSize.Y, ScrollBarThickness = 0, BorderSizePixel = 0, ZIndex = 4, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UIPadding", { Parent = Items["Pages"].Instance, PaddingTop = UDimNew(0, 10), PaddingBottom = UDimNew(0, 10), PaddingRight = UDimNew(0, 10), PaddingLeft = UDimNew(0, 10) }) Instances:Create("UIListLayout", { Parent = Items["Pages"].Instance, Padding = UDimNew(0, 4), SortOrder = Enum.SortOrder.LayoutOrder }) Items["Footer"] = Instances:Create("Frame", { Parent = Items["Sidebar"].Instance, Name = "\0", BackgroundTransparency = 1, AnchorPoint = Vector2New(0, 1), Position = UDim2New(0, 0, 1, 0), Size = UDim2New(1, 0, 0, 66), BorderSizePixel = 0, ZIndex = 4, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("Frame", { Parent = Items["Footer"].Instance, Name = "\0", Size = UDim2New(1, 0, 0, 1), Position = UDim2New(0, 0, 0, 0), BackgroundColor3 = FromRGB(38, 39, 45), BorderSizePixel = 0, ZIndex = 3 }):AddToTheme({ BackgroundColor3 = "Border" }) Items["Avatar"] = Instances:Create("ImageLabel", { Parent = Items["Footer"].Instance, Name = "\0", BackgroundTransparency = 1, AnchorPoint = Vector2New(0, 0.5), Position = UDim2New(0, 16, 0.5, 1), Size = UDim2New(0, 28, 0, 28), Image = "", ScaleType = Enum.ScaleType.Fit, BorderSizePixel = 0, ZIndex = 5, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UICorner", { Parent = Items["Avatar"].Instance, CornerRadius = UDimNew(1, 0) }) pcall(function() Items["Avatar"].Instance.Image = Players:GetUserThumbnailAsync(LocalPlayer.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size100x100) end) Items["UserName"] = Instances:Create("TextLabel", { Parent = Items["Footer"].Instance, FontFace = Library.BoldFont, Text = Window.User, Name = "\0", TextSize = 13, TextColor3 = FromRGB(255, 255, 255), BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, TextTruncate = Enum.TextTruncate.AtEnd, AnchorPoint = Vector2New(0, 0.5), Position = UDim2New(0, 54, 0.5, -8), Size = UDim2New(1, -62, 0, 16), BorderSizePixel = 0, ZIndex = 5, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["UserName"]:AddToTheme({ TextColor3 = "Text" }) Items["UserDate"] = Instances:Create("TextLabel", { Parent = Items["Footer"].Instance, FontFace = Library.Font, Text = "Since " .. os.date("%d.%m.%Y"), Name = "\0", TextSize = 11, TextColor3 = FromRGB(122, 126, 134), BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, AnchorPoint = Vector2New(0, 0.5), Position = UDim2New(0, 54, 0.5, 9), Size = UDim2New(1, -62, 0, 14), BorderSizePixel = 0, ZIndex = 5, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["UserDate"]:AddToTheme({ TextColor3 = "SubText" }) -- Content Items["Content"] = Instances:Create("Frame", { Parent = Items["MainFrame"].Instance, Name = "\0", BackgroundTransparency = 1, Position = UDim2New(0, Window.SidebarWidth, 0, 0), Size = UDim2New(1, -Window.SidebarWidth, 1, 0), ClipsDescendants = true, BorderSizePixel = 0, ZIndex = 3, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Header"] = Instances:Create("Frame", { Parent = Items["Content"].Instance, Name = "\0", BackgroundTransparency = 1, Size = UDim2New(1, 0, 0, 62), BorderSizePixel = 0, ZIndex = 5, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Tabs"] = Instances:Create("Frame", { Parent = Items["Header"].Instance, Name = "\0", BackgroundTransparency = 1, Position = UDim2New(0, 18, 0, 0), Size = UDim2New(1, -190, 1, 0), ClipsDescendants = true, BorderSizePixel = 0, ZIndex = 5, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UIListLayout", { Parent = Items["Tabs"].Instance, Padding = UDimNew(0, 6), FillDirection = Enum.FillDirection.Horizontal, VerticalAlignment = Enum.VerticalAlignment.Center, SortOrder = Enum.SortOrder.LayoutOrder }) Items["HeaderRight"] = Instances:Create("Frame", { Parent = Items["Header"].Instance, Name = "\0", BackgroundTransparency = 1, AnchorPoint = Vector2New(1, 0.5), Position = UDim2New(1, -16, 0.5, 0), Size = UDim2New(0, 340, 0, 36), BorderSizePixel = 0, ZIndex = 5, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UIListLayout", { Parent = Items["HeaderRight"].Instance, Padding = UDimNew(0, 8), FillDirection = Enum.FillDirection.Horizontal, HorizontalAlignment = Enum.HorizontalAlignment.Right, VerticalAlignment = Enum.VerticalAlignment.Center, SortOrder = Enum.SortOrder.LayoutOrder }) Items["HeaderLine"] = Instances:Create("Frame", { Parent = Items["Content"].Instance, Name = "\0", Size = UDim2New(1, 0, 0, 1), Position = UDim2New(0, 0, 0, 62), BackgroundColor3 = FromRGB(38, 39, 45), BorderSizePixel = 0, ZIndex = 5 }) Items["HeaderLine"]:AddToTheme({ BackgroundColor3 = "Border" }) Items["Body"] = Instances:Create("ScrollingFrame", { Parent = Items["Content"].Instance, Name = "\0", BackgroundTransparency = 1, Position = UDim2New(0, 0, 0, 63), Size = UDim2New(1, 0, 1, -63), CanvasSize = UDim2New(0, 0, 0, 0), AutomaticCanvasSize = Enum.AutomaticSize.Y, ScrollingDirection = Enum.ScrollingDirection.Y, ScrollBarThickness = 4, ScrollBarImageColor3 = FromRGB(224, 138, 43), ScrollBarImageTransparency = 0.1, MidImage = Library:GetImage("Scrollbar"), TopImage = Library:GetImage("Scrollbar"), BottomImage = Library:GetImage("Scrollbar"), BorderSizePixel = 0, ClipsDescendants = true, ZIndex = 4, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Body"]:AddToTheme({ ScrollBarImageColor3 = "Accent" }) end local SearchBox local function HeaderButton(IconName, Callback, Order) local Button = Instances:Create("TextButton", { Parent = Items["HeaderRight"].Instance, Name = "\0", Text = "", AutoButtonColor = false, Size = UDim2New(0, 36, 0, 36), BackgroundColor3 = FromRGB(31, 32, 37), BorderSizePixel = 0, LayoutOrder = Order or 0, ZIndex = 6, }) Button:AddToTheme({ BackgroundColor3 = "Element" }) Instances:Create("UICorner", { Parent = Button.Instance, CornerRadius = UDimNew(0, 8) }) local Stroke = Instances:Create("UIStroke", { Parent = Button.Instance, Color = FromRGB(38, 39, 45), ApplyStrokeMode = Enum.ApplyStrokeMode.Border, Transparency = 0.4 }) Stroke:AddToTheme({ Color = "Border" }) local Icon = Icons.Draw(IconName, Button.Instance, 16, Library.Theme.SubText) local function SetIcon(Color) PaintIcon(Icon, Color) end if Icon and Icon.Instance then Icon.Instance.AnchorPoint = Vector2New(0.5, 0.5) Icon.Instance.Position = UDim2New(0.5, 0, 0.5, 0) else Icon.AnchorPoint = Vector2New(0.5, 0.5) Icon.Position = UDim2New(0.5, 0, 0.5, 0) Icon.Size = UDim2New(0, 16, 0, 16) end Button:Connect("MouseEnter", function() Button:ChangeItemTheme({ BackgroundColor3 = "Inline" }) SetIcon(Library.Theme.Text) end) Button:Connect("MouseLeave", function() Button:ChangeItemTheme({ BackgroundColor3 = "Element" }) SetIcon(Library.Theme.SubText) end) Button:Connect("MouseButton1Down", function() Library:SafeCall(Callback) end) return Button, SetIcon end SearchBox = Instances:Create("TextBox", { Parent = Items["HeaderRight"].Instance, Name = "\0", Text = "", PlaceholderText = "Search", PlaceholderColor3 = FromRGB(122, 126, 134), FontFace = Library.Font, TextSize = 12, TextColor3 = FromRGB(255, 255, 255), ClearTextOnFocus = false, TextXAlignment = Enum.TextXAlignment.Left, Size = UDim2New(0, 170, 0, 32), BackgroundColor3 = FromRGB(21, 22, 25), BorderSizePixel = 0, Visible = false, LayoutOrder = -1, ZIndex = 6 }) SearchBox:AddToTheme({ BackgroundColor3 = "Inline", TextColor3 = "Text" }) Instances:Create("UICorner", { Parent = SearchBox.Instance, CornerRadius = UDimNew(0, 8) }) Instances:Create("UIStroke", { Parent = SearchBox.Instance, Color = FromRGB(38, 39, 45), ApplyStrokeMode = Enum.ApplyStrokeMode.Border }):AddToTheme({ Color = "Border" }) Instances:Create("UIPadding", { Parent = SearchBox.Instance, PaddingLeft = UDimNew(0, 10), PaddingRight = UDimNew(0, 10) }) local ActiveSearch = nil local function RunSearch(Query) Query = StringLower(Query or "") if not ActiveSearch or not ActiveSearch.SearchItems then return end for _, Value in ActiveSearch.SearchItems do local Element = Value.Element local Row = Element.Instance and Element.Instance.Parent or nil if Query == "" then if Row then Row.Visible = true end Element:ChangeItemTheme({ TextColor3 = "Text" }) else local IsMatch = StringFind(StringLower(Value.Name or ""), Query, 1, true) ~= nil if Row then Row.Visible = IsMatch end Element:ChangeItemTheme({ TextColor3 = IsMatch and "Accent" or "SubText" }) end end end SearchBox.Instance:GetPropertyChangedSignal("Text"):Connect(function() RunSearch(SearchBox.Instance.Text) end) local SearchButton, SetSearchIcon = HeaderButton("Search", function() SearchBox.Instance.Visible = not SearchBox.Instance.Visible if not SearchBox.Instance.Visible then SearchBox.Instance.Text = "" RunSearch("") else pcall(function() SearchBox.Instance:CaptureFocus() end) end end, 1) HeaderButton("Keyboard", function() Window:KeybindList() end, 2) HeaderButton("Settings", function() Window:SettingsPanel() end, 3) Items["SearchButton"] = SearchButton Window.Items = Items Window.SearchBox = SearchBox Window.RunSearch = function(Self, Query) RunSearch(Query) end Window.SetActiveSearch = function(Self, SubPage) ActiveSearch = SubPage RunSearch(Items and SearchBox.Instance.Text or "") end Items["MainFrame"]:MakeDraggable() Items["MainFrame"]:MakeResizeable(Vector2New(Window.Size.X.Offset, Window.Size.Y.Offset), Vector2New(3000, 3000)) local Debounce = false function Window:SetOpen(Bool) if Debounce then return end Window.IsOpen = Bool Debounce = true if Bool then Items["MainFrame"].Instance.Visible = true end local Descendants = Items["MainFrame"].Instance:GetDescendants() TableInsert(Descendants, Items["MainFrame"].Instance) local NewTween for _, Value in Descendants do local ValueIndex = Library:GetTransparencyPropertyFromItem(Value) if not ValueIndex then continue end if type(ValueIndex) == "table" then for _, Property in ValueIndex do NewTween = Library:FadeItem(Value, Property, Bool, Window.FadeSpeed) end else NewTween = Library:FadeItem(Value, ValueIndex, Bool, Window.FadeSpeed) end end if NewTween then Library:Connect(NewTween.Tween.Completed, function() Debounce = false Items["MainFrame"].Instance.Visible = Bool end) else Debounce = false Items["MainFrame"].Instance.Visible = Bool end end Window.RefreshTabs = function(Self) for _, SubPage in Window.SubPages do if SubPage.Items and SubPage.Items["Tab"] then SubPage.Items["Tab"].Instance.Visible = (SubPage.Page == Window.ActivePage) end if SubPage.Page ~= Window.ActivePage and SubPage.Active then SubPage:Turn(false) end end end Library:Connect(UserInputService.InputBegan, function(Input, Gpe) if Gpe then return end if tostring(Input.KeyCode) == Library.MenuKeybind or tostring(Input.UserInputType) == Library.MenuKeybind then Window:SetOpen(not Window.IsOpen) end end) Window:SetOpen(true) Window.Items = Items return setmetatable(Window, Library) end -- Sidebar group label Library.Seperator = function(self, Text) local Holder = Instances:Create("Frame", { Parent = self.Items["Pages"].Instance, Name = "\0", BackgroundTransparency = 1, Size = UDim2New(1, 0, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, BorderSizePixel = 0, ZIndex = 4, BackgroundColor3 = FromRGB(255, 255, 255) }) local Label = Instances:Create("TextLabel", { Parent = Holder.Instance, FontFace = Library.Font, Text = StringUpper(tostring(Text or "")), Name = "\0", TextSize = 11, TextColor3 = FromRGB(122, 126, 134), BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, Size = UDim2New(1, 0, 0, 12), BorderSizePixel = 0, ZIndex = 4, BackgroundColor3 = FromRGB(255, 255, 255) }) Label:AddToTheme({ TextColor3 = "SubText" }) Instances:Create("UIPadding", { Parent = Holder.Instance, PaddingTop = UDimNew(0, 10), PaddingBottom = UDimNew(0, 6), PaddingLeft = UDimNew(0, 10) }) return Holder end -- Sidebar page Library.Page = function(self, Data) Data = Data or { } local Page = { Window = self, Name = Data.Name or Data.name or nil, Icon = Data.Icon or Data.icon or "Settings", Search = Data.Search or Data.search or false, SubPages = { }, Items = { }, Active = false, ActiveSub = nil, } local Items = { } do Items["Button"] = Instances:Create("TextButton", { Parent = Page.Window.Items["Pages"].Instance, Name = "\0", Text = "", AutoButtonColor = false, Size = UDim2New(1, 0, 0, 34), BackgroundColor3 = FromRGB(31, 32, 37), BackgroundTransparency = 1, BorderSizePixel = 0, ZIndex = 5, }) Instances:Create("UICorner", { Parent = Items["Button"].Instance, CornerRadius = UDimNew(0, 6) }) Items["Icon"] = Instances:Create("Frame", { Parent = Items["Button"].Instance, Name = "\0", BackgroundTransparency = 1, AnchorPoint = Vector2New(0, 0.5), Position = UDim2New(0, 12, 0.5, 0), Size = UDim2New(0, 16, 0, 16), BorderSizePixel = 0, ZIndex = 6, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"] = Instances:Create("TextLabel", { Parent = Items["Button"].Instance, FontFace = Library.Font, Text = Page.Name or "", Name = "\0", TextSize = 13, TextColor3 = FromRGB(122, 126, 134), BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, TextTruncate = Enum.TextTruncate.AtEnd, AnchorPoint = Vector2New(0, 0.5), Position = UDim2New(0, 38, 0.5, 0), Size = UDim2New(1, -46, 0, 16), BorderSizePixel = 0, ZIndex = 6, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["IconRef"] = Icons.Draw(Page.Icon, Items["Icon"].Instance, 16, Library.Theme.SubText) end local function SetIconColor(Color) PaintIcon(Items["IconRef"], Color) end function Page:Turn(Bool) if Bool then Page.Window.ActivePage = Page for _, Other in Page.Window.Pages do if Other ~= Page then Other:Turn(false) end end end Page.Active = Bool if Bool then Items["Button"]:ChangeItemTheme({ BackgroundColor3 = "Element" }) Items["Button"]:Tween(nil, { BackgroundTransparency = 0, BackgroundColor3 = Library.Theme.Element }) Items["Text"]:Tween(nil, { TextColor3 = Library.Theme.Text }) SetIconColor(Library.Theme.Accent) else Items["Button"]:Tween(nil, { BackgroundTransparency = 1 }) Items["Text"]:Tween(nil, { TextColor3 = Library.Theme.SubText }) SetIconColor(Library.Theme.SubText) end Page.Window.RefreshTabs(Page.Window) if Bool then local Target = Page.ActiveSub if not Target or Target.Page ~= Page then Target = Page.SubPages[1] end if Target then Target:Turn(true) end end end Items["Button"]:Connect("MouseEnter", function() if not Page.Active then Items["Text"]:Tween(nil, { TextColor3 = Library.Theme.Text }) SetIconColor(Library.Theme.Image) end end) Items["Button"]:Connect("MouseLeave", function() if not Page.Active then Items["Text"]:Tween(nil, { TextColor3 = Library.Theme.SubText }) SetIconColor(Library.Theme.SubText) end end) Items["Button"]:Connect("MouseButton1Down", function() Page:Turn(true) end) Page.Items = Items if #Page.Window.Pages == 0 then Page:Turn(true) end TableInsert(Page.Window.Pages, Page) return setmetatable(Page, Library.Pages) end -- Top tab Library.Pages.SubPage = function(self, Data) Data = Data or { } local SubPage = { Window = self.Window, Page = self, Name = Data.Name or Data.name or "SubPage", Icon = Data.Icon or Data.icon or nil, Items = { }, SearchItems = { }, Active = false, } local Items = { } do Items["Tab"] = Instances:Create("TextButton", { Parent = SubPage.Window.Items["Tabs"].Instance, Name = "\0", Text = "", AutoButtonColor = false, Size = UDim2New(0, 0, 0, 34), AutomaticSize = Enum.AutomaticSize.X, BackgroundColor3 = FromRGB(31, 32, 37), BackgroundTransparency = 1, Visible = false, BorderSizePixel = 0, ZIndex = 6, }) Instances:Create("UICorner", { Parent = Items["Tab"].Instance, CornerRadius = UDimNew(0, 8) }) Instances:Create("UIPadding", { Parent = Items["Tab"].Instance, PaddingLeft = UDimNew(0, 12), PaddingRight = UDimNew(0, 13) }) Instances:Create("UIListLayout", { Parent = Items["Tab"].Instance, Padding = UDimNew(0, 7), FillDirection = Enum.FillDirection.Horizontal, VerticalAlignment = Enum.VerticalAlignment.Center, SortOrder = Enum.SortOrder.LayoutOrder }) Items["Icon"] = Instances:Create("Frame", { Parent = Items["Tab"].Instance, Name = "\0", BackgroundTransparency = 1, Size = UDim2New(0, 15, 0, 15), BorderSizePixel = 0, LayoutOrder = 1, ZIndex = 7, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"] = Instances:Create("TextLabel", { Parent = Items["Tab"].Instance, FontFace = Library.Font, Text = SubPage.Name, Name = "\0", TextSize = 13, TextColor3 = FromRGB(122, 126, 134), BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, Size = UDim2New(0, 0, 0, 16), AutomaticSize = Enum.AutomaticSize.X, BorderSizePixel = 0, LayoutOrder = 2, ZIndex = 7, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["IconRef"] = Icons.Draw(SubPage.Icon or "Dots", Items["Icon"].Instance, 15, Library.Theme.SubText) Items["PageContent"] = Instances:Create("Frame", { Parent = SubPage.Window.Items["Body"].Instance, Name = "\0", BackgroundTransparency = 1, Position = UDim2New(0, 0, 0, 0), Size = UDim2New(1, 0, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, Visible = false, BorderSizePixel = 0, ZIndex = 4, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Left"] = Instances:Create("Frame", { Parent = Items["PageContent"].Instance, Name = "\0", BackgroundTransparency = 1, Position = UDim2New(0, 20, 0, 16), Size = UDim2New(0.5, -36, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, BorderSizePixel = 0, ZIndex = 4, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UIListLayout", { Parent = Items["Left"].Instance, Padding = UDimNew(0, 20), SortOrder = Enum.SortOrder.LayoutOrder }) Items["Right"] = Instances:Create("Frame", { Parent = Items["PageContent"].Instance, Name = "\0", BackgroundTransparency = 1, Position = UDim2New(0.5, 14, 0, 16), Size = UDim2New(0.5, -36, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, BorderSizePixel = 0, ZIndex = 4, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UIListLayout", { Parent = Items["Right"].Instance, Padding = UDimNew(0, 20), SortOrder = Enum.SortOrder.LayoutOrder }) Items["PageContent"].Instance:GetPropertyChangedSignal("Visible"):Connect(function() print("VIS " .. SubPage.Name .. " -> " .. tostring(Items["PageContent"].Instance.Visible) .. "\n" .. debug.traceback()) end) Items["Bottom"] = Instances:Create("Frame", { Parent = Items["PageContent"].Instance, Name = "\0", BackgroundTransparency = 1, Position = UDim2New(0, 0, 0, 0), Size = UDim2New(1, 0, 0, 26), BorderSizePixel = 0, ZIndex = 4, BackgroundColor3 = FromRGB(255, 255, 255) }) end local function SetIconColor(Color) PaintIcon(Items["IconRef"], Color) end function SubPage:Turn(Bool) if Bool and getgenv().UIDebug then print("TURN ON " .. SubPage.Name .. "\n" .. debug.traceback()) end SubPage.Active = Bool if Bool then SubPage.Page.ActiveSub = SubPage for _, Other in SubPage.Page.SubPages do if Other ~= SubPage then Other:Turn(false) end end end local NewTween = Library:Fade(Items["PageContent"].Instance, Bool, SubPage.Window.FadeSpeed) print("SETVIS " .. SubPage.Name .. " -> " .. tostring(Bool)) Items["PageContent"].Instance.Visible = Bool print("SETVIS DONE " .. SubPage.Name .. " = " .. tostring(Items["PageContent"].Instance.Visible)) if Bool then SubPage.Window.SetActiveSearch(SubPage.Window, SubPage) Items["Tab"]:ChangeItemTheme({ BackgroundColor3 = "Element" }) Items["Tab"]:Tween(nil, { BackgroundTransparency = 0, BackgroundColor3 = Library.Theme.Element }) Items["Text"]:Tween(nil, { TextColor3 = Library.Theme.Text }) SetIconColor(Library.Theme.Accent) else Items["Tab"]:Tween(nil, { BackgroundTransparency = 1 }) Items["Text"]:Tween(nil, { TextColor3 = Library.Theme.SubText }) SetIconColor(Library.Theme.SubText) end end Items["Tab"]:Connect("MouseEnter", function() if not SubPage.Active then Items["Tab"]:Tween(nil, { BackgroundTransparency = 0.55, BackgroundColor3 = Library.Theme.Element }) Items["Text"]:Tween(nil, { TextColor3 = Library.Theme.Text }) SetIconColor(Library.Theme.Image) end end) Items["Tab"]:Connect("MouseLeave", function() if not SubPage.Active then Items["Tab"]:Tween(nil, { BackgroundTransparency = 1 }) Items["Text"]:Tween(nil, { TextColor3 = Library.Theme.SubText }) SetIconColor(Library.Theme.SubText) end end) Items["Tab"]:Connect("MouseButton1Down", function() if not SubPage.Active then SubPage:Turn(true) end end) SubPage.Items = Items TableInsert(SubPage.Page.SubPages, SubPage) TableInsert(SubPage.Window.SubPages, SubPage) if SubPage.Page.Active and #SubPage.Page.SubPages == 1 then SubPage:Turn(true) end return setmetatable(SubPage, Library.Pages) end -- Column section Library.Pages.Section = function(self, Data) Data = Data or { } local Section = { Window = self.Window, Page = self, Name = Data.Name or Data.name or "Section", Side = Data.Side or Data.side or "Left", Items = { }, } local Side = StringLower(tostring(Section.Side)) local Parent = (Side == "left") and Section.Page.Items["Left"].Instance or Section.Page.Items["Right"].Instance local Items = { } do Items["Section"] = Instances:Create("Frame", { Parent = Parent, Name = "\0", BackgroundTransparency = 1, Size = UDim2New(1, 0, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, BorderSizePixel = 0, ZIndex = 4, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UIListLayout", { Parent = Items["Section"].Instance, Padding = UDimNew(0, 7), SortOrder = Enum.SortOrder.LayoutOrder }) Items["Text"] = Instances:Create("TextLabel", { Parent = Items["Section"].Instance, FontFace = Library.Font, Text = Section.Name, Name = "\0", TextSize = 13, TextColor3 = FromRGB(122, 126, 134), BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, Size = UDim2New(1, 0, 0, 16), BorderSizePixel = 0, LayoutOrder = 1, ZIndex = 4, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"]:AddToTheme({ TextColor3 = "SubText" }) Items["Divider"] = Instances:Create("Frame", { Parent = Items["Section"].Instance, Name = "\0", Size = UDim2New(1, 0, 0, 1), BackgroundColor3 = FromRGB(38, 39, 45), BorderSizePixel = 0, LayoutOrder = 2, ZIndex = 4 }) Items["Divider"]:AddToTheme({ BackgroundColor3 = "Border" }) Items["Content"] = Instances:Create("Frame", { Parent = Items["Section"].Instance, Name = "\0", BackgroundTransparency = 1, Size = UDim2New(1, 0, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, BorderSizePixel = 0, LayoutOrder = 3, ZIndex = 4, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UIListLayout", { Parent = Items["Content"].Instance, Padding = UDimNew(0, 9), SortOrder = Enum.SortOrder.LayoutOrder }) Instances:Create("UIPadding", { Parent = Items["Content"].Instance, PaddingTop = UDimNew(0, 6) }) end function Section:SetVisibility(Bool) Items["Section"].Instance.Visible = Bool end Section.Items = Items return setmetatable(Section, Library.Sections) end -- Toggle Library.Sections.Toggle = function(self, Data) Data = Data or { } local Toggle = { Window = self.Window, Page = self.Page, Section = self, Name = Data.Name or Data.name or "Toggle", Flag = Data.Flag or Data.flag or Library:NextFlag(), Default = Data.Default or Data.default or false, Callback = Data.Callback or Data.callback or function() end, Value = false, Count = 0 } local Items = { } do Items["Toggle"] = Instances:Create("TextButton", { Parent = Toggle.Section.Items["Content"].Instance, Name = "\0", Text = "", AutoButtonColor = false, Size = UDim2New(1, 0, 0, 20), BackgroundTransparency = 1, BorderSizePixel = 0, ZIndex = 4, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"] = Instances:Create("TextLabel", { Parent = Items["Toggle"].Instance, FontFace = Library.Font, Text = Toggle.Name, Name = "\0", TextSize = 14, TextColor3 = FromRGB(122, 126, 134), BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, TextTruncate = Enum.TextTruncate.AtEnd, AnchorPoint = Vector2New(0, 0.5), Position = UDim2New(0, 0, 0.5, 0), Size = UDim2New(1, -70, 0, 16), BorderSizePixel = 0, ZIndex = 5, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"]:AddToTheme({ TextColor3 = "SubText" }) Items["Track"] = Instances:Create("Frame", { Parent = Items["Toggle"].Instance, Name = "\0", AnchorPoint = Vector2New(1, 0.5), Position = UDim2New(1, 0, 0.5, 0), Size = UDim2New(0, 32, 0, 16), BackgroundColor3 = FromRGB(58, 59, 65), BorderSizePixel = 0, ZIndex = 6 }) Items["Track"]:AddToTheme({ BackgroundColor3 = "Off" }) Instances:Create("UICorner", { Parent = Items["Track"].Instance, CornerRadius = UDimNew(1, 0) }) Items["Knob"] = Instances:Create("Frame", { Parent = Items["Track"].Instance, Name = "\0", AnchorPoint = Vector2New(0, 0.5), Position = UDim2New(0, 2, 0.5, 0), Size = UDim2New(0, 12, 0, 12), BackgroundColor3 = FromRGB(140, 143, 150), BorderSizePixel = 0, ZIndex = 7 }) Instances:Create("UICorner", { Parent = Items["Knob"].Instance, CornerRadius = UDimNew(1, 0) }) end function Toggle:Get() return Toggle.Value end function Toggle:Set(Value, IsKeybind) if IsKeybind then Value = IsKeybind.Toggled end Toggle.Value = Value and true or false Library.Flags[Toggle.Flag] = Toggle.Value if Toggle.Value then Items["Track"]:ChangeItemTheme({ BackgroundColor3 = "Accent" }) Items["Track"]:Tween(TweenInfoNew(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { BackgroundColor3 = Library.Theme.Accent }) Items["Knob"]:Tween(TweenInfoNew(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Position = UDim2New(0, 18, 0.5, 0), BackgroundColor3 = Color3.new(1, 1, 1) }) Items["Text"]:ChangeItemTheme({ TextColor3 = "Text" }) else Items["Track"]:ChangeItemTheme({ BackgroundColor3 = "Off" }) Items["Track"]:Tween(TweenInfoNew(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { BackgroundColor3 = Library.Theme.Off }) Items["Knob"]:Tween(TweenInfoNew(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Position = UDim2New(0, 2, 0.5, 0), BackgroundColor3 = FromRGB(140, 143, 150) }) Items["Text"]:ChangeItemTheme({ TextColor3 = "SubText" }) end if Toggle.Callback then Library:SafeCall(Toggle.Callback, Toggle.Value) end end function Toggle:SetVisibility(Bool) Items["Toggle"].Instance.Visible = Bool end function Toggle:NextOffset() local Offset = 44 + (Toggle.Count * 26) Toggle.Count += 1 return -Offset end function Toggle:Colorpicker(Data) Data = Data or { } local Colorpicker = { Window = self.Window, Page = self.Page, Section = self, Name = Data.Name or Data.name or "Colorpicker", Flag = Data.Flag or Data.flag or Library:NextFlag(), Default = Data.Default or Data.default or Color3.new(1, 1, 1), Callback = Data.Callback or Data.callback or function() end, Alpha = Data.Alpha or Data.alpha or 0, Parent = Items["Toggle"], Offset = Toggle:NextOffset(), IsToggle = true, } local SearchData = { Name = Toggle.Name, Element = Items["Text"], Section = Colorpicker.Section } TableInsert(Colorpicker.Page.SearchItems, SearchData) return Library:CreateColorpicker(Colorpicker) end function Toggle:Keybind(Data) Data = Data or { } local Keybind = { Window = self.Window, Page = self.Page, Section = self, Name = Data.Name or Data.name or "Keybind", Flag = Data.Flag or Data.flag or Library:NextFlag(), Default = Data.Default or Data.default or Enum.KeyCode.RightShift, Mode = Data.Mode or Data.mode or "Toggle", Callback = Data.Callback or Data.callback or function() end, Key = nil, Picking = false, Value = "", Toggled = false, } local Offset = Toggle:NextOffset() local SubItems = { } do SubItems["KeyButton"] = Instances:Create("TextButton", { Parent = Items["Toggle"].Instance, FontFace = Library.Font, Text = "None", Name = "\0", TextSize = 12, TextColor3 = FromRGB(122, 126, 134), BackgroundTransparency = 1, AutoButtonColor = false, BorderSizePixel = 0, Size = UDim2New(0, 0, 0, 16), AutomaticSize = Enum.AutomaticSize.X, TextXAlignment = Enum.TextXAlignment.Right, AnchorPoint = Vector2New(1, 0.5), Position = UDim2New(1, Offset, 0.5, 0), ZIndex = 6, BackgroundColor3 = FromRGB(255, 255, 255) }) SubItems["KeyButton"]:AddToTheme({ TextColor3 = "SubText" }) end function Keybind:Get() return Keybind.Toggled, Keybind.Key end function Keybind:SetVisibility(Bool) SubItems["KeyButton"].Instance.Visible = Bool end function Keybind:Set(Key) if StringFind(tostring(Key), "Enum") then Keybind.Key = tostring(Key) local Name = Key.Name == "Backspace" and "None" or Key.Name local KeyString = Keys[Keybind.Key] or StringGSub(Name, "Enum.", "") or "None" local TextToDisplay = StringGSub(StringGSub(KeyString, "KeyCode.", ""), "UserInputType.", "") or "None" Keybind.Value = TextToDisplay SubItems["KeyButton"].Instance.Text = TextToDisplay Library.Flags[Keybind.Flag] = { Mode = Keybind.Mode, Key = Keybind.Key, Toggled = Keybind.Toggled } if Keybind.Callback then Library:SafeCall(Keybind.Callback, Keybind.Toggled) end elseif TableFind({"Hold", "Toggle", "Always"}, Key) then Keybind.Mode = Key Keybind:SetMode(Keybind.Mode) elseif type(Key) == "table" then local RealKey = tostring(Key.Key) local ShortKey = RealKey if StringFind(RealKey, "Enum") then ShortKey = StringGSub(StringGSub(RealKey, "Enum.KeyCode.", ""), "Enum.UserInputType.", "") end Keybind.Key = ShortKey Keybind.Mode = Key.Mode or "Toggle" if Key.Mode then Keybind:SetMode(Key.Mode) else Keybind.Toggled = Key.Toggled or false end local KeyString = Keys[ShortKey] or ShortKey or "None" local TextToDisplay = StringGSub(StringGSub(KeyString, "KeyCode.", ""), "UserInputType.", "") Keybind.Value = TextToDisplay SubItems["KeyButton"].Instance.Text = TextToDisplay Library.Flags[Keybind.Flag] = { Mode = Keybind.Mode, Key = Keybind.Key, Toggled = Keybind.Toggled } if Keybind.Callback then Library:SafeCall(Keybind.Callback, Keybind.Toggled) end end Keybind.Picking = false SubItems["KeyButton"]:ChangeItemTheme({ TextColor3 = "SubText" }) SubItems["KeyButton"]:Tween(nil, { TextColor3 = Library.Theme.SubText }) end function Keybind:SetMode(Mode) Keybind.Mode = Mode Keybind.Toggled = Mode == "Always" Library.Flags[Keybind.Flag] = { Mode = Keybind.Mode, Key = Keybind.Key, Toggled = Keybind.Toggled } if Keybind.Callback then Library:SafeCall(Keybind.Callback, Keybind.Toggled) end end function Keybind:Press(Bool) if Keybind.Mode == "Toggle" then Keybind.Toggled = not Keybind.Toggled elseif Keybind.Mode == "Hold" then Keybind.Toggled = Bool elseif Keybind.Mode == "Always" then Keybind.Toggled = true end Toggle:Set(nil, Keybind) Library.Flags[Keybind.Flag] = { Mode = Keybind.Mode, Key = Keybind.Key, Toggled = Keybind.Toggled } if Keybind.Callback then Library:SafeCall(Keybind.Callback, Keybind.Toggled) end end SubItems["KeyButton"]:Connect("MouseButton1Click", function() if Keybind.Picking then return end Keybind.Picking = true SubItems["KeyButton"]:ChangeItemTheme({ TextColor3 = "Accent" }) SubItems["KeyButton"]:Tween(nil, { TextColor3 = Library.Theme.Accent }) local InputBegan InputBegan = UserInputService.InputBegan:Connect(function(Input) if Input.UserInputType == Enum.UserInputType.Keyboard then Keybind:Set(Input.KeyCode) else Keybind:Set(Input.UserInputType) end InputBegan:Disconnect() InputBegan = nil end) end) Library:Connect(UserInputService.InputBegan, function(Input) if Keybind.Value == "None" or Keybind.Value == "" then return end if tostring(Input.KeyCode) == Keybind.Key or tostring(Input.UserInputType) == Keybind.Key then if Keybind.Mode == "Toggle" then Keybind:Press() elseif Keybind.Mode == "Hold" then Keybind:Press(true) end end end) Library:Connect(UserInputService.InputEnded, function(Input) if Keybind.Value == "None" or Keybind.Value == "" then return end if tostring(Input.KeyCode) == Keybind.Key or tostring(Input.UserInputType) == Keybind.Key then if Keybind.Mode == "Hold" then Keybind:Press(false) end end end) TableInsert(Library.Keybinds, { Name = Keybind.Name, Keybind = Keybind, Display = function() return Keybind.Value, Keybind.Mode end }) if Keybind.Default then Keybind:Set({ Key = Keybind.Default, Mode = Keybind.Mode or "Toggle" }) end Library.SetFlags[Keybind.Flag] = function(Value) Keybind:Set(Value) end return Keybind end local SearchData = { Name = Toggle.Name, Element = Items["Text"], Section = Toggle.Section, } TableInsert(Toggle.Page.SearchItems, SearchData) Items["Toggle"]:Connect("MouseButton1Down", function() Toggle:Set(not Toggle.Value) end) if Toggle.Default then Toggle:Set(Toggle.Default) else Toggle:Set(false) end Library.SetFlags[Toggle.Flag] = function(Value) Toggle:Set(Value) end return Toggle end -- Button Library.Sections.Button = function(self, Data) Data = Data or { } local Button = { Window = self.Window, Page = self.Page, Section = self, Name = Data.Name or Data.name or "Button", Callback = Data.Callback or Data.callback or function() end, Style = Data.Style or Data.style or "Accent", Icon = Data.Icon or Data.icon or "Check", } local IsDim = StringLower(tostring(Button.Style)) == "dim" or StringLower(tostring(Button.Style)) == "secondary" local BaseColor = IsDim and Library.Theme.Accent:Lerp(Color3.new(0, 0, 0), 0.62) or Library.Theme.Accent local TextColor = IsDim and FromRGB(196, 196, 196) or Color3.new(1, 1, 1) local Items = { } do Items["Button"] = Instances:Create("TextButton", { Parent = Button.Section.Items["Content"].Instance, Name = "\0", Text = "", AutoButtonColor = false, Size = UDim2New(1, 0, 0, 36), BackgroundColor3 = BaseColor, BorderSizePixel = 0, ZIndex = 4, }) Instances:Create("UICorner", { Parent = Items["Button"].Instance, CornerRadius = UDimNew(0, 6) }) Items["Holder"] = Instances:Create("Frame", { Parent = Items["Button"].Instance, Name = "\0", BackgroundTransparency = 1, AnchorPoint = Vector2New(0.5, 0.5), Position = UDim2New(0.5, 0, 0.5, 0), Size = UDim2New(0, 0, 0, 18), AutomaticSize = Enum.AutomaticSize.X, BorderSizePixel = 0, ZIndex = 5, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UIListLayout", { Parent = Items["Holder"].Instance, Padding = UDimNew(0, 7), FillDirection = Enum.FillDirection.Horizontal, HorizontalAlignment = Enum.HorizontalAlignment.Center, VerticalAlignment = Enum.VerticalAlignment.Center, SortOrder = Enum.SortOrder.LayoutOrder }) Items["Icon"] = Instances:Create("Frame", { Parent = Items["Holder"].Instance, Name = "\0", BackgroundTransparency = 1, Size = UDim2New(0, 13, 0, 13), BorderSizePixel = 0, LayoutOrder = 1, ZIndex = 6, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"] = Instances:Create("TextLabel", { Parent = Items["Holder"].Instance, FontFace = Library.Font, Text = Button.Name, Name = "\0", TextSize = 13, TextColor3 = TextColor, BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Center, Size = UDim2New(0, 0, 0, 16), AutomaticSize = Enum.AutomaticSize.X, BorderSizePixel = 0, LayoutOrder = 2, ZIndex = 6, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["IconRef"] = Icons.Draw(Button.Icon, Items["Icon"].Instance, 13, TextColor) end local function Tint(Color) PaintIcon(Items["IconRef"], Color) end function Button:Press() local Pressed = BaseColor:Lerp(IsDim and Color3.new(1, 1, 1) or Color3.new(1, 1, 1), 0.16) Items["Button"]:Tween(TweenInfoNew(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { BackgroundColor3 = Pressed }) task.wait(0.1) Items["Button"]:Tween(TweenInfoNew(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { BackgroundColor3 = BaseColor }) Library:SafeCall(Button.Callback) end function Button:SetVisibility(Bool) Items["Button"].Instance.Visible = Bool end function Button:SubButton(Data2) Data2 = Data2 or { } local SubButton = { Window = self.Window, Page = self.Page, Section = self, Name = Data2.Name or Data2.name or "Button", Callback = Data2.Callback or Data2.callback or function() end, } local SubHolder = Instances:Create("Frame", { Parent = Button.Section.Items["Content"].Instance, Name = "\0", BackgroundTransparency = 1, Size = UDim2New(1, 0, 0, 36), BorderSizePixel = 0, LayoutOrder = (Items["Button"].Instance.LayoutOrder + 1), ZIndex = 4, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Button"].Instance.Parent = SubHolder.Instance Items["Button"].Instance.Size = UDim2New(0.49, 0, 1, 0) local SubItems = { } do SubItems["SubButton"] = Instances:Create("TextButton", { Parent = SubHolder.Instance, Name = "\0", Text = "", AutoButtonColor = false, AnchorPoint = Vector2New(1, 0), Position = UDim2New(1, 0, 0, 0), Size = UDim2New(0.49, 0, 1, 0), BackgroundColor3 = BaseColor, BorderSizePixel = 0, ZIndex = 4, }) Instances:Create("UICorner", { Parent = SubItems["SubButton"].Instance, CornerRadius = UDimNew(0, 6) }) SubItems["Holder"] = Instances:Create("Frame", { Parent = SubItems["SubButton"].Instance, Name = "\0", BackgroundTransparency = 1, AnchorPoint = Vector2New(0.5, 0.5), Position = UDim2New(0.5, 0, 0.5, 0), Size = UDim2New(0, 0, 0, 18), AutomaticSize = Enum.AutomaticSize.X, BorderSizePixel = 0, ZIndex = 5, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UIListLayout", { Parent = SubItems["Holder"].Instance, Padding = UDimNew(0, 7), FillDirection = Enum.FillDirection.Horizontal, HorizontalAlignment = Enum.HorizontalAlignment.Center, VerticalAlignment = Enum.VerticalAlignment.Center, SortOrder = Enum.SortOrder.LayoutOrder }) SubItems["Icon"] = Instances:Create("Frame", { Parent = SubItems["Holder"].Instance, Name = "\0", BackgroundTransparency = 1, Size = UDim2New(0, 13, 0, 13), BorderSizePixel = 0, LayoutOrder = 1, ZIndex = 6, BackgroundColor3 = FromRGB(255, 255, 255) }) SubItems["Text"] = Instances:Create("TextLabel", { Parent = SubItems["Holder"].Instance, FontFace = Library.Font, Text = SubButton.Name, Name = "\0", TextSize = 13, TextColor3 = TextColor, BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Center, Size = UDim2New(0, 0, 0, 16), AutomaticSize = Enum.AutomaticSize.X, BorderSizePixel = 0, LayoutOrder = 2, ZIndex = 6, BackgroundColor3 = FromRGB(255, 255, 255) }) Icons.Draw(Button.Icon, SubItems["Icon"].Instance, 13, TextColor) end function SubButton:Press() SubItems["SubButton"]:Tween(TweenInfoNew(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { BackgroundColor3 = BaseColor:Lerp(Color3.new(1, 1, 1), 0.16) }) task.wait(0.1) SubItems["SubButton"]:Tween(TweenInfoNew(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { BackgroundColor3 = BaseColor }) Library:SafeCall(SubButton.Callback) end function SubButton:SetVisibility(Bool) SubItems["SubButton"].Instance.Visible = Bool end TableInsert(SubButton.Page.SearchItems, { Name = SubButton.Name, Element = SubItems["Text"], Section = SubButton.Section }) SubItems["SubButton"]:Connect("MouseButton1Down", function() SubButton:Press() end) return SubButton end TableInsert(Button.Page.SearchItems, { Name = Button.Name, Element = Items["Text"], Section = Button.Section }) Items["Button"]:Connect("MouseButton1Down", function() Button:Press() end) return Button end -- Slider Library.Sections.Slider = function(self, Data) Data = Data or { } local Slider = { Window = self.Window, Page = self.Page, Section = self, Name = Data.Name or Data.name or "Slider", Flag = Data.Flag or Data.flag or Library:NextFlag(), Min = Data.Min or Data.min or 0, Default = Data.Default or Data.default or 0, Max = Data.Max or Data.max or 100, Suffix = Data.Suffix or Data.suffix or "", Decimals = Data.Decimals or Data.decimals or 1, Callback = Data.Callback or Data.callback or function() end, Value = 0, Sliding = false } local Items = { } do Items["Slider"] = Instances:Create("Frame", { Parent = Slider.Section.Items["Content"].Instance, Name = "\0", BackgroundTransparency = 1, Size = UDim2New(1, 0, 0, 32), BorderSizePixel = 0, ZIndex = 4, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"] = Instances:Create("TextLabel", { Parent = Items["Slider"].Instance, FontFace = Library.Font, Text = Slider.Name, Name = "\0", TextSize = 14, TextColor3 = FromRGB(255, 255, 255), BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, TextTruncate = Enum.TextTruncate.AtEnd, AnchorPoint = Vector2New(0, 0.5), Position = UDim2New(0, 0, 0.5, 0), Size = UDim2New(1, -190, 0, 16), BorderSizePixel = 0, ZIndex = 5, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"]:AddToTheme({ TextColor3 = "Text" }) Items["Value"] = Instances:Create("TextLabel", { Parent = Items["Slider"].Instance, FontFace = Library.Font, Text = "0", Name = "\0", TextSize = 12, TextColor3 = FromRGB(122, 126, 134), BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Right, AnchorPoint = Vector2New(1, 0.5), Position = UDim2New(1, -130, 0.5, 0), Size = UDim2New(0, 60, 0, 16), BorderSizePixel = 0, ZIndex = 5, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Value"]:AddToTheme({ TextColor3 = "SubText" }) Items["RealSlider"] = Instances:Create("TextButton", { Parent = Items["Slider"].Instance, Name = "\0", Text = "", AutoButtonColor = false, AnchorPoint = Vector2New(1, 0.5), Position = UDim2New(1, 0, 0.5, 0), Size = UDim2New(0, 115, 0, 16), BackgroundTransparency = 1, BorderSizePixel = 0, ZIndex = 5, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Track"] = Instances:Create("Frame", { Parent = Items["RealSlider"].Instance, Name = "\0", AnchorPoint = Vector2New(0, 0.5), Position = UDim2New(0, 0, 0.5, 0), Size = UDim2New(1, 0, 0, 3), BackgroundColor3 = FromRGB(31, 32, 37), BorderSizePixel = 0, ZIndex = 5 }) Items["Track"]:AddToTheme({ BackgroundColor3 = "Element" }) Instances:Create("UICorner", { Parent = Items["Track"].Instance, CornerRadius = UDimNew(1, 0) }) Items["Accent"] = Instances:Create("Frame", { Parent = Items["RealSlider"].Instance, Name = "\0", AnchorPoint = Vector2New(0, 0.5), Position = UDim2New(0, 0, 0.5, 0), Size = UDim2New(0, 0, 0, 3), BackgroundColor3 = FromRGB(224, 138, 43), BorderSizePixel = 0, ZIndex = 6 }) Items["Accent"]:AddToTheme({ BackgroundColor3 = "Accent" }) Instances:Create("UICorner", { Parent = Items["Accent"].Instance, CornerRadius = UDimNew(1, 0) }) Items["Knob"] = Instances:Create("Frame", { Parent = Items["RealSlider"].Instance, Name = "\0", AnchorPoint = Vector2New(0.5, 0.5), Position = UDim2New(0, 0, 0.5, 0), Size = UDim2New(0, 11, 0, 11), BackgroundColor3 = FromRGB(255, 255, 255), BorderSizePixel = 0, ZIndex = 7 }) Instances:Create("UICorner", { Parent = Items["Knob"].Instance, CornerRadius = UDimNew(1, 0) }) end function Slider:Get() return Slider.Value end function Slider:Set(Value) Slider.Value = MathClamp(Library:Round(tonumber(Value) or Slider.Min, Slider.Decimals), Slider.Min, Slider.Max) Library.Flags[Slider.Flag] = Slider.Value local Scale = (Slider.Max ~= Slider.Min) and ((Slider.Value - Slider.Min) / (Slider.Max - Slider.Min)) or 0 Items["Accent"]:Tween(TweenInfoNew(0.12, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Size = UDim2New(Scale, 0, 0, 3) }) Items["Knob"]:Tween(TweenInfoNew(0.12, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Position = UDim2New(Scale, 0, 0.5, 0) }) Items["Value"].Instance.Text = StringFormat("%s%s", tostring(Slider.Value), Slider.Suffix) if Slider.Callback then Library:SafeCall(Slider.Callback, Slider.Value) end end function Slider:SetVisibility(Bool) Items["Slider"].Instance.Visible = Bool end TableInsert(Slider.Page.SearchItems, { Name = Slider.Name, Element = Items["Text"], Section = Slider.Section, }) local function FromInput(Input) local Track = Items["RealSlider"].Instance local Scale = MathClamp((Input.Position.X - Track.AbsolutePosition.X) / Track.AbsoluteSize.X, 0, 1) Slider:Set((Slider.Max - Slider.Min) * Scale + Slider.Min) end Items["RealSlider"]:Connect("InputBegan", function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then Slider.Sliding = true FromInput(Input) Input.Changed:Connect(function() if Input.UserInputState == Enum.UserInputState.End then Slider.Sliding = false end end) end end) Library:Connect(UserInputService.InputChanged, function(Input) if Input.UserInputType == Enum.UserInputType.MouseMovement or Input.UserInputType == Enum.UserInputType.Touch then if Slider.Sliding then FromInput(Input) end end end) Slider:Set(Slider.Default) Library.SetFlags[Slider.Flag] = function(Value) Slider:Set(Value) end return Slider end -- Dropdown Library.Sections.Dropdown = function(self, Data) Data = Data or { } local Dropdown = { Window = self.Window, Page = self.Page, Section = self, Name = Data.Name or Data.name or "Dropdown", Flag = Data.Flag or Data.flag or Library:NextFlag(), Items = Data.Items or Data.items or { "One", "Two", "Three" }, Default = Data.Default or Data.default or nil, MaxSize = Data.MaxSize or Data.maxsize or 90, Callback = Data.Callback or Data.callback or function() end, Multi = Data.Multi or Data.multi or false, Value = { }, IsOpen = false, Options = { }, } local Width = 112 local Items = { } do Items["Dropdown"] = Instances:Create("Frame", { Parent = Dropdown.Section.Items["Content"].Instance, Name = "\0", BackgroundTransparency = 1, Size = UDim2New(1, 0, 0, 28), BorderSizePixel = 0, ZIndex = 4, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"] = Instances:Create("TextLabel", { Parent = Items["Dropdown"].Instance, FontFace = Library.Font, Text = Dropdown.Name, Name = "\0", TextSize = 14, TextColor3 = FromRGB(255, 255, 255), BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, TextTruncate = Enum.TextTruncate.AtEnd, AnchorPoint = Vector2New(0, 0.5), Position = UDim2New(0, 0, 0.5, 0), Size = UDim2New(1, -(Width + 10), 0, 16), BorderSizePixel = 0, ZIndex = 5, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"]:AddToTheme({ TextColor3 = "Text" }) Items["RealDropdown"] = Instances:Create("TextButton", { Parent = Items["Dropdown"].Instance, Name = "\0", Text = "", AutoButtonColor = false, AnchorPoint = Vector2New(1, 0.5), Position = UDim2New(1, 0, 0.5, 0), Size = UDim2New(0, Width, 0, 28), BackgroundColor3 = FromRGB(31, 32, 37), BorderSizePixel = 0, ZIndex = 5, }) Items["RealDropdown"]:AddToTheme({ BackgroundColor3 = "Element" }) Instances:Create("UICorner", { Parent = Items["RealDropdown"].Instance, CornerRadius = UDimNew(0, 6) }) local DropStroke = Instances:Create("UIStroke", { Parent = Items["RealDropdown"].Instance, Color = FromRGB(38, 39, 45), ApplyStrokeMode = Enum.ApplyStrokeMode.Border, Transparency = 0.35 }) DropStroke:AddToTheme({ Color = "Border" }) Items["Value"] = Instances:Create("TextLabel", { Parent = Items["RealDropdown"].Instance, FontFace = Library.Font, Text = "--", Name = "\0", TextSize = 13, TextColor3 = FromRGB(122, 126, 134), BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, TextTruncate = Enum.TextTruncate.AtEnd, Position = UDim2New(0, 11, 0, 0), Size = UDim2New(1, -30, 1, 0), BorderSizePixel = 0, ZIndex = 6, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Value"]:AddToTheme({ TextColor3 = "SubText" }) Items["Icon"] = Instances:Create("Frame", { Parent = Items["RealDropdown"].Instance, Name = "\0", BackgroundTransparency = 1, AnchorPoint = Vector2New(1, 0.5), Position = UDim2New(1, -9, 0.5, 0), Size = UDim2New(0, 12, 0, 12), BorderSizePixel = 0, ZIndex = 6, BackgroundColor3 = FromRGB(255, 255, 255) }) Icons.Draw("Chevron", Items["Icon"].Instance, 12, Library.Theme.SubText) Items["OptionHolder"] = Instances:Create("ScrollingFrame", { Parent = Library.Holder.Instance, Name = "\0", BackgroundColor3 = FromRGB(21, 22, 25), BorderSizePixel = 0, Visible = false, Active = true, CanvasSize = UDim2New(0, 0, 0, 0), AutomaticCanvasSize = Enum.AutomaticSize.Y, ScrollBarThickness = 2, ScrollBarImageColor3 = FromRGB(224, 138, 43), ScrollBarImageTransparency = 0.35, ZIndex = 3500, }) Items["OptionHolder"]:AddToTheme({ BackgroundColor3 = "Inline", ScrollBarImageColor3 = "Accent" }) Instances:Create("UICorner", { Parent = Items["OptionHolder"].Instance, CornerRadius = UDimNew(0, 6) }) local OptionStroke = Instances:Create("UIStroke", { Parent = Items["OptionHolder"].Instance, Color = FromRGB(38, 39, 45), ApplyStrokeMode = Enum.ApplyStrokeMode.Border }) OptionStroke:AddToTheme({ Color = "Border" }) Instances:Create("UIPadding", { Parent = Items["OptionHolder"].Instance, PaddingTop = UDimNew(0, 5), PaddingBottom = UDimNew(0, 5), PaddingLeft = UDimNew(0, 5), PaddingRight = UDimNew(0, 5) }) Instances:Create("UIListLayout", { Parent = Items["OptionHolder"].Instance, Padding = UDimNew(0, 3), SortOrder = Enum.SortOrder.LayoutOrder }) end local Debounce = false function Dropdown:Set(Option) if Dropdown.Multi then if type(Option) ~= "table" then return end Dropdown.Value = Option Library.Flags[Dropdown.Flag] = Dropdown.Value for _, Value in Dropdown.Options do local Index = TableFind(Option, Value.Name) Value.Selected = Index ~= nil Value:Toggle(Index and "Active" or "Inactive") end Items["Value"].Instance.Text = #Option > 0 and TableConcat(Option, ", ") or "--" else local OptionData = Dropdown.Options[Option] if not OptionData then return end Dropdown.Value = OptionData.Name Library.Flags[Dropdown.Flag] = Dropdown.Value for _, Value in Dropdown.Options do Value.Selected = (Value == OptionData) Value:Toggle(Value.Selected and "Active" or "Inactive") end Items["Value"].Instance.Text = Dropdown.Value end if Data.Callback then Library:SafeCall(Data.Callback, Dropdown.Value) end end function Dropdown:SetOpen(Bool) if Debounce then return end Dropdown.IsOpen = Bool Debounce = true if Bool then local Button = Items["RealDropdown"].Instance local Position = UDim2New(0, Button.AbsolutePosition.X, 0, Button.AbsolutePosition.Y + Button.AbsoluteSize.Y + 4) local Rows = 0 for _ in Dropdown.Options do Rows += 1 end Items["OptionHolder"].Instance.Position = Position Items["OptionHolder"].Instance.Size = UDim2New(0, Width, 0, math.min(Dropdown.MaxSize, Rows * 27 + 10)) Items["OptionHolder"].Instance.Visible = true end local NewTween = Library:Fade(Items["OptionHolder"].Instance, Bool, Dropdown.Window.FadeSpeed) if NewTween then Library:Connect(NewTween.Tween.Completed, function() Debounce = false Items["OptionHolder"].Instance.Visible = Bool end) else Debounce = false Items["OptionHolder"].Instance.Visible = Bool end end function Dropdown:Remove(Option) if Dropdown.Options[Option] then Dropdown.Options[Option].Button:Clean() end Dropdown.Options[Option] = nil end function Dropdown:Refresh(List) for Index, Value in Dropdown.Options do Dropdown:Remove(Index) end Dropdown.Options = { } for _, Value in List do Dropdown:Add(Value) end end function Dropdown:Add(Option) local OptionButton = Instances:Create("TextButton", { Parent = Items["OptionHolder"].Instance, FontFace = Library.Font, Text = Option, Name = "\0", TextSize = 13, TextColor3 = FromRGB(122, 126, 134), AutoButtonColor = false, Size = UDim2New(1, 0, 0, 24), BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, BorderSizePixel = 0, ZIndex = 3501, BackgroundColor3 = FromRGB(31, 32, 37) }) OptionButton:AddToTheme({ TextColor3 = "SubText", BackgroundColor3 = "Element" }) Instances:Create("UICorner", { Parent = OptionButton.Instance, CornerRadius = UDimNew(0, 5) }) local Padding = Instances:Create("UIPadding", { Parent = OptionButton.Instance, PaddingLeft = UDimNew(0, 8) }) local OptionData = { Name = Option, Button = OptionButton, Padding = Padding, Selected = false } function OptionData:Toggle(Status) if Status == "Active" then OptionData.Button:ChangeItemTheme({ TextColor3 = "Accent" }) OptionData.Button:Tween(nil, { TextColor3 = Library.Theme.Accent, BackgroundTransparency = 0, TextTransparency = 0 }) Padding:Tween(nil, { PaddingLeft = UDimNew(0, 12) }) else OptionData.Button:ChangeItemTheme({ TextColor3 = "SubText" }) OptionData.Button:Tween(nil, { TextColor3 = Library.Theme.SubText, BackgroundTransparency = 1, TextTransparency = 0 }) Padding:Tween(nil, { PaddingLeft = UDimNew(0, 8) }) end end function OptionData:Set() if Dropdown.Multi then local Index = TableFind(Dropdown.Value, OptionData.Name) if Index then TableRemove(Dropdown.Value, Index) else TableInsert(Dropdown.Value, OptionData.Name) end OptionData.Selected = Index == nil Library.Flags[Dropdown.Flag] = Dropdown.Value OptionData:Toggle(OptionData.Selected and "Active" or "Inactive") Items["Value"].Instance.Text = #Dropdown.Value > 0 and TableConcat(Dropdown.Value, ", ") or "--" else OptionData.Selected = not OptionData.Selected if OptionData.Selected then Dropdown.Value = OptionData.Name OptionData:Toggle("Active") Items["Value"].Instance.Text = OptionData.Name Library.Flags[Dropdown.Flag] = Dropdown.Value for _, Value in Dropdown.Options do if Value ~= OptionData then Value.Selected = false Value:Toggle("Inactive") end end else Dropdown.Value = nil OptionData:Toggle("Inactive") Items["Value"].Instance.Text = "--" Library.Flags[Dropdown.Flag] = Dropdown.Value end end if Data.Callback then Library:SafeCall(Data.Callback, Dropdown.Value) end end OptionData.Button:Connect("MouseButton1Down", function() OptionData:Set() end) Dropdown.Options[Option] = OptionData return OptionData end function Dropdown:SetVisibility(Bool) Items["Dropdown"].Instance.Visible = Bool end TableInsert(Dropdown.Page.SearchItems, { Name = Dropdown.Name, Element = Items["Text"], Section = Dropdown.Section }) Items["RealDropdown"]:Connect("MouseButton1Down", function() Dropdown:SetOpen(not Dropdown.IsOpen) end) Library:Connect(UserInputService.InputBegan, function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 and Dropdown.IsOpen and not Debounce and not Library:IsMouseOverFrame(Items["OptionHolder"].Instance) and not Library:IsMouseOverFrame(Items["RealDropdown"].Instance) then Dropdown:SetOpen(false) end end) for _, Value in Dropdown.Items do Dropdown:Add(Value) end if Dropdown.Default then Dropdown:Set(Dropdown.Default) end Library.SetFlags[Dropdown.Flag] = function(Value) Dropdown:Set(Value) end return Dropdown end -- Label Library.Sections.Label = function(self, Text, Alignment) local Label = { Window = self.Window, Page = self.Page, Section = self, Name = Text or "Label", Alignment = Alignment or "Left", Count = 0 } local Items = { } do Items["Label"] = Instances:Create("Frame", { Parent = Label.Section.Items["Content"].Instance, Name = "\0", BackgroundTransparency = 1, Size = UDim2New(1, 0, 0, 18), BorderSizePixel = 0, ZIndex = 4, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"] = Instances:Create("TextLabel", { Parent = Items["Label"].Instance, FontFace = Library.Font, Text = Label.Name, Name = "\0", TextSize = 13, TextColor3 = FromRGB(122, 126, 134), BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment[Label.Alignment] or Enum.TextXAlignment.Left, AnchorPoint = Vector2New(0, 0.5), Position = UDim2New(0, 0, 0.5, 0), Size = UDim2New(1, -80, 0, 16), BorderSizePixel = 0, ZIndex = 5, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"]:AddToTheme({ TextColor3 = "SubText" }) end function Label:Colorpicker(Data) Data = Data or { } local Colorpicker = { Window = self.Window, Page = self.Page, Section = self, Name = Data.Name or Data.name or "Colorpicker", Flag = Data.Flag or Data.flag or Library:NextFlag(), Default = Data.Default or Data.default or Color3.new(1, 1, 1), Callback = Data.Callback or Data.callback or function() end, Alpha = Data.Alpha or Data.alpha or 0, Parent = Items["Label"], Offset = -(Label.Count * 26), } Label.Count += 1 TableInsert(Colorpicker.Page.SearchItems, { Name = Label.Name, Element = Items["Text"], Section = Colorpicker.Section }) return Library:CreateColorpicker(Colorpicker) end return Label end -- Keybind (standalone row) Library.Sections.Keybind = function(self, Data) Data = Data or { } local Keybind = { Window = self.Window, Page = self.Page, Section = self, Name = Data.Name or Data.name or "Keybind", Flag = Data.Flag or Data.flag or Library:NextFlag(), Default = Data.Default or Data.default or Enum.KeyCode.RightShift, Callback = Data.Callback or Data.callback or function() end, Mode = Data.Mode or Data.mode or "Toggle", Key = nil, Value = "", Toggled = false, Picking = false } Library.Flags[Keybind.Flag] = { } local Items = { } do Items["Keybind"] = Instances:Create("Frame", { Parent = Keybind.Section.Items["Content"].Instance, Name = "\0", BackgroundTransparency = 1, Size = UDim2New(1, 0, 0, 28), BorderSizePixel = 0, ZIndex = 4, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"] = Instances:Create("TextLabel", { Parent = Items["Keybind"].Instance, FontFace = Library.Font, Text = Keybind.Name, Name = "\0", TextSize = 14, TextColor3 = FromRGB(255, 255, 255), BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, AnchorPoint = Vector2New(0, 0.5), Position = UDim2New(0, 0, 0.5, 0), Size = UDim2New(1, -110, 0, 16), BorderSizePixel = 0, ZIndex = 5, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"]:AddToTheme({ TextColor3 = "Text" }) Items["RealKeybind"] = Instances:Create("TextButton", { Parent = Items["Keybind"].Instance, Name = "\0", Text = "", AutoButtonColor = false, AnchorPoint = Vector2New(1, 0.5), Position = UDim2New(1, 0, 0.5, 0), Size = UDim2New(0, 96, 0, 28), BackgroundColor3 = FromRGB(31, 32, 37), BorderSizePixel = 0, ZIndex = 5, }) Items["RealKeybind"]:AddToTheme({ BackgroundColor3 = "Element" }) Instances:Create("UICorner", { Parent = Items["RealKeybind"].Instance, CornerRadius = UDimNew(0, 6) }) Instances:Create("UIStroke", { Parent = Items["RealKeybind"].Instance, Color = FromRGB(38, 39, 45), ApplyStrokeMode = Enum.ApplyStrokeMode.Border, Transparency = 0.35 }):AddToTheme({ Color = "Border" }) Items["Value"] = Instances:Create("TextLabel", { Parent = Items["RealKeybind"].Instance, FontFace = Library.Font, Text = "None", Name = "\0", TextSize = 13, TextColor3 = FromRGB(122, 126, 134), BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Center, Size = UDim2New(1, 0, 1, 0), BorderSizePixel = 0, ZIndex = 6, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Value"]:AddToTheme({ TextColor3 = "SubText" }) end function Keybind:Get() return Keybind.Toggled, Keybind.Key end function Keybind:SetVisibility(Bool) Items["Keybind"].Instance.Visible = Bool end function Keybind:Set(Key) if StringFind(tostring(Key), "Enum") then Keybind.Key = tostring(Key) local Name = Key.Name == "Backspace" and "None" or Key.Name local KeyString = Keys[Keybind.Key] or StringGSub(Name, "Enum.", "") or "None" local TextToDisplay = StringGSub(StringGSub(KeyString, "KeyCode.", ""), "UserInputType.", "") or "None" Keybind.Value = TextToDisplay Items["Value"].Instance.Text = TextToDisplay Library.Flags[Keybind.Flag] = { Mode = Keybind.Mode, Key = Keybind.Key, Toggled = Keybind.Toggled } if Keybind.Callback then Library:SafeCall(Keybind.Callback, Keybind.Toggled) end elseif TableFind({"Hold", "Toggle", "Always"}, Key) then Keybind:SetMode(Key) elseif type(Key) == "table" then local RealKey = tostring(Key.Key) local ShortKey = RealKey if StringFind(RealKey, "Enum") then ShortKey = StringGSub(StringGSub(RealKey, "Enum.KeyCode.", ""), "Enum.UserInputType.", "") end Keybind.Key = ShortKey if Key.Mode then Keybind:SetMode(Key.Mode) else Keybind.Mode = "Toggle" Keybind.Toggled = Key.Toggled or false end local KeyString = Keys[ShortKey] or ShortKey or "None" local TextToDisplay = StringGSub(StringGSub(KeyString, "KeyCode.", ""), "UserInputType.", "") Keybind.Value = TextToDisplay Items["Value"].Instance.Text = TextToDisplay Library.Flags[Keybind.Flag] = { Mode = Keybind.Mode, Key = Keybind.Key, Toggled = Keybind.Toggled } if Keybind.Callback then Library:SafeCall(Keybind.Callback, Keybind.Toggled) end end Keybind.Picking = false Items["Value"]:ChangeItemTheme({ TextColor3 = "SubText" }) Items["Value"]:Tween(nil, { TextColor3 = Library.Theme.SubText }) end function Keybind:SetMode(Mode) Keybind.Mode = Mode Keybind.Toggled = Mode == "Always" Library.Flags[Keybind.Flag] = { Mode = Keybind.Mode, Key = Keybind.Key, Toggled = Keybind.Toggled } if Keybind.Callback then Library:SafeCall(Keybind.Callback, Keybind.Toggled) end end function Keybind:Press(Bool) if Keybind.Mode == "Toggle" then Keybind.Toggled = not Keybind.Toggled elseif Keybind.Mode == "Hold" then Keybind.Toggled = Bool elseif Keybind.Mode == "Always" then Keybind.Toggled = true end Library.Flags[Keybind.Flag] = { Mode = Keybind.Mode, Key = Keybind.Key, Toggled = Keybind.Toggled } if Keybind.Callback then Library:SafeCall(Keybind.Callback, Keybind.Toggled) end end TableInsert(Keybind.Page.SearchItems, { Name = Keybind.Name, Element = Items["Text"], Section = Keybind.Section }) Items["RealKeybind"]:Connect("MouseButton1Click", function() if Keybind.Picking then return end Keybind.Picking = true Items["Value"]:ChangeItemTheme({ TextColor3 = "Accent" }) Items["Value"]:Tween(nil, { TextColor3 = Library.Theme.Accent }) local InputBegan InputBegan = UserInputService.InputBegan:Connect(function(Input) if Input.UserInputType == Enum.UserInputType.Keyboard then Keybind:Set(Input.KeyCode) else Keybind:Set(Input.UserInputType) end InputBegan:Disconnect() InputBegan = nil end) end) Library:Connect(UserInputService.InputBegan, function(Input) if Keybind.Value == "None" or Keybind.Value == "" then return end if tostring(Input.KeyCode) == Keybind.Key or tostring(Input.UserInputType) == Keybind.Key then if Keybind.Mode == "Toggle" then Keybind:Press() elseif Keybind.Mode == "Hold" then Keybind:Press(true) end end end) Library:Connect(UserInputService.InputEnded, function(Input) if Keybind.Value == "None" or Keybind.Value == "" then return end if tostring(Input.KeyCode) == Keybind.Key or tostring(Input.UserInputType) == Keybind.Key then if Keybind.Mode == "Hold" then Keybind:Press(false) end end end) TableInsert(Library.Keybinds, { Name = Keybind.Name, Keybind = Keybind, Display = function() return Keybind.Value, Keybind.Mode end }) if Keybind.Default then Keybind:Set({ Key = Keybind.Default, Mode = Keybind.Mode or "Toggle" }) end Library.SetFlags[Keybind.Flag] = function(Value) Keybind:Set(Value) end return Keybind end -- Textbox Library.Sections.Textbox = function(self, Data) Data = Data or { } local Textbox = { Window = self.Window, Page = self.Page, Section = self, Name = Data.Name or Data.name or "Textbox", Flag = Data.Flag or Data.flag or Library:NextFlag(), Default = Data.Default or Data.default or "", Callback = Data.Callback or Data.callback or function() end, Placeholder = Data.Placeholder or Data.placeholder or "Placeholder", Value = "" } local Items = { } do Items["Textbox"] = Instances:Create("Frame", { Parent = Textbox.Section.Items["Content"].Instance, Name = "\0", BackgroundTransparency = 1, Size = UDim2New(1, 0, 0, 28), BorderSizePixel = 0, ZIndex = 4, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"] = Instances:Create("TextLabel", { Parent = Items["Textbox"].Instance, FontFace = Library.Font, Text = Textbox.Name, Name = "\0", TextSize = 14, TextColor3 = FromRGB(255, 255, 255), BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, TextTruncate = Enum.TextTruncate.AtEnd, AnchorPoint = Vector2New(0, 0.5), Position = UDim2New(0, 0, 0.5, 0), Size = UDim2New(1, -178, 0, 16), BorderSizePixel = 0, ZIndex = 5, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"]:AddToTheme({ TextColor3 = "Text" }) Items["Input"] = Instances:Create("TextBox", { Parent = Items["Textbox"].Instance, FontFace = Library.Font, Text = "", Name = "\0", TextSize = 13, TextColor3 = FromRGB(255, 255, 255), PlaceholderColor3 = FromRGB(122, 126, 134), PlaceholderText = Textbox.Placeholder, TextXAlignment = Enum.TextXAlignment.Left, ClearTextOnFocus = false, AnchorPoint = Vector2New(1, 0.5), Position = UDim2New(1, 0, 0.5, 0), Size = UDim2New(0, 164, 0, 28), BackgroundColor3 = FromRGB(31, 32, 37), BorderSizePixel = 0, ZIndex = 5 }) Items["Input"]:AddToTheme({ TextColor3 = "Text", BackgroundColor3 = "Element" }) Instances:Create("UICorner", { Parent = Items["Input"].Instance, CornerRadius = UDimNew(0, 6) }) Instances:Create("UIStroke", { Parent = Items["Input"].Instance, Color = FromRGB(38, 39, 45), ApplyStrokeMode = Enum.ApplyStrokeMode.Border, Transparency = 0.35 }):AddToTheme({ Color = "Border" }) Instances:Create("UIPadding", { Parent = Items["Input"].Instance, PaddingLeft = UDimNew(0, 10), PaddingRight = UDimNew(0, 10) }) end function Textbox:Get() return Textbox.Value end function Textbox:Set(Value) Value = tostring(Value or "") Items["Input"].Instance.Text = Value Textbox.Value = Value Library.Flags[Textbox.Flag] = Value if Textbox.Callback then Library:SafeCall(Textbox.Callback, Textbox.Value) end end function Textbox:SetVisibility(Bool) Items["Textbox"].Instance.Visible = Bool end TableInsert(Textbox.Page.SearchItems, { Name = Textbox.Name, Element = Items["Text"], Section = Textbox.Section, }) Items["Input"]:Connect("FocusLost", function() Textbox:Set(Items["Input"].Instance.Text) end) if Textbox.Default ~= "" then Textbox:Set(Textbox.Default) else Library.Flags[Textbox.Flag] = "" end Library.SetFlags[Textbox.Flag] = function(Value) Textbox:Set(Value) end return Textbox end -- Overlays (keybind list / settings) local function CreateOverlay(Window, Title) local Items = Window.Items if Items["Overlay"] and Items["Overlay"].Instance then Items["Overlay"].Instance:Destroy() end local Overlay = Instances:Create("Frame", { Parent = Items["MainFrame"].Instance, Name = "\0", Size = UDim2New(1, 0, 1, 0), BackgroundColor3 = FromRGB(0, 0, 0), BackgroundTransparency = 0.45, BorderSizePixel = 0, ZIndex = 4500, }) Instances:Create("UICorner", { Parent = Overlay.Instance, CornerRadius = UDimNew(0, 8) }) local Panel = Instances:Create("Frame", { Parent = Overlay.Instance, Name = "\0", AnchorPoint = Vector2New(0.5, 0.5), Position = UDim2New(0.5, 0, 0.5, 0), Size = UDim2New(0, 392, 0, 348), BackgroundColor3 = FromRGB(16, 16, 18), BorderSizePixel = 0, ZIndex = 4501, }) Panel:AddToTheme({ BackgroundColor3 = "Background" }) Instances:Create("UICorner", { Parent = Panel.Instance, CornerRadius = UDimNew(0, 8) }) Instances:Create("UIStroke", { Parent = Panel.Instance, Color = FromRGB(38, 39, 45), ApplyStrokeMode = Enum.ApplyStrokeMode.Border }):AddToTheme({ Color = "Border" }) local TitleLabel = Instances:Create("TextLabel", { Parent = Panel.Instance, FontFace = Library.BoldFont, Text = Title, Name = "\0", TextSize = 14, TextColor3 = FromRGB(255, 255, 255), BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, Position = UDim2New(0, 16, 0, 14), Size = UDim2New(1, -60, 0, 18), BorderSizePixel = 0, ZIndex = 4502, BackgroundColor3 = FromRGB(255, 255, 255) }) TitleLabel:AddToTheme({ TextColor3 = "Text" }) local Close = Instances:Create("TextButton", { Parent = Panel.Instance, Name = "\0", Text = "", AutoButtonColor = false, AnchorPoint = Vector2New(1, 0), Position = UDim2New(1, -14, 0, 14), Size = UDim2New(0, 22, 0, 22), BackgroundColor3 = FromRGB(31, 32, 37), BorderSizePixel = 0, ZIndex = 4502, }) Close:AddToTheme({ BackgroundColor3 = "Element" }) Instances:Create("UICorner", { Parent = Close.Instance, CornerRadius = UDimNew(0, 6) }) Icons.Draw("Dots", Close.Instance, 13, Library.Theme.SubText) Instances:Create("Frame", { Parent = Panel.Instance, Name = "\0", Size = UDim2New(1, -32, 0, 1), Position = UDim2New(0, 16, 0, 44), BackgroundColor3 = FromRGB(38, 39, 45), BorderSizePixel = 0, ZIndex = 4502 }):AddToTheme({ BackgroundColor3 = "Border" }) local List = Instances:Create("ScrollingFrame", { Parent = Panel.Instance, Name = "\0", BackgroundTransparency = 1, Position = UDim2New(0, 16, 0, 54), Size = UDim2New(1, -26, 1, -66), CanvasSize = UDim2New(0, 0, 0, 0), AutomaticCanvasSize = Enum.AutomaticSize.Y, ScrollBarThickness = 3, ScrollBarImageColor3 = FromRGB(224, 138, 43), BorderSizePixel = 0, ZIndex = 4502, BackgroundColor3 = FromRGB(255, 255, 255) }) List:AddToTheme({ ScrollBarImageColor3 = "Accent" }) Instances:Create("UIListLayout", { Parent = List.Instance, Padding = UDimNew(0, 8), SortOrder = Enum.SortOrder.LayoutOrder }) Overlay:Connect("InputBegan", function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 and Input.Target == Overlay.Instance then Overlay:Clean() end end) Close:Connect("MouseButton1Down", function() Overlay:Clean() end) Items["Overlay"] = Overlay return Overlay, List, Panel end local function OverlayRow(List) local Row = Instances:Create("Frame", { Parent = List.Instance, Name = "\0", BackgroundTransparency = 1, Size = UDim2New(1, 0, 0, 26), BorderSizePixel = 0, ZIndex = 4503, BackgroundColor3 = FromRGB(255, 255, 255) }) local Text = Instances:Create("TextLabel", { Parent = Row.Instance, FontFace = Library.Font, Text = "", Name = "\0", TextSize = 13, TextColor3 = FromRGB(255, 255, 255), BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, AnchorPoint = Vector2New(0, 0.5), Position = UDim2New(0, 0, 0.5, 0), Size = UDim2New(1, -110, 0, 16), BorderSizePixel = 0, ZIndex = 4504, BackgroundColor3 = FromRGB(255, 255, 255) }) Text:AddToTheme({ TextColor3 = "Text" }) local Chip = Instances:Create("Frame", { Parent = Row.Instance, Name = "\0", AnchorPoint = Vector2New(1, 0.5), Position = UDim2New(1, 0, 0.5, 0), Size = UDim2New(0, 96, 0, 24), BackgroundColor3 = FromRGB(31, 32, 37), BorderSizePixel = 0, ZIndex = 4504, BackgroundColor3 = FromRGB(31, 32, 37) }) Chip:AddToTheme({ BackgroundColor3 = "Element" }) Instances:Create("UICorner", { Parent = Chip.Instance, CornerRadius = UDimNew(0, 6) }) local ChipText = Instances:Create("TextLabel", { Parent = Chip.Instance, FontFace = Library.Font, Text = "", Name = "\0", TextSize = 12, TextColor3 = FromRGB(122, 126, 134), BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Center, Size = UDim2New(1, 0, 1, 0), BorderSizePixel = 0, ZIndex = 4505, BackgroundColor3 = FromRGB(255, 255, 255) }) ChipText:AddToTheme({ TextColor3 = "SubText" }) return Row, Text, Chip, ChipText end Library.KeybindList = function(self) local Window = self local Overlay, List = CreateOverlay(Window, "Keybinds") if #Library.Keybinds == 0 then local Row, Text = OverlayRow(List) Text.Instance.Text = "No keybinds configured" else for _, Data in Library.Keybinds do local Row, Text, Chip, ChipText = OverlayRow(List) local KeyName, Mode = Data.Display() Text.Instance.Text = Data.Name ChipText.Instance.Text = StringFormat("%s", tostring(KeyName or "None") .. (Mode and Mode ~= "Toggle" and (" (" .. Mode .. ")") or "")) end end return Overlay end Library.SettingsPanel = function(self) local Window = self local Overlay, List = CreateOverlay(Window, "Settings") for Name, Value in Library.Theme do local Row, Text, Chip = OverlayRow(List) Text.Instance.Text = Name Chip.Instance.Visible = false Library:CreateColorpicker({ Window = Window, Flag = "Theme" .. Name, Default = Value, Parent = Row, Offset = -4, Callback = function(Color) Library.Theme[Name] = Color Library:ChangeTheme(Name, Color) end }) end do local Row, Text = OverlayRow(List) Text.Instance.Text = "Menu Keybind" local ChipText = Instances:Create("TextLabel", { Parent = Row.Instance, FontFace = Library.Font, Text = StringGSub(Library.MenuKeybind, "Enum.KeyCode%.", ""), Name = "\0", TextSize = 12, TextColor3 = FromRGB(122, 126, 134), BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Right, AnchorPoint = Vector2New(1, 0.5), Position = UDim2New(1, 0, 0.5, 0), Size = UDim2New(0, 96, 0, 16), BorderSizePixel = 0, ZIndex = 4504, BackgroundColor3 = FromRGB(255, 255, 255) }) ChipText:AddToTheme({ TextColor3 = "SubText" }) end do local Row = Instances:Create("Frame", { Parent = List.Instance, Name = "\0", BackgroundTransparency = 1, Size = UDim2New(1, 0, 0, 32), BorderSizePixel = 0, ZIndex = 4503, BackgroundColor3 = FromRGB(255, 255, 255) }) local Button = Instances:Create("TextButton", { Parent = Row.Instance, FontFace = Library.Font, Text = "Unload UI", TextSize = 13, TextColor3 = FromRGB(255, 255, 255), AutoButtonColor = false, Size = UDim2New(1, 0, 0, 32), BackgroundColor3 = Library.Theme.Accent, BorderSizePixel = 0, ZIndex = 4504, }) Instances:Create("UICorner", { Parent = Button.Instance, CornerRadius = UDimNew(0, 6) }) Button:Connect("MouseButton1Down", function() task.defer(function() Library:Unload() end) end) end return Overlay end do -- Example local Window = Library:Window({ Logo = "Cart", Title = "UI Market", FadeSpeed = 0.16, SidebarWidth = 182, -- Size = UDim2.new(0, 800, 0, 520) }) local Pages = { } do Window:Seperator("General") Pages["Aim"] = Window:Page({ Name = "Aim Assistance", Icon = "Crosshair", Search = true }) Pages["Visuals"] = Window:Page({ Name = "Visuals", Icon = "Eye", Search = true }) Pages["World"] = Window:Page({ Name = "World", Icon = "Globe", Search = true }) Window:Seperator("Misc") Pages["Player"] = Window:Page({ Name = "Player", Icon = "Person", Search = true }) Pages["Vehicle"] = Window:Page({ Name = "Vehicle", Icon = "Car", Search = true }) Window:Seperator("Config") Pages["Settings"] = Window:Page({ Name = "Settings", Icon = "Settings", Search = false }) Pages["Configs"] = Window:Page({ Name = "Configs", Icon = "Folder", Search = false }) end do -- Aim Assistance local General = Pages["Aim"]:SubPage({ Name = "General", Icon = "Crosshair" }) local Weapon = Pages["Aim"]:SubPage({ Name = "Weapon", Icon = "Bolt" }) local Other = Pages["Aim"]:SubPage({ Name = "Other", Icon = "Dots" }) do -- General local LeftSection = General:Section({ Name = "General", Side = "Left" }) LeftSection:Toggle({ Name = "Enable", Flag = "AimEnable", Default = true, Callback = function(Value) print("Enable", Value) end }) LeftSection:Toggle({ Name = "Hovered", Flag = "AimHovered", Default = false }) LeftSection:Toggle({ Name = "Disabled", Flag = "AimDisabled", Default = false }) local ButtonSection = General:Section({ Name = "Buttons", Side = "Left" }) ButtonSection:Button({ Name = "Button", Callback = function() print("Button") end }) ButtonSection:Button({ Name = "Button", Style = "Dim", Callback = function() print("Button dim") end }) local Second = General:Section({ Name = "General", Side = "Left" }) Second:Toggle({ Name = "Enable", Flag = "AimEnable2", Default = true }) Second:Toggle({ Name = "Hovered", Flag = "AimHovered2", Default = false }) Second:Toggle({ Name = "Disabled", Flag = "AimDisabled2", Default = false }) local RightSection = General:Section({ Name = "Sliders", Side = "Right" }) RightSection:Slider({ Name = "Slider Active", Flag = "AimSlider1", Min = 0, Max = 100, Default = 50, Suffix = "%", Decimals = 0 }) RightSection:Slider({ Name = "Slider Hovered", Flag = "AimSlider2", Min = 0, Max = 100, Default = 50, Suffix = "%", Decimals = 0 }) RightSection:Slider({ Name = "Slider Idle", Flag = "AimSlider3", Min = 0, Max = 100, Default = 50, Suffix = "%", Decimals = 0 }) local Combos = General:Section({ Name = "Combos", Side = "Right" }) Combos:Dropdown({ Name = "Combo Idle", Flag = "Combo1", Items = { "Value", "Value 2", "Value 3" }, MaxSize = 90, Default = "Value" }) Combos:Dropdown({ Name = "Combo Hovered", Flag = "Combo2", Items = { "Value", "Value 2", "Value 3" }, MaxSize = 90 }) Combos:Dropdown({ Name = "Combo Hovered", Flag = "Combo3", Items = { "Value", "Value 2", "Value 3" }, MaxSize = 90 }) local RightSecond = General:Section({ Name = "Sliders", Side = "Right" }) RightSecond:Slider({ Name = "Slider Active", Flag = "AimSlider4", Min = 0, Max = 100, Default = 50, Suffix = "%", Decimals = 0 }) end do -- Weapon local LeftSection = Weapon:Section({ Name = "Weapon", Side = "Left" }) local Enable = LeftSection:Toggle({ Name = "Enable", Flag = "WeaponEnable", Default = false, Callback = function(Value) print("Weapon", Value) end }) Enable:Keybind({ Name = "Keybind", Flag = "WeaponKeybind", Default = Enum.KeyCode.X, Mode = "Toggle" }) Enable:Colorpicker({ Name = "Color", Flag = "WeaponColor", Default = Color3.fromRGB(224, 138, 43) }) LeftSection:Slider({ Name = "Hitbox", Flag = "WeaponHitbox", Min = 0, Max = 100, Default = 25, Suffix = "%", Decimals = 0 }) LeftSection:Keybind({ Name = "Toggle Aim", Flag = "WeaponAimKey", Default = Enum.KeyCode.C, Mode = "Toggle" }) LeftSection:Textbox({ Name = "Weapon Name", Flag = "WeaponName", Placeholder = "Placeholder", Default = "" }) local RightSection = Weapon:Section({ Name = "Options", Side = "Right" }) RightSection:Label("Accent Color", "Left"):Colorpicker({ Name = "Accent", Flag = "WeaponAccent", Default = Library.Theme.Accent, Callback = function(Color) Library.Theme.Accent = Color; Library:ChangeTheme("Accent", Color) end }) RightSection:Dropdown({ Name = "Hit Parts", Flag = "HitParts", Items = { "Head", "Torso", "HumanoidRootPart" }, Multi = true, MaxSize = 90 }) end do -- Other local LeftSection = Other:Section({ Name = "Other", Side = "Left" }) LeftSection:Toggle({ Name = "Notifications", Flag = "OtherNotif", Default = false, Callback = function(Value) if Value then Library:Notification("UI Market", "Notifications enabled", 3) end end }) LeftSection:Button({ Name = "Reload UI", Style = "Dim", Callback = function() print("Reload") end }) local RightSection = Other:Section({ Name = "Info", Side = "Right" }) RightSection:Label("Press the menu keybind to hide or show the window.", "Left") end end do -- Visuals / World / Player / Vehicle placeholders local Visuals = Pages["Visuals"]:SubPage({ Name = "General", Icon = "Eye" }) local VisualsSection = Visuals:Section({ Name = "Visuals", Side = "Left" }) VisualsSection:Toggle({ Name = "Box ESP", Flag = "VisualsBox", Default = false }) VisualsSection:Toggle({ Name = "Name ESP", Flag = "VisualsName", Default = false }) VisualsSection:Slider({ Name = "Distance", Flag = "VisualsDistance", Min = 0, Max = 5000, Default = 1000, Suffix = " studs", Decimals = 0 }) local World = Pages["World"]:SubPage({ Name = "General", Icon = "Globe" }) local WorldSection = World:Section({ Name = "World", Side = "Left" }) WorldSection:Toggle({ Name = "Fullbright", Flag = "WorldFullbright", Default = false }) WorldSection:Toggle({ Name = "Remove Fog", Flag = "WorldFog", Default = false }) local Player = Pages["Player"]:SubPage({ Name = "General", Icon = "Person" }) local PlayerSection = Player:Section({ Name = "Player", Side = "Left" }) PlayerSection:Slider({ Name = "Walk Speed", Flag = "WalkSpeed", Min = 16, Max = 200, Default = 16, Decimals = 0 }) PlayerSection:Slider({ Name = "Jump Power", Flag = "JumpPower", Min = 50, Max = 500, Default = 50, Decimals = 0 }) local Vehicle = Pages["Vehicle"]:SubPage({ Name = "General", Icon = "Car" }) local VehicleSection = Vehicle:Section({ Name = "Vehicle", Side = "Left" }) VehicleSection:Toggle({ Name = "Vehicle Fly", Flag = "VehicleFly", Default = false }) VehicleSection:Slider({ Name = "Speed", Flag = "VehicleSpeed", Min = 10, Max = 500, Default = 100, Decimals = 0 }) end do -- Settings local Settings = Pages["Settings"]:SubPage({ Name = "Settings", Icon = "Settings" }) local ThemingSection = Settings:Section({ Name = "Theming", Side = "Right" }) do for Index, Value in Library.Theme do ThemingSection:Label(Index, "Left"):Colorpicker({ Name = Index, Flag = "Theme" .. Index, Default = Value, Callback = function(Value2) Library.Theme[Index] = Value2 Library:ChangeTheme(Index, Value2) end }) end end local GeneralSection = Settings:Section({ Name = "General", Side = "Left" }) GeneralSection:Keybind({ Name = "Menu Keybind", Flag = "MenuKeybind", Default = Enum.KeyCode.Z, Mode = "Toggle", Callback = function(Value) Library.MenuKeybind = tostring(Enum.KeyCode.Z) end }) GeneralSection:Toggle({ Name = "Show Keybinds Overlay", Flag = "ShowBinds", Default = false, Callback = function(Value) if Value then Window:KeybindList() end end }) end do -- Configs local Configs = Pages["Configs"]:SubPage({ Name = "Configs", Icon = "Folder" }) local ConfigsSection = Configs:Section({ Name = "Configs", Side = "Left" }) do local ConfigName = "" local ConfigSelected = nil local ConfigsDropdown = ConfigsSection:Dropdown({ Name = "Configs", Flag = "ConfigsList", Items = { }, Multi = false, MaxSize = 85, Callback = function(Value) ConfigSelected = Value end }) ConfigsSection:Textbox({ Name = "Config Name", Default = "", Flag = "ConfigName", Placeholder = "...", Callback = function(Value) ConfigName = Value end }) ConfigsSection:Button({ Name = "Load Config", Callback = function() if not ConfigSelected then return end local Path = Library.Folders.Configs .. "/" .. ConfigSelected .. ".json" local Ok, Data = pcall(readfile, Path) if not Ok then Library:Notification("Error", "Config not found", 3) return end Library:LoadConfig(Data) Library:Notification("Config", "Loaded " .. ConfigSelected, 3) end }):SubButton({ Name = "Save Config", Callback = function() Library:SaveConfig(ConfigSelected) end }) ConfigsSection:Button({ Name = "Create Config", Callback = function() local Path = Library.Folders.Configs .. "/" .. ConfigName .. ".json" if ConfigName == "" then return end if isfile(Path) then Library:Notification("Error", "Config already exists", 3) return end local Ok = pcall(writefile, Path, Library:GetConfig()) if Ok then Library:RefreshConfigsList(ConfigsDropdown) Library:Notification("Config", "Created " .. ConfigName, 3) end end }):SubButton({ Name = "Delete Config", Callback = function() if not ConfigSelected then return end Library:DeleteConfig(ConfigSelected) Library:RefreshConfigsList(ConfigsDropdown) end }) Library:RefreshConfigsList(ConfigsDropdown) end end end Library:Notification("UI Market", "Loaded - menu key: " .. StringGSub(Library.MenuKeybind, "Enum.KeyCode%.", ""), 4) end getgenv().Library = Library return Library