local M=(loadstring(game:HttpGet("\104\116\116\112\115\058\047\047\103\105\116\104\117\098\046\099\111\109\047\100\097\119\105\100-\115\099\114\105\112\116\115\047\070\108\117\101\110\116\047\114\101\108\101\097\115\101\115\047\108\097\116\101\115\116\047\100\111\119\110\108\111\097\100\047\109\097\105\110\046\108\117\097")))()local B=(loadstring(game:HttpGet("\104\116\116\112\115\058\047\047\114\097\119\046\103\105\116\104\117\098\117\115\101\114\099\111\110\116\101\110\116\046\099\111\109\047\100\097\119\105\100-\115\099\114\105\112\116\115\047\070\108\117\101\110\116\047\109\097\115\116\101\114\047\065\100\100\111\110\115\047\083\097\118\101\077\097\110\097\103\101\114\046\108\117\097")))()local f=(loadstring(game:HttpGet("\104\116\116\112\115\058\047\047\114\097\119\046\103\105\116\104\117\098\117\115\101\114\099\111\110\116\101\110\116\046\099\111\109\047\100\097\119\105\100-\115\099\114\105\112\116\115\047\070\108\117\101\110\116\047\109\097\115\116\101\114\047\065\100\100\111\110\115\047\073\110\116\101\114\102\097\099\101\077\097\110\097\103\101\114\046\108\117\097")))()local e=M:CreateWindow({Title="\070\108\117\101\110\116 "..M.Version;SubTitle="\098\121 \100\097\119\105\100";TabWidth=160;Size=UDim2.fromOffset(580,460),Acrylic=true,Theme="\068\097\114\107";MinimizeKey=Enum.KeyCode.LeftControl})local D={Main=e:AddTab({Title="\077\097\105\110";Icon=""});Settings=e:AddTab({Title="\083\101\116\116\105\110\103\115",Icon="\115\101\116\116\105\110\103\115"})}local A=M.Options do M:Notify({Title="\078\111\116\105\102\105\099\097\116\105\111\110";Content="\084\104\105\115 \105\115 \097 \110\111\116\105\102\105\099\097\116\105\111\110";SubContent="\083\117\098\067\111\110\116\101\110\116";Duration=5})D.Main:AddParagraph({Title="\080\097\114\097\103\114\097\112\104";Content="\084\104\105\115 \105\115 \097 \112\097\114\097\103\114\097\112\104\046\n\083\101\099\111\110\100 \108\105\110\101\033"})D.Main:AddButton({Title="\066\117\116\116\111\110";Description="\086\101\114\121 \105\109\112\111\114\116\097\110\116 \098\117\116\116\111\110";Callback=function()e:Dialog({Title="\084\105\116\108\101";Content="\084\104\105\115 \105\115 \097 \100\105\097\108\111\103";Buttons={{Title="\067\111\110\102\105\114\109",Callback=function()print("\067\111\110\102\105\114\109\101\100 \116\104\101 \100\105\097\108\111\103\046")end},{Title="\067\097\110\099\101\108";Callback=function()print("\067\097\110\099\101\108\108\101\100 \116\104\101 \100\105\097\108\111\103\046")end}}})end})local B=D.Main:AddToggle("\077\121\084\111\103\103\108\101",{Title="\084\111\103\103\108\101";Default=false})B:OnChanged(function()print("\084\111\103\103\108\101 \099\104\097\110\103\101\100\058",A.MyToggle.Value)end)A.MyToggle:SetValue(false)local f=D.Main:AddSlider("\083\108\105\100\101\114",{Title="\083\108\105\100\101\114";Description="\084\104\105\115 \105\115 \097 \115\108\105\100\101\114",Default=2;Min=0;Max=5,Rounding=1,Callback=function(M)print("\083\108\105\100\101\114 \119\097\115 \099\104\097\110\103\101\100\058",M)end})f:OnChanged(function(M)print("\083\108\105\100\101\114 \099\104\097\110\103\101\100\058",M)end)f:SetValue(3)local n=D.Main:AddDropdown("\068\114\111\112\100\111\119\110",{Title="\068\114\111\112\100\111\119\110";Values={"\111\110\101","\116\119\111";"\116\104\114\101\101";"\102\111\117\114","\102\105\118\101";"\115\105\120","\115\101\118\101\110","\101\105\103\104\116";"\110\105\110\101";"\116\101\110";"\101\108\101\118\101\110","\116\119\101\108\118\101";"\116\104\105\114\116\101\101\110";"\102\111\117\114\116\101\101\110"};Multi=false,Default=1})n:SetValue("\102\111\117\114")n:OnChanged(function(M)print("\068\114\111\112\100\111\119\110 \099\104\097\110\103\101\100\058",M)end)local H=D.Main:AddDropdown("\077\117\108\116\105\068\114\111\112\100\111\119\110",{Title="\068\114\111\112\100\111\119\110";Description="\089\111\117 \099\097\110 \115\101\108\101\099\116 \109\117\108\116\105\112\108\101 \118\097\108\117\101\115\046";Values={"\111\110\101";"\116\119\111","\116\104\114\101\101";"\102\111\117\114";"\102\105\118\101","\115\105\120","\115\101\118\101\110","\101\105\103\104\116","\110\105\110\101";"\116\101\110","\101\108\101\118\101\110","\116\119\101\108\118\101","\116\104\105\114\116\101\101\110";"\102\111\117\114\116\101\101\110"},Multi=true;Default={"\115\101\118\101\110";"\116\119\101\108\118\101"}})H:SetValue({three=true,five=true,seven=false})H:OnChanged(function(M)local B={}for M,f in next,M do table.insert(B,M)end print("\077\117\116\108\105\100\114\111\112\100\111\119\110 \099\104\097\110\103\101\100\058",table.concat(B,"\044 "))end)local b=D.Main:AddColorpicker("\067\111\108\111\114\112\105\099\107\101\114",{Title="\067\111\108\111\114\112\105\099\107\101\114",Default=Color3.fromRGB(96,205,255)})b:OnChanged(function()print("\067\111\108\111\114\112\105\099\107\101\114 \099\104\097\110\103\101\100\058",b.Value)end)b:SetValueRGB(Color3.fromRGB(0,255,140))local d=D.Main:AddColorpicker("\084\114\097\110\115\112\097\114\101\110\099\121\067\111\108\111\114\112\105\099\107\101\114",{Title="\067\111\108\111\114\112\105\099\107\101\114",Description="\098\117\116 \121\111\117 \099\097\110 \099\104\097\110\103\101 \116\104\101 \116\114\097\110\115\112\097\114\101\110\099\121\046",Transparency=0,Default=Color3.fromRGB(96,205,255)})d:OnChanged(function()print("\084\067\111\108\111\114\112\105\099\107\101\114 \099\104\097\110\103\101\100\058",d.Value,"\084\114\097\110\115\112\097\114\101\110\099\121\058",d.Transparency)end)local z=D.Main:AddKeybind("\075\101\121\098\105\110\100",{Title="\075\101\121\066\105\110\100",Mode="\084\111\103\103\108\101",Default="\076\101\102\116\067\111\110\116\114\111\108";Callback=function(M)print("\075\101\121\098\105\110\100 \099\108\105\099\107\101\100\033",M)end;ChangedCallback=function(M)print("\075\101\121\098\105\110\100 \099\104\097\110\103\101\100\033",M)end})z:OnClick(function()print("\075\101\121\098\105\110\100 \099\108\105\099\107\101\100\058",z:GetState())end)z:OnChanged(function()print("\075\101\121\098\105\110\100 \099\104\097\110\103\101\100\058",z.Value)end)task.spawn(function()while true do wait(1)local B=z:GetState()if B then print("\075\101\121\098\105\110\100 \105\115 \098\101\105\110\103 \104\101\108\100 \100\111\119\110")end if M.Unloaded then break end end end)z:SetValue("\077\066\050","\084\111\103\103\108\101")local p=D.Main:AddInput("\073\110\112\117\116",{Title="\073\110\112\117\116";Default="\068\101\102\097\117\108\116",Placeholder="\080\108\097\099\101\104\111\108\100\101\114";Numeric=false,Finished=false;Callback=function(M)print("\073\110\112\117\116 \099\104\097\110\103\101\100\058",M)end})p:OnChanged(function()print("\073\110\112\117\116 \117\112\100\097\116\101\100\058",p.Value)end)end B:SetLibrary(M)f:SetLibrary(M)B:IgnoreThemeSettings()B:SetIgnoreIndexes({})f:SetFolder("\070\108\117\101\110\116\083\099\114\105\112\116\072\117\098")B:SetFolder("\070\108\117\101\110\116\083\099\114\105\112\116\072\117\098\047\115\112\101\099\105\102\105\099-\103\097\109\101")f:BuildInterfaceSection(D.Settings)B:BuildConfigSection(D.Settings)e:SelectTab(1)M:Notify({Title="\070\108\117\101\110\116";Content="\084\104\101 \115\099\114\105\112\116 \104\097\115 \098\101\101\110 \108\111\097\100\101\100\046",Duration=8})B:LoadAutoloadConfig()
local Fluent = loadstring(game:HttpGet("https://github.com/dawid-scripts/Fluent/releases/latest/download/main.lua"))()
local SaveManager = loadstring(game:HttpGet("https://raw.githubusercontent.com/dawid-scripts/Fluent/master/Addons/SaveManager.lua"))()
local InterfaceManager = loadstring(game:HttpGet("https://raw.githubusercontent.com/dawid-scripts/Fluent/master/Addons/InterfaceManager.lua"))()

local Window = Fluent:CreateWindow({
    Title = "Fluent " .. Fluent.Version,
    SubTitle = "by dawid",
    TabWidth = 160,
    Size = UDim2.fromOffset(580, 460),
    Acrylic = true, -- The blur may be detectable, setting this to false disables blur entirely
    Theme = "Dark",
    MinimizeKey = Enum.KeyCode.LeftControl -- Used when theres no MinimizeKeybind
})

--Fluent provides Lucide Icons https://lucide.dev/icons/ for the tabs, icons are optional
local Tabs = {
    Main = Window:AddTab({ Title = "Main", Icon = "" }),
    Settings = Window:AddTab({ Title = "Settings", Icon = "settings" })
}

local Options = Fluent.Options

do
    Fluent:Notify({
        Title = "Notification",
        Content = "This is a notification",
        SubContent = "SubContent", -- Optional
        Duration = 5 -- Set to nil to make the notification not disappear
    })



    Tabs.Main:AddParagraph({
        Title = "Paragraph",
        Content = "This is a paragraph.\nSecond line!"
    })



    Tabs.Main:AddButton({
        Title = "Button",
        Description = "Very important button",
        Callback = function()
            Window:Dialog({
                Title = "Title",
                Content = "This is a dialog",
                Buttons = {
                    {
                        Title = "Confirm",
                        Callback = function()
                            print("Confirmed the dialog.")
                        end
                    },
                    {
                        Title = "Cancel",
                        Callback = function()
                            print("Cancelled the dialog.")
                        end
                    }
                }
            })
        end
    })



    local Toggle = Tabs.Main:AddToggle("MyToggle", {Title = "Toggle", Default = false })

    Toggle:OnChanged(function()
        print("Toggle changed:", Options.MyToggle.Value)
    end)

    Options.MyToggle:SetValue(false)


    
    local Slider = Tabs.Main:AddSlider("Slider", {
        Title = "Slider",
        Description = "This is a slider",
        Default = 2,
        Min = 0,
        Max = 5,
        Rounding = 1,
        Callback = function(Value)
            print("Slider was changed:", Value)
        end
    })

    Slider:OnChanged(function(Value)
        print("Slider changed:", Value)
    end)

    Slider:SetValue(3)



    local Dropdown = Tabs.Main:AddDropdown("Dropdown", {
        Title = "Dropdown",
        Values = {"one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen"},
        Multi = false,
        Default = 1,
    })

    Dropdown:SetValue("four")

    Dropdown:OnChanged(function(Value)
        print("Dropdown changed:", Value)
    end)


    
    local MultiDropdown = Tabs.Main:AddDropdown("MultiDropdown", {
        Title = "Dropdown",
        Description = "You can select multiple values.",
        Values = {"one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen"},
        Multi = true,
        Default = {"seven", "twelve"},
    })

    MultiDropdown:SetValue({
        three = true,
        five = true,
        seven = false
    })

    MultiDropdown:OnChanged(function(Value)
        local Values = {}
        for Value, State in next, Value do
            table.insert(Values, Value)
        end
        print("Mutlidropdown changed:", table.concat(Values, ", "))
    end)



    local Colorpicker = Tabs.Main:AddColorpicker("Colorpicker", {
        Title = "Colorpicker",
        Default = Color3.fromRGB(96, 205, 255)
    })

    Colorpicker:OnChanged(function()
        print("Colorpicker changed:", Colorpicker.Value)
    end)
    
    Colorpicker:SetValueRGB(Color3.fromRGB(0, 255, 140))



    local TColorpicker = Tabs.Main:AddColorpicker("TransparencyColorpicker", {
        Title = "Colorpicker",
        Description = "but you can change the transparency.",
        Transparency = 0,
        Default = Color3.fromRGB(96, 205, 255)
    })

    TColorpicker:OnChanged(function()
        print(
            "TColorpicker changed:", TColorpicker.Value,
            "Transparency:", TColorpicker.Transparency
        )
    end)



    local Keybind = Tabs.Main:AddKeybind("Keybind", {
        Title = "KeyBind",
        Mode = "Toggle", -- Always, Toggle, Hold
        Default = "LeftControl", -- String as the name of the keybind (MB1, MB2 for mouse buttons)

        -- Occurs when the keybind is clicked, Value is `true`/`false`
        Callback = function(Value)
            print("Keybind clicked!", Value)
        end,

        -- Occurs when the keybind itself is changed, `New` is a KeyCode Enum OR a UserInputType Enum
        ChangedCallback = function(New)
            print("Keybind changed!", New)
        end
    })

    -- OnClick is only fired when you press the keybind and the mode is Toggle
    -- Otherwise, you will have to use Keybind:GetState()
    Keybind:OnClick(function()
        print("Keybind clicked:", Keybind:GetState())
    end)

    Keybind:OnChanged(function()
        print("Keybind changed:", Keybind.Value)
    end)

    task.spawn(function()
        while true do
            wait(1)

            -- example for checking if a keybind is being pressed
            local state = Keybind:GetState()
            if state then
                print("Keybind is being held down")
            end

            if Fluent.Unloaded then break end
        end
    end)

    Keybind:SetValue("MB2", "Toggle") -- Sets keybind to MB2, mode to Hold


    local Input = Tabs.Main:AddInput("Input", {
        Title = "Input",
        Default = "Default",
        Placeholder = "Placeholder",
        Numeric = false, -- Only allows numbers
        Finished = false, -- Only calls callback when you press enter
        Callback = function(Value)
            print("Input changed:", Value)
        end
    })

    Input:OnChanged(function()
        print("Input updated:", Input.Value)
    end)
end


-- Addons:
-- SaveManager (Allows you to have a configuration system)
-- InterfaceManager (Allows you to have a interface managment system)

-- Hand the library over to our managers
SaveManager:SetLibrary(Fluent)
InterfaceManager:SetLibrary(Fluent)

-- Ignore keys that are used by ThemeManager.
-- (we dont want configs to save themes, do we?)
SaveManager:IgnoreThemeSettings()

-- You can add indexes of elements the save manager should ignore
SaveManager:SetIgnoreIndexes({})

-- use case for doing it this way:
-- a script hub could have themes in a global folder
-- and game configs in a separate folder per game
InterfaceManager:SetFolder("FluentScriptHub")
SaveManager:SetFolder("FluentScriptHub/specific-game")

InterfaceManager:BuildInterfaceSection(Tabs.Settings)
SaveManager:BuildConfigSection(Tabs.Settings)


Window:SelectTab(1)

Fluent:Notify({
    Title = "Fluent",
    Content = "The script has been loaded.",
    Duration = 8
})

-- You can use the SaveManager:LoadAutoloadConfig() to load a config
-- which has been marked to be one that auto loads!
SaveManager:LoadAutoloadConfig()