Advertisement
matekaOSF2

Untitled

Dec 11th, 2020 (edited)
2,762
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.83 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. end
  191. end)
  192.  
  193. library:TextSizer(ToggleButton, 20)
  194. library:Resize(ContainerShitty)
  195.  
  196. local epicL = {}
  197.  
  198. function epicL:Button(text, callback)
  199. text = text or "Toggle"
  200. callback = callback or function() end;
  201. local Button = Instance.new("TextButton")
  202.  
  203. Button.Name = "Toggle"
  204. Button.Parent = ContainerShittyD
  205. Button.BackgroundColor3 = Color3.new(1, 1, 1)
  206. Button.BackgroundTransparency = 1
  207. Button.Size = UDim2.new(0, 178, 0, 32)
  208. Button.Font = Enum.Font.SourceSansBold
  209. Button.Text = text
  210. Button.TextColor3 = Color3.new(1, 1, 1)
  211. Button.TextSize = 20
  212. Button.MouseButton1Click:Connect(callback);
  213.  
  214. library:TextSizer(Button, 20)
  215. library:Resize(ContainerShittyD)
  216. end
  217.  
  218. function epicL:Slider(text, min, max, callback)
  219. local mouse = game.Players.LocalPlayer:GetMouse()
  220. local uis = game:GetService("UserInputService")
  221. local Slider = Instance.new("Frame")
  222. local Title = Instance.new("TextLabel")
  223. local Value = Instance.new("TextLabel")
  224. local SliderButton = Instance.new("TextButton")
  225. local SliderFrame = Instance.new("Frame")
  226. local Val = 0;
  227. text = text or "Slider"
  228. min = min or 0
  229. max = max or 100
  230. callback = callback or function() end;
  231.  
  232. Slider.Name = "Slider"
  233. Slider.Parent = ContainerShittyD
  234. Slider.BackgroundColor3 = Color3.new(0.247059, 0.247059, 0.247059)
  235. Slider.BorderSizePixel = 0
  236. Slider.Position = UDim2.new(0, 0, 0.183908045, 0)
  237. Slider.Size = UDim2.new(0, 178, 0, 52)
  238.  
  239. Title.Name = "Title"
  240. Title.Parent = Slider
  241. Title.BackgroundColor3 = Color3.new(1, 1, 1)
  242. Title.BackgroundTransparency = 1
  243. Title.Size = UDim2.new(0, 143, 0, 23)
  244. Title.Font = Enum.Font.SourceSansBold
  245. Title.Text = text
  246. Title.TextColor3 = Color3.new(1, 1, 1)
  247. Title.TextSize = 20
  248. library:TextSizer(Title, 20)
  249.  
  250. Value.Name = "Value"
  251. Value.Parent = Slider
  252. Value.BackgroundColor3 = Color3.new(1, 1, 1)
  253. Value.BackgroundTransparency = 1
  254. Value.Position = UDim2.new(0.803370774, 0, 0, 0)
  255. Value.Size = UDim2.new(0, 35, 0, 23)
  256. Value.Font = Enum.Font.SourceSansBold
  257. Value.Text = "0"
  258. Value.TextColor3 = Color3.new(1, 1, 1)
  259. Value.TextSize = 20
  260. library:TextSizer(Value, 20)
  261.  
  262. SliderButton.Name = "SliderButton"
  263. SliderButton.Parent = Slider
  264. SliderButton.BackgroundColor3 = Color3.new(0.192157, 0.192157, 0.192157)
  265. SliderButton.BorderSizePixel = 0
  266. SliderButton.Position = UDim2.new(0.0224719085, 0, 0.397067219, 0)
  267. SliderButton.Size = UDim2.new(0, 169, 0, 20)
  268. SliderButton.Font = Enum.Font.SourceSansBold
  269. SliderButton.Text = ""
  270. SliderButton.TextColor3 = Color3.new(1, 1, 1)
  271. SliderButton.TextSize = 20
  272. library:TextSizer(SliderButton, 20)
  273.  
  274. SliderFrame.Name = "SliderFrame"
  275. SliderFrame.Parent = SliderButton
  276. SliderFrame.BackgroundColor3 = Color3.new(0.85098, 0.431373, 0.294118)
  277. SliderFrame.BorderSizePixel = 0
  278. SliderFrame.Position = UDim2.new(-0.00166863948, 0, 0.0123846233, 0)
  279. SliderFrame.Size = UDim2.new(0, 0, 0, 20)
  280.  
  281. SliderButton.MouseButton1Down:Connect(function()
  282. Val = math.floor((((tonumber(max) - tonumber(min)) / 169) * SliderFrame.AbsoluteSize.X) + tonumber(min)) or 0
  283. Value.Text = tostring(Val)
  284. pcall(function()
  285. callback(Val)
  286. end)
  287. SliderFrame.Size = UDim2.new(0, math.clamp(mouse.X - SliderFrame.AbsolutePosition.X, 0, 169), 0, 20)
  288. moveconnection = mouse.Move:Connect(function()
  289. Val = math.floor((((tonumber(max) - tonumber(min)) / 169) * SliderFrame.AbsoluteSize.X) + tonumber(min))
  290. Value.Text = tostring(Val)
  291. pcall(function()
  292. callback(Val);
  293. end)
  294. SliderFrame.Size = UDim2.new(0, math.clamp(mouse.X - SliderFrame.AbsolutePosition.X, 0, 169), 0, 20)
  295. end)
  296. releaseconnection = uis.InputEnded:Connect(function(Mouse)
  297. if Mouse.UserInputType == Enum.UserInputType.MouseButton1 then
  298. Val = math.floor((((tonumber(max) - tonumber(min)) / 169) * SliderFrame.AbsoluteSize.X) + tonumber(min))
  299. Value.Text = tostring(Val)
  300. pcall(function()
  301. callback(Val);
  302. end)
  303. SliderFrame.Size = UDim2.new(0, math.clamp(mouse.X - SliderFrame.AbsolutePosition.X, 0, 169), 0, 20)
  304. moveconnection:Disconnect()
  305. releaseconnection:Disconnect()
  306. end
  307. end)
  308. end)
  309.  
  310. library:Resize(ContainerShittyD)
  311. end
  312.  
  313. function epicL:Box(text, callback)
  314. local TextBox = Instance.new("TextBox")
  315. text = text or "Box"
  316. callback = callback or function() end;
  317.  
  318. TextBox.Parent = ContainerShittyD
  319. TextBox.BackgroundColor3 = Color3.new(0.345098, 0.345098, 0.345098)
  320. TextBox.BorderSizePixel = 0
  321. TextBox.Position = UDim2.new(0, 0, 0.183908045, 0)
  322. TextBox.Size = UDim2.new(0, 178, 0, 37)
  323. TextBox.Font = Enum.Font.GothamBlack
  324. TextBox.PlaceholderColor3 = Color3.new(1, 1, 1)
  325. TextBox.PlaceholderText = text
  326. TextBox.Text = ""
  327. TextBox.TextColor3 = Color3.new(1, 1, 1)
  328. TextBox.TextSize = 22
  329. TextBox.TextWrapped = true
  330. TextBox.FocusLost:Connect(function()
  331. callback(TextBox.Text);
  332. end)
  333.  
  334. library:TextSizer(TextBox, 22)
  335. library:Resize(ContainerShittyD)
  336. end
  337.  
  338. function epicL:Toggle(text, callback)
  339. local toggled = false
  340. text = text or "Toggle"
  341. callback = callback or function() end;
  342. local Toggle = Instance.new("TextLabel")
  343. local ToggleButton = Instance.new("TextButton")
  344.  
  345. Toggle.Name = "Toggle"
  346. Toggle.Parent = ContainerShittyD
  347. Toggle.BackgroundColor3 = Color3.new(1, 1, 1)
  348. Toggle.BackgroundTransparency = 1
  349. Toggle.Size = UDim2.new(0, 178, 0, 32)
  350. Toggle.Font = Enum.Font.SourceSansBold
  351. Toggle.Text = text
  352. Toggle.TextColor3 = Color3.new(1, 1, 1)
  353. Toggle.TextSize = 20
  354. library:TextSizer(Toggle, 20)
  355.  
  356. ToggleButton.Name = "ToggleButton"
  357. ToggleButton.Parent = Toggle
  358. ToggleButton.BackgroundColor3 = Color3.new(1, 0, 0)
  359. ToggleButton.BackgroundTransparency = 1
  360. ToggleButton.Position = UDim2.new(0.803370774, 0, 0.03125, 0)
  361. ToggleButton.Size = UDim2.new(0, 35, 0, 30)
  362. ToggleButton.Font = Enum.Font.SourceSansBold
  363. ToggleButton.Text = "OFF"
  364. ToggleButton.TextColor3 = Color3.new(1, 0, 0)
  365. ToggleButton.TextSize = 20
  366. ToggleButton.MouseButton1Click:Connect(function()
  367. if toggled then
  368. ToggleButton.Text = "OFF"
  369. ToggleButton.TextColor3 = Color3.new(1, 0, 0)
  370. toggled = false
  371. else
  372. ToggleButton.Text = "ON"
  373. ToggleButton.TextColor3 = Color3.fromRGB(0, 255, 0)
  374. toggled = true
  375. end
  376. end)
  377. library:TextSizer(ToggleButton, 20)
  378. library:Resize(ContainerShittyD)
  379.  
  380. spawn(function()
  381. while wait() do
  382. if toggled then
  383. callback();
  384. end
  385. end
  386. end)
  387.  
  388. return ToggleButton;
  389. end
  390.  
  391. return epicL;
  392. end
  393.  
  394. return epicLibrary;
  395. end
  396.  
  397. return library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement