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 ScreenGui = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local name = Instance.new("TextLabel")
- local UIListLayout = Instance.new("UIListLayout")
- --Properties:
- ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Frame.Parent = ScreenGui
- Frame.BackgroundColor3 = Color3.new(0.227451, 0.227451, 0.227451)
- Frame.BorderSizePixel = 6
- Frame.Position = UDim2.new(0.578787863, 0, 0.99140048, 0)
- Frame.Size = UDim2.new(0, 133, 0, 203)
- name.Name = "name"
- name.Parent = Frame
- name.BackgroundColor3 = Color3.new(1, 1, 1)
- name.BackgroundTransparency = 1
- name.Size = UDim2.new(0, 133, 0, 27)
- name.Font = Enum.Font.SourceSans
- name.Text = "name"
- name.TextColor3 = Color3.new(1, 1, 1)
- name.TextScaled = true
- name.TextSize = 14
- name.TextWrapped = true
- UIListLayout.Parent = ScreenGui
- UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
- 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