Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local library = {}
- _G.flags = {}
- function library:Window(name, windowFlag)
- local ScreenGui = Instance.new("ScreenGui")
- local Window = Instance.new("Frame")
- local Top = Instance.new("Frame")
- local Title = Instance.new("TextLabel")
- local Close = Instance.new("TextButton")
- local PageList = Instance.new("ScrollingFrame")
- local PageListLayout = Instance.new("UIGridLayout")
- local mainWindowFlag = windowFlag
- _G.flags[mainWindowFlag] = {}
- _G.flags[mainWindowFlag].pages = {}
- ScreenGui.Parent = game.CoreGui
- ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Window.Name = "Window"
- Window.Parent = ScreenGui
- Window.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
- Window.BorderSizePixel = 0
- Window.Position = UDim2.new(0.316471338, 0, 0.334152341, 0)
- Window.Size = UDim2.new(0, 594, 0, 270)
- Window.Active = true
- Window.Draggable = true
- Top.Name = "Top"
- Top.Parent = Window
- Top.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
- Top.BorderSizePixel = 0
- Top.Size = UDim2.new(0, 594, 0, 26)
- Title.Name = "Title"
- Title.Parent = Top
- Title.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
- Title.BackgroundTransparency = 1.000
- Title.BorderSizePixel = 0
- Title.Size = UDim2.new(0, 573, 0, 26)
- Title.Font = Enum.Font.SourceSans
- Title.Text = name
- Title.TextColor3 = Color3.fromRGB(170, 170, 170)
- Title.TextSize = 14.000
- Title.TextWrapped = true
- Close.Name = "Close"
- Close.Parent = Top
- Close.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Close.BackgroundTransparency = 1.000
- Close.Position = UDim2.new(0.964646339, 0, 0, 0)
- Close.Size = UDim2.new(0, 21, 0, 26)
- Close.Font = Enum.Font.SourceSans
- Close.Text = "X"
- Close.TextColor3 = Color3.fromRGB(170, 170, 170)
- Close.TextSize = 14.000
- Close.MouseButton1Click:Connect(function()
- ScreenGui:Destroy()
- end)
- PageList.Name = "PageList"
- PageList.Parent = Window
- PageList.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
- PageList.BorderSizePixel = 0
- PageList.Position = UDim2.new(0, 0, 0.118518516, 0)
- PageList.Size = UDim2.new(0, 100, 0, 238)
- PageList.CanvasSize = UDim2.new(0, 0, 5, 0)
- PageList.ScrollBarThickness = 8
- PageListLayout.Name = "PageListLayout"
- PageListLayout.Parent = PageList
- PageListLayout.SortOrder = Enum.SortOrder.LayoutOrder
- PageListLayout.CellPadding = UDim2.new(0, 5, 0, 2)
- PageListLayout.CellSize = UDim2.new(0, 92, 0, 20)
- local UIS = game:GetService("UserInputService")
- UIS.InputBegan:Connect(function(k)
- if k.KeyCode == Enum.KeyCode.RightAlt then
- Window.Visible = not Window.Visible
- end
- end)
- local library2 = {}
- function library2:Page(name, pageFlag)
- local Page = Instance.new("TextButton")
- local Container = Instance.new("ScrollingFrame")
- local ContainerLayout = Instance.new("UIGridLayout")
- local mainPageFlag = pageFlag
- _G.flags[mainWindowFlag].pages[mainPageFlag] = {}
- _G.flags[mainWindowFlag].pages[mainPageFlag].textboxes = {}
- Container.Name = "Container"
- Container.Parent = Window
- Container.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
- Container.BorderSizePixel = 0
- Container.Position = UDim2.new(0.183501691, 0, 0.118518516, 0)
- Container.Size = UDim2.new(0, 484, 0, 238)
- Container.CanvasSize = UDim2.new(0, 0, 5, 0)
- Container.ScrollBarThickness = 8
- Container.Visible = false
- ContainerLayout.Name = "ContainerLayout"
- ContainerLayout.Parent = Container
- ContainerLayout.FillDirection = Enum.FillDirection.Vertical
- ContainerLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
- ContainerLayout.SortOrder = Enum.SortOrder.LayoutOrder
- ContainerLayout.CellPadding = UDim2.new(0, 14, 0, 2)
- ContainerLayout.CellSize = UDim2.new(0, 475, 0, 20)
- Page.Name = "Page"
- Page.Parent = PageList
- Page.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
- Page.BorderSizePixel = 0
- Page.Size = UDim2.new(0, 90, 0, 20)
- Page.Font = Enum.Font.SourceSans
- Page.TextColor3 = Color3.fromRGB(170, 170, 170)
- Page.TextSize = 14.000
- Page.Text = name
- Page.MouseButton1Click:Connect(function()
- for i,v in next, ScreenGui:GetDescendants() do
- if v.Name == "Container" then
- v.Visible = false
- Container.Visible = true
- end
- end
- end)
- local library3 = {}
- function library3:Button(name, callback)
- local callback = callback or function() end
- local Button = Instance.new("Frame")
- local Obj = Instance.new("TextButton")
- local ButtonText = Instance.new("TextLabel")
- Button.Name = "Button"
- Button.Parent = Container
- Button.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Button.BackgroundTransparency = 1.000
- Button.Size = UDim2.new(0, 476, 0, 20)
- Obj.Name = "Obj"
- Obj.Parent = Button
- Obj.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
- Obj.BorderSizePixel = 0
- Obj.Position = UDim2.new(0.673154712, 0, 0, 0)
- Obj.Size = UDim2.new(0, 154, 0, 20)
- Obj.Font = Enum.Font.SourceSans
- Obj.TextColor3 = Color3.fromRGB(170, 170, 170)
- Obj.TextSize = 14.000
- ButtonText.Name = "ButtonText"
- ButtonText.Parent = Button
- ButtonText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- ButtonText.BackgroundTransparency = 1.000
- ButtonText.Size = UDim2.new(0, 319, 0, 20)
- ButtonText.Font = Enum.Font.SourceSans
- ButtonText.TextColor3 = Color3.fromRGB(170, 170, 170)
- ButtonText.TextSize = 14.000
- ButtonText.TextXAlignment = Enum.TextXAlignment.Left
- ButtonText.Text = name
- Obj.MouseButton1Click:Connect(function()
- pcall(callback)
- end)
- end
- function library3:Toggle(name, callback)
- local Toggle = Instance.new("Frame")
- local ToggleText = Instance.new("TextLabel")
- local Object = Instance.new("Frame")
- local ToggleButton = Instance.new("TextButton")
- local actions = {}
- local enabled = false
- callback = callback or function() end
- Toggle.Name = "Toggle"
- Toggle.Parent = Container
- Toggle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Toggle.BackgroundTransparency = 1.000
- Toggle.Size = UDim2.new(0, 476, 0, 20)
- ToggleText.Name = "ToggleText"
- ToggleText.Parent = Toggle
- ToggleText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- ToggleText.BackgroundTransparency = 1.000
- ToggleText.Size = UDim2.new(0, 319, 0, 20)
- ToggleText.Font = Enum.Font.SourceSans
- ToggleText.TextColor3 = Color3.fromRGB(170, 170, 170)
- ToggleText.TextSize = 14.000
- ToggleText.TextXAlignment = Enum.TextXAlignment.Left
- ToggleText.Text = name
- Object.Name = "Object"
- Object.Parent = Toggle
- Object.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
- Object.BorderColor3 = Color3.fromRGB(180, 0, 0)
- Object.Position = UDim2.new(0.905263066, 0, 0.200000003, 0)
- Object.Size = UDim2.new(0, 29, 0, 11)
- ToggleButton.Name = "ToggleButton"
- ToggleButton.Parent = Object
- ToggleButton.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
- ToggleButton.BorderColor3 = Color3.fromRGB(180, 0, 0)
- ToggleButton.Position = UDim2.new(-0.17, 0,-0.137, 0)
- ToggleButton.Size = UDim2.new(0, 14, 0, 14)
- ToggleButton.Selected = true
- ToggleButton.Font = Enum.Font.SourceSans
- ToggleButton.Text = ""
- ToggleButton.TextColor3 = Color3.fromRGB(0, 0, 0)
- ToggleButton.TextSize = 14.000
- local function Fire()
- enabled = not enabled
- ToggleButton:TweenPosition(enabled and UDim2.new(0.67, 0,-0.137, 0) or UDim2.new(-0.17, 0,-0.137, 0), "InOut", Linear, 0.1)
- ToggleButton.BorderColor3 = enabled and Color3.fromRGB(0, 180, 0) or Color3.fromRGB(180, 0, 0)
- Object.BorderColor3 = enabled and Color3.fromRGB(0, 180, 0) or Color3.fromRGB(180, 0, 0)
- pcall(callback, enabled)
- end
- ToggleButton.MouseButton1Click:Connect(Fire)
- function actions:Set(arg)
- ToggleButton:TweenPosition(enabled and UDim2.new(0.67, 0,-0.137, 0) or UDim2.new(-0.17, 0,-0.137, 0), "InOut", Linear, 0.1)
- ToggleButton.BorderColor3 = enabled and Color3.fromRGB(0, 180, 0) or Color3.fromRGB(180, 0, 0)
- Object.BorderColor3 = enabled and Color3.fromRGB(0, 180, 0) or Color3.fromRGB(180, 0, 0)
- pcall(callback, arg)
- end
- end
- function library3:TextBox(name, placeholdertext, textBoxFlag, callback)
- local TextBox = Instance.new("Frame")
- local TextBoxText = Instance.new("TextLabel")
- local TextBox_2 = Instance.new("TextBox")
- callback = callback or function() end
- local mainTextBoxFlag = textBoxFlag
- _G.flags[mainWindowFlag].pages[mainPageFlag].textboxes[mainTextBoxFlag] = ""
- TextBox.Name = "TextBox"
- TextBox.Parent = Container
- TextBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextBox.BackgroundTransparency = 1.000
- TextBox.Size = UDim2.new(0, 476, 0, 20)
- TextBoxText.Name = "TextBoxText"
- TextBoxText.Parent = TextBox
- TextBoxText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextBoxText.BackgroundTransparency = 1.000
- TextBoxText.Size = UDim2.new(0, 319, 0, 20)
- TextBoxText.Font = Enum.Font.SourceSans
- TextBoxText.TextColor3 = Color3.fromRGB(170, 170, 170)
- TextBoxText.TextSize = 14.000
- TextBoxText.TextXAlignment = Enum.TextXAlignment.Left
- TextBoxText.Text = name
- TextBox_2.Parent = TextBox
- TextBox_2.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
- TextBox_2.BorderSizePixel = 0
- TextBox_2.Position = UDim2.new(0.671578944, 0, 0, 0)
- TextBox_2.Size = UDim2.new(0, 154, 0, 20)
- TextBox_2.ClearTextOnFocus = false
- TextBox_2.Font = Enum.Font.SourceSans
- TextBox_2.PlaceholderColor3 = Color3.fromRGB(208, 208, 208)
- TextBox_2.PlaceholderText = placeholdertext
- TextBox_2.TextColor3 = Color3.fromRGB(170, 170, 170)
- TextBox_2.TextSize = 14.000
- TextBox_2.Text = ""
- local function onFocusLost(enterPressed, inputObject)
- if enterPressed then
- _G.flags[mainWindowFlag].pages[mainPageFlag].textboxes[mainTextBoxFlag] = TextBox_2.Text
- pcall(callback)
- else
- _G.flags[mainWindowFlag].pages[mainPageFlag].textboxes[mainTextBoxFlag] = TextBox_2.Text
- end
- end
- TextBox_2.FocusLost:Connect(onFocusLost)
- end
- return library3
- end
- return library2
- end
- return library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement