Advertisement
FusionAlpha

Bas

Sep 12th, 2020 (edited)
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 35.62 KB | None | 0 0
  1. local function initLibrary()
  2.     local library = {flags = {}, callbacks = {}, rainbowI = 0};
  3.    
  4.     local GetService = game.GetService;
  5.     local Players = GetService(game, "Players");
  6.     local RunService = GetService(game, "RunService");
  7.     local CoreGui = GetService(game, "CoreGui");
  8.     local TweenService = GetService(game, "TweenService");
  9.     local UserInputService = GetService(game, "UserInputService");
  10.     local ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(39, 133, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(110, 153, 202))} = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(39, 133, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(110, 153, 202))}
  11.  
  12.    
  13.     local LocalPlayer = Players.LocalPlayer;
  14.    
  15.     do -- library funcs
  16.         coroutine.wrap(function()
  17.             while true do
  18.                 for i = 0, 359 do
  19.                     library.rainbowI = i / 359;
  20.                     library.rainbowVal = Color3.fromHSV(i / 359, 1, 1);
  21.                     wait();
  22.                 end;
  23.             end;
  24.         end)();
  25.        
  26.         function library:Create(class, data)
  27.             local obj = Instance.new(class);
  28.             for i, v in next, data do
  29.                 if i ~= 'Parent' then
  30.                     if typeof(v) == "Instance" then
  31.                         v.Parent = obj;
  32.                     else
  33.                         obj[i] = v
  34.                     end
  35.                 end
  36.             end
  37.            
  38.             obj.Parent = data.Parent;
  39.             return obj;
  40.         end;
  41.        
  42.         function library:Dragger(main, second)
  43.             local dragging;
  44.             local dragInput;
  45.             local dragStart;
  46.             local startPos;
  47.            
  48.             local function update(input)
  49.                 local delta = input.Position - dragStart;
  50.                 second:TweenPosition(UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y),'Out','Sine',0.01,true);
  51.             end;
  52.            
  53.             main.InputBegan:Connect(function(input)
  54.                 if input.UserInputType == Enum.UserInputType.MouseButton1 then
  55.                     dragging = true;
  56.                     dragStart = input.Position;
  57.                     startPos = second.Position;
  58.                    
  59.                     repeat wait() until input.UserInputState == Enum.UserInputState.End;
  60.                     dragging = false;
  61.                 end;
  62.             end);
  63.            
  64.             main.InputChanged:Connect(function(input)
  65.                 if input.UserInputType == Enum.UserInputType.MouseMovement then
  66.                     dragInput = input;
  67.                 end;
  68.             end);
  69.            
  70.             game:GetService("UserInputService").InputChanged:Connect(function(input)
  71.                 if input == dragInput and dragging then
  72.                     update(input);
  73.                 end;
  74.             end);
  75.         end;
  76.        
  77.         function library:Tween(instance, properties, callback)
  78.             local callback = callback or function() end;
  79.             local time = properties.time;
  80.             properties.time = nil;
  81.             local anim = TweenService:Create(instance, TweenInfo.new(time), properties);
  82.            
  83.             anim.Completed:Connect(callback);
  84.             anim:Play();
  85.             return anim;
  86.         end;
  87.        
  88.         local ui_Settings = {
  89.             mainColor = Color3.fromRGB(36, 36, 36);
  90.             bottomColor = Color3.fromRGB(34, 34, 34);
  91.             borderColor = Color3.fromRGB(42, 42, 42);
  92.             scrollingBarColor = Color3.fromRGB(115, 41, 255);
  93.             toggleColor = Color3.fromRGB(34, 34, 34);
  94.             toggleBorderColor = Color3.fromRGB(102, 41, 255);
  95.             boxColor = Color3.fromRGB(32, 32, 32);
  96.             boxBorderColor = Color3.fromRGB(102, 41, 255);
  97.             gradientColorSection = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(39, 133, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(110, 153, 202))};
  98.             gradientColor = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(39, 133, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(110, 153, 202))};
  99.             shadowGradientColor = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(39, 133, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(110, 153, 202))};
  100.         };
  101.        
  102.         UserInputService.InputBegan:Connect(function(input)
  103.             for i, v in next, library.flags do
  104.                 if(v == input.KeyCode) then
  105.                     library.callbacks[i]();
  106.                 elseif(v == input.UserInputType) then
  107.                     library.callbacks[i]();
  108.                 end;
  109.             end;
  110.         end);
  111.        
  112.         local gui = Instance.new("ScreenGui", CoreGui);
  113.         gui.Enabled = false;
  114.         library.gui = gui;
  115.        
  116.         local main = library:Create("Frame", {
  117.             Name = "main";
  118.             Parent = gui;
  119.             Position = UDim2.new(0.5, -200, 0.5, -135);
  120.             BorderSizePixel = 0;
  121.             BackgroundColor3 = ui_Settings.mainColor; -- main color
  122.             Size = UDim2.new(0, 400,0, 270);
  123.             library:Create("ImageLabel", {
  124.                 Name = "Search";
  125.                 BackgroundTransparency = 1.000;
  126.                 Position = UDim2.new(0, 4, 0, 46);
  127.                 Size = UDim2.new(1, -8, 0, 26);
  128.                 Image = "rbxassetid://4641155515";
  129.                 ImageColor3 = Color3.fromRGB(30, 30, 30);
  130.                 ScaleType = Enum.ScaleType.Slice;
  131.                 SliceCenter = Rect.new(4, 4, 296, 296);
  132.                 library:Create("TextBox", {
  133.                     Name = "textbox";
  134.                     BackgroundTransparency = 1.000;
  135.                     Position = UDim2.new(1, -362, 0, 0);
  136.                     Size = UDim2.new(1, -30, 1, 0);
  137.                     Font = Enum.Font.Gotham;
  138.                     PlaceholderText = "Search";
  139.                     Text = "";
  140.                     TextColor3 = Color3.fromRGB(255, 255, 255);
  141.                     TextSize = 14.000;
  142.                     TextXAlignment = Enum.TextXAlignment.Left;
  143.                 });
  144.                 library:Create("ImageLabel", {
  145.                     Name = "icon";
  146.                     BackgroundTransparency = 1.000;
  147.                     Position = UDim2.new(0, 2, 0, 1);
  148.                     Size = UDim2.new(0, 24, 0, 24);
  149.                     Image = "http://www.roblox.com/asset/?id=4645651350";
  150.                     library:Create("UIGradient", {
  151.                         Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(39, 133, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(210, 74, 255))};
  152.                         Rotation = 45;
  153.                     });
  154.                 });
  155.             });
  156.             library:Create("Frame", {
  157.                 Name = "border";
  158.                 BackgroundColor3 = ui_Settings.bottomColor;
  159.                 BorderColor3 = ui_Settings.borderColor;
  160.                 BorderSizePixel = 1;
  161.                 Position = UDim2.new(0, 5, 0, 78);
  162.                 Size = UDim2.new(0, 390, 0, 186);
  163.                 library:Create("Frame", {
  164.                     Name = "shadow";
  165.                     BackgroundColor3 = Color3.fromRGB(255, 255, 255);
  166.                     BackgroundTransparency = 0.100;
  167.                     BorderSizePixel = 0;
  168.                     Position = UDim2.new(0, 0, 1, -8);
  169.                     Size = UDim2.new(1, 0, 0, 8);
  170.                     library:Create("UIGradient", {
  171.                         Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(20, 20, 20)), ColorSequenceKeypoint.new(1, Color3.fromRGB(36, 36, 36))};
  172.                         Rotation = 270;
  173.                         Transparency = NumberSequence.new{NumberSequenceKeypoint.new(0.00, 0.00), NumberSequenceKeypoint.new(1.00, 1.00)};
  174.                     });
  175.                 });
  176.                 library:Create("Frame", {
  177.                     Name = "shadow";
  178.                     BackgroundColor3 = Color3.fromRGB(255, 255, 255);
  179.                     BackgroundTransparency = 0.100;
  180.                     BorderSizePixel = 0;
  181.                     Size = UDim2.new(1, 0, 0, 8);
  182.                     library:Create("UIGradient", {
  183.                         Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(20, 20, 20)), ColorSequenceKeypoint.new(1, Color3.fromRGB(36, 36, 36))};
  184.                         Rotation = 90;
  185.                         Transparency = NumberSequence.new{NumberSequenceKeypoint.new(0.00, 0.00), NumberSequenceKeypoint.new(1.00, 1.00)};
  186.                     });
  187.                 });
  188.             });
  189.             library:Create("Frame", {
  190.                 Name = "bar";
  191.                 BorderSizePixel = 0;
  192.                 BackgroundColor3 = Color3.fromRGB(255, 255, 255); -- bar color
  193.                 Size = UDim2.new(1, 0,0, 4);
  194.                 Position = UDim2.new(0, 0, 0, 0);
  195.                 library:Create("UIGradient", {
  196.                     Color = ui_Settings.gradientColor;
  197.                 });
  198.                 library:Create("Frame", {
  199.                     Name = "bottom";
  200.                     BorderSizePixel = 0;
  201.                     BackgroundColor3 = ui_Settings.bottomColor;
  202.                     Position = UDim2.new(0, 0, 0, 4);
  203.                     Size = UDim2.new(1, 0, 0, 34);
  204.                     library:Create("Frame", {
  205.                         BackgroundTransparency = 0.1;
  206.                         BackgroundColor3 = Color3.fromRGB(255, 255, 255);
  207.                         BorderSizePixel = 0;
  208.                         Name = "shadow";
  209.                         Position = UDim2.new(0, 0, 1, 0);
  210.                     });
  211.                     library:Create("TextLabel", {
  212.                         Name = "Title";
  213.                         BackgroundTransparency = 1;
  214.                         Position = UDim2.new(0, 10, 0.5, -10);
  215.                         Size = UDim2.new(0, 70, 0, 24);
  216.                         TextColor3 = Color3.fromRGB(255, 255, 255);
  217.                         Text = "Quantium V4";
  218.                         Font = "GothamSemibold";
  219.                         TextSize = 14;
  220.                         library:Create("UIGradient", {
  221.                             Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(39, 133, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(110, 153, 202))}
  222.                         });
  223.                     });
  224.                     library:Create("Frame", {
  225.                         Name = "topcontainer";
  226.                         BackgroundTransparency = 1;
  227.                         BorderSizePixel = 0;
  228.                         Position = UDim2.new(0, 88, 0, 9);
  229.                         Size = UDim2.new(1, -90, 0.73, 0);
  230.                         library:Create("UIListLayout", {
  231.                             Padding = UDim.new(0, 2);
  232.                             FillDirection = "Horizontal";
  233.                             HorizontalAlignment = "Left";
  234.                             SortOrder = "LayoutOrder";
  235.                             VerticalAlignment = "Top";
  236.                         });
  237.                     });
  238.                 });
  239.             });
  240.         });
  241.        
  242.         local modal = Instance.new("TextButton", main);
  243.         modal.Modal = true;
  244.         modal.BackgroundTransparency = 1;
  245.         modal.Text = "";
  246.        
  247.         main.Search.textbox.Changed:Connect(function()
  248.             local Entry = main.Search.textbox.Text:lower();
  249.            
  250.             if(Entry ~= "") then
  251.                 for i,v in next, library.currentSection:GetChildren() do
  252.                     if(not v:IsA("UIPadding") and not v:IsA("UIListLayout")) then
  253.                         local label = v:FindFirstChild("label");
  254.                         local button = v:FindFirstChild("button");
  255.                        
  256.                         local find = false;
  257.                         if(label and label.Text:gsub("%s", ""):lower():sub(1, #Entry) == Entry) then
  258.                             v.Visible = true;
  259.                             find = true;
  260.                         end;
  261.                        
  262.                         if(button and button:FindFirstChild("label") and button.label.Text:gsub("%s", ""):lower():sub(1, #Entry) == Entry) then
  263.                             v.Visible = true;
  264.                             find = true;
  265.                         end;
  266.                        
  267.                         if(not find) then
  268.                             v.Visible = false;
  269.                         end;
  270.                     end;
  271.                 end;
  272.             elseif library.currentSection then
  273.                 for i,v in next, library.currentSection:GetChildren() do
  274.                     if(not v:IsA("UIPadding") and not v:IsA("UIListLayout")) then
  275.                         v.Visible = true;
  276.                     end;
  277.                 end;
  278.             end;
  279.            
  280.             library.currentSectionObject:Update();
  281.         end);
  282.        
  283.         library:Dragger(main.bar.bottom, main);
  284.         function library:Ready()
  285.             gui.Enabled = true;
  286.         end;
  287.        
  288.         function library:CreateSection(name)
  289.             local topContainer = gui.main.bar.bottom.topcontainer;
  290.            
  291.             local sectionSelector = library:Create("ImageButton", {
  292.                 Parent = topContainer;
  293.                 BackgroundTransparency = 1;
  294.                 Size = UDim2.new(0, 60, 1, 0);
  295.                 Image = "rbxassetid://4641155773";
  296.                 ImageColor3 = Color3.fromRGB(255, 255, 255);
  297.                 ScaleType = "Slice";
  298.                 SliceCenter = Rect.new(4, 4, 296, 296);
  299.                 SliceScale = 1;
  300.                 Name = "back";
  301.                 library:Create("UIGradient", {
  302.                     Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(102, 41, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(132, 41, 255))}
  303.                 });
  304.                 library:Create("TextLabel", {
  305.                     BackgroundTransparency = 1;
  306.                     Text = name;
  307.                     Size = UDim2.new(1, 0, 1, 0);
  308.                     TextColor3 = Color3.fromRGB(255, 255, 255);
  309.                 });
  310.             });
  311.            
  312.             local boxContainer = library:Create("ScrollingFrame", {
  313.                 Name = "box";
  314.                 BorderSizePixel = 0;
  315.                 BackgroundColor3 = Color3.fromRGB(34, 34, 34);
  316.                 Parent = main.border;
  317.                 Position = UDim2.new(0, 1, 0, 1);
  318.                 Size = UDim2.new(1, -2, 1, -2);
  319.                 BottomImage = "rbxasset://textures/ui/Scroll/scroll-middle.png";
  320.                 TopImage = "rbxasset://textures/ui/Scroll/scroll-middle.png";
  321.                 ScrollBarThickness = 4;
  322.                 CanvasSize = UDim2.new(0, 0, 0, 0);
  323.                 library:Create("UIPadding", {
  324.                     PaddingTop = UDim.new(0, 2);
  325.                     PaddingLeft = UDim.new(0, 2);
  326.                 });
  327.                 library:Create("UIListLayout", {
  328.                     Padding = UDim.new(0, 5);
  329.                     FillDirection = "Vertical";
  330.                     HorizontalAlignment = "Left";
  331.                     VerticalAlignment = "Top";
  332.                 });
  333.             });
  334.            
  335.             local section = {};
  336.            
  337.             boxContainer.ChildAdded:Connect(function(Obj)
  338.                 section:Update();
  339.             end);
  340.            
  341.             if(not library.currentSection) then
  342.                 library.currentSectionSelector = sectionSelector;
  343.                 library.currentSection = boxContainer;
  344.                 library.currentSectionObject = section;
  345.                
  346.                 library.currentSectionSelector.ImageColor3 = Color3.fromRGB(150, 150, 150);
  347.                 boxContainer.Visible = true;
  348.             else
  349.                 boxContainer.Visible = false;
  350.             end;
  351.            
  352.             sectionSelector.MouseButton1Click:Connect(function()
  353.                 if(library.currentSection) then
  354.                     library.currentSectionSelector.ImageColor3 = Color3.fromRGB(255, 255, 255);
  355.                     library.currentSection.Visible = false;
  356.                 end;
  357.                
  358.                 sectionSelector.ImageColor3 = Color3.fromRGB(150, 150, 150);
  359.                 boxContainer.Visible = true;
  360.                 library.currentSectionSelector = sectionSelector;
  361.                 library.currentSection = boxContainer;
  362.             end);
  363.            
  364.             function section:Update()
  365.                 local CanvasSize = UDim2.new(0, 0, 0, 85)
  366.                 for i,v in next, boxContainer:GetChildren() do
  367.                     if(not v:IsA("UIListLayout") and not v:IsA("UIPadding") and v.Visible) then
  368.                         CanvasSize = CanvasSize + UDim2.new(0, 0, 0, v.AbsoluteSize.Y + 5);
  369.                     end;
  370.                 end;
  371.                
  372.                 library:Tween(boxContainer, {time = 0.1, CanvasSize = CanvasSize});
  373.             end;
  374.            
  375.             function section:Label(labelName)
  376.                 local holder = library:Create("Frame", {
  377.                     Name = "holder";
  378.                     Parent = boxContainer;
  379.                     BackgroundColor3 = Color3.fromRGB(25, 25, 25);
  380.                     BorderSizePixel = 0;
  381.                     Position = UDim2.new(0, 0, 0, 350);
  382.                     Size = UDim2.new(1, 0, 0, 18);
  383.                     library:Create("TextLabel", {
  384.                         Name = "label";
  385.                         BackgroundTransparency = 1.000;
  386.                         Size = UDim2.new(1, 0, 1, 0);
  387.                         Font = "Gotham";
  388.                         Text = labelName;
  389.                         TextColor3 = Color3.fromRGB(255, 255, 255);
  390.                         TextSize = 12.000;
  391.                     });
  392.                 });
  393.             end;
  394.            
  395.             function section:Toggle(toggleName, callback)
  396.                 local callback = callback or function() end;
  397.                 local toggle = false;
  398.                
  399.                 library.flags[toggleName] = toggle;
  400.                
  401.                 local holder = library:Create("Frame", {
  402.                     BackgroundTransparency = 1;
  403.                     Parent = boxContainer;
  404.                     Size = UDim2.new(1, -20, 0, 18);
  405.                     Name = "holder";
  406.                     library:Create("TextLabel", {
  407.                         Name = "label";
  408.                         BackgroundTransparency = 1;
  409.                         TextColor3 = Color3.fromRGB(255, 255, 255);
  410.                         Position = UDim2.new(0, 22, 0, 0);
  411.                         Size = UDim2.new(1, -22, 1, 0);
  412.                         Font = "Gotham";
  413.                         TextXAlignment = "Left";
  414.                         TextSize = 12;
  415.                         Text = toggleName;
  416.                     });
  417.                     library:Create("TextButton", {
  418.                         Name = "toggle";
  419.                         AutoButtonColor = false;
  420.                         BackgroundColor3 = ui_Settings.toggleColor;
  421.                         BorderColor3 = ui_Settings.toggleBorderColor;
  422.                         BorderSizePixel = 1;
  423.                         Size = UDim2.new(0, 16, 0, 16);
  424.                         Text = "";
  425.                         library:Create("Frame", {
  426.                             BackgroundColor3 = Color3.fromRGB(255, 255, 255);
  427.                             Size = toggle and UDim2.new(1, 0, 1, 0) or UDim2.new(0, 0, 0, 0);
  428.                             Name = "fill";
  429.                             BorderSizePixel = 0;
  430.                             library:Create("UIGradient", {
  431.                                 Color = ui_Settings.gradientColorSection;
  432.                                 Rotation = 45;
  433.                             });
  434.                         });
  435.                         library:Create("UIListLayout", {
  436.                             FillDirection = "Vertical";
  437.                             HorizontalAlignment = "Center";
  438.                             VerticalAlignment = "Center";
  439.                         });
  440.                         library:Create("UIPadding", {
  441.                             PaddingBottom = UDim.new(0, 1);
  442.                             PaddingTop = UDim.new(0, 1);
  443.                             PaddingLeft = UDim.new(0, 1);
  444.                             PaddingRight = UDim.new(0, 1);
  445.                         });
  446.                     });
  447.                 });
  448.                
  449.                 local function onClick()
  450.                     toggle = not toggle;
  451.                     library:Tween(holder.toggle.fill, {time = 0.1, Size = toggle and UDim2.new(1, 0, 1, 0) or UDim2.new(0, 0, 0, 0)});
  452.                     library.flags[toggleName] = toggle;
  453.                     callback(toggle);
  454.                 end;
  455.                
  456.                 holder.toggle.MouseButton1Click:Connect(onClick);
  457.                 return holder;
  458.             end;
  459.            
  460.             function section:Box(boxName, callback)
  461.                 local holder = library:Create("Frame", {
  462.                     Size = UDim2.new(1, -20, 0, 18);
  463.                     BackgroundTransparency = 1;
  464.                     Name = "holder";
  465.                     Parent = boxContainer;
  466.                     library:Create("TextLabel", {
  467.                         BackgroundTransparency = 1;
  468.                         Name = "label";
  469.                         TextColor3 = Color3.fromRGB(255, 255, 255);
  470.                         Text = boxName;
  471.                         TextSize = 12;
  472.                         Font = "Gotham";
  473.                         Size = UDim2.new(1, 0, 1, 0);
  474.                         TextXAlignment = "Left";
  475.                     });
  476.                     library:Create("TextBox", {
  477.                         BackgroundColor3 = Color3.fromRGB(32, 32, 32);
  478.                         BorderColor3 = ui_Settings.boxBorderColor;
  479.                         BorderSizePixel = 1;
  480.                         Name = "textbox";
  481.                         TextSize = 14;
  482.                         Position = UDim2.new(1, -160, 0, 0);
  483.                         Size = UDim2.new(0, 160, 1, 0);
  484.                         PlaceholderColor3 = Color3.fromRGB(200, 200, 200);
  485.                         PlaceholderText = "Value";
  486.                         Text = "";
  487.                         TextColor3 = Color3.fromRGB(255, 255, 255);
  488.                         Font = "SourceSans";
  489.                     });
  490.                 });
  491.                
  492.                 holder.textbox.FocusLost:Connect(function(Enter)
  493.                     if(Enter) then
  494.                         library.flags[boxName] = holder.textbox.Text;
  495.                         callback(holder.textbox.Text);
  496.                     end;
  497.                 end);
  498.             end;
  499.            
  500.             function section:Slider(sliderName, properties, callback)
  501.                 local callback = callback or function() end;
  502.                 library.flags[sliderName] = properties.min;
  503.                
  504.                 local holder = library:Create("Frame", {
  505.                     Size = UDim2.new(1, -20, 0, 36);
  506.                     BackgroundTransparency = 1;
  507.                     Name = "holder";
  508.                     Parent = boxContainer;
  509.                     library:Create("TextLabel", {
  510.                         Name = "label";
  511.                         BackgroundColor3 = Color3.fromRGB(255, 255, 255);
  512.                         BackgroundTransparency = 1.000;
  513.                         Size = UDim2.new(1, 0, 0, 17);
  514.                         Font = "Gotham";
  515.                         Text = sliderName;
  516.                         TextColor3 = Color3.fromRGB(255, 255, 255);
  517.                         TextSize = 12.000;
  518.                         TextXAlignment = "Left";
  519.                     });
  520.                     library:Create("TextButton", {
  521.                         Name = "slider";
  522.                         BackgroundColor3 = Color3.fromRGB(34, 34, 34);
  523.                         BorderColor3 = Color3.fromRGB(102, 41, 255);
  524.                         Position = UDim2.new(0, 0, 1, -19);
  525.                         Size = UDim2.new(1, 0, 0, 16);
  526.                         AutoButtonColor = false;
  527.                         Font = "SourceSans";
  528.                         Text = "";
  529.                         TextColor3 = Color3.fromRGB(0, 0, 0);
  530.                         TextSize = 14.000;
  531.                         library:Create("TextLabel", {
  532.                             Name = "value";
  533.                             BackgroundTransparency = 1;
  534.                             Size = UDim2.new(1, 0, 1, 0);
  535.                             Font = "SourceSans";
  536.                             Text = properties.default and tostring(properties.default) or tostring(properties.min);
  537.                             TextColor3 = Color3.fromRGB(255, 255, 255);
  538.                             TextSize = 14.000;
  539.                             ZIndex = 2;
  540.                         });
  541.                         library:Create("Frame", {
  542.                             BackgroundColor3 = Color3.fromRGB(255, 255, 255);
  543.                             Position = UDim2.new(0, 1, 0, 1);
  544.                             Name = "fill";
  545.                             Size = UDim2.new(0, 0, 1, -2);
  546.                             BorderSizePixel = 0;
  547.                             library:Create("UIGradient", {
  548.                                 Color = ui_Settings.gradientColorSection;
  549.                                 Rotation = 90;
  550.                             });
  551.                         });
  552.                     });
  553.                 });
  554.                
  555.                 local Connection;
  556.                 UserInputService.InputEnded:Connect(function(input)
  557.                     if input.UserInputType == Enum.UserInputType.MouseButton1 then
  558.                         if(Connection) then
  559.                             Connection:Disconnect();
  560.                             Connection = nil;
  561.                         end;
  562.                     end;
  563.                 end);
  564.                
  565.                 holder.slider.MouseButton1Down:Connect(function()
  566.                     if(Connection) then
  567.                         Connection:Disconnect();
  568.                     end;
  569.                    
  570.                     Connection = RunService.Heartbeat:Connect(function()
  571.                         local mouse = UserInputService:GetMouseLocation();
  572.                         local percent = math.clamp((mouse.X - holder.slider.AbsolutePosition.X) / (holder.slider.AbsoluteSize.X), 0, 1);
  573.                         local Value = properties.min + (properties.max - properties.min) * percent;
  574.                        
  575.                         if not properties.precise then
  576.                             Value = math.floor(Value);
  577.                         end;
  578.                        
  579.                         Value = tonumber(string.format("%.2f", Value));
  580.                        
  581.                         library:Tween(holder.slider.fill, {time = 0.1, Size = UDim2.new(percent, 0, 1, -2)})
  582.                         holder.slider.value.Text = tostring(Value);
  583.                         library.flags[sliderName] = Value;
  584.                        
  585.                         callback(Value);
  586.                     end);
  587.                 end);
  588.             end;
  589.            
  590.             function section:Bind(bindName, defaultKey, callback)
  591.                 local callback = callback or function() end;
  592.                 local input = defaultKey and tostring(defaultKey):gsub("Enum.", ""):gsub("UserInputType.", ""):gsub("KeyCode.", "") or "None";
  593.                 library.callbacks[bindName] = callback;
  594.                 library.flags[bindName] = defaultKey;
  595.                
  596.                 local holder = library:Create("Frame", {
  597.                     Name = "holder";
  598.                     Parent = boxContainer;
  599.                     BackgroundColor3 = Color3.fromRGB(255, 255, 255);
  600.                     BackgroundTransparency = 1.000;
  601.                     LayoutOrder = 2;
  602.                     Position = UDim2.new(0, 10, 0, 76);
  603.                     Size = UDim2.new(1, -20, 0, 18);
  604.                     library:Create("TextLabel", {
  605.                         Name = "label";
  606.                         BackgroundColor3 = Color3.fromRGB(255, 255, 255);
  607.                         BackgroundTransparency = 1.000;
  608.                         Size = UDim2.new(1, 0, 1, 0);
  609.                         Font = "Gotham";
  610.                         Text = bindName;
  611.                         TextColor3 = Color3.fromRGB(255, 255, 255);
  612.                         TextSize = 12.000;
  613.                         TextXAlignment = "Left";
  614.                     });
  615.                     library:Create("TextButton", {
  616.                         Name = "keybind";
  617.                         BackgroundColor3 = Color3.fromRGB(34, 34, 34);
  618.                         BorderColor3 = Color3.fromRGB(102, 41, 255);
  619.                         ClipsDescendants = true;
  620.                         Position = UDim2.new(1, -80, 0, 0);
  621.                         Size = UDim2.new(0, 80, 1, 0);
  622.                         AutoButtonColor = false;
  623.                         Font = Enum.Font.SourceSans;
  624.                         Text = input;
  625.                         TextColor3 = Color3.fromRGB(255, 255, 255);
  626.                         TextSize = 14.000;
  627.                     });
  628.                 });
  629.                
  630.                 local whitelistedType = {
  631.                     [Enum.KeyCode.LeftShift] = "L-Shift",
  632.                     [Enum.KeyCode.RightShift] = "R-Shift",
  633.                     [Enum.KeyCode.LeftControl] = "L-Ctrl",
  634.                     [Enum.KeyCode.RightControl] = "R-Ctrl",
  635.                     [Enum.KeyCode.LeftAlt] = "L-Alt",
  636.                     [Enum.KeyCode.RightAlt] = "R-Alt",
  637.                     [Enum.KeyCode.CapsLock] = "CAPS",
  638.                     [Enum.KeyCode.One] = "1",
  639.                     [Enum.KeyCode.Two] = "2",
  640.                     [Enum.KeyCode.Three] = "3",
  641.                     [Enum.KeyCode.Four] = "4",
  642.                     [Enum.KeyCode.Five] = "5",
  643.                     [Enum.KeyCode.Six] = "6",
  644.                     [Enum.KeyCode.Seven] = "7",
  645.                     [Enum.KeyCode.Eight] = "8",
  646.                     [Enum.KeyCode.Nine] = "9",
  647.                     [Enum.KeyCode.Zero] = "0",
  648.                     [Enum.KeyCode.KeypadOne] = "Num-1",
  649.                     [Enum.KeyCode.KeypadTwo] = "Num-2",
  650.                     [Enum.KeyCode.KeypadThree] = "Num-3",
  651.                     [Enum.KeyCode.KeypadFour] = "Num-4",
  652.                     [Enum.KeyCode.KeypadFive] = "Num-5",
  653.                     [Enum.KeyCode.KeypadSix] = "Num-6",
  654.                     [Enum.KeyCode.KeypadSeven] = "Num-7",
  655.                     [Enum.KeyCode.KeypadEight] = "Num-8",
  656.                     [Enum.KeyCode.KeypadNine] = "Num-9",
  657.                     [Enum.KeyCode.KeypadZero] = "Num-0",
  658.                     [Enum.KeyCode.Minus] = "-",
  659.                     [Enum.KeyCode.Equals] = "=",
  660.                     [Enum.KeyCode.Tilde] = "~",
  661.                     [Enum.KeyCode.LeftBracket] = "[",
  662.                     [Enum.KeyCode.RightBracket] = "]",
  663.                     [Enum.KeyCode.RightParenthesis] = ")",
  664.                     [Enum.KeyCode.LeftParenthesis] = "(",
  665.                     [Enum.KeyCode.Semicolon] = ";",
  666.                     [Enum.KeyCode.Quote] = "'",
  667.                     [Enum.KeyCode.BackSlash] = "\\",
  668.                     [Enum.KeyCode.Comma] = ",",
  669.                     [Enum.KeyCode.Period] = ".",
  670.                     [Enum.KeyCode.Slash] = "/",
  671.                     [Enum.KeyCode.Asterisk] = "*",
  672.                     [Enum.KeyCode.Plus] = "+",
  673.                     [Enum.KeyCode.Period] = ".",
  674.                     [Enum.KeyCode.Backquote] = "`",
  675.                     [Enum.UserInputType.MouseButton1] = "Button-1",
  676.                     [Enum.UserInputType.MouseButton2] = "Button-2",
  677.                     [Enum.UserInputType.MouseButton3] = "Button-3",
  678.                 };
  679.                
  680.                 holder.keybind.MouseButton1Click:Connect(function()
  681.                     holder.keybind.Text = ". . .";
  682.                     local connection;
  683.                     connection = UserInputService.InputBegan:Connect(function(input)
  684.                         connection:Disconnect();
  685.                         wait();
  686.                        
  687.                         local KeyCodeName = whitelistedType[input.KeyCode] or whitelistedType[input.UserInputType];
  688.                        
  689.                         holder.keybind.Text = KeyCodeName or tostring(input.KeyCode):gsub("Enum.KeyCode.", "");
  690.                         if(input.UserInputType == Enum.UserInputType.Keyboard) then
  691.                             library.flags[bindName] = input.KeyCode;
  692.                         else
  693.                             library.flags[bindName] = input.UserInputType;
  694.                         end;
  695.                     end);
  696.                 end);
  697.             end;
  698.            
  699.             function section:Button(buttonName, callback)
  700.                 local callback = callback or function() end;
  701.                 local holder = library:Create("Frame", {
  702.                     Name = "holder";
  703.                     Parent = boxContainer;
  704.                     BackgroundTransparency = 1.000;
  705.                     Position = UDim2.new(0, 10, 0, 148);
  706.                     Size = UDim2.new(1, -20, 0, 18);
  707.                     library:Create("TextButton", {
  708.                         BackgroundColor3 = Color3.fromRGB(255, 255, 255);
  709.                         Size = UDim2.new(1, 0, 1, 0);
  710.                         BorderSizePixel = 0;
  711.                         TextColor3 = Color3.fromRGB(255, 255, 255);
  712.                         Text = "";
  713.                         Name = "button";
  714.                         AutoButtonColor = false;
  715.                         library:Create("TextLabel", {
  716.                             Name = "label";
  717.                             BackgroundTransparency = 1;
  718.                             Size = UDim2.new(1, 0, 1, 0);
  719.                             Font = "SourceSans";
  720.                             TextSize = 14;
  721.                             TextColor3 = Color3.fromRGB(255, 255, 255);
  722.                             Text = buttonName;
  723.                         });
  724.                         library:Create("UIGradient", {
  725.                             Rotation = 90;
  726.                             Color = ui_Settings.gradientColorSection;
  727.                         });
  728.                     });
  729.                 });
  730.                
  731.                 holder.button.MouseButton1Click:Connect(callback);
  732.             end;
  733.            
  734.             function section:Dropdown(name, list, callback)
  735.                 local callback = callback or function() end;
  736.                 local toggle = false;
  737.                
  738.                 local holder = library:Create("Frame", {
  739.                     Name = "holder";
  740.                     BackgroundTransparency = 1.000;
  741.                     LayoutOrder = 3;
  742.                     Position = UDim2.new(0, 10, 0, 98);
  743.                     Size = UDim2.new(1, -20, 0, 36);
  744.                     Parent = boxContainer;
  745.                     library:Create("TextLabel", {
  746.                         Name = "label";
  747.                         BackgroundTransparency = 1.000;
  748.                         Size = UDim2.new(1, 0, 0, 18);
  749.                         Font = Enum.Font.Gotham;
  750.                         Text = name;
  751.                         TextColor3 = Color3.fromRGB(255, 255, 255);
  752.                         TextSize = 12.000;
  753.                         TextXAlignment = Enum.TextXAlignment.Left;
  754.                     });
  755.                     library:Create("TextButton", {
  756.                         Name = "dropdown";
  757.                         BackgroundColor3 = Color3.fromRGB(102, 41, 255);
  758.                         BorderColor3 = Color3.fromRGB(102, 41, 255);
  759.                         Size = UDim2.new(1, 0, 0, 18);
  760.                         AutoButtonColor = false;
  761.                         Font = "SourceSans";
  762.                         Text = "";
  763.                         TextColor3 = Color3.fromRGB(0, 0, 0);
  764.                         TextSize = 14.000;
  765.                         Position = UDim2.new(0, 0, 0, 18);
  766.                         library:Create("ImageLabel", {
  767.                             Name = "icon";
  768.                             BackgroundTransparency = 1.000;
  769.                             Position = UDim2.new(1, -18, 0, 0);
  770.                             Size = UDim2.new(0, 18, 0, 16);
  771.                             Image = "http://www.roblox.com/asset/?id=4641587888";
  772.                             ZIndex = 2;
  773.                         });
  774.                         library:Create("TextLabel", {
  775.                             Name = "label";
  776.                             BackgroundTransparency = 1.000;
  777.                             Position = UDim2.new(0, 4, 0, 0);
  778.                             Size = UDim2.new(1, -4, 0, 18);
  779.                             Font = Enum.Font.Gotham;
  780.                             Text = "Drop value";
  781.                             TextColor3 = Color3.fromRGB(255, 255, 255);
  782.                             TextSize = 12.000;
  783.                             TextXAlignment = Enum.TextXAlignment.Left;
  784.                             ZIndex = 2;
  785.                         });
  786.                         library:Create("Frame", {
  787.                             Name = "dropframe";
  788.                             BackgroundColor3 = Color3.fromRGB(32, 32, 32);
  789.                             BorderColor3 = Color3.fromRGB(102, 41, 255);
  790.                             BorderSizePixel = 0;
  791.                             ClipsDescendants = true;
  792.                             Position = UDim2.new(0, -1, 1, 1);
  793.                             Size = UDim2.new(1, 2, 0, 0);
  794.                             library:Create("UIListLayout", {
  795.                                 SortOrder = "LayoutOrder";
  796.                                 Padding = UDim.new(0, 2);
  797.                             });
  798.                         });
  799.                         library:Create("Frame", {
  800.                             Name = "fill";
  801.                             BackgroundColor3 = Color3.fromRGB(255, 255, 255);
  802.                             BorderSizePixel = 0;
  803.                             Position = UDim2.new(0, 1, 0, 1);
  804.                             Size = UDim2.new(1, 0, 1, 0);
  805.                             library:Create("UIGradient", {
  806.                                 Rotation = 90;
  807.                                 Color = ui_Settings.gradientColorSection;
  808.                             });
  809.                         });
  810.                     });
  811.                 });
  812.                
  813.                 for i, v in next, list do
  814.                     local button = library:Create("TextButton", {
  815.                         Name = "button";
  816.                         Text = v;
  817.                         Parent = holder.dropdown.dropframe;
  818.                         BackgroundColor3 = Color3.fromRGB(32, 32, 32);
  819.                         BorderColor3 = Color3.fromRGB(255, 255, 255);
  820.                         BorderSizePixel = 0;
  821.                         Size = UDim2.new(1, 0, 0, 16);
  822.                         Font = "SourceSans";
  823.                         TextColor3 = Color3.fromRGB(255, 255, 255);
  824.                         TextSize = 14.000;
  825.                         ZIndex = 1;
  826.                     });
  827.                    
  828.                     button.MouseButton1Click:Connect(function()
  829.                         toggle = false;
  830.                         holder.dropdown.label.Text = v;
  831.                         library:Tween(holder.dropdown.icon, {time = 0.1, Rotation = 180});
  832.                         library:Tween(holder, {time = 0.1, Size = UDim2.new(1, -20, 0, 35)});
  833.                         library:Tween(holder.dropdown.dropframe, {time = 0.1, Size = UDim2.new(1, 2, 0, 0)}, self.Update);
  834.                         callback(button.Text);
  835.                     end);
  836.                 end;
  837.                
  838.                 holder.dropdown.MouseButton1Click:Connect(function()
  839.                     toggle = not toggle;
  840.                     local TotalY = 0;
  841.                     for i, v in next, holder.dropdown.dropframe:GetChildren() do
  842.                         if(v:IsA("TextButton")) then
  843.                             TotalY = TotalY + v.AbsoluteSize.Y + 2;
  844.                         end;
  845.                     end;
  846.                    
  847.                     if(toggle) then
  848.                         library:Tween(holder.dropdown.icon, {time = 0.1, Rotation = 0});
  849.                         library:Tween(holder, {time = 0.1, Size = UDim2.new(1, -20, 0, TotalY + 50)});
  850.                         library:Tween(holder.dropdown.dropframe, {time = 0.1, Size = UDim2.new(1, 2, 0, TotalY)}, self.Update);
  851.                     else
  852.                         library:Tween(holder.dropdown.icon, {time = 0.1, Rotation = 180});
  853.                         library:Tween(holder, {time = 0.1, Size = UDim2.new(1, -20, 0, 36)});
  854.                         library:Tween(holder.dropdown.dropframe, {time = 0.1, Size = UDim2.new(1, 2, 0, 0)}, self.Update);
  855.                     end;
  856.                 end);
  857.             end;
  858.            
  859.             function section:ColorPicker(pickerName, defaultColor, callback)
  860.                 local callback = callback or function() end;
  861.                 local defaultColor = defaultColor or Color3.fromRGB(102, 41, 255);
  862.                 local rainbowToggle = false;
  863.                 local Mouse = Players.LocalPlayer:GetMouse();
  864.                
  865.                 local holder = library:Create("Frame", {
  866.                     Name = "holder";
  867.                     Parent = boxContainer;
  868.                     BackgroundTransparency = 1.000;
  869.                     Position = UDim2.new(0, 10, 0, 172);
  870.                     Size = UDim2.new(1, -20, 0, 18);
  871.                     library:Create("TextLabel", {
  872.                         Name = "label";
  873.                         BackgroundTransparency = 1.000;
  874.                         Size = UDim2.new(1, 0, 1, 0);
  875.                         Font = "Gotham";
  876.                         Text = pickerName;
  877.                         TextColor3 = Color3.fromRGB(255, 255, 255);
  878.                         TextSize = 12.000;
  879.                         TextXAlignment = Enum.TextXAlignment.Left;
  880.                     });
  881.                     library:Create("TextButton", {
  882.                         Name = "colorpicker";
  883.                         BackgroundColor3 = Color3.fromRGB(34, 34, 34);
  884.                         BorderColor3 = Color3.fromRGB(102, 41, 255);
  885.                         Position = UDim2.new(1, -16, 0, 0);
  886.                         Size = UDim2.new(0, 16, 0, 16);
  887.                         AutoButtonColor = false;
  888.                         Font = Enum.Font.SourceSans;
  889.                         Text = "";
  890.                         TextColor3 = Color3.fromRGB(0, 0, 0);
  891.                         TextSize = 14.000;
  892.                         library:Create("Frame", {
  893.                             Name = "colorframe";
  894.                             BackgroundColor3 = Color3.fromRGB(32, 32, 32);
  895.                             BorderColor3 = Color3.fromRGB(102, 41, 255);
  896.                             Position = UDim2.new(0, -148, 1, 6);
  897.                             Size = UDim2.new(0, 144, 0, 139);
  898.                             Visible = false;
  899.                             ZIndex = 2;
  900.                             library:Create("ImageButton", {
  901.                                 Name = "satval";
  902.                                 Image = "http://www.roblox.com/asset/?id=4650897272";
  903.                                 BorderSizePixel = 0;
  904.                                 AutoButtonColor = false;
  905.                                 BackgroundColor3 = defaultColor;
  906.                                 Position = UDim2.new(0, 4, 0, 3);
  907.                                 Size = UDim2.new(0, 110, 0, 102);
  908.                                 ZIndex = 2;
  909.                                 library:Create("TextButton", {
  910.                                     Name = "picker";
  911.                                     BackgroundColor3 = Color3.fromRGB(53, 53, 53);
  912.                                     BackgroundTransparency = 0.500;
  913.                                     BorderSizePixel = 0;
  914.                                     Position = UDim2.new(0.5, 0, 0.5, 0);
  915.                                     Size = UDim2.new(0, 5, 0, 5);
  916.                                     ZIndex = 2;
  917.                                     Text = "";
  918.                                 });
  919.                             });
  920.                             library:Create("TextButton", {
  921.                                 Name = "rainbow";
  922.                                 ZIndex = 2;
  923.                                 BackgroundColor3 = Color3.fromRGB(255, 255, 255);
  924.                                 BorderColor3 = Color3.fromRGB(255, 255, 255);
  925.                                 ClipsDescendants = true;
  926.                                 Position = UDim2.new(0, 5, 1, -25);
  927.                                 Size = UDim2.new(0, 133, 0, 20);
  928.                                 AutoButtonColor = false;
  929.                                 Font = "SourceSans";
  930.                                 Text = "";
  931.                                 TextColor3 = Color3.fromRGB(255, 255, 255);
  932.                                 TextSize = 14.000;
  933.                                 library:Create("UIGradient", {
  934.                                     Color = ui_Settings.gradientColorSection;
  935.                                     Rotation = -90;
  936.                                 });
  937.                                 library:Create("TextLabel", {
  938.                                     Name = "label";
  939.                                     Parent = button;
  940.                                     BackgroundTransparency = 1.000;
  941.                                     Size = UDim2.new(1, 0, 1, 0);
  942.                                     Font = "SourceSans";
  943.                                     Text = "Rainbow: OFF";
  944.                                     TextColor3 = Color3.fromRGB(255, 255, 255);
  945.                                     TextSize = 14.000;
  946.                                     ZIndex = 2;
  947.                                 });
  948.                             });
  949.                             library:Create("ImageButton", {
  950.                                 Name = "hue";
  951.                                 AutoButtonColor = false;
  952.                                 ZIndex = 2;
  953.                                 Position = UDim2.new(0, 118, 0, 3);
  954.                                 Size = UDim2.new(0, 18, 0, 102);
  955.                                 Image = "http://www.roblox.com/asset/?id=4650897105";
  956.                                 library:Create("TextButton", {
  957.                                     Name = "selector";
  958.                                     BackgroundColor3 = Color3.fromRGB(53, 53, 53);
  959.                                     BorderSizePixel = 0;
  960.                                     Size = UDim2.new(1, 0, 0, 5);
  961.                                     Text = "";
  962.                                     ZIndex = 2;
  963.                                 });
  964.                             });
  965.                         });
  966.                         library:Create("Frame", {
  967.                             Name = "color";
  968.                             BackgroundColor3 = defaultColor;
  969.                             BorderSizePixel = 0;
  970.                             Position = UDim2.new(0, 1, 0, 1);
  971.                             Size = UDim2.new(0, 14, 0, 14);
  972.                         });
  973.                     });
  974.                 });
  975.                
  976.                
  977.                 local colorData = {
  978.                     H = 1;
  979.                     S = 1;
  980.                     V = 1;
  981.                 };
  982.                
  983.                 local Connection1;
  984.                 local Connection2;
  985.                
  986.                 local function getXY(frame)
  987.                     local x, y = Mouse.X - frame.AbsolutePosition.X, Mouse.Y - frame.AbsolutePosition.Y;
  988.                     local maxX, maxY = frame.AbsoluteSize.X,frame.AbsoluteSize.Y;
  989.                     x = math.clamp(x, 0, maxX);
  990.                     y = math.clamp(y, 0, maxY);
  991.                     return x / maxX, y / maxY;
  992.                 end;
  993.                
  994.                 local function Update()
  995.                     local Color = Color3.fromHSV(colorData.H, colorData.S, colorData.V);
  996.                     holder.colorpicker.color.BackgroundColor3 = Color;
  997.                     holder.colorpicker.colorframe.satval.BackgroundColor3 = Color3.fromHSV(colorData.H, 1, 1);
  998.                     callback(Color);
  999.                 end;
  1000.                
  1001.                 holder.colorpicker.MouseButton1Click:Connect(function()
  1002.                     toggle = not toggle;
  1003.                     holder.colorpicker.colorframe.Visible = toggle;
  1004.                 end);
  1005.                
  1006.                 UserInputService.InputEnded:Connect(function(i)
  1007.                     if i.UserInputType == Enum.UserInputType.MouseButton1 then
  1008.                         if(Connection1) then
  1009.                             Connection1:Disconnect();
  1010.                             Connection1 = nil;
  1011.                         end;
  1012.                         if(Connection2) then
  1013.                             Connection2:Disconnect();
  1014.                             Connection2 = nil;
  1015.                         end;
  1016.                         isFocused = false;
  1017.                     end;
  1018.                 end);
  1019.                
  1020.                 holder.colorpicker.colorframe.rainbow.MouseButton1Click:Connect(function()
  1021.                     rainbowToggle = not rainbowToggle;
  1022.                     holder.colorpicker.colorframe.rainbow.label.Text = rainbowToggle and "Rainbow: ON" or "Rainbow: OFF";
  1023.                    
  1024.                     if(rainbowToggle) then
  1025.                         repeat
  1026.                             library:Tween(holder.colorpicker.colorframe.hue.selector, {time = 0.1, Position = UDim2.new(0, 0, library.rainbowI, 0)});
  1027.                             holder.colorpicker.colorframe.satval.BackgroundColor3 = Color3.fromHSV(1 - library.rainbowI, 1, 1);
  1028.                             holder.colorpicker.color.BackgroundColor3 = library.rainbowVal;
  1029.                             callback(library.rainbowVal);
  1030.                             RunService.Heartbeat:Wait();
  1031.                         until not rainbowToggle;
  1032.                     end;
  1033.                 end);
  1034.                
  1035.                 holder.colorpicker.colorframe.satval.InputBegan:Connect(function(i)
  1036.                     if i.UserInputType == Enum.UserInputType.MouseButton1 then
  1037.                         if(Connection1) then
  1038.                             Connection1:Disconnect();
  1039.                         end;
  1040.                         Connection1 = RunService.Heartbeat:Connect(function()
  1041.                             local X, Y = getXY(holder.colorpicker.colorframe.satval);
  1042.                            
  1043.                             holder.colorpicker.colorframe.satval.picker.Position = UDim2.new(X, 0, Y, 0);
  1044.                             colorData.S = X;
  1045.                             colorData.V = 1 - Y;
  1046.                             Update();
  1047.                         end);
  1048.                     end;
  1049.                 end);
  1050.                
  1051.                 holder.colorpicker.colorframe.hue.InputBegan:Connect(function(i)
  1052.                     if i.UserInputType == Enum.UserInputType.MouseButton1 then
  1053.                         if(Connection2) then
  1054.                             Connection2:Disconnect();
  1055.                         end;
  1056.                        
  1057.                         Connection2 = RunService.Heartbeat:Connect(function()
  1058.                             local X, Y = getXY(holder.colorpicker.colorframe.hue);
  1059.                            
  1060.                             colorData.H = 1 - Y;
  1061.                             holder.colorpicker.colorframe.hue.selector.Position = UDim2.new(0, 0, Y, 0);
  1062.                             Update();
  1063.                         end);
  1064.                     end;
  1065.                 end);
  1066.             end;
  1067.            
  1068.             return section;
  1069.         end;
  1070.     end;
  1071.    
  1072.     return library;
  1073. end;
  1074.  
  1075. return initLibrary();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement