Parellel_X

a

Nov 16th, 2021
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.63 KB | None | 0 0
  1. local Library = {} -- coded this while jamming shinitai chan - jack @ 10:06AM PST, 3/24/2021 (took me 3 hrs 22 seconds (i had to recode it))
  2. Library.flags = {}
  3.  
  4. local TweenService = game:GetService'TweenService'
  5. local UDim2_new, Color3_new = UDim2.new, Color3.fromRGB
  6.  
  7. function Library:Create(Class, Properties)
  8. Properties = Properties or {}
  9.  
  10. local Obj = Instance.new(Class)
  11.  
  12. for K, V in next, Properties do
  13. local Success, _ = pcall(function()
  14. local I = Obj[K]
  15. end)
  16.  
  17. if Success then
  18. Obj[K] = V;
  19. end
  20. end
  21.  
  22. return Obj
  23. end
  24.  
  25. local UI = Library:Create('ScreenGui', {
  26. Name = 'UI',
  27. Parent = game:GetService'CoreGui'
  28. })
  29.  
  30. local Colors = {
  31. Main = Color3_new(30, 30, 30),
  32. MainBorder = Color3_new(20, 20, 20),
  33. Mid = Color3_new(25, 25, 25),
  34. Border = Color3_new(40, 40, 40)
  35. }
  36.  
  37. local AddSection = function(UI, Parameters)
  38. local Holder = UI.Background.Holder.Sections
  39.  
  40. local Section = Library:Create('Frame', {
  41. Name = 'Section',
  42. BackgroundColor3 = Colors.MainBorder,
  43. BorderColor3 = Colors.Border,
  44. Parent = Holder
  45. }); Library:Create('ScrollingFrame', {
  46. Parent = Section,
  47. Name = 'Main',
  48. BorderSizePixel = 0,
  49. BackgroundColor3 = Colors.MainBorder,
  50. Position = UDim2_new(0, 0, 0.06, 0),
  51. Size = UDim2_new(1, 0, 0.94, 0),
  52. ClipsDescendants = true,
  53. BottomImage = 'http://www.roblox.com/asset/?id=58757773',
  54. MidImage = 'http://www.roblox.com/asset/?id=58757773',
  55. TopImage = 'http://www.roblox.com/asset/?id=58757773',
  56. ScrollBarImageColor3 = Color3_new(117, 117, 117),
  57. ScrollBarThickness = 5
  58. }); Library:Create('UIListLayout', {
  59. Parent = Section.Main,
  60. SortOrder = Enum.SortOrder.LayoutOrder
  61. }); Library:Create('TextLabel', {
  62. Parent = Section,
  63. Name = 'Text',
  64. TextSize = 14,
  65. TextColor3 = Color3_new(255, 255, 255),
  66. Font = Enum.Font.Code,
  67. BackgroundColor3 = Colors.MainBorder,
  68. BorderSizePixel = 0,
  69. Position = UDim2_new(0.075, 0, -0.03, 0),
  70. Size = UDim2_new(0, (9 * Parameters.SectionText:len()), 0, 15),
  71. Text = Parameters.SectionText
  72. })
  73.  
  74. for Type, Info in next, Parameters do
  75. if Type:match('Toggle') then
  76. local Toggle = Library:Create('Frame', {
  77. Parent = Section.Main,
  78. Name = Type,
  79. Size = UDim2_new(1, 0, 0.069, 0),
  80. BackgroundTransparency = 1,
  81. BorderSizePixel = 0,
  82. }); Library:Create('ImageButton', {
  83. Parent = Toggle,
  84. Name = 'Button',
  85. BackgroundColor3 = Colors.Mid,
  86. BorderColor3 = Colors.Border,
  87. BorderSizePixel = 1,
  88. Size = UDim2_new(0.12, 0, 0.8, 0),
  89. Position = UDim2_new(0.04, 0, 0.1, 0),
  90. Text = '',
  91. TextSize = 14,
  92. ImageColor3 = Color3.fromRGB(255, 255, 255),
  93. ImageTransparency = (Info[2] and 0) or 1,
  94. Image = 'http://www.roblox.com/asset/?id=4776914445',
  95. ScaleType = Enum.ScaleType.Fit,
  96. }); Library:Create('TextLabel', {
  97. Parent = Toggle,
  98. Name = 'Label',
  99. BackgroundTransparency = 1,
  100. BorderSizePixel = 0,
  101. Position = UDim2_new(0.2, 0, 0.1, 0),
  102. Size = UDim2_new(0.7, 0, 0.8, 0),
  103. Text = Info[1] or 'Toggle',
  104. Font = Enum.Font.Code,
  105. TextSize = 14,
  106. TextXAlignment = Enum.TextXAlignment.Left,
  107. TextColor3 = Color3_new(255, 255, 255)
  108. })
  109.  
  110. local Flag = Info[3]
  111. Library.flags[Flag] = Info[2]
  112.  
  113. Toggle.Button.MouseButton1Click:Connect(function()
  114. Library.flags[Flag] = not Library.flags[Flag]
  115. local Bool = Library.flags[Flag]
  116.  
  117. Toggle.Button.ImageTransparency = (Bool and 0) or 1
  118.  
  119. Info[4](Bool)
  120. end)
  121. elseif Type:match('Box') then
  122. local Box = Library:Create('Frame', {
  123. BackgroundTransparency = 1,
  124. Parent = Section.Main,
  125. Name = Type,
  126. Size = UDim2_new(1, 0, 0.11, 0)
  127. }); Library:Create('TextLabel', {
  128. BackgroundTransparency = 1,
  129. Parent = Box,
  130. Size = UDim2_new(0.9, 0, 0.3, 0),
  131. Position = UDim2_new(0.06, 0, 0.1, 0),
  132. Font = Enum.Font.Code,
  133. Text = Info[1],
  134. TextColor3 = Color3_new(255, 255, 255),
  135. TextSize = 14,
  136. TextXAlignment = Enum.TextXAlignment.Left
  137. }); Library:Create('TextBox', {
  138. Font = Enum.Font.Code,
  139. Text = '',
  140. PlaceholderText = 'Input',
  141. PlaceholderColor3 = Color3_new(178, 178, 178),
  142. TextColor3 = Color3_new(255, 255, 255),
  143. TextSize = 14,
  144. BackgroundTransparency = 0,
  145. BackgroundColor3 = Colors.Mid,
  146. BorderColor3 = Colors.Border,
  147. BorderSizePixel = 1,
  148. Position = UDim2_new(0.04, 0, 0.44, 0),
  149. Size = UDim2_new(0.9, 0, 0.43, 0),
  150. Parent = Box
  151. })
  152.  
  153. Box.TextBox.FocusLost:Connect(function()
  154. Info[2](Box.TextBox.Text)
  155. end)
  156. elseif Type:match('Button') then
  157. local Button = Library:Create('Frame', {
  158. Name = Type,
  159. Size = UDim2_new(1, 0, 0.069, 0),
  160. BackgroundTransparency = 1,
  161. BorderSizePixel = 0,
  162. Parent = Section.Main
  163. }); Library:Create('TextButton', {
  164. Parent = Button,
  165. BackgroundColor3 = Colors.Mid,
  166. BorderColor3 = Colors.Border,
  167. Position = UDim2_new(0.04, 0, 0.1, 0),
  168. Size = UDim2_new(0.9, 0, 0.8, 0),
  169. Font = Enum.Font.Code,
  170. Text = Info[1],
  171. TextSize = 14,
  172. TextColor3 = Color3_new(255, 255, 255)
  173. })
  174.  
  175. Button.TextButton.MouseButton1Click:Connect(Info[2])
  176. end
  177. end
  178.  
  179. return Section
  180. end
  181.  
  182. Library.Notify = {}
  183. local Notify = Library.Notify
  184. Notify.Notifications = {}
  185.  
  186. function Notify:new(Title, Text, Time)
  187. Title = Title or 'Notification'; Text = Text or 'Blacks in the premice!'; Time = Time or 5;
  188.  
  189. local Notification = {}
  190.  
  191. local Object = Library:Create('TextButton', {
  192. Name = 'Notification',
  193. BackgroundColor3 = Colors.MainBorder,
  194. BorderColor3 = Colors.Border,
  195. BackgroundTransparency = 0,
  196. BorderSizePixel = 2,
  197. Position = UDim2_new(1.5, -270, 1, -104),
  198. Size = UDim2_new(0, 270, 0, 80),
  199. Text = ''
  200. }); Library:Create('Frame', {
  201. Name = 'Topbar',
  202. Position = UDim2_new(0, 0, 0, 0),
  203. Size = UDim2_new(1, 0, 0.3, 0),
  204. BackgroundTransparency = 0,
  205. BorderSizePixel = 0,
  206. BackgroundColor3 = Color3_new(255, 255, 255),
  207. Parent = Object
  208. }); Library:Create('UIGradient', {
  209. Parent = Object.Topbar,
  210. Color = ColorSequence.new({
  211. ColorSequenceKeypoint.new(0, Color3_new(129, 129, 129)),
  212. ColorSequenceKeypoint.new(0.128, Color3_new(40, 40, 40)),
  213. ColorSequenceKeypoint.new(1, Color3_new(20, 20, 20))
  214. }),
  215. Rotation = 90
  216. }); Library:Create('TextLabel', {
  217. BackgroundTransparency = 1,
  218. Position = UDim2_new(0, 0, 0, 0),
  219. Size = UDim2_new(1, 0, 0.8, 0),
  220. Font = Enum.Font.Code,
  221. Text = ' ' .. Title,
  222. TextColor3 = Color3_new(255, 255, 255),
  223. TextSize = 16,
  224. TextXAlignment = Enum.TextXAlignment.Left,
  225. Name = 'Title',
  226. Parent = Object.Topbar
  227. }); Library:Create('TextLabel', {
  228. Text = Text,
  229. TextColor3 = Color3_new(255, 255, 255),
  230. TextWrapped = true,
  231. TextXAlignment = Enum.TextXAlignment.Left,
  232. TextYAlignment = Enum.TextYAlignment.Top,
  233. TextSize = 15,
  234. Font = Enum.Font.Code,
  235. BackgroundTransparency = 1,
  236. Position = UDim2_new(0.026, 0, 0.299, 0),
  237. Size = UDim2_new(0.98, 0, 0.7, 0),
  238. Parent = Object
  239. })
  240.  
  241. Notification.Object = Object
  242.  
  243. function Notification:Close()
  244. return TweenService:Create(Object, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0), {
  245. Position = UDim2.new(1.3, 0, Object.Position.Y.Scale, 0)
  246. }):Play()
  247. end
  248.  
  249. Object.MouseButton1Click:Connect(function()
  250. Notification:Close()
  251. end)
  252.  
  253. Object.Parent = UI
  254.  
  255. table.insert(Notify.Notifications, Notification)
  256.  
  257. for I, FoundNotification in next, Notify.Notifications do
  258. if FoundNotification ~= Notification then
  259. TweenService:Create(FoundNotification.Object, TweenInfo.new(0.4, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0), {
  260. Position = UDim2_new(1, -270, 1, (-104 - (90 * (#Notify.Notifications - I))))
  261. }):Play()
  262. end
  263. end
  264.  
  265. TweenService:Create(Object, TweenInfo.new(0.4, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0), {
  266. Position = UDim2_new(1, -270, 1, -104)
  267. }):Play()
  268.  
  269. coroutine.wrap(function()
  270. wait(Time)
  271.  
  272. if Notification then
  273. Notification:Close()
  274.  
  275. local Obj = Notification.Object
  276.  
  277. table.remove(Notify.Notifications, table.find(Notify.Notifications, Notification))
  278.  
  279. wait(0.5)
  280.  
  281. Obj:Destroy()
  282. end
  283. end)()
  284.  
  285. return Notification
  286. end
  287.  
  288. function Library:new(Parameters)
  289. Parameters = Parameters or {
  290. Name = 'dot_mp4 wuz here :D',
  291. Tab = {
  292. Text = 'stuffz',
  293. Section1 = {
  294. SectionText = 'sec',
  295. Toggle = {
  296. 'zup',
  297. true,
  298. 'flag1',
  299. function(bool)
  300. print('zup toggle set to: ', bool)
  301. end
  302. },
  303. Box = {
  304. 'print text',
  305. function(str)
  306. print(str)
  307. end
  308. },
  309. Button = {
  310. 'balls',
  311. function()
  312. local Player = game:GetService'Players'.LocalPlayer
  313. if Player.Character then
  314. Player.Character:ClearAllChildren()
  315. end
  316. end
  317. },
  318. NotifButton = {
  319. 'notif',
  320. function()
  321. Notify:new('Test', 'test', 3)
  322. end
  323. }
  324. }
  325. }
  326. }
  327.  
  328. local Background = self:Create('Frame', {
  329. Name = 'Background',
  330. Size = UDim2_new(0, 385, 0, 263),
  331. Position = UDim2_new(0.5, 0, 0.5, 0),
  332. BackgroundColor3 = Colors.Main,
  333. BorderColor3 = Colors.MainBorder,
  334. BorderSizePixel = 2,
  335. Active = true,
  336. Selectable = true,
  337. Draggable = true,
  338. Parent = UI
  339. })
  340.  
  341. local Topbar = self:Create('Frame', {
  342. Parent = Background,
  343. Name = 'Topbar',
  344. BackgroundColor3 = Color3_new(255, 255, 255),
  345. BorderSizePixel = 0,
  346. Position = UDim2_new(0, 0, 0, 0),
  347. Size = UDim2_new(0, 385, 0, 25)
  348. }); self:Create('UIGradient', {
  349. Color = ColorSequence.new({
  350. ColorSequenceKeypoint.new(0, Colors.MainBorder),
  351. ColorSequenceKeypoint.new(0.356, Colors.MainBorder),
  352. ColorSequenceKeypoint.new(1, Colors.Main)
  353. }),
  354. Rotation = 90,
  355. Parent = Topbar
  356. }); self:Create('TextLabel', {
  357. Parent = Topbar,
  358. BackgroundTransparency = 1,
  359. BorderSizePixel = 0,
  360. Size = UDim2_new(0, 200, 0, 25),
  361. Position = UDim2_new(0.018, 0, 0, 0),
  362. Font = Enum.Font.Code,
  363. Text = Parameters.Name,
  364. TextColor3 = Color3_new(255, 255, 255),
  365. TextSize = 14,
  366. TextXAlignment = Enum.TextXAlignment.Left
  367. })
  368.  
  369. local Detail = self:Create('Frame', {
  370. Parent = Background,
  371. Name = 'Detail',
  372. Position = UDim2_new(1, -318, 0, 37),
  373. Size = UDim2_new(0, 293, 0, 15),
  374. BackgroundTransparency = 0,
  375. BorderSizePixel = 0,
  376. BackgroundColor3 = Color3_new(255, 255, 255),
  377. }); self:Create('UIGradient', {
  378. Color = ColorSequence.new({
  379. ColorSequenceKeypoint.new(0, Colors.MainBorder),
  380. ColorSequenceKeypoint.new(0.541, Colors.Mid),
  381. ColorSequenceKeypoint.new(1, Colors.Main)
  382. }),
  383. Rotation = -90,
  384. Parent = Detail
  385. })
  386.  
  387. local Holder = self:Create('Frame', {
  388. Parent = Background,
  389. Name = 'Holder',
  390. BackgroundColor3 = Colors.MainBorder,
  391. BorderColor3 = Colors.Border,
  392. BorderSizePixel = 1,
  393. Size = UDim2_new(0, 371, 0, 205),
  394. Position = UDim2_new(0, 7, 1, -212)
  395. }); self:Create('Frame', {
  396. Parent = Holder,
  397. Name = 'Sections',
  398. Size = UDim2_new(0, 353, 0, 186),
  399. Position = UDim2_new(0.024, 0, 0.049, 0),
  400. BorderSizePixel = 0,
  401. BackgroundColor3 = Colors.Mid
  402. }); self:Create('UIGridLayout', {
  403. Parent = Holder.Sections,
  404. CellSize = UDim2_new(0.493, 0, 1, 0)
  405. }); self:Create('TextButton', {
  406. Parent = Background,
  407. Name = 'Exit',
  408. Size = UDim2_new(0, 24, 0, 24),
  409. Position = UDim2_new(0.92, 0, 0.106, 0),
  410. BorderSizePixel = 1,
  411. BorderColor3 = Colors.Border,
  412. BackgroundColor3 = Colors.MainBorder,
  413. Text = 'X',
  414. TextColor3 = Color3_new(255, 255, 255),
  415. TextSize = 8
  416. }); self:Create('TextLabel', {
  417. Parent = Background,
  418. Name = 'Label',
  419. Size = UDim2_new(0, 60, 0, 22),
  420. Position = UDim2_new(0, 7, 0, 30),
  421. TextColor3 = Color3_new(255, 255, 255),
  422. BorderSizePixel = 1,
  423. BorderColor3 = Colors.Border,
  424. BackgroundColor3 = Colors.MainBorder,
  425. Text = Parameters.Tab.Text or 'Main',
  426. Font = Enum.Font.Code,
  427. TextSize = 14
  428. })
  429.  
  430. self:Create('Frame', {
  431. Name = 'Connector',
  432. Parent = Background.Exit,
  433. BackgroundColor3 = Colors.MainBorder,
  434. BorderSizePixel = 0,
  435. ZIndex = 2,
  436. Size = UDim2_new(1.1, 0, 0.2, 0),
  437. Position = UDim2_new(-0.1, 0, 0.97, 0)
  438. }); self:Create('Frame', {
  439. Name = 'Connector',
  440. Parent = Background.Label,
  441. BackgroundColor3 = Colors.MainBorder,
  442. BorderSizePixel = 0,
  443. ZIndex = 2,
  444. Size = UDim2_new(1.1, 0, 0.2, 0),
  445. Position = UDim2_new(0, 0, 0.97, 0)
  446. })
  447.  
  448. UI.Background.Exit.MouseButton1Click:Connect(function()
  449. UI:Destroy()
  450. end)
  451.  
  452. local Sections = {}; do
  453. for Index, Info in next, Parameters.Tab do
  454. if Index:lower():match'section' and #Sections < 2 then
  455. Sections[#Sections+1] = Info
  456. end
  457. end
  458. end
  459.  
  460. for _, Info in next, Sections do
  461. AddSection(UI, Info)
  462. end
  463.  
  464. return UI
  465. end
  466.  
  467. return Library
Add Comment
Please, Sign In to add comment