Advertisement
joefromsansnite

Untitled

Oct 10th, 2021
847
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 25.54 KB | None | 0 0
  1. local library = {}
  2.  
  3. function library:NewWindow(title)
  4.     title = (type(title) ~= "string") and "Title" or title
  5.    
  6.     -- Variables
  7.     local uis = game:GetService("UserInputService")
  8.     local tweenService = game:GetService("TweenService")
  9.     local marketPlaceService = game:GetService("MarketplaceService")
  10.     local runService = game:GetService("RunService")
  11.    
  12.     local player = game.Players.LocalPlayer
  13.     local mouse = player:GetMouse()
  14.    
  15.     local gameName = marketPlaceService:GetProductInfo(game.PlaceId).Name
  16.    
  17.    
  18.     -- Gui
  19.     local ScreenGui = Instance.new("ScreenGui")
  20.     local Menu = Instance.new("Frame")
  21.     local Exit = Instance.new("TextButton")
  22.     local close = Instance.new("ImageButton")
  23.     local Minimize = Instance.new("TextButton")
  24.     local expand = Instance.new("ImageButton")
  25.     local UICorner = Instance.new("UICorner")
  26.     local Title = Instance.new("TextLabel")
  27.     local Background = Instance.new("Frame")
  28.     local Title_2 = Instance.new("TextLabel")
  29.     local TabContainer = Instance.new("ScrollingFrame")
  30.     local UIListLayout = Instance.new("UIListLayout")
  31.     local FramesContainer = Instance.new("Frame")
  32.     local UIStroke = Instance.new("UIStroke")
  33.     local UIStroke_1 = Instance.new("UIStroke")
  34.     local UIStroke_2 = Instance.new("UIStroke")
  35.     local Pattern = Instance.new("ImageLabel")
  36.    
  37.     ScreenGui.Parent = player.PlayerGui
  38.     ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  39.     ScreenGui.ResetOnSpawn = false
  40.    
  41.     Menu.Name = "Menu"
  42.     Menu.Parent = ScreenGui
  43.     Menu.Active = true
  44.     Menu.AnchorPoint = Vector2.new(0.5, 0.5)
  45.     Menu.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  46.     Menu.Position = UDim2.new(0.483785242, 0, 0.333065808, 0)
  47.     Menu.Size = UDim2.new(0, 485, 0, 15)
  48.     Menu.ZIndex = 1
  49.    
  50.     UIStroke.Parent = Menu
  51.    
  52.     Exit.Name = "Exit"
  53.     Exit.Parent = Menu
  54.     Exit.AnchorPoint = Vector2.new(0.5, 0.5)
  55.     Exit.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  56.     Exit.BorderSizePixel = 0
  57.     Exit.Position = UDim2.new(0.973371148, 0, 0.5, 0)
  58.     Exit.Size = UDim2.new(0, 25, 0, 15)
  59.     Exit.Font = Enum.Font.SourceSans
  60.     Exit.Text = ""
  61.     Exit.TextColor3 = Color3.fromRGB(0, 0, 0)
  62.     Exit.TextSize = 14.000
  63.     Exit.AutoButtonColor = false
  64.    
  65.     close.Name = "close"
  66.     close.Parent = Exit
  67.     close.AnchorPoint = Vector2.new(0.5, 0.5)
  68.     close.BackgroundTransparency = 1.000
  69.     close.Position = UDim2.new(0.5, 0, 0.5, 0)
  70.     close.Size = UDim2.new(0, 15, 0, 15)
  71.     close.ZIndex = 0
  72.     close.Image = "rbxassetid://3926305904"
  73.     close.ImageRectOffset = Vector2.new(284, 4)
  74.     close.ImageRectSize = Vector2.new(24, 24)
  75.  
  76.     Minimize.Name = "Minimize"
  77.     Minimize.Parent = Menu
  78.     Minimize.AnchorPoint = Vector2.new(0.5, 0.5)
  79.     Minimize.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  80.     Minimize.BorderSizePixel = 0
  81.     Minimize.Position = UDim2.new(0.93237114, 0, 0.5, 0)
  82.     Minimize.Size = UDim2.new(0, 25, 0, 15)
  83.     Minimize.Font = Enum.Font.SourceSans
  84.     Minimize.Text = ""
  85.     Minimize.TextColor3 = Color3.fromRGB(0, 0, 0)
  86.     Minimize.TextSize = 14.000
  87.     Minimize.AutoButtonColor = false
  88.    
  89.     expand.Name = "expand"
  90.     expand.Parent = Minimize
  91.     expand.AnchorPoint = Vector2.new(0.5, 0.5)
  92.     expand.BackgroundTransparency = 1.000
  93.     expand.Position = UDim2.new(0.5, 0, 0.5, 0)
  94.     expand.Size = UDim2.new(0, 15, 0, 15)
  95.     expand.ZIndex = 0
  96.     expand.Rotation = 180
  97.     expand.Image = "rbxassetid://3926305904"
  98.     expand.ImageRectOffset = Vector2.new(564, 284)
  99.     expand.ImageRectSize = Vector2.new(36, 36)
  100.  
  101.     UICorner.CornerRadius = UDim.new(0, 6)
  102.     UICorner.Parent = Menu
  103.  
  104.     Title.Name = "Title"
  105.     Title.Parent = Menu
  106.     Title.AnchorPoint = Vector2.new(0.5, 0.5)
  107.     Title.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  108.     Title.BackgroundTransparency = 1.000
  109.     Title.BorderSizePixel = 0
  110.     Title.Position = UDim2.new(0.453092545, 0, 0.5, 0)
  111.     Title.Size = UDim2.new(0, 439, 0, 14)
  112.     Title.Font = Enum.Font.Code
  113.     Title.Text = title
  114.     Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  115.     Title.TextSize = 14.000
  116.  
  117.     Background.Name = "Background"
  118.     Background.Parent = Menu
  119.     Background.AnchorPoint = Vector2.new(0.5, 0.5)
  120.     Background.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  121.     Background.BorderSizePixel = 0
  122.     Background.Position = UDim2.new(0.5, 0, 9.86166763, 0)
  123.     Background.Size = UDim2.new(0, 485, 0, 269)
  124.     Background.ClipsDescendants = true
  125.    
  126.     UIStroke_1.Parent = Background
  127.    
  128.     Pattern.Name = "Pattern"
  129.     Pattern.Parent = Background
  130.     Pattern.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  131.     Pattern.BackgroundTransparency = 1.000
  132.     Pattern.Position = UDim2.new(0.316494852, 0, 3.72110262e-05, 0)
  133.     Pattern.Size = UDim2.new(0, 331, 1000, 409)
  134.     Pattern.ZIndex = -1
  135.     Pattern.Image = "rbxassetid://2151741365"
  136.     Pattern.ScaleType = Enum.ScaleType.Tile
  137.     Pattern.SliceCenter = Rect.new(0, 256, 0, 256)
  138.     Pattern.TileSize = UDim2.new(0, 30, 0, 60)
  139.    
  140.     Title_2.Name = "Title"
  141.     Title_2.Parent = Background
  142.     Title_2.AnchorPoint = Vector2.new(0.5, 0.5)
  143.     Title_2.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  144.     Title_2.BorderSizePixel = 0
  145.     Title_2.Position = UDim2.new(0.158734515, 0, 0.0781041235, 0)
  146.     Title_2.Size = UDim2.new(0, 154, 0, 42)
  147.     Title_2.Font = Enum.Font.Code
  148.     Title_2.Text = gameName
  149.     Title_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  150.     Title_2.TextSize = 14.000
  151.     Title_2.TextScaled = true
  152.    
  153.     TabContainer.Name = "TabContainer"
  154.     TabContainer.Parent = Background
  155.     TabContainer.Active = true
  156.     TabContainer.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  157.     TabContainer.BorderSizePixel = 0
  158.     TabContainer.Position = UDim2.new(0, 0, 0.156208143, 0)
  159.     TabContainer.Size = UDim2.new(0, 154, 0, 227)
  160.     TabContainer.ScrollBarThickness = 8
  161.    
  162.     UIStroke_2.Parent = TabContainer
  163.    
  164.     UIListLayout.Parent = TabContainer
  165.     UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  166.     UIListLayout.Padding = UDim.new(0, 5)
  167.  
  168.     FramesContainer.Name = "FramesContainer"
  169.     FramesContainer.Parent = Background
  170.     FramesContainer.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  171.     FramesContainer.BackgroundTransparency = 1.000
  172.     FramesContainer.Position = UDim2.new(0.317525774, 0, 0, 0)
  173.     FramesContainer.Size = UDim2.new(0, 331, 0, 268)
  174.     FramesContainer.ZIndex = 0
  175.    
  176.    
  177.     -- Local Functions
  178.     local function createContainer(parent)
  179.         local Container = Instance.new("Frame")
  180.         local UICorner = Instance.new("UICorner")
  181.         local UIStroke = Instance.new("UIStroke")
  182.        
  183.         Container.Name = "Container"
  184.         Container.Parent = parent
  185.         Container.AnchorPoint = Vector2.new(0.5, 0.5)
  186.         Container.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  187.         Container.BorderSizePixel = 0
  188.         Container.Position = UDim2.new(0.487915397, 0, 0.490423739, 0)
  189.         Container.Size = UDim2.new(0, 323, 0, 40)
  190.        
  191.         UICorner.Parent = Container
  192.         UIStroke.Parent = Container
  193.        
  194.         return Container
  195.     end
  196.     local function hideFrames()
  197.         for i,v in pairs(FramesContainer:GetChildren()) do
  198.             v.Visible = false
  199.         end
  200.     end
  201.     local function resetTabColor()
  202.         for i, v in pairs(TabContainer:GetChildren()) do
  203.             if v:IsA("TextButton") then
  204.                 v.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  205.             end
  206.         end
  207.     end
  208.     local function buttonClickEffect(parent)
  209.         parent.ClipsDescendants = true
  210.  
  211.         local mouseLocation = uis:GetMouseLocation()
  212.         local absolutePosition = parent.AbsolutePosition
  213.  
  214.         local effectXPosition = UDim2.new(0, mouseLocation.X-absolutePosition.X, 0, (mouseLocation.Y-absolutePosition.Y)-36)
  215.  
  216.         local ButtonEffect = Instance.new("ImageLabel")
  217.  
  218.         ButtonEffect.Name = "ButtonEffect"
  219.         ButtonEffect.Parent = parent
  220.         ButtonEffect.AnchorPoint = Vector2.new(0.5, 0.5)
  221.         ButtonEffect.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  222.         ButtonEffect.BackgroundTransparency = 1.000
  223.         ButtonEffect.BorderSizePixel = 0
  224.         ButtonEffect.Position = UDim2.new(0, 0, 0, 0)
  225.         ButtonEffect.Size = UDim2.new(0, 25, 0, 25)
  226.         ButtonEffect.Image = "rbxassetid://7658630902"
  227.         ButtonEffect.ImageTransparency = 0.500
  228.         ButtonEffect.Position = effectXPosition
  229.  
  230.         ButtonEffect:TweenSize(UDim2.new(0, 200, 0, 200))
  231.  
  232.         spawn(function()
  233.             for i = 0.5, 1.05, 0.05 do
  234.                 ButtonEffect.ImageTransparency = i
  235.                 if i >= 1 then
  236.                     ButtonEffect:Destroy()
  237.                 end
  238.                 wait()
  239.             end
  240.         end)
  241.     end
  242.     local function dropdownEffect(parent, ui, itemType, visible, rot1, rot2)
  243.         if parent ~= nil and itemType ~= nil then
  244.             task.spawn(function()
  245.                 for i, v in pairs(parent:GetChildren()) do
  246.                     if v:IsA(itemType) then
  247.                         v.Visible = visible
  248.                         task.wait()
  249.                     end
  250.                 end
  251.             end)
  252.         end
  253.        
  254.         local properties = (visible == true) and {
  255.             Rotation = rot1
  256.         } or {
  257.             Rotation = rot2
  258.         }
  259.        
  260.         local info = TweenInfo.new(0.5)
  261.         local tween = tweenService:Create(ui, info, properties)
  262.  
  263.         tween:Play()
  264.     end
  265.    
  266.     local visible = true
  267.     local debounce = false
  268.     local function minimize()
  269.         if debounce == false then
  270.             debounce = true
  271.            
  272.             visible = not visible
  273.  
  274.             local sizeAndPos = visible == true and {
  275.                 UDim2.new(0, 485, 0, 269),
  276.                 UDim2.new(0.5, 0, 9.86166763, 0)
  277.             } or {
  278.                 UDim2.new(0, 485, 0, 0),
  279.                 UDim2.new(0.5, 0, 1, 0)
  280.             }
  281.             Background:TweenSizeAndPosition(sizeAndPos[1], sizeAndPos[2])
  282.             dropdownEffect(nil, expand, nil, visible, 180, 0)
  283.            
  284.             task.wait(1)
  285.             debounce = false   
  286.         end
  287.     end
  288.     local function setDraggable()
  289.         Menu.Active = true
  290.         Menu.Draggable = true
  291.     end
  292.     local function exit()
  293.         ScreenGui:Destroy()
  294.     end
  295.    
  296.    
  297.     -- Call Functions
  298.     setDraggable()
  299.     close.MouseButton1Down:Connect(exit)
  300.     expand.MouseButton1Down:Connect(minimize)
  301.    
  302.    
  303.     -- Tab
  304.     local library2 = {}
  305.    
  306.     function library2:NewTab(text)
  307.         text = (type(text) ~= "string") and "Tab" or text
  308.        
  309.         local Tab = Instance.new("TextButton")
  310.         local ScrollingFrame = Instance.new("ScrollingFrame")
  311.         local UIListLayout_2 = Instance.new("UIListLayout")
  312.         local UIStroke = Instance.new("UIStroke")
  313.        
  314.         Tab.Name = "Tab"
  315.         Tab.Parent = TabContainer
  316.         Tab.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  317.         Tab.Size = UDim2.new(0, 147,0, 35)
  318.         Tab.Font = Enum.Font.Code
  319.         Tab.BorderSizePixel = 0
  320.         Tab.Text = text
  321.         Tab.TextColor3 = Color3.fromRGB(255, 255, 255)
  322.         Tab.TextSize = 17.000
  323.         Tab.AutoButtonColor = false
  324.        
  325.         ScrollingFrame.Parent = FramesContainer
  326.         ScrollingFrame.Active = true
  327.         ScrollingFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  328.         ScrollingFrame.BackgroundTransparency = 1.000
  329.         ScrollingFrame.BorderSizePixel = 0
  330.         ScrollingFrame.Size = UDim2.new(0, 331, 0, 268)
  331.         ScrollingFrame.ScrollBarThickness = 8
  332.         ScrollingFrame.AutomaticCanvasSize = Enum.AutomaticSize.Y
  333.        
  334.         UIListLayout_2.Parent = ScrollingFrame
  335.         UIListLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
  336.         UIListLayout_2.Padding = UDim.new(0, 0)
  337.        
  338.         hideFrames()
  339.         Tab.MouseButton1Down:Connect(function()
  340.             buttonClickEffect(Tab)
  341.             resetTabColor()
  342.             hideFrames()
  343.            
  344.             ScrollingFrame.Visible = true
  345.             Tab.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  346.         end)
  347.        
  348.         local library3 = {}
  349.        
  350.         function library3:NewSection(text)
  351.             text = (type(text) ~= "string") and "Section" or text
  352.  
  353.             local Section = Instance.new("Frame")
  354.             local SectionText = Instance.new("TextLabel")
  355.             local UICorner_4 = Instance.new("UICorner")
  356.             local expand_2 = Instance.new("ImageButton")
  357.             local Frame = Instance.new("Frame")
  358.             local UICorner_5 = Instance.new("UICorner")
  359.             local UIListLayout_3 = Instance.new("UIListLayout")
  360.             local UIStroke = Instance.new("UIStroke")
  361.             local UIStroke_1 = Instance.new("UIStroke")
  362.  
  363.             local visible = false
  364.  
  365.             Section.Name = "Section"
  366.             Section.Parent = ScrollingFrame
  367.             Section.BackgroundColor3 = Color3.fromRGB(17, 17, 17)
  368.             Section.BorderSizePixel = 0
  369.             Section.Size = UDim2.new(0, 331, 0, 53)
  370.             Section.AutomaticSize = Enum.AutomaticSize.Y
  371.            
  372.             UIStroke.Parent = Section
  373.            
  374.             SectionText.Name = "SectionText"
  375.             SectionText.Parent = Section
  376.             SectionText.BackgroundColor3 = Color3.fromRGB(15, 15, 15)
  377.             SectionText.BorderSizePixel = 0
  378.             SectionText.Size = UDim2.new(0, 323, 0, 40)
  379.             SectionText.Font = Enum.Font.SourceSans
  380.             SectionText.Text = text
  381.             SectionText.TextColor3 = Color3.fromRGB(255, 255, 255)
  382.             SectionText.TextSize = 25.000
  383.                        
  384.             UICorner_4.Parent = SectionText
  385.  
  386.             expand_2.Name = "expand"
  387.             expand_2.Parent = SectionText
  388.             expand_2.AnchorPoint = Vector2.new(0.5, 0.5)
  389.             expand_2.BackgroundTransparency = 1.000
  390.             expand_2.Position = UDim2.new(0.0799999982, 0, 0.5, 0)
  391.             expand_2.Size = UDim2.new(0, 25, 0, 25)
  392.             expand_2.ZIndex = 2
  393.             expand_2.Image = "rbxassetid://3926305904"
  394.             expand_2.ImageRectOffset = Vector2.new(564, 284)
  395.             expand_2.ImageRectSize = Vector2.new(36, 36)
  396.             expand_2.Rotation = -180
  397.            
  398.             Frame.Parent = SectionText
  399.             Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  400.             Frame.BackgroundTransparency = 1.000
  401.             Frame.Size = UDim2.new(0, 322, 0, 40)
  402.  
  403.             UICorner_5.Parent = Frame
  404.             UIStroke_1.Parent = Frame
  405.  
  406.             UIListLayout_3.Parent = Section
  407.             UIListLayout_3.SortOrder = Enum.SortOrder.LayoutOrder
  408.             UIListLayout_3.Padding = UDim.new(0, 7)
  409.            
  410.             expand_2.MouseButton1Down:Connect(function()
  411.                 visible = not visible
  412.                 dropdownEffect(Section, expand_2, "Frame", visible, -180, -90)
  413.             end)
  414.                
  415.             local library4 = {}
  416.            
  417.             function library4:NewButton(text, callback)
  418.                 text = (type(text) ~= "string") and "Button" or text
  419.                 callback = (type(callback) ~= "function") and function()
  420.                     print("Clicked!")
  421.                 end or callback
  422.                
  423.                 local TextButton = Instance.new("TextButton")
  424.                 local UICorner_9 = Instance.new("UICorner")
  425.                 local TextLabel_2 = Instance.new("TextLabel")
  426.                 local Container = createContainer(Section)
  427.                
  428.                 TextButton.Parent = Container
  429.                 TextButton.AnchorPoint = Vector2.new(0.5, 0.5)
  430.                 TextButton.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  431.                 TextButton.Position = UDim2.new(0.688, 0, 0.483, 0)
  432.                 TextButton.Size = UDim2.new(0, 195, 0, 36)
  433.                 TextButton.Font = Enum.Font.Code
  434.                 TextButton.Text = "Click"
  435.                 TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  436.                 TextButton.TextSize = 14.000
  437.                 TextButton.AutoButtonColor = false
  438.                
  439.                 UICorner_9.Parent = TextButton
  440.  
  441.                 TextLabel_2.Parent = Container
  442.                 TextLabel_2.AnchorPoint = Vector2.new(0.5, 0.5)
  443.                 TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  444.                 TextLabel_2.BackgroundTransparency = 1.000
  445.                 TextLabel_2.Position = UDim2.new(0.185, 0, 0.5, 0)
  446.                 TextLabel_2.Size = UDim2.new(0, 120, 0, 50)
  447.                 TextLabel_2.Font = Enum.Font.Code
  448.                 TextLabel_2.Text = text
  449.                 TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  450.                 TextLabel_2.TextSize = 14.000  
  451.                    
  452.                 TextButton.MouseButton1Down:Connect(function()
  453.                     buttonClickEffect(TextButton)
  454.                     callback()
  455.                 end)
  456.             end
  457.                
  458.             function library4:NewTextBox(text, callback)
  459.                 text = (type(text) ~= "string") and "TextBox" or text
  460.                 callback = (type(callback) ~= "function") and function()
  461.                     print("Lost Focus!")
  462.                 end or callback
  463.                
  464.                 local UICorner_6 = Instance.new("UICorner")
  465.                 local TextBox = Instance.new("TextBox")
  466.                 local UICorner_7 = Instance.new("UICorner")
  467.                 local TextLabel = Instance.new("TextLabel")
  468.                 local Container = createContainer(Section)
  469.  
  470.                 TextBox.Parent = Container
  471.                 TextBox.AnchorPoint = Vector2.new(0.5, 0.5)
  472.                 TextBox.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  473.                 TextBox.Position = UDim2.new(0.688, 0, 0.483, 0)
  474.                 TextBox.Size = UDim2.new(0, 195, 0, 36)
  475.                 TextBox.Font = Enum.Font.SourceSans
  476.                 TextBox.PlaceholderText = "TextBox"
  477.                 TextBox.Text = ""
  478.                 TextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  479.                 TextBox.TextSize = 14.000
  480.                 TextBox.TextStrokeColor3 = Color3.fromRGB(255, 255, 255)
  481.  
  482.                 UICorner_7.Parent = TextBox
  483.  
  484.                 TextLabel.Parent = TextBox
  485.                 TextLabel.AnchorPoint = Vector2.new(0.5, 0.5)
  486.                 TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  487.                 TextLabel.BackgroundTransparency = 1.000
  488.                 TextLabel.Position = UDim2.new(-0.326, 0, 0.5, 0)
  489.                 TextLabel.Size = UDim2.new(0, 120, 0, 50)
  490.                 TextLabel.Font = Enum.Font.Code
  491.                 TextLabel.Text = text
  492.                 TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  493.                 TextLabel.TextSize = 14.000
  494.                
  495.                 TextBox.FocusLost:Connect(function()
  496.                     callback(TextBox.Text)
  497.                 end)
  498.             end
  499.            
  500.             function library4:NewToggle(text, callback)
  501.                 text = (type(text) ~= "string") and "Toggle" or text
  502.                 callback = (type(callback) ~= "function") and function()
  503.                     print("Toggled!")
  504.                 end or callback
  505.                
  506.                 local Toggle = Instance.new("Frame")
  507.                 local UICorner_15 = Instance.new("UICorner")
  508.                 local check = Instance.new("ImageButton")
  509.                 local TextLabel_5 = Instance.new("TextLabel")
  510.                 local Container = createContainer(Section)
  511.                
  512.                 local toggled = true
  513.                
  514.                 UICorner_15.CornerRadius = UDim.new(1, 0)
  515.                 UICorner_15.Parent = Toggle
  516.                
  517.                 Toggle.Name = "Toggle"
  518.                 Toggle.Parent = Container
  519.                 Toggle.AnchorPoint = Vector2.new(0.5, 0.5)
  520.                 Toggle.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  521.                 Toggle.Position = UDim2.new(0.88499999, 0, 0.5, 0)
  522.                 Toggle.Size = UDim2.new(0, 35, 0, 35)
  523.                
  524.                 check.Name = "check"
  525.                 check.Parent = Toggle
  526.                 check.AnchorPoint = Vector2.new(0.5, 0.5)
  527.                 check.BackgroundTransparency = 1.000
  528.                 check.Position = UDim2.new(0.5, 0, 0.5, 0)
  529.                 check.Size = UDim2.new(0, 30, 0, 30)
  530.                 check.ZIndex = 2
  531.                 check.Image = "rbxassetid://3926305904"
  532.                 check.ImageColor3 = Color3.fromRGB(255, 255, 0)
  533.                 check.ImageRectOffset = Vector2.new(312, 4)
  534.                 check.ImageRectSize = Vector2.new(24, 24)
  535.  
  536.                 TextLabel_5.Parent = Toggle
  537.                 TextLabel_5.AnchorPoint = Vector2.new(0.5, 0.5)
  538.                 TextLabel_5.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  539.                 TextLabel_5.BackgroundTransparency = 1.000
  540.                 TextLabel_5.Position = UDim2.new(-3.9, 0, 0.5, 0)
  541.                 TextLabel_5.Size = UDim2.new(0, 255, 0, 40)
  542.                 TextLabel_5.Font = Enum.Font.Code
  543.                 TextLabel_5.Text = text
  544.                 TextLabel_5.TextColor3 = Color3.fromRGB(255, 255, 255)
  545.                 TextLabel_5.TextSize = 14.000
  546.                 TextLabel_5.TextXAlignment = Enum.TextXAlignment.Right
  547.                
  548.                 check.MouseButton1Down:Connect(function()
  549.                     toggled = not toggled
  550.                     check.ImageTransparency = (toggled == true) and 0 or 1
  551.                    
  552.                     callback(toggled)
  553.                 end)
  554.             end
  555.            
  556.             function library4:NewSlider(text, min, max, callback)
  557.                 text = (type(text) ~= "string") and "Slider" or text
  558.                 min = (type(min) ~= "number") and 0 or min
  559.                 max = (type(max) ~= "number") and 10 or max
  560.                 callback = (type(callback) ~= "function") and function()
  561.                     print("Moved Slider!")
  562.                 end or callback
  563.                
  564.                 local Slider = Instance.new("Frame")
  565.                 local TextLabel_3 = Instance.new("TextLabel")
  566.                 local TextLabel_4 = Instance.new("TextLabel")
  567.                 local UICorner_10 = Instance.new("UICorner")
  568.                 local FillFrame = Instance.new("Frame")
  569.                 local UICorner_11 = Instance.new("UICorner")
  570.                 local SliderButton = Instance.new("TextButton")
  571.                 local UICorner_12 = Instance.new("UICorner")
  572.                 local UICorner_13 = Instance.new("UICorner")
  573.                 local UICorner_14 = Instance.new("UICorner")
  574.                 local Container = createContainer(Section)
  575.                
  576.                 local holding = false
  577.                
  578.                 Slider.Name = "Slider"
  579.                 Slider.Parent = Container
  580.                 Slider.AnchorPoint = Vector2.new(0.5, 0.5)
  581.                 Slider.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  582.                 Slider.Position = UDim2.new(0.672542334, 0, 0.50999999, 0)
  583.                 Slider.Size = UDim2.new(0, 175, 0, 7)
  584.  
  585.                 TextLabel_3.Parent = Slider
  586.                 TextLabel_3.AnchorPoint = Vector2.new(0.5, 0.5)
  587.                 TextLabel_3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  588.                 TextLabel_3.BackgroundTransparency = 1.000
  589.                 TextLabel_3.Position = UDim2.new(-0.511904776, 0, 0.5, 0)
  590.                 TextLabel_3.Size = UDim2.new(0, 82, 0, 40)
  591.                 TextLabel_3.Font = Enum.Font.Code
  592.                 TextLabel_3.Text = text
  593.                 TextLabel_3.TextColor3 = Color3.fromRGB(255, 255, 255)
  594.                 TextLabel_3.TextSize = 14.000
  595.  
  596.                 TextLabel_4.Parent = Slider
  597.                 TextLabel_4.AnchorPoint = Vector2.new(0.5, 0.5)
  598.                 TextLabel_4.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  599.                 TextLabel_4.BackgroundTransparency = 1.000
  600.                 TextLabel_4.Position = UDim2.new(-0.145238101, 0, 0.5, 0)
  601.                 TextLabel_4.Size = UDim2.new(0, 50, 0, 40)
  602.                 TextLabel_4.Font = Enum.Font.Code
  603.                 TextLabel_4.Text = min
  604.                 TextLabel_4.TextColor3 = Color3.fromRGB(255, 255, 255)
  605.                 TextLabel_4.TextSize = 14.000
  606.  
  607.                 UICorner_10.Parent = Slider
  608.  
  609.                 FillFrame.Name = "FillFrame"
  610.                 FillFrame.Parent = Slider
  611.                 FillFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  612.                 FillFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 0)
  613.                 FillFrame.Position = UDim2.new(0, 0, 0.5, 0)
  614.                 FillFrame.Size = UDim2.new(0, 0, 0, 7)
  615.                 FillFrame.ZIndex = 0
  616.  
  617.                 UICorner_11.Parent = FillFrame
  618.  
  619.                 SliderButton.Name = "SliderButton"
  620.                 SliderButton.Parent = Slider
  621.                 SliderButton.AnchorPoint = Vector2.new(0.5, 0.5)
  622.                 SliderButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  623.                 SliderButton.Position = UDim2.new(0, 0, 0.5, 0)
  624.                 SliderButton.Size = UDim2.new(0, 7, 0, 7)
  625.                 SliderButton.Font = Enum.Font.SourceSans
  626.                 SliderButton.Text = ""
  627.                 SliderButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  628.                 SliderButton.TextSize = 14.000
  629.                 SliderButton.AutoButtonColor = false
  630.                
  631.                 UICorner_12.CornerRadius = UDim.new(1, 0)
  632.                 UICorner_12.Parent = SliderButton
  633.                
  634.                 SliderButton.MouseButton1Down:Connect(function()
  635.                     holding = true
  636.                     SliderButton.Size = UDim2.new(0, 9, 0, 9)
  637.                 end)
  638.                 SliderButton.MouseButton1Up:Connect(function()
  639.                     holding = false
  640.                     SliderButton.Size = UDim2.new(0, 7, 0, 7)
  641.                 end)
  642.                
  643.                 runService.Heartbeat:Connect(function()
  644.                     if holding then
  645.                         local mouseLocation = uis:GetMouseLocation()
  646.                        
  647.                         local xPos = (mouseLocation.X-Slider.AbsolutePosition.X)/Slider.AbsoluteSize.X
  648.                         xPos = math.clamp(xPos, 0, 1)
  649.                        
  650.                         local value = math.ceil( min + (xPos * (max-min))  )
  651.                        
  652.                         TextLabel_4.Text = tostring(value)
  653.                        
  654.                         FillFrame.Size = UDim2.new(xPos, 0, 0, 7)
  655.                         FillFrame.Position = UDim2.new(xPos/2, 0, 0.5, 0)
  656.                         SliderButton.Position = UDim2.new(xPos, 0, 0.5, 0)
  657.                        
  658.                         callback(value)
  659.                     end
  660.                 end)
  661.             end
  662.            
  663.             function library4:NewDropdown(text, items, callback)
  664.                 text = (type(text) ~= "string") and "Dropdown" or text
  665.                 items = (type(items) ~= "table") and {} or items
  666.                 callback = (type(callback) ~= "function") and function()
  667.                     print("Selected Item!")
  668.                 end or callback
  669.                
  670.                 local UICorner = Instance.new("UICorner")
  671.                 local Dropdown = Instance.new("Frame")
  672.                 local expand = Instance.new("ImageButton")
  673.                 local TextLabel = Instance.new("TextLabel")
  674.                 local UIGridLayout = Instance.new("UIGridLayout")
  675.                 local Container = createContainer(Section)
  676.                 local TextLabel = Instance.new("TextLabel")
  677.                 local TextLabel_2 = Instance.new("TextLabel")
  678.                
  679.                 local visible = true
  680.                
  681.                 Container.AutomaticSize = Enum.AutomaticSize.Y
  682.  
  683.                 Dropdown.Name = "Dropdown"
  684.                 Dropdown.Parent = Container
  685.                 Dropdown.AnchorPoint = Vector2.new(0.5, 0.5)
  686.                 Dropdown.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  687.                 Dropdown.BackgroundTransparency = 1.000
  688.                 Dropdown.Position = UDim2.new(0.5, 0, 0.5, 0)
  689.                 Dropdown.Size = UDim2.new(0, 323, 0, 40)
  690.  
  691.                 expand.Name = "expand"
  692.                 expand.Parent = Dropdown
  693.                 expand.AnchorPoint = Vector2.new(0.5, 0.5)
  694.                 expand.BackgroundTransparency = 1.000
  695.                 expand.Position = UDim2.new(0.89009285, 0, 0.5, 0)
  696.                 expand.Size = UDim2.new(0, 25, 0, 25)
  697.                 expand.ZIndex = 2
  698.                 expand.Image = "rbxassetid://3926305904"
  699.                 expand.ImageRectOffset = Vector2.new(564, 284)
  700.                 expand.ImageRectSize = Vector2.new(36, 36)
  701.                 expand.Rotation = -180
  702.                
  703.                 TextLabel.Parent = Dropdown
  704.                 TextLabel.AnchorPoint = Vector2.new(0.5, 0.5)
  705.                 TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  706.                 TextLabel.BackgroundTransparency = 1.000
  707.                 TextLabel.Position = UDim2.new(0.695404172, 0, 0.5, 0)
  708.                 TextLabel.Size = UDim2.new(0, 90, 0, 40)
  709.                 TextLabel.Font = Enum.Font.Code
  710.                 TextLabel.Text = text
  711.                 TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  712.                 TextLabel.TextSize = 14.000
  713.                 TextLabel.TextWrapped = true
  714.                 TextLabel.TextXAlignment = Enum.TextXAlignment.Right
  715.  
  716.                 TextLabel_2.Parent = Dropdown
  717.                 TextLabel_2.AnchorPoint = Vector2.new(0.5, 0.5)
  718.                 TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  719.                 TextLabel_2.BackgroundTransparency = 1.000
  720.                 TextLabel_2.Position = UDim2.new(0.282865435, 0, 0.5, 0)
  721.                 TextLabel_2.Size = UDim2.new(0, 176, 0, 40)
  722.                 TextLabel_2.Font = Enum.Font.Code
  723.                 TextLabel_2.Text = "Selected: nil"
  724.                 TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  725.                 TextLabel_2.TextSize = 14.000
  726.                 TextLabel_2.TextWrapped = true
  727.                 TextLabel_2.TextXAlignment = Enum.TextXAlignment.Right
  728.  
  729.                 UIGridLayout.Parent = Container
  730.                 UIGridLayout.SortOrder = Enum.SortOrder.LayoutOrder
  731.                 UIGridLayout.CellSize = UDim2.new(0, 323, 0, 40)
  732.                
  733.                 for i, item in pairs(items) do
  734.                     item = (typeof(item) == "Instance") and item.Name or item
  735.                     print(item)
  736.                     local Item = Instance.new("TextButton")
  737.                                        
  738.                     Item.Name = "Item"
  739.                     Item.Parent = Container
  740.                     Item.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  741.                     Item.Size = UDim2.new(0, 200, 0, 50)
  742.                     Item.Font = Enum.Font.Code
  743.                     Item.Text = item
  744.                     Item.TextColor3 = Color3.fromRGB(255, 255, 255)
  745.                     Item.TextSize = 14.000
  746.                     Item.AutoButtonColor = false
  747.                     Item.BorderSizePixel = 0
  748.                    
  749.                     Item.MouseButton1Down:Connect(function()
  750.                         visible = not visible
  751.                         TextLabel_2.Text = "Selected: "..item
  752.                         buttonClickEffect(Frame)
  753.                         dropdownEffect(Container, expand, "TextButton", visible, -180, -90)
  754.                         callback(item)
  755.                     end)
  756.                 end
  757.                
  758.                 expand.MouseButton1Down:Connect(function()
  759.                     visible = not visible
  760.                     dropdownEffect(Container, expand, "TextButton", visible, -180, -90)
  761.                 end)
  762.             end
  763.            
  764.             return library4
  765.         end
  766.        
  767.         return library3
  768.     end
  769.    
  770.     return library2
  771. end
  772.  
  773. return library
  774.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement