Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local library = {}
- function library:NewWindow(title)
- local uis = game:GetService("UserInputService")
- local player = game.Players.LocalPlayer
- local mouse = player:GetMouse()
- local ScreenGui = Instance.new("ScreenGui")
- local Menu = Instance.new("Frame")
- local Background = Instance.new("Frame")
- local SideButtons = Instance.new("ScrollingFrame")
- local UIGridLayout = Instance.new("UIGridLayout")
- local Frames = Instance.new("Frame")
- local Exit = Instance.new("TextButton")
- local Title = Instance.new("TextLabel")
- ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Menu.Name = "Menu"
- Menu.Parent = ScreenGui
- Menu.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- Menu.BorderSizePixel = 0
- Menu.Position = UDim2.new(0.265135705, 0, 0.329052985, 0)
- Menu.Size = UDim2.new(0, 450, 0, 15)
- Background.Name = "Background"
- Background.Parent = Menu
- Background.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
- Background.BorderSizePixel = 0
- Background.Position = UDim2.new(0, 0, 0.999998987, 0)
- Background.Size = UDim2.new(0, 450, 0, 290)
- SideButtons.Name = "SideButtons"
- SideButtons.Parent = Background
- SideButtons.Active = true
- SideButtons.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- SideButtons.BorderSizePixel = 0
- SideButtons.Size = UDim2.new(0, 120, 0, 290)
- UIGridLayout.Parent = SideButtons
- UIGridLayout.SortOrder = Enum.SortOrder.LayoutOrder
- UIGridLayout.CellSize = UDim2.new(0, 120, 0, 35)
- Frames.Name = "Frames"
- Frames.Parent = Background
- Frames.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Frames.BackgroundTransparency = 1.000
- Frames.BorderSizePixel = 0
- Frames.Position = UDim2.new(0.266666681, 0, 0, 0)
- Frames.Size = UDim2.new(0, 330, 0, 290)
- Exit.Name = "Exit"
- Exit.Parent = Menu
- Exit.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- Exit.BorderSizePixel = 0
- Exit.Position = UDim2.new(0.967000008, 0, 0, 0)
- Exit.Size = UDim2.new(0, 15, 0, 15)
- Exit.Font = Enum.Font.SourceSans
- Exit.Text = "X"
- Exit.TextColor3 = Color3.fromRGB(255, 255, 255)
- Exit.TextSize = 14.000
- Title.Name = "Title"
- Title.Parent = Menu
- Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Title.BackgroundTransparency = 1.000
- Title.BorderSizePixel = 0
- Title.Size = UDim2.new(0, 435, 0, 15)
- Title.Font = Enum.Font.SourceSans
- Title.Text = title
- Title.TextColor3 = Color3.fromRGB(255, 255, 255)
- Title.TextSize = 14.000
- local library2 = {}
- function library2:NewTab(text)
- local TextButton = Instance.new("TextButton")
- local ScrollingFrame = Instance.new("ScrollingFrame")
- local UIGridLayout_2 = Instance.new("UIGridLayout")
- TextButton.Parent = SideButtons
- TextButton.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- TextButton.BorderSizePixel = 0
- TextButton.Size = UDim2.new(0, 200, 0, 50)
- TextButton.Font = Enum.Font.SourceSans
- TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton.TextSize = 14.000
- TextButton.Text = text
- ScrollingFrame.Parent = Frames
- ScrollingFrame.Active = true
- ScrollingFrame.BackgroundColor3 = Color3.fromRGB(60, 50, 50)
- ScrollingFrame.BorderSizePixel = 0
- ScrollingFrame.Size = UDim2.new(0, 330, 0, 290)
- UIGridLayout_2.Parent = ScrollingFrame
- UIGridLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
- UIGridLayout_2.CellSize = UDim2.new(0, 330, 0, 50)
- TextButton.MouseButton1Down:Connect(function()
- for i,v in pairs(Frames:GetChildren()) do
- v.Visible = false
- end
- ScrollingFrame.Visible = true
- end)
- local library3 = {}
- function library3:NewButton(text, callback)
- local UIHolder = Instance.new("Frame")
- UIHolder.Name = "UIHolder"
- UIHolder.Parent = ScrollingFrame
- UIHolder.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- UIHolder.BorderSizePixel = 0
- UIHolder.Size = UDim2.new(0, 100, 0, 100)
- local TextButton_2 = Instance.new("TextButton")
- TextButton_2.Parent = UIHolder
- TextButton_2.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- TextButton_2.Position = UDim2.new(0.0199999996, 0, 0.100000001, 0)
- TextButton_2.Size = UDim2.new(0, 302, 0, 40)
- TextButton_2.Font = Enum.Font.SourceSans
- TextButton_2.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton_2.TextSize = 14.000
- TextButton_2.Text = text
- if type(callback) == "function" then
- TextButton_2.MouseButton1Down:Connect(callback)
- end
- end
- function library3:NewTextbox(text, callback)
- local UIHolder = Instance.new("Frame")
- UIHolder.Name = "UIHolder"
- UIHolder.Parent = ScrollingFrame
- UIHolder.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- UIHolder.BorderSizePixel = 0
- UIHolder.Size = UDim2.new(0, 100, 0, 100)
- local TextBox = Instance.new("TextBox")
- TextBox.Parent = UIHolder
- TextBox.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- TextBox.Position = UDim2.new(0.0199999996, 0, 0.100000001, 0)
- TextBox.Size = UDim2.new(0, 302, 0, 40)
- TextBox.Font = Enum.Font.SourceSans
- TextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextBox.TextSize = 14.000
- TextBox.Text = text
- if type(callback) == "function" then
- TextBox.FocusLost:Connect(function()
- callback(TextBox.Text)
- end)
- end
- end
- function library3:NewSlider(text, min, max, callback)
- local holding = false
- local val = 0
- local Slider = Instance.new("Frame")
- local TextButton_2 = Instance.new("TextButton")
- local TextLabel = Instance.new("TextLabel")
- local TextLabel_2 = Instance.new("TextLabel")
- local UIHolder = Instance.new("Frame")
- UIHolder.Name = "UIHolder"
- UIHolder.Parent = ScrollingFrame
- UIHolder.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- UIHolder.BorderSizePixel = 0
- UIHolder.Size = UDim2.new(0, 100, 0, 100)
- Slider.Name = "Slider"
- Slider.Parent = UIHolder
- Slider.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- Slider.Position = UDim2.new(0.130303025, 0, 0.379999995, 0)
- Slider.Size = UDim2.new(0, 228, 0, 12)
- TextButton_2.Parent = Slider
- TextButton_2.BackgroundColor3 = Color3.fromRGB(255, 255, 0)
- TextButton_2.BorderSizePixel = 0
- TextButton_2.Position = UDim2.new(0.473684192, 0, 0, 0)
- TextButton_2.Size = UDim2.new(0, 12, 0, 12)
- TextButton_2.Font = Enum.Font.SourceSans
- TextButton_2.Text = ""
- TextButton_2.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton_2.TextSize = 14.000
- TextLabel.Parent = Slider
- TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.BackgroundTransparency = 1.000
- TextLabel.Position = UDim2.new(0.0614035092, 0, -1.58333337, 0)
- TextLabel.Size = UDim2.new(0, 200, 0, 19)
- TextLabel.Font = Enum.Font.SourceSans
- TextLabel.Text = "slider"
- TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.TextSize = 14.000
- TextLabel_2.Parent = Slider
- TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_2.BackgroundTransparency = 1.000
- TextLabel_2.Position = UDim2.new(0.0614035092, 0, 0.999999881, 0)
- TextLabel_2.Size = UDim2.new(0, 200, 0, 19)
- TextLabel_2.Font = Enum.Font.SourceSans
- TextLabel_2.Text = "0"
- TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_2.TextSize = 14.000
- TextButton_2.MouseButton1Down:Connect(function()
- holding = true
- while holding do
- local xLocation = (uis:GetMouseLocation().X - Slider.AbsolutePosition.X) / Slider.AbsoluteSize.X
- local clampedX = math.clamp(xLocation, 0, 1)
- val = math.ceil( min + (clampedX * (max-min)) )
- TextButton_2.Position = UDim2.new(clampedX, 0, 0, 0)
- TextLabel_2.Text = tostring(val)
- callback(val)
- wait()
- end
- end)
- TextButton_2.MouseButton1Up:Connect(function()
- holding = false
- end)
- mouse.Button1Up:Connect(function()
- holding = false
- end)
- end
- return library3
- end
- local function setDraggable()
- Menu.Active = true
- Menu.Draggable = true
- end
- local function exitButton()
- ScreenGui:Destroy()
- end
- setDraggable()
- Exit.MouseButton1Click:Connect(exitButton)
- return library2
- end
- return library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement