Advertisement
ROBLOX_HAXX

Untitled

Apr 4th, 2020
407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.00 KB | None | 0 0
  1. --ui v2
  2.  
  3. local lib = {
  4. ToggleOn = Color3.fromRGB(40, 255, 40),
  5. ToggleOff = Color3.fromRGB(255, 40, 40)
  6. }
  7.  
  8. local count = 0
  9.  
  10. function lib:Frame(Name)
  11. count=count+1
  12. local ScreenGui = Instance.new("ScreenGui")
  13. local Frame = Instance.new("Frame")
  14. local name = Instance.new("TextLabel")
  15. local UIListLayout = Instance.new("UIListLayout")
  16.  
  17. --Properties:
  18.  
  19. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  20. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  21.  
  22. Frame.Parent = ScreenGui
  23. Frame.BackgroundColor3 = Color3.new(0.227451, 0.227451, 0.227451)
  24. Frame.BorderSizePixel = 6
  25. Frame.Position = UDim2.new(0.578787863, 0, 0.99140048, 0)
  26. Frame.Size = UDim2.new(0, 133, 0, 203)
  27.  
  28. name.Name = "name"
  29. name.Parent = Frame
  30. name.BackgroundColor3 = Color3.new(1, 1, 1)
  31. name.BackgroundTransparency = 1
  32. name.Size = UDim2.new(0, 133, 0, 27)
  33. name.Font = Enum.Font.SourceSans
  34. name.Text = "name"
  35. name.TextColor3 = Color3.new(1, 1, 1)
  36. name.TextScaled = true
  37. name.TextSize = 14
  38. name.TextWrapped = true
  39.  
  40. UIListLayout.Parent = ScreenGui
  41. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  42.  
  43.  
  44. local lib2 = {buttons = 0}
  45.  
  46. function lib2:Toggle(text, variable)
  47. lib2.buttons=lib2.buttons+1
  48. Container.Size = UDim2.new(0, 170, 0, 28*lib2.buttons)
  49. local lol = Instance.new("TextLabel")
  50. local togglebtn = Instance.new("TextButton")
  51.  
  52. lol.Name = "lol"
  53. lol.Parent = Container
  54. lol.BackgroundColor3 = Color3.new(1, 1, 1)
  55. lol.BackgroundTransparency = 1
  56. lol.Size = UDim2.new(0, 126, 0, 28)
  57. lol.Font = Enum.Font.Code
  58. lol.TextColor3 = Color3.new(1, 1, 1)
  59. lol.TextSize = 20
  60. lol.Text = text
  61. togglebtn.Name = "togglebtn"
  62. togglebtn.Parent = lol
  63. togglebtn.BackgroundColor3 = Color3.new(1, 0.156863, 0.156863)
  64. togglebtn.BorderSizePixel = 0
  65. togglebtn.Position = UDim2.new(0.995144784, 0, 0.00335884094, 0)
  66. togglebtn.Size = UDim2.new(0, 44, 0, 28)
  67. togglebtn.Font = Enum.Font.SourceSans
  68. togglebtn.Text = ""
  69. togglebtn.TextColor3 = Color3.new(0, 0, 0)
  70. togglebtn.TextSize = 14
  71. togglebtn.MouseButton1Down:Connect(function()
  72. --pcall(function()
  73. _G.tggle[variable] = not _G.tggle[variable]
  74. print(_G.tggle[variable])
  75. if _G.tggle[variable] == true then
  76. togglebtn.BackgroundColor3 = lib.ToggleOn
  77. else
  78. togglebtn.BackgroundColor3 = lib.ToggleOff
  79. end
  80. --end)
  81. end)
  82. end
  83.  
  84. function lib2:Button(text, callback)
  85. lib2.buttons=lib2.buttons+1
  86. local TextButton = Instance.new("TextButton")
  87. Container.Size = UDim2.new(0, 170, 0, 28*lib2.buttons)
  88. TextButton.Parent = Container
  89. TextButton.BackgroundColor3 = Color3.new(1, 1, 1)
  90. TextButton.Size = UDim2.new(0, 170, 0, 28)
  91. TextButton.BackgroundTransparency = 1
  92. TextButton.Font = Enum.Font.SourceSans
  93. TextButton.TextColor3 = Color3.new(1, 1, 1)
  94. TextButton.MouseButton1Down:Connect(callback)
  95. TextButton.TextSize = 17
  96. TextButton.Text = text
  97. end
  98. return lib2
  99. end
  100. return lib
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement