AbstractPoo

Untitled

Mar 24th, 2020
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.79 KB | None | 0 0
  1. local Library = {}
  2. function Library:Create(Title)
  3. local ScreenGui = Instance.new("ScreenGui", game.Players.LocalPlayer.PlayerGui)
  4. ScreenGui.Name = "AbstractUi"
  5. ScreenGui.ResetOnSpawn = false
  6. local Container = Instance.new("Frame")
  7. local Main = Instance.new("Frame")
  8. local Options = Instance.new("Frame")
  9. local UIListLayout_2 = Instance.new("UIListLayout")
  10. local Name = Instance.new("TextLabel")
  11.  
  12. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  13.  
  14. Container.Name = "Container"
  15. Container.Parent = ScreenGui
  16. Container.BackgroundColor3 = Color3.new(0, 0, 0)
  17. Container.BorderSizePixel = 0
  18. Container.Position = UDim2.new(0.295238107, 0, 0.298507452, 0)
  19. Container.Size = UDim2.new(0, 405, 0, 243)
  20. Container.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
  21. Container.Selectable = true
  22. Container.Active = true
  23.  
  24. Name.Name = ""
  25. Name.Parent = Container
  26. Name.BackgroundColor3 = Color3.new(0, 0, 0)
  27. Name.BorderSizePixel = 0
  28. Name.Size = UDim2.new(0, 405, 0, 30)
  29. Name.Font = Enum.Font.GothamBold
  30. Name.Text = " " .. tostring(Title)
  31. Name.TextColor3 = Color3.new(1, 1, 1)
  32. Name.TextScaled = true
  33. Name.TextSize = 14
  34. Name.TextWrapped = true
  35. Name.TextXAlignment = Enum.TextXAlignment.Left
  36.  
  37. Options.Name = "Options"
  38. Options.Parent = Container
  39. Options.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
  40. Options.BorderColor3 = Color3.new(0.0901961, 0.215686, 0.235294)
  41. Options.BorderSizePixel = 0
  42. Options.Position = UDim2.new(0, 0, 0.123825319, 0)
  43. Options.Size = UDim2.new(0, 100, 0, 213)
  44.  
  45. UIListLayout_2.Parent = Options
  46. UIListLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
  47. UIListLayout_2.Padding = UDim.new(0.01, 0)
  48. Main.Name = "Main"
  49. Main.Parent = Container
  50. Main.BackgroundColor3 = Color3.new(0.0901961, 0.215686, 0.235294)
  51. Main.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  52. Main.BorderSizePixel = 0
  53. Main.Position = UDim2.new(0.246913582, 0, 0.12384259, 0)
  54. Main.Size = UDim2.new(0, 305, 0, 213)
  55. local OptionsLibrary = {}
  56. local OptionCount = 0
  57. function OptionsLibrary:AddOption(Option)
  58. local TextButton = Instance.new("TextButton", Options)
  59. TextButton.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
  60. TextButton.BorderColor3 = Color3.fromRGB(26, 26, 26)
  61. TextButton.BorderSizePixel = 0
  62. TextButton.Size = UDim2.new(0, 100, 0, 30)
  63. TextButton.Font = Enum.Font.GothamBold
  64. TextButton.Text = " " .. tostring(Option)
  65. TextButton.TextColor3 = Color3.new(1, 1, 1)
  66. TextButton.TextSize = 20
  67. TextButton.TextXAlignment = Enum.TextXAlignment.Left
  68. local Effect = Instance.new("Frame", TextButton)
  69. Effect.Name = "Effect"
  70. Effect.Size = UDim2.new(0, 3, 0, 30)
  71. Effect.BackgroundColor3 = Color3.new(1,1, 1)
  72. Effect.BorderSizePixel = 0
  73. Effect.Visible = false
  74. Effect.Position = UDim2.new(0, 1, 0, 0)
  75. TextButton.MouseButton1Click:Connect(function()
  76. for i, v in pairs(game.Players.LocalPlayer.PlayerGui.AbstractUi.Container.Main:GetChildren()) do
  77. v.Visible = false
  78. end
  79. for i, v in pairs(game.Players.LocalPlayer.PlayerGui.AbstractUi.Container.Options:GetChildren()) do
  80. if v:IsA("TextButton") then
  81. v.Effect.Visible = false
  82. end
  83. end
  84. game.Players.LocalPlayer.PlayerGui.AbstractUi.Container.Main[Option].Visible = true
  85. Effect.Visible = true
  86. for i = 1, 0, -0.1 do
  87. Effect.BackgroundTransparency = i
  88. wait()
  89. end
  90. end)
  91.  
  92. local Frame = Instance.new("Frame", Main)
  93. if OptionCount == 0 then
  94. Frame.Visible = true
  95. Effect.Visible = true
  96. else
  97. Frame.Visible = false
  98. Effect.Visible = false
  99. end
  100. OptionCount = OptionCount + 1
  101. Frame.Name = Option
  102. Frame.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
  103. Frame.BorderSizePixel = 0
  104. Frame.Size = Main.Size
  105. local UIListLayout = Instance.new("UIListLayout", Main[Option])
  106. local UIPadding = Instance.new("UIPadding", Main[Option])
  107. UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  108. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  109. UIListLayout.Padding = UDim.new(0.0500000007, 0)
  110. UIPadding.PaddingTop = UDim.new(0.0500000007, 0)
  111.  
  112. local CheatsLib = {}
  113.  
  114. function CheatsLib:AddButton(Name, Callback)
  115. local Buttoncontainer = Instance.new("Frame", Frame)
  116. Buttoncontainer.Name = "Button container"
  117. Buttoncontainer.BackgroundColor3 = Color3.new(13, 13, 13)
  118. Buttoncontainer.BorderColor3 = Color3.new(13, 13, 13)
  119. Buttoncontainer.BorderSizePixel = 2
  120. Buttoncontainer.Position = UDim2.new(0.0409836061, 0, 0.0500000417, 0)
  121. Buttoncontainer.Size = UDim2.new(0, 280, 0, 20)
  122. local TextButton = Instance.new("TextButton")
  123. TextButton.Parent = Buttoncontainer
  124. TextButton.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
  125. TextButton.BorderColor3 = Color3.fromRGB(17, 17, 17)
  126. TextButton.BorderSizePixel = 2
  127. TextButton.Position = UDim2.new(0, 0, 7.62939464e-07, 0)
  128. TextButton.Size = UDim2.new(0, 280, 0, 20)
  129. TextButton.Font = Enum.Font.GothamSemibold
  130. TextButton.Text = Name
  131. TextButton.TextColor3 = Color3.new(1, 1, 1)
  132. TextButton.TextScaled = true
  133. TextButton.TextSize = 14
  134. TextButton.TextWrapped = true
  135. TextButton.TextXAlignment = Enum.TextXAlignment.Center
  136. TextButton.ClipsDescendants = true
  137. TextButton.MouseButton1Click:Connect(Callback)
  138. end
  139. function CheatsLib:AddToggle(Title, State, Callback)
  140. local Togglecontainer = Instance.new("Frame", Frame)
  141. Togglecontainer.Name = "Toggle container"
  142. Togglecontainer.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
  143. Togglecontainer.BorderColor3 = Color3.fromRGB(17, 17, 17)
  144. Togglecontainer.BorderSizePixel = 2
  145. Togglecontainer.Position = UDim2.new(-0.1, 0, 0.19, 0)
  146. Togglecontainer.Size = UDim2.new(0, 280, 0, 20)
  147. local ImageButton = Instance.new("ImageButton")
  148. ImageButton.Parent = Togglecontainer
  149. ImageButton.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
  150. ImageButton.Position = UDim2.new(0.935, 0, 0.1, 0)
  151. ImageButton.Size = UDim2.new(0, 16, 0, 16)
  152. ImageButton.ZIndex = 2
  153. ImageButton.ImageColor3 = Color3.new(1, 0, 0)
  154. local TextLabel = Instance.new("TextLabel")
  155. TextLabel.Parent = Togglecontainer
  156. TextLabel.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
  157. TextLabel.BorderSizePixel = 0
  158. TextLabel.Size = UDim2.new(0, 274, 0, 20)
  159. TextLabel.Font = Enum.Font.GothamSemibold
  160. TextLabel.Text = Title
  161. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  162. TextLabel.TextScaled = true
  163. TextLabel.TextSize = 14
  164. TextLabel.TextWrapped = true
  165. TextLabel.TextXAlignment = Enum.TextXAlignment.Center
  166. TextLabel.Position = UDim2.new(0.02, 0, 0, 0)
  167. if State then
  168. ImageButton.BackgroundColor3 = Color3.new(0, 1, 0)
  169. else
  170. ImageButton.BackgroundColor3 = Color3.new(1, 0, 0)
  171. end
  172. ImageButton.MouseButton1Click:Connect(function()
  173. State = not State
  174. if State then
  175. Callback(true)
  176. for i = 0, 1, 0.1 do
  177. ImageButton.BackgroundColor3 = Color3.new(1 - i, i, 0)
  178. wait()
  179. end
  180. else
  181. Callback(false)
  182. for i = 0, 1, 0.1 do
  183. ImageButton.BackgroundColor3 = Color3.new(i, 1 - i, 0)
  184. wait()
  185. end
  186. end
  187. end)
  188. end
  189. function CheatsLib:AddBox(Default, PlaceholderText, ClearTextOnFocus, Callback)
  190. local Textboxcontainer = Instance.new("Frame", Frame)
  191. local TextBox = Instance.new("TextBox")
  192. Textboxcontainer.Name = "Textbox container"
  193. Textboxcontainer.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
  194. Textboxcontainer.BorderColor3 = Color3.fromRGB(13, 13, 13)
  195. Textboxcontainer.BorderSizePixel = 2
  196. Textboxcontainer.Position = UDim2.new(0.0327868834, 0, 0.376760572, 0)
  197. Textboxcontainer.Size = UDim2.new(0, 280, 0, 20)
  198.  
  199. TextBox.Parent = Textboxcontainer
  200. TextBox.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
  201. TextBox.BorderSizePixel = 0
  202. TextBox.Position = UDim2.new(0.021428572, 0, 0, 0)
  203. TextBox.Size = UDim2.new(0, 274, 0, 20)
  204. TextBox.Font = Enum.Font.GothamSemibold
  205. TextBox.PlaceholderColor3 = Color3.new(0.392157, 0.392157, 0.392157)
  206. TextBox.Text = Default
  207. TextBox.TextColor3 = Color3.new(1, 1, 1)
  208. TextBox.TextSize = 18
  209. TextBox.TextXAlignment = Enum.TextXAlignment.Center
  210. TextBox.PlaceholderText = PlaceholderText
  211. TextBox.ClearTextOnFocus = ClearTextOnFocus
  212. TextBox.FocusLost:Connect(function()
  213. Callback(TextBox.Text)
  214. end)
  215. end
  216. function CheatsLib:AddDropdown(Name, OptionsTable, Callback)
  217. local DropdownContainer = Instance.new("Frame", Frame)
  218. DropdownContainer.Name = "Dropdown Container"
  219. DropdownContainer.BackgroundColor3 = Color3.fromRGB(13, 13, 13)
  220. DropdownContainer.BorderColor3 = Color3.fromRGB(13, 13, 13)
  221. DropdownContainer.BorderSizePixel = 2
  222. DropdownContainer.Position = UDim2.new(0.0409836061, 0, 0.0500000417, 0)
  223. DropdownContainer.Size = UDim2.new(0, 280, 0, 20)
  224. local UI = Instance.new("UIListLayout", DropdownContainer)
  225. UI.HorizontalAlignment = Enum.HorizontalAlignment.Center
  226. UI.Padding = UDim.new(0.1, 0)
  227. UI.SortOrder = Enum.SortOrder.LayoutOrder
  228. local Button = Instance.new("TextButton", DropdownContainer)
  229. Button.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
  230. Button.BorderColor3 = Color3.fromRGB(17, 17, 17)
  231. Button.BorderSizePixel = 2
  232. Button.Position = UDim2.new(0, 0, 7.62939464e-07, 0)
  233. Button.Size = UDim2.new(0, 280, 0, 20)
  234. Button.Font = Enum.Font.GothamSemibold
  235. Button.Text = Name
  236. Button.TextColor3 = Color3.new(1, 1, 1)
  237. Button.TextScaled = true
  238. Button.TextSize = 14
  239. Button.TextWrapped = true
  240. Button.TextXAlignment = Enum.TextXAlignment.Center
  241. local DropdownFrame = Instance.new("Frame", DropdownContainer)
  242. DropdownFrame.Size = UDim2.new(0, 280, 0, table.getn(OptionsTable) * 20)
  243. DropdownFrame.BackgroundColor3 = Color3.fromRGB(17, 17, 17)
  244. DropdownFrame.BorderSizePixel = 0
  245. DropdownFrame.BorderColor3 = Color3.fromRGB(17, 17, 17)
  246. DropdownFrame.BorderSizePixel = 2
  247. DropdownFrame.Visible = false
  248. local ScrollLayout = Instance.new("UIListLayout", DropdownFrame)
  249. ScrollLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  250. ScrollLayout.SortOrder = Enum.SortOrder.LayoutOrder
  251. for i, v in next, OptionsTable do
  252. local Option = Instance.new("TextButton", DropdownFrame)
  253. Option.BackgroundColor3 = Color3.fromRGB(17, 17, 17)
  254. Option.BorderSizePixel = 0
  255. Option.Position = UDim2.new(0, 0, 7.62939464e-07, 0)
  256. Option.Size = UDim2.new(0, 280, 0, 20)
  257. Option.Font = Enum.Font.GothamSemibold
  258. Option.Text = tostring(v)
  259. Option.TextColor3 = Color3.new(1, 1, 1)
  260. Option.TextSize = 20
  261. Option.TextXAlignment = Enum.TextXAlignment.Center
  262. Option.MouseButton1Click:Connect(function()
  263. Callback(Option.Text)
  264. end)
  265. end
  266. Button.MouseButton1Click:Connect(function()
  267. DropdownFrame.Visible = not DropdownFrame.Visible
  268. end)
  269. end
  270. return CheatsLib
  271. end
  272. return OptionsLibrary
  273. end
  274. return Library
Advertisement
Add Comment
Please, Sign In to add comment