chen399d

測試UI

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