Advertisement
Prokri43

AX library joker version

Aug 12th, 2024 (edited)
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.54 KB | None | 0 0
  1. local lib = {}
  2.  
  3. local Script_Title = "Arceus X <font color=\"rgb(255, 0, 0)\">|</font> Ui Lib"
  4.  
  5.  
  6. -- Instances:
  7. local Arceus = Instance.new("ScreenGui")
  8. local Main = Instance.new("ImageButton")
  9. local UICorner = Instance.new("UICorner")
  10. local Intro = Instance.new("Frame")
  11. local UICorner_2 = Instance.new("UICorner")
  12. local Logo = Instance.new("ImageButton")
  13. local UIAspectRatioConstraint = Instance.new("UIAspectRatioConstraint")
  14. local Title = Instance.new("TextLabel")
  15. local Menu = Instance.new("ScrollingFrame")
  16. local UIListLayout = Instance.new("UIListLayout")
  17. local Toggle = Instance.new("ImageButton")
  18. local UICorner_3 = Instance.new("UICorner")
  19. local Enabled = Instance.new("Frame")
  20. local UIAspectRatioConstraint_2 = Instance.new("UIAspectRatioConstraint")
  21. local UICorner_4 = Instance.new("UICorner")
  22. local Check = Instance.new("Frame")
  23. local UIAspectRatioConstraint_3 = Instance.new("UIAspectRatioConstraint")
  24. local UICorner_5 = Instance.new("UICorner")
  25. local Name = Instance.new("TextLabel")
  26. local UIGradient = Instance.new("UIGradient")
  27. local Button = Instance.new("ImageButton")
  28. local UICorner_6 = Instance.new("UICorner")
  29. local Name_2 = Instance.new("TextLabel")
  30. local UIGradient_2 = Instance.new("UIGradient")
  31. local tab = Instance.new("Frame")
  32. local Close = Instance.new("TextButton")
  33. local ComboElem = Instance.new("ImageButton")
  34. local UICorner_7 = Instance.new("UICorner")
  35. local Name_3 = Instance.new("TextLabel")
  36. local UIGradient_3 = Instance.new("UIGradient")
  37. local Img = Instance.new("TextLabel")
  38. local UIAspectRatioConstraint_4 = Instance.new("UIAspectRatioConstraint")
  39. local ComboBox = Instance.new("ImageButton")
  40. local UICorner_8 = Instance.new("UICorner")
  41. local Name_4 = Instance.new("TextLabel")
  42. local UIGradient_4 = Instance.new("UIGradient")
  43. local Img_2 = Instance.new("TextLabel")
  44. local UIAspectRatioConstraint_5 = Instance.new("UIAspectRatioConstraint")
  45.  
  46. --Properties:
  47.  
  48. Arceus.Name = "Arceus"
  49. Arceus.Enabled = true
  50. Arceus.ResetOnSpawn = true
  51. Arceus.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  52. Arceus.DisplayOrder = 999999999
  53.  
  54. Main.Name = "Main"
  55. Main.Parent = Arceus
  56. Main.Active = true
  57. Main.Draggable = true
  58. Main.AnchorPoint = Vector2.new(0.5, 0.5)
  59. Main.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  60. Main.BackgroundTransparency = 1
  61. Main.Image = "http://www.roblox.com/asset/?id=18742568685"
  62. Main.BorderSizePixel = 0
  63. Main.Position = UDim2.new(0.5, 0, -0.2, 0) --UDim2.new(0.5, 0, 0.5, 0)
  64. Main.Size = UDim2.new(0.3, 0, 0.3, 0)
  65.  
  66. UICorner.CornerRadius = UDim.new(0.1, 0)
  67. UICorner.Parent = Main
  68.  
  69. Intro.Name = "Intro"
  70. Intro.Parent = Main
  71. Intro.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  72. Intro.ClipsDescendants = true
  73. Intro.Size = UDim2.new(1, 0, 1, 0)
  74. Intro.ZIndex = 2
  75.  
  76. UICorner_2.CornerRadius = UDim.new(0.1, 0)
  77. UICorner_2.Parent = Intro
  78.  
  79. Logo.Parent = Intro
  80. Logo.AnchorPoint = Vector2.new(0.5, 0.5)
  81. Logo.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  82. Logo.BackgroundTransparency = 1
  83. Logo.BorderSizePixel = 0
  84. Logo.Position = UDim2.new(0.5, 0, 0.5, 0)
  85. Logo.Size = UDim2.new(0.75, 0, 0.75, 0)
  86. Logo.ZIndex = 2
  87. Logo.Image = "http://www.roblox.com/asset/?id=18742568685"
  88. Logo.ScaleType = Enum.ScaleType.Fit
  89. Logo.Active = false
  90.  
  91. UIAspectRatioConstraint.Parent = Logo
  92.  
  93. Title.Name = "Title"
  94. Title.Parent = Main
  95. Title.AnchorPoint = Vector2.new(1, 0)
  96. Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  97. Title.BackgroundTransparency = 1
  98. Title.BorderSizePixel = 0
  99. Title.Position = UDim2.new(0.975, 0, 0.075, 0)
  100. Title.Size = UDim2.new(0.85, 0, 0.155, 0)
  101. Title.Font = Enum.Font.TitilliumWeb
  102. Title.FontFace = Font.new("rbxasset://fonts/families/TitilliumWeb.json", Enum.FontWeight.Bold)
  103. Title.RichText = true
  104. Title.Text = Script_Title
  105. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  106. Title.TextScaled = true
  107. Title.TextSize = 14
  108. Title.TextWrapped = true
  109. Title.TextXAlignment = Enum.TextXAlignment.Left
  110. Title.TextYAlignment = Enum.TextYAlignment.Center
  111.  
  112. Menu.Name = "Menu"
  113. Menu.Parent = Main
  114. Menu.Active = true
  115. Menu.AnchorPoint = Vector2.new(0.5, 1)
  116. Menu.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  117. Menu.BackgroundTransparency = 1
  118. Menu.AutomaticCanvasSize = Enum.AutomaticSize.Y
  119. Menu.BorderSizePixel = 0
  120. Menu.Position = UDim2.new(0.5, 0, 0.95, 0)
  121. Menu.Size = UDim2.new(0.95, 0, 0.65, 0)
  122. Menu.CanvasSize = UDim2.new(0, 0, 0, 0)
  123. Menu.ScrollBarImageColor3 = Color3.fromRGB(255, 255, 255)
  124. Menu.ScrollBarThickness = Menu.AbsoluteSize.X/25
  125.  
  126. UIListLayout.Parent = Menu
  127. --UIListLayout.Padding = UDim.new(0.025, 0)
  128. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  129.  
  130. Toggle.Name = "Toggle"
  131. Toggle.Visible = false
  132. --Toggle.Parent = Arceus
  133. Toggle.BackgroundColor3 = Color3.fromRGB(55, 55, 55)
  134. Toggle.Size = UDim2.new(0.95, 0, 0, 50)
  135.  
  136. UICorner_3.CornerRadius = UDim.new(0.25, 0)
  137. UICorner_3.Parent = Toggle
  138.  
  139. Enabled.Name = "Enabled"
  140. Enabled.Parent = Toggle
  141. Enabled.AnchorPoint = Vector2.new(1, 0.5)
  142. Enabled.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  143. Enabled.Position = UDim2.new(0.975, 0, 0.5, 0)
  144. Enabled.Size = UDim2.new(0.75, 0, 0.75, 0)
  145.  
  146. UIAspectRatioConstraint_2.Parent = Enabled
  147.  
  148. UICorner_4.CornerRadius = UDim.new(0.3, 0)
  149. UICorner_4.Parent = Enabled
  150.  
  151. Check.Name = "Check"
  152. Check.Parent = Enabled
  153. Check.AnchorPoint = Vector2.new(0.5, 0.5)
  154. Check.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  155. Check.Position = UDim2.new(0.5, 0, 0.5, 0)
  156. Check.Size = UDim2.new(0.65, 0, 0.65, 0)
  157.  
  158. UIAspectRatioConstraint_3.Parent = Check
  159.  
  160. UICorner_5.CornerRadius = UDim.new(0.3, 0)
  161. UICorner_5.Parent = Check
  162.  
  163. Name.Name = "Name"
  164. Name.Parent = Toggle
  165. Name.AnchorPoint = Vector2.new(0, 0.5)
  166. Name.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  167. Name.BackgroundTransparency = 1
  168. Name.BorderSizePixel = 0
  169. Name.Position = UDim2.new(0.05, 0, 0.5, 0)
  170. Name.Size = UDim2.new(0.75, 0, 0.8, 0)
  171. Name.Font = Enum.Font.TitilliumWeb
  172. Name.Text = "Script"
  173. Name.TextColor3 = Color3.fromRGB(255, 255, 255)
  174. Name.TextScaled = true
  175. Name.TextSize = 14
  176. Name.TextWrapped = true
  177. Name.TextXAlignment = Enum.TextXAlignment.Left
  178. Name.TextYAlignment = Enum.TextYAlignment.Bottom
  179.  
  180. UIGradient.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(180, 180, 180))}
  181. UIGradient.Parent = Toggle
  182.  
  183. Button.Name = "Button"
  184. --Button.Parent = Arceus
  185. Button.BackgroundColor3 = Color3.fromRGB(55, 55, 55)
  186. Button.Size = UDim2.new(0.95, 0, 0, 50)
  187.  
  188. UICorner_6.CornerRadius = UDim.new(0.25, 0)
  189. UICorner_6.Parent = Button
  190.  
  191. Name_2.Name = "Name"
  192. Name_2.Parent = Button
  193. Name_2.AnchorPoint = Vector2.new(0, 0.5)
  194. Name_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  195. Name_2.BackgroundTransparency = 1
  196. Name_2.BorderSizePixel = 0
  197. Name_2.Position = UDim2.new(0.05, 0, 0.5, 0)
  198. Name_2.Size = UDim2.new(0.95, 0, 0.82, 0)
  199. Name_2.Font = Enum.Font.TitilliumWeb
  200. Name_2.Text = "Enabled"
  201. Name_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  202. Name_2.TextScaled = true
  203. Name_2.TextSize = 14
  204. Name_2.TextWrapped = true
  205. Name_2.TextXAlignment = Enum.TextXAlignment.Left
  206. Name_2.TextYAlignment = Enum.TextYAlignment.Bottom
  207.  
  208. UIGradient_2.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(180, 180, 180))}
  209. UIGradient_2.Parent = Button
  210.  
  211. tab.Name = "Tab"
  212. tab.Visible = false
  213. --tab.Parent = Arceus
  214. tab.BackgroundTransparency = 1
  215. tab.Size = UDim2.new(0.95, 0, 0.025, 0)
  216.  
  217. Close.Name = "Close"
  218. Close.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  219. Close.BackgroundTransparency = 1
  220. Close.BorderSizePixel = 0
  221. Close.Position = UDim2.new(0.8, 0, 0.1, 0)
  222. Close.Size = UDim2.new(0.15, 0, 0.125, 0)
  223. Close.Font = Enum.Font.FredokaOne
  224. Close.Text = "X"
  225. Close.TextColor3 = Color3.fromRGB(255, 0, 0)
  226. Close.TextScaled = true
  227. Close.TextSize = 14
  228. Close.TextWrapped = true
  229. Close.TextXAlignment = Enum.TextXAlignment.Right
  230. Close.Parent = Main
  231.  
  232. ComboElem.Name = "ComboElem"
  233. ComboElem.BackgroundColor3 = Color3.fromRGB(55, 55, 55)
  234. ComboElem.Size = UDim2.new(0.95, 0, 0, 50)
  235.  
  236. UICorner_7.CornerRadius = UDim.new(0.25, 0)
  237. UICorner_7.Parent = ComboElem
  238.  
  239. Name_3.Name = "Name"
  240. Name_3.Parent = ComboElem
  241. Name_3.AnchorPoint = Vector2.new(0, 0.5)
  242. Name_3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  243. Name_3.BackgroundTransparency = 1
  244. Name_3.BorderSizePixel = 0
  245. Name_3.Position = UDim2.new(0.05, 0, 0.5, 0)
  246. Name_3.Size = UDim2.new(0.75, 0, 0.8, 0)
  247. Name_3.Font = Enum.Font.TitilliumWeb
  248. Name_3.Text = "Enabled"
  249. Name_3.TextColor3 = Color3.fromRGB(255, 255, 255)
  250. Name_3.TextScaled = true
  251. Name_3.TextSize = 14
  252. Name_3.TextWrapped = true
  253. Name_3.TextXAlignment = Enum.TextXAlignment.Left
  254. Name_3.TextYAlignment = Enum.TextYAlignment.Bottom
  255.  
  256. UIGradient_3.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(180, 180, 180))}
  257. UIGradient_3.Rotation = 180
  258. UIGradient_3.Parent = ComboElem
  259.  
  260. Img.Name = "Img"
  261. Img.Parent = ComboElem
  262. Img.AnchorPoint = Vector2.new(1, 0.5)
  263. Img.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  264. Img.BackgroundTransparency = 1
  265. Img.BorderSizePixel = 0
  266. Img.Position = UDim2.new(0.975, 0, 0.5, 0)
  267. Img.Rotation = 90
  268. Img.Size = UDim2.new(0.75, 0, 0.75, 0)
  269. Img.Font = Enum.Font.FredokaOne
  270. Img.Text = "^"
  271. Img.TextColor3 = Color3.fromRGB(255, 255, 255)
  272. Img.TextScaled = true
  273. Img.TextSize = 14
  274. Img.TextWrapped = true
  275.  
  276. UIAspectRatioConstraint_4.Parent = Img
  277.  
  278. ComboBox.Name = "ComboBox"
  279. ComboBox.BackgroundColor3 = Color3.fromRGB(55, 55, 55)
  280. ComboBox.Size = UDim2.new(0.95, 0, 0, 50)
  281.  
  282. UICorner_8.CornerRadius = UDim.new(0.25, 0)
  283. UICorner_8.Parent = ComboBox
  284.  
  285. Name_4.Name = "Name"
  286. Name_4.Parent = ComboBox
  287. Name_4.AnchorPoint = Vector2.new(0, 0.5)
  288. Name_4.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  289. Name_4.BackgroundTransparency = 1.000
  290. Name_4.BorderSizePixel = 0
  291. Name_4.Position = UDim2.new(0.05, 0, 0.5, 0)
  292. Name_4.Size = UDim2.new(0.75, 0, 0.8, 0)
  293. Name_4.Font = Enum.Font.TitilliumWeb
  294. Name_4.Text = "Enabled"
  295. Name_4.TextColor3 = Color3.fromRGB(255, 255, 255)
  296. Name_4.TextScaled = true
  297. Name_4.TextSize = 14
  298. Name_4.TextWrapped = true
  299. Name_4.TextXAlignment = Enum.TextXAlignment.Left
  300. Name_4.TextYAlignment = Enum.TextYAlignment.Bottom
  301.  
  302. UIGradient_4.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(180, 180, 180))}
  303. UIGradient_4.Parent = ComboBox
  304.  
  305. Img_2.Name = "Img"
  306. Img_2.Parent = ComboBox
  307. Img_2.AnchorPoint = Vector2.new(1, 0.5)
  308. Img_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  309. Img_2.BackgroundTransparency = 1
  310. Img_2.BorderSizePixel = 0
  311. Img_2.Rotation = 180
  312. Img_2.Position = UDim2.new(0.975, 0, 0.5, 0)
  313. Img_2.Size = UDim2.new(0.75, 0, 0.75, 0)
  314. Img_2.Font = Enum.Font.FredokaOne
  315. Img_2.Text = "^"
  316. Img_2.TextColor3 = Color3.fromRGB(255, 0, 0)
  317. Img_2.TextScaled = true
  318. Img_2.TextSize = 14
  319. Img_2.TextWrapped = true
  320.  
  321. UIAspectRatioConstraint_5.Parent = Img_2
  322.  
  323. -- SCRIPT
  324.  
  325. local TweenService = game:GetService("TweenService")
  326. Close.MouseButton1Click:Connect(function()
  327. Logo.Active = true
  328. TweenService:Create(Intro, TweenInfo.new(0.25, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {BackgroundTransparency = 0}):Play()
  329.  
  330. task.wait(0.3)
  331. Logo:TweenSizeAndPosition(
  332. UDim2.fromScale(0.75, 0.75),
  333. UDim2.fromScale(0.5, 0.5),
  334. Enum.EasingDirection.Out,
  335. Enum.EasingStyle.Quad,
  336. 0.25, true, nil
  337. )
  338.  
  339. task.wait(0.3)
  340. Main:TweenSize(
  341. UDim2.fromScale(0.1, 0.175),
  342. Enum.EasingDirection.Out,
  343. Enum.EasingStyle.Quad,
  344. 0.25, true, nil
  345. )
  346.  
  347. task.wait(0.3)
  348. for _, obj in pairs(Main:GetChildren()) do
  349. if obj:IsA("GuiObject") and obj ~= Intro then
  350. obj.Visible = false
  351. end
  352. end
  353.  
  354. TweenService:Create(Logo, TweenInfo.new(0.25, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {ImageTransparency = 0.8}):Play()
  355. TweenService:Create(Intro, TweenInfo.new(0.25, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {BackgroundTransparency = 1}):Play()
  356. TweenService:Create(Main, TweenInfo.new(0.25, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {BackgroundTransparency = 0.8}):Play()
  357. end)
  358.  
  359. Logo.MouseButton1Click:Connect(function()
  360. Logo.Active = false
  361. TweenService:Create(Logo, TweenInfo.new(0.25, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {ImageTransparency = 0}):Play()
  362. TweenService:Create(Intro, TweenInfo.new(0.25, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {BackgroundTransparency = 0}):Play()
  363. TweenService:Create(Main, TweenInfo.new(0.25, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {BackgroundTransparency = 0}):Play()
  364.  
  365. task.wait(0.3)
  366. Main:TweenSize(
  367. UDim2.fromScale(0.3, 0.3),
  368. Enum.EasingDirection.Out,
  369. Enum.EasingStyle.Quad,
  370. 0.25, true, nil
  371. )
  372.  
  373. task.wait(0.3)
  374. Logo:TweenSizeAndPosition(
  375. UDim2.fromScale(0.175, 0.175),
  376. UDim2.fromScale(0.075, 0.15),
  377. Enum.EasingDirection.Out,
  378. Enum.EasingStyle.Quad,
  379. 0.25, true, nil
  380. )
  381.  
  382. for _, obj in pairs(Main:GetChildren()) do
  383. if obj:IsA("GuiObject") and obj ~= Intro then
  384. obj.Visible = true
  385. end
  386. end
  387.  
  388. task.wait(0.3)
  389. TweenService:Create(Intro, TweenInfo.new(0.25, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {BackgroundTransparency = 1}):Play()
  390. end)
  391.  
  392. local function uiparent()
  393. local success, parent = pcall(function()
  394. return gethui()
  395. end)
  396.  
  397. if not success then
  398. return game:GetService("CoreGui")
  399. end
  400.  
  401. return parent
  402. end
  403.  
  404. local success, err = pcall(function()
  405. Arceus.Parent = uiparent()
  406. end)
  407.  
  408. if not success then
  409. Arceus.Parent = game:GetService("Players").LocalPlayer.PlayerGui
  410. end
  411.  
  412. local element_height = 50*Menu.AbsoluteSize.Y/210
  413. local elements = 0
  414.  
  415. local function AddSpace(parent)
  416. local space = tab:Clone()
  417. space.Parent = parent
  418. space.LayoutOrder = elements
  419. space.Visible = true
  420.  
  421. elements += 1
  422. end
  423.  
  424. function lib:AddToggle(name, funct, enabled, ...)
  425. local newTog = Toggle:Clone()
  426. local args = {...}
  427.  
  428. newTog.MouseButton1Click:Connect(function()
  429. enabled = not enabled
  430. newTog:WaitForChild("Enabled"):WaitForChild("Check").Visible = enabled
  431. funct(enabled, unpack(args))
  432. end)
  433.  
  434. newTog:WaitForChild("Enabled"):WaitForChild("Check").Visible = enabled
  435. newTog:WaitForChild("Name").Text = name
  436.  
  437. newTog.Size = UDim2.new(0.95, 0, 0, element_height) -- Y1 = 50 : Y2 = X
  438. newTog.Name = name
  439. newTog.Parent = Menu
  440. newTog.LayoutOrder = elements
  441. newTog.Visible = true
  442.  
  443. elements += 1
  444. AddSpace(Menu)
  445.  
  446. return newTog
  447. end
  448.  
  449. function lib:AddButton(name, funct, ...)
  450. local newBut = Button:Clone()
  451. local args = {...}
  452.  
  453. newBut.MouseButton1Click:Connect(function()
  454. funct(unpack(args))
  455. end)
  456.  
  457. newBut:WaitForChild("Name").Text = name
  458. newBut.Size = UDim2.new(0.95, 0, 0, element_height)
  459. newBut.Name = name
  460. newBut.Parent = Menu
  461. newBut.LayoutOrder = elements
  462. newBut.Visible = true
  463.  
  464. elements += 1
  465. AddSpace(Menu)
  466.  
  467. return newBut
  468. end
  469.  
  470. function lib:AddComboBox(text, options, funct, ...) -- ADD CUSTOM ELEMENT INSTEAD
  471. local newCombo = ComboBox:Clone()
  472. local enabled = false
  473. local elems = {}
  474. local args = {...}
  475.  
  476. local function setBoxState()
  477. newCombo:WaitForChild("Img").Rotation = enabled and 0 or 180
  478. for _, elem in ipairs(elems) do
  479. elem.Visible = enabled
  480. end
  481. end
  482.  
  483. newCombo.MouseButton1Click:Connect(function()
  484. enabled = not enabled
  485. setBoxState()
  486. end)
  487.  
  488. newCombo:WaitForChild("Name").Text = text .. ": " .. (#options > 0 and options[1] or "")
  489. newCombo.Size = UDim2.new(0.95, 0, 0, element_height)
  490. newCombo.Name = #options > 0 and options[1] or ""
  491. newCombo.Parent = Menu
  492. newCombo.LayoutOrder = elements
  493. newCombo.Parent = Menu
  494. newCombo.Visible = true
  495.  
  496. elements += 1
  497. AddSpace(Menu)
  498.  
  499. for _, name in ipairs(options) do
  500. local newElem = ComboElem:Clone()
  501. table.insert(elems, newElem)
  502.  
  503. newElem.MouseButton1Click:Connect(function()
  504. newCombo:WaitForChild("Name").Text = text .. ": " .. name
  505. enabled = false
  506. setBoxState()
  507.  
  508. funct(name, unpack(args))
  509. end)
  510.  
  511. newElem:WaitForChild("Name").Text = name
  512. newElem.Size = UDim2.new(0.95, 0, 0, element_height)
  513. newElem.Name = name
  514. newElem.Parent = Menu
  515. newElem.LayoutOrder = elements
  516. newElem.Visible = false
  517.  
  518. elements += 1
  519. AddSpace(Menu)
  520. end
  521.  
  522. return newCombo
  523. end
  524.  
  525. function lib:SetTitle(txt)
  526. Title.Text = txt
  527. end
  528.  
  529. function lib:SetIcon(img)
  530. Logo.Image = img
  531. end
  532.  
  533. function lib:SetBackgroundColor(r, g ,b)
  534. Main.BackgroundColor3 = Color3.fromRGB(r, g, b)
  535. Intro.BackgroundColor3 = Color3.fromRGB(r, g, b)
  536. end
  537.  
  538. function lib:SetTitleColor(r, g, b)
  539. Title.TextColor3 = Color3.fromRGB(r, g, b)
  540. end
  541.  
  542. function lib:SetCloseBtnColor(r, g, b)
  543. Close.TextColor3 = Color3.fromRGB(r, g, b)
  544. Img_2.TextColor3 = Color3.fromRGB(r, g, b)
  545. Check.BackgroundColor3 = Color3.fromRGB(r, g, b)
  546. end
  547.  
  548. function lib:SetButtonsColor(r, g ,b)
  549. Toggle.BackgroundColor3 = Color3.fromRGB(r, g, b)
  550. Button.BackgroundColor3 = Color3.fromRGB(r, g, b)
  551. ComboElem.BackgroundColor3 = Color3.fromRGB(r, g, b)
  552. ComboBox.BackgroundColor3 = Color3.fromRGB(r, g, b)
  553. end
  554.  
  555. function lib:SetTheme(theme)
  556. if theme == "Default" then
  557.  
  558. elseif theme == "TomorrowNightBlue" then
  559. lib:SetButtonsColor(74, 208, 238)
  560. lib:SetCloseBtnColor(74, 208, 238)
  561. lib:SetBackgroundColor(5, 16, 58)
  562. elseif theme == "HighContrast" then
  563. lib:SetBackgroundColor(0, 0, 0)
  564. lib:SetButtonsColor(0, 0, 0)
  565. lib:SetCloseBtnColor(255, 255, 0)
  566. elseif theme == "Aqua" then
  567. lib:SetBackgroundColor(44, 62, 82)
  568. lib:SetButtonsColor(52, 74, 95)
  569. lib:SetCloseBtnColor(26, 189, 158)
  570. elseif theme == "Ocean" then
  571. lib:SetBackgroundColor(26, 32, 58)
  572. lib:SetButtonsColor(38, 45, 71)
  573. lib:SetCloseBtnColor(86, 76, 251)
  574. elseif theme == "BloodRed" then
  575. lib:SetBackgroundColor(139, 0, 0)
  576. lib:SetButtonsColor(150, 0, 0)
  577. lib:SetCloseBtnColor(255, 20, 20)
  578. elseif theme == "Grape" then
  579. lib:SetBackgroundColor(180, 32, 130)
  580. lib:SetButtonsColor(120, 45, 180)
  581. lib:SetCloseBtnColor(120, 0, 180)
  582. Intro.BackgroundColor3 = Color3.fromRGB(180, 32, 130)
  583. elseif theme == "Serpent" then
  584. lib:SetBackgroundColor(0, 138, 0)
  585. lib:SetButtonsColor(0, 200, 0)
  586. lib:SetCloseBtnColor(0, 200, 0)
  587. elseif theme == "Joker" then
  588. Toggle.BackgroundColor3 = Color3.fromRGB(r, g, b)
  589. Button.BackgroudTransparency = 1
  590. ComboElem.BackgroundTransparency = 1
  591. ComboBox.BackgroundTransparency = 1
  592. else
  593. error("Theme not found.")
  594. end
  595. end
  596. -- INIT
  597.  
  598. Main:TweenPosition(
  599. UDim2.fromScale(0.5, 0.5),
  600. Enum.EasingDirection.In,
  601. Enum.EasingStyle.Quad,
  602. 1, true, nil
  603. )
  604.  
  605. task.wait(1.5)
  606. Logo:TweenSizeAndPosition(
  607. UDim2.fromScale(0.175, 0.175),
  608. UDim2.fromScale(0.075, 0.15),
  609. Enum.EasingDirection.In,
  610. Enum.EasingStyle.Quad,
  611. 1, true, nil
  612. )
  613.  
  614. task.wait(1.5)
  615. TweenService:Create(Intro, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {BackgroundTransparency = 1}):Play()
  616.  
  617. return lib
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement