Advertisement
chen399d

測試UI

Jun 24th, 2025 (edited)
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 69.34 KB | None | 0 0
  1. local Forums = {}
  2. local minimized = false
  3.  
  4. local tween = game:GetService("TweenService")
  5. local tweeninfo = TweenInfo.new
  6. local input = game:GetService("UserInputService")
  7. local run = game:GetService("RunService")
  8.  
  9. function Forums:DraggingEnabled(frame, parent)
  10.        
  11.     parent = parent or frame
  12.    
  13.     -- stolen from wally or kiriot, kek
  14.     local dragging = false
  15.     local dragInput, mousePos, framePos
  16.  
  17.     frame.InputBegan:Connect(function(input)
  18.         if input.UserInputType == Enum.UserInputType.MouseButton1 then
  19.             dragging = true
  20.             mousePos = input.Position
  21.             framePos = parent.Position
  22.            
  23.             input.Changed:Connect(function()
  24.                 if input.UserInputState == Enum.UserInputState.End then
  25.                     dragging = false
  26.                 end
  27.             end)
  28.         end
  29.     end)
  30.  
  31.     frame.InputChanged:Connect(function(input)
  32.         if input.UserInputType == Enum.UserInputType.MouseMovement then
  33.             dragInput = input
  34.         end
  35.     end)
  36.  
  37.     input.InputChanged:Connect(function(input)
  38.         if input == dragInput and dragging then
  39.             local delta = input.Position - mousePos
  40.             game.TweenService:Create(parent, TweenInfo.new(0.08, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {
  41.                 Position  = UDim2.new(framePos.X.Scale, framePos.X.Offset + delta.X, framePos.Y.Scale, framePos.Y.Offset + delta.Y)
  42.             }):Play()
  43.             --parent.Position  = UDim2.new(framePos.X.Scale, framePos.X.Offset + delta.X, framePos.Y.Scale, framePos.Y.Offset + delta.Y)
  44.         end
  45.     end)
  46. end
  47. function Forums:UIMinimize()
  48.         if minimized then
  49.             game.TweenService:Create(game.CoreGui[getgenv().libName].shadow.Main, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
  50.                 Size = UDim2.new(0, 486, 0, 283)
  51.             }):Play()
  52.             wait()
  53.             game.TweenService:Create(game.CoreGui[getgenv().libName].shadow, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
  54.                 ImageTransparency = 0
  55.             }):Play()
  56.             minimized = false
  57.         else
  58.             game.TweenService:Create(game.CoreGui[getgenv().libName].shadow, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
  59.                 ImageTransparency = 1
  60.             }):Play()
  61.             wait()
  62.             game.TweenService:Create(game.CoreGui[getgenv().libName].shadow.Main, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
  63.                 Size = UDim2.new(0,0,0,0)
  64.             }):Play()
  65.             minimized = true
  66.         end
  67.     end
  68.  
  69. function Forums.new(newName)
  70.     for i,v in pairs(game.CoreGui:GetChildren()) do
  71.     if v.Name == newName then
  72.            v:Destroy()            
  73.         end
  74.     end
  75.     getgenv().libName = newName
  76.     newName = newName or "forum.robloxscripts.com"
  77.  
  78.     local _81asf91z9asf1 = Instance.new("ScreenGui")
  79.     local shadow = Instance.new("ImageLabel")
  80.     local Main = Instance.new("Frame")
  81.     local header = Instance.new("Frame")
  82.     local title = Instance.new("TextLabel")
  83.     local triangle1 = Instance.new("ImageLabel")
  84.     local triangle = Instance.new("ImageLabel")
  85.     local close = Instance.new("ImageButton")
  86.     local containerHolder = Instance.new("Frame")
  87.     local pages = Instance.new("Folder")
  88.     local newPage = Instance.new("ScrollingFrame")
  89.     local sectionList = Instance.new("UIListLayout")
  90.     local UIListLayout = Instance.new("UIListLayout")
  91.     local UIListLayout_2 = Instance.new("UIListLayout")
  92.  
  93.     Forums:DraggingEnabled(header, shadow)
  94.    
  95.     UIListLayout.Parent = Main
  96.     UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  97.     UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  98.  
  99.     _81asf91z9asf1.Name = newName
  100.     _81asf91z9asf1.Parent = game.CoreGui
  101.     _81asf91z9asf1.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  102.  
  103.     shadow.Name = "shadow"
  104.     shadow.Parent = _81asf91z9asf1
  105.     shadow.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  106.     shadow.BackgroundTransparency = 1.000
  107.     shadow.Position = UDim2.new(0.377575755, 0, 0.382281542, 0)
  108.     shadow.Size = UDim2.new(0, 539, 0, 317)
  109.     shadow.ZIndex = 0
  110.     shadow.ImageTransparency = 1
  111.     shadow.Image = "rbxassetid://4996891970"
  112.     shadow.ImageColor3 = Color3.fromRGB(0, 0, 0)
  113.  
  114.     Main.Name = "Main"
  115.     Main.Parent = shadow
  116.     Main.BackgroundColor3 = Color3.fromRGB(36, 36, 36)
  117.     Main.BorderColor3 = Color3.fromRGB(27, 27, 27)
  118.     Main.ClipsDescendants = true
  119.     Main.Position = UDim2.new(0.361818194, 0, 0.354368925, 0)
  120.     Main.Size = UDim2.new(0,0,0,0) --0, 486, 0, 283
  121.     header.Name = "header"
  122.     header.Parent = Main
  123.     header.BackgroundColor3 = Color3.fromRGB(141, 56, 56)
  124.     header.BorderSizePixel = 0
  125.     header.ClipsDescendants = true
  126.     header.Size = UDim2.new(1.00000012, 0, -0.00295740133, 36)
  127.  
  128.     title.Name = "title"
  129.     title.Parent = header
  130.     title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  131.     title.BackgroundTransparency = 1.000
  132.     title.Position = UDim2.new(0.0164541025, 0, 0.170633629, 0)
  133.     title.Size = UDim2.new(0, 202, 0, 23)
  134.     title.ZIndex = 5
  135.     title.Font = Enum.Font.Gotham
  136.     title.Text = newName
  137.     title.TextColor3 = Color3.fromRGB(255, 255, 255)
  138.     title.TextSize = 14.000
  139.     title.TextXAlignment = Enum.TextXAlignment.Left
  140.  
  141.     triangle1.Name = "triangle1"
  142.     triangle1.Parent = header
  143.     triangle1.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  144.     triangle1.BackgroundTransparency = 1.000
  145.     triangle1.BorderSizePixel = 0
  146.     triangle1.ClipsDescendants = true
  147.     triangle1.Position = UDim2.new(-0.302344143, 0, -0.483461976, 0)
  148.     triangle1.Size = UDim2.new(0, 283, 0, 81)
  149.     triangle1.Image = "http://www.roblox.com/asset/?id=6676220228"
  150.     triangle1.ImageColor3 = Color3.fromRGB(130, 51, 51)
  151.  
  152.     triangle.Name = "triangle"
  153.     triangle.Parent = header
  154.     triangle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  155.     triangle.BackgroundTransparency = 1.000
  156.     triangle.BorderSizePixel = 0
  157.     triangle.ClipsDescendants = true
  158.     triangle.Position = UDim2.new(0.824735582, 0, -0.483461976, 0)
  159.     triangle.Size = UDim2.new(0, 148, 0, 81)
  160.     triangle.Image = "http://www.roblox.com/asset/?id=6676220228"
  161.     triangle.ImageColor3 = Color3.fromRGB(130, 51, 51)
  162.  
  163.     close.Name = "close"
  164.     close.Parent = header
  165.     close.BackgroundTransparency = 1.000
  166.     close.Position = UDim2.new(0.944999993, 0, 0.199000001, 0)
  167.     close.Size = UDim2.new(0, 20, 0, 20)
  168.     close.ZIndex = 2
  169.     close.AutoButtonColor = false
  170.     close.Image = "rbxassetid://3926305904"
  171.     close.ImageRectOffset = Vector2.new(284, 4)
  172.     close.ImageRectSize = Vector2.new(24, 24)
  173.     close.MouseButton1Click:Connect(function()
  174.         game.TweenService:Create(shadow, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
  175.             ImageTransparency = 1
  176.         }):Play()
  177.         wait()
  178.         game.TweenService:Create(Main, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
  179.             Size = UDim2.new(0,0,0,0)
  180.         }):Play()
  181.         wait(1)
  182.         _81asf91z9asf1:Destroy()
  183.     end)
  184.  
  185.     containerHolder.Name = "containerHolder"
  186.     containerHolder.Parent = Main
  187.     containerHolder.BackgroundColor3 = Color3.fromRGB(36, 36, 36)
  188.     containerHolder.BorderSizePixel = 0
  189.     containerHolder.Position = UDim2.new(0, 0, 0.124251083, 0)
  190.     containerHolder.Size = UDim2.new(0, 485, 0, 247)
  191.  
  192.     pages.Name = "pages"
  193.     pages.Parent = containerHolder
  194.  
  195.     UIListLayout_2.Parent = shadow
  196.     UIListLayout_2.HorizontalAlignment = Enum.HorizontalAlignment.Center
  197.     UIListLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
  198.     UIListLayout_2.VerticalAlignment = Enum.VerticalAlignment.Center
  199.  
  200.     game.TweenService:Create(Main, TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
  201.         Size = UDim2.new(0, 486, 0, 283)
  202.     }):Play()
  203.     wait()
  204.     game.TweenService:Create(shadow, TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
  205.         ImageTransparency = 0
  206.     }):Play()
  207.  
  208.     newPage.Name = "newPage"
  209.     newPage.Parent = pages
  210.     newPage.Active = true
  211.     newPage.BackgroundColor3 = Color3.fromRGB(36, 36, 36)
  212.     newPage.BackgroundTransparency = 1.000
  213.     newPage.BorderColor3 = Color3.fromRGB(27, 27, 27)
  214.     newPage.Size = UDim2.new(1, 0, 1, 0)
  215.     newPage.ScrollBarThickness = 3
  216.     newPage.ScrollBarImageColor3 = Color3.fromRGB(193, 76, 76)
  217.     sectionList:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
  218.         newPage.CanvasSize = UDim2.new(0,0,0,sectionList.AbsoluteContentSize.Y)
  219.     end)
  220.  
  221.     sectionList.Name = "sectionList"
  222.     sectionList.Parent = newPage
  223.     sectionList.HorizontalAlignment = Enum.HorizontalAlignment.Center
  224.     sectionList.SortOrder = Enum.SortOrder.LayoutOrder
  225.  
  226.     local sections = {}
  227.  
  228.     function sections:NewSection(title)
  229.         title = title or "Section"
  230.  
  231.         local sectionMain = Instance.new("Frame")
  232.         local itemsList = Instance.new("UIListLayout")
  233.         local sectionOpen = Instance.new("TextButton")
  234.         local sectionTitle = Instance.new("TextLabel")
  235.  
  236.         sectionMain.Name = "sectionMain"
  237.         sectionMain.Parent = newPage
  238.         sectionMain.BackgroundColor3 = Color3.fromRGB(32, 32, 32)
  239.         sectionMain.BorderColor3 = Color3.fromRGB(27, 27, 27)
  240.         sectionMain.ClipsDescendants = true
  241.         sectionMain.Position = UDim2.new(0, 0, 0.0040487065, 0)
  242.         sectionMain.Size = UDim2.new(0, 485, 0, 36)
  243.  
  244.         itemsList.Name = "itemsList"
  245.         itemsList.Parent = sectionMain
  246.         itemsList.HorizontalAlignment = Enum.HorizontalAlignment.Center
  247.         itemsList.SortOrder = Enum.SortOrder.LayoutOrder
  248.         itemsList.Padding = UDim.new(0, 5)
  249.  
  250.         sectionOpen.Name = "sectionOpen"
  251.         sectionOpen.Parent = sectionMain
  252.         sectionOpen.BackgroundColor3 = Color3.fromRGB(36, 36, 36)
  253.         sectionOpen.BorderColor3 = Color3.fromRGB(27, 27, 27)
  254.         sectionOpen.Size = UDim2.new(0, 486, 0, 36)
  255.         sectionOpen.AutoButtonColor = false
  256.         sectionOpen.Text = ""
  257.         sectionOpen.Font = Enum.Font.SourceSans
  258.         sectionOpen.TextColor3 = Color3.fromRGB(0, 0, 0)
  259.         sectionOpen.TextSize = 14.000
  260.  
  261.         sectionTitle.Name = "sectionTitle"
  262.         sectionTitle.Parent = sectionOpen
  263.         sectionTitle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  264.         sectionTitle.BackgroundTransparency = 1.000
  265.         sectionTitle.Position = UDim2.new(0.0222204365, 0, 0.245634928, 0)
  266.         sectionTitle.Size = UDim2.new(0, 184, 0, 18)
  267.         sectionTitle.Font = Enum.Font.Gotham
  268.         sectionTitle.Text = title
  269.         sectionTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
  270.         sectionTitle.TextSize = 14.000
  271.         sectionTitle.TextXAlignment = Enum.TextXAlignment.Left
  272.  
  273.         local btn = sectionOpen
  274.         local opened = false
  275.         btn.MouseButton1Click:Connect(function()
  276.             if opened then
  277.                 game.TweenService:Create(sectionMain, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  278.                     Size = UDim2.new(0, 486,0, 36)
  279.                 }):Play()
  280.                 opened = false
  281.             else
  282.                 game.TweenService:Create(sectionMain, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  283.                     Size = UDim2.new(0,itemsList.AbsoluteContentSize.X,0, itemsList.AbsoluteContentSize.Y + 5)
  284.                 }):Play()
  285.                 opened = true
  286.             end
  287.         end)
  288.         btn.MouseEnter:Connect(function()
  289.             game.TweenService:Create(sectionTitle, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  290.                 TextColor3 = Color3.fromRGB(203, 203, 203)
  291.             }):Play()
  292.         end)
  293.  
  294.         btn.MouseLeave:Connect(function()
  295.             game.TweenService:Create(sectionTitle, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  296.                 TextColor3 = Color3.fromRGB(255, 255, 255)
  297.             }):Play()
  298.         end)
  299.  
  300.         local fElements = {}
  301.  
  302.         function fElements:NewButton(title, callback)
  303.             local ButtonFunctions = {}
  304.             title = title or "New Button"
  305.             callback = callback or function() end
  306.  
  307.             local btnFrame = Instance.new("TextButton")
  308.             local btnText = Instance.new("TextLabel")
  309.             local triangle = Instance.new("ImageLabel")
  310.             local Sample = Instance.new("ImageLabel")
  311.  
  312.             btnFrame.Name = "btnFrame"
  313.             btnFrame.Parent = sectionMain
  314.             btnFrame.BackgroundColor3 = Color3.fromRGB(141, 56, 56)
  315.             btnFrame.BorderColor3 = Color3.fromRGB(27, 27, 27)
  316.             btnFrame.ClipsDescendants = true
  317.             btnFrame.Position = UDim2.new(0.00720164599, 0, 0.241830066, 0)
  318.             btnFrame.Size = UDim2.new(0, 474, 0, 32)
  319.             btnFrame.Text = ""
  320.             btnFrame.AutoButtonColor = false
  321.             btnFrame.Font = Enum.Font.SourceSans
  322.             btnFrame.TextColor3 = Color3.fromRGB(0, 0, 0)
  323.             btnFrame.TextSize = 14.000
  324.  
  325.             btnText.Name = "btnText"
  326.             btnText.Parent = btnFrame
  327.             btnText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  328.             btnText.BackgroundTransparency = 1.000
  329.             btnText.Position = UDim2.new(0.01774057, 0, 0.200000182, 0)
  330.             btnText.Size = UDim2.new(0, 175, 0, 18)
  331.             btnText.ZIndex = 5
  332.             btnText.Font = Enum.Font.Gotham
  333.             btnText.Text = title
  334.             btnText.TextColor3 = Color3.fromRGB(255, 255, 255)
  335.             btnText.TextSize = 14.000
  336.             btnText.TextXAlignment = Enum.TextXAlignment.Left
  337.  
  338.             triangle.Name = "triangle"
  339.             triangle.Parent = btnFrame
  340.             triangle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  341.             triangle.BackgroundTransparency = 1.000
  342.             triangle.BorderSizePixel = 0
  343.             triangle.ClipsDescendants = true
  344.             triangle.Position = UDim2.new(0.839998424, 0, -1.29596233, 0)
  345.             triangle.Size = UDim2.new(0, 132, 0, 81)
  346.             triangle.ZIndex = 5
  347.             triangle.Image = "http://www.roblox.com/asset/?id=6676220228"
  348.             triangle.ImageColor3 = Color3.fromRGB(130, 51, 51)
  349.  
  350.             Sample.Name = "Sample"
  351.             Sample.Parent = btnFrame
  352.             Sample.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  353.             Sample.BackgroundTransparency = 1.000
  354.             Sample.ZIndex = 2
  355.             Sample.Image = "http://www.roblox.com/asset/?id=4560909609"
  356.             Sample.ImageColor3 = Color3.fromRGB(71, 27, 27)
  357.             Sample.ImageTransparency = 0.600
  358.  
  359.             local ms = game.Players.LocalPlayer:GetMouse()
  360.  
  361.             local btn = btnFrame
  362.             local sample = btn:WaitForChild("Sample")
  363.  
  364.             btn.MouseButton1Click:Connect(function()
  365.                 callback()
  366.                 local c = sample:Clone()
  367.                 c.Parent = btn
  368.                 local x, y = (ms.X - c.AbsolutePosition.X), (ms.Y - c.AbsolutePosition.Y)
  369.                 c.Position = UDim2.new(0, x, 0, y)
  370.                 local len, size = 0.35, nil
  371.                 if btn.AbsoluteSize.X >= btn.AbsoluteSize.Y then
  372.                     size = (btn.AbsoluteSize.X * 1.5)
  373.                 else
  374.                     size = (btn.AbsoluteSize.Y * 1.5)
  375.                 end
  376.                 c:TweenSizeAndPosition(UDim2.new(0, size, 0, size), UDim2.new(0.5, (-size / 2), 0.5, (-size / 2)), 'Out', 'Quad', len, true, nil)
  377.                 for i = 1, 10 do
  378.                     c.ImageTransparency = c.ImageTransparency + 0.05
  379.                     wait(len / 12)
  380.                 end
  381.                 c:Destroy()
  382.             end)
  383.             btn.MouseEnter:Connect(function()
  384.                 game.TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  385.                     BackgroundColor3 = Color3.fromRGB(121, 48, 48)
  386.                 }):Play()
  387.             end)
  388.             btn.MouseLeave:Connect(function()
  389.                 game.TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  390.                     BackgroundColor3 = Color3.fromRGB(141, 56, 56)
  391.                 }):Play()
  392.             end)
  393.             function ButtonFunctions:Update(textB)
  394.                 if btnText.Text ~= textB then
  395.                     game.TweenService:Create(btnText, TweenInfo.new(0.14, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  396.                         TextTransparency = 1
  397.                     }):Play()
  398.                     wait(0.14)
  399.                     btnText.Text = textB
  400.                     game.TweenService:Create(btnText, TweenInfo.new(0.14, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  401.                         TextTransparency = 0
  402.                     }):Play()
  403.                 end
  404.             end
  405.             return ButtonFunctions
  406.         end
  407.  
  408.         function fElements:NewToggle(title, callback)
  409.             title = title or "New Toggle"
  410.             callback = callback or function() end
  411.             local ToggleFunctions = {}
  412.  
  413.             local toggleFrame = Instance.new("TextButton")
  414.             local toggleFrame_2 = Instance.new("TextLabel")
  415.             local triangle = Instance.new("ImageLabel")
  416.             local checkedFramesFrame = Instance.new("Frame")
  417.             local checked = Instance.new("ImageButton")
  418.             local unchecked = Instance.new("ImageButton")
  419.             local UIListLayout = Instance.new("UIListLayout")
  420.             local UIListLayout_2 = Instance.new("UIListLayout")
  421.             local Sample = Instance.new("ImageLabel")
  422.             local circle1 = Instance.new("Frame")
  423.             local UIListLayout_3 = Instance.new("UIListLayout")
  424.             local circle = Instance.new("Frame")
  425.             local UICorner = Instance.new("UICorner")
  426.  
  427.             toggleFrame.Name = "toggleFrame"
  428.             toggleFrame.Parent = sectionMain
  429.             toggleFrame.BackgroundColor3 = Color3.fromRGB(141, 56, 56)
  430.             toggleFrame.BorderColor3 = Color3.fromRGB(27, 27, 27)
  431.             toggleFrame.ClipsDescendants = true
  432.             toggleFrame.Position = UDim2.new(0.00720164599, 0, 0.241830066, 0)
  433.             toggleFrame.Size = UDim2.new(0, 474, 0, 32)
  434.             toggleFrame.AutoButtonColor = false
  435.             toggleFrame.Font = Enum.Font.SourceSans
  436.             toggleFrame.Text = ""
  437.             toggleFrame.TextColor3 = Color3.fromRGB(0, 0, 0)
  438.             toggleFrame.TextSize = 14.000
  439.  
  440.             toggleFrame_2.Name = "toggleFrame"
  441.             toggleFrame_2.Parent = toggleFrame
  442.             toggleFrame_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  443.             toggleFrame_2.BackgroundTransparency = 1.000
  444.             toggleFrame_2.Position = UDim2.new(0.0680000037, 0, 0.200000003, 0)
  445.             toggleFrame_2.Size = UDim2.new(0, 154, 0, 18)
  446.             toggleFrame_2.ZIndex = 5
  447.             toggleFrame_2.Font = Enum.Font.Gotham
  448.             toggleFrame_2.Text = title
  449.             toggleFrame_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  450.             toggleFrame_2.TextSize = 14.000
  451.             toggleFrame_2.TextXAlignment = Enum.TextXAlignment.Left
  452.  
  453.             triangle.Name = "triangle"
  454.             triangle.Parent = toggleFrame
  455.             triangle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  456.             triangle.BackgroundTransparency = 1.000
  457.             triangle.BorderSizePixel = 0
  458.             triangle.ClipsDescendants = true
  459.             triangle.Position = UDim2.new(0.839998424, 0, -1.29596233, 0)
  460.             triangle.Size = UDim2.new(0, 132, 0, 81)
  461.             triangle.ZIndex = 5
  462.             triangle.Image = "http://www.roblox.com/asset/?id=6676220228"
  463.             triangle.ImageColor3 = Color3.fromRGB(130, 51, 51)
  464.  
  465.             checkedFramesFrame.Name = "checkedFramesFrame"
  466.             checkedFramesFrame.Parent = toggleFrame
  467.             checkedFramesFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  468.             checkedFramesFrame.BackgroundTransparency = 1.000
  469.             checkedFramesFrame.Size = UDim2.new(0, 32, 0, 32)
  470.             checkedFramesFrame.ZIndex = 5
  471.  
  472.             checked.Name = "checked"
  473.             checked.Parent = checkedFramesFrame
  474.             checked.BackgroundTransparency = 1.000
  475.             checked.LayoutOrder = 9
  476.             checked.Position = UDim2.new(0.00843881816, 0, 0.09375, 0)
  477.             checked.Size = UDim2.new(0, 24, 0, 24)
  478.             checked.ImageTransparency = 1
  479.             checked.ZIndex = 55
  480.             checked.Image = "rbxassetid://3926311105"
  481.             checked.ImageRectOffset = Vector2.new(4, 836)
  482.             checked.ImageRectSize = Vector2.new(48, 48)
  483.  
  484.             unchecked.Name = "unchecked"
  485.             unchecked.Parent = checked
  486.             unchecked.BackgroundTransparency = 1.000
  487.             unchecked.Position = UDim2.new(0.00800000038, 0, 0.0939999968, 0)
  488.             unchecked.Size = UDim2.new(0, 24, 0, 24)
  489.             unchecked.ZIndex = 50
  490.             unchecked.Image = "rbxassetid://3926305904"
  491.             unchecked.ImageRectOffset = Vector2.new(724, 724)
  492.             unchecked.ImageRectSize = Vector2.new(36, 36)
  493.  
  494.             UIListLayout.Parent = checked
  495.             UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  496.             UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  497.             UIListLayout.VerticalAlignment = Enum.VerticalAlignment.Center
  498.  
  499.             UIListLayout_2.Parent = checkedFramesFrame
  500.             UIListLayout_2.HorizontalAlignment = Enum.HorizontalAlignment.Center
  501.             UIListLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
  502.             UIListLayout_2.VerticalAlignment = Enum.VerticalAlignment.Center
  503.  
  504.             Sample.Name = "Sample"
  505.             Sample.Parent = toggleFrame
  506.             Sample.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  507.             Sample.BackgroundTransparency = 1.000
  508.             Sample.ZIndex = 2
  509.             Sample.Image = "http://www.roblox.com/asset/?id=4560909609"
  510.             Sample.ImageColor3 = Color3.fromRGB(71, 27, 27)
  511.             Sample.ImageTransparency = 0.600
  512.  
  513.             circle1.Name = "circle1"
  514.             circle1.Parent = toggleFrame
  515.             circle1.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  516.             circle1.BackgroundTransparency = 1.000
  517.             circle1.Size = UDim2.new(0, 32, 0, 32)
  518.             circle1.ZIndex = 5
  519.  
  520.             UIListLayout_3.Parent = circle1
  521.             UIListLayout_3.HorizontalAlignment = Enum.HorizontalAlignment.Center
  522.             UIListLayout_3.SortOrder = Enum.SortOrder.LayoutOrder
  523.             UIListLayout_3.VerticalAlignment = Enum.VerticalAlignment.Center
  524.  
  525.             circle.Name = "circle"
  526.             circle.Parent = circle1
  527.             circle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  528.             circle.BackgroundTransparency = 1
  529.             circle.Position = UDim2.new(0.00843881816, 0, 0.09375, 0)
  530.             circle.Size = UDim2.new(0, 0, 0, 0)
  531.  
  532.             UICorner.CornerRadius = UDim.new(0, 99)
  533.             UICorner.Parent = circle
  534.  
  535.             local ms = game.Players.LocalPlayer:GetMouse()
  536.  
  537.             local btn = toggleFrame
  538.             local sample = btn:WaitForChild('Sample')
  539.  
  540.             btn.MouseButton1Click:Connect(function()
  541.                 local c = sample:Clone()
  542.                 c.Parent = btn
  543.                 local x, y = (ms.X - c.AbsolutePosition.X), (ms.Y - c.AbsolutePosition.Y)
  544.                 c.Position = UDim2.new(0, x, 0, y)
  545.                 local len, size = 0.35, nil
  546.                 if btn.AbsoluteSize.X >= btn.AbsoluteSize.Y then
  547.                     size = (btn.AbsoluteSize.X * 1.5)
  548.                 else
  549.                     size = (btn.AbsoluteSize.Y * 1.5)
  550.                 end
  551.                 c:TweenSizeAndPosition(UDim2.new(0, size, 0, size), UDim2.new(0.5, (-size / 2), 0.5, (-size / 2)), 'Out', 'Quad', len, true, nil)
  552.                 for i = 1, 10 do
  553.                     c.ImageTransparency = c.ImageTransparency + 0.05
  554.                     wait(len / 12)
  555.                 end
  556.                 c:Destroy()
  557.             end)
  558.             local toggled = false
  559.             btn.MouseButton1Click:Connect(function()
  560.                 if toggled then
  561.                     game.TweenService:Create(checked, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
  562.                         Size = UDim2.new(0,20,0,20)
  563.                     }):Play()
  564.                     game.TweenService:Create(unchecked, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
  565.                         Size = UDim2.new(0,20,0,20)
  566.                     }):Play()
  567.                     wait(0.08)
  568.                     game.TweenService:Create(checked, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
  569.                         Size = UDim2.new(0,24,0,24)
  570.                     }):Play()
  571.                     game.TweenService:Create(unchecked, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
  572.                         Size = UDim2.new(0,24,0,24)
  573.                     }):Play()
  574.                     game.TweenService:Create(checked, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
  575.                         ImageTransparency = 1,
  576.                     }):Play()
  577.                     game.TweenService:Create(unchecked, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
  578.                         ImageTransparency = 0
  579.                     }):Play()
  580.                 else
  581.                     game.TweenService:Create(checked, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
  582.                         Size = UDim2.new(0,20,0,20)
  583.                     }):Play()
  584.                     game.TweenService:Create(unchecked, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
  585.                         Size = UDim2.new(0,20,0,20)
  586.                     }):Play()
  587.                     wait(0.08)
  588.                     game.TweenService:Create(checked, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
  589.                         Size = UDim2.new(0,24,0,24)
  590.                     }):Play()
  591.                     game.TweenService:Create(unchecked, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
  592.                         Size = UDim2.new(0,24,0,24)
  593.                     }):Play()
  594.                     game.TweenService:Create(checked, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
  595.                         ImageTransparency = 0
  596.                     }):Play()
  597.                     game.TweenService:Create(unchecked, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
  598.                         ImageTransparency = 1
  599.                     }):Play()
  600.                 end
  601.                 game.TweenService:Create(circle, TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
  602.                     Size = UDim2.new(0,30,0,30),
  603.                     BackgroundTransparency = 0.7
  604.                 }):Play()
  605.                 wait(0.15)
  606.                 game.TweenService:Create(circle, TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
  607.                     Size = UDim2.new(0,0,0,0),
  608.                     BackgroundTransparency = 1
  609.                 }):Play()
  610.                 toggled = not toggled
  611.                 pcall(callback, toggled)
  612.             end)
  613.             btn.MouseButton1Down:Connect(function()
  614.                 game.TweenService:Create(circle, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
  615.                     BackgroundTransparency = 0.8
  616.                 }):Play()
  617.             end)
  618.             btn.MouseButton1Up:Connect(function()
  619.                 game.TweenService:Create(circle, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
  620.                     BackgroundTransparency = 1
  621.                 }):Play()
  622.             end)
  623.             btn.MouseEnter:Connect(function()
  624.                 game.TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  625.                     BackgroundColor3 = Color3.fromRGB(121, 48, 48)
  626.                 }):Play()
  627.             end)
  628.             btn.MouseLeave:Connect(function()
  629.                 game.TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  630.                     BackgroundColor3 = Color3.fromRGB(141, 56, 56)
  631.                 }):Play()
  632.             end)
  633.             function ToggleFunctions:Update(textT)
  634.                 if toggleFrame_2.Text ~= textT then
  635.                     game.TweenService:Create(toggleFrame_2, TweenInfo.new(0.14, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  636.                         TextTransparency = 1
  637.                     }):Play()
  638.                     wait(0.14)
  639.                     toggleFrame_2.Text = textT
  640.                     game.TweenService:Create(toggleFrame_2, TweenInfo.new(0.14, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  641.                         TextTransparency = 0
  642.                     }):Play()
  643.                 end
  644.                 return toggle
  645.             end
  646.             return ToggleFunctions
  647.         end
  648.         function fElements:NewTextBox(title, callback)
  649.             local BoxFunctions = {}
  650.             title = title or ""
  651.             callback = callback or function() end
  652.  
  653.             local textboxFrame = Instance.new("TextButton")
  654.             local txtboxText = Instance.new("TextLabel")
  655.             local triangle = Instance.new("ImageLabel")
  656.             local txtbox = Instance.new("Frame")
  657.             local TextBox = Instance.new("TextBox")
  658.             local Sample = Instance.new("ImageLabel")
  659.  
  660.             textboxFrame.Name = "textboxFrame"
  661.             textboxFrame.Parent = sectionMain
  662.             textboxFrame.BackgroundColor3 = Color3.fromRGB(141, 56, 56)
  663.             textboxFrame.BorderColor3 = Color3.fromRGB(27, 27, 27)
  664.             textboxFrame.ClipsDescendants = true
  665.             textboxFrame.Position = UDim2.new(0.00720164599, 0, 0.241830066, 0)
  666.             textboxFrame.Size = UDim2.new(0, 474, 0, 32)
  667.             textboxFrame.AutoButtonColor = false
  668.             textboxFrame.Font = Enum.Font.SourceSans
  669.             textboxFrame.Text = ""
  670.             textboxFrame.TextColor3 = Color3.fromRGB(0, 0, 0)
  671.             textboxFrame.TextSize = 14.000
  672.  
  673.             txtboxText.Name = "txtboxText"
  674.             txtboxText.Parent = textboxFrame
  675.             txtboxText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  676.             txtboxText.BackgroundTransparency = 1.000
  677.             txtboxText.Position = UDim2.new(0.0177406278, 0, 0.199999809, 0)
  678.             txtboxText.Size = UDim2.new(0, 175, 0, 18)
  679.             txtboxText.Font = Enum.Font.Gotham
  680.             txtboxText.Text = title
  681.             txtboxText.TextColor3 = Color3.fromRGB(255, 255, 255)
  682.             txtboxText.TextSize = 14.000
  683.             txtboxText.TextXAlignment = Enum.TextXAlignment.Left
  684.  
  685.             triangle.Name = "triangle"
  686.             triangle.Parent = textboxFrame
  687.             triangle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  688.             triangle.BackgroundTransparency = 1.000
  689.             triangle.BorderSizePixel = 0
  690.             triangle.ClipsDescendants = true
  691.             triangle.Position = UDim2.new(0.839998424, 0, -1.29596233, 0)
  692.             triangle.Size = UDim2.new(0, 132, 0, 81)
  693.             triangle.ZIndex = 5
  694.             triangle.Image = "http://www.roblox.com/asset/?id=6676220228"
  695.             triangle.ImageColor3 = Color3.fromRGB(130, 51, 51)
  696.  
  697.             txtbox.Name = "txtbox"
  698.             txtbox.Parent = textboxFrame
  699.             txtbox.BackgroundColor3 = Color3.fromRGB(109, 43, 43)
  700.             txtbox.BorderColor3 = Color3.fromRGB(109, 43, 43)
  701.             txtbox.Position = UDim2.new(0.549000025, 0, 0.172999993, 0)
  702.             txtbox.Size = UDim2.new(0, 176, 0, 20)
  703.  
  704.             TextBox.Parent = txtbox
  705.             TextBox.BackgroundColor3 = Color3.fromRGB(109, 43, 43)
  706.             TextBox.BorderColor3 = Color3.fromRGB(109, 43, 43)
  707.             TextBox.ClipsDescendants = true
  708.             TextBox.Position = UDim2.new(0.0340909101, 0, 0, 0)
  709.             TextBox.Size = UDim2.new(0, 149, 0, 20)
  710.             TextBox.ZIndex = 2
  711.             TextBox.ClearTextOnFocus = false
  712.             TextBox.Font = Enum.Font.Gotham
  713.             TextBox.PlaceholderColor3 = Color3.fromRGB(255, 101, 101)
  714.             TextBox.PlaceholderText = "Type Here"
  715.             TextBox.Text = ""
  716.             TextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  717.             TextBox.TextSize = 12.000
  718.             TextBox.TextXAlignment = Enum.TextXAlignment.Right
  719.  
  720.             Sample.Name = "Sample"
  721.             Sample.Parent = textboxFrame
  722.             Sample.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  723.             Sample.BackgroundTransparency = 1.000
  724.             Sample.ZIndex = 2
  725.             Sample.Image = "http://www.roblox.com/asset/?id=4560909609"
  726.             Sample.ImageColor3 = Color3.fromRGB(71, 27, 27)
  727.             Sample.ImageTransparency = 0.600
  728.  
  729.             local btn = textboxFrame
  730.             btn.MouseEnter:Connect(function()
  731.                 game.TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  732.                     BackgroundColor3 = Color3.fromRGB(121, 48, 48)
  733.                 }):Play()
  734.             end)
  735.             btn.MouseLeave:Connect(function()
  736.                 game.TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  737.                     BackgroundColor3 = Color3.fromRGB(141, 56, 56)
  738.                 }):Play()
  739.             end)
  740.             TextBox.FocusLost:Connect(function(EnterPressed)
  741.                 if not EnterPressed then
  742.                     return
  743.                 else
  744.                     callback(TextBox.Text)
  745.                     wait(0.10)
  746.                     TextBox.Text = ""  
  747.                 end
  748.             end)
  749.             function BoxFunctions:Update(textB)
  750.                 if txtboxText.Text ~= textB then
  751.                     game.TweenService:Create(txtboxText, TweenInfo.new(0.14, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  752.                         TextTransparency = 1
  753.                     }):Play()
  754.                     wait(0.14)
  755.                     txtboxText.Text = textB
  756.                     game.TweenService:Create(txtboxText, TweenInfo.new(0.14, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  757.                         TextTransparency = 0
  758.                     }):Play()
  759.                 end
  760.             end
  761.             return BoxFunctions
  762.         end
  763.         function fElements:NewSlider(title, minvalue, maxvalue, callback)
  764.             title = title or ""
  765.             minvalue = minvalue or 16
  766.             maxvalue = maxvalue or 200
  767.  
  768.             local sliderFrame = Instance.new("TextButton")
  769.             local Sample = Instance.new("ImageLabel")
  770.             local triangle = Instance.new("ImageLabel")
  771.             local sliderText = Instance.new("TextLabel")
  772.             local sliderText_2 = Instance.new("TextLabel")
  773.             local SliderButton = Instance.new("TextButton")
  774.             local sliderDrag = Instance.new("Frame")
  775.             local UIListLayout = Instance.new("UIListLayout")
  776.  
  777.             sliderFrame.Name = "sliderFrame"
  778.             sliderFrame.Parent = sectionMain
  779.             sliderFrame.BackgroundColor3 = Color3.fromRGB(141, 56, 56)
  780.             sliderFrame.BorderColor3 = Color3.fromRGB(27, 27, 27)
  781.             sliderFrame.ClipsDescendants = true
  782.             sliderFrame.Position = UDim2.new(0.00720164599, 0, 0.241830066, 0)
  783.             sliderFrame.Size = UDim2.new(0, 474, 0, 32)
  784.             sliderFrame.AutoButtonColor = false
  785.             sliderFrame.Font = Enum.Font.SourceSans
  786.             sliderFrame.Text = ""
  787.             sliderFrame.TextColor3 = Color3.fromRGB(0, 0, 0)
  788.             sliderFrame.TextSize = 14.000
  789.  
  790.             Sample.Name = "Sample"
  791.             Sample.Parent = sliderFrame
  792.             Sample.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  793.             Sample.BackgroundTransparency = 1.000
  794.             Sample.ZIndex = 2
  795.             Sample.Image = "http://www.roblox.com/asset/?id=4560909609"
  796.             Sample.ImageColor3 = Color3.fromRGB(71, 27, 27)
  797.             Sample.ImageTransparency = 0.600
  798.  
  799.             triangle.Name = "triangle"
  800.             triangle.Parent = sliderFrame
  801.             triangle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  802.             triangle.BackgroundTransparency = 1.000
  803.             triangle.BorderSizePixel = 0
  804.             triangle.ClipsDescendants = true
  805.             triangle.Position = UDim2.new(0.839998424, 0, -1.29596233, 0)
  806.             triangle.Size = UDim2.new(0, 132, 0, 81)
  807.             triangle.ZIndex = 5
  808.             triangle.Image = "http://www.roblox.com/asset/?id=6676220228"
  809.             triangle.ImageColor3 = Color3.fromRGB(130, 51, 51)
  810.  
  811.             sliderText.Name = "sliderText"
  812.             sliderText.Parent = sliderFrame
  813.             sliderText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  814.             sliderText.BackgroundTransparency = 1.000
  815.             sliderText.Position = UDim2.new(0.01774057, 0, 0.200000182, 0)
  816.             sliderText.Size = UDim2.new(0, 175, 0, 18)
  817.             sliderText.ZIndex = 5
  818.             sliderText.Font = Enum.Font.Gotham
  819.             sliderText.Text = title
  820.             sliderText.TextColor3 = Color3.fromRGB(255, 255, 255)
  821.             sliderText.TextSize = 14.000
  822.             sliderText.TextXAlignment = Enum.TextXAlignment.Left
  823.  
  824.             sliderText_2.Name = "sliderText"
  825.             sliderText_2.Parent = sliderFrame
  826.             sliderText_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  827.             sliderText_2.BackgroundTransparency = 1.000
  828.             sliderText_2.Position = UDim2.new(0.907649934, 0, 0.200000763, 0)
  829.             sliderText_2.Size = UDim2.new(0, 34, 0, 18)
  830.             sliderText_2.ZIndex = 5
  831.             sliderText_2.Font = Enum.Font.Gotham
  832.             sliderText_2.Text = minvalue
  833.             sliderText_2.TextColor3 = Color3.fromRGB(235, 93, 93)
  834.             sliderText_2.TextSize = 14.000
  835.             sliderText_2.TextXAlignment = Enum.TextXAlignment.Right
  836.  
  837.             SliderButton.Name = "SliderButton"
  838.             SliderButton.Parent = sliderFrame
  839.             SliderButton.BackgroundColor3 = Color3.fromRGB(141, 56, 56)
  840.             SliderButton.BorderColor3 = Color3.fromRGB(109, 43, 43)
  841.             SliderButton.Position = UDim2.new(0.397000015, 0, 0.405999988, 0)
  842.             SliderButton.Size = UDim2.new(0, 215, 0, 6)
  843.             SliderButton.AutoButtonColor = false
  844.             SliderButton.Font = Enum.Font.SourceSans
  845.             SliderButton.Text = ""
  846.             SliderButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  847.             SliderButton.TextSize = 14.000
  848.  
  849.             sliderDrag.Name = "sliderDrag"
  850.             sliderDrag.Parent = SliderButton
  851.             sliderDrag.BackgroundColor3 = Color3.fromRGB(109, 43, 43)
  852.             sliderDrag.BorderSizePixel = 0
  853.             sliderDrag.Position = UDim2.new(0, 0, -0.166666672, 0)
  854.             sliderDrag.Size = UDim2.new(0, 0, 0, 8)
  855.             sliderDrag.ZIndex = 6
  856.  
  857.             UIListLayout.Parent = SliderButton
  858.             UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  859.             local Value
  860.             local uis = game:GetService("UserInputService")
  861.             local mouse = game:GetService("Players").LocalPlayer:GetMouse()
  862.             UIListLayout.VerticalAlignment = Enum.VerticalAlignment.Center
  863.  
  864.             SliderButton.MouseButton1Down:Connect(function()
  865.                 Value = math.floor((((tonumber(maxvalue) - tonumber(minvalue)) / 215) * sliderDrag.AbsoluteSize.X) + tonumber(minvalue)) or 0
  866.                 pcall(function()
  867.                     callback(Value)
  868.                 end)
  869.                 sliderDrag:TweenSize(UDim2.new(0, math.clamp(mouse.X - sliderDrag.AbsolutePosition.X, 0, 215), 0, 8), "InOut", "Linear", 0.05, true)
  870.                 moveconnection = mouse.Move:Connect(function()
  871.                     sliderText_2.Text = Value
  872.                     Value = math.floor((((tonumber(maxvalue) - tonumber(minvalue)) / 215) * sliderDrag.AbsoluteSize.X) + tonumber(minvalue))
  873.                     pcall(function()
  874.                         callback(Value)
  875.                     end)
  876.                     sliderDrag:TweenSize(UDim2.new(0, math.clamp(mouse.X - sliderDrag.AbsolutePosition.X, 0, 215), 0, 8), "InOut", "Linear", 0.05, true)
  877.                 end)
  878.                 releaseconnection = uis.InputEnded:Connect(function(Mouse)
  879.                     if Mouse.UserInputType == Enum.UserInputType.MouseButton1 then
  880.                         Value = math.floor((((tonumber(maxvalue) - tonumber(minvalue)) / 215) * sliderDrag.AbsoluteSize.X) + tonumber(minvalue))
  881.                         pcall(function()
  882.                             callback(Value)
  883.                         end)
  884.                         sliderText_2.Text = Value
  885.                         sliderDrag:TweenSize(UDim2.new(0, math.clamp(mouse.X - sliderDrag.AbsolutePosition.X, 0, 215), 0, 8), "InOut", "Linear", 0.05, true)
  886.                         moveconnection:Disconnect()
  887.                         releaseconnection:Disconnect()
  888.                     end
  889.                 end)
  890.             end)
  891.  
  892.             local btn = sliderFrame
  893.             btn.MouseEnter:Connect(function()
  894.                 game.TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  895.                     BackgroundColor3 = Color3.fromRGB(121, 48, 48)
  896.                 }):Play()
  897.             end)
  898.             btn.MouseLeave:Connect(function()
  899.                 game.TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  900.                     BackgroundColor3 = Color3.fromRGB(141, 56, 56)
  901.                 }):Play()
  902.             end)
  903.         end
  904.         function fElements:NewKeybind(title, currentKey, callback)
  905.             title = title or ""
  906.             local oldKey = currentKey.Name
  907.             callback = callback or function() end
  908.             local KeyFunctions = {}
  909.             local mouse = game:GetService("Players").LocalPlayer:GetMouse()
  910.             local keybindFrame = Instance.new("TextButton")
  911.             local keyText = Instance.new("TextLabel")
  912.             local triangle = Instance.new("ImageLabel")
  913.             local Sample = Instance.new("ImageLabel")
  914.             local currentKey = Instance.new("TextLabel")
  915.  
  916.             keybindFrame.Name = "keybindFrame"
  917.             keybindFrame.Parent = sectionMain
  918.             keybindFrame.BackgroundColor3 = Color3.fromRGB(141, 56, 56)
  919.             keybindFrame.BorderColor3 = Color3.fromRGB(27, 27, 27)
  920.             keybindFrame.ClipsDescendants = true
  921.             keybindFrame.Position = UDim2.new(0.00720164599, 0, 0.241830066, 0)
  922.             keybindFrame.Size = UDim2.new(0, 474, 0, 32)
  923.             keybindFrame.AutoButtonColor = false
  924.             keybindFrame.Font = Enum.Font.SourceSans
  925.             keybindFrame.Text = ""
  926.             keybindFrame.TextColor3 = Color3.fromRGB(0, 0, 0)
  927.             keybindFrame.TextSize = 14.000
  928.  
  929.             keyText.Name = "keyText"
  930.             keyText.Parent = keybindFrame
  931.             keyText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  932.             keyText.BackgroundTransparency = 1.000
  933.             keyText.Position = UDim2.new(0.01774057, 0, 0.200000182, 0)
  934.             keyText.Size = UDim2.new(0, 175, 0, 18)
  935.             keyText.ZIndex = 5
  936.             keyText.Font = Enum.Font.Gotham
  937.             keyText.Text = title
  938.             keyText.TextColor3 = Color3.fromRGB(255, 255, 255)
  939.             keyText.TextSize = 14.000
  940.             keyText.TextXAlignment = Enum.TextXAlignment.Left
  941.  
  942.             triangle.Name = "triangle"
  943.             triangle.Parent = keybindFrame
  944.             triangle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  945.             triangle.BackgroundTransparency = 1.000
  946.             triangle.BorderSizePixel = 0
  947.             triangle.ClipsDescendants = true
  948.             triangle.Position = UDim2.new(0.839998424, 0, -1.29596233, 0)
  949.             triangle.Size = UDim2.new(0, 132, 0, 81)
  950.             triangle.ZIndex = 5
  951.             triangle.Image = "http://www.roblox.com/asset/?id=6676220228"
  952.             triangle.ImageColor3 = Color3.fromRGB(130, 51, 51)
  953.  
  954.             Sample.Name = "Sample"
  955.             Sample.Parent = keybindFrame
  956.             Sample.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  957.             Sample.BackgroundTransparency = 1.000
  958.             Sample.ZIndex = 2
  959.             Sample.Image = "http://www.roblox.com/asset/?id=4560909609"
  960.             Sample.ImageColor3 = Color3.fromRGB(71, 27, 27)
  961.             Sample.ImageTransparency = 0.600
  962.  
  963.             currentKey.Name = "currentKey"
  964.             currentKey.Parent = keybindFrame
  965.             currentKey.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  966.             currentKey.BackgroundTransparency = 1.000
  967.             currentKey.Position = UDim2.new(0.679801822, 0, 0.200000763, 0)
  968.             currentKey.Size = UDim2.new(0, 80, 0, 18)
  969.             currentKey.ZIndex = 5
  970.             currentKey.Font = Enum.Font.Gotham
  971.             currentKey.Text = oldKey
  972.             currentKey.TextColor3 = Color3.fromRGB(255, 255, 255)
  973.             currentKey.TextSize = 14.000
  974.             currentKey.TextXAlignment = Enum.TextXAlignment.Right
  975.             local ms = mouse
  976.  
  977.             local btn = keybindFrame
  978.             local sample = btn:WaitForChild("Sample")
  979.  
  980.             btn.MouseButton1Click:Connect(function()
  981.                 game.TweenService:Create(currentKey, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  982.                     TextTransparency = 1
  983.                 }):Play()
  984.                 wait(0.14)
  985.                 currentKey.Text = ". . ."
  986.                 game.TweenService:Create(currentKey, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  987.                     TextTransparency = 0
  988.                 }):Play()
  989.                 local a, b = game:GetService('UserInputService').InputBegan:wait();
  990.                 if a.KeyCode.Name ~= "Unknown" then
  991.                     game.TweenService:Create(currentKey, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  992.                         TextTransparency = 1
  993.                     }):Play()
  994.                     wait(0.14)
  995.                     currentKey.Text = a.KeyCode.Name
  996.                     oldKey = a.KeyCode.Name;
  997.                     game.TweenService:Create(currentKey, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  998.                         TextTransparency = 0
  999.                     }):Play()
  1000.                 end
  1001.                 local c = sample:Clone()
  1002.                 c.Parent = btn
  1003.                 local x, y = (ms.X - c.AbsolutePosition.X), (ms.Y - c.AbsolutePosition.Y)
  1004.                 c.Position = UDim2.new(0, x, 0, y)
  1005.                 local len, size = 0.35, nil
  1006.                 if btn.AbsoluteSize.X >= btn.AbsoluteSize.Y then
  1007.                     size = (btn.AbsoluteSize.X * 1.5)
  1008.                 else
  1009.                     size = (btn.AbsoluteSize.Y * 1.5)
  1010.                 end
  1011.                 c:TweenSizeAndPosition(UDim2.new(0, size, 0, size), UDim2.new(0.5, (-size / 2), 0.5, (-size / 2)), 'Out', 'Quad', len, true, nil)
  1012.                 for i = 1, 10 do
  1013.                     c.ImageTransparency = c.ImageTransparency + 0.05
  1014.                     wait(len / 12)
  1015.                 end
  1016.                 c:Destroy()
  1017.             end)
  1018.             btn.MouseEnter:Connect(function()
  1019.                 game.TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1020.                     BackgroundColor3 = Color3.fromRGB(121, 48, 48)
  1021.                 }):Play()
  1022.             end)
  1023.             btn.MouseLeave:Connect(function()
  1024.                 game.TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1025.                     BackgroundColor3 = Color3.fromRGB(141, 56, 56)
  1026.                 }):Play()
  1027.             end)
  1028.  
  1029.             game:GetService("UserInputService").InputBegan:connect(function(current, ok)
  1030.                 if not ok then
  1031.                     if current.KeyCode.Name == oldKey then
  1032.                         callback()
  1033.                     end
  1034.                 end
  1035.             end)
  1036.  
  1037.             function KeyFunctions:Update(newKey)
  1038.                 if currentKey.Text ~= newKey.Name then
  1039.                     game.TweenService:Create(currentKey, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1040.                         TextTransparency = 1
  1041.                     }):Play()
  1042.                     wait(0.14)
  1043.                     oldKey = newKey.Name
  1044.                     currentKey.Text = oldKey
  1045.                     game.TweenService:Create(currentKey, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1046.                         TextTransparency = 0
  1047.                     }):Play()
  1048.                 end
  1049.             end
  1050.             return KeyFunctions
  1051.         end
  1052.         function fElements:NewDropdown(title, list, callback)
  1053.             local DropdownFunc = {}
  1054.             title = title or "nil"
  1055.             list = list or {}
  1056.             callback = callback or function() end
  1057.             local dOpened = false
  1058.             local dropFrame = Instance.new("Frame")
  1059.             local dropOpen = Instance.new("TextButton")
  1060.             local mouse = game:GetService("Players").LocalPlayer:GetMouse()
  1061.             local ms = mouse
  1062.             local dropInf = Instance.new("TextLabel")
  1063.             local triangle = Instance.new("ImageLabel")
  1064.             local Sample = Instance.new("ImageLabel")
  1065.             local expand_more = Instance.new("ImageButton")
  1066.             local dropList = Instance.new("UIListLayout")
  1067.  
  1068.             dropFrame.Name = "dropFrame"
  1069.             dropFrame.Parent = sectionMain
  1070.             dropFrame.BackgroundColor3 = Color3.fromRGB(84, 33, 33)
  1071.             dropFrame.BorderColor3 = Color3.fromRGB(33, 33, 33)
  1072.             dropFrame.ClipsDescendants = true
  1073.             dropFrame.Position = UDim2.new(0.0113402065, 0, 0.593175828, 0)
  1074.             dropFrame.Size = UDim2.new(0, 474, 0, 32)
  1075.  
  1076.             dropOpen.Name = "dropOpen"
  1077.             dropOpen.Parent = dropFrame
  1078.             dropOpen.BackgroundColor3 = Color3.fromRGB(141, 56, 56)
  1079.             dropOpen.BorderColor3 = Color3.fromRGB(27, 27, 27)
  1080.             dropOpen.ClipsDescendants = true
  1081.             dropOpen.Position = UDim2.new(0.00720164599, 0, 0.241830066, 0)
  1082.             dropOpen.Size = UDim2.new(0, 474, 0, 32)
  1083.             dropOpen.AutoButtonColor = false
  1084.             dropOpen.Font = Enum.Font.SourceSans
  1085.             dropOpen.Text = ""
  1086.             dropOpen.TextColor3 = Color3.fromRGB(0, 0, 0)
  1087.             dropOpen.TextSize = 14.000
  1088.             dropOpen.MouseButton1Click:Connect(function()
  1089.                 if dOpened then
  1090.                     dOpened = false
  1091.                     game.TweenService:Create(dropFrame, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1092.                         Size = UDim2.new(0,474,0,32)
  1093.                     }):Play()
  1094.                     game.TweenService:Create(expand_more, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1095.                         Rotation = 0
  1096.                     }):Play()
  1097.                     wait(0.1)
  1098.                     game.TweenService:Create(sectionMain, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1099.                         Size = UDim2.new(0,itemsList.AbsoluteContentSize.X,0, itemsList.AbsoluteContentSize.Y + 5)
  1100.                     }):Play()
  1101.                 else
  1102.                     dOpened = true
  1103.                     game.TweenService:Create(dropFrame, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1104.                         Size = UDim2.new(0,474,0,dropList.AbsoluteContentSize.Y + 5)
  1105.                     }):Play()
  1106.                     game.TweenService:Create(expand_more, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1107.                         Rotation = 180
  1108.                     }):Play()
  1109.                     wait(0.1)
  1110.                     game.TweenService:Create(sectionMain, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1111.                         Size = UDim2.new(0,itemsList.AbsoluteContentSize.X,0, itemsList.AbsoluteContentSize.Y + 5)
  1112.                     }):Play()
  1113.                 end
  1114.                 local c = Sample:Clone()
  1115.                 c.Parent = dropOpen
  1116.                 local x, y = (ms.X - c.AbsolutePosition.X), (ms.Y - c.AbsolutePosition.Y)
  1117.                 c.Position = UDim2.new(0, x, 0, y)
  1118.                 local len, size = 0.35, nil
  1119.                 if dropOpen.AbsoluteSize.X >= dropOpen.AbsoluteSize.Y then
  1120.                     size = (dropOpen.AbsoluteSize.X * 1.5)
  1121.                 else
  1122.                     size = (dropOpen.AbsoluteSize.Y * 1.5)
  1123.                 end
  1124.                 c:TweenSizeAndPosition(UDim2.new(0, size, 0, size), UDim2.new(0.5, (-size / 2), 0.5, (-size / 2)), 'Out', 'Quad', len, true, nil)
  1125.                 for i = 1, 10 do
  1126.                     c.ImageTransparency = c.ImageTransparency + 0.05
  1127.                     wait(len / 12)
  1128.                 end
  1129.                 c:Destroy()
  1130.             end)
  1131.  
  1132.             dropOpen.MouseEnter:Connect(function()
  1133.                 game.TweenService:Create(dropOpen, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1134.                     BackgroundColor3 = Color3.fromRGB(121, 48, 48)
  1135.                 }):Play()
  1136.             end)
  1137.             dropOpen.MouseLeave:Connect(function()
  1138.                 game.TweenService:Create(dropOpen, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1139.                     BackgroundColor3 = Color3.fromRGB(141, 56, 56)
  1140.                 }):Play()
  1141.             end)
  1142.  
  1143.             dropInf.Name = "dropInf"
  1144.             dropInf.Parent = dropOpen
  1145.             dropInf.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1146.             dropInf.BackgroundTransparency = 1.000
  1147.             dropInf.Position = UDim2.new(0.0177406278, 0, 0.199999809, 0)
  1148.             dropInf.Size = UDim2.new(0, 81, 0, 18)
  1149.             dropInf.ZIndex = 5
  1150.             dropInf.Font = Enum.Font.Gotham
  1151.             dropInf.Text = title
  1152.             dropInf.TextColor3 = Color3.fromRGB(255, 255, 255)
  1153.             dropInf.TextSize = 14.000
  1154.             dropInf.TextXAlignment = Enum.TextXAlignment.Left
  1155.  
  1156.             triangle.Name = "triangle"
  1157.             triangle.Parent = dropOpen
  1158.             triangle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1159.             triangle.BackgroundTransparency = 1.000
  1160.             triangle.BorderSizePixel = 0
  1161.             triangle.ClipsDescendants = true
  1162.             triangle.Position = UDim2.new(0.839998424, 0, -1.29596233, 0)
  1163.             triangle.Size = UDim2.new(0, 132, 0, 81)
  1164.             triangle.ZIndex = 5
  1165.             triangle.Image = "http://www.roblox.com/asset/?id=6676220228"
  1166.             triangle.ImageColor3 = Color3.fromRGB(130, 51, 51)
  1167.  
  1168.             Sample.Name = "Sample"
  1169.             Sample.Parent = dropOpen
  1170.             Sample.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1171.             Sample.BackgroundTransparency = 1.000
  1172.             Sample.ZIndex = 2
  1173.             Sample.Image = "http://www.roblox.com/asset/?id=4560909609"
  1174.             Sample.ImageColor3 = Color3.fromRGB(71, 27, 27)
  1175.             Sample.ImageTransparency = 0.600
  1176.  
  1177.             expand_more.Name = "expand_more"
  1178.             expand_more.Parent = dropOpen
  1179.             expand_more.BackgroundTransparency = 1.000
  1180.             expand_more.LayoutOrder = 9
  1181.             expand_more.Position = UDim2.new(0.935426176, 0, 0.075000003, 0)
  1182.             expand_more.Size = UDim2.new(0, 25, 0, 25)
  1183.             expand_more.ZIndex = 55
  1184.             expand_more.Image = "rbxassetid://3926305904"
  1185.             expand_more.ImageColor3 = Color3.fromRGB(235, 93, 93)
  1186.             expand_more.ImageRectOffset = Vector2.new(564, 284)
  1187.             expand_more.ImageRectSize = Vector2.new(36, 36)
  1188.  
  1189.             dropList.Name = "dropList"
  1190.             dropList.Parent = dropFrame
  1191.             dropList.HorizontalAlignment = Enum.HorizontalAlignment.Center
  1192.             dropList.SortOrder = Enum.SortOrder.LayoutOrder
  1193.             dropList.Padding = UDim.new(0, 5)
  1194.  
  1195.             for i,v in next, list do
  1196.                 local dropOption = Instance.new("TextButton")
  1197.                 local btnText = Instance.new("TextLabel")
  1198.                 local Sample_2 = Instance.new("ImageLabel")
  1199.  
  1200.                 dropOption.Name = "dropOption"
  1201.                 dropOption.Parent = dropFrame
  1202.                 dropOption.BackgroundColor3 = Color3.fromRGB(141, 56, 56)
  1203.                 dropOption.BorderColor3 = Color3.fromRGB(30, 30, 30)
  1204.                 dropOption.ClipsDescendants = true
  1205.                 dropOption.Position = UDim2.new(0, 0, 0.25179857, 0)
  1206.                 dropOption.Size = UDim2.new(0, 464, 0, 32)
  1207.                 dropOption.AutoButtonColor = false
  1208.                 dropOption.Font = Enum.Font.SourceSans
  1209.                 dropOption.Text = ""
  1210.                 dropOption.TextColor3 = Color3.fromRGB(0, 0, 0)
  1211.                 dropOption.TextSize = 14.000
  1212.  
  1213.                 btnText.Name = "btnText"
  1214.                 btnText.Parent = dropOption
  1215.                 btnText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1216.                 btnText.BackgroundTransparency = 1.000
  1217.                 btnText.Position = UDim2.new(0.01774057, 0, 0.200000182, 0)
  1218.                 btnText.Size = UDim2.new(0, 175, 0, 18)
  1219.                 btnText.ZIndex = 5
  1220.                 btnText.Font = Enum.Font.Gotham
  1221.                 btnText.Text = v
  1222.                 btnText.TextColor3 = Color3.fromRGB(255, 255, 255)
  1223.                 btnText.TextSize = 14.000
  1224.                 btnText.TextXAlignment = Enum.TextXAlignment.Left
  1225.  
  1226.                 Sample_2.Name = "Sample"
  1227.                 Sample_2.Parent = dropOption
  1228.                 Sample_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1229.                 Sample_2.BackgroundTransparency = 1.000
  1230.                 Sample_2.ZIndex = 2
  1231.                 Sample_2.Image = "http://www.roblox.com/asset/?id=4560909609"
  1232.                 Sample_2.ImageColor3 = Color3.fromRGB(71, 27, 27)
  1233.                 Sample_2.ImageTransparency = 0.600
  1234.  
  1235.                 local btn = dropOption
  1236.                 local sample = Sample_2
  1237.                 btn.MouseButton1Click:Connect(function()
  1238.                     dropInf.Text = v
  1239.                     callback(v)
  1240.                     game.TweenService:Create(dropFrame, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1241.                         Size = UDim2.new(0,474,0,32)
  1242.                     }):Play()
  1243.                     game.TweenService:Create(expand_more, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1244.                         Rotation = 0
  1245.                     }):Play()
  1246.                     wait(0.1)
  1247.                     game.TweenService:Create(sectionMain, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1248.                         Size = UDim2.new(0,itemsList.AbsoluteContentSize.X,0, itemsList.AbsoluteContentSize.Y + 5)
  1249.                     }):Play()
  1250.                     dOpened = false
  1251.                     local c = Sample:Clone()
  1252.                     c.Parent = dropOpen
  1253.                     local x, y = (ms.X - c.AbsolutePosition.X), (ms.Y - c.AbsolutePosition.Y)
  1254.                     c.Position = UDim2.new(0, x, 0, y)
  1255.                     local len, size = 0.35, nil
  1256.                     if dropOpen.AbsoluteSize.X >= dropOpen.AbsoluteSize.Y then
  1257.                         size = (dropOpen.AbsoluteSize.X * 1.5)
  1258.                     else
  1259.                         size = (dropOpen.AbsoluteSize.Y * 1.5)
  1260.                     end
  1261.                     c:TweenSizeAndPosition(UDim2.new(0, size, 0, size), UDim2.new(0.5, (-size / 2), 0.5, (-size / 2)), 'Out', 'Quad', len, true, nil)
  1262.                     for i = 1, 10 do
  1263.                         c.ImageTransparency = c.ImageTransparency + 0.05
  1264.                         wait(len / 12)
  1265.                     end
  1266.                     c:Destroy()
  1267.                 end)
  1268.  
  1269.                 btn.MouseEnter:Connect(function()
  1270.                     game.TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1271.                         BackgroundColor3 = Color3.fromRGB(121, 48, 48)
  1272.                     }):Play()
  1273.                 end)
  1274.                 btn.MouseLeave:Connect(function()
  1275.                     game.TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1276.                         BackgroundColor3 = Color3.fromRGB(141, 56, 56)
  1277.                     }):Play()
  1278.                 end)
  1279.             end
  1280.             function DropdownFunc:Refresh(newList)
  1281.                 newList = newList or {}
  1282.                 for i,v in next, dropFrame:GetChildren() do
  1283.                     if v.Name == "dropOption" then
  1284.                         v:Destroy()
  1285.                     end
  1286.                 end
  1287.                 for i,v in next, newList do
  1288.                     local dropOption = Instance.new("TextButton")
  1289.                     local btnText = Instance.new("TextLabel")
  1290.                     local Sample_2 = Instance.new("ImageLabel")
  1291.  
  1292.                     dropOption.Name = "dropOption"
  1293.                     dropOption.Parent = dropFrame
  1294.                     dropOption.BackgroundColor3 = Color3.fromRGB(141, 56, 56)
  1295.                     dropOption.BorderColor3 = Color3.fromRGB(30, 30, 30)
  1296.                     dropOption.ClipsDescendants = true
  1297.                     dropOption.Position = UDim2.new(0, 0, 0.25179857, 0)
  1298.                     dropOption.Size = UDim2.new(0, 464, 0, 32)
  1299.                     dropOption.AutoButtonColor = false
  1300.                     dropOption.Font = Enum.Font.SourceSans
  1301.                     dropOption.Text = ""
  1302.                     dropOption.TextColor3 = Color3.fromRGB(0, 0, 0)
  1303.                     dropOption.TextSize = 14.000
  1304.  
  1305.                     btnText.Name = "btnText"
  1306.                     btnText.Parent = dropOption
  1307.                     btnText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1308.                     btnText.BackgroundTransparency = 1.000
  1309.                     btnText.Position = UDim2.new(0.01774057, 0, 0.200000182, 0)
  1310.                     btnText.Size = UDim2.new(0, 175, 0, 18)
  1311.                     btnText.ZIndex = 5
  1312.                     btnText.Font = Enum.Font.Gotham
  1313.                     btnText.Text = v
  1314.                     btnText.TextColor3 = Color3.fromRGB(255, 255, 255)
  1315.                     btnText.TextSize = 14.000
  1316.                     btnText.TextXAlignment = Enum.TextXAlignment.Left
  1317.  
  1318.                     Sample_2.Name = "Sample"
  1319.                     Sample_2.Parent = dropOption
  1320.                     Sample_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1321.                     Sample_2.BackgroundTransparency = 1.000
  1322.                     Sample_2.ZIndex = 2
  1323.                     Sample_2.Image = "http://www.roblox.com/asset/?id=4560909609"
  1324.                     Sample_2.ImageColor3 = Color3.fromRGB(71, 27, 27)
  1325.                     Sample_2.ImageTransparency = 0.600
  1326.  
  1327.                     local btn = dropOption
  1328.                     local sample = Sample_2
  1329.                     local mouse = game:GetService("Players").LocalPlayer:GetMouse()
  1330.                     local ms = mouse
  1331.                     btn.MouseButton1Click:Connect(function()
  1332.                         dropInf.Text = v
  1333.                         callback(v)
  1334.                         game.TweenService:Create(dropFrame, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1335.                             Size = UDim2.new(0,474,0,32)
  1336.                         }):Play()
  1337.                         game.TweenService:Create(expand_more, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1338.                             Rotation = 0
  1339.                         }):Play()
  1340.                         wait(0.1)
  1341.                         game.TweenService:Create(sectionMain, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1342.                             Size = UDim2.new(0,itemsList.AbsoluteContentSize.X,0, itemsList.AbsoluteContentSize.Y + 5)
  1343.                         }):Play()
  1344.                         dOpened = false
  1345.                         local c = Sample:Clone()
  1346.                         c.Parent = dropOpen
  1347.                         local x, y = (ms.X - c.AbsolutePosition.X), (ms.Y - c.AbsolutePosition.Y)
  1348.                         c.Position = UDim2.new(0, x, 0, y)
  1349.                         local len, size = 0.35, nil
  1350.                         if dropOpen.AbsoluteSize.X >= dropOpen.AbsoluteSize.Y then
  1351.                             size = (dropOpen.AbsoluteSize.X * 1.5)
  1352.                         else
  1353.                             size = (dropOpen.AbsoluteSize.Y * 1.5)
  1354.                         end
  1355.                         c:TweenSizeAndPosition(UDim2.new(0, size, 0, size), UDim2.new(0.5, (-size / 2), 0.5, (-size / 2)), 'Out', 'Quad', len, true, nil)
  1356.                         for i = 1, 10 do
  1357.                             c.ImageTransparency = c.ImageTransparency + 0.05
  1358.                             wait(len / 12)
  1359.                         end
  1360.                         c:Destroy()
  1361.                     end)
  1362.  
  1363.                     btn.MouseEnter:Connect(function()
  1364.                         game.TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1365.                             BackgroundColor3 = Color3.fromRGB(121, 48, 48)
  1366.                         }):Play()
  1367.                     end)
  1368.                     btn.MouseLeave:Connect(function()
  1369.                         game.TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1370.                             BackgroundColor3 = Color3.fromRGB(141, 56, 56)
  1371.                         }):Play()
  1372.                     end)
  1373.                 end
  1374.                 if dOpened then
  1375.                     game.TweenService:Create(dropFrame, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1376.                         Size = UDim2.new(0,474,0,dropList.AbsoluteContentSize.Y + 5)
  1377.                     }):Play()
  1378.                     game.TweenService:Create(expand_more, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1379.                         Rotation = 180
  1380.                     }):Play()
  1381.                     wait(0.1)
  1382.                     game.TweenService:Create(sectionMain, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1383.                         Size = UDim2.new(0,itemsList.AbsoluteContentSize.X,0, itemsList.AbsoluteContentSize.Y + 5)
  1384.                     }):Play()
  1385.                 else
  1386.                     game.TweenService:Create(dropFrame, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1387.                         Size = UDim2.new(0,474,0,32)
  1388.                     }):Play()
  1389.                     game.TweenService:Create(expand_more, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1390.                         Rotation = 0
  1391.                     }):Play()
  1392.                     wait(0.1)
  1393.                     game.TweenService:Create(sectionMain, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {
  1394.                         Size = UDim2.new(0,itemsList.AbsoluteContentSize.X,0, itemsList.AbsoluteContentSize.Y + 5)
  1395.                     }):Play()
  1396.                 end
  1397.             end
  1398.             return DropdownFunc
  1399.         end
  1400.         function fElements:Seperator()
  1401.             local seperator = Instance.new("Frame")
  1402.  
  1403.             seperator.Name = "seperator"
  1404.             seperator.Parent = sectionMain
  1405.             seperator.BackgroundColor3 = Color3.fromRGB(141, 56, 56)
  1406.             seperator.BorderColor3 = Color3.fromRGB(27, 27, 27)
  1407.             seperator.Size = UDim2.new(0, 474, 0, 2)
  1408.         end
  1409.         -- =============== --
  1410.         -- 添加textLabel函數
  1411.     function fElements:NewLabel(text)
  1412.         -- 建立獨立容器
  1413.         local container = Instance.new("Frame")
  1414.         container.Name = "labelContainer"
  1415.         container.Parent = sectionMain
  1416.         container.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1417.         container.BackgroundTransparency = 1
  1418.         container.BorderSizePixel = 0
  1419.         container.Size = UDim2.new(1, 0, 0, 36) -- 高度固定為 36(與 Button 一致)
  1420.         container.ClipsDescendants = false
  1421.  
  1422.         -- 建立 Label
  1423.         local label = Instance.new("TextLabel")
  1424.         label.Name = "labelText"
  1425.         label.Parent = container
  1426.         label.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1427.         label.BackgroundTransparency = 1
  1428.         label.Position = UDim2.new(0, 0, 0, 0)
  1429.         label.Size = UDim2.new(1, -10, 1, 0) -- 填滿 container 並留邊距
  1430.         label.ZIndex = 5
  1431.         label.Font = Enum.Font.Gotham
  1432.         label.Text = text or "Label"
  1433.         label.TextColor3 = Color3.fromRGB(255, 255, 255)
  1434.         label.TextSize = 14
  1435.         label.TextXAlignment = Enum.TextXAlignment.Center
  1436.         label.TextYAlignment = Enum.TextYAlignment.Center
  1437.         label.ClipsDescendants = false
  1438.  
  1439.         return {
  1440.             Set = function(self, newText)
  1441.                 label.Text = newText
  1442.             end,
  1443.             Get = function(self)
  1444.                 return label.Text
  1445.             end,
  1446.             Remove = function()
  1447.                 container:Destroy()
  1448.             end
  1449.         }
  1450.     end
  1451.         return fElements
  1452.     end
  1453.     return sections
  1454. end
  1455. return Forums
  1456.  
  1457.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement