Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local library = {}
- function library:NewWindow(title, outlineColor)
- title = (type(title) ~= "string") and "Title" or title
- outlineColor = (typeof(outlineColor) ~= "Color3") and Color3.fromRGB(255, 255, 0) or outlineColor
- local userInputService = game:GetService("UserInputService")
- local runService = game:GetService("RunService")
- local player = game.Players.LocalPlayer
- local mouse = player:GetMouse()
- local X2 = Instance.new("ScreenGui")
- local Menu = Instance.new("Frame")
- local Background = Instance.new("Frame")
- local UICorner = Instance.new("UICorner")
- local Tabs = Instance.new("ScrollingFrame")
- local UICorner_3 = Instance.new("UICorner")
- local UIListLayout = Instance.new("UIListLayout")
- local Frames = Instance.new("Frame")
- local Title = Instance.new("TextLabel")
- local Exit = Instance.new("TextButton")
- local UICorner_8 = Instance.new("UICorner")
- local UICorner_9 = Instance.new("UICorner")
- local UIStroke = Instance.new("UIStroke")
- local UIStroke_2 = Instance.new("UIStroke")
- local UIStroke_3 = Instance.new("UIStroke")
- local UIStroke_4 = Instance.new("UIStroke")
- X2.Name = "X2"
- X2.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- X2.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Menu.Name = "Menu"
- Menu.Parent = X2
- Menu.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- Menu.Position = UDim2.new(0.254218221, 0, 0.356340319, 0)
- Menu.Size = UDim2.new(0, 436, 0, 21)
- UIStroke.Parent = Menu
- UIStroke.Color = outlineColor
- Background.Name = "Background"
- Background.Parent = Menu
- Background.BackgroundColor3 = Color3.fromRGB(1, 1, 1)
- Background.BackgroundTransparency = 0.500
- Background.Position = UDim2.new(0, 0, 1.37705326, 0)
- Background.Size = UDim2.new(0, 436, 0, 252)
- UIStroke_2.Parent = Background
- UIStroke_2.Color = outlineColor
- UICorner.CornerRadius = UDim.new(0, 6)
- UICorner.Parent = Background
- Tabs.Name = "Tabs"
- Tabs.Parent = Background
- Tabs.Active = true
- Tabs.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- Tabs.BorderSizePixel = 0
- Tabs.Position = UDim2.new(0.128440365, 0, 0.0595238097, 0)
- Tabs.Size = UDim2.new(0, 324, 0, 32)
- Tabs.CanvasSize = UDim2.new(0, 2, 0, 0)
- Tabs.ScrollBarThickness = 6
- Tabs.AutomaticCanvasSize = Enum.AutomaticSize.X
- UIStroke_3.Parent = Tabs
- UIStroke_3.Color = outlineColor
- UICorner_9.Parent = Tabs
- UIListLayout.Parent = Tabs
- UIListLayout.FillDirection = Enum.FillDirection.Horizontal
- UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
- UIListLayout.Padding = UDim.new(0, 5)
- Frames.Name = "Frames"
- Frames.Parent = Background
- Frames.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- Frames.BackgroundTransparency = 0
- Frames.Position = UDim2.new(0.128440365, 0, 0.222222224, 0)
- Frames.Size = UDim2.new(0, 324, 0, 175)
- UIStroke_4.Parent = Frames
- UIStroke_4.Color = outlineColor
- Title.Name = "Title"
- Title.Parent = Menu
- Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Title.BackgroundTransparency = 1.000
- Title.Position = UDim2.new(0, 0, 0.0357140452, 0)
- Title.Size = UDim2.new(0, 408, 0, 21)
- 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
- Exit.Parent = Menu
- Exit.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Exit.BackgroundTransparency = 1.000
- Exit.Position = UDim2.new(0.954128444, 0, 0.0317461938, 0)
- Exit.Size = UDim2.new(0, 21, 0, 21)
- Exit.Font = Enum.Font.SourceSans
- Exit.Text = "X"
- Exit.TextColor3 = Color3.fromRGB(255, 255, 255)
- Exit.TextSize = 19.000
- UICorner_8.CornerRadius = UDim.new(0, 6)
- UICorner_8.Parent = Menu
- -- Local functions
- local function setDraggable()
- Menu.Active = true
- Menu.Draggable = true
- end
- local function exitButton()
- X2:Destroy()
- end
- local function buttonClickEffect(button)
- if button == nil then
- return
- end
- local uis = game:GetService("UserInputService")
- local mouseLocation = uis:GetMouseLocation()
- local absolutePosition = button.AbsolutePosition
- local effectXPosition = UDim2.new(0, mouseLocation.X-absolutePosition.X, 0, (mouseLocation.Y-absolutePosition.Y)-36)
- local ButtonEffect = Instance.new("ImageLabel")
- button.ClipsDescendants = true
- ButtonEffect.Name = "ButtonEffect"
- ButtonEffect.Parent = button
- 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, 175, 0, 175))
- 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 createContainer(parent)
- local Container = Instance.new("Frame")
- Container.Name = "Container"
- Container.Parent = parent
- Container.BackgroundColor3 = Color3.fromRGB(15, 15, 15)
- Container.BackgroundTransparency = 1.000
- Container.BorderSizePixel = 0
- Container.Position = UDim2.new(0, 0, 0.200000003, 0)
- Container.Size = UDim2.new(0, 380, 0, 42)
- return Container
- end
- local function createSeperator(parent)
- local Seperator2_3 = Instance.new("Frame")
- local Seperator_3 = Instance.new("Frame")
- Seperator2_3.Name = "Seperator2"
- Seperator2_3.AnchorPoint = Vector2.new(0.5, 0.5)
- Seperator2_3.Parent = parent
- Seperator2_3.BackgroundColor3 = Color3.fromRGB(215, 215, 215)
- Seperator2_3.Position = UDim2.new(0.43, 0, 1, 0)
- Seperator2_3.Size = UDim2.new(0, 435, 0, 1)
- Seperator_3.Name = "Seperator"
- Seperator_3.AnchorPoint = Vector2.new(0.5, 0.5)
- Seperator_3.Parent = parent
- Seperator_3.BackgroundColor3 = Color3.fromRGB(215, 215, 215)
- Seperator_3.Position = UDim2.new(0.43, 0, 0, 0)
- Seperator_3.Size = UDim2.new(0, 435, 0, 1)
- end
- local function hideFrames()
- for _, frame in pairs(Frames:GetChildren()) do
- if frame:IsA("ScrollingFrame") then
- frame.Visible = false
- end
- end
- end
- local library2 = {}
- function library2:SetOutlineColor(color)
- for _, v in pairs(X2:GetDescendants()) do
- if v:IsA("UIStroke") then
- v.Color = color
- elseif v.Name == "ToggleButton" or v.Name == "FillFrame" then
- v.BackgroundColor3 = color
- end
- end
- end
- function library2:Rainbow()
- spawn(function()
- local i = 0
- while true do
- i += 1
- local color = Color3.fromHSV(i/360, 1, 1)
- library2:SetOutlineColor(color)
- if i >= 360 then
- i = 0
- end
- wait()
- end
- end)
- end
- function library2:NewTab(text)
- text = (type(text) ~= "string") and "Tab" or text
- local TabButton = Instance.new("TextButton")
- local UICorner_2 = Instance.new("UICorner")
- local UICorner_3 = Instance.new("UICorner")
- local UIStroke = Instance.new("UIStroke")
- local UIStroke2 = Instance.new("UIStroke")
- local Frame = Instance.new("Frame")
- local MainFrame = Instance.new("ScrollingFrame")
- local UIListLayout_2 = Instance.new("UIListLayout")
- TabButton.Name = "TabButton"
- TabButton.Parent = Tabs
- TabButton.BackgroundColor3 = Color3.fromRGB(15, 15, 15)
- TabButton.BackgroundTransparency = 1.000
- TabButton.BorderSizePixel = 0
- TabButton.Size = UDim2.new(0, 90, 0, 20)
- TabButton.Font = Enum.Font.Code
- TabButton.Text = text
- TabButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- TabButton.TextSize = 14.000
- Frame.Parent = TabButton
- Frame.AnchorPoint = Vector2.new(0.5, 0.5)
- Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Frame.BackgroundTransparency = 1.000
- Frame.Position = UDim2.new(0.5, 0, 0.590740979, 0)
- Frame.Size = UDim2.new(0, 90, 0, 20)
- UICorner_2.Parent = Frame
- UIStroke.Parent = Frame
- UIStroke.Color = outlineColor
- MainFrame.Name = "MainFrame"
- MainFrame.Parent = Frames
- MainFrame.Active = true
- MainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- MainFrame.BorderSizePixel = 0
- MainFrame.Position = UDim2.new(-0.00118926167, 0, -0.000634923577, 0)
- MainFrame.Size = UDim2.new(0, 324, 0, 175)
- MainFrame.ScrollBarThickness = 6
- MainFrame.AutomaticCanvasSize = Enum.AutomaticSize.Y
- UICorner_3.Parent = MainFrame
- UIStroke2.Parent = MainFrame
- UIStroke2.Color = outlineColor
- UIListLayout_2.Parent = MainFrame
- hideFrames()
- TabButton.MouseButton1Down:Connect(function()
- buttonClickEffect(Frame)
- hideFrames()
- MainFrame.Visible = true
- end)
- local library3 = {}
- function library3: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 Frame_3 = Instance.new("Frame")
- local UICorner_7 = Instance.new("UICorner")
- local UIStroke = Instance.new("UIStroke")
- local Container = createContainer(MainFrame)
- local Seperator = createSeperator(Container)
- TextButton.Parent = Container
- TextButton.AnchorPoint = Vector2.new(0.5, 0.5)
- TextButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextButton.BackgroundTransparency = 1.000
- TextButton.Position = UDim2.new(0.43, 0, 0.5, 0)
- TextButton.Size = UDim2.new(0, 300, 0, 28)
- TextButton.Font = Enum.Font.Code
- TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton.TextSize = 14.000
- TextButton.Text = text
- Frame_3.Parent = TextButton
- Frame_3.AnchorPoint = Vector2.new(0.5, 0.5)
- Frame_3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Frame_3.BackgroundTransparency = 1.000
- Frame_3.Position = UDim2.new(0.5, 0, 0.481481493, 0)
- Frame_3.Size = UDim2.new(0, 300, 0, 28)
- UICorner_7.Parent = Frame_3
- UIStroke.Parent = Frame_3
- UIStroke.Color = outlineColor
- TextButton.MouseButton1Down:Connect(function()
- buttonClickEffect(Frame_3)
- callback()
- end)
- end
- function library3:NewTextBox(text, callback)
- text = (type(text) ~= "string") and "Placeholder" or text
- callback = (type(callback) ~= "function") and function()
- print("Lost Focus!")
- end or callback
- local TextBox = Instance.new("TextBox")
- local Frame_2 = Instance.new("Frame")
- local UICorner_4 = Instance.new("UICorner")
- local Seperator2 = Instance.new("Frame")
- local Seperator = Instance.new("Frame")
- local UIStroke = Instance.new("UIStroke")
- local Container = createContainer(MainFrame)
- local Seperator = createSeperator(Container)
- TextBox.Parent = Container
- TextBox.AnchorPoint = Vector2.new(0.5, 0.5)
- TextBox.BackgroundColor3 = Color3.fromRGB(5, 5, 5)
- TextBox.BackgroundTransparency = 1.000
- TextBox.Position = UDim2.new(0.43, 0, 0.5, 0)
- TextBox.Size = UDim2.new(0, 300, 0, 28)
- TextBox.Font = Enum.Font.Code
- TextBox.PlaceholderText = "Textbox"
- TextBox.Text = text
- TextBox.PlaceholderText = text
- TextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextBox.TextSize = 14.000
- TextBox.TextStrokeColor3 = Color3.fromRGB(255, 255, 255)
- Frame_2.Parent = TextBox
- Frame_2.AnchorPoint = Vector2.new(0.5, 0.5)
- Frame_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Frame_2.BackgroundTransparency = 1.000
- Frame_2.Position = UDim2.new(0.5, 0, 0.481481493, 0)
- Frame_2.Size = UDim2.new(0, 300, 0, 28)
- UICorner_4.Parent = Frame_2
- UIStroke.Parent = Frame_2
- UIStroke.Color = outlineColor
- TextBox.FocusLost:Connect(function()
- callback(TextBox.Text)
- end)
- end
- function library3: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_5 = Instance.new("UICorner")
- local ToggleButton = Instance.new("TextButton")
- local UICorner_6 = Instance.new("UICorner")
- local TextLabel = Instance.new("TextLabel")
- local Seperator2_2 = Instance.new("Frame")
- local Seperator_2 = Instance.new("Frame")
- local UIStroke = Instance.new("UIStroke")
- local Container = createContainer(MainFrame)
- local Seperator = createSeperator(Container)
- local toggled = true
- Toggle.Name = "Toggle"
- Toggle.Parent = Container
- Toggle.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- Toggle.BackgroundTransparency = 1.000
- Toggle.BorderSizePixel = 0
- Toggle.Position = UDim2.new(0.03, 0, 0.22, 0)
- Toggle.Size = UDim2.new(0, 25, 0, 25)
- UICorner_5.CornerRadius = UDim.new(1, 0)
- UICorner_5.Parent = Toggle
- ToggleButton.Name = "ToggleButton"
- ToggleButton.Parent = Toggle
- ToggleButton.AnchorPoint = Vector2.new(0.5, 0.5)
- ToggleButton.BackgroundColor3 = outlineColor
- ToggleButton.Position = UDim2.new(0.5, 0, 0.5, 0)
- ToggleButton.Size = UDim2.new(0, 15, 0, 15)
- ToggleButton.AutoButtonColor = false
- ToggleButton.Font = Enum.Font.SourceSans
- ToggleButton.Text = ""
- ToggleButton.TextColor3 = Color3.fromRGB(0, 0, 0)
- ToggleButton.TextSize = 14.000
- UICorner_6.CornerRadius = UDim.new(1, 0)
- UICorner_6.Parent = ToggleButton
- UIStroke.Parent = Toggle
- UIStroke.Color = outlineColor
- TextLabel.Parent = Toggle
- TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.BackgroundTransparency = 1.000
- TextLabel.Position = UDim2.new(1.293, 0, -0.153, 0)
- TextLabel.Size = UDim2.new(0, 267, 0, 31)
- TextLabel.Font = Enum.Font.Code
- TextLabel.Text = text
- TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.TextSize = 14.000
- TextLabel.TextXAlignment = Enum.TextXAlignment.Left
- ToggleButton.MouseButton1Down:Connect(function()
- toggled = not toggled
- ToggleButton.BackgroundTransparency = (toggled == true) and 0 or 1
- spawn(function()
- ToggleButton.Size = UDim2.new(0, 18, 0, 18)
- wait(.05)
- ToggleButton.Size = UDim2.new(0, 15, 0, 15)
- end)
- callback(toggled)
- end)
- end
- function library3: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("Slider")
- end or callback
- local Slider = Instance.new("Frame")
- local UICorner = Instance.new("UICorner")
- local FillFrame = Instance.new("Frame")
- local UICorner_2 = Instance.new("UICorner")
- local TextLabel = Instance.new("TextLabel")
- local MoveButton = Instance.new("TextButton")
- local UICorner_3 = Instance.new("UICorner")
- local TextLabel_2 = Instance.new("TextLabel")
- local UIStroke = Instance.new("UIStroke")
- local Container = createContainer(MainFrame)
- local Seperator = createSeperator(Container)
- Slider.Name = "Slider"
- Slider.Parent = Container
- Slider.AnchorPoint = Vector2.new(0.5, 0.5)
- Slider.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Slider.BackgroundTransparency = 1.000
- Slider.Position = UDim2.new(0.3000002, 0, 0.600000024, 0)
- Slider.Size = UDim2.new(0, 200, 0, 10)
- UICorner.Parent = Slider
- UIStroke.Parent = Slider
- UIStroke.Color = outlineColor
- 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.00100000005, 0, 0.5, 0)
- FillFrame.Size = UDim2.new(0, 0, 0, 10)
- UICorner_2.Parent = FillFrame
- TextLabel.Parent = Slider
- TextLabel.AnchorPoint = Vector2.new(0.5, 0.5)
- TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.BackgroundTransparency = 1.000
- TextLabel.Position = UDim2.new(1.2852447, 0, 0.5, 0)
- TextLabel.Size = UDim2.new(0, 104, 0, 15)
- TextLabel.Font = Enum.Font.Code
- TextLabel.Text = min
- TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.TextScaled = true
- TextLabel.TextSize = 14.000
- TextLabel.TextWrapped = true
- TextLabel.TextXAlignment = Enum.TextXAlignment.Left
- MoveButton.Name = "MoveButton"
- MoveButton.Parent = Slider
- MoveButton.AnchorPoint = Vector2.new(0.5, 0.5)
- MoveButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- MoveButton.Position = UDim2.new(0, 0, 0.5, 0)
- MoveButton.Size = UDim2.new(0, 10, 0, 10)
- MoveButton.Font = Enum.Font.SourceSans
- MoveButton.Text = ""
- MoveButton.TextColor3 = Color3.fromRGB(0, 0, 0)
- MoveButton.TextSize = 14.000
- MoveButton.AutoButtonColor = false
- UICorner_3.CornerRadius = UDim.new(1, 0)
- UICorner_3.Parent = MoveButton
- TextLabel_2.Parent = Slider
- 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.524688601, 0, -0.9, 0)
- TextLabel_2.Size = UDim2.new(0, 200, 0, 15)
- TextLabel_2.Font = Enum.Font.Code
- TextLabel_2.Text = text
- TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_2.TextScaled = true
- TextLabel_2.TextSize = 14.000
- TextLabel_2.TextWrapped = true
- TextLabel_2.TextXAlignment = Enum.TextXAlignment.Left
- local holding = false
- MoveButton.MouseButton1Down:Connect(function()
- holding = true
- end)
- MoveButton.MouseButton1Up:Connect(function()
- holding = false
- MoveButton.Size = UDim2.new(0, 10, 0, 10)
- end)
- mouse.Button1Up:Connect(function()
- holding = false
- MoveButton.Size = UDim2.new(0, 10, 0, 10)
- end)
- runService.RenderStepped:Connect(function()
- if holding then
- local mousePosition = userInputService:GetMouseLocation()
- local xPos = (mousePosition.X-Slider.AbsolutePosition.X)/Slider.AbsoluteSize.X
- xPos = math.clamp(xPos, 0, 1)
- local value = (max - min) * xPos + min
- TextLabel.Text = tostring(math.round(value))
- MoveButton.Size = UDim2.new(0, 12, 0, 12)
- FillFrame.Size = UDim2.new(xPos, 0, 0, 10)
- FillFrame.Position = UDim2.new(xPos/2, 0, 0.5, 0)
- MoveButton.Position = UDim2.new(xPos, 0, 0.5, 0)
- callback(value)
- end
- end)
- end
- return library3
- end
- -- Call local functions
- setDraggable()
- Exit.MouseButton1Down:Connect(function()
- exitButton()
- end)
- return library2
- end
- -- Library:NewWindow(string: title):NewTab(string: text):NewButton(string: text, function: callback)
- -- NewTextBox(string: text, function: callback)
- -- NewSlider(string: text, number: min, number: max, function: callback)
- -- NewToggle(string: text, function: callback)
- -- SetOutlineColor(Color3: color)
- -- Rainbow()
- return library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement