Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- config = {
- LibName = "Test",
- LibText = "Lib Test"
- }
- local Library = {}
- function Library:CreateWindow(name)
- local uilib = Instance.new("ScreenGui")
- local Top = Instance.new("Frame")
- local Header = Instance.new("TextLabel")
- local Container = Instance.new("Frame")
- local ObjHolder = Instance.new("ScrollingFrame")
- local UIListLayout = Instance.new("UIListLayout")
- uilib.Name = config.LibName
- uilib.Parent = game.CoreGui
- Top.Name = "Top"
- Top.Parent = uilib
- Top.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- Top.BorderSizePixel = 0
- Top.Position = UDim2.new(0.171992481, 0, 0.231075704, 0)
- Top.Size = UDim2.new(0, 275, 0, 29)
- Header.Name = "Header"
- Header.Parent = Top
- Header.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Header.BackgroundTransparency = 1.000
- Header.Size = UDim2.new(0, 275, 0, 29)
- Header.Font = Enum.Font.Code
- Header.Text = config.LibName
- Header.TextColor3 = Color3.fromRGB(255, 255, 255)
- Header.TextSize = 14.000
- Container.Name = "Container"
- Container.Parent = Top
- Container.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
- Container.BorderSizePixel = 0
- Container.ClipsDescendants = true
- Container.Position = UDim2.new(0, 0, 1, 0)
- Container.Size = UDim2.new(0, 275, 0, 125)
- ObjHolder.Name = "ObjHolder"
- ObjHolder.Parent = Container
- ObjHolder.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- ObjHolder.BackgroundTransparency = 1.000
- ObjHolder.BorderSizePixel = 0
- ObjHolder.Size = UDim2.new(0, 275, 0, 125)
- ObjHolder.CanvasSize = UDim2.new(0, 0, 5, 0)
- ObjHolder.ScrollBarThickness = 1
- UIListLayout.Parent = ObjHolder
- UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
- UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
- UIListLayout.Padding = UDim.new(0.00499999989, 0)
- local Objects = {}
- function Objects:AddBtn(text, name, font,func)
- local ButtonTemplate = Instance.new("TextButton")
- ButtonTemplate.Name = name
- ButtonTemplate.Parent = ObjHolder
- ButtonTemplate.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
- ButtonTemplate.BorderSizePixel = 0
- ButtonTemplate.Position = UDim2.new(0.00800000038, 0, 0.282999992, 0)
- ButtonTemplate.Size = UDim2.new(0, 248, 0, 31)
- ButtonTemplate.AutoButtonColor = false
- ButtonTemplate.Font = font or Enum.Font.ArialBold
- ButtonTemplate.Text = text
- ButtonTemplate.TextColor3 = Color3.fromRGB(255, 255, 255)
- ButtonTemplate.TextSize = 14.000
- ButtonTemplate.MouseButton1Click:Connect(function()
- func()
- end)
- end
- function Objects:AddSection(text, name, font)
- local SectionLabel = Instance.new("TextLabel")
- SectionLabel.Name = "SectionLabel"
- SectionLabel.Parent = ObjHolder
- SectionLabel.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
- SectionLabel.BorderSizePixel = 0
- SectionLabel.Position = UDim2.new(0.00800000038, 0, 0, 0)
- SectionLabel.Size = UDim2.new(0, 248, 0, 31)
- SectionLabel.Font = font or Enum.Font.GothamSemibold
- SectionLabel.Text = "Test Section"
- SectionLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- SectionLabel.TextSize = 14.000
- end
- return Objects;
- end
- return Library;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement