Advertisement
giorgichaduneli

Untitled

Feb 26th, 2024
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.50 KB | None | 0 0
  1. local Fluent = loadstring(game:HttpGet("https://github.com/dawid-scripts/Fluent/releases/latest/download/main.lua"))()
  2. local SaveManager = loadstring(game:HttpGet("https://raw.githubusercontent.com/dawid-scripts/Fluent/master/Addons/SaveManager.lua"))()
  3. local InterfaceManager = loadstring(game:HttpGet("https://raw.githubusercontent.com/dawid-scripts/Fluent/master/Addons/InterfaceManager.lua"))()
  4.  
  5. local Window = Fluent:CreateWindow({
  6. Title = "Fluent " .. Fluent.Version,
  7. SubTitle = "by dawid",
  8. TabWidth = 160,
  9. Size = UDim2.fromOffset(580, 460),
  10. Acrylic = true, -- The blur may be detectable, setting this to false disables blur entirely
  11. Theme = "Dark",
  12. MinimizeKey = Enum.KeyCode.LeftControl -- Used when theres no MinimizeKeybind
  13. })
  14.  
  15. --Fluent provides Lucide Icons https://lucide.dev/icons/ for the tabs, icons are optional
  16. local Tabs = {
  17. Main = Window:AddTab({ Title = "Main", Icon = "" }),
  18. Settings = Window:AddTab({ Title = "Settings", Icon = "settings" })
  19. }
  20.  
  21. local Options = Fluent.Options
  22.  
  23. do
  24. Fluent:Notify({
  25. Title = "Notification",
  26. Content = "This is a notification",
  27. SubContent = "SubContent", -- Optional
  28. Duration = 5 -- Set to nil to make the notification not disappear
  29. })
  30.  
  31.  
  32.  
  33. Tabs.Main:AddParagraph({
  34. Title = "Paragraph",
  35. Content = "This is a paragraph.\nSecond line!"
  36. })
  37.  
  38.  
  39.  
  40. Tabs.Main:AddButton({
  41. Title = "Button",
  42. Description = "Very important button",
  43. Callback = function()
  44. Window:Dialog({
  45. Title = "Title",
  46. Content = "This is a dialog",
  47. Buttons = {
  48. {
  49. Title = "Confirm",
  50. Callback = function()
  51. print("Confirmed the dialog.")
  52. end
  53. },
  54. {
  55. Title = "Cancel",
  56. Callback = function()
  57. print("Cancelled the dialog.")
  58. end
  59. }
  60. }
  61. })
  62. end
  63. })
  64.  
  65.  
  66.  
  67. local Toggle = Tabs.Main:AddToggle("MyToggle", {Title = "Toggle", Default = false })
  68.  
  69. Toggle:OnChanged(function()
  70. print("Toggle changed:", Options.MyToggle.Value)
  71. end)
  72.  
  73. Options.MyToggle:SetValue(false)
  74.  
  75. -- Addons:
  76. -- SaveManager (Allows you to have a configuration system)
  77. -- InterfaceManager (Allows you to have a interface managment system)
  78.  
  79. -- Hand the library over to our managers
  80. SaveManager:SetLibrary(Fluent)
  81. InterfaceManager:SetLibrary(Fluent)
  82.  
  83. -- Ignore keys that are used by ThemeManager.
  84. -- (we dont want configs to save themes, do we?)
  85. SaveManager:IgnoreThemeSettings()
  86.  
  87. -- You can add indexes of elements the save manager should ignore
  88. SaveManager:SetIgnoreIndexes({})
  89.  
  90. -- use case for doing it this way:
  91. -- a script hub could have themes in a global folder
  92. -- and game configs in a separate folder per game
  93. InterfaceManager:SetFolder("FluentScriptHub")
  94. SaveManager:SetFolder("FluentScriptHub/specific-game")
  95.  
  96. InterfaceManager:BuildInterfaceSection(Tabs.Settings)
  97. SaveManager:BuildConfigSection(Tabs.Settings)
  98.  
  99.  
  100. Window:SelectTab(1)
  101.  
  102. Fluent:Notify({
  103. Title = "Fluent",
  104. Content = "The script has been loaded.",
  105. Duration = 8
  106. })
  107.  
  108. -- You can use the SaveManager:LoadAutoloadConfig() to load a config
  109. -- which has been marked to be one that auto loads!
  110. SaveManager:LoadAutoloadConfig()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement