Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local library = {}
- function library:NewWindow(title)
- local themes = {
- BloodTheme = {
- Text = Color3.fromRGB(255, 255, 255),
- Menu = Color3.fromRGB(10, 10, 10),
- Buttons = Color3.fromRGB(255, 0, 0),
- Background = Color3.fromRGB(20, 20, 20),
- UIHolder = Color3.fromRGB(10, 10, 10),
- TextBox = Color3.fromRGB(255, 0, 0),
- Slider = Color3.fromRGB(5, 5, 5),
- Scrollbar = Color3.fromRGB(0, 0, 0)
- },
- LightTheme = {
- Text = Color3.fromRGB(1, 1, 1),
- Menu = Color3.fromRGB(200, 200, 200),
- Buttons = Color3.fromRGB(175, 175, 175),
- Background = Color3.fromRGB(185, 185, 185),
- UIHolder = Color3.fromRGB(155, 155, 155),
- TextBox = Color3.fromRGB(175, 175, 175),
- Slider = Color3.fromRGB(135, 135, 135),
- Scrollbar = Color3.fromRGB(255, 255, 255)
- }
- }
- 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 Frames = Instance.new("Frame")
- local Exit = Instance.new("TextButton")
- local Title = Instance.new("TextLabel")
- local UIGridLayout = Instance.new("UIGridLayout")
- 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(50, 50, 50)
- Background.BorderSizePixel = 0
- Background.Position = UDim2.new(0, 0, 0.999998987, 0)
- Background.Size = UDim2.new(0, 450, 0, 290)
- 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)
- 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)
- SideButtons.ScrollBarThickness = 8
- SideButtons.BackgroundTransparency = 1
- SideButtons.ScrollBarImageColor3 = Color3.fromRGB(0, 0, 0)
- UIGridLayout.Parent = SideButtons
- UIGridLayout.SortOrder = Enum.SortOrder.LayoutOrder
- UIGridLayout.CellSize = UDim2.new(0, 120, 0, 35)
- 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.Code
- 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.Code
- Title.Text = title
- Title.TextColor3 = Color3.fromRGB(255, 255, 255)
- Title.TextScaled = true
- Title.TextSize = 14.000
- Title.TextWrapped = true
- function library:Color(args)
- for i,v in pairs(ScreenGui:GetDescendants()) do
- if v:IsA("TextButton")or v:IsA("TextLabel") then
- v.TextColor3 = args.Text
- elseif v:IsA("TextBox") then
- v.TextColor3 = args.Text
- v.PlaceholderColor3 = args.Text
- end
- if v.Name == "Menu" then
- v.BackgroundColor3 = args.Menu
- end
- if v:IsA("TextButton") then
- v.BackgroundColor3 = args.Buttons
- end
- if v.Name == "Background" then
- v.BackgroundColor3 = args.Background
- end
- if v.Name == "UIHolder" then
- v.BackgroundColor3 = args.UIHolder
- end
- if v:IsA("TextBox") then
- v.BackgroundColor3 = args.TextBox
- end
- if v.Name == "Slider" then
- v.BackgroundColor3 = args.Slider
- end
- if v:IsA("ScrollingFrame") then
- v.ScrollBarImageColor3 = args.Scrollbar
- end
- end
- end
- function library:Keybind(key, callback)
- uis.InputBegan:Connect(function(input, gameProcessedEvent)
- if gameProcessedEvent then
- return
- end
- if input.KeyCode == Enum.KeyCode[key] then
- callback()
- end
- end)
- end
- function library:ToggleVisibility(bool)
- Menu.Visible = bool
- end
- function library:SetTheme(theme)
- if themes[theme] then
- library:Color(themes[theme])
- else
- library:Color(themes.LightTheme)
- end
- end
- 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.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- ScrollingFrame.BackgroundTransparency = 1.000
- ScrollingFrame.BorderSizePixel = 0
- ScrollingFrame.Size = UDim2.new(0, 330, 0, 290)
- ScrollingFrame.ScrollBarThickness = 8
- ScrollingFrame.ScrollBarImageColor3 = Color3.fromRGB(0, 0, 0)
- UIGridLayout_2.Parent = ScrollingFrame
- UIGridLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
- UIGridLayout_2.CellSize = UDim2.new(0, 330, 0, 50)
- local function hideFrames()
- for i,v in pairs(Frames:GetChildren()) do
- v.Visible = false
- end
- end
- hideFrames()
- ScrollingFrame.Visible = true
- TextButton.MouseButton1Down:Connect(function()
- hideFrames()
- ScrollingFrame.Visible = true
- end)
- local library3 = {}
- function library3:NewButton(text, callback)
- local UIHolder = Instance.new("Frame")
- local TextButton = Instance.new("TextButton")
- local UIGridLayout_2 = Instance.new("UIGridLayout")
- UIGridLayout_2.Parent = ScrollingFrame
- UIGridLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
- UIGridLayout_2.CellSize = UDim2.new(0, 330, 0, 50)
- UIHolder.Name = "UIHolder"
- UIHolder.Parent = ScrollingFrame
- UIHolder.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- UIHolder.BorderSizePixel = 0
- UIHolder.Size = UDim2.new(0, 100, 0, 100)
- TextButton.Parent = UIHolder
- TextButton.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- TextButton.BorderSizePixel = 0
- TextButton.Position = UDim2.new(0.021, 0, 0.12, 0)
- TextButton.Size = UDim2.new(0, 308, 0, 37)
- TextButton.Font = Enum.Font.Code
- TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton.TextSize = 14.000
- TextButton.Text = text
- if type(callback) == "function" then
- TextButton.MouseButton1Down:Connect(callback)
- end
- end
- function library3:NewTextBox(text, callback)
- local UIHolder = Instance.new("Frame")
- local UIGridLayout_2 = Instance.new("UIGridLayout")
- UIGridLayout_2.Parent = ScrollingFrame
- UIGridLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
- UIGridLayout_2.CellSize = UDim2.new(0, 330, 0, 50)
- 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.021, 0, 0.12, 0)
- TextBox.Size = UDim2.new(0, 308, 0, 37)
- TextBox.BorderSizePixel = 0
- TextBox.Font = Enum.Font.SourceSans
- TextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextBox.TextSize = 14.000
- TextBox.PlaceholderText = 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 UICorner = Instance.new("UICorner")
- local TextLabel = Instance.new("TextLabel")
- local TextLabel_2 = Instance.new("TextLabel")
- local UICorner_2 = Instance.new("UICorner")
- local UIHolder = Instance.new("Frame")
- local UIGridLayout_2 = Instance.new("UIGridLayout")
- UIGridLayout_2.Parent = ScrollingFrame
- UIGridLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
- UIGridLayout_2.CellSize = UDim2.new(0, 330, 0, 50)
- 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.Code
- TextButton_2.Text = ""
- TextButton_2.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton_2.TextSize = 14.000
- UICorner.CornerRadius = UDim.new(8, 0)
- UICorner.Parent = TextButton_2
- 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.Code
- TextLabel.Text = text
- 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.Code
- TextLabel_2.Text = "0"
- TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_2.TextSize = 14.000
- UICorner_2.CornerRadius = UDim.new(16, 0)
- UICorner_2.Parent = Slider
- 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
- -- Library:NewWindow(title):NewTab(text): NewButton(text, callback)
- -- NewTextBox(defaultText, callback)
- -- NewSlider(text, min, max, callback)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement