Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Lib = {}
- if game.Players.LocalPlayer.PlayerGui:FindFirstChild("Aquamarine") ~= nil then
- game.Players.LocalPlayer.PlayerGui.Aquamarine:Destroy()
- end
- local ScreenGui = Instance.new("ScreenGui")
- ScreenGui.Parent = game.Players.LocalPlayer.PlayerGui
- ScreenGui.ResetOnSpawn = false
- ScreenGui.Name = "Aquamarine"
- function Lib:CreateWindow(name)
- local pos = 0.1
- wait(0.6)
- if ScreenGui:FindFirstChild("Frame") then
- for i,v in pairs(ScreenGui:GetChildren()) do
- if v.Name == "Frame" then
- pos = v.Position.X.Scale + 0.15
- end
- end
- end
- local Frame = Instance.new("ImageButton")
- local Win = {}
- local Sides = Instance.new("ImageLabel")
- local Sides_2 = Instance.new("ImageLabel")
- local Sides_3 = Instance.new("ImageLabel")
- local Sides_4 = Instance.new("ImageLabel")
- local TextLabel = Instance.new("TextLabel")
- local Container = Instance.new("ImageLabel")
- local UIGradient = Instance.new("UIGradient")
- local Frame_2 = Instance.new("Frame")
- local Spacer = Instance.new("TextLabel")
- local UIListLayout = Instance.new("UIListLayout")
- Frame.Name = "Frame"
- Frame.Parent = ScreenGui
- Frame.Active = false
- Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Frame.BackgroundTransparency = 1.000
- Frame.Position = UDim2.new(pos,0, 0.0500000007, 0)
- Frame.Selectable = false
- Frame.Size = UDim2.new(0, 175, 0, 35)
- Frame.ZIndex = 2
- Frame.Image = "rbxassetid://3570695787"
- Frame.ImageColor3 = Color3.fromRGB(45, 45, 45)
- Frame.ScaleType = Enum.ScaleType.Slice
- Frame.SliceCenter = Rect.new(100, 100, 100, 100)
- Frame.SliceScale = 0.040
- local dragger = {}; do
- local mouse = game:GetService("Players").LocalPlayer:GetMouse();
- local inputService = game:GetService('UserInputService');
- local heartbeat = game:GetService("RunService").Heartbeat;
- -- // credits to Ririchi / Inori for this cute drag function :)
- function dragger.new(frame)
- local s, event = pcall(function()
- return frame.MouseEnter
- end)
- if s then
- frame.Active = true;
- event:connect(function()
- local input = frame.InputBegan:connect(function(key)
- if key.UserInputType == Enum.UserInputType.MouseButton1 then
- local objectPosition = Vector2.new(mouse.X - frame.AbsolutePosition.X, mouse.Y - frame.AbsolutePosition.Y);
- while heartbeat:wait() and inputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) do
- pcall(function()
- 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);
- end)
- end
- end
- end)
- local leave;
- leave = frame.MouseLeave:connect(function()
- input:disconnect();
- leave:disconnect();
- end)
- end)
- end
- end
- end
- dragger.new(Frame)
- Sides.Name = "Sides"
- Sides.Parent = Frame
- Sides.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Sides.BackgroundTransparency = 1.000
- Sides.Position = UDim2.new(0.0250000004, 0, 0.100000001, 0)
- Sides.Size = UDim2.new(0, 4, 0.850000024, 0)
- Sides.ZIndex = 3
- Sides.Image = "rbxassetid://3570695787"
- Sides.ImageColor3 = Color3.fromRGB(108, 255, 251)
- Sides.ScaleType = Enum.ScaleType.Slice
- Sides.SliceCenter = Rect.new(100, 100, 100, 100)
- Sides.SliceScale = 0.040
- Sides_2.Name = "Sides"
- Sides_2.Parent = Frame
- Sides_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Sides_2.BackgroundTransparency = 1.000
- Sides_2.Position = UDim2.new(0.942142844, 0, 0.100000001, 0)
- Sides_2.Size = UDim2.new(0, 4, 0.850000024, 0)
- Sides_2.ZIndex = 3
- Sides_2.Image = "rbxassetid://3570695787"
- Sides_2.ImageColor3 = Color3.fromRGB(108, 255, 251)
- Sides_2.ScaleType = Enum.ScaleType.Slice
- Sides_2.SliceCenter = Rect.new(100, 100, 100, 100)
- Sides_2.SliceScale = 0.040
- Sides_3.Name = "Sides"
- Sides_3.Parent = Container
- Sides_3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Sides_3.BackgroundTransparency = 1.000
- Sides_3.Position = UDim2.new(0.938293695, 0, -0.00683389604, 0)
- Sides_3.Size = UDim2.new(0, 4, 1, 0)
- Sides_3.Image = "rbxassetid://3570695787"
- Sides_3.ImageColor3 = Color3.fromRGB(0, 183, 255)
- Sides_3.ScaleType = Enum.ScaleType.Slice
- Sides_3.SliceCenter = Rect.new(100, 100, 100, 100)
- Sides_3.SliceScale = 0.040
- Sides_4.Name = "Sides"
- Sides_4.Parent = Container
- Sides_4.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Sides_4.BackgroundTransparency = 1.000
- Sides_4.Position = UDim2.new(0.0250000022, 0, -0.00793279335, 0)
- Sides_4.Size = UDim2.new(0, 4, 1, 0)
- Sides_4.Image = "rbxassetid://3570695787"
- Sides_4.ImageColor3 = Color3.fromRGB(0, 183, 255)
- Sides_4.ScaleType = Enum.ScaleType.Slice
- Sides_4.SliceCenter = Rect.new(100, 100, 100, 100)
- Sides_4.SliceScale = 0.040
- TextLabel.Parent = Frame
- TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.BackgroundTransparency = 1.000
- TextLabel.Position = UDim2.new(0, 0, 0.200000003, 0)
- TextLabel.Size = UDim2.new(1, 0, 0.600000024, 0)
- TextLabel.ZIndex = 3
- TextLabel.Font = Enum.Font.GothamBlack
- TextLabel.Text = name
- TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.TextScaled = true
- TextLabel.TextSize = 14.000
- TextLabel.TextWrapped = true
- Container.Name = "Container"
- Container.Parent = Frame
- Container.BackgroundColor3 = Color3.fromRGB(0, 0, 255)
- Container.BackgroundTransparency = 1.000
- Container.BorderColor3 = Color3.fromRGB(0, 0, 255)
- Container.BorderSizePixel = 100
- Container.ClipsDescendants = true
- Container.Position = UDim2.new(-8.71930794e-08, 0, 0.792857707, 0)
- Container.Size = UDim2.new(0.99999994, 0, 0, 14)
- Container.Image = "rbxassetid://3570695787"
- Container.ImageColor3 = Color3.fromRGB(45, 45, 45)
- Container.ScaleType = Enum.ScaleType.Slice
- Container.SliceCenter = Rect.new(100, 100, 100, 100)
- Container.SliceScale = 0.040
- UIGradient.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(45, 45, 45)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(0, 183, 255))}
- UIGradient.Rotation = 90
- UIGradient.Transparency = NumberSequence.new{NumberSequenceKeypoint.new(0.00, 0.10), NumberSequenceKeypoint.new(1.00, 0.10)}
- UIGradient.Parent = Container
- Frame_2.Parent = Container
- Frame_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Frame_2.BackgroundTransparency = 1.000
- Frame_2.Position = UDim2.new(0.0878572389, 0, 0.0408163257, 0)
- Frame_2.Size = UDim2.new(0, 144, 1, 0)
- UIListLayout.Parent = Frame_2
- UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
- UIListLayout.Padding = UDim.new(0, 5)
- Spacer.Name = "Spacer"
- Spacer.Parent = Frame_2
- Spacer.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Spacer.BackgroundTransparency = 1.000
- Spacer.BorderSizePixel = 0
- Spacer.Size = UDim2.new(1, 0, 0, 4)
- Spacer.Font = Enum.Font.SourceSans
- Spacer.Text = " "
- Spacer.TextColor3 = Color3.fromRGB(0, 0, 0)
- Spacer.TextScaled = true
- Spacer.TextSize = 14.000
- Spacer.TextWrapped = true
- local to = 1
- local si = Container.Size
- Frame.MouseButton2Click:Connect(function()
- if to == 0 then
- to = 1
- Container:TweenSize(si,"Out","Sine",0.4,true,nil)wait(0.4)
- else
- to = 0
- Container:TweenSize(UDim2.new(1,0,0,0),"In","Sine",0.4,true,nil)wait(0.4)
- end
- end)
- function Win:Button(name,callback)
- callback = callback or function() end
- Container.Size = Container.Size + UDim2.new(0,0,0,30)
- Frame_2.Size = Frame_2.Size + UDim2.new(0,0,0,30)
- local Button = Instance.new("TextButton")
- local Sample = Instance.new("ImageLabel")
- Button.Name = "Button"
- Button.Text = ""..name
- Button.TextScaled = true
- Button.Parent = Frame_2
- Button.BackgroundColor3 = Color3.fromRGB(20, 76, 100)
- Button.BorderColor3 = Color3.fromRGB(0, 183, 255)
- Button.BorderSizePixel = 0
- Button.ClipsDescendants = true
- Button.Size = UDim2.new(0, 144, 0, 20)
- Button.Font = Enum.Font.ArialBold
- Button.TextColor3 = Color3.fromRGB(255, 255, 255)
- Button.TextSize = 20.000
- Button.TextWrapped = true
- Button.TextYAlignment = Enum.TextYAlignment.Top
- Sample.Name = "Sample"
- Sample.Parent = game.StarterGui.ScreenGui.Frame.Container.Frame.Button.MouseClickEffect
- Sample.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Sample.BackgroundTransparency = 1.000
- Sample.ZIndex = 7
- Sample.Image = "http://www.roblox.com/asset/?id=4560909609"
- Sample.ImageTransparency = 0.600
- Button.MouseButton1Click:Connect(function()
- local ms = game.Players.LocalPlayer:GetMouse()
- local btn = Button
- local sample = Sample
- local c = sample:Clone()
- c.Parent = btn
- local x, y = (ms.X - c.AbsolutePosition.X), (ms.Y - c.AbsolutePosition.Y)
- c.Position = UDim2.new(0, x, 0, y)
- local len, size = 0.35, nil
- if btn.AbsoluteSize.X >= btn.AbsoluteSize.Y then
- size = (btn.AbsoluteSize.X * 1.5)
- else
- size = (btn.AbsoluteSize.Y * 1.5)
- end
- c:TweenSizeAndPosition(UDim2.new(0, size, 0, size), UDim2.new(0.5, (-size / 2), 0.5, (-size / 2)), 'Out', 'Quad', len, true, nil)
- for i = 1, 10 do
- c.ImageTransparency = c.ImageTransparency + 0.05
- wait(len / 12)
- end
- c:Destroy()
- end)
- Button.MouseButton1Click:Connect(callback)
- end
- function Win:Toggle(name,callback)
- callback = callback or function() end
- Container.Size = Container.Size + UDim2.new(0,0,0,30)
- Frame_2.Size = Frame_2.Size + UDim2.new(0,0,0,30)
- local Toggle = Instance.new("TextLabel")
- local TextButton = Instance.new("TextLabel")
- local TextButton_2 = Instance.new("TextButton")
- local Sample_2 = Instance.new("ImageLabel")
- Toggle.Name = "Toggle"
- Toggle.Parent = Frame_2
- Toggle.Active = true
- Toggle.BackgroundColor3 = Color3.fromRGB(20, 76, 100)
- Toggle.BorderSizePixel = 0
- Toggle.Position = UDim2.new(0, 0, 0.1953125, 0)
- Toggle.Selectable = true
- Toggle.Size = UDim2.new(0, 84, 0, 20)
- Toggle.Font = Enum.Font.ArialBold
- Toggle.Text = " "..name
- Toggle.TextScaled = true
- Toggle.TextColor3 = Color3.fromRGB(255, 255, 255)
- Toggle.TextSize = 20.000
- Toggle.TextWrapped = true
- Toggle.TextXAlignment = Enum.TextXAlignment.Left
- Toggle.TextYAlignment = Enum.TextYAlignment.Top
- TextButton.Name = "TextButton"
- TextButton.Parent = Toggle
- TextButton.Active = true
- TextButton.BackgroundColor3 = Color3.fromRGB(25, 96, 127)
- TextButton.BorderColor3 = Color3.fromRGB(0, 183, 255)
- TextButton.BorderSizePixel = 0
- TextButton.Position = UDim2.new(0.989667416, 0, 0, 0)
- TextButton.Selectable = true
- TextButton.Size = UDim2.new(0, 60, 0, 20)
- TextButton.Font = Enum.Font.SourceSans
- TextButton.Text = " "
- TextButton.TextColor3 = Color3.fromRGB(0, 183, 255)
- TextButton.TextScaled = true
- TextButton.TextSize = 14.000
- TextButton.TextWrapped = true
- TextButton.ClipsDescendants = true
- TextButton_2.Parent = TextButton
- TextButton_2.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
- TextButton_2.BorderColor3 = Color3.fromRGB(0, 183, 255)
- TextButton_2.BorderSizePixel = 0
- TextButton_2.ClipsDescendants = true
- TextButton_2.Position = UDim2.new(0, 0, 0, 0)
- TextButton_2.Size = UDim2.new(0.5, 0, 1, 0)
- TextButton_2.Font = Enum.Font.SourceSans
- TextButton_2.Text = ""
- TextButton_2.TextColor3 = Color3.fromRGB(0, 183, 255)
- TextButton_2.TextSize = 1.000
- TextButton_2.TextWrapped = true
- Sample_2.Name = "Sample"
- Sample_2.Parent = TextButton_2
- Sample_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Sample_2.BackgroundTransparency = 1.000
- Sample_2.ZIndex = 7
- Sample_2.Image = "http://www.roblox.com/asset/?id=4560909609"
- Sample_2.ImageTransparency = 0.600
- local tog = 0
- TextButton_2.MouseButton1Click:Connect(function()
- if tog == 0 then
- tog = 1
- callback()
- else
- tog = 0
- end
- end)
- TextButton_2.MouseButton1Click:Connect(function()
- local ms = game.Players.LocalPlayer:GetMouse()
- local btn = TextButton_2
- local sample = Sample_2
- local c = sample:Clone()
- c.Parent = btn
- local x, y = (ms.X - c.AbsolutePosition.X), (ms.Y - c.AbsolutePosition.Y)
- c.Position = UDim2.new(0, x, 0, y)
- local len, size = 0.35, nil
- if btn.AbsoluteSize.X >= btn.AbsoluteSize.Y then
- size = (btn.AbsoluteSize.X * 1.5)
- else
- size = (btn.AbsoluteSize.Y * 1.5)
- end
- c:TweenSizeAndPosition(UDim2.new(0, size, 0, size), UDim2.new(0.5, (-size / 2), 0.5, (-size / 2)), 'Out', 'Quad', len, true, nil)
- for i = 1, 10 do
- c.ImageTransparency = c.ImageTransparency + 0.05
- wait(len / 12)
- end
- c:Destroy()
- end)
- local off = false
- TextButton_2.MouseButton1Click:Connect(function()
- local btn = TextButton_2
- if off == true then
- off = false
- btn:TweenPosition(UDim2.new(-0,0,0,0),"Out","Bounce",0.35,true,nil)
- wait(0.35)
- if btn.Position == UDim2.new(-0,0,0,0) then
- btn.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
- end
- else
- off = true
- btn:TweenPosition(UDim2.new(0.5,0,0,0),"Out","Bounce",0.35,true,nil)
- wait(0.35)
- if btn.Position == UDim2.new(0.5,0,0,0) then
- btn.BackgroundColor3 = Color3.fromRGB(85, 170, 127)
- end
- end
- end)
- end
- function Win:Box(name,def,callback)
- callback = callback or function() end
- def = def or "Write Here"
- local Box = Instance.new("TextLabel")
- local TextBox = Instance.new("TextBox")
- Container.Size = Container.Size + UDim2.new(0,0,0,45)
- Frame_2.Size = Frame_2.Size + UDim2.new(0,0,0,45)
- Box.Name = "Box"
- Box.Parent = Frame_2
- Box.Active = true
- Box.BackgroundColor3 = Color3.fromRGB(20, 76, 100)
- Box.BorderSizePixel = 0
- Box.Position = UDim2.new(0, 0, 0.255, 0)
- Box.Selectable = true
- Box.Size = UDim2.new(1, 0, 0, 40)
- Box.Font = Enum.Font.ArialBold
- Box.Text = " "..name
- Box.TextColor3 = Color3.fromRGB(255, 255, 255)
- Box.TextSize = 20.000
- Box.TextWrapped = true
- Box.TextXAlignment = Enum.TextXAlignment.Left
- Box.TextYAlignment = Enum.TextYAlignment.Top
- TextBox.Parent = Box
- TextBox.BackgroundColor3 = Color3.fromRGB(25, 96, 127)
- TextBox.BorderColor3 = Color3.fromRGB(0, 183, 255)
- TextBox.BorderSizePixel = 0
- TextBox.Position = UDim2.new(0, 0, 0.509672463, 0)
- TextBox.Size = UDim2.new(0, 144, 0, 20)
- TextBox.Font = Enum.Font.ArialBold
- TextBox.PlaceholderColor3 = Color3.fromRGB(255, 255, 255)
- TextBox.PlaceholderText = def
- TextBox.Text = ""
- TextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextBox.TextScaled = true
- TextBox.TextSize = 14.000
- TextBox.TextWrapped = true
- TextBox.FocusLost:Connect(function()
- callback(TextBox.Text)
- end)
- end
- function Win:Slider(name,min,max,opt,estimate,callback)
- min = min or 0
- max = max or 100
- opt = opt or 2
- Container.Size = Container.Size + UDim2.new(0,0,0,30)
- Frame_2.Size = Frame_2.Size + UDim2.new(0,0,0,30)
- estimate = estimate or true
- callback = callback or function() end
- if opt == 2 then
- local Slider = Instance.new("TextLabel")
- local Slide = Instance.new("TextLabel")
- local SliderButton = Instance.new("TextButton")
- Slider.Name = "Slider"
- Slider.Parent = Frame_2
- Slider.Active = true
- Slider.BackgroundColor3 = Color3.fromRGB(20, 76, 100)
- Slider.BorderSizePixel = 0
- Slider.Position = UDim2.new(-0.00140391453, 0, 0.602446914, 0)
- Slider.Selectable = true
- Slider.Size = UDim2.new(1, 0, 0, 25)
- Slider.Font = Enum.Font.ArialBold
- Slider.Text = " "..name
- Slider.TextScaled = true
- Slider.TextColor3 = Color3.fromRGB(255, 255, 255)
- Slider.TextSize = 20.000
- Slider.TextWrapped = true
- Slider.TextXAlignment = Enum.TextXAlignment.Left
- Slider.TextYAlignment = Enum.TextYAlignment.Top
- Slide.Name = "Slide"
- Slide.Parent = Slider
- Slide.Active = true
- Slide.BackgroundColor3 = Color3.fromRGB(25, 96, 127)
- Slide.BorderColor3 = Color3.fromRGB(0, 183, 255)
- Slide.BorderSizePixel = 0
- Slide.ClipsDescendants = true
- Slide.Position = UDim2.new(-0.00140391453, 0, 0.75999999, 0)
- Slide.Selectable = true
- Slide.Size = UDim2.new(0, 144, 0, 6)
- Slide.Text = " "
- SliderButton.Name = "SliderButton"
- SliderButton.Parent = Slide
- SliderButton.BackgroundColor3 = Color3.fromRGB(78, 247, 255)
- SliderButton.BorderColor3 = Color3.fromRGB(0, 183, 255)
- SliderButton.BorderSizePixel = 0
- SliderButton.Position = UDim2.new(0, -1, 0, 0)
- SliderButton.Size = UDim2.new(0, 0, 1, 0)
- SliderButton.Text = " "
- local realVal = Slider.Text..": "
- local Val = Slider
- local Sliderr = Slide
- local mousepressed = false
- local SliderBtn = SliderButton
- local Player = game:GetService("Players").LocalPlayer
- local UIS = game:GetService("UserInputService")
- local RuS = game:GetService("RunService")
- local estimate = true
- -- Properties
- local held = false
- local step = 0
- local percentage = 0
- function snap(number, factor)
- if factor == 0 then
- return number
- else
- return math.floor(number/factor+0.5)*factor
- end
- end
- UIS.InputEnded:connect(function(input, processed)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- held = false
- mousepressed = false
- end
- end)
- UIS.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- mousepressed = true
- end
- end)
- Sliderr.MouseEnter:connect(function()
- repeat
- wait()
- if mousepressed then
- held = true
- end
- until SliderBtn.MouseLeave
- end)
- SliderBtn.MouseEnter:connect(function()
- repeat
- wait()
- if mousepressed then
- held = true
- end
- until Sliderr.MouseLeave
- end)
- RuS.RenderStepped:connect(function(delta)
- if held then
- local MousePos = UIS:GetMouseLocation().X
- local BtnPos = SliderBtn.Position
- local SliderSize = Sliderr.AbsoluteSize.X
- local SliderPos = Sliderr.AbsolutePosition.X
- local pos = snap((MousePos-SliderPos)/SliderSize,step)
- percentage = math.clamp(pos,0,1)
- SliderBtn.Position = UDim2.new(percentage/100,-1,(BtnPos.Y.Scale), BtnPos.Y.Offset)
- SliderBtn.Size = UDim2.new(percentage,0,1,0)
- local bry = (math.floor((0 + (max - 0) * percentage) * max) / max)
- if estimate == true then
- local big = math.floor(bry)
- Val.Text = realVal..big..""
- callback(big)
- if min >= big then
- Val.Text = realVal..min
- callback(min)
- end
- elseif estimate == false then
- Val.Text = realVal..bry..""
- callback(bry)
- if min >= bry then
- Val.Text = realVal..min
- callback(min)
- end
- end
- end
- end)
- elseif opt == 1 then
- local Slider_2 = Instance.new("TextLabel")
- local Slide_2 = Instance.new("TextLabel")
- local SliderButton_2 = Instance.new("TextButton")
- Slider_2.Name = "Slider"
- Slider_2.Parent = Frame_2
- Slider_2.Active = true
- Slider_2.BackgroundColor3 = Color3.fromRGB(20, 76, 100)
- Slider_2.BorderSizePixel = 0
- Slider_2.Position = UDim2.new(-0.00140391453, 0, 0.602446914, 0)
- Slider_2.Selectable = true
- Slider_2.Size = UDim2.new(1, 0, 0, 25)
- Slider_2.Font = Enum.Font.ArialBold
- Slider_2.Text = " "..name
- Slider_2.TextScaled = true
- Slider_2.TextColor3 = Color3.fromRGB(255, 255, 255)
- Slider_2.TextSize = 20.000
- Slider_2.TextWrapped = true
- Slider_2.TextXAlignment = Enum.TextXAlignment.Left
- Slider_2.TextYAlignment = Enum.TextYAlignment.Top
- Slide_2.Name = "Slide"
- Slide_2.Parent = Slider_2
- Slide_2.Active = true
- Slide_2.BackgroundColor3 = Color3.fromRGB(25, 96, 127)
- Slide_2.BorderColor3 = Color3.fromRGB(0, 183, 255)
- Slide_2.BorderSizePixel = 0
- Slide_2.Position = UDim2.new(-0.00140391453, 0, 0.75999999, 0)
- Slide_2.Selectable = true
- Slide_2.Size = UDim2.new(0, 144, 0, 6)
- Slide_2.Text = " "
- SliderButton_2.Name = "SliderButton"
- SliderButton_2.Parent = Slide_2
- SliderButton_2.AnchorPoint = Vector2.new(0.5, 0.5)
- SliderButton_2.BackgroundColor3 = Color3.fromRGB(78, 247, 255)
- SliderButton_2.BorderColor3 = Color3.fromRGB(0, 183, 255)
- SliderButton_2.BorderSizePixel = 0
- SliderButton_2.Position = UDim2.new(0, -1, 0.5, 0)
- SliderButton_2.Size = UDim2.new(0, 3, 1, 0)
- SliderButton_2.Text = " "
- local realVal = Slider_2.Text..": " -- This is going to go to the 1st label
- local Val = Slider_2 -- This is going to go to the 1st label
- local Sliderr = Slide_2 -- This is going to go to the slide
- local mousepressed = false
- local SliderBtn = SliderButton_2 -- This is going to go to the slider button
- local Player = game:GetService("Players").LocalPlayer
- local UIS = game:GetService("UserInputService")
- local RuS = game:GetService("RunService")
- -- Properties
- local held = false
- local step = 0 -- do not change!!
- local percentage = 0
- function snap(number, factor)
- if factor == 0 then
- return number
- else
- return math.floor(number/factor+0.5)*factor
- end
- end
- UIS.InputEnded:connect(function(input, processed)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- held = false
- mousepressed = false
- end
- end)
- UIS.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- mousepressed = true
- end
- end)
- Sliderr.MouseEnter:connect(function()
- repeat
- wait()
- if mousepressed then
- held = true
- end
- until SliderBtn.MouseLeave
- end)
- SliderBtn.MouseEnter:connect(function()
- repeat
- wait()
- if mousepressed then
- held = true
- end
- until Sliderr.MouseLeave
- end)
- RuS.RenderStepped:connect(function(delta)
- if held then
- local MousePos = UIS:GetMouseLocation().X
- local BtnPos = SliderBtn.Position
- local SliderSize = Sliderr.AbsoluteSize.X
- local SliderPos = Sliderr.AbsolutePosition.X
- local pos = snap((MousePos-SliderPos)/SliderSize,step)
- percentage = math.clamp(pos,0,1)
- SliderBtn.Position = UDim2.new(percentage,-(SliderBtn.Size.X.Offset*0.5),(BtnPos.Y.Scale), BtnPos.Y.Offset)
- local bry = (math.floor((0 + (max - 0) * percentage) * max) / max)
- if estimate == true then
- local big = math.floor(bry)
- Val.Text = realVal..big..""
- callback(big)
- if min >= big then
- Val.Text = realVal..min
- callback(min)
- end
- elseif estimate == false then
- Val.Text = realVal..bry
- callback(bry)
- if Val.Text <= min then
- Val.Text = realVal..min
- callback(min)
- end
- end
- end
- end)
- end
- end
- function Win:Dropdown(name,options,callback)
- callback = callback or function() end
- Container.Size = Container.Size + UDim2.new(0,0,0,30)
- Frame_2.Size = Frame_2.Size + UDim2.new(0,0,0,30)
- local Dropdown = Instance.new("TextLabel")
- local ImageButton = Instance.new("ImageButton")
- local Contain = Instance.new("Frame")
- local UIListLayout_2 = Instance.new("UIListLayout")
- Dropdown.Name = "Dropdown"
- Dropdown.Parent = Frame_2
- Dropdown.Active = true
- Dropdown.BackgroundColor3 = Color3.fromRGB(20, 76, 100)
- Dropdown.BorderSizePixel = 0
- Dropdown.Position = UDim2.new(0, 0, 0.640118599, 0)
- Dropdown.Selectable = true
- Dropdown.Size = UDim2.new(1, 0, 0, 25)
- Dropdown.Font = Enum.Font.ArialBold
- Dropdown.Text = " "..name
- Dropdown.TextScaled = true
- Dropdown.TextColor3 = Color3.fromRGB(255, 255, 255)
- Dropdown.TextSize = 20.000
- Dropdown.TextWrapped = true
- Dropdown.TextXAlignment = Enum.TextXAlignment.Left
- Dropdown.TextYAlignment = Enum.TextYAlignment.Top
- ImageButton.Parent = Dropdown
- ImageButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- ImageButton.BackgroundTransparency = 1.000
- ImageButton.Position = UDim2.new(0, 4, 0.200000003, 0)
- ImageButton.Size = UDim2.new(0, 12, 0, 12)
- ImageButton.Image = "http://www.roblox.com/asset/?id=4897822015"
- ImageButton.ScaleType = Enum.ScaleType.Fit
- ImageButton.SliceCenter = Rect.new(0.5, 0, 0.5, 0)
- ImageButton.SliceScale = 0.500
- Contain.Name = "Contain"
- Contain.Parent = ImageButton
- Contain.BackgroundColor3 = Color3.fromRGB(25, 96, 127)
- Contain.BorderSizePixel = 0
- Contain.Position = UDim2.new(-0.350180298, 0, 1.25000131, 0)
- Contain.Selectable = false
- Contain.Size = UDim2.new(0, 144, 0, 40)
- Contain.Visible = false
- Contain.ZIndex = 3
- local rot = 0
- local tog = 0
- local siz = Contain.Size
- ImageButton.MouseButton1Click:Connect(function()
- if tog == 0 then
- tog = 1
- for i = 1,9 do
- rot = rot + 15
- ImageButton.Rotation = rot
- wait(0.015)
- end
- ImageButton.Image = "http://www.roblox.com/asset/?id=4292970642"
- ImageButton.Rotation = 0
- ImageButton.Contain.Size = UDim2.new(0,144,0,0)
- ImageButton.Contain.Visible = true
- Container.ClipsDescendants = false
- ImageButton.Contain:TweenSize(siz,"Out","Sine",0.4,false,nil)
- wait(0.4)
- rot = 0
- else
- tog = 0
- Contain:TweenSize(UDim2.new(0,144,0,0),"In","Sine",0.4,false,nil)
- wait(0.4)
- Contain.Visible = false
- for i = 1,9 do
- rot = rot + 15
- ImageButton.Rotation = rot
- wait(0.015)
- end
- ImageButton.Rotation = 0
- ImageButton.Image = "http://www.roblox.com/asset/?id=4897822015"
- rot = 0
- Container.ClipsDescendants = true
- end
- end)
- UIListLayout_2.Parent = Contain
- UIListLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
- for i,v in pairs(options) do
- Contain.Size = Contain.Size + UDim2.new(0,0,0,15)
- local Button_2 = Instance.new("TextButton")
- local Sample_3 = Instance.new("ImageLabel")
- Button_2.Name = "Button"
- Button_2.Text = ""..v
- Button_2.Parent = Contain
- Button_2.BackgroundColor3 = Color3.fromRGB(30, 116, 153)
- Button_2.BorderColor3 = Color3.fromRGB(0, 183, 255)
- Button_2.BorderSizePixel = 0
- Button_2.ClipsDescendants = true
- Button_2.Size = UDim2.new(0, 144, 0, 20)
- Button_2.ZIndex = 4
- Button_2.Font = Enum.Font.ArialBold
- Button_2.TextColor3 = Color3.fromRGB(255, 255, 255)
- Button_2.TextSize = 22.000
- Button_2.TextWrapped = true
- Button_2.TextScaled = true
- Button_2.TextYAlignment = Enum.TextYAlignment.Top
- Sample_3.Name = "Sample"
- Sample_3.Parent = Button_2
- Sample_3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Sample_3.BackgroundTransparency = 1.000
- Sample_3.ZIndex = 7
- Sample_3.Image = "http://www.roblox.com/asset/?id=4560909609"
- Sample_3.ImageTransparency = 0.600
- Button_2.MouseButton1Click:Connect(function()
- Contain:TweenSize(UDim2.new(0,144,0,0),"In","Sine",0.4,false,nil)
- wait(0.4)
- Contain.Visible = false
- for i = 1,9 do
- rot = rot + 15
- ImageButton.Rotation = rot
- wait(0.015)
- end
- ImageButton.Rotation = 0
- ImageButton.Image = "http://www.roblox.com/asset/?id=4897822015"
- rot = 0
- Container.ClipsDescendants = true
- tog = 0
- Dropdown.Text = " "..v
- callback(v)
- end)
- Button_2.MouseButton1Click:Connect(function()
- local ms = game.Players.LocalPlayer:GetMouse()
- local btn = Button_2
- local sample = Sample_3
- local c = sample:Clone()
- c.Parent = btn
- local x, y = (ms.X - c.AbsolutePosition.X), (ms.Y - c.AbsolutePosition.Y)
- c.Position = UDim2.new(0, x, 0, y)
- local len, size = 0.35, nil
- if btn.AbsoluteSize.X >= btn.AbsoluteSize.Y then
- size = (btn.AbsoluteSize.X * 1.5)
- else
- size = (btn.AbsoluteSize.Y * 1.5)
- end
- c:TweenSizeAndPosition(UDim2.new(0, size, 0, size), UDim2.new(0.5, (-size / 2), 0.5, (-size / 2)), 'Out', 'Quad', len, true, nil)
- for i = 1, 10 do
- c.ImageTransparency = c.ImageTransparency + 0.05
- wait(len / 12)
- end
- c:Destroy()
- end)
- end
- end
- function Win:ColorPicker(name,callback)
- Container.Size = Container.Size + UDim2.new(0,0,0,30)
- Frame_2.Size = Frame_2.Size + UDim2.new(0,0,0,30)
- callback = callback or function()end
- local ColorPicker = Instance.new("TextLabel")
- local TextButton_3 = Instance.new("TextButton")
- local HSV = Instance.new("ImageButton")
- local Arrow = Instance.new("ImageLabel")
- ColorPicker.Name = "Color Picker"
- ColorPicker.Parent = Frame_2
- ColorPicker.Active = true
- ColorPicker.BackgroundColor3 = Color3.fromRGB(20, 76, 100)
- ColorPicker.BorderSizePixel = 0
- ColorPicker.Position = UDim2.new(0, 0, 0.651674449, 0)
- ColorPicker.Selectable = true
- ColorPicker.Size = UDim2.new(0, 114, 0, 20)
- ColorPicker.Font = Enum.Font.ArialBold
- ColorPicker.Text = " "..name
- ColorPicker.TextColor3 = Color3.fromRGB(255, 255, 255)
- ColorPicker.TextScaled = true
- ColorPicker.TextSize = 20.000
- ColorPicker.TextWrapped = true
- ColorPicker.TextXAlignment = Enum.TextXAlignment.Left
- ColorPicker.TextYAlignment = Enum.TextYAlignment.Top
- TextButton_3.Parent = ColorPicker
- TextButton_3.BackgroundColor3 = Color3.fromRGB(25, 96, 127)
- TextButton_3.BorderColor3 = Color3.fromRGB(0, 183, 255)
- TextButton_3.BorderSizePixel = 0
- TextButton_3.Position = UDim2.new(0.999984562, 0, 0, 0)
- TextButton_3.Size = UDim2.new(0, 30, 0, 20)
- TextButton_3.Font = Enum.Font.SourceSans
- TextButton_3.Text = " "
- TextButton_3.TextColor3 = Color3.fromRGB(0, 183, 255)
- TextButton_3.TextScaled = true
- TextButton_3.TextSize = 14.000
- TextButton_3.TextWrapped = true
- HSV.Name = "HSV"
- HSV.Parent = TextButton_3
- HSV.Active = false
- HSV.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- HSV.BackgroundTransparency = 1.000
- HSV.Position = UDim2.new(1.50446069, 0, 0, 0)
- HSV.Selectable = false
- HSV.Size = UDim2.new(0, 0, 0.699999988, 6)
- HSV.Image = "rbxassetid://4613607014"
- Arrow.Name = "Arrow"
- Arrow.Parent = HSV
- Arrow.AnchorPoint = Vector2.new(0.5, 0.5)
- Arrow.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Arrow.BackgroundTransparency = 1.000
- Arrow.Position = UDim2.new(0.5, 0, 0.349999994, -6)
- Arrow.Rotation = -90.000
- Arrow.Size = UDim2.new(0, 6, 0, 6)
- Arrow.Visible = false
- Arrow.ZIndex = 3
- Arrow.Image = "rbxassetid://2500573769"
- Arrow.ImageTransparency = 0.250
- local t = 0
- local be = UDim2.new(2.529,0,0.7,6)
- local af = UDim2.new(0,0,0.7,6)
- TextButton_3.MouseButton1Click:Connect(function()
- if t == 0 then
- t = 1
- Container.ClipsDescendants = false
- Arrow.Visible = true
- HSV:TweenSize(be,"Out","Sine",0.4,false,nil)wait(0.4)
- else
- t = 0
- Arrow.Visible = false
- HSV:TweenSize(af,"In","Sine",0.4,false,nil)wait(0.4)
- Container.ClipsDescendants = true
- end
- end)
- local value
- local last = value
- HSV.MouseButton1Down:Connect(function()
- local rs = game:GetService("RunService")
- local uis = game:GetService("UserInputService")
- HSV.Image = "rbxassetid://4613607014"
- while uis:IsMouseButtonPressed'MouseButton1' do
- local mouseloc = uis:GetMouseLocation()
- local sx = Arrow.AbsoluteSize.X / 2;
- local offset = (mouseloc.x - HSV.AbsolutePosition.X) - sx
- local scale = offset / HSV.AbsoluteSize.X
- local position = math.clamp(offset, -sx, HSV.AbsoluteSize.X - sx) / HSV.AbsoluteSize.X
- game:GetService("TweenService"):Create(Arrow, TweenInfo.new(0.1), {Position = UDim2.new(position, 0, 0.35, -6)}):Play()
- value = Color3.fromHSV(math.clamp(scale, 0, 1), 1, 1)
- rs.RenderStepped:wait()
- TextButton_3.BackgroundColor3 =value
- callback(TextButton_3.BackgroundColor3)
- end
- end)
- HSV.MouseButton2Down:Connect(function()
- local rs = game:GetService("RunService")
- local uis = game:GetService("UserInputService")
- HSV.Image = "rbxassetid://4613627894"
- while uis:IsMouseButtonPressed'MouseButton2' do
- local mouseloc = uis:GetMouseLocation()
- local sx = Arrow.AbsoluteSize.X / 2
- local offset = (mouseloc.x - HSV.AbsolutePosition.X) - sx
- local scale = offset / HSV.AbsoluteSize.X
- local position = math.clamp(offset, -sx, HSV.AbsoluteSize.X - sx) / HSV.AbsoluteSize.X
- game:GetService("TweenService"):Create(Arrow, TweenInfo.new(0.1), {Position = UDim2.new(position, 0, 0.35, -6)}):Play()
- value = Color3.fromHSV(1, 0, 1 - math.clamp(scale, 0, 1))
- rs.RenderStepped:wait()
- TextButton_3.BackgroundColor3 =value
- callback(TextButton_3.BackgroundColor3)
- end
- end)
- end
- return Win;
- end
- return Lib;
Advertisement
Add Comment
Please, Sign In to add comment