local _genv = (getgenv and getgenv()) or _G
if _genv.Library then
    pcall(function() _genv.Library:Unload() end)
    _genv.Library = nil
end

local Library do 
    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

    local LocalPlayer = Players.LocalPlayer
    local Mouse = LocalPlayer:GetMouse()

    local FromRGB = Color3.fromRGB
    local FromHSV = Color3.fromHSV
    local FromHex = Color3.fromHex

    local RGBSequence = ColorSequence.new
    local RGBSequenceKeypoint = ColorSequenceKeypoint.new

    local UDim2New = UDim2.new
    local UDimNew = UDim.new
    local Vector2New = Vector2.new

    local MathClamp = math.clamp
    local MathFloor = math.floor

    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 StringLen = string.len
    local StringSub = string.sub

    local InstanceNew = Instance.new

    Library = {
        Theme =  { },

        MenuKeybind = tostring(Enum.KeyCode.Z), 

        Flags = { },

        Tween = {
            Time = 0.4,
            Style = Enum.EasingStyle.Quint,
            Direction = Enum.EasingDirection.Out
        },

        FadeSpeed = 0.2,

        Folders = {
            Directory = "esdeeeeee",
            Configs = "esdeeeeee/Configs",
            Assets = "esdeeeeee/Assets",
            Fonts  = "esdeeeeee/Fonts",
        },

        Pages = { },
        Sections = { },

        Connections = { },
        Threads = { },

        ThemeMap = { },
        ThemeItems = { },

        OpenFrames = { },

        SetFlags = { },

        UnnamedConnections = 0,
        UnnamedFlags = 0,

        Holder = nil,
        NotifHolder = nil,
        UnusedHolder = nil,

        Font = nil
    }

    local Keys = {
        ["Unknown"]           = "Unknown",
        ["Backspace"]         = "Back",
        ["Tab"]               = "Tab",
        ["Clear"]             = "Clear",
        ["Return"]            = "Return",
        ["Pause"]             = "Pause",
        ["Escape"]            = "Escape",
        ["Space"]             = "Space",
        ["QuotedDouble"]      = '"',
        ["Hash"]              = "#",
        ["Dollar"]            = "$",
        ["Percent"]           = "%",
        ["Ampersand"]         = "&",
        ["Quote"]             = "'",
        ["LeftParenthesis"]   = "(",
        ["RightParenthesis"]  = " )",
        ["Asterisk"]          = "*",
        ["Plus"]              = "+",
        ["Comma"]             = ",",
        ["Minus"]             = "-",
        ["Period"]            = ".",
        ["Slash"]             = "`",
        ["Three"]             = "3",
        ["Seven"]             = "7",
        ["Eight"]             = "8",
        ["Colon"]             = ":",
        ["Semicolon"]         = ";",
        ["LessThan"]          = "<",
        ["GreaterThan"]       = ">",
        ["Question"]          = "?",
        ["Equals"]            = "=",
        ["At"]                = "@",
        ["LeftBracket"]       = "LeftBracket",
        ["RightBracket"]      = "RightBracked",
        ["BackSlash"]         = "BackSlash",
        ["Caret"]             = "^",
        ["Underscore"]        = "_",
        ["Backquote"]         = "`",
        ["LeftCurly"]         = "{",
        ["Pipe"]              = "|",
        ["RightCurly"]        = "}",
        ["Tilde"]             = "~",
        ["Delete"]            = "Delete",
        ["End"]               = "End",
        ["KeypadZero"]        = "Keypad0",
        ["KeypadOne"]         = "Keypad1",
        ["KeypadTwo"]         = "Keypad2",
        ["KeypadThree"]       = "Keypad3",
        ["KeypadFour"]        = "Keypad4",
        ["KeypadFive"]        = "Keypad5",
        ["KeypadSix"]         = "Keypad6",
        ["KeypadSeven"]       = "Keypad7",
        ["KeypadEight"]       = "Keypad8",
        ["KeypadNine"]        = "Keypad9",
        ["KeypadPeriod"]      = "KeypadP",
        ["KeypadDivide"]      = "KeypadD",
        ["KeypadMultiply"]    = "KeypadM",
        ["KeypadMinus"]       = "KeypadM",
        ["KeypadPlus"]        = "KeypadP",
        ["KeypadEnter"]       = "KeypadE",
        ["KeypadEquals"]      = "KeypadE",
        ["Insert"]            = "Insert",
        ["Home"]              = "Home",
        ["PageUp"]            = "PageUp",
        ["PageDown"]          = "PageDown",
        ["RightShift"]        = "RightShift",
        ["LeftShift"]         = "LeftShift",
        ["RightControl"]      = "RightControl",
        ["LeftControl"]       = "LeftControl",
        ["LeftAlt"]           = "LeftAlt",
        ["RightAlt"]          = "RightAlt"
    }

    local Themes = {
        ["Preset"] = {
            ["Background"] = FromRGB(16, 18, 18),
            ["Inline"] = FromRGB(21, 24, 24),
            ["Element"] = FromRGB(30, 34, 34),
            ["Accent"] = FromRGB(255, 0, 0),
            ["Border"] = FromRGB(255, 0, 0),
            ["Border 2"] = FromRGB(56, 62, 62)
        }
    }

    Library.__index = Library
    Library.Sections.__index = Library.Sections
    Library.Pages.__index = Library.Pages

    Library.Theme = TableClone(Themes["Preset"])

    for Index, Value in Library.Folders do
        local ok, err = pcall(function()
            if not isfolder(Value) then
                makefolder(Value)
            end
        end)
        if not ok then
            -- silently skip on Luarmor or sandboxed executors
        end
    end

    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.Tween.Time, Library.Tween.Style, Library.Tween.Direction), {
                [Property] = Visibility and OldTransparency or 1
            }, true)

            Library:Connect(NewTween.Tween.Completed, function()
                if not Visibility then 
                    task.wait()
                    Item[Property] = OldTransparency
                end
            end)

            return NewTween
        end

        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

    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.Connect = function(self, Event, Callback, Name)
            if not self.Instance then 
                return
            end

            if not self.Instance[Event] then 
                return
            end

            return Library:Connect(self.Instance[Event], Callback, Name)
        end

        Instances.Tween = function(self, Info, Goal)
            if not self.Instance then 
                return
            end

            return Tween:Create(self, Info, Goal)
        end

        Instances.Disconnect = function(self, Name)
            if not self.Instance then 
                return
            end

            return Library:Disconnect(Name)
        end

        Instances.Clean = function(self)
            if not self.Instance then 
                return
            end

            self.Instance:Destroy()
            self = nil
        end

        Instances.MakeDraggable = function(self)
            if not self.Instance then 
                return
            end

            local Gui = self.Instance

            local Dragging = false 
            local DragStart
            local StartPosition 

            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

            local InputChanged

            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

                            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 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 ResizeButton = Instances:Create("ImageButton", {
				Parent = Gui,
                Image = "rbxassetid://",
				AnchorPoint = Vector2New(1, 1),
				BorderColor3 = FromRGB(0, 0, 0),
				Size = UDim2New(0, 8, 0, 8),
				Position = UDim2New(1, -4, 1, -4),
                Name = "\0",
				BorderSizePixel = 0,
				BackgroundTransparency = 1,
                ZIndex = 5,
				AutoButtonColor = false,
                Visible = true,
			})  ResizeButton:AddToTheme({ImageColor3 = "Accent"})

            local InputChanged

            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

                    InputChanged = Input.Changed:Connect(function()
                        if Input.UserInputState == Enum.UserInputState.End then
                            Resizing = 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 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 Resizing
        end

        Instances.OnHover = function(self, Function)
            if not self.Instance then 
                return
            end
            
            return Library:Connect(self.Instance.MouseEnter, Function)
        end

        Instances.OnHoverLeave = function(self, Function)
            if not self.Instance then 
                return
            end
            
            return Library:Connect(self.Instance.MouseLeave, Function)
        end
    end

    local CustomFont = { } do
        function CustomFont:New(Name, Weight, Style, Data)
            -- Fallback font used when file-system or getcustomasset is unavailable (Luarmor)
            local function fallbackFont()
                return Font.new("rbxasset://fonts/families/GothamSSm.json", Enum.FontWeight.SemiBold, Enum.FontStyle.Normal)
            end

            if not (isfolder and makefolder and writefile and getcustomasset) then
                return fallbackFont()
            end

            local fontFilePath = Library.Folders.Fonts .. "/" .. Name .. ".ttf"
            local fontDefPath  = Library.Folders.Fonts .. "/" .. Name .. ".font"

            local ok = pcall(function()
                if not isfile(fontFilePath) then
                    writefile(fontFilePath, game:HttpGet(Data.Url))
                end

                local fontDef = {
                    name = Name,
                    faces = {
                        {
                            name = Name,
                            weight = Weight,
                            style = Style,
                            assetId = getcustomasset(fontFilePath)
                        }
                    }
                }

                writefile(fontDefPath, HttpService:JSONEncode(fontDef))
            end)

            if not ok then
                return fallbackFont()
            end

            local font
            local fontOk = pcall(function()
                font = Font.new(getcustomasset(fontDefPath), Enum.FontWeight.Regular, Enum.FontStyle.Normal)
            end)

            return (fontOk and font) or fallbackFont()
        end

        Library.Font = CustomFont:New("InterSemiBold", "Regular", "Normal", {
            Url = "https://[Log in to view URL]"
        })
    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,
        ResetOnSpawn = 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",
        Padding = UDimNew(0, 12),
        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
        local _g = (getgenv and getgenv()) or _G
        _g.Library = nil
    end

    Library.GetImage = function(self, Image)
        local ImageData = self.Images[Image]

        if not ImageData then 
            return
        end

        if not getcustomasset then return nil end
        local ok, result = pcall(getcustomasset, self.Folders.Assets .. "/" .. ImageData[1])
        return ok and result or nil
    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_number_%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_number_%s_%s", FlagNumber, HttpService:GenerateGUID(false))
    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.ToRich = function(self, Text, Color)
		return `<font color="rgb({MathFloor(Color.R * 255)}, {MathFloor(Color.G * 255)}, {MathFloor(Color.B * 255)})">{Text}</font>`
	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.HexValue, 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.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.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

    Library.Lerp = function(self, Start, Finish, Time)
        return Start + (Finish - Start) * Time
    end

    Library.CompareVectors = function(self, PointA, PointB)
        return (PointA.X < PointB.X) or (PointA.Y < PointB.Y)
    end

    Library.IsClipped = function(self, Object, Column)
        local Parent = Column
        
        local BoundryTop = Parent.AbsolutePosition
        local BoundryBottom = BoundryTop + Parent.AbsoluteSize

        local Top = Object.AbsolutePosition
        local Bottom = Top + Object.AbsoluteSize 

        return Library:CompareVectors(Top, BoundryTop) or Library:CompareVectors(BoundryBottom, Bottom)
    end

    do
        Library.CreateColorpicker = function(self, Data)
            local Colorpicker = {
                Hue = 0,
                Saturation = 0,
                Value = 0,

                Color = FromRGB(0, 0, 0),
                HexValue = "000000",

                Flag = Data.Flag,

                IsOpen = false
            }

            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, 14, 0, 14),
                    BorderSizePixel = 0,
                    TextSize = 14,
                    BackgroundColor3 = FromRGB(164, 229, 255)
                })
                
                Instances:Create("UIStroke", {
                    Parent = Items["ColorpickerButton"].Instance,
                    Name = "\0",
                    ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
                    Color = FromRGB(56, 62, 62),
                    Thickness = 1.5
                }):AddToTheme({Color = "Border 2"})
                
                Instances:Create("UICorner", {
                    Parent = Items["ColorpickerButton"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 4)
                })
                
                Items["ColorpickerWindow"] = Instances:Create("Frame", {
                    Parent = Library.UnusedHolder.Instance,
                    Name = "\0",
                    Visible = false,
                    Position = UDim2New(0, 115, 0, 102),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Size = UDim2New(0, 183, 0, 201),
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(16, 18, 18)
                })  Items["ColorpickerWindow"]:AddToTheme({BackgroundColor3 = "Background"})
                
                Instances:Create("UICorner", {
                    Parent = Items["ColorpickerWindow"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 7)
                })
                
                Items["Inline"] = Instances:Create("Frame", {
                    Parent = Items["ColorpickerWindow"].Instance,
                    Name = "\0",
                    Position = UDim2New(0, 6, 0, 6),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Size = UDim2New(1, -12, 1, -12),
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(21, 24, 24)
                })  Items["Inline"]:AddToTheme({BackgroundColor3 = "Inline"})
                
                Instances:Create("UIStroke", {
                    Parent = Items["Inline"].Instance,
                    Name = "\0",
                    Color = FromRGB(30, 33, 33),
                    ApplyStrokeMode = Enum.ApplyStrokeMode.Border
                }):AddToTheme({Color = "Border"})
                
                Instances:Create("UICorner", {
                    Parent = Items["Inline"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 7)
                })
                
                Items["Palette"] = Instances:Create("TextButton", {
                    Parent = Items["Inline"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(0, 0, 0),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Text = "-,",
                    AutoButtonColor = false,
                    Position = UDim2New(0, 6, 0, 6),
                    Size = UDim2New(1, -12, 1, -40),
                    BorderSizePixel = 0,
                    TextSize = 14,
                    BackgroundColor3 = FromRGB(164, 229, 255)
                })
                
                Instances:Create("UICorner", {
                    Parent = Items["Palette"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 7)
                })
                
                Instances:Create("UIStroke", {
                    Parent = Items["Palette"].Instance,
                    Name = "\0",
                    Color = FromRGB(30, 33, 33),
                    ApplyStrokeMode = Enum.ApplyStrokeMode.Border
                }):AddToTheme({Color = "Border"})
                
                Items["Saturation"] = Instances:Create("ImageLabel", {
                    Parent = Items["Palette"].Instance,
                    Name = "\0",
                    BorderColor3 = FromRGB(0, 0, 0),
                    Image = "rbxassetid://130624743341203",
                    BackgroundTransparency = 1,
                    Size = UDim2New(1, 0, 1, 0),
                    ZIndex = 2,
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                Instances:Create("UICorner", {
                    Parent = Items["Saturation"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 7)
                })
                
                Items["Value"] = Instances:Create("ImageLabel", {
                    Parent = Items["Palette"].Instance,
                    Name = "\0",
                    BorderColor3 = FromRGB(0, 0, 0),
                    Size = UDim2New(1, 2, 1, 0),
                    Image = "rbxassetid://96192970265863",
                    BackgroundTransparency = 1,
                    Position = UDim2New(0, -1, 0, 0),
                    ZIndex = 3,
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                Instances:Create("UICorner", {
                    Parent = Items["Value"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 7)
                })
                
                Items["PaletteDragger"] = Instances:Create("Frame", {
                    Parent = Items["Palette"].Instance,
                    Name = "\0",
                    Size = UDim2New(0, 3, 0, 3),
                    Position = UDim2New(0, 5, 0, 5),
                    BorderColor3 = FromRGB(0, 0, 0),
                    ZIndex = 3,
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                Instances:Create("UICorner", {
                    Parent = Items["PaletteDragger"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(1, 0)
                })
                
                Instances:Create("UIStroke", {
                    Parent = Items["PaletteDragger"].Instance,
                    Name = "\0",
                    Color = FromRGB(120, 120, 120),
                    ApplyStrokeMode = Enum.ApplyStrokeMode.Border
                })
                
                Items["Hue"] = Instances:Create("TextButton", {
                    Parent = Items["Inline"].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, 6, 1, -6),
                    Size = UDim2New(1, -12, 0, 18),
                    BorderSizePixel = 0,
                    TextSize = 14,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                Instances:Create("UICorner", {
                    Parent = Items["Hue"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 7)
                })
                
                Instances:Create("UIStroke", {
                    Parent = Items["Hue"].Instance,
                    Name = "\0",
                    Color = FromRGB(30, 33, 33),
                    ApplyStrokeMode = Enum.ApplyStrokeMode.Border
                }):AddToTheme({Color = "Border"})
                
                Instances:Create("UIGradient", {
                    Parent = Items["Hue"].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))}
                })
                
                Items["HueDragger"] = Instances:Create("Frame", {
                    Parent = Items["Hue"].Instance,
                    Name = "\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",
                    Color = FromRGB(30, 33, 33),
                    ApplyStrokeMode = Enum.ApplyStrokeMode.Border
                }):AddToTheme({Color = "Border"})                
            end

            local Debounce = false
            local RenderStepped  

            function Colorpicker:Get()
                return Colorpicker.Color
            end

            function Colorpicker:SetVisibility(Bool)
                Items["ColorpickerButton"].Instance.Visible = Bool
            end

            function Colorpicker:SetOpen(Bool)
                if Debounce then 
                    return
                end

                Colorpicker.IsOpen = Bool

                Debounce = true 

                if Colorpicker.IsOpen then 
                    Items["ColorpickerWindow"].Instance.Visible = true
                    Items["ColorpickerWindow"].Instance.Parent = Library.Holder.Instance
                    
                    RenderStepped = RunService.RenderStepped:Connect(function()
                        Items["ColorpickerWindow"].Instance.Position = UDim2New(0, Items["ColorpickerButton"].Instance.AbsolutePosition.X + 18, 0, Items["ColorpickerButton"].Instance.AbsolutePosition.Y - 25)
                    end)

                    for Index, Value in Library.OpenFrames do 
                        if not Data.Section.IsSettings then
                            Value:SetOpen(false)
                        end
                    end

                    Library.OpenFrames[Colorpicker] = Colorpicker 
                else
                    if Library.OpenFrames[Colorpicker] then 
                        Library.OpenFrames[Colorpicker] = nil
                    end

                    if RenderStepped then 
                        RenderStepped:Disconnect()
                        RenderStepped = 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 Value.ClassName:find("UI") then 
                        Value.ZIndex = Colorpicker.IsOpen and 4 or 1
                    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
                
                NewTween.Tween.Completed:Connect(function()
                    Debounce = false 
                    Items["ColorpickerWindow"].Instance.Visible = Colorpicker.IsOpen
                    task.wait(0.2)
                    Items["ColorpickerWindow"].Instance.Parent = not Colorpicker.IsOpen and Library.UnusedHolder.Instance or Library.Holder.Instance
                end)
            end

            function Colorpicker:Update()
                local Hue, Saturation, Value = Colorpicker.Hue, Colorpicker.Saturation, Colorpicker.Value
                Colorpicker.Color = FromHSV(Hue, Saturation, Value)
                Colorpicker.HexValue = Colorpicker.Color:ToHex()

                Library.Flags[Colorpicker.Flag] = {
                    Color = Colorpicker.Color,
                    HexValue = Colorpicker.HexValue,
                }

                Items["ColorpickerButton"]:Tween(nil, {BackgroundColor3 = Colorpicker.Color})
                Items["Palette"]:Tween(nil, {BackgroundColor3 = FromHSV(Hue, 1, 1)})

                if Data.Callback then 
                    Library:SafeCall(Data.Callback, Colorpicker.Color, Colorpicker.Alpha)
                end
            end

            local SlidingPalette = false
            local PaletteChanged
            
            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)

                Colorpicker.Saturation = ValueX
                Colorpicker.Value = ValueY

                local SlideX = MathClamp((Input.Position.X - Items["Palette"].Instance.AbsolutePosition.X) / Items["Palette"].Instance.AbsoluteSize.X, 0, 0.98)
                local SlideY = MathClamp((Input.Position.Y - Items["Palette"].Instance.AbsolutePosition.Y) / Items["Palette"].Instance.AbsoluteSize.Y, 0, 0.98)

                Items["PaletteDragger"]:Tween(TweenInfo.new(0.35, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2New(SlideX, 0, SlideY, 0)})
                Colorpicker:Update()
            end
            
            local SlidingHue = false
            local HueChanged

            function Colorpicker:SlideHue(Input)
                if not Input or not SlidingHue then
                    return
                end
                
                local ValueX = MathClamp((Input.Position.X - Items["Hue"].Instance.AbsolutePosition.X) / Items["Hue"].Instance.AbsoluteSize.X, 0, 1)

                Colorpicker.Hue = ValueX

                local SlideX = MathClamp((Input.Position.X - Items["Hue"].Instance.AbsolutePosition.X) / Items["Hue"].Instance.AbsoluteSize.X, 0, 0.995)

                Items["HueDragger"]:Tween(TweenInfo.new(0.35, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2New(SlideX, 0, 0, 0)})
                Colorpicker:Update()
            end

            function Colorpicker:Set(Color, Alpha)
                if type(Color) == "table" then
                    Color = FromRGB(Color[1], Color[2], Color[3])
                    Alpha = Color[4]
                elseif type(Color) == "string" then
                    Color = FromHex(Color)
                end 

                Colorpicker.Hue, Colorpicker.Saturation, Colorpicker.Value = Color:ToHSV()
                Colorpicker.Alpha = Alpha or 0  

                local PaletteValueX = MathClamp(1 - Colorpicker.Saturation, 0, 0.98)
                local PaletteValueY = MathClamp(1 - Colorpicker.Value, 0, 0.98)

                local HuePositionX = MathClamp(Colorpicker.Hue, 0, 0.99)

                Items["PaletteDragger"]:Tween(TweenInfo.new(0.35, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2New(PaletteValueX, 0, PaletteValueY, 0)})
                Items["HueDragger"]:Tween(TweenInfo.new(0.35, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2New(HuePositionX, 0, 0, 0)})
                Colorpicker:Update()
            end

            Items["ColorpickerButton"]:Connect("MouseButton1Down", function()
                Colorpicker:SetOpen(not Colorpicker.IsOpen)
            end)

            Items["Palette"]:Connect("InputBegan", function(Input)
                if Input.UserInputType == Enum.UserInputType.MouseButton1 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["Hue"]:Connect("InputBegan", function(Input)
                if Input.UserInputType == Enum.UserInputType.MouseButton1 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)

            Library:Connect(UserInputService.InputBegan, function(Input)
                if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then
                    if Colorpicker.IsOpen then
                        if Library:IsMouseOverFrame(Items["ColorpickerWindow"]) then
                            return
                        end

                        Colorpicker:SetOpen(false)
                    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
                end
            end)

            Items["ColorpickerButton"]:Connect("Changed", function(Property)
                if Property == "AbsolutePosition" and Colorpicker.IsOpen then
                    Colorpicker.IsOpen = not Library:IsClipped(Items["ColorpickerButton"].Instance, Data.Section.Items["Section"].Instance.Parent)
                    Items["ColorpickerWindow"].Instance.Visible = Colorpicker.IsOpen
                end
            end)

            if Data.Default then
                Colorpicker:Set(Data.Default)
            end

            Library.SetFlags[Colorpicker.Flag] = function(Color, Alpha)
                Colorpicker:Set(Color, Alpha)
            end

            return Colorpicker, Items 
        end

        Library.CreateKeybind = function(self, Data)
            local Keybind = {
                Flag = Data.Flag,

                Key = "",
                Value = "",
                Mode = "",
                Toggled = false,

                Picking = false,
                IsOpen = false
            }

            local Items = { } do
                Items["KeyButton"] = Instances:Create("TextButton", {
                    Parent = Data.Parent.Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(100, 100, 100),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Text = "-",
                    AutoButtonColor = false,
                    Size = UDim2New(0, 0, 1, 0),
                    BorderSizePixel = 0,
                    AutomaticSize = Enum.AutomaticSize.X,
                    TextSize = 12,
                    BackgroundColor3 = FromRGB(30, 34, 34)
                })  Items["KeyButton"]:AddToTheme({BackgroundColor3 = "Element"})
                
                Instances:Create("UICorner", {
                    Parent = Items["KeyButton"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 4)
                })
                
                Instances:Create("UIPadding", {
                    Parent = Items["KeyButton"].Instance,
                    Name = "\0",
                    PaddingRight = UDimNew(0, 4),
                    PaddingLeft = UDimNew(0, 5)
                })                

                Items["KeybindWindow"] = Instances:Create("Frame", {
                    Parent = Library.UnusedHolder.Instance,
                    Name = "\0",
                    Visible = false,
                    Position = UDim2New(0, 231, 0, 102),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Size = UDim2New(0, 67, 0, 92),
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(16, 18, 18)
                })  Items["KeybindWindow"]:AddToTheme({BackgroundColor3 = "Background"})
                
                Instances:Create("UICorner", {
                    Parent = Items["KeybindWindow"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 7)
                })
                
                Items["Inline"] = Instances:Create("Frame", {
                    Parent = Items["KeybindWindow"].Instance,
                    Name = "\0",
                    Position = UDim2New(0, 6, 0, 6),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Size = UDim2New(1, -12, 1, -12),
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(21, 24, 24)
                })  Items["Inline"]:AddToTheme({BackgroundColor3 = "Inline"})
                
                Instances:Create("UIStroke", {
                    Parent = Items["Inline"].Instance,
                    Name = "\0",
                    Color = FromRGB(30, 33, 33),
                    ApplyStrokeMode = Enum.ApplyStrokeMode.Border
                }):AddToTheme({Color = "Border"})
                
                Instances:Create("UICorner", {
                    Parent = Items["Inline"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 7)
                })
                
                Items["Toggle"] = Instances:Create("TextButton", {
                    Parent = Items["Inline"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(255, 255, 255),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Text = "Toggle",
                    AutoButtonColor = false,
                    BackgroundTransparency = 1,
                    Size = UDim2New(1, 0, 0, 20),
                    BorderSizePixel = 0,
                    TextSize = 14,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                Instances:Create("UIListLayout", {
                    Parent = Items["Inline"].Instance,
                    Name = "\0",
                    Padding = UDimNew(0, 5),
                    SortOrder = Enum.SortOrder.LayoutOrder
                })
                
                Instances:Create("UIPadding", {
                    Parent = Items["Inline"].Instance,
                    Name = "\0",
                    PaddingTop = UDimNew(0, 4)
                })
                
                Items["Hold"] = Instances:Create("TextButton", {
                    Parent = Items["Inline"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(100, 100, 100),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Text = "Hold",
                    AutoButtonColor = false,
                    BackgroundTransparency = 1,
                    Size = UDim2New(1, 0, 0, 20),
                    BorderSizePixel = 0,
                    TextSize = 14,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                Items["Always"] = Instances:Create("TextButton", {
                    Parent = Items["Inline"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(100, 100, 100),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Text = "Always",
                    AutoButtonColor = false,
                    BackgroundTransparency = 1,
                    Size = UDim2New(1, 0, 0, 20),
                    BorderSizePixel = 0,
                    TextSize = 14,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })                
            end

            local Modes = {
                ["Always"] = Items["Always"],
                ["Hold"] = Items["Hold"],
                ["Toggle"] = Items["Toggle"]
            }

            local Debounce = false
            local RenderStepped 

            function Keybind:SetOpen(Bool)
                if Debounce then 
                    return
                end

                Keybind.IsOpen = Bool

                Debounce = true 

                if Keybind.IsOpen then 
                    Items["KeybindWindow"].Instance.Visible = true
                    Items["KeybindWindow"].Instance.Parent = Library.Holder.Instance
                    
                    RenderStepped = RunService.RenderStepped:Connect(function()
                        Items["KeybindWindow"].Instance.Position = UDim2New(0, Items["KeyButton"].Instance.AbsolutePosition.X + 18, 0, Items["KeyButton"].Instance.AbsolutePosition.Y - 25)
                    end)

                    for Index, Value in Library.OpenFrames do 
                        if not Data.Section.IsSettings then
                            Value:SetOpen(false)
                        end
                    end

                    Library.OpenFrames[Keybind] = Keybind 
                else
                    if Library.OpenFrames[Keybind] then 
                        Library.OpenFrames[Keybind] = nil
                    end

                    if RenderStepped then 
                        RenderStepped:Disconnect()
                        RenderStepped = nil
                    end
                end

                local Descendants = Items["KeybindWindow"].Instance:GetDescendants()
                TableInsert(Descendants, Items["KeybindWindow"].Instance)

                local NewTween

                for Index, Value in Descendants do 
                    local TransparencyProperty = Tween:GetProperty(Value)

                    if not TransparencyProperty then
                        continue 
                    end

                    if not Value.ClassName:find("UI") then 
                        Value.ZIndex = Keybind.IsOpen and 2 or 1
                    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
                
                NewTween.Tween.Completed:Connect(function()
                    Debounce = false 
                    Items["KeybindWindow"].Instance.Visible = Keybind.IsOpen
                    task.wait(0.2)
                    Items["KeybindWindow"].Instance.Parent = not Keybind.IsOpen and Library.UnusedHolder.Instance or Library.Holder.Instance
                end)
            end

            function Keybind:SetMode(Mode)
                for Index, Value in Modes do 
                    if Index == Mode then
                        Value:Tween(nil, {TextColor3 = FromRGB(255, 255, 255)})
                    else
                        Value:Tween(nil, {TextColor3 = FromRGB(100, 100, 100)})
                    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
            end

            function Keybind:Get()
                return Keybind.Key, Keybind.Mode, Keybind.Toggled
            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
                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
                elseif TableFind({"Toggle", "Hold", "Always"}, Key) then
                    Keybind.Mode = Key
                    Keybind:SetMode(Key)

                    if Data.Callback then 
                        Library:SafeCall(Data.Callback, Keybind.Toggled)
                    end
                end

                Keybind.Picking = false
            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
            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.35)
                    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)

            Items["KeyButton"]:Connect("Changed", function(Property)
                if Property == "AbsolutePosition" and Keybind.IsOpen then
                    Keybind.IsOpen = not Library:IsClipped(Items["KeybindWindow"].Instance, Data.Section.Items["Section"].Instance.Parent)
                    Items["KeybindWindow"].Instance.Visible = Keybind.IsOpen
                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)

            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)

            if Data.Default then 
                Keybind:Set({
                    Mode = Data.Mode or "Toggle",
                    Key = Data.Default,
                })
            end

            Library.SetFlags[Keybind.Flag] = function(Value)
                Keybind:Set(Value)
            end

            return Keybind, Items 
        end

        Library.Notification = function(self, Name, Duration, Icon)
            local Items = { } do 
                Items["Notification"] = Instances:Create("Frame", {
                    Parent = Library.NotifHolder.Instance,
                    Name = "\0",
                    Size = UDim2New(0, 0, 0, 30),
                    BorderColor3 = FromRGB(0, 0, 0),
                    BorderSizePixel = 0,
                    AutomaticSize = Enum.AutomaticSize.X,
                    BackgroundColor3 = FromRGB(16, 18, 18)
                })  Items["Notification"]:AddToTheme({BackgroundColor3 = "Background"})
                
                Instances:Create("UICorner", {
                    Parent = Items["Notification"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 7)
                })
                
                Items["UIStroke"] = Instances:Create("UIStroke", {
                    Parent = Items["Notification"].Instance,
                    Name = "\0",
                    Color = FromRGB(30, 33, 33),
                    ApplyStrokeMode = Enum.ApplyStrokeMode.Border
                })  Items["UIStroke"]:AddToTheme({Color = "Border"})
                
                Instances:Create("UIPadding", {
                    Parent = Items["Notification"].Instance,
                    Name = "\0",
                    PaddingRight = UDimNew(0, 8),
                    PaddingLeft = UDimNew(0, 8)
                })
                
                if Icon then
                    Items["Icon"] = Instances:Create("ImageLabel", {
                        Parent = Items["Notification"].Instance,
                        Name = "\0",
                        ImageColor3 = FromRGB(255, 255, 255),
                        BorderColor3 = FromRGB(0, 0, 0),
                        AnchorPoint = Vector2New(0, 0.5),
                        Image = "rbxassetid://"..Icon,
                        BackgroundTransparency = 1,
                        Position = UDim2New(0, 0, 0.5, 0),
                        Size = UDim2New(0, 16, 0, 16),
                        BorderSizePixel = 0,
                        BackgroundColor3 = FromRGB(255, 255, 255)
                    })
                end
                
                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,
                    AnchorPoint = Vector2New(0, 0.5),
                    Size = UDim2New(0, 0, 0, 15),
                    BackgroundTransparency = 1,
                    Position = UDim2New(0, Icon and 24 or 0, 0.5, 0),
                    BorderSizePixel = 0,
                    AutomaticSize = Enum.AutomaticSize.X,
                    TextSize = 14,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })  
            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
                elseif Value.Instance:IsA("ImageLabel") then 
                    Value.Instance.ImageTransparency = 1
                elseif Value.Instance:IsA("UIStroke") then
                    Value.Instance.Transparency = 1
                end
            end 
            
            task.wait(0.3)

            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") then 
                        Value:Tween(nil, {TextTransparency = 0})
                    elseif Value.Instance:IsA("ImageLabel") then 
                        Value:Tween(nil, {ImageTransparency = 0.5})
                    elseif Value.Instance:IsA("UIStroke") then
                        Value:Tween(nil, {Transparency = 0})
                    end
                end

                Items["Notification"]:Tween(nil, {Size = UDim2New(0, Size.X, 0, Size.Y)})

                task.delay(Duration, 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})
                        elseif Value.Instance:IsA("ImageLabel") then 
                            Value:Tween(nil, {ImageTransparency = 1})
                        elseif Value.Instance:IsA("UIStroke") then
                            Value:Tween(nil, {Transparency = 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)
            local StartTime = tick()
            Data = Data or { }

            local Window = {
                Name = Data.Name or Data.name or "Window",
                SubTitle = Data.SubTitle or Data.subtitle or "Made by dev team",
                ExpiresIn = Data.ExpiresIn or Data.expiresin or "23d",
                
                Pages = { },
                Items = { },
                IsOpen = false
            }

            local Items = { } do
                local FirstLetterOfName = StringSub(Window.Name, 1, 1)
                Items["MainFrame"] = Instances:Create("Frame", {
                    Parent = Library.Holder.Instance,
                    Name = "\0",
                    AnchorPoint = Vector2New(0.5, 0.5),
                    Position = UDim2New(0.5, 0, 0.5, 0),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Size = UDim2New(0, 600, 0, 400),
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(16, 18, 18)
                })  Items["MainFrame"]:AddToTheme({BackgroundColor3 = "Background"})

                Items["MainFrame"]:MakeDraggable()
                Items["MainFrame"]:MakeResizeable(Vector2New(Items["MainFrame"].Instance.AbsoluteSize.X, Items["MainFrame"].Instance.AbsoluteSize.Y), Vector2New(9999, 9999))
                
                Instances:Create("UICorner", {
                    Parent = Items["MainFrame"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 7)
                })
                
                Items["Side"] = Instances:Create("Frame", {
                    Parent = Items["MainFrame"].Instance,
                    Name = "\0",
                    BackgroundTransparency = 1,
                    BorderColor3 = FromRGB(0, 0, 0),
                    Size = UDim2New(0, 215, 1, 0),
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                Items["Title"] = Instances:Create("Frame", {
                    Parent = Items["Side"].Instance,
                    Name = "\0",
                    Position = UDim2New(0, 6, 0, 6),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Size = UDim2New(1, -12, 0, 60),
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(21, 24, 24)
                })  Items["Title"]:AddToTheme({BackgroundColor3 = "Inline"})
                
                Instances:Create("UICorner", {
                    Parent = Items["Title"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 7)
                })
                
                Instances:Create("UIStroke", {
                    Parent = Items["Title"].Instance,
                    Name = "\0",
                    Color = FromRGB(30, 33, 33),
                    ApplyStrokeMode = Enum.ApplyStrokeMode.Border
                }):AddToTheme({Color = "Border"})
                
                Items["Background"] = Instances:Create("Frame", {
                    Parent = Items["Title"].Instance,
                    Name = "\0",
                    AnchorPoint = Vector2New(0, 0.5),
                    Position = UDim2New(0, 12, 0.5, 0),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Size = UDim2New(0, 40, 0, 40),
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(207, 207, 207)
                })
                
                Instances:Create("UICorner", {
                    Parent = Items["Background"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 7)
                })
                
                Instances:Create("UIStroke", {
                    Parent = Items["Background"].Instance,
                    Name = "\0",
                    Color = FromRGB(30, 33, 33),
                    ApplyStrokeMode = Enum.ApplyStrokeMode.Border
                }):AddToTheme({Color = "Border"})
                
                Items["Text"] = Instances:Create("TextLabel", {
                    Parent = Items["Background"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(0, 0, 0),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Text = FirstLetterOfName,
                    AnchorPoint = Vector2New(0.5, 0.5),
                    BackgroundTransparency = 1,
                    Position = UDim2New(0.5, 0, 0.5, 0),
                    Size = UDim2New(1, -10, 1, -10),
                    BorderSizePixel = 0,
                    TextSize = 22,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                Items["RealTitle"] = Instances:Create("TextLabel", {
                    Parent = Items["Title"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(255, 0, 0),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Text = Window.Name,
                    Size = UDim2New(0, 0, 0, 15),
                    BackgroundTransparency = 1,
                    Position = UDim2New(0, 65, 0, 14),
                    BorderSizePixel = 0,
                    AutomaticSize = Enum.AutomaticSize.X,
                    TextSize = 14,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })  
                
                Items["Game"] = Instances:Create("TextLabel", {
                    Parent = Items["Title"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(255, 0, 0),
                    TextTransparency = 0.5,
                    Text = Window.SubTitle,
                    Size = UDim2New(0, 0, 0, 15),
                    BorderSizePixel = 0,
                    BackgroundTransparency = 1,
                    Position = UDim2New(0, 65, 0, 30),
                    BorderColor3 = FromRGB(0, 0, 0),
                    AutomaticSize = Enum.AutomaticSize.X,
                    TextSize = 14,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })

                Items["Pages"] = Instances:Create("ScrollingFrame", {
                    Parent = Items["Side"].Instance,
                    Name = "\0",
                    Active = true,
                    BackgroundTransparency = 1,
                    Position = UDim2New(0, 0, 0, 75),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Size = UDim2New(1, 0, 1, -80),
                    CanvasSize = UDim2New(0, 0, 0, 0),
                    AutomaticCanvasSize = Enum.AutomaticSize.Y,
                    ScrollingDirection = Enum.ScrollingDirection.Y,
                    ScrollBarThickness = 3,
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })  Items["Pages"]:AddToTheme({ScrollBarImageColor3 = "Accent"})
                
                Instances:Create("UIListLayout", {
                    Parent = Items["Pages"].Instance,
                    Name = "\0",
                    Padding = UDimNew(0, 8),
                    SortOrder = Enum.SortOrder.LayoutOrder
                })

                Instances:Create("UIPadding", {
                    Parent = Items["Pages"].Instance,
                    Name = "\0",
                    PaddingLeft = UDimNew(0, 8),
                    PaddingRight = UDimNew(0, 6),
                    PaddingBottom = UDimNew(0, 52)
                })                

                Items["Content"] = Instances:Create("Frame", {
                    Parent = Items["MainFrame"].Instance,
                    Name = "\0",
                    Position = UDim2New(0, 220, 0, 6),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Size = UDim2New(1, -226, 1, -12),
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(21, 24, 24)
                })  Items["Content"]:AddToTheme({BackgroundColor3 = "Inline"})
                
                Instances:Create("UICorner", {
                    Parent = Items["Content"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 7)
                })
                
                Instances:Create("UIStroke", {
                    Parent = Items["Content"].Instance,
                    Name = "\0",
                    Color = FromRGB(30, 33, 33),
                    ApplyStrokeMode = Enum.ApplyStrokeMode.Border
                }):AddToTheme({Color = "Border"})          
                
                Items["Bottom_"] = Instances:Create("Frame", {
                    Parent = Items["Side"].Instance,
                    Name = "\0",
                    AnchorPoint = Vector2New(0, 1),
                    Position = UDim2New(0, 6, 1, -6),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Size = UDim2New(1, -12, 0, 45),
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(21, 24, 24)
                })  Items["Bottom_"]:AddToTheme({BackgroundColor3 = "Inline"})
                
                Instances:Create("UICorner", {
                    Parent = Items["Bottom_"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 7)
                })
                
                Instances:Create("UIStroke", {
                    Parent = Items["Bottom_"].Instance,
                    Name = "\0",
                    Color = FromRGB(30, 33, 33),
                    ApplyStrokeMode = Enum.ApplyStrokeMode.Border
                }):AddToTheme({Color = "Border"})
                
                Items["SubExpires"] = Instances:Create("TextLabel", {
                    Parent = Items["Bottom_"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(255, 0, 0),
                    TextTransparency = 0.5,
                    Text = "Sub expires in "..Window.ExpiresIn,
                    Size = UDim2New(0, 0, 0, 15),
                    BorderSizePixel = 0,
                    BackgroundTransparency = 1,
                    Position = UDim2New(0, 10, 0, 8),
                    BorderColor3 = FromRGB(0, 0, 0),
                    AutomaticSize = Enum.AutomaticSize.X,
                    TextSize = 12,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                Items["SessionDuration"] = Instances:Create("TextLabel", {
                    Parent = Items["Bottom_"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(255, 0, 0),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Text = "Session duration: ",
                    Size = UDim2New(0, 0, 0, 15),
                    BackgroundTransparency = 1,
                    Position = UDim2New(0, 10, 0, 23),
                    BorderSizePixel = 0,
                    AutomaticSize = Enum.AutomaticSize.X,
                    TextSize = 12,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })                

                Library:Thread(function()
                    while task.wait(1) do
                        local SecondsPassed = MathFloor(tick() - StartTime)
                        local MinutesPassed = MathFloor(SecondsPassed / 60)

                        if MinutesPassed > 0 then
                            SecondsPassed = SecondsPassed - MinutesPassed * 60
                        end

                        Items["SessionDuration"].Instance.Text = "Session duration: "..MinutesPassed..":"..SecondsPassed
                    end
                end)

                Window.Items = Items
            end
            
            local Debounce = false

            function Window:SetCenter()
                local CenterPosition = Items["MainFrame"].Instance.AbsolutePosition
                task.wait()
                Items["MainFrame"].Instance.AnchorPoint = Vector2New(0, 0)

                Items["MainFrame"].Instance.Position = UDim2New(0, CenterPosition.X, 0, CenterPosition.Y)
            end

            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, Bool, Library.FadeSpeed)
                        end
                    else
                        NewTween = Tween:FadeItem(Value, TransparencyProperty, Bool, Library.FadeSpeed)
                    end
                end
                
                NewTween.Tween.Completed:Connect(function()
                    Debounce = false 
                    Items["MainFrame"].Instance.Visible = Window.IsOpen
                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)

            Window:SetCenter()
            task.wait()
            Window:SetOpen(true)
            return setmetatable(Window, Library)
        end

        Library.Page = function(self, Data)
            Data = Data or { }

            local Page = {
                Window = self,

                Name = Data.Name or Data.name or "Page",
                Icon = Data.Icon or Data.icon or "136879043989014",
                Columns = Data.Columns or Data.columns or 2,

                Items = { },
                ColumnsData = { },
                SubPages = { },
                Active = false
            }

            local Items = { } do
                Items["Inactive"] = Instances:Create("TextButton", {
                    Parent = Page.Window.Items["Pages"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(0, 0, 0),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Text = "",
                    AutoButtonColor = false,
                    BackgroundTransparency = 1,
                    Size = UDim2New(0, 200, 0, 30),
                    BorderSizePixel = 0,
                    TextSize = 14,
                    BackgroundColor3 = FromRGB(21, 24, 24)
                })  Items["Inactive"]:AddToTheme({BackgroundColor3 = "Inline"})
                
                Items["UIStroke"] = Instances:Create("UIStroke", {
                    Parent = Items["Inactive"].Instance,
                    Name = "\0",
                    Color = FromRGB(30, 33, 33),
                    Transparency = 1,
                    ApplyStrokeMode = Enum.ApplyStrokeMode.Border
                })  Items["UIStroke"]:AddToTheme({Color = "Border"})
                
                Instances:Create("UICorner", {
                    Parent = Items["Inactive"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 7)
                })
                
                Items["Icon"] = Instances:Create("ImageLabel", {
                    Parent = Items["Inactive"].Instance,
                    Name = "\0",
                    ImageColor3 = FromRGB(100, 100, 100),
                    BorderColor3 = FromRGB(0, 0, 0),
                    AnchorPoint = Vector2New(0, 0.5),
                    Image = "rbxassetid://"..Page.Icon,
                    BackgroundTransparency = 1,
                    Position = UDim2New(0, 10, 0.5, 0),
                    Size = UDim2New(0, 16, 0, 16),
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                Items["Text"] = Instances:Create("TextLabel", {
                    Parent = Items["Inactive"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(100, 100, 100),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Text = Page.Name,
                    AnchorPoint = Vector2New(0, 0.5),
                    Size = UDim2New(0, 0, 0, 15),
                    BackgroundTransparency = 1,
                    Position = UDim2New(0, 38, 0.5, 0),
                    BorderSizePixel = 0,
                    AutomaticSize = Enum.AutomaticSize.X,
                    TextSize = 14,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                                
                Items["Page"] = Instances:Create("Frame", {
                    Parent = Library.UnusedHolder.Instance,
                    Name = "\0",
                    Visible = false,
                    BackgroundTransparency = 1,
                    BorderColor3 = FromRGB(0, 0, 0),
                    Size = UDim2New(1, 0, 1, 0),
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                Items["PageName"] = Instances:Create("TextLabel", {
                    Parent = Items["Page"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(255, 0, 0),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Text = Page.Name,
                    Size = UDim2New(0, 0, 0, 15),
                    BackgroundTransparency = 1,
                    Position = UDim2New(0, 15, 0, 15),
                    BorderSizePixel = 0,
                    AutomaticSize = Enum.AutomaticSize.X,
                    TextSize = 18,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                Items["SubPages"] = Instances:Create("Frame", {
                    Parent = Items["Page"].Instance,
                    Name = "\0",
                    Visible = false,
                    Size = UDim2New(0, 0, 0, 30),
                    Position = UDim2New(0, 13, 0, 42),
                    BorderColor3 = FromRGB(0, 0, 0),
                    BorderSizePixel = 0,
                    AutomaticSize = Enum.AutomaticSize.X,
                    BackgroundColor3 = FromRGB(16, 18, 18)
                })  Items["SubPages"]:AddToTheme({BackgroundColor3 = "Background"})
                
                Instances:Create("UIPadding", {
                    Parent = Items["SubPages"].Instance,
                    Name = "\0",
                    PaddingTop = UDimNew(0, 2),
                    PaddingBottom = UDimNew(0, 2),
                    PaddingRight = UDimNew(0, 2),
                    PaddingLeft = UDimNew(0, 2)
                })
                
                Instances:Create("UIListLayout", {
                    Parent = Items["SubPages"].Instance,
                    Name = "\0",
                    Padding = UDimNew(0, 2),
                    FillDirection = Enum.FillDirection.Horizontal,
                    SortOrder = Enum.SortOrder.LayoutOrder
                })

                Instances:Create("UICorner", {
                    Parent = Items["SubPages"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 7)
                })                

                Items["Columns"] = Instances:Create("Frame", {
                    Parent = Items["Page"].Instance,
                    Name = "\0",
                    Size = UDim2New(1, -20, 1, -49),
                    Position = UDim2New(0, 10, 0, 42),
                    BorderColor3 = FromRGB(0, 0, 0),
                    BorderSizePixel = 0,
                    AutomaticSize = Enum.AutomaticSize.X,
                    BackgroundColor3 = FromRGB(255, 255, 255),
                    BackgroundTransparency = 1
                })  

                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",
                        AutomaticCanvasSize = Enum.AutomaticSize.Y,
                        ScrollBarImageColor3 = FromRGB(0, 0, 0),
                        Active = true,
                        BorderColor3 = FromRGB(0, 0, 0),
                        ScrollBarThickness = 0,
                        BackgroundTransparency = 1,
                        Size = UDim2New(1, 0, 1, 0),
                        BorderSizePixel = 0,
                        BackgroundColor3 = FromRGB(255, 255, 255)
                    })

                    Instances:Create("UIListLayout", {
                        Parent = NewColumn.Instance,
                        Name = "\0",
                        Padding = UDimNew(0, 8),
                        SortOrder = Enum.SortOrder.LayoutOrder
                    })

                    if Index == 1 then
                        Instances:Create("UIPadding", {
                            Parent = NewColumn.Instance,
                            Name = "\0",
                            PaddingTop = UDimNew(0, 3),
                            PaddingBottom = UDimNew(0, 3),
                            PaddingRight = UDimNew(0, 8),
                            PaddingLeft = UDimNew(0, 3)
                        })
                    elseif Index == 2 then
                        Instances:Create("UIPadding", {
                            Parent = NewColumn.Instance,
                            Name = "\0",
                            PaddingTop = UDimNew(0, 3),
                            PaddingBottom = UDimNew(0, 3),
                            PaddingRight = UDimNew(0, 20),
                            PaddingLeft = UDimNew(0, 8)
                        })
                    end

                    Page.ColumnsData[Index] = NewColumn
                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 = Bool and Page.Window.Items["Content"].Instance or Library.UnusedHolder.Instance

                if Page.Active then
                    Items["Inactive"]:Tween(nil, {BackgroundTransparency = 0})
                    Items["Icon"]:Tween(nil, {ImageColor3 = FromRGB(200, 200, 200)})
                    Items["Text"]:Tween(nil, {TextColor3 = FromRGB(200, 200, 200)})
                    Items["UIStroke"]:Tween(nil, {Transparency = 0})
                else
                    Items["Inactive"]:Tween(nil, {BackgroundTransparency = 1})
                    Items["Icon"]:Tween(nil, {ImageColor3 = FromRGB(100, 100, 100)})
                    Items["Text"]:Tween(nil, {TextColor3 = FromRGB(100, 100, 100)})
                    Items["UIStroke"]:Tween(nil, {Transparency = 1})
                end

                Debounce = false
            end

            Items["Inactive"]:Connect("MouseButton1Down", function()
                for Index, Value in Page.Window.Pages do 
                    if Value == Page and Page.Active then
                        return
                    end

                    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.Category = function(self, Name)
            local Items = { } do
                Items["Category"] = Instances:Create("TextLabel", {
                    Parent = self.Items["Pages"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(255, 0, 0),
                    TextTransparency = 0.5,
                    Text = Name,
                    Size = UDim2New(0, 0, 0, 15),
                    BackgroundTransparency = 1,
                    BorderSizePixel = 0,
                    BorderColor3 = FromRGB(0, 0, 0),
                    AutomaticSize = Enum.AutomaticSize.X,
                    TextSize = 12,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })                
            end

            return Items
        end

        Library.Pages.SubPage = function(self, Data)
            Data = Data or { }

            local Page = {
                Window = self.Window,
                Page = self,

                Name = Data.Name or Data.name or "SubPage",
                Columns = Data.Columns or Data.columns or 2,

                Items = { },
                ColumnsData = { },
                Active = false
            }

            if #Page.Page.SubPages == 0 then
                Page.Page.Items["SubPages"].Instance.Visible = true
                Page.Page.Items["Columns"].Instance.Position = UDim2New(0, 10, 0, 75)
                Page.Page.Items["Columns"].Instance.Size = UDim2New(1, -20, 1, -82)
            end

            local Items = { } do 
                Items["Inactive"] = Instances:Create("TextButton", {
                    Parent = Page.Page.Items["SubPages"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(255, 0, 0),
                    TextTransparency = 0.5,
                    Text = Page.Name,
                    AutoButtonColor = false,
                    Size = UDim2New(0, 0, 1, 0),
                    BackgroundTransparency = 1,
                    BorderSizePixel = 0,
                    BorderColor3 = FromRGB(0, 0, 0),
                    AutomaticSize = Enum.AutomaticSize.X,
                    TextSize = 14,
                    BackgroundColor3 = FromRGB(30, 34, 34)
                })  Items["Inactive"]:AddToTheme({BackgroundColor3 = "Element"})
                 
                Instances:Create("UIPadding", {
                    Parent = Items["Inactive"].Instance,
                    Name = "\0",
                    PaddingRight = UDimNew(0, 8),
                    PaddingLeft = UDimNew(0, 8)
                })
                
                Instances:Create("UICorner", {
                    Parent = Items["Inactive"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 7)
                })                

                Items["Page"] = Instances:Create("Frame", {
                    Parent = Library.UnusedHolder.Instance,
                    Name = "\0",
                    Visible = false,
                    BackgroundTransparency = 1,
                    BorderColor3 = FromRGB(0, 0, 0),
                    Size = UDim2New(1, 0, 1, 0),
                    BorderSizePixel = 0,
                    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
                })
            
                for Index = 1, Page.Columns do 
                    local NewColumn = Instances:Create("ScrollingFrame", {
                        Parent = Items["Page"].Instance,
                        Name = "\0",
                        AutomaticCanvasSize = Enum.AutomaticSize.Y,
                        ScrollBarImageColor3 = FromRGB(0, 0, 0),
                        Active = true,
                        BorderColor3 = FromRGB(0, 0, 0),
                        ScrollBarThickness = 0,
                        BackgroundTransparency = 1,
                        Size = UDim2New(1, 0, 1, 0),
                        BorderSizePixel = 0,
                        BackgroundColor3 = FromRGB(255, 255, 255)
                    })

                    Instances:Create("UIListLayout", {
                        Parent = NewColumn.Instance,
                        Name = "\0",
                        Padding = UDimNew(0, 8),
                        SortOrder = Enum.SortOrder.LayoutOrder
                    })
                    
                    if Index == 1 then
                        Instances:Create("UIPadding", {
                            Parent = NewColumn.Instance,
                            Name = "\0",
                            PaddingTop = UDimNew(0, 3),
                            PaddingBottom = UDimNew(0, 3),
                            PaddingRight = UDimNew(0, 8),
                            PaddingLeft = UDimNew(0, 3)
                        })                
                    elseif Index == 2 then
                        Instances:Create("UIPadding", {
                            Parent = NewColumn.Instance,
                            Name = "\0",
                            PaddingTop = UDimNew(0, 3),
                            PaddingBottom = UDimNew(0, 3),
                            PaddingRight = UDimNew(0, 20),
                            PaddingLeft = UDimNew(0, 8)
                        })
                    end

                    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 = Bool and Page.Page.Items["Columns"].Instance or Library.UnusedHolder.Instance

                if Page.Active then
                    Items["Inactive"]:Tween(nil, {BackgroundTransparency = 0, TextTransparency = 0})
                else
                    Items["Inactive"]:Tween(nil, {BackgroundTransparency = 1, TextTransparency = 0.5})
                end

                Debounce = false
            end

            Items["Inactive"]:Connect("MouseButton1Down", function()
                for Index, Value in Page.Page.SubPages do 
                    if Value == Page and Page.Active then
                        return
                    end

                    Value:Turn(Value == Page)
                end
            end)

            if #Page.Page.SubPages == 0 then 
                Page:Turn(true)
            end

            TableInsert(Page.Page.SubPages, 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",
                Icon = Data.Icon or Data.icon or "",
                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,
                    AutomaticSize = Enum.AutomaticSize.Y,
                    BackgroundColor3 = FromRGB(21, 24, 24)
                })  Items["Section"]:AddToTheme({BackgroundColor3 = "Inline"})
                
                Instances:Create("UICorner", {
                    Parent = Items["Section"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 7)
                })
                
                Instances:Create("UIStroke", {
                    Parent = Items["Section"].Instance,
                    Name = "\0",
                    Color = FromRGB(30, 33, 33),
                    ApplyStrokeMode = Enum.ApplyStrokeMode.Border
                }):AddToTheme({Color = "Border"})
                
                Items["Icon"] = Instances:Create("ImageLabel", {
                    Parent = Items["Section"].Instance,
                    Name = "\0",
                    ImageColor3 = FromRGB(100, 100, 100),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Image = "rbxassetid://"..Section.Icon,
                    BackgroundTransparency = 1,
                    Position = UDim2New(0, 12, 0, 12),
                    Size = UDim2New(0, 16, 0, 16),
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                Instances:Create("UIPadding", {
                    Parent = Items["Section"].Instance,
                    Name = "\0",
                    PaddingBottom = UDimNew(0, 12)
                })
                
                Items["Text"] = Instances:Create("TextLabel", {
                    Parent = Items["Section"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(100, 100, 100),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Text = Section.Name,
                    Size = UDim2New(0, 0, 0, 15),
                    BackgroundTransparency = 1,
                    Position = UDim2New(0, 35, 0, 12),
                    BorderSizePixel = 0,
                    AutomaticSize = Enum.AutomaticSize.X,
                    TextSize = 14,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                Items["Content"] = Instances:Create("Frame", {
                    Parent = Items["Section"].Instance,
                    Name = "\0",
                    BorderColor3 = FromRGB(0, 0, 0),
                    BackgroundTransparency = 1,
                    Position = UDim2New(0, 12, 0, 42),
                    Size = UDim2New(1, -24, 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
                })
                
                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,

                Value = false
            }

            local Items = { } do 
                Items["Toggle"] = Instances:Create("TextButton", {
                    Parent = Toggle.Section.Items["Content"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(0, 0, 0),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Text = "",
                    AutoButtonColor = false,
                    BackgroundTransparency = 1,
                    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(100, 100, 100),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Text = Toggle.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 = 14,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                Items["Indicator"] = Instances:Create("Frame", {
                    Parent = Items["Toggle"].Instance,
                    Name = "\0",
                    BorderColor3 = FromRGB(0, 0, 0),
                    AnchorPoint = Vector2New(1, 0),
                    BackgroundTransparency = 1,
                    Position = UDim2New(1, 0, 0, 0),
                    Size = UDim2New(0, 14, 0, 14),
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(30, 33, 33)
                })  Items["Indicator"]:AddToTheme({BackgroundColor3 = "Element"})
                
                Instances:Create("UIStroke", {
                    Parent = Items["Indicator"].Instance,
                    Name = "\0",
                    ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
                    Color = FromRGB(56, 62, 62),
                    Thickness = 2
                }):AddToTheme({Color = "Border 2"})
                
                Instances:Create("UICorner", {
                    Parent = Items["Indicator"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 4)
                })
                
                Items["Inline"] = Instances:Create("Frame", {
                    Parent = Items["Indicator"].Instance,
                    Name = "\0",
                    BackgroundTransparency = 1,
                    BorderColor3 = FromRGB(0, 0, 0),
                    Size = UDim2New(1, 0, 1, 0),
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })  Items["Inline"]:AddToTheme({BackgroundColor3 = "Accent"})
                
                Instances:Create("UICorner", {
                    Parent = Items["Inline"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 4)
                })
                
                Items["CheckImage"] = Instances:Create("ImageLabel", {
                    Parent = Items["Inline"].Instance,
                    Name = "\0",
                    ImageColor3 = FromRGB(0, 0, 0),
                    BorderColor3 = FromRGB(0, 0, 0),
                    AnchorPoint = Vector2New(0.5, 0.5),
                    Image = "rbxassetid://132128200461292",
                    ImageTransparency = 1,
                    BackgroundTransparency = 1,
                    Position = UDim2New(0.5, 0, 0.5, 0),
                    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, -25, 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 Toggle:Get()
                return Toggle.Value 
            end

            function Toggle:Set(Value)
                Toggle.Value = Value 
                Library.Flags[Toggle.Flag] = Value 

                if Toggle.Value then 
                    Items["Inline"]:Tween(nil,  {BackgroundTransparency = 0})
                    Items["CheckImage"]:Tween(nil, {ImageTransparency = 0})
                    Items["Text"]:Tween(nil, {TextColor3 = FromRGB(255, 0, 0)})
                else
                    Items["Inline"]:Tween(nil,  {BackgroundTransparency = 1})
                    Items["CheckImage"]:Tween(nil, {ImageTransparency = 1})
                    Items["Text"]:Tween(nil, {TextColor3 = FromRGB(255, 0, 0)})
                end

                if Toggle.Callback then 
                    Library:SafeCall(Toggle.Callback, Toggle.Value)
                end
            end

            function Toggle:SetVisibility(Bool)
                Items["Toggle"].Instance.Visible = Bool 
            end

            function Toggle:Colorpicker(Data)
                Data = Data or { }

                local Colorpicker = {
                    Window = Toggle.Window,
                    Page = Toggle.Page,
                    Section = Toggle.Section,

                    Flag = Data.Flag or Data.flag or Library:NextFlag(),
                    Default = Data.Default or Data.default or Color3.fromRGB(255, 255, 255),
                    Callback = Data.Callback or Data.callback or function() end
                }

                local NewColorpicker, ColorpickerItems = Library:CreateColorpicker({
                    Parent = Items["SubElements"],
                    Page = Colorpicker.Page,
                    Section = Colorpicker.Section,
                    Flag = Colorpicker.Flag,
                    Default = Colorpicker.Default,
                    Callback = Colorpicker.Callback
                })

                return NewColorpicker
            end

            function Toggle:Keybind(Data)
                Data = Data or { }

                local Keybind = {
                    Window = Toggle.Window,
                    Page = Toggle.Page,
                    Section = Toggle.Section,

                    Flag = Data.Flag or Data.flag or Library:NextFlag(),
                    Default = Data.Default or Data.default or Enum.KeyCode.E,
                    Callback = Data.Callback or Data.callback or function() end,
                    Mode = Data.Mode or Data.mode or "Toggle"
                }

                local NewKeybind = Library:CreateKeybind({
                    Parent = Items["SubElements"],
                    Page = Keybind.Page,
                    Section = Keybind.Section,
                    Flag = Keybind.Flag,
                    Default = Keybind.Default,
                    Mode = Keybind.Mode,
                    Callback = Keybind.Callback
                })

                return NewKeybind
            end

            Items["Toggle"]:Connect("MouseButton1Down", function()
                Toggle:Set(not Toggle.Value)
            end)

            Toggle:Set(Toggle.Default)

            Library.SetFlags[Toggle.Flag] = function(Value)
                Toggle:Set(Value)
            end

            return Toggle 
        end

        Library.Sections.Button = function(self, Data)
            Data = Data or { }

            local Button = {
                Window = self.Window,
                Page = self.Page,
                Section = self,

                Name = Data.Name or Data.name,
                Callback = Data.Callback or Data.callback or function() end
            }

            local Items = { } do
                Items["Button"] = Instances:Create("TextButton", {
                    Parent = Button.Section.Items["Content"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(255, 0, 0),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Text = Button.Name,
                    AutoButtonColor = false,
                    Size = UDim2New(1, 0, 0, 25),
                    BorderSizePixel = 0,
                    TextSize = 14,
                    BackgroundColor3 = FromRGB(30, 34, 34)
                })  Items["Button"]:AddToTheme({BackgroundColor3 = "Element"})
                
                Instances:Create("UICorner", {
                    Parent = Items["Button"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 4)
                })
                
                Instances:Create("UIStroke", {
                    Parent = Items["Button"].Instance,
                    Name = "\0",
                    ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
                    Color = FromRGB(56, 62, 62),
                    Thickness = 2
                }):AddToTheme({Color = "Border 2"})
                
                Instances:Create("UIPadding", {
                    Parent = Items["Button"].Instance,
                    Name = "\0",
                    PaddingBottom = UDimNew(0, 1)
                })                
            end

            function Button:SetVisibility(Bool)
                Items["Button"].Instance.Visible = Bool
            end

            function Button:Press()
                Items["Button"]:ChangeItemTheme({BackgroundColor3 = "Accent"})
                Items["Button"]:Tween(nil, {BackgroundColor3 = Library.Theme.Accent, TextColor3 = FromRGB(0, 0, 0)})

                task.wait(0.1)

                Items["Button"]:ChangeItemTheme({BackgroundColor3 = "Element"})
                Items["Button"]:Tween(nil, {BackgroundColor3 = Library.Theme.Element, TextColor3 = FromRGB(255, 0, 0)})

                Library:SafeCall(Button.Callback)
            end

            Items["Button"]:Connect("MouseButton1Down", function()
                Button:Press()
            end)

            return Button
        end

        Library.Sections.Slider = function(self, Data)
            Data = Data or { }

            local function sanitizeSliderNumber(value, fallback)
                local numeric = tonumber(value)
                if not numeric or numeric ~= numeric or numeric == math.huge or numeric == -math.huge then
                    return fallback
                end
                return numeric
            end

            local Slider = {
                Window = self.Window,
                Page = self.Page,
                Section = self,

                Name = Data.Name or Data.name or "Slider",
                Min = sanitizeSliderNumber(Data.Min or Data.min, 0),
                Max = sanitizeSliderNumber(Data.Max or Data.max, 100),
                Callback = Data.Callback or Data.callback or function() end,
                Default = sanitizeSliderNumber(Data.Default or Data.default, 0),
                Flag = Data.Flag or Data.flag or Library:NextFlag(),
                Decimals = sanitizeSliderNumber(Data.Decimals or Data.decimals, 1),
                Suffix = Data.Suffix or Data.suffix or "",

                Value = 0,
                Sliding = false
            }

            if Slider.Max < Slider.Min then
                Slider.Min, Slider.Max = Slider.Max, Slider.Min
            end

            Slider.Default = MathClamp(Slider.Default, Slider.Min, Slider.Max)
            Slider.Decimals = MathClamp(MathFloor(Slider.Decimals), 0, 6)

            local Items = { } do 
                Items["Slider"] = Instances:Create("Frame", {
                    Parent = Slider.Section.Items["Content"].Instance,
                    Name = "\0",
                    BackgroundTransparency = 1,
                    BorderColor3 = FromRGB(0, 0, 0),
                    Size = UDim2New(1, 0, 0, 30),
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                Items["Text"] = Instances:Create("TextLabel", {
                    Parent = Items["Slider"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(255, 0, 0),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Text = Slider.Name,
                    BackgroundTransparency = 1,
                    Size = UDim2New(0, 0, 0, 15),
                    BorderSizePixel = 0,
                    AutomaticSize = Enum.AutomaticSize.X,
                    TextSize = 14,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                Items["Value"] = Instances:Create("TextLabel", {
                    Parent = Items["Slider"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(100, 100, 100),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Text = "",
                    AnchorPoint = Vector2New(1, 0),
                    Size = UDim2New(0, 0, 0, 15),
                    BackgroundTransparency = 1,
                    Position = UDim2New(1, 0, 0, 0),
                    BorderSizePixel = 0,
                    AutomaticSize = Enum.AutomaticSize.X,
                    TextSize = 14,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                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, 5),
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(30, 34, 34)
                })  Items["RealSlider"]:AddToTheme({BackgroundColor3 = "Element"})
                
                Instances:Create("UICorner", {
                    Parent = Items["RealSlider"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(1, 0)
                })
                
                Items["Accent"] = Instances:Create("Frame", {
                    Parent = Items["RealSlider"].Instance,
                    Name = "\0",
                    BorderColor3 = FromRGB(0, 0, 0),
                    Size = UDim2New(0.4000000059604645, 0, 1, 0),
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })  Items["Accent"]:AddToTheme({BackgroundColor3 = "Accent"})
                
                Instances:Create("UICorner", {
                    Parent = Items["Accent"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 7)
                })
                
                Items["Circle"] = Instances:Create("Frame", {
                    Parent = Items["Accent"].Instance,
                    Name = "\0",
                    AnchorPoint = Vector2New(1, 0.5),
                    Position = UDim2New(1, 5, 0.5, 0),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Size = UDim2New(0, 8, 0, 8),
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })  Items["Circle"]:AddToTheme({BackgroundColor3 = "Accent"})
                
                Instances:Create("UICorner", {
                    Parent = Items["Circle"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 7)
                })
                
                Instances:Create("UIGradient", {
                    Parent = Items["Accent"].Instance,
                    Name = "\0",
                    Color = RGBSequence{RGBSequenceKeypoint(0, FromRGB(180, 180, 180)), RGBSequenceKeypoint(1, FromRGB(255, 255, 255))}
                })                
            end

            function Slider:Get()
                return Slider.Value
            end

            function Slider:SetVisibility(Bool)
                Items["Slider"].Instance.Visible = Bool
            end

            function Slider:Set(Value)
                local safeValue = sanitizeSliderNumber(Value, Slider.Value)
                if safeValue == nil or safeValue ~= safeValue then
                    safeValue = Slider.Default
                end

                Slider.Value = Library:Round(MathClamp(safeValue, Slider.Min, Slider.Max), Slider.Decimals)
                if Slider.Value ~= Slider.Value then
                    Slider.Value = Slider.Default
                end

                Library.Flags[Slider.Flag] = Slider.Value

                local range = Slider.Max - Slider.Min
                if range <= 0 then
                    range = 1
                end

                Items["Accent"]:Tween(TweenInfo.new(0.35, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Size = UDim2New((Slider.Value - Slider.Min) / range, -2, 1, 0)})
                Items["Value"].Instance.Text = StringFormat("%s%s", Slider.Value, Slider.Suffix)

                if Slider.Callback then
                    Library:SafeCall(Slider.Callback, Slider.Value)
                end
            end

            local InputChanged
            local InputChanged2

            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 = ((Slider.Max - Slider.Min) * SizeX) + Slider.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)

            Items["Circle"]: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 = ((Slider.Max - Slider.Min) * SizeX) + Slider.Min

                    Slider:Set(Value)

                    if InputChanged2 or InputChanged then
                        return 
                    end

                    InputChanged2 = Input.Changed:Connect(function()
                        if Input.UserInputState == Enum.UserInputState.End then
                            Slider.Sliding = false

                            InputChanged2:Disconnect()
                            InputChanged2 = 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 = ((Slider.Max - Slider.Min) * SizeX) + Slider.Min

                        Slider:Set(Value)
                    end
                end
            end)

            Slider:Set(Slider.Default) 

            Library.SetFlags[Slider.Flag] = function(Value)
                Slider:Set(Value)
            end

            return Slider 
        end

        Library.Sections.Dropdown = function(self, Data)
            Data = Data or { }
            local isTouchDevice = UserInputService.TouchEnabled and not UserInputService.KeyboardEnabled
            local maxDropdownHeight = isTouchDevice and 165 or 220

            local Dropdown = {
                Window = self.Window,
                Page = self.Page,
                Section = self,

                Name = Data.Name or Data.name or "Dropdown",
                Flag = Data.Flag or Data.flag or Library:NextFlag(),
                Items = Data.Items or Data.items or { },
                Default = Data.Default or Data.default or "",
                Callback = Data.Callback or Data.callback or function() end,
                Multi = Data.Multi or Data.multi or false,

                Value = { },
                Options = { },
                IsOpen = false
            }

            local Items = { } do 
                Items["Dropdown"] = Instances:Create("Frame", {
                    Parent = Dropdown.Section.Items["Content"].Instance,
                    Name = "\0",
                    BackgroundTransparency = 1,
                    BorderColor3 = FromRGB(0, 0, 0),
                    Size = UDim2New(1, 0, 0, 25),
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                Items["Text"] = Instances:Create("TextLabel", {
                    Parent = Items["Dropdown"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(255, 0, 0),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Text = Dropdown.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 = 14,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                Items["RealDropdown"] = Instances:Create("TextButton", {
                    Parent = Items["Dropdown"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(0, 0, 0),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Text = "",
                    AutoButtonColor = false,
                    AnchorPoint = Vector2New(1, 0.5),
                    Position = UDim2New(1, 0, 0.5, 0),
                    Size = UDim2New(0, 80, 0, 25),
                    BorderSizePixel = 0,
                    TextSize = 14,
                    BackgroundColor3 = FromRGB(30, 34, 34)
                })  Items["RealDropdown"]:AddToTheme({BackgroundColor3 = "Element"})
                
                Instances:Create("UICorner", {
                    Parent = Items["RealDropdown"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 4)
                })
                
                Items["Value"] = Instances:Create("TextLabel", {
                    Parent = Items["RealDropdown"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(100, 100, 100),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Text = "...",
                    AnchorPoint = Vector2New(0, 0.5),
                    Size = UDim2New(1, -6, 0, 15),
                    BackgroundTransparency = 1,
                    Position = UDim2New(0, 6, 0.5, 0),
                    BorderSizePixel = 0,
                    TextSize = 12,
                    TextXAlignment = Enum.TextXAlignment.Left,
                    TextTruncate = Enum.TextTruncate.AtEnd,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                Items["Icon"] = Instances:Create("ImageLabel", {
                    Parent = Items["RealDropdown"].Instance,
                    Name = "\0",
                    ImageColor3 = FromRGB(100, 100, 100),
                    BorderColor3 = FromRGB(0, 0, 0),
                    AnchorPoint = Vector2New(1, 0.5),
                    Image = "rbxassetid://135448248851234",
                    BackgroundTransparency = 1,
                    Position = UDim2New(1, -5, 0.5, 0),
                    Size = UDim2New(0, 16, 0, 16),
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                Items["OptionHolder"] = Instances:Create("Frame", {
                    Parent = Library.UnusedHolder.Instance,
                    Name = "\0",
                    Visible = false,
                    BorderColor3 = FromRGB(0, 0, 0),
                    AnchorPoint = Vector2New(0, 0),
                    Position = UDim2New(1, 0, 0.5, 0),
                    Size = UDim2New(0, 80, 0, 0),
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(21, 24, 24)
                })  Items["OptionHolder"]:AddToTheme({BackgroundColor3 = "Inline"})
                
                Instances:Create("UIStroke", {
                    Parent = Items["OptionHolder"].Instance,
                    Name = "\0",
                    Color = FromRGB(30, 33, 33),
                    ApplyStrokeMode = Enum.ApplyStrokeMode.Border
                }):AddToTheme({Color = "Border"})
                
                Items["Holder"] = Instances:Create("ScrollingFrame", {
                    Parent = Items["OptionHolder"].Instance,
                    Name = "\0",
                    Active = true,
                    ScrollBarThickness = 2,
                    Size = UDim2New(1, 0, 1, 0),
                    BorderSizePixel = 0,
                    BackgroundTransparency = 1,
                    ScrollingDirection = Enum.ScrollingDirection.Y,
                    BorderColor3 = FromRGB(0, 0, 0),
                    BackgroundColor3 = FromRGB(255, 255, 255),
                    CanvasSize = UDim2New(0, 0, 0, 0)
                })  Items["Holder"]:AddToTheme({ScrollBarImageColor3 = "Accent"})
                
                local OptionsLayout = Instances:Create("UIListLayout", {
                    Parent = Items["Holder"].Instance,
                    Name = "\0",
                    SortOrder = Enum.SortOrder.LayoutOrder
                })                

                Instances:Create("UIPadding", {
                    Parent = Items["OptionHolder"].Instance,
                    Name = "\0",
                    PaddingBottom = UDimNew(0, 4)
                })

                local function updateDropdownScrollBounds()
                    local contentHeight = OptionsLayout.Instance.AbsoluteContentSize.Y + 4
                    local holderHeight = math.clamp(contentHeight, 0, maxDropdownHeight)
                    Items["OptionHolder"].Instance.Size = UDim2New(0, Items["RealDropdown"].Instance.AbsoluteSize.X, 0, holderHeight)
                    Items["Holder"].Instance.CanvasSize = UDim2New(0, 0, 0, contentHeight)
                end

                OptionsLayout.Instance:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(updateDropdownScrollBounds)
                updateDropdownScrollBounds()
            end

            function Dropdown:Get()
                return Dropdown.Value
            end

            function Dropdown:SetVisibility(Bool)
                Items["Dropdown"].Instance.Visible = Bool
            end

            local Debounce = false
            local RenderStepped

            function Dropdown:SetOpen(Bool)
                if Debounce then 
                    return
                end

                Dropdown.IsOpen = Bool

                Debounce = true 

                if Dropdown.IsOpen then 
                    Items["OptionHolder"].Instance.Visible = true
                    Items["OptionHolder"].Instance.Parent = Library.Holder.Instance
                    
                    RenderStepped = RunService.RenderStepped:Connect(function()
                        local camera = workspace.CurrentCamera
                        local viewport = camera and camera.ViewportSize or Vector2.new(1920, 1080)
                        local optionHeight = Items["OptionHolder"].Instance.AbsoluteSize.Y
                        local desiredX = Items["RealDropdown"].Instance.AbsolutePosition.X
                        local desiredY = Items["RealDropdown"].Instance.AbsolutePosition.Y - 25

                        if desiredY + optionHeight > viewport.Y then
                            desiredY = math.max(0, viewport.Y - optionHeight - 8)
                        end

                        Items["OptionHolder"].Instance.Position = UDim2New(0, desiredX, 0, desiredY)
                    end)

                    for Index, Value in Library.OpenFrames do 
                        if Value ~= Dropdown and not Dropdown.Section.IsSettings then 
                            Value:SetOpen(false)
                        end
                    end

                    Library.OpenFrames[Dropdown] = Dropdown 
                else
                    if Library.OpenFrames[Dropdown] then 
                        Library.OpenFrames[Dropdown] = nil
                    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 Value.ClassName:find("UI") then 
                        Value.ZIndex = Dropdown.IsOpen and 3 or 1
                    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
                
                NewTween.Tween.Completed:Connect(function()
                    Debounce = false 
                    Items["OptionHolder"].Instance.Visible = Dropdown.IsOpen
                    task.wait(0.2)
                    Items["OptionHolder"].Instance.Parent = not Dropdown.IsOpen and Library.UnusedHolder.Instance or Library.Holder.Instance
                end)
            end

            function Dropdown:Set(Option)
                if Dropdown.Multi then 
                    if type(Option) ~= "table" then 
                        return
                    end

                    Dropdown.Value = Option
                    Library.Flags[Dropdown.Flag] = Option

                    for Index, Value in Option do
                        local OptionData = Dropdown.Options[Value]
                         
                        if not OptionData then
                            continue
                        end

                        OptionData.Selected = true 
                        OptionData:Toggle("Active")
                    end

                    Items["Value"].Instance.Text = TableConcat(Option, ", ")
                else
                    if not Dropdown.Options[Option] then
                        return
                    end

                    local OptionData = Dropdown.Options[Option]

                    Dropdown.Value = Option
                    Library.Flags[Dropdown.Flag] = Option

                    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 = Option
                end

                if Dropdown.Callback then   
                    Library:SafeCall(Dropdown.Callback, Dropdown.Value)
                end
            end

            function Dropdown:Add(Option)
                local OptionButton = Instances:Create("TextButton", {
                    Parent = Items["Holder"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(100, 100, 100),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Text = Option,
                    AutoButtonColor = false,
                    BackgroundTransparency = 1,
                    Size = UDim2New(1, 0, 0, 25),
                    BorderSizePixel = 0,
                    AutomaticSize = Enum.AutomaticSize.X,
                    TextSize = 14,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })  OptionButton:AddToTheme({BackgroundColor3 = "Accent"})

                local OptionData = {
                    Button = OptionButton,
                    Name = Option,
                    Selected = false
                }
                
                function OptionData:Toggle(Value)
                    if Value == "Active" then
                        OptionData.Button:Tween(nil, {BackgroundTransparency = 0, TextColor3 = FromRGB(0, 0, 0)})
                    else
                        OptionData.Button:Tween(nil, {BackgroundTransparency = 1, TextColor3 = FromRGB(100, 100, 100)})
                    end
                end

                function OptionData:Set()
                    OptionData.Selected = not OptionData.Selected

                    if Dropdown.Multi then 
                        local Index = TableFind(Dropdown.Value, OptionData.Name)

                        if Index then 
                            TableRemove(Dropdown.Value, Index)
                        else
                            TableInsert(Dropdown.Value, OptionData.Name)
                        end

                        OptionData:Toggle(Index and "Inactive" or "Active")

                        Library.Flags[Dropdown.Flag] = Dropdown.Value

                        local TextFormat = #Dropdown.Value > 0 and TableConcat(Dropdown.Value, ", ") or "..."
                        Items["Value"].Instance.Text = TextFormat
                    else
                        if OptionData.Selected then 
                            Dropdown.Value = OptionData.Name
                            Library.Flags[Dropdown.Flag] = OptionData.Name

                            OptionData.Selected = true
                            OptionData:Toggle("Active")

                            for Index, Value in Dropdown.Options do 
                                if Value ~= OptionData then
                                    Value.Selected = false 
                                    Value:Toggle("Inactive")
                                end
                            end

                            Items["Value"].Instance.Text = OptionData.Name
                        else
                            Dropdown.Value = nil
                            Library.Flags[Dropdown.Flag] = nil

                            OptionData.Selected = false
                            OptionData:Toggle("Inactive")

                            Items["Value"].Instance.Text = "..."
                        end
                    end

                    if Dropdown.Callback then
                        Library:SafeCall(Dropdown.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 Dropdown.Options[Option] then
                    Dropdown.Options[Option].Button:Clean()
                    Dropdown.Options[Option] = nil
                end
            end

            function Dropdown:Refresh(List)
                for Index, Value in Dropdown.Options do 
                    Dropdown:Remove(Value.Name)
                end

                for Index, Value in List do 
                    Dropdown:Add(Value)
                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 or Input.UserInputType == Enum.UserInputType.Touch then
                    if Dropdown.IsOpen then
                        if Library:IsMouseOverFrame(Items["OptionHolder"]) then
                            return
                        end

                        Dropdown:SetOpen(false)
                    end
                end
            end)

            Items["RealDropdown"]:Connect("Changed", function(Property)
                if Property == "AbsolutePosition" and Dropdown.IsOpen then
                    Dropdown.IsOpen = not Library:IsClipped(Items["OptionHolder"].Instance, Dropdown.Section.Items["Section"].Instance.Parent)
                    Items["OptionHolder"].Instance.Visible = Dropdown.IsOpen
                end
            end)

            for Index, Value in Dropdown.Items do 
                Dropdown:Add(Value)
            end

            if Dropdown.Default then 
                Dropdown:Set(Dropdown.Default)
            end

            Library.SetFlags[Dropdown.Flag] = function(Value)
                Dropdown:Set(Value)
            end

            return Dropdown
        end

        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, 17),
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                Items["Text"] = Instances:Create("TextLabel", {
                    Parent = Items["Label"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    TextColor3 = FromRGB(100, 100, 100),
                    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 = 14,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                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:SetText(Text)
               Text = tostring(Text)
               Items["Label"].Instance.Text = Text 
            end

            function Label:SetVisibility(Bool)
                Items["Label"].Instance.Visible = Bool
            end

            function Label:Colorpicker(Data)
                Data = Data or { }

                local Colorpicker = {
                    Window = Label.Window,
                    Page = Label.Page,
                    Section = Label.Section,

                    Flag = Data.Flag or Data.flag or Library:NextFlag(),
                    Default = Data.Default or Data.default or Color3.fromRGB(255, 255, 255),
                    Callback = Data.Callback or Data.callback or function() end
                }

                local NewColorpicker, ColorpickerItems = Library:CreateColorpicker({
                    Parent = Items["SubElements"],
                    Page = Colorpicker.Page,
                    Section = Colorpicker.Section,
                    Flag = Colorpicker.Flag,
                    Default = Colorpicker.Default,
                    Callback = Colorpicker.Callback
                })

                return NewColorpicker
            end

            function Label:Keybind(Data)
                Data = Data or { }

                local Keybind = {
                    Window = Label.Window,
                    Page = Label.Page,
                    Section = Label.Section,

                    Flag = Data.Flag or Data.flag or Library:NextFlag(),
                    Default = Data.Default or Data.default or Enum.KeyCode.E,
                    Callback = Data.Callback or Data.callback or function() end,
                    Mode = Data.Mode or Data.mode or "Toggle"
                }

                local NewKeybind = Library:CreateKeybind({
                    Parent = Items["SubElements"],
                    Page = Keybind.Page,
                    Section = Keybind.Section,
                    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,

                Flag = Data.Flag or Data.flag or Library:NextFlag(),
                Default = Data.Default or Data.default or "",
                Callback = Data.Callback or Data.callback or function() end,
                Placeholder = Data.Placeholder or Data.placeholder or "Placeholder",
                Numeric = Data.Numeric or Data.numeric or false,
                Finished = Data.Finished or Data.finished or false,

                Value = ""
            }

            local Items = { } do 
                Items["Textbox"] = Instances:Create("Frame", {
                    Parent = Textbox.Section.Items["Content"].Instance,
                    Name = "\0",
                    BackgroundTransparency = 1,
                    BorderColor3 = FromRGB(0, 0, 0),
                    Size = UDim2New(1, 0, 0, 25),
                    BorderSizePixel = 0,
                    BackgroundColor3 = FromRGB(255, 255, 255)
                })
                
                Items["Input"] = Instances:Create("TextBox", {
                    Parent = Items["Textbox"].Instance,
                    Name = "\0",
                    FontFace = Library.Font,
                    CursorPosition = -1,
                    TextColor3 = FromRGB(255, 0, 0),
                    BorderColor3 = FromRGB(0, 0, 0),
                    Text = "",
                    Size = UDim2New(1, 0, 1, 0),
                    ClipsDescendants = true,
                    BorderSizePixel = 0,
                    PlaceholderColor3 = FromRGB(100, 100, 100),
                    TextXAlignment = Enum.TextXAlignment.Left,
                    PlaceholderText = Textbox.Placeholder,
                    TextSize = 14,
                    BackgroundColor3 = FromRGB(30, 34, 34)
                })  Items["Input"]:AddToTheme({BackgroundColor3 = "Element"})
                
                Instances:Create("UICorner", {
                    Parent = Items["Input"].Instance,
                    Name = "\0",
                    CornerRadius = UDimNew(0, 4)
                })
                
                Instances:Create("UIStroke", {
                    Parent = Items["Input"].Instance,
                    Name = "\0",
                    ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
                    Color = FromRGB(56, 62, 62),
                    Thickness = 2
                }):AddToTheme({Color = "Border 2"})
                
                Instances:Create("UIPadding", {
                    Parent = Items["Input"].Instance,
                    Name = "\0",
                    PaddingLeft = UDimNew(0, 8)
                })                 
            end

            function Textbox:Get()
                return Textbox.Value
            end

            function Textbox:SetVisibility(Bool)
                Items["Textbox"].Instance.Visible = Bool
            end

            function Textbox:Set(Value)
                if Textbox.Numeric then
                    if (not tonumber(Value)) and StringLen(tostring(Value)) > 0 then
                        Value = Textbox.Value
                    end
                end

                Textbox.Value = Value
                Items["Input"].Instance.Text = Value
                Library.Flags[Textbox.Flag] = Value

                if Textbox.Callback then
                    Library:SafeCall(Textbox.Callback, Value)
                end
            end

            if Textbox.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 Textbox.Default then
                Textbox:Set(Textbox.Default)
            end

            Library.SetFlags[Textbox.Flag] = function(Value)
                Textbox:Set(Value)
            end

            return Textbox 
        end
    end

    Library.CreateSettingsPage = function(self, Window)
        local SettingsPage = Window:Page({Name = "Settings", Icon = "72732892493295"}) do 
            do -- Configs
                local ConfigsSection = SettingsPage:Section({Name = "Configs", Side = 1, Icon = "97491613646216"})

                local ConfigName = ""
                local ConfigSelected

                local ConfigsList = ConfigsSection:Dropdown({
                    Name = "Configs", 
                    Flag = "ConfigsList", 
                    Items = { }, 
                    Multi = false,
                    Callback = function(Value)
                        ConfigSelected = Value
                    end
                })

                ConfigsSection:Textbox({ 
                    Default = "", 
                    Flag = "ConfigName", 
                    Placeholder = "Config name", 
                    Callback = function(Value)
                        ConfigName = Value
                    end
                })

                ConfigsSection:Button({
                    Name = "Create",
                    Callback = function()
                    if ConfigName and ConfigName ~= "" then
                        if not isfile(Library.Folders.Configs .. "/" .. ConfigName .. ".json") then
                            writefile(Library.Folders.Configs .. "/" .. ConfigName .. ".json", Library:GetConfig())
                            Library:RefreshConfigsList(ConfigsList)
                        else
                            return
                        end
                    end
                end})

                ConfigsSection:Button({
                    Name = "Delete", 
                    Callback = function()
                    if ConfigSelected then
                        Library:DeleteConfig(ConfigSelected)
                        Library:RefreshConfigsList(ConfigsList)
                    end
                end})

                ConfigsSection:Button({
                    Name = "Load", 
                    Callback = function()
                    if ConfigSelected then
                        Library:LoadConfig(readfile(Library.Folders.Configs .. "/" .. ConfigSelected))
                    end
                end})

                ConfigsSection:Button({
                    Name = "Save", 
                    Callback = function()
                    if ConfigName and ConfigName ~= "" then
                        writefile(Library.Folders.Configs .. "/" .. ConfigName .. ".json", Library:GetConfig())
                        Library:RefreshConfigsList(ConfigsList)
                    end
                end})

                ConfigsSection:Button({
                    Name = "Refresh", 
                    Callback = function()
                    Library:RefreshConfigsList(ConfigsList)
                end})

                Library:RefreshConfigsList(ConfigsList)               
            end

            do -- Theming
                local ThemingSection = SettingsPage:Section({Name = "Theming", Icon = "131595494666590", Side = 2})
                for Index, Value in Library.Theme do 
                    ThemingSection:Label(Index):Colorpicker({
                        Flag = Index.."Theme",
                        Default = Value,
                        Callback = function(Value)
                            Library.Theme[Index] = Value
                            Library:ChangeTheme(Index, Value)
                        end
                    })
                end
            end

            do -- Settings
                local SettingsSection = SettingsPage:Section({Name = "Settings", Icon = "72732892493295", Side = 1})     
                
                SettingsSection:Button({
                    Name = "Unload",
                    Callback = function()
                        Library:Unload()
                    end
                })
                
                SettingsSection:Label("Menu Keybind"):Keybind({
                    Name = "Menu Keybind",
                    Flag = "MenuKeybind",
                    Default = Library.MenuKeybind,
                    Mode = "Toggle",
                    Callback = function()
                        Library.MenuKeybind = Library.Flags["MenuKeybind"].Key
                    end
                })

                SettingsSection:Slider({
                    Name = "Tween Speed",
                    Default = 0.3,
                    Flag = "Tween Speed",
                    Decimals = 0.01,
                    Suffix = "s",
                    Max = 10,
                    Min = 0,
                    Callback = function(Value)
                        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 = "Quart",
                    Callback = function(Value)
                        if not Value then Value = "Quint" end
                        Library.Tween.Style = Enum.EasingStyle[Value]
                    end
                })

                SettingsSection:Dropdown({
                    Name = "Tween Direction",
                    Flag = "Tween direction",
                    Items = { "In", "Out", "InOut" },
                    Default = "Out",
                    Callback = function(Value)
                        if not Value then Value = "Out" end
                        Library.Tween.Direction = Enum.EasingDirection[Value]
                    end
                })
            end
        end
    end
end

local Window = Library:Window({Name = "LuhJayFamily"})

local platformInputService = game:GetService("UserInputService")
local platformCoreGui = cloneref and cloneref(game:GetService("CoreGui")) or game:GetService("CoreGui")
local isMobileDevice = platformInputService.TouchEnabled and not platformInputService.KeyboardEnabled

if not isMobileDevice then
    Library.MenuKeybind = tostring(Enum.KeyCode.RightShift)
end

local mobileToggleGui = nil
local mobileToggleButton = nil

local function toggleMenuVisibility()
    if Window and Window.SetOpen then
        Window:SetOpen(not Window.IsOpen)
    end
end

local function createMobileToggle()
    if not isMobileDevice or mobileToggleButton then
        return
    end

    mobileToggleGui = Instance.new("ScreenGui")
    mobileToggleGui.Name = "WereBetterMobileToggle"
    mobileToggleGui.ResetOnSpawn = false
    mobileToggleGui.IgnoreGuiInset = true
    mobileToggleGui.DisplayOrder = 999
    mobileToggleGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
    mobileToggleGui.Parent = platformCoreGui

    mobileToggleButton = Instance.new("TextButton")
    mobileToggleButton.Name = "Toggle"
    mobileToggleButton.Size = UDim2.fromOffset(56, 56)
    mobileToggleButton.Position = UDim2.new(0, 14, 1, -90)
    mobileToggleButton.BackgroundColor3 = Color3.fromRGB(21, 24, 24)
    mobileToggleButton.Text = "LJF"
    mobileToggleButton.TextSize = 22
    mobileToggleButton.Font = Enum.Font.GothamBold
    mobileToggleButton.TextColor3 = Color3.fromRGB(255, 0, 0)
    mobileToggleButton.Parent = mobileToggleGui

    local corner = Instance.new("UICorner")
    corner.CornerRadius = UDim.new(1, 0)
    corner.Parent = mobileToggleButton

    local stroke = Instance.new("UIStroke")
    stroke.Color = Color3.fromRGB(56, 62, 62)
    stroke.Thickness = 1.5
    stroke.Parent = mobileToggleButton

    local dragging = false
    local dragStart = nil
    local startPos = nil
    local dragInput = nil
    local draggedThisPress = false

    mobileToggleButton.InputBegan:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then
            dragging = true
            dragStart = input.Position
            startPos = mobileToggleButton.AbsolutePosition
            dragInput = input
            draggedThisPress = false

            input.Changed:Connect(function()
                if input.UserInputState == Enum.UserInputState.End then
                    dragging = false
                end
            end)
        end
    end)

    mobileToggleButton.InputChanged:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement then
            dragInput = input
        end
    end)

    platformInputService.InputChanged:Connect(function(input)
        if not dragging or input ~= dragInput or not dragStart or not startPos then
            return
        end

        local delta = input.Position - dragStart
        if math.abs(delta.X) > 4 or math.abs(delta.Y) > 4 then
            draggedThisPress = true
        end

        local camera = workspace.CurrentCamera
        local viewport = camera and camera.ViewportSize or Vector2.new(1280, 720)
        local buttonSize = mobileToggleButton.AbsoluteSize

        local newX = math.clamp(startPos.X + delta.X, 0, math.max(0, viewport.X - buttonSize.X))
        local newY = math.clamp(startPos.Y + delta.Y, 0, math.max(0, viewport.Y - buttonSize.Y))

        mobileToggleButton.Position = UDim2.new(0, newX, 0, newY)
    end)

    mobileToggleButton.MouseButton1Click:Connect(function()
        if draggedThisPress then
            return
        end
        toggleMenuVisibility()
    end)
end

local function applyPlatformLayout()
    if not isMobileDevice then
        return
    end

    task.spawn(function()
        task.wait(0.1)

        local function resizeForMobile()
            local mainFrame = Window and Window.Items and Window.Items["MainFrame"] and Window.Items["MainFrame"].Instance
            local camera = workspace.CurrentCamera
            if not mainFrame or not camera then
                return
            end

            local viewSize = camera.ViewportSize
            local width = math.clamp(math.floor(viewSize.X * 0.74), 340, 820)
            local height = math.clamp(math.floor(viewSize.Y * 0.76), 280, 620)
            local x = math.floor((viewSize.X - width) / 2)
            local y = math.floor((viewSize.Y - height) / 2)

            mainFrame.Size = UDim2.new(0, width, 0, height)
            mainFrame.Position = UDim2.new(0, math.max(0, x), 0, math.max(8, y))
        end

        resizeForMobile()

        local camera = workspace.CurrentCamera
        if camera then
            camera:GetPropertyChangedSignal("ViewportSize"):Connect(function()
                resizeForMobile()
            end)
        end
    end)

    createMobileToggle()
end

applyPlatformLayout()

Window:Category("LuhJayFamily")

local MainPage = Window:Page({Name = "Main", Icon = "136879043989014"})
local OtherPage = Window:Page({Name = "Other", Icon = "136879043989014"})
local CombatPage = Window:Page({Name = "Combat", Icon = "136879043989014"})
local VisualsPage = Window:Page({Name = "Visuals", Icon = "136879043989014"})
local TrollingPage = Window:Page({Name = "Trolling", Icon = "136879043989014"})

Window:Category("Settings")
local SettingsPage = Library:CreateSettingsPage(Window)

local function Notify(title, message, duration)
    local body = (message and message ~= "") and message or (title or "")
    local text = (body ~= "") and ("LuhJayFamily - " .. body) or "LuhJayFamily"
    Library:Notification(text, duration or 3, nil)
end

local function findPlayerByPartialName(name)
    if type(name) ~= "string" then
        return nil
    end

    local lowered = name:lower()
    for _, player in ipairs(game:GetService("Players"):GetPlayers()) do
        if player.Name:lower():sub(1, #lowered) == lowered or (player.DisplayName and player.DisplayName:lower():sub(1, #lowered) == lowered) then
            return player
        end
    end
    return nil
end

local function teleportTo(input)
    local localPlayer = game:GetService("Players").LocalPlayer
    local char = localPlayer.Character
    local hrp = char and char:FindFirstChild("HumanoidRootPart")
    local humanoid = char and char:FindFirstChild("Humanoid")

    if not hrp or not humanoid then
        return false
    end

    local destinationCFrame

    if typeof(input) == "Vector3" then
        destinationCFrame = CFrame.new(input)
    elseif typeof(input) == "CFrame" then
        destinationCFrame = input
    elseif typeof(input) == "string" then
        local targetPlayer = findPlayerByPartialName(input)
        if targetPlayer and targetPlayer.Character and targetPlayer.Character:FindFirstChild("HumanoidRootPart") then
            destinationCFrame = targetPlayer.Character.HumanoidRootPart.CFrame
        else
            return false
        end
    else
        return false
    end

    humanoid:ChangeState(0)
    repeat task.wait() until not localPlayer:GetAttribute("LastACPos")
    hrp.CFrame = destinationCFrame
    return true
end

local function quickBuyTeleport(target, preDelay)
    local localPlayer = game:GetService("Players").LocalPlayer
    local character = localPlayer and localPlayer.Character
    local hrp = character and character:FindFirstChild("HumanoidRootPart")
    if not hrp then
        return nil
    end

    local oldCFrame = hrp.CFrame
    task.wait(preDelay or 0.2)

    if not teleportTo(target) then
        return nil
    end

    return oldCFrame
end

local function quickBuyReturn(oldCFrame, postDelay)
    local localPlayer = game:GetService("Players").LocalPlayer
    local character = localPlayer and localPlayer.Character
    local hrp = character and character:FindFirstChild("HumanoidRootPart")

    if hrp and oldCFrame then
        task.wait(postDelay or 0.2)
        teleportTo(oldCFrame)
    end
end

local trollingSection = TrollingPage:Section({Name = "Trolling", Icon = "136879043989014", Side = 1})

local twerkData = {
    Track = nil,
    Running = false
}

local function stopTwerk()
    twerkData.Running = false
    if twerkData.Track then
        pcall(function()
            twerkData.Track:Stop()
            twerkData.Track:Destroy()
        end)
        twerkData.Track = nil
    end
end

trollingSection:Button({
    Name = "twerk",
    Callback = function()
        stopTwerk()

        local player = cloneref(game.Players).LocalPlayer
        local character = player.Character or player.CharacterAdded:Wait()
        local humanoid = character:FindFirstChildOfClass("Humanoid") or character:WaitForChild("Humanoid")
        local animator = humanoid:FindFirstChildOfClass("Animator") or humanoid:WaitForChild("Animator")

        local animation = Instance.new("Animation")
        animation.AnimationId = "rbxassetid://15693621070"

        local loadAnimation = animator:LoadAnimation(animation)
        local speed = 1
        local minTime = 1.6
        local maxTime = 1.75
        local playType = 1

        loadAnimation:Play()
        loadAnimation:AdjustSpeed(speed)
        loadAnimation.TimePosition = minTime

        twerkData.Track = loadAnimation
        twerkData.Running = true

        task.spawn(function()
            while twerkData.Running and twerkData.Track == loadAnimation and task.wait() do
                if not loadAnimation.IsPlaying then
                    break
                end

                if playType == 1 then
                    if loadAnimation.TimePosition >= maxTime then
                        playType = 2
                        loadAnimation.TimePosition = maxTime
                        loadAnimation:AdjustSpeed(-speed)
                    end
                elseif playType == 2 then
                    if loadAnimation.TimePosition <= minTime then
                        playType = 1
                        loadAnimation.TimePosition = minTime
                        loadAnimation:AdjustSpeed(speed)
                    end
                end
            end

            if twerkData.Track == loadAnimation then
                stopTwerk()
            end
        end)
    end
})

trollingSection:Button({
    Name = "Stop twerk",
    Callback = function()
        stopTwerk()
    end
})

trollingSection:Toggle({
    Name = "Break All Glass",
    Flag = "BreakGlassLoop",
    Default = false,
    Callback = function(state)
        getgenv()._breakGlassLoop = state
        if state then
            task.spawn(function()
                local breakGlassRemote = game:GetService("ReplicatedStorage"):FindFirstChild("BreakGlass")
                while getgenv()._breakGlassLoop do
                    if breakGlassRemote then
                        for _, value in ipairs(workspace:GetDescendants()) do
                            if (value:IsA("BasePart") or value:IsA("MeshPart")) and value.Name == "Glass" then
                                breakGlassRemote:InvokeServer(value)
                            end
                        end
                    end
                    task.wait(0.01)
                end
            end)
        end
    end
})

trollingSection:Button({
    Name = "Spam Call Police",
    Callback = function()
        local callPoliceRemote = game:GetService("ReplicatedStorage"):FindFirstChild("CallPolice")
        if not callPoliceRemote then
            Notify("Call Police", "CallPolice remote not found.", 3)
            return
        end

        for _ = 1, getgenv().intsdp or 10 do
            task.wait(0.05)
            callPoliceRemote:FireServer()
        end
        Notify("Police Called", "Spammed police call.", 3)
    end
})

trollingSection:Button({
    Name = "Unlock All Cars",
    Callback = function()
        local function getCarsFolder()
            return workspace:FindFirstChild("CivCars") or workspace:FindFirstChild("Cars") or workspace:FindFirstChild("Vehicles")
        end

        local function hasScrewDriverTool(localPlayer)
            local function hasIn(container)
                if not container then
                    return false
                end
                for _, item in ipairs(container:GetChildren()) do
                    if item:IsA("Tool") and string.find(string.lower(item.Name), "screw", 1, true) then
                        return true
                    end
                end
                return false
            end
            return hasIn(localPlayer:FindFirstChild("Backpack")) or hasIn(localPlayer.Character)
        end

        local function tryBuyScrewDriver(localPlayer)
            if hasScrewDriverTool(localPlayer) then
                return true
            end

            local character = localPlayer.Character
            local root = character and character:FindFirstChild("HumanoidRootPart")
            local gunsFolder = workspace:FindFirstChild("GUNS")
            if not root or not gunsFolder then
                return false
            end

            local oldCFrame = root.CFrame
            local bought = false

            for _, item in ipairs(gunsFolder:GetChildren()) do
                local lowered = string.lower(item.Name)
                if string.find(lowered, "screw", 1, true) then
                    local prompt = item:FindFirstChildWhichIsA("ProximityPrompt", true)
                    local promptPart = prompt and prompt.Parent
                    if prompt and promptPart and promptPart:IsA("BasePart") then
                        root.CFrame = promptPart.CFrame * CFrame.new(0, 3, 0)
                        task.wait(0.15)
                        for _ = 1, 6 do
                            pcall(function()
                                prompt.HoldDuration = 0
                                prompt.RequiresLineOfSight = false
                                fireproximityprompt(prompt)
                            end)
                            task.wait(0.08)
                        end
                        task.wait(0.2)
                        if hasScrewDriverTool(localPlayer) then
                            bought = true
                            break
                        end
                    end
                end
            end

            root.CFrame = oldCFrame
            return bought or hasScrewDriverTool(localPlayer)
        end

        local function unlockCarModel(localPlayer, car, moveToCar)
            if not car or not car:IsA("Model") then
                return false
            end

            local lockedValue = car:FindFirstChild("Locked", true)
            if lockedValue and lockedValue:IsA("BoolValue") then
                lockedValue.Value = false
            end

            pcall(function()
                car:SetAttribute("Usable", true)
            end)

            local character = localPlayer.Character
            local root = character and character:FindFirstChild("HumanoidRootPart")
            local seat = car:FindFirstChild("DriveSeat") or car:FindFirstChildWhichIsA("VehicleSeat", true)
            local part = car.PrimaryPart or (seat and seat:IsA("BasePart") and seat) or car:FindFirstChildWhichIsA("BasePart", true)
            local oldCFrame = root and root.CFrame or nil

            if moveToCar and root and part then
                root.CFrame = part.CFrame * CFrame.new(0, 3, 0)
                task.wait(0.1)
            end

            local hasTool = hasScrewDriverTool(localPlayer) or tryBuyScrewDriver(localPlayer)
            if hasTool then
                for _, obj in ipairs(car:GetDescendants()) do
                    if obj:IsA("ProximityPrompt") and obj.Enabled then
                        local n = string.lower(obj.Name or "")
                        local o = string.lower(obj.ObjectText or "")
                        local a = string.lower(obj.ActionText or "")
                        local looksLikeLockPrompt = string.find(n, "lock", 1, true)
                            or string.find(n, "pick", 1, true)
                            or string.find(o, "lock", 1, true)
                            or string.find(o, "pick", 1, true)
                            or string.find(a, "lock", 1, true)
                            or string.find(a, "pick", 1, true)
                        if looksLikeLockPrompt then
                            for _ = 1, 8 do
                                pcall(function()
                                    obj.HoldDuration = 0
                                    obj.RequiresLineOfSight = false
                                    fireproximityprompt(obj)
                                end)
                                task.wait(0.06)
                            end
                        end
                    end
                end
            end

            if oldCFrame and moveToCar and root then
                root.CFrame = oldCFrame
            end

            return true
        end

        local localPlayer = game:GetService("Players").LocalPlayer
        local carsFolder = getCarsFolder()
        if not carsFolder then
            Notify("Unlock Cars", "No car folder found.", 3)
            return
        end

        local unlocked = 0
        local localCharacter = localPlayer.Character
        local root = localCharacter and localCharacter:FindFirstChild("HumanoidRootPart")

        for _, car in ipairs(carsFolder:GetChildren()) do
            if car:IsA("Model") then
                unlockCarModel(localPlayer, car, false)
                unlocked = unlocked + 1
            end
        end

        if root then
            local nearestCar
            local nearestDist = math.huge
            for _, car in ipairs(carsFolder:GetChildren()) do
                if car:IsA("Model") then
                    local seat = car:FindFirstChild("DriveSeat") or car:FindFirstChildWhichIsA("VehicleSeat", true)
                    local part = car.PrimaryPart or (seat and seat:IsA("BasePart") and seat) or car:FindFirstChildWhichIsA("BasePart", true)
                    if part then
                        local dist = (part.Position - root.Position).Magnitude
                        if dist < nearestDist then
                            nearestDist = dist
                            nearestCar = car
                        end
                    end
                end
            end

            if nearestCar then
                unlockCarModel(localPlayer, nearestCar, true)
            end
        end

        Notify("Unlock Cars", "Prepared " .. tostring(unlocked) .. " cars. Try Steal Nearest Car now.", 3)
    end
})

trollingSection:Button({
    Name = "Steal Nearest Car",
    Callback = function()
        local localPlayer = game:GetService("Players").LocalPlayer
        local character = localPlayer.Character or localPlayer.CharacterAdded:Wait()
        local humanoid = character:FindFirstChildWhichIsA("Humanoid")
        local root = character:FindFirstChild("HumanoidRootPart")
        if not humanoid or not root then
            Notify("Steal Car", "Character not ready.", 3)
            return
        end

        local carsFolder = workspace:FindFirstChild("CivCars") or workspace:FindFirstChild("Cars") or workspace:FindFirstChild("Vehicles")
        if not carsFolder then
            Notify("Steal Car", "No car folder found.", 3)
            return
        end

        local nearestCar, nearestSeat, nearestPart
        local nearestDistance = math.huge

        for _, car in ipairs(carsFolder:GetChildren()) do
            if car:IsA("Model") then
                local seat = car:FindFirstChild("DriveSeat") or car:FindFirstChildWhichIsA("VehicleSeat", true)
                local part = car.PrimaryPart or (seat and seat:IsA("BasePart") and seat) or car:FindFirstChildWhichIsA("BasePart", true)
                if seat and part and seat:IsA("VehicleSeat") and not seat.Occupant then
                    local distance = (part.Position - root.Position).Magnitude
                    if distance < nearestDistance then
                        nearestDistance = distance
                        nearestCar = car
                        nearestSeat = seat
                        nearestPart = part
                    end
                end
            end
        end

        if not nearestCar or not nearestSeat or not nearestPart then
            Notify("Steal Car", "No free nearby car found.", 3)
            return
        end

        pcall(function()
            nearestCar:SetAttribute("Usable", true)
        end)

        local lockedValue = nearestCar:FindFirstChild("Locked", true)
        if lockedValue and lockedValue:IsA("BoolValue") then
            lockedValue.Value = false
        end

        local original = root.CFrame
        root.CFrame = nearestPart.CFrame * CFrame.new(0, 3, 0)
        task.wait(0.1)
        nearestSeat:Sit(humanoid)

        task.delay(1, function()
            if humanoid.SeatPart ~= nearestSeat then
                root.CFrame = original
                Notify("Steal Car", "Seat attempt failed.", 3)
            else
                Notify("Steal Car", "Entered nearest car.", 3)
            end
        end)
    end
})

trollingSection:Button({
    Name = "Bring Owned Car",
    Callback = function()
        local Players = game:GetService("Players")
        local player = Players.LocalPlayer
        local character = player.Character
        local rootPart = character and character:FindFirstChild("HumanoidRootPart")
        
        if not rootPart then
            Notify("Bring Car", "Character not ready.", 3)
            return
        end

        local civCars = workspace:FindFirstChild("CivCars")
        if not civCars then
            Notify("Bring Car", "CivCars folder not found!", 3)
            return
        end

        local ownedCar = nil

        -- Find your own car based on "Owner" tag
        for _, car in ipairs(civCars:GetChildren()) do
            if car:IsA("Model") and car:FindFirstChild("DriveSeat") then
                local owner = car:FindFirstChild("Owner")
                if owner and owner:IsA("StringValue") and owner.Value == player.Name then
                    ownedCar = car
                    break
                end
            end
        end

        if not ownedCar then
            Notify("Bring Car", "Could not find your car!", 3)
            return
        end

        -- Make sure the car has a PrimaryPart
        if not ownedCar.PrimaryPart then
            ownedCar.PrimaryPart = ownedCar:FindFirstChild("PrimaryPart") or ownedCar:FindFirstChildWhichIsA("BasePart")
            if not ownedCar.PrimaryPart then
                Notify("Bring Car", "Car has no PrimaryPart!", 3)
                return
            end
        end

        -- Raycast to ground
        local rayOrigin = rootPart.Position + Vector3.new(0, 5, 0)
        local rayDirection = Vector3.new(0, -50, 0)
        local raycastParams = RaycastParams.new()
        raycastParams.FilterDescendantsInstances = {character, ownedCar}
        raycastParams.FilterType = Enum.RaycastFilterType.Blacklist

        local rayResult = workspace:Raycast(rayOrigin, rayDirection, raycastParams)
        local groundY = rootPart.Position.Y
        if rayResult then
            groundY = rayResult.Position.Y
        end

        -- Position the car near the player
        local carSize = ownedCar:GetExtentsSize()
        local forward = rootPart.CFrame.LookVector
        local targetPos = rootPart.Position + forward * (carSize.Z / 2 + 3)
        targetPos = Vector3.new(targetPos.X, groundY + carSize.Y / 2 + 0.1, targetPos.Z)
        local targetCFrame = CFrame.new(targetPos, targetPos + forward)

        -- Actually move the car
        ownedCar:PivotTo(targetCFrame)

        -- Force position by anchoring briefly
        for _, part in ipairs(ownedCar:GetDescendants()) do
            if part:IsA("BasePart") then
                part.Anchored = true
            end
        end

        task.wait(0.2)

        for _, part in ipairs(ownedCar:GetDescendants()) do
            if part:IsA("BasePart") then
                part.Anchored = false
            end
        end

        -- Update any server-tracked position value
        local posValue = ownedCar:FindFirstChild("Position") or ownedCar:FindFirstChild("LastLocation") or ownedCar:FindFirstChild("SpawnPoint")
        if posValue and posValue:IsA("Vector3Value") then
            posValue.Value = targetPos
        end

        Notify("Bring Car", "Your owned car has been brought near you!", 3)
    end
})

trollingSection:Button({
    Name = "Go To Owned Car",
    Callback = function()
        local Players = game:GetService("Players")
        local player = Players.LocalPlayer
        local civCars = workspace:FindFirstChild("CivCars")
        
        if not civCars then
            Notify("Go To Car", "CivCars folder not found!", 3)
            return
        end

        local foundCar = nil

        for _, car in ipairs(civCars:GetChildren()) do
            if car:IsA("Model") then
                local ownerTag = car:FindFirstChild("Owner")
                if ownerTag and ownerTag:IsA("StringValue") and ownerTag.Value == player.Name then
                    foundCar = car
                    break
                end
            end
        end

        if not foundCar then
            Notify("Go To Car", "No owned car found!", 3)
            return
        end

        local destination = foundCar:GetModelCFrame() + Vector3.new(0, 5, 0)
        if teleportTo(destination) then
            Notify("Go To Car", "Teleported to your car!", 3)
        else
            Notify("Go To Car", "Teleport failed!", 3)
        end
    end
})

getgenv().IsRagdolled = getgenv().IsRagdolled or false
getgenv().RagdollTargetPlayer = getgenv().RagdollTargetPlayer or nil

local function getRagdollPlayerList()
    local list = {"Me"}
    for _, p in ipairs(game:GetService("Players"):GetPlayers()) do
        if p ~= game:GetService("Players").LocalPlayer then
            table.insert(list, p.Name)
        end
    end
    table.sort(list, function(a, b)
        if a == "Me" then return true end
        if b == "Me" then return false end
        return a < b
    end)
    return list
end

local function applyRagdoll(character, enable)
    local humanoid = character and character:FindFirstChildOfClass("Humanoid")
    if not humanoid then return end
    if enable then
        humanoid:ChangeState(Enum.HumanoidStateType.Freefall)
        for _, part in ipairs(character:GetDescendants()) do
            if (part:IsA("Weld") or part:IsA("WeldConstraint") or part:IsA("Motor6D")) and part.Parent ~= humanoid then
                part.Enabled = false
            end
        end
        humanoid.PlatformStand = true
    else
        humanoid.PlatformStand = false
        humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
        for _, part in ipairs(character:GetDescendants()) do
            if (part:IsA("Weld") or part:IsA("WeldConstraint") or part:IsA("Motor6D")) and part.Parent ~= humanoid then
                part.Enabled = true
            end
        end
    end
end

trollingSection:Toggle({
    Name = "Ragdoll",
    Default = false,
    Callback = function(Value)
        getgenv().IsRagdolled = Value
        local Players = game:GetService("Players")
        local localPlayer = Players.LocalPlayer
        local target = getgenv().RagdollTargetPlayer
        local character

        if target and target ~= localPlayer then
            character = target.Character
            if not character then
                Notify("Ragdoll", target.Name .. " has no character!", 3)
                return
            end
        else
            character = localPlayer.Character
            if not character then
                Notify("Ragdoll", "Character not found!", 3)
                return
            end
        end

        applyRagdoll(character, Value)

        local targetName = (target and target ~= localPlayer) and target.Name or "You"
        Notify("Ragdoll", Value and (targetName .. " ragdolled!") or (targetName .. " unragdolled!"), 3)
    end
})

local ragdollPlayerList = getRagdollPlayerList()
getgenv().RagdollTargetPlayer = game:GetService("Players").LocalPlayer

local ragdollPlayerDropdown = trollingSection:Dropdown({
    Name = "Ragdoll Target",
    Items = ragdollPlayerList,
    Default = "Me",
    Callback = function(selected)
        local Players = game:GetService("Players")
        if selected == "Me" then
            getgenv().RagdollTargetPlayer = Players.LocalPlayer
        else
            getgenv().RagdollTargetPlayer = Players:FindFirstChild(selected) or Players.LocalPlayer
        end
    end
})

trollingSection:Button({
    Name = "Refresh Ragdoll List",
    Callback = function()
        local list = getRagdollPlayerList()
        if ragdollPlayerDropdown then
            ragdollPlayerDropdown:Refresh(list)
            ragdollPlayerDropdown:Set("Me")
            getgenv().RagdollTargetPlayer = game:GetService("Players").LocalPlayer
        end
        Notify("Ragdoll", "Player list refreshed!", 2)
    end
})

local KnifeMeeleSection = TrollingPage:Section({Name = "Knife Meele", Icon = "136879043989014", Side = 2})

local trollingPlayers = game:GetService("Players")
local trollingWorkspace = game:GetService("Workspace")
local trollingLocalPlayer = trollingPlayers.LocalPlayer

local allowedTools = {
    Cleaver = true,
    Blade = true,
    Machete = true
}

local knifeItems = {"Blade", "Cleaver", "Machete"}
getgenv().SelectedKnife = getgenv().SelectedKnife or knifeItems[1]
getgenv().KnifeTargetPlayer = getgenv().KnifeTargetPlayer or nil
getgenv().SwimMethod = false

local function enableSwimMethod()
    getgenv().SwimMethod = true
    task.wait(1)
end

local function disableSwimMethod()
    getgenv().SwimMethod = false
end

local function GetKnifePlayerList()
    local list = {}
    for _, p in ipairs(trollingPlayers:GetPlayers()) do
        if p ~= trollingLocalPlayer then
            table.insert(list, p.Name)
        end
    end
    table.sort(list)
    return list
end

local function GetAttackEvent(tool)
    if tool then
        local meleeSystem = tool:FindFirstChild("MeleeSystem")
        if meleeSystem and meleeSystem:FindFirstChild("AttackEvent") then
            return meleeSystem.AttackEvent
        end
    end
    return nil
end

local function HasKnife(player)
    local character = player.Character
    local backpack = player:FindFirstChild("Backpack")

    if character then
        for _, tool in pairs(character:GetChildren()) do
            if tool:IsA("Tool") and allowedTools[tool.Name] then
                return true
            end
        end
    end

    if backpack then
        for _, tool in pairs(backpack:GetChildren()) do
            if tool:IsA("Tool") and allowedTools[tool.Name] then
                return true
            end
        end
    end

    return false
end

local function EquipKnifeFromBackpack()
    local backpack = trollingLocalPlayer:FindFirstChild("Backpack")
    local character = trollingLocalPlayer.Character
    if not backpack or not character then
        return nil
    end

    local preferred = getgenv().SelectedKnife
    if preferred and backpack:FindFirstChild(preferred) then
        local preferredTool = backpack:FindFirstChild(preferred)
        if preferredTool and preferredTool:IsA("Tool") then
            preferredTool.Parent = character
            return preferredTool
        end
    end

    for _, item in pairs(backpack:GetChildren()) do
        if item:IsA("Tool") and allowedTools[item.Name] then
            item.Parent = character
            return item
        end
    end

    return character:FindFirstChildWhichIsA("Tool")
end

local function BuyKnifeByName(itemName)
    if not itemName or not allowedTools[itemName] then
        Notify("Knife", "Select a valid knife", 2)
        return
    end

    local gunsFolder = trollingWorkspace:FindFirstChild("GUNS")
    if not gunsFolder then
        Notify("Knife", "GUNS folder not found", 2)
        return
    end

    local knifeModel = gunsFolder:FindFirstChild(itemName)
    if not knifeModel then
        Notify("Knife", "Knife model not found: " .. itemName, 2)
        return
    end

    local prompt = knifeModel:FindFirstChildWhichIsA("ProximityPrompt", true)
    if not prompt or not prompt.Parent or not prompt.Parent:IsA("BasePart") then
        Notify("Knife", "Could not find purchase prompt for " .. itemName, 2)
        return
    end

    local hrp = trollingLocalPlayer.Character and trollingLocalPlayer.Character:FindFirstChild("HumanoidRootPart")
    if not hrp then
        Notify("Knife", "Character not ready", 2)
        return
    end

    local oldPosition = quickBuyTeleport(prompt.Parent.CFrame.Position + Vector3.new(0, 3, 0), 0.2)
    if not oldPosition then
        Notify("Knife", "Teleport failed", 2)
        return
    end
    task.wait(0.5)

    if not fireproximityprompt then
        Notify("Knife", "fireproximityprompt is unavailable", 2)
        quickBuyReturn(oldPosition, 0)
        return
    end

    for _ = 1, 5 do
        prompt.HoldDuration = 0
        prompt.RequiresLineOfSight = false
        fireproximityprompt(prompt)
        task.wait(0.1)
    end

    task.wait(0.8)
    quickBuyReturn(oldPosition, 0)
    Notify("Knife", "Purchased " .. itemName, 2)
end

local knifePlayerList = GetKnifePlayerList()
if knifePlayerList[1] then
    getgenv().KnifeTargetPlayer = trollingPlayers:FindFirstChild(knifePlayerList[1])
end

local knifePlayerDropdown = KnifeMeeleSection:Dropdown({
    Name = "Select Player",
    Flag = "KnifeTargetPlayer",
    Items = knifePlayerList,
    Default = knifePlayerList[1],
    Callback = function(selected)
        getgenv().KnifeTargetPlayer = selected and trollingPlayers:FindFirstChild(selected) or nil
    end
})

KnifeMeeleSection:Button({
    Name = "Refresh Player List",
    Callback = function()
        local list = GetKnifePlayerList()
        if knifePlayerDropdown then
            knifePlayerDropdown:Refresh(list)
            if #list > 0 then
                knifePlayerDropdown:Set(list[1])
                getgenv().KnifeTargetPlayer = trollingPlayers:FindFirstChild(list[1])
            else
                getgenv().KnifeTargetPlayer = nil
            end
        end
        Notify("Knife", "Knife player list refreshed", 2)
    end
})

KnifeMeeleSection:Dropdown({
    Name = "Knife",
    Flag = "SelectedKnife",
    Items = knifeItems,
    Default = getgenv().SelectedKnife,
    Callback = function(selected)
        getgenv().SelectedKnife = selected
    end
})

KnifeMeeleSection:Button({
    Name = "Buy Knife",
    Callback = function()
        task.spawn(function()
            BuyKnifeByName(getgenv().SelectedKnife)
        end)
    end
})

KnifeMeeleSection:Toggle({
    Name = "Spectate Player",
    Flag = "KnifeSpectatePlayer",
    Default = false,
    Callback = function(Value)
        local camera = trollingWorkspace.CurrentCamera
        if not camera then
            Notify("Spectate", "Camera not found", 2)
            return
        end

        if Value then
            local target = getgenv().KnifeTargetPlayer
            if target and target.Character and target.Character:FindFirstChildOfClass("Humanoid") then
                camera.CameraSubject = target.Character:FindFirstChildOfClass("Humanoid")
                camera.CameraType = Enum.CameraType.Custom
                Notify("Spectate", "Spectating " .. target.Name, 2)
            else
                Notify("Spectate", "Select a valid player first", 2)
                local localHumanoid = trollingLocalPlayer.Character and trollingLocalPlayer.Character:FindFirstChildOfClass("Humanoid")
                if localHumanoid then
                    camera.CameraSubject = localHumanoid
                    camera.CameraType = Enum.CameraType.Custom
                end
            end
        else
            local localHumanoid = trollingLocalPlayer.Character and trollingLocalPlayer.Character:FindFirstChildOfClass("Humanoid")
            if localHumanoid then
                camera.CameraSubject = localHumanoid
                camera.CameraType = Enum.CameraType.Custom
                Notify("Spectate", "Stopped spectating", 2)
            end
        end
    end
})

local function CrazyKnifeSequence()
    local player = trollingLocalPlayer
    local character = player.Character
    local hrp = character and character:FindFirstChild("HumanoidRootPart")

    if not character or not hrp then
        return
    end

    local tool = EquipKnifeFromBackpack() or character:FindFirstChildWhichIsA("Tool")
    local attackEvent = GetAttackEvent(tool)
    local target = getgenv().KnifeTargetPlayer

    if not target or not target.Character then
        Notify("Knife", "Select a valid player", 2)
        return
    end

    local targetHRP = target.Character:FindFirstChild("HumanoidRootPart")
    local humanoid = target.Character:FindFirstChild("Humanoid")

    if not HasKnife(player) then
        Notify("Knife", "Must buy knife first", 5)
        return
    end

    if tool and allowedTools[tool.Name] and attackEvent and targetHRP and humanoid and humanoid.Health > 0 then
        local originalCFrame = hrp.CFrame
        enableSwimMethod()

        while humanoid.Health > 0 and target.Character and target.Character:FindFirstChild("HumanoidRootPart") do
            targetHRP = target.Character:FindFirstChild("HumanoidRootPart")
            if not targetHRP then
                break
            end
            hrp.CFrame = targetHRP.CFrame * CFrame.new(0, 0, 1.2)
            attackEvent:FireServer()
            task.wait(0.05)
        end

        hrp.CFrame = originalCFrame
        disableSwimMethod()
        Notify("Knife", target.Name .. " is dead.", 5)
    else
        Notify("Knife", "Knife attack failed", 2)
    end
end

KnifeMeeleSection:Button({
    Name = "Kill Player Wit Knife",
    Callback = function()
        task.spawn(CrazyKnifeSequence)
    end
})

local BulletModsSection = TrollingPage:Section({Name = "Bullet Mods", Icon = "136879043989014", Side = 2})

local function setBulletVisuals(t)
    if typeof(t) ~= "table" or not rawget(t, "BulletSpeed") then return end

    rawset(t, "BulletSpeed", 150)
    rawset(t, "DropGravity", 0.3)
    rawset(t, "BulletParticleEnaled", true)
    rawset(t, "BulletParticleColor", Color3.new(1, 0, 0))
    rawset(t, "BulletParticleSize", NumberSequence.new({
        NumberSequenceKeypoint.new(0, 9e9),
        NumberSequenceKeypoint.new(1, 1)
    }))
end

local fireBallsEnabled = false

BulletModsSection:Toggle({
    Name = "Fire Balls",
    Default = false,
    Callback = function(state)
        fireBallsEnabled = state
        if state then
            for _, v in getgc(true) do
                if typeof(v) == "table" then
                    pcall(function()
                        setBulletVisuals(v)

                        for _, k in {7, 8} do
                            setBulletVisuals(rawget(v, k))
                        end
                    end)
                end
            end
            Notify("Bullet Mods", "Fire Balls enabled!", 2)
        else
            Notify("Bullet Mods", "Fire Balls disabled!", 2)
        end
    end
})

local visualPlayers = game:GetService("Players")
local visualRunService = game:GetService("RunService")
local visualLighting = game:GetService("Lighting")
local visualLocalPlayer = visualPlayers.LocalPlayer

local visualsPlayerSection = VisualsPage:Section({Name = "Player Visuals", Icon = "136879043989014", Side = 1})
local visualsWorldSection = VisualsPage:Section({Name = "World Visuals", Icon = "136879043989014", Side = 2})

getgenv().WereBetterVisuals = getgenv().WereBetterVisuals or {
    EspEnabled = true,
    NamesEnabled = false,
    DistEnabled = false,
    ChamsEnabled = false,
    ChamsVisibleCheck = false,
    NameColor = Color3.fromRGB(255, 255, 255),
    DistColor = Color3.fromRGB(255, 255, 255),
    ChamsFill = Color3.fromRGB(119, 120, 255),
    ChamsOutline = Color3.fromRGB(0, 0, 0),
    ChamsFillTransparency = 0.8,
    ChamsOutlineTransparency = 0.2,
    MaxDistance = 500,
    AmbientEnabled = false,
    AmbientColor = Color3.fromRGB(113, 113, 255),
    SaturationEnabled = false,
    SaturationLevel = 100,
    TimeOfDay = 12
}

local VisualConfig = getgenv().WereBetterVisuals
local visualsHighlights = {}
local visualsLabels = {}

local function sanitizeNumber(value, fallback, minValue, maxValue)
    local numeric = tonumber(value)
    if not numeric or numeric ~= numeric or numeric == math.huge or numeric == -math.huge then
        numeric = fallback
    end
    if minValue ~= nil and maxValue ~= nil then
        numeric = math.clamp(numeric, minValue, maxValue)
    end
    return numeric
end

VisualConfig.EspEnabled = (VisualConfig.EspEnabled ~= false)
VisualConfig.MaxDistance = sanitizeNumber(VisualConfig.MaxDistance, 500, 50, 2000)
VisualConfig.SaturationLevel = sanitizeNumber(VisualConfig.SaturationLevel, 100, 0, 200)
VisualConfig.ChamsFillTransparency = sanitizeNumber(VisualConfig.ChamsFillTransparency, 0.8, 0, 1)
VisualConfig.ChamsOutlineTransparency = sanitizeNumber(VisualConfig.ChamsOutlineTransparency, 0.2, 0, 1)
VisualConfig.TimeOfDay = sanitizeNumber(VisualConfig.TimeOfDay, 12, 0, 24)

if Library and Library.Flags then
    Library.Flags.MaxDistance = sanitizeNumber(Library.Flags.MaxDistance, VisualConfig.MaxDistance, 50, 2000)
    Library.Flags.SaturationLevel = sanitizeNumber(Library.Flags.SaturationLevel, VisualConfig.SaturationLevel, 0, 200)
    Library.Flags.ChamsFillTransparency = sanitizeNumber(Library.Flags.ChamsFillTransparency, math.floor(VisualConfig.ChamsFillTransparency * 100), 0, 100)
    Library.Flags.ChamsOutlineTransparency = sanitizeNumber(Library.Flags.ChamsOutlineTransparency, math.floor(VisualConfig.ChamsOutlineTransparency * 100), 0, 100)
    Library.Flags.TimeOfDay = sanitizeNumber(Library.Flags.TimeOfDay, VisualConfig.TimeOfDay, 0, 24)
end

local colorCorrection = visualLighting:FindFirstChild("WereBetterColorCorrection")
if not colorCorrection then
    colorCorrection = Instance.new("ColorCorrectionEffect")
    colorCorrection.Name = "WereBetterColorCorrection"
    colorCorrection.Brightness = 0
    colorCorrection.Contrast = 0
    colorCorrection.Saturation = 0
    colorCorrection.Parent = visualLighting
end

local function getHumanoidRootPart(character)
    return character and character:FindFirstChild("HumanoidRootPart")
end

local function isCharacterVisible(character)
    if not character then
        return false
    end

    local camera = workspace.CurrentCamera
    local targetPart = getHumanoidRootPart(character) or character:FindFirstChild("Head")
    if not camera or not targetPart then
        return false
    end

    local origin = camera.CFrame.Position
    local direction = targetPart.Position - origin
    local params = RaycastParams.new()
    params.FilterType = Enum.RaycastFilterType.Blacklist
    params.FilterDescendantsInstances = {visualLocalPlayer.Character or visualLocalPlayer, camera}

    local hit = workspace:Raycast(origin, direction, params)
    return (not hit) or hit.Instance:IsDescendantOf(character)
end

local function clearVisualEntry(player)
    if visualsHighlights[player] then
        visualsHighlights[player]:Destroy()
        visualsHighlights[player] = nil
    end
    if visualsLabels[player] then
        visualsLabels[player]:Destroy()
        visualsLabels[player] = nil
    end
end

local function updateWorldVisuals()
    visualLighting.Ambient = VisualConfig.AmbientEnabled and VisualConfig.AmbientColor or Color3.fromRGB(127, 127, 127)
    colorCorrection.Saturation = VisualConfig.SaturationEnabled and (VisualConfig.SaturationLevel / 100) or 0
    local hour = math.floor(VisualConfig.TimeOfDay)
    local minutes = math.floor((VisualConfig.TimeOfDay - hour) * 60)
    visualLighting.TimeOfDay = string.format("%02d:%02d:00", hour, minutes)
end

local function setSky(textureIds)
    local sky = visualLighting:FindFirstChild("WereBetterSky")
    if not sky then
        sky = Instance.new("Sky")
        sky.Name = "WereBetterSky"
        sky.Parent = visualLighting
    end

    sky.SkyboxBk = textureIds.Bk
    sky.SkyboxDn = textureIds.Dn
    sky.SkyboxFt = textureIds.Ft
    sky.SkyboxLf = textureIds.Lf
    sky.SkyboxRt = textureIds.Rt
    sky.SkyboxUp = textureIds.Up
end

local function updatePlayerVisuals()
    if not VisualConfig.EspEnabled then
        for _, plr in ipairs(visualPlayers:GetPlayers()) do
            clearVisualEntry(plr)
        end
        return
    end

    local myCharacter = visualLocalPlayer.Character
    local myRoot = getHumanoidRootPart(myCharacter)

    for _, plr in ipairs(visualPlayers:GetPlayers()) do
        if plr == visualLocalPlayer then
            clearVisualEntry(plr)
        else
            local char = plr.Character
            local hum = char and char:FindFirstChildOfClass("Humanoid")
            local root = getHumanoidRootPart(char)

            if not myRoot or not char or not hum or hum.Health <= 0 or not root then
                clearVisualEntry(plr)
            else
                local distance = (myRoot.Position - root.Position).Magnitude
                local withinDistance = distance <= VisualConfig.MaxDistance
                local visible = (not VisualConfig.ChamsVisibleCheck) or isCharacterVisible(char)

                if VisualConfig.ChamsEnabled and withinDistance and visible then
                    local h = visualsHighlights[plr]
                    if not h then
                        h = Instance.new("Highlight")
                        h.Adornee = char
                        h.Parent = char
                        visualsHighlights[plr] = h
                    end
                    h.Enabled = true
                    h.Adornee = char
                    h.FillColor = VisualConfig.ChamsFill
                    h.OutlineColor = VisualConfig.ChamsOutline
                    h.FillTransparency = math.clamp(VisualConfig.ChamsFillTransparency, 0, 1)
                    h.OutlineTransparency = math.clamp(VisualConfig.ChamsOutlineTransparency, 0, 1)
                else
                    if visualsHighlights[plr] then
                        visualsHighlights[plr]:Destroy()
                        visualsHighlights[plr] = nil
                    end
                end

                if (VisualConfig.NamesEnabled or VisualConfig.DistEnabled) and withinDistance then
                    local billboard = visualsLabels[plr]
                    if not billboard then
                        billboard = Instance.new("BillboardGui")
                        billboard.Name = "WereBetterVisualLabel"
                        billboard.AlwaysOnTop = true
                        billboard.Size = UDim2.new(0, 220, 0, 36)
                        billboard.StudsOffset = Vector3.new(0, 3, 0)

                        local text = Instance.new("TextLabel")
                        text.Name = "Text"
                        text.BackgroundTransparency = 1
                        text.Size = UDim2.new(1, 0, 1, 0)
                        text.Font = Enum.Font.Code
                        text.TextScaled = false
                        text.TextSize = 14
                        text.TextStrokeTransparency = 0.5
                        text.Parent = billboard

                        billboard.Parent = root
                        visualsLabels[plr] = billboard
                    end

                    billboard.Adornee = root
                    local labelText = ""
                    if VisualConfig.NamesEnabled then
                        labelText = plr.Name
                    end
                    if VisualConfig.DistEnabled then
                        local distText = string.format("[%dm]", math.floor(distance + 0.5))
                        labelText = (labelText ~= "" and (labelText .. " " .. distText) or distText)
                    end

                    local textLabel = billboard:FindFirstChild("Text")
                    if textLabel then
                        textLabel.Text = labelText
                        textLabel.TextColor3 = VisualConfig.NamesEnabled and VisualConfig.NameColor or VisualConfig.DistColor
                    end
                else
                    if visualsLabels[plr] then
                        visualsLabels[plr]:Destroy()
                        visualsLabels[plr] = nil
                    end
                end
            end
        end
    end
end

visualsPlayerSection:Toggle({
    Name = "Enable ESP",
    Flag = "EspEnabled",
    Default = VisualConfig.EspEnabled,
    Callback = function(state)
        VisualConfig.EspEnabled = state
        if not state then
            for _, plr in ipairs(visualPlayers:GetPlayers()) do
                clearVisualEntry(plr)
            end
        end
    end
})

visualsPlayerSection:Toggle({
    Name = "Player Names",
    Flag = "NamesEnabled",
    Default = VisualConfig.NamesEnabled,
    Callback = function(state)
        VisualConfig.NamesEnabled = state
    end
}):Colorpicker({
    Flag = "NameColor",
    Default = VisualConfig.NameColor,
    Callback = function(color)
        VisualConfig.NameColor = color
    end
})

visualsPlayerSection:Toggle({
    Name = "Distance",
    Flag = "DistanceEnabled",
    Default = VisualConfig.DistEnabled,
    Callback = function(state)
        VisualConfig.DistEnabled = state
    end
}):Colorpicker({
    Flag = "DistanceColor",
    Default = VisualConfig.DistColor,
    Callback = function(color)
        VisualConfig.DistColor = color
    end
})

visualsPlayerSection:Slider({
    Name = "Max Distance",
    Flag = "MaxDistance",
    Min = 50,
    Max = 2000,
    Default = VisualConfig.MaxDistance,
    Decimals = 0,
    Callback = function(value)
        VisualConfig.MaxDistance = sanitizeNumber(value, VisualConfig.MaxDistance, 50, 2000)
    end
})

visualsPlayerSection:Toggle({
    Name = "Chams",
    Flag = "ChamsEnabled",
    Default = VisualConfig.ChamsEnabled,
    Callback = function(state)
        VisualConfig.ChamsEnabled = state
    end
}):Colorpicker({
    Flag = "ChamsFill",
    Default = VisualConfig.ChamsFill,
    Callback = function(color)
        VisualConfig.ChamsFill = color
    end
})

visualsPlayerSection:Label("Chams Outline Color"):Colorpicker({
    Flag = "ChamsOutline",
    Default = VisualConfig.ChamsOutline,
    Callback = function(color)
        VisualConfig.ChamsOutline = color
    end
})

visualsPlayerSection:Toggle({
    Name = "Visible Check",
    Flag = "ChamsVisibleCheck",
    Default = VisualConfig.ChamsVisibleCheck,
    Callback = function(state)
        VisualConfig.ChamsVisibleCheck = state
    end
})

visualsPlayerSection:Slider({
    Name = "Fill Transparency",
    Flag = "ChamsFillTransparency",
    Min = 0,
    Max = 100,
    Default = math.floor(VisualConfig.ChamsFillTransparency * 100),
    Decimals = 0,
    Callback = function(value)
        local safeValue = sanitizeNumber(value, math.floor(VisualConfig.ChamsFillTransparency * 100), 0, 100)
        VisualConfig.ChamsFillTransparency = safeValue / 100
    end
})

visualsPlayerSection:Slider({
    Name = "Outline Transparency",
    Flag = "ChamsOutlineTransparency",
    Min = 0,
    Max = 100,
    Default = math.floor(VisualConfig.ChamsOutlineTransparency * 100),
    Decimals = 0,
    Callback = function(value)
        local safeValue = sanitizeNumber(value, math.floor(VisualConfig.ChamsOutlineTransparency * 100), 0, 100)
        VisualConfig.ChamsOutlineTransparency = safeValue / 100
    end
})

visualsWorldSection:Toggle({
    Name = "Enable Ambient Color",
    Flag = "EnableAmbientColor",
    Default = VisualConfig.AmbientEnabled,
    Callback = function(state)
        VisualConfig.AmbientEnabled = state
        updateWorldVisuals()
    end
}):Colorpicker({
    Flag = "AmbientColorPicker",
    Default = VisualConfig.AmbientColor,
    Callback = function(color)
        VisualConfig.AmbientColor = color
        updateWorldVisuals()
    end
})

visualsWorldSection:Toggle({
    Name = "Saturation",
    Flag = "Saturation",
    Default = VisualConfig.SaturationEnabled,
    Callback = function(state)
        VisualConfig.SaturationEnabled = state
        updateWorldVisuals()
    end
})

visualsWorldSection:Slider({
    Name = "Saturation Amount",
    Flag = "SaturationLevel",
    Min = 0,
    Max = 200,
    Default = VisualConfig.SaturationLevel,
    Decimals = 0,
    Callback = function(value)
        VisualConfig.SaturationLevel = sanitizeNumber(value, VisualConfig.SaturationLevel, 0, 200)
        updateWorldVisuals()
    end
})

visualsWorldSection:Slider({
    Name = "Time of Day",
    Flag = "TimeOfDay",
    Min = 0,
    Max = 24,
    Default = VisualConfig.TimeOfDay,
    Decimals = 0,
    Callback = function(value)
        VisualConfig.TimeOfDay = sanitizeNumber(value, VisualConfig.TimeOfDay, 0, 24)
        local hour = math.floor(VisualConfig.TimeOfDay)
        local minutes = math.floor((VisualConfig.TimeOfDay - hour) * 60)
        game.Lighting.TimeOfDay = string.format("%02d:%02d:00", hour, minutes)
    end
})

visualsWorldSection:Button({
    Name = "Night Time",
    Callback = function()
        setSky({
            Bk = "rbxassetid://155624722",
            Dn = "rbxassetid://155624727",
            Ft = "rbxassetid://155624730",
            Lf = "rbxassetid://155624736",
            Rt = "rbxassetid://155624742",
            Up = "rbxassetid://155624749"
        })
        print("Night Time Applied")
    end
})

visualsWorldSection:Button({
    Name = "Pink Clouds",
    Callback = function()
        setSky({
            Bk = "rbxassetid://11555017034",
            Dn = "rbxassetid://11555013415",
            Ft = "rbxassetid://11555010145",
            Lf = "rbxassetid://11555006545",
            Rt = "rbxassetid://11555000712",
            Up = "rbxassetid://11554996247"
        })
        print("Pink Clouds Applied")
    end
})

visualsWorldSection:Button({
    Name = "Purple Galaxy",
    Callback = function()
        setSky({
            Bk = "rbxassetid://159454299",
            Dn = "rbxassetid://159454296",
            Ft = "rbxassetid://159454293",
            Lf = "rbxassetid://159454286",
            Rt = "rbxassetid://159454300",
            Up = "rbxassetid://159454288"
        })
        print("Purple Galaxy Applied")
    end
})

visualsWorldSection:Button({
    Name = "Sunset",
    Callback = function()
        setSky({
            Bk = "rbxassetid://15502525195",
            Dn = "rbxassetid://15502522797",
            Ft = "rbxassetid://15502524520",
            Lf = "rbxassetid://15502522129",
            Rt = "rbxassetid://15502523711",
            Up = "rbxassetid://15502526102"
        })
        print("Sunset Applied")
    end
})

visualPlayers.PlayerRemoving:Connect(function(plr)
    clearVisualEntry(plr)
end)

visualRunService.RenderStepped:Connect(function()
    updatePlayerVisuals()
end)

updateWorldVisuals()

local gunLocalPlayer = game:GetService("Players").LocalPlayer
local gunSection = CombatPage:Section({Name = "Gun Mods", Icon = "136879043989014", Side = 1})
local silentAimGeneralSection = CombatPage:Section({Name = "Silent Aim", Icon = "136879043989014", Side = 1})
local silentAimFovSection = CombatPage:Section({Name = "Silent Aim FOV", Icon = "136879043989014", Side = 2})
local silentAimSnaplineSection = CombatPage:Section({Name = "Silent Aim Snapline", Icon = "136879043989014", Side = 2})
local killAuraSection = CombatPage:Section({Name = "Kill Aura", Icon = "136879043989014", Side = 2})
local combatPlayers = game:GetService("Players")

local target1 = nil
local auraTargetName = "Closest"
local auraHighlight = nil

getgenv().cooldown = getgenv().cooldown or 0.1
getgenv().hitpart = getgenv().hitpart or "Head"
getgenv().damage = getgenv().damage or 100
getgenv().beamcolor = getgenv().beamcolor or Color3.fromRGB(255, 255, 255)
getgenv().rainbowbeam = getgenv().rainbowbeam or false
getgenv().whiteblackbeam = (getgenv().whiteblackbeam == nil) and getgenv().rainbowbeam or getgenv().whiteblackbeam
getgenv().killaurbeam = getgenv().killaurbeam ~= false
getgenv().killauralooprunning = false

getgenv().cooldown = tonumber(getgenv().cooldown) or 0.1
getgenv().damage = tonumber(getgenv().damage) or 100
if getgenv().cooldown < 0.01 then
    getgenv().cooldown = 0.01
elseif getgenv().cooldown > 1 then
    getgenv().cooldown = 1
end

if getgenv().damage < 1 then
    getgenv().damage = 1
elseif getgenv().damage > 1000 then
    getgenv().damage = 1000
end

local function checkgun()
    local char = gunLocalPlayer.Character
    if not char then
        return nil
    end

    local tool = char:FindFirstChildOfClass("Tool")
    if tool and tool:FindFirstChild("GunScript_Local") then
        return tool
    end

    return nil
end

local function getClosestTarget()
    local myChar = gunLocalPlayer.Character
    local myRoot = myChar and myChar:FindFirstChild("HumanoidRootPart")
    if not myRoot then
        return nil
    end

    local closest = nil
    local bestDistance = math.huge

    for _, plr in ipairs(combatPlayers:GetPlayers()) do
        if plr ~= gunLocalPlayer and plr.Character and plr.Character:FindFirstChild("HumanoidRootPart") and plr.Character:FindFirstChild("Humanoid") then
            local hum = plr.Character.Humanoid
            if hum.Health > 0 then
                local dist = (myRoot.Position - plr.Character.HumanoidRootPart.Position).Magnitude
                if dist < bestDistance then
                    bestDistance = dist
                    closest = plr
                end
            end
        end
    end

    if not closest or not closest.Character then
        return nil, nil
    end

    local targetPart = closest.Character:FindFirstChild(getgenv().hitpart)
        or closest.Character:FindFirstChild("HumanoidRootPart")
        or closest.Character:FindFirstChild("Head")

    return closest, targetPart
end

local function resolveTarget()
    if auraTargetName == "Closest" then
        target1 = getClosestTarget()
    elseif target1 and target1.Parent == combatPlayers and target1.Name == auraTargetName then
        -- keep cached target
    else
        target1 = combatPlayers:FindFirstChild(auraTargetName)
    end

    return target1
end

local function visualizeMuzzle()
    local char = gunLocalPlayer.Character
    local tool = char and char:FindFirstChildOfClass("Tool")
    local handle = tool and tool:FindFirstChild("Handle")
    if not handle then
        return
    end

    local flash = Instance.new("PointLight")
    flash.Brightness = 3
    flash.Range = 6
    flash.Color = getgenv().rainbowbeam and ((math.floor(tick() * 8) % 2 == 0) and Color3.fromRGB(255, 255, 255) or Color3.fromRGB(0, 0, 0)) or getgenv().beamcolor
    flash.Parent = handle
    task.delay(0.08, function()
        if flash then
            flash:Destroy()
        end
    end)
end

local function randomRGB()
    return (math.floor(tick() * 8) % 2 == 0) and Color3.fromRGB(255, 255, 255) or Color3.fromRGB(0, 0, 0)
end

local function getGunData()
    local tool = checkgun()
    local serverScript = tool and (tool:FindFirstChild("GunScript_Server") or tool:FindFirstChild("GunScript") or tool:FindFirstChild("ServerScript"))
    return tool, serverScript
end

local function dmg(target, hitPart, damageAmount, toolOverride, serverScriptOverride)
    local gun = toolOverride or checkgun()
    if not gun or not target then
        return false
    end

    local hitPartName = (typeof(hitPart) == "Instance" and hitPart.Name) or hitPart
    if type(hitPartName) ~= "string" then
        hitPartName = getgenv().hitpart or "Head"
    end

    local replicatedStorage = game:GetService("ReplicatedStorage")
    local remotesToTry = {
        "DamageRemote",
        "ShootRemote",
        "GunRemote",
        "HitRemote",
        "ShootEvent",
        "GunEvent"
    }

    for _, remoteName in ipairs(remotesToTry) do
        local remote = replicatedStorage:FindFirstChild(remoteName)
        if remote and remote:IsA("RemoteEvent") then
            local ok = pcall(function()
                remote:FireServer(target, hitPartName, damageAmount, gun, serverScriptOverride)
            end)
            if ok then
                return true
            end
        end
    end

    return false
end

local function updateAuraHighlight()
    if auraHighlight then
        auraHighlight:Destroy()
        auraHighlight = nil
    end

    if not getgenv().killaurahigh then
        return
    end

    local target = resolveTarget()
    if not target or not target.Character then
        return
    end

    auraHighlight = Instance.new("Highlight")
    auraHighlight.Adornee = target.Character
    auraHighlight.FillColor = Color3.fromRGB(0, 0, 0)
    auraHighlight.OutlineColor = Color3.fromRGB(255, 255, 255)
    auraHighlight.FillTransparency = 0.5
    auraHighlight.OutlineTransparency = 0
    auraHighlight.Parent = target.Character
end

local function getTargetNames()
    local names = {"Closest"}
    for _, plr in ipairs(combatPlayers:GetPlayers()) do
        if plr ~= gunLocalPlayer then
            table.insert(names, plr.Name)
        end
    end
    return names
end

local function getGunSettings()
    local char = gunLocalPlayer.Character
    local tool = char and char:FindFirstChildOfClass("Tool")
    if not tool or not tool:FindFirstChild("Setting") then
        Notify("LuhJayFamily", "Equip a gun first", 2)
        return nil
    end
    return require(tool.Setting), tool
end

getgenv().SilentAimConfig = getgenv().SilentAimConfig or {
    Enabled = false,
    Targetting = false,
    WallCheck = false,
    TargetPart = {"Head"},
    MaxDistance = 1000,
    HitChance = 100,
    UseFieldOfView = false,
    DrawFieldOfView = false,
    FieldOfViewColor = Color3.new(1, 1, 1),
    FieldOfViewTransparency = 0.75,
    Radius = 100,
    Sides = 25,
    Snapline = false,
    SnaplineColor = Color3.new(1, 1, 1),
    SnaplineThickness = 1
}

local SilentAimConfig = getgenv().SilentAimConfig

local function getSilentBodyParts()
    local character = gunLocalPlayer.Character or gunLocalPlayer.CharacterAdded:Wait()
    local humanoid = character:FindFirstChildOfClass("Humanoid") or character:WaitForChild("Humanoid")
    local rigType = humanoid and humanoid.RigType and humanoid.RigType.Name or "R15"

    if rigType == "R6" then
        return {
            "Head",
            "Torso",
            "Left Arm",
            "Right Arm",
            "Left Leg",
            "Right Leg",
            "HumanoidRootPart"
        }
    end

    return {
        "Head",
        "UpperTorso",
        "LowerTorso",
        "LeftUpperArm",
        "LeftLowerArm",
        "RightUpperArm",
        "RightLowerArm",
        "LeftUpperLeg",
        "LeftLowerLeg",
        "RightUpperLeg",
        "RightLowerLeg",
        "HumanoidRootPart"
    }
end

silentAimGeneralSection:Toggle({
    Name = "Enabled",
    Flag = "SilentAim_Enabled",
    Default = SilentAimConfig.Enabled,
    Callback = function(state)
        SilentAimConfig.Enabled = state
    end
}):Keybind({
    Name = "Keybind",
    Flag = "SilentAim_Bind",
    Mode = "Always",
    Callback = function(state)
        SilentAimConfig.Targetting = state
    end
})

silentAimGeneralSection:Toggle({
    Name = "Visible Check",
    Flag = "SilentAim_Wallcheck",
    Default = SilentAimConfig.WallCheck,
    Callback = function(state)
        SilentAimConfig.WallCheck = state
    end
})

silentAimGeneralSection:Dropdown({
    Name = "Target Parts",
    Flag = "Silent_TargetPart",
    Items = getSilentBodyParts(),
    Default = SilentAimConfig.TargetPart,
    Multi = true,
    Callback = function(selected)
        if type(selected) == "table" and #selected > 0 then
            SilentAimConfig.TargetPart = selected
        end
    end
})

silentAimGeneralSection:Slider({
    Name = "Max Distance",
    Flag = "MaxDistance_Silent",
    Min = 0,
    Max = 3000,
    Default = SilentAimConfig.MaxDistance,
    Decimals = 0,
    Suffix = "st",
    Callback = function(value)
        SilentAimConfig.MaxDistance = value
    end
})

silentAimGeneralSection:Slider({
    Name = "Hit Chance",
    Flag = "SilentAim_HitChance",
    Min = 0,
    Max = 100,
    Default = SilentAimConfig.HitChance,
    Decimals = 0,
    Suffix = "%",
    Callback = function(value)
        SilentAimConfig.HitChance = value
    end
})

silentAimFovSection:Toggle({
    Name = "Enabled",
    Flag = "SilentAim_Usefov",
    Default = SilentAimConfig.UseFieldOfView,
    Callback = function(state)
        SilentAimConfig.UseFieldOfView = state
    end
})

silentAimFovSection:Toggle({
    Name = "Draw Circle",
    Flag = "SilentAim_DrawCircle",
    Default = SilentAimConfig.DrawFieldOfView,
    Callback = function(state)
        SilentAimConfig.DrawFieldOfView = state
    end
}):Colorpicker({
    Flag = "SilentAim_FOVColor",
    Default = SilentAimConfig.FieldOfViewColor,
    Callback = function(color)
        SilentAimConfig.FieldOfViewColor = color
    end
})

silentAimFovSection:Slider({
    Name = "Radius",
    Flag = "SilentAim_Radius",
    Min = 0,
    Max = 1000,
    Default = SilentAimConfig.Radius,
    Decimals = 0,
    Suffix = "°",
    Callback = function(value)
        SilentAimConfig.Radius = value
    end
})

silentAimFovSection:Slider({
    Name = "Sides",
    Flag = "SilentAim_Sides",
    Min = 3,
    Max = 100,
    Default = SilentAimConfig.Sides,
    Decimals = 0,
    Suffix = "°",
    Callback = function(value)
        SilentAimConfig.Sides = value
    end
})

silentAimSnaplineSection:Toggle({
    Name = "Enabled",
    Flag = "SilentAim_Snapline",
    Default = SilentAimConfig.Snapline,
    Callback = function(state)
        SilentAimConfig.Snapline = state
    end
}):Colorpicker({
    Flag = "SilentAim_SnaplineColor",
    Default = SilentAimConfig.SnaplineColor,
    Callback = function(color)
        SilentAimConfig.SnaplineColor = color
    end
})

silentAimSnaplineSection:Slider({
    Name = "Snapline Thickness",
    Flag = "SilentAim_SnaplineThickness",
    Min = 1,
    Max = 5,
    Default = SilentAimConfig.SnaplineThickness,
    Decimals = 0,
    Callback = function(value)
        SilentAimConfig.SnaplineThickness = value
    end
})

gunSection:Button({
    Name = "Infinite Ammo",
    Callback = function()
        local settings, tool = getGunSettings()
        if not settings then return end
        settings.LimitedAmmoEnabled = false
        settings.MaxAmmo = 80000
        settings.AmmoPerMag = 80000
        settings.Ammo = 80000
        settings.StoredAmmo = 80000
        settings.MagCount = 80000
        local gunScript = tool:FindFirstChild("GunScript_Local")
        if gunScript then
            pcall(function() debug.setupvalue(getsenv(gunScript).Reload, 3, 80000) end)
            pcall(function() debug.setupvalue(getsenv(gunScript).Reload, 5, 80000) end)
        end
        Notify("LuhJayFamily", "Infinite Ammo Enabled", 2)
    end
})

gunSection:Button({
    Name = "No Recoil",
    Callback = function()
        local settings = getGunSettings()
        if not settings then return end
        settings.Recoil = 0
        Notify("LuhJayFamily", "No Recoil Enabled", 2)
    end
})

gunSection:Button({
    Name = "Automatic Gun",
    Callback = function()
        local settings = getGunSettings()
        if not settings then return end
        settings.Auto = true
        Notify("LuhJayFamily", "Automatic Gun Enabled", 2)
    end
})

gunSection:Button({
    Name = "No Fire Rate",
    Callback = function()
        local settings = getGunSettings()
        if not settings then return end
        settings.FireRate = 0.1
        Notify("LuhJayFamily", "Fire Rate Modified", 2)
    end
})

gunSection:Button({
    Name = "Inf Damage",
    Callback = function()
        local settings = getGunSettings()
        if not settings then return end
        settings.BaseDamage = 9e9
        Notify("LuhJayFamily", "Infinite Damage Enabled", 2)
    end
})

gunSection:Button({
    Name = "No Spread",
    Callback = function()
        local settings = getGunSettings()
        if not settings then return end
        if settings.SpreadXY then settings.SpreadXY = 0 end
        if settings.SpreadYX then settings.SpreadYX = 0 end
        if settings.Spread then settings.Spread = 0 end
        settings.SpreadX = 0
        settings.SpreadY = 0
        Notify("LuhJayFamily", "No Spread Enabled", 2)
    end
})

gunSection:Button({
    Name = "No Jam",
    Callback = function()
        local settings = getGunSettings()
        if not settings then return end
        settings.JamChance = 0
        Notify("LuhJayFamily", "No Jam Enabled", 2)
    end
})

killAuraSection:Dropdown({
    Name = "Target",
    Items = getTargetNames(),
    Default = "Closest",
    Flag = "AuraTarget",
    Callback = function(selected)
        auraTargetName = selected or "Closest"
        target1 = resolveTarget()
        updateAuraHighlight()
    end
})

killAuraSection:Button({
    Name = "Refresh Targets",
    Callback = function()
        auraTargetName = "Closest"
        target1 = resolveTarget()
        updateAuraHighlight()
        Notify("LuhJayFamily", "Target list uses live players. Reopen dropdown to view updates.", 3)
    end
})

killAuraSection:Dropdown({
    Name = "Hit Part",
    Items = {"Head", "HumanoidRootPart", "UpperTorso", "LowerTorso", "Torso"},
    Default = getgenv().hitpart,
    Flag = "AuraHitPart",
    Callback = function(selected)
        getgenv().hitpart = selected or "Head"
    end
})

killAuraSection:Slider({
    Name = "Damage",
    Min = 1,
    Max = 1000,
    Default = getgenv().damage,
    Decimals = 0,
    Flag = "AuraDamage",
    Callback = function(value)
        getgenv().damage = value
    end
})

killAuraSection:Slider({
    Name = "Cooldown",
    Min = 0.01,
    Max = 1,
    Default = getgenv().cooldown,
    Decimals = 2,
    Flag = "AuraCooldown",
    Callback = function(value)
        getgenv().cooldown = value
    end
})

killAuraSection:Toggle({
    Name = "Ghostface",
    Flag = "GhostfaceAura",
    Default = false,
    Callback = function(state)
        getgenv().auraenabled = state
        if not state then
            updateAuraHighlight()
            return
        end

        if getgenv().killauralooprunning then
            return
        end

        getgenv().killauralooprunning = true
        task.spawn(function()
            while getgenv().auraenabled do
                pcall(function()
                    local target, targetPart = getClosestTarget()
                    local tool, serverScript = getGunData()

                    if getgenv().killaurahigh then
                        updateAuraHighlight()
                    end

                    if target and targetPart and tool and serverScript then
                        if getgenv().killaurbeam then
                            local LocalPlayer = game:GetService("Players").LocalPlayer
                            local Workspace = game:GetService("Workspace")
                            local myRoot = LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
                            local toolHandle = tool:FindFirstChild("Handle")
                            if myRoot and toolHandle then
                                local beamPart = Instance.new("Part", Workspace)
                                beamPart.Size = Vector3.new(0.2, 0.2, (toolHandle.Position - targetPart.Position).Magnitude)
                                beamPart.Anchored = true
                                beamPart.CanCollide = false
                                beamPart.Color = getgenv().rainbowbeam and randomRGB() or getgenv().beamcolor
                                beamPart.Material = Enum.Material.Neon

                                local midpoint = (toolHandle.Position + targetPart.Position) / 2
                                beamPart.Position = midpoint
                                beamPart.CFrame = CFrame.new(midpoint, targetPart.Position)

                                task.delay(0.1, function()
                                    if beamPart and beamPart.Parent then
                                        beamPart:Destroy()
                                    end
                                end)
                            end
                        end

                        visualizeMuzzle()
                        dmg(target, targetPart, getgenv().damage, tool, serverScript)
                    end
                end)

                task.wait(math.max(getgenv().cooldown, 0.03))
            end

            getgenv().killauralooprunning = false
        end)
    end
})

killAuraSection:Label("Beam Color"):Colorpicker({
    Name = "Beam Color",
    Default = Color3.fromRGB(255, 255, 255),
    Flag = "BeamColor",
    Callback = function(color)
        getgenv().beamcolor = color
    end
})

killAuraSection:Toggle({
    Name = "Highlight Target",
    Flag = "HighlightTarget",
    Default = false,
    Callback = function(state)
        getgenv().killaurahigh = state
        updateAuraHighlight()
    end
})

killAuraSection:Toggle({
    Name = "White/Black Beam",
    Flag = "WhiteBlackBeam",
    Default = false,
    Callback = function(state)
        getgenv().whiteblackbeam = state
        getgenv().rainbowbeam = state
    end
})

killAuraSection:Button({
    Name = "KillAll",
    Callback = function()
        local LocalPlayer = game:GetService("Players").LocalPlayer
        local gun = checkgun()
        if not gun then
            Notify("Killing All", "Gun not found.", 3)
            return
        end
        local startTime = tick()
        while tick() - startTime < 5 do
            for _, target in pairs(game.Players:GetPlayers()) do
                if target ~= LocalPlayer and target.Character and target.Character:FindFirstChild("Head") and target.Character:FindFirstChild("Humanoid") then
                    dmg(target, "Head", 1000)
                end
            end
            task.wait(0.1)
        end
        Notify("Killing All", "Kill command sent to all loaded players.", 3)
    end
})

combatPlayers.PlayerRemoving:Connect(function(plr)
    if target1 == plr then
        target1 = nil
        auraTargetName = "Closest"
        updateAuraHighlight()
    end
end)

local miniGuisSection = OtherPage:Section({Name = "Mini Gui's", Icon = "136879043989014", Side = 1})

local shopGUIs = {
    ["Bronx Market"] = "Bronx Market 2",
    ["Tattoo Shop"] = "Bronx TATTOOS",
    ["Open Trunk"] = "TRUNK STORAGE",
    ["BRONX PAWNING"] = "Bronx PAWNING",
    ["BRONX CLOTHING"] = "Bronx CLOTHING",
    ["Gas Station"] = "ShopGUI",
    ["EXOTIC DEALER"] = "ThaShop"
}

local shopList = {}
for key in pairs(shopGUIs) do
    table.insert(shopList, key)
end
table.sort(shopList)

local currentSelection = shopList[1]
miniGuisSection:Dropdown({
    Name = "Select Shop",
    Items = shopList,
    Default = currentSelection,
    Flag = "SelectedShop",
    Callback = function(option)
        currentSelection = option
    end
})

miniGuisSection:Button({
    Name = "Open or Close Shop",
    Callback = function()
        if not currentSelection then
            return
        end

        local guiName = shopGUIs[currentSelection]
        if not guiName then
            return
        end

        local localPlayer = game:GetService("Players").LocalPlayer
        local playerGui = localPlayer and localPlayer:FindFirstChild("PlayerGui")
        if not playerGui then
            return
        end

        local gui = playerGui:FindFirstChild(guiName)
        if gui and gui:IsA("ScreenGui") then
            gui.Enabled = not gui.Enabled
        end
    end
})

local bankSection = OtherPage:Section({Name = "Bank Options", Icon = "136879043989014", Side = 1})
local otherPlayer = game:GetService("Players").LocalPlayer
local otherReplicatedStorage = game:GetService("ReplicatedStorage")
local atmbankamount = 0
local autoDropEnabled = false

bankSection:Button({
    Name = "Show Bank Balance",
    Callback = function()
        local bankAmount = "N/A"
        if otherPlayer and otherPlayer:FindFirstChild("stored") and otherPlayer.stored:FindFirstChild("Bank") then
            bankAmount = tostring(otherPlayer.stored.Bank.Value)
        end
        Notify("LuhJayFamily", "You have $" .. bankAmount .. " in your bank.", 6)
    end
})

bankSection:Textbox({
    Name = "Cash Amount",
    Placeholder = "Enter cash amount",
    Default = "",
    Flag = "BankCashAmount",
    Callback = function(text)
        if text == "" then
            atmbankamount = 0
            return
        end

        local amt = tonumber(text)
        if not amt then
            Notify("LuhJayFamily", "Invalid amount", 1)
            atmbankamount = 0
            return
        end

        atmbankamount = amt
    end
})

bankSection:Button({
    Name = "Deposit",
    Callback = function()
        if atmbankamount > 0 then
            otherReplicatedStorage:WaitForChild("BankAction"):FireServer("depo", atmbankamount)
        end
    end
})

bankSection:Button({
    Name = "Withdraw",
    Callback = function()
        if atmbankamount > 0 then
            otherReplicatedStorage:WaitForChild("BankAction"):FireServer("with", atmbankamount)
        end
    end
})

bankSection:Button({
    Name = "Drop",
    Callback = function()
        if atmbankamount > 0 then
            otherReplicatedStorage:WaitForChild("BankProcessRemote"):InvokeServer("Drop", atmbankamount)
        end
    end
})

bankSection:Toggle({
    Name = "Auto Drop 10k",
    Flag = "AutoDrop10k",
    Default = false,
    Callback = function(value)
        autoDropEnabled = value
        if value then
            task.spawn(function()
                while autoDropEnabled do
                    otherReplicatedStorage:WaitForChild("BankProcessRemote"):InvokeServer("Drop", 10000)
                    local giveMoney = otherReplicatedStorage:FindFirstChild("GiveMoney")
                    if giveMoney then
                        giveMoney:FireServer("drop", 10000)
                    end
                    task.wait(0.5)
                end
            end)
        end
    end
})

local quickShopSection = OtherPage:Section({Name = "Quick Shop", Icon = "136879043989014", Side = 1})
local otherWorkspace = game:GetService("Workspace")
local otherMarketplaceService = game:GetService("MarketplaceService")

local shopOptions = {
    {name = "Shiesty", type = "ShopRemote", price = "$25"},
    {name = "BlackGloves", type = "ShopRemote", price = "$10"},
    {name = "BluGloves", type = "ShopRemote", price = "$10"},
    {name = "WhiteGloves", type = "ShopRemote", price = "$10"},
    {name = "AppleJuice", type = "ShopRemote", price = "$15"},
    {name = "GreenAppleJuice", type = "ShopRemote", price = "$15"},
    {name = "FakeCard", type = "ExoticShopRemote", price = "$500"},
    {name = "Ice-Fruit Bag", type = "ExoticShopRemote", price = "$100"},
    {name = "Ice-Fruit Cupz", type = "ExoticShopRemote", price = "$75"},
    {name = "FijiWater", type = "ExoticShopRemote", price = "$50"},
    {name = "FreshWater", type = "ExoticShopRemote", price = "$25"}
}

local shopItemNames = {}
local shopItemByLabel = {}
for _, item in ipairs(shopOptions) do
    local label = item.name .. " (" .. item.price .. ")"
    table.insert(shopItemNames, label)
    shopItemByLabel[label] = item
end

local selectedShopItem = shopOptions[1]
local selectedShopItemLabel = shopItemNames[1]

local shopItemDropdown = quickShopSection:Dropdown({
    Name = "Some Items",
    Items = shopItemNames,
    Default = shopItemNames[1],
    Flag = "QuickShopSomeItems",
    Callback = function(selected)
        selectedShopItemLabel = selected
        selectedShopItem = shopItemByLabel[selected] or selectedShopItem
    end
})

quickShopSection:Button({
    Name = "Buy Item",
    Callback = function()
        if not selectedShopItem then
            Notify("LuhJayFamily", "Please select an item first!", 2)
            return
        end

        local success = pcall(function()
            if selectedShopItem.type == "ShopRemote" then
                otherReplicatedStorage:WaitForChild("ShopRemote"):InvokeServer(selectedShopItem.name)
            else
                otherReplicatedStorage:WaitForChild("ExoticShopRemote"):InvokeServer(selectedShopItem.name)
            end
        end)

        if success then
            Notify("LuhJayFamily", "Purchased " .. selectedShopItem.name, 2)
        end
    end
})

local function getRealWeapons()
    local realWeapons = {}

    if otherWorkspace:FindFirstChild("GUNS") then
        for _, gunModel in pairs(otherWorkspace.GUNS:GetChildren()) do
            if gunModel:IsA("Model") then
                local price = gunModel:FindFirstChild("Price", true)
                if price and tonumber(price.Value) and price.Value > 0 then
                    table.insert(realWeapons, gunModel.Name)
                end
            end
        end
    end

    table.sort(realWeapons)
    return realWeapons
end

local weaponNames = getRealWeapons()
getgenv().SelectedWeapon = weaponNames[1] or "None"

local weaponDropdown = quickShopSection:Dropdown({
    Name = "All Items",
    Items = (#weaponNames > 0 and weaponNames or {"None"}),
    Default = (weaponNames[1] or "None"),
    Flag = "QuickShopAllItems",
    Callback = function(selected)
        getgenv().SelectedWeapon = selected
    end
})

local function quickShopListsEqual(a, b)
    if #a ~= #b then
        return false
    end

    for i = 1, #a do
        if a[i] ~= b[i] then
            return false
        end
    end

    return true
end

local cachedWeaponNames = (#weaponNames > 0 and weaponNames) or {"None"}
local weaponRefreshQueued = false

local function refreshWeaponDropdown(force)
    local newWeaponNames = getRealWeapons()
    if #newWeaponNames == 0 then
        newWeaponNames = {"None"}
    end

    if not force and quickShopListsEqual(cachedWeaponNames, newWeaponNames) then
        return
    end

    cachedWeaponNames = table.clone(newWeaponNames)

    if weaponDropdown and weaponDropdown.Refresh then
        weaponDropdown:Refresh(newWeaponNames)
        if getgenv().SelectedWeapon and table.find(newWeaponNames, getgenv().SelectedWeapon) then
            weaponDropdown:Set(getgenv().SelectedWeapon)
        else
            getgenv().SelectedWeapon = newWeaponNames[1]
            weaponDropdown:Set(newWeaponNames[1])
        end
    end
end

local function queueWeaponRefresh()
    if weaponRefreshQueued then
        return
    end

    weaponRefreshQueued = true
    task.delay(0.2, function()
        weaponRefreshQueued = false
        pcall(function()
            refreshWeaponDropdown(false)
        end)
    end)
end

task.spawn(function()
    local gunsFolder = otherWorkspace:FindFirstChild("GUNS")
    if gunsFolder then
        gunsFolder.ChildAdded:Connect(queueWeaponRefresh)
        gunsFolder.ChildRemoved:Connect(queueWeaponRefresh)
    end

    otherWorkspace.ChildAdded:Connect(function(child)
        if child.Name == "GUNS" then
            child.ChildAdded:Connect(queueWeaponRefresh)
            child.ChildRemoved:Connect(queueWeaponRefresh)
            queueWeaponRefresh()
        end
    end)
end)

task.spawn(function()
    while task.wait(8) do
        pcall(function()
            refreshWeaponDropdown(false)
        end)
    end
end)

local function quickShopTeleportTo(target)
    local oldCFrame = quickBuyTeleport(target, 0.2)
    if not oldCFrame then
        return false
    end
    task.wait(0.2)
    return oldCFrame
end

quickShopSection:Button({
    Name = "Buy Weapon",
    Callback = function()
        if not getgenv().SelectedWeapon or getgenv().SelectedWeapon == "None" then
            Notify("LuhJayFamily", "Please select a weapon first!", 2)
            return
        end

        task.spawn(function()
            local itemName = getgenv().SelectedWeapon
            local gunsFolder = otherWorkspace:FindFirstChild("GUNS")
            local gunModel = gunsFolder and gunsFolder:FindFirstChild(itemName)

            if not gunModel then
                Notify("LuhJayFamily", "Weapon '" .. itemName .. "' not found!", 2)
                return
            end

            local gamepassID = gunModel:FindFirstChild("GamepassID", true)
            if gamepassID and tonumber(gamepassID.Value) and gamepassID.Value > 0 then
                local hasPass = false
                pcall(function()
                    hasPass = otherMarketplaceService:UserOwnsGamePassAsync(otherPlayer.UserId, gamepassID.Value)
                end)

                if not hasPass then
                    Notify("LuhJayFamily", "You need the gamepass for " .. itemName .. "!", 2)
                    return
                end
            end

            local prompt = gunModel:FindFirstChildWhichIsA("ProximityPrompt", true)
            if prompt then
                local oldPosition = quickShopTeleportTo(prompt.Parent.CFrame.Position + Vector3.new(0, 3, 0))
                if not oldPosition then
                    Notify("LuhJayFamily", "Teleport failed", 2)
                    return
                end
                task.wait(0.5)

                for _ = 1, 5 do
                    prompt.HoldDuration = 0
                    prompt.RequiresLineOfSight = false
                    if fireproximityprompt then
                        fireproximityprompt(prompt)
                    else
                        prompt:InputHoldBegin()
                        prompt:InputHoldEnd()
                    end
                    task.wait(0.1)
                end

                task.wait(1)
                quickBuyReturn(oldPosition, 0)
                Notify("LuhJayFamily", "Purchased " .. itemName .. "!", 2)
            else
                Notify("LuhJayFamily", "Could not find purchase prompt for " .. itemName .. "!", 2)
            end
        end)
    end
})

local autoFarmsSection = OtherPage:Section({Name = "AutoFarms", Icon = "136879043989014", Side = 2})

local Workspace = game:GetService("Workspace")
local LocalPlayer = game:GetService("Players").LocalPlayer

local function safeFirePrompt(prompt)
    if not (prompt and prompt:IsA("ProximityPrompt")) then
        return
    end

    if fireproximityprompt then
        pcall(function()
            fireproximityprompt(prompt)
        end)
    else
        prompt:InputHoldBegin()
        prompt:InputHoldEnd()
    end
end

autoFarmsSection:Toggle({
    Name = "AutoFarm Studio",
    Flag = "AutoFarmStudio",
    Default = false,
    Callback = function(Value)
        getgenv().AutoFarmStudio = Value

        if Value then
            task.spawn(function()
                local camera = Workspace.CurrentCamera
                local studioPrompts = {}
                local lastUpdateTime = 0

                local function findStudioPrompts()
                    if tick() - lastUpdateTime < 1 then return studioPrompts end
                    lastUpdateTime = tick()
                    table.clear(studioPrompts)

                    local studioFolder = Workspace:FindFirstChild("StudioPay")
                    if studioFolder then
                        local moneyFolder = studioFolder:FindFirstChild("Money")
                        if moneyFolder then
                            for _, v in pairs(moneyFolder:GetDescendants()) do
                                if v:IsA("ProximityPrompt") and v.Name == "Prompt" then
                                    table.insert(studioPrompts, v)
                                end
                            end
                        end
                    end
                    return studioPrompts
                end

                local root = LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
                local humanoid = LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("Humanoid")
                if not root or not humanoid then return end

                local originalCFrame = root.CFrame
                findStudioPrompts()

                for _, v in pairs(studioPrompts) do
                    if v:IsA("ProximityPrompt") and v.Name == "Prompt" and v.Enabled and getgenv().AutoFarmStudio and v.Parent and v.Parent:IsA("BasePart") then
                        humanoid:ChangeState(0)
                        repeat task.wait() until not LocalPlayer:GetAttribute("LastACPos")

                        root.CFrame = CFrame.new(
                            v.Parent.Position.X,
                            v.Parent.Position.Y + 2,
                            v.Parent.Position.Z
                        )

                        camera.CFrame = CFrame.new(camera.CFrame.Position, v.Parent.Position)
                        task.wait(0.25)

                        repeat
                            task.wait(0.3)
                            safeFirePrompt(v)
                        until v.Enabled == false or not getgenv().AutoFarmStudio

                        if not getgenv().AutoFarmStudio then break end
                    end
                end

                if getgenv().AutoFarmStudio then
                    root.CFrame = originalCFrame
                    Notify("LuhJayFamily", "Studio robbery complete!", 2)
                end
            end)
        end
    end
})

autoFarmsSection:Toggle({
    Name = "AutoFarm Construction",
    Flag = "AutoFarmConstruction",
    Default = false,
    Callback = function(Value)
        getgenv().AutoFarmConstruction = Value

        if Value then
            task.spawn(function()
                local function getCharacter()
                    return LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
                end

                local function safeTeleport(cf)
                    local character = getCharacter()
                    local humanoid = character:WaitForChild("Humanoid")
                    local hrp = character:WaitForChild("HumanoidRootPart")
                    humanoid:ChangeState(0)
                    repeat task.wait() until not LocalPlayer:GetAttribute("LastACPos")
                    hrp.CFrame = cf
                end

                local function hasPlyWood()
                    local backpack = LocalPlayer:FindFirstChild("Backpack")
                    local character = getCharacter()
                    return (backpack and backpack:FindFirstChild("PlyWood")) or
                    (character and character:FindFirstChild("PlyWood"))
                end

                local function equipPlyWood()
                    local backpack = LocalPlayer:FindFirstChild("Backpack")
                    if backpack then
                        local plyWood = backpack:FindFirstChild("PlyWood")
                        if plyWood then
                            plyWood.Parent = getCharacter()
                        end
                    end
                end

                local function fireProx(prompt)
                    if prompt and prompt:IsA("ProximityPrompt") then
                        prompt.HoldDuration = 0
                        prompt.RequiresLineOfSight = false
                        prompt.Enabled = true
                        prompt.MaxActivationDistance = 15

                        for _ = 1, 20 do
                            task.spawn(function()
                                safeFirePrompt(prompt)
                            end)
                            task.wait(0.015)
                        end
                    end
                end

                local function grabWood()
                    safeTeleport(CFrame.new(-1727, 371, -1178))
                    task.wait(0.2)

                    while getgenv().AutoFarmConstruction and not hasPlyWood() do
                        local constructionStuff = Workspace:FindFirstChild("ConstructionStuff")
                        local grabWoodPart = constructionStuff and constructionStuff:FindFirstChild("Grab Wood")
                        fireProx(grabWoodPart and grabWoodPart:FindFirstChildOfClass("ProximityPrompt"))
                        task.wait(0.3)
                        equipPlyWood()
                    end
                end

                local function buildWall(wallPromptName, wallPosition)
                    local constructionStuff = Workspace:FindFirstChild("ConstructionStuff")
                    local wallPart = constructionStuff and constructionStuff:FindFirstChild(wallPromptName)
                    local prompt = wallPart and wallPart:FindFirstChildOfClass("ProximityPrompt")

                    while getgenv().AutoFarmConstruction and prompt and prompt.Enabled do
                        safeTeleport(wallPosition)
                        task.wait(0.2)
                        fireProx(prompt)
                        task.wait(0.3)
                        if not hasPlyWood() then
                            grabWood()
                        end
                    end
                end

                safeTeleport(CFrame.new(-1728, 371, -1172))
                task.wait(0.2)

                local constructionStuff = Workspace:FindFirstChild("ConstructionStuff")
                local startJobPart = constructionStuff and constructionStuff:FindFirstChild("Start Job")
                fireProx(startJobPart and startJobPart:FindFirstChildOfClass("ProximityPrompt"))
                task.wait(0.5)

                while getgenv().AutoFarmConstruction do
                    if not hasPlyWood() then
                        grabWood()
                    end

                    buildWall("Wall2 Prompt", CFrame.new(-1705, 368, -1151))
                    buildWall("Wall3 Prompt", CFrame.new(-1732, 368, -1152))
                    buildWall("Wall4 Prompt2", CFrame.new(-1772, 368, -1152))
                    buildWall("Wall1 Prompt3", CFrame.new(-1674, 368, -1166))

                    if getgenv().AutoFarmConstruction then
                        Notify("LuhJayFamily", "Construction job complete!", 3)
                    end
                    task.wait(0.1)
                end
            end)
        end
    end
})

autoFarmsSection:Toggle({
    Name = "AutoFarm Dumpster",
    Flag = "AutoFarmDumpsters",
    Default = false,
    Callback = function(Value)
        getgenv().AutoFarmDumpsters = Value

        if Value then
            task.spawn(function()
                local dumpsterPrompts = {}
                local lastUpdateTime = 0

                local function findDumpsters()
                    if tick() - lastUpdateTime < 5 then return dumpsterPrompts end
                    lastUpdateTime = tick()
                    table.clear(dumpsterPrompts)

                    for _, v in pairs(Workspace:GetDescendants()) do
                        if v:IsA("ProximityPrompt") and v.Name == "ProximityPrompt" and v.Parent and v.Parent.Name == "DumpsterPromt" then
                            v.HoldDuration = 0
                            v.RequiresLineOfSight = false
                            table.insert(dumpsterPrompts, v)
                        end
                    end
                    return dumpsterPrompts
                end

                findDumpsters()

                while getgenv().AutoFarmDumpsters do
                    task.wait(0.5)
                    findDumpsters()

                    for _, v in ipairs(dumpsterPrompts) do
                        if v and v.Parent and v.Parent:IsA("BasePart") and getgenv().AutoFarmDumpsters then
                            local hrp = LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
                            local humanoid = LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("Humanoid")
                            if hrp and humanoid then
                                humanoid:ChangeState(0)
                                repeat task.wait() until not LocalPlayer:GetAttribute("LastACPos")
                                hrp.CFrame = CFrame.new(v.Parent.Position.X, v.Parent.Position.Y, v.Parent.Position.Z + 3)
                            end
                            Workspace.CurrentCamera.CFrame = CFrame.new(Workspace.CurrentCamera.CFrame.Position, v.Parent.Position)
                            task.wait(0.3)
                            for _ = 1, 10 do
                                safeFirePrompt(v)
                            end
                            task.wait(0.1)
                            if not getgenv().AutoFarmDumpsters then break end
                        end
                    end
                end
            end)
        end
    end
})

local outfitsSection = OtherPage:Section({Name = "Outfits Selections", Icon = "136879043989014", Side = 2})

local outfits = {
    ["Blue Spider"] = {
        Hats = {"MRHoodieBRR"},
        Shirts = {"Blue Sp5der Hoodie"},
        Pants = {"Blue Sp5der Sweats"},
        Shiestys = {"Shiesty"}
    },
    ["Spider Man"] = {
        Hats = {},
        Shirts = {"Spiderman"},
        Pants = {"Spiderman"},
        Shiestys = {"RedShiesty"}
    },
    ["Red Spider"] = {
        Hats = {"MRHoodieBRR"},
        Shirts = {"Red Sp5der Sweats"},
        Pants = {"Red Sp5der Sweats"},
        Shiestys = {"Shiesty"}
    }
}

local function equipOutfitItem(category, itemName)
    local categoryFolder = LocalPlayer:FindFirstChild(category)
    if not categoryFolder then
        return
    end

    if not categoryFolder:FindFirstChild(itemName) then
        game.ReplicatedStorage.ClothShopRemote:FireServer("Buy", category, itemName)
        task.wait(0.1)
    end
    game.ReplicatedStorage.ClothShopRemote:FireServer("Wear", category, itemName)
end

local function equipOutfit(outfitName)
    local outfit = outfits[outfitName]
    if not outfit then
        Notify("LuhJayFamily", "Outfit '" .. tostring(outfitName) .. "' not found!", 3)
        return
    end

    game.ReplicatedStorage.ClothShopRemote:FireServer("Reset Data")
    task.wait(0.2)
    Notify("LuhJayFamily", "Changing to " .. outfitName .. " outfit...", 2)

    for category, items in pairs(outfit) do
        for _, item in ipairs(items) do
            pcall(function()
                equipOutfitItem(category, item)
                task.wait(0.2)
            end)
        end
    end

    Notify("LuhJayFamily", "Successfully equipped " .. outfitName .. " outfit!", 3)
end

local outfitNames = {}
for name in pairs(outfits) do
    table.insert(outfitNames, name)
end
table.sort(outfitNames)

local selectedOutfit = outfitNames[1]

outfitsSection:Dropdown({
    Name = "Select Outfit",
    Items = outfitNames,
    Default = selectedOutfit,
    Flag = "SelectedOutfit",
    Callback = function(option)
        selectedOutfit = option
    end
})

outfitsSection:Button({
    Name = "Equip Selected Outfit",
    Callback = function()
        equipOutfit(selectedOutfit)
    end
})

local moneyDupeSection = MainPage:Section({Name = "Money Dupe", Icon = "136879043989014", Side = 1})

moneyDupeSection:Label("Cooking Instructions")
moneyDupeSection:Label("1. Go to the cooking spot")
moneyDupeSection:Label("2. Cook one Ice Fruit Cup")
moneyDupeSection:Label("3. Keep it in inventory, not equipped")
moneyDupeSection:Label("4. Click Money Dupe")

local function enableMoneyDupeSwimMethod()
    getgenv().SwimMethod = true
    task.wait(1)
end

local function disableMoneyDupeSwimMethod()
    getgenv().SwimMethod = false
end

local combatSection = MainPage:Section({Name = "Dupe", Icon = "136879043989014", Side = 2})
local movementSection = MainPage:Section({Name = "Movements", Icon = "136879043989014", Side = 2})
local teleportSection = MainPage:Section({Name = "Teleports", Icon = "136879043989014", Side = 2})
local movementPlayer = game:GetService("Players").LocalPlayer
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")

local tpHumanoidRootPart
movementPlayer.CharacterAdded:Connect(function(char)
    tpHumanoidRootPart = char:WaitForChild("HumanoidRootPart", 10)
end)
if movementPlayer.Character then
    tpHumanoidRootPart = movementPlayer.Character:FindFirstChild("HumanoidRootPart")
end

local function updateCharacterReferences()
    local character = movementPlayer.Character or movementPlayer.CharacterAdded:Wait()
    tpHumanoidRootPart = character:WaitForChild("HumanoidRootPart", 5)
end

updateCharacterReferences()

local PlaceTeleports = {
    {name = "Bank", pos = Vector3.new(-226.22584533691406, 283.8095703125, -1217.7509765625)},
    {name = "Bank Vault", pos = Vector3.new(-217.568359375, 373.7984924316406, -1216.20947265625)},
    {name = "Bank Tools", pos = Vector3.new(-397.4308776855469, 334.3142395019531, -555.7023315429688)},
    {name = "Money Wash", pos = Vector3.new(-977.1771, 253.6838, -692.5855)},
    {name = "Money Man", pos = Vector3.new(-1008.0662, 262.1141, 55.1336)},
    {name = "Pawn Shop", pos = Vector3.new(-1049.6431, 253.5367, -814.2697)},
    {name = "Safe Items", pos = Vector3.new(68514.8984, 52941.5, -796.09)},
    {name = "Backpack Shop", pos = Vector3.new(-703.339355, 253.918518, -694.008057)},
    {name = "Frozen Shop", pos = Vector3.new(-216.31436157226562, 284.031494140625, -1169.032470703125)},
    {name = "Drip Shop", pos = Vector3.new(67462.6953, 10489.0352, 549.5895)},
    {name = "Drip Store", pos = Vector3.new(67462, 10489.21484375, 546.1941528320312)},
    {name = "T-Mobile", pos = Vector3.new(-659.258606, 253.668259, -697.061584)},
    {name = "Lil Caesars", pos = Vector3.new(-611.523376, 254.308807, -800.337341)},
    {name = "Taco Shop", pos = Vector3.new(-672.696655, 253.827667, -807.838440)},
    {name = "Burger n Fries", pos = Vector3.new(-750.633545, 253.761230, -784.572021)},
    {name = "Chicken Wings", pos = Vector3.new(-957.9142, 253.5367, -815.9442)},
    {name = "Deli", pos = Vector3.new(-755.8114013671875, 254.6927490234375, -687.1181640625)},
    {name = "Car Dealer", pos = Vector3.new(-401.99371337890625, 253.4141082763672, -1248.8380126953125)},
    {name = "GunShop 1", pos = Vector3.new(92978, 122099, 17232)},
    {name = "GunShop 1 Lobby", pos = Vector3.new(-1002.4224, 253.6382, -803.9125)},
    {name = "GunShop 2", pos = Vector3.new(66195.4453125, 123615.7109375, 5750.28271484375)},
    {name = "GunShop 2 Lobby", pos = Vector3.new(-224.3818359375, 283.8034362792969, -794.7174072265625)},
    {name = "GunShop 3", pos = Vector3.new(60820.3086, 87609.1484, -351.4746)},
    {name = "Pent House", pos = Vector3.new(-178.27471923828125, 397.1383056640625, -573.0322265625)},
    {name = "Mini Mansion", pos = Vector3.new(-791.5180053710938, 256.7944641113281, 1414.4248046875)},
    {name = "TrailerPark", pos = Vector3.new(-1522.76904296875, 253.16094970703125, 2344.95947265625)},
    {name = "Woody's Hotel", pos = Vector3.new(-1022.61962890625, 325.8400573730469, -908.9157104492188)},
    {name = "Soda Warehouse", pos = Vector3.new(-187.85504150390625, 284.6252136230469, -291.3419189453125)},
    {name = "Soda Supplies", pos = Vector3.new(-403.09906005859375, 254.20343017578125, -580.0437622070312)},
    {name = "Soda Seller", pos = Vector3.new(-1292.2200927734375, 253.30044555664062, -3003.04833984375)},
    {name = "Exotic Dealer", pos = Vector3.new(-1523.5654296875, 273.9729919433594, -990.6575317382812)},
    {name = "Switch Seller", pos = Vector3.new(-1446.2166748046875, 256.059814453125, 2189.876220703125)},
    {name = "Construction Site", pos = Vector3.new(-1731.8307, 370.8123, -1176.8387)},
    {name = "Prison", pos = Vector3.new(-1135.0464, 254.7160, -3330.9954)},
    {name = "Ice Box", pos = Vector3.new(-215.1407, 283.5154, -1258.691)},
    {name = "Hospital", pos = Vector3.new(-1589.504150390625, 254.27223205566406, 17.6555233001709)},
    {name = "MarGreens", pos = Vector3.new(-381.20751953125, 254.45382690429688, -385.66546630859375)},
    {name = "Feds Room", pos = Vector3.new(-1441.7904052734375, 255.03651428222656, -3132.597412109375)},
    {name = "Studio Robbery", pos = Vector3.new(93427.515625, 14484.9052734375, 566.6701049804688)},
    {name = "Studio Production", pos = Vector3.new(-1541.264282, 280.952393, -1023.484375)}
}

local locations = {}
local locationOptions = {"None"}
for _, entry in ipairs(PlaceTeleports) do
    locations[entry.name] = entry.pos
    table.insert(locationOptions, entry.name)
end

local function teleportToLocation(locVec, locName)
    if teleportTo(locVec) then
        Notify("LuhJayFamily", "Teleported to " .. tostring(locName), 2)
    else
        Notify("LuhJayFamily", "Teleport failed", 2)
    end
end

teleportSection:Dropdown({
    Name = "Teleport to Location",
    Items = locationOptions,
    Default = "None",
    Flag = "TeleportLocation",
    Callback = function(option)
        if option and option ~= "None" and locations[option] then
            teleportToLocation(locations[option], option)
        end
    end
})

local selectedPlayer = nil

local function getPlayerByName(name)
    for _, plr in ipairs(game:GetService("Players"):GetPlayers()) do
        if plr.Name == name then
            return plr
        end
    end
    return nil
end

local function updatePlayerList()
    local list = {"None"}
    for _, plr in ipairs(game:GetService("Players"):GetPlayers()) do
        if plr ~= movementPlayer then
            table.insert(list, plr.Name)
        end
    end
    table.sort(list, function(a, b)
        if a == "None" then return true end
        if b == "None" then return false end
        return a:lower() < b:lower()
    end)
    return list
end

local function teleportToPlayer(target)
    if not target or not target.Character or not target.Character:FindFirstChild("HumanoidRootPart") then
        Notify("LuhJayFamily", "Selected player is not available", 2)
        return
    end

    if not teleportTo(target.Character.HumanoidRootPart.CFrame) then
        Notify("LuhJayFamily", "Teleport failed", 2)
        return
    end

    Notify("LuhJayFamily", "Teleported to " .. target.Name, 2)
end

local spectateEnabled = false
local spectateHotkey = Enum.KeyCode.T
local lastCameraSubject = nil
local spectateToggle
local syncingSpectateToggle = false
local stopSpectate
local startSpectate
local setSpectateState

local playerDropdown = teleportSection:Dropdown({
    Name = "Select Player",
    Items = updatePlayerList(),
    Default = "None",
    Flag = "SelectedPlayer",
    Callback = function(option)
        if option == "None" then
            selectedPlayer = nil
            if spectateEnabled then
                stopSpectate()
            end
        else
            selectedPlayer = getPlayerByName(option)
            if spectateEnabled then
                startSpectate()
            end
        end
    end
})

game:GetService("Players").PlayerAdded:Connect(function()
    playerDropdown:Refresh(updatePlayerList())
end)

game:GetService("Players").PlayerRemoving:Connect(function(removed)
    if selectedPlayer == removed then
        selectedPlayer = nil
        playerDropdown:Set("None")
        if spectateEnabled then
            stopSpectate()
        end
    end
    playerDropdown:Refresh(updatePlayerList())
end)

teleportSection:Button({
    Name = "TP To Player",
    Callback = function()
        teleportToPlayer(selectedPlayer)
    end
})

stopSpectate = function()
    spectateEnabled = false
    local myCharacter = movementPlayer.Character
    local myHumanoid = myCharacter and myCharacter:FindFirstChildOfClass("Humanoid")
    if workspace.CurrentCamera and myHumanoid then
        workspace.CurrentCamera.CameraSubject = myHumanoid
    elseif workspace.CurrentCamera and lastCameraSubject then
        workspace.CurrentCamera.CameraSubject = lastCameraSubject
    end
end

startSpectate = function()
    if not selectedPlayer or not selectedPlayer.Character then
        Notify("LuhJayFamily", "Select a player first", 2)
        return false
    end
    local targetHumanoid = selectedPlayer.Character:FindFirstChildOfClass("Humanoid")
    if not targetHumanoid or not workspace.CurrentCamera then
        Notify("LuhJayFamily", "Target not available", 2)
        return false
    end
    lastCameraSubject = workspace.CurrentCamera.CameraSubject
    workspace.CurrentCamera.CameraSubject = targetHumanoid
    spectateEnabled = true
    Notify("LuhJayFamily", "Now spectating " .. selectedPlayer.Name, 2)
    return true
end

setSpectateState = function(state, fromToggle)
    if state then
        if not startSpectate() then
            state = false
            stopSpectate()
        end
    else
        stopSpectate()
    end

    if spectateToggle and not fromToggle then
        syncingSpectateToggle = true
        spectateToggle:Set(state)
        syncingSpectateToggle = false
    end
end

spectateToggle = teleportSection:Toggle({
    Name = "Spectate Player (T)",
    Flag = "SpectatePlayerToggle",
    Default = false,
    Callback = function(state)
        if syncingSpectateToggle then
            return
        end
        setSpectateState(state, true)
    end
})

UserInputService.InputBegan:Connect(function(input, gameProcessed)
    if gameProcessed then
        return
    end
    if input.KeyCode == spectateHotkey then
        setSpectateState(not spectateEnabled, false)
    end
end)

movementPlayer.CharacterAdded:Connect(function()
    task.wait(1)
    if spectateEnabled then
        setSpectateState(false, false)
    end
end)

getgenv().WalkSpeedValue = tonumber(getgenv().WalkSpeedValue) or 10
getgenv().SwimMethod = (getgenv().SwimMethod == true)

local enhancedWalk = false
local walkSpeedValue = getgenv().WalkSpeedValue
local walkBoostMultiplier = 1
local walkStartSpeed = 20
local usingWalkStartSpeed = false

local walkCharacter
local walkHumanoid
local walkHumanoidRootPart
local walkBodyGyro
local walkMovementConnection
local walkAnimationTrack

local walkAnimation = Instance.new("Animation")
walkAnimation.AnimationId = "rbxassetid://78828590676720"

task.spawn(function()
    while task.wait() do
        if enhancedWalk and walkHumanoid then
            if not getgenv().SwimMethod then
                getgenv().SwimMethod = true
            end
            walkHumanoid:ChangeState(Enum.HumanoidStateType.FallingDown)
        end
    end
end)

local function updateWalkCharacterRefs()
    walkCharacter = movementPlayer.Character or movementPlayer.CharacterAdded:Wait()
    walkHumanoidRootPart = walkCharacter:WaitForChild("HumanoidRootPart")
    walkHumanoid = walkCharacter:WaitForChild("Humanoid")
end

local function cleanupWalkMovement()
    if walkMovementConnection then
        walkMovementConnection:Disconnect()
        walkMovementConnection = nil
    end
    if walkBodyGyro then
        walkBodyGyro:Destroy()
        walkBodyGyro = nil
    end
    if walkAnimationTrack then
        walkAnimationTrack:Stop()
        walkAnimationTrack = nil
    end
end

local function setupWalkMovement()
    if not walkHumanoidRootPart then
        return
    end

    walkBodyGyro = Instance.new("BodyGyro")
    walkBodyGyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
    walkBodyGyro.P = 50000
    walkBodyGyro.D = 1000
    walkBodyGyro.Parent = walkHumanoidRootPart

    walkMovementConnection = RunService.RenderStepped:Connect(function()
        if not enhancedWalk then
            return
        end

        local camera = workspace.CurrentCamera
        if not camera then
            return
        end

        local dir = Vector3.zero
        local usingKeys = false

        if UserInputService:IsKeyDown(Enum.KeyCode.W) then
            dir += Vector3.new(camera.CFrame.LookVector.X, 0, camera.CFrame.LookVector.Z)
            usingKeys = true
        end
        if UserInputService:IsKeyDown(Enum.KeyCode.S) then
            dir -= Vector3.new(camera.CFrame.LookVector.X, 0, camera.CFrame.LookVector.Z)
            usingKeys = true
        end
        if UserInputService:IsKeyDown(Enum.KeyCode.A) then
            dir -= camera.CFrame.RightVector
            usingKeys = true
        end
        if UserInputService:IsKeyDown(Enum.KeyCode.D) then
            dir += camera.CFrame.RightVector
            usingKeys = true
        end

        if not usingKeys then
            local md = walkHumanoid.MoveDirection
            dir = Vector3.new(md.X, 0, md.Z)
        end

        local moveSpeed = usingWalkStartSpeed and walkStartSpeed or walkSpeedValue
        if UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) then
            moveSpeed = moveSpeed * walkBoostMultiplier
        end

        if dir.Magnitude > 0 then
            dir = dir.Unit * moveSpeed
        end

        local groundedY = math.clamp(walkHumanoidRootPart.AssemblyLinearVelocity.Y, -100, -2)
        walkHumanoidRootPart.AssemblyLinearVelocity = Vector3.new(dir.X, groundedY, dir.Z)

        if dir.Magnitude > 0 then
            walkBodyGyro.CFrame = CFrame.new(
                walkHumanoidRootPart.Position,
                walkHumanoidRootPart.Position + Vector3.new(dir.X, 0, dir.Z)
            )
        end

        walkHumanoidRootPart.RotVelocity = Vector3.zero
        walkHumanoidRootPart.AssemblyAngularVelocity = Vector3.zero

        if walkAnimationTrack then
            if dir.Magnitude > 0 then
                if not walkAnimationTrack.IsPlaying then
                    walkAnimationTrack:Play()
                end
            elseif walkAnimationTrack.IsPlaying then
                walkAnimationTrack:Stop()
            end
        end
    end)
end

local function startEnhancedWalk()
    if enhancedWalk then
        return
    end

    enhancedWalk = true
    updateWalkCharacterRefs()
    cleanupWalkMovement()

    walkHumanoidRootPart.AssemblyLinearVelocity = Vector3.zero
    getgenv().SwimMethod = true
    usingWalkStartSpeed = true

    local animator = walkHumanoid:FindFirstChildWhichIsA("Animator") or Instance.new("Animator", walkHumanoid)
    walkAnimationTrack = animator:LoadAnimation(walkAnimation)
    walkAnimationTrack.Looped = true

    task.delay(1, function()
        usingWalkStartSpeed = false
    end)

    task.delay(0, function()
        if enhancedWalk then
            setupWalkMovement()
        end
    end)
end

local function stopEnhancedWalk()
    enhancedWalk = false
    cleanupWalkMovement()
    getgenv().SwimMethod = false
    usingWalkStartSpeed = false
end

movementPlayer.CharacterAdded:Connect(function()
    if enhancedWalk then
        task.wait(1)
        enhancedWalk = false
        startEnhancedWalk()
    end
end)

movementSection:Toggle({
    Name = "Enable WalkSpeed",
    Flag = "EnhancedWalk",
    Default = false,
    Callback = function(value)
        if value then
            startEnhancedWalk()
        else
            stopEnhancedWalk()
        end
    end
})

movementSection:Slider({
    Name = "Amount",
    Min = 0,
    Max = 400,
    Default = walkSpeedValue,
    Decimals = 1,
    Flag = "WalkSpeedValue",
    Callback = function(value)
        walkSpeedValue = value
        getgenv().WalkSpeedValue = value
    end
})

getgenv().PlayerFlySpeed = 50

local flyEnabled = false
local flyConnections = {}
local flyVelocity = nil
local flyGyro = nil
local flySeat = nil
local lastPosition = nil
local flySpeedSetting = getgenv().PlayerFlySpeed
local flyRuntimeSpeed = flySpeedSetting

local function cleanupFly()
    for _, conn in ipairs(flyConnections) do
        if conn and conn.Disconnect then
            conn:Disconnect()
        end
    end
    flyConnections = {}

    if flyVelocity and flyVelocity.Parent then
        flyVelocity:Destroy()
    end
    flyVelocity = nil

    if flyGyro and flyGyro.Parent then
        flyGyro:Destroy()
    end
    flyGyro = nil

    if flySeat and flySeat.Parent then
        flySeat:Destroy()
    end
    flySeat = nil

    getgenv().SwimMethod = false

    local player = game.Players.LocalPlayer
    local char = player.Character
    if char then
        local humanoid = char:FindFirstChildWhichIsA("Humanoid")
        local hrp = char:FindFirstChild("HumanoidRootPart")

        if humanoid and hrp then
            humanoid:ChangeState(0)
            repeat task.wait(0.0001) until not player:GetAttribute("LastACPos")
            task.wait(0.1)
            humanoid:ChangeState(2)
            humanoid.PlatformStand = false
            humanoid.Jump = false
            hrp.AssemblyLinearVelocity = Vector3.zero
            hrp.AssemblyAngularVelocity = Vector3.zero
        end
    end
end

local function setupFly()
    cleanupFly()

    local player = game.Players.LocalPlayer
    local char = player.Character
    if not char then return end

    local humanoid = char:FindFirstChildWhichIsA("Humanoid")
    local hrp = char:FindFirstChild("HumanoidRootPart")
    if not humanoid or not hrp then return end

    lastPosition = hrp.CFrame
    getgenv().SwimMethod = true

    local seat = Instance.new("VehicleSeat")
    seat.Name = "FlySeat"
    seat.Anchored = false
    seat.CanCollide = false
    seat.Transparency = 1
    seat.TopSurface = Enum.SurfaceType.Smooth
    seat.BottomSurface = Enum.SurfaceType.Smooth
    seat.Parent = workspace
    seat.CFrame = hrp.CFrame * CFrame.new(0, -3, 0)

    local weld = Instance.new("Weld")
    weld.Part0 = seat
    weld.Part1 = hrp
    weld.C0 = CFrame.new(0, 3, 0)
    weld.Parent = seat

    seat:Sit(humanoid)

    flyVelocity = Instance.new("BodyVelocity")
    flyVelocity.MaxForce = Vector3.new(1e9, 1e9, 1e9)
    flyVelocity.Velocity = Vector3.zero
    flyVelocity.Parent = hrp

    flyGyro = Instance.new("BodyGyro")
    flyGyro.MaxTorque = Vector3.new(1e9, 1e9, 1e9)
    flyGyro.P = 50000
    flyGyro.D = 1000
    flyGyro.CFrame = hrp.CFrame
    flyGyro.Parent = hrp

    flySeat = seat

    flyRuntimeSpeed = flySpeedSetting
    local minSpeed = 20
    local maxSpeed = 500
    local move = {W=false,A=false,S=false,D=false,Space=false,Shift=false}

    local inputBegan = game:GetService("UserInputService").InputBegan:Connect(function(i, g)
        if g then return end
        if i.KeyCode == Enum.KeyCode.W then move.W = true end
        if i.KeyCode == Enum.KeyCode.A then move.A = true end
        if i.KeyCode == Enum.KeyCode.S then move.S = true end
        if i.KeyCode == Enum.KeyCode.D then move.D = true end
        if i.KeyCode == Enum.KeyCode.Space then move.Space = true end
        if i.KeyCode == Enum.KeyCode.LeftShift then move.Shift = true end
        if i.KeyCode == Enum.KeyCode.E then flyRuntimeSpeed = math.clamp(flyRuntimeSpeed + 10, minSpeed, maxSpeed) end
        if i.KeyCode == Enum.KeyCode.Q then flyRuntimeSpeed = math.clamp(flyRuntimeSpeed - 10, minSpeed, maxSpeed) end
    end)
    table.insert(flyConnections, inputBegan)

    local inputEnded = game:GetService("UserInputService").InputEnded:Connect(function(i)
        if i.KeyCode == Enum.KeyCode.W then move.W = false end
        if i.KeyCode == Enum.KeyCode.A then move.A = false end
        if i.KeyCode == Enum.KeyCode.S then move.S = false end
        if i.KeyCode == Enum.KeyCode.D then move.D = false end
        if i.KeyCode == Enum.KeyCode.Space then move.Space = false end
        if i.KeyCode == Enum.KeyCode.LeftShift then move.Shift = false end
    end)
    table.insert(flyConnections, inputEnded)

    local renderStepped = game:GetService("RunService").RenderStepped:Connect(function()
        if not flyEnabled or not flyVelocity or not flyGyro then return end

        if not getgenv().SwimMethod then
            getgenv().SwimMethod = true
        end

        local cam = workspace.CurrentCamera
        if not cam then return end

        flyGyro.CFrame = cam.CFrame

        local dir = Vector3.zero
        if move.W then dir += cam.CFrame.LookVector end
        if move.S then dir -= cam.CFrame.LookVector end
        if move.A then dir -= cam.CFrame.RightVector end
        if move.D then dir += cam.CFrame.RightVector end
        if move.Space then dir += Vector3.new(0,1,0) end
        if move.Shift then dir -= Vector3.new(0,1,0) end

        if dir.Magnitude > 0 then
            flyVelocity.Velocity = dir.Unit * flyRuntimeSpeed
        else
            flyVelocity.Velocity = Vector3.zero
        end
    end)
    table.insert(flyConnections, renderStepped)
end

local function stopFlying()
    cleanupFly()
    if not flyEnabled then
        Notify("LuhJayFamily", "Flight disabled!", 3)
    end
end

movementPlayer.CharacterAdded:Connect(function()
    if flyEnabled then
        task.wait(1)
        setupFly()
    end
end)

movementSection:Toggle({
    Name = "Fly",
    Flag = "FlyToggle",
    Default = false,
    Callback = function(Value)
        flyEnabled = Value
        if Value then
            setupFly()
            Notify("LuhJayFamily", "Fly enabled! WASD move, Space/Shift up/down, Q/E speed", 3)
        else
            stopFlying()
        end
    end
})

movementSection:Slider({
    Name = "Fly Speed",
    Min = 1,
    Max = 500,
    Default = getgenv().PlayerFlySpeed,
    Decimals = 1,
    Flag = "FlySpeed",
    Callback = function(Value)
        flySpeedSetting = Value
        flyRuntimeSpeed = Value
        getgenv().PlayerFlySpeed = Value
    end
})

local dupeCooldown = false

local function MarketDupe(toolName)
    if not toolName then
        return
    end

    local replicatedStorage = game:GetService("ReplicatedStorage")
    local localPlayer = game:GetService("Players").LocalPlayer
    local toolId = nil
    local marketconnection = replicatedStorage.MarketItems.ChildAdded:Connect(function(item)
        if item.Name == toolName then
            local owner = item:WaitForChild("owner", 2)
            if owner and owner.Value == localPlayer.Name then
                toolId = item:GetAttribute("SpecialId")
            end
        end
    end)

    task.spawn(function()
        replicatedStorage.ListWeaponRemote:FireServer(toolName, 999999)
    end)

    task.wait(0.25)

    task.spawn(function()
        pcall(function()
            replicatedStorage.BackpackRemote:InvokeServer("Store", toolName)
        end)
    end)

    task.wait(2.8)

    if toolId then
        task.spawn(function()
            replicatedStorage.BuyItemRemote:FireServer(toolName, "Remove", toolId)
        end)
    end

    task.wait(0.1)

    task.spawn(function()
        pcall(function()
            replicatedStorage.BackpackRemote:InvokeServer("Grab", toolName)
        end)
    end)

    task.wait(0.5)
    marketconnection:Disconnect()
end

combatSection:Button({
    Name = "Market Dupe",
    Callback = function()
        if dupeCooldown then
            Notify("Market Dupe", "Please wait!", 3)
            return
        end

        dupeCooldown = true

        local localPlayer = game:GetService("Players").LocalPlayer
        local character = localPlayer.Character or localPlayer.CharacterAdded:Wait()
        local tool = character:FindFirstChildOfClass("Tool")
        if not tool then
            Notify("Market Dupe", "Could not find a tool! you must hold one.", 3)
            dupeCooldown = false
            return
        end

        local toolName = tool.Name
        Notify("Market Dupe", "Starting Market Dupe for: " .. toolName, 2)

        local humanoid = character:FindFirstChildOfClass("Humanoid")
        if humanoid then
            humanoid:UnequipTools()
        end
        task.wait(0.1)

        Notify("Market Dupe", "Running dupe for " .. toolName, 2)
        task.spawn(function()
            MarketDupe(toolName)
            task.wait(4)
            Notify("Market Dupe", "Market Dupe completed!", 3)
            dupeCooldown = false
        end)
    end
})

local storeDuppedToolLoopEnabled = false
local storeDuppedToolLoopRunning = false

combatSection:Toggle({
    Name = "Store Dupped Tool In Backpack",
    Flag = "StoreDuppedToolLoop",
    Default = false,
    Callback = function(Value)
        storeDuppedToolLoopEnabled = Value

        if not Value then
            Notify("LuhJayFamily", "Auto store loop disabled", 3)
            return
        end

        Notify("LuhJayFamily", "Auto store loop enabled", 3)

        if storeDuppedToolLoopRunning then
            return
        end

        storeDuppedToolLoopRunning = true

        task.spawn(function()
            while storeDuppedToolLoopEnabled do
                local localPlayer = game:GetService("Players").LocalPlayer
                local replicatedStorage = game:GetService("ReplicatedStorage")

                local character = localPlayer.Character
                local equippedTool = character and character:FindFirstChildOfClass("Tool")
                local backpackTool = localPlayer:FindFirstChild("Backpack") and localPlayer.Backpack:FindFirstChildOfClass("Tool")
                local tool = equippedTool or backpackTool

                if tool then
                    pcall(function()
                        replicatedStorage.BackpackRemote:InvokeServer("Grab", tool.Name)
                    end)
                end

                task.wait(0.6)
            end

            storeDuppedToolLoopRunning = false
        end)
    end
})

moneyDupeSection:Button({
    Name = "Cookin House",
    Callback = function()
        local cookingPos = Vector3.new(-1605.9183349609375, 254.04150390625, -488.43804931640625)
        local localPlayer = game:GetService("Players").LocalPlayer
        local character = localPlayer and localPlayer.Character

        if character and character:FindFirstChild("HumanoidRootPart") then
            enableMoneyDupeSwimMethod()
            character.HumanoidRootPart.CFrame = CFrame.new(cookingPos)
            disableMoneyDupeSwimMethod()
        end
    end
})

moneyDupeSection:Button({
    Name = "Buy All Items",
    Callback = function()
        local items = {"FijiWater", "FreshWater", "Ice-Fruit Cupz", "Ice-Fruit Bag"}

        for _, item in ipairs(items) do
            game:GetService("ReplicatedStorage").ExoticShopRemote:InvokeServer(item)
            task.wait(0.1)
        end

        Notify("LuhJayFamily", "All items purchased successfully", 3)
    end
})

moneyDupeSection:Button({
    Name = "Money Dupe",
    Callback = function()
        local runService = game:GetService("RunService")
        local currentPlayer = game:GetService("Players").LocalPlayer
        local camera = workspace.CurrentCamera
        local character = currentPlayer and currentPlayer.Character
        local humanoidRootPart = character and character:FindFirstChild("HumanoidRootPart")

        if not character or not humanoidRootPart then
            Notify("LuhJayFamily", "Character not ready", 3)
            return
        end

        local originalCameraType = camera.CameraType
        local originalFieldOfView = camera.FieldOfView
        local originalCameraShake = camera:FindFirstChild("CameraShake")
        local cameraShakeBackup = originalCameraShake and originalCameraShake.Value or nil
        local originalCFrame = humanoidRootPart.CFrame

        local function getCharacter()
            return currentPlayer.Character
        end

        local function swimBypassTeleport(destinationCFrame)
            local currentCharacter = getCharacter()
            if not currentCharacter or not currentCharacter:FindFirstChild("HumanoidRootPart") then
                return
            end

            local rootPart = currentCharacter.HumanoidRootPart
            enableMoneyDupeSwimMethod()
            task.wait(0.25)
            rootPart.CFrame = destinationCFrame + Vector3.new(2, 0, 0)

            task.delay(0.25, function()
                disableMoneyDupeSwimMethod()
            end)
        end

        local tool = currentPlayer.Backpack:FindFirstChild("Ice-Fruit Cupz")
        local humanoid = character:FindFirstChildWhichIsA("Humanoid")
        if tool and humanoid then
            humanoid:EquipTool(tool)
        else
            Notify("LuhJayFamily", "Tool 'Ice-Fruit Cupz' not found in backpack", 3)
            return
        end

        local blackScreen = Instance.new("ScreenGui")
        blackScreen.Name = "BronxWaveMoneyDupe"
        blackScreen.IgnoreGuiInset = true
        blackScreen.Parent = game:GetService("CoreGui")

        local frame = Instance.new("Frame")
        frame.BackgroundTransparency = 0
        frame.BackgroundColor3 = Color3.new(0, 0, 0)
        frame.Size = UDim2.new(1, 0, 1, 0)
        frame.Position = UDim2.new(0, 0, 0, 0)
        frame.BorderSizePixel = 0
        frame.Visible = true
        frame.Parent = blackScreen

        local textLabel = Instance.new("TextLabel")
        textLabel.Size = UDim2.new(1, 0, 1, 0)
        textLabel.Position = UDim2.new(0, 0, 0, 0)
        textLabel.BackgroundTransparency = 1
        textLabel.Text = "Generating Dirty Money"
        textLabel.TextScaled = false
        textLabel.TextSize = 36
        textLabel.TextColor3 = Color3.new(1, 1, 1)
        textLabel.TextStrokeTransparency = 1
        textLabel.TextWrapped = true
        textLabel.TextXAlignment = Enum.TextXAlignment.Center
        textLabel.TextYAlignment = Enum.TextYAlignment.Center
        textLabel.Parent = frame

        task.wait(0.5)

        local targetCFrame = CFrame.new(-69.82200622558594, 287.0635986328125, -319.79437255859375)
        swimBypassTeleport(targetCFrame)

        task.wait(0.5)

        local cameraOffset = Vector3.new(0, 5, 5)
        local angleOffset = Vector3.new(0, -1, 0)
        camera.CameraType = Enum.CameraType.Scriptable

        getgenv().cameraFollowConnection = runService.Heartbeat:Connect(function()
            local currentCharacter = getCharacter()
            local rootPart = currentCharacter and currentCharacter:FindFirstChild("HumanoidRootPart")

            if rootPart then
                local characterPos = rootPart.Position
                camera.CFrame = CFrame.new(characterPos + cameraOffset + angleOffset, characterPos + Vector3.new(0, 3, 0))
            end
        end)

        getgenv().instantPrompts = true

        local iceFruitSellPromptPart = workspace:FindFirstChild("IceFruit Sell")
        local iceFruitSellPrompt = iceFruitSellPromptPart and iceFruitSellPromptPart:FindFirstChildOfClass("ProximityPrompt")
        if not iceFruitSellPrompt then
            if getgenv().cameraFollowConnection then
                getgenv().cameraFollowConnection:Disconnect()
                getgenv().cameraFollowConnection = nil
            end

            camera.CameraType = originalCameraType
            camera.FieldOfView = originalFieldOfView
            blackScreen:Destroy()
            Notify("LuhJayFamily", "IceFruit Sell prompt not found", 3)
            return
        end

        iceFruitSellPrompt.HoldDuration = 0
        iceFruitSellPrompt.MaxActivationDistance = 6

        getgenv().updateConnection = runService.Heartbeat:Connect(function()
            if getgenv().instantPrompts and iceFruitSellPrompt.Enabled then
                for _ = 1, 79 do
                    iceFruitSellPrompt:InputHoldBegin()
                    iceFruitSellPrompt:InputHoldEnd()
                end
            end
        end)

        task.spawn(function()
            task.wait(1)
            getgenv().instantPrompts = false

            if getgenv().updateConnection then
                getgenv().updateConnection:Disconnect()
                getgenv().updateConnection = nil
            end

            iceFruitSellPrompt.HoldDuration = 1
            iceFruitSellPrompt.MaxActivationDistance = 4

            enableMoneyDupeSwimMethod()
            task.wait(0.5)
            swimBypassTeleport(originalCFrame)
            task.wait(0.5)
            disableMoneyDupeSwimMethod()

            if getgenv().cameraFollowConnection then
                getgenv().cameraFollowConnection:Disconnect()
                getgenv().cameraFollowConnection = nil
            end

            camera.CameraType = originalCameraType
            camera.FieldOfView = originalFieldOfView

            if originalCameraShake then
                originalCameraShake.Value = cameraShakeBackup
            end

            blackScreen:Destroy()
            Notify("LuhJayFamily", "You now have max money", 2)
        end)
    end
})

local PlayersSection = MainPage:Section({Name = "Player Mods", Icon = "136879043989014", Side = 1})

local player = game:GetService("Players").LocalPlayer
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local UtilitiesTab = {}
local WindUI = {
    Notify = function(_, data)
        pcall(function()
            game:GetService("StarterGui"):SetCore("SendNotification", {
                Title = "LuhJayFamily",
                Text = data.Content or data.Description or "",
                Duration = data.Duration or 3
            })
        end)
    end
}

function UtilitiesTab:Toggle(data)
    return PlayersSection:Toggle({
        Name = data.Title,
        Flag = (data.Flag or data.Title):gsub("%s+", "") .. "Flag",
        Default = data.Value == true,
        Callback = data.Callback
    })
end

function UtilitiesTab:Button(data)
    return PlayersSection:Button({
        Name = data.Title,
        Callback = data.Callback
    })
end

local staminaEnabled = false
local hungerEnabled = false
local sleepEnabled = false
local AntiRentPayEnabled = false
local AntiLoseEnabled = false
local Noclipping = nil
local isNoclipInitialized = false
_G = _G or {}
_G.respawn = false
local lastDeathPosition = nil
local instantPromptConnection = nil

local function applyEffectsToCharacter(character)
    if staminaEnabled and player:FindFirstChild("PlayerGui") then
        local staminaScript = player.PlayerGui:FindFirstChild("Run", true)
        if staminaScript then
            local scriptObj = staminaScript:FindFirstChild("StaminaBarScript", true)
            if scriptObj then
                scriptObj:Destroy()
            end
        end
    end

    if hungerEnabled and player:FindFirstChild("PlayerGui") then
        local hungerScript = player.PlayerGui:FindFirstChild("Hunger", true)
        if hungerScript then
            local scriptObj = hungerScript:FindFirstChild("HungerBarScript", true)
            if scriptObj then
                scriptObj:Destroy()
            end
        end
    end

    if sleepEnabled then
        local success, s = pcall(function()
            return player.PlayerGui.SleepGui.Frame.sleep.SleepBar.sleepScript
        end)

        if success and s then
            s.Disabled = true
            s.Disabled = false
            s.Disabled = true
        end
    end
end

player.CharacterAdded:Connect(function(character)
    character:WaitForChild("HumanoidRootPart", 5)
    applyEffectsToCharacter(character)
end)

local function setCollide(state)
    local char = player.Character
    if char then
        for _, p in pairs(char:GetDescendants()) do
            if p:IsA("BasePart") then
                p.CanCollide = state
            end
        end
    end
end

UtilitiesTab:Toggle({
    Title = "Anti Fall Damage",
    Desc = "Prevents fall damage",
    Icon = "",
    Type = "Checkbox",
    Value = false,
    Callback = function(Value)
        if Value then
            WindUI:Notify({
                Title = "LuhJayFamily",
                Content = "Anti Fall Damage enabled",
                Duration = 3,
                Icon = "",
            })
        end

        local character = player.Character or player.CharacterAdded:Wait()
        local fallDamage = character:FindFirstChild("FallDamageRagdoll")
        if fallDamage and Value then
            fallDamage:Destroy()
        end
    end
})

UtilitiesTab:Toggle({
    Title = "Infinite Stamina",
    Desc = "Never run out of stamina",
    Icon = "",
    Type = "Checkbox",
    Value = false,
    Callback = function(Value)
        staminaEnabled = Value
        if Value then
            WindUI:Notify({
                Title = "LuhJayFamily",
                Content = "Infinite Stamina enabled",
                Duration = 3,
                Icon = "",
            })
            applyEffectsToCharacter(player.Character or player.CharacterAdded:Wait())
        end
    end
})

UtilitiesTab:Toggle({
    Title = "Infinite Hunger",
    Desc = "Never get hungry",
    Icon = "",
    Type = "Checkbox",
    Value = false,
    Callback = function(Value)
        hungerEnabled = Value
        if Value then
            WindUI:Notify({
                Title = "LuhJayFamily",
                Content = "Infinite Hunger enabled",
                Duration = 3,
                Icon = "",
            })
            applyEffectsToCharacter(player.Character or player.CharacterAdded:Wait())
        end
    end
})

UtilitiesTab:Toggle({
    Title = "Infinite Sleep",
    Desc = "Never need to sleep",
    Icon = "",
    Type = "Checkbox",
    Value = false,
    Callback = function(Value)
        sleepEnabled = Value
        if Value then
            WindUI:Notify({
                Title = "LuhJayFamily",
                Content = "Infinite Sleep enabled",
                Duration = 3,
                Icon = "",
            })
            applyEffectsToCharacter(player.Character or player.CharacterAdded:Wait())
        end
    end
})

UtilitiesTab:Toggle({
    Title = "Anti Lose Items",
    Desc = "Prevent losing items on death",
    Icon = "",
    Type = "Checkbox",
    Value = false,
    Callback = function(Value)
        AntiLoseEnabled = Value
        if Value then
            WindUI:Notify({
                Title = "LuhJayFamily",
                Content = "Anti Lose enabled",
                Duration = 3,
                Icon = "",
            })
        end
    end
})

UtilitiesTab:Toggle({
    Title = "No Rent Pay",
    Desc = "Disable rent payments",
    Icon = "",
    Type = "Checkbox",
    Value = false,
    Callback = function(Value)
        AntiRentPayEnabled = Value
        if Value then
            WindUI:Notify({
                Title = "LuhJayFamily",
                Content = "No Rent Pay enabled",
                Duration = 3,
                Icon = "",
            })
            task.spawn(function()
                while AntiRentPayEnabled do
                    task.wait(1)
                    local rentGui = player.PlayerGui:FindFirstChild("RentGui")
                    if rentGui then
                        local rentScript = rentGui:FindFirstChild("LocalScript")
                        if rentScript then
                            rentScript.Disabled = true
                            rentScript:Destroy()
                        end
                    end
                end
            end)
        end
    end
})

UtilitiesTab:Toggle({
    Title = "Anti-Knockback",
    Desc = "Prevents knockback effects",
    Icon = "",
    Type = "Checkbox",
    Value = false,
    Callback = function(Value)
        if Value then
            WindUI:Notify({
                Title = "LuhJayFamily",
                Content = "Anti-Knockback enabled",
                Duration = 3,
                Icon = "",
            })
            local character = player.Character or player.CharacterAdded:Wait()
            for _, v in ipairs(character:GetDescendants()) do
                if v:IsA("BodyVelocity") or v:IsA("LinearVelocity") or v:IsA("VectorForce") then
                    v:Destroy()
                end
            end
            local ae = ReplicatedStorage:FindFirstChild("AE")
            if ae then
                ae:Destroy()
            end
            local root = character:WaitForChild("HumanoidRootPart")
            root.ChildAdded:Connect(function(v)
                if v:IsA("BodyVelocity") or v:IsA("LinearVelocity") or v:IsA("VectorForce") then
                    v:Destroy()
                end
            end)
        end
    end
})

UtilitiesTab:Toggle({
    Title = "Noclip",
    Desc = "Walk through walls",
    Icon = "",
    Type = "Checkbox",
    Value = false,
    Callback = function(Value)
        if not isNoclipInitialized then
            isNoclipInitialized = true
            return
        end

        local character = player.Character or player.CharacterAdded:Wait()
        local humanoid = character:FindFirstChildWhichIsA("Humanoid")
        local root = character:FindFirstChild("HumanoidRootPart")

        if Value then
            WindUI:Notify({
                Title = "LuhJayFamily",
                Content = "Noclip enabled",
                Duration = 3,
                Icon = "",
            })
            Noclipping = game:GetService("RunService").Stepped:Connect(function()
                setCollide(false)
            end)
        else
            if Noclipping then
                Noclipping:Disconnect()
                Noclipping = nil
            end
            setCollide(true)
            if root then
                local cf = root.CFrame
                root.CFrame = cf + Vector3.new(0, 0.1, 0)
                task.wait()
                root.CFrame = cf
            end
            if humanoid then
                humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
            end
            WindUI:Notify({
                Title = "LuhJayFamily",
                Content = "Noclip disabled",
                Duration = 3,
                Icon = "",
            })
        end
    end
})

UtilitiesTab:Toggle({
    Title = "Anti-CameraShake",
    Desc = "Disables camera shake",
    Icon = "",
    Type = "Checkbox",
    Value = false,
    Callback = function(Value)
        if Value then
            WindUI:Notify({
                Title = "LuhJayFamily",
                Content = "Camera shake disabled",
                Duration = 3,
                Icon = "",
            })
            local character = player.Character or player.CharacterAdded:Wait()
            local camBobbing = character:FindFirstChild("CameraBobbing")
            if camBobbing then
                camBobbing:Destroy()
            end
            character.ChildAdded:Connect(function(v)
                if v.Name == "CameraBobbing" then
                    v:Destroy()
                end
            end)
        end
    end
})

UtilitiesTab:Toggle({
    Title = "Instant Prompts",
    Desc = "Makes all prompts instant",
    Icon = "",
    Type = "Checkbox",
    Value = false,
    Callback = function(Value)
        getgenv().instantPrompts = Value

        local function modifyPrompts()
            for _, v in ipairs(workspace:GetDescendants()) do
                if v:IsA("ProximityPrompt") then
                    v.HoldDuration = 0
                    v.MaxActivationDistance = 6
                end
            end
        end

        local function resetPrompts()
            for _, v in ipairs(workspace:GetDescendants()) do
                if v:IsA("ProximityPrompt") then
                    v.HoldDuration = 1
                    v.MaxActivationDistance = 4
                end
            end
        end

        if Value then
            WindUI:Notify({
                Title = "LuhJayFamily",
                Content = "Applying instant interact settings...",
                Duration = 3,
                Icon = "",
            })
            task.wait(2)
            modifyPrompts()
            instantPromptConnection = workspace.DescendantAdded:Connect(function(obj)
                if obj:IsA("ProximityPrompt") then
                    obj.HoldDuration = 0
                    obj.MaxActivationDistance = 6
                end
            end)
        else
            resetPrompts()
            if instantPromptConnection then
                instantPromptConnection:Disconnect()
                instantPromptConnection = nil
            end
        end
    end
})

UtilitiesTab:Button({
    Title = "Respawn Where Died",
    Color = Color3.new(0, 0, 0.3),
    Justify = "Center",
    IconAlign = "Left",
    Icon = "",
    Callback = function()
        WindUI:Notify({
            Title = "LuhJayFamily",
            Content = "You will now respawn where you died.",
            Duration = 3,
            Icon = "",
        })

        local function onCharacterAdded(character)
            local humanoid = character:WaitForChild("Humanoid")

            if lastDeathPosition then
                local root = character:WaitForChild("HumanoidRootPart")
                root.CFrame = CFrame.new(lastDeathPosition + Vector3.new(0, 3, 0))
            end

            humanoid.Died:Connect(function()
                local root = character:FindFirstChild("HumanoidRootPart")
                if root then
                    lastDeathPosition = root.Position
                end
            end)
        end

        if player.Character then
            onCharacterAdded(player.Character)
        end
        player.CharacterAdded:Connect(onCharacterAdded)
    end
})

UtilitiesTab:Button({
    Title = "Enable Faster Respawn",
    Color = Color3.new(0, 0, 0.3),
    Justify = "Center",
    IconAlign = "Left",
    Icon = "",
    Callback = function()
        _G.respawn = true
        WindUI:Notify({
            Title = "LuhJayFamily",
            Content = "Faster respawn has been enabled!",
            Duration = 3,
            Icon = "",
        })
    end
})

UtilitiesTab:Button({
    Title = "NO Close GunShop",
    Color = Color3.new(0, 0, 0.3),
    Justify = "Center",
    IconAlign = "Left",
    Icon = "",
    Callback = function()
        local gunShopClosed = workspace:FindFirstChild("GunShopClosed")
        if gunShopClosed then
            gunShopClosed:Destroy()
        end

        local secondGun = workspace:FindFirstChild("SecondGun4886")
        if secondGun and secondGun:FindFirstChild("ProximityPrompt") then
            secondGun.ProximityPrompt.Enabled = true
        end

        WindUI:Notify({
            Title = "LuhJayFamily",
            Content = "GunShop Is Now Open!",
            Duration = 3,
            Icon = "",
        })
    end
})

Library:Notification("LuhJayFamily", 5, nil)
Library:Notification("LuhJayFamily", 5, "94627324690861")

getgenv().Library = Library
return Library

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: