Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local library = {
- windowcount = 0;
- }
- function library:CreateWindow(text)
- library.windowcount = library.windowcount + 1
- local toggled = false
- local MADCITYX = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local func = Instance.new("Frame")
- local TextLabel = Instance.new("TextLabel")
- local MinBtn = Instance.new("TextButton")
- local Diamond = Instance.new("ImageLabel")
- local Panel = Instance.new("Frame")
- local Strip = Instance.new("Frame")
- local BtnFrames = Instance.new("Frame")
- local UIListLayout = Instance.new("UIListLayout")
- MADCITYX.Name = "InfernusLIB"
- MADCITYX.Parent = game.CoreGui
- MADCITYX.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- MADCITYX.ResetOnSpawn = false
- func.Name = "func"
- func.Parent = MADCITYX
- func.Active = true
- func.BackgroundColor3 = Color3.fromRGB(47, 47, 47)
- func.BorderSizePixel = 0
- func.Position = UDim2.new(0, (15 + ((200 * library.windowcount) - 200)), 0, 15)
- func.Selectable = true
- func.Size = UDim2.new(0, 177, 0, 25)
- func.Selectable = true
- func.Active = true
- func.Draggable = true
- TextLabel.Parent = func
- TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.BackgroundTransparency = 1.000
- TextLabel.Position = UDim2.new(0.231792897, 0, 0.224843681, 0)
- TextLabel.Size = UDim2.new(0, 93, 0, 15)
- TextLabel.Font = Enum.Font.SourceSansBold
- TextLabel.Text = text
- TextLabel.TextColor3 = Color3.fromRGB(125, 255, 201)
- TextLabel.TextScaled = true
- TextLabel.TextSize = 14.000
- TextLabel.TextWrapped = true
- MinBtn.Name = "MinBtn"
- MinBtn.Parent = func
- MinBtn.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- MinBtn.BackgroundTransparency = 1.000
- MinBtn.Position = UDim2.new(0.754991829, 0, -0.0223813951, 0)
- MinBtn.Size = UDim2.new(0, 54, 0, 34)
- MinBtn.Font = Enum.Font.SourceSansBold
- MinBtn.Text = "-"
- MinBtn.TextColor3 = Color3.fromRGB(125, 255, 201)
- MinBtn.TextScaled = true
- MinBtn.TextSize = 14.000
- MinBtn.TextWrapped = true
- MinBtn.MouseButton1Click:Connect(function()
- if toggled == false then
- toggled = true
- MinBtn.Text = "-"
- Panel.Visible = true
- else
- toggled = false
- MinBtn.Text = "+"
- Panel.Visible = false
- end
- end)
- Panel.Name = "Panel"
- Panel.Parent = func
- Panel.BackgroundColor3 = Color3.fromRGB(47, 47, 47)
- Panel.BorderSizePixel = 0
- Panel.Position = UDim2.new(0, 0, 0.966999829, 0)
- Panel.Size = UDim2.new(0, 177, 0, 0)
- Strip.Name = "Strip"
- Strip.Parent = func
- Strip.BackgroundColor3 = Color3.fromRGB(125, 255, 201)
- Strip.BorderSizePixel = 0
- Strip.Position = UDim2.new(-3.44831392e-07, 0, 0.768718243, 0)
- Strip.Size = UDim2.new(0.999999821, 0, 0.127149001, 0)
- BtnFrames.Name = "BtnFrames"
- BtnFrames.Parent = Panel
- BtnFrames.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- BtnFrames.BackgroundTransparency = 1.000
- BtnFrames.Position = UDim2.new(0, 0, 0.014581793, 0)
- BtnFrames.Size = UDim2.new(0, 176, 0, 300)
- spawn(function()
- while true do
- for i=0, 1, 1 / 300 do
- MinBtn.TextColor3 = Color3.fromHSV(i, 1, 1);
- Strip.BackgroundColor3 = Color3.fromHSV(i, 1, 1);
- TextLabel.TextColor3 = Color3.fromHSV(i, 1, 1);
- wait()
- end;
- end
- end)
- function library:Create(class, data)
- local obj = Instance.new(class);
- for i, v in next, data do
- if i ~= 'Parent' then
- if typeof(v) == "Instance" then
- v.Parent = obj;
- else
- obj[i] = v
- end
- end
- end
- obj.Parent = data.Parent;
- return obj
- end
- library:Create("UIListLayout", {
- Name = 'List';
- SortOrder = Enum.SortOrder.LayoutOrder;
- FillDirection = Enum.FillDirection.Vertical;
- HorizontalAlignment = Enum.HorizontalAlignment.Center;
- Parent = BtnFrames;
- Padding = UDim.new(0, 5)
- })
- local epicLibrary = {}
- function epicLibrary:CreateButton(text, callback)
- local Button = Instance.new("TextButton")
- Button.Name = text
- Button.Parent = BtnFrames
- Button.BackgroundColor3 = Color3.fromRGB(72, 72, 72)
- Button.BorderSizePixel = 0
- Button.Position = UDim2.new(0.00651116669, 0, -0.135416672, 0)
- Button.Size = UDim2.new(0, 165, 0, 38)
- Button.Font = Enum.Font.SourceSansBold
- Button.Text = text
- Button.TextColor3 = Color3.fromRGB(255, 255, 255)
- Button.TextSize = 14.000
- Button.MouseButton1Click:Connect(callback)
- Panel.Size = Panel.Size + UDim2.new(0, 0, 0, 45)
- end
- function epicLibrary:Toggle(text, callback)
- text = text or "New Toggle"
- callback = callback or function() end
- local s = false
- local Toggle = Instance.new("TextLabel")
- local OnOffToggle = Instance.new("TextButton")
- local UITextSizeConstraint = Instance.new("UITextSizeConstraint")
- Toggle.Name = text
- Toggle.Parent = BtnFrames
- Toggle.BackgroundColor3 = Color3.new(1, 1, 1)
- Toggle.BackgroundTransparency = 1
- Toggle.BorderSizePixel = 0
- Toggle.Position = UDim2.new(0.193337187, 0, -0.00333333341, 0)
- Toggle.Size = UDim2.new(0, 140, 0, 25)
- Toggle.Font = Enum.Font.SourceSansBold
- Toggle.Text = text
- Toggle.TextColor3 = Color3.new(1, 1, 1)
- Toggle.TextScaled = true
- Toggle.TextSize = 14
- Toggle.TextWrapped = true
- Toggle.TextXAlignment = Enum.TextXAlignment.Right
- OnOffToggle.Name = "OnOffToggle"
- OnOffToggle.Parent = Toggle
- OnOffToggle.BackgroundColor3 = Color3.new(0.211765, 0.211765, 0.211765)
- OnOffToggle.BorderSizePixel = 0
- OnOffToggle.Position = UDim2.new(-0.100907357, 0, 0.0279503129, 0)
- OnOffToggle.Size = UDim2.new(0, 23, 0, 24)
- OnOffToggle.Font = Enum.Font.SourceSans
- OnOffToggle.Text = ""
- OnOffToggle.TextColor3 = Color3.new(0, 0, 0)
- OnOffToggle.TextSize = 14
- OnOffToggle.MouseButton1Down:Connect(function()
- if s == false then
- s = true
- OnOffToggle.BackgroundColor3 = Color3.fromRGB(85, 255, 0)
- else
- s = false
- OnOffToggle.BackgroundColor3 = Color3.new(0.211765, 0.211765, 0.211765)
- end
- end)
- OnOffToggle.MouseButton1Click:Connect(function()
- if s == true then
- s = false
- else
- s = true
- end
- end)
- while wait() do
- if s then
- callback();
- end
- end
- UITextSizeConstraint.Parent = Toggle
- UITextSizeConstraint.MaxTextSize = 16
- Panel.Size = Panel.Size + UDim2.new(0, 0, 0, 24*2)
- end
- return epicLibrary
- end
- return library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement