9_cVv

techhub UI v3

Oct 23rd, 2021 (edited)
1,028
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local function creategui()
  2.     --objects
  3.     local V3_library = Instance.new'ScreenGui'
  4.  
  5.     local mainframe = Instance.new'Frame'
  6.     local sectionscontainer = Instance.new'ScrollingFrame'
  7.     local sectiontemplate = Instance.new'Frame'
  8.     local UIListLayout = Instance.new'UIListLayout'
  9.     local dropdowntemplate = Instance.new'TextButton'
  10.     local text = Instance.new'TextLabel'
  11.     local textboxtemplate = Instance.new'TextBox'
  12.     local labeltemplate = Instance.new'TextLabel'
  13.     local buttontemplate = Instance.new'TextButton'
  14.     local text__2 = Instance.new'TextLabel'
  15.     local sidebar = Instance.new'Frame'
  16.     local sectionbuttontemplate = Instance.new'TextButton'
  17.     local text__3 = Instance.new'TextLabel'
  18.     local selected = Instance.new'TextLabel'
  19.     local UIListLayout__2 = Instance.new'UIListLayout'
  20.     local sideline = Instance.new'TextLabel'
  21.     local sideline__2 = Instance.new'TextLabel'
  22.     local subtitle = Instance.new'TextLabel'
  23.     local title = Instance.new'TextLabel'
  24.     local UICorner = Instance.new'UICorner'
  25.     local sideline__2 = Instance.new'TextLabel'
  26.     local close = Instance.new'TextButton'
  27.     local minimize = Instance.new'TextButton'
  28.  
  29.     --properties
  30.     V3_library.Name = 'V3 library'
  31.     V3_library.Parent = game:GetService'Players'.LocalPlayer:WaitForChild('PlayerGui', math.huge)
  32.     V3_library.ResetOnSpawn = false
  33.     V3_library.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  34.  
  35.     mainframe.BackgroundColor3 = Color3.fromRGB(39, 39, 39)
  36.     mainframe.Name = 'mainframe'
  37.     mainframe.Parent = V3_library
  38.     mainframe.Position = UDim2.new(UDim.new(0, 276), UDim.new(0, 202))
  39.     mainframe.Size = UDim2.new(UDim.new(0, 505), UDim.new(0, 321))
  40.  
  41.     sectionscontainer.Active = true
  42.     sectionscontainer.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  43.     sectionscontainer.BackgroundTransparency = 1
  44.     sectionscontainer.BorderSizePixel = 0
  45.     sectionscontainer.Name = 'sectionscontainer'
  46.     sectionscontainer.Parent = mainframe
  47.     sectionscontainer.Position = UDim2.new(UDim.new(0.27178418636322, 0), UDim.new(0.064171142876148, 0))
  48.     sectionscontainer.Size = UDim2.new(UDim.new(0.72821575403214, 0), UDim.new(0.93582886457443, 0))
  49.     sectionscontainer.CanvasSize = UDim2.new(UDim.new(0, 100), UDim.new(0, 100))
  50.     sectionscontainer.ScrollBarImageColor3 = Color3.fromRGB(0, 0, 0)
  51.     sectionscontainer.ScrollBarImageTransparency = 1
  52.     sectionscontainer.ScrollBarThickness = 0
  53.     sectionscontainer.ScrollingEnabled = false
  54.  
  55.     sectiontemplate.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  56.     sectiontemplate.BackgroundTransparency = 1
  57.     sectiontemplate.BorderSizePixel = 0
  58.     sectiontemplate.Name = 'sectiontemplate'
  59.     sectiontemplate.Parent = sectionscontainer
  60.     sectiontemplate.Position = UDim2.new(UDim.new(0, 0), UDim.new(0.029411720111966, 0))
  61.     sectiontemplate.Size = UDim2.new(UDim.new(1, 0), UDim.new(0.97058820724487, 0))
  62.     sectiontemplate.Visible = false
  63.  
  64.     UIListLayout.Padding = UDim.new(0.029999999329448, 0)
  65.     UIListLayout.Parent = sectiontemplate
  66.     UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  67.     UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  68.  
  69.     dropdowntemplate.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  70.     dropdowntemplate.BackgroundTransparency = 1
  71.     dropdowntemplate.BorderSizePixel = 0
  72.     dropdowntemplate.Name = 'dropdowntemplate'
  73.     dropdowntemplate.Parent = sectiontemplate
  74.     dropdowntemplate.Size = UDim2.new(UDim.new(0.94300001859665, 0), UDim.new(0.063000001013279, 0))
  75.     dropdowntemplate.Visible = false
  76.     dropdowntemplate.Font = Enum.Font.SourceSans
  77.     dropdowntemplate.Text = ''
  78.     dropdowntemplate.TextColor3 = Color3.fromRGB(0, 0, 0)
  79.     dropdowntemplate.TextSize = 14
  80.  
  81.     text.BackgroundColor3 = Color3.fromRGB(212, 124, 0)
  82.     text.BorderSizePixel = 0
  83.     text.Name = 'text'
  84.     text.Parent = dropdowntemplate
  85.     text.Size = UDim2.new(UDim.new(0.99999982118607, 0), UDim.new(1, 0))
  86.     text.Font = Enum.Font.Ubuntu
  87.     text.Text = 'dropdown'
  88.     text.TextColor3 = Color3.fromRGB(255, 255, 255)
  89.     text.TextSize = 17
  90.  
  91.     textboxtemplate.BackgroundColor3 = Color3.fromRGB(212, 124, 0)
  92.     textboxtemplate.BorderSizePixel = 0
  93.     textboxtemplate.Name = 'textboxtemplate'
  94.     textboxtemplate.Parent = sectiontemplate
  95.     textboxtemplate.Size = UDim2.new(UDim.new(0.94300001859665, 0), UDim.new(0.063000001013279, 0))
  96.     textboxtemplate.Visible = false
  97.     textboxtemplate.Font = Enum.Font.Ubuntu
  98.     textboxtemplate.PlaceholderColor3 = Color3.fromRGB(202, 202, 202)
  99.     textboxtemplate.PlaceholderText = 'textbox'
  100.     textboxtemplate.Text = ''
  101.     textboxtemplate.TextColor3 = Color3.fromRGB(255, 255, 255)
  102.     textboxtemplate.TextSize = 17
  103.  
  104.     labeltemplate.BackgroundColor3 = Color3.fromRGB(212, 124, 0)
  105.     labeltemplate.BorderSizePixel = 0
  106.     labeltemplate.Name = 'labeltemplate'
  107.     labeltemplate.Parent = sectiontemplate
  108.     labeltemplate.Position = UDim2.new(UDim.new(0.028490029275417, 0), UDim.new(0.0080213900655508, 0))
  109.     labeltemplate.Size = UDim2.new(UDim.new(0.943019926548, 0), UDim.new(0.063360877335072, 0))
  110.     labeltemplate.Visible = false
  111.     labeltemplate.Font = Enum.Font.Ubuntu
  112.     labeltemplate.Text = 'textlabel'
  113.     labeltemplate.TextColor3 = Color3.fromRGB(255, 255, 255)
  114.     labeltemplate.TextSize = 17
  115.  
  116.     buttontemplate.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  117.     buttontemplate.BackgroundTransparency = 1
  118.     buttontemplate.BorderSizePixel = 0
  119.     buttontemplate.Name = 'buttontemplate'
  120.     buttontemplate.Parent = sectiontemplate
  121.     buttontemplate.Size = UDim2.new(UDim.new(0.94300001859665, 0), UDim.new(0.063000001013279, 0))
  122.     buttontemplate.Visible = false
  123.     buttontemplate.Font = Enum.Font.SourceSans
  124.     buttontemplate.Text = ''
  125.     buttontemplate.TextColor3 = Color3.fromRGB(0, 0, 0)
  126.     buttontemplate.TextSize = 14
  127.  
  128.     text__2.BackgroundColor3 = Color3.fromRGB(212, 124, 0)
  129.     text__2.BorderSizePixel = 0
  130.     text__2.Name = 'text'
  131.     text__2.Parent = buttontemplate
  132.     text__2.Size = UDim2.new(UDim.new(0.99999982118607, 0), UDim.new(1, 0))
  133.     text__2.Font = Enum.Font.Ubuntu
  134.     text__2.Text = 'textbutton'
  135.     text__2.TextColor3 = Color3.fromRGB(255, 255, 255)
  136.     text__2.TextSize = 17
  137.  
  138.     sidebar.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  139.     sidebar.BackgroundTransparency = 1
  140.     sidebar.BorderSizePixel = 0
  141.     sidebar.Name = 'sidebar'
  142.     sidebar.Parent = mainframe
  143.     sidebar.Position = UDim2.new(UDim.new(0, 0), UDim.new(0.17112299799919, 0))
  144.     sidebar.Size = UDim2.new(UDim.new(0.26763486862183, 0), UDim.new(0.82866042852402, 0))
  145.  
  146.     sectionbuttontemplate.AutoButtonColor = false
  147.     sectionbuttontemplate.BackgroundColor3 = Color3.fromRGB(212, 124, 0)
  148.     sectionbuttontemplate.BackgroundTransparency = 1
  149.     sectionbuttontemplate.BorderSizePixel = 0
  150.     sectionbuttontemplate.Name = 'sectionbuttontemplate'
  151.     sectionbuttontemplate.Parent = sidebar
  152.     sectionbuttontemplate.Position = UDim2.new(UDim.new(-0.080333203077316, 0), UDim.new(-0.0029154131188989, 0))
  153.     sectionbuttontemplate.Size = UDim2.new(UDim.new(1, 0), UDim.new(0.10526315867901, 0))
  154.     sectionbuttontemplate.Visible = false
  155.     sectionbuttontemplate.Font = Enum.Font.Nunito
  156.     sectionbuttontemplate.TextColor3 = Color3.fromRGB(255, 255, 255)
  157.     sectionbuttontemplate.TextSize = 21
  158.     sectionbuttontemplate.TextTransparency = 1
  159.     sectionbuttontemplate.TextWrapped = true
  160.     sectionbuttontemplate.TextXAlignment = Enum.TextXAlignment.Left
  161.  
  162.     text__3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  163.     text__3.BackgroundTransparency = 1
  164.     text__3.BorderSizePixel = 0
  165.     text__3.Name = 'text'
  166.     text__3.Parent = sectionbuttontemplate
  167.     text__3.Position = UDim2.new(UDim.new(0.08333333581686, 0), UDim.new(0, 0))
  168.     text__3.Size = UDim2.new(UDim.new(0.85271316766739, 0), UDim.new(1, 0))
  169.     text__3.Font = Enum.Font.Ubuntu
  170.     text__3.Text = 'Template'
  171.     text__3.TextColor3 = Color3.fromRGB(255, 255, 255)
  172.     text__3.TextSize = 14
  173.     text__3.TextXAlignment = Enum.TextXAlignment.Left
  174.  
  175.     selected.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  176.     selected.BorderSizePixel = 0
  177.     selected.Name = 'selected'
  178.     selected.Parent = sectionbuttontemplate
  179.     selected.Position = UDim2.new(UDim.new(0.082999996840954, 0), UDim.new(0.89999997615814, 0))
  180.     selected.Size = UDim2.new(UDim.new(0.85300004482269, 0), UDim.new(0.082999996840954, 0))
  181.     selected.Font = Enum.Font.SourceSans
  182.     selected.Text = ''
  183.     selected.TextColor3 = Color3.fromRGB(0, 0, 0)
  184.     selected.TextSize = 14
  185.  
  186.     UIListLayout__2.Parent = sidebar
  187.     UIListLayout__2.SortOrder = Enum.SortOrder.LayoutOrder
  188.  
  189.     sideline.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  190.     sideline.BorderSizePixel = 0
  191.     sideline.Name = 'sideline'
  192.     sideline.Parent = mainframe
  193.     sideline.Position = UDim2.new(UDim.new(0, 0), UDim.new(0.16310161352158, 0))
  194.     sideline.Size = UDim2.new(UDim.new(0.27178424596786, 0), UDim.new(0.0062305293977261, 0))
  195.     sideline.Font = Enum.Font.SourceSans
  196.     sideline.Text = ''
  197.     sideline.TextColor3 = Color3.fromRGB(0, 0, 0)
  198.     sideline.TextSize = 14
  199.  
  200.     sideline__2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  201.     sideline__2.BorderSizePixel = 0
  202.     sideline__2.Name = 'sideline'
  203.     sideline__2.Parent = mainframe
  204.     sideline__2.Position = UDim2.new(UDim.new(0.26763486862183, 0), UDim.new(0, 0))
  205.     sideline__2.Size = UDim2.new(UDim.new(0.0041493778117001, 0), UDim.new(1, 0))
  206.     sideline__2.Font = Enum.Font.SourceSans
  207.     sideline__2.Text = ''
  208.     sideline__2.TextColor3 = Color3.fromRGB(0, 0, 0)
  209.     sideline__2.TextSize = 14
  210.  
  211.     subtitle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  212.     subtitle.BackgroundTransparency = 1
  213.     subtitle.BorderSizePixel = 0
  214.     subtitle.Name = 'subtitle'
  215.     subtitle.Parent = mainframe
  216.     subtitle.Position = UDim2.new(UDim.new(0.022302905097604, 0), UDim.new(0.064171120524406, 0))
  217.     subtitle.Size = UDim2.new(UDim.new(0.24481327831745, 0), UDim.new(0.043613705784082, 0))
  218.     subtitle.Font = Enum.Font.Ubuntu
  219.     subtitle.Text = 'subtitle'
  220.     subtitle.TextColor3 = Color3.fromRGB(188, 188, 188)
  221.     subtitle.TextSize = 12
  222.     subtitle.TextXAlignment = Enum.TextXAlignment.Left
  223.  
  224.     title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  225.     title.BackgroundTransparency = 1
  226.     title.BorderSizePixel = 0
  227.     title.Name = 'title'
  228.     title.Parent = mainframe
  229.     title.Position = UDim2.new(UDim.new(0.022302905097604, 0), UDim.new(0, 0))
  230.     title.Size = UDim2.new(UDim.new(0.24481327831745, 0), UDim.new(0.093457944691181, 0))
  231.     title.Font = Enum.Font.Ubuntu
  232.     title.Text = 'title'
  233.     title.TextColor3 = Color3.fromRGB(255, 255, 255)
  234.     title.TextSize = 21
  235.     title.TextXAlignment = Enum.TextXAlignment.Left
  236.  
  237.     UICorner.CornerRadius = UDim.new(0, 4)
  238.     UICorner.Parent = mainframe
  239.  
  240.     sideline__2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  241.     sideline__2.BorderSizePixel = 0
  242.     sideline__2.Name = 'sideline'
  243.     sideline__2.Parent = mainframe
  244.     sideline__2.Position = UDim2.new(UDim.new(0.27128714323044, 0), UDim.new(0.06341315060854, 0))
  245.     sideline__2.Size = UDim2.new(UDim.new(0.72871285676956, 0), UDim.new(0.0062305293977261, 0))
  246.     sideline__2.Font = Enum.Font.SourceSans
  247.     sideline__2.Text = ''
  248.     sideline__2.TextColor3 = Color3.fromRGB(0, 0, 0)
  249.     sideline__2.TextSize = 14
  250.  
  251.     close.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  252.     close.BackgroundTransparency = 1
  253.     close.BorderSizePixel = 0
  254.     close.Name = 'close'
  255.     close.Parent = mainframe
  256.     close.Position = UDim2.new(UDim.new(0.96563249826431, 0), UDim.new(0, 0))
  257.     close.Size = UDim2.new(UDim.new(0, 17), UDim.new(0, 17))
  258.     close.Font = Enum.Font.Code
  259.     close.Text = 'X'
  260.     close.TextColor3 = Color3.fromRGB(255, 255, 255)
  261.     close.TextSize = 21
  262.  
  263.     minimize.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  264.     minimize.BackgroundTransparency = 1
  265.     minimize.BorderSizePixel = 0
  266.     minimize.Name = 'minimize'
  267.     minimize.Parent = mainframe
  268.     minimize.Position = UDim2.new(UDim.new(0.91810774803162, 0), UDim.new(0, 0))
  269.     minimize.Size = UDim2.new(UDim.new(0, 17), UDim.new(0, 17))
  270.     minimize.Font = Enum.Font.Code
  271.     minimize.Text = '-'
  272.     minimize.TextColor3 = Color3.fromRGB(255, 255, 255)
  273.     minimize.TextSize = 21
  274.  
  275.     local fakeuicorner = Instance.new'UICorner'
  276.     fakeuicorner.CornerRadius = UDim.new(0, 5)
  277.  
  278.     return V3_library, mainframe, title, subtitle, sidebar, sectionbuttontemplate, sectiontemplate, labeltemplate, buttontemplate, textboxtemplate, dropdowntemplate, fakeuicorner, minimize, close
  279. end
  280.  
  281. local function clone(object)
  282.     local c = object:Clone()
  283.  
  284.     c.Parent = object.Parent
  285.  
  286.     return c
  287. end
  288. local function smoothdrag(frame)
  289.     local dragToggle = nil
  290.     local dragSpeed = .25
  291.     local dragInput = nil
  292.     local dragStart = nil
  293.     local startPos = nil
  294.  
  295.     local function updateInput(input)
  296.         local Delta = input.Position - dragStart
  297.         local Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + Delta.X, startPos.Y.Scale, startPos.Y.Offset + Delta.Y)
  298.         game:GetService("TweenService"):Create(frame, TweenInfo.new(dragSpeed), {Position = Position}):Play()
  299.     end
  300.  
  301.     frame.InputBegan:Connect(function(input)
  302.         if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) then
  303.             dragToggle = true
  304.             dragStart = input.Position
  305.             startPos = frame.Position
  306.             input.Changed:Connect(function()
  307.                 if (input.UserInputState == Enum.UserInputState.End) then
  308.                     dragToggle = false
  309.                 end
  310.             end)
  311.         end
  312.     end)
  313.  
  314.     frame.InputChanged:Connect(function(input)
  315.         if (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
  316.             dragInput = input
  317.         end
  318.     end)
  319.  
  320.     game:GetService("UserInputService").InputChanged:Connect(function(input)
  321.         if input == dragInput and dragToggle then
  322.             updateInput(input)
  323.         end
  324.     end)
  325. end
  326. local function tween(object, time, info)
  327.     return game:GetService'TweenService':Create(object, TweenInfo.new(time, 8), info)
  328. end
  329.  
  330. local library = {}
  331. local events = loadstring(game:HttpGet('https://pastebin.com/raw/3YaYx4gi'))()
  332.  
  333. function library:CreateGui(guiname, titletext, subtitletext)
  334.     local object = {}
  335.     local sections = {}
  336.  
  337.     local selectedsection = nil
  338.  
  339.     local guiname = guiname or 'GUI'
  340.     local titletext = titletext or guiname
  341.     local subtitletext = subtitletext or 'subtitle'
  342.  
  343.     local gui, mainframe, title, subtitle, sidebar, sectionbuttontemplate, sectiontemplate, labeltemplate, buttontemplate, textboxtemplate, dropdowntemplate, uicorner, minimize, close = creategui()
  344.  
  345.     gui.Name = guiname
  346.     title.Text = titletext
  347.     subtitle.Text = subtitletext
  348.  
  349.     local closeEvent = events:CreateEvent('close')
  350.  
  351.     function object:GetCloseEvent()
  352.         return closeEvent
  353.     end
  354.  
  355.     close.MouseButton1Click:connect(function()
  356.         closeEvent:Fire()
  357.         gui:Destroy()
  358.     end)
  359.  
  360.     function object:SetTitle(text)
  361.         title.Text = text or title.Text
  362.     end
  363.     function object:SetSubtitle(text)
  364.         subtitle.Text = text or subtitle.Text
  365.     end
  366.  
  367.     function object:CreateSection(sectionName)
  368.         local object = {}
  369.         local section = {}
  370.  
  371.         local sectionName = sectionName or 'section'
  372.  
  373.         local sectionframe = clone(sectiontemplate)
  374.         local sectionbutton = clone(sectionbuttontemplate)
  375.  
  376.         sectionframe.Name = sectionName
  377.         sectionframe.Visible = true
  378.         sectionframe.Position = UDim2.new(0, 0, -1, 0)
  379.  
  380.         sectionbutton.text.Text = sectionName
  381.         sectionbutton.Name = sectionName
  382.         sectionbutton.Visible = true
  383.  
  384.         local sectionbuttonEnter = tween(sectionbutton, .35, {BackgroundTransparency = 0})
  385.         local sectionbuttonLeave = tween(sectionbutton, .35, {BackgroundTransparency = 1})
  386.  
  387.         local lookingatsectionbutton = false
  388.         local lookingatsectionbuttontext = false
  389.  
  390.         sectionbutton.MouseEnter:connect(function()
  391.             lookingatsectionbutton = true
  392.             if lookingatsectionbutton or lookingatsectionbuttontext then
  393.                 sectionbuttonEnter:Play()
  394.             end
  395.         end)
  396.         sectionbutton.text.MouseEnter:connect(function()
  397.             lookingatsectionbuttontext = true
  398.             if lookingatsectionbutton or lookingatsectionbuttontext then
  399.                 sectionbuttonEnter:Play()
  400.             end
  401.         end)
  402.  
  403.         sectionbutton.MouseLeave:connect(function()
  404.             lookingatsectionbutton = false
  405.             if not lookingatsectionbutton and not lookingatsectionbuttontext then
  406.                 sectionbuttonLeave:Play()
  407.             end
  408.         end)
  409.         sectionbutton.text.MouseLeave:connect(function()
  410.             lookingatsectionbuttontext = false
  411.             if not lookingatsectionbutton and not lookingatsectionbuttontext then
  412.                 sectionbuttonLeave:Play()
  413.             end
  414.         end)
  415.  
  416.         local frameshowtween = tween(sectionframe, .45, {Position = UDim2.new(0, 0, .029, 0)})
  417.         local selectedlineshow = tween(sectionbutton.selected, .45, {Size = UDim2.new(.853, 0, .083, 0)})
  418.  
  419.         section.framehidetween = tween(sectionframe, .45, {Position = UDim2.new(0, 0, 1, 0)})
  420.         section.selectedlinehide = tween(sectionbutton.selected, .45, {Size = UDim2.new(0, 0, .083, 0)})
  421.  
  422.         sectionbutton.MouseButton1Click:connect(function()
  423.             if selectedsection ~= section then
  424.                 for i, s in pairs(sections) do
  425.                     local exists, hidetween, selectedlinehide = pcall(function()return s['framehidetween'], s['selectedlinehide']end)
  426.                     if s and hidetween and selectedlinehide then
  427.                         hidetween:Play()
  428.                         selectedlinehide:Play()
  429.                     end
  430.                 end
  431.                 sectionframe.Position = UDim2.new(0, 0, -1, 0)
  432.                 frameshowtween:Play()
  433.                 selectedlineshow:Play()
  434.             end
  435.             selectedsection = section
  436.         end)
  437.  
  438.  
  439.         if selectedsection then
  440.             sectionbutton.selected.Size = UDim2.new(0, 0, .083, 0)
  441.         else
  442.             selectedsection = section
  443.             for i, s in pairs(sections) do
  444.                 local exists, hidetween = pcall(function()return s['hidetween']end)
  445.                 if s and exists and hidetween then
  446.                     hidetween:Play()
  447.                 end
  448.             end
  449.             sectionframe.Position = UDim2.new(0, 0, -1, 0)
  450.             frameshowtween:Play()
  451.         end
  452.  
  453.         function object:TextButton(buttonName, clickcallback)
  454.             local buttonName = buttonName or 'button'
  455.  
  456.             local button = buttontemplate:Clone()
  457.             local uicorner = uicorner:Clone()
  458.  
  459.             button.Name = buttonName
  460.             button.text.Text = buttonName
  461.             button.Parent = sectionframe
  462.             button.Visible = true
  463.  
  464.             uicorner.Parent = button
  465.  
  466.             if clickcallback then
  467.                 button.MouseButton1Click:connect(clickcallback)
  468.             end
  469.  
  470.             return button
  471.         end
  472.         function object:TextLabel(labelName)
  473.             local labelName = labelName or 'button'
  474.  
  475.             local label = labeltemplate:Clone()
  476.             local uicorner = uicorner:Clone()
  477.  
  478.             label.Name = labelName
  479.             label.Text = labelName
  480.             label.Parent = sectionframe
  481.             label.Visible = true
  482.  
  483.             uicorner.Parent = label
  484.  
  485.             return label
  486.         end
  487.         function object:TextBox(boxName, textchangedcallback)
  488.             local boxName = boxName or 'button'
  489.  
  490.             local box = textboxtemplate:Clone()
  491.             local uicorner = uicorner:Clone()
  492.  
  493.             box.Name = boxName
  494.             box.PlaceholderText = boxName
  495.             box.Parent = sectionframe
  496.             box.Visible = true
  497.  
  498.             uicorner.Parent = box
  499.  
  500.             if textchangedcallback then
  501.                 box:GetPropertyChangedSignal('Text'):connect(function()
  502.                     pcall(function()textchangedcallback(box.Text)end)
  503.                 end)
  504.             end
  505.             return box
  506.         end
  507.  
  508.         table.insert(sections, section)
  509.  
  510.         return object
  511.     end
  512.  
  513.     smoothdrag(mainframe)
  514.     pcall(function()
  515.         gui.Parent = game:GetService'CoreGui'
  516.         syn.protect_gui(gui)
  517.     end)
  518.  
  519.     return object
  520. end
  521.  
  522. return library
RAW Paste Data