SkeletalScripts

Aquamarine

Apr 16th, 2020
386
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 34.25 KB | None | 0 0
  1. local Lib = {}
  2. if game.Players.LocalPlayer.PlayerGui:FindFirstChild("Aquamarine") ~= nil then
  3.     game.Players.LocalPlayer.PlayerGui.Aquamarine:Destroy()
  4. end
  5. local ScreenGui = Instance.new("ScreenGui")
  6. ScreenGui.Parent = game.Players.LocalPlayer.PlayerGui
  7. ScreenGui.ResetOnSpawn = false
  8. ScreenGui.Name = "Aquamarine"
  9.  
  10. function Lib:CreateWindow(name)
  11.     local pos = 0.1
  12.     wait(0.6)
  13.     if ScreenGui:FindFirstChild("Frame") then
  14.         for i,v in pairs(ScreenGui:GetChildren()) do
  15.             if v.Name == "Frame" then
  16.                 pos = v.Position.X.Scale + 0.15
  17.             end
  18.         end
  19.     end
  20.     local Frame = Instance.new("ImageButton")
  21.    
  22.     local Win = {}
  23.     local Sides = Instance.new("ImageLabel")
  24.     local Sides_2 = Instance.new("ImageLabel")
  25.     local Sides_3 = Instance.new("ImageLabel")
  26.     local Sides_4 = Instance.new("ImageLabel")
  27.     local TextLabel = Instance.new("TextLabel")
  28.     local Container = Instance.new("ImageLabel")
  29.     local UIGradient = Instance.new("UIGradient")
  30.     local Frame_2 = Instance.new("Frame")
  31.     local Spacer = Instance.new("TextLabel")
  32.     local UIListLayout = Instance.new("UIListLayout")
  33.    
  34.     Frame.Name = "Frame"
  35.     Frame.Parent = ScreenGui
  36.     Frame.Active = false
  37.     Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  38.     Frame.BackgroundTransparency = 1.000
  39.     Frame.Position = UDim2.new(pos,0, 0.0500000007, 0)
  40.     Frame.Selectable = false
  41.     Frame.Size = UDim2.new(0, 175, 0, 35)
  42.     Frame.ZIndex = 2
  43.     Frame.Image = "rbxassetid://3570695787"
  44.     Frame.ImageColor3 = Color3.fromRGB(45, 45, 45)
  45.     Frame.ScaleType = Enum.ScaleType.Slice
  46.     Frame.SliceCenter = Rect.new(100, 100, 100, 100)
  47.     Frame.SliceScale = 0.040
  48.     local dragger = {}; do
  49.             local mouse        = game:GetService("Players").LocalPlayer:GetMouse();
  50.             local inputService = game:GetService('UserInputService');
  51.             local heartbeat    = game:GetService("RunService").Heartbeat;
  52.             -- // credits to Ririchi / Inori for this cute drag function :)
  53.             function dragger.new(frame)
  54.                 local s, event = pcall(function()
  55.                     return frame.MouseEnter
  56.                 end)
  57.        
  58.                 if s then
  59.                     frame.Active = true;
  60.                     event:connect(function()
  61.                         local input = frame.InputBegan:connect(function(key)
  62.                             if key.UserInputType == Enum.UserInputType.MouseButton1 then
  63.                                 local objectPosition = Vector2.new(mouse.X - frame.AbsolutePosition.X, mouse.Y - frame.AbsolutePosition.Y);
  64.                                 while heartbeat:wait() and inputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) do
  65.                                     pcall(function()
  66.                                         frame:TweenPosition(UDim2.new(0, mouse.X - objectPosition.X + (frame.Size.X.Offset * frame.AnchorPoint.X), 0, mouse.Y - objectPosition.Y + (frame.Size.Y.Offset * frame.AnchorPoint.Y)), 'Out', 'Linear', 0.1, true);
  67.                                     end)
  68.                                 end
  69.                             end
  70.                         end)
  71.        
  72.                         local leave;
  73.                         leave = frame.MouseLeave:connect(function()
  74.                             input:disconnect();
  75.                             leave:disconnect();
  76.                         end)
  77.                     end)
  78.                 end
  79.             end
  80.         end
  81. dragger.new(Frame)
  82.     Sides.Name = "Sides"
  83.     Sides.Parent = Frame
  84.     Sides.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  85.     Sides.BackgroundTransparency = 1.000
  86.     Sides.Position = UDim2.new(0.0250000004, 0, 0.100000001, 0)
  87.     Sides.Size = UDim2.new(0, 4, 0.850000024, 0)
  88.     Sides.ZIndex = 3
  89.     Sides.Image = "rbxassetid://3570695787"
  90.     Sides.ImageColor3 = Color3.fromRGB(108, 255, 251)
  91.     Sides.ScaleType = Enum.ScaleType.Slice
  92.     Sides.SliceCenter = Rect.new(100, 100, 100, 100)
  93.     Sides.SliceScale = 0.040
  94.    
  95.     Sides_2.Name = "Sides"
  96.     Sides_2.Parent = Frame
  97.     Sides_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  98.     Sides_2.BackgroundTransparency = 1.000
  99.     Sides_2.Position = UDim2.new(0.942142844, 0, 0.100000001, 0)
  100.     Sides_2.Size = UDim2.new(0, 4, 0.850000024, 0)
  101.     Sides_2.ZIndex = 3
  102.     Sides_2.Image = "rbxassetid://3570695787"
  103.     Sides_2.ImageColor3 = Color3.fromRGB(108, 255, 251)
  104.     Sides_2.ScaleType = Enum.ScaleType.Slice
  105.     Sides_2.SliceCenter = Rect.new(100, 100, 100, 100)
  106.     Sides_2.SliceScale = 0.040
  107.    
  108.     Sides_3.Name = "Sides"
  109.     Sides_3.Parent = Container
  110.     Sides_3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  111.     Sides_3.BackgroundTransparency = 1.000
  112.     Sides_3.Position = UDim2.new(0.938293695, 0, -0.00683389604, 0)
  113.     Sides_3.Size = UDim2.new(0, 4, 1, 0)
  114.     Sides_3.Image = "rbxassetid://3570695787"
  115.     Sides_3.ImageColor3 = Color3.fromRGB(0, 183, 255)
  116.     Sides_3.ScaleType = Enum.ScaleType.Slice
  117.     Sides_3.SliceCenter = Rect.new(100, 100, 100, 100)
  118.     Sides_3.SliceScale = 0.040
  119.    
  120.     Sides_4.Name = "Sides"
  121.     Sides_4.Parent = Container
  122.     Sides_4.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  123.     Sides_4.BackgroundTransparency = 1.000
  124.     Sides_4.Position = UDim2.new(0.0250000022, 0, -0.00793279335, 0)
  125.     Sides_4.Size = UDim2.new(0, 4, 1, 0)
  126.     Sides_4.Image = "rbxassetid://3570695787"
  127.     Sides_4.ImageColor3 = Color3.fromRGB(0, 183, 255)
  128.     Sides_4.ScaleType = Enum.ScaleType.Slice
  129.     Sides_4.SliceCenter = Rect.new(100, 100, 100, 100)
  130.     Sides_4.SliceScale = 0.040
  131.  
  132.     TextLabel.Parent = Frame
  133.     TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  134.     TextLabel.BackgroundTransparency = 1.000
  135.     TextLabel.Position = UDim2.new(0, 0, 0.200000003, 0)
  136.     TextLabel.Size = UDim2.new(1, 0, 0.600000024, 0)
  137.     TextLabel.ZIndex = 3
  138.     TextLabel.Font = Enum.Font.GothamBlack
  139.     TextLabel.Text = name
  140.     TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  141.     TextLabel.TextScaled = true
  142.     TextLabel.TextSize = 14.000
  143.     TextLabel.TextWrapped = true
  144.    
  145.     Container.Name = "Container"
  146.     Container.Parent = Frame
  147.     Container.BackgroundColor3 = Color3.fromRGB(0, 0, 255)
  148.     Container.BackgroundTransparency = 1.000
  149.     Container.BorderColor3 = Color3.fromRGB(0, 0, 255)
  150.     Container.BorderSizePixel = 100
  151.     Container.ClipsDescendants = true
  152.     Container.Position = UDim2.new(-8.71930794e-08, 0, 0.792857707, 0)
  153.     Container.Size = UDim2.new(0.99999994, 0, 0, 14)
  154.     Container.Image = "rbxassetid://3570695787"
  155.     Container.ImageColor3 = Color3.fromRGB(45, 45, 45)
  156.     Container.ScaleType = Enum.ScaleType.Slice
  157.     Container.SliceCenter = Rect.new(100, 100, 100, 100)
  158.     Container.SliceScale = 0.040
  159.    
  160.     UIGradient.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(45, 45, 45)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(0, 183, 255))}
  161.     UIGradient.Rotation = 90
  162.     UIGradient.Transparency = NumberSequence.new{NumberSequenceKeypoint.new(0.00, 0.10), NumberSequenceKeypoint.new(1.00, 0.10)}
  163.     UIGradient.Parent = Container
  164.    
  165.     Frame_2.Parent = Container
  166.     Frame_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  167.     Frame_2.BackgroundTransparency = 1.000
  168.     Frame_2.Position = UDim2.new(0.0878572389, 0, 0.0408163257, 0)
  169.     Frame_2.Size = UDim2.new(0, 144, 1, 0)
  170.    
  171.     UIListLayout.Parent = Frame_2
  172.     UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  173.     UIListLayout.Padding = UDim.new(0, 5)
  174.    
  175.     Spacer.Name = "Spacer"
  176.     Spacer.Parent = Frame_2
  177.     Spacer.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  178.     Spacer.BackgroundTransparency = 1.000
  179.     Spacer.BorderSizePixel = 0
  180.     Spacer.Size = UDim2.new(1, 0, 0, 4)
  181.     Spacer.Font = Enum.Font.SourceSans
  182.     Spacer.Text = " "
  183.     Spacer.TextColor3 = Color3.fromRGB(0, 0, 0)
  184.     Spacer.TextScaled = true
  185.     Spacer.TextSize = 14.000
  186.     Spacer.TextWrapped = true
  187.     local to = 1
  188.     local si = Container.Size
  189.     Frame.MouseButton2Click:Connect(function()
  190.         if to == 0 then
  191.             to = 1
  192.             Container:TweenSize(si,"Out","Sine",0.4,true,nil)wait(0.4)
  193.         else
  194.             to = 0
  195.             Container:TweenSize(UDim2.new(1,0,0,0),"In","Sine",0.4,true,nil)wait(0.4)
  196.         end
  197.     end)
  198.     function Win:Button(name,callback)
  199.         callback = callback or function() end
  200.         Container.Size = Container.Size + UDim2.new(0,0,0,30)
  201.         Frame_2.Size = Frame_2.Size + UDim2.new(0,0,0,30)
  202.         local Button = Instance.new("TextButton")
  203.         local Sample = Instance.new("ImageLabel")
  204.         Button.Name = "Button"
  205.         Button.Text = ""..name
  206.         Button.TextScaled = true
  207.         Button.Parent = Frame_2
  208.         Button.BackgroundColor3 = Color3.fromRGB(20, 76, 100)
  209.         Button.BorderColor3 = Color3.fromRGB(0, 183, 255)
  210.         Button.BorderSizePixel = 0
  211.         Button.ClipsDescendants = true
  212.         Button.Size = UDim2.new(0, 144, 0, 20)
  213.         Button.Font = Enum.Font.ArialBold
  214.         Button.TextColor3 = Color3.fromRGB(255, 255, 255)
  215.         Button.TextSize = 20.000
  216.         Button.TextWrapped = true
  217.         Button.TextYAlignment = Enum.TextYAlignment.Top
  218.        
  219.         Sample.Name = "Sample"
  220.         Sample.Parent = game.StarterGui.ScreenGui.Frame.Container.Frame.Button.MouseClickEffect
  221.         Sample.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  222.         Sample.BackgroundTransparency = 1.000
  223.         Sample.ZIndex = 7
  224.         Sample.Image = "http://www.roblox.com/asset/?id=4560909609"
  225.         Sample.ImageTransparency = 0.600
  226.  
  227.         Button.MouseButton1Click:Connect(function()
  228.            
  229.             local ms = game.Players.LocalPlayer:GetMouse()
  230.             local btn = Button
  231.             local sample = Sample
  232.                 local c = sample:Clone()
  233.                 c.Parent = btn
  234.                 local x, y = (ms.X - c.AbsolutePosition.X), (ms.Y - c.AbsolutePosition.Y)
  235.                 c.Position = UDim2.new(0, x, 0, y)
  236.                 local len, size = 0.35, nil
  237.                 if btn.AbsoluteSize.X >= btn.AbsoluteSize.Y then
  238.                     size = (btn.AbsoluteSize.X * 1.5)
  239.                 else
  240.                     size = (btn.AbsoluteSize.Y * 1.5)
  241.                 end
  242.                 c:TweenSizeAndPosition(UDim2.new(0, size, 0, size), UDim2.new(0.5, (-size / 2), 0.5, (-size / 2)), 'Out', 'Quad', len, true, nil)
  243.                 for i = 1, 10 do
  244.                     c.ImageTransparency = c.ImageTransparency + 0.05
  245.                     wait(len / 12)
  246.                 end
  247.                 c:Destroy()
  248.         end)
  249.            
  250.         Button.MouseButton1Click:Connect(callback)
  251.     end
  252.    
  253.     function Win:Toggle(name,callback)
  254.         callback = callback or function() end
  255.         Container.Size = Container.Size + UDim2.new(0,0,0,30)
  256.         Frame_2.Size = Frame_2.Size + UDim2.new(0,0,0,30)
  257.         local Toggle = Instance.new("TextLabel")
  258.         local TextButton = Instance.new("TextLabel")
  259.         local TextButton_2 = Instance.new("TextButton")
  260.         local Sample_2 = Instance.new("ImageLabel")
  261.        
  262.         Toggle.Name = "Toggle"
  263.         Toggle.Parent = Frame_2
  264.         Toggle.Active = true
  265.         Toggle.BackgroundColor3 = Color3.fromRGB(20, 76, 100)
  266.         Toggle.BorderSizePixel = 0
  267.         Toggle.Position = UDim2.new(0, 0, 0.1953125, 0)
  268.         Toggle.Selectable = true
  269.         Toggle.Size = UDim2.new(0, 84, 0, 20)
  270.         Toggle.Font = Enum.Font.ArialBold
  271.         Toggle.Text = " "..name
  272.         Toggle.TextScaled = true
  273.         Toggle.TextColor3 = Color3.fromRGB(255, 255, 255)
  274.         Toggle.TextSize = 20.000
  275.         Toggle.TextWrapped = true
  276.         Toggle.TextXAlignment = Enum.TextXAlignment.Left
  277.         Toggle.TextYAlignment = Enum.TextYAlignment.Top
  278.        
  279.         TextButton.Name = "TextButton"
  280.         TextButton.Parent = Toggle
  281.         TextButton.Active = true
  282.         TextButton.BackgroundColor3 = Color3.fromRGB(25, 96, 127)
  283.         TextButton.BorderColor3 = Color3.fromRGB(0, 183, 255)
  284.         TextButton.BorderSizePixel = 0
  285.         TextButton.Position = UDim2.new(0.989667416, 0, 0, 0)
  286.         TextButton.Selectable = true
  287.         TextButton.Size = UDim2.new(0, 60, 0, 20)
  288.         TextButton.Font = Enum.Font.SourceSans
  289.         TextButton.Text = " "
  290.         TextButton.TextColor3 = Color3.fromRGB(0, 183, 255)
  291.         TextButton.TextScaled = true
  292.         TextButton.TextSize = 14.000
  293.         TextButton.TextWrapped = true
  294.         TextButton.ClipsDescendants = true
  295.        
  296.         TextButton_2.Parent = TextButton
  297.         TextButton_2.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  298.         TextButton_2.BorderColor3 = Color3.fromRGB(0, 183, 255)
  299.         TextButton_2.BorderSizePixel = 0
  300.         TextButton_2.ClipsDescendants = true
  301.         TextButton_2.Position = UDim2.new(0, 0, 0, 0)
  302.         TextButton_2.Size = UDim2.new(0.5, 0, 1, 0)
  303.         TextButton_2.Font = Enum.Font.SourceSans
  304.         TextButton_2.Text = ""
  305.         TextButton_2.TextColor3 = Color3.fromRGB(0, 183, 255)
  306.         TextButton_2.TextSize = 1.000
  307.         TextButton_2.TextWrapped = true
  308.        
  309.         Sample_2.Name = "Sample"
  310.         Sample_2.Parent = TextButton_2
  311.         Sample_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  312.         Sample_2.BackgroundTransparency = 1.000
  313.         Sample_2.ZIndex = 7
  314.         Sample_2.Image = "http://www.roblox.com/asset/?id=4560909609"
  315.         Sample_2.ImageTransparency = 0.600
  316.         local tog = 0
  317.         TextButton_2.MouseButton1Click:Connect(function()
  318.             if tog == 0 then
  319.                 tog = 1
  320.                 callback()
  321.             else
  322.                 tog = 0
  323.             end
  324.         end)
  325.         TextButton_2.MouseButton1Click:Connect(function()
  326.             local ms = game.Players.LocalPlayer:GetMouse()
  327.             local btn = TextButton_2
  328.             local sample = Sample_2
  329.                 local c = sample:Clone()
  330.                 c.Parent = btn
  331.                 local x, y = (ms.X - c.AbsolutePosition.X), (ms.Y - c.AbsolutePosition.Y)
  332.                 c.Position = UDim2.new(0, x, 0, y)
  333.                 local len, size = 0.35, nil
  334.                 if btn.AbsoluteSize.X >= btn.AbsoluteSize.Y then
  335.                     size = (btn.AbsoluteSize.X * 1.5)
  336.                 else
  337.                     size = (btn.AbsoluteSize.Y * 1.5)
  338.                 end
  339.                 c:TweenSizeAndPosition(UDim2.new(0, size, 0, size), UDim2.new(0.5, (-size / 2), 0.5, (-size / 2)), 'Out', 'Quad', len, true, nil)
  340.                 for i = 1, 10 do
  341.                     c.ImageTransparency = c.ImageTransparency + 0.05
  342.                     wait(len / 12)
  343.                 end
  344.                 c:Destroy()
  345.         end)
  346.         local off = false
  347.         TextButton_2.MouseButton1Click:Connect(function()
  348.             local btn = TextButton_2
  349.            
  350.             if off == true then
  351.                 off = false
  352.                 btn:TweenPosition(UDim2.new(-0,0,0,0),"Out","Bounce",0.35,true,nil)
  353.                 wait(0.35)
  354.                 if btn.Position == UDim2.new(-0,0,0,0) then
  355.                     btn.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  356.                 end
  357.             else
  358.                 off = true
  359.                 btn:TweenPosition(UDim2.new(0.5,0,0,0),"Out","Bounce",0.35,true,nil)
  360.                 wait(0.35)
  361.                 if btn.Position == UDim2.new(0.5,0,0,0) then
  362.                     btn.BackgroundColor3 = Color3.fromRGB(85, 170, 127)
  363.                 end
  364.             end
  365.         end)
  366.     end
  367.    
  368.     function Win:Box(name,def,callback)
  369.         callback = callback or function() end
  370.         def = def or "Write Here"
  371.         local Box = Instance.new("TextLabel")
  372.         local TextBox = Instance.new("TextBox")
  373.         Container.Size = Container.Size + UDim2.new(0,0,0,45)
  374.         Frame_2.Size = Frame_2.Size + UDim2.new(0,0,0,45)
  375.         Box.Name = "Box"
  376.         Box.Parent = Frame_2
  377.         Box.Active = true
  378.         Box.BackgroundColor3 = Color3.fromRGB(20, 76, 100)
  379.         Box.BorderSizePixel = 0
  380.         Box.Position = UDim2.new(0, 0, 0.255, 0)
  381.         Box.Selectable = true
  382.         Box.Size = UDim2.new(1, 0, 0, 40)
  383.         Box.Font = Enum.Font.ArialBold
  384.         Box.Text = " "..name
  385.         Box.TextColor3 = Color3.fromRGB(255, 255, 255)
  386.         Box.TextSize = 20.000
  387.         Box.TextWrapped = true
  388.         Box.TextXAlignment = Enum.TextXAlignment.Left
  389.         Box.TextYAlignment = Enum.TextYAlignment.Top
  390.        
  391.         TextBox.Parent = Box
  392.         TextBox.BackgroundColor3 = Color3.fromRGB(25, 96, 127)
  393.         TextBox.BorderColor3 = Color3.fromRGB(0, 183, 255)
  394.         TextBox.BorderSizePixel = 0
  395.         TextBox.Position = UDim2.new(0, 0, 0.509672463, 0)
  396.         TextBox.Size = UDim2.new(0, 144, 0, 20)
  397.         TextBox.Font = Enum.Font.ArialBold
  398.         TextBox.PlaceholderColor3 = Color3.fromRGB(255, 255, 255)
  399.         TextBox.PlaceholderText = def
  400.         TextBox.Text = ""
  401.         TextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  402.         TextBox.TextScaled = true
  403.         TextBox.TextSize = 14.000
  404.         TextBox.TextWrapped = true
  405.        
  406.         TextBox.FocusLost:Connect(function()
  407.             callback(TextBox.Text)
  408.         end)
  409.     end
  410.    
  411.     function Win:Slider(name,min,max,opt,estimate,callback)
  412.         min = min or 0
  413.         max = max or 100
  414.         opt = opt or 2
  415.         Container.Size = Container.Size + UDim2.new(0,0,0,30)
  416.         Frame_2.Size = Frame_2.Size + UDim2.new(0,0,0,30)
  417.         estimate = estimate or true
  418.         callback = callback or function() end
  419.        
  420.         if opt == 2 then
  421.             local Slider = Instance.new("TextLabel")
  422.             local Slide = Instance.new("TextLabel")
  423.             local SliderButton = Instance.new("TextButton")
  424.            
  425.             Slider.Name = "Slider"
  426.             Slider.Parent = Frame_2
  427.             Slider.Active = true
  428.             Slider.BackgroundColor3 = Color3.fromRGB(20, 76, 100)
  429.             Slider.BorderSizePixel = 0
  430.             Slider.Position = UDim2.new(-0.00140391453, 0, 0.602446914, 0)
  431.             Slider.Selectable = true
  432.             Slider.Size = UDim2.new(1, 0, 0, 25)
  433.             Slider.Font = Enum.Font.ArialBold
  434.             Slider.Text = " "..name
  435.             Slider.TextScaled = true
  436.             Slider.TextColor3 = Color3.fromRGB(255, 255, 255)
  437.             Slider.TextSize = 20.000
  438.             Slider.TextWrapped = true
  439.             Slider.TextXAlignment = Enum.TextXAlignment.Left
  440.             Slider.TextYAlignment = Enum.TextYAlignment.Top
  441.            
  442.             Slide.Name = "Slide"
  443.             Slide.Parent = Slider
  444.             Slide.Active = true
  445.             Slide.BackgroundColor3 = Color3.fromRGB(25, 96, 127)
  446.             Slide.BorderColor3 = Color3.fromRGB(0, 183, 255)
  447.             Slide.BorderSizePixel = 0
  448.             Slide.ClipsDescendants = true
  449.             Slide.Position = UDim2.new(-0.00140391453, 0, 0.75999999, 0)
  450.             Slide.Selectable = true
  451.             Slide.Size = UDim2.new(0, 144, 0, 6)
  452.             Slide.Text = " "
  453.            
  454.             SliderButton.Name = "SliderButton"
  455.             SliderButton.Parent = Slide
  456.             SliderButton.BackgroundColor3 = Color3.fromRGB(78, 247, 255)
  457.             SliderButton.BorderColor3 = Color3.fromRGB(0, 183, 255)
  458.             SliderButton.BorderSizePixel = 0
  459.             SliderButton.Position = UDim2.new(0, -1, 0, 0)
  460.             SliderButton.Size = UDim2.new(0, 0, 1, 0)
  461.             SliderButton.Text = " "
  462.            
  463.             local realVal = Slider.Text..": "
  464.             local Val = Slider
  465.             local Sliderr = Slide
  466.             local mousepressed = false
  467.             local SliderBtn = SliderButton
  468.             local Player = game:GetService("Players").LocalPlayer
  469.             local UIS = game:GetService("UserInputService")
  470.             local RuS = game:GetService("RunService")
  471.             local estimate = true
  472.             -- Properties
  473.             local held = false
  474.             local step = 0
  475.             local percentage = 0
  476.             function snap(number, factor)
  477.                 if factor == 0 then
  478.                     return number
  479.                 else
  480.                     return math.floor(number/factor+0.5)*factor
  481.                 end
  482.             end
  483.             UIS.InputEnded:connect(function(input, processed)
  484.                 if input.UserInputType == Enum.UserInputType.MouseButton1 then
  485.                     held = false
  486.                     mousepressed = false
  487.                 end
  488.             end)
  489.             UIS.InputBegan:Connect(function(input)
  490.                 if input.UserInputType == Enum.UserInputType.MouseButton1 then
  491.                     mousepressed = true
  492.                 end
  493.             end)
  494.             Sliderr.MouseEnter:connect(function()
  495.                 repeat
  496.                     wait()
  497.                     if mousepressed then
  498.                         held = true
  499.                     end
  500.                 until SliderBtn.MouseLeave
  501.             end)
  502.             SliderBtn.MouseEnter:connect(function()
  503.                 repeat
  504.                     wait()
  505.                     if mousepressed then
  506.                         held = true
  507.                     end
  508.                 until Sliderr.MouseLeave
  509.             end)
  510.             RuS.RenderStepped:connect(function(delta)
  511.                 if held then
  512.                     local MousePos = UIS:GetMouseLocation().X
  513.                     local BtnPos = SliderBtn.Position
  514.                     local SliderSize = Sliderr.AbsoluteSize.X
  515.                     local SliderPos = Sliderr.AbsolutePosition.X
  516.                     local pos = snap((MousePos-SliderPos)/SliderSize,step)
  517.                     percentage = math.clamp(pos,0,1)
  518.                     SliderBtn.Position = UDim2.new(percentage/100,-1,(BtnPos.Y.Scale), BtnPos.Y.Offset)
  519.                     SliderBtn.Size = UDim2.new(percentage,0,1,0)
  520.                     local bry = (math.floor((0 + (max - 0) * percentage) * max) / max)
  521.                     if estimate == true then
  522.                
  523.                         local big = math.floor(bry)
  524.                          Val.Text = realVal..big..""
  525.                         callback(big)
  526.                         if min >= big then
  527.                          Val.Text = realVal..min
  528.                             callback(min)
  529.                         end
  530.                    elseif estimate == false then
  531.                        Val.Text = realVal..bry..""
  532.                         callback(bry)
  533.                         if  min >= bry then
  534.                          Val.Text = realVal..min
  535.                         callback(min)
  536.                       end
  537.                    end
  538.                 end
  539.             end)
  540.         elseif opt == 1 then
  541.             local Slider_2 = Instance.new("TextLabel")
  542.             local Slide_2 = Instance.new("TextLabel")
  543.             local SliderButton_2 = Instance.new("TextButton")
  544.            
  545.             Slider_2.Name = "Slider"
  546.             Slider_2.Parent = Frame_2
  547.             Slider_2.Active = true
  548.             Slider_2.BackgroundColor3 = Color3.fromRGB(20, 76, 100)
  549.             Slider_2.BorderSizePixel = 0
  550.             Slider_2.Position = UDim2.new(-0.00140391453, 0, 0.602446914, 0)
  551.             Slider_2.Selectable = true
  552.             Slider_2.Size = UDim2.new(1, 0, 0, 25)
  553.             Slider_2.Font = Enum.Font.ArialBold
  554.             Slider_2.Text = " "..name
  555.             Slider_2.TextScaled = true
  556.             Slider_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  557.             Slider_2.TextSize = 20.000
  558.             Slider_2.TextWrapped = true
  559.             Slider_2.TextXAlignment = Enum.TextXAlignment.Left
  560.             Slider_2.TextYAlignment = Enum.TextYAlignment.Top
  561.            
  562.             Slide_2.Name = "Slide"
  563.             Slide_2.Parent = Slider_2
  564.             Slide_2.Active = true
  565.             Slide_2.BackgroundColor3 = Color3.fromRGB(25, 96, 127)
  566.             Slide_2.BorderColor3 = Color3.fromRGB(0, 183, 255)
  567.             Slide_2.BorderSizePixel = 0
  568.             Slide_2.Position = UDim2.new(-0.00140391453, 0, 0.75999999, 0)
  569.             Slide_2.Selectable = true
  570.             Slide_2.Size = UDim2.new(0, 144, 0, 6)
  571.             Slide_2.Text = " "
  572.            
  573.             SliderButton_2.Name = "SliderButton"
  574.             SliderButton_2.Parent = Slide_2
  575.             SliderButton_2.AnchorPoint = Vector2.new(0.5, 0.5)
  576.             SliderButton_2.BackgroundColor3 = Color3.fromRGB(78, 247, 255)
  577.             SliderButton_2.BorderColor3 = Color3.fromRGB(0, 183, 255)
  578.             SliderButton_2.BorderSizePixel = 0
  579.             SliderButton_2.Position = UDim2.new(0, -1, 0.5, 0)
  580.             SliderButton_2.Size = UDim2.new(0, 3, 1, 0)
  581.             SliderButton_2.Text = " "
  582.            
  583.             local realVal = Slider_2.Text..": " -- This is going to go to the 1st label
  584.            local Val = Slider_2 -- This is going to go to the 1st label
  585.            local Sliderr = Slide_2 -- This is going to go to the slide
  586.            local mousepressed = false
  587.            local SliderBtn = SliderButton_2 -- This is going to go to the slider button
  588.            local Player = game:GetService("Players").LocalPlayer
  589.            local UIS = game:GetService("UserInputService")
  590.            local RuS = game:GetService("RunService")
  591.            -- Properties
  592.            local held = false
  593.            local step = 0 -- do not change!!
  594.            local percentage = 0
  595.            function snap(number, factor)
  596.                if factor == 0 then
  597.                    return number
  598.                else
  599.                    return math.floor(number/factor+0.5)*factor
  600.                end
  601.            end
  602.            UIS.InputEnded:connect(function(input, processed)
  603.                if input.UserInputType == Enum.UserInputType.MouseButton1 then
  604.                    held = false
  605.                    mousepressed = false
  606.                end
  607.            end)
  608.            UIS.InputBegan:Connect(function(input)
  609.                if input.UserInputType == Enum.UserInputType.MouseButton1 then
  610.                    mousepressed = true
  611.                end
  612.            end)
  613.            Sliderr.MouseEnter:connect(function()
  614.     repeat
  615.     wait()
  616.                if mousepressed then
  617.                    held = true
  618.                end
  619.     until SliderBtn.MouseLeave
  620.            end)
  621.         SliderBtn.MouseEnter:connect(function()
  622.             repeat
  623.             wait()
  624.                if mousepressed then
  625.                    held = true
  626.                end
  627.             until Sliderr.MouseLeave
  628.            end)
  629.            RuS.RenderStepped:connect(function(delta)
  630.                if held then
  631.                    local MousePos = UIS:GetMouseLocation().X
  632.                    local BtnPos = SliderBtn.Position
  633.                    local SliderSize = Sliderr.AbsoluteSize.X
  634.                    local SliderPos = Sliderr.AbsolutePosition.X
  635.                    local pos = snap((MousePos-SliderPos)/SliderSize,step)
  636.                    percentage = math.clamp(pos,0,1)
  637.                    SliderBtn.Position = UDim2.new(percentage,-(SliderBtn.Size.X.Offset*0.5),(BtnPos.Y.Scale), BtnPos.Y.Offset)
  638.                    local bry = (math.floor((0 + (max - 0) * percentage) * max) / max)
  639.                    if estimate == true then
  640.              
  641.                        local big = math.floor(bry)
  642.                        Val.Text = realVal..big..""
  643.                         callback(big)
  644.                         if min >= big then
  645.                           Val.Text = realVal..min
  646.                             callback(min)
  647.                         end
  648.                    elseif estimate == false then
  649.                        Val.Text = realVal..bry
  650.                         callback(bry)
  651.                         if Val.Text <= min then
  652.                          Val.Text = realVal..min
  653.                             callback(min)
  654.                         end
  655.                    end
  656.                end
  657.            end)
  658.         end    
  659.     end
  660.  
  661.     function Win:Dropdown(name,options,callback)
  662.         callback = callback or function() end
  663.         Container.Size = Container.Size + UDim2.new(0,0,0,30)
  664.         Frame_2.Size = Frame_2.Size + UDim2.new(0,0,0,30)
  665.         local Dropdown = Instance.new("TextLabel")
  666.         local ImageButton = Instance.new("ImageButton")
  667.         local Contain = Instance.new("Frame")
  668.         local UIListLayout_2 = Instance.new("UIListLayout")
  669.            
  670.         Dropdown.Name = "Dropdown"
  671.         Dropdown.Parent = Frame_2
  672.         Dropdown.Active = true
  673.         Dropdown.BackgroundColor3 = Color3.fromRGB(20, 76, 100)
  674.         Dropdown.BorderSizePixel = 0
  675.         Dropdown.Position = UDim2.new(0, 0, 0.640118599, 0)
  676.         Dropdown.Selectable = true
  677.         Dropdown.Size = UDim2.new(1, 0, 0, 25)
  678.         Dropdown.Font = Enum.Font.ArialBold
  679.         Dropdown.Text = "    "..name
  680.         Dropdown.TextScaled = true
  681.         Dropdown.TextColor3 = Color3.fromRGB(255, 255, 255)
  682.         Dropdown.TextSize = 20.000
  683.         Dropdown.TextWrapped = true
  684.         Dropdown.TextXAlignment = Enum.TextXAlignment.Left
  685.         Dropdown.TextYAlignment = Enum.TextYAlignment.Top
  686.        
  687.         ImageButton.Parent = Dropdown
  688.         ImageButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  689.         ImageButton.BackgroundTransparency = 1.000
  690.         ImageButton.Position = UDim2.new(0, 4, 0.200000003, 0)
  691.         ImageButton.Size = UDim2.new(0, 12, 0, 12)
  692.         ImageButton.Image = "http://www.roblox.com/asset/?id=4897822015"
  693.         ImageButton.ScaleType = Enum.ScaleType.Fit
  694.         ImageButton.SliceCenter = Rect.new(0.5, 0, 0.5, 0)
  695.         ImageButton.SliceScale = 0.500
  696.        
  697.         Contain.Name = "Contain"
  698.         Contain.Parent = ImageButton
  699.         Contain.BackgroundColor3 = Color3.fromRGB(25, 96, 127)
  700.         Contain.BorderSizePixel = 0
  701.         Contain.Position = UDim2.new(-0.350180298, 0, 1.25000131, 0)
  702.         Contain.Selectable = false
  703.         Contain.Size = UDim2.new(0, 144, 0, 40)
  704.         Contain.Visible = false
  705.         Contain.ZIndex = 3
  706.         local rot = 0
  707.         local tog = 0
  708.         local siz = Contain.Size
  709.         ImageButton.MouseButton1Click:Connect(function()
  710.             if tog == 0 then
  711.                 tog = 1
  712.                 for i = 1,9 do
  713.                     rot = rot + 15
  714.                     ImageButton.Rotation = rot
  715.                     wait(0.015)
  716.                 end
  717.                 ImageButton.Image = "http://www.roblox.com/asset/?id=4292970642"
  718.                 ImageButton.Rotation = 0
  719.                 ImageButton.Contain.Size = UDim2.new(0,144,0,0)
  720.                 ImageButton.Contain.Visible = true
  721.                 Container.ClipsDescendants = false
  722.                 ImageButton.Contain:TweenSize(siz,"Out","Sine",0.4,false,nil)
  723.                 wait(0.4)
  724.                 rot = 0
  725.             else
  726.                 tog = 0
  727.                 Contain:TweenSize(UDim2.new(0,144,0,0),"In","Sine",0.4,false,nil)
  728.                 wait(0.4)
  729.                 Contain.Visible = false
  730.                 for i = 1,9 do
  731.                     rot = rot + 15
  732.                     ImageButton.Rotation = rot
  733.                     wait(0.015)
  734.                 end
  735.                 ImageButton.Rotation = 0
  736.                 ImageButton.Image = "http://www.roblox.com/asset/?id=4897822015"
  737.                 rot = 0
  738.                 Container.ClipsDescendants = true
  739.             end
  740.         end)
  741.         UIListLayout_2.Parent = Contain
  742.         UIListLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
  743.        
  744.         for i,v in pairs(options) do
  745.             Contain.Size = Contain.Size + UDim2.new(0,0,0,15)
  746.             local Button_2 = Instance.new("TextButton")
  747.             local Sample_3 = Instance.new("ImageLabel")
  748.             Button_2.Name = "Button"
  749.             Button_2.Text = ""..v
  750.             Button_2.Parent = Contain
  751.             Button_2.BackgroundColor3 = Color3.fromRGB(30, 116, 153)
  752.             Button_2.BorderColor3 = Color3.fromRGB(0, 183, 255)
  753.             Button_2.BorderSizePixel = 0
  754.             Button_2.ClipsDescendants = true
  755.             Button_2.Size = UDim2.new(0, 144, 0, 20)
  756.             Button_2.ZIndex = 4
  757.             Button_2.Font = Enum.Font.ArialBold
  758.             Button_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  759.             Button_2.TextSize = 22.000
  760.             Button_2.TextWrapped = true
  761.             Button_2.TextScaled = true
  762.             Button_2.TextYAlignment = Enum.TextYAlignment.Top
  763.            
  764.             Sample_3.Name = "Sample"
  765.             Sample_3.Parent = Button_2
  766.             Sample_3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  767.             Sample_3.BackgroundTransparency = 1.000
  768.             Sample_3.ZIndex = 7
  769.             Sample_3.Image = "http://www.roblox.com/asset/?id=4560909609"
  770.             Sample_3.ImageTransparency = 0.600
  771.            
  772.             Button_2.MouseButton1Click:Connect(function()
  773.                 Contain:TweenSize(UDim2.new(0,144,0,0),"In","Sine",0.4,false,nil)
  774.                 wait(0.4)
  775.                 Contain.Visible = false
  776.                 for i = 1,9 do
  777.                     rot = rot + 15
  778.                     ImageButton.Rotation = rot
  779.                     wait(0.015)
  780.                 end
  781.                 ImageButton.Rotation = 0
  782.                 ImageButton.Image = "http://www.roblox.com/asset/?id=4897822015"
  783.                 rot = 0
  784.                 Container.ClipsDescendants = true
  785.                 tog = 0
  786.                 Dropdown.Text =  "    "..v
  787.                 callback(v)
  788.             end)
  789.                
  790.             Button_2.MouseButton1Click:Connect(function()
  791.                 local ms = game.Players.LocalPlayer:GetMouse()
  792.                 local btn = Button_2
  793.                 local sample = Sample_3
  794.                 local c = sample:Clone()
  795.                 c.Parent = btn
  796.                 local x, y = (ms.X - c.AbsolutePosition.X), (ms.Y - c.AbsolutePosition.Y)
  797.                 c.Position = UDim2.new(0, x, 0, y)
  798.                 local len, size = 0.35, nil
  799.                 if btn.AbsoluteSize.X >= btn.AbsoluteSize.Y then
  800.                     size = (btn.AbsoluteSize.X * 1.5)
  801.                 else
  802.                     size = (btn.AbsoluteSize.Y * 1.5)
  803.                 end
  804.                 c:TweenSizeAndPosition(UDim2.new(0, size, 0, size), UDim2.new(0.5, (-size / 2), 0.5, (-size / 2)), 'Out', 'Quad', len, true, nil)
  805.                 for i = 1, 10 do
  806.                     c.ImageTransparency = c.ImageTransparency + 0.05
  807.                     wait(len / 12)
  808.                 end
  809.                 c:Destroy()
  810.             end)
  811.         end
  812.     end
  813.    
  814.     function Win:ColorPicker(name,callback)
  815.         Container.Size = Container.Size + UDim2.new(0,0,0,30)
  816.         Frame_2.Size = Frame_2.Size + UDim2.new(0,0,0,30)
  817.         callback = callback or function()end
  818.         local ColorPicker = Instance.new("TextLabel")
  819.         local TextButton_3 = Instance.new("TextButton")
  820.         local HSV = Instance.new("ImageButton")
  821.         local Arrow = Instance.new("ImageLabel")
  822.         ColorPicker.Name = "Color Picker"
  823.         ColorPicker.Parent = Frame_2
  824.         ColorPicker.Active = true
  825.         ColorPicker.BackgroundColor3 = Color3.fromRGB(20, 76, 100)
  826.         ColorPicker.BorderSizePixel = 0
  827.         ColorPicker.Position = UDim2.new(0, 0, 0.651674449, 0)
  828.         ColorPicker.Selectable = true
  829.         ColorPicker.Size = UDim2.new(0, 114, 0, 20)
  830.         ColorPicker.Font = Enum.Font.ArialBold
  831.         ColorPicker.Text = " "..name
  832.         ColorPicker.TextColor3 = Color3.fromRGB(255, 255, 255)
  833.         ColorPicker.TextScaled = true
  834.         ColorPicker.TextSize = 20.000
  835.         ColorPicker.TextWrapped = true
  836.         ColorPicker.TextXAlignment = Enum.TextXAlignment.Left
  837.         ColorPicker.TextYAlignment = Enum.TextYAlignment.Top
  838.        
  839.         TextButton_3.Parent = ColorPicker
  840.         TextButton_3.BackgroundColor3 = Color3.fromRGB(25, 96, 127)
  841.         TextButton_3.BorderColor3 = Color3.fromRGB(0, 183, 255)
  842.         TextButton_3.BorderSizePixel = 0
  843.         TextButton_3.Position = UDim2.new(0.999984562, 0, 0, 0)
  844.         TextButton_3.Size = UDim2.new(0, 30, 0, 20)
  845.         TextButton_3.Font = Enum.Font.SourceSans
  846.         TextButton_3.Text = " "
  847.         TextButton_3.TextColor3 = Color3.fromRGB(0, 183, 255)
  848.         TextButton_3.TextScaled = true
  849.         TextButton_3.TextSize = 14.000
  850.         TextButton_3.TextWrapped = true
  851.        
  852.         HSV.Name = "HSV"
  853.         HSV.Parent = TextButton_3
  854.         HSV.Active = false
  855.         HSV.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  856.         HSV.BackgroundTransparency = 1.000
  857.         HSV.Position = UDim2.new(1.50446069, 0, 0, 0)
  858.         HSV.Selectable = false
  859.         HSV.Size = UDim2.new(0, 0, 0.699999988, 6)
  860.         HSV.Image = "rbxassetid://4613607014"
  861.        
  862.         Arrow.Name = "Arrow"
  863.         Arrow.Parent = HSV
  864.         Arrow.AnchorPoint = Vector2.new(0.5, 0.5)
  865.         Arrow.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  866.         Arrow.BackgroundTransparency = 1.000
  867.         Arrow.Position = UDim2.new(0.5, 0, 0.349999994, -6)
  868.         Arrow.Rotation = -90.000
  869.         Arrow.Size = UDim2.new(0, 6, 0, 6)
  870.         Arrow.Visible = false
  871.         Arrow.ZIndex = 3
  872.         Arrow.Image = "rbxassetid://2500573769"
  873.         Arrow.ImageTransparency = 0.250
  874.        
  875.         local t = 0
  876.         local be = UDim2.new(2.529,0,0.7,6)
  877.         local af = UDim2.new(0,0,0.7,6)
  878.         TextButton_3.MouseButton1Click:Connect(function()
  879.             if t == 0 then
  880.                 t = 1
  881.                 Container.ClipsDescendants = false
  882.                 Arrow.Visible = true
  883.                 HSV:TweenSize(be,"Out","Sine",0.4,false,nil)wait(0.4)
  884.             else
  885.                 t = 0
  886.                 Arrow.Visible = false
  887.                 HSV:TweenSize(af,"In","Sine",0.4,false,nil)wait(0.4)
  888.                 Container.ClipsDescendants = true
  889.             end
  890.         end)
  891.         local value
  892.         local last = value
  893. HSV.MouseButton1Down:Connect(function()
  894.                             local rs = game:GetService("RunService")
  895.                             local uis = game:GetService("UserInputService")
  896.                             HSV.Image = "rbxassetid://4613607014"
  897.                             while uis:IsMouseButtonPressed'MouseButton1' do
  898.                                 local mouseloc = uis:GetMouseLocation()
  899.                                 local sx = Arrow.AbsoluteSize.X / 2;
  900.                                 local offset = (mouseloc.x - HSV.AbsolutePosition.X) - sx
  901.                                 local scale = offset / HSV.AbsoluteSize.X
  902.                                 local position = math.clamp(offset, -sx, HSV.AbsoluteSize.X - sx) / HSV.AbsoluteSize.X
  903.  
  904.                                 game:GetService("TweenService"):Create(Arrow, TweenInfo.new(0.1), {Position = UDim2.new(position, 0, 0.35, -6)}):Play()
  905.                                
  906.                                 value = Color3.fromHSV(math.clamp(scale, 0, 1), 1, 1)
  907.  
  908.                                 rs.RenderStepped:wait()
  909.                                 TextButton_3.BackgroundColor3 =value
  910.                                
  911.                                 callback(TextButton_3.BackgroundColor3)
  912.                             end
  913.                         end)
  914.                         HSV.MouseButton2Down:Connect(function()
  915.                            local rs = game:GetService("RunService")
  916.                             local uis = game:GetService("UserInputService")
  917.  
  918.                             HSV.Image = "rbxassetid://4613627894"
  919.  
  920.                             while uis:IsMouseButtonPressed'MouseButton2' do
  921.                                 local mouseloc = uis:GetMouseLocation()
  922.                                 local sx = Arrow.AbsoluteSize.X / 2
  923.                                 local offset = (mouseloc.x - HSV.AbsolutePosition.X) - sx
  924.                                 local scale = offset / HSV.AbsoluteSize.X
  925.                                 local position = math.clamp(offset, -sx, HSV.AbsoluteSize.X - sx) / HSV.AbsoluteSize.X
  926.  
  927.                                 game:GetService("TweenService"):Create(Arrow, TweenInfo.new(0.1), {Position = UDim2.new(position, 0, 0.35, -6)}):Play()
  928.                                
  929.                                 value = Color3.fromHSV(1, 0, 1 - math.clamp(scale, 0, 1))
  930.  
  931.                                 rs.RenderStepped:wait()
  932.                                 TextButton_3.BackgroundColor3 =value
  933.                                
  934.                                 callback(TextButton_3.BackgroundColor3)
  935.                             end
  936.         end)
  937.     end
  938.    
  939.    
  940.     return Win;
  941. end
  942.  
  943. return Lib;
Advertisement
Add Comment
Please, Sign In to add comment