AbstractPoo

Untitled

Mar 25th, 2020
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.56 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.  
  11. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  12.  
  13. Container.Name = "Container"
  14. Container.Parent = ScreenGui
  15. Container.BackgroundColor3 = Color3.new(0, 0, 0)
  16. Container.BorderSizePixel = 0
  17. Container.Position = UDim2.new(0.295238107, 0, 0.298507452, 0)
  18. Container.Size = UDim2.new(0, 405, 0, 243)
  19. Container.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
  20. Container.Selectable = true
  21. Container.Active = true
  22. Container.Draggable = true
  23.  
  24. local Name = Instance.new("TextLabel", Container)
  25. Name.Name = ""
  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.  
  38. Options.Name = "Options"
  39. Options.Parent = Container
  40. Options.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
  41. Options.BorderColor3 = Color3.new(0.0901961, 0.215686, 0.235294)
  42. Options.BorderSizePixel = 0
  43. Options.Position = UDim2.new(0, 0, 0.123825319, 0)
  44. Options.Size = UDim2.new(0, 100, 0, 213)
  45.  
  46. UIListLayout_2.Parent = Options
  47. UIListLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
  48. UIListLayout_2.Padding = UDim.new(0.01, 0)
  49. Main.Name = "Main"
  50. Main.Parent = Container
  51. Main.BackgroundColor3 = Color3.new(0.0901961, 0.215686, 0.235294)
  52. Main.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  53. Main.BorderSizePixel = 0
  54. Main.Position = UDim2.new(0.246913582, 0, 0.12384259, 0)
  55. Main.Size = UDim2.new(0, 305, 0, 213)
  56. local OptionsLibrary = {}
  57. local OptionCount = 0
  58. function OptionsLibrary:AddOption(Option)
  59. local TextButton = Instance.new("TextButton", Options)
  60. TextButton.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
  61. TextButton.BorderColor3 = Color3.fromRGB(26, 26, 26)
  62. TextButton.BorderSizePixel = 0
  63. TextButton.Size = UDim2.new(0, 100, 0, 30)
  64. TextButton.Font = Enum.Font.GothamBold
  65. TextButton.Text = " " .. tostring(Option)
  66. TextButton.TextColor3 = Color3.new(1, 1, 1)
  67. TextButton.TextSize = 20
  68. TextButton.TextXAlignment = Enum.TextXAlignment.Left
  69. local Effect = Instance.new("Frame", TextButton)
  70. Effect.Name = "Effect"
  71. Effect.Size = UDim2.new(0, 3, 0, 30)
  72. Effect.BackgroundColor3 = Color3.new(1,1, 1)
  73. Effect.BorderSizePixel = 0
  74. Effect.Visible = false
  75. Effect.Position = UDim2.new(0, 1, 0, 0)
  76. TextButton.MouseButton1Click:Connect(function()
  77. for i, v in pairs(game.Players.LocalPlayer.PlayerGui.AbstractUi.Container.Main:GetChildren()) do
  78. v.Visible = false
  79. end
  80. for i, v in pairs(game.Players.LocalPlayer.PlayerGui.AbstractUi.Container.Options:GetChildren()) do
  81. if v:IsA("TextButton") then
  82. v.Effect.Visible = false
  83. end
  84. end
  85. game.Players.LocalPlayer.PlayerGui.AbstractUi.Container.Main[Option].Visible = true
  86. Effect.Visible = true
  87. for i = 1, 0, -0.1 do
  88. Effect.BackgroundTransparency = i
  89. wait()
  90. end
  91. end)
  92.  
  93. local Frame = Instance.new("Frame", Main)
  94. if OptionCount == 0 then
  95. Frame.Visible = true
  96. Effect.Visible = true
  97. else
  98. Frame.Visible = false
  99. Effect.Visible = false
  100. end
  101. OptionCount = OptionCount + 1
  102. Frame.Name = Option
  103. Frame.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
  104. Frame.BorderSizePixel = 0
  105. Frame.Size = Main.Size
  106. local UIListLayout = Instance.new("UIListLayout", Main[Option])
  107. local UIPadding = Instance.new("UIPadding", Main[Option])
  108. UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  109. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  110. UIListLayout.Padding = UDim.new(0.0500000007, 0)
  111. UIPadding.PaddingTop = UDim.new(0.0500000007, 0)
  112.  
  113. local CheatsLib = {}
  114.  
  115. function CheatsLib:AddButton(Name, Callback)
  116. local Buttoncontainer = Instance.new("Frame", Frame)
  117. Buttoncontainer.Name = "Button container"
  118. Buttoncontainer.BackgroundColor3 = Color3.new(13, 13, 13)
  119. Buttoncontainer.BorderColor3 = Color3.new(13, 13, 13)
  120. Buttoncontainer.BorderSizePixel = 2
  121. Buttoncontainer.Position = UDim2.new(0.0409836061, 0, 0.0500000417, 0)
  122. Buttoncontainer.Size = UDim2.new(0, 280, 0, 20)
  123. local TextButton = Instance.new("TextButton")
  124. TextButton.Parent = Buttoncontainer
  125. TextButton.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
  126. TextButton.BorderColor3 = Color3.fromRGB(17, 17, 17)
  127. TextButton.BorderSizePixel = 2
  128. TextButton.Position = UDim2.new(0, 0, 7.62939464e-07, 0)
  129. TextButton.Size = UDim2.new(0, 280, 0, 20)
  130. TextButton.Font = Enum.Font.GothamSemibold
  131. TextButton.Text = Name
  132. TextButton.TextColor3 = Color3.new(1, 1, 1)
  133. TextButton.TextScaled = true
  134. TextButton.TextSize = 14
  135. TextButton.TextWrapped = true
  136. TextButton.TextXAlignment = Enum.TextXAlignment.Center
  137. TextButton.ClipsDescendants = true
  138. TextButton.MouseButton1Click:Connect(Callback)
  139. end
  140. function CheatsLib:AddToggle(Title, State, Callback)
  141. local Togglecontainer = Instance.new("Frame", Frame)
  142. Togglecontainer.Name = "Toggle container"
  143. Togglecontainer.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
  144. Togglecontainer.BorderColor3 = Color3.fromRGB(17, 17, 17)
  145. Togglecontainer.BorderSizePixel = 2
  146. Togglecontainer.Position = UDim2.new(-0.1, 0, 0.19, 0)
  147. Togglecontainer.Size = UDim2.new(0, 280, 0, 20)
  148. local ImageButton = Instance.new("ImageButton")
  149. ImageButton.Parent = Togglecontainer
  150. ImageButton.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
  151. ImageButton.Position = UDim2.new(0.935, 0, 0.1, 0)
  152. ImageButton.Size = UDim2.new(0, 16, 0, 16)
  153. ImageButton.ZIndex = 2
  154. ImageButton.ImageColor3 = Color3.new(1, 0, 0)
  155. ImageButton.BorderSizePixel = 0
  156. ImageButton.Image = "http://www.roblox.com/asset/?id=4673207466"
  157. ImageButton.ImageColor3 = Color3.new(1, 1, 1)
  158. local TextLabel = Instance.new("TextLabel")
  159. TextLabel.Parent = Togglecontainer
  160. TextLabel.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
  161. TextLabel.BorderSizePixel = 0
  162. TextLabel.Size = UDim2.new(0, 274, 0, 20)
  163. TextLabel.Font = Enum.Font.GothamSemibold
  164. TextLabel.Text = Title
  165. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  166. TextLabel.TextScaled = true
  167. TextLabel.TextSize = 14
  168. TextLabel.TextWrapped = true
  169. TextLabel.TextXAlignment = Enum.TextXAlignment.Center
  170. TextLabel.Position = UDim2.new(0.02, 0, 0, 0)
  171. if State then
  172. ImageButton.BackgroundColor3 = Color3.fromRGB(0, 100, 200)
  173. else
  174. ImageButton.BackgroundColor3 = Color3.new(0, 0, 0)
  175. TextLabel.TextColor3 = Color3.new(0.7, 0.7, 0.7)
  176. ImageButton.ImageTransparency = 1
  177. end
  178. ImageButton.MouseButton1Click:Connect(function()
  179. State = not State
  180. if State then
  181. Callback(true)
  182. for i = 0, 100, 10 do
  183. TextLabel.TextColor3 = Color3.new(TextLabel.TextColor3.R + 0.025, TextLabel.TextColor3.G + 0.025, TextLabel.TextColor3.B + 0.025)
  184. ImageButton.BackgroundColor3 = Color3.fromRGB(0, i, i * 1.5)
  185. ImageButton.ImageTransparency = 1 - (i / 100)
  186. wait()
  187. end
  188. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  189. else
  190. Callback(false)
  191. for i = 0, 100, 10 do
  192. TextLabel.TextColor3 = Color3.new(TextLabel.TextColor3.R - 0.025, TextLabel.TextColor3.G - 0.025, TextLabel.TextColor3.B - 0.025)
  193. ImageButton.BackgroundColor3 = Color3.fromRGB(0, 100 - i, 150 - (i * 1.5))
  194. ImageButton.ImageTransparency = i / 100
  195. wait()
  196. end
  197. TextLabel.TextColor3 = Color3.new(0.7, 0.7, 0.7)
  198. end
  199. end)
  200. end
  201. function CheatsLib:AddBox(Default, PlaceholderText, ClearTextOnFocus, Callback)
  202. local Textboxcontainer = Instance.new("Frame", Frame)
  203. local TextBox = Instance.new("TextBox")
  204. Textboxcontainer.Name = "Textbox container"
  205. Textboxcontainer.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
  206. Textboxcontainer.BorderColor3 = Color3.fromRGB(13, 13, 13)
  207. Textboxcontainer.BorderSizePixel = 2
  208. Textboxcontainer.Position = UDim2.new(0.0327868834, 0, 0.376760572, 0)
  209. Textboxcontainer.Size = UDim2.new(0, 280, 0, 20)
  210.  
  211. TextBox.Parent = Textboxcontainer
  212. TextBox.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
  213. TextBox.BorderSizePixel = 0
  214. TextBox.Position = UDim2.new(0.021428572, 0, 0, 0)
  215. TextBox.Size = UDim2.new(0, 274, 0, 20)
  216. TextBox.Font = Enum.Font.GothamSemibold
  217. TextBox.PlaceholderColor3 = Color3.new(0.392157, 0.392157, 0.392157)
  218. TextBox.Text = Default
  219. TextBox.TextColor3 = Color3.new(1, 1, 1)
  220. TextBox.TextSize = 18
  221. TextBox.TextXAlignment = Enum.TextXAlignment.Center
  222. TextBox.PlaceholderText = PlaceholderText
  223. TextBox.ClearTextOnFocus = ClearTextOnFocus
  224. TextBox.FocusLost:Connect(function()
  225. Callback(TextBox.Text)
  226. end)
  227. end
  228. function CheatsLib:AddDropdown(Name, OptionsTable, Callback)
  229. local Open = false
  230. local DropdownContainer = Instance.new("Frame", Frame)
  231. DropdownContainer.Name = "Dropdown Container"
  232. DropdownContainer.BackgroundColor3 = Color3.fromRGB(13, 13, 13)
  233. DropdownContainer.BorderColor3 = Color3.fromRGB(13, 13, 13)
  234. DropdownContainer.BorderSizePixel = 2
  235. DropdownContainer.Position = UDim2.new(0.0409836061, 0, 0.0500000417, 0)
  236. DropdownContainer.Size = UDim2.new(0, 280, 0, 20)
  237. DropdownContainer.ZIndex = 2
  238. local UI = Instance.new("UIListLayout", DropdownContainer)
  239. UI.HorizontalAlignment = Enum.HorizontalAlignment.Center
  240. UI.Padding = UDim.new(0.1, 0)
  241. UI.SortOrder = Enum.SortOrder.LayoutOrder
  242. local Button = Instance.new("TextButton", DropdownContainer)
  243. Button.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
  244. Button.BorderColor3 = Color3.fromRGB(17, 17, 17)
  245. Button.BorderSizePixel = 2
  246. Button.Position = UDim2.new(0, 0, 7.62939464e-07, 0)
  247. Button.Size = UDim2.new(0, 280, 0, 20)
  248. Button.Font = Enum.Font.GothamSemibold
  249. Button.Text = Name
  250. Button.TextColor3 = Color3.new(1, 1, 1)
  251. Button.TextScaled = true
  252. Button.TextSize = 14
  253. Button.TextWrapped = true
  254. Button.TextXAlignment = Enum.TextXAlignment.Center
  255. Button.ClipsDescendants = true
  256. Button.AutoButtonColor = false
  257. local Status = Instance.new("ImageLabel", Button)
  258. Status.Image = "http://www.roblox.com/asset/?id=71659683"
  259. Status.Size = UDim2.new(0, 16, 0, 16)
  260. Status.ImageColor3 = Color3.new(1, 1, 1)
  261. Status.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
  262. Status.BorderSizePixel = 0
  263. Status.Position = UDim2.new(0.0065, 0, 0.1, 0)
  264. local DropdownFrame = Instance.new("Frame", DropdownContainer)
  265. DropdownFrame.Size = UDim2.new(0, 280, 0, 0)
  266. DropdownFrame.BackgroundColor3 = Color3.fromRGB(17, 17, 17)
  267. DropdownFrame.BorderSizePixel = 0
  268. DropdownFrame.ClipsDescendants = true
  269. local ScrollLayout = Instance.new("UIListLayout", DropdownFrame)
  270. ScrollLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  271. ScrollLayout.SortOrder = Enum.SortOrder.LayoutOrder
  272. for i, v in pairs(OptionsTable) do
  273. local Option = Instance.new("TextButton", DropdownFrame)
  274. Option.BackgroundColor3 = Color3.fromRGB(17, 17, 17)
  275. Option.BorderSizePixel = 0
  276. Option.Position = UDim2.new(0, 0, 7.62939464e-07, 0)
  277. Option.Size = UDim2.new(0, 280, 0, 20)
  278. Option.Font = Enum.Font.GothamSemibold
  279. Option.Text = tostring(v)
  280. Option.TextColor3 = Color3.new(1, 1, 1)
  281. Option.TextSize = 20
  282. Option.TextXAlignment = Enum.TextXAlignment.Center
  283. Option.MouseButton1Click:Connect(function()
  284. Callback(Option.Text)
  285. end)
  286. end
  287. Button.MouseButton1Click:Connect(function()
  288. Open = not Open
  289. if Open then
  290. game:GetService("TweenService"):Create(Status, TweenInfo.new(0.5), {Rotation = 90}):Play()
  291. DropdownFrame:TweenSize(UDim2.new(0, 280, 0, table.getn(OptionsTable) * 20), Enum.EasingDirection.InOut, Enum.EasingStyle.Linear, 0.5, true)
  292. else
  293. game:GetService("TweenService"):Create(Status, TweenInfo.new(0.5), {Rotation = 0}):Play()
  294. DropdownFrame:TweenSize(UDim2.new(0, 280, 0, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Linear, 0.5, true)
  295. end
  296. end)
  297. end
  298. function CheatsLib:AddSlider(Title, Min, Max, Callback)
  299. local SliderContainer = Instance.new("Frame", Frame)
  300. local TextLabel = Instance.new("TextLabel", SliderContainer)
  301. local ImageButton = Instance.new("ImageButton", SliderContainer)
  302. local ImageLabel = Instance.new("ImageLabel", ImageButton)
  303.  
  304. SliderContainer.BackgroundColor3 = Color3.new(0.101961, 0.101961, 0.101961)
  305. SliderContainer.BorderColor3 = Color3.new(0.0666667, 0.0666667, 0.0666667)
  306. SliderContainer.BorderSizePixel = 2
  307. SliderContainer.Position = UDim2.new(0.419047624, 0, 0.164179102, 0)
  308. SliderContainer.Size = UDim2.new(0, 280, 0, 40)
  309.  
  310. TextLabel.Text = Title
  311. TextLabel.BackgroundColor3 = Color3.new(0.101961, 0.101961, 0.101961)
  312. TextLabel.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  313. TextLabel.BorderSizePixel = 0
  314. TextLabel.Position = UDim2.new(0, 0, 0.100000001, 0)
  315. TextLabel.Size = UDim2.new(0, 280, 0, 19)
  316. TextLabel.Font = Enum.Font.GothamBold
  317. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  318. TextLabel.TextScaled = true
  319. TextLabel.TextWrapped = true
  320.  
  321. ImageButton.BackgroundColor3 = Color3.new(0, 0, 0)
  322. ImageButton.BorderColor3 = Color3.new(1, 1, 1)
  323. ImageButton.BorderSizePixel = 0
  324. ImageButton.Position = UDim2.new(0.0357142873, 0, 0.649999976, 0)
  325. ImageButton.Size = UDim2.new(0.928571403, 0, 0.150000006, 0)
  326. ImageButton.AutoButtonColor = false
  327.  
  328. ImageLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  329. ImageLabel.BorderSizePixel = 0
  330. ImageLabel.Size = UDim2.new(0.5, 0, 0, 5)
  331.  
  332. local mouse = game.Players.LocalPlayer:GetMouse()
  333. local uis = game:GetService("UserInputService")
  334. local Value
  335. ImageButton.MouseButton1Down:Connect(function()
  336. ImageLabel.Size = UDim2.new(0, math.clamp(mouse.X - ImageLabel.AbsolutePosition.X, 0, 260), 0, 5)
  337. ImageLabel.BackgroundColor3 = Color3.new(0.7, 0.7, 0.7)
  338. moveconnection = mouse.Move:Connect(function()
  339. Value = math.floor((((tonumber(Max) - tonumber(Min)) / 260) * ImageLabel.AbsoluteSize.X) + tonumber(Min))
  340. Callback(Value)
  341. ImageLabel.Size = UDim2.new(0, math.clamp(mouse.X - ImageLabel.AbsolutePosition.X, 0, 260), 0, 5)
  342. end)
  343. releaseconnection = uis.InputEnded:Connect(function(Mouse)
  344. if Mouse.UserInputType == Enum.UserInputType.MouseButton1 then
  345. ImageLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  346. moveconnection:Disconnect()
  347. releaseconnection:Disconnect()
  348. end
  349. end)
  350. end)
  351. end
  352. return CheatsLib
  353. end
  354. return OptionsLibrary
  355. end
  356.  
  357.  
  358.  
  359.  
  360. local Library = Library:Create("AbstractPoo")
  361. local Option = Library:AddOption("Main")
  362. local Option2 = Library:AddOption("Other")
  363.  
  364. Option:AddButton("Kill player", function()
  365. game.Players.LocalPlayer.Character.Humanoid.Health = 0
  366. end)
  367.  
  368. Option:AddToggle("Hello", false, function(State)
  369. if State == true then
  370. print("true")
  371. elseif State == false then
  372. print("false")
  373. end
  374. end)
  375.  
  376. Option:AddBox("WalkSpeed", "WalkSpeed", true, function(value)
  377. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = tonumber(value)
  378. end)
  379.  
  380. Option:AddDropdown("Hello", {"you", "are", "a", "skid :)"}, function(Option)
  381. print(Option)
  382. end)
  383.  
  384. Option:AddSlider("Walkspeed", 16, 1000, function(Value)
  385. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = tonumber(Value)
  386. end)
Advertisement
Add Comment
Please, Sign In to add comment