Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local library = {
- windowcount = 0
- }
- function library:CreateWindow(text)
- local Container = Instance.new("ScreenGui")
- local Disz = Instance.new("Frame")
- local Title = Instance.new("TextLabel")
- local OpenClose = Instance.new("TextButton")
- local Window = Instance.new("Frame")
- local UIPadding = Instance.new("UIPadding")
- local UIListLayout = Instance.new("UIListLayout")
- Container.Name = "Container"
- Container.Parent = game.CoreGui
- Container.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Disz.Name = "Disz"
- Disz.Parent = Container
- Disz.BackgroundColor3 = Color3.new(0.105882, 0.105882, 0.105882)
- Disz.BorderSizePixel = 0
- Disz.Position = UDim2.new(0, (15 + ((200 * library.windowcount) - 200)), 0, 15)
- Disz.Size = UDim2.new(0, 160, 0, 25)
- Title.Name = "Title"
- Title.Parent = Disz
- Title.BackgroundColor3 = Color3.new(1, 1, 1)
- Title.BackgroundTransparency = 1
- Title.Size = UDim2.new(0, 160, 0, 25)
- Title.Font = Enum.Font.GothamBold
- Title.Text = text
- Title.TextColor3 = Color3.new(1, 1, 1)
- Title.TextScaled = true
- Title.TextSize = 14
- Title.TextWrapped = true
- OpenClose.Name = "OpenClose"
- OpenClose.Parent = Disz
- OpenClose.BackgroundColor3 = Color3.new(1, 1, 1)
- OpenClose.BackgroundTransparency = 1
- OpenClose.Position = UDim2.new(0.806249976, 0, 0, 0)
- OpenClose.Size = UDim2.new(0, 31, 0, 25)
- OpenClose.Font = Enum.Font.Cartoon
- OpenClose.Text = "-"
- OpenClose.TextColor3 = Color3.new(1, 1, 1)
- OpenClose.TextScaled = true
- OpenClose.TextSize = 14
- OpenClose.TextWrapped = true
- OpenClose.MouseButton1Click:Connect(function()
- if Window.Visible == true then
- Window.Visible = false
- OpenClose.Text = "+"
- else
- Window.Visible = true
- OpenClose.Text = "-"
- end
- end)
- Window.Name = "Window"
- Window.Parent = Disz
- Window.BackgroundColor3 = Color3.new(0.133333, 0.133333, 0.133333)
- Window.BorderSizePixel = 0
- Window.Position = UDim2.new(-0.00229400396, 0, 0.967330694, 0)
- Window.Size = UDim2.new(0, 160, 0, 26)
- UIPadding.Parent = Window
- UIPadding.PaddingLeft = UDim.new(0, 2)
- UIListLayout.Parent = Window
- UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
- local epicLibrary = {}
- function epicLibrary:CreateButton(text, callback)
- text = text or "New Button"
- callback = callback or function() end
- local NewButton = Instance.new("TextButton")
- NewButton.Name = text
- NewButton.Parent = Window
- NewButton.BackgroundColor3 = Color3.new(1, 1, 1)
- NewButton.BackgroundTransparency = 1
- NewButton.Position = UDim2.new(0, 0, 0.114035085, 0)
- NewButton.Size = UDim2.new(0, 160, 0, 26)
- NewButton.Font = Enum.Font.GothamBold
- NewButton.Text = text
- NewButton.TextColor3 = Color3.new(1, 1, 1)
- NewButton.TextSize = 14
- NewButton.MouseButton1Click:Connect(callback)
- end
- function epicLibrary:CreateToggle(text, callback)
- text = text or "New Toggle"
- callback = callback or function() end
- local flag = false
- local NewToggle = Instance.new("TextLabel")
- local Frame = Instance.new("Frame")
- local TextButton = Instance.new("TextButton")
- local UITextSizeConstraint = Instance.new("UITextSizeConstraint")
- NewToggle.Name = text
- NewToggle.Parent = Window
- NewToggle.BackgroundColor3 = Color3.new(1, 1, 1)
- NewToggle.BackgroundTransparency = 1
- NewToggle.Size = UDim2.new(0, 129, 0, 26)
- NewToggle.Font = Enum.Font.GothamBold
- NewToggle.TextColor3 = Color3.new(1, 1, 1)
- NewToggle.TextSize = 14
- NewToggle.Text = text
- NewToggle.TextWrapped = true
- NewToggle.TextXAlignment = Enum.TextXAlignment.Left
- Frame.Parent = NewToggle
- Frame.BackgroundColor3 = Color3.new(0.101961, 0.101961, 0.101961)
- Frame.BorderSizePixel = 0
- Frame.Position = UDim2.new(1.04700005, 0, 0.209999993, 0)
- Frame.Size = UDim2.new(0, 18, 0, 17)
- TextButton.Parent = Frame
- TextButton.BackgroundColor3 = Color3.new(1, 1, 1)
- TextButton.BackgroundTransparency = 1
- TextButton.Position = UDim2.new(-8.4771051e-07, 0, -4.48787915e-07, 0)
- TextButton.Size = UDim2.new(0, 18, 0, 17)
- TextButton.Font = Enum.Font.SourceSans
- TextButton.Text = ""
- TextButton.TextColor3 = Color3.new(0, 0, 0)
- TextButton.TextSize = 14
- TextButton.MouseButton1Down:Connect(function()
- if flag then
- flag = false
- Frame.BackgroundColor3 = Color3.new(1, 0.0313726, 0)
- else
- flag = true
- Frame.BackgroundColor3 = Color3.new(0.101961, 0.101961, 0.101961)
- end
- end)
- while wait() do
- if flag then
- callback();
- end
- end
- UITextSizeConstraint.Parent = NewToggle
- UITextSizeConstraint.MaxTextSize = 18
- UITextSizeConstraint.MinTextSize = 18
- end
- return epicLibrary
- end
- return library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement