local LoadingTick = os.clock() local Library do -- Services local Workspace = game:GetService("Workspace") local UserInputService = game:GetService("UserInputService") local Players = game:GetService("Players") local HttpService = game:GetService("HttpService") local RunService = game:GetService("RunService") local CoreGui = cloneref and cloneref(game:GetService("CoreGui")) or game:GetService("CoreGui") local TweenService = game:GetService("TweenService") gethui = gethui or function() return CoreGui end -- Variables local LocalPlayer = Players.LocalPlayer local Camera = Workspace.CurrentCamera local Mouse = cloneref(LocalPlayer:GetMouse()) -- Globals 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 MathClamp = math.clamp local MathFloor = math.floor local MathAbs = math.abs local MathSin = math.sin local TableInsert = table.insert local TableFind = table.find local TableRemove = table.remove local TableConcat = table.concat local TableClone = table.clone local TableUnpack = table.unpack local StringFormat = string.format local StringFind = string.find local StringGSub = string.gsub local StringLower = string.lower local StringSub = string.sub local StringLen = string.len local InstanceNew = Instance.new local RectNew = Rect.new local IsMobile = UserInputService.TouchEnabled or false Library = { Theme = { }, MenuKeybind = tostring(Enum.KeyCode.Z), Flags = { }, FadeSpeed = 0.3, Tween = { Time = 0.3, Style = Enum.EasingStyle.Cubic, Direction = Enum.EasingDirection.Out }, Folders = { Directory = "midnighthub", Configs = "midnighthub/Configs", Assets = "midnighthub/Assets", }, 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" }, }, Pages = { }, Sections = { }, Connections = { }, Threads = { }, ThemeMap = { }, ThemeItems = { }, OpenFrames = { }, SetFlags = { }, UnnamedConnections = 0, UnnamedFlags = 0, Colorpickers = { }, Holder = nil, NotifHolder = nil, UnusedHolder = nil, CopiedColor = false, Font = nil } Library.__index = Library Library.Pages.__index = Library.Pages Library.Sections.__index = Library.Sections local Themes = { ["Default"] = { ["Background"] = FromRGB(15, 14, 18), ["Inline"] = FromRGB(26, 24, 31), ["Text"] = FromRGB(255, 255, 255), ["Element"] = FromRGB(40, 38, 49), ["Accent"] = FromRGB(255, 0, 0), ["Image"] = FromRGB(255, 255, 255), ["Gradient"] = FromRGB(211, 211, 211) } } Library.Theme = TableClone(Themes["Default"]) 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" } -- Folders for Index, Value in Library.Folders do if not isfolder(Value) then makefolder(Value) end end -- Images for Index, Value in Library.Images do local ImageData = Value local ImageName = ImageData[1] local ImageLink = ImageData[2] if not isfile(Library.Folders.Assets .. "/" .. ImageName) then writefile(Library.Folders.Assets .. "/" .. ImageName, game:HttpGet(ImageLink)) end 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 TweenInfo.new(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.GetProperty = function(self, Item) Item = Item or self.Item if Item:IsA("Frame") then return { "BackgroundTransparency" } elseif Item:IsA("TextLabel") or Item:IsA("TextButton") 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("TextBox") then return { "TextTransparency", "BackgroundTransparency" } elseif Item:IsA("UIStroke") then return { "Transparency" } end end Tween.FadeItem = function(self, Item, Property, Visibility, Speed) local Item = Item or self.Item local OldTransparency = Item[Property] Item[Property] = Visibility and 1 or OldTransparency local NewTween = Tween:Create(Item, TweenInfo.new(Speed or Library.FadeSpeed, 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 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 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, Class = Class } setmetatable(NewItem, Instances) for Property, Value in NewItem.Properties do NewItem.Instance[Property] = Value end return NewItem end Instances.AddToTheme = function(self, Properties) if not self.Instance then return end Library:AddToTheme(self, Properties) end Instances.ChangeItemTheme = function(self, Properties) if not self.Instance then return end Library:ChangeItemTheme(self, Properties) end Instances.Set = function(self, Property, Value) if not self.Instance then return end if not self.Instance[Property] then return end self.Instance[Property] = Value end Instances.Connect = function(self, Event, Callback, Name) if not self.Instance then return end if not self.Instance[Event] then return end if IsMobile then if Event == "MouseButton1Down" or Event == "MouseButton1Click" then Event = "TouchTap" elseif Event == "MouseButton2Down" or Event == "MouseButton2Click" then Event = "TouchLongPress" end 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) if not self.Instance then return end local Gui = self.Instance local Dragging = false local DragStart local StartPosition local InputChanged local Set = function(Input) local DragDelta = Input.Position - DragStart self:Tween(TweenInfo.new(0.16, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2New(StartPosition.X.Scale, StartPosition.X.Offset + DragDelta.X, StartPosition.Y.Scale, StartPosition.Y.Offset + DragDelta.Y)}) end self:Connect("InputBegan", function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then Dragging = true DragStart = Input.Position StartPosition = Gui.Position if InputChanged then return end InputChanged = Input.Changed:Connect(function() if Input.UserInputState == Enum.UserInputState.End then Dragging = false if InputChanged then InputChanged:Disconnect() InputChanged = nil end end end) end end) Library:Connect(UserInputService.InputChanged, function(Input) if Input.UserInputType == Enum.UserInputType.MouseMovement or Input.UserInputType == Enum.UserInputType.Touch then if Dragging then Set(Input) end end end) return Dragging end Instances.MakeResizeable = function(self, Minimum, Maximum) if not self.Instance then return end local Gui = self.Instance local Resizing = false local Start = UDim2New() local Delta = UDim2New() local ResizeMax = Gui.Parent.AbsoluteSize - Gui.AbsoluteSize local InputChanged local ResizeButton = Instances:Create("ImageButton", { Parent = Gui, Image = "rbxassetid://7368471234", AnchorPoint = Vector2New(1, 1), BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(0, 7, 0, 7), Position = UDim2New(1, -3, 1, -3), Name = "\0", BorderSizePixel = 0, BackgroundTransparency = 1, ZIndex = 5, AutoButtonColor = false, Visible = true, }) ResizeButton:AddToTheme({ImageColor3 = "Accent"}) 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) if InputChanged then return end Input.Changed:Connect(function() if Input.UserInputState == Enum.UserInputState.End then Resizing = false if InputChanged then InputChanged:Disconnect() InputChanged = nil end end end) end end) Library:Connect(UserInputService.InputChanged, function(Input) if Input.UserInputType == Enum.UserInputType.MouseMovement or Input.UserInputType == Enum.UserInputType.Touch then if Resizing then ResizeMax = Maximum or Gui.Parent.AbsoluteSize - Gui.AbsoluteSize Delta = Start + UDim2New(0, Input.Position.X, 0, Input.Position.Y) Delta = UDim2New(0, math.clamp(Delta.X.Offset, Minimum.X, ResizeMax.X), 0, math.clamp(Delta.Y.Offset, Minimum.Y, ResizeMax.Y)) Tween:Create(Gui, TweenInfo.new(0.17, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Size = Delta}, true) end end end) return ResizeButton 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 -- Custom font local CustomFont = { } do function CustomFont:New(Name, Weight, Style, Data) if isfile(Library.Folders.Assets .. "/" .. Name .. ".json") then return Font.new(getcustomasset(Library.Folders.Assets .. "/" .. Name .. ".json")) end if not isfile(Library.Folders.Assets .. "/" .. Name .. ".ttf") then writefile(Library.Folders.Assets .. "/" .. Name .. ".ttf", game:HttpGet(Data.Url)) end local FontData = { name = Name, faces = { { name = "Regular", weight = Weight, style = Style, assetId = getcustomasset(Library.Folders.Assets .. "/" .. Name .. ".ttf") } } } writefile(Library.Folders.Assets .. "/" .. Name .. ".json", HttpService:JSONEncode(FontData)) return Font.new(getcustomasset(Library.Folders.Assets .. "/" .. Name .. ".json")) end function CustomFont:Get(Name) if isfile(Library.Folders.Assets .. "/" .. Name .. ".json") then return Font.new(getcustomasset(Library.Folders.Assets .. "/" .. Name .. ".json")) end end CustomFont:New("PoppinsMedium", 400, "Regular", { Url = "https://github.com/sametexe001/luas/raw/refs/heads/main/fonts/Poppins-Medium.ttf" }) Library.Font = CustomFont:Get("PoppinsMedium") end Library.Holder = Instances:Create("ScreenGui", { Parent = gethui(), Name = "\0", ZIndexBehavior = Enum.ZIndexBehavior.Global, DisplayOrder = 2, ResetOnSpawn = false }) Library.UnusedHolder = Instances:Create("ScreenGui", { Parent = gethui(), Name = "\0", ZIndexBehavior = Enum.ZIndexBehavior.Global, Enabled = false, }) Library.NotifHolder = Instances:Create("Frame", { Parent = Library.Holder.Instance, Name = "\0", BackgroundTransparency = 1, Size = UDim2New(0, 0, 1, 0), BorderColor3 = FromRGB(0, 0, 0), BorderSizePixel = 0, AutomaticSize = Enum.AutomaticSize.X, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UIListLayout", { Parent = Library.NotifHolder.Instance, Name = "\0", VerticalAlignment = Enum.VerticalAlignment.Bottom, Padding = UDimNew(0, 14), SortOrder = Enum.SortOrder.LayoutOrder }) Instances:Create("UIPadding", { Parent = Library.NotifHolder.Instance, Name = "\0", PaddingTop = UDimNew(0, 12), PaddingBottom = UDimNew(0, 12), PaddingRight = UDimNew(0, 12), PaddingLeft = UDimNew(0, 12) }) Library.Unload = function(self) for Index, Value in self.Connections do Value.Connection:Disconnect() end for Index, Value in self.Threads do coroutine.close(Value) end if self.Holder then self.Holder:Clean() end Library = nil getgenv().Library = nil end Library.GetImage = function(self, Image) local ImageData = self.Images[Image] if not ImageData then return end return getcustomasset(self.Folders.Assets .. "/" .. ImageData[1]) end Library.Round = function(self, Number, Float) local Multiplier = 1 / (Float or 1) return MathFloor(Number * Multiplier) / Multiplier end Library.Thread = function(self, Function) local NewThread = coroutine.create(Function) coroutine.wrap(function() coroutine.resume(NewThread) end)() TableInsert(self.Threads, NewThread) return NewThread end Library.SafeCall = function(self, Function, ...) local Arguements = { ... } local Success, Result = pcall(Function, TableUnpack(Arguements)) if not Success then warn(Result) return false end return Success end Library.Connect = function(self, Event, Callback, Name) Name = Name or StringFormat("Connection%s%s", self.UnnamedConnections + 1, HttpService:GenerateGUID(false)) local NewConnection = { Event = Event, Callback = Callback, Name = Name, Connection = nil } Library:Thread(function() NewConnection.Connection = Event:Connect(Callback) end) TableInsert(self.Connections, NewConnection) return NewConnection end Library.Disconnect = function(self, Name) for _, Connection in self.Connections do if Connection.Name == Name then Connection.Connection:Disconnect() break end end end Library.NextFlag = function(self) local FlagNumber = self.UnnamedFlags + 1 return StringFormat("Flag%s%s", FlagNumber, HttpService:GenerateGUID(false)) end Library.LimitHeight = function(self, Item, MaxHeight) Item = Item.Instance local AbsoluteSize = Item.AbsoluteSize if AbsoluteSize.Y >= MaxHeight then Item.Size = UDim2New(0, AbsoluteSize.X, 0, MaxHeight) end end Library.AddToTheme = function(self, Item, Properties) Item = Item.Instance or Item local ThemeData = { Item = Item, Properties = Properties, } for Property, Value in ThemeData.Properties do if type(Value) == "string" then Item[Property] = self.Theme[Value] else Item[Property] = Value() end end TableInsert(self.ThemeItems, ThemeData) self.ThemeMap[Item] = ThemeData end Library.RemoveFromTheme = function(self, Item) Item = Item.Instance or Item if not self.ThemeMap[Item] then return end self.ThemeMap[Item].Properties = nil self.ThemeMap[Item] = nil end Library.ChangeItemTheme = function(self, Item, Properties) Item = Item.Instance or Item if not self.ThemeMap[Item] then return end self.ThemeMap[Item].Properties = Properties self.ThemeMap[Item] = self.ThemeMap[Item] end Library.ChangeTheme = function(self, Theme, Color) self.Theme[Theme] = Color for _, Item in self.ThemeItems do for Property, Value in Item.Properties do if type(Value) == "string" and Value == Theme then Item.Item[Property] = Color elseif type(Value) == "function" then Item.Item[Property] = Value() end end end end Library.GetConfig = function(self) local Config = { } local Success, Result = Library:SafeCall(function() for Index, Value in Library.Flags do if type(Value) == "table" and Value.Key then Config[Index] = {Key = tostring(Value.Key), Mode = Value.Mode} elseif type(Value) == "table" and Value.Color then Config[Index] = {Color = "#" .. Value.Color, Alpha = Value.Alpha} else Config[Index] = Value end end end) return HttpService:JSONEncode(Config) end Library.LoadConfig = function(self, Config) local Decoded = HttpService:JSONDecode(Config) local Success, Result = Library:SafeCall(function() for Index, Value in Decoded do local SetFunction = Library.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) return Success, Result end Library.DeleteConfig = function(self, Config) if isfile(Library.Folders.Configs .. "/" .. Config) then delfile(Library.Folders.Configs .. "/" .. Config) end end Library.RefreshConfigsList = function(self, Element) local CurrentList = { } local List = { } local ConfigFolderName = StringGSub(Library.Folders.Configs, Library.Folders.Directory .. "/", "") for Index, Value in listfiles(Library.Folders.Configs) do local FileName = StringGSub(Value, Library.Folders.Directory .. "\\" .. ConfigFolderName .. "\\", "") List[Index] = FileName end local IsNew = #List ~= CurrentList if not IsNew then for Index = 1, #List do if List[Index] ~= CurrentList[Index] then IsNew = true break end end else CurrentList = List Element:Refresh(CurrentList) end end Library.IsMouseOverFrame = function(self, Frame) Frame = Frame.Instance local MousePosition = Vector2New(Mouse.X, Mouse.Y) return MousePosition.X >= Frame.AbsolutePosition.X and MousePosition.X <= Frame.AbsolutePosition.X + Frame.AbsoluteSize.X and MousePosition.Y >= Frame.AbsolutePosition.Y and MousePosition.Y <= Frame.AbsolutePosition.Y + Frame.AbsoluteSize.Y end local Components = { } do -- Components Components.Toggle = function(self, Data) local Toggle = { Flag = Data.Flag, Value = false } local Items = { } do Items["Toggle"] = Instances:Create("TextButton", { Parent = Data.Parent.Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(0, 0, 0), BorderColor3 = FromRGB(0, 0, 0), Text = "", AutoButtonColor = false, BackgroundTransparency = 1, ZIndex = 2, Size = UDim2New(1, 0, 0, 16), BorderSizePixel = 0, TextSize = 14, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"] = Instances:Create("TextLabel", { Parent = Items["Toggle"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), Text = Data.Name, AnchorPoint = Vector2New(0, 0.5), Size = UDim2New(0, 0, 0, 15), BackgroundTransparency = 1, Position = UDim2New(0, 0, 0.5, 0), ZIndex = 2, BorderSizePixel = 0, AutomaticSize = Enum.AutomaticSize.X, TextSize = 16, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"]:AddToTheme({TextColor3 = "Text"}) Items["Indicator"] = Instances:Create("Frame", { Parent = Items["Toggle"].Instance, Name = "\0", AnchorPoint = Vector2New(1, 0), Position = UDim2New(1, 0, 0, 0), ZIndex = 2, BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(0, 18, 0, 18), BorderSizePixel = 0, BackgroundColor3 = FromRGB(40, 38, 49) }) Items["Indicator"]:AddToTheme({BackgroundColor3 = "Element"}) Instances:Create("UICorner", { Parent = Items["Indicator"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Instances:Create("UIGradient", { Parent = Items["Indicator"].Instance, Name = "\0", Rotation = 90, Color = RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, FromRGB(211, 211, 211))} }):AddToTheme({Color = function() return RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, Library.Theme["Gradient"])} end}) Items["Check"] = Instances:Create("ImageLabel", { Parent = Items["Indicator"].Instance, Name = "\0", ImageColor3 = FromRGB(0, 0, 0), ImageTransparency = 1, BorderColor3 = FromRGB(0, 0, 0), AnchorPoint = Vector2New(0.5, 0.5), Image = "rbxassetid://100217033137980", BackgroundTransparency = 1, Position = UDim2New(0.5, 0, 0.5, 0), ZIndex = 2, Size = UDim2New(1, -4, 1, -4), BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["SubElements"] = Instances:Create("Frame", { Parent = Items["Toggle"].Instance, Name = "\0", BorderColor3 = FromRGB(0, 0, 0), AnchorPoint = Vector2New(1, 0), BackgroundTransparency = 1, Position = UDim2New(1, -24, 0, 0), Size = UDim2New(0, 0, 1, 0), ZIndex = 2, BorderSizePixel = 0, AutomaticSize = Enum.AutomaticSize.X, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UIListLayout", { Parent = Items["SubElements"].Instance, Name = "\0", FillDirection = Enum.FillDirection.Horizontal, HorizontalAlignment = Enum.HorizontalAlignment.Right, Padding = UDimNew(0, 6), SortOrder = Enum.SortOrder.LayoutOrder }) end function Toggle:Get() return self.Value end function Toggle:Set(Bool) self.Value = Bool Library.Flags[self.Flag] = self.Value if self.Value then Items["Indicator"]:ChangeItemTheme({BackgroundColor3 = "Accent"}) Items["Indicator"]:Tween(nil, {BackgroundColor3 = Library.Theme.Accent}) Items["Check"]:Tween(nil, {ImageTransparency = 0}) else Items["Indicator"]:ChangeItemTheme({BackgroundColor3 = "Element"}) Items["Indicator"]:Tween(nil, {BackgroundColor3 = Library.Theme.Element}) Items["Check"]:Tween(nil, {ImageTransparency = 1}) end if Data.Callback then Library:SafeCall(Data.Callback, self.Value) end end function Toggle:SetVisibility(Bool) Items["Toggle"].Instance.Visible = Bool end Items["Toggle"]:Connect("MouseButton1Down", function() Toggle:Set(not Toggle.Value) end) Toggle:Set(Data.Default) Library.SetFlags[Toggle.Flag] = function(Value) Toggle:Set(Value) end return Toggle, Items end Components.Button = function(self, Data) local Button = { } local Items = { } do Items["Button"] = Instances:Create("Frame", { Parent = Data.Parent.Instance, Name = "\0", BackgroundTransparency = 1, BorderColor3 = FromRGB(0, 0, 0), ZIndex = 2, Size = UDim2New(1, 0, 0, 25), BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UIListLayout", { Parent = Items["Button"].Instance, Name = "\0", FillDirection = Enum.FillDirection.Horizontal, HorizontalFlex = Enum.UIFlexAlignment.Fill, Padding = UDimNew(0, 8), SortOrder = Enum.SortOrder.LayoutOrder }) end function Button:Add(Name, Callback) local SubButton = { } local SubItems = { } SubItems["NewButton"] = Instances:Create("TextButton", { Parent = Items["Button"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(0, 0, 0), BorderColor3 = FromRGB(0, 0, 0), Text = "", AutoButtonColor = false, Size = UDim2New(1, 0, 1, 0), BorderSizePixel = 0, ZIndex = 2, TextSize = 14, BackgroundColor3 = FromRGB(40, 38, 49) }) SubItems["NewButton"]:AddToTheme({BackgroundColor3 = "Element"}) Instances:Create("UICorner", { Parent = SubItems["NewButton"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Instances:Create("UIGradient", { Parent = SubItems["NewButton"].Instance, Name = "\0", Rotation = 90, Color = RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, FromRGB(211, 211, 211))} }):AddToTheme({Color = function() return RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, Library.Theme["Gradient"])} end}) SubItems["Text"] = Instances:Create("TextLabel", { Parent = SubItems["NewButton"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), Text = Name, AnchorPoint = Vector2New(0.5, 0.5), Size = UDim2New(0, 0, 0, 15), BackgroundTransparency = 1, Position = UDim2New(0.5, 0, 0.5, 0), ZIndex = 2, BorderSizePixel = 0, AutomaticSize = Enum.AutomaticSize.X, TextSize = 16, BackgroundColor3 = FromRGB(255, 255, 255) }) SubItems["Text"]:AddToTheme({TextColor3 = "Text"}) function SubButton:Press() SubItems["NewButton"]:ChangeItemTheme({BackgroundColor3 = "Accent"}) SubItems["NewButton"]:Tween(nil, {BackgroundColor3 = Library.Theme.Accent}) Library:SafeCall(Callback) task.wait(0.1) SubItems["NewButton"]:ChangeItemTheme({BackgroundColor3 = "Element"}) SubItems["NewButton"]:Tween(nil, {BackgroundColor3 = Library.Theme.Element}) end SubItems["NewButton"]:Connect("MouseButton1Down", function() SubButton:Press() end) return SubButton, SubItems end return Button, Items end Components.Slider = function(self, Data) local Slider = { Flag = Data.Flag, Value = 0, Sliding = false } local Items = { } do Items["Slider"] = Instances:Create("Frame", { Parent = Data.Parent.Instance, Name = "\0", BackgroundTransparency = 1, BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(1, 0, 0, 33), ZIndex = 2, BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"] = Instances:Create("TextLabel", { Parent = Items["Slider"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), Text = Data.Name, ZIndex = 2, BackgroundTransparency = 1, Size = UDim2New(0, 0, 0, 15), BorderSizePixel = 0, AutomaticSize = Enum.AutomaticSize.X, TextSize = 16, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"]:AddToTheme({TextColor3 = "Text"}) Items["RealSlider"] = Instances:Create("TextButton", { Parent = Items["Slider"].Instance, Text = "", AutoButtonColor = false, Name = "\0", AnchorPoint = Vector2New(0, 1), Position = UDim2New(0, 0, 1, 0), BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(1, 0, 0, 12), ZIndex = 2, BorderSizePixel = 0, BackgroundColor3 = FromRGB(40, 38, 49), ClipsDescendants = true, }) Items["RealSlider"]:AddToTheme({BackgroundColor3 = "Element"}) Instances:Create("UICorner", { Parent = Items["RealSlider"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Instances:Create("UIGradient", { Parent = Items["RealSlider"].Instance, Name = "\0", Rotation = 90, Color = RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, FromRGB(211, 211, 211))} }):AddToTheme({Color = function() return RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, Library.Theme["Gradient"])} end}) Items["Accent"] = Instances:Create("Frame", { Parent = Items["RealSlider"].Instance, Name = "\0", BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(0.30000001192092896, 0, 1, 0), BorderSizePixel = 0, ZIndex = 2, BackgroundColor3 = FromRGB(0, 178, 255) }) Items["Accent"]:AddToTheme({BackgroundColor3 = "Accent"}) Instances:Create("UICorner", { Parent = Items["Accent"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Items["Circle"] = Instances:Create("Frame", { Parent = Items["Accent"].Instance, Name = "\0", AnchorPoint = Vector2New(1, 0.5), Position = UDim2New(1, -3, 0.5, 0), BorderColor3 = FromRGB(0, 0, 0), ZIndex = 2, Size = UDim2New(0, 8, 0, 8), BorderSizePixel = 0, BackgroundColor3 = FromRGB(40, 38, 49) }) Items["Circle"]:AddToTheme({BackgroundColor3 = "Element"}) Instances:Create("UICorner", { Parent = Items["Circle"].Instance, Name = "\0", CornerRadius = UDimNew(1, 0) }) Instances:Create("UIGradient", { Parent = Items["Accent"].Instance, Name = "\0", Rotation = 90, Color = RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, FromRGB(211, 211, 211))} }):AddToTheme({Color = function() return RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, Library.Theme["Gradient"])} end}) Items["Value"] = Instances:Create("TextLabel", { Parent = Items["Slider"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(255, 255, 255), ZIndex = 2, BorderColor3 = FromRGB(0, 0, 0), Text = "20s", AnchorPoint = Vector2New(1, 0), Size = UDim2New(0, 0, 0, 15), BackgroundTransparency = 1, Position = UDim2New(1, -1, 0, 0), BorderSizePixel = 0, AutomaticSize = Enum.AutomaticSize.X, TextSize = 16, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Value"]:AddToTheme({TextColor3 = "Text"}) end function Slider:Get() return self.Value end function Slider:Set(Value) self.Value = MathClamp(Library:Round(Value, Data.Decimals), Data.Min, Data.Max) Library.Flags[self.Flag] = self.Value Items["Accent"]:Tween(TweenInfo.new(0.21, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Size = UDim2New((self.Value - Data.Min) / (Data.Max - Data.Min), 0, 1, 0)}) Items["Value"].Instance.Text = StringFormat("%s%s", tostring(self.Value), Data.Suffix) if Data.Callback then Library:SafeCall(Data.Callback, self.Value) end end function Slider:SetVisibility(Bool) Items["Slider"].Instance.Visible = Bool end local InputChanged Items["RealSlider"]:Connect("InputBegan", function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then Slider.Sliding = true local SizeX = (Input.Position.X - Items["RealSlider"].Instance.AbsolutePosition.X) / Items["RealSlider"].Instance.AbsoluteSize.X local Value = ((Data.Max - Data.Min) * SizeX) + Data.Min Slider:Set(Value) if InputChanged then return end InputChanged = Input.Changed:Connect(function() if Input.UserInputState == Enum.UserInputState.End then Slider.Sliding = false InputChanged:Disconnect() InputChanged = nil 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 local SizeX = (Input.Position.X - Items["RealSlider"].Instance.AbsolutePosition.X) / Items["RealSlider"].Instance.AbsoluteSize.X local Value = ((Data.Max - Data.Min) * SizeX) + Data.Min Slider:Set(Value) end end end) if Data.Default then Slider:Set(Data.Default) end Library.SetFlags[Slider.Flag] = function(Value) Slider:Set(Value) end return Slider, Items end Components.Dropdown = function(self, Data) local Dropdown = { Flag = Data.Flag, IsOpen = false, Value = { }, Options = { }, } local Items = { } do Items["Dropdown"] = Instances:Create("Frame", { Parent = Data.Parent.Instance, Name = "\0", BackgroundTransparency = 1, BorderColor3 = FromRGB(0, 0, 0), ZIndex = 2, Size = UDim2New(1, 0, 0, 47), BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"] = Instances:Create("TextLabel", { Parent = Items["Dropdown"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), Text = Data.Name, BackgroundTransparency = 1, Size = UDim2New(0, 0, 0, 15), BorderSizePixel = 0, AutomaticSize = Enum.AutomaticSize.X, TextSize = 16, ZIndex = 2, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"]:AddToTheme({TextColor3 = "Text"}) Items["RealDropdown"] = Instances:Create("TextButton", { Parent = Items["Dropdown"].Instance, Text = "", AutoButtonColor = false, Name = "\0", AnchorPoint = Vector2New(0, 1), Position = UDim2New(0, 0, 1, 0), BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(1, 0, 0, 25), ZIndex = 2, BorderSizePixel = 0, BackgroundColor3 = FromRGB(40, 38, 49) }) Items["RealDropdown"]:AddToTheme({BackgroundColor3 = "Element"}) Instances:Create("UICorner", { Parent = Items["RealDropdown"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Instances:Create("UIGradient", { Parent = Items["RealDropdown"].Instance, Name = "\0", Rotation = 90, Color = RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, FromRGB(211, 211, 211))} }):AddToTheme({Color = function() return RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, Library.Theme["Gradient"])} end}) Items["Value"] = Instances:Create("TextLabel", { Parent = Items["RealDropdown"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), Text = "--", ZIndex = 2, AnchorPoint = Vector2New(0, 0.5), Size = UDim2New(0, 0, 0, 15), BackgroundTransparency = 1, Position = UDim2New(0, 8, 0.5, 0), BorderSizePixel = 0, AutomaticSize = Enum.AutomaticSize.X, TextSize = 16, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Value"]:AddToTheme({TextColor3 = "Text"}) Items["Icon"] = Instances:Create("ImageLabel", { Parent = Items["RealDropdown"].Instance, Name = "\0", ImageColor3 = FromRGB(0, 178, 255), BorderColor3 = FromRGB(0, 0, 0), AnchorPoint = Vector2New(1, 0.5), Image = "rbxassetid://128566166363342", BackgroundTransparency = 1, ZIndex = 2, Position = UDim2New(1, -6, 0.5, 0), Size = UDim2New(0, 16, 0, 16), BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Icon"]:AddToTheme({ImageColor3 = "Accent"}) Items["OptionHolder"] = Instances:Create("TextButton", { Parent = Items["Dropdown"].Instance, Name = "\0", Visible = false, Active = false, BorderColor3 = FromRGB(0, 0, 0), Text = "", AutoButtonColor = false, Size = UDim2New(1, 0, 0, 15), Position = UDim2New(0, 0, 1, 6), Selectable = false, BorderSizePixel = 0, AutomaticSize = Enum.AutomaticSize.Y, BackgroundColor3 = FromRGB(26, 24, 31) }) Items["OptionHolder"]:AddToTheme({BackgroundColor3 = "Inline"}) Instances:Create("UICorner", { Parent = Items["OptionHolder"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Items["Search"] = Instances:Create("Frame", { Parent = Items["OptionHolder"].Instance, Name = "\0", Position = UDim2New(0, 8, 0, 8), BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(1, -16, 0, 30), BorderSizePixel = 0, BackgroundColor3 = FromRGB(15, 14, 18) }) Items["Search"]:AddToTheme({BackgroundColor3 = "Background"}) Instances:Create("UICorner", { Parent = Items["Search"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Instances:Create("UIGradient", { Parent = Items["Search"].Instance, Name = "\0", Rotation = 90, Color = RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, FromRGB(211, 211, 211))} }):AddToTheme({Color = function() return RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, Library.Theme["Gradient"])} end}) Items["SearchIcon"] = Instances:Create("ImageLabel", { Parent = Items["Search"].Instance, Name = "\0", ImageTransparency = 0.5, BorderColor3 = FromRGB(0, 0, 0), AnchorPoint = Vector2New(0, 0.5), Image = "rbxassetid://114830812626361", BackgroundTransparency = 1, Position = UDim2New(0, 6, 0.5, 0), Size = UDim2New(0, 16, 0, 16), BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["SearchIcon"]:AddToTheme({ImageColor3 = "Image"}) Items["Input"] = Instances:Create("TextBox", { Parent = Items["Search"].Instance, Name = "\0", FontFace = Library.Font, AnchorPoint = Vector2New(0, 0.5), PlaceholderColor3 = FromRGB(185, 185, 185), PlaceholderText = "Search", TextSize = 16, Size = UDim2New(1, -40, 0, 15), TextColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), Text = "", BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, Position = UDim2New(0, 32, 0.5, 1), ClearTextOnFocus = false, BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Input"]:AddToTheme({TextColor3 = "Text"}) Instances:Create("UIPadding", { Parent = Items["OptionHolder"].Instance, Name = "\0", PaddingBottom = UDimNew(0, 8) }) Items["Holder"] = Instances:Create("ScrollingFrame", { Parent = Items["OptionHolder"].Instance, Name = "\0", Active = true, AutomaticCanvasSize = Enum.AutomaticSize.Y, BorderSizePixel = 0, CanvasSize = UDim2New(0, 0, 0, 0), ScrollBarImageColor3 = FromRGB(0, 178, 255), MidImage = "rbxassetid://123813291349824", BorderColor3 = FromRGB(0, 0, 0), ScrollBarThickness = 2, Size = UDim2New(1, -16, 0, 125), BackgroundTransparency = 1, Position = UDim2New(0, 8, 0, 48), BottomImage = "rbxassetid://123813291349824", TopImage = "rbxassetid://123813291349824", BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Holder"]:AddToTheme({ScrollBarImageColor3 = "Accent"}) Instances:Create("UIListLayout", { Parent = Items["Holder"].Instance, Name = "\0", Padding = UDimNew(0, 4), SortOrder = Enum.SortOrder.LayoutOrder }) end function Dropdown:Get() return self.Value end local Debounce = false local RenderStepped function Dropdown:SetOpen(Bool) if Debounce then return end self.IsOpen = Bool Debounce = true Items["OptionHolder"].Instance.Visible = self.IsOpen Items["OptionHolder"].Instance.Parent = self.IsOpen and Library.Holder.Instance or Library.UnusedHolder.Instance if self.IsOpen then Items["Icon"]:Tween(nil, {Rotation = 90}) RenderStepped = RunService.RenderStepped:Connect(function() Items["OptionHolder"].Instance.Position = UDim2New(0, Items["RealDropdown"].Instance.AbsolutePosition.X, 0, Items["RealDropdown"].Instance.AbsolutePosition.Y + Items["RealDropdown"].Instance.AbsoluteSize.Y + 5) Items["OptionHolder"].Instance.Size = UDim2New(0, Items["RealDropdown"].Instance.AbsoluteSize.X, 0, 0) end) for Index, Value in Library.OpenFrames do if Value ~= self and not Data.Debounce then Value:SetOpen(false) end end if not Data.Debounce then Library.OpenFrames[self] = Dropdown end else Items["Icon"]:Tween(nil, {Rotation = 0}) if not Data.Debounce then if Library.OpenFrames[self] then Library.OpenFrames[self] = nil end end if RenderStepped then RenderStepped:Disconnect() RenderStepped = nil end end local Descendants = Items["OptionHolder"].Instance:GetDescendants() TableInsert(Descendants, Items["OptionHolder"].Instance) local NewTween for Index, Value in Descendants do local TransparencyProperty = Tween:GetProperty(Value) if not TransparencyProperty then continue end if not StringFind(Value.ClassName, "UI") then if not Data.Debounce then Value.ZIndex = self.IsOpen and 104 or 1 else Value.ZIndex = self.IsOpen and 100004 or 1 end end if type(TransparencyProperty) == "table" then for _, Property in TransparencyProperty do NewTween = Tween:FadeItem(Value, Property, Bool, Library.FadeSpeed) end else NewTween = Tween:FadeItem(Value, TransparencyProperty, Bool, Library.FadeSpeed) end end Library:Connect(NewTween.Tween.Completed, function() Debounce = false end) end function Dropdown:Set(Option) if Data.Multi then if type(Option) ~= "table" then return end self.Value = Option Library.Flags[self.Flag] = Option for Index, Value in Option do local OptionData = self.Options[Value] if not OptionData then continue end OptionData.Selected = true OptionData:Toggle("Active") end local TextFormat = #self.Value == 0 and "--" or TableConcat(self.Value, ", ") Items["Value"].Instance.Text = TextFormat else if not self.Options[Option] then return end local OptionData = self.Options[Option] self.Value = OptionData.Name Library.Flags[self.Flag] = OptionData.Name for Index, Value in self.Options do if Value ~= OptionData then Value.Selected = false Value:Toggle("Inactive") else Value.Selected = true Value:Toggle("Active") end end Items["Value"].Instance.Text = OptionData.Name end if Data.Callback then Library:SafeCall(Data.Callback, self.Value) end end function Dropdown:Add(Option) local OptionButton = Instances:Create("TextButton", { Parent = Items["Holder"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), Text = Option, AutoButtonColor = false, BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, Size = UDim2New(1, 0, 0, 20), BorderSizePixel = 0, TextSize = 16, BackgroundColor3 = FromRGB(255, 255, 255) }) OptionButton:AddToTheme({TextColor3 = "Text"}) local OptionData = { Name = Option, Selected = false, Button = OptionButton } function OptionData:Toggle(Status) if Status == "Active" then self.Button:ChangeItemTheme({TextColor3 = "Accent"}) self.Button:Tween(nil, {TextColor3 = Library.Theme.Accent}) else self.Button:ChangeItemTheme({TextColor3 = "Text"}) self.Button:Tween(nil, {TextColor3 = Library.Theme.Text}) end end function OptionData:Set() self.Selected = not self.Selected if Data.Multi then local Index = TableFind(Dropdown.Value, self.Name) if Index then TableRemove(Dropdown.Value, Index) else TableInsert(Dropdown.Value, self.Name) end local TextFormat = #Dropdown.Value == 0 and "--" or TableConcat(Dropdown.Value, ", ") Items["Value"].Instance.Text = TextFormat OptionData:Toggle(self.Selected and "Active" or "Inactive") Library.Flags[Dropdown.Flag] = Dropdown.Value else if self.Selected then Dropdown.Value = self.Name Library.Flags[Dropdown.Flag] = self.Name for Index, Value in Dropdown.Options do if Value ~= OptionData then Value.Selected = false Value:Toggle("Inactive") else Value.Selected = true Value:Toggle("Active") end end Items["Value"].Instance.Text = self.Name else Dropdown.Value = nil Library.Flags[Dropdown.Flag] = nil self.Selected = false self:Toggle("Inactive") Items["Value"].Instance.Text = "--" end end if Data.Callback then Library:SafeCall(Data.Callback, Dropdown.Value) end end OptionData.Button:Connect("MouseButton1Down", function() OptionData:Set() end) Library:LimitHeight(Items["OptionHolder"], Data.MaxSize) Dropdown.Options[OptionData.Name] = OptionData return OptionData end function Dropdown:Remove(Option) if self.Options[Option] then self.Options[Option].Button:Clean() self.Options[Option] = nil end end function Dropdown:SetVisibility(Bool) Items["Dropdown"].Instance.Visible = Bool end function Dropdown:Refresh(List) for Index, Value in self.Options do self:Remove(Value.Name) end for Index, Value in List do self:Add(Value) end end local SearchStepped Items["Input"]:Connect("Focused", function() Items["SearchIcon"]:ChangeItemTheme({ImageColor3 = "Accent"}) Items["SearchIcon"]:Tween(nil, {ImageColor3 = Library.Theme.Accent, ImageTransparency = 0}) SearchStepped = RunService.RenderStepped:Connect(function() for Index, Value in Dropdown.Options do if Items["Input"].Instance.Text ~= "" then if StringFind(StringLower(Value.Name), StringLower(Items["Input"].Instance.Text)) then Value.Button.Instance.Visible = true else Value.Button.Instance.Visible = false end else Value.Button.Instance.Visible = true end end end) end) Items["Input"]:Connect("FocusLost", function() Items["SearchIcon"]:ChangeItemTheme({ImageColor3 = "Image"}) Items["SearchIcon"]:Tween(nil, {ImageColor3 = Library.Theme.Text, ImageTransparency = 0.5}) if SearchStepped then SearchStepped:Disconnect() SearchStepped = nil end end) Items["RealDropdown"]:Connect("MouseButton1Down", function() Dropdown:SetOpen(not Dropdown.IsOpen) end) Library:Connect(UserInputService.InputBegan, function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 then if not Dropdown.IsOpen then return end if Library:IsMouseOverFrame(Items["OptionHolder"]) then return end Dropdown:SetOpen(false) end end) for Index, Value in Data.Items do Dropdown:Add(Value) end if Data.Default then Dropdown:Set(Data.Default) end Library.SetFlags[Dropdown.Flag] = function(Value) Dropdown:Set(Value) end return Dropdown, Items end Components.Colorpicker = function(self, Data) local Colorpicker = { Flag = Data.Flag, IsOpen = false, Hue = 0, Saturation = 0, Value = 0, Color = FromRGB(255, 255, 255), HexValue = "#ffffff", LastColor = nil, Alpha = 0 } local AnimationSpeed local AnimationSpeedItems local AnimationDropdown local AnimationDropdonItems local CurrentAnimation local UpdateSync local Items = { } do Items["ColorpickerButton"] = Instances:Create("TextButton", { Parent = Data.Parent.Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(0, 0, 0), BorderColor3 = FromRGB(0, 0, 0), Text = "", AutoButtonColor = false, Size = UDim2New(0, 22, 0, 18), BorderSizePixel = 0, TextSize = 14, ZIndex = 2, BackgroundColor3 = FromRGB(255, 124, 155) }) Instances:Create("UICorner", { Parent = Items["ColorpickerButton"].Instance, Name = "\0", CornerRadius = UDimNew(0, 6) }) Instances:Create("UIGradient", { Parent = Items["ColorpickerButton"].Instance, Name = "\0", Rotation = 90, Color = RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, FromRGB(211, 211, 211))} }):AddToTheme({Color = function() return RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, Library.Theme["Gradient"])} end}) Items["ColorpickerWindow"] = Instances:Create("TextButton", { Parent = Library.UnusedHolder.Instance, Text = "", AutoButtonColor = false, Name = "\0", Position = UDim2New(0, 11, 0, 11), BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(0, 268, 0, 341), BorderSizePixel = 0, BackgroundColor3 = FromRGB(15, 14, 18) }) Items["ColorpickerWindow"]:AddToTheme({BackgroundColor3 = "Background"}) Items["ColorpickerWindow"]:MakeDraggable() Instances:Create("UICorner", { Parent = Items["ColorpickerWindow"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Items["Alpha"] = Instances:Create("TextButton", { Parent = Items["ColorpickerWindow"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(0, 0, 0), BorderColor3 = FromRGB(0, 0, 0), Text = "", AutoButtonColor = false, AnchorPoint = Vector2New(0, 1), Position = UDim2New(0, 8, 1, -100), Size = UDim2New(1, -16, 0, 22), BorderSizePixel = 0, TextSize = 14, BackgroundColor3 = FromRGB(255, 124, 155) }) Instances:Create("UICorner", { Parent = Items["Alpha"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Items["Checkers"] = Instances:Create("ImageLabel", { Parent = Items["Alpha"].Instance, Name = "\0", ScaleType = Enum.ScaleType.Tile, BorderColor3 = FromRGB(0, 0, 0), TileSize = UDim2New(0, 6, 0, 6), Image = Library:GetImage("Checkers"), BackgroundTransparency = 1, Size = UDim2New(1, 0, 1, 0), ZIndex = 2, BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UIGradient", { Parent = Items["Checkers"].Instance, Name = "\0", Transparency = NumSequence{NumSequenceKeypoint(0, 1), NumSequenceKeypoint(0.37, 0.5), NumSequenceKeypoint(1, 0)} }) Instances:Create("UICorner", { Parent = Items["Checkers"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Items["AlphaDragger"] = Instances:Create("Frame", { Parent = Items["Alpha"].Instance, Name = "\0", Position = UDim2New(0, 8, 0, 0), BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(0, 2, 1, 0), BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UIStroke", { Parent = Items["AlphaDragger"].Instance, Name = "\0", ApplyStrokeMode = Enum.ApplyStrokeMode.Border, LineJoinMode = Enum.LineJoinMode.Miter }) Items["Hue"] = Instances:Create("Frame", { Parent = Items["ColorpickerWindow"].Instance, Name = "\0", AnchorPoint = Vector2New(0, 1), Position = UDim2New(0, 8, 1, -135), BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(1, -16, 0, 22), BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UICorner", { Parent = Items["Hue"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Items["HueInline"] = Instances:Create("TextButton", { Parent = Items["Hue"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(0, 0, 0), BorderColor3 = FromRGB(0, 0, 0), Text = "", AutoButtonColor = false, Size = UDim2New(1, 0, 1, 0), BorderSizePixel = 0, TextSize = 14, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UICorner", { Parent = Items["HueInline"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Instances:Create("UIGradient", { Parent = Items["HueInline"].Instance, Name = "\0", 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))}, Rotation = 180 }) Items["HueDragger"] = Instances:Create("Frame", { Parent = Items["HueInline"].Instance, Name = "\0", Position = UDim2New(0, 15, 0, 0), BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(0, 2, 1, 0), BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UIStroke", { Parent = Items["HueDragger"].Instance, Name = "\0", ApplyStrokeMode = Enum.ApplyStrokeMode.Border, LineJoinMode = Enum.LineJoinMode.Miter }) Items["Palette"] = Instances:Create("TextButton", { Parent = Items["ColorpickerWindow"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(0, 0, 0), BorderColor3 = FromRGB(0, 0, 0), Text = "", AutoButtonColor = false, Position = UDim2New(0, 8, 0, 8), Size = UDim2New(1, -16, 1, -175), BorderSizePixel = 0, TextSize = 14, BackgroundColor3 = FromRGB(255, 124, 155) }) Instances:Create("UICorner", { Parent = Items["Palette"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Items["Saturation"] = Instances:Create("ImageLabel", { Parent = Items["Palette"].Instance, Name = "\0", BorderColor3 = FromRGB(0, 0, 0), Image = Library:GetImage("Saturation"), BackgroundTransparency = 1, Size = UDim2New(1, 0, 1, 0), ZIndex = 4, BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UICorner", { Parent = Items["Saturation"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Items["Value"] = Instances:Create("ImageLabel", { Parent = Items["Palette"].Instance, Name = "\0", BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(1, 2, 1, 0), Image = Library:GetImage("Value"), BackgroundTransparency = 1, Position = UDim2New(0, -1, 0, 0), ZIndex = 4, BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UICorner", { Parent = Items["Value"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Items["PaletteDragger"] = Instances:Create("Frame", { Parent = Items["Palette"].Instance, Name = "\0", Position = UDim2New(0, 4, 0, 4), BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(0, 4, 0, 4), BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UIStroke", { Parent = Items["PaletteDragger"].Instance, Name = "\0" }) Instances:Create("UICorner", { Parent = Items["PaletteDragger"].Instance, Name = "\0", CornerRadius = UDimNew(1, 0) }) Items["ColorpickerRightWindow"] = Instances:Create("Frame", { Parent = Library.UnusedHolder.Instance, Name = "\0", Position = UDim2New(0, 1208, 0, 473), BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(0, 65, 0, 70), BorderSizePixel = 0, BackgroundColor3 = FromRGB(15, 14, 18) }) Items["ColorpickerRightWindow"]:AddToTheme({BackgroundColor3 = "Background"}) Instances:Create("UICorner", { Parent = Items["ColorpickerRightWindow"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Items["Copy"] = Instances:Create("TextButton", { Parent = Items["ColorpickerRightWindow"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), Text = "Copy", AutoButtonColor = false, BackgroundTransparency = 1, Position = UDim2New(0, 0, 0, 5), Size = UDim2New(1, 0, 0, 20), BorderSizePixel = 0, TextSize = 16, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Copy"]:AddToTheme({TextColor3 = "Text"}) Items["Paste"] = Instances:Create("TextButton", { Parent = Items["ColorpickerRightWindow"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), Text = "Paste", AutoButtonColor = false, BackgroundTransparency = 1, Position = UDim2New(0, 0, 0, 25), Size = UDim2New(1, 0, 0, 20), BorderSizePixel = 0, TextSize = 16, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Paste"]:AddToTheme({TextColor3 = "Text"}) Items["Sync"] = Instances:Create("TextButton", { Parent = Items["ColorpickerRightWindow"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), Text = "Sync", AutoButtonColor = false, BackgroundTransparency = 1, Position = UDim2New(0, 0, 0, 45), Size = UDim2New(1, 0, 0, 20), BorderSizePixel = 0, TextSize = 16, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Sync"]:AddToTheme({TextColor3 = "Text"}) end local OldColor = Colorpicker.Color local OldAlpha = Colorpicker.Alpha do AnimationSpeed, AnimationSpeedItems = Components:Slider({ Name = "Speed", Parent = Items["ColorpickerWindow"], Flag = Colorpicker.Flag .. "_AnimationSpeed", Default = 20, Min = 0, Max = 100, Decimals = 0.1, Suffix = "%", Callback = function(Value) end }) AnimationSpeedItems["Slider"].Instance.AnchorPoint = Vector2New(0, 1) AnimationSpeedItems["Slider"].Instance.Position = UDim2New(0, 8, 1, -8) AnimationSpeedItems["Slider"].Instance.Size = UDim2New(1, -16, 0, 33) AnimationDropdown, AnimationDropdonItems = Components:Dropdown({ Name = "Animation", Parent = Items["ColorpickerWindow"], Flag = Colorpicker.Flag .. "_Animation", Debounce = true, Multi = false, MaxSize = 70, Items = {"Rainbow", "Fade", "Fade Alpha"}, Callback = function(Value) CurrentAnimation = Value if Value == "Rainbow" then OldColor = Colorpicker.Color Library:Thread(function() while task.wait() do local RainbowHue = MathAbs(MathSin(tick() * (AnimationSpeed.Value / 25))) local Color = FromHSV(RainbowHue, 1, 1) Colorpicker:Set(Color, Colorpicker.Alpha) UpdateSync(true) if CurrentAnimation ~= "Rainbow" then Colorpicker:Set(OldColor, Colorpicker.Alpha) break end end end) elseif Value == "Fade" then OldColor = Colorpicker.Color Library:Thread(function() while task.wait() do local Speed = MathAbs(MathSin(tick() * (AnimationSpeed.Value / 25))) Colorpicker:Set(Colorpicker.LastColor:Lerp(FromRGB(0, 0, 0), Speed), Colorpicker.Alpha) UpdateSync(true) if CurrentAnimation ~= "Fade" then Colorpicker:Set(OldColor, Colorpicker.Alpha) break end end end) elseif Value == "Fade Alpha" then OldAlpha = Colorpicker.Alpha Library:Thread(function() while task.wait() do local AlphaValue = MathAbs(MathSin(tick() * (AnimationSpeed.Value / 25))) Colorpicker:Set(Colorpicker.Color, AlphaValue) UpdateSync(true) if CurrentAnimation ~= "Fade Alpha" then Colorpicker:Set(Colorpicker.Color, OldAlpha) break end end end) end end }) AnimationDropdonItems["Dropdown"].Instance.AnchorPoint = Vector2New(0, 1) AnimationDropdonItems["Dropdown"].Instance.Position = UDim2New(0, 8, 1, -47) AnimationDropdonItems["Dropdown"].Instance.Size = UDim2New(1, -16, 0, 47) end local IsOpen2 local SetOpen2 = function(Bool) IsOpen2 = Bool if IsOpen2 then Colorpicker:SetOpen(false) Items["ColorpickerRightWindow"].Instance.Visible = true Items["ColorpickerRightWindow"].Instance.Parent = Library.Holder.Instance Items["ColorpickerRightWindow"].Instance.Position = UDim2New(0, Items["ColorpickerButton"].Instance.AbsolutePosition.X, 0, Items["ColorpickerButton"].Instance.AbsolutePosition.Y + 25) else Items["ColorpickerRightWindow"].Instance.Visible = false Items["ColorpickerRightWindow"].Instance.Parent = Library.UnusedHolder.Instance end end Items["ColorpickerButton"]:Connect("MouseButton2Down", function() SetOpen2(not IsOpen2) end) Items["Copy"]:Connect("MouseButton1Down", function() Library.CopiedColor = Colorpicker.Color SetOpen2(false) end) Items["Paste"]:Connect("MouseButton1Down", function() if not Library.CopiedColor then return end Colorpicker:Set(Library.CopiedColor, Colorpicker.Alpha) SetOpen2(false) end) local Stash = { } local IsSyncToggled = false Items["Sync"]:Connect("MouseButton1Down", function() IsSyncToggled = not IsSyncToggled if IsSyncToggled then for Index, Value in Library.Colorpickers do Stash[Value] = Value.Color Value:Set(Colorpicker.Color) end else for Index, Value in Library.Colorpickers do if Stash[Value] then Value:Set(Stash[Value]) end end end Items["Sync"].Instance.Text = IsSyncToggled and "Unsync" or "Sync" SetOpen2(false) end) local Debounce = false local SlidingPalette = false local PaletteChanged local SlidingHue = false local HueChanged local SlidingAlpha = false local AlphaChanged UpdateSync = function(Bool) if IsSyncToggled and Bool then for Index, Value in Library.Colorpickers do if Value ~= Colorpicker and not StringFind(Value.Flag, "Theme") then Value:Set(Colorpicker.Color, Colorpicker.Alpha) end end end end function Colorpicker:SetOpen(Bool) if Debounce then return end self.IsOpen = Bool Debounce = true Items["ColorpickerWindow"].Instance.Parent = Bool and Library.Holder.Instance or Library.UnusedHolder.Instance Items["ColorpickerWindow"].Instance.Visible = Bool if self.IsOpen then Items["ColorpickerWindow"].Instance.Position = UDim2New(0, Items["ColorpickerButton"].Instance.AbsolutePosition.X, 0, Items["ColorpickerButton"].Instance.AbsolutePosition.Y + 25) for Index, Value in Library.OpenFrames do if Value ~= self then Value:SetOpen(false) end end Library.OpenFrames[self] = self else if Library.OpenFrames[self] then Library.OpenFrames[self] = nil end end local Descendants = Items["ColorpickerWindow"].Instance:GetDescendants() TableInsert(Descendants, Items["ColorpickerWindow"].Instance) local NewTween for Index, Value in Descendants do local TransparencyProperty = Tween:GetProperty(Value) if not TransparencyProperty then continue end if not StringFind(Value.ClassName, "UI") then Value.ZIndex = Bool and 100003 or 0 end if type(TransparencyProperty) == "table" then for _, Property in TransparencyProperty do NewTween = Tween:FadeItem(Value, Property, Bool, Library.FadeSpeed) end else NewTween = Tween:FadeItem(Value, TransparencyProperty, Bool, Library.FadeSpeed) end end Library:Connect(NewTween.Tween.Completed, function() Debounce = false end) end function Colorpicker:Update(IsFromAlpha, UpdateSyncc) local Hue, Saturation, Value = self.Hue, self.Saturation, self.Value self.Color = FromHSV(Hue, Saturation, Value) self.HexValue = Colorpicker.Color:ToHex() Library.Flags[self.Flag] = { Color = self.HexValue, Alpha = self.Alpha } Items["ColorpickerButton"]:Tween(nil, {BackgroundColor3 = self.Color}) Items["Palette"]:Tween(nil, {BackgroundColor3 = FromHSV(Hue, 1, 1)}) UpdateSync(UpdateSyncc) if not IsFromAlpha then Items["Alpha"]:Tween(nil, {BackgroundColor3 = self.Color}) end if Data.Callback then Library:SafeCall(Data.Callback, self.Color, self.Alpha) end end function Colorpicker:SlidePalette(Input) if not Input or not SlidingPalette then return end local ValueX = MathClamp(1 - (Input.Position.X - Items["Palette"].Instance.AbsolutePosition.X) / Items["Palette"].Instance.AbsoluteSize.X, 0, 1) local ValueY = MathClamp(1 - (Input.Position.Y - Items["Palette"].Instance.AbsolutePosition.Y) / Items["Palette"].Instance.AbsoluteSize.Y, 0, 1) self.Saturation = ValueX self.Value = ValueY local SlideX = MathClamp((Input.Position.X - Items["Palette"].Instance.AbsolutePosition.X) / Items["Palette"].Instance.AbsoluteSize.X, 0, 0.99) local SlideY = MathClamp((Input.Position.Y - Items["Palette"].Instance.AbsolutePosition.Y) / Items["Palette"].Instance.AbsoluteSize.Y, 0, 0.99) Items["PaletteDragger"]:Tween(TweenInfo.new(Library.Tween.Time, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2New(SlideX, 0, SlideY, 0)}) self:Update(false, true) Colorpicker.LastColor = self.Color end function Colorpicker:SlideHue(Input) if not Input or not SlidingHue then return end local ValueX = MathClamp(1 - (Input.Position.X - Items["Hue"].Instance.AbsolutePosition.X) / Items["Hue"].Instance.AbsoluteSize.X, 0, 1) self.Hue = ValueX local SlideX = MathClamp((Input.Position.X - Items["Hue"].Instance.AbsolutePosition.X) / Items["Hue"].Instance.AbsoluteSize.X, 0, 0.99) Items["HueDragger"]:Tween(TweenInfo.new(Library.Tween.Time, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2New(SlideX, 0, 0, 0)}) self:Update(false, true) end function Colorpicker:SlideAlpha(Input) if not Input or not SlidingAlpha then return end local ValueX = MathClamp(1 - (Input.Position.X - Items["Alpha"].Instance.AbsolutePosition.X) / Items["Alpha"].Instance.AbsoluteSize.X, 0, 1) self.Alpha = ValueX local SlideX = MathClamp((Input.Position.X - Items["Alpha"].Instance.AbsolutePosition.X) / Items["Alpha"].Instance.AbsoluteSize.X, 0, 0.99) Items["AlphaDragger"]:Tween(TweenInfo.new(Library.Tween.Time, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2New(SlideX, 0, 0, 0)}) self:Update(true, true) end local IsFirstTime = false function Colorpicker:Set(Color, Alpha) if type(Color) == "table" then Color = FromRGB(Color[1], Color[2], Color[3]) elseif type(Color) == "string" then Color = FromHex(Color) else Color = Color end self.Hue, self.Saturation, self.Value = Color:ToHSV() self.Alpha = Alpha or 1 local PaletteValueX = MathClamp(1 - self.Saturation, 0, 0.99) local PaletteValueY = MathClamp(1 - self.Value, 0, 0.99) local HuePositionX = MathClamp(self.Hue, 0, 0.99) local AlphaPositionX = MathClamp(self.Alpha, 0, 0.99) Items["PaletteDragger"]:Tween(TweenInfo.new(Library.Tween.Time, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2New(PaletteValueX, 0, PaletteValueY, 0)}) Items["HueDragger"]:Tween(TweenInfo.new(Library.Tween.Time, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2New(HuePositionX, 0, 0, 0)}) Items["AlphaDragger"]:Tween(TweenInfo.new(Library.Tween.Time, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2New(AlphaPositionX, 0, 0, 0)}) self:Update(false, true) if not IsFirstTime then Colorpicker.LastColor = Colorpicker.Color end end Items["ColorpickerButton"]:Connect("MouseButton1Down", function() Colorpicker:SetOpen(not Colorpicker.IsOpen) 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) if PaletteChanged then return end PaletteChanged = Input.Changed:Connect(function() if Input.UserInputState == Enum.UserInputState.End then SlidingPalette = false PaletteChanged:Disconnect() PaletteChanged = nil end end) end end) Items["HueInline"]:Connect("InputBegan", function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then SlidingHue = true Colorpicker:SlideHue(Input) if HueChanged then return end HueChanged = Input.Changed:Connect(function() if Input.UserInputState == Enum.UserInputState.End then SlidingHue = false HueChanged:Disconnect() HueChanged = nil 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) if AlphaChanged then return end AlphaChanged = Input.Changed:Connect(function() if Input.UserInputState == Enum.UserInputState.End then SlidingAlpha = false AlphaChanged:Disconnect() AlphaChanged = nil end end) end 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) end if SlidingHue then Colorpicker:SlideHue(Input) end if SlidingAlpha then Colorpicker:SlideAlpha(Input) end end end) Library:Connect(UserInputService.InputBegan, function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then if not Colorpicker.IsOpen then return end if Library:IsMouseOverFrame(Items["ColorpickerWindow"]) or Library:IsMouseOverFrame(AnimationDropdonItems["OptionHolder"]) then return end Colorpicker:SetOpen(false) end end) if Data.Default then Colorpicker:Set(Data.Default, Data.Alpha) end Library.Colorpickers[Colorpicker] = Colorpicker Library.SetFlags[Colorpicker.Flag] = function(Value, Alpha) Colorpicker:Set(Value, Alpha) end IsFirstTime = true return Colorpicker, Items end Components.Keybind = function(self, Data) local Keybind = { IsOpen = false, Key = "", Value = "", Flag = Data.Flag, Mode = "", IsToggled = false, Picking = false } local KeyListItem if Library.KeyList then KeyListItem = Library.KeyList:Add("", "", "") end local Items = { } do Items["KeyButton"] = Instances:Create("TextButton", { Parent = Data.Parent.Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(255, 255, 255), TextTransparency = 0.5, Text = "RightShift", AutoButtonColor = false, Size = UDim2New(0, 0, 0, 18), BackgroundTransparency = 1, BorderSizePixel = 0, BorderColor3 = FromRGB(0, 0, 0), AutomaticSize = Enum.AutomaticSize.X, TextSize = 16, ZIndex = 2, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["KeyButton"]:AddToTheme({TextColor3 = "Text"}) Items["KeybindWindow"] = Instances:Create("Frame", { Parent = Library.UnusedHolder.Instance, Name = "\0", Position = UDim2New(0, 11, 0, 359), BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(0, 65, 0, 70), BorderSizePixel = 0, BackgroundColor3 = FromRGB(15, 14, 18) }) Items["KeybindWindow"]:AddToTheme({BackgroundColor3 = "Inline"}) Instances:Create("UICorner", { Parent = Items["KeybindWindow"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Items["Toggle"] = Instances:Create("TextButton", { Parent = Items["KeybindWindow"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(0, 178, 255), BorderColor3 = FromRGB(0, 0, 0), Text = "Toggle", AutoButtonColor = false, BackgroundTransparency = 1, Position = UDim2New(0, 0, 0, 5), Size = UDim2New(1, 0, 0, 20), BorderSizePixel = 0, TextSize = 16, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Toggle"]:AddToTheme({TextColor3 = "Text"}) Items["Hold"] = Instances:Create("TextButton", { Parent = Items["KeybindWindow"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), Text = "Hold", AutoButtonColor = false, BackgroundTransparency = 1, Position = UDim2New(0, 0, 0, 25), Size = UDim2New(1, 0, 0, 20), BorderSizePixel = 0, TextSize = 16, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Hold"]:AddToTheme({TextColor3 = "Text"}) Items["Always"] = Instances:Create("TextButton", { Parent = Items["KeybindWindow"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), Text = "Always", AutoButtonColor = false, BackgroundTransparency = 1, Position = UDim2New(0, 0, 0, 45), Size = UDim2New(1, 0, 0, 20), BorderSizePixel = 0, TextSize = 16, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Always"]:AddToTheme({TextColor3 = "Text"}) end local Modes = { ["Toggle"] = Items["Toggle"], ["Hold"] = Items["Hold"], ["Always"] = Items["Always"] } local Update = function() if not KeyListItem then return end KeyListItem:SetText(Keybind.Value, Data.Name, Keybind.Mode) KeyListItem:SetStatus(Keybind.Toggled) end function Keybind:Get() return self.Toggled, self.Key, self.Mode end function Keybind:SetMode(Mode) for Index, Value in Modes do if Index == Mode then Value:ChangeItemTheme({TextColor3 = "Accent"}) Value:Tween(nil, {TextColor3 = Library.Theme.Accent}) else Value:ChangeItemTheme({TextColor3 = "Text"}) Value:Tween(nil, {TextColor3 = Library.Theme.Text}) end end Library.Flags[Keybind.Flag] = { Mode = Keybind.Mode, Key = Keybind.Key, Toggled = Keybind.Toggled } if Data.Callback then Library:SafeCall(Data.Callback, Keybind.Toggled) end Update() end function Keybind:Set(Key) if StringFind(tostring(Key), "Enum") then Keybind.Key = tostring(Key) Key = Key.Name == "Backspace" and "None" or Key.Name local KeyString = Keys[Keybind.Key] or StringGSub(Key, "Enum.", "") or "None" local TextToDisplay = StringGSub(StringGSub(KeyString, "KeyCode.", ""), "UserInputType.", "") or "None" Keybind.Value = TextToDisplay Items["KeyButton"].Instance.Text = TextToDisplay Library.Flags[Keybind.Flag] = { Mode = Keybind.Mode, Key = Keybind.Key, Toggled = Keybind.Toggled } if Data.Callback then Library:SafeCall(Data.Callback, Keybind.Toggled) end Update() elseif type(Key) == "table" then local RealKey = Key.Key == "Backspace" and "None" or Key.Key Keybind.Key = tostring(Key.Key) if Key.Mode then Keybind.Mode = Key.Mode Keybind:SetMode(Key.Mode) else Keybind.Mode = "Toggle" Keybind:SetMode("Toggle") end local KeyString = Keys[Keybind.Key] or StringGSub(tostring(RealKey), "Enum.", "") or RealKey local TextToDisplay = KeyString and StringGSub(StringGSub(KeyString, "KeyCode.", ""), "UserInputType.", "") or "None" TextToDisplay = StringGSub(StringGSub(KeyString, "KeyCode.", ""), "UserInputType.", "") Keybind.Value = TextToDisplay Items["KeyButton"].Instance.Text = TextToDisplay if Data.Callback then Library:SafeCall(Data.Callback, Keybind.Toggled) end Update() elseif TableFind({"Toggle", "Hold", "Always"}, Key) then Keybind.Mode = Key Keybind:SetMode(Keybind.Mode) if Data.Callback then Library:SafeCall(Data.Callback, Keybind.Toggled) end Update() end Keybind.Picking = false end function Keybind:SetOpen(Bool) self.IsOpen = Bool if self.IsOpen then Items["KeybindWindow"].Instance.Visible = true Items["KeybindWindow"].Instance.Parent = Library.Holder.Instance Items["KeybindWindow"].Instance.Position = UDim2New(0, Items["KeyButton"].Instance.AbsolutePosition.X, 0, Items["KeyButton"].Instance.AbsolutePosition.Y + Items["KeyButton"].Instance.AbsoluteSize.Y + 5) else Items["KeybindWindow"].Instance.Visible = false Items["KeybindWindow"].Instance.Parent = Library.UnusedHolder.Instance 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 Data.Callback then Library:SafeCall(Data.Callback, Keybind.Toggled) end Update() end Items["KeyButton"]:Connect("MouseButton1Click", function() Keybind.Picking = true Items["KeyButton"].Instance.Text = "." Library:Thread(function() local Count = 1 while true do if not Keybind.Picking then break end if Count == 4 then Count = 1 end Items["KeyButton"].Instance.Text = Count == 1 and "." or Count == 2 and ".." or Count == 3 and "..." Count += 1 task.wait(0.5) end end) 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) Items["KeyButton"]:Connect("MouseButton2Down", function() Keybind:SetOpen(not Keybind.IsOpen) end) Library:Connect(UserInputService.InputBegan, function(Input) if Keybind.Value == "None" then return end if tostring(Input.KeyCode) == Keybind.Key then if Keybind.Mode == "Toggle" then Keybind:Press() elseif Keybind.Mode == "Hold" then Keybind:Press(true) elseif Keybind.Mode == "Always" then Keybind:Press(true) end elseif tostring(Input.UserInputType) == Keybind.Key then if Keybind.Mode == "Toggle" then Keybind:Press() elseif Keybind.Mode == "Hold" then Keybind:Press(true) elseif Keybind.Mode == "Always" then Keybind:Press(true) end end if Input.UserInputType == Enum.UserInputType.MouseButton1 then if not Keybind.IsOpen then return end if Library:IsMouseOverFrame(Items["KeybindWindow"]) then return end Keybind:SetOpen(false) end end) Library:Connect(UserInputService.InputEnded, function(Input) if Keybind.Value == "None" then return end if tostring(Input.KeyCode) == Keybind.Key then if Keybind.Mode == "Hold" then Keybind:Press(false) elseif Keybind.Mode == "Always" then Keybind:Press(true) end elseif tostring(Input.UserInputType) == Keybind.Key then if Keybind.Mode == "Hold" then Keybind:Press(false) elseif Keybind.Mode == "Always" then Keybind:Press(true) end end end) Items["Toggle"]:Connect("MouseButton1Down", function() Keybind.Mode = "Toggle" Keybind:SetMode("Toggle") end) Items["Hold"]:Connect("MouseButton1Down", function() Keybind.Mode = "Hold" Keybind:SetMode("Hold") end) Items["Always"]:Connect("MouseButton1Down", function() Keybind.Mode = "Always" Keybind:SetMode("Always") end) if Data.Default then Keybind:Set({Key = Data.Default, Mode = Data.Mode or "Toggle"}) end Library.SetFlags[Keybind.Flag] = function(Value) Keybind:Set(Value) end return Keybind, Items end Components.Textbox = function(self, Data) local Textbox = { Value = "", Flag = Data.Flag } local Items = { } do Items["Textbox"] = Instances:Create("Frame", { Parent = Data.Parent.Instance, Name = "\0", BackgroundTransparency = 1, BorderColor3 = FromRGB(0, 0, 0), ZIndex = 2, Size = UDim2New(1, 0, 0, 47), BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"] = Instances:Create("TextLabel", { Parent = Items["Textbox"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), ZIndex = 2, Text = Data.Name, BackgroundTransparency = 1, Size = UDim2New(0, 0, 0, 15), BorderSizePixel = 0, AutomaticSize = Enum.AutomaticSize.X, TextSize = 16, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"]:AddToTheme({TextColor3 = "Text"}) Items["Background"] = Instances:Create("Frame", { Parent = Items["Textbox"].Instance, Name = "\0", AnchorPoint = Vector2New(0, 1), Position = UDim2New(0, 0, 1, 0), BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(1, 0, 0, 25), ZIndex = 2, BorderSizePixel = 0, BackgroundColor3 = FromRGB(40, 38, 49) }) Items["Background"]:AddToTheme({BackgroundColor3 = "Element"}) Instances:Create("UICorner", { Parent = Items["Background"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Instances:Create("UIGradient", { Parent = Items["Background"].Instance, Name = "\0", Rotation = 90, Color = RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, FromRGB(211, 211, 211))} }):AddToTheme({Color = function() return RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, Library.Theme["Gradient"])} end}) Items["Input"] = Instances:Create("TextBox", { Parent = Items["Background"].Instance, Name = "\0", FontFace = Library.Font, AnchorPoint = Vector2New(0, 0.5), PlaceholderColor3 = FromRGB(185, 185, 185), PlaceholderText = Data.Placeholder, TextSize = 16, Size = UDim2New(1, -16, 0, 15), TextColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), Text = "", BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 2, Position = UDim2New(0, 8, 0.5, 0), ClearTextOnFocus = false, BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Input"]:AddToTheme({TextColor3 = "Text"}) end function Textbox:Get() return self.Value end function Textbox:SetVisibility(Bool) Items["Textbox"].Instance.Visible = Bool end function Textbox:Set(Value) if Data.Numeric then if (not tonumber(Value)) and StringLen(tostring(Value)) > 0 then Value = self.Value end end self.Value = Value Items["Input"].Instance.Text = Value Library.Flags[self.Flag] = Value if Data.Callback then Library:SafeCall(Data.Callback, Value) end end if Data.Finished then Items["Input"]:Connect("FocusLost", function(PressedEnterQuestionMark) if PressedEnterQuestionMark then Textbox:Set(Items["Input"].Instance.Text) end end) else Items["Input"].Instance:GetPropertyChangedSignal("Text"):Connect(function() Textbox:Set(Items["Input"].Instance.Text) end) end if Data.Default then Textbox:Set(Data.Default) end Library.SetFlags[Textbox.Flag] = function(Value) Textbox:Set(Value) end return Textbox, Items end Components.Searchbox = function(self, Data) -- just pasted the dropdowns, cant be asked to write all of it again local Dropdown = { Flag = Data.Flag, Value = { }, Options = { }, } local Items = { } do Items["Searchbox"] = Instances:Create("Frame", { Parent = Data.Parent.Instance, Name = "\0", BackgroundTransparency = 1, Size = UDim2New(1, 0, 0, 15), BorderColor3 = FromRGB(0, 0, 0), BorderSizePixel = 0, ZIndex = 2, AutomaticSize = Enum.AutomaticSize.Y, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Searchbar"] = Instances:Create("Frame", { Parent = Items["Searchbox"].Instance, Name = "\0", BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(1, 0, 0, 30), BorderSizePixel = 0, ZIndex = 2, BackgroundColor3 = FromRGB(15, 14, 18) }) Items["Searchbar"]:AddToTheme({BackgroundColor3 = "Background"}) Items["SearchIcon"] = Instances:Create("ImageLabel", { Parent = Items["Searchbar"].Instance, Name = "\0", ImageTransparency = 0.5, BorderColor3 = FromRGB(0, 0, 0), ZIndex = 2, AnchorPoint = Vector2New(0, 0.5), Image = "rbxassetid://114830812626361", BackgroundTransparency = 1, Position = UDim2New(0, 6, 0.5, 0), Size = UDim2New(0, 16, 0, 16), BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["SearchIcon"]:AddToTheme({ImageColor3 = "Image"}) Items["Input"] = Instances:Create("TextBox", { Parent = Items["Searchbar"].Instance, Name = "\0", FontFace = Library.Font, AnchorPoint = Vector2New(0, 0.5), PlaceholderColor3 = FromRGB(185, 185, 185), PlaceholderText = "Search", TextSize = 16, Size = UDim2New(1, -40, 0, 15), TextColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), Text = "", BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 2, Position = UDim2New(0, 32, 0.5, 1), ClearTextOnFocus = false, BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Input"]:AddToTheme({TextColor3 = "Text"}) Instances:Create("UIGradient", { Parent = Items["Searchbar"].Instance, Name = "\0", Rotation = 90, Color = RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, FromRGB(211, 211, 211))} }):AddToTheme({Color = function() return RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, Library.Theme["Gradient"])} end}) Instances:Create("UICorner", { Parent = Items["Searchbar"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Items["RealSearchbox"] = Instances:Create("Frame", { Parent = Items["Searchbox"].Instance, Name = "\0", Position = UDim2New(0, 0, 0, 40), BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(1, 0, 0, 185), BorderSizePixel = 0, ZIndex = 2, BackgroundColor3 = FromRGB(15, 14, 18) }) Items["RealSearchbox"]:AddToTheme({BackgroundColor3 = "Background"}) Instances:Create("UICorner", { Parent = Items["RealSearchbox"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Instances:Create("UIGradient", { Parent = Items["RealSearchbox"].Instance, Name = "\0", Rotation = 90, Color = RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, FromRGB(211, 211, 211))} }):AddToTheme({Color = function() return RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, Library.Theme["Gradient"])} end}) Items["Holder"] = Instances:Create("ScrollingFrame", { Parent = Items["RealSearchbox"].Instance, Name = "\0", Active = true, AutomaticCanvasSize = Enum.AutomaticSize.Y, BorderSizePixel = 0, CanvasSize = UDim2New(0, 0, 0, 0), ScrollBarImageColor3 = FromRGB(0, 178, 255), ZIndex = 2, MidImage = "rbxassetid://123813291349824", BorderColor3 = FromRGB(0, 0, 0), ScrollBarThickness = 2, Size = UDim2New(1, -10, 1, -10), BackgroundTransparency = 1, Position = UDim2New(0, 5, 0, 5), BottomImage = "rbxassetid://123813291349824", TopImage = "rbxassetid://123813291349824", BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Holder"]:AddToTheme({ScrollBarImageColor3 = "Accent"}) Instances:Create("UIListLayout", { Parent = Items["Holder"].Instance, Name = "\0", Padding = UDimNew(0, 3), SortOrder = Enum.SortOrder.LayoutOrder }) end function Dropdown:Get() return self.Value end function Dropdown:Set(Option) if Data.Multi then if type(Option) ~= "table" then return end self.Value = Option Library.Flags[self.Flag] = Option for Index, Value in Option do local OptionData = self.Options[Value] if not OptionData then continue end OptionData.Selected = true OptionData:Toggle("Active") end local TextFormat = #self.Value == 0 and "--" or TableConcat(self.Value, ", ") else if not self.Options[Option] then return end local OptionData = self.Options[Option] self.Value = OptionData.Name Library.Flags[self.Flag] = OptionData.Name for Index, Value in self.Options do if Value ~= OptionData then Value.Selected = false Value:Toggle("Inactive") else Value.Selected = true Value:Toggle("Active") end end end if Data.Callback then Library:SafeCall(Data.Callback, self.Value) end end function Dropdown:Add(Option) local OptionButton = Instances:Create("TextButton", { Parent = Items["Holder"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), ZIndex = 2, Text = Option, AutoButtonColor = false, BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, Size = UDim2New(1, 0, 0, 20), BorderSizePixel = 0, TextSize = 16, BackgroundColor3 = FromRGB(255, 255, 255) }) OptionButton:AddToTheme({TextColor3 = "Text"}) local OptionData = { Name = Option, Selected = false, Button = OptionButton } function OptionData:Toggle(Status) if Status == "Active" then self.Button:ChangeItemTheme({TextColor3 = "Accent"}) self.Button:Tween(nil, {TextColor3 = Library.Theme.Accent}) else self.Button:ChangeItemTheme({TextColor3 = "Text"}) self.Button:Tween(nil, {TextColor3 = Library.Theme.Text}) end end function OptionData:Set() self.Selected = not self.Selected if Data.Multi then local Index = TableFind(Dropdown.Value, self.Name) if Index then TableRemove(Dropdown.Value, Index) else TableInsert(Dropdown.Value, self.Name) end OptionData:Toggle(self.Selected and "Active" or "Inactive") Library.Flags[Dropdown.Flag] = Dropdown.Value else if self.Selected then Dropdown.Value = self.Name Library.Flags[Dropdown.Flag] = self.Name for Index, Value in Dropdown.Options do if Value ~= OptionData then Value.Selected = false Value:Toggle("Inactive") else Value.Selected = true Value:Toggle("Active") end end else Dropdown.Value = nil Library.Flags[Dropdown.Flag] = nil self.Selected = false self:Toggle("Inactive") end end if Data.Callback then Library:SafeCall(Data.Callback, Dropdown.Value) end end OptionData.Button:Connect("MouseButton1Down", function() OptionData:Set() end) Dropdown.Options[OptionData.Name] = OptionData return OptionData end function Dropdown:Remove(Option) if self.Options[Option] then self.Options[Option].Button:Clean() self.Options[Option] = nil end end function Dropdown:SetVisibility(Bool) Items["Searchbox"].Instance.Visible = Bool end function Dropdown:Refresh(List) for Index, Value in self.Options do self:Remove(Value.Name) end for Index, Value in List do self:Add(Value) end end local SearchStepped Items["Input"]:Connect("Focused", function() Items["SearchIcon"]:ChangeItemTheme({ImageColor3 = "Accent"}) Items["SearchIcon"]:Tween(nil, {ImageColor3 = Library.Theme.Accent, ImageTransparency = 0}) SearchStepped = RunService.RenderStepped:Connect(function() for Index, Value in Dropdown.Options do if Items["Input"].Instance.Text ~= "" then if StringFind(StringLower(Value.Name), StringLower(Items["Input"].Instance.Text)) then Value.Button.Instance.Visible = true else Value.Button.Instance.Visible = false end else Value.Button.Instance.Visible = true end end end) end) Items["Input"]:Connect("FocusLost", function() Items["SearchIcon"]:ChangeItemTheme({ImageColor3 = "Image"}) Items["SearchIcon"]:Tween(nil, {ImageColor3 = Library.Theme.Text, ImageTransparency = 0.5}) if SearchStepped then SearchStepped:Disconnect() SearchStepped = nil end end) for Index, Value in Data.Items do Dropdown:Add(Value) end if Data.Default then Dropdown:Set(Data.Default) end Library.SetFlags[Dropdown.Flag] = function(Value) Dropdown:Set(Value) end return Dropdown, Items end end do -- Elements Library.Watermark = function(self, Name) local Watermark = { } local Items = { } do Items["Watermark"] = Instances:Create("Frame", { Parent = Library.Holder.Instance, Name = "\0", AnchorPoint = Vector2New(0.5, 0), Position = UDim2New(0.5, 0, 0, 20), BorderColor3 = FromRGB(0, 0, 0), BorderSizePixel = 0, AutomaticSize = Enum.AutomaticSize.XY, BackgroundColor3 = FromRGB(15, 14, 18) }) Items["Watermark"]:AddToTheme({BackgroundColor3 = "Background"}) Items["Watermark"]:MakeDraggable() Instances:Create("UICorner", { Parent = Items["Watermark"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Items["Text"] = Instances:Create("TextLabel", { Parent = Items["Watermark"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), Text = Name, BackgroundTransparency = 1, BorderSizePixel = 0, AutomaticSize = Enum.AutomaticSize.XY, TextSize = 16, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"]:AddToTheme({TextColor3 = "Text"}) Instances:Create("UIPadding", { Parent = Items["Watermark"].Instance, Name = "\0", PaddingTop = UDimNew(0, 8), PaddingBottom = UDimNew(0, 8), PaddingRight = UDimNew(0, 8), PaddingLeft = UDimNew(0, 8) }) end function Watermark:SetVisibility(Bool) Items["Watermark"].Instance.Visible = Bool end Library:Connect(RunService.RenderStepped, function() local FullTime = os.date("%I:%M %p") Items["Text"].Instance.Text = Name .. " - " ..getexecutorname().. " - " .. FullTime end) return Watermark end Library.KeybindList = function(self) local KeyList = { } self.KeyList = KeyList local Items = { } do Items["KeybindList"] = Instances:Create("Frame", { Parent = Library.Holder.Instance, Name = "\0", Position = UDim2New(0, 11, 0, 442), BorderColor3 = FromRGB(0, 0, 0), BorderSizePixel = 0, AutomaticSize = Enum.AutomaticSize.XY, BackgroundColor3 = FromRGB(15, 14, 18) }) Items["KeybindList"]:AddToTheme({BackgroundColor3 = "Background"}) Items["KeybindList"]:MakeDraggable() Instances:Create("UICorner", { Parent = Items["KeybindList"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Items["Title"] = Instances:Create("TextLabel", { Parent = Items["KeybindList"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), Text = "Keybinds", BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left, Size = UDim2New(0, 125, 0, 15), BorderSizePixel = 0, TextSize = 16, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Title"]:AddToTheme({TextColor3 = "Text"}) Instances:Create("UIPadding", { Parent = Items["KeybindList"].Instance, Name = "\0", PaddingTop = UDimNew(0, 8), PaddingBottom = UDimNew(0, 8), PaddingRight = UDimNew(0, 8), PaddingLeft = UDimNew(0, 8) }) Items["Liner"] = Instances:Create("Frame", { Parent = Items["KeybindList"].Instance, Name = "\0", Position = UDim2New(0, 0, 0, 21), BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(0, 58, 0, 2), BorderSizePixel = 0, BackgroundColor3 = FromRGB(0, 178, 255) }) Items["Liner"]:AddToTheme({BackgroundColor3 = "Accent"}) Items["Content"] = Instances:Create("Frame", { Parent = Items["KeybindList"].Instance, Name = "\0", BackgroundTransparency = 1, Position = UDim2New(0, 0, 0, 32), BorderColor3 = FromRGB(0, 0, 0), BorderSizePixel = 0, AutomaticSize = Enum.AutomaticSize.XY, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UIListLayout", { Parent = Items["Content"].Instance, Name = "\0", Padding = UDimNew(0, 4), SortOrder = Enum.SortOrder.LayoutOrder }) end function KeyList:SetVisibility(Bool) Items["KeybindList"].Instance.Visible = Bool end function KeyList:Add(Key, Name, Mode) local NewKey = Instances:Create("TextLabel", { Parent = Items["Content"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), Text = Key.." - "..Name.." ("..Mode..")", BackgroundTransparency = 1, Size = UDim2New(0, 0, 0, 15), TextTransparency = 1, Visible = false, BorderSizePixel = 0, AutomaticSize = Enum.AutomaticSize.X, TextSize = 16, BackgroundColor3 = FromRGB(255, 255, 255) }) NewKey:AddToTheme({TextColor3 = "Text"}) function NewKey:SetText(Key, Name, Mode) NewKey.Instance.Text = Key.." - "..Name.." ("..Mode..")" end function NewKey:SetStatus(Bool) if Bool then NewKey.Instance.Visible = true NewKey:Tween(nil, {TextTransparency = 0}) else NewKey:Tween(nil, {TextTransparency = 1}) task.wait(0.05) NewKey.Instance.Visible = false end end return NewKey end return KeyList end Library.Notification = function(self, Name, Description, Duration) local Items = { } do Items["Notification"] = Instances:Create("Frame", { Parent = Library.NotifHolder.Instance, Name = "\0", BorderColor3 = FromRGB(0, 0, 0), BorderSizePixel = 0, AutomaticSize = Enum.AutomaticSize.XY, BackgroundColor3 = FromRGB(15, 14, 18) }) Items["Notification"]:AddToTheme({BackgroundColor3 = "Background"}) Instances:Create("UICorner", { Parent = Items["Notification"].Instance, Name = "\0", CornerRadius = UDimNew(0, 6) }) Items["Text"] = Instances:Create("TextLabel", { Parent = Items["Notification"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), Text = Name, BackgroundTransparency = 1, BorderSizePixel = 0, AutomaticSize = Enum.AutomaticSize.XY, TextSize = 16, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"]:AddToTheme({TextColor3 = "Text"}) Instances:Create("UIPadding", { Parent = Items["Notification"].Instance, Name = "\0", PaddingTop = UDimNew(0, 8), PaddingBottom = UDimNew(0, 8), PaddingRight = UDimNew(0, 8), PaddingLeft = UDimNew(0, 8) }) Items["Description"] = Instances:Create("TextLabel", { Parent = Items["Notification"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(255, 255, 255), TextTransparency = 0.5, Text = Description, BorderSizePixel = 0, BackgroundTransparency = 1, Position = UDim2New(0, 0, 0, 18), BorderColor3 = FromRGB(0, 0, 0), AutomaticSize = Enum.AutomaticSize.XY, TextSize = 16, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Description"]:AddToTheme({TextColor3 = "Text"}) Items["Liner"] = Instances:Create("Frame", { Parent = Items["Notification"].Instance, Name = "\0", Position = UDim2New(0, 0, 0, 42), BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(1, 0, 0, 12), ClipsDescendants = true, BorderSizePixel = 0, BackgroundColor3 = FromRGB(40, 38, 49) }) Items["Liner"]:AddToTheme({BackgroundColor3 = "Element"}) Instances:Create("UICorner", { Parent = Items["Liner"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Instances:Create("UIGradient", { Parent = Items["Liner"].Instance, Name = "\0", Rotation = 90, Color = RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, FromRGB(211, 211, 211))} }):AddToTheme({Color = function() return RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, Library.Theme["Gradient"])} end}) Items["Accent"] = Instances:Create("Frame", { Parent = Items["Liner"].Instance, Name = "\0", BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(1, 0, 1, 0), BorderSizePixel = 0, BackgroundColor3 = FromRGB(0, 178, 255) }) Items["Accent"]:AddToTheme({BackgroundColor3 = "Accent"}) Instances:Create("UICorner", { Parent = Items["Accent"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Items["Circle"] = Instances:Create("Frame", { Parent = Items["Accent"].Instance, Name = "\0", AnchorPoint = Vector2New(1, 0.5), Position = UDim2New(1, -3, 0.5, 0), BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(0, 8, 0, 8), BorderSizePixel = 0, BackgroundColor3 = FromRGB(40, 38, 49) }) Items["Circle"]:AddToTheme({BackgroundColor3 = "Element"}) Instances:Create("UICorner", { Parent = Items["Circle"].Instance, Name = "\0", CornerRadius = UDimNew(1, 0) }) Instances:Create("UIGradient", { Parent = Items["Accent"].Instance, Name = "\0", Rotation = 90, Color = RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, FromRGB(211, 211, 211))} }):AddToTheme({Color = function() return RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, Library.Theme["Gradient"])} end}) end local Size = Items["Notification"].Instance.AbsoluteSize for Index, Value in Items do if Value.Instance:IsA("Frame") then Value.Instance.BackgroundTransparency = 1 elseif Value.Instance:IsA("TextLabel") then Value.Instance.TextTransparency = 1 end end Items["Notification"].Instance.AutomaticSize = Enum.AutomaticSize.Y Library:Thread(function() for Index, Value in Items do if Value.Instance:IsA("Frame") then Value:Tween(nil, {BackgroundTransparency = 0}) elseif Value.Instance:IsA("TextLabel") and Index ~= "Description" then Value:Tween(nil, {TextTransparency = 0}) elseif Value.Instance:IsA("TextLabel") and Index == "Description" then Value:Tween(nil, {TextTransparency = 0.5}) end end Items["Notification"]:Tween(nil, {Size = UDim2New(0, Size.X, 0, 0)}) Items["Accent"]:Tween(TweenInfo.new(Duration, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {Size = UDim2New(0, 0, 1, 0)}) task.delay(Duration + 0.1, function() for Index, Value in Items do if Value.Instance:IsA("Frame") then Value:Tween(nil, {BackgroundTransparency = 1}) elseif Value.Instance:IsA("TextLabel") then Value:Tween(nil, {TextTransparency = 1}) end end Items["Notification"]:Tween(nil, {Size = UDim2New(0, 0, 0, 0)}) task.wait(0.5) Items["Notification"]:Clean() end) end) end Library.Window = function(self, Data) Data = Data or { } local Window = { Name = Data.Name or Data.name or "Window", Pages = { }, Items = { } } local ResizeButton local Items = { } do Items["MainFrame"] = Instances:Create("Frame", { Parent = Library.Holder.Instance, Name = "\0", AnchorPoint = Vector2New(0, 0), Position = UDim2New(0, Camera.ViewportSize.X / 3 - 100, 0, Camera.ViewportSize.Y / 3 - 100), BorderColor3 = FromRGB(0, 0, 0), Visible = false, ClipsDescendants = true, ZIndex = 1, Size = UDim2New(0, 833, 0, 562), BorderSizePixel = 0, BackgroundColor3 = FromRGB(15, 14, 18) }) Items["MainFrame"]:AddToTheme({BackgroundColor3 = "Background"}) Items["MainFrame"]:MakeDraggable() ResizeButton = Items["MainFrame"]:MakeResizeable( Vector2New(Items["MainFrame"].Instance.Size.X.Offset, Items["MainFrame"].Instance.Size.Y.Offset), Vector2New(9999, 9999) ) Instances:Create("UICorner", { Parent = Items["MainFrame"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Items["Topbar"] = Instances:Create("Frame", { Parent = Items["MainFrame"].Instance, Name = "\0", BorderColor3 = FromRGB(0, 0, 0), ZIndex = 2, Size = UDim2New(1, 0, 0, 40), BorderSizePixel = 0, BackgroundColor3 = FromRGB(26, 24, 31) }) Items["Topbar"]:AddToTheme({BackgroundColor3 = "Inline"}) Instances:Create("UICorner", { Parent = Items["Topbar"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Instances:Create("Frame", { Parent = Items["Topbar"].Instance, Name = "\0", AnchorPoint = Vector2New(0, 1), Position = UDim2New(0, 0, 1, 0), ZIndex = 2, BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(1, 0, 0, 4), BorderSizePixel = 0, BackgroundColor3 = FromRGB(26, 24, 31) }):AddToTheme({BackgroundColor3 = "Inline"}) Items["Title"] = Instances:Create("TextLabel", { Parent = Items["Topbar"].Instance, Name = "\0", FontFace = Library.Font, ZIndex = 2, TextColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), Text = Window.Name .. " - "..getexecutorname(), AnchorPoint = Vector2New(0, 0.5), Size = UDim2New(0, 0, 0, 15), BackgroundTransparency = 1, Position = UDim2New(0, 12, 0.5, 1), BorderSizePixel = 0, AutomaticSize = Enum.AutomaticSize.X, TextSize = 20, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Title"]:AddToTheme({TextColor3 = "Text"}) Items["CloseButton"] = Instances:Create("ImageButton", { Parent = Items["Topbar"].Instance, Name = "\0", BorderColor3 = FromRGB(0, 0, 0), AutoButtonColor = false, ZIndex = 2, AnchorPoint = Vector2New(1, 0.5), Image = "rbxassetid://135157838478598", BackgroundTransparency = 1, Position = UDim2New(1, -2, 0.5, 0), Size = UDim2New(0, 32, 0, 32), BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["CloseButton"]:AddToTheme({ImageColor3 = "Image"}) Items["MinimizeButton"] = Instances:Create("ImageButton", { Parent = Items["Topbar"].Instance, Name = "\0", BorderColor3 = FromRGB(0, 0, 0), AutoButtonColor = false, AnchorPoint = Vector2New(1, 0.5), Image = "rbxassetid://84783450258554", BackgroundTransparency = 1, Position = UDim2New(1, -70, 0.5, 0), ZIndex = 2, Size = UDim2New(0, 24, 0, 24), BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["MinimizeButton"]:AddToTheme({ImageColor3 = "Image"}) Items["FullscreenButton"] = Instances:Create("ImageButton", { Parent = Items["Topbar"].Instance, Name = "\0", BorderColor3 = FromRGB(0, 0, 0), AutoButtonColor = false, AnchorPoint = Vector2New(1, 0.5), Image = "rbxassetid://115786324989889", BackgroundTransparency = 1, Position = UDim2New(1, -40, 0.5, 0), ZIndex = 2, Size = UDim2New(0, 18, 0, 18), BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["FullscreenButton"]:AddToTheme({ImageColor3 = "Image"}) Items["Pages"] = Instances:Create("Frame", { Parent = Items["MainFrame"].Instance, Name = "\0", BackgroundTransparency = 1, Position = UDim2New(0, 8, 0, 48), ZIndex = 2, BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(0, 185, 1, -56), BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UIListLayout", { Parent = Items["Pages"].Instance, Name = "\0", Padding = UDimNew(0, 8), SortOrder = Enum.SortOrder.LayoutOrder }) Items["UserInfo"] = Instances:Create("Frame", { Parent = Items["MainFrame"].Instance, Name = "\0", AnchorPoint = Vector2New(0, 1), Position = UDim2New(0, 8, 1, -8), BorderColor3 = FromRGB(0, 0, 0), ZIndex = 2, Size = UDim2New(0, 185, 0, 40), BorderSizePixel = 0, BackgroundColor3 = FromRGB(26, 24, 31) }) Items["UserInfo"]:AddToTheme({BackgroundColor3 = "Inline"}) Instances:Create("UICorner", { Parent = Items["UserInfo"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Items["Avatar"] = Instances:Create("ImageLabel", { Parent = Items["UserInfo"].Instance, Name = "\0", BorderColor3 = FromRGB(0, 0, 0), AnchorPoint = Vector2New(0, 0.5), Image = Players:GetUserThumbnailAsync(LocalPlayer.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420), Position = UDim2New(0, 8, 0.5, 0), Size = UDim2New(0, 28, 0, 28), ZIndex = 2, BorderSizePixel = 0, BackgroundColor3 = FromRGB(15, 14, 18) }) Items["Avatar"]:AddToTheme({BackgroundColor3 = "Background"}) Instances:Create("UICorner", { Parent = Items["Avatar"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Items["Username"] = Instances:Create("TextLabel", { Parent = Items["UserInfo"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), Text = LocalPlayer.Name, AnchorPoint = Vector2New(0, 0.5), Size = UDim2New(0, 0, 0, 15), BackgroundTransparency = 1, Position = UDim2New(0, 48, 0.5, 0), BorderSizePixel = 0, AutomaticSize = Enum.AutomaticSize.X, TextSize = 16, ZIndex = 2, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Username"]:AddToTheme({TextColor3 = "Text"}) Items["Content"] = Instances:Create("Frame", { Parent = Items["MainFrame"].Instance, Name = "\0", BackgroundTransparency = 1, Position = UDim2New(0, 201, 0, 48), ZIndex = 2, BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(1, -209, 1, -56), BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("Frame", { Parent = Items["MainFrame"].Instance, Name = "\0", Position = UDim2New(0, Items["Pages"].Instance.AbsoluteSize.X + 16, 0, 40), BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(0, 1, 1, -40), BorderSizePixel = 0, ZIndex = 2, BackgroundColor3 = FromRGB(26, 24, 31) }):AddToTheme({BackgroundColor3 = "Inline"}) Items["BackgroundImage"] = Instances:Create("ImageLabel", { Parent = Items["MainFrame"].Instance, Name = "\0", BackgroundTransparency = 1, Size = UDim2New(1, 0, 1, 0), BorderColor3 = FromRGB(0, 0, 0), ZIndex = 1, BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UICorner", { Parent = Items["BackgroundImage"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) if IsMobile then Items["FloatingButton"] = Instances:Create("TextButton", { Parent = Library.Holder.Instance, Name = "\0", Active = false, BorderColor3 = FromRGB(0, 0, 0), Text = "", AutoButtonColor = false, Position = UDim2New(0, 1213, 0, 121), Size = UDim2New(0, 65, 0, 65), Selectable = false, BorderSizePixel = 0, BackgroundColor3 = FromRGB(15, 14, 18) }) Items["FloatingButton"]:AddToTheme({BackgroundColor3 = "Background"}) Items["FloatingButton"]:MakeDraggable() Instances:Create("UICorner", { Parent = Items["FloatingButton"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Items["Logo"] = Instances:Create("ImageLabel", { Parent = Items["FloatingButton"].Instance, Name = "\0", BorderColor3 = FromRGB(0, 0, 0), AnchorPoint = Vector2New(0.5, 0.5), Image = "rbxassetid://127120679730794", BackgroundTransparency = 1, Position = UDim2New(0.5, 0, 0.5, 0), Size = UDim2New(1, -10, 1, -10), BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["FloatingButton"]:Connect("MouseButton1Down", function() Window:SetOpen(not Window.IsOpen) end) end Window.Items = Items end local Debounce = false local IsMinimized = false local OldSize = Items["MainFrame"].Instance.AbsoluteSize function Window:SetOpen(Bool) if Debounce then return end Window.IsOpen = Bool Debounce = true if Window.IsOpen then Items["MainFrame"].Instance.Visible = true end local Descendants = Items["MainFrame"].Instance:GetDescendants() TableInsert(Descendants, Items["MainFrame"].Instance) local NewTween for Index, Value in Descendants do local TransparencyProperty = Tween:GetProperty(Value) if not TransparencyProperty then continue end if type(TransparencyProperty) == "table" then for _, Property in TransparencyProperty do NewTween = Tween:FadeItem(Value, Property, Window.IsOpen, Library.FadeSpeed) end else NewTween = Tween:FadeItem(Value, TransparencyProperty, Window.IsOpen, Library.FadeSpeed) end end Library:Connect(NewTween.Tween.Completed, function() Debounce = false Items["MainFrame"].Instance.Visible = Window.IsOpen end) end function Window:SetBackgroundImage(Image) Items["BackgroundImage"].Instance.Image = Image end function Window:Minimize(Bool) IsMinimized = Bool if IsMinimized then OldSize = Items["MainFrame"].Instance.AbsoluteSize Items["MainFrame"]:Tween(nil, {Size = UDim2New(0, Items["Title"].Instance.TextBounds.X + 110, 0, 40)}) ResizeButton:Tween(nil, {ImageTransparency = 1}) ResizeButton.Instance.Interactable = false Items["UserInfo"].Instance.Visible = false Items["Content"].Instance.Visible = false for Index, Value in Window.Pages do Value:SetVisibility(false) end else Items["MainFrame"]:Tween(nil, {Size = UDim2New(0, OldSize.X, 0, OldSize.Y)}) ResizeButton:Tween(nil, {ImageTransparency = 0}) ResizeButton.Instance.Interactable = true Items["UserInfo"].Instance.Visible = true Items["Content"].Instance.Visible = true for Index, Value in Window.Pages do Value:SetVisibility(true) end end end Library:Connect(UserInputService.InputBegan, function(Input) if tostring(Input.KeyCode) == Library.MenuKeybind or tostring(Input.UserInputType) == Library.MenuKeybind then Window:SetOpen(not Window.IsOpen) end end) Items["MinimizeButton"]:Connect("MouseButton1Down", function() Window:Minimize(not IsMinimized) end) local IsFullScreen = false Items["FullscreenButton"]:Connect("MouseButton1Down", function() IsFullScreen = not IsFullScreen if IsFullScreen then if IsMinimized then Window:Minimize(false) end Items["MainFrame"]:Tween(nil, {Size = UDim2New(1, 0, 1, 0)}) Items["MainFrame"]:Tween(nil, {Position = UDim2New(0, 0, 0, 0)}) else Items["MainFrame"]:Tween(nil, {Size = UDim2New(0, OldSize.X, 0, OldSize.Y)}) Items["MainFrame"]:Tween(nil, {Position = UDim2New(0, Camera.ViewportSize.X / 3 - 100, 0, Camera.ViewportSize.Y / 3 - 100)}) end end) Items["CloseButton"]:Connect("MouseButton1Down", function() Window:SetOpen(false) end) Window:SetOpen(true) return setmetatable(Window, self) end Library.Page = function(self, Data) Data = Data or { } local Page = { Window = self, Name = Data.Name or Data.name or "New Page", Icon = Data.Icon or Data.icon or nil, Columns = Data.Columns or Data.columns or 2, SubPages = Data.SubPages or Data.subpages or false, Active = false, Items = { }, ColumnsData = { }, SubPagesData = { } } local Items = { } do Items["Inactive"] = Instances:Create("TextButton", { Parent = Page.Window.Items["Pages"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(0, 0, 0), ZIndex = 2, BorderColor3 = FromRGB(0, 0, 0), Text = "", AutoButtonColor = false, BackgroundTransparency = 1, Size = UDim2New(1, 0, 0, 35), BorderSizePixel = 0, TextSize = 14, BackgroundColor3 = FromRGB(26, 24, 31) }) Items["Inactive"]:AddToTheme({BackgroundColor3 = "Inline"}) Instances:Create("UICorner", { Parent = Items["Inactive"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Items["Text"] = Instances:Create("TextLabel", { Parent = Items["Inactive"].Instance, Name = "\0", FontFace = Library.Font, ZIndex = 2, TextColor3 = FromRGB(255, 255, 255), TextTransparency = 0.5, Text = Page.Name, Size = UDim2New(0, 0, 0, 15), AnchorPoint = Vector2New(0, 0.5), BorderSizePixel = 0, BackgroundTransparency = 1, Position = UDim2New(0, 32, 0.5, 1), BorderColor3 = FromRGB(0, 0, 0), AutomaticSize = Enum.AutomaticSize.X, TextSize = 16, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"]:AddToTheme({TextColor3 = "Text"}) Items["Icon"] = Instances:Create("ImageLabel", { Parent = Items["Inactive"].Instance, Name = "\0", ImageTransparency = 0.5, BorderColor3 = FromRGB(0, 0, 0), ZIndex = 2, AnchorPoint = Vector2New(0, 0.5), Image = Page.Icon, BackgroundTransparency = 1, Position = UDim2New(0, 8, 0.5, 0), Size = UDim2New(0, 16, 0, 16), BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Icon"]:AddToTheme({ImageColor3 = "Image"}) Items["Page"] = Instances:Create("Frame", { Parent = Page.Window.Items["Content"].Instance, Name = "\0", Visible = false, BackgroundTransparency = 1, BorderColor3 = FromRGB(0, 0, 0), ZIndex = 2, Size = UDim2New(1, 0, 1, 0), BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Columns"] = Instances:Create("Frame", { Parent = Items["Page"].Instance, Name = "\0", BackgroundTransparency = 1, Position = UDim2New(0, 0, 0, 50), BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(1, 0, 1, -50), ZIndex = 2, BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) if Page.SubPages then Items["SubPages"] = Instances:Create("Frame", { Parent = Items["Page"].Instance, Name = "\0", BorderColor3 = FromRGB(0, 0, 0), ZIndex = 2, BackgroundTransparency = 1, Position = UDim2New(0, 8, 0, 4), Size = UDim2New(0, 0, 0, 30), BorderSizePixel = 0, AutomaticSize = Enum.AutomaticSize.X, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Liner"] = Instances:Create("Frame", { Parent = Items["Page"].Instance, Name = "\0", Position = UDim2New(0, 0, 0, 43), ZIndex = 2, BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(1, 0, 0, 1), BorderSizePixel = 0, BackgroundColor3 = FromRGB(26, 24, 31) }) Items["Liner"]:AddToTheme({BackgroundColor3 = "Inline"}) Instances:Create("UIListLayout", { Parent = Items["SubPages"].Instance, Name = "\0", FillDirection = Enum.FillDirection.Horizontal, HorizontalAlignment = Enum.HorizontalAlignment.Right, Padding = UDimNew(0, 8), SortOrder = Enum.SortOrder.LayoutOrder }) else Items["Columns"].Instance.Position = UDim2New(0, 0, 0, 0) Items["Columns"].Instance.Size = UDim2New(1, 0, 1, 0) Instances:Create("UIListLayout", { Parent = Items["Columns"].Instance, Name = "\0", FillDirection = Enum.FillDirection.Horizontal, SortOrder = Enum.SortOrder.LayoutOrder, HorizontalFlex = Enum.UIFlexAlignment.Fill }) for Index = 1, Page.Columns do local NewColumn = Instances:Create("ScrollingFrame", { Parent = Items["Columns"].Instance, Name = "\0", ScrollBarImageColor3 = FromRGB(0, 0, 0), Active = true, AutomaticCanvasSize = Enum.AutomaticSize.Y, ScrollBarThickness = 0, BackgroundTransparency = 1, Size = UDim2New(1, 0, 1, 0), BackgroundColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), BorderSizePixel = 0, CanvasSize = UDim2New(0, 0, 0, 0) }) Instances:Create("UIPadding", { Parent = NewColumn.Instance, Name = "\0", PaddingTop = UDimNew(0, 4), PaddingBottom = UDimNew(0, 4), PaddingRight = UDimNew(0, 8), PaddingLeft = UDimNew(0, 8) }) Instances:Create("UIListLayout", { Parent = NewColumn.Instance, Name = "\0", Padding = UDimNew(0, 8), SortOrder = Enum.SortOrder.LayoutOrder }) Page.ColumnsData[Index] = NewColumn end end Page.Items = Items end local Debounce = false function Page:Turn(Bool) if Debounce then return end Page.Active = Bool Debounce = true Items["Page"].Instance.Visible = Bool Items["Page"].Instance.Parent = not Bool and Library.UnusedHolder.Instance or Page.Window.Items["Content"].Instance if Page.Active then Items["Icon"]:ChangeItemTheme({ImageColor3 = "Accent"}) Items["Icon"]:Tween(nil, {ImageColor3 = Library.Theme.Accent, ImageTransparency = 0}) Items["Text"]:Tween(nil, {TextTransparency = 0}) Items["Inactive"]:Tween(nil, {BackgroundTransparency = 0}) else Items["Icon"]:ChangeItemTheme({ImageColor3 = "Image"}) Items["Icon"]:Tween(nil, {ImageColor3 = Library.Theme.Image, ImageTransparency = 0.5}) Items["Text"]:Tween(nil, {TextTransparency = 0.5}) Items["Inactive"]:Tween(nil, {BackgroundTransparency = 1}) end local Descendants = Items["Page"].Instance:GetDescendants() TableInsert(Descendants, Items["Page"].Instance) local NewTween for Index, Value in Descendants do local TransparencyProperty = Tween:GetProperty(Value) if not TransparencyProperty then continue end if type(TransparencyProperty) == "table" then for _, Property in TransparencyProperty do NewTween = Tween:FadeItem(Value, Property, Page.Active, Library.FadeSpeed) end else NewTween = Tween:FadeItem(Value, TransparencyProperty, Page.Active, Library.FadeSpeed) end end Library:Connect(NewTween.Tween.Completed, function() Debounce = false end) end function Page:SetVisibility(Bool) Items["Inactive"].Instance.Visible = Bool end Items["Inactive"]:Connect("MouseButton1Down", function() for Index, Value in Page.Window.Pages do Value:Turn(Value == Page) end end) if #Page.Window.Pages == 0 then Page:Turn(true) end TableInsert(Page.Window.Pages, Page) return setmetatable(Page, Library.Pages) end Library.Pages.SubPage = function(self, Data) Data = Data or { } local Page = { Window = self.Window, Page = self, Name = Data.Name or Data.name or "Page", Columns = Data.Columns or Data.columns or 2, Active = false, Items = { }, ColumnsData = { } } local Items = { } do Items["Inactive"] = Instances:Create("TextButton", { Parent = Page.Page.Items["SubPages"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(47, 84, 176), BorderColor3 = FromRGB(0, 0, 0), Text = "", AutoButtonColor = false, BackgroundTransparency = 1, BorderSizePixel = 0, Size = UDim2New(0, 48, 1, 0), ZIndex = 2, TextSize = 18, BackgroundColor3 = FromRGB(26, 24, 31) }) Items["Inactive"]:AddToTheme({BackgroundColor3 = "Inline"}) Instances:Create("UIGradient", { Parent = Items["Inactive"].Instance, Name = "\0", Rotation = 90, Color = RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, FromRGB(211, 211, 211))} }):AddToTheme({Color = function() return RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 255, 255)), RGBSequenceKeypoint(1, Library.Theme["Gradient"])} end}) Instances:Create("UICorner", { Parent = Items["Inactive"].Instance, Name = "\0", CornerRadius = UDimNew(0, 6) }) Items["Text"] = Instances:Create("TextLabel", { Parent = Items["Inactive"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(255, 255, 255), TextTransparency = 0.5, AutomaticSize = Enum.AutomaticSize.X, Size = UDim2New(0, 0, 0, 15), AnchorPoint = Vector2New(0.5, 0.5), BorderSizePixel = 0, BackgroundTransparency = 1, Position = UDim2New(0.5, 0, 0.5, 0), BorderColor3 = FromRGB(0, 0, 0), Text = Page.Name, ZIndex = 3, TextSize = 18, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"]:AddToTheme({TextColor3 = "Text"}) Items["Glow"] = Instances:Create("ImageLabel", { Parent = Items["Inactive"].Instance, Name = "\0", ImageColor3 = FromRGB(0, 178, 255), ScaleType = Enum.ScaleType.Slice, ImageTransparency = 1, BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(1, 15, 1, 15), AnchorPoint = Vector2New(0.5, 0.5), Image = "http://www.roblox.com/asset/?id=18245826428", BackgroundTransparency = 1, Position = UDim2New(0.5, 0, 0.5, 0), BackgroundColor3 = FromRGB(255, 255, 255), BorderSizePixel = 0, SliceCenter = RectNew(Vector2New(21, 21), Vector2New(79, 79)) }) Items["Glow"]:AddToTheme({ImageColor3 = "Accent"}) Items["Page"] = Instances:Create("Frame", { Parent = Page.Page.Items["Columns"].Instance, Name = "\0", BackgroundTransparency = 1, BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(1, 0, 1, 0), BorderSizePixel = 0, Visible = false, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UIListLayout", { Parent = Items["Page"].Instance, Name = "\0", FillDirection = Enum.FillDirection.Horizontal, SortOrder = Enum.SortOrder.LayoutOrder, HorizontalFlex = Enum.UIFlexAlignment.Fill }) Items["Inactive"].Instance.Size = UDim2New(0, Items["Text"].Instance.TextBounds.X + 20, 1, 0) for Index = 1, Page.Columns do local NewColumn = Instances:Create("ScrollingFrame", { Parent = Items["Page"].Instance, Name = "\0", ScrollBarImageColor3 = FromRGB(0, 0, 0), Active = true, AutomaticCanvasSize = Enum.AutomaticSize.Y, ScrollBarThickness = 0, BackgroundTransparency = 1, Size = UDim2New(1, 0, 1, 0), BackgroundColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), BorderSizePixel = 0, CanvasSize = UDim2New(0, 0, 0, 0) }) Instances:Create("UIPadding", { Parent = NewColumn.Instance, Name = "\0", PaddingTop = UDimNew(0, 4), PaddingBottom = UDimNew(0, 4), PaddingRight = UDimNew(0, 8), PaddingLeft = UDimNew(0, 8) }) Instances:Create("UIListLayout", { Parent = NewColumn.Instance, Name = "\0", Padding = UDimNew(0, 8), SortOrder = Enum.SortOrder.LayoutOrder }) Page.ColumnsData[Index] = NewColumn end end local Debounce = false function Page:Turn(Bool) if Debounce then return end Page.Active = Bool Debounce = true Items["Page"].Instance.Visible = Bool Items["Page"].Instance.Parent = not Bool and Library.UnusedHolder.Instance or Page.Page.Items["Columns"].Instance if Page.Active then Items["Text"]:ChangeItemTheme({TextColor3 = "Accent"}) Items["Glow"]:Tween(nil, {ImageTransparency = 0.21}) Items["Text"]:Tween(nil, {TextTransparency = 0, TextColor3 = Library.Theme.Accent}) Items["Inactive"]:Tween(nil, {BackgroundTransparency = 0}) else Items["Text"]:ChangeItemTheme({TextColor3 = "Text"}) Items["Glow"]:Tween(nil, {ImageTransparency = 1}) Items["Text"]:Tween(nil, {TextTransparency = 0.5, TextColor3 = Library.Theme.Text}) Items["Inactive"]:Tween(nil, {BackgroundTransparency = 1}) end local Descendants = Items["Page"].Instance:GetDescendants() TableInsert(Descendants, Items["Page"].Instance) local NewTween for Index, Value in Descendants do local TransparencyProperty = Tween:GetProperty(Value) if not TransparencyProperty then continue end if type(TransparencyProperty) == "table" then for _, Property in TransparencyProperty do NewTween = Tween:FadeItem(Value, Property, Page.Active, Library.FadeSpeed) end else NewTween = Tween:FadeItem(Value, TransparencyProperty, Page.Active, Library.FadeSpeed) end end Library:Connect(NewTween.Tween.Completed, function() Debounce = false end) end Items["Inactive"]:Connect("MouseButton1Down", function() for Index, Value in Page.Page.SubPagesData do Value:Turn(Value == Page) end end) if #Page.Page.SubPagesData == 0 then Page:Turn(true) end TableInsert(Page.Page.SubPagesData, Page) return setmetatable(Page, Library.Pages) end 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 1, Items = { } } local Items = { } do Items["Section"] = Instances:Create("Frame", { Parent = Section.Page.ColumnsData[Section.Side].Instance, Name = "\0", Size = UDim2New(1, 0, 0, 25), BorderColor3 = FromRGB(0, 0, 0), BorderSizePixel = 0, ZIndex = 2, AutomaticSize = Enum.AutomaticSize.Y, BackgroundColor3 = FromRGB(26, 24, 31) }) Items["Section"]:AddToTheme({BackgroundColor3 = "Inline"}) Instances:Create("UICorner", { Parent = Items["Section"].Instance, Name = "\0", CornerRadius = UDimNew(0, 5) }) Instances:Create("UIPadding", { Parent = Items["Section"].Instance, Name = "\0", PaddingBottom = UDimNew(0, 8) }) Items["Liner"] = Instances:Create("Frame", { Parent = Items["Section"].Instance, Name = "\0", Position = UDim2New(0, 8, 0, 30), ZIndex = 2, BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(0, 48, 0, 2), BorderSizePixel = 0, BackgroundColor3 = FromRGB(0, 178, 255) }) Items["Liner"]:AddToTheme({BackgroundColor3 = "Accent"}) Items["Text"] = Instances:Create("TextLabel", { Parent = Items["Section"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), Text = Section.Name, Size = UDim2New(0, 0, 0, 15), BackgroundTransparency = 1, ZIndex = 2, Position = UDim2New(0, 8, 0, 8), BorderSizePixel = 0, AutomaticSize = Enum.AutomaticSize.X, TextSize = 16, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"]:AddToTheme({BackgroundColor3 = "Inline"}) Items["Content"] = Instances:Create("Frame", { Parent = Items["Section"].Instance, Name = "\0", BorderColor3 = FromRGB(0, 0, 0), BackgroundTransparency = 1, Position = UDim2New(0, 8, 0, 40), ZIndex = 2, Size = UDim2New(1, -16, 0, 0), BorderSizePixel = 0, AutomaticSize = Enum.AutomaticSize.Y, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UIListLayout", { Parent = Items["Content"].Instance, Name = "\0", Padding = UDimNew(0, 8), SortOrder = Enum.SortOrder.LayoutOrder }) Items["Liner"].Instance.Size = UDim2New(0, Items["Text"].Instance.TextBounds.X + 5, 0, 2) Section.Items = Items end return setmetatable(Section, Library.Sections) end 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, } local NewToggle, ToggleItems = Components:Toggle({ Name = Toggle.Name, Parent = Toggle.Section.Items["Content"], Flag = Toggle.Flag, Default = Toggle.Default, Page = Toggle.Page, Section = Toggle.Section, Callback = Toggle.Callback }) function NewToggle:Colorpicker(Data) Data = Data or { } local Colorpicker = { Window = self.Window, Page = self.Page, Section = self.Section, Flag = Data.Flag or Data.flag or Library:NextFlag(), Default = Data.Default or Data.default or FromRGB(255, 255, 255), Alpha = Data.Alpha or Data.alpha or 0, Callback = Data.Callback or Data.callback or function() end } local NewColorpicker, ColorpickerItems = Components:Colorpicker({ Name = Toggle.Name, Parent = ToggleItems["SubElements"], Flag = Colorpicker.Flag, Default = Colorpicker.Default, Alpha = Colorpicker.Alpha, Callback = Colorpicker.Callback, Page = Colorpicker.Page, Window = Colorpicker.Window }) return NewColorpicker end function NewToggle:Keybind(Data) Data = Data or { } local Keybind = { Window = self.Window, Page = self.Page, Section = self.Section, 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" } local NewKeybind, KeybindItems = Components:Keybind({ Name = Toggle.Name, Parent = ToggleItems["SubElements"], Page = Keybind.Page, Flag = Keybind.Flag, Default = Keybind.Default, Mode = Keybind.Mode, Callback = Keybind.Callback }) return NewKeybind end return NewToggle end Library.Sections.Button = function(self) local Button = { Window = self.Window, Page = self.Page, Section = self } local NewButton = Components:Button({ Parent = Button.Section.Items["Content"] }) return NewButton end 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(), Default = Data.Default or Data.default or 0, Min = Data.Min or Data.min or 0, Max = Data.Max or Data.max or 100, Decimals = Data.Decimals or Data.decimals or 1, Callback = Data.Callback or Data.callback or function() end, Suffix = Data.Suffix or Data.suffix or "", } local NewSlider, SliderItems = Components:Slider({ Name = Slider.Name, Parent = Slider.Section.Items["Content"], Flag = Slider.Flag, Default = Slider.Default, Min = Slider.Min, Max = Slider.Max, Decimals = Slider.Decimals, Suffix = Slider.Suffix, Page = Slider.Page, Section = Slider.Section, Callback = Slider.Callback }) return NewSlider end 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(), Default = Data.Default or Data.default or nil, Callback = Data.Callback or Data.callback or function() end, Items = Data.Items or Data.items or { "One", "Two", "Three" }, Multi = Data.Multi or Data.multi or false, MaxSize = Data.MaxSize or Data.maxsize or 145, } local NewDropdown, Items = Components:Dropdown({ Name = Dropdown.Name, Parent = Dropdown.Section.Items["Content"], Flag = Dropdown.Flag, Items = Dropdown.Items, Default = Dropdown.Default, Callback = Dropdown.Callback, Multi = Dropdown.Multi, Page = Dropdown.Page, MaxSize = Dropdown.MaxSize, Window = Dropdown.Window }) return NewDropdown end Library.Sections.Label = function(self, Name) local Label = { Window = self.Window, Page = self.Page, Section = self, Name = Name or "Label" } local Items = { } do Items["Label"] = Instances:Create("Frame", { Parent = Label.Section.Items["Content"].Instance, Name = "\0", BackgroundTransparency = 1, BorderColor3 = FromRGB(0, 0, 0), Size = UDim2New(1, 0, 0, 18), BorderSizePixel = 0, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"] = Instances:Create("TextLabel", { Parent = Items["Label"].Instance, Name = "\0", FontFace = Library.Font, TextColor3 = FromRGB(255, 255, 255), BorderColor3 = FromRGB(0, 0, 0), Text = Label.Name, AnchorPoint = Vector2New(0, 0.5), Size = UDim2New(0, 0, 0, 15), BackgroundTransparency = 1, Position = UDim2New(0, 0, 0.5, 0), BorderSizePixel = 0, AutomaticSize = Enum.AutomaticSize.X, TextSize = 16, ZIndex = 2, BackgroundColor3 = FromRGB(255, 255, 255) }) Items["Text"]:AddToTheme({TextColor3 = "Text"}) Items["SubElements"] = Instances:Create("Frame", { Parent = Items["Label"].Instance, Name = "\0", BorderColor3 = FromRGB(0, 0, 0), AnchorPoint = Vector2New(1, 0), BackgroundTransparency = 1, Position = UDim2New(1, 0, 0, 0), Size = UDim2New(0, 0, 1, 0), BorderSizePixel = 0, AutomaticSize = Enum.AutomaticSize.X, BackgroundColor3 = FromRGB(255, 255, 255) }) Instances:Create("UIListLayout", { Parent = Items["SubElements"].Instance, Name = "\0", FillDirection = Enum.FillDirection.Horizontal, HorizontalAlignment = Enum.HorizontalAlignment.Right, Padding = UDimNew(0, 6), SortOrder = Enum.SortOrder.LayoutOrder }) end function Label:SetVisibility(Bool) Items["Label"].Instance.Visible = Bool end function Label:SetText(Text) Text = tostring(Text) Items["Text"].Instance.Text = Text end function Label:Colorpicker(Data) Data = Data or { } local Colorpicker = { Window = self.Window, Page = self.Page, Section = self.Section, Flag = Data.Flag or Data.flag or Library:NextFlag(), Default = Data.Default or Data.default or FromRGB(255, 255, 255), Alpha = Data.Alpha or Data.alpha or 0, Callback = Data.Callback or Data.callback or function() end } local NewColorpicker, ColorpickerItems = Components:Colorpicker({ Name = Label.Name, Parent = Items["SubElements"], Flag = Colorpicker.Flag, Default = Colorpicker.Default, Alpha = Colorpicker.Alpha, Callback = Colorpicker.Callback, Page = Colorpicker.Page, Window = Colorpicker.Window }) return NewColorpicker end function Label:Keybind(Data) Data = Data or { } local Keybind = { Window = self.Window, Page = self.Page, Section = self.Section, 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" } local NewKeybind, KeybindItems = Components:Keybind({ Name = Label.Name, Parent = Items["SubElements"], Page = Keybind.Page, Flag = Keybind.Flag, Default = Keybind.Default, Mode = Keybind.Mode, Callback = Keybind.Callback }) return NewKeybind end return Label end 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 "...", } local NewTextbox, TextboxItems = Components:Textbox({ Name = Textbox.Name, Parent = Textbox.Section.Items["Content"], Flag = Textbox.Flag, Default = Textbox.Default, Placeholder = Textbox.Placeholder, Page = Textbox.Page, Section = Textbox.Section, Window = Textbox.Window, Callback = Textbox.Callback }) return NewTextbox end Library.Sections.Searchbox = function(self, Data) Data = Data or { } local Searchbox = { Window = self.Window, Page = self.Page, Section = self, Flag = Data.Flag or Data.flag or Library:NextFlag(), Default = Data.Default or Data.default or nil, Callback = Data.Callback or Data.callback or function() end, Items = Data.Items or Data.items or { "One", "Two", "Three" }, Multi = Data.Multi or Data.multi or false, } local NewSearchbox, Items = Components:Searchbox({ Name = Searchbox.Name, Parent = Searchbox.Section.Items["Content"], Flag = Searchbox.Flag, Items = Searchbox.Items, Default = Searchbox.Default, Callback = Searchbox.Callback, Multi = Searchbox.Multi, Page = Searchbox.Page, Window = Searchbox.Window }) return NewSearchbox end end Library.CreateSettingsPage = function(self, Window, Watermark, KeyList) local SettingsPage = Window:Page({ Name = "Settings", SubPages = true, Icon = "rbxassetid://106237632702124" }) local ThemingSubPage = SettingsPage:SubPage({ Name = "Theming", Columns = 2 }) do local ThemingSection = ThemingSubPage:Section({ Name = "Theming" }) do for Index, Value in Library.Theme do ThemingSection:Label(Index):Colorpicker({ Name = Index, Flag = Index.."Theme", Default = Value, Callback = function(Value) Library.Theme[Index] = Value Library:ChangeTheme(Index, Value) end }) end end end local ConfigsSubPage = SettingsPage:SubPage({ Name = "Configs", Columns = 2 }) do local ConfigsSection = ConfigsSubPage:Section({ Name = "Configs" }) do local ConfigSelected local ConfigName local ConfigsSearchbox = ConfigsSection:Searchbox({ Name = "SearchboxConfigs", Flag = "ConfigsSearchobx", Items = { }, Multi = false, Callback = function(Value) ConfigSelected = Value end }) ConfigsSection:Textbox({ Name = "Config Name", Default = "", Flag = "ConfigName", Placeholder = "Enter text", Callback = function(Value) ConfigName = Value end }) local CreateAndDeleteButton = ConfigsSection:Button() CreateAndDeleteButton:Add("Create", function() if ConfigName and ConfigName ~= "" then if not isfile(Library.Folders.Configs .. "/" .. ConfigName .. ".json") then writefile(Library.Folders.Configs .. "/" .. ConfigName .. ".json", Library:GetConfig()) Library:Notification("Success", "Created config "..ConfigName .. " succesfully", 5) Library:RefreshConfigsList(ConfigsSearchbox) else Library:Notification("Error", "Config with this name already exists.", 5) return end end end) CreateAndDeleteButton:Add("Delete", function() if ConfigSelected then Library:DeleteConfig(ConfigSelected) Library:Notification("Success", "Deleted config "..ConfigSelected .. " succesfully", 5) Library:RefreshConfigsList(ConfigsSearchbox) end end) local LoadAndSaveButton = ConfigsSection:Button() LoadAndSaveButton:Add("Load", function() if ConfigSelected then local Success, Error = Library:LoadConfig(readfile(Library.Folders.Configs .. "/" .. ConfigSelected)) if Success then Library:Notification("Success", "Loaded config "..ConfigSelected .. " succesfully", 5) else Library:Notification("Error", "Failed to load config "..ConfigSelected .. " report this to the devs:\n"..Error, 5) end end end) LoadAndSaveButton:Add("Save", function() if ConfigName and ConfigName ~= "" then writefile(Library.Folders.Configs .. "/" .. ConfigName .. ".json", Library:GetConfig()) Library:Notification("Success", "Saved config "..ConfigName .. " succesfully", 5) Library:RefreshConfigsList(ConfigsSearchbox) end end) local RefreshlistButton = ConfigsSection:Button() RefreshlistButton:Add("Refresh", function() Library:RefreshConfigsList(ConfigsSearchbox) end) Library:RefreshConfigsList(ConfigsSearchbox) end end local SettingsSubPage = SettingsPage:SubPage({ Name = "Settings", Columns = 2 }) do local SettingsSection = SettingsSubPage:Section({ Name = "Settings" }) do SettingsSection:Button():Add("Unload", function() Library:Unload() end) SettingsSection:Label("UI Keybind"):Keybind({ Name = "Menu Keybind", Flag = "UIKeybind", Default = Library.MenuKeybind, Mode = "Toggle", Callback = function() Library.MenuKeybind = Library.Flags["UIKeybind"].Key end }) SettingsSection:Slider({ Name = "Fade Time Amount", Flag = "FadeTime", Default = Library.FadeSpeed, Min = 0, Max = 1, Decimals = 0.01, Callback = function(Value) Library.FadeSpeed = Value end }) SettingsSection:Toggle({ Name = "Watermark", Flag = "Watermark", Default = true, Callback = function(Value) Watermark:SetVisibility(Value) end }) SettingsSection:Toggle({ Name = "Keybind List", Flag = "Keybind list", Default = true, Callback = function(Value) KeyList:SetVisibility(Value) end }) SettingsSection:Slider({ Name = "Tween Speed Amount", Flag = "TweenSpeed", Min = 0, Max = 3, Decimals = 0.01, Default = Library.Tween.Time, Suffix = "s", Callback = function(Value) if not Value then return end Library.Tween.Time = Value end }) SettingsSection:Dropdown({ Name = "Tween Style", Flag = "Tween style", Items = { "Linear", "Quad", "Quart", "Back", "Bounce", "Circular", "Cubic", "Elastic", "Exponential", "Sine", "Quint" }, Default = "Cubic", Callback = function(Value) Library.Tween.Style = Enum.EasingStyle[Value] end }) SettingsSection:Dropdown({ Name = "Tween Direction", Flag = "Tween direction", Items = { "In", "Out", "InOut" }, Default = "Out", Callback = function(Value) Library.Tween.Direction = Enum.EasingDirection[Value] end }) local Images = { ["Scary Cat"] = "rbxassetid://115002736787206", ["Scary Cat 2"] = "rbxassetid://105189727229400", ["idk some image"] = "rbxassetid://126592927138240", ["mark zuckerberg"] = "rbxassetid://71658891270677", ["Abstract"] = "rbxassetid://6073743871", ["Hexagon"] = "rbxassetid://6073628839", ["Circles"] = "rbxassetid://6071579801", ["Lace With Flowers"] = "rbxassetid://6071575925", ["Floral"] = "rbxassetid://5553946656", ["Halloween"] = "rbxassetid://11113209821", ["Christmas"] = "rbxassetid://11711560928", ["Galaxy"] = "rbxassetid://80544508810139", } local ImagesDropdown = SettingsSection:Dropdown({ Name = "Background Image", Flag = "BackgroundImage", Items = { }, Callback = function(Value) Window:SetBackgroundImage(Images[Value]) end }) for Index, Value in Images do ImagesDropdown:Add(Index) end end end end end return Library