ZV0K

Vylix AA Hub

Aug 9th, 2023
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 158.09 KB | None | 0 0
  1. -- Source fully made by Actyrn#7104, except the UI library ofc
  2. -- USE THE LOADSTRING FOR AUTOMATIC UPDATES!!
  3.  
  4. repeat wait() until game:IsLoaded()
  5.  
  6. setfpscap = setfpscap
  7. Drawing = Drawing
  8. getgenv = getgenv
  9. syn = syn
  10. isfolder = isfolder
  11. makefolder = makefolder
  12. ConfigName = ConfigName
  13. listfiles = listfiles
  14. writefile = writefile
  15. readfile = readfile
  16. isfile = isfile
  17. delfile = delfile
  18.  
  19. if setfpscap then
  20. setfpscap(0)
  21. end
  22.  
  23. local library = {
  24. flags = {},
  25. items = {}
  26. }
  27.  
  28. local Settings = {
  29. Custom = {
  30. Enabled = nil,
  31. X = nil,
  32. Y = nil,
  33. Z = nil
  34. },
  35.  
  36. Up = {
  37. Enabled = nil,
  38. Amount = nil
  39. },
  40.  
  41. Down = {
  42. Enabled = nil,
  43. Amount = nil
  44. },
  45.  
  46. VelMultiply = {
  47. Enabled = nil,
  48. WalkAmt = nil,
  49. JumpAmt = nil
  50. },
  51.  
  52. LookVec = {
  53. Enabled = nil,
  54. Amount = nil
  55. },
  56.  
  57. Reverse = {
  58. Enabled = nil,
  59. Amount = nil,
  60. Type = nil
  61. },
  62.  
  63. Confusion = {
  64. Enabled = nil,
  65. Amount = nil
  66. },
  67.  
  68. PredBreaker = nil,
  69.  
  70. Desync = {
  71. Enabled = nil,
  72. X = nil,
  73. Y = nil,
  74. Z = nil,
  75. Angles = nil
  76. },
  77.  
  78. VelVisualizer = {
  79. Enabled = nil,
  80. Prediction = nil,
  81. HitPart = nil
  82. }
  83. }
  84.  
  85. Actyrn7104 = {
  86. Enabled = nil,
  87. Bind = nil,
  88. Notify = nil,
  89. Prediction = nil,
  90. Type = nil
  91. }
  92.  
  93. local library = {
  94. flags = {},
  95. items = {}
  96. }
  97.  
  98. local uis = game:GetService("UserInputService")
  99. local runservice = game:GetService("RunService")
  100. local tweenservice = game:GetService("TweenService")
  101. local textservice = game:GetService("TextService")
  102. local coregui = game:GetService("CoreGui")
  103. local httpservice = game:GetService("HttpService")
  104.  
  105. local veldot = Drawing.new("Circle")
  106.  
  107. local player = game:GetService("Players").LocalPlayer
  108. local mouse = player:GetMouse()
  109.  
  110. library.theme = {
  111. fontsize = 17,
  112. titlesize = 18,
  113. font = Enum.Font.Code,
  114. background = "rbxassetid://0",
  115. tilesize = 90,
  116. cursor = false,
  117. cursorimg = "https://t0.rbxcdn.com/42f66da98c40252ee151326a82aab51f",
  118. backgroundcolor = Color3.fromRGB(20, 20, 20),
  119. tabstextcolor = Color3.fromRGB(255, 255, 255),
  120. bordercolor = Color3.fromRGB(50, 189, 50),
  121. accentcolor = Color3.fromRGB(89, 143, 85),
  122. accentcolor2 = Color3.fromRGB(48, 86, 48),
  123. outlinecolor = Color3.fromRGB(20, 20, 20),
  124. outlinecolor2 = Color3.fromRGB(30, 30, 30),
  125. sectorcolor = Color3.fromRGB(30, 30, 30),
  126. toptextcolor = Color3.fromRGB(255, 255, 255),
  127. topheight = 48,
  128. topcolor = Color3.fromRGB(30, 30, 30),
  129. topcolor2 = Color3.fromRGB(12, 12, 12),
  130. buttoncolor = Color3.fromRGB(49, 49, 49),
  131. buttoncolor2 = Color3.fromRGB(29, 29, 29),
  132. itemscolor = Color3.fromRGB(170, 170, 170),
  133. itemscolor2 = Color3.fromRGB(255, 255, 255)
  134. }
  135.  
  136. if library.theme.cursor then
  137. local success = pcall(function()
  138. library.cursor = Drawing.new("Image")
  139. library.cursor.Data = game:HttpGet(library.theme.cursorimg)
  140. library.cursor.Size = Vector2.new(64, 64)
  141. library.cursor.Visible = uis.MouseEnabled
  142. library.cursor.Rounding = 0
  143. library.cursor.Position = Vector2.new(mouse.X - 32, mouse.Y + 6)
  144. end)
  145.  
  146. if success and library.cursor then
  147. uis.InputChanged:Connect(function(input)
  148. if uis.MouseEnabled then
  149. if input.UserInputType == Enum.UserInputType.MouseMovement then
  150. library.cursor.Position = Vector2.new(input.Position.X - 32, input.Position.Y + 7)
  151. end
  152. end
  153. end)
  154.  
  155. runservice.RenderStepped:Connect(function()
  156. uis.OverrideMouseIconBehavior = Enum.OverrideMouseIconBehavior.ForceHide
  157. library.cursor.Visible = uis.MouseEnabled and (uis.MouseIconEnabled or game:GetService("GuiService").MenuIsOpen)
  158. end)
  159.  
  160. elseif not success and library.cursor then
  161. library.cursor:Remove()
  162. end
  163. end
  164.  
  165. function library:CheckErrors(error1, error2, ePlayer, v1, v2)
  166. local message = "Unexpected client behavior."
  167. local eCheck1, client = function(err1)
  168.  
  169. if err1 then
  170. local errorCheck1 = {
  171. error57 = err1
  172. }
  173. if not errorCheck1.error57 then
  174. local PrintVal = function(val)
  175. print(val)
  176. end
  177.  
  178. PrintVal(message)
  179. end
  180.  
  181. return err1
  182. end
  183.  
  184. return nil
  185. end, ePlayer
  186. if error1 and error2 then
  187. local err_Table, pCheck1 = {
  188. err_1 = error1,
  189. err_2 = error2
  190. }, function(detected, reason)
  191. detected:Kick(reason)
  192. end
  193.  
  194. if not (err_Table.err_1 and err_Table.err_2) then
  195. if client then
  196. pCheck1(client, message)
  197. end
  198. end
  199.  
  200. if (err_Table.err_1 == error1) and (err_Table.err_2 == error2) then
  201. if v1 ~= v2 then
  202. pCheck1(client, message)
  203. end
  204. end
  205. end
  206. end
  207.  
  208. function library:CreateWatermark(name, position)
  209. local gamename = game["PlaceId"].Name
  210. local watermark = {}
  211. watermark.Visible = true
  212. watermark.text = " " .. name:gsub("{game}", gamename):gsub("{fps}", "0 FPS") .. " "
  213.  
  214. watermark.main = Instance.new("ScreenGui", coregui)
  215. watermark.main.Name = "Watermark"
  216.  
  217. if syn then
  218. syn.protect_gui(watermark.main)
  219. end
  220.  
  221. if getgenv().uimark then
  222. getgenv().uimark:Remove()
  223. end
  224.  
  225. getgenv().uimark = watermark.main
  226.  
  227. watermark.mainbar = Instance.new("Frame", watermark.main)
  228. watermark.mainbar.Name = "Main"
  229. watermark.mainbar.BorderColor3 = Color3.fromRGB(80, 80, 80)
  230. watermark.mainbar.Visible = watermark.Visible
  231. watermark.mainbar.BorderSizePixel = 0
  232. watermark.mainbar.ZIndex = 5
  233. watermark.mainbar.Position = UDim2.new(0, position and position.X or 10, 0, position and position.Y or 10)
  234. watermark.mainbar.Size = UDim2.new(0, 0, 0, 25)
  235.  
  236. watermark.Gradient = Instance.new("UIGradient", watermark.mainbar)
  237. watermark.Gradient.Rotation = 90
  238. watermark.Gradient.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(40, 40, 40)), ColorSequenceKeypoint.new(1, Color3.fromRGB(10, 10, 10))})
  239.  
  240. watermark.Outline = Instance.new("Frame", watermark.mainbar)
  241. watermark.Outline.Name = "outline"
  242. watermark.Outline.ZIndex = 4
  243. watermark.Outline.BorderSizePixel = 0
  244. watermark.Outline.Visible = watermark.Visible
  245. watermark.Outline.BackgroundColor3 = library.theme.outlinecolor
  246. watermark.Outline.Position = UDim2.fromOffset(- 1, - 1)
  247.  
  248. watermark.BlackOutline = Instance.new("Frame", watermark.mainbar)
  249. watermark.BlackOutline.Name = "blackline"
  250. watermark.BlackOutline.ZIndex = 3
  251. watermark.BlackOutline.BorderSizePixel = 0
  252. watermark.BlackOutline.BackgroundColor3 = library.theme.outlinecolor2
  253. watermark.BlackOutline.Visible = watermark.Visible
  254. watermark.BlackOutline.Position = UDim2.fromOffset(- 2, - 2)
  255.  
  256. watermark.label = Instance.new("TextLabel", watermark.mainbar)
  257. watermark.label.Name = "FPSLabel"
  258. watermark.label.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  259. watermark.label.BackgroundTransparency = 10
  260. watermark.label.Position = UDim2.new(0, 0, 0, 0)
  261. watermark.label.Size = UDim2.new(0, 238, 0, 25)
  262. watermark.label.Font = library.theme.font
  263. watermark.label.ZIndex = 6
  264. watermark.label.Visible = watermark.Visible
  265. watermark.label.Text = watermark.text
  266. watermark.label.TextColor3 = Color3.fromRGB(255, 255, 255)
  267. watermark.label.TextSize = 15
  268. watermark.label.TextStrokeTransparency = 0
  269. watermark.label.TextXAlignment = Enum.TextXAlignment.Left
  270. watermark.label.Size = UDim2.new(0, watermark.label.TextBounds.X + 10, 0, 25)
  271.  
  272. watermark.topbar = Instance.new("Frame", watermark.mainbar)
  273. watermark.topbar.Name = "TopBar"
  274. watermark.topbar.ZIndex = 6
  275. watermark.topbar.BackgroundColor3 = library.theme.accentcolor
  276. watermark.topbar.BorderSizePixel = 0
  277. watermark.topbar.Visible = watermark.Visible
  278. watermark.topbar.Size = UDim2.new(0, 0, 0, 1)
  279.  
  280. watermark.mainbar.Size = UDim2.new(0, watermark.label.TextBounds.X, 0, 25)
  281. watermark.topbar.Size = UDim2.new(0, watermark.label.TextBounds.X + 6, 0, 1)
  282. watermark.Outline.Size = watermark.mainbar.Size + UDim2.fromOffset(2, 2)
  283. watermark.BlackOutline.Size = watermark.mainbar.Size + UDim2.fromOffset(4, 4)
  284.  
  285. watermark.mainbar.Size = UDim2.new(0, watermark.label.TextBounds.X + 4, 0, 25)
  286. watermark.label.Size = UDim2.new(0, watermark.label.TextBounds.X + 4, 0, 25)
  287. watermark.topbar.Size = UDim2.new(0, watermark.label.TextBounds.X + 6, 0, 1)
  288. watermark.Outline.Size = watermark.mainbar.Size + UDim2.fromOffset(2, 2)
  289. watermark.BlackOutline.Size = watermark.mainbar.Size + UDim2.fromOffset(4, 4)
  290.  
  291. local startTime, counter, oldfps = os.clock(), 0, nil
  292. runservice.Heartbeat:Connect(function()
  293. watermark.label.Visible = watermark.Visible
  294. watermark.mainbar.Visible = watermark.Visible
  295. watermark.topbar.Visible = watermark.Visible
  296. watermark.Outline.Visible = watermark.Visible
  297. watermark.BlackOutline.Visible = watermark.Visible
  298.  
  299. if not name:find("{fps}") then
  300. watermark.label.Text = " " .. name:gsub("{game}", gamename):gsub("{fps}", "0 FPS") .. " "
  301. end
  302.  
  303. if name:find("{fps}") then
  304. local currentTime = os.clock()
  305. counter = counter + 1
  306. if currentTime - startTime >= 1 then
  307. local fps = math.round(counter / (currentTime - startTime))
  308. counter = 0
  309. startTime = currentTime
  310.  
  311. if fps ~= oldfps then
  312. watermark.label.Text = " " .. name:gsub("{game}", gamename):gsub("{fps}", fps .. " FPS") .. " "
  313.  
  314. watermark.label.Size = UDim2.new(0, watermark.label.TextBounds.X + 10, 0, 25)
  315. watermark.mainbar.Size = UDim2.new(0, watermark.label.TextBounds.X, 0, 25)
  316. watermark.topbar.Size = UDim2.new(0, watermark.label.TextBounds.X, 0, 1)
  317.  
  318. watermark.Outline.Size = watermark.mainbar.Size + UDim2.fromOffset(2, 2)
  319. watermark.BlackOutline.Size = watermark.mainbar.Size + UDim2.fromOffset(4, 4)
  320. end
  321. oldfps = fps
  322. end
  323. end
  324. end)
  325.  
  326. watermark.mainbar.MouseEnter:Connect(function()
  327. tweenservice:Create(watermark.mainbar, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {BackgroundTransparency = 1, Active = false}):Play()
  328. tweenservice:Create(watermark.topbar, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {BackgroundTransparency = 1, Active = false}):Play()
  329. tweenservice:Create(watermark.label, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {TextTransparency = 1, Active = false}):Play()
  330. tweenservice:Create(watermark.Outline, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {BackgroundTransparency = 1, Active = false}):Play()
  331. tweenservice:Create(watermark.BlackOutline, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {BackgroundTransparency = 1, Active = false}):Play()
  332. end)
  333.  
  334. watermark.mainbar.MouseLeave:Connect(function()
  335. tweenservice:Create(watermark.mainbar, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {BackgroundTransparency = 0, Active = true}):Play()
  336. tweenservice:Create(watermark.topbar, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {BackgroundTransparency = 0, Active = true}):Play()
  337. tweenservice:Create(watermark.label, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {TextTransparency = 0, Active = true}):Play()
  338. tweenservice:Create(watermark.Outline, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {BackgroundTransparency = 0, Active = true}):Play()
  339. tweenservice:Create(watermark.BlackOutline, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {BackgroundTransparency = 0, Active = true}):Play()
  340. end)
  341.  
  342. function watermark:UpdateTheme(theme)
  343. theme = theme or library.theme
  344. watermark.Outline.BackgroundColor3 = theme.outlinecolor
  345. watermark.BlackOutline.BackgroundColor3 = theme.outlinecolor2
  346. watermark.label.Font = theme.font
  347. watermark.topbar.BackgroundColor3 = theme.accentcolor
  348. end
  349.  
  350. return watermark
  351. end
  352.  
  353. function library:CreateWindow(name, size, hidebutton)
  354. local window = {}
  355. window.name = name or ""
  356. window.size = UDim2.fromOffset(size.X, size.Y) or UDim2.fromOffset(500, 600)
  357. window.hidebutton = hidebutton or Enum.KeyCode.RightShift
  358. window.theme = library.theme
  359.  
  360. local updateevent = Instance.new("BindableEvent")
  361. function window:UpdateTheme(theme)
  362. updateevent:Fire(theme or library.theme)
  363. window.theme = (theme or library.theme)
  364. end
  365.  
  366. window.Main = Instance.new("ScreenGui", coregui)
  367. window.Main.Name = name
  368. window.Main.DisplayOrder = 15
  369.  
  370. if syn then
  371. syn.protect_gui(window.Main)
  372. end
  373.  
  374. if getgenv().uilib then
  375. getgenv().uilib:Remove()
  376. end
  377.  
  378. getgenv().uilib = window.Main
  379.  
  380. local dragging, dragInput, dragStart, startPos
  381. uis.InputChanged:Connect(function(input)
  382. if input == dragInput and dragging then
  383. local delta = input.Position - dragStart
  384. window.Frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  385. end
  386. end)
  387.  
  388. local dragstart = function(input)
  389. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  390. dragging = true
  391. dragStart = input.Position
  392. startPos = window.Frame.Position
  393.  
  394. input.Changed:Connect(function()
  395. if input.UserInputState == Enum.UserInputState.End then
  396. dragging = false
  397. end
  398. end)
  399. end
  400. end
  401.  
  402. local dragend = function(input)
  403. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  404. dragInput = input
  405. end
  406. end
  407.  
  408. window.Frame = Instance.new("TextButton", window.Main)
  409. window.Frame.Name = "main"
  410. window.Frame.Position = UDim2.fromScale(0.5, 0.5)
  411. window.Frame.BorderSizePixel = 0
  412. window.Frame.Size = window.size
  413. window.Frame.AutoButtonColor = false
  414. window.Frame.Text = ""
  415. window.Frame.BackgroundColor3 = window.theme.backgroundcolor
  416. window.Frame.AnchorPoint = Vector2.new(0.5, 0.5)
  417. updateevent.Event:Connect(function(theme)
  418. window.Frame.BackgroundColor3 = theme.backgroundcolor
  419. end)
  420.  
  421. uis.InputBegan:Connect(function(key)
  422. if key.KeyCode == window.hidebutton then
  423. window.Frame.Visible = not window.Frame.Visible
  424. end
  425. end)
  426.  
  427. local function checkIfGuiInFront(Pos)
  428. local objects = coregui:GetGuiObjectsAtPosition(Pos.X, Pos.Y)
  429. for i, v in pairs(objects) do
  430. if not string.find(v:GetFullName(), window.name) then
  431. table.remove(objects, i)
  432. end
  433. end
  434.  
  435. return (#objects ~= 0 and objects[1].AbsolutePosition ~= Pos)
  436. end
  437.  
  438. window.BlackOutline = Instance.new("Frame", window.Frame)
  439. window.BlackOutline.Name = "outline"
  440. window.BlackOutline.ZIndex = 1
  441. window.BlackOutline.Size = window.size + UDim2.fromOffset(2, 2)
  442. window.BlackOutline.BorderSizePixel = 0
  443. window.BlackOutline.BackgroundColor3 = window.theme.outlinecolor2
  444. window.BlackOutline.Position = UDim2.fromOffset(- 1, - 1)
  445. updateevent.Event:Connect(function(theme)
  446. window.BlackOutline.BackgroundColor3 = theme.outlinecolor2
  447. end)
  448.  
  449. window.Outline = Instance.new("Frame", window.Frame)
  450. window.Outline.Name = "outline"
  451. window.Outline.ZIndex = 0
  452. window.Outline.Size = window.size + UDim2.fromOffset(4, 4)
  453. window.Outline.BorderSizePixel = 0
  454. window.Outline.BackgroundColor3 = window.theme.outlinecolor
  455. window.Outline.Position = UDim2.fromOffset(- 2, - 2)
  456. updateevent.Event:Connect(function(theme)
  457. window.Outline.BackgroundColor3 = theme.outlinecolor
  458. end)
  459.  
  460. window.BlackOutline2 = Instance.new("Frame", window.Frame)
  461. window.BlackOutline2.Name = "outline"
  462. window.BlackOutline2.ZIndex = - 1
  463. window.BlackOutline2.Size = window.size + UDim2.fromOffset(6, 6)
  464. window.BlackOutline2.BorderSizePixel = 0
  465. window.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  466. window.BlackOutline2.Position = UDim2.fromOffset(- 3, - 3)
  467. updateevent.Event:Connect(function(theme)
  468. window.BlackOutline2.BackgroundColor3 = theme.outlinecolor2
  469. end)
  470.  
  471. window.TopBar = Instance.new("Frame", window.Frame)
  472. window.TopBar.Name = "top"
  473. window.TopBar.Size = UDim2.fromOffset(window.size.X.Offset, window.theme.topheight)
  474. window.TopBar.BorderSizePixel = 0
  475. window.TopBar.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  476. window.TopBar.InputBegan:Connect(dragstart)
  477. window.TopBar.InputChanged:Connect(dragend)
  478. updateevent.Event:Connect(function(theme)
  479. window.TopBar.Size = UDim2.fromOffset(window.size.X.Offset, theme.topheight)
  480. end)
  481.  
  482. window.TopGradient = Instance.new("UIGradient", window.TopBar)
  483. window.TopGradient.Rotation = 90
  484. window.TopGradient.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, window.theme.topcolor), ColorSequenceKeypoint.new(1, window.theme.topcolor2)})
  485. updateevent.Event:Connect(function(theme)
  486. window.TopGradient.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, theme.topcolor), ColorSequenceKeypoint.new(1, theme.topcolor2)})
  487. end)
  488.  
  489. window.NameLabel = Instance.new("TextLabel", window.TopBar)
  490. window.NameLabel.TextColor3 = window.theme.toptextcolor
  491. window.NameLabel.Text = window.name
  492. window.NameLabel.TextXAlignment = Enum.TextXAlignment.Left
  493. window.NameLabel.Font = window.theme.font
  494. window.NameLabel.Name = "title"
  495. window.NameLabel.Position = UDim2.fromOffset(4, - 2)
  496. window.NameLabel.BackgroundTransparency = 1
  497. window.NameLabel.Size = UDim2.fromOffset(190, window.TopBar.AbsoluteSize.Y / 2 - 2)
  498. window.NameLabel.TextSize = window.theme.titlesize
  499. updateevent.Event:Connect(function(theme)
  500. window.NameLabel.TextColor3 = theme.toptextcolor
  501. window.NameLabel.Font = theme.font
  502. window.NameLabel.TextSize = theme.titlesize
  503. end)
  504.  
  505. window.Line2 = Instance.new("Frame", window.TopBar)
  506. window.Line2.Name = "line"
  507. window.Line2.Position = UDim2.fromOffset(0, window.TopBar.AbsoluteSize.Y / 2.1)
  508. window.Line2.Size = UDim2.fromOffset(window.size.X.Offset, 1)
  509. window.Line2.BorderSizePixel = 0
  510. window.Line2.BackgroundColor3 = window.theme.accentcolor
  511. updateevent.Event:Connect(function(theme)
  512. window.Line2.BackgroundColor3 = theme.accentcolor
  513. end)
  514.  
  515. window.TabList = Instance.new("Frame", window.TopBar)
  516. window.TabList.Name = "tablist"
  517. window.TabList.BackgroundTransparency = 1
  518. window.TabList.Position = UDim2.fromOffset(0, window.TopBar.AbsoluteSize.Y / 2 + 1)
  519. window.TabList.Size = UDim2.fromOffset(window.size.X.Offset, window.TopBar.AbsoluteSize.Y / 2)
  520. window.TabList.BorderSizePixel = 0
  521. window.TabList.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  522.  
  523. window.TabList.InputBegan:Connect(dragstart)
  524. window.TabList.InputChanged:Connect(dragend)
  525.  
  526. window.BlackLine = Instance.new("Frame", window.Frame)
  527. window.BlackLine.Name = "blackline"
  528. window.BlackLine.Size = UDim2.fromOffset(window.size.X.Offset, 1)
  529. window.BlackLine.BorderSizePixel = 0
  530. window.BlackLine.ZIndex = 9
  531. window.BlackLine.BackgroundColor3 = window.theme.outlinecolor2
  532. window.BlackLine.Position = UDim2.fromOffset(0, window.TopBar.AbsoluteSize.Y)
  533. updateevent.Event:Connect(function(theme)
  534. window.BlackLine.BackgroundColor3 = theme.outlinecolor2
  535. end)
  536.  
  537. window.BackgroundImage = Instance.new("ImageLabel", window.Frame)
  538. window.BackgroundImage.Name = "background"
  539. window.BackgroundImage.BorderSizePixel = 0
  540. window.BackgroundImage.ScaleType = Enum.ScaleType.Tile
  541. window.BackgroundImage.Position = window.BlackLine.Position + UDim2.fromOffset(0, 1)
  542. window.BackgroundImage.Size = UDim2.fromOffset(window.size.X.Offset, window.size.Y.Offset - window.TopBar.AbsoluteSize.Y - 1)
  543. window.BackgroundImage.Image = window.theme.background or ""
  544. window.BackgroundImage.ImageTransparency = window.BackgroundImage.Image ~= "" and 0 or 1
  545. window.BackgroundImage.ImageColor3 = Color3.new()
  546. window.BackgroundImage.BackgroundColor3 = window.theme.backgroundcolor
  547. window.BackgroundImage.TileSize = UDim2.new(0, window.theme.tilesize, 0, window.theme.tilesize)
  548. updateevent.Event:Connect(function(theme)
  549. window.BackgroundImage.Image = theme.background or ""
  550. window.BackgroundImage.ImageTransparency = window.BackgroundImage.Image ~= "" and 0 or 1
  551. window.BackgroundImage.BackgroundColor3 = theme.backgroundcolor
  552. window.BackgroundImage.TileSize = UDim2.new(0, theme.tilesize, 0, theme.tilesize)
  553. end)
  554.  
  555. window.Line = Instance.new("Frame", window.Frame)
  556. window.Line.Name = "line"
  557. window.Line.Position = UDim2.fromOffset(0, 0)
  558. window.Line.Size = UDim2.fromOffset(60, 1)
  559. window.Line.BorderSizePixel = 0
  560. window.Line.BackgroundColor3 = window.theme.accentcolor
  561. updateevent.Event:Connect(function(theme)
  562. window.Line.BackgroundColor3 = theme.accentcolor
  563. end)
  564.  
  565. window.ListLayout = Instance.new("UIListLayout", window.TabList)
  566. window.ListLayout.FillDirection = Enum.FillDirection.Horizontal
  567. window.ListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  568.  
  569. window.OpenedColorPickers = {}
  570. window.Tabs = {}
  571.  
  572. function window:CreateTab(name)
  573. local tab = {}
  574. tab.name = name or ""
  575.  
  576. local size = textservice:GetTextSize(tab.name, window.theme.fontsize, window.theme.font, Vector2.new(200, 300))
  577.  
  578. tab.TabButton = Instance.new("TextButton", window.TabList)
  579. tab.TabButton.TextColor3 = window.theme.tabstextcolor
  580. tab.TabButton.Text = tab.name
  581. tab.TabButton.AutoButtonColor = false
  582. tab.TabButton.Font = window.theme.font
  583. tab.TabButton.TextYAlignment = Enum.TextYAlignment.Center
  584. tab.TabButton.BackgroundTransparency = 1
  585. tab.TabButton.BorderSizePixel = 0
  586. tab.TabButton.Size = UDim2.fromOffset(size.X + 15, window.TabList.AbsoluteSize.Y - 1)
  587. tab.TabButton.Name = tab.name
  588. tab.TabButton.TextSize = window.theme.fontsize
  589. updateevent.Event:Connect(function(theme)
  590. local size = textservice:GetTextSize(tab.name, theme.fontsize, theme.font, Vector2.new(200, 300))
  591. tab.TabButton.TextColor3 = tab.TabButton.Name == "SelectedTab" and theme.accentcolor or theme.tabstextcolor
  592. tab.TabButton.Font = theme.font
  593. tab.TabButton.Size = UDim2.fromOffset(size.X + 15, window.TabList.AbsoluteSize.Y - 1)
  594. tab.TabButton.TextSize = theme.fontsize
  595. end)
  596.  
  597. tab.Left = Instance.new("ScrollingFrame", window.Frame)
  598. tab.Left.Name = "leftside"
  599. tab.Left.BorderSizePixel = 0
  600. tab.Left.Size = UDim2.fromOffset(window.size.X.Offset / 2, window.size.Y.Offset - (window.TopBar.AbsoluteSize.Y + 1))
  601. tab.Left.BackgroundTransparency = 1
  602. tab.Left.Visible = false
  603. tab.Left.ScrollBarThickness = 0
  604. tab.Left.ScrollingDirection = "Y"
  605. tab.Left.Position = window.BlackLine.Position + UDim2.fromOffset(0, 1)
  606.  
  607. tab.LeftListLayout = Instance.new("UIListLayout", tab.Left)
  608. tab.LeftListLayout.FillDirection = Enum.FillDirection.Vertical
  609. tab.LeftListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  610. tab.LeftListLayout.Padding = UDim.new(0, 12)
  611.  
  612. tab.LeftListPadding = Instance.new("UIPadding", tab.Left)
  613. tab.LeftListPadding.PaddingTop = UDim.new(0, 12)
  614. tab.LeftListPadding.PaddingLeft = UDim.new(0, 12)
  615. tab.LeftListPadding.PaddingRight = UDim.new(0, 12)
  616.  
  617. tab.Right = Instance.new("ScrollingFrame", window.Frame)
  618. tab.Right.Name = "rightside"
  619. tab.Right.ScrollBarThickness = 0
  620. tab.Right.ScrollingDirection = "Y"
  621. tab.Right.Visible = false
  622. tab.Right.BorderSizePixel = 0
  623. tab.Right.Size = UDim2.fromOffset(window.size.X.Offset / 2, window.size.Y.Offset - (window.TopBar.AbsoluteSize.Y + 1))
  624. tab.Right.BackgroundTransparency = 1
  625. tab.Right.Position = tab.Left.Position + UDim2.fromOffset(tab.Left.AbsoluteSize.X, 0)
  626.  
  627. tab.RightListLayout = Instance.new("UIListLayout", tab.Right)
  628. tab.RightListLayout.FillDirection = Enum.FillDirection.Vertical
  629. tab.RightListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  630. tab.RightListLayout.Padding = UDim.new(0, 12)
  631.  
  632. tab.RightListPadding = Instance.new("UIPadding", tab.Right)
  633. tab.RightListPadding.PaddingTop = UDim.new(0, 12)
  634. tab.RightListPadding.PaddingLeft = UDim.new(0, 6)
  635. tab.RightListPadding.PaddingRight = UDim.new(0, 12)
  636.  
  637. local block = false
  638. function tab:SelectTab()
  639. repeat
  640. wait()
  641. until block == false
  642.  
  643. block = true
  644. for i, v in pairs(window.Tabs) do
  645. if v ~= tab then
  646. v.TabButton.TextColor3 = Color3.fromRGB(230, 230, 230)
  647. v.TabButton.Name = "Tab"
  648. v.Left.Visible = false
  649. v.Right.Visible = false
  650. end
  651. end
  652.  
  653. tab.TabButton.TextColor3 = window.theme.accentcolor
  654. tab.TabButton.Name = "SelectedTab"
  655. tab.Right.Visible = true
  656. tab.Left.Visible = true
  657. window.Line:TweenSizeAndPosition(UDim2.fromOffset(size.X + 15, 1), UDim2.new(0, (tab.TabButton.AbsolutePosition.X - window.Frame.AbsolutePosition.X), 0, 0) + (window.BlackLine.Position - UDim2.fromOffset(0, 1)), Enum.EasingDirection.In, Enum.EasingStyle.Sine, 0.15)
  658. wait(0.2)
  659. block = false
  660. end
  661.  
  662. if #window.Tabs == 0 then
  663. tab:SelectTab()
  664. end
  665.  
  666. tab.TabButton.MouseButton1Down:Connect(function()
  667. tab:SelectTab()
  668. end)
  669.  
  670. tab.SectorsLeft = {}
  671. tab.SectorsRight = {}
  672.  
  673. function tab:CreateSector(name, side)
  674. local sector = {}
  675. sector.name = name or ""
  676. sector.side = side:lower() or "left"
  677.  
  678. sector.Main = Instance.new("Frame", sector.side == "left" and tab.Left or tab.Right)
  679. sector.Main.Name = sector.name:gsub(" ", "") .. "Sector"
  680. sector.Main.BorderSizePixel = 0
  681. sector.Main.ZIndex = 4
  682. sector.Main.Size = UDim2.fromOffset(window.size.X.Offset / 2 - 17, 20)
  683. sector.Main.BackgroundColor3 = window.theme.sectorcolor
  684. updateevent.Event:Connect(function(theme)
  685. sector.Main.BackgroundColor3 = theme.sectorcolor
  686. end)
  687.  
  688. sector.Line = Instance.new("Frame", sector.Main)
  689. sector.Line.Name = "line"
  690. sector.Line.ZIndex = 4
  691. sector.Line.Size = UDim2.fromOffset(sector.Main.Size.X.Offset + 4, 1)
  692. sector.Line.BorderSizePixel = 0
  693. sector.Line.Position = UDim2.fromOffset(- 2, - 2)
  694. sector.Line.BackgroundColor3 = window.theme.accentcolor
  695. updateevent.Event:Connect(function(theme)
  696. sector.Line.BackgroundColor3 = theme.accentcolor
  697. end)
  698.  
  699. sector.BlackOutline = Instance.new("Frame", sector.Main)
  700. sector.BlackOutline.Name = "outline"
  701. sector.BlackOutline.ZIndex = 3
  702. sector.BlackOutline.Size = sector.Main.Size + UDim2.fromOffset(2, 2)
  703. sector.BlackOutline.BorderSizePixel = 0
  704. sector.BlackOutline.BackgroundColor3 = window.theme.outlinecolor2
  705. sector.BlackOutline.Position = UDim2.fromOffset(- 1, - 1)
  706. sector.Main:GetPropertyChangedSignal("Size"):Connect(function()
  707. sector.BlackOutline.Size = sector.Main.Size + UDim2.fromOffset(2, 2)
  708. end)
  709. updateevent.Event:Connect(function(theme)
  710. sector.BlackOutline.BackgroundColor3 = theme.outlinecolor2
  711. end)
  712.  
  713.  
  714. sector.Outline = Instance.new("Frame", sector.Main)
  715. sector.Outline.Name = "outline"
  716. sector.Outline.ZIndex = 2
  717. sector.Outline.Size = sector.Main.Size + UDim2.fromOffset(4, 4)
  718. sector.Outline.BorderSizePixel = 0
  719. sector.Outline.BackgroundColor3 = window.theme.outlinecolor
  720. sector.Outline.Position = UDim2.fromOffset(- 2, - 2)
  721. sector.Main:GetPropertyChangedSignal("Size"):Connect(function()
  722. sector.Outline.Size = sector.Main.Size + UDim2.fromOffset(4, 4)
  723. end)
  724. updateevent.Event:Connect(function(theme)
  725. sector.Outline.BackgroundColor3 = theme.outlinecolor
  726. end)
  727.  
  728. sector.BlackOutline2 = Instance.new("Frame", sector.Main)
  729. sector.BlackOutline2.Name = "outline"
  730. sector.BlackOutline2.ZIndex = 1
  731. sector.BlackOutline2.Size = sector.Main.Size + UDim2.fromOffset(6, 6)
  732. sector.BlackOutline2.BorderSizePixel = 0
  733. sector.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  734. sector.BlackOutline2.Position = UDim2.fromOffset(- 3, - 3)
  735. sector.Main:GetPropertyChangedSignal("Size"):Connect(function()
  736. sector.BlackOutline2.Size = sector.Main.Size + UDim2.fromOffset(6, 6)
  737. end)
  738. updateevent.Event:Connect(function(theme)
  739. sector.BlackOutline2.BackgroundColor3 = theme.outlinecolor2
  740. end)
  741.  
  742. local size = textservice:GetTextSize(sector.name, 15, window.theme.font, Vector2.new(2000, 2000))
  743. sector.Label = Instance.new("TextLabel", sector.Main)
  744. sector.Label.AnchorPoint = Vector2.new(0, 0.5)
  745. sector.Label.Position = UDim2.fromOffset(12, - 1)
  746. sector.Label.Size = UDim2.fromOffset(math.clamp(textservice:GetTextSize(sector.name, 15, window.theme.font, Vector2.new(200, 300)).X + 13, 0, sector.Main.Size.X.Offset), size.Y)
  747. sector.Label.BackgroundTransparency = 1
  748. sector.Label.BorderSizePixel = 0
  749. sector.Label.ZIndex = 6
  750. sector.Label.Text = sector.name
  751. sector.Label.TextColor3 = Color3.new(1, 1, 2552 / 255)
  752. sector.Label.TextStrokeTransparency = 1
  753. sector.Label.Font = window.theme.font
  754. sector.Label.TextSize = 15
  755. updateevent.Event:Connect(function(theme)
  756. local size = textservice:GetTextSize(sector.name, 15, theme.font, Vector2.new(2000, 2000))
  757. sector.Label.Size = UDim2.fromOffset(math.clamp(textservice:GetTextSize(sector.name, 15, theme.font, Vector2.new(200, 300)).X + 13, 0, sector.Main.Size.X.Offset), size.Y)
  758. sector.Label.Font = theme.font
  759. end)
  760.  
  761. sector.LabelBackFrame = Instance.new("Frame", sector.Main)
  762. sector.LabelBackFrame.Name = "labelframe"
  763. sector.LabelBackFrame.ZIndex = 5
  764. sector.LabelBackFrame.Size = UDim2.fromOffset(sector.Label.Size.X.Offset, 10)
  765. sector.LabelBackFrame.BorderSizePixel = 0
  766. sector.LabelBackFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  767. sector.LabelBackFrame.Position = UDim2.fromOffset(sector.Label.Position.X.Offset, sector.BlackOutline2.Position.Y.Offset)
  768.  
  769. sector.Items = Instance.new("Frame", sector.Main)
  770. sector.Items.Name = "items"
  771. sector.Items.ZIndex = 2
  772. sector.Items.BackgroundTransparency = 1
  773. sector.Items.Size = UDim2.fromOffset(170, 140)
  774. sector.Items.AutomaticSize = Enum.AutomaticSize.Y
  775. sector.Items.BorderSizePixel = 0
  776.  
  777. sector.ListLayout = Instance.new("UIListLayout", sector.Items)
  778. sector.ListLayout.FillDirection = Enum.FillDirection.Vertical
  779. sector.ListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  780. sector.ListLayout.Padding = UDim.new(0, 12)
  781.  
  782. sector.ListPadding = Instance.new("UIPadding", sector.Items)
  783. sector.ListPadding.PaddingTop = UDim.new(0, 15)
  784. sector.ListPadding.PaddingLeft = UDim.new(0, 6)
  785. sector.ListPadding.PaddingRight = UDim.new(0, 6)
  786.  
  787. table.insert(sector.side:lower() == "left" and tab.SectorsLeft or tab.SectorsRight, sector)
  788.  
  789. function sector:FixSize()
  790. sector.Main.Size = UDim2.fromOffset(window.size.X.Offset / 2 - 17, sector.ListLayout.AbsoluteContentSize.Y + 22)
  791. local sizeleft, sizeright = 0, 0
  792. for i, v in pairs(tab.SectorsLeft) do
  793. sizeleft = sizeleft + v.Main.AbsoluteSize.Y
  794. end
  795. for i, v in pairs(tab.SectorsRight) do
  796. sizeright = sizeright + v.Main.AbsoluteSize.Y
  797. end
  798.  
  799. tab.Left.CanvasSize = UDim2.fromOffset(tab.Left.AbsoluteSize.X, sizeleft + ((#tab.SectorsLeft - 1) * tab.LeftListPadding.PaddingTop.Offset) + 20)
  800. tab.Right.CanvasSize = UDim2.fromOffset(tab.Right.AbsoluteSize.X, sizeright + ((#tab.SectorsRight - 1) * tab.RightListPadding.PaddingTop.Offset) + 20)
  801. end
  802.  
  803. function sector:AddButton(text, callback)
  804. local button = {}
  805. button.text = text or ""
  806. button.callback = callback or function() end
  807.  
  808. button.Main = Instance.new("TextButton", sector.Items)
  809. button.Main.BorderSizePixel = 0
  810. button.Main.Text = ""
  811. button.Main.AutoButtonColor = false
  812. button.Main.Name = "button"
  813. button.Main.ZIndex = 5
  814. button.Main.Size = UDim2.fromOffset(sector.Main.Size.X.Offset - 12, 14)
  815. button.Main.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  816.  
  817. button.Gradient = Instance.new("UIGradient", button.Main)
  818. button.Gradient.Rotation = 90
  819. button.Gradient.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, window.theme.buttoncolor), ColorSequenceKeypoint.new(1, window.theme.buttoncolor2)})
  820. updateevent.Event:Connect(function(theme)
  821. button.Gradient.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, theme.buttoncolor), ColorSequenceKeypoint.new(1, theme.buttoncolor2)})
  822. end)
  823.  
  824. button.BlackOutline2 = Instance.new("Frame", button.Main)
  825. button.BlackOutline2.Name = "blackline"
  826. button.BlackOutline2.ZIndex = 4
  827. button.BlackOutline2.Size = button.Main.Size + UDim2.fromOffset(6, 6)
  828. button.BlackOutline2.BorderSizePixel = 0
  829. button.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  830. button.BlackOutline2.Position = UDim2.fromOffset(- 3, - 3)
  831. updateevent.Event:Connect(function(theme)
  832. button.BlackOutline2.BackgroundColor3 = theme.outlinecolor2
  833. end)
  834.  
  835. button.Outline = Instance.new("Frame", button.Main)
  836. button.Outline.Name = "blackline"
  837. button.Outline.ZIndex = 4
  838. button.Outline.Size = button.Main.Size + UDim2.fromOffset(4, 4)
  839. button.Outline.BorderSizePixel = 0
  840. button.Outline.BackgroundColor3 = window.theme.outlinecolor
  841. button.Outline.Position = UDim2.fromOffset(- 2, - 2)
  842. updateevent.Event:Connect(function(theme)
  843. button.Outline.BackgroundColor3 = theme.outlinecolor
  844. end)
  845.  
  846. button.BlackOutline = Instance.new("Frame", button.Main)
  847. button.BlackOutline.Name = "blackline"
  848. button.BlackOutline.ZIndex = 4
  849. button.BlackOutline.Size = button.Main.Size + UDim2.fromOffset(2, 2)
  850. button.BlackOutline.BorderSizePixel = 0
  851. button.BlackOutline.BackgroundColor3 = window.theme.outlinecolor2
  852. button.BlackOutline.Position = UDim2.fromOffset(- 1, - 1)
  853. updateevent.Event:Connect(function(theme)
  854. button.BlackOutline.BackgroundColor3 = theme.outlinecolor2
  855. end)
  856.  
  857. button.Label = Instance.new("TextLabel", button.Main)
  858. button.Label.Name = "Label"
  859. button.Label.BackgroundTransparency = 1
  860. button.Label.Position = UDim2.new(0, - 1, 0, 0)
  861. button.Label.ZIndex = 5
  862. button.Label.Size = button.Main.Size
  863. button.Label.Font = window.theme.font
  864. button.Label.Text = button.text
  865. button.Label.TextColor3 = window.theme.itemscolor2
  866. button.Label.TextSize = 15
  867. button.Label.TextStrokeTransparency = 1
  868. button.Label.TextXAlignment = Enum.TextXAlignment.Center
  869. button.Main.MouseButton1Down:Connect(button.callback)
  870. updateevent.Event:Connect(function(theme)
  871. button.Label.Font = theme.font
  872. button.Label.TextColor3 = theme.itemscolor
  873. end)
  874.  
  875. button.BlackOutline2.MouseEnter:Connect(function()
  876. button.BlackOutline2.BackgroundColor3 = window.theme.accentcolor
  877. end)
  878.  
  879. button.BlackOutline2.MouseLeave:Connect(function()
  880. button.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  881. end)
  882.  
  883. sector:FixSize()
  884.  
  885. return button
  886. end
  887.  
  888. function sector:AddLabel(text)
  889. local label = {}
  890.  
  891. label.Main = Instance.new("TextLabel", sector.Items)
  892. label.Main.Name = "Label"
  893. label.Main.BackgroundTransparency = 1
  894. label.Main.Position = UDim2.new(0, - 1, 0, 0)
  895. label.Main.ZIndex = 4
  896. label.Main.AutomaticSize = Enum.AutomaticSize.XY
  897. label.Main.Font = window.theme.font
  898. label.Main.Text = text
  899. label.Main.TextColor3 = window.theme.itemscolor
  900. label.Main.TextSize = 15
  901. label.Main.TextStrokeTransparency = 1
  902. label.Main.TextXAlignment = Enum.TextXAlignment.Left
  903. updateevent.Event:Connect(function(theme)
  904. label.Main.Font = theme.font
  905. label.Main.TextColor3 = theme.itemscolor
  906. end)
  907.  
  908. function label:Set(value)
  909. label.Main.Text = value
  910. end
  911.  
  912. sector:FixSize()
  913.  
  914. return label
  915. end
  916.  
  917. function sector:AddToggle(text, default, callback, flag)
  918. local toggle = {}
  919. toggle.text = text or ""
  920. toggle.default = default or false
  921. toggle.callback = callback or function(value) end
  922. toggle.flag = flag or text or ""
  923.  
  924. toggle.value = toggle.default
  925.  
  926. toggle.Main = Instance.new("TextButton", sector.Items)
  927. toggle.Main.Name = "toggle"
  928. toggle.Main.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  929. toggle.Main.BorderColor3 = window.theme.outlinecolor
  930. toggle.Main.BorderSizePixel = 0
  931. toggle.Main.Size = UDim2.fromOffset(8, 8)
  932. toggle.Main.AutoButtonColor = false
  933. toggle.Main.ZIndex = 5
  934. toggle.Main.Font = Enum.Font.SourceSans
  935. toggle.Main.Text = ""
  936. toggle.Main.TextColor3 = Color3.fromRGB(0, 0, 0)
  937. toggle.Main.TextSize = 15
  938. updateevent.Event:Connect(function(theme)
  939. toggle.Main.BorderColor3 = theme.outlinecolor
  940. end)
  941.  
  942. toggle.BlackOutline2 = Instance.new("Frame", toggle.Main)
  943. toggle.BlackOutline2.Name = "blackline"
  944. toggle.BlackOutline2.ZIndex = 4
  945. toggle.BlackOutline2.Size = toggle.Main.Size + UDim2.fromOffset(6, 6)
  946. toggle.BlackOutline2.BorderSizePixel = 0
  947. toggle.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  948. toggle.BlackOutline2.Position = UDim2.fromOffset(- 3, - 3)
  949. updateevent.Event:Connect(function(theme)
  950. toggle.BlackOutline2.BackgroundColor3 = theme.outlinecolor2
  951. end)
  952.  
  953. toggle.Outline = Instance.new("Frame", toggle.Main)
  954. toggle.Outline.Name = "blackline"
  955. toggle.Outline.ZIndex = 4
  956. toggle.Outline.Size = toggle.Main.Size + UDim2.fromOffset(4, 4)
  957. toggle.Outline.BorderSizePixel = 0
  958. toggle.Outline.BackgroundColor3 = window.theme.outlinecolor
  959. toggle.Outline.Position = UDim2.fromOffset(- 2, - 2)
  960. updateevent.Event:Connect(function(theme)
  961. toggle.Outline.BackgroundColor3 = theme.outlinecolor
  962. end)
  963.  
  964. toggle.BlackOutline = Instance.new("Frame", toggle.Main)
  965. toggle.BlackOutline.Name = "blackline"
  966. toggle.BlackOutline.ZIndex = 4
  967. toggle.BlackOutline.Size = toggle.Main.Size + UDim2.fromOffset(2, 2)
  968. toggle.BlackOutline.BorderSizePixel = 0
  969. toggle.BlackOutline.BackgroundColor3 = window.theme.outlinecolor2
  970. toggle.BlackOutline.Position = UDim2.fromOffset(- 1, - 1)
  971. updateevent.Event:Connect(function(theme)
  972. toggle.BlackOutline.BackgroundColor3 = theme.outlinecolor2
  973. end)
  974.  
  975. toggle.Gradient = Instance.new("UIGradient", toggle.Main)
  976. toggle.Gradient.Rotation = (22.5 * 13)
  977. toggle.Gradient.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(30, 30, 30)), ColorSequenceKeypoint.new(1, Color3.fromRGB(45, 45, 45))})
  978.  
  979. toggle.Label = Instance.new("TextButton", toggle.Main)
  980. toggle.Label.Name = "Label"
  981. toggle.Label.AutoButtonColor = false
  982. toggle.Label.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  983. toggle.Label.BackgroundTransparency = 1
  984. toggle.Label.Position = UDim2.fromOffset(toggle.Main.AbsoluteSize.X + 10, - 2)
  985. toggle.Label.Size = UDim2.fromOffset(sector.Main.Size.X.Offset - 71, toggle.BlackOutline.Size.Y.Offset)
  986. toggle.Label.Font = window.theme.font
  987. toggle.Label.ZIndex = 5
  988. toggle.Label.Text = toggle.text
  989. toggle.Label.TextColor3 = window.theme.itemscolor
  990. toggle.Label.TextSize = 15
  991. toggle.Label.TextStrokeTransparency = 1
  992. toggle.Label.TextXAlignment = Enum.TextXAlignment.Left
  993. updateevent.Event:Connect(function(theme)
  994. toggle.Label.Font = theme.font
  995. toggle.Label.TextColor3 = toggle.value and window.theme.itemscolor2 or theme.itemscolor
  996. end)
  997.  
  998. toggle.CheckedFrame = Instance.new("Frame", toggle.Main)
  999. toggle.CheckedFrame.ZIndex = 5
  1000. toggle.CheckedFrame.BorderSizePixel = 0
  1001. toggle.CheckedFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1002. toggle.CheckedFrame.Size = toggle.Main.Size
  1003.  
  1004. toggle.Gradient2 = Instance.new("UIGradient", toggle.CheckedFrame)
  1005. toggle.Gradient2.Rotation = (22.5 * 13)
  1006. toggle.Gradient2.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, window.theme.accentcolor2), ColorSequenceKeypoint.new(1, window.theme.accentcolor)})
  1007. updateevent.Event:Connect(function(theme)
  1008. toggle.Gradient2.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, theme.accentcolor2), ColorSequenceKeypoint.new(1, theme.accentcolor)})
  1009. end)
  1010.  
  1011. toggle.Items = Instance.new("Frame", toggle.Main)
  1012. toggle.Items.Name = "\n"
  1013. toggle.Items.ZIndex = 4
  1014. toggle.Items.Size = UDim2.fromOffset(60, toggle.BlackOutline.AbsoluteSize.Y)
  1015. toggle.Items.BorderSizePixel = 0
  1016. toggle.Items.BackgroundTransparency = 1
  1017. toggle.Items.BackgroundColor3 = Color3.new(0, 0, 0)
  1018. toggle.Items.Position = UDim2.fromOffset(sector.Main.Size.X.Offset - 71, 0)
  1019.  
  1020. toggle.ListLayout = Instance.new("UIListLayout", toggle.Items)
  1021. toggle.ListLayout.FillDirection = Enum.FillDirection.Horizontal
  1022. toggle.ListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Right
  1023. toggle.ListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  1024. toggle.ListLayout.Padding = UDim.new(0.04, 6)
  1025.  
  1026. if toggle.flag and toggle.flag ~= "" then
  1027. library.flags[toggle.flag] = toggle.default or false
  1028. end
  1029.  
  1030. function toggle:Set(value)
  1031. if value then
  1032. toggle.Label.TextColor3 = window.theme.itemscolor2
  1033. else
  1034. toggle.Label.TextColor3 = window.theme.itemscolor
  1035. end
  1036.  
  1037. toggle.value = value
  1038. toggle.CheckedFrame.Visible = value
  1039. if toggle.flag and toggle.flag ~= "" then
  1040. library.flags[toggle.flag] = toggle.value
  1041. end
  1042. pcall(toggle.callback, value)
  1043. end
  1044.  
  1045. function toggle:Get()
  1046. return toggle.value
  1047. end
  1048.  
  1049. toggle:Set(toggle.default)
  1050.  
  1051. function toggle:AddKeybind(default, flag)
  1052. local keybind = {}
  1053.  
  1054. keybind.default = default or "None"
  1055. keybind.value = keybind.default
  1056. keybind.flag = flag or ((toggle.text or "") .. #toggle.Items:GetChildren())
  1057.  
  1058. local shorter_keycodes = {
  1059. ["LeftShift"] = "LSHIFT",
  1060. ["RightShift"] = "RSHIFT",
  1061. ["LeftControl"] = "LCTRL",
  1062. ["RightControl"] = "RCTRL",
  1063. ["LeftAlt"] = "LALT",
  1064. ["RightAlt"] = "RALT"
  1065. }
  1066.  
  1067. local text = keybind.default == "None" and "[None]" or "[" .. (shorter_keycodes[keybind.default.Name] or keybind.default.Name) .. "]"
  1068. local size = textservice:GetTextSize(text, 15, window.theme.font, Vector2.new(2000, 2000))
  1069.  
  1070. keybind.Main = Instance.new("TextButton", toggle.Items)
  1071. keybind.Main.Name = "keybind"
  1072. keybind.Main.BackgroundTransparency = 1
  1073. keybind.Main.BorderSizePixel = 0
  1074. keybind.Main.ZIndex = 5
  1075. keybind.Main.Size = UDim2.fromOffset(size.X + 2, size.Y - 7)
  1076. keybind.Main.Text = text
  1077. keybind.Main.Font = window.theme.font
  1078. keybind.Main.TextColor3 = Color3.fromRGB(136, 136, 136)
  1079. keybind.Main.TextSize = 15
  1080. keybind.Main.TextXAlignment = Enum.TextXAlignment.Right
  1081. keybind.Main.MouseButton1Down:Connect(function()
  1082. keybind.Main.Text = "[...]"
  1083. keybind.Main.TextColor3 = window.theme.accentcolor
  1084. end)
  1085. updateevent.Event:Connect(function(theme)
  1086. keybind.Main.Font = theme.font
  1087. if keybind.Main.Text == "[...]" then
  1088. keybind.Main.TextColor3 = theme.accentcolor
  1089. else
  1090. keybind.Main.TextColor3 = Color3.fromRGB(136, 136, 136)
  1091. end
  1092. end)
  1093.  
  1094. if keybind.flag and keybind.flag ~= "" then
  1095. library.flags[keybind.flag] = keybind.default
  1096. end
  1097. function keybind:Set(key)
  1098. if key == "None" then
  1099. keybind.Main.Text = "[" .. key .. "]"
  1100. keybind.value = key
  1101. if keybind.flag and keybind.flag ~= "" then
  1102. library.flags[keybind.flag] = key
  1103. end
  1104. end
  1105. keybind.Main.Text = "[" .. (shorter_keycodes[key.Name] or key.Name) .. "]"
  1106. keybind.value = key
  1107. if keybind.flag and keybind.flag ~= "" then
  1108. library.flags[keybind.flag] = keybind.value
  1109. end
  1110. end
  1111.  
  1112. function keybind:Get()
  1113. return keybind.value
  1114. end
  1115.  
  1116. uis.InputBegan:Connect(function(input, gameProcessed)
  1117. if not gameProcessed then
  1118. if keybind.Main.Text == "[...]" then
  1119. keybind.Main.TextColor3 = Color3.fromRGB(136, 136, 136)
  1120. if input.UserInputType == Enum.UserInputType.Keyboard then
  1121. keybind:Set(input.KeyCode)
  1122. else
  1123. keybind:Set("None")
  1124. end
  1125. else
  1126. if keybind.value ~= "None" and input.KeyCode == keybind.value then
  1127. toggle:Set(not toggle.CheckedFrame.Visible)
  1128. end
  1129. end
  1130. end
  1131. end)
  1132.  
  1133. table.insert(library.items, keybind)
  1134.  
  1135. return keybind
  1136. end
  1137.  
  1138. function toggle:AddDropdown(items, default, multichoice, callback, flag)
  1139. local dropdown = {}
  1140.  
  1141. dropdown.defaultitems = items or {}
  1142. dropdown.default = default
  1143. dropdown.callback = callback or function() end
  1144. dropdown.multichoice = multichoice or false
  1145. dropdown.values = {}
  1146. dropdown.flag = flag or ((toggle.text or "") .. #sector.Items:GetChildren() .. "a")
  1147.  
  1148. dropdown.Main = Instance.new("TextButton", sector.Items)
  1149. dropdown.Main.Name = "dropdown"
  1150. dropdown.Main.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1151. dropdown.Main.BorderSizePixel = 0
  1152. dropdown.Main.Size = UDim2.fromOffset(sector.Main.Size.X.Offset - 12, 16)
  1153. dropdown.Main.Position = UDim2.fromOffset(0, 0)
  1154. dropdown.Main.ZIndex = 5
  1155. dropdown.Main.AutoButtonColor = false
  1156. dropdown.Main.Font = window.theme.font
  1157. dropdown.Main.Text = ""
  1158. dropdown.Main.TextColor3 = Color3.fromRGB(255, 255, 255)
  1159. dropdown.Main.TextSize = 15
  1160. dropdown.Main.TextXAlignment = Enum.TextXAlignment.Left
  1161. updateevent.Event:Connect(function(theme)
  1162. dropdown.Main.Font = theme.font
  1163. end)
  1164.  
  1165. dropdown.Gradient = Instance.new("UIGradient", dropdown.Main)
  1166. dropdown.Gradient.Rotation = 90
  1167. dropdown.Gradient.Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(49, 49, 49)), ColorSequenceKeypoint.new(1, Color3.fromRGB(39, 39, 39))}
  1168.  
  1169. dropdown.SelectedLabel = Instance.new("TextLabel", dropdown.Main)
  1170. dropdown.SelectedLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1171. dropdown.SelectedLabel.BackgroundTransparency = 1
  1172. dropdown.SelectedLabel.Position = UDim2.fromOffset(5, 2)
  1173. dropdown.SelectedLabel.Size = UDim2.fromOffset(130, 13)
  1174. dropdown.SelectedLabel.Font = window.theme.font
  1175. dropdown.SelectedLabel.Text = toggle.text
  1176. dropdown.SelectedLabel.ZIndex = 5
  1177. dropdown.SelectedLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  1178. dropdown.SelectedLabel.TextSize = 15
  1179. dropdown.SelectedLabel.TextStrokeTransparency = 1
  1180. dropdown.SelectedLabel.TextXAlignment = Enum.TextXAlignment.Left
  1181. updateevent.Event:Connect(function(theme)
  1182. dropdown.SelectedLabel.Font = theme.font
  1183. end)
  1184.  
  1185. dropdown.Nav = Instance.new("ImageButton", dropdown.Main)
  1186. dropdown.Nav.Name = "navigation"
  1187. dropdown.Nav.BackgroundTransparency = 1
  1188. dropdown.Nav.LayoutOrder = 10
  1189. dropdown.Nav.Position = UDim2.fromOffset(sector.Main.Size.X.Offset - 26, 5)
  1190. dropdown.Nav.Rotation = 90
  1191. dropdown.Nav.ZIndex = 5
  1192. dropdown.Nav.Size = UDim2.fromOffset(8, 8)
  1193. dropdown.Nav.Image = "rbxassetid://4918373417"
  1194. dropdown.Nav.ImageColor3 = Color3.fromRGB(210, 210, 210)
  1195.  
  1196. dropdown.BlackOutline2 = Instance.new("Frame", dropdown.Main)
  1197. dropdown.BlackOutline2.Name = "blackline"
  1198. dropdown.BlackOutline2.ZIndex = 4
  1199. dropdown.BlackOutline2.Size = dropdown.Main.Size + UDim2.fromOffset(6, 6)
  1200. dropdown.BlackOutline2.BorderSizePixel = 0
  1201. dropdown.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  1202. dropdown.BlackOutline2.Position = UDim2.fromOffset(- 3, - 3)
  1203. updateevent.Event:Connect(function(theme)
  1204. dropdown.BlackOutline2.BackgroundColor3 = theme.outlinecolor2
  1205. end)
  1206.  
  1207. dropdown.Outline = Instance.new("Frame", dropdown.Main)
  1208. dropdown.Outline.Name = "blackline"
  1209. dropdown.Outline.ZIndex = 4
  1210. dropdown.Outline.Size = dropdown.Main.Size + UDim2.fromOffset(4, 4)
  1211. dropdown.Outline.BorderSizePixel = 0
  1212. dropdown.Outline.BackgroundColor3 = window.theme.outlinecolor
  1213. dropdown.Outline.Position = UDim2.fromOffset(- 2, - 2)
  1214. updateevent.Event:Connect(function(theme)
  1215. dropdown.Outline.BackgroundColor3 = theme.outlinecolor
  1216. end)
  1217.  
  1218. dropdown.BlackOutline = Instance.new("Frame", dropdown.Main)
  1219. dropdown.BlackOutline.Name = "blackline444"
  1220. dropdown.BlackOutline.ZIndex = 4
  1221. dropdown.BlackOutline.Size = dropdown.Main.Size + UDim2.fromOffset(2, 2)
  1222. dropdown.BlackOutline.BorderSizePixel = 0
  1223. dropdown.BlackOutline.BackgroundColor3 = window.theme.outlinecolor2
  1224. dropdown.BlackOutline.Position = UDim2.fromOffset(- 1, - 1)
  1225. updateevent.Event:Connect(function(theme)
  1226. dropdown.BlackOutline.BackgroundColor3 = theme.outlinecolor2
  1227. end)
  1228.  
  1229. dropdown.ItemsFrame = Instance.new("ScrollingFrame", dropdown.Main)
  1230. dropdown.ItemsFrame.Name = "itemsframe"
  1231. dropdown.ItemsFrame.BorderSizePixel = 0
  1232. dropdown.ItemsFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  1233. dropdown.ItemsFrame.Position = UDim2.fromOffset(0, dropdown.Main.Size.Y.Offset + 8)
  1234. dropdown.ItemsFrame.ScrollBarThickness = 2
  1235. dropdown.ItemsFrame.ZIndex = 8
  1236. dropdown.ItemsFrame.ScrollingDirection = "Y"
  1237. dropdown.ItemsFrame.Visible = false
  1238. dropdown.ItemsFrame.Size = UDim2.new(0, 0, 0, 0)
  1239. dropdown.ItemsFrame.CanvasSize = UDim2.fromOffset(dropdown.Main.AbsoluteSize.X, 0)
  1240.  
  1241. dropdown.ListLayout = Instance.new("UIListLayout", dropdown.ItemsFrame)
  1242. dropdown.ListLayout.FillDirection = Enum.FillDirection.Vertical
  1243. dropdown.ListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  1244.  
  1245. dropdown.ListPadding = Instance.new("UIPadding", dropdown.ItemsFrame)
  1246. dropdown.ListPadding.PaddingTop = UDim.new(0, 2)
  1247. dropdown.ListPadding.PaddingBottom = UDim.new(0, 2)
  1248. dropdown.ListPadding.PaddingLeft = UDim.new(0, 2)
  1249. dropdown.ListPadding.PaddingRight = UDim.new(0, 2)
  1250.  
  1251. dropdown.BlackOutline2Items = Instance.new("Frame", dropdown.Main)
  1252. dropdown.BlackOutline2Items.Name = "blackline3"
  1253. dropdown.BlackOutline2Items.ZIndex = 7
  1254. dropdown.BlackOutline2Items.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(6, 6)
  1255. dropdown.BlackOutline2Items.BorderSizePixel = 0
  1256. dropdown.BlackOutline2Items.BackgroundColor3 = window.theme.outlinecolor2
  1257. dropdown.BlackOutline2Items.Position = dropdown.ItemsFrame.Position + UDim2.fromOffset(- 3, - 3)
  1258. dropdown.BlackOutline2Items.Visible = false
  1259. updateevent.Event:Connect(function(theme)
  1260. dropdown.BlackOutline2Items.BackgroundColor3 = theme.outlinecolor2
  1261. end)
  1262.  
  1263. dropdown.OutlineItems = Instance.new("Frame", dropdown.Main)
  1264. dropdown.OutlineItems.Name = "blackline8"
  1265. dropdown.OutlineItems.ZIndex = 7
  1266. dropdown.OutlineItems.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(4, 4)
  1267. dropdown.OutlineItems.BorderSizePixel = 0
  1268. dropdown.OutlineItems.BackgroundColor3 = window.theme.outlinecolor
  1269. dropdown.OutlineItems.Position = dropdown.ItemsFrame.Position + UDim2.fromOffset(- 2, - 2)
  1270. dropdown.OutlineItems.Visible = false
  1271. updateevent.Event:Connect(function(theme)
  1272. dropdown.OutlineItems.BackgroundColor3 = theme.outlinecolor
  1273. end)
  1274.  
  1275. dropdown.BlackOutlineItems = Instance.new("Frame", dropdown.Main)
  1276. dropdown.BlackOutlineItems.Name = "blackline3"
  1277. dropdown.BlackOutlineItems.ZIndex = 7
  1278. dropdown.BlackOutlineItems.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(- 2, - 2)
  1279. dropdown.BlackOutlineItems.BorderSizePixel = 0
  1280. dropdown.BlackOutlineItems.BackgroundColor3 = window.theme.outlinecolor2
  1281. dropdown.BlackOutlineItems.Position = dropdown.ItemsFrame.Position + UDim2.fromOffset(- 1, - 1)
  1282. dropdown.BlackOutlineItems.Visible = false
  1283. updateevent.Event:Connect(function(theme)
  1284. dropdown.BlackOutlineItems.BackgroundColor3 = theme.outlinecolor2
  1285. end)
  1286.  
  1287. dropdown.IgnoreBackButtons = Instance.new("TextButton", dropdown.Main)
  1288. dropdown.IgnoreBackButtons.BackgroundTransparency = 1
  1289. dropdown.IgnoreBackButtons.BorderSizePixel = 0
  1290. dropdown.IgnoreBackButtons.Position = UDim2.fromOffset(0, dropdown.Main.Size.Y.Offset + 8)
  1291. dropdown.IgnoreBackButtons.Size = UDim2.new(0, 0, 0, 0)
  1292. dropdown.IgnoreBackButtons.ZIndex = 7
  1293. dropdown.IgnoreBackButtons.Text = ""
  1294. dropdown.IgnoreBackButtons.Visible = false
  1295. dropdown.IgnoreBackButtons.AutoButtonColor = false
  1296.  
  1297. if dropdown.flag and dropdown.flag ~= "" then
  1298. library.flags[dropdown.flag] = dropdown.multichoice and {dropdown.default or dropdown.defaultitems[1] or ""} or (dropdown.default or dropdown.defaultitems[1] or "")
  1299. end
  1300.  
  1301. function dropdown:isSelected(item)
  1302. for i, v in pairs(dropdown.values) do
  1303. if v == item then
  1304. return true
  1305. end
  1306. end
  1307.  
  1308. return false
  1309. end
  1310.  
  1311. function dropdown:updateText(text)
  1312. if #text >= 27 then
  1313. text = text:sub(1, 25) .. ".."
  1314. end
  1315. dropdown.SelectedLabel.Text = text
  1316. end
  1317.  
  1318. dropdown.Changed = Instance.new("BindableEvent")
  1319. function dropdown:Set(value)
  1320. if type(value) == "table" then
  1321. dropdown.values = value
  1322. dropdown:updateText(table.concat(value, ", "))
  1323. pcall(dropdown.callback, value)
  1324. else
  1325. dropdown:updateText(value)
  1326. dropdown.values = {value}
  1327. pcall(dropdown.callback, value)
  1328. end
  1329.  
  1330. dropdown.Changed:Fire(value)
  1331. if dropdown.flag and dropdown.flag ~= "" then
  1332. library.flags[dropdown.flag] = dropdown.multichoice and dropdown.values or dropdown.values[1]
  1333. end
  1334. end
  1335.  
  1336. function dropdown:Get()
  1337. return dropdown.multichoice and dropdown.values or dropdown.values[1]
  1338. end
  1339.  
  1340. dropdown.items = {}
  1341. function dropdown:Add(v)
  1342. local Item = Instance.new("TextButton", dropdown.ItemsFrame)
  1343. Item.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  1344. Item.TextColor3 = Color3.fromRGB(255, 255, 255)
  1345. Item.BorderSizePixel = 0
  1346. Item.Position = UDim2.fromOffset(0, 0)
  1347. Item.Size = UDim2.fromOffset(dropdown.Main.Size.X.Offset - 4, 20)
  1348. Item.ZIndex = 9
  1349. Item.Text = v
  1350. Item.Name = v
  1351. Item.AutoButtonColor = false
  1352. Item.Font = window.theme.font
  1353. Item.TextSize = 15
  1354. Item.TextXAlignment = Enum.TextXAlignment.Left
  1355. Item.TextStrokeTransparency = 1
  1356. dropdown.ItemsFrame.CanvasSize = dropdown.ItemsFrame.CanvasSize + UDim2.fromOffset(0, Item.AbsoluteSize.Y)
  1357.  
  1358. Item.MouseButton1Down:Connect(function()
  1359. if dropdown.multichoice then
  1360. if dropdown:isSelected(v) then
  1361. for i2, v2 in pairs(dropdown.values) do
  1362. if v2 == v then
  1363. table.remove(dropdown.values, i2)
  1364. end
  1365. end
  1366. dropdown:Set(dropdown.values)
  1367. else
  1368. table.insert(dropdown.values, v)
  1369. dropdown:Set(dropdown.values)
  1370. end
  1371.  
  1372. return
  1373. else
  1374. dropdown.Nav.Rotation = 90
  1375. dropdown.ItemsFrame.Visible = false
  1376. dropdown.ItemsFrame.Active = false
  1377. dropdown.OutlineItems.Visible = false
  1378. dropdown.BlackOutlineItems.Visible = false
  1379. dropdown.BlackOutline2Items.Visible = false
  1380. dropdown.IgnoreBackButtons.Visible = false
  1381. dropdown.IgnoreBackButtons.Active = false
  1382. end
  1383.  
  1384. dropdown:Set(v)
  1385.  
  1386. return
  1387. end)
  1388.  
  1389. runservice.RenderStepped:Connect(function()
  1390. if dropdown.multichoice and dropdown:isSelected(v) or dropdown.values[1] == v then
  1391. Item.BackgroundColor3 = Color3.fromRGB(64, 64, 64)
  1392. Item.TextColor3 = window.theme.accentcolor
  1393. Item.Text = " " .. v
  1394. else
  1395. Item.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  1396. Item.TextColor3 = Color3.fromRGB(255, 255, 255)
  1397. Item.Text = v
  1398. end
  1399. end)
  1400.  
  1401. table.insert(dropdown.items, v)
  1402. dropdown.ItemsFrame.Size = UDim2.fromOffset(dropdown.Main.Size.X.Offset, math.clamp(#dropdown.items * Item.AbsoluteSize.Y, 20, 156) + 4)
  1403. dropdown.ItemsFrame.CanvasSize = UDim2.fromOffset(dropdown.ItemsFrame.AbsoluteSize.X, (#dropdown.items * Item.AbsoluteSize.Y) + 4)
  1404.  
  1405. dropdown.OutlineItems.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(4, 4)
  1406. dropdown.BlackOutlineItems.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(2, 2)
  1407. dropdown.BlackOutline2Items.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(6, 6)
  1408. dropdown.IgnoreBackButtons.Size = dropdown.ItemsFrame.Size
  1409. end
  1410.  
  1411. function dropdown:Remove(value)
  1412. local item = dropdown.ItemsFrame:FindFirstChild(value)
  1413. if item then
  1414. for i, v in pairs(dropdown.items) do
  1415. if v == value then
  1416. table.remove(dropdown.items, i)
  1417. end
  1418. end
  1419.  
  1420. dropdown.ItemsFrame.Size = UDim2.fromOffset(dropdown.Main.Size.X.Offset, math.clamp(#dropdown.items * item.AbsoluteSize.Y, 20, 156) + 4)
  1421. dropdown.ItemsFrame.CanvasSize = UDim2.fromOffset(dropdown.ItemsFrame.AbsoluteSize.X, (#dropdown.items * item.AbsoluteSize.Y) + 4)
  1422.  
  1423. dropdown.OutlineItems.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(2, 2)
  1424. dropdown.BlackOutlineItems.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(4, 4)
  1425. dropdown.BlackOutline2Items.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(6, 6)
  1426. dropdown.IgnoreBackButtons.Size = dropdown.ItemsFrame.Size
  1427.  
  1428. item:Remove()
  1429. end
  1430. end
  1431.  
  1432. for i, v in pairs(dropdown.defaultitems) do
  1433. dropdown:Add(v)
  1434. end
  1435.  
  1436. if dropdown.default then
  1437. dropdown:Set(dropdown.default)
  1438. end
  1439.  
  1440. local MouseButton1Down = function()
  1441. if dropdown.Nav.Rotation == 90 then
  1442. tweenservice:Create(dropdown.Nav, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {Rotation = - 90}):Play()
  1443. if dropdown.items and #dropdown.items ~= 0 then
  1444. dropdown.ItemsFrame.ScrollingEnabled = true
  1445. sector.Main.Parent.ScrollingEnabled = false
  1446. dropdown.ItemsFrame.Visible = true
  1447. dropdown.ItemsFrame.Active = true
  1448. dropdown.IgnoreBackButtons.Visible = true
  1449. dropdown.IgnoreBackButtons.Active = true
  1450. dropdown.OutlineItems.Visible = true
  1451. dropdown.BlackOutlineItems.Visible = true
  1452. dropdown.BlackOutline2Items.Visible = true
  1453. end
  1454. else
  1455. tweenservice:Create(dropdown.Nav, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {Rotation = 90}):Play()
  1456. dropdown.ItemsFrame.ScrollingEnabled = false
  1457. sector.Main.Parent.ScrollingEnabled = true
  1458. dropdown.ItemsFrame.Visible = false
  1459. dropdown.ItemsFrame.Active = false
  1460. dropdown.IgnoreBackButtons.Visible = false
  1461. dropdown.IgnoreBackButtons.Active = false
  1462. dropdown.OutlineItems.Visible = false
  1463. dropdown.BlackOutlineItems.Visible = false
  1464. dropdown.BlackOutline2Items.Visible = false
  1465. end
  1466. end
  1467.  
  1468. dropdown.Main.MouseButton1Down:Connect(MouseButton1Down)
  1469. dropdown.Nav.MouseButton1Down:Connect(MouseButton1Down)
  1470.  
  1471. dropdown.BlackOutline2.MouseEnter:Connect(function()
  1472. dropdown.BlackOutline2.BackgroundColor3 = window.theme.accentcolor
  1473. end)
  1474. dropdown.BlackOutline2.MouseLeave:Connect(function()
  1475. dropdown.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  1476. end)
  1477.  
  1478. sector:FixSize()
  1479. table.insert(library.items, dropdown)
  1480.  
  1481. return dropdown
  1482. end
  1483.  
  1484. function toggle:AddTextbox(default, callback, flag)
  1485. local textbox = {}
  1486. textbox.callback = callback or function() end
  1487. textbox.default = default
  1488. textbox.value = ""
  1489. textbox.flag = flag or ((toggle.text or "") .. #sector.Items:GetChildren() .. "a")
  1490.  
  1491. textbox.Holder = Instance.new("Frame", sector.Items)
  1492. textbox.Holder.Name = "holder"
  1493. textbox.Holder.ZIndex = 5
  1494. textbox.Holder.Size = UDim2.fromOffset(sector.Main.Size.X.Offset - 12, 14)
  1495. textbox.Holder.BorderSizePixel = 0
  1496. textbox.Holder.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1497.  
  1498. textbox.Gradient = Instance.new("UIGradient", textbox.Holder)
  1499. textbox.Gradient.Rotation = 90
  1500. textbox.Gradient.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(49, 49, 49)), ColorSequenceKeypoint.new(1, Color3.fromRGB(39, 39, 39))})
  1501.  
  1502. textbox.Main = Instance.new("TextBox", textbox.Holder)
  1503. textbox.Main.PlaceholderText = ""
  1504. textbox.Main.Text = ""
  1505. textbox.Main.BackgroundTransparency = 1
  1506. textbox.Main.Font = window.theme.font
  1507. textbox.Main.Name = "textbox"
  1508. textbox.Main.MultiLine = false
  1509. textbox.Main.ClearTextOnFocus = false
  1510. textbox.Main.ZIndex = 5
  1511. textbox.Main.TextScaled = true
  1512. textbox.Main.Size = textbox.Holder.Size
  1513. textbox.Main.TextSize = 15
  1514. textbox.Main.TextColor3 = Color3.fromRGB(255, 255, 255)
  1515. textbox.Main.BorderSizePixel = 0
  1516. textbox.Main.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  1517. textbox.Main.TextXAlignment = Enum.TextXAlignment.Left
  1518.  
  1519. if textbox.flag and textbox.flag ~= "" then
  1520. library.flags[textbox.flag] = textbox.default or ""
  1521. end
  1522.  
  1523. function textbox:Set(text)
  1524. textbox.value = text
  1525. textbox.Main.Text = text
  1526. if textbox.flag and textbox.flag ~= "" then
  1527. library.flags[textbox.flag] = text
  1528. end
  1529. pcall(textbox.callback, text)
  1530. end
  1531. updateevent.Event:Connect(function(theme)
  1532. textbox.Main.Font = theme.font
  1533. end)
  1534.  
  1535. function textbox:Get()
  1536. return textbox.value
  1537. end
  1538.  
  1539. if textbox.default then
  1540. textbox:Set(textbox.default)
  1541. end
  1542.  
  1543. textbox.Main.FocusLost:Connect(function()
  1544. textbox:Set(textbox.Main.Text)
  1545. end)
  1546.  
  1547. textbox.BlackOutline2 = Instance.new("Frame", textbox.Main)
  1548. textbox.BlackOutline2.Name = "blackline"
  1549. textbox.BlackOutline2.ZIndex = 4
  1550. textbox.BlackOutline2.Size = textbox.Main.Size + UDim2.fromOffset(6, 6)
  1551. textbox.BlackOutline2.BorderSizePixel = 0
  1552. textbox.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  1553. textbox.BlackOutline2.Position = UDim2.fromOffset(- 3, - 3)
  1554. updateevent.Event:Connect(function(theme)
  1555. textbox.BlackOutline2.BackgroundColor3 = theme.outlinecolor2
  1556. end)
  1557.  
  1558. textbox.Outline = Instance.new("Frame", textbox.Main)
  1559. textbox.Outline.Name = "blackline"
  1560. textbox.Outline.ZIndex = 4
  1561. textbox.Outline.Size = textbox.Main.Size + UDim2.fromOffset(4, 4)
  1562. textbox.Outline.BorderSizePixel = 0
  1563. textbox.Outline.BackgroundColor3 = window.theme.outlinecolor
  1564. textbox.Outline.Position = UDim2.fromOffset(- 2, - 2)
  1565. updateevent.Event:Connect(function(theme)
  1566. textbox.Outline.BackgroundColor3 = theme.outlinecolor
  1567. end)
  1568.  
  1569. textbox.BlackOutline = Instance.new("Frame", textbox.Main)
  1570. textbox.BlackOutline.Name = "blackline"
  1571. textbox.BlackOutline.ZIndex = 4
  1572. textbox.BlackOutline.Size = textbox.Main.Size + UDim2.fromOffset(2, 2)
  1573. textbox.BlackOutline.BorderSizePixel = 0
  1574. textbox.BlackOutline.BackgroundColor3 = window.theme.outlinecolor2
  1575. textbox.BlackOutline.Position = UDim2.fromOffset(- 1, - 1)
  1576. updateevent.Event:Connect(function(theme)
  1577. textbox.BlackOutline.BackgroundColor3 = theme.outlinecolor2
  1578. end)
  1579.  
  1580. textbox.BlackOutline2.MouseEnter:Connect(function()
  1581. textbox.BlackOutline2.BackgroundColor3 = window.theme.accentcolor
  1582. end)
  1583. textbox.BlackOutline2.MouseLeave:Connect(function()
  1584. textbox.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  1585. end)
  1586.  
  1587. sector:FixSize()
  1588. table.insert(library.items, textbox)
  1589.  
  1590. return textbox
  1591. end
  1592.  
  1593. function toggle:AddColorpicker(default, callback, flag)
  1594. local colorpicker = {}
  1595.  
  1596. colorpicker.callback = callback or function() end
  1597. colorpicker.default = default or Color3.fromRGB(255, 255, 255)
  1598. colorpicker.value = colorpicker.default
  1599. colorpicker.flag = flag or ((toggle.text or "") .. #toggle.Items:GetChildren())
  1600.  
  1601. colorpicker.Main = Instance.new("Frame", toggle.Items)
  1602. colorpicker.Main.ZIndex = 6
  1603. colorpicker.Main.BorderSizePixel = 0
  1604. colorpicker.Main.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1605. colorpicker.Main.Size = UDim2.fromOffset(16, 10)
  1606.  
  1607. colorpicker.Gradient = Instance.new("UIGradient", colorpicker.Main)
  1608. colorpicker.Gradient.Rotation = 90
  1609.  
  1610. local clr = Color3.new(math.clamp(colorpicker.value.R / 1.7, 0, 1), math.clamp(colorpicker.value.G / 1.7, 0, 1), math.clamp(colorpicker.value.B / 1.7, 0, 1))
  1611. colorpicker.Gradient.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, colorpicker.value), ColorSequenceKeypoint.new(1, clr)})
  1612.  
  1613. colorpicker.BlackOutline2 = Instance.new("Frame", colorpicker.Main)
  1614. colorpicker.BlackOutline2.Name = "blackline"
  1615. colorpicker.BlackOutline2.ZIndex = 4
  1616. colorpicker.BlackOutline2.Size = colorpicker.Main.Size + UDim2.fromOffset(6, 6)
  1617. colorpicker.BlackOutline2.BorderSizePixel = 0
  1618. colorpicker.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  1619. colorpicker.BlackOutline2.Position = UDim2.fromOffset(- 3, - 3)
  1620. updateevent.Event:Connect(function(theme)
  1621. if window.OpenedColorPickers[colorpicker.MainPicker] then
  1622. colorpicker.BlackOutline2.BackgroundColor3 = theme.accentcolor
  1623. else
  1624. colorpicker.BlackOutline2.BackgroundColor3 = theme.outlinecolor2
  1625. end
  1626. end)
  1627.  
  1628. colorpicker.Outline = Instance.new("Frame", colorpicker.Main)
  1629. colorpicker.Outline.Name = "blackline"
  1630. colorpicker.Outline.ZIndex = 4
  1631. colorpicker.Outline.Size = colorpicker.Main.Size + UDim2.fromOffset(4, 4)
  1632. colorpicker.Outline.BorderSizePixel = 0
  1633. colorpicker.Outline.BackgroundColor3 = window.theme.outlinecolor
  1634. colorpicker.Outline.Position = UDim2.fromOffset(- 2, - 2)
  1635. updateevent.Event:Connect(function(theme)
  1636. colorpicker.Outline.BackgroundColor3 = theme.outlinecolor
  1637. end)
  1638.  
  1639. colorpicker.BlackOutline = Instance.new("Frame", colorpicker.Main)
  1640. colorpicker.BlackOutline.Name = "blackline"
  1641. colorpicker.BlackOutline.ZIndex = 4
  1642. colorpicker.BlackOutline.Size = colorpicker.Main.Size + UDim2.fromOffset(2, 2)
  1643. colorpicker.BlackOutline.BorderSizePixel = 0
  1644. colorpicker.BlackOutline.BackgroundColor3 = window.theme.outlinecolor2
  1645. colorpicker.BlackOutline.Position = UDim2.fromOffset(- 1, - 1)
  1646. updateevent.Event:Connect(function(theme)
  1647. colorpicker.BlackOutline.BackgroundColor3 = theme.outlinecolor2
  1648. end)
  1649.  
  1650. colorpicker.BlackOutline2.MouseEnter:Connect(function()
  1651. colorpicker.BlackOutline2.BackgroundColor3 = window.theme.accentcolor
  1652. end)
  1653.  
  1654. colorpicker.BlackOutline2.MouseLeave:Connect(function()
  1655. if not window.OpenedColorPickers[colorpicker.MainPicker] then
  1656. colorpicker.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  1657. end
  1658. end)
  1659.  
  1660. colorpicker.MainPicker = Instance.new("TextButton", colorpicker.Main)
  1661. colorpicker.MainPicker.Name = "picker"
  1662. colorpicker.MainPicker.ZIndex = 100
  1663. colorpicker.MainPicker.Visible = false
  1664. colorpicker.MainPicker.AutoButtonColor = false
  1665. colorpicker.MainPicker.Text = ""
  1666. window.OpenedColorPickers[colorpicker.MainPicker] = false
  1667. colorpicker.MainPicker.Size = UDim2.fromOffset(180, 196)
  1668. colorpicker.MainPicker.BorderSizePixel = 0
  1669. colorpicker.MainPicker.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  1670. colorpicker.MainPicker.Rotation = 0
  1671. colorpicker.MainPicker.Position = UDim2.fromOffset(- colorpicker.MainPicker.AbsoluteSize.X + colorpicker.Main.AbsoluteSize.X, 17)
  1672.  
  1673. colorpicker.BlackOutline3 = Instance.new("Frame", colorpicker.MainPicker)
  1674. colorpicker.BlackOutline3.Name = "blackline"
  1675. colorpicker.BlackOutline3.ZIndex = 98
  1676. colorpicker.BlackOutline3.Size = colorpicker.MainPicker.Size + UDim2.fromOffset(6, 6)
  1677. colorpicker.BlackOutline3.BorderSizePixel = 0
  1678. colorpicker.BlackOutline3.BackgroundColor3 = window.theme.outlinecolor2
  1679. colorpicker.BlackOutline3.Position = UDim2.fromOffset(- 3, - 3)
  1680. updateevent.Event:Connect(function(theme)
  1681. colorpicker.BlackOutline3.BackgroundColor3 = theme.outlinecolor2
  1682. end)
  1683.  
  1684. colorpicker.Outline2 = Instance.new("Frame", colorpicker.MainPicker)
  1685. colorpicker.Outline2.Name = "blackline"
  1686. colorpicker.Outline2.ZIndex = 98
  1687. colorpicker.Outline2.Size = colorpicker.MainPicker.Size + UDim2.fromOffset(4, 4)
  1688. colorpicker.Outline2.BorderSizePixel = 0
  1689. colorpicker.Outline2.BackgroundColor3 = window.theme.outlinecolor
  1690. colorpicker.Outline2.Position = UDim2.fromOffset(- 2, - 2)
  1691. updateevent.Event:Connect(function(theme)
  1692. colorpicker.Outline2.BackgroundColor3 = theme.outlinecolor
  1693. end)
  1694.  
  1695. colorpicker.BlackOutline3 = Instance.new("Frame", colorpicker.MainPicker)
  1696. colorpicker.BlackOutline3.Name = "blackline"
  1697. colorpicker.BlackOutline3.ZIndex = 98
  1698. colorpicker.BlackOutline3.Size = colorpicker.MainPicker.Size + UDim2.fromOffset(2, 2)
  1699. colorpicker.BlackOutline3.BorderSizePixel = 0
  1700. colorpicker.BlackOutline3.BackgroundColor3 = window.theme.outlinecolor2
  1701. colorpicker.BlackOutline3.Position = UDim2.fromOffset(- 1, - 1)
  1702. updateevent.Event:Connect(function(theme)
  1703. colorpicker.BlackOutline3.BackgroundColor3 = theme.outlinecolor2
  1704. end)
  1705.  
  1706. colorpicker.hue = Instance.new("ImageLabel", colorpicker.MainPicker)
  1707. colorpicker.hue.ZIndex = 101
  1708. colorpicker.hue.Position = UDim2.new(0, 3, 0, 3)
  1709. colorpicker.hue.Size = UDim2.new(0, 172, 0, 172)
  1710. colorpicker.hue.Image = "rbxassetid://4155801252"
  1711. colorpicker.hue.ScaleType = Enum.ScaleType.Stretch
  1712. colorpicker.hue.BackgroundColor3 = Color3.new(1, 0, 0)
  1713. colorpicker.hue.BorderColor3 = window.theme.outlinecolor2
  1714. updateevent.Event:Connect(function(theme)
  1715. colorpicker.hue.BorderColor3 = theme.outlinecolor2
  1716. end)
  1717.  
  1718. colorpicker.hueselectorpointer = Instance.new("ImageLabel", colorpicker.MainPicker)
  1719. colorpicker.hueselectorpointer.ZIndex = 101
  1720. colorpicker.hueselectorpointer.BackgroundTransparency = 1
  1721. colorpicker.hueselectorpointer.BorderSizePixel = 0
  1722. colorpicker.hueselectorpointer.Position = UDim2.new(0, 0, 0, 0)
  1723. colorpicker.hueselectorpointer.Size = UDim2.new(0, 7, 0, 7)
  1724. colorpicker.hueselectorpointer.Image = "rbxassetid://6885856475"
  1725.  
  1726. colorpicker.selector = Instance.new("TextLabel", colorpicker.MainPicker)
  1727. colorpicker.selector.ZIndex = 100
  1728. colorpicker.selector.Position = UDim2.new(0, 3, 0, 181)
  1729. colorpicker.selector.Size = UDim2.new(0, 173, 0, 10)
  1730. colorpicker.selector.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1731. colorpicker.selector.BorderColor3 = window.theme.outlinecolor2
  1732. colorpicker.selector.Text = ""
  1733. updateevent.Event:Connect(function(theme)
  1734. colorpicker.selector.BorderColor3 = theme.outlinecolor2
  1735. end)
  1736.  
  1737. colorpicker.gradient = Instance.new("UIGradient", colorpicker.selector)
  1738. colorpicker.gradient.Color = ColorSequence.new({
  1739. ColorSequenceKeypoint.new(0, Color3.new(1, 0, 0)),
  1740. ColorSequenceKeypoint.new(0.17, Color3.new(1, 0, 1)),
  1741. ColorSequenceKeypoint.new(0.33, Color3.new(0, 0, 1)),
  1742. ColorSequenceKeypoint.new(0.5, Color3.new(0, 1, 1)),
  1743. ColorSequenceKeypoint.new(0.67, Color3.new(0, 1, 0)),
  1744. ColorSequenceKeypoint.new(0.83, Color3.new(1, 1, 0)),
  1745. ColorSequenceKeypoint.new(1, Color3.new(1, 0, 0))
  1746. })
  1747.  
  1748. colorpicker.pointer = Instance.new("Frame", colorpicker.selector)
  1749. colorpicker.pointer.ZIndex = 101
  1750. colorpicker.pointer.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  1751. colorpicker.pointer.Position = UDim2.new(0, 0, 0, 0)
  1752. colorpicker.pointer.Size = UDim2.new(0, 2, 0, 10)
  1753. colorpicker.pointer.BorderColor3 = Color3.fromRGB(255, 255, 255)
  1754.  
  1755. if colorpicker.flag and colorpicker.flag ~= "" then
  1756. library.flags[colorpicker.flag] = colorpicker.default
  1757. end
  1758.  
  1759. function colorpicker:RefreshHue()
  1760. local x = (mouse.X - colorpicker.hue.AbsolutePosition.X) / colorpicker.hue.AbsoluteSize.X
  1761. local y = (mouse.Y - colorpicker.hue.AbsolutePosition.Y) / colorpicker.hue.AbsoluteSize.Y
  1762. colorpicker.hueselectorpointer:TweenPosition(UDim2.new(math.clamp(x * colorpicker.hue.AbsoluteSize.X, 0.5, 0.952 * colorpicker.hue.AbsoluteSize.X) / colorpicker.hue.AbsoluteSize.X, 0, math.clamp(y * colorpicker.hue.AbsoluteSize.Y, 0.5, 0.885 * colorpicker.hue.AbsoluteSize.Y) / colorpicker.hue.AbsoluteSize.Y, 0), Enum.EasingDirection.In, Enum.EasingStyle.Sine, 0.05)
  1763. colorpicker:Set(Color3.fromHSV(colorpicker.color, math.clamp(x * colorpicker.hue.AbsoluteSize.X, 0.5, 1 * colorpicker.hue.AbsoluteSize.X) / colorpicker.hue.AbsoluteSize.X, 1 - (math.clamp(y * colorpicker.hue.AbsoluteSize.Y, 0.5, 1 * colorpicker.hue.AbsoluteSize.Y) / colorpicker.hue.AbsoluteSize.Y)))
  1764. end
  1765.  
  1766. function colorpicker:RefreshSelector()
  1767. local pos = math.clamp((mouse.X - colorpicker.hue.AbsolutePosition.X) / colorpicker.hue.AbsoluteSize.X, 0, 1)
  1768. colorpicker.color = 1 - pos
  1769. colorpicker.pointer:TweenPosition(UDim2.new(pos, 0, 0, 0), Enum.EasingDirection.In, Enum.EasingStyle.Sine, 0.05)
  1770. colorpicker.hue.BackgroundColor3 = Color3.fromHSV(1 - pos, 1, 1)
  1771.  
  1772. local x = (colorpicker.hueselectorpointer.AbsolutePosition.X - colorpicker.hue.AbsolutePosition.X) / colorpicker.hue.AbsoluteSize.X
  1773. local y = (colorpicker.hueselectorpointer.AbsolutePosition.Y - colorpicker.hue.AbsolutePosition.Y) / colorpicker.hue.AbsoluteSize.Y
  1774. colorpicker:Set(Color3.fromHSV(colorpicker.color, math.clamp(x * colorpicker.hue.AbsoluteSize.X, 0.5, 1 * colorpicker.hue.AbsoluteSize.X) / colorpicker.hue.AbsoluteSize.X, 1 - (math.clamp(y * colorpicker.hue.AbsoluteSize.Y, 0.5, 1 * colorpicker.hue.AbsoluteSize.Y) / colorpicker.hue.AbsoluteSize.Y)))
  1775. end
  1776.  
  1777. function colorpicker:Set(value)
  1778. local color = Color3.new(math.clamp(value.r, 0, 1), math.clamp(value.g, 0, 1), math.clamp(value.b, 0, 1))
  1779. colorpicker.value = color
  1780. if colorpicker.flag and colorpicker.flag ~= "" then
  1781. library.flags[colorpicker.flag] = color
  1782. end
  1783. local clr = Color3.new(math.clamp(color.R / 1.7, 0, 1), math.clamp(color.G / 1.7, 0, 1), math.clamp(color.B / 1.7, 0, 1))
  1784. colorpicker.Gradient.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, color), ColorSequenceKeypoint.new(1, clr)})
  1785. pcall(colorpicker.callback, color)
  1786. end
  1787.  
  1788. function colorpicker:Get(value)
  1789. return colorpicker.value
  1790. end
  1791.  
  1792. colorpicker:Set(colorpicker.default)
  1793.  
  1794. local dragging_selector = false
  1795. local dragging_hue = false
  1796.  
  1797. colorpicker.selector.InputBegan:Connect(function(input)
  1798. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1799. dragging_selector = true
  1800. colorpicker:RefreshSelector()
  1801. end
  1802. end)
  1803.  
  1804. colorpicker.selector.InputEnded:Connect(function(input)
  1805. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1806. dragging_selector = false
  1807. colorpicker:RefreshSelector()
  1808. end
  1809. end)
  1810.  
  1811. colorpicker.hue.InputBegan:Connect(function(input)
  1812. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1813. dragging_hue = true
  1814. colorpicker:RefreshHue()
  1815. end
  1816. end)
  1817.  
  1818. colorpicker.hue.InputEnded:Connect(function(input)
  1819. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1820. dragging_hue = false
  1821. colorpicker:RefreshHue()
  1822. end
  1823. end)
  1824.  
  1825. uis.InputChanged:Connect(function(input)
  1826. if dragging_selector and input.UserInputType == Enum.UserInputType.MouseMovement then
  1827. colorpicker:RefreshSelector()
  1828. end
  1829. if dragging_hue and input.UserInputType == Enum.UserInputType.MouseMovement then
  1830. colorpicker:RefreshHue()
  1831. end
  1832. end)
  1833.  
  1834. local inputBegan = function(input)
  1835. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1836. for i, v in pairs(window.OpenedColorPickers) do
  1837. if v and i ~= colorpicker.MainPicker then
  1838. i.Visible = false
  1839. window.OpenedColorPickers[i] = false
  1840. end
  1841. end
  1842.  
  1843. colorpicker.MainPicker.Visible = not colorpicker.MainPicker.Visible
  1844. window.OpenedColorPickers[colorpicker.MainPicker] = colorpicker.MainPicker.Visible
  1845. if window.OpenedColorPickers[colorpicker.MainPicker] then
  1846. colorpicker.BlackOutline2.BackgroundColor3 = window.theme.accentcolor
  1847. else
  1848. colorpicker.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  1849. end
  1850. end
  1851. end
  1852.  
  1853. colorpicker.Main.InputBegan:Connect(inputBegan)
  1854. colorpicker.Outline.InputBegan:Connect(inputBegan)
  1855. colorpicker.BlackOutline2.InputBegan:Connect(inputBegan)
  1856. table.insert(library.items, colorpicker)
  1857.  
  1858. return colorpicker
  1859. end
  1860.  
  1861. function toggle:AddSlider(min, default, max, decimals, callback, flag)
  1862. local slider = {}
  1863. slider.text = text or ""
  1864. slider.callback = callback or function(value) end
  1865. slider.min = min or 0
  1866. slider.max = max or 100
  1867. slider.decimals = decimals or 1
  1868. slider.default = default or slider.min
  1869. slider.flag = flag or ((toggle.text or "") .. #toggle.Items:GetChildren())
  1870.  
  1871. slider.value = slider.default
  1872. local dragging = false
  1873.  
  1874. slider.Main = Instance.new("TextButton", sector.Items)
  1875. slider.Main.Name = "slider"
  1876. slider.Main.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1877. slider.Main.Position = UDim2.fromOffset(0, 0)
  1878. slider.Main.BorderSizePixel = 0
  1879. slider.Main.Size = UDim2.fromOffset(sector.Main.Size.X.Offset - 12, 12)
  1880. slider.Main.AutoButtonColor = false
  1881. slider.Main.Text = ""
  1882. slider.Main.ZIndex = 7
  1883.  
  1884. slider.InputLabel = Instance.new("TextLabel", slider.Main)
  1885. slider.InputLabel.BackgroundTransparency = 1
  1886. slider.InputLabel.Size = slider.Main.Size
  1887. slider.InputLabel.Font = window.theme.font
  1888. slider.InputLabel.Text = "0"
  1889. slider.InputLabel.TextColor3 = Color3.fromRGB(240, 240, 240)
  1890. slider.InputLabel.Position = slider.Main.Position
  1891. slider.InputLabel.Selectable = false
  1892. slider.InputLabel.TextSize = 15
  1893. slider.InputLabel.ZIndex = 9
  1894. slider.InputLabel.TextStrokeTransparency = 1
  1895. slider.InputLabel.TextXAlignment = Enum.TextXAlignment.Center
  1896. updateevent.Event:Connect(function(theme)
  1897. slider.InputLabel.Font = theme.font
  1898. slider.InputLabel.TextColor3 = theme.itemscolor
  1899. end)
  1900.  
  1901. slider.BlackOutline2 = Instance.new("Frame", slider.Main)
  1902. slider.BlackOutline2.Name = "blackline"
  1903. slider.BlackOutline2.ZIndex = 4
  1904. slider.BlackOutline2.Size = slider.Main.Size + UDim2.fromOffset(6, 6)
  1905. slider.BlackOutline2.BorderSizePixel = 0
  1906. slider.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  1907. slider.BlackOutline2.Position = UDim2.fromOffset(- 3, - 3)
  1908. updateevent.Event:Connect(function(theme)
  1909. slider.BlackOutline2.BackgroundColor3 = theme.outlinecolor2
  1910. end)
  1911.  
  1912. slider.Outline = Instance.new("Frame", slider.Main)
  1913. slider.Outline.Name = "blackline"
  1914. slider.Outline.ZIndex = 4
  1915. slider.Outline.Size = slider.Main.Size + UDim2.fromOffset(4, 4)
  1916. slider.Outline.BorderSizePixel = 0
  1917. slider.Outline.BackgroundColor3 = window.theme.outlinecolor
  1918. slider.Outline.Position = UDim2.fromOffset(- 2, - 2)
  1919. updateevent.Event:Connect(function(theme)
  1920. slider.Outline.BackgroundColor3 = theme.outlinecolor
  1921. end)
  1922.  
  1923. slider.BlackOutline = Instance.new("Frame", slider.Main)
  1924. slider.BlackOutline.Name = "blackline"
  1925. slider.BlackOutline.ZIndex = 4
  1926. slider.BlackOutline.Size = slider.Main.Size + UDim2.fromOffset(2, 2)
  1927. slider.BlackOutline.BorderSizePixel = 0
  1928. slider.BlackOutline.BackgroundColor3 = window.theme.outlinecolor2
  1929. slider.BlackOutline.Position = UDim2.fromOffset(- 1, - 1)
  1930. updateevent.Event:Connect(function(theme)
  1931. slider.BlackOutline.BackgroundColor3 = theme.outlinecolor2
  1932. end)
  1933.  
  1934. slider.Gradient = Instance.new("UIGradient", slider.Main)
  1935. slider.Gradient.Rotation = 90
  1936. slider.Gradient.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(49, 49, 49)), ColorSequenceKeypoint.new(1, Color3.fromRGB(41, 41, 41))})
  1937.  
  1938. slider.SlideBar = Instance.new("Frame", slider.Main)
  1939. slider.SlideBar.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1940. slider.SlideBar.ZIndex = 8
  1941. slider.SlideBar.BorderSizePixel = 0
  1942. slider.SlideBar.Size = UDim2.fromOffset(0, slider.Main.Size.Y.Offset)
  1943.  
  1944. slider.Gradient2 = Instance.new("UIGradient", slider.SlideBar)
  1945. slider.Gradient2.Rotation = 90
  1946. slider.Gradient2.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, window.theme.accentcolor), ColorSequenceKeypoint.new(1, window.theme.accentcolor2)})
  1947. updateevent.Event:Connect(function(theme)
  1948. slider.Gradient2.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, theme.accentcolor), ColorSequenceKeypoint.new(1, theme.accentcolor2)})
  1949. end)
  1950.  
  1951. slider.BlackOutline2.MouseEnter:Connect(function()
  1952. slider.BlackOutline2.BackgroundColor3 = window.theme.accentcolor
  1953. end)
  1954. slider.BlackOutline2.MouseLeave:Connect(function()
  1955. slider.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  1956. end)
  1957.  
  1958. if slider.flag and slider.flag ~= "" then
  1959. library.flags[slider.flag] = slider.default or slider.min or 0
  1960. end
  1961.  
  1962. function slider:Get()
  1963. return slider.value
  1964. end
  1965.  
  1966. function slider:Set(value)
  1967. slider.value = math.clamp(math.round(value * slider.decimals) / slider.decimals, slider.min, slider.max)
  1968. local percent = 1 - ((slider.max - slider.value) / (slider.max - slider.min))
  1969. if slider.flag and slider.flag ~= "" then
  1970. library.flags[slider.flag] = slider.value
  1971. end
  1972. slider.SlideBar:TweenSize(UDim2.fromOffset(percent * slider.Main.AbsoluteSize.X, slider.Main.AbsoluteSize.Y), Enum.EasingDirection.In, Enum.EasingStyle.Sine, 0.05)
  1973. slider.InputLabel.Text = slider.value
  1974. pcall(slider.callback, slider.value)
  1975. end
  1976. slider:Set(slider.default)
  1977.  
  1978. function slider:Refresh()
  1979. local mousePos = game:GetService("Workspace").CurrentCamera:WorldToViewportPoint(mouse.Hit.p)
  1980. local percent = math.clamp(mousePos.X - slider.SlideBar.AbsolutePosition.X, 0, slider.Main.AbsoluteSize.X) / slider.Main.AbsoluteSize.X
  1981. local value = math.round((slider.min + (slider.max - slider.min) * percent) * slider.decimals) / slider.decimals
  1982. value = math.clamp(value, slider.min, slider.max)
  1983. slider:Set(value)
  1984. end
  1985.  
  1986. slider.SlideBar.InputBegan:Connect(function(input)
  1987. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1988. dragging = true
  1989. slider:Refresh()
  1990. end
  1991. end)
  1992.  
  1993. slider.SlideBar.InputEnded:Connect(function(input)
  1994. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1995. dragging = false
  1996. end
  1997. end)
  1998.  
  1999. slider.Main.InputBegan:Connect(function(input)
  2000. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  2001. dragging = true
  2002. slider:Refresh()
  2003. end
  2004. end)
  2005.  
  2006. slider.Main.InputEnded:Connect(function(input)
  2007. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  2008. dragging = false
  2009. end
  2010. end)
  2011.  
  2012. uis.InputChanged:Connect(function(input)
  2013. if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
  2014. slider:Refresh()
  2015. end
  2016. end)
  2017.  
  2018. sector:FixSize()
  2019. table.insert(library.items, slider)
  2020.  
  2021. return slider
  2022. end
  2023.  
  2024. toggle.Main.MouseButton1Down:Connect(function()
  2025. toggle:Set(not toggle.CheckedFrame.Visible)
  2026. end)
  2027.  
  2028. toggle.Label.InputBegan:Connect(function(input)
  2029. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  2030. toggle:Set(not toggle.CheckedFrame.Visible)
  2031. end
  2032. end)
  2033.  
  2034. local MouseEnter = function()
  2035. toggle.BlackOutline2.BackgroundColor3 = window.theme.accentcolor
  2036. end
  2037.  
  2038. local MouseLeave = function()
  2039. toggle.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  2040. end
  2041.  
  2042. toggle.Label.MouseEnter:Connect(MouseEnter)
  2043. toggle.Label.MouseLeave:Connect(MouseLeave)
  2044. toggle.BlackOutline2.MouseEnter:Connect(MouseEnter)
  2045. toggle.BlackOutline2.MouseLeave:Connect(MouseLeave)
  2046.  
  2047. sector:FixSize()
  2048. table.insert(library.items, toggle)
  2049.  
  2050. return toggle
  2051. end
  2052.  
  2053. function sector:AddTextbox(text, default, callback, flag)
  2054. local textbox = {}
  2055. textbox.text = text or ""
  2056. textbox.callback = callback or function() end
  2057. textbox.default = default
  2058. textbox.value = ""
  2059. textbox.flag = flag or text or ""
  2060.  
  2061. textbox.Label = Instance.new("TextButton", sector.Items)
  2062. textbox.Label.Name = "Label"
  2063. textbox.Label.AutoButtonColor = false
  2064. textbox.Label.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  2065. textbox.Label.BackgroundTransparency = 1
  2066. textbox.Label.Position = UDim2.fromOffset(sector.Main.Size.X.Offset, 0)
  2067. textbox.Label.Size = UDim2.fromOffset(sector.Main.Size.X.Offset - 12, 0)
  2068. textbox.Label.Font = window.theme.font
  2069. textbox.Label.ZIndex = 5
  2070. textbox.Label.Text = textbox.text
  2071. textbox.Label.TextColor3 = window.theme.itemscolor
  2072. textbox.Label.TextSize = 15
  2073. textbox.Label.TextStrokeTransparency = 1
  2074. textbox.Label.TextXAlignment = Enum.TextXAlignment.Left
  2075. updateevent.Event:Connect(function(theme)
  2076. textbox.Label.Font = theme.font
  2077. end)
  2078.  
  2079. textbox.Holder = Instance.new("Frame", sector.Items)
  2080. textbox.Holder.Name = "holder"
  2081. textbox.Holder.ZIndex = 5
  2082. textbox.Holder.Size = UDim2.fromOffset(sector.Main.Size.X.Offset - 12, 14)
  2083. textbox.Holder.BorderSizePixel = 0
  2084. textbox.Holder.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  2085.  
  2086. textbox.Gradient = Instance.new("UIGradient", textbox.Holder)
  2087. textbox.Gradient.Rotation = 90
  2088. textbox.Gradient.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(49, 49, 49)), ColorSequenceKeypoint.new(1, Color3.fromRGB(39, 39, 39))})
  2089.  
  2090. textbox.Main = Instance.new("TextBox", textbox.Holder)
  2091. textbox.Main.PlaceholderText = textbox.text
  2092. textbox.Main.PlaceholderColor3 = Color3.fromRGB(190, 190, 190)
  2093. textbox.Main.Text = ""
  2094. textbox.Main.BackgroundTransparency = 1
  2095. textbox.Main.Font = window.theme.font
  2096. textbox.Main.Name = "textbox"
  2097. textbox.Main.MultiLine = false
  2098. textbox.Main.ClearTextOnFocus = false
  2099. textbox.Main.ZIndex = 5
  2100. textbox.Main.TextScaled = true
  2101. textbox.Main.Size = textbox.Holder.Size
  2102. textbox.Main.TextSize = 15
  2103. textbox.Main.TextColor3 = Color3.fromRGB(255, 255, 255)
  2104. textbox.Main.BorderSizePixel = 0
  2105. textbox.Main.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  2106. textbox.Main.TextXAlignment = Enum.TextXAlignment.Left
  2107.  
  2108. if textbox.flag and textbox.flag ~= "" then
  2109. library.flags[textbox.flag] = textbox.default or ""
  2110. end
  2111.  
  2112. function textbox:Set(text)
  2113. textbox.value = text
  2114. textbox.Main.Text = text
  2115. if textbox.flag and textbox.flag ~= "" then
  2116. library.flags[textbox.flag] = text
  2117. end
  2118. pcall(textbox.callback, text)
  2119. end
  2120. updateevent.Event:Connect(function(theme)
  2121. textbox.Main.Font = theme.font
  2122. end)
  2123.  
  2124. function textbox:Get()
  2125. return textbox.value
  2126. end
  2127.  
  2128. if textbox.default then
  2129. textbox:Set(textbox.default)
  2130. end
  2131.  
  2132. textbox.Main.FocusLost:Connect(function()
  2133. textbox:Set(textbox.Main.Text)
  2134. end)
  2135.  
  2136. textbox.BlackOutline2 = Instance.new("Frame", textbox.Main)
  2137. textbox.BlackOutline2.Name = "blackline"
  2138. textbox.BlackOutline2.ZIndex = 4
  2139. textbox.BlackOutline2.Size = textbox.Main.Size + UDim2.fromOffset(6, 6)
  2140. textbox.BlackOutline2.BorderSizePixel = 0
  2141. textbox.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  2142. textbox.BlackOutline2.Position = UDim2.fromOffset(- 3, - 3)
  2143. updateevent.Event:Connect(function(theme)
  2144. textbox.BlackOutline2.BackgroundColor3 = theme.outlinecolor2
  2145. end)
  2146.  
  2147. textbox.Outline = Instance.new("Frame", textbox.Main)
  2148. textbox.Outline.Name = "blackline"
  2149. textbox.Outline.ZIndex = 4
  2150. textbox.Outline.Size = textbox.Main.Size + UDim2.fromOffset(4, 4)
  2151. textbox.Outline.BorderSizePixel = 0
  2152. textbox.Outline.BackgroundColor3 = window.theme.outlinecolor
  2153. textbox.Outline.Position = UDim2.fromOffset(- 2, - 2)
  2154. updateevent.Event:Connect(function(theme)
  2155. textbox.Outline.BackgroundColor3 = theme.outlinecolor
  2156. end)
  2157.  
  2158. textbox.BlackOutline = Instance.new("Frame", textbox.Main)
  2159. textbox.BlackOutline.Name = "blackline"
  2160. textbox.BlackOutline.ZIndex = 4
  2161. textbox.BlackOutline.Size = textbox.Main.Size + UDim2.fromOffset(2, 2)
  2162. textbox.BlackOutline.BorderSizePixel = 0
  2163. textbox.BlackOutline.BackgroundColor3 = window.theme.outlinecolor2
  2164. textbox.BlackOutline.Position = UDim2.fromOffset(- 1, - 1)
  2165. updateevent.Event:Connect(function(theme)
  2166. textbox.BlackOutline.BackgroundColor3 = theme.outlinecolor2
  2167. end)
  2168.  
  2169. textbox.BlackOutline2.MouseEnter:Connect(function()
  2170. textbox.BlackOutline2.BackgroundColor3 = window.theme.accentcolor
  2171. end)
  2172. textbox.BlackOutline2.MouseLeave:Connect(function()
  2173. textbox.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  2174. end)
  2175.  
  2176. sector:FixSize()
  2177. table.insert(library.items, textbox)
  2178.  
  2179. return textbox
  2180. end
  2181.  
  2182. function sector:AddSlider(text, min, default, max, decimals, callback, flag)
  2183. local slider = {}
  2184. slider.text = text or ""
  2185. slider.callback = callback or function(value) end
  2186. slider.min = min or 0
  2187. slider.max = max or 100
  2188. slider.decimals = decimals or 1
  2189. slider.default = default or slider.min
  2190. slider.flag = flag or text or ""
  2191.  
  2192. slider.value = slider.default
  2193. local dragging = false
  2194.  
  2195. slider.MainBack = Instance.new("Frame", sector.Items)
  2196. slider.MainBack.Name = "MainBack"
  2197. slider.MainBack.ZIndex = 7
  2198. slider.MainBack.Size = UDim2.fromOffset(sector.Main.Size.X.Offset - 12, 25)
  2199. slider.MainBack.BorderSizePixel = 0
  2200. slider.MainBack.BackgroundTransparency = 1
  2201.  
  2202. slider.Label = Instance.new("TextLabel", slider.MainBack)
  2203. slider.Label.BackgroundTransparency = 1
  2204. slider.Label.Size = UDim2.fromOffset(sector.Main.Size.X.Offset - 12, 6)
  2205. slider.Label.Font = window.theme.font
  2206. slider.Label.Text = slider.text .. ":"
  2207. slider.Label.TextColor3 = window.theme.itemscolor
  2208. slider.Label.Position = UDim2.fromOffset(0, 0)
  2209. slider.Label.TextSize = 15
  2210. slider.Label.ZIndex = 4
  2211. slider.Label.TextStrokeTransparency = 1
  2212. slider.Label.TextXAlignment = Enum.TextXAlignment.Left
  2213. updateevent.Event:Connect(function(theme)
  2214. slider.Label.Font = theme.font
  2215. slider.Label.TextColor3 = theme.itemscolor
  2216. end)
  2217.  
  2218. local size = textservice:GetTextSize(slider.Label.Text, slider.Label.TextSize, slider.Label.Font, Vector2.new(200, 300))
  2219. slider.InputLabel = Instance.new("TextBox", slider.MainBack)
  2220. slider.InputLabel.BackgroundTransparency = 1
  2221. slider.InputLabel.ClearTextOnFocus = false
  2222. slider.InputLabel.Size = UDim2.fromOffset(sector.Main.Size.X.Offset - size.X - 15, 12)
  2223. slider.InputLabel.Font = window.theme.font
  2224. slider.InputLabel.Text = "0"
  2225. slider.InputLabel.TextColor3 = window.theme.itemscolor
  2226. slider.InputLabel.Position = UDim2.fromOffset(size.X + 3, - 3)
  2227. slider.InputLabel.TextSize = 15
  2228. slider.InputLabel.ZIndex = 4
  2229. slider.InputLabel.TextStrokeTransparency = 1
  2230. slider.InputLabel.TextXAlignment = Enum.TextXAlignment.Left
  2231. updateevent.Event:Connect(function(theme)
  2232. slider.InputLabel.Font = theme.font
  2233. slider.InputLabel.TextColor3 = theme.itemscolor
  2234.  
  2235. local size = textservice:GetTextSize(slider.Label.Text, slider.Label.TextSize, slider.Label.Font, Vector2.new(200, 300))
  2236. slider.InputLabel.Size = UDim2.fromOffset(sector.Main.Size.X.Offset - size.X - 15, 12)
  2237. end)
  2238.  
  2239. slider.Main = Instance.new("TextButton", slider.MainBack)
  2240. slider.Main.Name = "slider"
  2241. slider.Main.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  2242. slider.Main.Position = UDim2.fromOffset(0, 15)
  2243. slider.Main.BorderSizePixel = 0
  2244. slider.Main.Size = UDim2.fromOffset(sector.Main.Size.X.Offset - 12, 12)
  2245. slider.Main.AutoButtonColor = false
  2246. slider.Main.Text = ""
  2247. slider.Main.ZIndex = 5
  2248.  
  2249. slider.BlackOutline2 = Instance.new("Frame", slider.Main)
  2250. slider.BlackOutline2.Name = "blackline"
  2251. slider.BlackOutline2.ZIndex = 4
  2252. slider.BlackOutline2.Size = slider.Main.Size + UDim2.fromOffset(6, 6)
  2253. slider.BlackOutline2.BorderSizePixel = 0
  2254. slider.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  2255. slider.BlackOutline2.Position = UDim2.fromOffset(- 3, - 3)
  2256. updateevent.Event:Connect(function(theme)
  2257. slider.BlackOutline2.BackgroundColor3 = theme.outlinecolor2
  2258. end)
  2259.  
  2260. slider.Outline = Instance.new("Frame", slider.Main)
  2261. slider.Outline.Name = "blackline"
  2262. slider.Outline.ZIndex = 4
  2263. slider.Outline.Size = slider.Main.Size + UDim2.fromOffset(4, 4)
  2264. slider.Outline.BorderSizePixel = 0
  2265. slider.Outline.BackgroundColor3 = window.theme.outlinecolor
  2266. slider.Outline.Position = UDim2.fromOffset(- 2, - 2)
  2267. updateevent.Event:Connect(function(theme)
  2268. slider.Outline.BackgroundColor3 = theme.outlinecolor
  2269. end)
  2270.  
  2271. slider.BlackOutline = Instance.new("Frame", slider.Main)
  2272. slider.BlackOutline.Name = "blackline"
  2273. slider.BlackOutline.ZIndex = 4
  2274. slider.BlackOutline.Size = slider.Main.Size + UDim2.fromOffset(2, 2)
  2275. slider.BlackOutline.BorderSizePixel = 0
  2276. slider.BlackOutline.BackgroundColor3 = window.theme.outlinecolor2
  2277. slider.BlackOutline.Position = UDim2.fromOffset(- 1, - 1)
  2278. updateevent.Event:Connect(function(theme)
  2279. slider.BlackOutline.BackgroundColor3 = theme.outlinecolor2
  2280. end)
  2281.  
  2282. slider.Gradient = Instance.new("UIGradient", slider.Main)
  2283. slider.Gradient.Rotation = 90
  2284. slider.Gradient.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(49, 49, 49)), ColorSequenceKeypoint.new(1, Color3.fromRGB(41, 41, 41))})
  2285.  
  2286. slider.SlideBar = Instance.new("Frame", slider.Main)
  2287. slider.SlideBar.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  2288. slider.SlideBar.ZIndex = 5
  2289. slider.SlideBar.BorderSizePixel = 0
  2290. slider.SlideBar.Size = UDim2.fromOffset(0, slider.Main.Size.Y.Offset)
  2291.  
  2292. slider.Gradient2 = Instance.new("UIGradient", slider.SlideBar)
  2293. slider.Gradient2.Rotation = 90
  2294. slider.Gradient2.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, window.theme.accentcolor), ColorSequenceKeypoint.new(1, window.theme.accentcolor2)})
  2295. updateevent.Event:Connect(function(theme)
  2296. slider.Gradient2.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, theme.accentcolor), ColorSequenceKeypoint.new(1, theme.accentcolor2)})
  2297. end)
  2298.  
  2299. slider.BlackOutline2.MouseEnter:Connect(function()
  2300. slider.BlackOutline2.BackgroundColor3 = window.theme.accentcolor
  2301. end)
  2302. slider.BlackOutline2.MouseLeave:Connect(function()
  2303. slider.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  2304. end)
  2305.  
  2306. if slider.flag and slider.flag ~= "" then
  2307. library.flags[slider.flag] = slider.default or slider.min or 0
  2308. end
  2309.  
  2310. function slider:Get()
  2311. return slider.value
  2312. end
  2313.  
  2314. function slider:Set(value)
  2315. slider.value = math.clamp(math.round(value * slider.decimals) / slider.decimals, slider.min, slider.max)
  2316. local percent = 1 - ((slider.max - slider.value) / (slider.max - slider.min))
  2317. if slider.flag and slider.flag ~= "" then
  2318. library.flags[slider.flag] = slider.value
  2319. end
  2320. slider.SlideBar:TweenSize(UDim2.fromOffset(percent * slider.Main.AbsoluteSize.X, slider.Main.AbsoluteSize.Y), Enum.EasingDirection.In, Enum.EasingStyle.Sine, 0.05)
  2321. slider.InputLabel.Text = slider.value
  2322. pcall(slider.callback, slider.value)
  2323. end
  2324. slider:Set(slider.default)
  2325.  
  2326. slider.InputLabel.FocusLost:Connect(function(Return)
  2327. if not Return then
  2328. return
  2329. end
  2330.  
  2331. if (slider.InputLabel.Text:match("^%d + $")) then
  2332. slider:Set(slider.InputLabel.Text)
  2333. else
  2334. slider.InputLabel.Text = slider.value
  2335. end
  2336. end)
  2337.  
  2338. function slider:Refresh()
  2339. local mousePos = game:GetService("Workspace").CurrentCamera:WorldToViewportPoint(mouse.Hit.p)
  2340. local percent = math.clamp(mousePos.X - slider.SlideBar.AbsolutePosition.X, 0, slider.Main.AbsoluteSize.X) / slider.Main.AbsoluteSize.X
  2341. local value = math.round((slider.min + (slider.max - slider.min) * percent) * slider.decimals) / slider.decimals
  2342. value = math.clamp(value, slider.min, slider.max)
  2343. slider:Set(value)
  2344. end
  2345.  
  2346. slider.SlideBar.InputBegan:Connect(function(input)
  2347. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  2348. dragging = true
  2349. slider:Refresh()
  2350. end
  2351. end)
  2352.  
  2353. slider.SlideBar.InputEnded:Connect(function(input)
  2354. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  2355. dragging = false
  2356. end
  2357. end)
  2358.  
  2359. slider.Main.InputBegan:Connect(function(input)
  2360. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  2361. dragging = true
  2362. slider:Refresh()
  2363. end
  2364. end)
  2365.  
  2366. slider.Main.InputEnded:Connect(function(input)
  2367. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  2368. dragging = false
  2369. end
  2370. end)
  2371.  
  2372. uis.InputChanged:Connect(function(input)
  2373. if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
  2374. slider:Refresh()
  2375. end
  2376. end)
  2377.  
  2378. sector:FixSize()
  2379. table.insert(library.items, slider)
  2380. return slider
  2381. end
  2382.  
  2383. function sector:AddColorpicker(text, default, callback, flag)
  2384. local colorpicker = {}
  2385.  
  2386. colorpicker.text = text or ""
  2387. colorpicker.callback = callback or function() end
  2388. colorpicker.default = default or Color3.fromRGB(255, 255, 255)
  2389. colorpicker.value = colorpicker.default
  2390. colorpicker.flag = flag or text or ""
  2391.  
  2392. colorpicker.Label = Instance.new("TextLabel", sector.Items)
  2393. colorpicker.Label.BackgroundTransparency = 1
  2394. colorpicker.Label.Size = UDim2.fromOffset(156, 10)
  2395. colorpicker.Label.ZIndex = 4
  2396. colorpicker.Label.Font = window.theme.font
  2397. colorpicker.Label.Text = colorpicker.text
  2398. colorpicker.Label.TextColor3 = window.theme.itemscolor
  2399. colorpicker.Label.TextSize = 15
  2400. colorpicker.Label.TextStrokeTransparency = 1
  2401. colorpicker.Label.TextXAlignment = Enum.TextXAlignment.Left
  2402. updateevent.Event:Connect(function(theme)
  2403. colorpicker.Label.Font = theme.font
  2404. colorpicker.Label.TextColor3 = theme.itemscolor
  2405. end)
  2406.  
  2407. colorpicker.Main = Instance.new("Frame", colorpicker.Label)
  2408. colorpicker.Main.ZIndex = 6
  2409. colorpicker.Main.BorderSizePixel = 0
  2410. colorpicker.Main.Position = UDim2.fromOffset(sector.Main.Size.X.Offset - 29, 0)
  2411. colorpicker.Main.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  2412. colorpicker.Main.Size = UDim2.fromOffset(16, 10)
  2413.  
  2414. colorpicker.Gradient = Instance.new("UIGradient", colorpicker.Main)
  2415. colorpicker.Gradient.Rotation = 90
  2416.  
  2417. local clr = Color3.new(math.clamp(colorpicker.value.R / 1.7, 0, 1), math.clamp(colorpicker.value.G / 1.7, 0, 1), math.clamp(colorpicker.value.B / 1.7, 0, 1))
  2418. colorpicker.Gradient.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, colorpicker.value), ColorSequenceKeypoint.new(1, clr)})
  2419.  
  2420. colorpicker.BlackOutline2 = Instance.new("Frame", colorpicker.Main)
  2421. colorpicker.BlackOutline2.Name = "blackline"
  2422. colorpicker.BlackOutline2.ZIndex = 4
  2423. colorpicker.BlackOutline2.Size = colorpicker.Main.Size + UDim2.fromOffset(6, 6)
  2424. colorpicker.BlackOutline2.BorderSizePixel = 0
  2425. colorpicker.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  2426. colorpicker.BlackOutline2.Position = UDim2.fromOffset(- 3, - 3)
  2427. updateevent.Event:Connect(function(theme)
  2428. colorpicker.BlackOutline2.BackgroundColor3 = window.OpenedColorPickers[colorpicker.MainPicker] and theme.accentcolor or theme.outlinecolor2
  2429. end)
  2430.  
  2431. colorpicker.Outline = Instance.new("Frame", colorpicker.Main)
  2432. colorpicker.Outline.Name = "blackline"
  2433. colorpicker.Outline.ZIndex = 4
  2434. colorpicker.Outline.Size = colorpicker.Main.Size + UDim2.fromOffset(4, 4)
  2435. colorpicker.Outline.BorderSizePixel = 0
  2436. colorpicker.Outline.BackgroundColor3 = window.theme.outlinecolor
  2437. colorpicker.Outline.Position = UDim2.fromOffset(- 2, - 2)
  2438. updateevent.Event:Connect(function(theme)
  2439. colorpicker.Outline.BackgroundColor3 = theme.outlinecolor
  2440. end)
  2441.  
  2442. colorpicker.BlackOutline = Instance.new("Frame", colorpicker.Main)
  2443. colorpicker.BlackOutline.Name = "blackline"
  2444. colorpicker.BlackOutline.ZIndex = 4
  2445. colorpicker.BlackOutline.Size = colorpicker.Main.Size + UDim2.fromOffset(2, 2)
  2446. colorpicker.BlackOutline.BorderSizePixel = 0
  2447. colorpicker.BlackOutline.BackgroundColor3 = window.theme.outlinecolor2
  2448. colorpicker.BlackOutline.Position = UDim2.fromOffset(- 1, - 1)
  2449. updateevent.Event:Connect(function(theme)
  2450. colorpicker.BlackOutline.BackgroundColor3 = theme.outlinecolor2
  2451. end)
  2452.  
  2453. colorpicker.BlackOutline2.MouseEnter:Connect(function()
  2454. colorpicker.BlackOutline2.BackgroundColor3 = window.theme.accentcolor
  2455. end)
  2456. colorpicker.BlackOutline2.MouseLeave:Connect(function()
  2457. if not window.OpenedColorPickers[colorpicker.MainPicker] then
  2458. colorpicker.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  2459. end
  2460. end)
  2461.  
  2462. colorpicker.MainPicker = Instance.new("TextButton", colorpicker.Main)
  2463. colorpicker.MainPicker.Name = "picker"
  2464. colorpicker.MainPicker.ZIndex = 100
  2465. colorpicker.MainPicker.Visible = false
  2466. colorpicker.MainPicker.AutoButtonColor = false
  2467. colorpicker.MainPicker.Text = ""
  2468. window.OpenedColorPickers[colorpicker.MainPicker] = false
  2469. colorpicker.MainPicker.Size = UDim2.fromOffset(180, 196)
  2470. colorpicker.MainPicker.BorderSizePixel = 0
  2471. colorpicker.MainPicker.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  2472. colorpicker.MainPicker.Rotation = 0
  2473. colorpicker.MainPicker.Position = UDim2.fromOffset(- colorpicker.MainPicker.AbsoluteSize.X + colorpicker.Main.AbsoluteSize.X, 15)
  2474.  
  2475. colorpicker.BlackOutline3 = Instance.new("Frame", colorpicker.MainPicker)
  2476. colorpicker.BlackOutline3.Name = "blackline"
  2477. colorpicker.BlackOutline3.ZIndex = 98
  2478. colorpicker.BlackOutline3.Size = colorpicker.MainPicker.Size + UDim2.fromOffset(6, 6)
  2479. colorpicker.BlackOutline3.BorderSizePixel = 0
  2480. colorpicker.BlackOutline3.BackgroundColor3 = window.theme.outlinecolor2
  2481. colorpicker.BlackOutline3.Position = UDim2.fromOffset(- 3, - 3)
  2482. updateevent.Event:Connect(function(theme)
  2483. colorpicker.BlackOutline3.BackgroundColor3 = theme.outlinecolor2
  2484. end)
  2485.  
  2486. colorpicker.Outline2 = Instance.new("Frame", colorpicker.MainPicker)
  2487. colorpicker.Outline2.Name = "blackline"
  2488. colorpicker.Outline2.ZIndex = 98
  2489. colorpicker.Outline2.Size = colorpicker.MainPicker.Size + UDim2.fromOffset(4, 4)
  2490. colorpicker.Outline2.BorderSizePixel = 0
  2491. colorpicker.Outline2.BackgroundColor3 = window.theme.outlinecolor
  2492. colorpicker.Outline2.Position = UDim2.fromOffset(- 2, - 2)
  2493. updateevent.Event:Connect(function(theme)
  2494. colorpicker.Outline2.BackgroundColor3 = theme.outlinecolor
  2495. end)
  2496.  
  2497. colorpicker.BlackOutline3 = Instance.new("Frame", colorpicker.MainPicker)
  2498. colorpicker.BlackOutline3.Name = "blackline"
  2499. colorpicker.BlackOutline3.ZIndex = 98
  2500. colorpicker.BlackOutline3.Size = colorpicker.MainPicker.Size + UDim2.fromOffset(2, 2)
  2501. colorpicker.BlackOutline3.BorderSizePixel = 0
  2502. colorpicker.BlackOutline3.BackgroundColor3 = window.theme.outlinecolor2
  2503. colorpicker.BlackOutline3.Position = UDim2.fromOffset(- 1, - 1)
  2504. updateevent.Event:Connect(function(theme)
  2505. colorpicker.BlackOutline3.BackgroundColor3 = theme.outlinecolor2
  2506. end)
  2507.  
  2508. colorpicker.hue = Instance.new("ImageLabel", colorpicker.MainPicker)
  2509. colorpicker.hue.ZIndex = 101
  2510. colorpicker.hue.Position = UDim2.new(0, 3, 0, 3)
  2511. colorpicker.hue.Size = UDim2.new(0, 172, 0, 172)
  2512. colorpicker.hue.Image = "rbxassetid://4155801252"
  2513. colorpicker.hue.ScaleType = Enum.ScaleType.Stretch
  2514. colorpicker.hue.BackgroundColor3 = Color3.new(1, 0, 0)
  2515. colorpicker.hue.BorderColor3 = window.theme.outlinecolor2
  2516. updateevent.Event:Connect(function(theme)
  2517. colorpicker.hue.BorderColor3 = theme.outlinecolor2
  2518. end)
  2519.  
  2520. colorpicker.hueselectorpointer = Instance.new("ImageLabel", colorpicker.MainPicker)
  2521. colorpicker.hueselectorpointer.ZIndex = 101
  2522. colorpicker.hueselectorpointer.BackgroundTransparency = 1
  2523. colorpicker.hueselectorpointer.BorderSizePixel = 0
  2524. colorpicker.hueselectorpointer.Position = UDim2.new(0, 0, 0, 0)
  2525. colorpicker.hueselectorpointer.Size = UDim2.new(0, 7, 0, 7)
  2526. colorpicker.hueselectorpointer.Image = "rbxassetid://6885856475"
  2527.  
  2528. colorpicker.selector = Instance.new("TextLabel", colorpicker.MainPicker)
  2529. colorpicker.selector.ZIndex = 100
  2530. colorpicker.selector.Position = UDim2.new(0, 3, 0, 181)
  2531. colorpicker.selector.Size = UDim2.new(0, 173, 0, 10)
  2532. colorpicker.selector.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  2533. colorpicker.selector.BorderColor3 = window.theme.outlinecolor2
  2534. colorpicker.selector.Text = ""
  2535. updateevent.Event:Connect(function(theme)
  2536. colorpicker.selector.BorderColor3 = theme.outlinecolor2
  2537. end)
  2538.  
  2539. colorpicker.gradient = Instance.new("UIGradient", colorpicker.selector)
  2540. colorpicker.gradient.Color = ColorSequence.new({
  2541. ColorSequenceKeypoint.new(0, Color3.new(1, 0, 0)),
  2542. ColorSequenceKeypoint.new(0.17, Color3.new(1, 0, 1)),
  2543. ColorSequenceKeypoint.new(0.33, Color3.new(0, 0, 1)),
  2544. ColorSequenceKeypoint.new(0.5, Color3.new(0, 1, 1)),
  2545. ColorSequenceKeypoint.new(0.67, Color3.new(0, 1, 0)),
  2546. ColorSequenceKeypoint.new(0.83, Color3.new(1, 1, 0)),
  2547. ColorSequenceKeypoint.new(1, Color3.new(1, 0, 0))
  2548. })
  2549.  
  2550. colorpicker.pointer = Instance.new("Frame", colorpicker.selector)
  2551. colorpicker.pointer.ZIndex = 101
  2552. colorpicker.pointer.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  2553. colorpicker.pointer.Position = UDim2.new(0, 0, 0, 0)
  2554. colorpicker.pointer.Size = UDim2.new(0, 2, 0, 10)
  2555. colorpicker.pointer.BorderColor3 = Color3.fromRGB(255, 255, 255)
  2556.  
  2557. if colorpicker.flag and colorpicker.flag ~= "" then
  2558. library.flags[colorpicker.flag] = colorpicker.default
  2559. end
  2560.  
  2561. function colorpicker:RefreshSelector()
  2562. local pos = math.clamp((mouse.X - colorpicker.hue.AbsolutePosition.X) / colorpicker.hue.AbsoluteSize.X, 0, 1)
  2563. colorpicker.color = 1 - pos
  2564. colorpicker.pointer:TweenPosition(UDim2.new(pos, 0, 0, 0), Enum.EasingDirection.In, Enum.EasingStyle.Sine, 0.05)
  2565. colorpicker.hue.BackgroundColor3 = Color3.fromHSV(1 - pos, 1, 1)
  2566. end
  2567.  
  2568. function colorpicker:RefreshHue()
  2569. local x = (mouse.X - colorpicker.hue.AbsolutePosition.X) / colorpicker.hue.AbsoluteSize.X
  2570. local y = (mouse.Y - colorpicker.hue.AbsolutePosition.Y) / colorpicker.hue.AbsoluteSize.Y
  2571. colorpicker.hueselectorpointer:TweenPosition(UDim2.new(math.clamp(x * colorpicker.hue.AbsoluteSize.X, 0.5, 0.952 * colorpicker.hue.AbsoluteSize.X) / colorpicker.hue.AbsoluteSize.X, 0, math.clamp(y * colorpicker.hue.AbsoluteSize.Y, 0.5, 0.885 * colorpicker.hue.AbsoluteSize.Y) / colorpicker.hue.AbsoluteSize.Y, 0), Enum.EasingDirection.In, Enum.EasingStyle.Sine, 0.05)
  2572. colorpicker:Set(Color3.fromHSV(colorpicker.color, math.clamp(x * colorpicker.hue.AbsoluteSize.X, 0.5, 1 * colorpicker.hue.AbsoluteSize.X) / colorpicker.hue.AbsoluteSize.X, 1 - (math.clamp(y * colorpicker.hue.AbsoluteSize.Y, 0.5, 1 * colorpicker.hue.AbsoluteSize.Y) / colorpicker.hue.AbsoluteSize.Y)))
  2573. end
  2574.  
  2575. function colorpicker:Set(value)
  2576. local color = Color3.new(math.clamp(value.r, 0, 1), math.clamp(value.g, 0, 1), math.clamp(value.b, 0, 1))
  2577. colorpicker.value = color
  2578.  
  2579. if colorpicker.flag and colorpicker.flag ~= "" then
  2580. library.flags[colorpicker.flag] = color
  2581. end
  2582.  
  2583. local clr = Color3.new(math.clamp(color.R / 1.7, 0, 1), math.clamp(color.G / 1.7, 0, 1), math.clamp(color.B / 1.7, 0, 1))
  2584. colorpicker.Gradient.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, color), ColorSequenceKeypoint.new(1, clr)})
  2585. pcall(colorpicker.callback, color)
  2586. end
  2587.  
  2588. function colorpicker:Get()
  2589. return colorpicker.value
  2590. end
  2591.  
  2592. colorpicker:Set(colorpicker.default)
  2593.  
  2594. function colorpicker:AddDropdown(items, default, multichoice, callback, flag)
  2595. local dropdown = {}
  2596.  
  2597. dropdown.defaultitems = items or {}
  2598. dropdown.default = default
  2599. dropdown.callback = callback or function() end
  2600. dropdown.multichoice = multichoice or false
  2601. dropdown.values = {}
  2602. dropdown.flag = flag or ((colorpicker.text or "") .. #sector.Items:GetChildren())
  2603.  
  2604. dropdown.Main = Instance.new("TextButton", sector.Items)
  2605. dropdown.Main.Name = "dropdown"
  2606. dropdown.Main.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  2607. dropdown.Main.BorderSizePixel = 0
  2608. dropdown.Main.Size = UDim2.fromOffset(sector.Main.Size.X.Offset - 12, 16)
  2609. dropdown.Main.Position = UDim2.fromOffset(0, 0)
  2610. dropdown.Main.ZIndex = 5
  2611. dropdown.Main.AutoButtonColor = false
  2612. dropdown.Main.Font = window.theme.font
  2613. dropdown.Main.Text = ""
  2614. dropdown.Main.TextColor3 = Color3.fromRGB(255, 255, 255)
  2615. dropdown.Main.TextSize = 15
  2616. dropdown.Main.TextXAlignment = Enum.TextXAlignment.Left
  2617. updateevent.Event:Connect(function(theme)
  2618. dropdown.Main.Font = theme.font
  2619. end)
  2620.  
  2621. dropdown.Gradient = Instance.new("UIGradient", dropdown.Main)
  2622. dropdown.Gradient.Rotation = 90
  2623. dropdown.Gradient.Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(49, 49, 49)), ColorSequenceKeypoint.new(1, Color3.fromRGB(39, 39, 39))}
  2624.  
  2625. dropdown.SelectedLabel = Instance.new("TextLabel", dropdown.Main)
  2626. dropdown.SelectedLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  2627. dropdown.SelectedLabel.BackgroundTransparency = 1
  2628. dropdown.SelectedLabel.Position = UDim2.fromOffset(5, 2)
  2629. dropdown.SelectedLabel.Size = UDim2.fromOffset(130, 13)
  2630. dropdown.SelectedLabel.Font = window.theme.font
  2631. dropdown.SelectedLabel.Text = colorpicker.text
  2632. dropdown.SelectedLabel.ZIndex = 5
  2633. dropdown.SelectedLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  2634. dropdown.SelectedLabel.TextSize = 15
  2635. dropdown.SelectedLabel.TextStrokeTransparency = 1
  2636. dropdown.SelectedLabel.TextXAlignment = Enum.TextXAlignment.Left
  2637. updateevent.Event:Connect(function(theme)
  2638. dropdown.SelectedLabel.Font = theme.font
  2639. end)
  2640.  
  2641. dropdown.Nav = Instance.new("ImageButton", dropdown.Main)
  2642. dropdown.Nav.Name = "navigation"
  2643. dropdown.Nav.BackgroundTransparency = 1
  2644. dropdown.Nav.LayoutOrder = 10
  2645. dropdown.Nav.Position = UDim2.fromOffset(sector.Main.Size.X.Offset - 26, 5)
  2646. dropdown.Nav.Rotation = 90
  2647. dropdown.Nav.ZIndex = 5
  2648. dropdown.Nav.Size = UDim2.fromOffset(8, 8)
  2649. dropdown.Nav.Image = "rbxassetid://4918373417"
  2650. dropdown.Nav.ImageColor3 = Color3.fromRGB(210, 210, 210)
  2651.  
  2652. dropdown.BlackOutline2 = Instance.new("Frame", dropdown.Main)
  2653. dropdown.BlackOutline2.Name = "blackline"
  2654. dropdown.BlackOutline2.ZIndex = 4
  2655. dropdown.BlackOutline2.Size = dropdown.Main.Size + UDim2.fromOffset(6, 6)
  2656. dropdown.BlackOutline2.BorderSizePixel = 0
  2657. dropdown.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  2658. dropdown.BlackOutline2.Position = UDim2.fromOffset(- 3, - 3)
  2659. updateevent.Event:Connect(function(theme)
  2660. dropdown.BlackOutline2.BackgroundColor3 = theme.outlinecolor2
  2661. end)
  2662.  
  2663. dropdown.Outline = Instance.new("Frame", dropdown.Main)
  2664. dropdown.Outline.Name = "blackline"
  2665. dropdown.Outline.ZIndex = 4
  2666. dropdown.Outline.Size = dropdown.Main.Size + UDim2.fromOffset(4, 4)
  2667. dropdown.Outline.BorderSizePixel = 0
  2668. dropdown.Outline.BackgroundColor3 = window.theme.outlinecolor
  2669. dropdown.Outline.Position = UDim2.fromOffset(- 2, - 2)
  2670. updateevent.Event:Connect(function(theme)
  2671. dropdown.Outline.BackgroundColor3 = theme.outlinecolor
  2672. end)
  2673.  
  2674. dropdown.BlackOutline = Instance.new("Frame", dropdown.Main)
  2675. dropdown.BlackOutline.Name = "blackline"
  2676. dropdown.BlackOutline.ZIndex = 4
  2677. dropdown.BlackOutline.Size = dropdown.Main.Size + UDim2.fromOffset(2, 2)
  2678. dropdown.BlackOutline.BorderSizePixel = 0
  2679. dropdown.BlackOutline.BackgroundColor3 = window.theme.outlinecolor2
  2680. dropdown.BlackOutline.Position = UDim2.fromOffset(- 1, - 1)
  2681. updateevent.Event:Connect(function(theme)
  2682. dropdown.BlackOutline.BackgroundColor3 = theme.outlinecolor2
  2683. end)
  2684.  
  2685. dropdown.ItemsFrame = Instance.new("ScrollingFrame", dropdown.Main)
  2686. dropdown.ItemsFrame.Name = "itemsframe"
  2687. dropdown.ItemsFrame.BorderSizePixel = 0
  2688. dropdown.ItemsFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  2689. dropdown.ItemsFrame.Position = UDim2.fromOffset(0, dropdown.Main.Size.Y.Offset + 8)
  2690. dropdown.ItemsFrame.ScrollBarThickness = 2
  2691. dropdown.ItemsFrame.ZIndex = 8
  2692. dropdown.ItemsFrame.ScrollingDirection = "Y"
  2693. dropdown.ItemsFrame.Visible = false
  2694. dropdown.ItemsFrame.CanvasSize = UDim2.fromOffset(dropdown.Main.AbsoluteSize.X, 0)
  2695.  
  2696. dropdown.ListLayout = Instance.new("UIListLayout", dropdown.ItemsFrame)
  2697. dropdown.ListLayout.FillDirection = Enum.FillDirection.Vertical
  2698. dropdown.ListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  2699.  
  2700. dropdown.ListPadding = Instance.new("UIPadding", dropdown.ItemsFrame)
  2701. dropdown.ListPadding.PaddingTop = UDim.new(0, 2)
  2702. dropdown.ListPadding.PaddingBottom = UDim.new(0, 2)
  2703. dropdown.ListPadding.PaddingLeft = UDim.new(0, 2)
  2704. dropdown.ListPadding.PaddingRight = UDim.new(0, 2)
  2705.  
  2706. dropdown.BlackOutline2Items = Instance.new("Frame", dropdown.Main)
  2707. dropdown.BlackOutline2Items.Name = "blackline"
  2708. dropdown.BlackOutline2Items.ZIndex = 7
  2709. dropdown.BlackOutline2Items.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(6, 6)
  2710. dropdown.BlackOutline2Items.BorderSizePixel = 0
  2711. dropdown.BlackOutline2Items.BackgroundColor3 = window.theme.outlinecolor2
  2712. dropdown.BlackOutline2Items.Position = dropdown.ItemsFrame.Position + UDim2.fromOffset(- 3, - 3)
  2713. dropdown.BlackOutline2Items.Visible = false
  2714. updateevent.Event:Connect(function(theme)
  2715. dropdown.BlackOutline2Items.BackgroundColor3 = theme.outlinecolor2
  2716. end)
  2717.  
  2718. dropdown.OutlineItems = Instance.new("Frame", dropdown.Main)
  2719. dropdown.OutlineItems.Name = "blackline"
  2720. dropdown.OutlineItems.ZIndex = 7
  2721. dropdown.OutlineItems.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(4, 4)
  2722. dropdown.OutlineItems.BorderSizePixel = 0
  2723. dropdown.OutlineItems.BackgroundColor3 = window.theme.outlinecolor
  2724. dropdown.OutlineItems.Position = dropdown.ItemsFrame.Position + UDim2.fromOffset(- 2, - 2)
  2725. dropdown.OutlineItems.Visible = false
  2726. updateevent.Event:Connect(function(theme)
  2727. dropdown.OutlineItems.BackgroundColor3 = theme.outlinecolor
  2728. end)
  2729.  
  2730. dropdown.BlackOutlineItems = Instance.new("Frame", dropdown.Main)
  2731. dropdown.BlackOutlineItems.Name = "blackline"
  2732. dropdown.BlackOutlineItems.ZIndex = 7
  2733. dropdown.BlackOutlineItems.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(- 2, - 2)
  2734. dropdown.BlackOutlineItems.BorderSizePixel = 0
  2735. dropdown.BlackOutlineItems.BackgroundColor3 = window.theme.outlinecolor2
  2736. dropdown.BlackOutlineItems.Position = dropdown.ItemsFrame.Position + UDim2.fromOffset(- 1, - 1)
  2737. dropdown.BlackOutlineItems.Visible = false
  2738. updateevent.Event:Connect(function(theme)
  2739. dropdown.BlackOutlineItems.BackgroundColor3 = theme.outlinecolor2
  2740. end)
  2741.  
  2742. dropdown.IgnoreBackButtons = Instance.new("TextButton", dropdown.Main)
  2743. dropdown.IgnoreBackButtons.BackgroundTransparency = 1
  2744. dropdown.IgnoreBackButtons.BorderSizePixel = 0
  2745. dropdown.IgnoreBackButtons.Position = UDim2.fromOffset(0, dropdown.Main.Size.Y.Offset + 8)
  2746. dropdown.IgnoreBackButtons.Size = UDim2.new(0, 0, 0, 0)
  2747. dropdown.IgnoreBackButtons.ZIndex = 7
  2748. dropdown.IgnoreBackButtons.Text = ""
  2749. dropdown.IgnoreBackButtons.Visible = false
  2750. dropdown.IgnoreBackButtons.AutoButtonColor = false
  2751.  
  2752. if dropdown.flag and dropdown.flag ~= "" then
  2753. library.flags[dropdown.flag] = dropdown.multichoice and {dropdown.default or dropdown.defaultitems[1] or ""} or (dropdown.default or dropdown.defaultitems[1] or "")
  2754. end
  2755.  
  2756. function dropdown:isSelected(item)
  2757. for i, v in pairs(dropdown.values) do
  2758. if v == item then
  2759. return true
  2760. end
  2761. end
  2762.  
  2763. return false
  2764. end
  2765.  
  2766. function dropdown:updateText(text)
  2767. if #text >= 27 then
  2768. text = text:sub(1, 25) .. ".."
  2769. end
  2770. dropdown.SelectedLabel.Text = text
  2771. end
  2772.  
  2773. dropdown.Changed = Instance.new("BindableEvent")
  2774. function dropdown:Set(value)
  2775. if type(value) == "table" then
  2776. dropdown.values = value
  2777. dropdown:updateText(table.concat(value, ", "))
  2778. pcall(dropdown.callback, value)
  2779. else
  2780. dropdown:updateText(value)
  2781. dropdown.values = {value}
  2782. pcall(dropdown.callback, value)
  2783. end
  2784.  
  2785. dropdown.Changed:Fire(value)
  2786. if dropdown.flag and dropdown.flag ~= "" then
  2787. library.flags[dropdown.flag] = dropdown.multichoice and dropdown.values or dropdown.values[1]
  2788. end
  2789. end
  2790.  
  2791. function dropdown:Get()
  2792. return dropdown.multichoice and dropdown.values or dropdown.values[1]
  2793. end
  2794.  
  2795. dropdown.items = {}
  2796. function dropdown:Add(v)
  2797. local Item = Instance.new("TextButton", dropdown.ItemsFrame)
  2798. Item.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  2799. Item.TextColor3 = Color3.fromRGB(255, 255, 255)
  2800. Item.BorderSizePixel = 0
  2801. Item.Position = UDim2.fromOffset(0, 0)
  2802. Item.Size = UDim2.fromOffset(dropdown.Main.Size.X.Offset - 4, 20)
  2803. Item.ZIndex = 9
  2804. Item.Text = v
  2805. Item.Name = v
  2806. Item.AutoButtonColor = false
  2807. Item.Font = window.theme.font
  2808. Item.TextSize = 15
  2809. Item.TextXAlignment = Enum.TextXAlignment.Left
  2810. Item.TextStrokeTransparency = 1
  2811. dropdown.ItemsFrame.CanvasSize = dropdown.ItemsFrame.CanvasSize + UDim2.fromOffset(0, Item.AbsoluteSize.Y)
  2812.  
  2813. Item.MouseButton1Down:Connect(function()
  2814. if dropdown.multichoice then
  2815. if dropdown:isSelected(v) then
  2816. for i2, v2 in pairs(dropdown.values) do
  2817. if v2 == v then
  2818. table.remove(dropdown.values, i2)
  2819. end
  2820. end
  2821. dropdown:Set(dropdown.values)
  2822. else
  2823. table.insert(dropdown.values, v)
  2824. dropdown:Set(dropdown.values)
  2825. end
  2826.  
  2827. return
  2828. else
  2829. dropdown.Nav.Rotation = 90
  2830. dropdown.ItemsFrame.Visible = false
  2831. dropdown.ItemsFrame.Active = false
  2832. dropdown.OutlineItems.Visible = false
  2833. dropdown.BlackOutlineItems.Visible = false
  2834. dropdown.BlackOutline2Items.Visible = false
  2835. dropdown.IgnoreBackButtons.Visible = false
  2836. dropdown.IgnoreBackButtons.Active = false
  2837. end
  2838.  
  2839. dropdown:Set(v)
  2840.  
  2841. return
  2842. end)
  2843.  
  2844. runservice.RenderStepped:Connect(function()
  2845. if dropdown.multichoice and dropdown:isSelected(v) or dropdown.values[1] == v then
  2846. Item.BackgroundColor3 = Color3.fromRGB(64, 64, 64)
  2847. Item.TextColor3 = window.theme.accentcolor
  2848. Item.Text = " " .. v
  2849. else
  2850. Item.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  2851. Item.TextColor3 = Color3.fromRGB(255, 255, 255)
  2852. Item.Text = v
  2853. end
  2854. end)
  2855.  
  2856. table.insert(dropdown.items, v)
  2857. dropdown.ItemsFrame.Size = UDim2.fromOffset(dropdown.Main.Size.X.Offset, math.clamp(#dropdown.items * Item.AbsoluteSize.Y, 20, 156) + 4)
  2858. dropdown.ItemsFrame.CanvasSize = UDim2.fromOffset(dropdown.ItemsFrame.AbsoluteSize.X, (#dropdown.items * Item.AbsoluteSize.Y) + 4)
  2859.  
  2860. dropdown.OutlineItems.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(4, 4)
  2861. dropdown.BlackOutlineItems.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(2, 2)
  2862. dropdown.BlackOutline2Items.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(6, 6)
  2863. dropdown.IgnoreBackButtons.Size = dropdown.ItemsFrame.Size
  2864. end
  2865.  
  2866. function dropdown:Remove(value)
  2867. local item = dropdown.ItemsFrame:FindFirstChild(value)
  2868. if item then
  2869. for i, v in pairs(dropdown.items) do
  2870. if v == value then
  2871. table.remove(dropdown.items, i)
  2872. end
  2873. end
  2874.  
  2875. dropdown.ItemsFrame.Size = UDim2.fromOffset(dropdown.Main.Size.X.Offset, math.clamp(#dropdown.items * item.AbsoluteSize.Y, 20, 156) + 4)
  2876. dropdown.ItemsFrame.CanvasSize = UDim2.fromOffset(dropdown.ItemsFrame.AbsoluteSize.X, (#dropdown.items * item.AbsoluteSize.Y) + 4)
  2877.  
  2878. dropdown.OutlineItems.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(2, 2)
  2879. dropdown.BlackOutlineItems.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(4, 4)
  2880. dropdown.BlackOutline2Items.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(6, 6)
  2881. dropdown.IgnoreBackButtons.Size = dropdown.ItemsFrame.Size
  2882.  
  2883. item:Remove()
  2884. end
  2885. end
  2886.  
  2887. for i, v in pairs(dropdown.defaultitems) do
  2888. dropdown:Add(v)
  2889. end
  2890.  
  2891. if dropdown.default then
  2892. dropdown:Set(dropdown.default)
  2893. end
  2894.  
  2895. local MouseButton1Down = function()
  2896. if dropdown.Nav.Rotation == 90 then
  2897. dropdown.ItemsFrame.ScrollingEnabled = true
  2898. sector.Main.Parent.ScrollingEnabled = false
  2899. tweenservice:Create(dropdown.Nav, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {Rotation = - 90}):Play()
  2900. dropdown.ItemsFrame.Visible = true
  2901. dropdown.ItemsFrame.Active = true
  2902. dropdown.IgnoreBackButtons.Visible = true
  2903. dropdown.IgnoreBackButtons.Active = true
  2904. dropdown.OutlineItems.Visible = true
  2905. dropdown.BlackOutlineItems.Visible = true
  2906. dropdown.BlackOutline2Items.Visible = true
  2907. else
  2908. dropdown.ItemsFrame.ScrollingEnabled = false
  2909. sector.Main.Parent.ScrollingEnabled = true
  2910. tweenservice:Create(dropdown.Nav, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {Rotation = 90}):Play()
  2911. dropdown.ItemsFrame.Visible = false
  2912. dropdown.ItemsFrame.Active = false
  2913. dropdown.IgnoreBackButtons.Visible = false
  2914. dropdown.IgnoreBackButtons.Active = false
  2915. dropdown.OutlineItems.Visible = false
  2916. dropdown.BlackOutlineItems.Visible = false
  2917. dropdown.BlackOutline2Items.Visible = false
  2918. end
  2919. end
  2920.  
  2921. dropdown.Main.MouseButton1Down:Connect(MouseButton1Down)
  2922. dropdown.Nav.MouseButton1Down:Connect(MouseButton1Down)
  2923.  
  2924. dropdown.BlackOutline2.MouseEnter:Connect(function()
  2925. dropdown.BlackOutline2.BackgroundColor3 = window.theme.accentcolor
  2926. end)
  2927. dropdown.BlackOutline2.MouseLeave:Connect(function()
  2928. dropdown.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  2929. end)
  2930.  
  2931. sector:FixSize()
  2932. table.insert(library.items, dropdown)
  2933.  
  2934. return dropdown
  2935. end
  2936.  
  2937. local dragging_selector = false
  2938. local dragging_hue = false
  2939.  
  2940. colorpicker.selector.InputBegan:Connect(function(input)
  2941. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  2942. dragging_selector = true
  2943. colorpicker:RefreshSelector()
  2944. end
  2945. end)
  2946.  
  2947. colorpicker.selector.InputEnded:Connect(function(input)
  2948. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  2949. dragging_selector = false
  2950. colorpicker:RefreshSelector()
  2951. end
  2952. end)
  2953.  
  2954. colorpicker.hue.InputBegan:Connect(function(input)
  2955. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  2956. dragging_hue = true
  2957. colorpicker:RefreshHue()
  2958. end
  2959. end)
  2960.  
  2961. colorpicker.hue.InputEnded:Connect(function(input)
  2962. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  2963. dragging_hue = false
  2964. colorpicker:RefreshHue()
  2965. end
  2966. end)
  2967.  
  2968. uis.InputChanged:Connect(function(input)
  2969. if dragging_selector and input.UserInputType == Enum.UserInputType.MouseMovement then
  2970. colorpicker:RefreshSelector()
  2971. end
  2972. if dragging_hue and input.UserInputType == Enum.UserInputType.MouseMovement then
  2973. colorpicker:RefreshHue()
  2974. end
  2975. end)
  2976.  
  2977. local inputBegan = function(input)
  2978. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  2979. for i, v in pairs(window.OpenedColorPickers) do
  2980. if v and i ~= colorpicker.MainPicker then
  2981. i.Visible = false
  2982. window.OpenedColorPickers[i] = false
  2983. end
  2984. end
  2985.  
  2986. colorpicker.MainPicker.Visible = not colorpicker.MainPicker.Visible
  2987. window.OpenedColorPickers[colorpicker.MainPicker] = colorpicker.MainPicker.Visible
  2988. if window.OpenedColorPickers[colorpicker.MainPicker] then
  2989. colorpicker.BlackOutline2.BackgroundColor3 = window.theme.accentcolor
  2990. else
  2991. colorpicker.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  2992. end
  2993. end
  2994. end
  2995.  
  2996. colorpicker.Main.InputBegan:Connect(inputBegan)
  2997. colorpicker.Outline.InputBegan:Connect(inputBegan)
  2998. colorpicker.BlackOutline2.InputBegan:Connect(inputBegan)
  2999.  
  3000. sector:FixSize()
  3001. table.insert(library.items, colorpicker)
  3002.  
  3003. return colorpicker
  3004. end
  3005.  
  3006. function sector:AddKeybind(text, default, newkeycallback, callback, flag)
  3007. local keybind = {}
  3008.  
  3009. keybind.text = text or ""
  3010. keybind.default = default or "None"
  3011. keybind.callback = callback or function() end
  3012. keybind.newkeycallback = newkeycallback or function(key) end
  3013. keybind.flag = flag or text or ""
  3014.  
  3015. keybind.value = keybind.default
  3016.  
  3017. keybind.Main = Instance.new("TextLabel", sector.Items)
  3018. keybind.Main.BackgroundTransparency = 1
  3019. keybind.Main.Size = UDim2.fromOffset(156, 10)
  3020. keybind.Main.ZIndex = 4
  3021. keybind.Main.Font = window.theme.font
  3022. keybind.Main.Text = keybind.text
  3023. keybind.Main.TextColor3 = window.theme.itemscolor
  3024. keybind.Main.TextSize = 15
  3025. keybind.Main.TextStrokeTransparency = 1
  3026. keybind.Main.TextXAlignment = Enum.TextXAlignment.Left
  3027. updateevent.Event:Connect(function(theme)
  3028. keybind.Main.Font = theme.font
  3029. keybind.Main.TextColor3 = theme.itemscolor
  3030. end)
  3031.  
  3032. keybind.Bind = Instance.new("TextButton", keybind.Main)
  3033. keybind.Bind.Name = "keybind"
  3034. keybind.Bind.BackgroundTransparency = 1
  3035. keybind.Bind.BorderColor3 = window.theme.outlinecolor
  3036. keybind.Bind.ZIndex = 5
  3037. keybind.Bind.BorderSizePixel = 0
  3038. keybind.Bind.Position = UDim2.fromOffset(sector.Main.Size.X.Offset - 10, 0)
  3039. keybind.Bind.Font = window.theme.font
  3040. keybind.Bind.TextColor3 = Color3.fromRGB(136, 136, 136)
  3041. keybind.Bind.TextSize = 15
  3042. keybind.Bind.TextXAlignment = Enum.TextXAlignment.Right
  3043. keybind.Bind.MouseButton1Down:Connect(function()
  3044. keybind.Bind.Text = "[...]"
  3045. keybind.Bind.TextColor3 = window.theme.accentcolor
  3046. end)
  3047. updateevent.Event:Connect(function(theme)
  3048. keybind.Bind.BorderColor3 = theme.outlinecolor
  3049. keybind.Bind.Font = theme.font
  3050. end)
  3051.  
  3052. if keybind.flag and keybind.flag ~= "" then
  3053. library.flags[keybind.flag] = keybind.default
  3054. end
  3055.  
  3056. local shorter_keycodes = {
  3057. ["LeftShift"] = "LSHIFT",
  3058. ["RightShift"] = "RSHIFT",
  3059. ["LeftControl"] = "LCTRL",
  3060. ["RightControl"] = "RCTRL",
  3061. ["LeftAlt"] = "LALT",
  3062. ["RightAlt"] = "RALT"
  3063. }
  3064.  
  3065. function keybind:Set(value)
  3066. if value == "None" then
  3067. keybind.value = value
  3068. keybind.Bind.Text = "[" .. value .. "]"
  3069.  
  3070. local size = textservice:GetTextSize(keybind.Bind.Text, keybind.Bind.TextSize, keybind.Bind.Font, Vector2.new(2000, 2000))
  3071. keybind.Bind.Size = UDim2.fromOffset(size.X, size.Y)
  3072. keybind.Bind.Position = UDim2.fromOffset(sector.Main.Size.X.Offset - 10 - keybind.Bind.AbsoluteSize.X, 0)
  3073. if keybind.flag and keybind.flag ~= "" then
  3074. library.flags[keybind.flag] = value
  3075. end
  3076. pcall(keybind.newkeycallback, value)
  3077. end
  3078.  
  3079. keybind.value = value
  3080. keybind.Bind.Text = "[" .. (shorter_keycodes[value.Name or value] or (value.Name or value)) .. "]"
  3081.  
  3082. local size = textservice:GetTextSize(keybind.Bind.Text, keybind.Bind.TextSize, keybind.Bind.Font, Vector2.new(2000, 2000))
  3083. keybind.Bind.Size = UDim2.fromOffset(size.X, size.Y)
  3084. keybind.Bind.Position = UDim2.fromOffset(sector.Main.Size.X.Offset - 10 - keybind.Bind.AbsoluteSize.X, 0)
  3085. if keybind.flag and keybind.flag ~= "" then
  3086. library.flags[keybind.flag] = value
  3087. end
  3088. pcall(keybind.newkeycallback, value)
  3089. end
  3090. keybind:Set(keybind.default and keybind.default or "None")
  3091.  
  3092. function keybind:Get()
  3093. return keybind.value
  3094. end
  3095.  
  3096. uis.InputBegan:Connect(function(input, gameProcessed)
  3097. if not gameProcessed then
  3098. if keybind.Bind.Text == "[...]" then
  3099. keybind.Bind.TextColor3 = Color3.fromRGB(136, 136, 136)
  3100. if input.UserInputType == Enum.UserInputType.Keyboard then
  3101. keybind:Set(input.KeyCode)
  3102. else
  3103. keybind:Set("None")
  3104. end
  3105. else
  3106. if keybind.value ~= "None" and input.KeyCode == keybind.value then
  3107. pcall(keybind.callback)
  3108. end
  3109. end
  3110. end
  3111. end)
  3112.  
  3113. sector:FixSize()
  3114. table.insert(library.items, keybind)
  3115.  
  3116. return keybind
  3117. end
  3118.  
  3119. function sector:AddDropdown(text, items, default, multichoice, callback, flag)
  3120. local dropdown = {}
  3121.  
  3122. dropdown.text = text or ""
  3123. dropdown.defaultitems = items or {}
  3124. dropdown.default = default
  3125. dropdown.callback = callback or function() end
  3126. dropdown.multichoice = multichoice or false
  3127. dropdown.values = {}
  3128. dropdown.flag = flag or text or ""
  3129.  
  3130. dropdown.MainBack = Instance.new("Frame", sector.Items)
  3131. dropdown.MainBack.Name = "backlabel"
  3132. dropdown.MainBack.ZIndex = 7
  3133. dropdown.MainBack.Size = UDim2.fromOffset(sector.Main.Size.X.Offset - 12, 34)
  3134. dropdown.MainBack.BorderSizePixel = 0
  3135. dropdown.MainBack.BackgroundTransparency = 1
  3136.  
  3137. dropdown.Label = Instance.new("TextLabel", dropdown.MainBack)
  3138. dropdown.Label.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  3139. dropdown.Label.BackgroundTransparency = 1
  3140. dropdown.Label.Size = UDim2.fromOffset(sector.Main.Size.X.Offset - 12, 10)
  3141. dropdown.Label.Position = UDim2.fromOffset(0, 0)
  3142. dropdown.Label.Font = window.theme.font
  3143. dropdown.Label.Text = dropdown.text
  3144. dropdown.Label.ZIndex = 4
  3145. dropdown.Label.TextColor3 = window.theme.itemscolor
  3146. dropdown.Label.TextSize = 15
  3147. dropdown.Label.TextStrokeTransparency = 1
  3148. dropdown.Label.TextXAlignment = Enum.TextXAlignment.Left
  3149.  
  3150. updateevent.Event:Connect(function(theme)
  3151. dropdown.Label.Font = theme.font
  3152. dropdown.Label.TextColor3 = theme.itemscolor
  3153. end)
  3154.  
  3155. dropdown.Main = Instance.new("TextButton", dropdown.MainBack)
  3156. dropdown.Main.Name = "dropdown"
  3157. dropdown.Main.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  3158. dropdown.Main.BorderSizePixel = 0
  3159. dropdown.Main.Size = UDim2.fromOffset(sector.Main.Size.X.Offset - 12, 16)
  3160. dropdown.Main.Position = UDim2.fromOffset(0, 17)
  3161. dropdown.Main.ZIndex = 5
  3162. dropdown.Main.AutoButtonColor = false
  3163. dropdown.Main.Font = window.theme.font
  3164. dropdown.Main.Text = ""
  3165. dropdown.Main.TextColor3 = Color3.fromRGB(255, 255, 255)
  3166. dropdown.Main.TextSize = 15
  3167. dropdown.Main.TextXAlignment = Enum.TextXAlignment.Left
  3168. updateevent.Event:Connect(function(theme)
  3169. dropdown.Main.Font = theme.font
  3170. end)
  3171.  
  3172. dropdown.Gradient = Instance.new("UIGradient", dropdown.Main)
  3173. dropdown.Gradient.Rotation = 90
  3174. dropdown.Gradient.Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(49, 49, 49)), ColorSequenceKeypoint.new(1, Color3.fromRGB(39, 39, 39))}
  3175.  
  3176. dropdown.SelectedLabel = Instance.new("TextLabel", dropdown.Main)
  3177. dropdown.SelectedLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  3178. dropdown.SelectedLabel.BackgroundTransparency = 1
  3179. dropdown.SelectedLabel.Position = UDim2.fromOffset(5, 2)
  3180. dropdown.SelectedLabel.Size = UDim2.fromOffset(130, 13)
  3181. dropdown.SelectedLabel.Font = window.theme.font
  3182. dropdown.SelectedLabel.Text = dropdown.text
  3183. dropdown.SelectedLabel.ZIndex = 5
  3184. dropdown.SelectedLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  3185. dropdown.SelectedLabel.TextSize = 15
  3186. dropdown.SelectedLabel.TextStrokeTransparency = 1
  3187. dropdown.SelectedLabel.TextXAlignment = Enum.TextXAlignment.Left
  3188. updateevent.Event:Connect(function(theme)
  3189. dropdown.SelectedLabel.Font = theme.font
  3190. end)
  3191.  
  3192. dropdown.Nav = Instance.new("ImageButton", dropdown.Main)
  3193. dropdown.Nav.Name = "navigation"
  3194. dropdown.Nav.BackgroundTransparency = 1
  3195. dropdown.Nav.LayoutOrder = 10
  3196. dropdown.Nav.Position = UDim2.fromOffset(sector.Main.Size.X.Offset - 26, 5)
  3197. dropdown.Nav.Rotation = 90
  3198. dropdown.Nav.ZIndex = 5
  3199. dropdown.Nav.Size = UDim2.fromOffset(8, 8)
  3200. dropdown.Nav.Image = "rbxassetid://4918373417"
  3201. dropdown.Nav.ImageColor3 = Color3.fromRGB(210, 210, 210)
  3202.  
  3203. dropdown.BlackOutline2 = Instance.new("Frame", dropdown.Main)
  3204. dropdown.BlackOutline2.Name = "blackline"
  3205. dropdown.BlackOutline2.ZIndex = 4
  3206. dropdown.BlackOutline2.Size = dropdown.Main.Size + UDim2.fromOffset(6, 6)
  3207. dropdown.BlackOutline2.BorderSizePixel = 0
  3208. dropdown.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  3209. dropdown.BlackOutline2.Position = UDim2.fromOffset(- 3, - 3)
  3210. updateevent.Event:Connect(function(theme)
  3211. dropdown.BlackOutline2.BackgroundColor3 = theme.outlinecolor2
  3212. end)
  3213.  
  3214. dropdown.Outline = Instance.new("Frame", dropdown.Main)
  3215. dropdown.Outline.Name = "blackline"
  3216. dropdown.Outline.ZIndex = 4
  3217. dropdown.Outline.Size = dropdown.Main.Size + UDim2.fromOffset(4, 4)
  3218. dropdown.Outline.BorderSizePixel = 0
  3219. dropdown.Outline.BackgroundColor3 = window.theme.outlinecolor
  3220. dropdown.Outline.Position = UDim2.fromOffset(- 2, - 2)
  3221. updateevent.Event:Connect(function(theme)
  3222. dropdown.Outline.BackgroundColor3 = theme.outlinecolor
  3223. end)
  3224.  
  3225. dropdown.BlackOutline = Instance.new("Frame", dropdown.Main)
  3226. dropdown.BlackOutline.Name = "blackline"
  3227. dropdown.BlackOutline.ZIndex = 4
  3228. dropdown.BlackOutline.Size = dropdown.Main.Size + UDim2.fromOffset(2, 2)
  3229. dropdown.BlackOutline.BorderSizePixel = 0
  3230. dropdown.BlackOutline.BackgroundColor3 = window.theme.outlinecolor2
  3231. dropdown.BlackOutline.Position = UDim2.fromOffset(- 1, - 1)
  3232. updateevent.Event:Connect(function(theme)
  3233. dropdown.BlackOutline.BackgroundColor3 = theme.outlinecolor2
  3234. end)
  3235.  
  3236. dropdown.ItemsFrame = Instance.new("ScrollingFrame", dropdown.Main)
  3237. dropdown.ItemsFrame.Name = "itemsframe"
  3238. dropdown.ItemsFrame.BorderSizePixel = 0
  3239. dropdown.ItemsFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  3240. dropdown.ItemsFrame.Position = UDim2.fromOffset(0, dropdown.Main.Size.Y.Offset + 8)
  3241. dropdown.ItemsFrame.ScrollBarThickness = 2
  3242. dropdown.ItemsFrame.ZIndex = 8
  3243. dropdown.ItemsFrame.ScrollingDirection = "Y"
  3244. dropdown.ItemsFrame.Visible = false
  3245. dropdown.ItemsFrame.CanvasSize = UDim2.fromOffset(dropdown.Main.AbsoluteSize.X, 0)
  3246.  
  3247. dropdown.ListLayout = Instance.new("UIListLayout", dropdown.ItemsFrame)
  3248. dropdown.ListLayout.FillDirection = Enum.FillDirection.Vertical
  3249. dropdown.ListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  3250.  
  3251. dropdown.ListPadding = Instance.new("UIPadding", dropdown.ItemsFrame)
  3252. dropdown.ListPadding.PaddingTop = UDim.new(0, 2)
  3253. dropdown.ListPadding.PaddingBottom = UDim.new(0, 2)
  3254. dropdown.ListPadding.PaddingLeft = UDim.new(0, 2)
  3255. dropdown.ListPadding.PaddingRight = UDim.new(0, 2)
  3256.  
  3257. dropdown.BlackOutline2Items = Instance.new("Frame", dropdown.Main)
  3258. dropdown.BlackOutline2Items.Name = "blackline"
  3259. dropdown.BlackOutline2Items.ZIndex = 7
  3260. dropdown.BlackOutline2Items.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(6, 6)
  3261. dropdown.BlackOutline2Items.BorderSizePixel = 0
  3262. dropdown.BlackOutline2Items.BackgroundColor3 = window.theme.outlinecolor2
  3263. dropdown.BlackOutline2Items.Position = dropdown.ItemsFrame.Position + UDim2.fromOffset(- 3, - 3)
  3264. dropdown.BlackOutline2Items.Visible = false
  3265. updateevent.Event:Connect(function(theme)
  3266. dropdown.BlackOutline2Items.BackgroundColor3 = theme.outlinecolor2
  3267. end)
  3268.  
  3269. dropdown.OutlineItems = Instance.new("Frame", dropdown.Main)
  3270. dropdown.OutlineItems.Name = "blackline"
  3271. dropdown.OutlineItems.ZIndex = 7
  3272. dropdown.OutlineItems.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(4, 4)
  3273. dropdown.OutlineItems.BorderSizePixel = 0
  3274. dropdown.OutlineItems.BackgroundColor3 = window.theme.outlinecolor
  3275. dropdown.OutlineItems.Position = dropdown.ItemsFrame.Position + UDim2.fromOffset(- 2, - 2)
  3276. dropdown.OutlineItems.Visible = false
  3277. updateevent.Event:Connect(function(theme)
  3278. dropdown.OutlineItems.BackgroundColor3 = theme.outlinecolor
  3279. end)
  3280.  
  3281. dropdown.BlackOutlineItems = Instance.new("Frame", dropdown.Main)
  3282. dropdown.BlackOutlineItems.Name = "blackline"
  3283. dropdown.BlackOutlineItems.ZIndex = 7
  3284. dropdown.BlackOutlineItems.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(- 2, - 2)
  3285. dropdown.BlackOutlineItems.BorderSizePixel = 0
  3286. dropdown.BlackOutlineItems.BackgroundColor3 = window.theme.outlinecolor2
  3287. dropdown.BlackOutlineItems.Position = dropdown.ItemsFrame.Position + UDim2.fromOffset(- 1, - 1)
  3288. dropdown.BlackOutlineItems.Visible = false
  3289. updateevent.Event:Connect(function(theme)
  3290. dropdown.BlackOutlineItems.BackgroundColor3 = theme.outlinecolor2
  3291. end)
  3292.  
  3293. dropdown.IgnoreBackButtons = Instance.new("TextButton", dropdown.Main)
  3294. dropdown.IgnoreBackButtons.BackgroundTransparency = 1
  3295. dropdown.IgnoreBackButtons.BorderSizePixel = 0
  3296. dropdown.IgnoreBackButtons.Position = UDim2.fromOffset(0, dropdown.Main.Size.Y.Offset + 8)
  3297. dropdown.IgnoreBackButtons.Size = UDim2.new(0, 0, 0, 0)
  3298. dropdown.IgnoreBackButtons.ZIndex = 7
  3299. dropdown.IgnoreBackButtons.Text = ""
  3300. dropdown.IgnoreBackButtons.Visible = false
  3301. dropdown.IgnoreBackButtons.AutoButtonColor = false
  3302.  
  3303. if dropdown.flag and dropdown.flag ~= "" then
  3304. library.flags[dropdown.flag] = dropdown.multichoice and {dropdown.default or dropdown.defaultitems[1] or ""} or (dropdown.default or dropdown.defaultitems[1] or "")
  3305. end
  3306.  
  3307. function dropdown:isSelected(item)
  3308. for i, v in pairs(dropdown.values) do
  3309. if v == item then
  3310. return true
  3311. end
  3312. end
  3313.  
  3314. return false
  3315. end
  3316.  
  3317. function dropdown:GetOptions()
  3318. return dropdown.values
  3319. end
  3320.  
  3321. function dropdown:updateText(text)
  3322. if #text >= 27 then
  3323. text = text:sub(1, 25) .. ".."
  3324. end
  3325. dropdown.SelectedLabel.Text = text
  3326. end
  3327.  
  3328. dropdown.Changed = Instance.new("BindableEvent")
  3329. function dropdown:Set(value)
  3330. if type(value) == "table" then
  3331. dropdown.values = value
  3332. dropdown:updateText(table.concat(value, ", "))
  3333. pcall(dropdown.callback, value)
  3334. else
  3335. dropdown:updateText(value)
  3336. dropdown.values = {value}
  3337. pcall(dropdown.callback, value)
  3338. end
  3339.  
  3340. dropdown.Changed:Fire(value)
  3341. if dropdown.flag and dropdown.flag ~= "" then
  3342. library.flags[dropdown.flag] = dropdown.multichoice and dropdown.values or dropdown.values[1]
  3343. end
  3344. end
  3345.  
  3346. function dropdown:Get()
  3347. return dropdown.multichoice and dropdown.values or dropdown.values[1]
  3348. end
  3349.  
  3350. dropdown.items = {}
  3351. function dropdown:Add(v)
  3352. local Item = Instance.new("TextButton", dropdown.ItemsFrame)
  3353. Item.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  3354. Item.TextColor3 = Color3.fromRGB(255, 255, 255)
  3355. Item.BorderSizePixel = 0
  3356. Item.Position = UDim2.fromOffset(0, 0)
  3357. Item.Size = UDim2.fromOffset(dropdown.Main.Size.X.Offset - 4, 20)
  3358. Item.ZIndex = 9
  3359. Item.Text = v
  3360. Item.Name = v
  3361. Item.AutoButtonColor = false
  3362. Item.Font = window.theme.font
  3363. Item.TextSize = 15
  3364. Item.TextXAlignment = Enum.TextXAlignment.Left
  3365. Item.TextStrokeTransparency = 1
  3366. dropdown.ItemsFrame.CanvasSize = dropdown.ItemsFrame.CanvasSize + UDim2.fromOffset(0, Item.AbsoluteSize.Y)
  3367.  
  3368. Item.MouseButton1Down:Connect(function()
  3369. if dropdown.multichoice then
  3370. if dropdown:isSelected(v) then
  3371. for i2, v2 in pairs(dropdown.values) do
  3372. if v2 == v then
  3373. table.remove(dropdown.values, i2)
  3374. end
  3375. end
  3376. dropdown:Set(dropdown.values)
  3377. else
  3378. table.insert(dropdown.values, v)
  3379. dropdown:Set(dropdown.values)
  3380. end
  3381.  
  3382. return
  3383. else
  3384. dropdown.Nav.Rotation = 90
  3385. dropdown.ItemsFrame.Visible = false
  3386. dropdown.ItemsFrame.Active = false
  3387. dropdown.OutlineItems.Visible = false
  3388. dropdown.BlackOutlineItems.Visible = false
  3389. dropdown.BlackOutline2Items.Visible = false
  3390. dropdown.IgnoreBackButtons.Visible = false
  3391. dropdown.IgnoreBackButtons.Active = false
  3392. end
  3393.  
  3394. dropdown:Set(v)
  3395.  
  3396. return
  3397. end)
  3398.  
  3399. runservice.RenderStepped:Connect(function()
  3400. if dropdown.multichoice and dropdown:isSelected(v) or dropdown.values[1] == v then
  3401. Item.BackgroundColor3 = Color3.fromRGB(64, 64, 64)
  3402. Item.TextColor3 = window.theme.accentcolor
  3403. Item.Text = " " .. v
  3404. else
  3405. Item.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  3406. Item.TextColor3 = Color3.fromRGB(255, 255, 255)
  3407. Item.Text = v
  3408. end
  3409. end)
  3410.  
  3411. table.insert(dropdown.items, v)
  3412. dropdown.ItemsFrame.Size = UDim2.fromOffset(dropdown.Main.Size.X.Offset, math.clamp(#dropdown.items * Item.AbsoluteSize.Y, 20, 156) + 4)
  3413. dropdown.ItemsFrame.CanvasSize = UDim2.fromOffset(dropdown.ItemsFrame.AbsoluteSize.X, (#dropdown.items * Item.AbsoluteSize.Y) + 4)
  3414.  
  3415. dropdown.OutlineItems.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(4, 4)
  3416. dropdown.BlackOutlineItems.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(2, 2)
  3417. dropdown.BlackOutline2Items.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(6, 6)
  3418. dropdown.IgnoreBackButtons.Size = dropdown.ItemsFrame.Size
  3419. end
  3420.  
  3421. function dropdown:Remove(value)
  3422. local item = dropdown.ItemsFrame:FindFirstChild(value)
  3423. if item then
  3424. for i, v in pairs(dropdown.items) do
  3425. if v == value then
  3426. table.remove(dropdown.items, i)
  3427. end
  3428. end
  3429.  
  3430. dropdown.ItemsFrame.Size = UDim2.fromOffset(dropdown.Main.Size.X.Offset, math.clamp(#dropdown.items * item.AbsoluteSize.Y, 20, 156) + 4)
  3431. dropdown.ItemsFrame.CanvasSize = UDim2.fromOffset(dropdown.ItemsFrame.AbsoluteSize.X, (#dropdown.items * item.AbsoluteSize.Y) + 4)
  3432.  
  3433. dropdown.OutlineItems.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(2, 2)
  3434. dropdown.BlackOutlineItems.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(4, 4)
  3435. dropdown.BlackOutline2Items.Size = dropdown.ItemsFrame.Size + UDim2.fromOffset(6, 6)
  3436. dropdown.IgnoreBackButtons.Size = dropdown.ItemsFrame.Size
  3437.  
  3438. item:Remove()
  3439. end
  3440. end
  3441.  
  3442. for i, v in pairs(dropdown.defaultitems) do
  3443. dropdown:Add(v)
  3444. end
  3445.  
  3446. if dropdown.default then
  3447. dropdown:Set(dropdown.default)
  3448. end
  3449.  
  3450. local MouseButton1Down = function()
  3451. if dropdown.Nav.Rotation == 90 then
  3452. tweenservice:Create(dropdown.Nav, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {Rotation = - 90}):Play()
  3453. if dropdown.items and #dropdown.items ~= 0 then
  3454. dropdown.ItemsFrame.ScrollingEnabled = true
  3455. sector.Main.Parent.ScrollingEnabled = false
  3456. dropdown.ItemsFrame.Visible = true
  3457. dropdown.ItemsFrame.Active = true
  3458. dropdown.IgnoreBackButtons.Visible = true
  3459. dropdown.IgnoreBackButtons.Active = true
  3460. dropdown.OutlineItems.Visible = true
  3461. dropdown.BlackOutlineItems.Visible = true
  3462. dropdown.BlackOutline2Items.Visible = true
  3463. end
  3464. else
  3465. tweenservice:Create(dropdown.Nav, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {Rotation = 90}):Play()
  3466. dropdown.ItemsFrame.ScrollingEnabled = false
  3467. sector.Main.Parent.ScrollingEnabled = true
  3468. dropdown.ItemsFrame.Visible = false
  3469. dropdown.ItemsFrame.Active = false
  3470. dropdown.IgnoreBackButtons.Visible = false
  3471. dropdown.IgnoreBackButtons.Active = false
  3472. dropdown.OutlineItems.Visible = false
  3473. dropdown.BlackOutlineItems.Visible = false
  3474. dropdown.BlackOutline2Items.Visible = false
  3475. end
  3476. end
  3477.  
  3478. dropdown.Main.MouseButton1Down:Connect(MouseButton1Down)
  3479. dropdown.Nav.MouseButton1Down:Connect(MouseButton1Down)
  3480.  
  3481. dropdown.BlackOutline2.MouseEnter:Connect(function()
  3482. dropdown.BlackOutline2.BackgroundColor3 = window.theme.accentcolor
  3483. end)
  3484. dropdown.BlackOutline2.MouseLeave:Connect(function()
  3485. dropdown.BlackOutline2.BackgroundColor3 = window.theme.outlinecolor2
  3486. end)
  3487.  
  3488. sector:FixSize()
  3489. table.insert(library.items, dropdown)
  3490.  
  3491. return dropdown
  3492. end
  3493.  
  3494. function sector:AddSeperator(text)
  3495. local seperator = {}
  3496. seperator.text = text or ""
  3497.  
  3498. seperator.main = Instance.new("Frame", sector.Items)
  3499. seperator.main.Name = "Main"
  3500. seperator.main.ZIndex = 5
  3501. seperator.main.Size = UDim2.fromOffset(sector.Main.Size.X.Offset - 12, 10)
  3502. seperator.main.BorderSizePixel = 0
  3503. seperator.main.BackgroundTransparency = 1
  3504.  
  3505. seperator.line = Instance.new("Frame", seperator.main)
  3506. seperator.line.Name = "Line"
  3507. seperator.line.ZIndex = 7
  3508. seperator.line.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
  3509. seperator.line.BorderSizePixel = 0
  3510. seperator.line.Size = UDim2.fromOffset(sector.Main.Size.X.Offset - 26, 1)
  3511. seperator.line.Position = UDim2.fromOffset(7, 5)
  3512.  
  3513. seperator.outline = Instance.new("Frame", seperator.line)
  3514. seperator.outline.Name = "Outline"
  3515. seperator.outline.ZIndex = 6
  3516. seperator.outline.BorderSizePixel = 0
  3517. seperator.outline.BackgroundColor3 = window.theme.outlinecolor2
  3518. seperator.outline.Position = UDim2.fromOffset(- 1, - 1)
  3519. seperator.outline.Size = seperator.line.Size - UDim2.fromOffset(- 2, - 2)
  3520. updateevent.Event:Connect(function(theme)
  3521. seperator.outline.BackgroundColor3 = theme.outlinecolor2
  3522. end)
  3523.  
  3524. seperator.label = Instance.new("TextLabel", seperator.main)
  3525. seperator.label.Name = "Label"
  3526. seperator.label.BackgroundTransparency = 1
  3527. seperator.label.Size = seperator.main.Size
  3528. seperator.label.Font = window.theme.font
  3529. seperator.label.ZIndex = 8
  3530. seperator.label.Text = seperator.text
  3531. seperator.label.TextColor3 = Color3.fromRGB(255, 255, 255)
  3532. seperator.label.TextSize = window.theme.fontsize
  3533. seperator.label.TextStrokeTransparency = 1
  3534. seperator.label.TextXAlignment = Enum.TextXAlignment.Center
  3535. updateevent.Event:Connect(function(theme)
  3536. seperator.label.Font = theme.font
  3537. seperator.label.TextSize = theme.fontsize
  3538. end)
  3539.  
  3540. local textSize = textservice:GetTextSize(seperator.text, window.theme.fontsize, window.theme.font, Vector2.new(2000, 2000))
  3541. local textStart = seperator.main.AbsoluteSize.X / 2 - (textSize.X / 2)
  3542.  
  3543. sector.LabelBackFrame = Instance.new("Frame", seperator.main)
  3544. sector.LabelBackFrame.Name = "LabelBack"
  3545. sector.LabelBackFrame.ZIndex = 7
  3546. sector.LabelBackFrame.Size = UDim2.fromOffset(textSize.X + 12, 10)
  3547. sector.LabelBackFrame.BorderSizePixel = 0
  3548. sector.LabelBackFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  3549. sector.LabelBackFrame.Position = UDim2.new(0, textStart - 6, 0, 0)
  3550. updateevent.Event:Connect(function(theme)
  3551. textSize = textservice:GetTextSize(seperator.text, theme.fontsize, theme.font, Vector2.new(2000, 2000))
  3552. textStart = seperator.main.AbsoluteSize.X / 2 - (textSize.X / 2)
  3553.  
  3554. sector.LabelBackFrame.Size = UDim2.fromOffset(textSize.X + 12, 10)
  3555. sector.LabelBackFrame.Position = UDim2.new(0, textStart - 6, 0, 0)
  3556. end)
  3557.  
  3558. sector:FixSize()
  3559.  
  3560. return seperator
  3561. end
  3562.  
  3563. return sector
  3564. end
  3565.  
  3566. function tab:CreateConfigSystem(side)
  3567. local configSystem = {}
  3568.  
  3569. configSystem.configFolder = window.name .. " / " .. game["PlaceId"]
  3570. if (not isfolder(configSystem.configFolder)) then
  3571. makefolder(configSystem.configFolder)
  3572. end
  3573.  
  3574. configSystem.sector = tab:CreateSector("Configs", side or "left")
  3575.  
  3576. local ConfigName = configSystem.sector:AddTextbox("Config Name", "", ConfigName, function() end, "")
  3577. local default = (listfiles(configSystem.configFolder)[1] or ""):gsub(configSystem.configFolder .. "\\", ""):gsub(".txt", "")
  3578. local Config = configSystem.sector:AddDropdown("Configs", {}, default, false, function() end, "")
  3579. for i, v in pairs(listfiles(configSystem.configFolder)) do
  3580. if v:find(".txt") then
  3581. Config:Add(v:gsub(configSystem.configFolder .. "\\", ""):gsub(".txt", ""))
  3582. end
  3583. end
  3584.  
  3585. configSystem.Create = configSystem.sector:AddButton("Create", function()
  3586. for i, v in pairs(listfiles(configSystem.configFolder)) do
  3587. Config:Remove(v:gsub(configSystem.configFolder .. "\\", ""):gsub(".txt", ""))
  3588. end
  3589.  
  3590. if ConfigName:Get() and ConfigName:Get() ~= "" then
  3591. local config = {}
  3592.  
  3593. for i, v in pairs(library.flags) do
  3594. if (v ~= nil and v ~= "") then
  3595. if (typeof(v) == "Color3") then
  3596. config[i] = {v.R, v.G, v.B}
  3597. elseif (v:find("Enum.KeyCode")) then
  3598. config[i] = v.Name
  3599. elseif (typeof(v) == "table") then
  3600. config[i] = {v}
  3601. else
  3602. config[i] = v
  3603. end
  3604. end
  3605. end
  3606.  
  3607. writefile(configSystem.configFolder .. " / " .. ConfigName:Get() .. ".txt", httpservice:JSONEncode(config))
  3608.  
  3609. for i, v in pairs(listfiles(configSystem.configFolder)) do
  3610. if v:find(".txt") then
  3611. Config:Add(v:gsub(configSystem.configFolder .. "\\", ""):gsub(".txt", ""))
  3612. end
  3613. end
  3614. end
  3615. end)
  3616.  
  3617. configSystem.Save = configSystem.sector:AddButton("Save", function()
  3618. local config = {}
  3619. if Config:Get() and Config:Get() ~= "" then
  3620. for i, v in pairs(library.flags) do
  3621. if (v ~= nil and v ~= "") then
  3622. if (typeof(v) == "Color3") then
  3623. config[i] = {v.R, v.G, v.B}
  3624. elseif (v:find("Enum.KeyCode")) then
  3625. config[i] = "Enum.KeyCode." .. v.Name
  3626. elseif (typeof(v) == "table") then
  3627. config[i] = {v}
  3628. else
  3629. config[i] = v
  3630. end
  3631. end
  3632. end
  3633.  
  3634. writefile(configSystem.configFolder .. " / " .. Config:Get() .. ".txt", httpservice:JSONEncode(config))
  3635. end
  3636. end)
  3637.  
  3638. configSystem.Load = configSystem.sector:AddButton("Load", function()
  3639. local Success = pcall(readfile, configSystem.configFolder .. " / " .. Config:Get() .. ".txt")
  3640. if (Success) then
  3641. pcall(function()
  3642. local ReadConfig = httpservice:JSONDecode(readfile(configSystem.configFolder .. " / " .. Config:Get() .. ".txt"))
  3643. local NewConfig = {}
  3644.  
  3645. for i, v in pairs(ReadConfig) do
  3646. if (typeof(v) == "table") then
  3647. if (typeof(v[1]) == "number") then
  3648. NewConfig[i] = Color3.new(v[1], v[2], v[3])
  3649. elseif (typeof(v[1]) == "table") then
  3650. NewConfig[i] = v[1]
  3651. end
  3652. elseif (v:find("Enum.KeyCode.")) then
  3653. NewConfig[i] = Enum.KeyCode[v:gsub("Enum.KeyCode.", "")]
  3654. else
  3655. NewConfig[i] = v
  3656. end
  3657. end
  3658.  
  3659. library.flags = NewConfig
  3660.  
  3661. for i, v in pairs(library.flags) do
  3662. for i2, v2 in pairs(library.items) do
  3663. if (i ~= nil and i ~= "" and i ~= "Configs_Name" and i ~= "Configs" and v2.flag ~= nil) then
  3664. if (v2.flag == i) then
  3665. pcall(function()
  3666. v2:Set(v)
  3667. end)
  3668. end
  3669. end
  3670. end
  3671. end
  3672. end)
  3673. end
  3674. end)
  3675.  
  3676. configSystem.Delete = configSystem.sector:AddButton("Delete", function()
  3677. for i, v in pairs(listfiles(configSystem.configFolder)) do
  3678. Config:Remove(v:gsub(configSystem.configFolder .. "\\", ""):gsub(".txt", ""))
  3679. end
  3680.  
  3681. if (not Config:Get() or Config:Get() == "") then return end
  3682. if (not isfile(configSystem.configFolder .. " / " .. Config:Get() .. ".txt")) then return end
  3683. delfile(configSystem.configFolder .. " / " .. Config:Get() .. ".txt")
  3684.  
  3685. for i, v in pairs(listfiles(configSystem.configFolder)) do
  3686. if v:find(".txt") then
  3687. Config:Add(v:gsub(configSystem.configFolder .. "\\", ""):gsub(".txt", ""))
  3688. end
  3689. end
  3690. end)
  3691.  
  3692. return configSystem
  3693. end
  3694.  
  3695. table.insert(window.Tabs, tab)
  3696.  
  3697. return tab
  3698. end
  3699.  
  3700. return window
  3701. end
  3702.  
  3703. local VylixHub =
  3704. library:CreateWindow("Vylix AA Hub | Actyrn#7104 | .gg/wDngb2mv4H", Vector2.new(460, 565), Enum.KeyCode.RightShift)
  3705.  
  3706. -- Tabs
  3707.  
  3708. local AntiAim = VylixHub:CreateTab("Anti-Aim")
  3709. local Extra = VylixHub:CreateTab("Extra")
  3710.  
  3711. -- Sectors
  3712.  
  3713. local Custom = AntiAim:CreateSector("Custom", "left")
  3714. local Confusion = AntiAim:CreateSector("Confusion", "left")
  3715. local PredBreaker = AntiAim:CreateSector("Prediction Breaker", "left")
  3716. local Desync = AntiAim:CreateSector("Desync", "left")
  3717.  
  3718. local Up = AntiAim:CreateSector("Up", "right")
  3719. local Down = AntiAim:CreateSector("Down", "right")
  3720. local Reverse = AntiAim:CreateSector("Reverse", "right")
  3721. local VelMultiply = AntiAim:CreateSector("Velocity Multiplier", "right")
  3722. local LookVec = AntiAim:CreateSector("Look Vector", "right")
  3723.  
  3724. local Resolver = Extra:CreateSector("Velocity Resolver", "left")
  3725.  
  3726. local VelVisualizer = Extra:CreateSector("Velocity Visualizer", "right")
  3727.  
  3728. -- Universal Resolver
  3729.  
  3730. local ResolverToggle = Resolver:AddToggle("Enabled", false, function(Bool)
  3731. Actyrn7104.Enabled = Bool
  3732. end)
  3733.  
  3734. ResolverToggle:AddKeybind()
  3735.  
  3736. Resolver:AddSlider("Prediction", 1, 16, 50, 1, function(Bool)
  3737. Actyrn7104.Prediction = Bool
  3738. end)
  3739.  
  3740. Resolver:AddDropdown("Type", {"With Pred", "Break Pred"}, "With Pred", false, function(Bool)
  3741. Actyrn7104.Type = Bool
  3742. end)
  3743.  
  3744. -- Velocity Visualizer
  3745.  
  3746. local VelVisualizerToggle = VelVisualizer:AddToggle("Enabled", false, function(Bool)
  3747. Settings.VelVisualizer.Enabled = Bool
  3748. end)
  3749.  
  3750. VelVisualizerToggle:AddColorpicker(Color3.fromRGB(100, 180, 70), function(Bool)
  3751. veldot.Color = Bool
  3752. end)
  3753.  
  3754. VelVisualizer:AddSlider("Prediction", 0.05, 0.15, 0.25, 100, function(Bool)
  3755. Settings.VelVisualizer.Prediction = Bool
  3756. end)
  3757.  
  3758. VelVisualizer:AddDropdown("Hit-Part", {"Head", "Torso"}, "Torso", false, function(Bool)
  3759. if Bool == "Head" then
  3760. Settings.VelVisualizer.HitPart = "Head"
  3761. else
  3762. Settings.VelVisualizer.HitPart = "HumanoidRootPart"
  3763. end
  3764. end)
  3765.  
  3766. -- Custom
  3767.  
  3768. local CustomToggle = Custom:AddToggle("Enabled", false, function(Bool)
  3769. Settings.Custom.Enabled = Bool
  3770. end)
  3771.  
  3772. CustomToggle:AddKeybind()
  3773.  
  3774. Custom:AddTextbox("X Velocity", 69420, function(Bool)
  3775. Settings.Custom.X = Bool
  3776. end)
  3777.  
  3778. Custom:AddTextbox("Y Velocity", 69420, function(Bool)
  3779. Settings.Custom.Y = Bool
  3780. end)
  3781.  
  3782. Custom:AddTextbox("Z Velocity", 69420, function(Bool)
  3783. Settings.Custom.Z = Bool
  3784. end)
  3785.  
  3786. -- Up
  3787.  
  3788. local UpToggle = Up:AddToggle("Enabled", false, function(Bool)
  3789. Settings.Up.Enabled = Bool
  3790. end)
  3791.  
  3792. UpToggle:AddKeybind()
  3793.  
  3794. Up:AddSlider("Amount", 0, 690, 1000, 1, function(Bool)
  3795. Settings.Up.Amount = Bool
  3796. end)
  3797.  
  3798. -- Down
  3799.  
  3800. local DownToggle = Down:AddToggle("Enabled", false, function(Bool)
  3801. Settings.Down.Enabled = Bool
  3802. end)
  3803.  
  3804. DownToggle:AddKeybind()
  3805.  
  3806. Down:AddSlider("Amount", 0, 690, 1000, 1, function(Bool)
  3807. Settings.Down.Amount = -Bool
  3808. end)
  3809.  
  3810. -- Vel Multiplier
  3811.  
  3812. local VelMultiplyToggle = VelMultiply:AddToggle("Enabled", false, function(Bool)
  3813. Settings.VelMultiply.Enabled = Bool
  3814. end)
  3815.  
  3816. VelMultiplyToggle:AddKeybind()
  3817.  
  3818. VelMultiply:AddSlider("Walk Amount", 0, 5, 20, 2, function(Bool)
  3819. Settings.VelMultiply.WalkAmt = Bool
  3820. end)
  3821.  
  3822. VelMultiply:AddSlider("Jump Amount", 0, 5, 20, 2, function(Bool)
  3823. Settings.VelMultiply.JumpAmt = Bool
  3824. end)
  3825.  
  3826. -- Look Vector
  3827.  
  3828. local LookVecToggle = LookVec:AddToggle("Enabled", false, function(Bool)
  3829. Settings.LookVec.Enabled = Bool
  3830. end)
  3831.  
  3832. LookVecToggle:AddKeybind()
  3833.  
  3834. LookVec:AddSlider("Amount", -1000, 420, 1000, 1, function(Bool)
  3835. Settings.LookVec.Amount = Bool
  3836. end)
  3837.  
  3838. -- Reverse
  3839.  
  3840. local ReverseToggle = Reverse:AddToggle("Enabled", false, function(Bool)
  3841. Settings.Reverse.Enabled = Bool
  3842. end)
  3843.  
  3844. ReverseToggle:AddKeybind()
  3845.  
  3846. Reverse:AddSlider("Amount", 0.5, 3, 10, 2, function(Bool)
  3847. Settings.Reverse.Amount = Bool
  3848. end)
  3849.  
  3850. Reverse:AddDropdown("Type", {"CFrame", "Velocity"}, "CFrame", false, function(Bool)
  3851. Settings.Reverse.Type = Bool
  3852. end)
  3853.  
  3854. -- Confusion
  3855.  
  3856. local ConfusionToggle = Confusion:AddToggle("Enabled", false, function(Bool)
  3857. Settings.Confusion.Enabled = Bool
  3858. end)
  3859.  
  3860. ConfusionToggle:AddKeybind()
  3861.  
  3862. Confusion:AddSlider("Amount", 0.5, 1.5, 5, 2, function(Bool)
  3863. Settings.Confusion.Amount = Bool
  3864. end)
  3865.  
  3866. -- Prediction Breaker
  3867.  
  3868. local PredBreakerToggle = PredBreaker:AddToggle("Enabled", false, function(Bool)
  3869. Settings.PredBreaker = Bool
  3870. end)
  3871.  
  3872. PredBreakerToggle:AddKeybind()
  3873.  
  3874. -- Desync
  3875.  
  3876. local DesyncToggle = Desync:AddToggle("Enabled", false, function(Bool)
  3877. Settings.Desync.Enabled = Bool
  3878. end)
  3879.  
  3880. DesyncToggle:AddKeybind()
  3881.  
  3882. Desync:AddSlider("X Velocity", -10000, 6900, 10000, 1, function(Bool)
  3883. Settings.Desync.X = Bool
  3884. end)
  3885.  
  3886. Desync:AddSlider("Y Velocity", -10000, 6900, 10000, 1, function(Bool)
  3887. Settings.Desync.Y = Bool
  3888. end)
  3889.  
  3890. Desync:AddSlider("Z Velocity", -10000, 6900, 10000, 1, function(Bool)
  3891. Settings.Desync.Z = Bool
  3892. end)
  3893.  
  3894. Desync:AddSlider("CFrame Angles", -25, 0.5, 25, 2, function(Bool)
  3895. Settings.Desync.Angles = Bool
  3896. end)
  3897.  
  3898. -- Coding
  3899.  
  3900. spawn(function()
  3901. veldot.Filled = true
  3902. veldot.Thickness = 1
  3903. veldot.Transparency = 1
  3904. veldot.Radius = 5
  3905. end)
  3906.  
  3907. -- Velocity Visualizer
  3908.  
  3909. runservice.Heartbeat:Connect(function()
  3910. local pos, onscreen = workspace.CurrentCamera:WorldToViewportPoint(
  3911. player.Character[Settings.VelVisualizer.HitPart].CFrame.Position +
  3912. (player.Character[Settings.VelVisualizer.HitPart].AssemblyLinearVelocity *
  3913. Settings.VelVisualizer.Prediction))
  3914.  
  3915. if Settings.VelVisualizer.Enabled and onscreen then
  3916. veldot.Visible = true
  3917. veldot.Position = Vector2.new(pos.X, pos.Y)
  3918. else
  3919. veldot.Visible = false
  3920. end
  3921. end)
  3922.  
  3923. -- Universal Resolver
  3924.  
  3925. loadstring(game:HttpGet("https://pastebin.com/raw/b0Qaf3aH"))()
  3926.  
  3927. -- Anti-Aim Functions
  3928.  
  3929. runservice.Heartbeat:Connect(function()
  3930. local hrp, hum = player.Character.HumanoidRootPart, player.Character.Humanoid
  3931. local velocity, cframe = hrp.Velocity, hrp.CFrame
  3932.  
  3933. if Settings.Custom.Enabled then
  3934. hrp.Velocity =
  3935. Vector3.new(Settings.Custom.X, Settings.Custom.Y, Settings.Custom.Z)
  3936. runservice.RenderStepped:Wait()
  3937. hrp.Velocity = velocity
  3938. end
  3939.  
  3940. if Settings.Up.Enabled then
  3941. hrp.Velocity =
  3942. Vector3.new(velocity.X, Settings.Up.Amount, velocity.Z)
  3943. runservice.RenderStepped:Wait()
  3944. hrp.Velocity = velocity
  3945. end
  3946.  
  3947. if Settings.Down.Enabled then
  3948. hrp.Velocity =
  3949. Vector3.new(velocity.X, Settings.Down.Amount, velocity.Z)
  3950. runservice.RenderStepped:Wait()
  3951. hrp.Velocity = velocity
  3952. end
  3953.  
  3954. if Settings.VelMultiply.Enabled then
  3955. hrp.Velocity = velocity *
  3956. Vector3.new(Settings.VelMultiply.WalkAmt, Settings.VelMultiply.JumpAmt, Settings.VelMultiply.WalkAmt)
  3957. runservice.RenderStepped:Wait()
  3958. hrp.Velocity = velocity
  3959. end
  3960.  
  3961. if Settings.LookVec.Enabled then
  3962. hrp.Velocity = cframe.lookVector *
  3963. Settings.LookVec.Amount
  3964. runservice.RenderStepped:Wait()
  3965. hrp.Velocity = velocity
  3966. end
  3967.  
  3968. if Settings.Reverse.Enabled then
  3969. if Settings.Reverse.Type == "CFrame" then
  3970. hrp.CFrame = cframe -
  3971. hum.MoveDirection * Settings.Reverse.Amount / 10
  3972. else
  3973. hrp.Velocity = velocity *
  3974. Vector3.new(-Settings.Reverse.Amount / 2.5, 1, -Settings.Reverse.Amount / 2.5)
  3975. runservice.RenderStepped:Wait()
  3976. hrp.Velocity = velocity
  3977. end
  3978. end
  3979.  
  3980. if Settings.Confusion.Enabled then
  3981. hrp.CFrame = cframe *
  3982. CFrame.new(math.random(1, 2) == 1 and
  3983. Settings.Confusion.Amount
  3984. or -Settings.Confusion.Amount, 0, 0)
  3985. end
  3986.  
  3987. if Settings.PredBreaker then
  3988. hrp.Velocity =
  3989. velocity * 0
  3990. runservice.RenderStepped:Wait()
  3991. hrp.Velocity = velocity
  3992. end
  3993.  
  3994. if Settings.Desync.Enabled then
  3995. hrp.Velocity =
  3996. Vector3.new(Settings.Desync.X, Settings.Desync.Y, Settings.Desync.Z)
  3997. hrp.CFrame = cframe *
  3998. CFrame.Angles(0, math.rad(Settings.Desync.Angles), 0)
  3999. runservice.RenderStepped:Wait()
  4000. hrp.Velocity = velocity
  4001. end
  4002. end)
Add Comment
Please, Sign In to add comment