Advertisement
HD_G4M3R

asdaweqwrqs

Nov 2nd, 2021
2,812
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 25.83 KB | None | 0 0
  1. local lib;lib = setmetatable({
  2.     LocalPlayer = game:GetService("Players").LocalPlayer,
  3.     Mouse = game:GetService("Players").LocalPlayer:GetMouse(),
  4. },{
  5.     __index = function(self,index)
  6.         return index == "Init" and function(self)
  7.             if not self.GUI then
  8.                 self.GUI = Instance.new("ScreenGui",game.CoreGui)
  9.             else
  10.                 self:DP("UnNeeded Init request.")
  11.             end
  12.         end or index == "CreateFrame" and function(self,properties)
  13.             local frame = {
  14.                 Instance = Instance.new("TextButton",self.GUI),
  15.                 ViewFrames = {},
  16.                 Row = 1,
  17.                 ButtonOffset = -4,
  18.             }
  19.             self:MakeMoveable(frame.Instance)
  20.  
  21.             local UICorner = Instance.new("UICorner",frame.Instance)
  22.             local UIPadding = Instance.new("UIPadding",frame.Instance)
  23.  
  24.             frame.Instance.Name = "Frame"
  25.             frame.Instance.BackgroundColor3 = Color3.new(0.054902, 0.054902, 0.0784314)
  26.             frame.Instance.Position = UDim2.new(0.5, 0, 0.5, 0)
  27.             frame.Instance.AutoButtonColor = false
  28.             frame.Instance.Font = Enum.Font.ArialBold
  29.             frame.Instance.LineHeight = 1
  30.             frame.Instance.TextColor3 = Color3.new(0.0627451, 0.0627451, 0.0941177)
  31.             frame.Instance.TextSize = 45
  32.             UICorner.CornerRadius = UDim.new(0, 4)
  33.             UIPadding.PaddingBottom = UDim.new(0, 10)
  34.             UIPadding.PaddingLeft = UDim.new(0, 10)
  35.             UIPadding.PaddingRight = UDim.new(0, 10)
  36.             UIPadding.PaddingTop = UDim.new(0, 10)
  37.  
  38.             frame.Instance.Size = properties.Size == "Small" and UDim2.new() or properties.Size == "Medium" and UDim2.new(0,648,0,348) or properties.Size == "Large" and UDim2.new()
  39.             frame.Instance.Text = properties.GUIName
  40.             return setmetatable(frame,{
  41.                 __index = function(self,index)
  42.                     return index == "CreateButton" and function(self,properties)
  43.                         local button = {}
  44.                         button.Instance = Instance.new("TextButton",self.Instance)
  45.                         button.Action = nil
  46.                         button.Locked = false
  47.  
  48.                         local UICorner = Instance.new("UICorner",button.Instance)
  49.                         UICorner.CornerRadius = UDim.new(0,4)
  50.  
  51.                         button.Instance.Name = properties.Name
  52.                         button.Instance.BackgroundColor3 = Color3.fromRGB(14, 14, 20)
  53.                         button.Instance.BorderSizePixel = 0
  54.                         button.Instance.Position = UDim2.new(0, self.ButtonOffset, 0, -30)
  55.                         button.Instance.Text = properties.Name
  56.                         button.Instance.Size = UDim2.new(0,button.Instance.TextBounds.x+47, 0, 25)
  57.                         button.Instance.AutoButtonColor = false
  58.                         button.Instance.Font = Enum.Font.SourceSansSemibold
  59.                         button.Instance.TextColor3 = Color3.new(1, 1, 1)
  60.                         button.Instance.TextSize = 16
  61.                         self.ButtonOffset+=8+button.Instance.Size.X.Offset
  62.  
  63.                         if properties.Image then
  64.  
  65.                         end
  66.                         button.Instance.MouseButton1Click:Connect(function()
  67.                             if button.Action and not button.Locked then
  68.                                 if button.Action.Instance:IsA("Frame") then
  69.                                     self:CloseViewFrames() 
  70.                                     button.Action.Instance.Visible = not button.Action.Instance.Visible
  71.                                     game:GetService("TweenService"):Create(button.Instance,TweenInfo.new(.12),{BackgroundColor3=Color3.fromRGB(19,19,27)}):Play()
  72.                                 elseif button.Action:IsA("SOME OTHER SHIT HERE") then
  73.  
  74.                                 end
  75.                             elseif not button.Locked then
  76.                                 lib:DP("Button not linked.")
  77.                             end
  78.                         end)
  79.                         return setmetatable(button,{
  80.                             __index = function(self,index)
  81.                                 return index == "Link" and function(self,linkframe)
  82.                                     if not self.Action then
  83.                                         self.Action = linkframe
  84.                                         frame.ViewFrames[linkframe]["LinkedButton"] = self
  85.                                     else
  86.                                         lib:DP("Button already linked.")
  87.                                     end
  88.                                 end or index == "Lock" and function(self,set)
  89.                                     set = not set
  90.                                     self.Locked = set
  91.                                     if set then
  92.                                         if self.Action then
  93.                                             frame.ViewFrames[self.Action]["LinkedButton"] = nil
  94.                                         end
  95.                                         self.Instance.BackgroundColor3 = Color3.fromRGB(10, 10, 16)
  96.                                     end
  97.                                 end
  98.                             end,
  99.                         })
  100.                     end or index == "CreateViewFrame" and function(self,properties)
  101.                         local viewframe = {}
  102.                         viewframe.Instance = Instance.new("Frame",self.Instance)
  103.                         viewframe.Instance.Size = (properties.Size == "Half" and UDim2.new(.5,-5,1,0)) or UDim2.new(1,0,1,0)
  104.                         viewframe.Instance.Visible = false
  105.                         viewframe.Instance.BackgroundTransparency = 1
  106.                         self.ViewFrames[viewframe] = {LinkedButton = nil,}
  107.                         return setmetatable(viewframe,{
  108.                             __index = function(self,index)
  109.                                 return index == "CreateToggleButton" and function(self,properties)
  110.                                     local button = {}
  111.                                     button.Instance = Instance.new("TextButton",self.Instance)
  112.                                     button.Instance.Position = properties.Position
  113.  
  114.                                     local SliderView = Instance.new("Frame",button.Instance)
  115.                                     local Slider = Instance.new("Frame",SliderView)
  116.                                     local Handle = Instance.new("TextLabel",Slider)
  117.                                     local NameText = Instance.new("TextLabel",button.Instance)
  118.                                     local UICorner = Instance.new("UICorner",button.Instance)
  119.                                     UICorner.CornerRadius = UDim.new(0,4)
  120.                                     UICorner:Clone().Parent = SliderView
  121.                                     UICorner:Clone().Parent = Slider
  122.                                     UICorner.CornerRadius = UDim.new(0,2)
  123.                                     UICorner:Clone().Parent = Handle
  124.                                     UICorner.CornerRadius = UDim.new(0,4)
  125.  
  126.                                     button.Instance.Name = "TempToggle"
  127.                                     button.Instance.BackgroundColor3 = Color3.new(0.0745098, 0.0745098, 0.105882)
  128.                                     button.Instance.Size = UDim2.new(0, 150, 0, 37)
  129.                                     button.Instance.AutoButtonColor = false
  130.                                     button.Instance.Font = Enum.Font.SourceSans
  131.                                     button.Instance.Text = ""
  132.                                     button.Instance.TextColor3 = Color3.new(0, 0, 0)
  133.                                     button.Instance.TextSize = 14
  134.                                     SliderView.Name = "SliderView"
  135.                                     SliderView.AnchorPoint = Vector2.new(0.5, 0.5)
  136.                                     SliderView.BackgroundColor3 = Color3.new(1, 1, 1)
  137.                                     SliderView.BorderSizePixel = 0
  138.                                     SliderView.Position = UDim2.new(0.5, 0, 1, -11)
  139.                                     SliderView.Size = UDim2.new(1, -18, 0, 8)
  140.                                     Slider.Name = "Slider"
  141.                                     Slider.BackgroundColor3 = Color3.new(0.596078, 0.945098, 0.584314)
  142.                                     Slider.BorderSizePixel = 0
  143.                                     Handle.Name = "Handle"
  144.                                     Handle.Parent = Slider
  145.                                     Handle.AnchorPoint = Vector2.new(0.5, 0.5)
  146.                                     Handle.BackgroundColor3 = Color3.new(0.886275, 0.929412, 1)
  147.                                     Handle.Position = UDim2.new(1, 0, 0.5, 0)
  148.                                     Handle.Size = UDim2.new(0, 8, 1, 6)
  149.                                     Handle.Font = Enum.Font.SourceSans
  150.                                     Handle.Text = ""
  151.                                     Handle.TextColor3 = Color3.new(0, 0, 0)
  152.                                     Handle.TextSize = 14
  153.                                     NameText.Name = "NameText"
  154.                                     NameText.Parent = button.Instance
  155.                                     NameText.BackgroundColor3 = Color3.new(1, 1, 1)
  156.                                     NameText.BackgroundTransparency = 1
  157.                                     NameText.BorderSizePixel = 0
  158.                                     NameText.Size = UDim2.new(1, 0, 0, 20)
  159.                                     NameText.Font = Enum.Font.ArialBold
  160.                                     NameText.Text = "  silentaim"
  161.                                     NameText.TextColor3 = Color3.new(1, 1, 1)
  162.                                     NameText.TextSize = 14
  163.                                     NameText.TextXAlignment = Enum.TextXAlignment.Left
  164.  
  165.                                     button.Name = ""
  166.                                     button.Activated = false
  167.                                     button.Instance.NameText.Text = "  "..button.Name
  168.                                     button.Instance.SliderView.Slider.Size = button.Activated and UDim2.new(1,0,1,0) or UDim2.new(0,0,1,0)
  169.                                     button.Instance.SliderView.Slider.BackgroundColor3 = button.Activated and Color3.fromRGB(152, 241, 149) or Color3.fromRGB(226, 237, 255)
  170.                                     button.Instance.MouseButton1Click:Connect(function()
  171.                                         button.Activated = not button.Activated
  172.                                         if button.OnUpdate then
  173.                                             button:OnUpdate()
  174.                                         end
  175.                                         game:GetService("TweenService"):Create(button.Instance.SliderView.Slider,TweenInfo.new(.12),{Size = button.Activated and UDim2.new(1,0,1,0) or UDim2.new(0,0,1,0),BackgroundColor3 = button.Activated and Color3.fromRGB(152, 241, 149) or Color3.fromRGB(226, 237, 255)}):Play()
  176.                                     end)
  177.                                     return setmetatable(button,{
  178.                                         __index = function(self,index)
  179.                                             return index == "Update" and function(self)
  180.                                                 self.Instance.SliderView.Slider.Size = self.Activated and UDim2.new(1,0,1,0) or UDim2.new(0,0,1,0)
  181.                                                 self.Instance.SliderView.Slider.BackgroundColor3 = self.Activated and Color3.fromRGB(152, 241, 149) or Color3.fromRGB(226, 237, 255)
  182.                                                 self.Instance.NameText.Text = "  "..self.Name
  183.                                             end
  184.                                         end,
  185.                                     })
  186.                                 end or index == "CreateSlider" and function(self,properties)
  187.                                     local slider = {}
  188.                                     slider.Instance = Instance.new("Frame",self.Instance)
  189.                                     slider.Instance.Position = properties.Position
  190.  
  191.                                     local SliderView = Instance.new("Frame",slider.Instance)
  192.                                     local Slider = Instance.new("Frame",SliderView)
  193.                                     local DragButton = Instance.new("TextButton",Slider)
  194.                                     local NameText = Instance.new("TextLabel",slider.Instance)
  195.                                     local ProcentText = Instance.new("TextLabel",slider.Instance)
  196.                                     local UICorner = Instance.new("UICorner",slider.Instance)
  197.                                     UICorner.CornerRadius = UDim.new(0,4)
  198.                                     UICorner:Clone().Parent = SliderView
  199.                                     UICorner:Clone().Parent = Slider
  200.                                     UICorner.CornerRadius = UDim.new(0,2)
  201.                                     UICorner:Clone().Parent = DragButton
  202.                                     UICorner.CornerRadius = UDim.new(0,4)
  203.  
  204.                                     slider.Instance.Name = "TempSlider"
  205.                                     slider.Instance.BackgroundColor3 = Color3.new(0.0745098, 0.0745098, 0.105882)
  206.                                     slider.Instance.Size = UDim2.new(0, 150, 0, 37)
  207.                                     SliderView.Name = "SliderView"
  208.                                     SliderView.AnchorPoint = Vector2.new(0.5, 0.5)
  209.                                     SliderView.BackgroundColor3 = Color3.new(1, 1, 1)
  210.                                     SliderView.BorderSizePixel = 0
  211.                                     SliderView.Position = UDim2.new(0.5, 0, 1, -11)
  212.                                     SliderView.Size = UDim2.new(1, -18, 0, 8)
  213.                                     Slider.Name = "Slider"
  214.                                     Slider.BackgroundColor3 = Color3.new(1, 0.803922, 0)
  215.                                     Slider.BorderSizePixel = 0
  216.                                     Slider.Size = UDim2.new(0.5, 0, 1, 0)
  217.                                     DragButton.Name = "DragButton"
  218.                                     DragButton.AnchorPoint = Vector2.new(0.5, 0.5)
  219.                                     DragButton.BackgroundColor3 = Color3.new(0.886275, 0.929412, 1)
  220.                                     DragButton.BorderSizePixel = 0
  221.                                     DragButton.Position = UDim2.new(1, 0, 0.5, 0)
  222.                                     DragButton.Size = UDim2.new(0, 8, 1, 6)
  223.                                     DragButton.AutoButtonColor = false
  224.                                     DragButton.Font = Enum.Font.SourceSans
  225.                                     DragButton.Text = ""
  226.                                     DragButton.TextColor3 = Color3.new(0, 0, 0)
  227.                                     DragButton.TextSize = 14
  228.                                     NameText.Name = "NameText"
  229.                                     NameText.BackgroundColor3 = Color3.new(1, 1, 1)
  230.                                     NameText.BackgroundTransparency = 1
  231.                                     NameText.BorderSizePixel = 0
  232.                                     NameText.Size = UDim2.new(1, 0, 0, 20)
  233.                                     NameText.Font = Enum.Font.ArialBold
  234.                                     NameText.TextColor3 = Color3.new(1, 1, 1)
  235.                                     NameText.TextSize = 14
  236.                                     NameText.TextXAlignment = Enum.TextXAlignment.Left
  237.                                     ProcentText.Name = "ProcentText"
  238.                                     ProcentText.BackgroundColor3 = Color3.new(1, 1, 1)
  239.                                     ProcentText.BackgroundTransparency = 1
  240.                                     ProcentText.BorderSizePixel = 0
  241.                                     ProcentText.Size = UDim2.new(1, 0, 0, 20)
  242.                                     ProcentText.Font = Enum.Font.ArialBold
  243.                                     ProcentText.TextColor3 = Color3.fromRGB(26, 26, 30)
  244.                                     ProcentText.TextSize = 12
  245.                                     ProcentText.TextXAlignment = Enum.TextXAlignment.Right
  246.  
  247.                                     slider.Procent = 0
  248.                                     slider.Name = ""
  249.                                     slider.MaxProcent = 100
  250.                                     slider.Active = false
  251.                                     slider.Instance.SliderView.Slider.Size = UDim2.new(slider.Procent/slider.MaxProcent,0,1,0)
  252.                                     slider.Instance.ProcentText.Text = slider.Procent/slider.MaxProcent.."  "
  253.                                     slider.Instance.NameText.Text = "  "..slider.Name
  254.                                     slider.Instance.SliderView.Slider.DragButton.MouseButton1Down:Connect(function()
  255.                                         slider.Active = true
  256.                                         repeat game:GetService("RunService").RenderStepped:Wait()
  257.                                             slider.Procent = slider.MaxProcent*((lib.Mouse.x-slider.Instance.SliderView.AbsolutePosition.x)/slider.Instance.SliderView.AbsoluteSize.x)
  258.                                             slider.Procent = slider.Procent < 0 and 0 or slider.Procent > slider.MaxProcent and slider.MaxProcent or slider.Procent
  259.                                             slider:Update()
  260.                                         until not slider.Active
  261.                                     end)
  262.                                     slider.Instance.SliderView.Slider.DragButton.MouseButton1Up:Connect(function()
  263.                                         slider.Active = false
  264.                                     end)
  265.                                     return setmetatable(slider,{
  266.                                         __index = function(self,index)
  267.                                             return index == "Update" and function(self)
  268.                                                 local XProcent = slider.Procent/slider.MaxProcent
  269.                                                 XProcent = not slider.Active and XProcent < .1 and .1 or XProcent
  270.                                                 game:GetService("TweenService"):Create(slider.Instance.SliderView.Slider,TweenInfo.new(.06),{Size=UDim2.new(XProcent,0,1,0)}):Play()
  271.                                                 slider.Instance.ProcentText.Text = math.floor(slider.Procent).."  "
  272.                                                 slider.Instance.NameText.Text = "  "..slider.Name
  273.                                                 if slider.OnUpdate then
  274.                                                     slider:OnUpdate()
  275.                                                 end
  276.                                             end
  277.                                         end,
  278.                                     })
  279.                                 end or index == "CreateInfoLabel" and function(self,properties)
  280.                                     local label = {}
  281.                                     label.Instance = nil
  282.                                     label.Instance.Position = properties.Position
  283.                                     label.Name = ""
  284.                                     label.Text = ""
  285.                                     label.Instance.Text = "   "..label.Text
  286.                                     label.Instance.NameText = "  "..label.Name
  287.                                     return setmetatable(label,{
  288.                                         __index = function(self,index)
  289.                                             return index == "Update" and function(self)
  290.                                                 self.Instance.Text = "   "..self.Text
  291.                                                 self.Instance.NameText = "  "..self.Name
  292.                                             end
  293.                                         end,
  294.                                     })
  295.                                 end or index == "CreateDropdown" and function(self,properties)
  296.                                     local dropdown = {}
  297.                                     dropdown.Instance = Instance.new("Frame",self.Instance)
  298.                                     dropdown.Instance.Position = properties.Position
  299.                                     dropdown.Items = {}
  300.                                     dropdown.Selected = "n/a"
  301.  
  302.                                     local OpenButton = Instance.new("TextButton",dropdown.Instance)
  303.                                     local MenuFrame = Instance.new("Frame",OpenButton)
  304.                                     local Menu = Instance.new("Frame",MenuFrame)
  305.                                     local UIPadding = Instance.new("UIPadding",Menu)
  306.                                     local UIListLayout = Instance.new("UIListLayout",Menu)
  307.                                     local Option = Instance.new("TextButton")
  308.                                     local OptionName = Instance.new("TextLabel",Option)
  309.                                     local NameText = Instance.new("TextLabel",dropdown.Instance)
  310.                                     local SelectedItem = Instance.new("TextLabel",dropdown.Instance)
  311.                                     local UICorner = Instance.new("UICorner",dropdown.Instance)
  312.                                     UICorner.CornerRadius = UDim.new(0,4)
  313.  
  314.                                     dropdown.Instance.Name = "TempDropdown"
  315.                                     dropdown.Instance.BackgroundColor3 = Color3.new(0.0745098, 0.0745098, 0.105882)
  316.                                     dropdown.Instance.Size = UDim2.new(0, 100, 0, 54)
  317.                                     dropdown.Instance.SizeConstraint = Enum.SizeConstraint.RelativeXX
  318.                                     UICorner:Clone().Parent = OpenButton
  319.                                     UICorner:Clone().Parent = Menu
  320.                                     UICorner:Clone().Parent = Option
  321.                                     UICorner:Clone().Parent = OptionName
  322.                                     UICorner:Clone().Parent = SelectedItem
  323.  
  324.                                     OpenButton.Name = "OpenButton"
  325.                                     OpenButton.AnchorPoint = Vector2.new(0.5, 1)
  326.                                     OpenButton.BackgroundColor3 = Color3.new(0.756863, 0.8, 0.85098)
  327.                                     OpenButton.BorderSizePixel = 0
  328.                                     OpenButton.Position = UDim2.new(0.5, 0, 1, -4)
  329.                                     OpenButton.Size = UDim2.new(1, -12, 0, 12)
  330.                                     OpenButton.Font = Enum.Font.ArialBold
  331.                                     OpenButton.Text = "â–¼"
  332.                                     OpenButton.TextColor3 = Color3.new(0.407843, 0.407843, 0.407843)
  333.                                     OpenButton.TextSize = 12
  334.                                     OpenButton.TextYAlignment = Enum.TextYAlignment.Bottom
  335.                                     MenuFrame.Name = "MenuFrame"
  336.                                     MenuFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  337.                                     MenuFrame.BackgroundTransparency = 1
  338.                                     MenuFrame.BorderSizePixel = 0
  339.                                     MenuFrame.ClipsDescendants = true
  340.                                     MenuFrame.Position = UDim2.new(0, 0, 1, 0)
  341.                                     MenuFrame.Size = UDim2.new(1, 0, 0, 32)
  342.                                     Menu.Name = "Menu"
  343.                                     Menu.BackgroundColor3 = Color3.new(0.0431373, 0.0431373, 0.0627451)
  344.                                     Menu.BorderSizePixel = 0
  345.                                     Menu.ClipsDescendants = true
  346.                                     Menu.Position = UDim2.new(0, 0, -1, -8)
  347.                                     Menu.Size = UDim2.new(1, 0, 1, 0)
  348.                                     UIPadding.PaddingBottom = UDim.new(0, 2)
  349.                                     UIPadding.PaddingLeft = UDim.new(0, 4)
  350.                                     UIPadding.PaddingRight = UDim.new(0, 4)
  351.                                     UIPadding.PaddingTop = UDim.new(0, 10)
  352.                                     UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  353.                                     UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  354.                                     UIListLayout.Padding = UDim.new(0, 4)
  355.                                     Option.Name = "Option"
  356.                                     Option.BackgroundColor3 = Color3.new(0.0745098, 0.0745098, 0.105882)
  357.                                     Option.BorderSizePixel = 0
  358.                                     Option.Size = UDim2.new(1, 0, 0, 18)
  359.                                     Option.Font = Enum.Font.ArialBold
  360.                                     Option.Text = "head"
  361.                                     Option.TextColor3 = Color3.new(1, 1, 1)
  362.                                     Option.TextSize = 14
  363.                                     OptionName.AnchorPoint = Vector2.new(0.5, 0.5)
  364.                                     OptionName.BackgroundColor3 = Color3.new(0.0431373, 0.0431373, 0.0627451)
  365.                                     OptionName.Position = UDim2.new(0.5, 0, 0.5, 0)
  366.                                     OptionName.Size = UDim2.new(1, -4, 1, -4)
  367.                                     OptionName.Font = Enum.Font.ArialBold
  368.                                     OptionName.Text = "option"
  369.                                     OptionName.TextColor3 = Color3.new(1, 1, 1)
  370.                                     OptionName.TextSize = 11
  371.                                     OptionName.Name = "OptionName"
  372.                                     NameText.Name = "NameText"
  373.                                     NameText.BackgroundColor3 = Color3.new(1, 1, 1)
  374.                                     NameText.BackgroundTransparency = 1
  375.                                     NameText.BorderSizePixel = 0
  376.                                     NameText.Position = UDim2.new(0, 8, 0, 0)
  377.                                     NameText.Size = UDim2.new(1, -8, 0, 20)
  378.                                     NameText.Font = Enum.Font.ArialBold
  379.                                     NameText.Text = ""
  380.                                     NameText.TextColor3 = Color3.new(1, 1, 1)
  381.                                     NameText.TextSize = 14
  382.                                     NameText.TextXAlignment = Enum.TextXAlignment.Left
  383.                                     SelectedItem.Name = "SelectedItem"
  384.                                     SelectedItem.AnchorPoint = Vector2.new(0.5, 0)
  385.                                     SelectedItem.BackgroundColor3 = Color3.new(0.054902, 0.054902, 0.0784314)
  386.                                     SelectedItem.BorderSizePixel = 0
  387.                                     SelectedItem.Position = UDim2.new(0.5, 0, 0, 20)
  388.                                     SelectedItem.Size = UDim2.new(1, -20, 0, 14)
  389.                                     SelectedItem.Font = Enum.Font.ArialBold
  390.                                     SelectedItem.Text = "n/a"
  391.                                     SelectedItem.TextColor3 = Color3.new(0.756863, 0.8, 0.85098)
  392.                                     SelectedItem.TextSize = 11
  393.  
  394.                                     OpenButton.MouseButton1Click:Connect(function()
  395.                                         game:GetService("TweenService"):Create(dropdown.Instance.OpenButton.MenuFrame.Menu,TweenInfo.new(.12),{Position=UDim2.new(0,0,0,-8)}):Play()
  396.                                     end)
  397.                                     Menu.MouseLeave:Connect(function()
  398.                                         game:GetService("TweenService"):Create(dropdown.Instance.OpenButton.MenuFrame.Menu,TweenInfo.new(.12),{Position=UDim2.new(0,0,-1,-8)}):Play()
  399.                                     end)
  400.                                     dropdown.Instance.SelectedItem.Text = dropdown.Selected:lower()
  401.  
  402.                                     return setmetatable(dropdown,{
  403.                                         __index = function(self,index)
  404.                                             return index == "Update" and function(self)
  405.                                                 self.Instance.SelectedItem.Text = self.Selected:lower()
  406.                                                 self.Instance.NameText.Text = self.Name
  407.                                             end or index == "UpdateList" and function(self)
  408.                                                 lib:RemoveChildrenWithWhitelist(self.Instance.OpenButton.MenuFrame.Menu,{UIPadding=true,UICorner=true,UIListLayout=true})
  409.                                                 self.Instance.OpenButton.MenuFrame.Size = UDim2.new(1,0,0,10+(#self.Items*4+#self.Items*18))
  410.                                                 for index,option in pairs(self.Items) do
  411.                                                     local ui = Option:Clone()
  412.                                                     ui.Parent = self.Instance.OpenButton.MenuFrame.Menu
  413.                                                     ui.OptionName.Text = option.Name
  414.                                                     ui.MouseButton1Click:Connect(function()
  415.                                                         self.Selected = option.Name
  416.                                                         game:GetService("TweenService"):Create(self.Instance.OpenButton.MenuFrame.Menu,TweenInfo.new(.12),{Position=UDim2.new(0,0,-1,-8)}):Play()
  417.                                                         self:Update()  
  418.                                                     end)
  419.                                                 end
  420.                                             end
  421.                                         end,
  422.                                     })
  423.                                 end or index == "CreateKeyChoose" and function(self,properties)
  424.                                     local keychoose = {}
  425.                                     keychoose.Instance = Instance.new("Frame",self.Instance)
  426.                                     keychoose.Instance.Position = properties.Position
  427.                                     keychoose.Key = nil
  428.                                     keychoose.Name = ""
  429.  
  430.                                     local ChangeKey = Instance.new("TextButton",keychoose.Instance)
  431.                                     local NameText = Instance.new("TextLabel",keychoose.Instance)
  432.                                     local UICorner = Instance.new("UICorner",keychoose.Instance)
  433.                                     UICorner.CornerRadius = UDim.new(0,4)
  434.                                     UICorner:Clone().Parent = ChangeKey
  435.  
  436.                                     keychoose.Instance.Name = "KeyChange"
  437.                                     keychoose.Instance.BackgroundColor3 = Color3.new(0.0745098, 0.0745098, 0.105882)
  438.                                     keychoose.Instance.Size = UDim2.new(0, 120, 0, 54)
  439.                                     keychoose.Instance.SizeConstraint = Enum.SizeConstraint.RelativeXX
  440.  
  441.                                     ChangeKey.Name = "ChangeKey"
  442.                                     ChangeKey.BackgroundColor3 = Color3.new(0.756863, 0.8, 0.85098)
  443.                                     ChangeKey.BorderSizePixel = 0
  444.                                     ChangeKey.Position = UDim2.new(0, 5, 0, 20)
  445.                                     ChangeKey.Size = UDim2.new(0, 30, 0, 30)
  446.                                     ChangeKey.Font = Enum.Font.ArialBold
  447.                                     ChangeKey.LineHeight = 1
  448.                                     ChangeKey.Text = "..."
  449.                                     ChangeKey.TextColor3 = Color3.new(0.407843, 0.407843, 0.407843)
  450.                                     ChangeKey.TextSize = 14
  451.  
  452.                                     NameText.Name = "NameText"
  453.                                     NameText.BackgroundColor3 = Color3.new(1, 1, 1)
  454.                                     NameText.BackgroundTransparency = 1
  455.                                     NameText.BorderSizePixel = 0
  456.                                     NameText.Position = UDim2.new(0, 8, 0, 0)
  457.                                     NameText.Size = UDim2.new(1, -8, 0, 20)
  458.                                     NameText.Font = Enum.Font.ArialBold
  459.                                     NameText.Text = ""
  460.                                     NameText.TextColor3 = Color3.new(1, 1, 1)
  461.                                     NameText.TextSize = 14
  462.                                     NameText.TextXAlignment = Enum.TextXAlignment.Left
  463.  
  464.                                     keychoose.Instance.NameText.Text = keychoose.Name
  465.                                     keychoose.Instance.ChangeKey.MouseButton1Click:Connect(function()
  466.                                         local oldvalue,mouse = keychoose.Key,nil
  467.                                         keychoose.Instance.ChangeKey.Text = "..."
  468.                                         game:GetService("TweenService"):Create(keychoose.Instance.ChangeKey,TweenInfo.new(.12),{Size=UDim2.new(0,30,0,30)}):Play()
  469.                                         local leftmouseconnection = lib.Mouse.Button1Down:Connect(function()mouse="l";end)
  470.                                         local rightmouseconnection = lib.Mouse.Button2Down:Connect(function()mouse="r";end)
  471.                                         local keyconnection;keyconnection = game:GetService("UserInputService").InputBegan:Connect(function(input)
  472.                                             task.wait()
  473.                                             keychoose.Key = (input.KeyCode == Enum.KeyCode.Unknown and mouse == nil) and oldvalue or input.KeyCode == Enum.KeyCode.Unknown and (mouse == "l" and "RightMouse" or "LeftMouse") or input.KeyCode
  474.                                             keychoose:Update()
  475.                                             keyconnection:Disconnect()
  476.                                             leftmouseconnection:Disconnect()
  477.                                             rightmouseconnection:Disconnect()
  478.                                         end)
  479.                                     end)
  480.  
  481.                                     return setmetatable(keychoose,{
  482.                                         __index = function(self,index)
  483.                                             return index == "Update" and function(self)
  484.                                                 if properties.OnUpdate then
  485.                                                     properties:OnUpdate()
  486.                                                 end
  487.                                                 self.Instance.NameText.Text = self.Name
  488.                                                 if typeof(self.Key) == "string" then
  489.                                                     self.Instance.ChangeKey.Text = self.Key
  490.                                                 else
  491.                                                     self.Instance.ChangeKey.Text = tostring(self.Key):sub(14,#tostring(self.Key))
  492.                                                 end
  493.                                                 game:GetService("TweenService"):Create(self.Instance.ChangeKey,TweenInfo.new(.12),{Size=UDim2.new(0,self.Instance.ChangeKey.TextBounds.X+18,0,30)}):Play()
  494.                                             end
  495.                                         end,
  496.                                     })
  497.                                 end or index == "CreatePushButton" and function(self,properties)
  498.                                     local pushbutton = {}
  499.                                     pushbutton.Instance = nil
  500.                                     pushbutton.Name = ""
  501.                                     pushbutton.OnUpdate = nil
  502.  
  503.                                     return setmetatable(pushbutton,{
  504.                                         __index = function(self,index)
  505.                                             return index == "Update" and function(self)
  506.                                             end
  507.                                         end,
  508.                                     })
  509.                                 end
  510.                             end,
  511.                         })
  512.                     end or index == "CloseViewFrames" and function(self)
  513.                         for frame,table in pairs(self.ViewFrames) do
  514.                             frame.Instance.Visible = false
  515.                             if table.LinkedButton then
  516.                                 game:GetService("TweenService"):Create(table.LinkedButton.Instance,TweenInfo.new(.12),{BackgroundColor3=Color3.fromRGB(14,14,20)}):Play()
  517.                             end
  518.                         end
  519.                     end or index == "CreateCustomContainer" and function(self)
  520.  
  521.                     end
  522.                 end,
  523.             })
  524.  
  525.         end or index == "RemoveChildrenWithWhitelist" and function(self,Instance,whitelist)
  526.             for _,child in pairs(Instance:GetChildren()) do
  527.                 if not whitelist[child.ClassName] then
  528.                     child:Destroy()
  529.                 end
  530.             end
  531.         end or index == "DP" and function(self,text,color)
  532.             if color then
  533.                 rconsoleprint("@@"..color:upper().."@@")
  534.             end
  535.             rconsoleprint(text)
  536.             rconsoleprint("@@LIGHT_GRAY@@")
  537.         end or index == "Notify" and function(self,text)
  538.  
  539.         end or index == "MakeMoveable" and function(self,ui)
  540.             if ui then
  541.                 if ui:IsA("Frame") then
  542.                     ui.Draggable = true
  543.                 elseif ui:IsA("TextButton") then
  544.                     local id,runservice = game:GetService("HttpService"):GenerateGUID(),game:GetService("RunService")
  545.                     ui.MouseButton1Down:Connect(function()
  546.                         local offset = ui.AbsolutePosition-Vector2.new(self.Mouse.X,self.Mouse.Y)
  547.                         self[id] = true
  548.                         repeat runservice.RenderStepped:Wait()
  549.                             ui.Position = UDim2.new(0,self.Mouse.X+offset.X,0,self.Mouse.Y+offset.Y)
  550.                         until not self[id]
  551.                     end)
  552.                     ui.MouseButton1Up:Connect(function()
  553.                         self[id] = false
  554.                     end)
  555.                 end
  556.             end
  557.         end
  558.     end,
  559. })
  560. return lib
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement