Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Library = {}
- function Library:Create(Title)
- local ScreenGui = Instance.new("ScreenGui", game.Players.LocalPlayer.PlayerGui)
- ScreenGui.Name = "AbstractUi"
- ScreenGui.ResetOnSpawn = false
- local Container = Instance.new("Frame")
- local Main = Instance.new("Frame")
- local Options = Instance.new("Frame")
- local UIListLayout_2 = Instance.new("UIListLayout")
- ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Container.Name = "Container"
- Container.Parent = ScreenGui
- Container.BackgroundColor3 = Color3.new(0, 0, 0)
- Container.BorderSizePixel = 0
- Container.Position = UDim2.new(0.295238107, 0, 0.298507452, 0)
- Container.Size = UDim2.new(0, 405, 0, 243)
- Container.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
- Container.Selectable = true
- Container.Active = true
- Container.Draggable = true
- local Name = Instance.new("TextLabel", Container)
- Name.Name = ""
- Name.BackgroundColor3 = Color3.new(0, 0, 0)
- Name.BorderSizePixel = 0
- Name.Size = UDim2.new(0, 405, 0, 30)
- Name.Font = Enum.Font.GothamBold
- Name.Text = " " .. tostring(Title)
- Name.TextColor3 = Color3.new(1, 1, 1)
- Name.TextScaled = true
- Name.TextSize = 14
- Name.TextWrapped = true
- Name.TextXAlignment = Enum.TextXAlignment.Left
- Options.Name = "Options"
- Options.Parent = Container
- Options.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
- Options.BorderColor3 = Color3.new(0.0901961, 0.215686, 0.235294)
- Options.BorderSizePixel = 0
- Options.Position = UDim2.new(0, 0, 0.123825319, 0)
- Options.Size = UDim2.new(0, 100, 0, 213)
- UIListLayout_2.Parent = Options
- UIListLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
- UIListLayout_2.Padding = UDim.new(0.01, 0)
- Main.Name = "Main"
- Main.Parent = Container
- Main.BackgroundColor3 = Color3.new(0.0901961, 0.215686, 0.235294)
- Main.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
- Main.BorderSizePixel = 0
- Main.Position = UDim2.new(0.246913582, 0, 0.12384259, 0)
- Main.Size = UDim2.new(0, 305, 0, 213)
- local OptionsLibrary = {}
- local OptionCount = 0
- function OptionsLibrary:AddOption(Option)
- local TextButton = Instance.new("TextButton", Options)
- TextButton.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
- TextButton.BorderColor3 = Color3.fromRGB(26, 26, 26)
- TextButton.BorderSizePixel = 0
- TextButton.Size = UDim2.new(0, 100, 0, 30)
- TextButton.Font = Enum.Font.GothamBold
- TextButton.Text = " " .. tostring(Option)
- TextButton.TextColor3 = Color3.new(1, 1, 1)
- TextButton.TextSize = 20
- TextButton.TextXAlignment = Enum.TextXAlignment.Left
- local Effect = Instance.new("Frame", TextButton)
- Effect.Name = "Effect"
- Effect.Size = UDim2.new(0, 3, 0, 30)
- Effect.BackgroundColor3 = Color3.new(1,1, 1)
- Effect.BorderSizePixel = 0
- Effect.Visible = false
- Effect.Position = UDim2.new(0, 1, 0, 0)
- TextButton.MouseButton1Click:Connect(function()
- for i, v in pairs(game.Players.LocalPlayer.PlayerGui.AbstractUi.Container.Main:GetChildren()) do
- v.Visible = false
- end
- for i, v in pairs(game.Players.LocalPlayer.PlayerGui.AbstractUi.Container.Options:GetChildren()) do
- if v:IsA("TextButton") then
- v.Effect.Visible = false
- end
- end
- game.Players.LocalPlayer.PlayerGui.AbstractUi.Container.Main[Option].Visible = true
- Effect.Visible = true
- for i = 1, 0, -0.1 do
- Effect.BackgroundTransparency = i
- wait()
- end
- end)
- local Frame = Instance.new("Frame", Main)
- if OptionCount == 0 then
- Frame.Visible = true
- Effect.Visible = true
- else
- Frame.Visible = false
- Effect.Visible = false
- end
- OptionCount = OptionCount + 1
- Frame.Name = Option
- Frame.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
- Frame.BorderSizePixel = 0
- Frame.Size = Main.Size
- local UIListLayout = Instance.new("UIListLayout", Main[Option])
- local UIPadding = Instance.new("UIPadding", Main[Option])
- UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
- UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
- UIListLayout.Padding = UDim.new(0.0500000007, 0)
- UIPadding.PaddingTop = UDim.new(0.0500000007, 0)
- local CheatsLib = {}
- function CheatsLib:AddButton(Name, Callback)
- local Buttoncontainer = Instance.new("Frame", Frame)
- Buttoncontainer.Name = "Button container"
- Buttoncontainer.BackgroundColor3 = Color3.new(13, 13, 13)
- Buttoncontainer.BorderColor3 = Color3.new(13, 13, 13)
- Buttoncontainer.BorderSizePixel = 2
- Buttoncontainer.Position = UDim2.new(0.0409836061, 0, 0.0500000417, 0)
- Buttoncontainer.Size = UDim2.new(0, 280, 0, 20)
- local TextButton = Instance.new("TextButton")
- TextButton.Parent = Buttoncontainer
- TextButton.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
- TextButton.BorderColor3 = Color3.fromRGB(17, 17, 17)
- TextButton.BorderSizePixel = 2
- TextButton.Position = UDim2.new(0, 0, 7.62939464e-07, 0)
- TextButton.Size = UDim2.new(0, 280, 0, 20)
- TextButton.Font = Enum.Font.GothamSemibold
- TextButton.Text = Name
- TextButton.TextColor3 = Color3.new(1, 1, 1)
- TextButton.TextScaled = true
- TextButton.TextSize = 14
- TextButton.TextWrapped = true
- TextButton.TextXAlignment = Enum.TextXAlignment.Center
- TextButton.ClipsDescendants = true
- TextButton.MouseButton1Click:Connect(Callback)
- end
- function CheatsLib:AddToggle(Title, State, Callback)
- local Togglecontainer = Instance.new("Frame", Frame)
- Togglecontainer.Name = "Toggle container"
- Togglecontainer.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
- Togglecontainer.BorderColor3 = Color3.fromRGB(17, 17, 17)
- Togglecontainer.BorderSizePixel = 2
- Togglecontainer.Position = UDim2.new(-0.1, 0, 0.19, 0)
- Togglecontainer.Size = UDim2.new(0, 280, 0, 20)
- local ImageButton = Instance.new("ImageButton")
- ImageButton.Parent = Togglecontainer
- ImageButton.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
- ImageButton.Position = UDim2.new(0.935, 0, 0.1, 0)
- ImageButton.Size = UDim2.new(0, 16, 0, 16)
- ImageButton.ZIndex = 2
- ImageButton.ImageColor3 = Color3.new(1, 0, 0)
- ImageButton.BorderSizePixel = 0
- ImageButton.Image = "http://www.roblox.com/asset/?id=4673207466"
- ImageButton.ImageColor3 = Color3.new(1, 1, 1)
- local TextLabel = Instance.new("TextLabel")
- TextLabel.Parent = Togglecontainer
- TextLabel.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
- TextLabel.BorderSizePixel = 0
- TextLabel.Size = UDim2.new(0, 274, 0, 20)
- TextLabel.Font = Enum.Font.GothamSemibold
- TextLabel.Text = Title
- TextLabel.TextColor3 = Color3.new(1, 1, 1)
- TextLabel.TextScaled = true
- TextLabel.TextSize = 14
- TextLabel.TextWrapped = true
- TextLabel.TextXAlignment = Enum.TextXAlignment.Center
- TextLabel.Position = UDim2.new(0.02, 0, 0, 0)
- if State then
- ImageButton.BackgroundColor3 = Color3.fromRGB(0, 100, 200)
- else
- ImageButton.BackgroundColor3 = Color3.new(0, 0, 0)
- TextLabel.TextColor3 = Color3.new(0.7, 0.7, 0.7)
- ImageButton.ImageTransparency = 1
- end
- ImageButton.MouseButton1Click:Connect(function()
- State = not State
- if State then
- Callback(true)
- for i = 0, 100, 10 do
- TextLabel.TextColor3 = Color3.new(TextLabel.TextColor3.R + 0.025, TextLabel.TextColor3.G + 0.025, TextLabel.TextColor3.B + 0.025)
- ImageButton.BackgroundColor3 = Color3.fromRGB(0, i, i * 1.5)
- ImageButton.ImageTransparency = 1 - (i / 100)
- wait()
- end
- TextLabel.TextColor3 = Color3.new(1, 1, 1)
- else
- Callback(false)
- for i = 0, 100, 10 do
- TextLabel.TextColor3 = Color3.new(TextLabel.TextColor3.R - 0.025, TextLabel.TextColor3.G - 0.025, TextLabel.TextColor3.B - 0.025)
- ImageButton.BackgroundColor3 = Color3.fromRGB(0, 100 - i, 150 - (i * 1.5))
- ImageButton.ImageTransparency = i / 100
- wait()
- end
- TextLabel.TextColor3 = Color3.new(0.7, 0.7, 0.7)
- end
- end)
- end
- function CheatsLib:AddBox(Default, PlaceholderText, ClearTextOnFocus, Callback)
- local Textboxcontainer = Instance.new("Frame", Frame)
- local TextBox = Instance.new("TextBox")
- Textboxcontainer.Name = "Textbox container"
- Textboxcontainer.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
- Textboxcontainer.BorderColor3 = Color3.fromRGB(13, 13, 13)
- Textboxcontainer.BorderSizePixel = 2
- Textboxcontainer.Position = UDim2.new(0.0327868834, 0, 0.376760572, 0)
- Textboxcontainer.Size = UDim2.new(0, 280, 0, 20)
- TextBox.Parent = Textboxcontainer
- TextBox.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
- TextBox.BorderSizePixel = 0
- TextBox.Position = UDim2.new(0.021428572, 0, 0, 0)
- TextBox.Size = UDim2.new(0, 274, 0, 20)
- TextBox.Font = Enum.Font.GothamSemibold
- TextBox.PlaceholderColor3 = Color3.new(0.392157, 0.392157, 0.392157)
- TextBox.Text = Default
- TextBox.TextColor3 = Color3.new(1, 1, 1)
- TextBox.TextSize = 18
- TextBox.TextXAlignment = Enum.TextXAlignment.Center
- TextBox.PlaceholderText = PlaceholderText
- TextBox.ClearTextOnFocus = ClearTextOnFocus
- TextBox.FocusLost:Connect(function()
- Callback(TextBox.Text)
- end)
- end
- function CheatsLib:AddDropdown(Name, OptionsTable, Callback)
- local Open = false
- local DropdownContainer = Instance.new("Frame", Frame)
- DropdownContainer.Name = "Dropdown Container"
- DropdownContainer.BackgroundColor3 = Color3.fromRGB(13, 13, 13)
- DropdownContainer.BorderColor3 = Color3.fromRGB(13, 13, 13)
- DropdownContainer.BorderSizePixel = 2
- DropdownContainer.Position = UDim2.new(0.0409836061, 0, 0.0500000417, 0)
- DropdownContainer.Size = UDim2.new(0, 280, 0, 20)
- DropdownContainer.ZIndex = 2
- local UI = Instance.new("UIListLayout", DropdownContainer)
- UI.HorizontalAlignment = Enum.HorizontalAlignment.Center
- UI.Padding = UDim.new(0.1, 0)
- UI.SortOrder = Enum.SortOrder.LayoutOrder
- local Button = Instance.new("TextButton", DropdownContainer)
- Button.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
- Button.BorderColor3 = Color3.fromRGB(17, 17, 17)
- Button.BorderSizePixel = 2
- Button.Position = UDim2.new(0, 0, 7.62939464e-07, 0)
- Button.Size = UDim2.new(0, 280, 0, 20)
- Button.Font = Enum.Font.GothamSemibold
- Button.Text = Name
- Button.TextColor3 = Color3.new(1, 1, 1)
- Button.TextScaled = true
- Button.TextSize = 14
- Button.TextWrapped = true
- Button.TextXAlignment = Enum.TextXAlignment.Center
- Button.ClipsDescendants = true
- Button.AutoButtonColor = false
- local Status = Instance.new("ImageLabel", Button)
- Status.Image = "http://www.roblox.com/asset/?id=71659683"
- Status.Size = UDim2.new(0, 16, 0, 16)
- Status.ImageColor3 = Color3.new(1, 1, 1)
- Status.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
- Status.BorderSizePixel = 0
- Status.Position = UDim2.new(0.0065, 0, 0.1, 0)
- local DropdownFrame = Instance.new("Frame", DropdownContainer)
- DropdownFrame.Size = UDim2.new(0, 280, 0, 0)
- DropdownFrame.BackgroundColor3 = Color3.fromRGB(17, 17, 17)
- DropdownFrame.BorderSizePixel = 0
- DropdownFrame.ClipsDescendants = true
- local ScrollLayout = Instance.new("UIListLayout", DropdownFrame)
- ScrollLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
- ScrollLayout.SortOrder = Enum.SortOrder.LayoutOrder
- for i, v in pairs(OptionsTable) do
- local Option = Instance.new("TextButton", DropdownFrame)
- Option.BackgroundColor3 = Color3.fromRGB(17, 17, 17)
- Option.BorderSizePixel = 0
- Option.Position = UDim2.new(0, 0, 7.62939464e-07, 0)
- Option.Size = UDim2.new(0, 280, 0, 20)
- Option.Font = Enum.Font.GothamSemibold
- Option.Text = tostring(v)
- Option.TextColor3 = Color3.new(1, 1, 1)
- Option.TextSize = 20
- Option.TextXAlignment = Enum.TextXAlignment.Center
- Option.MouseButton1Click:Connect(function()
- Callback(Option.Text)
- end)
- end
- Button.MouseButton1Click:Connect(function()
- Open = not Open
- if Open then
- game:GetService("TweenService"):Create(Status, TweenInfo.new(0.5), {Rotation = 90}):Play()
- DropdownFrame:TweenSize(UDim2.new(0, 280, 0, table.getn(OptionsTable) * 20), Enum.EasingDirection.InOut, Enum.EasingStyle.Linear, 0.5, true)
- else
- game:GetService("TweenService"):Create(Status, TweenInfo.new(0.5), {Rotation = 0}):Play()
- DropdownFrame:TweenSize(UDim2.new(0, 280, 0, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Linear, 0.5, true)
- end
- end)
- end
- function CheatsLib:AddSlider(Title, Min, Max, Callback)
- local SliderContainer = Instance.new("Frame", Frame)
- local TextLabel = Instance.new("TextLabel", SliderContainer)
- local ImageButton = Instance.new("ImageButton", SliderContainer)
- local ImageLabel = Instance.new("ImageLabel", ImageButton)
- SliderContainer.BackgroundColor3 = Color3.new(0.101961, 0.101961, 0.101961)
- SliderContainer.BorderColor3 = Color3.new(0.0666667, 0.0666667, 0.0666667)
- SliderContainer.BorderSizePixel = 2
- SliderContainer.Position = UDim2.new(0.419047624, 0, 0.164179102, 0)
- SliderContainer.Size = UDim2.new(0, 280, 0, 40)
- TextLabel.Text = Title
- TextLabel.BackgroundColor3 = Color3.new(0.101961, 0.101961, 0.101961)
- TextLabel.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
- TextLabel.BorderSizePixel = 0
- TextLabel.Position = UDim2.new(0, 0, 0.100000001, 0)
- TextLabel.Size = UDim2.new(0, 280, 0, 19)
- TextLabel.Font = Enum.Font.GothamBold
- TextLabel.TextColor3 = Color3.new(1, 1, 1)
- TextLabel.TextScaled = true
- TextLabel.TextWrapped = true
- ImageButton.BackgroundColor3 = Color3.new(0, 0, 0)
- ImageButton.BorderColor3 = Color3.new(1, 1, 1)
- ImageButton.BorderSizePixel = 0
- ImageButton.Position = UDim2.new(0.0357142873, 0, 0.649999976, 0)
- ImageButton.Size = UDim2.new(0.928571403, 0, 0.150000006, 0)
- ImageButton.AutoButtonColor = false
- ImageLabel.BackgroundColor3 = Color3.new(1, 1, 1)
- ImageLabel.BorderSizePixel = 0
- ImageLabel.Size = UDim2.new(0.5, 0, 0, 5)
- local mouse = game.Players.LocalPlayer:GetMouse()
- local uis = game:GetService("UserInputService")
- local Value
- ImageButton.MouseButton1Down:Connect(function()
- ImageLabel.Size = UDim2.new(0, math.clamp(mouse.X - ImageLabel.AbsolutePosition.X, 0, 260), 0, 5)
- ImageLabel.BackgroundColor3 = Color3.new(0.7, 0.7, 0.7)
- moveconnection = mouse.Move:Connect(function()
- Value = math.floor((((tonumber(Max) - tonumber(Min)) / 260) * ImageLabel.AbsoluteSize.X) + tonumber(Min))
- Callback(Value)
- ImageLabel.Size = UDim2.new(0, math.clamp(mouse.X - ImageLabel.AbsolutePosition.X, 0, 260), 0, 5)
- end)
- releaseconnection = uis.InputEnded:Connect(function(Mouse)
- if Mouse.UserInputType == Enum.UserInputType.MouseButton1 then
- ImageLabel.BackgroundColor3 = Color3.new(1, 1, 1)
- moveconnection:Disconnect()
- releaseconnection:Disconnect()
- end
- end)
- end)
- end
- return CheatsLib
- end
- return OptionsLibrary
- end
- local Library = Library:Create("AbstractPoo")
- local Option = Library:AddOption("Main")
- local Option2 = Library:AddOption("Other")
- Option:AddButton("Kill player", function()
- game.Players.LocalPlayer.Character.Humanoid.Health = 0
- end)
- Option:AddToggle("Hello", false, function(State)
- if State == true then
- print("true")
- elseif State == false then
- print("false")
- end
- end)
- Option:AddBox("WalkSpeed", "WalkSpeed", true, function(value)
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = tonumber(value)
- end)
- Option:AddDropdown("Hello", {"you", "are", "a", "skid :)"}, function(Option)
- print(Option)
- end)
- Option:AddSlider("Walkspeed", 16, 1000, function(Value)
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = tonumber(Value)
- end)
Advertisement
Add Comment
Please, Sign In to add comment