Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local library = {}
- function library:NewWindow(title)
- title = (type(title) ~= "string") and "Title" or title
- -- Variables
- local uis = game:GetService("UserInputService")
- local tweenService = game:GetService("TweenService")
- local marketPlaceService = game:GetService("MarketplaceService")
- local runService = game:GetService("RunService")
- local player = game.Players.LocalPlayer
- local mouse = player:GetMouse()
- local gameName = marketPlaceService:GetProductInfo(game.PlaceId).Name
- -- Gui
- local ScreenGui = Instance.new("ScreenGui")
- local Menu = Instance.new("Frame")
- local Exit = Instance.new("TextButton")
- local close = Instance.new("ImageButton")
- local Minimize = Instance.new("TextButton")
- local expand = Instance.new("ImageButton")
- local UICorner = Instance.new("UICorner")
- local Title = Instance.new("TextLabel")
- local Background = Instance.new("Frame")
- local Title_2 = Instance.new("TextLabel")
- local TabContainer = Instance.new("ScrollingFrame")
- local UIListLayout = Instance.new("UIListLayout")
- local FramesContainer = Instance.new("Frame")
- local UIStroke = Instance.new("UIStroke")
- local UIStroke_1 = Instance.new("UIStroke")
- local UIStroke_2 = Instance.new("UIStroke")
- local Pattern = Instance.new("ImageLabel")
- ScreenGui.Parent = player.PlayerGui
- ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- ScreenGui.ResetOnSpawn = false
- Menu.Name = "Menu"
- Menu.Parent = ScreenGui
- Menu.Active = true
- Menu.AnchorPoint = Vector2.new(0.5, 0.5)
- Menu.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
- Menu.Position = UDim2.new(0.483785242, 0, 0.333065808, 0)
- Menu.Size = UDim2.new(0, 485, 0, 15)
- Menu.ZIndex = 1
- UIStroke.Parent = Menu
- Exit.Name = "Exit"
- Exit.Parent = Menu
- Exit.AnchorPoint = Vector2.new(0.5, 0.5)
- Exit.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
- Exit.BorderSizePixel = 0
- Exit.Position = UDim2.new(0.973371148, 0, 0.5, 0)
- Exit.Size = UDim2.new(0, 25, 0, 15)
- Exit.Font = Enum.Font.SourceSans
- Exit.Text = ""
- Exit.TextColor3 = Color3.fromRGB(0, 0, 0)
- Exit.TextSize = 14.000
- Exit.AutoButtonColor = false
- close.Name = "close"
- close.Parent = Exit
- close.AnchorPoint = Vector2.new(0.5, 0.5)
- close.BackgroundTransparency = 1.000
- close.Position = UDim2.new(0.5, 0, 0.5, 0)
- close.Size = UDim2.new(0, 15, 0, 15)
- close.ZIndex = 0
- close.Image = "rbxassetid://3926305904"
- close.ImageRectOffset = Vector2.new(284, 4)
- close.ImageRectSize = Vector2.new(24, 24)
- Minimize.Name = "Minimize"
- Minimize.Parent = Menu
- Minimize.AnchorPoint = Vector2.new(0.5, 0.5)
- Minimize.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
- Minimize.BorderSizePixel = 0
- Minimize.Position = UDim2.new(0.93237114, 0, 0.5, 0)
- Minimize.Size = UDim2.new(0, 25, 0, 15)
- Minimize.Font = Enum.Font.SourceSans
- Minimize.Text = ""
- Minimize.TextColor3 = Color3.fromRGB(0, 0, 0)
- Minimize.TextSize = 14.000
- Minimize.AutoButtonColor = false
- expand.Name = "expand"
- expand.Parent = Minimize
- expand.AnchorPoint = Vector2.new(0.5, 0.5)
- expand.BackgroundTransparency = 1.000
- expand.Position = UDim2.new(0.5, 0, 0.5, 0)
- expand.Size = UDim2.new(0, 15, 0, 15)
- expand.ZIndex = 0
- expand.Rotation = 180
- expand.Image = "rbxassetid://3926305904"
- expand.ImageRectOffset = Vector2.new(564, 284)
- expand.ImageRectSize = Vector2.new(36, 36)
- UICorner.CornerRadius = UDim.new(0, 6)
- UICorner.Parent = Menu
- Title.Name = "Title"
- Title.Parent = Menu
- Title.AnchorPoint = Vector2.new(0.5, 0.5)
- Title.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
- Title.BackgroundTransparency = 1.000
- Title.BorderSizePixel = 0
- Title.Position = UDim2.new(0.453092545, 0, 0.5, 0)
- Title.Size = UDim2.new(0, 439, 0, 14)
- Title.Font = Enum.Font.Code
- Title.Text = title
- Title.TextColor3 = Color3.fromRGB(255, 255, 255)
- Title.TextSize = 14.000
- Background.Name = "Background"
- Background.Parent = Menu
- Background.AnchorPoint = Vector2.new(0.5, 0.5)
- Background.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- Background.BorderSizePixel = 0
- Background.Position = UDim2.new(0.5, 0, 9.86166763, 0)
- Background.Size = UDim2.new(0, 485, 0, 269)
- Background.ClipsDescendants = true
- UIStroke_1.Parent = Background
- Pattern.Name = "Pattern"
- Pattern.Parent = Background
- Pattern.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Pattern.BackgroundTransparency = 1.000
- Pattern.Position = UDim2.new(0.316494852, 0, 3.72110262e-05, 0)
- Pattern.Size = UDim2.new(0, 331, 1000, 409)
- Pattern.ZIndex = -1
- Pattern.Image = "rbxassetid://2151741365"
- Pattern.ScaleType = Enum.ScaleType.Tile
- Pattern.SliceCenter = Rect.new(0, 256, 0, 256)
- Pattern.TileSize = UDim2.new(0, 30, 0, 60)
- Title_2.Name = "Title"
- Title_2.Parent = Background
- Title_2.AnchorPoint = Vector2.new(0.5, 0.5)
- Title_2.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
- Title_2.BorderSizePixel = 0
- Title_2.Position = UDim2.new(0.158734515, 0, 0.0781041235, 0)
- Title_2.Size = UDim2.new(0, 154, 0, 42)
- Title_2.Font = Enum.Font.Code
- Title_2.Text = gameName
- Title_2.TextColor3 = Color3.fromRGB(255, 255, 255)
- Title_2.TextSize = 14.000
- Title_2.TextScaled = true
- TabContainer.Name = "TabContainer"
- TabContainer.Parent = Background
- TabContainer.Active = true
- TabContainer.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
- TabContainer.BorderSizePixel = 0
- TabContainer.Position = UDim2.new(0, 0, 0.156208143, 0)
- TabContainer.Size = UDim2.new(0, 154, 0, 227)
- TabContainer.ScrollBarThickness = 8
- UIStroke_2.Parent = TabContainer
- UIListLayout.Parent = TabContainer
- UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
- UIListLayout.Padding = UDim.new(0, 5)
- FramesContainer.Name = "FramesContainer"
- FramesContainer.Parent = Background
- FramesContainer.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- FramesContainer.BackgroundTransparency = 1.000
- FramesContainer.Position = UDim2.new(0.317525774, 0, 0, 0)
- FramesContainer.Size = UDim2.new(0, 331, 0, 268)
- FramesContainer.ZIndex = 0
- -- Local Functions
- local function createContainer(parent)
- local Container = Instance.new("Frame")
- local UICorner = Instance.new("UICorner")
- local UIStroke = Instance.new("UIStroke")
- Container.Name = "Container"
- Container.Parent = parent
- Container.AnchorPoint = Vector2.new(0.5, 0.5)
- Container.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
- Container.BorderSizePixel = 0
- Container.Position = UDim2.new(0.487915397, 0, 0.490423739, 0)
- Container.Size = UDim2.new(0, 323, 0, 40)
- UICorner.Parent = Container
- UIStroke.Parent = Container
- return Container
- end
- local function hideFrames()
- for i,v in pairs(FramesContainer:GetChildren()) do
- v.Visible = false
- end
- end
- local function resetTabColor()
- for i, v in pairs(TabContainer:GetChildren()) do
- if v:IsA("TextButton") then
- v.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
- end
- end
- end
- local function buttonClickEffect(parent)
- parent.ClipsDescendants = true
- local mouseLocation = uis:GetMouseLocation()
- local absolutePosition = parent.AbsolutePosition
- local effectXPosition = UDim2.new(0, mouseLocation.X-absolutePosition.X, 0, (mouseLocation.Y-absolutePosition.Y)-36)
- local ButtonEffect = Instance.new("ImageLabel")
- ButtonEffect.Name = "ButtonEffect"
- ButtonEffect.Parent = parent
- ButtonEffect.AnchorPoint = Vector2.new(0.5, 0.5)
- ButtonEffect.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- ButtonEffect.BackgroundTransparency = 1.000
- ButtonEffect.BorderSizePixel = 0
- ButtonEffect.Position = UDim2.new(0, 0, 0, 0)
- ButtonEffect.Size = UDim2.new(0, 25, 0, 25)
- ButtonEffect.Image = "rbxassetid://7658630902"
- ButtonEffect.ImageTransparency = 0.500
- ButtonEffect.Position = effectXPosition
- ButtonEffect:TweenSize(UDim2.new(0, 200, 0, 200))
- spawn(function()
- for i = 0.5, 1.05, 0.05 do
- ButtonEffect.ImageTransparency = i
- if i >= 1 then
- ButtonEffect:Destroy()
- end
- wait()
- end
- end)
- end
- local function dropdownEffect(parent, ui, itemType, visible, rot1, rot2)
- if parent ~= nil and itemType ~= nil then
- task.spawn(function()
- for i, v in pairs(parent:GetChildren()) do
- if v:IsA(itemType) then
- v.Visible = visible
- task.wait()
- end
- end
- end)
- end
- local properties = (visible == true) and {
- Rotation = rot1
- } or {
- Rotation = rot2
- }
- local info = TweenInfo.new(0.5)
- local tween = tweenService:Create(ui, info, properties)
- tween:Play()
- end
- local visible = true
- local debounce = false
- local function minimize()
- if debounce == false then
- debounce = true
- visible = not visible
- local sizeAndPos = visible == true and {
- UDim2.new(0, 485, 0, 269),
- UDim2.new(0.5, 0, 9.86166763, 0)
- } or {
- UDim2.new(0, 485, 0, 0),
- UDim2.new(0.5, 0, 1, 0)
- }
- Background:TweenSizeAndPosition(sizeAndPos[1], sizeAndPos[2])
- dropdownEffect(nil, expand, nil, visible, 180, 0)
- task.wait(1)
- debounce = false
- end
- end
- local function setDraggable()
- Menu.Active = true
- Menu.Draggable = true
- end
- local function exit()
- ScreenGui:Destroy()
- end
- -- Call Functions
- setDraggable()
- close.MouseButton1Down:Connect(exit)
- expand.MouseButton1Down:Connect(minimize)
- -- Tab
- local library2 = {}
- function library2:NewTab(text)
- text = (type(text) ~= "string") and "Tab" or text
- local Tab = Instance.new("TextButton")
- local ScrollingFrame = Instance.new("ScrollingFrame")
- local UIListLayout_2 = Instance.new("UIListLayout")
- local UIStroke = Instance.new("UIStroke")
- Tab.Name = "Tab"
- Tab.Parent = TabContainer
- Tab.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
- Tab.Size = UDim2.new(0, 147,0, 35)
- Tab.Font = Enum.Font.Code
- Tab.BorderSizePixel = 0
- Tab.Text = text
- Tab.TextColor3 = Color3.fromRGB(255, 255, 255)
- Tab.TextSize = 17.000
- Tab.AutoButtonColor = false
- ScrollingFrame.Parent = FramesContainer
- ScrollingFrame.Active = true
- ScrollingFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- ScrollingFrame.BackgroundTransparency = 1.000
- ScrollingFrame.BorderSizePixel = 0
- ScrollingFrame.Size = UDim2.new(0, 331, 0, 268)
- ScrollingFrame.ScrollBarThickness = 8
- ScrollingFrame.AutomaticCanvasSize = Enum.AutomaticSize.Y
- UIListLayout_2.Parent = ScrollingFrame
- UIListLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
- UIListLayout_2.Padding = UDim.new(0, 0)
- hideFrames()
- Tab.MouseButton1Down:Connect(function()
- buttonClickEffect(Tab)
- resetTabColor()
- hideFrames()
- ScrollingFrame.Visible = true
- Tab.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
- end)
- local library3 = {}
- function library3:NewSection(text)
- text = (type(text) ~= "string") and "Section" or text
- local Section = Instance.new("Frame")
- local SectionText = Instance.new("TextLabel")
- local UICorner_4 = Instance.new("UICorner")
- local expand_2 = Instance.new("ImageButton")
- local Frame = Instance.new("Frame")
- local UICorner_5 = Instance.new("UICorner")
- local UIListLayout_3 = Instance.new("UIListLayout")
- local UIStroke = Instance.new("UIStroke")
- local UIStroke_1 = Instance.new("UIStroke")
- local visible = false
- Section.Name = "Section"
- Section.Parent = ScrollingFrame
- Section.BackgroundColor3 = Color3.fromRGB(17, 17, 17)
- Section.BorderSizePixel = 0
- Section.Size = UDim2.new(0, 331, 0, 53)
- Section.AutomaticSize = Enum.AutomaticSize.Y
- UIStroke.Parent = Section
- SectionText.Name = "SectionText"
- SectionText.Parent = Section
- SectionText.BackgroundColor3 = Color3.fromRGB(15, 15, 15)
- SectionText.BorderSizePixel = 0
- SectionText.Size = UDim2.new(0, 323, 0, 40)
- SectionText.Font = Enum.Font.SourceSans
- SectionText.Text = text
- SectionText.TextColor3 = Color3.fromRGB(255, 255, 255)
- SectionText.TextSize = 25.000
- UICorner_4.Parent = SectionText
- expand_2.Name = "expand"
- expand_2.Parent = SectionText
- expand_2.AnchorPoint = Vector2.new(0.5, 0.5)
- expand_2.BackgroundTransparency = 1.000
- expand_2.Position = UDim2.new(0.0799999982, 0, 0.5, 0)
- expand_2.Size = UDim2.new(0, 25, 0, 25)
- expand_2.ZIndex = 2
- expand_2.Image = "rbxassetid://3926305904"
- expand_2.ImageRectOffset = Vector2.new(564, 284)
- expand_2.ImageRectSize = Vector2.new(36, 36)
- expand_2.Rotation = -180
- Frame.Parent = SectionText
- Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Frame.BackgroundTransparency = 1.000
- Frame.Size = UDim2.new(0, 322, 0, 40)
- UICorner_5.Parent = Frame
- UIStroke_1.Parent = Frame
- UIListLayout_3.Parent = Section
- UIListLayout_3.SortOrder = Enum.SortOrder.LayoutOrder
- UIListLayout_3.Padding = UDim.new(0, 7)
- expand_2.MouseButton1Down:Connect(function()
- visible = not visible
- dropdownEffect(Section, expand_2, "Frame", visible, -180, -90)
- end)
- local library4 = {}
- function library4:NewButton(text, callback)
- text = (type(text) ~= "string") and "Button" or text
- callback = (type(callback) ~= "function") and function()
- print("Clicked!")
- end or callback
- local TextButton = Instance.new("TextButton")
- local UICorner_9 = Instance.new("UICorner")
- local TextLabel_2 = Instance.new("TextLabel")
- local Container = createContainer(Section)
- TextButton.Parent = Container
- TextButton.AnchorPoint = Vector2.new(0.5, 0.5)
- TextButton.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
- TextButton.Position = UDim2.new(0.688, 0, 0.483, 0)
- TextButton.Size = UDim2.new(0, 195, 0, 36)
- TextButton.Font = Enum.Font.Code
- TextButton.Text = "Click"
- TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton.TextSize = 14.000
- TextButton.AutoButtonColor = false
- UICorner_9.Parent = TextButton
- TextLabel_2.Parent = Container
- TextLabel_2.AnchorPoint = Vector2.new(0.5, 0.5)
- TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_2.BackgroundTransparency = 1.000
- TextLabel_2.Position = UDim2.new(0.185, 0, 0.5, 0)
- TextLabel_2.Size = UDim2.new(0, 120, 0, 50)
- TextLabel_2.Font = Enum.Font.Code
- TextLabel_2.Text = text
- TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_2.TextSize = 14.000
- TextButton.MouseButton1Down:Connect(function()
- buttonClickEffect(TextButton)
- callback()
- end)
- end
- function library4:NewTextBox(text, callback)
- text = (type(text) ~= "string") and "TextBox" or text
- callback = (type(callback) ~= "function") and function()
- print("Lost Focus!")
- end or callback
- local UICorner_6 = Instance.new("UICorner")
- local TextBox = Instance.new("TextBox")
- local UICorner_7 = Instance.new("UICorner")
- local TextLabel = Instance.new("TextLabel")
- local Container = createContainer(Section)
- TextBox.Parent = Container
- TextBox.AnchorPoint = Vector2.new(0.5, 0.5)
- TextBox.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
- TextBox.Position = UDim2.new(0.688, 0, 0.483, 0)
- TextBox.Size = UDim2.new(0, 195, 0, 36)
- TextBox.Font = Enum.Font.SourceSans
- TextBox.PlaceholderText = "TextBox"
- TextBox.Text = ""
- TextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextBox.TextSize = 14.000
- TextBox.TextStrokeColor3 = Color3.fromRGB(255, 255, 255)
- UICorner_7.Parent = TextBox
- TextLabel.Parent = TextBox
- TextLabel.AnchorPoint = Vector2.new(0.5, 0.5)
- TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.BackgroundTransparency = 1.000
- TextLabel.Position = UDim2.new(-0.326, 0, 0.5, 0)
- TextLabel.Size = UDim2.new(0, 120, 0, 50)
- TextLabel.Font = Enum.Font.Code
- TextLabel.Text = text
- TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.TextSize = 14.000
- TextBox.FocusLost:Connect(function()
- callback(TextBox.Text)
- end)
- end
- function library4:NewToggle(text, callback)
- text = (type(text) ~= "string") and "Toggle" or text
- callback = (type(callback) ~= "function") and function()
- print("Toggled!")
- end or callback
- local Toggle = Instance.new("Frame")
- local UICorner_15 = Instance.new("UICorner")
- local check = Instance.new("ImageButton")
- local TextLabel_5 = Instance.new("TextLabel")
- local Container = createContainer(Section)
- local toggled = true
- UICorner_15.CornerRadius = UDim.new(1, 0)
- UICorner_15.Parent = Toggle
- Toggle.Name = "Toggle"
- Toggle.Parent = Container
- Toggle.AnchorPoint = Vector2.new(0.5, 0.5)
- Toggle.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
- Toggle.Position = UDim2.new(0.88499999, 0, 0.5, 0)
- Toggle.Size = UDim2.new(0, 35, 0, 35)
- check.Name = "check"
- check.Parent = Toggle
- check.AnchorPoint = Vector2.new(0.5, 0.5)
- check.BackgroundTransparency = 1.000
- check.Position = UDim2.new(0.5, 0, 0.5, 0)
- check.Size = UDim2.new(0, 30, 0, 30)
- check.ZIndex = 2
- check.Image = "rbxassetid://3926305904"
- check.ImageColor3 = Color3.fromRGB(255, 255, 0)
- check.ImageRectOffset = Vector2.new(312, 4)
- check.ImageRectSize = Vector2.new(24, 24)
- TextLabel_5.Parent = Toggle
- TextLabel_5.AnchorPoint = Vector2.new(0.5, 0.5)
- TextLabel_5.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_5.BackgroundTransparency = 1.000
- TextLabel_5.Position = UDim2.new(-3.9, 0, 0.5, 0)
- TextLabel_5.Size = UDim2.new(0, 255, 0, 40)
- TextLabel_5.Font = Enum.Font.Code
- TextLabel_5.Text = text
- TextLabel_5.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_5.TextSize = 14.000
- TextLabel_5.TextXAlignment = Enum.TextXAlignment.Right
- check.MouseButton1Down:Connect(function()
- toggled = not toggled
- check.ImageTransparency = (toggled == true) and 0 or 1
- callback(toggled)
- end)
- end
- function library4:NewSlider(text, min, max, callback)
- text = (type(text) ~= "string") and "Slider" or text
- min = (type(min) ~= "number") and 0 or min
- max = (type(max) ~= "number") and 10 or max
- callback = (type(callback) ~= "function") and function()
- print("Moved Slider!")
- end or callback
- local Slider = Instance.new("Frame")
- local TextLabel_3 = Instance.new("TextLabel")
- local TextLabel_4 = Instance.new("TextLabel")
- local UICorner_10 = Instance.new("UICorner")
- local FillFrame = Instance.new("Frame")
- local UICorner_11 = Instance.new("UICorner")
- local SliderButton = Instance.new("TextButton")
- local UICorner_12 = Instance.new("UICorner")
- local UICorner_13 = Instance.new("UICorner")
- local UICorner_14 = Instance.new("UICorner")
- local Container = createContainer(Section)
- local holding = false
- Slider.Name = "Slider"
- Slider.Parent = Container
- Slider.AnchorPoint = Vector2.new(0.5, 0.5)
- Slider.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
- Slider.Position = UDim2.new(0.672542334, 0, 0.50999999, 0)
- Slider.Size = UDim2.new(0, 175, 0, 7)
- TextLabel_3.Parent = Slider
- TextLabel_3.AnchorPoint = Vector2.new(0.5, 0.5)
- TextLabel_3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_3.BackgroundTransparency = 1.000
- TextLabel_3.Position = UDim2.new(-0.511904776, 0, 0.5, 0)
- TextLabel_3.Size = UDim2.new(0, 82, 0, 40)
- TextLabel_3.Font = Enum.Font.Code
- TextLabel_3.Text = text
- TextLabel_3.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_3.TextSize = 14.000
- TextLabel_4.Parent = Slider
- TextLabel_4.AnchorPoint = Vector2.new(0.5, 0.5)
- TextLabel_4.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_4.BackgroundTransparency = 1.000
- TextLabel_4.Position = UDim2.new(-0.145238101, 0, 0.5, 0)
- TextLabel_4.Size = UDim2.new(0, 50, 0, 40)
- TextLabel_4.Font = Enum.Font.Code
- TextLabel_4.Text = min
- TextLabel_4.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_4.TextSize = 14.000
- UICorner_10.Parent = Slider
- FillFrame.Name = "FillFrame"
- FillFrame.Parent = Slider
- FillFrame.AnchorPoint = Vector2.new(0.5, 0.5)
- FillFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 0)
- FillFrame.Position = UDim2.new(0, 0, 0.5, 0)
- FillFrame.Size = UDim2.new(0, 0, 0, 7)
- FillFrame.ZIndex = 0
- UICorner_11.Parent = FillFrame
- SliderButton.Name = "SliderButton"
- SliderButton.Parent = Slider
- SliderButton.AnchorPoint = Vector2.new(0.5, 0.5)
- SliderButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- SliderButton.Position = UDim2.new(0, 0, 0.5, 0)
- SliderButton.Size = UDim2.new(0, 7, 0, 7)
- SliderButton.Font = Enum.Font.SourceSans
- SliderButton.Text = ""
- SliderButton.TextColor3 = Color3.fromRGB(0, 0, 0)
- SliderButton.TextSize = 14.000
- SliderButton.AutoButtonColor = false
- UICorner_12.CornerRadius = UDim.new(1, 0)
- UICorner_12.Parent = SliderButton
- SliderButton.MouseButton1Down:Connect(function()
- holding = true
- SliderButton.Size = UDim2.new(0, 9, 0, 9)
- end)
- SliderButton.MouseButton1Up:Connect(function()
- holding = false
- SliderButton.Size = UDim2.new(0, 7, 0, 7)
- end)
- runService.Heartbeat:Connect(function()
- if holding then
- local mouseLocation = uis:GetMouseLocation()
- local xPos = (mouseLocation.X-Slider.AbsolutePosition.X)/Slider.AbsoluteSize.X
- xPos = math.clamp(xPos, 0, 1)
- local value = math.ceil( min + (xPos * (max-min)) )
- TextLabel_4.Text = tostring(value)
- FillFrame.Size = UDim2.new(xPos, 0, 0, 7)
- FillFrame.Position = UDim2.new(xPos/2, 0, 0.5, 0)
- SliderButton.Position = UDim2.new(xPos, 0, 0.5, 0)
- callback(value)
- end
- end)
- end
- function library4:NewDropdown(text, items, callback)
- text = (type(text) ~= "string") and "Dropdown" or text
- items = (type(items) ~= "table") and {} or items
- callback = (type(callback) ~= "function") and function()
- print("Selected Item!")
- end or callback
- local UICorner = Instance.new("UICorner")
- local Dropdown = Instance.new("Frame")
- local expand = Instance.new("ImageButton")
- local TextLabel = Instance.new("TextLabel")
- local UIGridLayout = Instance.new("UIGridLayout")
- local Container = createContainer(Section)
- local TextLabel = Instance.new("TextLabel")
- local TextLabel_2 = Instance.new("TextLabel")
- local visible = true
- Container.AutomaticSize = Enum.AutomaticSize.Y
- Dropdown.Name = "Dropdown"
- Dropdown.Parent = Container
- Dropdown.AnchorPoint = Vector2.new(0.5, 0.5)
- Dropdown.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Dropdown.BackgroundTransparency = 1.000
- Dropdown.Position = UDim2.new(0.5, 0, 0.5, 0)
- Dropdown.Size = UDim2.new(0, 323, 0, 40)
- expand.Name = "expand"
- expand.Parent = Dropdown
- expand.AnchorPoint = Vector2.new(0.5, 0.5)
- expand.BackgroundTransparency = 1.000
- expand.Position = UDim2.new(0.89009285, 0, 0.5, 0)
- expand.Size = UDim2.new(0, 25, 0, 25)
- expand.ZIndex = 2
- expand.Image = "rbxassetid://3926305904"
- expand.ImageRectOffset = Vector2.new(564, 284)
- expand.ImageRectSize = Vector2.new(36, 36)
- expand.Rotation = -180
- TextLabel.Parent = Dropdown
- TextLabel.AnchorPoint = Vector2.new(0.5, 0.5)
- TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.BackgroundTransparency = 1.000
- TextLabel.Position = UDim2.new(0.695404172, 0, 0.5, 0)
- TextLabel.Size = UDim2.new(0, 90, 0, 40)
- TextLabel.Font = Enum.Font.Code
- TextLabel.Text = text
- TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.TextSize = 14.000
- TextLabel.TextWrapped = true
- TextLabel.TextXAlignment = Enum.TextXAlignment.Right
- TextLabel_2.Parent = Dropdown
- TextLabel_2.AnchorPoint = Vector2.new(0.5, 0.5)
- TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_2.BackgroundTransparency = 1.000
- TextLabel_2.Position = UDim2.new(0.282865435, 0, 0.5, 0)
- TextLabel_2.Size = UDim2.new(0, 176, 0, 40)
- TextLabel_2.Font = Enum.Font.Code
- TextLabel_2.Text = "Selected: nil"
- TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_2.TextSize = 14.000
- TextLabel_2.TextWrapped = true
- TextLabel_2.TextXAlignment = Enum.TextXAlignment.Right
- UIGridLayout.Parent = Container
- UIGridLayout.SortOrder = Enum.SortOrder.LayoutOrder
- UIGridLayout.CellSize = UDim2.new(0, 323, 0, 40)
- for i, item in pairs(items) do
- item = (typeof(item) == "Instance") and item.Name or item
- print(item)
- local Item = Instance.new("TextButton")
- Item.Name = "Item"
- Item.Parent = Container
- Item.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
- Item.Size = UDim2.new(0, 200, 0, 50)
- Item.Font = Enum.Font.Code
- Item.Text = item
- Item.TextColor3 = Color3.fromRGB(255, 255, 255)
- Item.TextSize = 14.000
- Item.AutoButtonColor = false
- Item.BorderSizePixel = 0
- Item.MouseButton1Down:Connect(function()
- visible = not visible
- TextLabel_2.Text = "Selected: "..item
- buttonClickEffect(Frame)
- dropdownEffect(Container, expand, "TextButton", visible, -180, -90)
- callback(item)
- end)
- end
- expand.MouseButton1Down:Connect(function()
- visible = not visible
- dropdownEffect(Container, expand, "TextButton", visible, -180, -90)
- end)
- end
- return library4
- end
- return library3
- end
- return library2
- end
- return library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement