Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --ui v2
- local lib = {
- ToggleOn = Color3.fromRGB(40, 255, 40),
- ToggleOff = Color3.fromRGB(255, 40, 40)
- }
- local count = 0
- function lib:Frame(Name)
- count=count+1
- local mainui = Instance.new("ScreenGui")
- local Top = Instance.new("Frame")
- local Container = Instance.new("Frame")
- local name = Instance.new("TextLabel")
- local UIListLayout = Instance.new("UIListLayout")
- for i,v in pairs(game.CoreGui.RobloxGui:GetChildren()) do
- if i == math.random(1,5) then
- mainui.Parent = v
- break;
- end
- end
- Top.Name = "Top"
- Top.Parent = mainui
- Top.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
- Top.BorderColor3 = Color3.new(0.152941, 1, 0.34902)
- Top.BorderSizePixel = 1
- Top.Position = UDim2.new(0.0343383588 + (count*.1), 0, 0.0679886714, 0)
- Top.Size = UDim2.new(0, 170, 0, 30)
- Top.Active = true
- Top.Draggable = true
- Container.Name = "Container"
- Container.Parent = Top
- Container.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
- Container.BorderColor3 = Color3.new(0.152941, 1, 0.34902)
- Container.BorderSizePixel = 1
- Container.Position = UDim2.new(-0.000955760479, 0, 0.983205199, 0)
- Container.Size = UDim2.new(0, 170, 0, 150)
- UIListLayout.Parent = Container
- UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
- name.Name = "name"
- name.Parent = Top
- name.BackgroundColor3 = Color3.new(1, 1, 1)
- name.BackgroundTransparency = 1
- name.Size = UDim2.new(0, 169, 0, 30)
- name.Font = Enum.Font.SourceSans
- name.TextColor3 = Color3.new(1, 1, 1)
- name.Text = Name
- name.TextSize = 20
- local lib2 = {buttons = 0}
- function lib2:Toggle(text, variable)
- lib2.buttons=lib2.buttons+1
- Container.Size = UDim2.new(0, 170, 0, 28*lib2.buttons)
- local lol = Instance.new("TextLabel")
- local togglebtn = Instance.new("TextButton")
- lol.Name = "lol"
- lol.Parent = Container
- lol.BackgroundColor3 = Color3.new(1, 1, 1)
- lol.BackgroundTransparency = 1
- lol.Size = UDim2.new(0, 126, 0, 28)
- lol.Font = Enum.Font.Code
- lol.TextColor3 = Color3.new(1, 1, 1)
- lol.TextSize = 20
- lol.Text = text
- togglebtn.Name = "togglebtn"
- togglebtn.Parent = lol
- togglebtn.BackgroundColor3 = Color3.new(1, 0.156863, 0.156863)
- togglebtn.BorderSizePixel = 0
- togglebtn.Position = UDim2.new(0.995144784, 0, 0.00335884094, 0)
- togglebtn.Size = UDim2.new(0, 44, 0, 28)
- togglebtn.Font = Enum.Font.SourceSans
- togglebtn.Text = ""
- togglebtn.TextColor3 = Color3.new(0, 0, 0)
- togglebtn.TextSize = 14
- togglebtn.MouseButton1Down:Connect(function()
- --pcall(function()
- _G.tggle[variable] = not _G.tggle[variable]
- print(_G.tggle[variable])
- if _G.tggle[variable] == true then
- togglebtn.BackgroundColor3 = lib.ToggleOn
- else
- togglebtn.BackgroundColor3 = lib.ToggleOff
- end
- --end)
- end)
- end
- function lib2:Button(text, callback)
- lib2.buttons=lib2.buttons+1
- local TextButton = Instance.new("TextButton")
- Container.Size = UDim2.new(0, 170, 0, 28*lib2.buttons)
- TextButton.Parent = Container
- TextButton.BackgroundColor3 = Color3.new(1, 1, 1)
- TextButton.Size = UDim2.new(0, 170, 0, 28)
- TextButton.BackgroundTransparency = 1
- TextButton.Font = Enum.Font.SourceSans
- TextButton.TextColor3 = Color3.new(1, 1, 1)
- TextButton.MouseButton1Down:Connect(callback)
- TextButton.TextSize = 17
- TextButton.Text = text
- end
- return lib2
- end
- return lib
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement