Undetected Fluent - одна из лучших библиотек для UI вашего скрипта

  • Автор темы Автор темы y6quq
  • Дата начала Дата начала
Начинающий
Начинающий
Статус
Оффлайн
Регистрация
15 Мар 2023
Сообщения
41
Реакции
1
Выберите плейс
  1. 3008
  2. 99 Nights in the Forest
  3. Answer or Die
  4. Adopt Me
  5. Anime Rangers X
  6. Anime Vanguards
  7. Arise
  8. Arsenal
  9. Basketball Zero
  10. BedWars
  11. Bee Swarm Simulator
  12. Berry Avenue RP
  13. Blade Ball
  14. Blox Fruits
  15. Blue Lock: Rivals
  16. Brainrot Evolution
  17. Break In
  18. Brookhaven RP
  19. Bubble Gum Simulator
  20. Build A Boat For Treasure
  21. Catalog Avatar Creator
  22. Climb and Jump Tower
  23. Counter Blox
  24. Casual Stock
  25. Combat Warriors
  26. Da Hood
  27. Dusty Trip
  28. Dandy’s World
  29. Death Ball
  30. Dead Rails
  31. Doors
  32. Dress To Impress
  33. Evade
  34. Fling Things and People
  35. Forsaken
  36. Fisch
  37. Grow A Garden
  38. Hero Of Hell (Anime Last Stand)
  39. Jailbreak
  40. King Legacy
  41. Lumber Tycoon 2
  42. Mining Tycoon
  43. Murder Mystery 2
  44. Mining Simulator 2
  45. Muscle Legends
  46. Natural Disaster Survival
  47. PC Tycoon Project EVO
  48. Pet Simulator
  49. Prison Life
  50. Pressure
  51. Phantom Forces
  52. Piggy
  53. PLS Donate
  54. Ro Ghoul
  55. Residence Massacre
  56. Rivals
  57. Shrimp Game
  58. Slap Tower 3
  59. Sol’s RNG
  60. Steal a Brainrot
  61. Trident Survival
  62. The Strongest Battlegrounds
  63. Toilet Tower Defense
  64. Tower Defense Simulator
  65. Tower of Hell
  66. Victory Race
  67. Volleyball Legends
  68. War Tycoon
  69. Work at a Pizza Place
Возможно вы часто видели в разных скриптах, по совместительству бесплатных скриптов с ютуба или тематических сайтов в скриптами, и задавались вопросом, как сделать такое же меню в свой скрипт?

Сегодня мы поговорим о одной из самых популярных на данный момент, а также одной из самых красивых по сравнению с другими

Пожалуйста, авторизуйтесь для просмотра ссылки.


Возможности данной библиотеки:
SaveManager - Менеджер конфигураций скрипта:
Название конфига, список конфигов, сохранить конфиг, загрузить конфиг, перезаписать конфиг, перезапустить список конфигураций, поставить конфиг в автозагрузку
InterfaceManager - Меняйте цвет, и сам внешний вид интерфейса скрипта, а также бинд на открытие и закрытие

Создание Toggle(вкл/выкл)
Создание кнопки, при нажатии вызывает callback
Вкладки(Tabs)
Параграфы, простой текстовый блок с заголовком и несколькими строками
Поддержка иконок Lucide
Пожалуйста, авторизуйтесь для просмотра ссылки.
(noad)
Уведомления, всплывающее уведомление с таймером (или без, если Duration = nil)
Слайдеры, методы: Slider:OnChanged(function(Value) ... end) или Slider:SetValue(x)
Colorpicker, методы: Colorpicker:SetValueRGB(Color3.fromRGB(...)) , :OnChanged(function() ... end), поддерживает прозрачность
Keybinds, режимы: "Always", "Toggle", "Hold"; методы: Keybind:GetState(), Keybind:SetValue("Key", "Mode"), Keybind:OnClick(function() ... end), Keybind:OnChanged(function() ... end)
Input, поле ввода. Методы: Input:OnChanged(function() ... end), поддерживает такие возможности как, только числа (Numeric = true), вызов только по Enter (Finished = true)
Dropdown, Tab:AddDropdown("ID", { Title, Values, Multi, Default }). Поддерживает одиночный (Multi = false) и множественный выбор (Multi = true) Методы: Dropdown:SetValue("option"), MultiDropdown:SetValue({option = true/false, ...}), :OnChanged(function(Value) ... end)
Выгрузка UI, через Fluent.Unloaded


Пример использования:
Код:
Expand Collapse Copy
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()

Исходный код библиотеки
Пожалуйста, авторизуйтесь для просмотра ссылки.




Кратко говоря, что нам дает библиотека
Многоуровневый UI (окно → вкладки → элементы)
Полный набор элементов управления (кнопки, тогглы, слайдеры, дропдауны, кейбинды, инпуты, колорпикеры)
Уведомления и диалоги
Открытый сурс код
Система конфигов и тем
Поддержка прозрачности, разные темы темы
Сохранение параметров между сессиями
Полная поддержка практически всех нынешних executor'ов, как Android/iOS, так и пк​
 
Назад
Сверху Снизу