Advertisement
matekaOSF2

Untitled

Dec 12th, 2020 (edited)
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.03 KB | None | 0 0
  1. local library = {
  2. windowcount = 0;
  3. }
  4.  
  5. function library:TextSizer(obj, num)
  6. local Sizer = Instance.new("UITextSizeConstraint")
  7. Sizer.MinTextSize = num
  8. Sizer.MaxTextSize = num
  9. Sizer.Parent = obj
  10. end
  11.  
  12. function library:Resize(container)
  13. local y = 0
  14. for i, v in next, container:GetChildren() do
  15. if (not v:IsA("UIListLayout")) then
  16. y = y + v.AbsoluteSize.Y
  17. end
  18. end
  19.  
  20. container.Size = UDim2.new(1, 0, 0, y)
  21. end
  22.  
  23. function library:MakeWindow(text)
  24. for i,v in pairs(game.CoreGui:GetChildren()) do if string.find(v.Name, "Screen") then v:Destroy() end end
  25. library.windowcount = library.windowcount + 1
  26. local Shitty = Instance.new("ScreenGui")
  27. local HudShitty = Instance.new("Frame")
  28. local GuiTitle = Instance.new("TextLabel")
  29. local ContainerShitty = Instance.new("Frame")
  30. local Mini = Instance.new("TextButton")
  31. local UIListLayout = Instance.new("UIListLayout")
  32.  
  33. Shitty.Name = "ScreenGui"
  34. Shitty.Parent = game.CoreGui
  35. Shitty.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  36.  
  37. HudShitty.Name = "HudShitty"
  38. HudShitty.Parent = Shitty
  39. HudShitty.BackgroundColor3 = Color3.new(0.909804, 0.494118, 0.356863)
  40. HudShitty.BorderSizePixel = 0
  41. HudShitty.Active = true
  42. HudShitty.Selectable = true
  43. HudShitty.Draggable = true
  44. HudShitty.Position = UDim2.new(0, (15 + ((200 * library.windowcount) - 200)), 0, 15)
  45. HudShitty.Size = UDim2.new(0, 178, 0, 30)
  46.  
  47. Mini.Name = "Mini"
  48. Mini.Parent = HudShitty
  49. Mini.BackgroundColor3 = Color3.new(1, 1, 1)
  50. Mini.BackgroundTransparency = 1
  51. Mini.Position = UDim2.new(0.803370774, 0, 0, 0)
  52. Mini.Size = UDim2.new(0, 35, 0, 31)
  53. Mini.Font = Enum.Font.SourceSansBold
  54. Mini.Text = "-"
  55. Mini.TextColor3 = Color3.new(1, 1, 1)
  56. Mini.TextScaled = true
  57. Mini.TextSize = 14
  58. Mini.TextWrapped = true
  59. Mini.MouseButton1Click:Connect(function()
  60. if ContainerShitty.Visible == true then
  61. ContainerShitty.Visible = false
  62. Mini.Text = "+"
  63. else
  64. ContainerShitty.Visible = true
  65. Mini.Text = "-"
  66. end
  67. end)
  68.  
  69. GuiTitle.Name = "GuiTitle"
  70. GuiTitle.Parent = HudShitty
  71. GuiTitle.BackgroundColor3 = Color3.new(1, 1, 1)
  72. GuiTitle.BackgroundTransparency = 1
  73. GuiTitle.Size = UDim2.new(0, 178, 0, 30)
  74. GuiTitle.Font = Enum.Font.SourceSansBold
  75. GuiTitle.Text = text
  76. GuiTitle.TextColor3 = Color3.new(1, 1, 1)
  77. GuiTitle.TextSize = 30
  78. GuiTitle.TextWrapped = true
  79. library:TextSizer(GuiTitle, 30)
  80.  
  81. ContainerShitty.Name = "ContainerShitty"
  82. ContainerShitty.Parent = HudShitty
  83. ContainerShitty.BackgroundColor3 = Color3.new(0.219608, 0.219608, 0.219608)
  84. ContainerShitty.BorderSizePixel = 0
  85. ContainerShitty.Position = UDim2.new(0, 0, 1, 0)
  86. ContainerShitty.Size = UDim2.new(0, 178, 0, 0)
  87.  
  88. UIListLayout.Parent = ContainerShitty
  89. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  90.  
  91. local epicLibrary = {}
  92.  
  93. function epicLibrary:MakeSection(text)
  94. library.windowcount = library.windowcount + 1
  95. local toggled = false
  96. local Toggle = Instance.new("TextLabel")
  97. local ToggleButton = Instance.new("TextButton")
  98. local HudShittyD = Instance.new("Frame")
  99. local GuiTitleD = Instance.new("TextLabel")
  100. local ContainerShittyD = Instance.new("Frame")
  101. local DCLayout = Instance.new("UIListLayout")
  102. local MiniD = Instance.new("TextButton")
  103.  
  104. HudShittyD.Name = "HudShittyD"
  105. HudShittyD.Parent = Shitty
  106. HudShittyD.BackgroundColor3 = Color3.new(0.909804, 0.494118, 0.356863)
  107. HudShittyD.BorderSizePixel = 0
  108. HudShittyD.Active = true
  109. HudShittyD.Selectable = true
  110. HudShittyD.Draggable = true
  111. HudShittyD.Position = UDim2.new(0, (15 + ((200 * library.windowcount) - 200)), 0, 15)
  112. HudShittyD.Size = UDim2.new(0, 178, 0, 30)
  113. HudShittyD.Visible = false
  114.  
  115. GuiTitleD.Name = "GuiTitleDD"
  116. GuiTitleD.Parent = HudShittyD
  117. GuiTitleD.BackgroundColor3 = Color3.new(1, 1, 1)
  118. GuiTitleD.BackgroundTransparency = 1
  119. GuiTitleD.Size = UDim2.new(0, 178, 0, 30)
  120. GuiTitleD.Font = Enum.Font.SourceSansBold
  121. GuiTitleD.Text = text
  122. GuiTitleD.TextColor3 = Color3.new(1, 1, 1)
  123. GuiTitleD.TextSize = 30
  124. GuiTitleD.TextWrapped = true
  125.  
  126. ContainerShittyD.Name = "ContainerSF"
  127. ContainerShittyD.Parent = HudShittyD
  128. ContainerShittyD.BackgroundColor3 = Color3.new(0.219608, 0.219608, 0.219608)
  129. ContainerShittyD.BorderSizePixel = 0
  130. ContainerShittyD.Position = UDim2.new(0, 0, 1, 0)
  131. ContainerShittyD.Size = UDim2.new(0, 178, 0, 0)
  132.  
  133. MiniD.Name = "Mini"
  134. MiniD.Parent = HudShittyD
  135. MiniD.BackgroundColor3 = Color3.new(1, 1, 1)
  136. MiniD.BackgroundTransparency = 1
  137. MiniD.Position = UDim2.new(0.803370774, 0, 0, 0)
  138. MiniD.Size = UDim2.new(0, 35, 0, 31)
  139. MiniD.Font = Enum.Font.SourceSansBold
  140. MiniD.Text = "-"
  141. MiniD.TextColor3 = Color3.new(1, 1, 1)
  142. MiniD.TextScaled = true
  143. MiniD.TextSize = 14
  144. MiniD.TextWrapped = true
  145. MiniD.MouseButton1Click:Connect(function()
  146. if ContainerShittyD.Visible == true then
  147. ContainerShittyD.Visible = false
  148. MiniD.Text = "+"
  149. else
  150. ContainerShittyD.Visible = true
  151. MiniD.Text = "-"
  152. end
  153. end)
  154.  
  155. DCLayout.Parent = ContainerShittyD
  156. DCLayout.SortOrder = Enum.SortOrder.LayoutOrder
  157.  
  158. Toggle.Name = "Toggle"
  159. Toggle.Parent = ContainerShitty
  160. Toggle.BackgroundColor3 = Color3.new(1, 1, 1)
  161. Toggle.BackgroundTransparency = 1
  162. Toggle.Size = UDim2.new(0, 178, 0, 32)
  163. Toggle.Font = Enum.Font.SourceSansBold
  164. Toggle.Text = text
  165. Toggle.TextColor3 = Color3.new(1, 1, 1)
  166. Toggle.TextSize = 20
  167. library:TextSizer(Toggle, 24)
  168.  
  169. ToggleButton.Name = "ToggleButton"
  170. ToggleButton.Parent = Toggle
  171. ToggleButton.BackgroundColor3 = Color3.new(1, 0, 0)
  172. ToggleButton.BackgroundTransparency = 1
  173. ToggleButton.Position = UDim2.new(0.803370774, 0, 0, 0)
  174. ToggleButton.Size = UDim2.new(0, 35, 0, 30)
  175. ToggleButton.Font = Enum.Font.SourceSansBold
  176. ToggleButton.Text = "OFF"
  177. ToggleButton.TextColor3 = Color3.new(1, 0, 0)
  178. ToggleButton.TextSize = 20
  179. ToggleButton.MouseButton1Click:Connect(function()
  180. if toggled then
  181. ToggleButton.Text = "OFF"
  182. ToggleButton.TextColor3 = Color3.new(1, 0, 0)
  183. toggled = false
  184. HudShittyD.Visible = false
  185. else
  186. ToggleButton.Text = "ON"
  187. ToggleButton.TextColor3 = Color3.fromRGB(0, 255, 0)
  188. toggled = true
  189. HudShittyD.Visible = true
  190. HudShittyD.Position = UDim2.new(0, (HudShitty.AbsolutePosition.X + ((200 * library.windowcount) - 200)), 0, HudShitty.AbsolutePosition.Y)
  191. end
  192. end)
  193.  
  194. library:TextSizer(ToggleButton, 20)
  195. library:Resize(ContainerShitty)
  196.  
  197. local epicL = {}
  198.  
  199. function epicL:Button(text, callback)
  200. text = text or "Toggle"
  201. callback = callback or function() end;
  202. local Button = Instance.new("TextButton")
  203.  
  204. Button.Name = "Toggle"
  205. Button.Parent = ContainerShittyD
  206. Button.BackgroundColor3 = Color3.new(1, 1, 1)
  207. Button.BackgroundTransparency = 1
  208. Button.Size = UDim2.new(0, 178, 0, 32)
  209. Button.Font = Enum.Font.SourceSansBold
  210. Button.Text = text
  211. Button.TextColor3 = Color3.new(1, 1, 1)
  212. Button.TextSize = 20
  213. Button.MouseButton1Click:Connect(callback);
  214.  
  215. library:TextSizer(Button, 20)
  216. library:Resize(ContainerShittyD)
  217. end
  218.  
  219. function epicL:Slider(text, min, max, callback)
  220. local mouse = game.Players.LocalPlayer:GetMouse()
  221. local uis = game:GetService("UserInputService")
  222. local Slider = Instance.new("Frame")
  223. local Title = Instance.new("TextLabel")
  224. local Value = Instance.new("TextLabel")
  225. local SliderButton = Instance.new("TextButton")
  226. local SliderFrame = Instance.new("Frame")
  227. local Val = 0;
  228. text = text or "Slider"
  229. min = min or 0
  230. max = max or 100
  231. callback = callback or function() end;
  232.  
  233. Slider.Name = "Slider"
  234. Slider.Parent = ContainerShittyD
  235. Slider.BackgroundColor3 = Color3.new(0.247059, 0.247059, 0.247059)
  236. Slider.BorderSizePixel = 0
  237. Slider.Position = UDim2.new(0, 0, 0.183908045, 0)
  238. Slider.Size = UDim2.new(0, 178, 0, 52)
  239.  
  240. Title.Name = "Title"
  241. Title.Parent = Slider
  242. Title.BackgroundColor3 = Color3.new(1, 1, 1)
  243. Title.BackgroundTransparency = 1
  244. Title.Size = UDim2.new(0, 143, 0, 23)
  245. Title.Font = Enum.Font.SourceSansBold
  246. Title.Text = text
  247. Title.TextColor3 = Color3.new(1, 1, 1)
  248. Title.TextSize = 20
  249. library:TextSizer(Title, 20)
  250.  
  251. Value.Name = "Value"
  252. Value.Parent = Slider
  253. Value.BackgroundColor3 = Color3.new(1, 1, 1)
  254. Value.BackgroundTransparency = 1
  255. Value.Position = UDim2.new(0.803370774, 0, 0, 0)
  256. Value.Size = UDim2.new(0, 35, 0, 23)
  257. Value.Font = Enum.Font.SourceSansBold
  258. Value.Text = "0"
  259. Value.TextColor3 = Color3.new(1, 1, 1)
  260. Value.TextSize = 20
  261. library:TextSizer(Value, 20)
  262.  
  263. SliderButton.Name = "SliderButton"
  264. SliderButton.Parent = Slider
  265. SliderButton.BackgroundColor3 = Color3.new(0.192157, 0.192157, 0.192157)
  266. SliderButton.BorderSizePixel = 0
  267. SliderButton.Position = UDim2.new(0.0224719085, 0, 0.397067219, 0)
  268. SliderButton.Size = UDim2.new(0, 169, 0, 20)
  269. SliderButton.Font = Enum.Font.SourceSansBold
  270. SliderButton.Text = ""
  271. SliderButton.TextColor3 = Color3.new(1, 1, 1)
  272. SliderButton.TextSize = 20
  273. library:TextSizer(SliderButton, 20)
  274.  
  275. SliderFrame.Name = "SliderFrame"
  276. SliderFrame.Parent = SliderButton
  277. SliderFrame.BackgroundColor3 = Color3.new(0.85098, 0.431373, 0.294118)
  278. SliderFrame.BorderSizePixel = 0
  279. SliderFrame.Position = UDim2.new(-0.00166863948, 0, 0.0123846233, 0)
  280. SliderFrame.Size = UDim2.new(0, 0, 0, 20)
  281.  
  282. SliderButton.MouseButton1Down:Connect(function()
  283. Val = math.floor((((tonumber(max) - tonumber(min)) / 169) * SliderFrame.AbsoluteSize.X) + tonumber(min)) or 0
  284. Value.Text = tostring(Val)
  285. pcall(function()
  286. callback(Val)
  287. end)
  288. SliderFrame.Size = UDim2.new(0, math.clamp(mouse.X - SliderFrame.AbsolutePosition.X, 0, 169), 0, 20)
  289. moveconnection = mouse.Move:Connect(function()
  290. Val = math.floor((((tonumber(max) - tonumber(min)) / 169) * SliderFrame.AbsoluteSize.X) + tonumber(min))
  291. Value.Text = tostring(Val)
  292. pcall(function()
  293. callback(Val);
  294. end)
  295. SliderFrame.Size = UDim2.new(0, math.clamp(mouse.X - SliderFrame.AbsolutePosition.X, 0, 169), 0, 20)
  296. end)
  297. releaseconnection = uis.InputEnded:Connect(function(Mouse)
  298. if Mouse.UserInputType == Enum.UserInputType.MouseButton1 then
  299. Val = math.floor((((tonumber(max) - tonumber(min)) / 169) * SliderFrame.AbsoluteSize.X) + tonumber(min))
  300. Value.Text = tostring(Val)
  301. pcall(function()
  302. callback(Val);
  303. end)
  304. SliderFrame.Size = UDim2.new(0, math.clamp(mouse.X - SliderFrame.AbsolutePosition.X, 0, 169), 0, 20)
  305. moveconnection:Disconnect()
  306. releaseconnection:Disconnect()
  307. end
  308. end)
  309. end)
  310.  
  311. library:Resize(ContainerShittyD)
  312. end
  313.  
  314. function epicL:Box(text, callback)
  315. local TextBox = Instance.new("TextBox")
  316. text = text or "Box"
  317. callback = callback or function() end;
  318.  
  319. TextBox.Parent = ContainerShittyD
  320. TextBox.BackgroundColor3 = Color3.new(0.345098, 0.345098, 0.345098)
  321. TextBox.BorderSizePixel = 0
  322. TextBox.Position = UDim2.new(0, 0, 0.183908045, 0)
  323. TextBox.Size = UDim2.new(0, 178, 0, 37)
  324. TextBox.Font = Enum.Font.GothamBlack
  325. TextBox.PlaceholderColor3 = Color3.new(1, 1, 1)
  326. TextBox.PlaceholderText = text
  327. TextBox.Text = ""
  328. TextBox.TextColor3 = Color3.new(1, 1, 1)
  329. TextBox.TextSize = 22
  330. TextBox.TextWrapped = true
  331. TextBox.FocusLost:Connect(function()
  332. callback(TextBox.Text);
  333. end)
  334.  
  335. library:TextSizer(TextBox, 22)
  336. library:Resize(ContainerShittyD)
  337. end
  338.  
  339. function epicL:Toggle(text, callback)
  340. local toggled = false
  341. text = text or "Toggle"
  342. callback = callback or function() end;
  343. local Toggle = Instance.new("TextLabel")
  344. local ToggleButton = Instance.new("TextButton")
  345.  
  346. Toggle.Name = "Toggle"
  347. Toggle.Parent = ContainerShittyD
  348. Toggle.BackgroundColor3 = Color3.new(1, 1, 1)
  349. Toggle.BackgroundTransparency = 1
  350. Toggle.Size = UDim2.new(0, 178, 0, 32)
  351. Toggle.Font = Enum.Font.SourceSansBold
  352. Toggle.Text = text
  353. Toggle.TextColor3 = Color3.new(1, 1, 1)
  354. Toggle.TextSize = 20
  355. library:TextSizer(Toggle, 20)
  356.  
  357. ToggleButton.Name = "ToggleButton"
  358. ToggleButton.Parent = Toggle
  359. ToggleButton.BackgroundColor3 = Color3.new(1, 0, 0)
  360. ToggleButton.BackgroundTransparency = 1
  361. ToggleButton.Position = UDim2.new(0.803370774, 0, 0.03125, 0)
  362. ToggleButton.Size = UDim2.new(0, 35, 0, 30)
  363. ToggleButton.Font = Enum.Font.SourceSansBold
  364. ToggleButton.Text = "OFF"
  365. ToggleButton.TextColor3 = Color3.new(1, 0, 0)
  366. ToggleButton.TextSize = 20
  367. ToggleButton.MouseButton1Click:Connect(function()
  368. if toggled then
  369. ToggleButton.Text = "OFF"
  370. ToggleButton.TextColor3 = Color3.new(1, 0, 0)
  371. toggled = false
  372. else
  373. ToggleButton.Text = "ON"
  374. ToggleButton.TextColor3 = Color3.fromRGB(0, 255, 0)
  375. toggled = true
  376. end
  377. end)
  378. library:TextSizer(ToggleButton, 20)
  379. library:Resize(ContainerShittyD)
  380.  
  381. spawn(function()
  382. while wait() do
  383. if toggled then
  384. callback(true);
  385. else
  386. callback(false)
  387. end
  388. end
  389. end)
  390.  
  391. return ToggleButton;
  392. end
  393.  
  394. return epicL;
  395. end
  396.  
  397. return epicLibrary;
  398. end
  399.  
  400. return library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement