Advertisement
Vortex23

Rayfield

Dec 8th, 2024 (edited)
6,208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 156.48 KB | None | 0 0
  1. --[[
  2.  
  3. Rayfield Interface Suite
  4. by Sirius
  5.  
  6. shlex | Designing + Programming
  7. iRay  | Programming
  8.  
  9. ]]
  10.  
  11.  
  12.  
  13. local InterfaceBuild = 'K7GD'
  14. local Release = "Build 1.54"
  15. local RayfieldFolder = "Rayfield"
  16. local ConfigurationFolder = RayfieldFolder.."/Configurations"
  17. local ConfigurationExtension = ".rfld"-- Lighter shade
  18.             SliderProgress = Color3.fromRGB(70, 130, 180),
  19.             SliderStroke = Color3.fromRGB(150, 180, 220),
  20.  
  21.             ToggleBackground = Color3.fromRGB(210, 220, 230),
  22.             ToggleEnabled = Color3.fromRGB(70, 160, 210),
  23.             ToggleDisabled = Color3.fromRGB(180, 180, 180),
  24.             ToggleEnabledStroke = Color3.fromRGB(60, 150, 200),
  25.             ToggleDisabledStroke = Color3.fromRGB(140, 140, 140),
  26.             ToggleEnabledOuterStroke = Color3.fromRGB(100, 120, 140),
  27.             ToggleDisabledOuterStroke = Color3.fromRGB(120, 120, 130),
  28.  
  29.             DropdownSelected = Color3.fromRGB(220, 230, 240),
  30.             DropdownUnselected = Color3.fromRGB(200, 210, 220),
  31.  
  32.             InputBackground = Color3.fromRGB(220, 230, 240),
  33.             InputStroke = Color3.fromRGB(180, 190, 200),
  34.             PlaceholderColor = Color3.fromRGB(150, 150, 150)
  35.         },
  36.     }
  37. }
  38.  
  39.  
  40. -- Services
  41. local UserInputService = game:GetService("UserInputService")
  42. local TweenService = game:GetService("TweenService")
  43. local HttpService = game:GetService("HttpService")
  44. local RunService = game:GetService("RunService")
  45. local Players = game:GetService("Players")
  46. local CoreGui = game:GetService("CoreGui")
  47.  
  48. -- Environment Check
  49. local useStudio
  50.  
  51. if RunService:IsStudio() then
  52.     useStudio = true
  53. end
  54.  
  55. -- Interface Management
  56.  
  57. local Rayfield = useStudio and script.Parent:FindFirstChild('Rayfield') or game:GetObjects("rbxassetid://10804731440")[1]
  58. local buildAttempts = 0
  59. local correctBuild = false
  60. local warned
  61.  
  62. repeat
  63.     if Rayfield:FindFirstChild('Build') and Rayfield.Build.Value == InterfaceBuild then
  64.         correctBuild = true
  65.         break
  66.     end
  67.  
  68.     correctBuild = false
  69.  
  70.     if not warned then
  71.         warn('Rayfield | Build Mismatch')
  72.         print('Rayfield may encounter issues as you are running an incompatible interface version ('.. ((Rayfield:FindFirstChild('Build') and Rayfield.Build.Value) or 'No Build') ..').\n\nThis version of Rayfield is intended for interface build '..InterfaceBuild..'.')
  73.         warned = true
  74.     end
  75.  
  76.     toDestroy, Rayfield = Rayfield, useStudio and script.Parent:FindFirstChild('Rayfield') or game:GetObjects("rbxassetid://10804731440")[1]
  77.     if toDestroy and not useStudio then toDestroy:Destroy() end
  78.  
  79.     buildAttempts = buildAttempts + 1
  80. until buildAttempts >= 2
  81.  
  82. Rayfield.Enabled = false
  83.  
  84. if gethui then
  85.     Rayfield.Parent = gethui()
  86. elseif syn and syn.protect_gui then
  87.     syn.protect_gui(Rayfield)
  88.     Rayfield.Parent = CoreGui
  89. elseif not useStudio and CoreGui:FindFirstChild("RobloxGui") then
  90.     Rayfield.Parent = CoreGui:FindFirstChild("RobloxGui")
  91. elseif not useStudio then
  92.     Rayfield.Parent = CoreGui
  93. end
  94.  
  95. if gethui then
  96.     for _, Interface in ipairs(gethui():GetChildren()) do
  97.         if Interface.Name == Rayfield.Name and Interface ~= Rayfield then
  98.             Interface.Enabled = false
  99.             Interface.Name = "Rayfield-Old"
  100.         end
  101.     end
  102. elseif not useStudio then
  103.     for _, Interface in ipairs(CoreGui:GetChildren()) do
  104.         if Interface.Name == Rayfield.Name and Interface ~= Rayfield then
  105.             Interface.Enabled = false
  106.             Interface.Name = "Rayfield-Old"
  107.         end
  108.     end
  109. end
  110.  
  111.  
  112. local minSize = Vector2.new(1024, 768)
  113. local useMobileSizing
  114.  
  115. if Rayfield.AbsoluteSize.X < minSize.X and Rayfield.AbsoluteSize.Y < minSize.Y then
  116.     useMobileSizing = true
  117. end
  118.  
  119. if UserInputService.TouchEnabled then
  120.     useMobilePrompt = true
  121. end
  122.  
  123.  
  124.  
  125. -- Object Variables
  126.  
  127. local Main = Rayfield.Main
  128. local MPrompt = Rayfield:FindFirstChild('Prompt')
  129. local Topbar = Main.Topbar
  130. local Elements = Main.Elements
  131. local LoadingFrame = Main.LoadingFrame
  132. local TabList = Main.TabList
  133. local dragBar = Rayfield:FindFirstChild('Drag')
  134. local dragInteract = dragBar and dragBar.Interact or nil
  135. local dragBarCosmetic = dragBar and dragBar.Drag or nil
  136.  
  137. Rayfield.DisplayOrder = 100
  138. LoadingFrame.Version.Text = Release
  139.  
  140.  
  141.  
  142. -- Variables
  143.  
  144. local request = (syn and syn.request) or (http and http.request) or http_request
  145. local CFileName = nil
  146. local CEnabled = false
  147. local Minimised = false
  148. local Hidden = false
  149. local Debounce = false
  150. local searchOpen = false
  151. local Notifications = Rayfield.Notifications
  152.  
  153. local SelectedTheme = RayfieldLibrary.Theme.Default
  154.  
  155. local function ChangeTheme(Theme)
  156.     if typeof(Theme) == 'string' then
  157.         SelectedTheme = RayfieldLibrary.Theme[Theme]
  158.     elseif typeof(Theme) == 'table' then
  159.         SelectedTheme = Theme
  160.     end
  161.  
  162.     Rayfield.Main.BackgroundColor3 = SelectedTheme.Background
  163.     Rayfield.Main.Topbar.BackgroundColor3 = SelectedTheme.Topbar
  164.     Rayfield.Main.Topbar.CornerRepair.BackgroundColor3 = SelectedTheme.Topbar
  165.     Rayfield.Main.Shadow.Image.ImageColor3 = SelectedTheme.Shadow
  166.  
  167.     Rayfield.Main.Topbar.ChangeSize.ImageColor3 = SelectedTheme.TextColor
  168.     Rayfield.Main.Topbar.Hide.ImageColor3 = SelectedTheme.TextColor
  169.     Rayfield.Main.Topbar.Search.ImageColor3 = SelectedTheme.TextColor
  170.     Rayfield.Main.Topbar.Divider.BackgroundColor3 = SelectedTheme.ElementStroke
  171.  
  172.     Main.Search.BackgroundColor3 = SelectedTheme.TextColor
  173.     Main.Search.Shadow.ImageColor3 = SelectedTheme.TextColor
  174.     Main.Search.Search.ImageColor3 = SelectedTheme.TextColor
  175.     Main.Search.Input.PlaceholderColor3 = SelectedTheme.TextColor
  176.     Main.Search.UIStroke.Color = SelectedTheme.SecondaryElementStroke
  177.  
  178.     if Main:FindFirstChild('Notice') then
  179.         Main.Notice.BackgroundColor3 = SelectedTheme.Background
  180.     end
  181.  
  182.     for _, text in ipairs(Rayfield:GetDescendants()) do
  183.         if text.Parent.Parent ~= Notifications then
  184.             if text:IsA('TextLabel') or text:IsA('TextBox') then text.TextColor3 = SelectedTheme.TextColor end
  185.         end
  186.     end
  187.  
  188.     for _, TabPage in ipairs(Elements:GetChildren()) do
  189.         for _, Element in ipairs(TabPage:GetChildren()) do
  190.             if Element.ClassName == "Frame" and Element.Name ~= "Placeholder" and Element.Name ~= "SectionSpacing" and Element.Name ~= "Divider" and Element.Name ~= "SectionTitle" and Element.Name ~= "SearchTitle-fsefsefesfsefesfesfThanks" then
  191.                 Element.BackgroundColor3 = SelectedTheme.ElementBackground
  192.                 Element.UIStroke.Color = SelectedTheme.ElementStroke
  193.             end
  194.         end
  195.     end
  196. end
  197.  
  198. local function getIcon(name : string)
  199.     -- full credit to latte softworks :)
  200.     local iconData = not useStudio and game:HttpGet('https://raw.githubusercontent.com/SiriusSoftwareLtd/Rayfield/refs/heads/main/icons.lua')
  201.     local icons = useStudio and require(script.Parent.icons) or loadstring(iconData)()
  202.  
  203.     name = string.match(string.lower(name), "^%s*(.*)%s*$") :: string
  204.     local sizedicons = icons['48px']
  205.  
  206.     local r = sizedicons[name]
  207.     if not r then
  208.         error("Lucide Icons: Failed to find icon by the name of \"" .. name .. "\.", 2)
  209.     end
  210.  
  211.     local rirs = r[2]
  212.     local riro = r[3]
  213.  
  214.     if type(r[1]) ~= "number" or type(rirs) ~= "table" or type(riro) ~= "table" then
  215.         error("Lucide Icons: Internal error: Invalid auto-generated asset entry")
  216.     end
  217.  
  218.     local irs = Vector2.new(rirs[1], rirs[2])
  219.     local iro = Vector2.new(riro[1], riro[2])
  220.  
  221.     local asset = {
  222.         id = r[1],
  223.         imageRectSize = irs,
  224.         imageRectOffset = iro,
  225.     }
  226.  
  227.     return asset
  228. end
  229.  
  230. local function makeDraggable(object, dragObject, enableTaptic, tapticOffset)
  231.     local dragging = false
  232.     local relative = nil
  233.  
  234.     local offset = Vector2.zero
  235.     local screenGui = object:FindFirstAncestorWhichIsA("ScreenGui")
  236.     if screenGui and screenGui.IgnoreGuiInset then
  237.         offset += game:GetService('GuiService'):GetGuiInset()
  238.     end
  239.  
  240.     local function connectFunctions()
  241.         if dragBar and enableTaptic then
  242.             dragBar.MouseEnter:Connect(function()
  243.                 if not dragging and not Hidden then
  244.                     TweenService:Create(dragBarCosmetic, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {BackgroundTransparency = 0.5, Size = UDim2.new(0, 120, 0, 4)}):Play()
  245.                 end
  246.             end)
  247.  
  248.             dragBar.MouseLeave:Connect(function()
  249.                 if not dragging and not Hidden then
  250.                     TweenService:Create(dragBarCosmetic, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {BackgroundTransparency = 0.7, Size = UDim2.new(0, 100, 0, 4)}):Play()
  251.                 end
  252.             end)
  253.         end
  254.     end
  255.  
  256.     connectFunctions()
  257.  
  258.     dragObject.InputBegan:Connect(function(input, processed)
  259.         if processed then return end
  260.  
  261.         local inputType = input.UserInputType.Name
  262.         if inputType == "MouseButton1" or inputType == "Touch" then
  263.             dragging = true
  264.  
  265.             relative = object.AbsolutePosition + object.AbsoluteSize * object.AnchorPoint - UserInputService:GetMouseLocation()
  266.             if enableTaptic and not Hidden then
  267.                 TweenService:Create(dragBarCosmetic, TweenInfo.new(0.35, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Size = UDim2.new(0, 110, 0, 4), BackgroundTransparency = 0}):Play()
  268.             end
  269.         end
  270.     end)
  271.  
  272.     local inputEnded = UserInputService.InputEnded:Connect(function(input)
  273.         if not dragging then return end
  274.  
  275.         local inputType = input.UserInputType.Name
  276.         if inputType == "MouseButton1" or inputType == "Touch" then
  277.             dragging = false
  278.  
  279.             connectFunctions()
  280.  
  281.             if enableTaptic and not Hidden then
  282.                 TweenService:Create(dragBarCosmetic, TweenInfo.new(0.35, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Size = UDim2.new(0, 100, 0, 4), BackgroundTransparency = 0.7}):Play()
  283.             end
  284.         end
  285.     end)
  286.  
  287.     local renderStepped = RunService.RenderStepped:Connect(function()
  288.         if dragging and not Hidden then
  289.             local position = UserInputService:GetMouseLocation() + relative + offset
  290.             if enableTaptic and tapticOffset then
  291.                 TweenService:Create(object, TweenInfo.new(0.4, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Position = UDim2.fromOffset(position.X, position.Y)}):Play()
  292.                 TweenService:Create(dragObject.Parent, TweenInfo.new(0.05, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Position = UDim2.fromOffset(position.X, position.Y + ((useMobileSizing and tapticOffset[2]) or tapticOffset[1]))}):Play()
  293.             else
  294.                 if dragBar and tapticOffset then
  295.                     dragBar.Position = UDim2.fromOffset(position.X, position.Y + ((useMobileSizing and tapticOffset[2]) or tapticOffset[1]))
  296.                 end
  297.                 object.Position = UDim2.fromOffset(position.X, position.Y)
  298.             end
  299.         end
  300.     end)
  301.  
  302.     object.Destroying:Connect(function()
  303.         if inputEnded then inputEnded:Disconnect() end
  304.         if renderStepped then renderStepped:Disconnect() end
  305.     end)
  306. end
  307.  
  308.  
  309. local function PackColor(Color)
  310.     return {R = Color.R * 255, G = Color.G * 255, B = Color.B * 255}
  311. end    
  312.  
  313. local function UnpackColor(Color)
  314.     return Color3.fromRGB(Color.R, Color.G, Color.B)
  315. end
  316.  
  317. local function LoadConfiguration(Configuration)
  318.     local Data = HttpService:JSONDecode(Configuration)
  319.     local changed
  320.  
  321.     -- Iterate through current UI elements' flags
  322.     for FlagName, Flag in pairs(RayfieldLibrary.Flags) do
  323.         local FlagValue = Data[FlagName]
  324.  
  325.         if FlagValue then
  326.             task.spawn(function()
  327.                 if Flag.Type == "ColorPicker" then
  328.                     changed = true
  329.                     Flag:Set(UnpackColor(FlagValue))
  330.                 else
  331.                     if (Flag.CurrentValue or Flag.CurrentKeybind or Flag.CurrentOption or Flag.Color) ~= FlagValue then
  332.                         changed = true
  333.                         Flag:Set(FlagValue)    
  334.                     end
  335.                 end
  336.             end)
  337.         else
  338.             warn("Rayfield | Unable to find '"..FlagName.. "' in the save file.")
  339.             print("The error above may not be an issue if new elements have been added or not been set values.")
  340.             --RayfieldLibrary:Notify({Title = "Rayfield Flags", Content = "Rayfield was unable to find '"..FlagName.. "' in the save file. Check sirius.menu/discord for help.", Image = 3944688398})
  341.         end
  342.     end
  343.  
  344.     return changed
  345. end
  346.  
  347. local function SaveConfiguration()
  348.     if not CEnabled then return end
  349.  
  350.     local Data = {}
  351.     for i, v in pairs(RayfieldLibrary.Flags) do
  352.         if v.Type == "ColorPicker" then
  353.             Data[i] = PackColor(v.Color)
  354.         else
  355.             if typeof(v.CurrentValue) == 'boolean' then
  356.                 if v.CurrentValue == false then
  357.                     Data[i] = false
  358.                 else
  359.                     Data[i] = v.CurrentValue or v.CurrentKeybind or v.CurrentOption or v.Color
  360.                 end
  361.             else
  362.                 Data[i] = v.CurrentValue or v.CurrentKeybind or v.CurrentOption or v.Color
  363.             end
  364.         end
  365.     end
  366.  
  367.     if useStudio then
  368.         if script.Parent:FindFirstChild('configuration') then script.Parent.configuration:Destroy() end
  369.  
  370.         local ScreenGui = Instance.new("ScreenGui")
  371.         ScreenGui.Parent = script.Parent
  372.         ScreenGui.Name = 'configuration'
  373.  
  374.         local TextBox = Instance.new("TextBox")
  375.         TextBox.Parent = ScreenGui
  376.         TextBox.Size = UDim2.new(0, 800, 0, 50)
  377.         TextBox.AnchorPoint = Vector2.new(0.5, 0)
  378.         TextBox.Position = UDim2.new(0.5, 0, 0, 30)
  379.         TextBox.Text = HttpService:JSONEncode(Data)
  380.         TextBox.ClearTextOnFocus = false
  381.     end
  382.  
  383.     if writefile then
  384.         writefile(ConfigurationFolder .. "/" .. CFileName .. ConfigurationExtension, tostring(HttpService:JSONEncode(Data)))
  385.     end
  386. end
  387.  
  388. function RayfieldLibrary:Notify(data) -- action e.g open messages
  389.     task.spawn(function()
  390.  
  391.         -- Notification Object Creation
  392.         local newNotification = Notifications.Template:Clone()
  393.         newNotification.Name = data.Title or 'No Title Provided'
  394.         newNotification.Parent = Notifications
  395.         newNotification.LayoutOrder = #Notifications:GetChildren()
  396.         newNotification.Visible = false
  397.  
  398.         -- Set Data
  399.         newNotification.Title.Text = data.Title or "Unknown Title"
  400.         newNotification.Description.Text = data.Content or "Unknown Content"
  401.  
  402.         if data.Image then
  403.             if typeof(data.Image) == 'string' then
  404.                 local asset = getIcon(data.Image)
  405.  
  406.                 newNotification.Icon.Image = 'rbxassetid://'..asset.id
  407.                 newNotification.Icon.ImageRectOffset = asset.imageRectOffset
  408.                 newNotification.Icon.ImageRectSize = asset.imageRectSize
  409.             else
  410.                 newNotification.Icon.Image = "rbxassetid://" .. (data.Image or 0)
  411.             end
  412.         else
  413.             newNotification.Icon.Image = "rbxassetid://" .. 0
  414.         end
  415.  
  416.         -- Set initial transparency values
  417.  
  418.         newNotification.Title.TextColor3 = SelectedTheme.TextColor
  419.         newNotification.Description.TextColor3 = SelectedTheme.TextColor
  420.         newNotification.BackgroundColor3 = SelectedTheme.Background
  421.         newNotification.UIStroke.Color = SelectedTheme.TextColor
  422.         newNotification.Icon.ImageColor3 = SelectedTheme.TextColor
  423.  
  424.         newNotification.BackgroundTransparency = 1
  425.         newNotification.Title.TextTransparency = 1
  426.         newNotification.Description.TextTransparency = 1
  427.         newNotification.UIStroke.Transparency = 1
  428.         newNotification.Shadow.ImageTransparency = 1
  429.         newNotification.Size = UDim2.new(1, 0, 0, 800)
  430.         newNotification.Icon.ImageTransparency = 1
  431.         newNotification.Icon.BackgroundTransparency = 1
  432.  
  433.         task.wait()
  434.  
  435.         newNotification.Visible = true
  436.  
  437.         if data.Actions then
  438.             warn('Rayfield | Not seeing your actions in notifications?')
  439.             print("Notification Actions are being sunset for now, keep up to date on when they're back in the discord. (sirius.menu/discord)")
  440.         end
  441.  
  442.         -- Calculate textbounds and set initial values
  443.         local bounds = {newNotification.Title.TextBounds.Y, newNotification.Description.TextBounds.Y}
  444.         newNotification.Size = UDim2.new(1, -60, 0, -Notifications:FindFirstChild("UIListLayout").Padding.Offset)
  445.  
  446.         newNotification.Icon.Size = UDim2.new(0, 32, 0, 32)
  447.         newNotification.Icon.Position = UDim2.new(0, 20, 0.5, 0)
  448.  
  449.         TweenService:Create(newNotification, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(1, 0, 0, math.max(bounds[1] + bounds[2] + 31, 60))}):Play()
  450.  
  451.         task.wait(0.15)
  452.         TweenService:Create(newNotification, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0.45}):Play()
  453.         TweenService:Create(newNotification.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  454.  
  455.         task.wait(0.05)
  456.  
  457.         TweenService:Create(newNotification.Icon, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 0}):Play()
  458.  
  459.         task.wait(0.05)
  460.         TweenService:Create(newNotification.Description, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0.35}):Play()
  461.         TweenService:Create(newNotification.UIStroke, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {Transparency = 0.95}):Play()
  462.         TweenService:Create(newNotification.Shadow, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 0.82}):Play()
  463.  
  464.         local waitDuration = math.min(math.max((#newNotification.Description.Text * 0.1) + 2.5, 3), 10)
  465.         task.wait(data.Duration or waitDuration)
  466.  
  467.         newNotification.Icon.Visible = false
  468.         TweenService:Create(newNotification, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  469.         TweenService:Create(newNotification.UIStroke, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  470.         TweenService:Create(newNotification.Shadow, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  471.         TweenService:Create(newNotification.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  472.         TweenService:Create(newNotification.Description, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  473.  
  474.         TweenService:Create(newNotification, TweenInfo.new(1, Enum.EasingStyle.Exponential), {Size = UDim2.new(1, -90, 0, 0)}):Play()
  475.  
  476.         task.wait(1)
  477.  
  478.         TweenService:Create(newNotification, TweenInfo.new(1, Enum.EasingStyle.Exponential), {Size = UDim2.new(1, -90, 0, -Notifications:FindFirstChild("UIListLayout").Padding.Offset)}):Play()
  479.  
  480.         newNotification.Visible = false
  481.         newNotification:Destroy()
  482.     end)
  483. end
  484.  
  485. local function openSearch()
  486.     searchOpen = true
  487.  
  488.     Main.Search.BackgroundTransparency = 1
  489.     Main.Search.Shadow.ImageTransparency = 1
  490.     Main.Search.Input.TextTransparency = 1
  491.     Main.Search.Search.ImageTransparency = 1
  492.     Main.Search.UIStroke.Transparency = 1
  493.     Main.Search.Size = UDim2.new(1, 0, 0, 80)
  494.     Main.Search.Position = UDim2.new(0.5, 0, 0, 70)
  495.  
  496.     Main.Search.Input.Interactable = true
  497.  
  498.     Main.Search.Visible = true
  499.  
  500.     for _, tabbtn in ipairs(TabList:GetChildren()) do
  501.         if tabbtn.ClassName == "Frame" and tabbtn.Name ~= "Placeholder" then
  502.             tabbtn.Interact.Visible = false
  503.             TweenService:Create(tabbtn, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  504.             TweenService:Create(tabbtn.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  505.             TweenService:Create(tabbtn.Image, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  506.             TweenService:Create(tabbtn.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  507.         end
  508.     end
  509.  
  510.     Main.Search.Input:CaptureFocus()
  511.     TweenService:Create(Main.Search.Shadow, TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0.95}):Play()
  512.     TweenService:Create(Main.Search, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Position = UDim2.new(0.5, 0, 0, 57), BackgroundTransparency = 0.9}):Play()
  513.     TweenService:Create(Main.Search.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 0.8}):Play()
  514.     TweenService:Create(Main.Search.Input, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0.2}):Play()
  515.     TweenService:Create(Main.Search.Search, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 0.5}):Play()
  516.     TweenService:Create(Main.Search, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = UDim2.new(1, -35, 0, 35)}):Play()
  517. end
  518.  
  519. local function closeSearch()
  520.     searchOpen = false
  521.  
  522.     TweenService:Create(Main.Search, TweenInfo.new(0.35, Enum.EasingStyle.Quint), {BackgroundTransparency = 1, Size = UDim2.new(1, -55, 0, 30)}):Play()
  523.     TweenService:Create(Main.Search.Search, TweenInfo.new(0.15, Enum.EasingStyle.Quint), {ImageTransparency = 1}):Play()
  524.     TweenService:Create(Main.Search.Shadow, TweenInfo.new(0.15, Enum.EasingStyle.Quint), {ImageTransparency = 1}):Play()
  525.     TweenService:Create(Main.Search.UIStroke, TweenInfo.new(0.15, Enum.EasingStyle.Quint), {Transparency = 1}):Play()
  526.     TweenService:Create(Main.Search.Input, TweenInfo.new(0.15, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play()
  527.  
  528.     for _, tabbtn in ipairs(TabList:GetChildren()) do
  529.         if tabbtn.ClassName == "Frame" and tabbtn.Name ~= "Placeholder" then
  530.             tabbtn.Interact.Visible = true
  531.             if tostring(Elements.UIPageLayout.CurrentPage) == tabbtn.Title.Text then
  532.                 TweenService:Create(tabbtn, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  533.                 TweenService:Create(tabbtn.Image, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 0}):Play()
  534.                 TweenService:Create(tabbtn.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  535.                 TweenService:Create(tabbtn.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  536.             else
  537.                 TweenService:Create(tabbtn, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0.7}):Play()
  538.                 TweenService:Create(tabbtn.Image, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 0.2}):Play()
  539.                 TweenService:Create(tabbtn.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0.2}):Play()
  540.                 TweenService:Create(tabbtn.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 0.5}):Play()
  541.             end
  542.         end
  543.     end
  544.  
  545.     Main.Search.Input.Text = ''
  546.     Main.Search.Input.Interactable = false
  547. end
  548.  
  549. local function Hide(notify: boolean?)
  550.     if MPrompt then
  551.         MPrompt.Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  552.         MPrompt.Position = UDim2.new(0.5, 0, 0, -50)
  553.         MPrompt.Size = UDim2.new(0, 40, 0, 10)
  554.         MPrompt.BackgroundTransparency = 1
  555.         MPrompt.Title.TextTransparency = 1
  556.         MPrompt.Visible = true
  557.     end
  558.  
  559.     task.spawn(closeSearch)
  560.  
  561.     Debounce = true
  562.     if notify then
  563.         if useMobilePrompt then
  564.             RayfieldLibrary:Notify({Title = "Interface Hidden", Content = "The interface has been hidden, you can unhide the interface by tapping 'Show Rayfield'.", Duration = 7, Image = 4400697855})
  565.         else
  566.             RayfieldLibrary:Notify({Title = "Interface Hidden", Content = "The interface has been hidden, you can unhide the interface by tapping K.", Duration = 7, Image = 4400697855})
  567.         end
  568.     end
  569.  
  570.     TweenService:Create(Main, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 470, 0, 0)}):Play()
  571.     TweenService:Create(Main.Topbar, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 470, 0, 45)}):Play()
  572.     TweenService:Create(Main, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  573.     TweenService:Create(Main.Topbar, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  574.     TweenService:Create(Main.Topbar.Divider, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  575.     TweenService:Create(Main.Topbar.CornerRepair, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  576.     TweenService:Create(Main.Topbar.Title, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  577.     TweenService:Create(Main.Shadow.Image, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  578.     TweenService:Create(Topbar.UIStroke, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  579.     TweenService:Create(dragBarCosmetic, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {BackgroundTransparency = 1}):Play()
  580.  
  581.     if useMobilePrompt and MPrompt then
  582.         TweenService:Create(MPrompt, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 120, 0, 30), Position = UDim2.new(0.5, 0, 0, 20), BackgroundTransparency = 0.3}):Play()
  583.         TweenService:Create(MPrompt.Title, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 0.3}):Play()
  584.     end
  585.  
  586.     for _, TopbarButton in ipairs(Topbar:GetChildren()) do
  587.         if TopbarButton.ClassName == "ImageButton" then
  588.             TweenService:Create(TopbarButton, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  589.         end
  590.     end
  591.  
  592.     for _, tabbtn in ipairs(TabList:GetChildren()) do
  593.         if tabbtn.ClassName == "Frame" and tabbtn.Name ~= "Placeholder" then
  594.             TweenService:Create(tabbtn, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  595.             TweenService:Create(tabbtn.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  596.             TweenService:Create(tabbtn.Image, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  597.             TweenService:Create(tabbtn.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  598.         end
  599.     end
  600.  
  601.     for _, tab in ipairs(Elements:GetChildren()) do
  602.         if tab.Name ~= "Template" and tab.ClassName == "ScrollingFrame" and tab.Name ~= "Placeholder" then
  603.             for _, element in ipairs(tab:GetChildren()) do
  604.                 if element.ClassName == "Frame" then
  605.                     if element.Name ~= "SectionSpacing" and element.Name ~= "Placeholder" then
  606.                         if element.Name == "SectionTitle" or element.Name == 'SearchTitle-fsefsefesfsefesfesfThanks' then
  607.                             TweenService:Create(element.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  608.                         elseif element.Name == 'Divider' then
  609.                             TweenService:Create(element.Divider, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  610.                         else
  611.                             TweenService:Create(element, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  612.                             TweenService:Create(element.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  613.                             TweenService:Create(element.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  614.                         end
  615.                         for _, child in ipairs(element:GetChildren()) do
  616.                             if child.ClassName == "Frame" or child.ClassName == "TextLabel" or child.ClassName == "TextBox" or child.ClassName == "ImageButton" or child.ClassName == "ImageLabel" then
  617.                                 child.Visible = false
  618.                             end
  619.                         end
  620.                     end
  621.                 end
  622.             end
  623.         end
  624.     end
  625.  
  626.     task.wait(0.5)
  627.     Main.Visible = false
  628.     Debounce = false
  629. end
  630.  
  631. local function Maximise()
  632.     Debounce = true
  633.     Topbar.ChangeSize.Image = "rbxassetid://"..10137941941
  634.  
  635.     TweenService:Create(Topbar.UIStroke, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  636.     TweenService:Create(Main.Shadow.Image, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {ImageTransparency = 0.6}):Play()
  637.     TweenService:Create(Topbar.CornerRepair, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  638.     TweenService:Create(Topbar.Divider, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  639.     TweenService:Create(dragBarCosmetic, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {BackgroundTransparency = 0.7}):Play()
  640.     TweenService:Create(Main, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = useMobileSizing and UDim2.new(0, 500, 0, 275) or UDim2.new(0, 500, 0, 475)}):Play()
  641.     TweenService:Create(Topbar, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 500, 0, 45)}):Play()
  642.     TabList.Visible = true
  643.     task.wait(0.2)
  644.  
  645.     Elements.Visible = true
  646.  
  647.     for _, tab in ipairs(Elements:GetChildren()) do
  648.         if tab.Name ~= "Template" and tab.ClassName == "ScrollingFrame" and tab.Name ~= "Placeholder" then
  649.             for _, element in ipairs(tab:GetChildren()) do
  650.                 if element.ClassName == "Frame" then
  651.                     if element.Name ~= "SectionSpacing" and element.Name ~= "Placeholder" then
  652.                         if element.Name == "SectionTitle" or element.Name == 'SearchTitle-fsefsefesfsefesfesfThanks' then
  653.                             TweenService:Create(element.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0.4}):Play()
  654.                         elseif element.Name == 'Divider' then
  655.                             TweenService:Create(element.Divider, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0.85}):Play()
  656.                         else
  657.                             TweenService:Create(element, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  658.                             TweenService:Create(element.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  659.                             TweenService:Create(element.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  660.                         end
  661.                         for _, child in ipairs(element:GetChildren()) do
  662.                             if child.ClassName == "Frame" or child.ClassName == "TextLabel" or child.ClassName == "TextBox" or child.ClassName == "ImageButton" or child.ClassName == "ImageLabel" then
  663.                                 child.Visible = true
  664.                             end
  665.                         end
  666.                     end
  667.                 end
  668.             end
  669.         end
  670.     end
  671.  
  672.     task.wait(0.1)
  673.  
  674.     for _, tabbtn in ipairs(TabList:GetChildren()) do
  675.         if tabbtn.ClassName == "Frame" and tabbtn.Name ~= "Placeholder" then
  676.             if tostring(Elements.UIPageLayout.CurrentPage) == tabbtn.Title.Text then
  677.                 TweenService:Create(tabbtn, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  678.                 TweenService:Create(tabbtn.Image, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 0}):Play()
  679.                 TweenService:Create(tabbtn.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  680.                 TweenService:Create(tabbtn.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  681.             else
  682.                 TweenService:Create(tabbtn, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0.7}):Play()
  683.                 TweenService:Create(tabbtn.Image, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 0.2}):Play()
  684.                 TweenService:Create(tabbtn.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0.2}):Play()
  685.                 TweenService:Create(tabbtn.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 0.5}):Play()
  686.             end
  687.  
  688.         end
  689.     end
  690.  
  691.     task.wait(0.5)
  692.     Debounce = false
  693. end
  694.  
  695.  
  696. local function Unhide()
  697.     Debounce = true
  698.     Main.Position = UDim2.new(0.5, 0, 0.5, 0)
  699.     Main.Visible = true
  700.     TweenService:Create(Main, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = useMobileSizing and UDim2.new(0, 500, 0, 275) or UDim2.new(0, 500, 0, 475)}):Play()
  701.     TweenService:Create(Main.Topbar, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 500, 0, 45)}):Play()
  702.     TweenService:Create(Main.Shadow.Image, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageTransparency = 0.6}):Play()
  703.     TweenService:Create(Main, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  704.     TweenService:Create(Main.Topbar, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  705.     TweenService:Create(Main.Topbar.Divider, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  706.     TweenService:Create(Main.Topbar.CornerRepair, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  707.     TweenService:Create(Main.Topbar.Title, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  708.  
  709.     if MPrompt then
  710.         TweenService:Create(MPrompt, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 40, 0, 10), Position = UDim2.new(0.5, 0, 0, -50), BackgroundTransparency = 1}):Play()
  711.         TweenService:Create(MPrompt.Title, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  712.  
  713.         task.spawn(function()
  714.             task.wait(0.5)
  715.             MPrompt.Visible = false
  716.         end)
  717.     end
  718.  
  719.     if Minimised then
  720.         task.spawn(Maximise)
  721.     end
  722.  
  723.     for _, TopbarButton in ipairs(Topbar:GetChildren()) do
  724.         if TopbarButton.ClassName == "ImageButton" then
  725.             if TopbarButton.Name == 'Icon' then
  726.                 TweenService:Create(TopbarButton, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageTransparency = 0}):Play()
  727.             else
  728.                 TweenService:Create(TopbarButton, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageTransparency = 0.8}):Play()
  729.             end
  730.  
  731.         end
  732.     end
  733.  
  734.     for _, tabbtn in ipairs(TabList:GetChildren()) do
  735.         if tabbtn.ClassName == "Frame" and tabbtn.Name ~= "Placeholder" then
  736.             if tostring(Elements.UIPageLayout.CurrentPage) == tabbtn.Title.Text then
  737.                 TweenService:Create(tabbtn, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  738.                 TweenService:Create(tabbtn.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  739.                 TweenService:Create(tabbtn.Image, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 0}):Play()
  740.                 TweenService:Create(tabbtn.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  741.             else
  742.                 TweenService:Create(tabbtn, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0.7}):Play()
  743.                 TweenService:Create(tabbtn.Image, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 0.2}):Play()
  744.                 TweenService:Create(tabbtn.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0.2}):Play()
  745.                 TweenService:Create(tabbtn.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 0.5}):Play()
  746.             end
  747.         end
  748.     end
  749.  
  750.     for _, tab in ipairs(Elements:GetChildren()) do
  751.         if tab.Name ~= "Template" and tab.ClassName == "ScrollingFrame" and tab.Name ~= "Placeholder" then
  752.             for _, element in ipairs(tab:GetChildren()) do
  753.                 if element.ClassName == "Frame" then
  754.                     if element.Name ~= "SectionSpacing" and element.Name ~= "Placeholder" then
  755.                         if element.Name == "SectionTitle" or element.Name == 'SearchTitle-fsefsefesfsefesfesfThanks' then
  756.                             TweenService:Create(element.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0.4}):Play()
  757.                         elseif element.Name == 'Divider' then
  758.                             TweenService:Create(element.Divider, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0.85}):Play()
  759.                         else
  760.                             TweenService:Create(element, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  761.                             TweenService:Create(element.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  762.                             TweenService:Create(element.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  763.                         end
  764.                         for _, child in ipairs(element:GetChildren()) do
  765.                             if child.ClassName == "Frame" or child.ClassName == "TextLabel" or child.ClassName == "TextBox" or child.ClassName == "ImageButton" or child.ClassName == "ImageLabel" then
  766.                                 child.Visible = true
  767.                             end
  768.                         end
  769.                     end
  770.                 end
  771.             end
  772.         end
  773.     end
  774.  
  775.     TweenService:Create(dragBarCosmetic, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {BackgroundTransparency = 0.5}):Play()
  776.  
  777.     task.wait(0.5)
  778.     Minimised = false
  779.     Debounce = false
  780. end
  781.  
  782. local function Minimise()
  783.     Debounce = true
  784.     Topbar.ChangeSize.Image = "rbxassetid://"..11036884234
  785.  
  786.     Topbar.UIStroke.Color = SelectedTheme.ElementStroke
  787.  
  788.     task.spawn(closeSearch)
  789.  
  790.     for _, tabbtn in ipairs(TabList:GetChildren()) do
  791.         if tabbtn.ClassName == "Frame" and tabbtn.Name ~= "Placeholder" then
  792.             TweenService:Create(tabbtn, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  793.             TweenService:Create(tabbtn.Image, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  794.             TweenService:Create(tabbtn.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  795.             TweenService:Create(tabbtn.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  796.         end
  797.     end
  798.  
  799.     for _, tab in ipairs(Elements:GetChildren()) do
  800.         if tab.Name ~= "Template" and tab.ClassName == "ScrollingFrame" and tab.Name ~= "Placeholder" then
  801.             for _, element in ipairs(tab:GetChildren()) do
  802.                 if element.ClassName == "Frame" then
  803.                     if element.Name ~= "SectionSpacing" and element.Name ~= "Placeholder" then
  804.                         if element.Name == "SectionTitle" or element.Name == 'SearchTitle-fsefsefesfsefesfesfThanks' then
  805.                             TweenService:Create(element.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  806.                         elseif element.Name == 'Divider' then
  807.                             TweenService:Create(element.Divider, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  808.                         else
  809.                             TweenService:Create(element, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  810.                             TweenService:Create(element.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  811.                             TweenService:Create(element.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  812.                         end
  813.                         for _, child in ipairs(element:GetChildren()) do
  814.                             if child.ClassName == "Frame" or child.ClassName == "TextLabel" or child.ClassName == "TextBox" or child.ClassName == "ImageButton" or child.ClassName == "ImageLabel" then
  815.                                 child.Visible = false
  816.                             end
  817.                         end
  818.                     end
  819.                 end
  820.             end
  821.         end
  822.     end
  823.  
  824.     TweenService:Create(dragBarCosmetic, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {BackgroundTransparency = 1}):Play()
  825.     TweenService:Create(Topbar.UIStroke, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  826.     TweenService:Create(Main.Shadow.Image, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  827.     TweenService:Create(Topbar.CornerRepair, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  828.     TweenService:Create(Topbar.Divider, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  829.     TweenService:Create(Main, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 495, 0, 45)}):Play()
  830.     TweenService:Create(Topbar, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 495, 0, 45)}):Play()
  831.  
  832.     task.wait(0.3)
  833.  
  834.     Elements.Visible = false
  835.     TabList.Visible = false
  836.  
  837.     task.wait(0.2)
  838.     Debounce = false
  839. end
  840.  
  841. function RayfieldLibrary:CreateWindow(Settings)
  842.     if not correctBuild and not Settings.DisableBuildWarnings then
  843.         task.delay(3,
  844.             function()
  845.                 RayfieldLibrary:Notify({Title = 'Build Mismatch', Content = 'Rayfield may encounter issues as you are running an incompatible interface version ('.. ((Rayfield:FindFirstChild('Build') and Rayfield.Build.Value) or 'No Build') ..').\n\nThis version of Rayfield is intended for interface build '..InterfaceBuild..'.\n\nTry rejoining and then run the script twice.', Image = 4335487866, Duration = 15})     
  846.             end)
  847.     end
  848.  
  849.     local Passthrough = false
  850.     Topbar.Title.Text = Settings.Name
  851.  
  852.     Main.Size = UDim2.new(0, 420, 0, 100)
  853.     Main.Visible = true
  854.     Main.BackgroundTransparency = 1
  855.     if Main:FindFirstChild('Notice') then Main.Notice.Visible = false end
  856.     Main.Shadow.Image.ImageTransparency = 1
  857.  
  858.     LoadingFrame.Title.TextTransparency = 1
  859.     LoadingFrame.Subtitle.TextTransparency = 1
  860.  
  861.     LoadingFrame.Version.TextTransparency = 1
  862.     LoadingFrame.Title.Text = Settings.LoadingTitle or "Rayfield"
  863.     LoadingFrame.Subtitle.Text = Settings.LoadingSubtitle or "Interface Suite"
  864.  
  865.     if Settings.LoadingTitle ~= "Rayfield Interface Suite" then
  866.         LoadingFrame.Version.Text = "Rayfield UI"
  867.     end
  868.  
  869.     if Settings.Icon and Settings.Icon ~= 0 and Topbar:FindFirstChild('Icon') then
  870.         Topbar.Icon.Visible = true
  871.         Topbar.Title.Position = UDim2.new(0, 47, 0.5, 0)
  872.  
  873.         if Settings.Icon then
  874.             if typeof(Settings.Icon) == 'string' then
  875.                 local asset = getIcon(Settings.Icon)
  876.  
  877.                 Topbar.Icon.Image = 'rbxassetid://'..asset.id
  878.                 Topbar.Icon.ImageRectOffset = asset.imageRectOffset
  879.                 Topbar.Icon.ImageRectSize = asset.imageRectSize
  880.             else
  881.                 Topbar.Icon.Image = "rbxassetid://" .. (Settings.Icon or 0)
  882.             end
  883.         else
  884.             Topbar.Icon.Image = "rbxassetid://" .. 0
  885.         end
  886.     end
  887.  
  888.     if dragBar then
  889.         dragBar.Visible = false
  890.         dragBarCosmetic.BackgroundTransparency = 1
  891.         dragBar.Visible = true
  892.     end
  893.  
  894.     if Settings.Theme then
  895.         local success, result = pcall(ChangeTheme, Settings.Theme)
  896.         if not success then
  897.             local success, result2 = pcall(ChangeTheme, 'Default')
  898.             if not success then
  899.                 warn('CRITICAL ERROR - NO DEFAULT THEME')
  900.                 print(result2)
  901.             end
  902.             warn('issue rendering theme. no theme on file')
  903.             print(result)
  904.         end
  905.     end
  906.  
  907.     Topbar.Visible = false
  908.     Elements.Visible = false
  909.     LoadingFrame.Visible = true
  910.  
  911.     if not Settings.DisableRayfieldPrompts then
  912.         task.spawn(function()
  913.             while true do
  914.                 task.wait(math.random(180, 600))
  915.                 RayfieldLibrary:Notify({
  916.                     Title = "Rayfield Interface",
  917.                     Content = "Enjoying this UI library? Find it at sirius.menu/discord",
  918.                     Duration = 7,
  919.                     Image = 4370033185,
  920.                 })
  921.             end
  922.         end)
  923.     end
  924.  
  925.     pcall(function()
  926.         if not Settings.ConfigurationSaving.FileName then
  927.             Settings.ConfigurationSaving.FileName = tostring(game.PlaceId)
  928.         end
  929.  
  930.         if Settings.ConfigurationSaving.Enabled == nil then
  931.             Settings.ConfigurationSaving.Enabled = false
  932.         end
  933.  
  934.         CFileName = Settings.ConfigurationSaving.FileName
  935.         ConfigurationFolder = Settings.ConfigurationSaving.FolderName or ConfigurationFolder
  936.         CEnabled = Settings.ConfigurationSaving.Enabled
  937.  
  938.         if Settings.ConfigurationSaving.Enabled then
  939.             if not isfolder(ConfigurationFolder) then
  940.                 makefolder(ConfigurationFolder)
  941.             end
  942.         end
  943.     end)
  944.  
  945.  
  946.     makeDraggable(Main, Topbar, false, {255, 150})
  947.     if dragBar then dragBar.Position = useMobileSizing and UDim2.new(0.5, 0, 0.5, 150) or UDim2.new(0.5, 0, 0.5, 255) makeDraggable(Main, dragInteract, true, {255, 150}) end
  948.  
  949.     for _, TabButton in ipairs(TabList:GetChildren()) do
  950.         if TabButton.ClassName == "Frame" and TabButton.Name ~= "Placeholder" then
  951.             TabButton.BackgroundTransparency = 1
  952.             TabButton.Title.TextTransparency = 1
  953.             TabButton.Image.ImageTransparency = 1
  954.             TabButton.UIStroke.Transparency = 1
  955.         end
  956.     end
  957.  
  958.     if (Settings.KeySystem) then
  959.         if not Settings.KeySettings then
  960.             Passthrough = true
  961.             return
  962.         end
  963.  
  964.         if isfolder and not isfolder(RayfieldFolder.."/Key System") then
  965.             makefolder(RayfieldFolder.."/Key System")
  966.         end
  967.  
  968.         if typeof(Settings.KeySettings.Key) == "string" then Settings.KeySettings.Key = {Settings.KeySettings.Key} end
  969.  
  970.         if Settings.KeySettings.GrabKeyFromSite then
  971.             for i, Key in ipairs(Settings.KeySettings.Key) do
  972.                 local Success, Response = pcall(function()
  973.                     Settings.KeySettings.Key[i] = tostring(game:HttpGet(Key):gsub("[\n\r]", " "))
  974.                     Settings.KeySettings.Key[i] = string.gsub(Settings.KeySettings.Key[i], " ", "")
  975.                 end)
  976.                 if not Success then
  977.                     print("Rayfield | "..Key.." Error " ..tostring(Response))
  978.                     warn('Check docs.sirius.menu for help with Rayfield specific development.')
  979.                 end
  980.             end
  981.         end
  982.  
  983.         if not Settings.KeySettings.FileName then
  984.             Settings.KeySettings.FileName = "No file name specified"
  985.         end
  986.  
  987.         if isfile and isfile(RayfieldFolder.."/Key System".."/"..Settings.KeySettings.FileName..ConfigurationExtension) then
  988.             for _, MKey in ipairs(Settings.KeySettings.Key) do
  989.                 if string.find(readfile(RayfieldFolder.."/Key System".."/"..Settings.KeySettings.FileName..ConfigurationExtension), MKey) then
  990.                     Passthrough = true
  991.                 end
  992.             end
  993.         end
  994.  
  995.         if not Passthrough then
  996.             local AttemptsRemaining = math.random(2, 5)
  997.             Rayfield.Enabled = false
  998.             local KeyUI = useStudio and script.Parent:FindFirstChild('Key') or game:GetObjects("rbxassetid://11380036235")[1]
  999.  
  1000.             KeyUI.Enabled = true
  1001.  
  1002.             if gethui then
  1003.                 KeyUI.Parent = gethui()
  1004.             elseif syn and syn.protect_gui then
  1005.                 syn.protect_gui(KeyUI)
  1006.                 KeyUI.Parent = CoreGui
  1007.             elseif not useStudio and CoreGui:FindFirstChild("RobloxGui") then
  1008.                 KeyUI.Parent = CoreGui:FindFirstChild("RobloxGui")
  1009.             elseif not useStudio then
  1010.                 KeyUI.Parent = CoreGui
  1011.             end
  1012.  
  1013.             if gethui then
  1014.                 for _, Interface in ipairs(gethui():GetChildren()) do
  1015.                     if Interface.Name == KeyUI.Name and Interface ~= KeyUI then
  1016.                         Interface.Enabled = false
  1017.                         Interface.Name = "KeyUI-Old"
  1018.                     end
  1019.                 end
  1020.             elseif not useStudio then
  1021.                 for _, Interface in ipairs(CoreGui:GetChildren()) do
  1022.                     if Interface.Name == KeyUI.Name and Interface ~= KeyUI then
  1023.                         Interface.Enabled = false
  1024.                         Interface.Name = "KeyUI-Old"
  1025.                     end
  1026.                 end
  1027.             end
  1028.  
  1029.             local KeyMain = KeyUI.Main
  1030.             KeyMain.Title.Text = Settings.KeySettings.Title or Settings.Name
  1031.             KeyMain.Subtitle.Text = Settings.KeySettings.Subtitle or "Key System"
  1032.             KeyMain.NoteMessage.Text = Settings.KeySettings.Note or "No instructions"
  1033.  
  1034.             KeyMain.Size = UDim2.new(0, 467, 0, 175)
  1035.             KeyMain.BackgroundTransparency = 1
  1036.             KeyMain.Shadow.Image.ImageTransparency = 1
  1037.             KeyMain.Title.TextTransparency = 1
  1038.             KeyMain.Subtitle.TextTransparency = 1
  1039.             KeyMain.KeyNote.TextTransparency = 1
  1040.             KeyMain.Input.BackgroundTransparency = 1
  1041.             KeyMain.Input.UIStroke.Transparency = 1
  1042.             KeyMain.Input.InputBox.TextTransparency = 1
  1043.             KeyMain.NoteTitle.TextTransparency = 1
  1044.             KeyMain.NoteMessage.TextTransparency = 1
  1045.             KeyMain.Hide.ImageTransparency = 1
  1046.  
  1047.             TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1048.             TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 500, 0, 187)}):Play()
  1049.             TweenService:Create(KeyMain.Shadow.Image, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {ImageTransparency = 0.5}):Play()
  1050.             task.wait(0.05)
  1051.             TweenService:Create(KeyMain.Title, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1052.             TweenService:Create(KeyMain.Subtitle, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1053.             task.wait(0.05)
  1054.             TweenService:Create(KeyMain.KeyNote, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1055.             TweenService:Create(KeyMain.Input, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1056.             TweenService:Create(KeyMain.Input.UIStroke, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  1057.             TweenService:Create(KeyMain.Input.InputBox, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1058.             task.wait(0.05)
  1059.             TweenService:Create(KeyMain.NoteTitle, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1060.             TweenService:Create(KeyMain.NoteMessage, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1061.             task.wait(0.15)
  1062.             TweenService:Create(KeyMain.Hide, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {ImageTransparency = 0.3}):Play()
  1063.  
  1064.  
  1065.             KeyUI.Main.Input.InputBox.FocusLost:Connect(function()
  1066.                 if #KeyUI.Main.Input.InputBox.Text == 0 then return end
  1067.                 local KeyFound = false
  1068.                 local FoundKey = ''
  1069.                 for _, MKey in ipairs(Settings.KeySettings.Key) do
  1070.                     --if string.find(KeyMain.Input.InputBox.Text, MKey) then
  1071.                     --  KeyFound = true
  1072.                     --  FoundKey = MKey
  1073.                     --end
  1074.  
  1075.  
  1076.                     -- stricter key check
  1077.                     if KeyMain.Input.InputBox.Text == MKey then
  1078.                         KeyFound = true
  1079.                         FoundKey = MKey
  1080.                     end
  1081.                 end
  1082.                 if KeyFound then
  1083.                     TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1084.                     TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 467, 0, 175)}):Play()
  1085.                     TweenService:Create(KeyMain.Shadow.Image, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  1086.                     TweenService:Create(KeyMain.Title, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1087.                     TweenService:Create(KeyMain.Subtitle, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1088.                     TweenService:Create(KeyMain.KeyNote, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1089.                     TweenService:Create(KeyMain.Input, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1090.                     TweenService:Create(KeyMain.Input.UIStroke, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1091.                     TweenService:Create(KeyMain.Input.InputBox, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1092.                     TweenService:Create(KeyMain.NoteTitle, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1093.                     TweenService:Create(KeyMain.NoteMessage, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1094.                     TweenService:Create(KeyMain.Hide, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  1095.                     task.wait(0.51)
  1096.                     Passthrough = true
  1097.                     KeyMain.Visible = false
  1098.                     if Settings.KeySettings.SaveKey then
  1099.                         if writefile then
  1100.                             writefile(RayfieldFolder.."/Key System".."/"..Settings.KeySettings.FileName..ConfigurationExtension, FoundKey)
  1101.                         end
  1102.                         RayfieldLibrary:Notify({Title = "Key System", Content = "The key for this script has been saved successfully.", Image = 3605522284})
  1103.                     end
  1104.                 else
  1105.                     if AttemptsRemaining == 0 then
  1106.                         TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1107.                         TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 467, 0, 175)}):Play()
  1108.                         TweenService:Create(KeyMain.Shadow.Image, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  1109.                         TweenService:Create(KeyMain.Title, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1110.                         TweenService:Create(KeyMain.Subtitle, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1111.                         TweenService:Create(KeyMain.KeyNote, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1112.                         TweenService:Create(KeyMain.Input, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1113.                         TweenService:Create(KeyMain.Input.UIStroke, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1114.                         TweenService:Create(KeyMain.Input.InputBox, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1115.                         TweenService:Create(KeyMain.NoteTitle, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1116.                         TweenService:Create(KeyMain.NoteMessage, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1117.                         TweenService:Create(KeyMain.Hide, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  1118.                         task.wait(0.45)
  1119.                         game.Players.LocalPlayer:Kick("No Attempts Remaining")
  1120.                         game:Shutdown()
  1121.                     end
  1122.                     KeyMain.Input.InputBox.Text = ""
  1123.                     AttemptsRemaining = AttemptsRemaining - 1
  1124.                     TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 467, 0, 175)}):Play()
  1125.                     TweenService:Create(KeyMain, TweenInfo.new(0.4, Enum.EasingStyle.Elastic), {Position = UDim2.new(0.495,0,0.5,0)}):Play()
  1126.                     task.wait(0.1)
  1127.                     TweenService:Create(KeyMain, TweenInfo.new(0.4, Enum.EasingStyle.Elastic), {Position = UDim2.new(0.505,0,0.5,0)}):Play()
  1128.                     task.wait(0.1)
  1129.                     TweenService:Create(KeyMain, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {Position = UDim2.new(0.5,0,0.5,0)}):Play()
  1130.                     TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 500, 0, 187)}):Play()
  1131.                 end
  1132.             end)
  1133.  
  1134.             KeyMain.Hide.MouseButton1Click:Connect(function()
  1135.                 TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1136.                 TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 467, 0, 175)}):Play()
  1137.                 TweenService:Create(KeyMain.Shadow.Image, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  1138.                 TweenService:Create(KeyMain.Title, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1139.                 TweenService:Create(KeyMain.Subtitle, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1140.                 TweenService:Create(KeyMain.KeyNote, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1141.                 TweenService:Create(KeyMain.Input, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1142.                 TweenService:Create(KeyMain.Input.UIStroke, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1143.                 TweenService:Create(KeyMain.Input.InputBox, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1144.                 TweenService:Create(KeyMain.NoteTitle, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1145.                 TweenService:Create(KeyMain.NoteMessage, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1146.                 TweenService:Create(KeyMain.Hide, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  1147.                 task.wait(0.51)
  1148.                 RayfieldLibrary:Destroy()
  1149.                 KeyUI:Destroy()
  1150.             end)
  1151.         else
  1152.             Passthrough = true
  1153.         end
  1154.     end
  1155.     if Settings.KeySystem then
  1156.         repeat task.wait() until Passthrough
  1157.     end
  1158.  
  1159.     Notifications.Template.Visible = false
  1160.     Notifications.Visible = true
  1161.     Rayfield.Enabled = true
  1162.  
  1163.     task.wait(0.5)
  1164.     TweenService:Create(Main, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1165.     TweenService:Create(Main.Shadow.Image, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageTransparency = 0.6}):Play()
  1166.     task.wait(0.1)
  1167.     TweenService:Create(LoadingFrame.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1168.     task.wait(0.05)
  1169.     TweenService:Create(LoadingFrame.Subtitle, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1170.     task.wait(0.05)
  1171.     TweenService:Create(LoadingFrame.Version, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1172.  
  1173.  
  1174.     Elements.Template.LayoutOrder = 100000
  1175.     Elements.Template.Visible = false
  1176.  
  1177.     Elements.UIPageLayout.FillDirection = Enum.FillDirection.Horizontal
  1178.     TabList.Template.Visible = false
  1179.  
  1180.     -- Tab
  1181.     local FirstTab = false
  1182.     local Window = {}
  1183.     function Window:CreateTab(Name, Image)
  1184.         local SDone = false
  1185.         local TabButton = TabList.Template:Clone()
  1186.         TabButton.Name = Name
  1187.         TabButton.Title.Text = Name
  1188.         TabButton.Parent = TabList
  1189.         TabButton.Title.TextWrapped = false
  1190.         TabButton.Size = UDim2.new(0, TabButton.Title.TextBounds.X + 30, 0, 30)
  1191.  
  1192.         if Image then
  1193.             if typeof(Image) == 'string' then
  1194.                 local asset = getIcon(Image)
  1195.  
  1196.                 TabButton.Image.Image = 'rbxassetid://'..asset.id
  1197.                 TabButton.Image.ImageRectOffset = asset.imageRectOffset
  1198.                 TabButton.Image.ImageRectSize = asset.imageRectSize
  1199.             else
  1200.                 TabButton.Image.Image = "rbxassetid://"..Image
  1201.             end
  1202.  
  1203.             TabButton.Title.AnchorPoint = Vector2.new(0, 0.5)
  1204.             TabButton.Title.Position = UDim2.new(0, 37, 0.5, 0)
  1205.             TabButton.Image.Visible = true
  1206.             TabButton.Title.TextXAlignment = Enum.TextXAlignment.Left
  1207.             TabButton.Size = UDim2.new(0, TabButton.Title.TextBounds.X + 52, 0, 30)
  1208.         end
  1209.  
  1210.  
  1211.  
  1212.         TabButton.BackgroundTransparency = 1
  1213.         TabButton.Title.TextTransparency = 1
  1214.         TabButton.Image.ImageTransparency = 1
  1215.         TabButton.UIStroke.Transparency = 1
  1216.  
  1217.         TabButton.Visible = true
  1218.  
  1219.         -- Create Elements Page
  1220.         local TabPage = Elements.Template:Clone()
  1221.         TabPage.Name = Name
  1222.         TabPage.Visible = true
  1223.  
  1224.         TabPage.LayoutOrder = #Elements:GetChildren()
  1225.  
  1226.         for _, TemplateElement in ipairs(TabPage:GetChildren()) do
  1227.             if TemplateElement.ClassName == "Frame" and TemplateElement.Name ~= "Placeholder" then
  1228.                 TemplateElement:Destroy()
  1229.             end
  1230.         end
  1231.  
  1232.         TabPage.Parent = Elements
  1233.         if not FirstTab then
  1234.             Elements.UIPageLayout.Animated = false
  1235.             Elements.UIPageLayout:JumpTo(TabPage)
  1236.             Elements.UIPageLayout.Animated = true
  1237.         end
  1238.  
  1239.         TabButton.UIStroke.Color = SelectedTheme.TabStroke
  1240.  
  1241.         if Elements.UIPageLayout.CurrentPage == TabPage then
  1242.             TabButton.BackgroundColor3 = SelectedTheme.TabBackgroundSelected
  1243.             TabButton.Image.ImageColor3 = SelectedTheme.SelectedTabTextColor
  1244.             TabButton.Title.TextColor3 = SelectedTheme.SelectedTabTextColor
  1245.         else
  1246.             TabButton.BackgroundColor3 = SelectedTheme.TabBackground
  1247.             TabButton.Image.ImageColor3 = SelectedTheme.TabTextColor
  1248.             TabButton.Title.TextColor3 = SelectedTheme.TabTextColor
  1249.         end
  1250.  
  1251.  
  1252.         -- Animate
  1253.         task.wait(0.1)
  1254.         if FirstTab then
  1255.             TabButton.BackgroundColor3 = SelectedTheme.TabBackground
  1256.             TabButton.Image.ImageColor3 = SelectedTheme.TabTextColor
  1257.             TabButton.Title.TextColor3 = SelectedTheme.TabTextColor
  1258.             TweenService:Create(TabButton, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0.7}):Play()
  1259.             TweenService:Create(TabButton.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0.2}):Play()
  1260.             TweenService:Create(TabButton.Image, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageTransparency = 0.2}):Play()
  1261.             TweenService:Create(TabButton.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Transparency = 0.5}):Play()
  1262.         else
  1263.             FirstTab = Name
  1264.             TabButton.BackgroundColor3 = SelectedTheme.TabBackgroundSelected
  1265.             TabButton.Image.ImageColor3 = SelectedTheme.SelectedTabTextColor
  1266.             TabButton.Title.TextColor3 = SelectedTheme.SelectedTabTextColor
  1267.             TweenService:Create(TabButton.Image, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageTransparency = 0}):Play()
  1268.             TweenService:Create(TabButton, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1269.             TweenService:Create(TabButton.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1270.         end
  1271.  
  1272.  
  1273.         TabButton.Interact.MouseButton1Click:Connect(function()
  1274.             if Minimised then return end
  1275.             TweenService:Create(TabButton, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1276.             TweenService:Create(TabButton.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1277.             TweenService:Create(TabButton.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1278.             TweenService:Create(TabButton.Image, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageTransparency = 0}):Play()
  1279.             TweenService:Create(TabButton, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.TabBackgroundSelected}):Play()
  1280.             TweenService:Create(TabButton.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextColor3 = SelectedTheme.SelectedTabTextColor}):Play()
  1281.             TweenService:Create(TabButton.Image, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageColor3 = SelectedTheme.SelectedTabTextColor}):Play()
  1282.  
  1283.             for _, OtherTabButton in ipairs(TabList:GetChildren()) do
  1284.                 if OtherTabButton.Name ~= "Template" and OtherTabButton.ClassName == "Frame" and OtherTabButton ~= TabButton and OtherTabButton.Name ~= "Placeholder" then
  1285.                     TweenService:Create(OtherTabButton, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.TabBackground}):Play()
  1286.                     TweenService:Create(OtherTabButton.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextColor3 = SelectedTheme.TabTextColor}):Play()
  1287.                     TweenService:Create(OtherTabButton.Image, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageColor3 = SelectedTheme.TabTextColor}):Play()
  1288.                     TweenService:Create(OtherTabButton, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0.7}):Play()
  1289.                     TweenService:Create(OtherTabButton.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0.2}):Play()
  1290.                     TweenService:Create(OtherTabButton.Image, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageTransparency = 0.2}):Play()
  1291.                     TweenService:Create(OtherTabButton.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Transparency = 0.5}):Play()
  1292.                 end
  1293.             end
  1294.             if Elements.UIPageLayout.CurrentPage ~= TabPage then
  1295.                 Elements.UIPageLayout:JumpTo(TabPage)
  1296.             end
  1297.  
  1298.         end)
  1299.  
  1300.         local Tab = {}
  1301.  
  1302.         -- Button
  1303.         function Tab:CreateButton(ButtonSettings)
  1304.             local ButtonValue = {}
  1305.  
  1306.             local Button = Elements.Template.Button:Clone()
  1307.             Button.Name = ButtonSettings.Name
  1308.             Button.Title.Text = ButtonSettings.Name
  1309.             Button.Visible = true
  1310.             Button.Parent = TabPage
  1311.  
  1312.             Button.BackgroundTransparency = 1
  1313.             Button.UIStroke.Transparency = 1
  1314.             Button.Title.TextTransparency = 1
  1315.  
  1316.             TweenService:Create(Button, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1317.             TweenService:Create(Button.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  1318.             TweenService:Create(Button.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play() 
  1319.  
  1320.  
  1321.             Button.Interact.MouseButton1Click:Connect(function()
  1322.                 local Success, Response = pcall(ButtonSettings.Callback)
  1323.                 if not Success then
  1324.                     TweenService:Create(Button, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play()
  1325.                     TweenService:Create(Button.ElementIndicator, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1326.                     TweenService:Create(Button.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1327.                     Button.Title.Text = "Callback Error"
  1328.                     print("Rayfield | "..ButtonSettings.Name.." Callback Error " ..tostring(Response))
  1329.                     warn('Check docs.sirius.menu for help with Rayfield specific development.')
  1330.                     task.wait(0.5)
  1331.                     Button.Title.Text = ButtonSettings.Name
  1332.                     TweenService:Create(Button, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  1333.                     TweenService:Create(Button.ElementIndicator, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {TextTransparency = 0.9}):Play()
  1334.                     TweenService:Create(Button.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  1335.                 else
  1336.                     SaveConfiguration()
  1337.                     TweenService:Create(Button, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  1338.                     TweenService:Create(Button.ElementIndicator, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1339.                     TweenService:Create(Button.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1340.                     task.wait(0.2)
  1341.                     TweenService:Create(Button, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  1342.                     TweenService:Create(Button.ElementIndicator, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {TextTransparency = 0.9}):Play()
  1343.                     TweenService:Create(Button.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  1344.                 end
  1345.             end)
  1346.  
  1347.             Button.MouseEnter:Connect(function()
  1348.                 TweenService:Create(Button, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  1349.                 TweenService:Create(Button.ElementIndicator, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {TextTransparency = 0.7}):Play()
  1350.             end)
  1351.  
  1352.             Button.MouseLeave:Connect(function()
  1353.                 TweenService:Create(Button, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  1354.                 TweenService:Create(Button.ElementIndicator, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {TextTransparency = 0.9}):Play()
  1355.             end)
  1356.  
  1357.             function ButtonValue:Set(NewButton)
  1358.                 Button.Title.Text = NewButton
  1359.                 Button.Name = NewButton
  1360.             end
  1361.  
  1362.             return ButtonValue
  1363.         end
  1364.  
  1365.         -- ColorPicker
  1366.         function Tab:CreateColorPicker(ColorPickerSettings) -- by Throit
  1367.             ColorPickerSettings.Type = "ColorPicker"
  1368.             local ColorPicker = Elements.Template.ColorPicker:Clone()
  1369.             local Background = ColorPicker.CPBackground
  1370.             local Display = Background.Display
  1371.             local Main = Background.MainCP
  1372.             local Slider = ColorPicker.ColorSlider
  1373.             ColorPicker.ClipsDescendants = true
  1374.             ColorPicker.Name = ColorPickerSettings.Name
  1375.             ColorPicker.Title.Text = ColorPickerSettings.Name
  1376.             ColorPicker.Visible = true
  1377.             ColorPicker.Parent = TabPage
  1378.             ColorPicker.Size = UDim2.new(1, -10, 0, 45)
  1379.             Background.Size = UDim2.new(0, 39, 0, 22)
  1380.             Display.BackgroundTransparency = 0
  1381.             Main.MainPoint.ImageTransparency = 1
  1382.             ColorPicker.Interact.Size = UDim2.new(1, 0, 1, 0)
  1383.             ColorPicker.Interact.Position = UDim2.new(0.5, 0, 0.5, 0)
  1384.             ColorPicker.RGB.Position = UDim2.new(0, 17, 0, 70)
  1385.             ColorPicker.HexInput.Position = UDim2.new(0, 17, 0, 90)
  1386.             Main.ImageTransparency = 1
  1387.             Background.BackgroundTransparency = 1
  1388.  
  1389.             for _, rgbinput in ipairs(ColorPicker.RGB:GetChildren()) do
  1390.                 if rgbinput:IsA("Frame") then
  1391.                     rgbinput.BackgroundColor3 = SelectedTheme.InputBackground
  1392.                     rgbinput.UIStroke.Color = SelectedTheme.InputStroke
  1393.                 end
  1394.             end
  1395.  
  1396.             ColorPicker.HexInput.BackgroundColor3 = SelectedTheme.InputBackground
  1397.             ColorPicker.HexInput.UIStroke.Color = SelectedTheme.InputStroke
  1398.  
  1399.             local opened = false
  1400.             local mouse = game.Players.LocalPlayer:GetMouse()
  1401.             Main.Image = "http://www.roblox.com/asset/?id=11415645739"
  1402.             local mainDragging = false
  1403.             local sliderDragging = false
  1404.             ColorPicker.Interact.MouseButton1Down:Connect(function()
  1405.                 task.spawn(function()
  1406.                     TweenService:Create(ColorPicker, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  1407.                     TweenService:Create(ColorPicker.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1408.                     task.wait(0.2)
  1409.                     TweenService:Create(ColorPicker, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  1410.                     TweenService:Create(ColorPicker.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  1411.                 end)
  1412.  
  1413.                 if not opened then
  1414.                     opened = true
  1415.                     TweenService:Create(Background, TweenInfo.new(0.45, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 18, 0, 15)}):Play()
  1416.                     task.wait(0.1)
  1417.                     TweenService:Create(ColorPicker, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(1, -10, 0, 120)}):Play()
  1418.                     TweenService:Create(Background, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 173, 0, 86)}):Play()
  1419.                     TweenService:Create(Display, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1420.                     TweenService:Create(ColorPicker.Interact, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Position = UDim2.new(0.289, 0, 0.5, 0)}):Play()
  1421.                     TweenService:Create(ColorPicker.RGB, TweenInfo.new(0.8, Enum.EasingStyle.Exponential), {Position = UDim2.new(0, 17, 0, 40)}):Play()
  1422.                     TweenService:Create(ColorPicker.HexInput, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Position = UDim2.new(0, 17, 0, 73)}):Play()
  1423.                     TweenService:Create(ColorPicker.Interact, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(0.574, 0, 1, 0)}):Play()
  1424.                     TweenService:Create(Main.MainPoint, TweenInfo.new(0.2, Enum.EasingStyle.Exponential), {ImageTransparency = 0}):Play()
  1425.                     TweenService:Create(Main, TweenInfo.new(0.2, Enum.EasingStyle.Exponential), {ImageTransparency = SelectedTheme ~= RayfieldLibrary.Theme.Default and 0.25 or 0.1}):Play()
  1426.                     TweenService:Create(Background, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1427.                 else
  1428.                     opened = false
  1429.                     TweenService:Create(ColorPicker, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(1, -10, 0, 45)}):Play()
  1430.                     TweenService:Create(Background, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 39, 0, 22)}):Play()
  1431.                     TweenService:Create(ColorPicker.Interact, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(1, 0, 1, 0)}):Play()
  1432.                     TweenService:Create(ColorPicker.Interact, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Position = UDim2.new(0.5, 0, 0.5, 0)}):Play()
  1433.                     TweenService:Create(ColorPicker.RGB, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Position = UDim2.new(0, 17, 0, 70)}):Play()
  1434.                     TweenService:Create(ColorPicker.HexInput, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Position = UDim2.new(0, 17, 0, 90)}):Play()
  1435.                     TweenService:Create(Display, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1436.                     TweenService:Create(Main.MainPoint, TweenInfo.new(0.2, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  1437.                     TweenService:Create(Main, TweenInfo.new(0.2, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  1438.                     TweenService:Create(Background, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1439.                 end
  1440.  
  1441.             end)
  1442.  
  1443.             UserInputService.InputEnded:Connect(function(input, gameProcessed) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  1444.                     mainDragging = false
  1445.                     sliderDragging = false
  1446.                 end end)
  1447.             Main.MouseButton1Down:Connect(function()
  1448.                 if opened then
  1449.                     mainDragging = true
  1450.                 end
  1451.             end)
  1452.             Main.MainPoint.MouseButton1Down:Connect(function()
  1453.                 if opened then
  1454.                     mainDragging = true
  1455.                 end
  1456.             end)
  1457.             Slider.MouseButton1Down:Connect(function()
  1458.                 sliderDragging = true
  1459.             end)
  1460.             Slider.SliderPoint.MouseButton1Down:Connect(function()
  1461.                 sliderDragging = true
  1462.             end)
  1463.             local h,s,v = ColorPickerSettings.Color:ToHSV()
  1464.             local color = Color3.fromHSV(h,s,v)
  1465.             local hex = string.format("#%02X%02X%02X",color.R*0xFF,color.G*0xFF,color.B*0xFF)
  1466.             ColorPicker.HexInput.InputBox.Text = hex
  1467.             local function setDisplay()
  1468.                 --Main
  1469.                 Main.MainPoint.Position = UDim2.new(s,-Main.MainPoint.AbsoluteSize.X/2,1-v,-Main.MainPoint.AbsoluteSize.Y/2)
  1470.                 Main.MainPoint.ImageColor3 = Color3.fromHSV(h,s,v)
  1471.                 Background.BackgroundColor3 = Color3.fromHSV(h,1,1)
  1472.                 Display.BackgroundColor3 = Color3.fromHSV(h,s,v)
  1473.                 --Slider
  1474.                 local x = h * Slider.AbsoluteSize.X
  1475.                 Slider.SliderPoint.Position = UDim2.new(0,x-Slider.SliderPoint.AbsoluteSize.X/2,0.5,0)
  1476.                 Slider.SliderPoint.ImageColor3 = Color3.fromHSV(h,1,1)
  1477.                 local color = Color3.fromHSV(h,s,v)
  1478.                 local r,g,b = math.floor((color.R*255)+0.5),math.floor((color.G*255)+0.5),math.floor((color.B*255)+0.5)
  1479.                 ColorPicker.RGB.RInput.InputBox.Text = tostring(r)
  1480.                 ColorPicker.RGB.GInput.InputBox.Text = tostring(g)
  1481.                 ColorPicker.RGB.BInput.InputBox.Text = tostring(b)
  1482.                 hex = string.format("#%02X%02X%02X",color.R*0xFF,color.G*0xFF,color.B*0xFF)
  1483.                 ColorPicker.HexInput.InputBox.Text = hex
  1484.             end
  1485.             setDisplay()
  1486.             ColorPicker.HexInput.InputBox.FocusLost:Connect(function()
  1487.                 if not pcall(function()
  1488.                         local r, g, b = string.match(ColorPicker.HexInput.InputBox.Text, "^#?(%w%w)(%w%w)(%w%w)$")
  1489.                         local rgbColor = Color3.fromRGB(tonumber(r, 16),tonumber(g, 16), tonumber(b, 16))
  1490.                         h,s,v = rgbColor:ToHSV()
  1491.                         hex = ColorPicker.HexInput.InputBox.Text
  1492.                         setDisplay()
  1493.                         ColorPickerSettings.Color = rgbColor
  1494.                     end)
  1495.                 then
  1496.                     ColorPicker.HexInput.InputBox.Text = hex
  1497.                 end
  1498.                 pcall(function()ColorPickerSettings.Callback(Color3.fromHSV(h,s,v))end)
  1499.                 local r,g,b = math.floor((h*255)+0.5),math.floor((s*255)+0.5),math.floor((v*255)+0.5)
  1500.                 ColorPickerSettings.Color = Color3.fromRGB(r,g,b)
  1501.                 SaveConfiguration()
  1502.             end)
  1503.             --RGB
  1504.             local function rgbBoxes(box,toChange)
  1505.                 local value = tonumber(box.Text)
  1506.                 local color = Color3.fromHSV(h,s,v)
  1507.                 local oldR,oldG,oldB = math.floor((color.R*255)+0.5),math.floor((color.G*255)+0.5),math.floor((color.B*255)+0.5)
  1508.                 local save
  1509.                 if toChange == "R" then save = oldR;oldR = value elseif toChange == "G" then save = oldG;oldG = value else save = oldB;oldB = value end
  1510.                 if value then
  1511.                     value = math.clamp(value,0,255)
  1512.                     h,s,v = Color3.fromRGB(oldR,oldG,oldB):ToHSV()
  1513.  
  1514.                     setDisplay()
  1515.                 else
  1516.                     box.Text = tostring(save)
  1517.                 end
  1518.                 local r,g,b = math.floor((h*255)+0.5),math.floor((s*255)+0.5),math.floor((v*255)+0.5)
  1519.                 ColorPickerSettings.Color = Color3.fromRGB(r,g,b)
  1520.                 SaveConfiguration()
  1521.             end
  1522.             ColorPicker.RGB.RInput.InputBox.FocusLost:connect(function()
  1523.                 rgbBoxes(ColorPicker.RGB.RInput.InputBox,"R")
  1524.                 pcall(function()ColorPickerSettings.Callback(Color3.fromHSV(h,s,v))end)
  1525.             end)
  1526.             ColorPicker.RGB.GInput.InputBox.FocusLost:connect(function()
  1527.                 rgbBoxes(ColorPicker.RGB.GInput.InputBox,"G")
  1528.                 pcall(function()ColorPickerSettings.Callback(Color3.fromHSV(h,s,v))end)
  1529.             end)
  1530.             ColorPicker.RGB.BInput.InputBox.FocusLost:connect(function()
  1531.                 rgbBoxes(ColorPicker.RGB.BInput.InputBox,"B")
  1532.                 pcall(function()ColorPickerSettings.Callback(Color3.fromHSV(h,s,v))end)
  1533.             end)
  1534.  
  1535.             RunService.RenderStepped:connect(function()
  1536.                 if mainDragging then
  1537.                     local localX = math.clamp(mouse.X-Main.AbsolutePosition.X,0,Main.AbsoluteSize.X)
  1538.                     local localY = math.clamp(mouse.Y-Main.AbsolutePosition.Y,0,Main.AbsoluteSize.Y)
  1539.                     Main.MainPoint.Position = UDim2.new(0,localX-Main.MainPoint.AbsoluteSize.X/2,0,localY-Main.MainPoint.AbsoluteSize.Y/2)
  1540.                     s = localX / Main.AbsoluteSize.X
  1541.                     v = 1 - (localY / Main.AbsoluteSize.Y)
  1542.                     Display.BackgroundColor3 = Color3.fromHSV(h,s,v)
  1543.                     Main.MainPoint.ImageColor3 = Color3.fromHSV(h,s,v)
  1544.                     Background.BackgroundColor3 = Color3.fromHSV(h,1,1)
  1545.                     local color = Color3.fromHSV(h,s,v)
  1546.                     local r,g,b = math.floor((color.R*255)+0.5),math.floor((color.G*255)+0.5),math.floor((color.B*255)+0.5)
  1547.                     ColorPicker.RGB.RInput.InputBox.Text = tostring(r)
  1548.                     ColorPicker.RGB.GInput.InputBox.Text = tostring(g)
  1549.                     ColorPicker.RGB.BInput.InputBox.Text = tostring(b)
  1550.                     ColorPicker.HexInput.InputBox.Text = string.format("#%02X%02X%02X",color.R*0xFF,color.G*0xFF,color.B*0xFF)
  1551.                     pcall(function()ColorPickerSettings.Callback(Color3.fromHSV(h,s,v))end)
  1552.                     ColorPickerSettings.Color = Color3.fromRGB(r,g,b)
  1553.                     SaveConfiguration()
  1554.                 end
  1555.                 if sliderDragging then
  1556.                     local localX = math.clamp(mouse.X-Slider.AbsolutePosition.X,0,Slider.AbsoluteSize.X)
  1557.                     h = localX / Slider.AbsoluteSize.X
  1558.                     Display.BackgroundColor3 = Color3.fromHSV(h,s,v)
  1559.                     Slider.SliderPoint.Position = UDim2.new(0,localX-Slider.SliderPoint.AbsoluteSize.X/2,0.5,0)
  1560.                     Slider.SliderPoint.ImageColor3 = Color3.fromHSV(h,1,1)
  1561.                     Background.BackgroundColor3 = Color3.fromHSV(h,1,1)
  1562.                     Main.MainPoint.ImageColor3 = Color3.fromHSV(h,s,v)
  1563.                     local color = Color3.fromHSV(h,s,v)
  1564.                     local r,g,b = math.floor((color.R*255)+0.5),math.floor((color.G*255)+0.5),math.floor((color.B*255)+0.5)
  1565.                     ColorPicker.RGB.RInput.InputBox.Text = tostring(r)
  1566.                     ColorPicker.RGB.GInput.InputBox.Text = tostring(g)
  1567.                     ColorPicker.RGB.BInput.InputBox.Text = tostring(b)
  1568.                     ColorPicker.HexInput.InputBox.Text = string.format("#%02X%02X%02X",color.R*0xFF,color.G*0xFF,color.B*0xFF)
  1569.                     pcall(function()ColorPickerSettings.Callback(Color3.fromHSV(h,s,v))end)
  1570.                     ColorPickerSettings.Color = Color3.fromRGB(r,g,b)
  1571.                     SaveConfiguration()
  1572.                 end
  1573.             end)
  1574.  
  1575.             if Settings.ConfigurationSaving then
  1576.                 if Settings.ConfigurationSaving.Enabled and ColorPickerSettings.Flag then
  1577.                     RayfieldLibrary.Flags[ColorPickerSettings.Flag] = ColorPickerSettings
  1578.                 end
  1579.             end
  1580.  
  1581.             function ColorPickerSettings:Set(RGBColor)
  1582.                 ColorPickerSettings.Color = RGBColor
  1583.                 h,s,v = ColorPickerSettings.Color:ToHSV()
  1584.                 color = Color3.fromHSV(h,s,v)
  1585.                 setDisplay()
  1586.             end
  1587.  
  1588.             ColorPicker.MouseEnter:Connect(function()
  1589.                 TweenService:Create(ColorPicker, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  1590.             end)
  1591.  
  1592.             ColorPicker.MouseLeave:Connect(function()
  1593.                 TweenService:Create(ColorPicker, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  1594.             end)
  1595.  
  1596.             Rayfield.Main:GetPropertyChangedSignal('BackgroundColor3'):Connect(function()
  1597.                 for _, rgbinput in ipairs(ColorPicker.RGB:GetChildren()) do
  1598.                     if rgbinput:IsA("Frame") then
  1599.                         rgbinput.BackgroundColor3 = SelectedTheme.InputBackground
  1600.                         rgbinput.UIStroke.Color = SelectedTheme.InputStroke
  1601.                     end
  1602.                 end
  1603.  
  1604.                 ColorPicker.HexInput.BackgroundColor3 = SelectedTheme.InputBackground
  1605.                 ColorPicker.HexInput.UIStroke.Color = SelectedTheme.InputStroke
  1606.             end)
  1607.  
  1608.             return ColorPickerSettings
  1609.         end
  1610.  
  1611.         -- Section
  1612.         function Tab:CreateSection(SectionName)
  1613.  
  1614.             local SectionValue = {}
  1615.  
  1616.             if SDone then
  1617.                 local SectionSpace = Elements.Template.SectionSpacing:Clone()
  1618.                 SectionSpace.Visible = true
  1619.                 SectionSpace.Parent = TabPage
  1620.             end
  1621.  
  1622.             local Section = Elements.Template.SectionTitle:Clone()
  1623.             Section.Title.Text = SectionName
  1624.             Section.Visible = true
  1625.             Section.Parent = TabPage
  1626.  
  1627.             Section.Title.TextTransparency = 1
  1628.             TweenService:Create(Section.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0.4}):Play()
  1629.  
  1630.             function SectionValue:Set(NewSection)
  1631.                 Section.Title.Text = NewSection
  1632.             end
  1633.  
  1634.             SDone = true
  1635.  
  1636.             return SectionValue
  1637.         end
  1638.  
  1639.         -- Divider
  1640.         function Tab:CreateDivider()
  1641.             local DividerValue = {}
  1642.  
  1643.             local Divider = Elements.Template.Divider:Clone()
  1644.             Divider.Visible = true
  1645.             Divider.Parent = TabPage
  1646.  
  1647.             Divider.Divider.BackgroundTransparency = 1
  1648.             TweenService:Create(Divider.Divider, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0.85}):Play()
  1649.  
  1650.             function DividerValue:Set(Value)
  1651.                 Divider.Visible = Value
  1652.             end
  1653.  
  1654.             return DividerValue
  1655.         end
  1656.  
  1657.         -- Label
  1658.         function Tab:CreateLabel(LabelText : string, Icon: number, Color : Color3, IgnoreTheme : boolean)
  1659.             local LabelValue = {}
  1660.  
  1661.             local Label = Elements.Template.Label:Clone()
  1662.             Label.Title.Text = LabelText
  1663.             Label.Visible = true
  1664.             Label.Parent = TabPage
  1665.  
  1666.             Label.BackgroundColor3 = Color or SelectedTheme.SecondaryElementBackground
  1667.             Label.UIStroke.Color = Color or SelectedTheme.SecondaryElementStroke
  1668.  
  1669.             if Icon then
  1670.                 if typeof(Icon) == 'string' then
  1671.                     local asset = getIcon(Icon)
  1672.  
  1673.                     Label.Icon.Image = 'rbxassetid://'..asset.id
  1674.                     Label.Icon.ImageRectOffset = asset.imageRectOffset
  1675.                     Label.Icon.ImageRectSize = asset.imageRectSize
  1676.                 else
  1677.                     Label.Icon.Image = "rbxassetid://" .. (Icon or 0)
  1678.                 end
  1679.             else
  1680.                 Label.Icon.Image = "rbxassetid://" .. 0
  1681.             end
  1682.  
  1683.             if Icon and Label:FindFirstChild('Icon') then
  1684.                 Label.Title.Position = UDim2.new(0, 45, 0.5, 0)
  1685.                 Label.Title.Size = UDim2.new(1, -100, 0, 14)
  1686.  
  1687.                 if Icon then
  1688.                     if typeof(Icon) == 'string' then
  1689.                         local asset = getIcon(Icon)
  1690.  
  1691.                         Label.Icon.Image = 'rbxassetid://'..asset.id
  1692.                         Label.Icon.ImageRectOffset = asset.imageRectOffset
  1693.                         Label.Icon.ImageRectSize = asset.imageRectSize
  1694.                     else
  1695.                         Label.Icon.Image = "rbxassetid://" .. (Icon or 0)
  1696.                     end
  1697.                 else
  1698.                     Label.Icon.Image = "rbxassetid://" .. 0
  1699.                 end
  1700.  
  1701.                 Label.Icon.Visible = true
  1702.             end
  1703.  
  1704.             Label.Icon.ImageTransparency = 1
  1705.             Label.BackgroundTransparency = 1
  1706.             Label.UIStroke.Transparency = 1
  1707.             Label.Title.TextTransparency = 1
  1708.  
  1709.             TweenService:Create(Label, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = Color and 0.8 or 0}):Play()
  1710.             TweenService:Create(Label.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Transparency = Color and 0.7 or 0}):Play()
  1711.             TweenService:Create(Label.Icon, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageTransparency = 0.2}):Play()
  1712.             TweenService:Create(Label.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = Color and 0.2 or 0}):Play() 
  1713.  
  1714.             function LabelValue:Set(NewLabel, Icon, Color)
  1715.                 Label.Title.Text = NewLabel
  1716.  
  1717.                 if Color then
  1718.                     Label.BackgroundColor3 = Color or SelectedTheme.SecondaryElementBackground
  1719.                     Label.UIStroke.Color = Color or SelectedTheme.SecondaryElementStroke
  1720.                 end
  1721.  
  1722.                 if Icon and Label:FindFirstChild('Icon') then
  1723.                     Label.Title.Position = UDim2.new(0, 45, 0.5, 0)
  1724.                     Label.Title.Size = UDim2.new(1, -100, 0, 14)
  1725.  
  1726.                     if Icon then
  1727.                         if typeof(Icon) == 'string' then
  1728.                             local asset = getIcon(Icon)
  1729.  
  1730.                             Label.Icon.Image = 'rbxassetid://'..asset.id
  1731.                             Label.Icon.ImageRectOffset = asset.imageRectOffset
  1732.                             Label.Icon.ImageRectSize = asset.imageRectSize
  1733.                         else
  1734.                             Label.Icon.Image = "rbxassetid://" .. (Icon or 0)
  1735.                         end
  1736.                     else
  1737.                         Label.Icon.Image = "rbxassetid://" .. 0
  1738.                     end
  1739.  
  1740.                     Label.Icon.Visible = true
  1741.                 end
  1742.             end
  1743.  
  1744.             Rayfield.Main:GetPropertyChangedSignal('BackgroundColor3'):Connect(function()
  1745.                 Label.BackgroundColor3 = IgnoreTheme and (Color or Label.BackgroundColor3) or SelectedTheme.SecondaryElementBackground
  1746.                 Label.UIStroke.Color = IgnoreTheme and (Color or Label.BackgroundColor3) or SelectedTheme.SecondaryElementStroke
  1747.             end)
  1748.  
  1749.             return LabelValue
  1750.         end
  1751.  
  1752.         -- Paragraph
  1753.         function Tab:CreateParagraph(ParagraphSettings)
  1754.             local ParagraphValue = {}
  1755.  
  1756.             local Paragraph = Elements.Template.Paragraph:Clone()
  1757.             Paragraph.Title.Text = ParagraphSettings.Title
  1758.             Paragraph.Content.Text = ParagraphSettings.Content
  1759.             Paragraph.Visible = true
  1760.             Paragraph.Parent = TabPage
  1761.  
  1762.             Paragraph.BackgroundTransparency = 1
  1763.             Paragraph.UIStroke.Transparency = 1
  1764.             Paragraph.Title.TextTransparency = 1
  1765.             Paragraph.Content.TextTransparency = 1
  1766.  
  1767.             Paragraph.BackgroundColor3 = SelectedTheme.SecondaryElementBackground
  1768.             Paragraph.UIStroke.Color = SelectedTheme.SecondaryElementStroke
  1769.  
  1770.             TweenService:Create(Paragraph, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1771.             TweenService:Create(Paragraph.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  1772.             TweenService:Create(Paragraph.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()  
  1773.             TweenService:Create(Paragraph.Content, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1774.  
  1775.             function ParagraphValue:Set(NewParagraphSettings)
  1776.                 Paragraph.Title.Text = NewParagraphSettings.Title
  1777.                 Paragraph.Content.Text = NewParagraphSettings.Content
  1778.             end
  1779.  
  1780.             Rayfield.Main:GetPropertyChangedSignal('BackgroundColor3'):Connect(function()
  1781.                 Paragraph.BackgroundColor3 = SelectedTheme.SecondaryElementBackground
  1782.                 Paragraph.UIStroke.Color = SelectedTheme.SecondaryElementStroke
  1783.             end)
  1784.  
  1785.             return ParagraphValue
  1786.         end
  1787.  
  1788.         -- Input
  1789.         function Tab:CreateInput(InputSettings)
  1790.             local Input = Elements.Template.Input:Clone()
  1791.             Input.Name = InputSettings.Name
  1792.             Input.Title.Text = InputSettings.Name
  1793.             Input.Visible = true
  1794.             Input.Parent = TabPage
  1795.  
  1796.             Input.BackgroundTransparency = 1
  1797.             Input.UIStroke.Transparency = 1
  1798.             Input.Title.TextTransparency = 1
  1799.  
  1800.             Input.InputFrame.InputBox.Text = InputSettings.CurrentValue or ''
  1801.  
  1802.             Input.InputFrame.BackgroundColor3 = SelectedTheme.InputBackground
  1803.             Input.InputFrame.UIStroke.Color = SelectedTheme.InputStroke
  1804.  
  1805.             TweenService:Create(Input, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1806.             TweenService:Create(Input.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  1807.             TweenService:Create(Input.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()  
  1808.  
  1809.             Input.InputFrame.InputBox.PlaceholderText = InputSettings.PlaceholderText
  1810.             Input.InputFrame.Size = UDim2.new(0, Input.InputFrame.InputBox.TextBounds.X + 24, 0, 30)
  1811.  
  1812.             Input.InputFrame.InputBox.FocusLost:Connect(function()
  1813.                 local Success, Response = pcall(function()
  1814.                     InputSettings.Callback(Input.InputFrame.InputBox.Text)
  1815.                     InputSettings.CurrentValue = Input.InputFrame.InputBox.Text
  1816.                 end)
  1817.  
  1818.                 if not Success then
  1819.                     TweenService:Create(Input, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play()
  1820.                     TweenService:Create(Input.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1821.                     Input.Title.Text = "Callback Error"
  1822.                     print("Rayfield | "..InputSettings.Name.." Callback Error " ..tostring(Response))
  1823.                     warn('Check docs.sirius.menu for help with Rayfield specific development.')
  1824.                     task.wait(0.5)
  1825.                     Input.Title.Text = InputSettings.Name
  1826.                     TweenService:Create(Input, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  1827.                     TweenService:Create(Input.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  1828.                 end
  1829.  
  1830.                 if InputSettings.RemoveTextAfterFocusLost then
  1831.                     Input.InputFrame.InputBox.Text = ""
  1832.                 end
  1833.  
  1834.                 SaveConfiguration()
  1835.             end)
  1836.  
  1837.             Input.MouseEnter:Connect(function()
  1838.                 TweenService:Create(Input, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  1839.             end)
  1840.  
  1841.             Input.MouseLeave:Connect(function()
  1842.                 TweenService:Create(Input, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  1843.             end)
  1844.  
  1845.             Input.InputFrame.InputBox:GetPropertyChangedSignal("Text"):Connect(function()
  1846.                 TweenService:Create(Input.InputFrame, TweenInfo.new(0.55, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Size = UDim2.new(0, Input.InputFrame.InputBox.TextBounds.X + 24, 0, 30)}):Play()
  1847.             end)
  1848.  
  1849.             function InputSettings:Set(text)
  1850.                 Input.InputFrame.InputBox.Text = text
  1851.                 SaveConfiguration()
  1852.             end
  1853.  
  1854.             if Settings.ConfigurationSaving then
  1855.                 if Settings.ConfigurationSaving.Enabled and InputSettings.Flag then
  1856.                     RayfieldLibrary.Flags[InputSettings.Flag] = InputSettings
  1857.                 end
  1858.             end
  1859.  
  1860.             Rayfield.Main:GetPropertyChangedSignal('BackgroundColor3'):Connect(function()
  1861.                 Input.InputFrame.BackgroundColor3 = SelectedTheme.InputBackground
  1862.                 Input.InputFrame.UIStroke.Color = SelectedTheme.InputStroke
  1863.             end)
  1864.  
  1865.             return InputSettings
  1866.         end
  1867.  
  1868.         -- Dropdown
  1869.         function Tab:CreateDropdown(DropdownSettings)
  1870.             local Dropdown = Elements.Template.Dropdown:Clone()
  1871.             if string.find(DropdownSettings.Name,"closed") then
  1872.                 Dropdown.Name = "Dropdown"
  1873.             else
  1874.                 Dropdown.Name = DropdownSettings.Name
  1875.             end
  1876.             Dropdown.Title.Text = DropdownSettings.Name
  1877.             Dropdown.Visible = true
  1878.             Dropdown.Parent = TabPage
  1879.  
  1880.             Dropdown.List.Visible = false
  1881.             if DropdownSettings.CurrentOption then
  1882.                 if type(DropdownSettings.CurrentOption) == "string" then
  1883.                     DropdownSettings.CurrentOption = {DropdownSettings.CurrentOption}
  1884.                 end
  1885.                 if not DropdownSettings.MultipleOptions and type(DropdownSettings.CurrentOption) == "table" then
  1886.                     DropdownSettings.CurrentOption = {DropdownSettings.CurrentOption[1]}
  1887.                 end
  1888.             else
  1889.                 DropdownSettings.CurrentOption = {}
  1890.             end
  1891.  
  1892.             if DropdownSettings.MultipleOptions then
  1893.                 if DropdownSettings.CurrentOption and type(DropdownSettings.CurrentOption) == "table" then
  1894.                     if #DropdownSettings.CurrentOption == 1 then
  1895.                         Dropdown.Selected.Text = DropdownSettings.CurrentOption[1]
  1896.                     elseif #DropdownSettings.CurrentOption == 0 then
  1897.                         Dropdown.Selected.Text = "None"
  1898.                     else
  1899.                         Dropdown.Selected.Text = "Various"
  1900.                     end
  1901.                 else
  1902.                     DropdownSettings.CurrentOption = {}
  1903.                     Dropdown.Selected.Text = "None"
  1904.                 end
  1905.             else
  1906.                 Dropdown.Selected.Text = DropdownSettings.CurrentOption[1] or "None"
  1907.             end
  1908.  
  1909.             Dropdown.Toggle.ImageColor3 = SelectedTheme.TextColor
  1910.             TweenService:Create(Dropdown, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  1911.  
  1912.             Dropdown.BackgroundTransparency = 1
  1913.             Dropdown.UIStroke.Transparency = 1
  1914.             Dropdown.Title.TextTransparency = 1
  1915.  
  1916.             Dropdown.Size = UDim2.new(1, -10, 0, 45)
  1917.  
  1918.             TweenService:Create(Dropdown, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1919.             TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  1920.             TweenService:Create(Dropdown.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()   
  1921.  
  1922.             for _, ununusedoption in ipairs(Dropdown.List:GetChildren()) do
  1923.                 if ununusedoption.ClassName == "Frame" and ununusedoption.Name ~= "Placeholder" then
  1924.                     ununusedoption:Destroy()
  1925.                 end
  1926.             end
  1927.  
  1928.             Dropdown.Toggle.Rotation = 180
  1929.  
  1930.             Dropdown.Interact.MouseButton1Click:Connect(function()
  1931.                 TweenService:Create(Dropdown, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  1932.                 TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1933.                 task.wait(0.1)
  1934.                 TweenService:Create(Dropdown, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  1935.                 TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  1936.                 if Debounce then return end
  1937.                 if Dropdown.List.Visible then
  1938.                     Debounce = true
  1939.                     TweenService:Create(Dropdown, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = UDim2.new(1, -10, 0, 45)}):Play()
  1940.                     for _, DropdownOpt in ipairs(Dropdown.List:GetChildren()) do
  1941.                         if DropdownOpt.ClassName == "Frame" and DropdownOpt.Name ~= "Placeholder" then
  1942.                             TweenService:Create(DropdownOpt, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1943.                             TweenService:Create(DropdownOpt.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1944.                             TweenService:Create(DropdownOpt.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1945.                         end
  1946.                     end
  1947.                     TweenService:Create(Dropdown.List, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ScrollBarImageTransparency = 1}):Play()
  1948.                     TweenService:Create(Dropdown.Toggle, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Rotation = 180}):Play()
  1949.                     task.wait(0.35)
  1950.                     Dropdown.List.Visible = false
  1951.                     Debounce = false
  1952.                 else
  1953.                     TweenService:Create(Dropdown, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = UDim2.new(1, -10, 0, 180)}):Play()
  1954.                     Dropdown.List.Visible = true
  1955.                     TweenService:Create(Dropdown.List, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ScrollBarImageTransparency = 0.7}):Play()
  1956.                     TweenService:Create(Dropdown.Toggle, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Rotation = 0}):Play()  
  1957.                     for _, DropdownOpt in ipairs(Dropdown.List:GetChildren()) do
  1958.                         if DropdownOpt.ClassName == "Frame" and DropdownOpt.Name ~= "Placeholder" then
  1959.                             if DropdownOpt.Name ~= Dropdown.Selected.Text then
  1960.                                 TweenService:Create(DropdownOpt.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  1961.                             end
  1962.                             TweenService:Create(DropdownOpt, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1963.                             TweenService:Create(DropdownOpt.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1964.                         end
  1965.                     end
  1966.                 end
  1967.             end)
  1968.  
  1969.             Dropdown.MouseEnter:Connect(function()
  1970.                 if not Dropdown.List.Visible then
  1971.                     TweenService:Create(Dropdown, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  1972.                 end
  1973.             end)
  1974.  
  1975.             Dropdown.MouseLeave:Connect(function()
  1976.                 TweenService:Create(Dropdown, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  1977.             end)
  1978.  
  1979.             local function SetDropdownOptions()
  1980.                 for _, Option in ipairs(DropdownSettings.Options) do
  1981.                     local DropdownOption = Elements.Template.Dropdown.List.Template:Clone()
  1982.                     DropdownOption.Name = Option
  1983.                     DropdownOption.Title.Text = Option
  1984.                     DropdownOption.Parent = Dropdown.List
  1985.                     DropdownOption.Visible = true
  1986.  
  1987.                     DropdownOption.BackgroundTransparency = 1
  1988.                     DropdownOption.UIStroke.Transparency = 1
  1989.                     DropdownOption.Title.TextTransparency = 1
  1990.  
  1991.                     --local Dropdown = Tab:CreateDropdown({
  1992.                     --  Name = "Dropdown Example",
  1993.                     --  Options = {"Option 1","Option 2"},
  1994.                     --  CurrentOption = {"Option 1"},
  1995.                     --  MultipleOptions = true,
  1996.                     --  Flag = "Dropdown1",
  1997.                     --  Callback = function(TableOfOptions)
  1998.  
  1999.                     --  end,
  2000.                     --})
  2001.  
  2002.  
  2003.                     DropdownOption.Interact.ZIndex = 50
  2004.                     DropdownOption.Interact.MouseButton1Click:Connect(function()
  2005.                         if not DropdownSettings.MultipleOptions and table.find(DropdownSettings.CurrentOption, Option) then
  2006.                             return
  2007.                         end
  2008.  
  2009.                         if table.find(DropdownSettings.CurrentOption, Option) then
  2010.                             table.remove(DropdownSettings.CurrentOption, table.find(DropdownSettings.CurrentOption, Option))
  2011.                             if DropdownSettings.MultipleOptions then
  2012.                                 if #DropdownSettings.CurrentOption == 1 then
  2013.                                     Dropdown.Selected.Text = DropdownSettings.CurrentOption[1]
  2014.                                 elseif #DropdownSettings.CurrentOption == 0 then
  2015.                                     Dropdown.Selected.Text = "None"
  2016.                                 else
  2017.                                     Dropdown.Selected.Text = "Various"
  2018.                                 end
  2019.                             else
  2020.                                 Dropdown.Selected.Text = DropdownSettings.CurrentOption[1]
  2021.                             end
  2022.                         else
  2023.                             if not DropdownSettings.MultipleOptions then
  2024.                                 table.clear(DropdownSettings.CurrentOption)
  2025.                             end
  2026.                             table.insert(DropdownSettings.CurrentOption, Option)
  2027.                             if DropdownSettings.MultipleOptions then
  2028.                                 if #DropdownSettings.CurrentOption == 1 then
  2029.                                     Dropdown.Selected.Text = DropdownSettings.CurrentOption[1]
  2030.                                 elseif #DropdownSettings.CurrentOption == 0 then
  2031.                                     Dropdown.Selected.Text = "None"
  2032.                                 else
  2033.                                     Dropdown.Selected.Text = "Various"
  2034.                                 end
  2035.                             else
  2036.                                 Dropdown.Selected.Text = DropdownSettings.CurrentOption[1]
  2037.                             end
  2038.                             TweenService:Create(DropdownOption.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2039.                             TweenService:Create(DropdownOption, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.DropdownSelected}):Play()
  2040.                             Debounce = true
  2041.                         end
  2042.  
  2043.  
  2044.                         local Success, Response = pcall(function()
  2045.                             DropdownSettings.Callback(DropdownSettings.CurrentOption)
  2046.                         end)
  2047.  
  2048.                         if not Success then
  2049.                             TweenService:Create(Dropdown, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play()
  2050.                             TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2051.                             Dropdown.Title.Text = "Callback Error"
  2052.                             print("Rayfield | "..DropdownSettings.Name.." Callback Error " ..tostring(Response))
  2053.                             warn('Check docs.sirius.menu for help with Rayfield specific development.')
  2054.                             task.wait(0.5)
  2055.                             Dropdown.Title.Text = DropdownSettings.Name
  2056.                             TweenService:Create(Dropdown, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2057.                             TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  2058.                         end
  2059.  
  2060.                         for _, droption in ipairs(Dropdown.List:GetChildren()) do
  2061.                             if droption.ClassName == "Frame" and droption.Name ~= "Placeholder" and not table.find(DropdownSettings.CurrentOption, droption.Name) then
  2062.                                 TweenService:Create(droption, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.DropdownUnselected}):Play()
  2063.                             end
  2064.                         end
  2065.                         if not DropdownSettings.MultipleOptions then
  2066.                             task.wait(0.1)
  2067.                             TweenService:Create(Dropdown, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = UDim2.new(1, -10, 0, 45)}):Play()
  2068.                             for _, DropdownOpt in ipairs(Dropdown.List:GetChildren()) do
  2069.                                 if DropdownOpt.ClassName == "Frame" and DropdownOpt.Name ~= "Placeholder" then
  2070.                                     TweenService:Create(DropdownOpt, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  2071.                                     TweenService:Create(DropdownOpt.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2072.                                     TweenService:Create(DropdownOpt.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  2073.                                 end
  2074.                             end
  2075.                             TweenService:Create(Dropdown.List, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ScrollBarImageTransparency = 1}):Play()
  2076.                             TweenService:Create(Dropdown.Toggle, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Rotation = 180}):Play()
  2077.                             task.wait(0.35)
  2078.                             Dropdown.List.Visible = false
  2079.                         end
  2080.                         Debounce = false
  2081.                         SaveConfiguration()
  2082.                     end)
  2083.  
  2084.                     Rayfield.Main:GetPropertyChangedSignal('BackgroundColor3'):Connect(function()
  2085.                         DropdownOption.UIStroke.Color = SelectedTheme.ElementStroke
  2086.                     end)
  2087.                 end
  2088.             end
  2089.             SetDropdownOptions()
  2090.  
  2091.             for _, droption in ipairs(Dropdown.List:GetChildren()) do
  2092.                 if droption.ClassName == "Frame" and droption.Name ~= "Placeholder" then
  2093.                     if not table.find(DropdownSettings.CurrentOption, droption.Name) then
  2094.                         droption.BackgroundColor3 = SelectedTheme.DropdownUnselected
  2095.                     else
  2096.                         droption.BackgroundColor3 = SelectedTheme.DropdownSelected
  2097.                     end
  2098.  
  2099.                     Rayfield.Main:GetPropertyChangedSignal('BackgroundColor3'):Connect(function()
  2100.                         if not table.find(DropdownSettings.CurrentOption, droption.Name) then
  2101.                             droption.BackgroundColor3 = SelectedTheme.DropdownUnselected
  2102.                         else
  2103.                             droption.BackgroundColor3 = SelectedTheme.DropdownSelected
  2104.                         end
  2105.                     end)
  2106.                 end
  2107.             end
  2108.  
  2109.             function DropdownSettings:Set(NewOption)
  2110.                 DropdownSettings.CurrentOption = NewOption
  2111.  
  2112.                 if typeof(DropdownSettings.CurrentOption) == "string" then
  2113.                     DropdownSettings.CurrentOption = {DropdownSettings.CurrentOption}
  2114.                 end
  2115.  
  2116.                 if not DropdownSettings.MultipleOptions then
  2117.                     DropdownSettings.CurrentOption = {DropdownSettings.CurrentOption[1]}
  2118.                 end
  2119.  
  2120.                 if DropdownSettings.MultipleOptions then
  2121.                     if #DropdownSettings.CurrentOption == 1 then
  2122.                         Dropdown.Selected.Text = DropdownSettings.CurrentOption[1]
  2123.                     elseif #DropdownSettings.CurrentOption == 0 then
  2124.                         Dropdown.Selected.Text = "None"
  2125.                     else
  2126.                         Dropdown.Selected.Text = "Various"
  2127.                     end
  2128.                 else
  2129.                     Dropdown.Selected.Text = DropdownSettings.CurrentOption[1]
  2130.                 end
  2131.  
  2132.  
  2133.                 local Success, Response = pcall(function()
  2134.                     DropdownSettings.Callback(NewOption)
  2135.                 end)
  2136.                 if not Success then
  2137.                     TweenService:Create(Dropdown, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play()
  2138.                     TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2139.                     Dropdown.Title.Text = "Callback Error"
  2140.                     print("Rayfield | "..DropdownSettings.Name.." Callback Error " ..tostring(Response))
  2141.                     warn('Check docs.sirius.menu for help with Rayfield specific development.')
  2142.                     task.wait(0.5)
  2143.                     Dropdown.Title.Text = DropdownSettings.Name
  2144.                     TweenService:Create(Dropdown, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2145.                     TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  2146.                 end
  2147.  
  2148.                 for _, droption in ipairs(Dropdown.List:GetChildren()) do
  2149.                     if droption.ClassName == "Frame" and droption.Name ~= "Placeholder" then
  2150.                         if not table.find(DropdownSettings.CurrentOption, droption.Name) then
  2151.                             droption.BackgroundColor3 = SelectedTheme.DropdownUnselected
  2152.                         else
  2153.                             droption.BackgroundColor3 = SelectedTheme.DropdownSelected
  2154.                         end
  2155.                     end
  2156.                 end
  2157.                 --SaveConfiguration()
  2158.             end
  2159.  
  2160.             function DropdownSettings:Refresh(optionsTable: table) -- updates a dropdown with new options from optionsTable
  2161.                 DropdownSettings.Options = optionsTable
  2162.                 for _, option in Dropdown.List:GetChildren() do
  2163.                     if option.ClassName == "Frame" and option.Name ~= "Placeholder" then
  2164.                         option:Destroy()
  2165.                     end
  2166.                 end
  2167.                 SetDropdownOptions()
  2168.             end
  2169.  
  2170.             if Settings.ConfigurationSaving then
  2171.                 if Settings.ConfigurationSaving.Enabled and DropdownSettings.Flag then
  2172.                     RayfieldLibrary.Flags[DropdownSettings.Flag] = DropdownSettings
  2173.                 end
  2174.             end
  2175.  
  2176.             Rayfield.Main:GetPropertyChangedSignal('BackgroundColor3'):Connect(function()
  2177.                 Dropdown.Toggle.ImageColor3 = SelectedTheme.TextColor
  2178.                 TweenService:Create(Dropdown, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2179.             end)
  2180.  
  2181.             return DropdownSettings
  2182.         end
  2183.  
  2184.         -- Keybind
  2185.         function Tab:CreateKeybind(KeybindSettings)
  2186.             local CheckingForKey = false
  2187.             local Keybind = Elements.Template.Keybind:Clone()
  2188.             Keybind.Name = KeybindSettings.Name
  2189.             Keybind.Title.Text = KeybindSettings.Name
  2190.             Keybind.Visible = true
  2191.             Keybind.Parent = TabPage
  2192.  
  2193.             Keybind.BackgroundTransparency = 1
  2194.             Keybind.UIStroke.Transparency = 1
  2195.             Keybind.Title.TextTransparency = 1
  2196.  
  2197.             Keybind.KeybindFrame.BackgroundColor3 = SelectedTheme.InputBackground
  2198.             Keybind.KeybindFrame.UIStroke.Color = SelectedTheme.InputStroke
  2199.  
  2200.             TweenService:Create(Keybind, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  2201.             TweenService:Create(Keybind.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  2202.             TweenService:Create(Keybind.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  2203.  
  2204.             Keybind.KeybindFrame.KeybindBox.Text = KeybindSettings.CurrentKeybind
  2205.             Keybind.KeybindFrame.Size = UDim2.new(0, Keybind.KeybindFrame.KeybindBox.TextBounds.X + 24, 0, 30)
  2206.  
  2207.             Keybind.KeybindFrame.KeybindBox.Focused:Connect(function()
  2208.                 CheckingForKey = true
  2209.                 Keybind.KeybindFrame.KeybindBox.Text = ""
  2210.             end)
  2211.             Keybind.KeybindFrame.KeybindBox.FocusLost:Connect(function()
  2212.                 CheckingForKey = false
  2213.                 if Keybind.KeybindFrame.KeybindBox.Text == nil or "" then
  2214.                     Keybind.KeybindFrame.KeybindBox.Text = KeybindSettings.CurrentKeybind
  2215.                     SaveConfiguration()
  2216.                 end
  2217.             end)
  2218.  
  2219.             Keybind.MouseEnter:Connect(function()
  2220.                 TweenService:Create(Keybind, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  2221.             end)
  2222.  
  2223.             Keybind.MouseLeave:Connect(function()
  2224.                 TweenService:Create(Keybind, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2225.             end)
  2226.  
  2227.             UserInputService.InputBegan:Connect(function(input, processed)
  2228.  
  2229.                 if CheckingForKey then
  2230.                     if input.KeyCode ~= Enum.KeyCode.Unknown and input.KeyCode ~= Enum.KeyCode.K then
  2231.                         local SplitMessage = string.split(tostring(input.KeyCode), ".")
  2232.                         local NewKeyNoEnum = SplitMessage[3]
  2233.                         Keybind.KeybindFrame.KeybindBox.Text = tostring(NewKeyNoEnum)
  2234.                         KeybindSettings.CurrentKeybind = tostring(NewKeyNoEnum)
  2235.                         Keybind.KeybindFrame.KeybindBox:ReleaseFocus()
  2236.                         SaveConfiguration()
  2237.                     end
  2238.                 elseif KeybindSettings.CurrentKeybind ~= nil and (input.KeyCode == Enum.KeyCode[KeybindSettings.CurrentKeybind] and not processed) then -- Test
  2239.                     local Held = true
  2240.                     local Connection
  2241.                     Connection = input.Changed:Connect(function(prop)
  2242.                         if prop == "UserInputState" then
  2243.                             Connection:Disconnect()
  2244.                             Held = false
  2245.                         end
  2246.                     end)
  2247.  
  2248.                     if not KeybindSettings.HoldToInteract then
  2249.                         local Success, Response = pcall(KeybindSettings.Callback)
  2250.                         if not Success then
  2251.                             TweenService:Create(Keybind, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play()
  2252.                             TweenService:Create(Keybind.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2253.                             Keybind.Title.Text = "Callback Error"
  2254.                             print("Rayfield | "..KeybindSettings.Name.." Callback Error " ..tostring(Response))
  2255.                             warn('Check docs.sirius.menu for help with Rayfield specific development.')
  2256.                             task.wait(0.5)
  2257.                             Keybind.Title.Text = KeybindSettings.Name
  2258.                             TweenService:Create(Keybind, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2259.                             TweenService:Create(Keybind.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  2260.                         end
  2261.                     else
  2262.                         task.wait(0.25)
  2263.                         if Held then
  2264.                             local Loop; Loop = RunService.Stepped:Connect(function()
  2265.                                 if not Held then
  2266.                                     KeybindSettings.Callback(false) -- maybe pcall this
  2267.                                     Loop:Disconnect()
  2268.                                 else
  2269.                                     KeybindSettings.Callback(true) -- maybe pcall this
  2270.                                 end
  2271.                             end)
  2272.                         end
  2273.                     end
  2274.                 end
  2275.             end)
  2276.  
  2277.             Keybind.KeybindFrame.KeybindBox:GetPropertyChangedSignal("Text"):Connect(function()
  2278.                 TweenService:Create(Keybind.KeybindFrame, TweenInfo.new(0.55, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Size = UDim2.new(0, Keybind.KeybindFrame.KeybindBox.TextBounds.X + 24, 0, 30)}):Play()
  2279.             end)
  2280.  
  2281.             function KeybindSettings:Set(NewKeybind)
  2282.                 Keybind.KeybindFrame.KeybindBox.Text = tostring(NewKeybind)
  2283.                 KeybindSettings.CurrentKeybind = tostring(NewKeybind)
  2284.                 Keybind.KeybindFrame.KeybindBox:ReleaseFocus()
  2285.                 SaveConfiguration()
  2286.             end
  2287.  
  2288.             if Settings.ConfigurationSaving then
  2289.                 if Settings.ConfigurationSaving.Enabled and KeybindSettings.Flag then
  2290.                     RayfieldLibrary.Flags[KeybindSettings.Flag] = KeybindSettings
  2291.                 end
  2292.             end
  2293.  
  2294.             Rayfield.Main:GetPropertyChangedSignal('BackgroundColor3'):Connect(function()
  2295.                 Keybind.KeybindFrame.BackgroundColor3 = SelectedTheme.InputBackground
  2296.                 Keybind.KeybindFrame.UIStroke.Color = SelectedTheme.InputStroke
  2297.             end)
  2298.  
  2299.             return KeybindSettings
  2300.         end
  2301.  
  2302.         -- Toggle
  2303.         function Tab:CreateToggle(ToggleSettings)
  2304.             local ToggleValue = {}
  2305.  
  2306.             local Toggle = Elements.Template.Toggle:Clone()
  2307.             Toggle.Name = ToggleSettings.Name
  2308.             Toggle.Title.Text = ToggleSettings.Name
  2309.             Toggle.Visible = true
  2310.             Toggle.Parent = TabPage
  2311.  
  2312.             Toggle.BackgroundTransparency = 1
  2313.             Toggle.UIStroke.Transparency = 1
  2314.             Toggle.Title.TextTransparency = 1
  2315.             Toggle.Switch.BackgroundColor3 = SelectedTheme.ToggleBackground
  2316.  
  2317.             if SelectedTheme ~= RayfieldLibrary.Theme.Default then
  2318.                 Toggle.Switch.Shadow.Visible = false
  2319.             end
  2320.  
  2321.             TweenService:Create(Toggle, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  2322.             TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  2323.             TweenService:Create(Toggle.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play() 
  2324.  
  2325.             if ToggleSettings.CurrentValue == true then
  2326.                 Toggle.Switch.Indicator.Position = UDim2.new(1, -20, 0.5, 0)
  2327.                 Toggle.Switch.Indicator.UIStroke.Color = SelectedTheme.ToggleEnabledStroke
  2328.                 Toggle.Switch.Indicator.BackgroundColor3 = SelectedTheme.ToggleEnabled
  2329.                 Toggle.Switch.UIStroke.Color = SelectedTheme.ToggleEnabledOuterStroke
  2330.             else
  2331.                 Toggle.Switch.Indicator.Position = UDim2.new(1, -40, 0.5, 0)
  2332.                 Toggle.Switch.Indicator.UIStroke.Color = SelectedTheme.ToggleDisabledStroke
  2333.                 Toggle.Switch.Indicator.BackgroundColor3 = SelectedTheme.ToggleDisabled
  2334.                 Toggle.Switch.UIStroke.Color = SelectedTheme.ToggleDisabledOuterStroke
  2335.             end
  2336.  
  2337.             Toggle.MouseEnter:Connect(function()
  2338.                 TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  2339.             end)
  2340.  
  2341.             Toggle.MouseLeave:Connect(function()
  2342.                 TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2343.             end)
  2344.  
  2345.             Toggle.Interact.MouseButton1Click:Connect(function()
  2346.                 if ToggleSettings.CurrentValue == true then
  2347.                     ToggleSettings.CurrentValue = false
  2348.                     TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  2349.                     TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2350.                     TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.45, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2.new(1, -40, 0.5, 0)}):Play()
  2351.                     TweenService:Create(Toggle.Switch.Indicator.UIStroke, TweenInfo.new(0.55, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Color = SelectedTheme.ToggleDisabledStroke}):Play()
  2352.                     TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.8, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {BackgroundColor3 = SelectedTheme.ToggleDisabled}):Play()
  2353.                     TweenService:Create(Toggle.Switch.UIStroke, TweenInfo.new(0.55, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Color = SelectedTheme.ToggleDisabledOuterStroke}):Play()
  2354.                     TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2355.                     TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()  
  2356.                 else
  2357.                     ToggleSettings.CurrentValue = true
  2358.                     TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  2359.                     TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2360.                     TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.5, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2.new(1, -20, 0.5, 0)}):Play()
  2361.                     TweenService:Create(Toggle.Switch.Indicator.UIStroke, TweenInfo.new(0.55, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Color = SelectedTheme.ToggleEnabledStroke}):Play()
  2362.                     TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.8, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {BackgroundColor3 = SelectedTheme.ToggleEnabled}):Play()
  2363.                     TweenService:Create(Toggle.Switch.UIStroke, TweenInfo.new(0.55, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Color = SelectedTheme.ToggleEnabledOuterStroke}):Play()
  2364.                     TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2365.                     TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()      
  2366.                 end
  2367.  
  2368.                 local Success, Response = pcall(function()
  2369.                     ToggleSettings.Callback(ToggleSettings.CurrentValue)
  2370.                 end)
  2371.  
  2372.                 if not Success then
  2373.                     TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play()
  2374.                     TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2375.                     Toggle.Title.Text = "Callback Error"
  2376.                     print("Rayfield | "..ToggleSettings.Name.." Callback Error " ..tostring(Response))
  2377.                     warn('Check docs.sirius.menu for help with Rayfield specific development.')
  2378.                     task.wait(0.5)
  2379.                     Toggle.Title.Text = ToggleSettings.Name
  2380.                     TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2381.                     TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  2382.                 end
  2383.  
  2384.                 SaveConfiguration()
  2385.             end)
  2386.  
  2387.             function ToggleSettings:Set(NewToggleValue)
  2388.                 if NewToggleValue == true then
  2389.                     ToggleSettings.CurrentValue = true
  2390.                     TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  2391.                     TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2392.                     TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.5, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2.new(1, -20, 0.5, 0)}):Play()
  2393.                     TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.4, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Size = UDim2.new(0,12,0,12)}):Play()
  2394.                     TweenService:Create(Toggle.Switch.Indicator.UIStroke, TweenInfo.new(0.55, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Color = SelectedTheme.ToggleEnabledStroke}):Play()
  2395.                     TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.8, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {BackgroundColor3 = SelectedTheme.ToggleEnabled}):Play()
  2396.                     TweenService:Create(Toggle.Switch.UIStroke, TweenInfo.new(0.55, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Color = SelectedTheme.ToggleEnabledOuterStroke}):Play()
  2397.                     TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.45, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Size = UDim2.new(0,17,0,17)}):Play()  
  2398.                     TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2399.                     TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()  
  2400.                 else
  2401.                     ToggleSettings.CurrentValue = false
  2402.                     TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  2403.                     TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2404.                     TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.45, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2.new(1, -40, 0.5, 0)}):Play()
  2405.                     TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.4, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Size = UDim2.new(0,12,0,12)}):Play()
  2406.                     TweenService:Create(Toggle.Switch.Indicator.UIStroke, TweenInfo.new(0.55, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Color = SelectedTheme.ToggleDisabledStroke}):Play()
  2407.                     TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.8, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {BackgroundColor3 = SelectedTheme.ToggleDisabled}):Play()
  2408.                     TweenService:Create(Toggle.Switch.UIStroke, TweenInfo.new(0.55, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Color = SelectedTheme.ToggleDisabledOuterStroke}):Play()
  2409.                     TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.4, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Size = UDim2.new(0,17,0,17)}):Play()
  2410.                     TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2411.                     TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()  
  2412.                 end
  2413.  
  2414.                 local Success, Response = pcall(function()
  2415.                     ToggleSettings.Callback(ToggleSettings.CurrentValue)
  2416.                 end)
  2417.  
  2418.                 if not Success then
  2419.                     TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play()
  2420.                     TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2421.                     Toggle.Title.Text = "Callback Error"
  2422.                     print("Rayfield | "..ToggleSettings.Name.." Callback Error " ..tostring(Response))
  2423.                     warn('Check docs.sirius.menu for help with Rayfield specific development.')
  2424.                     task.wait(0.5)
  2425.                     Toggle.Title.Text = ToggleSettings.Name
  2426.                     TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2427.                     TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  2428.                 end
  2429.  
  2430.                 SaveConfiguration()
  2431.             end
  2432.  
  2433.             if Settings.ConfigurationSaving then
  2434.                 if Settings.ConfigurationSaving.Enabled and ToggleSettings.Flag then
  2435.                     RayfieldLibrary.Flags[ToggleSettings.Flag] = ToggleSettings
  2436.                 end
  2437.             end
  2438.  
  2439.             Rayfield.Main:GetPropertyChangedSignal('BackgroundColor3'):Connect(function()
  2440.                 Toggle.Switch.BackgroundColor3 = SelectedTheme.ToggleBackground
  2441.  
  2442.                 if SelectedTheme ~= RayfieldLibrary.Theme.Default then
  2443.                     Toggle.Switch.Shadow.Visible = false
  2444.                 end
  2445.  
  2446.                 task.wait()
  2447.  
  2448.                 if not ToggleSettings.CurrentValue then
  2449.                     Toggle.Switch.Indicator.UIStroke.Color = SelectedTheme.ToggleDisabledStroke
  2450.                     Toggle.Switch.Indicator.BackgroundColor3 = SelectedTheme.ToggleDisabled
  2451.                     Toggle.Switch.UIStroke.Color = SelectedTheme.ToggleDisabledOuterStroke
  2452.                 else
  2453.                     Toggle.Switch.Indicator.UIStroke.Color = SelectedTheme.ToggleEnabledStroke
  2454.                     Toggle.Switch.Indicator.BackgroundColor3 = SelectedTheme.ToggleEnabled
  2455.                     Toggle.Switch.UIStroke.Color = SelectedTheme.ToggleEnabledOuterStroke
  2456.                 end
  2457.             end)
  2458.  
  2459.             return ToggleSettings
  2460.         end
  2461.  
  2462.         -- Slider
  2463.         function Tab:CreateSlider(SliderSettings)
  2464.             local SLDragging = false
  2465.             local Slider = Elements.Template.Slider:Clone()
  2466.             Slider.Name = SliderSettings.Name
  2467.             Slider.Title.Text = SliderSettings.Name
  2468.             Slider.Visible = true
  2469.             Slider.Parent = TabPage
  2470.  
  2471.             Slider.BackgroundTransparency = 1
  2472.             Slider.UIStroke.Transparency = 1
  2473.             Slider.Title.TextTransparency = 1
  2474.  
  2475.             if SelectedTheme ~= RayfieldLibrary.Theme.Default then
  2476.                 Slider.Main.Shadow.Visible = false
  2477.             end
  2478.  
  2479.             Slider.Main.BackgroundColor3 = SelectedTheme.SliderBackground
  2480.             Slider.Main.UIStroke.Color = SelectedTheme.SliderStroke
  2481.             Slider.Main.Progress.UIStroke.Color = SelectedTheme.SliderStroke
  2482.             Slider.Main.Progress.BackgroundColor3 = SelectedTheme.SliderProgress
  2483.  
  2484.             TweenService:Create(Slider, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  2485.             TweenService:Create(Slider.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  2486.             TweenService:Create(Slider.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play() 
  2487.  
  2488.             Slider.Main.Progress.Size = UDim2.new(0, Slider.Main.AbsoluteSize.X * ((SliderSettings.CurrentValue + SliderSettings.Range[1]) / (SliderSettings.Range[2] - SliderSettings.Range[1])) > 5 and Slider.Main.AbsoluteSize.X * (SliderSettings.CurrentValue / (SliderSettings.Range[2] - SliderSettings.Range[1])) or 5, 1, 0)
  2489.  
  2490.             if not SliderSettings.Suffix then
  2491.                 Slider.Main.Information.Text = tostring(SliderSettings.CurrentValue)
  2492.             else
  2493.                 Slider.Main.Information.Text = tostring(SliderSettings.CurrentValue) .. " " .. SliderSettings.Suffix
  2494.             end
  2495.  
  2496.             Slider.MouseEnter:Connect(function()
  2497.                 TweenService:Create(Slider, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  2498.             end)
  2499.  
  2500.             Slider.MouseLeave:Connect(function()
  2501.                 TweenService:Create(Slider, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2502.             end)
  2503.  
  2504.             Slider.Main.Interact.InputBegan:Connect(function(Input)
  2505.                 if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then
  2506.                     TweenService:Create(Slider.Main.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2507.                     TweenService:Create(Slider.Main.Progress.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2508.                     SLDragging = true
  2509.                 end
  2510.             end)
  2511.  
  2512.             Slider.Main.Interact.InputEnded:Connect(function(Input)
  2513.                 if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then
  2514.                     TweenService:Create(Slider.Main.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0.4}):Play()
  2515.                     TweenService:Create(Slider.Main.Progress.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0.3}):Play()
  2516.                     SLDragging = false
  2517.                 end
  2518.             end)
  2519.  
  2520.             Slider.Main.Interact.MouseButton1Down:Connect(function(X)
  2521.                 local Current = Slider.Main.Progress.AbsolutePosition.X + Slider.Main.Progress.AbsoluteSize.X
  2522.                 local Start = Current
  2523.                 local Location = X
  2524.                 local Loop; Loop = RunService.Stepped:Connect(function()
  2525.                     if SLDragging then
  2526.                         Location = UserInputService:GetMouseLocation().X
  2527.                         Current = Current + 0.025 * (Location - Start)
  2528.  
  2529.                         if Location < Slider.Main.AbsolutePosition.X then
  2530.                             Location = Slider.Main.AbsolutePosition.X
  2531.                         elseif Location > Slider.Main.AbsolutePosition.X + Slider.Main.AbsoluteSize.X then
  2532.                             Location = Slider.Main.AbsolutePosition.X + Slider.Main.AbsoluteSize.X
  2533.                         end
  2534.  
  2535.                         if Current < Slider.Main.AbsolutePosition.X + 5 then
  2536.                             Current = Slider.Main.AbsolutePosition.X + 5
  2537.                         elseif Current > Slider.Main.AbsolutePosition.X + Slider.Main.AbsoluteSize.X then
  2538.                             Current = Slider.Main.AbsolutePosition.X + Slider.Main.AbsoluteSize.X
  2539.                         end
  2540.  
  2541.                         if Current <= Location and (Location - Start) < 0 then
  2542.                             Start = Location
  2543.                         elseif Current >= Location and (Location - Start) > 0 then
  2544.                             Start = Location
  2545.                         end
  2546.                         TweenService:Create(Slider.Main.Progress, TweenInfo.new(0.45, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Size = UDim2.new(0, Current - Slider.Main.AbsolutePosition.X, 1, 0)}):Play()
  2547.                         local NewValue = SliderSettings.Range[1] + (Location - Slider.Main.AbsolutePosition.X) / Slider.Main.AbsoluteSize.X * (SliderSettings.Range[2] - SliderSettings.Range[1])
  2548.  
  2549.                         NewValue = math.floor(NewValue / SliderSettings.Increment + 0.5) * (SliderSettings.Increment * 10000000) / 10000000
  2550.                         NewValue = math.clamp(NewValue, SliderSettings.Range[1], SliderSettings.Range[2])
  2551.                        
  2552.                         if not SliderSettings.Suffix then
  2553.                             Slider.Main.Information.Text = tostring(NewValue)
  2554.                         else
  2555.                             Slider.Main.Information.Text = tostring(NewValue) .. " " .. SliderSettings.Suffix
  2556.                         end
  2557.  
  2558.                         if SliderSettings.CurrentValue ~= NewValue then
  2559.                             local Success, Response = pcall(function()
  2560.                                 SliderSettings.Callback(NewValue)
  2561.                             end)
  2562.                             if not Success then
  2563.                                 TweenService:Create(Slider, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play()
  2564.                                 TweenService:Create(Slider.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2565.                                 Slider.Title.Text = "Callback Error"
  2566.                                 print("Rayfield | "..SliderSettings.Name.." Callback Error " ..tostring(Response))
  2567.                                 warn('Check docs.sirius.menu for help with Rayfield specific development.')
  2568.                                 task.wait(0.5)
  2569.                                 Slider.Title.Text = SliderSettings.Name
  2570.                                 TweenService:Create(Slider, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2571.                                 TweenService:Create(Slider.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  2572.                             end
  2573.  
  2574.                             SliderSettings.CurrentValue = NewValue
  2575.                             SaveConfiguration()
  2576.                         end
  2577.                     else
  2578.                         TweenService:Create(Slider.Main.Progress, TweenInfo.new(0.3, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Size = UDim2.new(0, Location - Slider.Main.AbsolutePosition.X > 5 and Location - Slider.Main.AbsolutePosition.X or 5, 1, 0)}):Play()
  2579.                         Loop:Disconnect()
  2580.                     end
  2581.                 end)
  2582.             end)
  2583.  
  2584.             function SliderSettings:Set(NewVal)
  2585.                 local NewVal = math.clamp(NewVal, SliderSettings.Range[1], SliderSettings.Range[2])
  2586.                
  2587.                 TweenService:Create(Slider.Main.Progress, TweenInfo.new(0.45, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Size = UDim2.new(0, Slider.Main.AbsoluteSize.X * ((NewVal + SliderSettings.Range[1]) / (SliderSettings.Range[2] - SliderSettings.Range[1])) > 5 and Slider.Main.AbsoluteSize.X * (NewVal / (SliderSettings.Range[2] - SliderSettings.Range[1])) or 5, 1, 0)}):Play()
  2588.                 Slider.Main.Information.Text = tostring(NewVal) .. " " .. (SliderSettings.Suffix or "")
  2589.                
  2590.                 local Success, Response = pcall(function()
  2591.                     SliderSettings.Callback(NewVal)
  2592.                 end)
  2593.                
  2594.                 if not Success then
  2595.                     TweenService:Create(Slider, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play()
  2596.                     TweenService:Create(Slider.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2597.                     Slider.Title.Text = "Callback Error"
  2598.                     print("Rayfield | "..SliderSettings.Name.." Callback Error " ..tostring(Response))
  2599.                     warn('Check docs.sirius.menu for help with Rayfield specific development.')
  2600.                     task.wait(0.5)
  2601.                     Slider.Title.Text = SliderSettings.Name
  2602.                     TweenService:Create(Slider, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2603.                     TweenService:Create(Slider.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  2604.                 end
  2605.                
  2606.                 SliderSettings.CurrentValue = NewVal
  2607.                 SaveConfiguration()
  2608.             end
  2609.  
  2610.             if Settings.ConfigurationSaving then
  2611.                 if Settings.ConfigurationSaving.Enabled and SliderSettings.Flag then
  2612.                     RayfieldLibrary.Flags[SliderSettings.Flag] = SliderSettings
  2613.                 end
  2614.             end
  2615.  
  2616.             Rayfield.Main:GetPropertyChangedSignal('BackgroundColor3'):Connect(function()
  2617.                 if SelectedTheme ~= RayfieldLibrary.Theme.Default then
  2618.                     Slider.Main.Shadow.Visible = false
  2619.                 end
  2620.  
  2621.                 Slider.Main.BackgroundColor3 = SelectedTheme.SliderBackground
  2622.                 Slider.Main.UIStroke.Color = SelectedTheme.SliderStroke
  2623.                 Slider.Main.Progress.UIStroke.Color = SelectedTheme.SliderStroke
  2624.                 Slider.Main.Progress.BackgroundColor3 = SelectedTheme.SliderProgress
  2625.             end)
  2626.  
  2627.             return SliderSettings
  2628.         end
  2629.  
  2630.         Rayfield.Main:GetPropertyChangedSignal('BackgroundColor3'):Connect(function()
  2631.             TabButton.UIStroke.Color = SelectedTheme.TabStroke
  2632.  
  2633.             if Elements.UIPageLayout.CurrentPage == TabPage then
  2634.                 TabButton.BackgroundColor3 = SelectedTheme.TabBackgroundSelected
  2635.                 TabButton.Image.ImageColor3 = SelectedTheme.SelectedTabTextColor
  2636.                 TabButton.Title.TextColor3 = SelectedTheme.SelectedTabTextColor
  2637.             else
  2638.                 TabButton.BackgroundColor3 = SelectedTheme.TabBackground
  2639.                 TabButton.Image.ImageColor3 = SelectedTheme.TabTextColor
  2640.                 TabButton.Title.TextColor3 = SelectedTheme.TabTextColor
  2641.             end
  2642.         end)
  2643.  
  2644.         return Tab
  2645.     end
  2646.  
  2647.     Elements.Visible = true
  2648.  
  2649.  
  2650.     task.wait(1.1)
  2651.     TweenService:Create(Main, TweenInfo.new(0.7, Enum.EasingStyle.Exponential, Enum.EasingDirection.InOut), {Size = UDim2.new(0, 390, 0, 90)}):Play()
  2652.     task.wait(0.3)
  2653.     TweenService:Create(LoadingFrame.Title, TweenInfo.new(0.2, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  2654.     TweenService:Create(LoadingFrame.Subtitle, TweenInfo.new(0.2, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  2655.     TweenService:Create(LoadingFrame.Version, TweenInfo.new(0.2, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  2656.     task.wait(0.1)
  2657.     TweenService:Create(Main, TweenInfo.new(0.6, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Size = useMobileSizing and UDim2.new(0, 500, 0, 275) or UDim2.new(0, 500, 0, 475)}):Play()
  2658.     TweenService:Create(Main.Shadow.Image, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {ImageTransparency = 0.6}):Play()
  2659.  
  2660.     Topbar.BackgroundTransparency = 1
  2661.     Topbar.Divider.Size = UDim2.new(0, 0, 0, 1)
  2662.     Topbar.Divider.BackgroundColor3 = SelectedTheme.ElementStroke
  2663.     Topbar.CornerRepair.BackgroundTransparency = 1
  2664.     Topbar.Title.TextTransparency = 1
  2665.     Topbar.Search.ImageTransparency = 1
  2666.     Topbar.ChangeSize.ImageTransparency = 1
  2667.     Topbar.Hide.ImageTransparency = 1
  2668.  
  2669.  
  2670.     task.wait(0.5)
  2671.     Topbar.Visible = true
  2672.     TweenService:Create(Topbar, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  2673.     TweenService:Create(Topbar.CornerRepair, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  2674.     task.wait(0.1)
  2675.     TweenService:Create(Topbar.Divider, TweenInfo.new(1, Enum.EasingStyle.Exponential), {Size = UDim2.new(1, 0, 0, 1)}):Play()
  2676.     TweenService:Create(Topbar.Title, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  2677.     task.wait(0.05)
  2678.     TweenService:Create(Topbar.Search, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {ImageTransparency = 0.8}):Play()
  2679.     task.wait(0.05)
  2680.     TweenService:Create(Topbar.ChangeSize, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {ImageTransparency = 0.8}):Play()
  2681.     task.wait(0.05)
  2682.     TweenService:Create(Topbar.Hide, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {ImageTransparency = 0.8}):Play()
  2683.     task.wait(0.3)
  2684.  
  2685.     if dragBar then
  2686.         TweenService:Create(dragBarCosmetic, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0.7}):Play()
  2687.     end
  2688.  
  2689.     function Window.ModifyTheme(NewTheme)
  2690.         local success = pcall(ChangeTheme, NewTheme)
  2691.         if not success then
  2692.             RayfieldLibrary:Notify({Title = 'Unable to Change Theme', Content = 'We are unable find a theme on file.', Image = 4400704299})
  2693.         else
  2694.             RayfieldLibrary:Notify({Title = 'Theme Changed', Content = 'Successfully changed theme to '..(typeof(NewTheme) == 'string' and NewTheme or 'Custom Theme')..'.', Image = 4483362748})
  2695.         end
  2696.     end
  2697.  
  2698.     return Window
  2699. end
  2700.  
  2701. local function setVisibility(visibility: boolean, notify: boolean?)
  2702.     if Debounce then return end
  2703.     if visibility then
  2704.         Hidden = false
  2705.         Unhide()
  2706.     else
  2707.         Hidden = true
  2708.         Hide(notify)
  2709.     end
  2710. end
  2711.  
  2712. function RayfieldLibrary:SetVisibility(visibility: boolean)
  2713.     setVisibility(visibility, false)
  2714. end
  2715.  
  2716. function RayfieldLibrary:IsVisible(): boolean
  2717.     return not Hidden
  2718. end
  2719.  
  2720. function RayfieldLibrary:Destroy()
  2721.     Rayfield:Destroy()
  2722. end
  2723.  
  2724. Topbar.ChangeSize.MouseButton1Click:Connect(function()
  2725.     if Debounce then return end
  2726.     if Minimised then
  2727.         Minimised = false
  2728.         Maximise()
  2729.     else
  2730.         Minimised = true
  2731.         Minimise()
  2732.     end
  2733. end)
  2734.  
  2735. Main.Search.Input:GetPropertyChangedSignal('Text'):Connect(function()
  2736.     if #Main.Search.Input.Text > 0 then
  2737.         if not Elements.UIPageLayout.CurrentPage:FindFirstChild('SearchTitle-fsefsefesfsefesfesfThanks') then
  2738.             local searchTitle = Elements.Template.SectionTitle:Clone()
  2739.             searchTitle.Parent = Elements.UIPageLayout.CurrentPage
  2740.             searchTitle.Name = 'SearchTitle-fsefsefesfsefesfesfThanks'
  2741.             searchTitle.LayoutOrder = -100
  2742.             searchTitle.Title.Text = "Results from '"..Elements.UIPageLayout.CurrentPage.Name.."'"
  2743.             searchTitle.Visible = true
  2744.         end
  2745.     else
  2746.         local searchTitle = Elements.UIPageLayout.CurrentPage:FindFirstChild('SearchTitle-fsefsefesfsefesfesfThanks')
  2747.  
  2748.         if searchTitle then
  2749.             searchTitle:Destroy()
  2750.         end
  2751.     end
  2752.  
  2753.     for _, element in ipairs(Elements.UIPageLayout.CurrentPage:GetChildren()) do
  2754.         if element.ClassName ~= 'UIListLayout' and element.Name ~= 'Placeholder' and element.Name ~= 'SearchTitle-fsefsefesfsefesfesfThanks' then
  2755.             if element.Name == 'SectionTitle' then
  2756.                 if #Main.Search.Input.Text == 0 then
  2757.                     element.Visible = true
  2758.                 else
  2759.                     element.Visible = false
  2760.                 end
  2761.             else
  2762.                 if string.lower(element.Name):find(string.lower(Main.Search.Input.Text), 1, true) then
  2763.                     element.Visible = true
  2764.                 else
  2765.                     element.Visible = false
  2766.                 end
  2767.             end
  2768.         end
  2769.     end
  2770. end)
  2771.  
  2772. Main.Search.Input.FocusLost:Connect(function(enterPressed)
  2773.     if #Main.Search.Input.Text == 0 and searchOpen then
  2774.         task.wait(0.12)
  2775.         closeSearch()
  2776.     end
  2777. end)
  2778.  
  2779. Topbar.Search.MouseButton1Click:Connect(function()
  2780.     task.spawn(function()
  2781.         if searchOpen then
  2782.             closeSearch()
  2783.         else
  2784.             openSearch()
  2785.         end
  2786.     end)
  2787. end)
  2788.  
  2789.  
  2790. Topbar.Hide.MouseButton1Click:Connect(function()
  2791.     setVisibility(Hidden, not useMobileSizing)
  2792. end)
  2793.  
  2794. UserInputService.InputBegan:Connect(function(input, processed)
  2795.     if (input.KeyCode == Enum.KeyCode.K and not processed) then
  2796.         if Debounce then return end
  2797.         if Hidden then
  2798.             Hidden = false
  2799.             Unhide()
  2800.         else
  2801.             Hidden = true
  2802.             Hide()
  2803.         end
  2804.     end
  2805. end)
  2806.  
  2807. if MPrompt then
  2808.     MPrompt.Interact.MouseButton1Click:Connect(function()
  2809.         if Debounce then return end
  2810.         if Hidden then
  2811.             Hidden = false
  2812.             Unhide()
  2813.         end
  2814.     end)
  2815. end
  2816.  
  2817. for _, TopbarButton in ipairs(Topbar:GetChildren()) do
  2818.     if TopbarButton.ClassName == "ImageButton" and TopbarButton.Name ~= 'Icon' then
  2819.         TopbarButton.MouseEnter:Connect(function()
  2820.             TweenService:Create(TopbarButton, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageTransparency = 0}):Play()
  2821.         end)
  2822.  
  2823.         TopbarButton.MouseLeave:Connect(function()
  2824.             TweenService:Create(TopbarButton, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageTransparency = 0.8}):Play()
  2825.         end)
  2826.     end
  2827. end
  2828.  
  2829. function RayfieldLibrary:LoadConfiguration()
  2830.     local config
  2831.  
  2832.     if useStudio then
  2833.         config = [[{"Toggle1adwawd":"false","Keybind1":"Q","InputExample":"","Slider1dawd":120,"ColorPicfsefker1":{"B":255,"G":255,"R":255},"Slidefefsr1":80,"dawdawd":"","ColorPicker1awd":{"B":255,"G":255,"R":255},"Dropdown1":["Ocean"]}]]
  2834.     end
  2835.  
  2836.     if CEnabled then
  2837.         local notified
  2838.         local loaded
  2839.  
  2840.         local success, result = pcall(function()
  2841.             if useStudio and config then
  2842.                 loaded = LoadConfiguration(config)
  2843.                 return
  2844.             end
  2845.  
  2846.             if isfile then
  2847.                 if isfile(ConfigurationFolder .. "/" .. CFileName .. ConfigurationExtension) then
  2848.                     loaded = LoadConfiguration(readfile(ConfigurationFolder .. "/" .. CFileName .. ConfigurationExtension))
  2849.                 end
  2850.             else
  2851.                 notified = true
  2852.                 RayfieldLibrary:Notify({Title = "Rayfield Configurations", Content = "We couldn't enable Configuration Saving as you are not using file supported software.", Image = 4384402990})
  2853.             end
  2854.         end)
  2855.  
  2856.         if success and loaded and not notified then
  2857.             RayfieldLibrary:Notify({Title = "Rayfield Configurations", Content = "The configuration file for this script has been loaded from a previous session.", Image = 4384403532})
  2858.         elseif not success and not notified then
  2859.             warn('Rayfield Configurations Error | '..tostring(result))
  2860.             RayfieldLibrary:Notify({Title = "Rayfield Configurations", Content = "We've encountered an issue loading your configuration correctly.\n\nCheck the Developer Console for more information.", Image = 4384402990})
  2861.         end
  2862.     end
  2863. end
  2864.  
  2865. if useStudio then
  2866.     -- run w/ studio
  2867.     -- Feel free to place your own script here to see how it'd work in Roblox Studio before running it on your execution software.
  2868.  
  2869.  
  2870.     local Window = RayfieldLibrary:CreateWindow({
  2871.         Name = "Rayfield Example Window",
  2872.         LoadingTitle = "Rayfield Interface Suite",
  2873.         Theme = 'Default',
  2874.         Icon = 0,
  2875.         LoadingSubtitle = "by Sirius",
  2876.         ConfigurationSaving = {
  2877.             Enabled = true,
  2878.             FolderName = nil, -- Create a custom folder for your hub/game
  2879.             FileName = "Big Hub52"
  2880.         },
  2881.         Discord = {
  2882.             Enabled = false,
  2883.             Invite = "noinvitelink", -- The Discord invite code, do not include discord.gg/. E.g. discord.gg/ABCD would be ABCD
  2884.             RememberJoins = true -- Set this to false to make them join the discord every time they load it up
  2885.         },
  2886.         KeySystem = false, -- Set this to true to use our key system
  2887.         KeySettings = {
  2888.             Title = "Untitled",
  2889.             Subtitle = "Key System",
  2890.             Note = "No method of obtaining the key is provided",
  2891.             FileName = "Key", -- It is recommended to use something unique as other scripts using Rayfield may overwrite your key file
  2892.             SaveKey = true, -- The user's key will be saved, but if you change the key, they will be unable to use your script
  2893.             GrabKeyFromSite = false, -- If this is true, set Key below to the RAW site you would like Rayfield to get the key from
  2894.             Key = {"Hello"} -- List of keys that will be accepted by the system, can be RAW file links (pastebin, github etc) or simple strings ("hello","key22")
  2895.         }
  2896.     })
  2897.  
  2898.     local Tab = Window:CreateTab("Tab Example", 'key-round') -- Title, Image
  2899.     local Tab2 = Window:CreateTab("Tab Example 2", 4483362458) -- Title, Image
  2900.  
  2901.     local Section = Tab2:CreateSection("Section")
  2902.  
  2903.  
  2904.     local ColorPicker = Tab2:CreateColorPicker({
  2905.         Name = "Color Picker",
  2906.         Color = Color3.fromRGB(255,255,255),
  2907.         Flag = "ColorPicfsefker1", -- A flag is the identifier for the configuration file, make sure every element has a different flag if you're using configuration saving to ensure no overlaps
  2908.         Callback = function(Value)
  2909.             -- The function that takes place every time the color picker is moved/changed
  2910.             -- The variable (Value) is a Color3fromRGB value based on which color is selected
  2911.         end
  2912.     })
  2913.  
  2914.     local Slider = Tab2:CreateSlider({
  2915.         Name = "Slider Example",
  2916.         Range = {0, 100},
  2917.         Increment = 10,
  2918.         Suffix = "Bananas",
  2919.         CurrentValue = 40,
  2920.         Flag = "Slidefefsr1", -- A flag is the identifier for the configuration file, make sure every element has a different flag if you're using configuration saving to ensure no overlaps
  2921.         Callback = function(Value)
  2922.             -- The function that takes place when the slider changes
  2923.             -- The variable (Value) is a number which correlates to the value the slider is currently at
  2924.         end,
  2925.     })
  2926.  
  2927.     local Input = Tab2:CreateInput({
  2928.         Name = "Input Example",
  2929.         CurrentValue = '',
  2930.         PlaceholderText = "Input Placeholder",
  2931.         Flag = 'dawdawd',
  2932.         RemoveTextAfterFocusLost = false,
  2933.         Callback = function(Text)
  2934.             -- The function that takes place when the input is changed
  2935.             -- The variable (Text) is a string for the value in the text box
  2936.         end,
  2937.     })
  2938.  
  2939.  
  2940.     --RayfieldLibrary:Notify({Title = "Rayfield Interface", Content = "Welcome to Rayfield. These - are the brand new notification design for Rayfield, with custom sizing and Rayfield calculated wait times.", Image = 4483362458})
  2941.  
  2942.     local Section = Tab:CreateSection("Section Example")
  2943.  
  2944.     local Button = Tab:CreateButton({
  2945.         Name = "Change Theme",
  2946.         Callback = function()
  2947.             -- The function that takes place when the button is pressed
  2948.             Window.ModifyTheme('DarkBlue')
  2949.         end,
  2950.     })
  2951.  
  2952.     local Toggle = Tab:CreateToggle({
  2953.         Name = "Toggle Example",
  2954.         CurrentValue = false,
  2955.         Flag = "Toggle1adwawd", -- A flag is the identifier for the configuration file, make sure every element has a different flag if you're using configuration saving to ensure no overlaps
  2956.         Callback = function(Value)
  2957.             -- The function that takes place when the toggle is pressed
  2958.             -- The variable (Value) is a boolean on whether the toggle is true or false
  2959.         end,
  2960.     })
  2961.  
  2962.     local ColorPicker = Tab:CreateColorPicker({
  2963.         Name = "Color Picker",
  2964.         Color = Color3.fromRGB(255,255,255),
  2965.         Flag = "ColorPicker1awd", -- A flag is the identifier for the configuration file, make sure every element has a different flag if you're using configuration saving to ensure no overlaps
  2966.         Callback = function(Value)
  2967.             -- The function that takes place every time the color picker is moved/changed
  2968.             -- The variable (Value) is a Color3fromRGB value based on which color is selected
  2969.         end
  2970.     })
  2971.  
  2972.     local Slider = Tab:CreateSlider({
  2973.         Name = "Slider Example",
  2974.         Range = {0, 100},
  2975.         Increment = 10,
  2976.         Suffix = "Bananas",
  2977.         CurrentValue = 40,
  2978.         Flag = "Slider1dawd", -- A flag is the identifier for the configuration file, make sure every element has a different flag if you're using configuration saving to ensure no overlaps
  2979.         Callback = function(Value)
  2980.             -- The function that takes place when the slider changes
  2981.             -- The variable (Value) is a number which correlates to the value the slider is currently at
  2982.         end,
  2983.     })
  2984.  
  2985.     local Input = Tab:CreateInput({
  2986.         Name = "Input Example",
  2987.         CurrentValue = "",
  2988.         PlaceholderText = "Adaptive Input",
  2989.         RemoveTextAfterFocusLost = false,
  2990.         Flag = 'InputExample',
  2991.         Callback = function(Text)
  2992.             -- The function that takes place when the input is changed
  2993.             -- The variable (Text) is a string for the value in the text box
  2994.         end,
  2995.     })
  2996.  
  2997.     local thoptions = {}
  2998.     for themename, theme in pairs(RayfieldLibrary.Theme) do
  2999.         table.insert(thoptions, themename)
  3000.     end
  3001.  
  3002.     local Dropdown = Tab:CreateDropdown({
  3003.         Name = "Theme",
  3004.         Options = thoptions,
  3005.         CurrentOption = {"Default"},
  3006.         MultipleOptions = false,
  3007.         Flag = "Dropdown1", -- A flag is the identifier for the configuration file, make sure every element has a different flag if you're using configuration saving to ensure no overlaps
  3008.         Callback = function(Options)
  3009.             --Window.ModifyTheme(Options[1])
  3010.             -- The function that takes place when the selected option is changed
  3011.             -- The variable (Options) is a table of strings for the current selected options
  3012.         end,
  3013.     })
  3014.  
  3015.  
  3016.     --Window.ModifyTheme({
  3017.     --  TextColor = Color3.fromRGB(50, 55, 60),
  3018.     --  Background = Color3.fromRGB(240, 245, 250),
  3019.     --  Topbar = Color3.fromRGB(215, 225, 235),
  3020.     --  Shadow = Color3.fromRGB(200, 210, 220),
  3021.  
  3022.     --  NotificationBackground = Color3.fromRGB(210, 220, 230),
  3023.     --  NotificationActionsBackground = Color3.fromRGB(225, 230, 240),
  3024.  
  3025.     --  TabBackground = Color3.fromRGB(200, 210, 220),
  3026.     --  TabStroke = Color3.fromRGB(180, 190, 200),
  3027.     --  TabBackgroundSelected = Color3.fromRGB(175, 185, 200),
  3028.     --  TabTextColor = Color3.fromRGB(50, 55, 60),
  3029.     --  SelectedTabTextColor = Color3.fromRGB(30, 35, 40),
  3030.  
  3031.     --  ElementBackground = Color3.fromRGB(210, 220, 230),
  3032.     --  ElementBackgroundHover = Color3.fromRGB(220, 230, 240),
  3033.     --  SecondaryElementBackground = Color3.fromRGB(200, 210, 220),
  3034.     --  ElementStroke = Color3.fromRGB(190, 200, 210),
  3035.     --  SecondaryElementStroke = Color3.fromRGB(180, 190, 200),
  3036.  
  3037.     --  SliderBackground = Color3.fromRGB(200, 220, 235),  -- Lighter shade
  3038.     --  SliderProgress = Color3.fromRGB(70, 130, 180),
  3039.     --  SliderStroke = Color3.fromRGB(150, 180, 220),
  3040.  
  3041.     --  ToggleBackground = Color3.fromRGB(210, 220, 230),
  3042.     --  ToggleEnabled = Color3.fromRGB(70, 160, 210),
  3043.     --  ToggleDisabled = Color3.fromRGB(180, 180, 180),
  3044.     --  ToggleEnabledStroke = Color3.fromRGB(60, 150, 200),
  3045.     --  ToggleDisabledStroke = Color3.fromRGB(140, 140, 140),
  3046.     --  ToggleEnabledOuterStroke = Color3.fromRGB(100, 120, 140),
  3047.     --  ToggleDisabledOuterStroke = Color3.fromRGB(120, 120, 130),
  3048.  
  3049.     --  DropdownSelected = Color3.fromRGB(220, 230, 240),
  3050.     --  DropdownUnselected = Color3.fromRGB(200, 210, 220),
  3051.  
  3052.     --  InputBackground = Color3.fromRGB(220, 230, 240),
  3053.     --  InputStroke = Color3.fromRGB(180, 190, 200),
  3054.     --  PlaceholderColor = Color3.fromRGB(150, 150, 150)
  3055.     --})
  3056.  
  3057.     local Keybind = Tab:CreateKeybind({
  3058.         Name = "Keybind Example",
  3059.         CurrentKeybind = "Q",
  3060.         HoldToInteract = false,
  3061.         Flag = "Keybind1", -- A flag is the identifier for the configuration file, make sure every element has a different flag if you're using configuration saving to ensure no overlaps
  3062.         Callback = function(Keybind)
  3063.             -- The function that takes place when the keybind is pressed
  3064.             -- The variable (Keybind) is a boolean for whether the keybind is being held or not (HoldToInteract needs to be true)
  3065.         end,
  3066.     })
  3067.  
  3068.     local Label = Tab:CreateLabel("Label Example")
  3069.  
  3070.     local Label2 = Tab:CreateLabel("Warning", 4483362458, Color3.fromRGB(255, 159, 49),  true)
  3071.  
  3072.     local Paragraph = Tab:CreateParagraph({Title = "Paragraph Example", Content = "Paragraph ExampleParagraph ExampleParagraph ExampleParagraph ExampleParagraph ExampleParagraph ExampleParagraph ExampleParagraph ExampleParagraph ExampleParagraph ExampleParagraph ExampleParagraph ExampleParagraph ExampleParagraph Example"})
  3073. end
  3074.  
  3075. if CEnabled and Main:FindFirstChild('Notice') then
  3076.     Main.Notice.BackgroundTransparency = 1
  3077.     Main.Notice.Title.TextTransparency = 1
  3078.     Main.Notice.Size = UDim2.new(0, 0, 0, 0)
  3079.     Main.Notice.Position = UDim2.new(0.5, 0, 0, -100)
  3080.     Main.Notice.Visible = true
  3081.  
  3082.  
  3083.     TweenService:Create(Main.Notice, TweenInfo.new(0.5, Enum.EasingStyle.Exponential, Enum.EasingDirection.InOut), {Size = UDim2.new(0, 280, 0, 35), Position = UDim2.new(0.5, 0, 0, -50), BackgroundTransparency = 0.5}):Play()
  3084.     TweenService:Create(Main.Notice.Title, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 0.1}):Play()
  3085. end
  3086.  
  3087. if not useStudio then
  3088.     local success, result = pcall(function()
  3089.         loadstring(game:HttpGet('https://raw.githubusercontent.com/SiriusSoftwareLtd/Sirius/refs/heads/request/boost.lua'))()
  3090.     end)
  3091.  
  3092.     if not success then
  3093.         print('Error with boost file.')
  3094.         print(result)
  3095.     end
  3096. end
  3097.  
  3098. task.delay(4, function()
  3099.     RayfieldLibrary.LoadConfiguration()
  3100.     if Main:FindFirstChild('Notice') and Main.Notice.Visible then
  3101.         TweenService:Create(Main.Notice, TweenInfo.new(0.5, Enum.EasingStyle.Exponential, Enum.EasingDirection.InOut), {Size = UDim2.new(0, 100, 0, 25), Position = UDim2.new(0.5, 0, 0, -100), BackgroundTransparency = 1}):Play()
  3102.         TweenService:Create(Main.Notice.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  3103.  
  3104.         task.wait(0.5)
  3105.         Main.Notice.Visible = false
  3106.     end
  3107. end)
  3108.  
  3109. return RayfieldLibrary
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement