GUI_Maker_Roblox

Untitled

Sep 28th, 2024 (edited)
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 397.56 KB | None | 0 0
  1. --[[
  2. Library might be a bit outdated as I did not save it
  3. Downloaded from history so not sure if this is the most recent version
  4. Fix the stuff urself if its not
  5. ]]
  6. local Drawing = loadstring(game:HttpGet("https://raw.githubusercontent.com/linemaster2/storage/main/Drawing.lua"))();
  7.  
  8. -- // Variables
  9. local ws = game:GetService("Workspace")
  10. local uis = game:GetService("UserInputService")
  11. local rs = game:GetService("RunService")
  12. local hs = game:GetService("HttpService")
  13. local cas = game:GetService("ContextActionService")
  14. local plrs = game:GetService("Players")
  15. local stats = game:GetService("Stats")
  16. --
  17. local localplayer = plrs.LocalPlayer
  18. --
  19. local mouse = localplayer:GetMouse()
  20. --
  21. local Remove = table.remove
  22. local Unpack = table.unpack
  23. local Find = table.find
  24. -- UI Variables
  25. local library = {
  26. drawings = {},
  27. objects = {},
  28. hidden = {},
  29. connections = {},
  30. pointers = {},
  31. began = {},
  32. ended = {},
  33. changed = {},
  34. colors = {},
  35. hovers = {},
  36. Relations = {},
  37. folders = {
  38. main = "hvh",
  39. assets = "hvh/Images",
  40. configs = "hvh/Configs"
  41. },
  42. shared = {
  43. initialized = false,
  44. fps = 0,
  45. ping = 0
  46. }
  47. }
  48. --
  49. local utility = {
  50. Keyboard = {
  51. Letters = {
  52. "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"
  53. },
  54. Modifiers = {
  55. ["`"] = "~", ["1"] = "!", ["2"] = "@", ["3"] = "#", ["4"] = "$", ["5"] = "%", ["6"] = "^", ["7"] = "&", ["8"] = "*", ["9"] = "(",
  56. ["0"] = ")", ["-"] = "_", ["="] = "+", ["["] = "{", ["]"] = "}", ["\\"] = "|", [";"] = ":", ["'"] = '"', [","] = "<", ["."] = ".",
  57. ["/"] = "?"
  58. },
  59. InputNames = {
  60. One = "1", Two = "2", Three = "3", Four = "4", Five = "5", Six = "6", Seven = "7", Eight = "8", Nine = "9", Zero = "0",
  61. LeftBracket = "[", RightBracket = "]", Semicolon = ";", BackSlash = "\\", Slash = "/", Minus = "-", Equals = "=", Return = "Enter",
  62. Backquote = "`", CapsLock = "Caps", LeftShift = "LShift", RightShift = "RShift", LeftControl = "LCtrl", RightControl = "RCtrl",
  63. LeftAlt = "LAlt", RightAlt = "RAlt", Backspace = "Back", Plus = "+", PageUp = "PgUp", PageDown = "PgDown", Delete = "Del",
  64. Insert = "Ins", NumLock = "NumL", Comma = ",", Period = "."
  65. }
  66. }
  67. }
  68. local pages = {}
  69. local sections = {}
  70.  
  71. local esppreview = true
  72.  
  73. -- Theme Variables
  74. --local themes = {}
  75. local theme = {
  76. accent = Color3.fromRGB(227, 209, 228),
  77. lightcontrast = Color3.fromRGB(23, 23, 23),
  78. darkcontrast = Color3.fromRGB(15, 15, 15),
  79. outline = Color3.fromRGB(10, 10, 10),
  80. inline = Color3.fromRGB(45, 45, 45),
  81. textcolor = Color3.fromRGB(255, 255, 255),
  82. textdark = Color3.fromRGB(175, 175, 175),
  83. textborder = Color3.fromRGB(0, 0, 0),
  84. cursoroutline = Color3.fromRGB(10, 10, 10),
  85. font = 2,
  86. textsize = 13
  87. }
  88.  
  89. if not isfolder(library.folders.main) then
  90. makefolder(library.folders.main)
  91. end
  92.  
  93. if not isfolder(library.folders.assets) then
  94. makefolder(library.folders.assets)
  95. end
  96.  
  97. if not isfolder(library.folders.configs) then
  98. makefolder(library.folders.configs)
  99. end
  100.  
  101. -- // utility Functions
  102. do
  103. function utility:Size(xScale,xOffset,yScale,yOffset,instance)
  104. if instance then
  105. local x = xScale*instance.Size.x+xOffset
  106. local y = yScale*instance.Size.y+yOffset
  107. --
  108. return Vector2.new(x,y)
  109. else
  110. local vx,vy = ws.CurrentCamera.ViewportSize.x,ws.CurrentCamera.ViewportSize.y
  111. --
  112. local x = xScale*vx+xOffset
  113. local y = yScale*vy+yOffset
  114. --
  115. return Vector2.new(x,y)
  116. end
  117. end
  118. --
  119. function utility:Position(xScale,xOffset,yScale,yOffset,instance)
  120. if instance then
  121. local x = instance.Position.x+xScale*instance.Size.x+xOffset
  122. local y = instance.Position.y+yScale*instance.Size.y+yOffset
  123. --
  124. return Vector2.new(x,y)
  125. else
  126. local vx,vy = ws.CurrentCamera.ViewportSize.x,ws.CurrentCamera.ViewportSize.y
  127. --
  128. local x = xScale*vx+xOffset
  129. local y = yScale*vy+yOffset
  130. --
  131. return Vector2.new(x,y)
  132. end
  133. end
  134. --
  135. function utility:Create(instanceType, instanceOffset, instanceProperties, instanceParent)
  136. local instanceType = instanceType or "Frame"
  137. local instanceOffset = instanceOffset or {Vector2.new(0,0)}
  138. local instanceProperties = instanceProperties or {}
  139. local instanceHidden = false
  140. local instance = nil
  141. --
  142. if instanceType == "Frame" or instanceType == "frame" then
  143. local frame = Drawing.new("Square")
  144. frame.Visible = true
  145. frame.Filled = true
  146. frame.Thickness = 0
  147. frame.Color = Color3.fromRGB(255,255,255)
  148. frame.Size = Vector2.new(100,100)
  149. frame.Position = Vector2.new(0,0)
  150. frame.ZIndex = 50
  151. frame.Transparency = library.shared.initialized and 1 or 0
  152. instance = frame
  153. elseif instanceType == "TextLabel" or instanceType == "textlabel" then
  154. local text = Drawing.new("Text")
  155. text.Font = 3
  156. text.Visible = true
  157. text.Outline = true
  158. text.Center = false
  159. text.Color = Color3.fromRGB(255,255,255)
  160. text.ZIndex = 50
  161. text.Transparency = library.shared.initialized and 1 or 0
  162. instance = text
  163. elseif instanceType == "Triangle" or instanceType == "triangle" then
  164. local frame = Drawing.new("Triangle")
  165. frame.Visible = true
  166. frame.Filled = true
  167. frame.Thickness = 0
  168. frame.Color = Color3.fromRGB(255,255,255)
  169. frame.ZIndex = 50
  170. frame.Transparency = library.shared.initialized and 1 or 0
  171. instance = frame
  172. elseif instanceType == "Image" or instanceType == "image" then
  173. local image = Drawing.new("Image")
  174. image.Size = Vector2.new(12,19)
  175. image.Position = Vector2.new(0,0)
  176. image.Visible = true
  177. image.ZIndex = 50
  178. image.Transparency = library.shared.initialized and 1 or 0
  179. instance = image
  180. elseif instanceType == "Circle" or instanceType == "circle" then
  181. local circle = Drawing.new("Circle")
  182. circle.Visible = false
  183. circle.Color = Color3.fromRGB(255, 0, 0)
  184. circle.Thickness = 1
  185. circle.NumSides = 30
  186. circle.Filled = true
  187. circle.Transparency = 1
  188. circle.ZIndex = 50
  189. circle.Radius = 50
  190. circle.Transparency = library.shared.initialized and 1 or 0
  191. instance = circle
  192. elseif instanceType == "Quad" or instanceType == "quad" then
  193. local quad = Drawing.new("Quad")
  194. quad.Visible = false
  195. quad.Color = Color3.fromRGB(255, 255, 255)
  196. quad.Thickness = 1.5
  197. quad.Transparency = 1
  198. quad.ZIndex = 50
  199. quad.Filled = false
  200. quad.Transparency = library.shared.initialized and 1 or 0
  201. instance = quad
  202. elseif instanceType == "Line" or instanceType == "line" then
  203. local line = Drawing.new("Line")
  204. line.Visible = false
  205. line.Color = Color3.fromRGB(255, 255, 255)
  206. line.Thickness = 1.5
  207. line.Transparency = 1
  208. line.Thickness = 1.5
  209. line.ZIndex = 50
  210. line.Transparency = library.shared.initialized and 1 or 0
  211. instance = line
  212. end
  213. --
  214. if instance then
  215. for i, v in pairs(instanceProperties) do
  216. if i == "Hidden" or i == "hidden" then
  217. instanceHidden = true
  218. else
  219. if library.shared.initialized then
  220. instance[i] = v
  221. else
  222. if instanceProperties.Hidden or instanceProperties.hidden then
  223. instance[i] = v
  224. else
  225. if i ~= "Transparency" then
  226. instance[i] = v
  227. end
  228. end
  229. end
  230. end
  231. end
  232. --
  233. if not instanceHidden then
  234. library.drawings[#library.drawings + 1] = {instance, instanceOffset, instanceProperties["Transparency"] or 1}
  235. else
  236. library.hidden[#library.hidden + 1] = {instance}
  237. end
  238. --
  239. if instanceParent then
  240. instanceParent[#instanceParent + 1] = instance
  241. end
  242. --
  243. return instance
  244. end
  245. end
  246. --
  247. function utility:Instance(InstanceType, InstanceProperties)
  248. local Object = Instance.new(InstanceType)
  249. --
  250. for Index, Value in pairs(InstanceProperties) do
  251. Object[Index] = Value
  252. end
  253. --
  254. library.objects[Object] = true
  255. --
  256. return Object
  257. end
  258. --
  259. function utility:RemoveInstance(Object)
  260. library.objects[Object] = nil
  261. Object:Remove()
  262. end
  263. --
  264. function utility:UpdateOffset(instance, instanceOffset)
  265. for i,v in pairs(library.drawings) do
  266. if v[1] == instance then
  267. v[2] = instanceOffset
  268. end
  269. end
  270. end
  271. --
  272. function utility:UpdateTransparency(instance, instanceTransparency)
  273. for i,v in pairs(library.drawings) do
  274. if v[1] == instance then
  275. v[3] = instanceTransparency
  276. end
  277. end
  278. end
  279. --
  280. function utility:Remove(instance, hidden)
  281. library.colors[instance] = nil
  282. --
  283. local ind = 0
  284. --
  285. for i,v in pairs(hidden and library.hidden or library.drawings) do
  286. if v[1] == instance then
  287. ind = i
  288. if hidden then
  289. v[1] = nil
  290. else
  291. v[2] = nil
  292. v[1] = nil
  293. end
  294. end
  295. end
  296. --
  297. Remove(hidden and library.hidden or library.drawings, ind)
  298. instance:Remove()
  299. end
  300. --
  301. function utility:GetSubPrefix(str)
  302. local str = tostring(str):gsub(" ","")
  303. local var = ""
  304. --
  305. if #str == 2 then
  306. local sec = string.sub(str,#str,#str+1)
  307. var = sec == "1" and "st" or sec == "2" and "nd" or sec == "3" and "rd" or "th"
  308. end
  309. --
  310. return var
  311. end
  312. --
  313. function utility:Connection(connectionType, connectionCallback)
  314. local connection = connectionType:Connect(connectionCallback)
  315. library.connections[#library.connections + 1] = connection
  316. --
  317. return connection
  318. end
  319. --
  320. function utility:Disconnect(connection)
  321. for i,v in pairs(library.connections) do
  322. if v == connection then
  323. library.connections[i] = nil
  324. v:Disconnect()
  325. end
  326. end
  327. end
  328. --
  329. function utility:MouseLocation()
  330. return uis:GetMouseLocation()
  331. end
  332. --
  333. function utility:MouseOverDrawing(values, valuesAdd)
  334. local valuesAdd = valuesAdd or {}
  335. local values = {
  336. (values[1] or 0) + (valuesAdd[1] or 0),
  337. (values[2] or 0) + (valuesAdd[2] or 0),
  338. (values[3] or 0) + (valuesAdd[3] or 0),
  339. (values[4] or 0) + (valuesAdd[4] or 0)
  340. }
  341. --
  342. local mouseLocation = utility:MouseLocation()
  343. return (mouseLocation.x >= values[1] and mouseLocation.x <= (values[1] + (values[3] - values[1]))) and (mouseLocation.y >= values[2] and mouseLocation.y <= (values[2] + (values[4] - values[2])))
  344. end
  345. --
  346. function utility:GetTextBounds(text, textSize, font)
  347. local textbounds = Vector2.new(0, 0)
  348. --
  349. local textlabel = utility:Create("TextLabel", {Vector2.new(0, 0)}, {
  350. Text = text,
  351. Size = textSize,
  352. Font = font,
  353. Hidden = true
  354. })
  355. --
  356. textbounds = textlabel.TextBounds
  357. utility:Remove(textlabel, true)
  358. --
  359. return textbounds
  360. end
  361. --
  362. function utility:GetScreenSize()
  363. return ws.CurrentCamera.ViewportSize
  364. end
  365. --
  366. function utility:LoadImage(instance, imageName, imageLink)
  367.  
  368. end
  369. --
  370. function utility:Lerp(instance, instanceTo, instanceTime)
  371. local currentTime = 0
  372. local currentIndex = {}
  373. local connection
  374. --
  375. for i,v in pairs(instanceTo) do
  376. currentIndex[i] = instance[i]
  377. end
  378. --
  379. local function lerp()
  380. for i,v in pairs(instanceTo) do
  381. instance[i] = ((v - currentIndex[i]) * currentTime / instanceTime) + currentIndex[i]
  382. end
  383. end
  384. --
  385. connection = utility:Connection(rs.RenderStepped, function(delta)
  386. if currentTime < instanceTime then
  387. currentTime = currentTime + delta
  388. lerp()
  389. else
  390. connection:Disconnect()
  391. end
  392. end)
  393. end
  394. --
  395. function utility:Combine(table1, table2)
  396. local table3 = {}
  397. for i,v in pairs(table1) do table3[i] = v end
  398. local t = #table3
  399. for z,x in pairs(table2) do table3[z + t] = x end
  400. return table3
  401. end
  402. --
  403. function utility:WrapText(Text, Size)
  404. local Max = (Size / 7)
  405. --
  406. return Text:sub(0, Max)
  407. end
  408. --
  409. function utility:InputToString(Input)
  410. if Input then
  411. local String = (tostring(Input) .. "."):gsub("%.", ",")
  412. local Count = 0
  413. --
  414. for Value in String:gmatch("(.-),") do
  415. Count = Count + 1
  416. --
  417. if Count == 3 then
  418. String = Value:gsub("Keypad", "")
  419. end
  420. end
  421. --
  422. if String == "Unknown" or Input.Value == 27 then
  423. return "None"
  424. elseif utility.Keyboard.InputNames[String] then
  425. String = utility.Keyboard.InputNames[String]
  426. end
  427. --
  428. return String
  429. else
  430. return "None"
  431. end
  432. end
  433. end
  434. -- // Library Functions
  435. do
  436. library.__index = library
  437. pages.__index = pages
  438. sections.__index = sections
  439. --
  440. function library:Notification(info)
  441. end
  442. --
  443. function library:Loader(info)
  444. local info = info or {}
  445. local name = info.name or info.Name or info.title or info.Title or "UI Title"
  446. local size = info.size or info.Size or Vector2.new(375,359)
  447. local accent = info.accent or info.Accent or info.color or info.Color or theme.accent
  448. local callback = info.callback or info.Callback or info.callBack or info.CallBack or function() end
  449. local pageammount = info.pages or info.Pages or 1
  450. --
  451. theme.accent = accent
  452. --
  453. local window = {pages = {}, loader = true, isVisible = false, pageammount = pageammount, callback = callback, wminfo = "$$$$$ AntarcticaWare $$$$$ || UID : %u || Ping : %s || Fps : %u", currentPage = nil, fading = false, dragging = false, drag = Vector2.new(0,0), currentContent = {frame = nil, dropdown = nil, multibox = nil, colorpicker = nil, keybind = nil, textbox = nil}}
  454. --
  455. local main_frame = utility:Create("Frame", {Vector2.new(0,0)}, {
  456. Size = utility:Size(0, size.X, 0, size.Y),
  457. Position = utility:Position(0.5, -(size.X/2) ,0.5, -(size.Y/2)),
  458. Color = theme.outline
  459. });window["main_frame"] = main_frame
  460. --
  461. library.colors[main_frame] = {
  462. Color = "outline"
  463. }
  464. --
  465. local frame_inline = utility:Create("Frame", {Vector2.new(1,1), main_frame}, {
  466. Size = utility:Size(1, -2, 1, -2, main_frame),
  467. Position = utility:Position(0, 1, 0, 1, main_frame),
  468. Color = theme.accent
  469. })
  470. --
  471. library.colors[frame_inline] = {
  472. Color = "accent"
  473. }
  474. --
  475. local inner_frame = utility:Create("Frame", {Vector2.new(1,1), frame_inline}, {
  476. Size = utility:Size(1, -2, 1, -2, frame_inline),
  477. Position = utility:Position(0, 1, 0, 1, frame_inline),
  478. Color = theme.lightcontrast
  479. })
  480. --
  481. library.colors[inner_frame] = {
  482. Color = "lightcontrast"
  483. }
  484. --
  485. local title = utility:Create("TextLabel", {Vector2.new(4,2), inner_frame}, {
  486. Text = name,
  487. Size = theme.textsize,
  488. Font = theme.font,
  489. Color = theme.textcolor,
  490. OutlineColor = theme.textborder,
  491. Position = utility:Position(0, 4, 0, 2, inner_frame)
  492. })
  493. --
  494. library.colors[title] = {
  495. OutlineColor = "textborder",
  496. Color = "textcolor"
  497. }
  498. --
  499. local inner_frame_inline = utility:Create("Frame", {Vector2.new(4,18), inner_frame}, {
  500. Size = utility:Size(1, -8, 1, -22, inner_frame),
  501. Position = utility:Position(0, 4, 0, 18, inner_frame),
  502. Color = theme.inline
  503. })
  504. --
  505. library.colors[inner_frame_inline] = {
  506. Color = "inline"
  507. }
  508. --
  509. local inner_frame_inline2 = utility:Create("Frame", {Vector2.new(1,1), inner_frame_inline}, {
  510. Size = utility:Size(1, -2, 1, -2, inner_frame_inline),
  511. Position = utility:Position(0, 1, 0, 1, inner_frame_inline),
  512. Color = theme.outline
  513. })
  514. --
  515. library.colors[inner_frame_inline2] = {
  516. Color = "outline"
  517. }
  518. --
  519. local back_frame = utility:Create("Frame", {Vector2.new(1,1), inner_frame_inline2}, {
  520. Size = utility:Size(1, -2, 1, -2, inner_frame_inline2),
  521. Position = utility:Position(0, 1, 0, 1, inner_frame_inline2),
  522. Color = theme.darkcontrast
  523. });window["back_frame"] = back_frame
  524. --
  525. library.colors[back_frame] = {
  526. Color = "darkcontrast"
  527. }
  528. --
  529. local tab_frame_inline = utility:Create("Frame", {Vector2.new(4,24), back_frame}, {
  530. Size = utility:Size(1, -8, 1, -28, back_frame),
  531. Position = utility:Position(0, 4, 0, 24, back_frame),
  532. Color = theme.outline
  533. })
  534. --
  535. library.colors[tab_frame_inline] = {
  536. Color = "outline"
  537. }
  538. --
  539. local tab_frame_inline2 = utility:Create("Frame", {Vector2.new(1,1), tab_frame_inline}, {
  540. Size = utility:Size(1, -2, 1, -2, tab_frame_inline),
  541. Position = utility:Position(0, 1, 0, 1, tab_frame_inline),
  542. Color = theme.inline
  543. })
  544. --
  545. library.colors[tab_frame_inline2] = {
  546. Color = "inline"
  547. }
  548. --
  549. local tab_frame = utility:Create("Frame", {Vector2.new(1,1), tab_frame_inline2}, {
  550. Size = utility:Size(1, -2, 1, -2, tab_frame_inline2),
  551. Position = utility:Position(0, 1, 0, 1, tab_frame_inline2),
  552. Color = theme.lightcontrast
  553. });window["tab_frame"] = tab_frame
  554. --
  555. library.colors[tab_frame] = {
  556. Color = "lightcontrast"
  557. }
  558. --
  559. function window:SetName(Name)
  560. title.Text = Name
  561. end
  562. --
  563. function window:Move(vector)
  564. for i,v in pairs(library.drawings) do
  565. if v[2][2] then
  566. v[1].Position = utility:Position(0, v[2][1].X, 0, v[2][1].Y, v[2][2])
  567. else
  568. v[1].Position = utility:Position(0, vector.X, 0, vector.Y)
  569. end
  570. end
  571. end
  572. --
  573. function window:CloseContent()
  574. if window.currentContent.dropdown and window.currentContent.dropdown.open then
  575. local dropdown = window.currentContent.dropdown
  576. dropdown.open = not dropdown.open
  577. utility:LoadImage(dropdown.dropdown_image, "arrow_down", "https://i.imgur.com/tVqy0nL.png")
  578. --
  579. for i,v in pairs(dropdown.holder.drawings) do
  580. utility:Remove(v)
  581. end
  582. --
  583. dropdown.holder.drawings = {}
  584. dropdown.holder.buttons = {}
  585. dropdown.holder.inline = nil
  586. --
  587. window.currentContent.frame = nil
  588. window.currentContent.dropdown = nil
  589. elseif window.currentContent.multibox and window.currentContent.multibox.open then
  590. local multibox = window.currentContent.multibox
  591. multibox.open = not multibox.open
  592. utility:LoadImage(multibox.multibox_image, "arrow_down", "https://i.imgur.com/tVqy0nL.png")
  593. --
  594. for i,v in pairs(multibox.holder.drawings) do
  595. utility:Remove(v)
  596. end
  597. --
  598. multibox.holder.drawings = {}
  599. multibox.holder.buttons = {}
  600. multibox.holder.inline = nil
  601. --
  602. window.currentContent.frame = nil
  603. window.currentContent.multibox = nil
  604. elseif window.currentContent.colorpicker and window.currentContent.colorpicker.open then
  605. local colorpicker = window.currentContent.colorpicker
  606. colorpicker.open = not colorpicker.open
  607. --
  608. for i,v in pairs(colorpicker.holder.drawings) do
  609. utility:Remove(v)
  610. end
  611. --
  612. colorpicker.holder.drawings = {}
  613. --
  614. window.currentContent.frame = nil
  615. window.currentContent.colorpicker = nil
  616. elseif window.currentContent.keybind and window.currentContent.keybind.open then
  617. local modemenu = window.currentContent.keybind.modemenu
  618. window.currentContent.keybind.open = not window.currentContent.keybind.open
  619. --
  620. for i,v in pairs(modemenu.drawings) do
  621. utility:Remove(v)
  622. end
  623. --
  624. modemenu.drawings = {}
  625. modemenu.buttons = {}
  626. modemenu.frame = nil
  627. --
  628. window.currentContent.frame = nil
  629. window.currentContent.keybind = nil
  630. elseif window.currentContent.textbox and window.currentContent.textbox.Disconnect then
  631. window.currentContent.textbox.Disconnect()
  632. window.currentContent.textbox = nil
  633. end
  634. end
  635. --
  636. function window:IsOverContent()
  637. local isOver = false
  638. --
  639. if window.currentContent.frame and utility:MouseOverDrawing({window.currentContent.frame.Position.X,window.currentContent.frame.Position.Y,window.currentContent.frame.Position.X + window.currentContent.frame.Size.X,window.currentContent.frame.Position.Y + window.currentContent.frame.Size.Y}) then
  640. isOver = true
  641. end
  642. --
  643. return isOver
  644. end
  645. --
  646. function window:Unload()
  647. for i,v in pairs(library.connections) do
  648. v:Disconnect()
  649. v = nil
  650. end
  651. --
  652. for i,v in next, library.hidden do
  653. coroutine.wrap(function()
  654. if v[1] and v[1].Remove and v[1].__OBJECT_EXISTS then
  655. local instance = v[1]
  656. v[1] = nil
  657. v = nil
  658. --
  659. instance:Remove()
  660. end
  661. end)()
  662. end
  663. --
  664. for i,v in pairs(library.drawings) do
  665. coroutine.wrap(function()
  666. if v[1].__OBJECT_EXISTS then
  667. local instance = v[1]
  668. v[2] = nil
  669. v[1] = nil
  670. v = nil
  671. --
  672. instance:Remove()
  673. end
  674. end)()
  675. end
  676. --
  677. for i,v in pairs(library.objects) do
  678. i:Remove()
  679. end
  680. --
  681. for i,v in pairs(library.began) do
  682. v = nil
  683. end
  684. --
  685. for i,v in pairs(library.ended) do
  686. v = nil
  687. end
  688. --
  689. for i,v in pairs(library.changed) do
  690. v = nil
  691. end
  692. --
  693. library.shared.initialized = false
  694. library.drawings = {}
  695. library.objects = {}
  696. library.hidden = {}
  697. library.connections = {}
  698. library.began = {}
  699. library.ended = {}
  700. library.changed = {}
  701. library.pointers = {}
  702. library.colors = {}
  703. --
  704. uis.MouseIconEnabled = true
  705. end
  706. --
  707. function window:Cursor(info)
  708. window.cursor = {}
  709. --
  710. local cursor = utility:Create("Triangle", nil, {
  711. Color = theme.cursoroutline,
  712. Thickness = 2.5,
  713. Filled = false,
  714. ZIndex = 65,
  715. Hidden = true
  716. });window.cursor["cursor"] = cursor
  717. --
  718. library.colors[cursor] = {
  719. Color = "cursoroutline"
  720. }
  721. --
  722. local cursor_inline = utility:Create("Triangle", nil, {
  723. Color = theme.accent,
  724. Filled = true,
  725. Thickness = 0,
  726. ZIndex = 65,
  727. Hidden = true
  728. });window.cursor["cursor_inline"] = cursor_inline
  729. --
  730. library.colors[cursor_inline] = {
  731. Color = "accent"
  732. }
  733. --
  734. utility:Connection(rs.RenderStepped, function()
  735. local mouseLocation = utility:MouseLocation()
  736. --
  737. cursor.PointA = Vector2.new(mouseLocation.X, mouseLocation.Y)
  738. cursor.PointB = Vector2.new(mouseLocation.X + 12, mouseLocation.Y + 4)
  739. cursor.PointC = Vector2.new(mouseLocation.X + 4, mouseLocation.Y + 12)
  740. --
  741. cursor_inline.PointA = Vector2.new(mouseLocation.X, mouseLocation.Y)
  742. cursor_inline.PointB = Vector2.new(mouseLocation.X + 12, mouseLocation.Y + 4)
  743. cursor_inline.PointC = Vector2.new(mouseLocation.X + 4, mouseLocation.Y + 12)
  744. end)
  745. --
  746. uis.MouseIconEnabled = false
  747. --
  748. return window.cursor
  749. end
  750. --
  751. function window:Fade()
  752. window.fading = true
  753. window.isVisible = not window.isVisible
  754. --
  755. spawn(function()
  756. for i, v in pairs(library.drawings) do
  757. utility:Lerp(v[1], {Transparency = window.isVisible and v[3] or 0}, 0.25)
  758. end
  759. end)
  760. --
  761. window.cursor["cursor"].Transparency = window.isVisible and 1 or 0
  762. window.cursor["cursor_inline"].Transparency = window.isVisible and 1 or 0
  763. uis.MouseIconEnabled = not window.isVisible
  764. --
  765. window.fading = false
  766. end
  767. --
  768. function window:Initialize()
  769. if window.pages[1] then window.pages[1]:Show() end
  770. --
  771. for i,v in pairs(window.pages) do
  772. v:Update()
  773. end
  774. --
  775. library.shared.initialized = true
  776. --
  777. --// window:Cursor()
  778. --
  779. window:Fade()
  780. end
  781. --
  782. library.began[#library.began + 1] = function(Input)
  783. if Input.UserInputType == Enum.UserInputType.MouseButton1 and window.isVisible and window.isVisible and utility:MouseOverDrawing({main_frame.Position.X,main_frame.Position.Y,main_frame.Position.X + main_frame.Size.X,main_frame.Position.Y + 20}) then
  784. local mouseLocation = utility:MouseLocation()
  785. --
  786. window.dragging = true
  787. window.drag = Vector2.new(mouseLocation.X - main_frame.Position.X, mouseLocation.Y - main_frame.Position.Y)
  788. end
  789. --
  790. if window.currentContent.textbox then
  791. if Find(utility.Keyboard.Letters, utility:InputToString(Input.KeyCode)) then
  792. if uis:IsKeyDown(Enum.KeyCode.LeftShift) then
  793. window.currentContent.textbox.Fire((utility:InputToString(Input.KeyCode)):upper())
  794. else
  795. window.currentContent.textbox.Fire((utility:InputToString(Input.KeyCode)):lower())
  796. end
  797. elseif utility:InputToString(Input.KeyCode) == "Space" then
  798. window.currentContent.textbox.Fire(" ")
  799. elseif utility.Keyboard.Modifiers[utility:InputToString(Input.KeyCode)] then
  800. if uis:IsKeyDown(Enum.KeyCode.LeftShift) then
  801. if utility.Keyboard.Modifiers[utility:InputToString(Input.KeyCode)] then
  802. window.currentContent.textbox.Fire(utility.Keyboard.Modifiers[utility:InputToString(Input.KeyCode)])
  803. end
  804. else
  805. window.currentContent.textbox.Fire(utility:InputToString(Input.KeyCode))
  806. end
  807. elseif utility:InputToString(Input.KeyCode) == "Back" then
  808. window.currentContent.textbox.Fire("Backspace")
  809. --
  810. window.currentContent.textbox.Backspace = {tick(), 0}
  811. end
  812. end
  813. end
  814. --
  815. library.ended[#library.ended + 1] = function(Input)
  816. if Input.UserInputType == Enum.UserInputType.MouseButton1 and window.isVisible and window.dragging then
  817. window.dragging = false
  818. window.drag = Vector2.new(0, 0)
  819. end
  820. --
  821. if window.currentContent.textbox and window.currentContent.textbox.Fire and window.currentContent.textbox.Backspace then
  822. if utility:InputToString(Input.KeyCode) == "Back" then
  823. window.currentContent.textbox.Backspace = nil
  824. end
  825. end
  826. end
  827. --
  828. library.changed[#library.changed + 1] = function(Input)
  829. if window.dragging and window.isVisible then
  830. local mouseLocation = utility:MouseLocation()
  831. if utility:GetScreenSize().Y-main_frame.Size.Y-5 > 5 then
  832. local move = Vector2.new(math.clamp(mouseLocation.X - window.drag.X, 5, utility:GetScreenSize().X-main_frame.Size.X-5), math.clamp(mouseLocation.Y - window.drag.Y, 5, utility:GetScreenSize().Y-main_frame.Size.Y-5))
  833. window:Move(move)
  834. else
  835. local move = Vector2.new(mouseLocation.X - window.drag.X, mouseLocation.Y - window.drag.Y)
  836. window:Move(move)
  837. end
  838. end
  839. end
  840. --
  841. library.began[#library.began + 1] = function(Input)
  842. if Input.KeyCode == Enum.KeyCode.P then
  843. local plrs = game:GetService("Players")
  844. local plr = plrs.LocalPlayer
  845. if #plrs:GetPlayers() <= 1 then
  846. plr:Kick("\nRejoining...")
  847. wait()
  848. game:GetService('TeleportService'):Teleport(game.PlaceId, plr)
  849. else
  850. game:GetService('TeleportService'):TeleportToPlaceInstance(game.PlaceId, game.JobId, plr)
  851. end
  852. elseif Input.KeyCode == Enum.KeyCode.U then
  853. window:Unload()
  854. end
  855. end
  856. --
  857. utility:Connection(uis.InputBegan,function(Input)
  858. for _, func in pairs(library.began) do
  859. if not window.dragging then
  860. local e,s = pcall(function()
  861. func(Input)
  862. end)
  863. else
  864. break
  865. end
  866. end
  867. end)
  868. --
  869. utility:Connection(uis.InputEnded,function(Input)
  870. for _, func in pairs(library.ended) do
  871. local e,s = pcall(function()
  872. func(Input)
  873. end)
  874. end
  875. end)
  876. --
  877. utility:Connection(uis.InputChanged,function()
  878. for _, func in pairs(library.changed) do
  879. local e,s = pcall(function()
  880. func()
  881. end)
  882. end
  883. end)
  884. --
  885. utility:Connection(rs.RenderStepped,function()
  886. if window.currentContent.textbox and window.currentContent.textbox.Fire and window.currentContent.textbox.Backspace then
  887. local Time = (tick() - window.currentContent.textbox.Backspace[1])
  888. --
  889. if Time > 0.4 then
  890. window.currentContent.textbox.Backspace[2] = window.currentContent.textbox.Backspace[2] + 1
  891. --
  892. if (window.currentContent.textbox.Backspace[2] % 5 == 0) then
  893. window.currentContent.textbox.Fire("Backspace")
  894. end
  895. end
  896. end
  897. end)
  898. --
  899. utility:Connection(ws.CurrentCamera:GetPropertyChangedSignal("ViewportSize"),function()
  900. window:Move(Vector2.new((utility:GetScreenSize().X/2) - (size.X/2), (utility:GetScreenSize().Y/2) - (size.Y/2)))
  901. end)
  902. --
  903. return setmetatable(window, library)
  904. end
  905. --
  906. function library:New(info)
  907. local info = info or {}
  908. local name = info.name or info.Name or info.title or info.Title or "UI Title"
  909. local size = info.size or info.Size or Vector2.new(504,604)
  910. local accent = info.accent or info.Accent or info.color or info.Color or theme.accent
  911. local callback = info.callback or info.Callback or info.callBack or info.CallBack or function() end
  912. local style = info.style or info.Style or 1
  913. local pageammount = info.PageAmmount
  914. --
  915. theme.accent = accent
  916. --
  917. local window = {pages = {}, loader = style == 2, init = false, pageammount = pageammount, isVisible = false, callback = callback, uibind = Enum.KeyCode.Z, wminfo = "$$$$$ AntarcticaWare $$$$$ || UID : %u || Ping : %s || Fps : %u", currentPage = nil, fading = false, dragging = false, drag = Vector2.new(0,0), currentContent = {frame = nil, dropdown = nil, multibox = nil, colorpicker = nil, keybind = nil, textbox = nil}}
  918. --
  919. local main_frame = utility:Create("Frame", {Vector2.new(0,0)}, {
  920. Size = utility:Size(0, size.X, 0, size.Y),
  921. Position = utility:Position(0.5, -(size.X/2) ,0.5, -(size.Y/2)),
  922. Color = theme.outline
  923. });window["main_frame"] = main_frame
  924. --
  925. library.colors[main_frame] = {
  926. Color = "outline"
  927. }
  928. --
  929. local frame_inline = utility:Create("Frame", {Vector2.new(1,1), main_frame}, {
  930. Size = utility:Size(1, -2, 1, -2, main_frame),
  931. Position = utility:Position(0, 1, 0, 1, main_frame),
  932. Color = theme.accent
  933. })
  934. --
  935. library.colors[frame_inline] = {
  936. Color = "accent"
  937. }
  938. --
  939. local inner_frame = utility:Create("Frame", {Vector2.new(1,1), frame_inline}, {
  940. Size = utility:Size(1, -2, 1, -2, frame_inline),
  941. Position = utility:Position(0, 1, 0, 1, frame_inline),
  942. Color = theme.lightcontrast
  943. })
  944. --
  945. library.colors[inner_frame] = {
  946. Color = "lightcontrast"
  947. }
  948. --
  949. local title = utility:Create("TextLabel", {Vector2.new(4,2), inner_frame}, {
  950. Text = name,
  951. Size = theme.textsize,
  952. Font = theme.font,
  953. Color = theme.textcolor,
  954. OutlineColor = theme.textborder,
  955. Position = utility:Position(0, 4, 0, 2, inner_frame)
  956. })
  957. --
  958. window.UpdateTitle = function(name: string)
  959. title.Text = name
  960. end
  961. --
  962. library.colors[title] = {
  963. OutlineColor = "textborder",
  964. Color = "textcolor"
  965. }
  966. --
  967. local inner_frame_inline = utility:Create("Frame", {Vector2.new(4,18), inner_frame}, {
  968. Size = utility:Size(1, -8, 1, -22, inner_frame),
  969. Position = utility:Position(0, 4, 0, 18, inner_frame),
  970. Color = theme.inline
  971. })
  972. --
  973. library.colors[inner_frame_inline] = {
  974. Color = "inline"
  975. }
  976. --
  977. local inner_frame_inline2 = utility:Create("Frame", {Vector2.new(1,1), inner_frame_inline}, {
  978. Size = utility:Size(1, -2, 1, -2, inner_frame_inline),
  979. Position = utility:Position(0, 1, 0, 1, inner_frame_inline),
  980. Color = theme.outline
  981. })
  982. --
  983. library.colors[inner_frame_inline2] = {
  984. Color = "outline"
  985. }
  986. --
  987. local back_frame = utility:Create("Frame", {Vector2.new(1,1), inner_frame_inline2}, {
  988. Size = utility:Size(1, -2, 1, -2, inner_frame_inline2),
  989. Position = utility:Position(0, 1, 0, 1, inner_frame_inline2),
  990. Color = theme.darkcontrast
  991. });window["back_frame"] = back_frame
  992. --
  993. library.colors[back_frame] = {
  994. Color = "darkcontrast"
  995. }
  996. --
  997. local tab_frame_inline = utility:Create("Frame", {Vector2.new(4,24), back_frame}, {
  998. Size = utility:Size(1, -8, 1, -28, back_frame),
  999. Position = utility:Position(0, 4, 0, 24, back_frame),
  1000. Color = theme.outline
  1001. })
  1002. --
  1003. library.colors[tab_frame_inline] = {
  1004. Color = "outline"
  1005. }
  1006. --
  1007. local tab_frame_inline2 = utility:Create("Frame", {Vector2.new(1,1), tab_frame_inline}, {
  1008. Size = utility:Size(1, -2, 1, -2, tab_frame_inline),
  1009. Position = utility:Position(0, 1, 0, 1, tab_frame_inline),
  1010. Color = theme.inline
  1011. })
  1012. --
  1013. library.colors[tab_frame_inline2] = {
  1014. Color = "inline"
  1015. }
  1016. --
  1017. local tab_frame = utility:Create("Frame", {Vector2.new(1,1), tab_frame_inline2}, {
  1018. Size = utility:Size(1, -2, 1, -2, tab_frame_inline2),
  1019. Position = utility:Position(0, 1, 0, 1, tab_frame_inline2),
  1020. Color = theme.lightcontrast
  1021. });window["tab_frame"] = tab_frame
  1022. --
  1023. library.colors[tab_frame] = {
  1024. Color = "lightcontrast"
  1025. }
  1026. --
  1027. function ColorLerp(Value, MinColor, MaxColor)
  1028. if Value <= 0 then return MaxColor end
  1029. if Value >= 100 then return MinColor end
  1030. --
  1031. return Color3.new(
  1032. MaxColor.R + (MinColor.R - MaxColor.R) * Value,
  1033. MaxColor.G + (MinColor.G - MaxColor.G) * Value,
  1034. MaxColor.B + (MinColor.B - MaxColor.B) * Value
  1035. )
  1036. end
  1037. -- // Esp Preview
  1038. do
  1039. if esppreview then
  1040. window.VisualPreview = {
  1041. Size = {X = 5, Y = 0},
  1042. Color1 = Color3.fromRGB(0, 255, 0),
  1043. Color2 = Color3.fromRGB(255, 0, 0),
  1044. HealthBarFade = 0,
  1045. Fading = false,
  1046. State = false,
  1047. Visible = true,
  1048. Drawings = {},
  1049. Components = {
  1050. Box = {
  1051. Outline = nil,
  1052. Box = nil,
  1053. Fill = nil
  1054. },
  1055. HealthBar = {
  1056. Outline = nil,
  1057. Box = nil,
  1058. Value = nil
  1059. },
  1060. Skeleton = {
  1061. Head = {},
  1062. Torso = {},
  1063. LeftArm = {},
  1064. RightArm = {},
  1065. Hips = {},
  1066. LeftLeg = {},
  1067. RightLeg = {},
  1068. HipsTorso = {}
  1069. },
  1070. Chams = {
  1071. Head = {},
  1072. Torso = {},
  1073. LeftArm = {},
  1074. RightArm = {},
  1075. LeftLeg = {},
  1076. RightLeg = {}
  1077. },
  1078. Title = {
  1079. Text = nil
  1080. },
  1081. Distance = {
  1082. Text = nil
  1083. },
  1084. Tool = {
  1085. Text = nil
  1086. },
  1087. Flags = {
  1088. Text = nil
  1089. }
  1090. }
  1091. }
  1092. --
  1093. local esppreview_frame = utility:Create("Frame", {Vector2.new(main_frame.Size.X + 5,0), main_frame}, {
  1094. Size = utility:Size(0, 236, 0, 339),
  1095. Position = utility:Position(1, 5, 0, 0, main_frame),
  1096. Color = theme.outline
  1097. }, window.VisualPreview.Drawings)
  1098. --
  1099. library.colors[esppreview_frame] = {
  1100. Color = "outline"
  1101. }
  1102. --
  1103. local esppreview_inline = utility:Create("Frame", {Vector2.new(1,1), esppreview_frame}, {
  1104. Size = utility:Size(1, -2, 1, -2, esppreview_frame),
  1105. Position = utility:Position(0, 1, 0, 1, esppreview_frame),
  1106. Color = theme.accent
  1107. }, window.VisualPreview.Drawings)
  1108. --
  1109. library.colors[esppreview_inline] = {
  1110. Color = "accent"
  1111. }
  1112. --
  1113. local esppreview_inner = utility:Create("Frame", {Vector2.new(1,1), esppreview_inline}, {
  1114. Size = utility:Size(1, -2, 1, -2, esppreview_inline),
  1115. Position = utility:Position(0, 1, 0, 1, esppreview_inline),
  1116. Color = theme.lightcontrast
  1117. }, window.VisualPreview.Drawings)
  1118. --
  1119. library.colors[esppreview_inner] = {
  1120. Color = "lightcontrast"
  1121. }
  1122. --
  1123. local esppreview_title = utility:Create("TextLabel", {Vector2.new(4,2), esppreview_inner}, {
  1124. Text = "ESP Preview",
  1125. Size = theme.textsize,
  1126. Font = theme.font,
  1127. Color = theme.textcolor,
  1128. OutlineColor = theme.textborder,
  1129. Position = utility:Position(0, 4, 0, 2, esppreview_inner)
  1130. }, window.VisualPreview.Drawings)
  1131. --
  1132. local esppreview_visiblebutton = utility:Create("TextLabel", {Vector2.new(esppreview_inner.Size.X - (5 + 7),2), esppreview_inner}, {
  1133. Text = "O",
  1134. Size = theme.textsize,
  1135. Font = theme.font,
  1136. Color = theme.textcolor,
  1137. OutlineColor = theme.textborder,
  1138. Position = utility:Position(1, -(5 + 7), 0, 2, esppreview_inner)
  1139. }, window.VisualPreview.Drawings)
  1140. --
  1141. library.colors[esppreview_title] = {
  1142. OutlineColor = "textborder",
  1143. Color = "textcolor"
  1144. }
  1145. --
  1146. local esppreview_inner_inline = utility:Create("Frame", {Vector2.new(4,18), esppreview_inner}, {
  1147. Size = utility:Size(1, -8, 1, -22, esppreview_inner),
  1148. Position = utility:Position(0, 4, 0, 18, esppreview_inner),
  1149. Color = theme.inline
  1150. }, window.VisualPreview.Drawings)
  1151. --
  1152. library.colors[esppreview_inner_inline] = {
  1153. Color = "inline"
  1154. }
  1155. --
  1156. local esppreview_inner_outline = utility:Create("Frame", {Vector2.new(1,1), esppreview_inner_inline}, {
  1157. Size = utility:Size(1, -2, 1, -2, esppreview_inner_inline),
  1158. Position = utility:Position(0, 1, 0, 1, esppreview_inner_inline),
  1159. Color = theme.outline
  1160. }, window.VisualPreview.Drawings)
  1161. --
  1162. library.colors[esppreview_inner_outline] = {
  1163. Color = "outline"
  1164. }
  1165. --
  1166. local esppreview_inner_frame = utility:Create("Frame", {Vector2.new(1,1), esppreview_inner_outline}, {
  1167. Size = utility:Size(1, -2, 1, -2, esppreview_inner_outline),
  1168. Position = utility:Position(0, 1, 0, 1, esppreview_inner_outline),
  1169. Color = theme.darkcontrast
  1170. }, window.VisualPreview.Drawings)
  1171. --
  1172. library.colors[esppreview_inner_frame] = {
  1173. Color = "darkcontrast"
  1174. }
  1175. --
  1176. local esppreview_frame_previewbox = utility:Create("Frame", {Vector2.new(10,10), esppreview_inner_frame}, {
  1177. Size = utility:Size(1, -20, 1, -20, esppreview_inner_frame),
  1178. Position = utility:Position(0, 10, 0, 10, esppreview_inner_frame),
  1179. Color = Color3.fromRGB(0, 0, 0),
  1180. Transparency = 0
  1181. })
  1182. --
  1183. local BoxSize = utility:Size(1, -7, 1, -55, esppreview_frame_previewbox)
  1184. local healthbaroutline
  1185. local healthbar
  1186. local healthvalue
  1187. local boxoutline
  1188. --
  1189. function window.VisualPreview:UpdateHealthBar()
  1190. window.VisualPreview.HealthBarFade = window.VisualPreview.HealthBarFade + 0.015
  1191. local Smoothened = (math.acos(math.cos(window.VisualPreview.HealthBarFade * math.pi)) / math.pi)
  1192. local Size = (healthbaroutline.Size.Y - 2) * Smoothened
  1193. local Color = ColorLerp(Smoothened, window.VisualPreview.Color1, window.VisualPreview.Color2)
  1194. --
  1195. healthvalue.Text = "<- " .. math.round(Smoothened * 100)
  1196. healthvalue.Color = Color
  1197. healthbar.Color = Color
  1198. healthbar.Size = utility:Size(1, -2, 0, Size, healthbaroutline)
  1199. healthbar.Position = utility:Position(0, 1, 1, -Size - 1, healthbaroutline)
  1200. utility:UpdateOffset(healthbar, {Vector2.new(1, healthbaroutline.Size.Y - Size - 1), healthbaroutline})
  1201. end
  1202. --
  1203. function window.VisualPreview:UpdateHealthValue(Size)
  1204. local New = Vector2.new(healthbar.Position.X + (5 - Size), math.clamp(healthbar.Position.Y + 5, 0, (healthbar.Position.Y) + (healthbar.Size.Y) - 18))
  1205. --
  1206. healthvalue.Position = New
  1207. utility:UpdateOffset(healthvalue, {Vector2.new(5 - Size, New.Y - healthbar.Position.Y), healthbar})
  1208. end
  1209. --
  1210. function window.VisualPreview:ValidateSize(Side, Size)
  1211. if not (window.VisualPreview.Size[Side] == Size) then
  1212. window.VisualPreview.Size[Side] = Size
  1213. --
  1214. esppreview_frame.Size = utility:Size(0, 231 + window.VisualPreview.Size[Side], 0, 339)
  1215. esppreview_inline.Size = utility:Size(1, -2, 1, -2, esppreview_frame)
  1216. esppreview_inner.Size = utility:Size(1, -2, 1, -2, esppreview_inline)
  1217. esppreview_inner_inline.Size = utility:Size(1, -8, 1, -22, esppreview_inner)
  1218. esppreview_inner_outline.Size = utility:Size(1, -2, 1, -2, esppreview_inner_inline)
  1219. esppreview_inner_frame.Size = utility:Size(1, -2, 1, -2, esppreview_inner_outline)
  1220. esppreview_frame_previewbox.Size = utility:Size(1, -20, 1, -20, esppreview_inner_frame)
  1221. --
  1222. esppreview_visiblebutton.Position = utility:Position(1, -(5 + 7), 0, 2, esppreview_inner)
  1223. esppreview_frame_previewbox.Position = utility:Position(0, 10, 0, 10, esppreview_inner_frame)
  1224. --
  1225. utility:UpdateOffset(esppreview_visiblebutton, {Vector2.new(esppreview_inner.Size.X - (5 + 7),2), esppreview_inner})
  1226. utility:UpdateOffset(esppreview_frame_previewbox, {Vector2.new(10,10), esppreview_inner_frame})
  1227. utility:UpdateOffset(boxoutline, {Vector2.new(esppreview_frame_previewbox.Size.X - BoxSize.X - 1, 20), esppreview_frame_previewbox})
  1228. --
  1229. window:Move(main_frame.Position + Vector2.new(0, 0))
  1230. end
  1231. end
  1232. --
  1233. function window.VisualPreview:SetPreviewState(State)
  1234. window.VisualPreview.Fading = true
  1235. window.VisualPreview.State = State
  1236. --
  1237. task.spawn(function()
  1238. for Index, Value in pairs(window.VisualPreview.Drawings) do
  1239. utility:Lerp(Index, {Transparency = window.VisualPreview.State and Value or 0}, 0.2)
  1240. utility:UpdateTransparency(Index, window.VisualPreview.State and Value or 0)
  1241. end
  1242. end)
  1243. --
  1244. window.VisualPreview.Fading = false
  1245. end
  1246. --
  1247. function window.VisualPreview:SetComponentProperty(Component, Property, State, Index)
  1248. for Index2, Value in pairs(window.VisualPreview.Components[Component]) do
  1249. if Index then
  1250. Value[Index][Property] = State
  1251. --
  1252. if Property == "Transparency" then
  1253. utility:UpdateTransparency(Value[Index], State)
  1254. if window.VisualPreview.Drawings[Value[Index]] then
  1255. window.VisualPreview.Drawings[Value[Index]] = State
  1256. end
  1257. end
  1258. else
  1259. Value[Property] = State
  1260. --
  1261. if Property == "Transparency" then
  1262. utility:UpdateTransparency(Value, State)
  1263. if window.VisualPreview.Drawings[Value] then
  1264. window.VisualPreview.Drawings[Value] = State
  1265. end
  1266. end
  1267. end
  1268. end
  1269. end
  1270. --
  1271. function window.VisualPreview:SetComponentSelfProperty(Component, Self, Property, State, Index)
  1272. if Index then
  1273. window.VisualPreview.Components[Component][Self][Index][Property] = State
  1274. --
  1275. if Property == "Transparency" then
  1276. utility:UpdateTransparency(window.VisualPreview.Components[Component][Self][Index], State)
  1277. if window.VisualPreview.Drawings[window.VisualPreview.Components[Component][Self][Index]] then
  1278. window.VisualPreview.Drawings[window.VisualPreview.Components[Component][Self][Index]] = State
  1279. end
  1280. end
  1281. else
  1282. window.VisualPreview.Components[Component][Self][Property] = State
  1283. --
  1284. if Property == "Transparency" then
  1285. utility:UpdateTransparency(window.VisualPreview.Components[Component][Self], State)
  1286. if window.VisualPreview.Drawings[window.VisualPreview.Components[Component][Self]] then
  1287. window.VisualPreview.Drawings[window.VisualPreview.Components[Component][Self]] = State
  1288. end
  1289. end
  1290. end
  1291. end
  1292. --
  1293. library.began[#library.began + 1] = function(Input)
  1294. if Input.UserInputType == Enum.UserInputType.MouseButton1 and esppreview_visiblebutton.Visible and window.isVisible and utility:MouseOverDrawing({esppreview_visiblebutton.Position.X, esppreview_visiblebutton.Position.Y, esppreview_visiblebutton.Position.X + esppreview_visiblebutton.TextBounds.X, esppreview_visiblebutton.Position.Y + esppreview_visiblebutton.TextBounds.Y}) and not window:IsOverContent() then
  1295. window.VisualPreview.Visible = not window.VisualPreview.Visible
  1296. esppreview_visiblebutton.Text = window.VisualPreview.Visible and "O" or "0"
  1297. end
  1298. end
  1299. --
  1300. do -- Preview Stuff
  1301. local preview_boxoutline = utility:Create("Frame", {Vector2.new(esppreview_frame_previewbox.Size.X - BoxSize.X - 1, 20), esppreview_frame_previewbox}, {
  1302. Size = BoxSize,
  1303. Position = utility:Position(1, -(BoxSize.X - 1), 0, 20, esppreview_frame_previewbox),
  1304. Color = Color3.fromRGB(0, 0, 0),
  1305. Filled = false,
  1306. Thickness = 2.5
  1307. }, window.VisualPreview.Drawings);boxoutline = preview_boxoutline
  1308. --
  1309. local preview_box = utility:Create("Frame", {Vector2.new(0, 0), preview_boxoutline}, {
  1310. Size = utility:Size(1, 0, 1, 0, preview_boxoutline),
  1311. Position = utility:Position(0, 0, 0, 0, preview_boxoutline),
  1312. Color = Color3.fromRGB(255, 255, 255),
  1313. Filled = false,
  1314. Thickness = 0.6
  1315. }, window.VisualPreview.Drawings)
  1316. --
  1317. local preview_heatlhbaroutline = utility:Create("Frame", {Vector2.new(-6, -1), preview_boxoutline}, {
  1318. Size = utility:Size(0, 4, 1, 2, preview_boxoutline),
  1319. Position = utility:Position(0, -6, 0, -1, preview_boxoutline),
  1320. Color = Color3.fromRGB(0, 0, 0),
  1321. Filled = true
  1322. }, window.VisualPreview.Drawings);healthbaroutline = preview_heatlhbaroutline
  1323. --
  1324. local preview_heatlhbar = utility:Create("Frame", {Vector2.new(1, 1), preview_heatlhbaroutline}, {
  1325. Size = utility:Size(1, -2, 1, -2, preview_heatlhbaroutline),
  1326. Position = utility:Position(0, 1, 0, 1, preview_heatlhbaroutline),
  1327. Color = Color3.fromRGB(255, 0, 0),
  1328. Filled = true
  1329. }, window.VisualPreview.Drawings);healthbar = preview_heatlhbar
  1330. --
  1331. local preview_title = utility:Create("TextLabel", {Vector2.new(preview_box.Size.X / 2, -20), preview_box}, {
  1332. Text = "Username",
  1333. Size = theme.textsize,
  1334. Font = theme.font,
  1335. Color = theme.textcolor,
  1336. OutlineColor = theme.textborder,
  1337. Center = true,
  1338. Position = utility:Position(0.5, 0, 0, -20, preview_box)
  1339. }, window.VisualPreview.Drawings)
  1340. --
  1341. local preview_distance = utility:Create("TextLabel", {Vector2.new(preview_box.Size.X / 2, preview_box.Size.Y + 5), preview_box}, {
  1342. Text = "25m",
  1343. Size = theme.textsize,
  1344. Font = theme.font,
  1345. Color = theme.textcolor,
  1346. OutlineColor = theme.textborder,
  1347. Center = true,
  1348. Position = utility:Position(0.5, 0, 1, 5, preview_box)
  1349. }, window.VisualPreview.Drawings)
  1350. --
  1351. local preview_tool = utility:Create("TextLabel", {Vector2.new(preview_box.Size.X / 2, preview_box.Size.Y + 20), preview_box}, {
  1352. Text = "Weapon",
  1353. Size = theme.textsize,
  1354. Font = theme.font,
  1355. Color = theme.textcolor,
  1356. OutlineColor = theme.textborder,
  1357. Center = true,
  1358. Position = utility:Position(0.5, 0, 1, 20, preview_box)
  1359. }, window.VisualPreview.Drawings)
  1360. --
  1361. local preview_character = utility:Create("Frame", {Vector2.new(46/2, 40/2), preview_box}, {
  1362. Size = utility:Size(1, -46, 1, -40, preview_box),
  1363. Position = utility:Position(0, (46/2), 0, (40/2), preview_box),
  1364. Color = Color3.fromRGB(255, 255, 255),
  1365. Transparency = 0
  1366. }, window.VisualPreview.Drawings)
  1367. --
  1368. do -- Chams
  1369. for Index = 1, 2 do
  1370. local transparency = Index == 1 and 0.75 or 0.5
  1371. local color = Index == 1 and Color3.fromRGB(93, 62, 152) or Color3.fromRGB(255, 255, 255)
  1372. --
  1373. local extrasize = Index == 1 and 4 or 0
  1374. local extraoffset = Index == 1 and -2 or 0
  1375. --
  1376. local preview_character_head = utility:Create("Frame", {Vector2.new((preview_character.Size.X * 0.35) + (extraoffset), extraoffset), preview_character}, {
  1377. Size = utility:Size(0.3, extrasize, 0.2, 0, preview_character),
  1378. Position = utility:Position(0.35, extraoffset, 0, extraoffset, preview_character),
  1379. Color = color,
  1380. Transparency = transparency
  1381. }, window.VisualPreview.Drawings)
  1382. --
  1383. local preview_character_torso = utility:Create("Frame", {Vector2.new((preview_character.Size.X * 0.25) + (extraoffset), (preview_character.Size.Y * 0.2) + (extraoffset)), preview_character}, {
  1384. Size = utility:Size(0.5, extrasize, 0.4, extrasize, preview_character),
  1385. Position = utility:Position(0.25, extraoffset, 0.2, extraoffset, preview_character),
  1386. Color = color,
  1387. Transparency = transparency
  1388. }, window.VisualPreview.Drawings)
  1389. --
  1390. local preview_character_leftarm = utility:Create("Frame", {Vector2.new(extraoffset, (preview_character.Size.Y * 0.2) + (extraoffset)), preview_character}, {
  1391. Size = utility:Size(0.25, 0, 0.4, extrasize, preview_character),
  1392. Position = utility:Position(0, extraoffset, 0.2, extraoffset, preview_character),
  1393. Color = color,
  1394. Transparency = transparency
  1395. }, window.VisualPreview.Drawings)
  1396. --
  1397. local preview_character_rightarm = utility:Create("Frame", {Vector2.new((preview_character.Size.X * 0.75) + (extraoffset + extrasize), (preview_character.Size.Y * 0.2) + (extraoffset)), preview_character}, {
  1398. Size = utility:Size(0.25, 0, 0.4, extrasize, preview_character),
  1399. Position = utility:Position(0.75, extraoffset, 0.2, extraoffset, preview_character),
  1400. Color = color,
  1401. Transparency = transparency
  1402. }, window.VisualPreview.Drawings)
  1403. --
  1404. local preview_character_leftleg = utility:Create("Frame", {Vector2.new((preview_character.Size.X * 0.25) + (extraoffset), (preview_character.Size.Y * 0.6) + (extraoffset + extrasize)), preview_character}, {
  1405. Size = utility:Size(0.25, extrasize / 2, 0.4, 0, preview_character),
  1406. Position = utility:Position(0.25, extraoffset, 0.6, extraoffset + extrasize, preview_character),
  1407. Color = color,
  1408. Transparency = transparency
  1409. }, window.VisualPreview.Drawings)
  1410. --
  1411. local preview_character_rightleg = utility:Create("Frame", {Vector2.new((preview_character.Size.X * 0.5) + (extraoffset + (extrasize / 2)), (preview_character.Size.Y * 0.6) + (extraoffset + extrasize)), preview_character}, {
  1412. Size = utility:Size(0.25, extrasize / 2, 0.4, 0, preview_character),
  1413. Position = utility:Position(0.25, extraoffset, 0.6, extraoffset + extrasize, preview_character),
  1414. Color = color,
  1415. Transparency = transparency
  1416. }, window.VisualPreview.Drawings)
  1417. --
  1418. window.VisualPreview.Components.Chams["Head"][Index] = preview_character_head
  1419. window.VisualPreview.Components.Chams["Torso"][Index] = preview_character_torso
  1420. window.VisualPreview.Components.Chams["LeftArm"][Index] = preview_character_leftarm
  1421. window.VisualPreview.Components.Chams["RightArm"][Index] = preview_character_rightarm
  1422. window.VisualPreview.Components.Chams["LeftLeg"][Index] = preview_character_leftleg
  1423. window.VisualPreview.Components.Chams["RightLeg"][Index] = preview_character_rightleg
  1424. end
  1425. end
  1426. --
  1427. do -- Skeleton
  1428. for Index = 1, 2 do
  1429. local skeletonsize = Vector2.new(Index == 1 and 3 or 1, Index == 1 and -10 or -12)
  1430. local skeletonoffset = Vector2.new(Index == 1 and -1 or 0, Index == 1 and 5 or 6)
  1431. local transparency = 0.5
  1432. local color = Index == 1 and Color3.fromRGB(0, 0, 0) or Color3.fromRGB(255, 255, 255)
  1433. --
  1434. local preview_skeleton_head = utility:Create("Frame", {Vector2.new((window.VisualPreview.Components.Chams["Head"][2].Size.X * 0.5) + skeletonoffset.X, (window.VisualPreview.Components.Chams["Head"][2].Size.Y * 0.5) + skeletonoffset.Y), window.VisualPreview.Components.Chams["Head"][2]}, {
  1435. Size = utility:Size(0, skeletonsize.X, 0.5, 0, window.VisualPreview.Components.Chams["Head"][2]),
  1436. Position = utility:Position(0.5, skeletonoffset.X, 0.5, skeletonoffset.Y, window.VisualPreview.Components.Chams["Head"][2]),
  1437. Color = color,
  1438. Transparency = transparency
  1439. }, window.VisualPreview.Drawings)
  1440. --
  1441. local preview_skeleton_torso = utility:Create("Frame", {Vector2.new((window.VisualPreview.Components.Chams["Torso"][2].Size.X * 0) + skeletonoffset.X - (window.VisualPreview.Components.Chams["LeftArm"][2].Size.X / 2) + (Index == 1 and 3 or 1), skeletonoffset.Y), window.VisualPreview.Components.Chams["Torso"][2]}, {
  1442. Size = utility:Size(1, skeletonsize.X + window.VisualPreview.Components.Chams["LeftArm"][2].Size.X - (Index == 1 and 6 or 2), 0, skeletonsize.X, window.VisualPreview.Components.Chams["Torso"][2]),
  1443. Position = utility:Position(0, skeletonoffset.X - (window.VisualPreview.Components.Chams["LeftArm"][2].Size.X / 2) + (Index == 1 and 3 or 1), 0, skeletonoffset.Y, window.VisualPreview.Components.Chams["Torso"][2]),
  1444. Color = color,
  1445. Transparency = transparency
  1446. }, window.VisualPreview.Drawings)
  1447. --
  1448. local preview_skeleton_leftarm = utility:Create("Frame", {Vector2.new((window.VisualPreview.Components.Chams["LeftArm"][2].Size.X * 0.5) + skeletonoffset.X, skeletonoffset.Y), window.VisualPreview.Components.Chams["LeftArm"][2]}, {
  1449. Size = utility:Size(0, skeletonsize.X, 1, skeletonsize.Y, window.VisualPreview.Components.Chams["LeftArm"][2]),
  1450. Position = utility:Position(0.5, skeletonoffset.X, 0, skeletonoffset.Y, window.VisualPreview.Components.Chams["LeftArm"][2]),
  1451. Color = color,
  1452. Transparency = transparency
  1453. }, window.VisualPreview.Drawings)
  1454. --
  1455. local preview_skeleton_rightarm = utility:Create("Frame", {Vector2.new((window.VisualPreview.Components.Chams["RightArm"][2].Size.X * 0.5) + skeletonoffset.X, skeletonoffset.Y), window.VisualPreview.Components.Chams["RightArm"][2]}, {
  1456. Size = utility:Size(0, skeletonsize.X, 1, skeletonsize.Y, window.VisualPreview.Components.Chams["RightArm"][2]),
  1457. Position = utility:Position(0.5, skeletonoffset.X, 0, skeletonoffset.Y, window.VisualPreview.Components.Chams["RightArm"][2]),
  1458. Color = color,
  1459. Transparency = transparency
  1460. }, window.VisualPreview.Drawings)
  1461. --
  1462. local preview_skeleton_hips = utility:Create("Frame", {Vector2.new((window.VisualPreview.Components.Chams["LeftLeg"][2].Size.X * 1) + skeletonoffset.X - (window.VisualPreview.Components.Chams["LeftLeg"][2].Size.X / 2) + (Index == 1 and 3 or 1), skeletonoffset.Y), window.VisualPreview.Components.Chams["LeftLeg"][2]}, {
  1463. Size = utility:Size(1, skeletonsize.X - (Index == 1 and 6 or 2), 0, skeletonsize.X, window.VisualPreview.Components.Chams["LeftLeg"][2]),
  1464. Position = utility:Position(0.5, skeletonoffset.X + (Index == 1 and 3 or 1), 0, skeletonoffset.Y, window.VisualPreview.Components.Chams["LeftLeg"][2]),
  1465. Color = color,
  1466. Transparency = transparency
  1467. }, window.VisualPreview.Drawings)
  1468. --
  1469. local preview_skeleton_leftleg = utility:Create("Frame", {Vector2.new((window.VisualPreview.Components.Chams["LeftLeg"][2].Size.X * 0.5) + skeletonoffset.X, skeletonoffset.Y), window.VisualPreview.Components.Chams["LeftLeg"][2]}, {
  1470. Size = utility:Size(0, skeletonsize.X, 1, skeletonsize.Y, window.VisualPreview.Components.Chams["LeftLeg"][2]),
  1471. Position = utility:Position(0.5, skeletonoffset.X, 0, skeletonoffset.Y, window.VisualPreview.Components.Chams["LeftLeg"][2]),
  1472. Color = color,
  1473. Transparency = transparency
  1474. }, window.VisualPreview.Drawings)
  1475. --
  1476. local preview_skeleton_rightleg = utility:Create("Frame", {Vector2.new((window.VisualPreview.Components.Chams["RightLeg"][2].Size.X * 0.5) + skeletonoffset.X, skeletonoffset.Y), window.VisualPreview.Components.Chams["RightLeg"][2]}, {
  1477. Size = utility:Size(0, skeletonsize.X, 1, skeletonsize.Y, window.VisualPreview.Components.Chams["RightLeg"][2]),
  1478. Position = utility:Position(0.5, skeletonoffset.X, 0, skeletonoffset.Y, window.VisualPreview.Components.Chams["RightLeg"][2]),
  1479. Color = color,
  1480. Transparency = transparency
  1481. }, window.VisualPreview.Drawings)
  1482. --
  1483. local preview_skeleton_hipstorso = utility:Create("Frame", {Vector2.new((window.VisualPreview.Components.Chams["Torso"][2].Size.X * 0.5) + skeletonoffset.X, skeletonoffset.Y + (Index == 1 and 3 or 1)), window.VisualPreview.Components.Chams["Torso"][2]}, {
  1484. Size = utility:Size(0, skeletonsize.X, 1, Index == 1 and -3 or -1, window.VisualPreview.Components.Chams["Torso"][2]),
  1485. Position = utility:Position(0.5, skeletonoffset.X, 0, skeletonoffset.Y + (Index == 1 and 3 or 1), window.VisualPreview.Components.Chams["Torso"][2]),
  1486. Color = color,
  1487. Transparency = transparency
  1488. }, window.VisualPreview.Drawings)
  1489. --
  1490. window.VisualPreview.Components.Skeleton["Head"][Index] = preview_skeleton_head
  1491. window.VisualPreview.Components.Skeleton["Torso"][Index] = preview_skeleton_torso
  1492. window.VisualPreview.Components.Skeleton["LeftArm"][Index] = preview_skeleton_leftarm
  1493. window.VisualPreview.Components.Skeleton["RightArm"][Index] = preview_skeleton_rightarm
  1494. window.VisualPreview.Components.Skeleton["Hips"][Index] = preview_skeleton_hips
  1495. window.VisualPreview.Components.Skeleton["LeftLeg"][Index] = preview_skeleton_leftleg
  1496. window.VisualPreview.Components.Skeleton["RightLeg"][Index] = preview_skeleton_rightleg
  1497. window.VisualPreview.Components.Skeleton["HipsTorso"][Index] = preview_skeleton_hipstorso
  1498. end
  1499. end
  1500. --
  1501. local preview_boxfill = utility:Create("Frame", {Vector2.new(1, 1), preview_boxoutline}, {
  1502. Size = utility:Size(1, -2, 1, -2, preview_boxoutline),
  1503. Position = utility:Position(0, 1, 0, 1, preview_boxoutline),
  1504. Color = Color3.fromRGB(255, 255, 255),
  1505. Filled = true,
  1506. Transparency = 0.9
  1507. }, window.VisualPreview.Drawings)
  1508. --
  1509. local preview_flags = utility:Create("TextLabel", {Vector2.new(preview_box.Size.X -56, 5), preview_box}, {
  1510. Text = "Flags ->", --Display\nMoving\nJumping\nDesynced"
  1511. Size = theme.textsize,
  1512. Font = theme.font,
  1513. Color = Color3.fromRGB(255, 255, 255),
  1514. OutlineColor = theme.textborder,
  1515. Center = false,
  1516. Position = utility:Position(1, -56, 0, 5, preview_box)
  1517. }, window.VisualPreview.Drawings)
  1518. --
  1519. local preview_healthbarvalue = utility:Create("TextLabel", {Vector2.new(0, 5), preview_heatlhbar}, {
  1520. Text = "<- Number", --Display\nMoving\nJumping\nDesynced"
  1521. Size = theme.textsize,
  1522. Font = theme.font,
  1523. Color = Color3.fromRGB(0, 255, 0),
  1524. OutlineColor = theme.textborder,
  1525. Center = false,
  1526. Position = utility:Position(0, 0, 0, 5, preview_heatlhbar)
  1527. }, window.VisualPreview.Drawings);healthvalue = preview_healthbarvalue
  1528. --
  1529. window.VisualPreview.Components.Title["Text"] = preview_title
  1530. window.VisualPreview.Components.Distance["Text"] = preview_distance
  1531. window.VisualPreview.Components.Tool["Text"] = preview_tool
  1532. window.VisualPreview.Components.Flags["Text"] = preview_flags
  1533. window.VisualPreview.Components.Box["Outline"] = preview_boxoutline
  1534. window.VisualPreview.Components.Box["Box"] = preview_box
  1535. window.VisualPreview.Components.Box["Fill"] = preview_boxfill
  1536. window.VisualPreview.Components.HealthBar["Outline"] = preview_heatlhbaroutline
  1537. window.VisualPreview.Components.HealthBar["Box"] = preview_heatlhbar
  1538. window.VisualPreview.Components.HealthBar["Value"] = preview_healthbarvalue
  1539. end
  1540. --
  1541. do -- New Drawings
  1542. local NewDrawings = {}
  1543. --
  1544. for Index, Value in pairs(library.drawings) do
  1545. if Value[1] and table.find(window.VisualPreview.Drawings, Value[1]) then
  1546. NewDrawings[Value[1]] = Value[3]
  1547. end
  1548. end
  1549. --
  1550. window.VisualPreview.Drawings = NewDrawings
  1551. end
  1552. end
  1553. end
  1554. --
  1555. function window:SetName(Name)
  1556. title.Text = Name
  1557. end
  1558. --
  1559. function window:GetConfig()
  1560. local config = {}
  1561. --
  1562. for i,v in pairs(library.pointers) do
  1563. if typeof(v:Get()) == "table" and v:Get().Transparency then
  1564. local hue, sat, val = v:Get().Color:ToHSV()
  1565. config[i] = {Color = {hue, sat, val}, Transparency = v:Get().Transparency}
  1566. else
  1567. config[i] = v:Get()
  1568. end
  1569. end
  1570. --
  1571. return game:GetService("HttpService"):JSONEncode(config)
  1572. end
  1573. --
  1574. function window:LoadConfig(config)
  1575. local config = hs:JSONDecode(config)
  1576. --
  1577. for i,v in pairs(config) do
  1578. if library.pointers[i] then
  1579. library.pointers[i]:Set(v)
  1580. end
  1581. end
  1582. end
  1583. --
  1584. function window:Move(vector)
  1585. for i,v in pairs(library.drawings) do
  1586. if v[1].Visible then
  1587. if v[2][2] then
  1588. v[1].Position = utility:Position(0, v[2][1].X, 0, v[2][1].Y, v[2][2])
  1589. else
  1590. v[1].Position = utility:Position(0, vector.X, 0, vector.Y)
  1591. end
  1592. end
  1593. end
  1594. end
  1595. --
  1596. function window:CloseContent()
  1597. if window.currentContent.dropdown and window.currentContent.dropdown.open then
  1598. local dropdown = window.currentContent.dropdown
  1599. dropdown.open = not dropdown.open
  1600. utility:LoadImage(dropdown.dropdown_image, "arrow_down", "https://i.imgur.com/tVqy0nL.png")
  1601. --
  1602. for i,v in pairs(dropdown.holder.drawings) do
  1603. utility:Remove(v)
  1604. end
  1605. --
  1606. dropdown.holder.drawings = {}
  1607. dropdown.holder.buttons = {}
  1608. dropdown.holder.inline = nil
  1609. --
  1610. window.currentContent.frame = nil
  1611. window.currentContent.dropdown = nil
  1612. elseif window.currentContent.multibox and window.currentContent.multibox.open then
  1613. local multibox = window.currentContent.multibox
  1614. multibox.open = not multibox.open
  1615. utility:LoadImage(multibox.multibox_image, "arrow_down", "https://i.imgur.com/tVqy0nL.png")
  1616. --
  1617. for i,v in pairs(multibox.holder.drawings) do
  1618. utility:Remove(v)
  1619. end
  1620. --
  1621. multibox.holder.drawings = {}
  1622. multibox.holder.buttons = {}
  1623. multibox.holder.inline = nil
  1624. --
  1625. window.currentContent.frame = nil
  1626. window.currentContent.multibox = nil
  1627. elseif window.currentContent.colorpicker and window.currentContent.colorpicker.open then
  1628. local colorpicker = window.currentContent.colorpicker
  1629. colorpicker.open = not colorpicker.open
  1630. --
  1631. for i,v in pairs(colorpicker.holder.drawings) do
  1632. utility:Remove(v)
  1633. end
  1634. --
  1635. colorpicker.holder.drawings = {}
  1636. --
  1637. window.currentContent.frame = nil
  1638. window.currentContent.colorpicker = nil
  1639. elseif window.currentContent.keybind and window.currentContent.keybind.open then
  1640. local modemenu = window.currentContent.keybind.modemenu
  1641. window.currentContent.keybind.open = not window.currentContent.keybind.open
  1642. --
  1643. for i,v in pairs(modemenu.drawings) do
  1644. utility:Remove(v)
  1645. end
  1646. --
  1647. modemenu.drawings = {}
  1648. modemenu.buttons = {}
  1649. modemenu.frame = nil
  1650. --
  1651. window.currentContent.frame = nil
  1652. window.currentContent.keybind = nil
  1653. elseif window.currentContent.textbox and window.currentContent.textbox.Disconnect then
  1654. if window.currentContent.textbox.Item.oldenter ~= window.currentContent.textbox.Item.current then
  1655. window.currentContent.textbox.Item.oldenter = window.currentContent.textbox.Item.current
  1656. task.spawn(function()
  1657. window.currentContent.textbox.Item.callback(window.currentContent.textbox.Item.current, true)
  1658. end)
  1659. end
  1660. window.currentContent.textbox.Disconnect()
  1661. window.currentContent.textbox = nil
  1662. end
  1663. end
  1664. --
  1665. function window:IsOverContent()
  1666. local isOver = false
  1667. --
  1668. if window.currentContent.frame and utility:MouseOverDrawing({window.currentContent.frame.Position.X,window.currentContent.frame.Position.Y,window.currentContent.frame.Position.X + window.currentContent.frame.Size.X,window.currentContent.frame.Position.Y + window.currentContent.frame.Size.Y}) then
  1669. isOver = true
  1670. end
  1671. --
  1672. return isOver
  1673. end
  1674. --
  1675. function window:Unload()
  1676. for i,v in pairs(library.connections) do
  1677. v:Disconnect()
  1678. v = nil
  1679. end
  1680. --
  1681. for i,v in next, library.hidden do
  1682. coroutine.wrap(function()
  1683. if v[1] and v[1].Remove and v[1].__OBJECT_EXISTS then
  1684. local instance = v[1]
  1685. v[1] = nil
  1686. v = nil
  1687. --
  1688. instance:Remove()
  1689. end
  1690. end)()
  1691. end
  1692. --
  1693. for i,v in pairs(library.drawings) do
  1694. coroutine.wrap(function()
  1695. if v[1].__OBJECT_EXISTS then
  1696. local instance = v[1]
  1697. v[2] = nil
  1698. v[1] = nil
  1699. v = nil
  1700. --
  1701. instance:Remove()
  1702. end
  1703. end)()
  1704. end
  1705. --
  1706. for i,v in pairs(library.objects) do
  1707. i:Remove()
  1708. end
  1709. --
  1710. for i,v in pairs(library.began) do
  1711. v = nil
  1712. end
  1713. --
  1714. for i,v in pairs(library.ended) do
  1715. v = nil
  1716. end
  1717. --
  1718. for i,v in pairs(library.changed) do
  1719. v = nil
  1720. end
  1721. --
  1722. library.drawings = {}
  1723. library.objects = {}
  1724. library.hidden = {}
  1725. library.connections = {}
  1726. library.began = {}
  1727. library.ended = {}
  1728. library.changed = {}
  1729. --
  1730. uis.MouseIconEnabled = true
  1731. end
  1732. --
  1733. function window:Watermark(info)
  1734. window.watermark = {visible = false}
  1735. --
  1736. local info = info or {}
  1737. local watermark_name = info.name or info.Name or info.title or info.Title or window.wminfo
  1738. --
  1739. local text_bounds = utility:GetTextBounds(watermark_name, theme.textsize, theme.font)
  1740. --
  1741. local watermark_outline = utility:Create("Frame", {Vector2.new(100,38/2-10)}, {
  1742. Size = utility:Size(0, text_bounds.X+20, 0, 21),
  1743. Position = utility:Position(0, 100, 0, 38/2-10),
  1744. Hidden = true,
  1745. ZIndex = 60,
  1746. Color = theme.outline,
  1747. Visible = window.watermark.visible
  1748. })window.watermark.outline = watermark_outline
  1749. --
  1750. library.colors[watermark_outline] = {
  1751. Color = "outline"
  1752. }
  1753. --
  1754. local watermark_inline = utility:Create("Frame", {Vector2.new(1,1), watermark_outline}, {
  1755. Size = utility:Size(1, -2, 1, -2, watermark_outline),
  1756. Position = utility:Position(0, 1, 0, 1, watermark_outline),
  1757. Hidden = true,
  1758. ZIndex = 60,
  1759. Color = theme.inline,
  1760. Visible = window.watermark.visible
  1761. })
  1762. --
  1763. library.colors[watermark_inline] = {
  1764. Color = "inline"
  1765. }
  1766. --
  1767. local watermark_frame = utility:Create("Frame", {Vector2.new(1,1), watermark_inline}, {
  1768. Size = utility:Size(1, -2, 1, -2, watermark_inline),
  1769. Position = utility:Position(0, 1, 0, 1, watermark_inline),
  1770. Hidden = true,
  1771. ZIndex = 60,
  1772. Color = theme.lightcontrast,
  1773. Visible = window.watermark.visible
  1774. })
  1775. --
  1776. library.colors[watermark_frame] = {
  1777. Color = "lightcontrast"
  1778. }
  1779. --
  1780. local watermark_accent = utility:Create("Frame", {Vector2.new(0,0), watermark_frame}, {
  1781. Size = utility:Size(1, 0, 0, 1, watermark_frame),
  1782. Position = utility:Position(0, 0, 0, 0, watermark_frame),
  1783. Hidden = true,
  1784. ZIndex = 60,
  1785. Color = theme.accent,
  1786. Visible = window.watermark.visible
  1787. })
  1788. --
  1789. library.colors[watermark_accent] = {
  1790. Color = "accent"
  1791. }
  1792. --
  1793. local watermark_title = utility:Create("TextLabel", {Vector2.new(2 + 6,4), watermark_outline}, {
  1794. Text = "Failed Loading Watermark.",
  1795. Size = theme.textsize,
  1796. Font = theme.font,
  1797. Color = theme.textcolor,
  1798. OutlineColor = theme.textborder,
  1799. Hidden = true,
  1800. ZIndex = 60,
  1801. Position = utility:Position(0, 2 + 6, 0, 4, watermark_outline),
  1802. Visible = window.watermark.visible
  1803. })
  1804. --
  1805. library.colors[watermark_title] = {
  1806. OutlineColor = "textborder",
  1807. Color = "textcolor"
  1808. }
  1809. --
  1810. function window.watermark:UpdateSize()
  1811. watermark_outline.Size = utility:Size(0, watermark_title.TextBounds.X + 4 + (6*2), 0, 21)
  1812. watermark_inline.Size = utility:Size(1, -2, 1, -2, watermark_outline)
  1813. watermark_frame.Size = utility:Size(1, -2, 1, -2, watermark_inline)
  1814. watermark_accent.Size = utility:Size(1, 0, 0, 1, watermark_frame)
  1815. end
  1816. --
  1817. function window.watermark:Visibility()
  1818. watermark_outline.Visible = window.watermark.visible
  1819. watermark_inline.Visible = window.watermark.visible
  1820. watermark_frame.Visible = window.watermark.visible
  1821. watermark_accent.Visible = window.watermark.visible
  1822. watermark_title.Visible = window.watermark.visible
  1823. end
  1824. --
  1825. function window.watermark:Update(updateType, updateValue)
  1826. if updateType == "Visible" then
  1827. window.watermark.visible = updateValue
  1828. window.watermark:Visibility()
  1829. end
  1830. end
  1831. --
  1832. window.watermark:UpdateSize()
  1833. --
  1834. local temp = tick()
  1835. local Tick = tick()
  1836. --
  1837. utility:Connection(rs.RenderStepped, function(FPS)
  1838. library.shared.fps = math.floor(1 / math.abs(temp - tick()))
  1839. temp = tick()
  1840. library.shared.ping = stats.Network:FindFirstChild("ServerStatsItem") and tostring(math.round(stats.Network.ServerStatsItem["Data Ping"]:GetValue())) or "Unknown"
  1841. --
  1842. task.spawn(function()
  1843. if (tick() - Tick) > 0.15 then
  1844. watermark_title.Text = window.wminfo:gsub("$PING", library.shared.ping):gsub("$FPS", library.shared.fps)
  1845. window.watermark:UpdateSize()
  1846. --
  1847. Tick = tick()
  1848. end
  1849. end)
  1850. end)
  1851. --
  1852. return window.watermark
  1853. end
  1854. --
  1855. function window:KeybindsList(info)
  1856. window.keybindslist = {visible = false, keybinds = {}}
  1857. --
  1858. local info = info or {}
  1859. --
  1860. local keybindslist_outline = utility:Create("Frame", {Vector2.new(10,(utility:GetScreenSize().Y/2)-200)}, {
  1861. Size = utility:Size(0, 180, 0, 22),
  1862. Position = utility:Position(0, 10, 0.4, 0),
  1863. Hidden = true,
  1864. ZIndex = 55,
  1865. Color = theme.outline,
  1866. Visible = window.keybindslist.visible
  1867. })window.keybindslist.outline = keybindslist_outline
  1868. --
  1869. library.colors[keybindslist_outline] = {
  1870. Color = "outline"
  1871. }
  1872. --
  1873. local keybindslist_inline = utility:Create("Frame", {Vector2.new(1,1), keybindslist_outline}, {
  1874. Size = utility:Size(1, -2, 1, -2, keybindslist_outline),
  1875. Position = utility:Position(0, 1, 0, 1, keybindslist_outline),
  1876. Hidden = true,
  1877. ZIndex = 55,
  1878. Color = theme.inline,
  1879. Visible = window.keybindslist.visible
  1880. })
  1881. --
  1882. library.colors[keybindslist_inline] = {
  1883. Color = "inline"
  1884. }
  1885. --
  1886. local keybindslist_frame = utility:Create("Frame", {Vector2.new(1,1), keybindslist_inline}, {
  1887. Size = utility:Size(1, -2, 1, -2, keybindslist_inline),
  1888. Position = utility:Position(0, 1, 0, 1, keybindslist_inline),
  1889. Hidden = true,
  1890. ZIndex = 55,
  1891. Color = theme.lightcontrast,
  1892. Visible = window.keybindslist.visible
  1893. })
  1894. --
  1895. library.colors[keybindslist_frame] = {
  1896. Color = "lightcontrast"
  1897. }
  1898. --
  1899. local keybindslist_accent = utility:Create("Frame", {Vector2.new(0,0), keybindslist_frame}, {
  1900. Size = utility:Size(1, 0, 0, 1, keybindslist_frame),
  1901. Position = utility:Position(0, 0, 0, 0, keybindslist_frame),
  1902. Hidden = true,
  1903. ZIndex = 55,
  1904. Color = theme.accent,
  1905. Visible = window.keybindslist.visible
  1906. })
  1907. --
  1908. library.colors[keybindslist_accent] = {
  1909. Color = "accent"
  1910. }
  1911. --
  1912. local keybindslist_title = utility:Create("TextLabel", {Vector2.new(keybindslist_outline.Size.X/2,4), keybindslist_outline}, {
  1913. Text = "[ Keybinds ]",
  1914. Size = theme.textsize,
  1915. Font = theme.font,
  1916. Color = theme.textcolor,
  1917. OutlineColor = theme.textborder,
  1918. Center = true,
  1919. Hidden = true,
  1920. ZIndex = 55,
  1921. Position = utility:Position(0.5, 0, 0, 5, keybindslist_outline),
  1922. Visible = window.keybindslist.visible
  1923. })
  1924. --
  1925. library.colors[keybindslist_title] = {
  1926. OutlineColor = "textborder",
  1927. Color = "textcolor"
  1928. }
  1929. --
  1930. function window.keybindslist:Resort()
  1931. local index = 0
  1932. for i,v in pairs(window.keybindslist.keybinds) do
  1933. v:Move(0 + (index*17))
  1934. --
  1935. index = index + 1
  1936. end
  1937. end
  1938. --
  1939. function window.keybindslist:Add(keybindname, keybindvalue)
  1940. if keybindname and keybindvalue and not window.keybindslist.keybinds[keybindname] then
  1941. local keybindTable = {}
  1942. --
  1943. local keybind_outline = utility:Create("Frame", {Vector2.new(0,keybindslist_outline.Size.Y-1), keybindslist_outline}, {
  1944. Size = utility:Size(1, 0, 0, 18, keybindslist_outline),
  1945. Position = utility:Position(0, 0, 1, -1, keybindslist_outline),
  1946. Hidden = true,
  1947. ZIndex = 55,
  1948. Color = theme.outline,
  1949. Visible = window.keybindslist.visible
  1950. })
  1951. --
  1952. library.colors[keybind_outline] = {
  1953. Color = "outline"
  1954. }
  1955. --
  1956. local keybind_inline = utility:Create("Frame", {Vector2.new(1,1), keybind_outline}, {
  1957. Size = utility:Size(1, -2, 1, -2, keybind_outline),
  1958. Position = utility:Position(0, 1, 0, 1, keybind_outline),
  1959. Hidden = true,
  1960. ZIndex = 55,
  1961. Color = theme.inline,
  1962. Visible = window.keybindslist.visible
  1963. })
  1964. --
  1965. library.colors[keybind_inline] = {
  1966. Color = "inline"
  1967. }
  1968. --
  1969. local keybind_frame = utility:Create("Frame", {Vector2.new(1,1), keybind_inline}, {
  1970. Size = utility:Size(1, -2, 1, -2, keybind_inline),
  1971. Position = utility:Position(0, 1, 0, 1, keybind_inline),
  1972. Hidden = true,
  1973. ZIndex = 55,
  1974. Color = theme.darkcontrast,
  1975. Visible = window.keybindslist.visible
  1976. })
  1977. --
  1978. library.colors[keybind_frame] = {
  1979. Color = "darkcontrast"
  1980. }
  1981. --
  1982. local keybind_title = utility:Create("TextLabel", {Vector2.new(4,3), keybind_outline}, {
  1983. Text = keybindname,
  1984. Size = theme.textsize,
  1985. Font = theme.font,
  1986. Color = theme.textcolor,
  1987. OutlineColor = theme.textborder,
  1988. Center = false,
  1989. Hidden = true,
  1990. ZIndex = 55,
  1991. Position = utility:Position(0, 4, 0, 3, keybind_outline),
  1992. Visible = window.keybindslist.visible
  1993. })
  1994. --
  1995. library.colors[keybind_title] = {
  1996. OutlineColor = "textborder",
  1997. Color = "textcolor"
  1998. }
  1999. --
  2000. local keybind_value = utility:Create("TextLabel", {Vector2.new(keybind_outline.Size.X - 4 - utility:GetTextBounds(keybindname, theme.textsize, theme.font).X,3), keybind_outline}, {
  2001. Text = "["..keybindvalue.."]",
  2002. Size = theme.textsize,
  2003. Font = theme.font,
  2004. Color = theme.textcolor,
  2005. OutlineColor = theme.textborder,
  2006. Hidden = true,
  2007. ZIndex = 55,
  2008. Position = utility:Position(1, -4 - utility:GetTextBounds(keybindname, theme.textsize, theme.font).X, 0, 3, keybind_outline),
  2009. Visible = window.keybindslist.visible
  2010. })
  2011. --
  2012. library.colors[keybind_value] = {
  2013. OutlineColor = "textborder",
  2014. Color = "textcolor"
  2015. }
  2016. --
  2017. function keybindTable:Move(yPos)
  2018. keybind_outline.Position = utility:Position(0, 0, 1, -1 + yPos, keybindslist_outline)
  2019. keybind_inline.Position = utility:Position(0, 1, 0, 1, keybind_outline)
  2020. keybind_frame.Position = utility:Position(0, 1, 0, 1, keybind_inline)
  2021. keybind_title.Position = utility:Position(0, 4, 0, 3, keybind_outline)
  2022. keybind_value.Position = utility:Position(1, -4 - keybind_value.TextBounds.X, 0, 3, keybind_outline)
  2023. end
  2024. --
  2025. function keybindTable:Remove()
  2026. utility:Remove(keybind_outline, true)
  2027. utility:Remove(keybind_inline, true)
  2028. utility:Remove(keybind_frame, true)
  2029. utility:Remove(keybind_title, true)
  2030. utility:Remove(keybind_value, true)
  2031. --
  2032. window.keybindslist.keybinds[keybindname] = nil
  2033. keybindTable = nil
  2034. end
  2035. --
  2036. function keybindTable:Visibility()
  2037. keybind_outline.Visible = window.keybindslist.visible
  2038. keybind_inline.Visible = window.keybindslist.visible
  2039. keybind_frame.Visible = window.keybindslist.visible
  2040. keybind_title.Visible = window.keybindslist.visible
  2041. keybind_value.Visible = window.keybindslist.visible
  2042. end
  2043. --
  2044. window.keybindslist.keybinds[keybindname] = keybindTable
  2045. window.keybindslist:Resort()
  2046. end
  2047. end
  2048. --
  2049. function window.keybindslist:Remove(keybindname)
  2050. if keybindname and window.keybindslist.keybinds[keybindname] then
  2051. window.keybindslist.keybinds[keybindname]:Remove()
  2052. window.keybindslist.keybinds[keybindname] = nil
  2053. window.keybindslist:Resort()
  2054. end
  2055. end
  2056. --
  2057. function window.keybindslist:Visibility()
  2058. keybindslist_outline.Visible = window.keybindslist.visible
  2059. keybindslist_inline.Visible = window.keybindslist.visible
  2060. keybindslist_frame.Visible = window.keybindslist.visible
  2061. keybindslist_accent.Visible = window.keybindslist.visible
  2062. keybindslist_title.Visible = window.keybindslist.visible
  2063. --
  2064. for i,v in pairs(window.keybindslist.keybinds) do
  2065. v:Visibility()
  2066. end
  2067. end
  2068. --
  2069. function window.keybindslist:Update(updateType, updateValue)
  2070. if updateType == "Visible" then
  2071. window.keybindslist.visible = updateValue
  2072. window.keybindslist:Visibility()
  2073. end
  2074. end
  2075. --
  2076. utility:Connection(ws.CurrentCamera:GetPropertyChangedSignal("ViewportSize"),function()
  2077. keybindslist_outline.Position = utility:Position(0, 10, 0.4, 0)
  2078. keybindslist_inline.Position = utility:Position(0, 1, 0, 1, keybindslist_outline)
  2079. keybindslist_frame.Position = utility:Position(0, 1, 0, 1, keybindslist_inline)
  2080. keybindslist_accent.Position = utility:Position(0, 0, 0, 0, keybindslist_frame)
  2081. keybindslist_title.Position = utility:Position(0.5, 0, 0, 5, keybindslist_outline)
  2082. --
  2083. window.keybindslist:Resort()
  2084. end)
  2085. end
  2086. --
  2087. function window:StatusList(info)
  2088. window.statuslist = {visible = false, statuses = {}}
  2089. --
  2090. local info = info or {}
  2091. --
  2092. local statuslist_outline = utility:Create("Frame", {Vector2.new(10,(utility:GetScreenSize().Y/2)-200)}, {
  2093. Size = utility:Size(0, 150, 0, 22),
  2094. Position = utility:Position(1, -160, 0.4, 0),
  2095. Hidden = true,
  2096. ZIndex = 55,
  2097. Color = theme.outline,
  2098. Visible = window.statuslist.visible
  2099. })window.statuslist.outline = statuslist_outline
  2100. --
  2101. library.colors[statuslist_outline] = {
  2102. Color = "outline"
  2103. }
  2104. --
  2105. local statuslist_inline = utility:Create("Frame", {Vector2.new(1,1), statuslist_outline}, {
  2106. Size = utility:Size(1, -2, 1, -2, statuslist_outline),
  2107. Position = utility:Position(0, 1, 0, 1, statuslist_outline),
  2108. Hidden = true,
  2109. ZIndex = 55,
  2110. Color = theme.inline,
  2111. Visible = window.statuslist.visible
  2112. })
  2113. --
  2114. library.colors[statuslist_inline] = {
  2115. Color = "inline"
  2116. }
  2117. --
  2118. local statuslist_frame = utility:Create("Frame", {Vector2.new(1,1), statuslist_inline}, {
  2119. Size = utility:Size(1, -2, 1, -2, statuslist_inline),
  2120. Position = utility:Position(0, 1, 0, 1, statuslist_inline),
  2121. Hidden = true,
  2122. ZIndex = 55,
  2123. Color = theme.lightcontrast,
  2124. Visible = window.statuslist.visible
  2125. })
  2126. --
  2127. library.colors[statuslist_frame] = {
  2128. Color = "lightcontrast"
  2129. }
  2130. --
  2131. local statuslist_accent = utility:Create("Frame", {Vector2.new(0,0), statuslist_frame}, {
  2132. Size = utility:Size(1, 0, 0, 1, statuslist_frame),
  2133. Position = utility:Position(0, 0, 0, 0, statuslist_frame),
  2134. Hidden = true,
  2135. ZIndex = 55,
  2136. Color = theme.accent,
  2137. Visible = window.statuslist.visible
  2138. })
  2139. --
  2140. library.colors[statuslist_accent] = {
  2141. Color = "accent"
  2142. }
  2143. --
  2144. local statuslist_title = utility:Create("TextLabel", {Vector2.new(statuslist_outline.Size.X/2,4), statuslist_outline}, {
  2145. Text = "[ Statuses ]",
  2146. Size = theme.textsize,
  2147. Font = theme.font,
  2148. Color = theme.textcolor,
  2149. OutlineColor = theme.textborder,
  2150. Center = true,
  2151. Hidden = true,
  2152. ZIndex = 55,
  2153. Position = utility:Position(0.5, 0, 0, 5, statuslist_outline),
  2154. Visible = window.statuslist.visible
  2155. })
  2156. --
  2157. library.colors[statuslist_title] = {
  2158. OutlineColor = "textborder",
  2159. Color = "textcolor"
  2160. }
  2161. --
  2162. function window.statuslist:Resort()
  2163. local index = 0
  2164. for i,v in pairs(window.statuslist.statuses) do
  2165. v:Move(0 + (index*17))
  2166. --
  2167. index = index + 1
  2168. end
  2169. end
  2170. --
  2171. function window.statuslist:Add(statusname)
  2172. if statusname and not window.statuslist.statuses[statusname] then
  2173. local statusTable = {}
  2174. --
  2175. local status_outline = utility:Create("Frame", {Vector2.new(0,statuslist_outline.Size.Y-1), statuslist_outline}, {
  2176. Size = utility:Size(1, 0, 0, 18, statuslist_outline),
  2177. Position = utility:Position(0, 0, 1, -1, statuslist_outline),
  2178. Hidden = true,
  2179. ZIndex = 55,
  2180. Color = theme.outline,
  2181. Visible = window.statuslist.visible
  2182. })
  2183. --
  2184. library.colors[status_outline] = {
  2185. Color = "outline"
  2186. }
  2187. --
  2188. local status_inline = utility:Create("Frame", {Vector2.new(1,1), status_outline}, {
  2189. Size = utility:Size(1, -2, 1, -2, status_outline),
  2190. Position = utility:Position(0, 1, 0, 1, status_outline),
  2191. Hidden = true,
  2192. ZIndex = 55,
  2193. Color = theme.inline,
  2194. Visible = window.statuslist.visible
  2195. })
  2196. --
  2197. library.colors[status_inline] = {
  2198. Color = "inline"
  2199. }
  2200. --
  2201. local status_frame = utility:Create("Frame", {Vector2.new(1,1), status_inline}, {
  2202. Size = utility:Size(1, -2, 1, -2, status_inline),
  2203. Position = utility:Position(0, 1, 0, 1, status_inline),
  2204. Hidden = true,
  2205. ZIndex = 55,
  2206. Color = theme.darkcontrast,
  2207. Visible = window.statuslist.visible
  2208. })
  2209. --
  2210. library.colors[status_frame] = {
  2211. Color = "darkcontrast"
  2212. }
  2213. --
  2214. local status_title = utility:Create("TextLabel", {Vector2.new(4,3), status_outline}, {
  2215. Text = statusname,
  2216. Size = theme.textsize,
  2217. Font = theme.font,
  2218. Color = theme.textcolor,
  2219. OutlineColor = theme.textborder,
  2220. Center = false,
  2221. Hidden = true,
  2222. ZIndex = 55,
  2223. Position = utility:Position(0, 4, 0, 3, status_outline),
  2224. Visible = window.statuslist.visible
  2225. })
  2226. --
  2227. library.colors[status_title] = {
  2228. OutlineColor = "textborder",
  2229. Color = "textcolor"
  2230. }
  2231. --
  2232. function statusTable:Move(yPos)
  2233. status_outline.Position = utility:Position(0, 0, 1, -1 + yPos, statuslist_outline)
  2234. status_inline.Position = utility:Position(0, 1, 0, 1, status_outline)
  2235. status_frame.Position = utility:Position(0, 1, 0, 1, status_inline)
  2236. status_title.Position = utility:Position(0, 4, 0, 3, status_outline)
  2237. end
  2238. --
  2239. function statusTable:Remove()
  2240. utility:Remove(status_outline, true)
  2241. utility:Remove(status_inline, true)
  2242. utility:Remove(status_frame, true)
  2243. utility:Remove(status_title, true)
  2244. --
  2245. window.statuslist.statuses[statusname] = nil
  2246. statusTable = nil
  2247. end
  2248. --
  2249. function statusTable:Visibility()
  2250. status_outline.Visible = window.statuslist.visible
  2251. status_inline.Visible = window.statuslist.visible
  2252. status_frame.Visible = window.statuslist.visible
  2253. status_title.Visible = window.statuslist.visible
  2254. end
  2255. --
  2256. window.statuslist.statuses[statusname] = statusTable
  2257. window.statuslist:Resort()
  2258. end
  2259. end
  2260. --
  2261. function window.statuslist:Remove(statusname)
  2262. if statusname and window.statuslist.statuses[statusname] then
  2263. window.statuslist.statuses[statusname]:Remove()
  2264. window.statuslist.statuses[statusname] = nil
  2265. window.statuslist:Resort()
  2266. end
  2267. end
  2268. --
  2269. function window.statuslist:Visibility()
  2270. statuslist_outline.Visible = window.statuslist.visible
  2271. statuslist_inline.Visible = window.statuslist.visible
  2272. statuslist_frame.Visible = window.statuslist.visible
  2273. statuslist_accent.Visible = window.statuslist.visible
  2274. statuslist_title.Visible = window.statuslist.visible
  2275. --
  2276. for i,v in pairs(window.statuslist.statuses) do
  2277. v:Visibility()
  2278. end
  2279. end
  2280. --
  2281. function window.statuslist:Update(updateType, updateValue)
  2282. if updateType == "Visible" then
  2283. window.statuslist.visible = updateValue
  2284. window.statuslist:Visibility()
  2285. end
  2286. end
  2287. --
  2288. utility:Connection(ws.CurrentCamera:GetPropertyChangedSignal("ViewportSize"),function()
  2289. statuslist_outline.Position = utility:Position(1, -160, 0.4, 0)
  2290. statuslist_inline.Position = utility:Position(0, 1, 0, 1, statuslist_outline)
  2291. statuslist_frame.Position = utility:Position(0, 1, 0, 1, statuslist_inline)
  2292. statuslist_accent.Position = utility:Position(0, 0, 0, 0, statuslist_frame)
  2293. statuslist_title.Position = utility:Position(0.5, 0, 0, 5, statuslist_outline)
  2294. --
  2295. window.statuslist:Resort()
  2296. end)
  2297. end
  2298. --
  2299. function window:Cursor(info)
  2300. window.cursor = {}
  2301. --
  2302. local cursor = utility:Create("Triangle", nil, {
  2303. Color = theme.cursoroutline,
  2304. Thickness = 2.5,
  2305. Filled = false,
  2306. ZIndex = 65,
  2307. Hidden = true
  2308. });window.cursor["cursor"] = cursor
  2309. --
  2310. library.colors[cursor] = {
  2311. Color = "cursoroutline"
  2312. }
  2313. --
  2314. local cursor_inline = utility:Create("Triangle", nil, {
  2315. Color = theme.accent,
  2316. Filled = true,
  2317. Thickness = 0,
  2318. ZIndex = 65,
  2319. Hidden = true
  2320. });window.cursor["cursor_inline"] = cursor_inline
  2321. --
  2322. library.colors[cursor_inline] = {
  2323. Color = "accent"
  2324. }
  2325. --
  2326. utility:Connection(rs.RenderStepped, function()
  2327. local mouseLocation = utility:MouseLocation()
  2328. --
  2329. cursor.PointA = Vector2.new(mouseLocation.X, mouseLocation.Y)
  2330. cursor.PointB = Vector2.new(mouseLocation.X + 12, mouseLocation.Y + 4)
  2331. cursor.PointC = Vector2.new(mouseLocation.X + 4, mouseLocation.Y + 12)
  2332. --
  2333. cursor_inline.PointA = Vector2.new(mouseLocation.X, mouseLocation.Y)
  2334. cursor_inline.PointB = Vector2.new(mouseLocation.X + 12, mouseLocation.Y + 4)
  2335. cursor_inline.PointC = Vector2.new(mouseLocation.X + 4, mouseLocation.Y + 12)
  2336. end)
  2337. --
  2338. uis.MouseIconEnabled = false
  2339. --
  2340. return window.cursor
  2341. end
  2342. --
  2343. function window:Fade()
  2344. window.fading = true
  2345. window.isVisible = not window.isVisible
  2346. --
  2347. spawn(function()
  2348. for i, v in pairs(library.drawings) do
  2349. utility:Lerp(v[1], {Transparency = window.isVisible and v[3] or 0}, 0.25)
  2350. end
  2351. end)
  2352. --
  2353. window.cursor["cursor"].Transparency = window.isVisible and 1 or 0
  2354. window.cursor["cursor_inline"].Transparency = window.isVisible and 1 or 0
  2355. uis.MouseIconEnabled = not window.isVisible
  2356. --
  2357. window.fading = false
  2358. end
  2359. --
  2360. function window:Initialize()
  2361. window.pages[1]:Show()
  2362. --
  2363. for i,v in pairs(window.pages) do
  2364. v:Update()
  2365. end
  2366. --
  2367. library.shared.initialized = true
  2368. --
  2369. window:Watermark()
  2370. window:KeybindsList()
  2371. window:StatusList()
  2372. --// window:Cursor()
  2373. --
  2374. window.init = true
  2375. --
  2376. window:Fade()
  2377. end
  2378. --
  2379. library.began[#library.began + 1] = function(Input)
  2380. if Input.UserInputType == Enum.UserInputType.MouseButton1 and window.isVisible and window.isVisible and utility:MouseOverDrawing({main_frame.Position.X,main_frame.Position.Y,main_frame.Position.X + main_frame.Size.X,main_frame.Position.Y + 20}) then
  2381. local mouseLocation = utility:MouseLocation()
  2382. --
  2383. window.dragging = true
  2384. window.drag = Vector2.new(mouseLocation.X - main_frame.Position.X, mouseLocation.Y - main_frame.Position.Y)
  2385. end
  2386. --
  2387. if window.currentContent.textbox then
  2388. if Find(utility.Keyboard.Letters, utility:InputToString(Input.KeyCode)) then
  2389. if uis:IsKeyDown(Enum.KeyCode.LeftShift) then
  2390. window.currentContent.textbox.Fire((utility:InputToString(Input.KeyCode)):upper())
  2391. else
  2392. window.currentContent.textbox.Fire((utility:InputToString(Input.KeyCode)):lower())
  2393. end
  2394. elseif utility:InputToString(Input.KeyCode) == "Space" then
  2395. window.currentContent.textbox.Fire(" ")
  2396. elseif utility.Keyboard.Modifiers[utility:InputToString(Input.KeyCode)] then
  2397. if uis:IsKeyDown(Enum.KeyCode.LeftShift) then
  2398. if utility.Keyboard.Modifiers[utility:InputToString(Input.KeyCode)] then
  2399. window.currentContent.textbox.Fire(utility.Keyboard.Modifiers[utility:InputToString(Input.KeyCode)])
  2400. end
  2401. else
  2402. window.currentContent.textbox.Fire(utility:InputToString(Input.KeyCode))
  2403. end
  2404. elseif utility:InputToString(Input.KeyCode) == "Back" then
  2405. window.currentContent.textbox.Fire("Backspace")
  2406. --
  2407. window.currentContent.textbox.Backspace = {tick(), 0}
  2408. end
  2409. end
  2410. end
  2411. --
  2412. library.ended[#library.ended + 1] = function(Input)
  2413. if Input.UserInputType == Enum.UserInputType.MouseButton1 and window.isVisible and window.dragging then
  2414. window.dragging = false
  2415. window.drag = Vector2.new(0, 0)
  2416. end
  2417. --
  2418. if window.currentContent.textbox and window.currentContent.textbox.Fire and window.currentContent.textbox.Backspace then
  2419. if utility:InputToString(Input.KeyCode) == "Back" then
  2420. window.currentContent.textbox.Backspace = nil
  2421. end
  2422. end
  2423. end
  2424. --
  2425. library.changed[#library.changed + 1] = function(Input)
  2426. if window.dragging and window.isVisible then
  2427. local mouseLocation = utility:MouseLocation()
  2428. if utility:GetScreenSize().Y-main_frame.Size.Y-5 > 5 then
  2429. local move = Vector2.new(math.clamp(mouseLocation.X - window.drag.X, 5, utility:GetScreenSize().X-main_frame.Size.X-5), math.clamp(mouseLocation.Y - window.drag.Y, 5, utility:GetScreenSize().Y-main_frame.Size.Y-5))
  2430. window:Move(move)
  2431. else
  2432. local move = Vector2.new(mouseLocation.X - window.drag.X, mouseLocation.Y - window.drag.Y)
  2433. window:Move(move)
  2434. end
  2435. end
  2436. end
  2437. --
  2438. library.began[#library.began + 1] = function(Input)
  2439. if Input.KeyCode == window.uibind then
  2440. window:Fade()
  2441. end
  2442. --[[
  2443. if Input.KeyCode == Enum.KeyCode.P then
  2444. local plrs = game:GetService("Players")
  2445. local plr = plrs.LocalPlayer
  2446. if #plrs:GetPlayers() <= 1 then
  2447. plr:Kick("\nRejoining...")
  2448. wait()
  2449. game:GetService('TeleportService'):Teleport(game.PlaceId, plr)
  2450. else
  2451. game:GetService('TeleportService'):TeleportToPlaceInstance(game.PlaceId, game.JobId, plr)
  2452. end
  2453. end]]
  2454. end
  2455. --
  2456. utility:Connection(uis.InputBegan,function(Input)
  2457. for _, func in pairs(library.began) do
  2458. if not window.dragging then
  2459. local e,s = pcall(function()
  2460. func(Input)
  2461. end)
  2462. else
  2463. break
  2464. end
  2465. end
  2466. end)
  2467. --
  2468. utility:Connection(uis.InputEnded,function(Input)
  2469. for _, func in pairs(library.ended) do
  2470. local e,s = pcall(function()
  2471. func(Input)
  2472. end)
  2473. end
  2474. end)
  2475. --
  2476. utility:Connection(uis.InputChanged,function()
  2477. for _, func in pairs(library.changed) do
  2478. local e,s = pcall(function()
  2479. func()
  2480. end)
  2481. end
  2482. end)
  2483. --
  2484. utility:Connection(rs.RenderStepped,function()
  2485. if window.currentContent.textbox and window.currentContent.textbox.Fire and window.currentContent.textbox.Backspace then
  2486. local Time = (tick() - window.currentContent.textbox.Backspace[1])
  2487. --
  2488. if Time > 0.4 then
  2489. window.currentContent.textbox.Backspace[2] = window.currentContent.textbox.Backspace[2] + 1
  2490. --
  2491. if (window.currentContent.textbox.Backspace[2] % 5 == 0) then
  2492. window.currentContent.textbox.Fire("Backspace")
  2493. end
  2494. end
  2495. end
  2496. end)
  2497. --
  2498. utility:Connection(ws.CurrentCamera:GetPropertyChangedSignal("ViewportSize"),function()
  2499. window:Move(Vector2.new((utility:GetScreenSize().X/2) - (size.X/2), (utility:GetScreenSize().Y/2) - (size.Y/2)))
  2500. end)
  2501. --
  2502. return setmetatable(window, library)
  2503. end
  2504. --
  2505. function library:Page(info)
  2506. local info = info or {}
  2507. local name = info.name or info.Name or info.title or info.Title or "New Page"
  2508. --
  2509. local window = self
  2510. --
  2511. local page = {open = false, sections = {}, sectionOffset = {left = 0, right = 0}, window = window}
  2512. --
  2513. local position = 4
  2514. --
  2515. for i,v in pairs(window.pages) do
  2516. position = position + (v.page_button.Size.X+2)
  2517. end
  2518. --
  2519. local textbounds = utility:GetTextBounds(name, theme.textsize, theme.font)
  2520. --
  2521. local page_button = utility:Create("Frame", {Vector2.new(position,4), window.back_frame}, {
  2522. Size = utility:Size(0, window.pageammount and (((window.back_frame.Size.X - 8 - ((window.pageammount - 1) * 2)) / window.pageammount)) or (textbounds.X+20), 0, 21),
  2523. Position = utility:Position(0, position, 0, 4, window.back_frame),
  2524. Color = theme.outline
  2525. });page["page_button"] = page_button
  2526. --
  2527. library.colors[page_button] = {
  2528. Color = "outline"
  2529. }
  2530. --
  2531. local page_button_inline = utility:Create("Frame", {Vector2.new(1,1), page_button}, {
  2532. Size = utility:Size(1, -2, 1, -1, page_button),
  2533. Position = utility:Position(0, 1, 0, 1, page_button),
  2534. Color = theme.inline
  2535. });page["page_button_inline"] = page_button_inline
  2536. --
  2537. library.colors[page_button_inline] = {
  2538. Color = "inline"
  2539. }
  2540. --
  2541. local page_button_color = utility:Create("Frame", {Vector2.new(1,1), page_button_inline}, {
  2542. Size = utility:Size(1, -2, 1, -1, page_button_inline),
  2543. Position = utility:Position(0, 1, 0, 1, page_button_inline),
  2544. Color = theme.darkcontrast
  2545. });page["page_button_color"] = page_button_color
  2546. --
  2547. library.colors[page_button_color] = {
  2548. Color = "darkcontrast"
  2549. }
  2550. --
  2551. local page_button_title = utility:Create("TextLabel", {Vector2.new(utility:Position(0.5, 0, 0, 2, page_button_color).X - page_button_color.Position.X,2), page_button_color}, {
  2552. Text = name,
  2553. Size = theme.textsize,
  2554. Font = theme.font,
  2555. Color = theme.textdark,
  2556. Center = true,
  2557. OutlineColor = theme.textborder,
  2558. Position = utility:Position(0.5, 0, 0, 2, page_button_color)
  2559. });page["page_button_title"] = page_button_title
  2560. --
  2561. library.colors[page_button_title] = {
  2562. OutlineColor = "textborder",
  2563. Color = "textdark"
  2564. }
  2565. --
  2566. window.pages[#window.pages + 1] = page
  2567. --
  2568. function page:GetTotalYSize(Side)
  2569. local TotalYSize = 0
  2570. --
  2571. for i,v in pairs(page.sections) do
  2572. if v.side == Side then
  2573. TotalYSize = TotalYSize + v.section_inline.Size.Y + 5
  2574. end
  2575. end
  2576. --
  2577. return TotalYSize
  2578. end
  2579. --
  2580. function page:Update()
  2581. page.sectionOffset["left"] = 0
  2582. page.sectionOffset["right"] = 0
  2583. --
  2584. for i,v in pairs(page.sections) do
  2585. if v.side then
  2586. utility:UpdateOffset(v.section_inline, {Vector2.new(v.side == "right" and (window.tab_frame.Size.X/2)+2 or 5,5 + page["sectionOffset"][v.side]), window.tab_frame})
  2587. v:Update(page.sectionOffset[v.side] + 10)
  2588. page.sectionOffset[v.side] = page.sectionOffset[v.side] + v.section_inline.Size.Y + 5
  2589. else
  2590. page.sectionOffset["left"] = page.sectionOffset["left"] + v["playerList_inline"].Size.Y + 5
  2591. page.sectionOffset["right"] = page.sectionOffset["right"] + v["playerList_inline"].Size.Y + 5
  2592. end
  2593. end
  2594. --
  2595. window:Move(window.main_frame.Position)
  2596. end
  2597. --
  2598. function page:Show()
  2599. if window.currentPage then
  2600. window.currentPage.page_button_color.Size = utility:Size(1, -2, 1, -1, window.currentPage.page_button_inline)
  2601. window.currentPage.page_button_color.Color = theme.darkcontrast
  2602. window.currentPage.page_button_title.Color = theme.textdark
  2603. window.currentPage.open = false
  2604. --
  2605. library.colors[window.currentPage.page_button_color] = {
  2606. Color = "darkcontrast"
  2607. }
  2608. --
  2609. library.colors[window.currentPage.page_button_title] = {
  2610. OutlineColor = "textborder",
  2611. Color = "textdark"
  2612. }
  2613. --
  2614. for i,v in pairs(window.currentPage.sections) do
  2615. for z,x in pairs(v.visibleContent) do
  2616. x.Visible = false
  2617. end
  2618. end
  2619. --
  2620. window:CloseContent()
  2621. end
  2622. --
  2623. window.currentPage = page
  2624. page_button_color.Size = utility:Size(1, -2, 1, 0, page_button_inline)
  2625. page_button_color.Color = theme.lightcontrast
  2626. page_button_title.Color = theme.textcolor
  2627. page.open = true
  2628. --
  2629. library.colors[page_button_color] = {
  2630. Color = "lightcontrast"
  2631. }
  2632. --
  2633. library.colors[page_button_title] = {
  2634. OutlineColor = "textborder",
  2635. Color = "textcolor"
  2636. }
  2637. --
  2638. for i,v in pairs(page.sections) do
  2639. for z,x in pairs(v.visibleContent) do
  2640. x.Visible = true
  2641. end
  2642. end
  2643. --
  2644. window.callback(name, window.currentPage)
  2645. window:Move(window.main_frame.Position)
  2646. end
  2647. --
  2648. library.began[#library.began + 1] = function(Input)
  2649. if Input.UserInputType == Enum.UserInputType.MouseButton1 and window.isVisible and utility:MouseOverDrawing({page_button.Position.X,page_button.Position.Y,page_button.Position.X + page_button.Size.X,page_button.Position.Y + page_button.Size.Y}) and window.currentPage ~= page then
  2650. page:Show()
  2651. end
  2652. end
  2653. --
  2654. return setmetatable(page, pages)
  2655. end
  2656. --
  2657. function pages:Section(info)
  2658. local window = self.window
  2659. local info = info or {}
  2660. local name = info.name or info.Name or info.title or info.Title or "New Section"
  2661. local size = info.size or info.Size
  2662. local fill = info.fill or info.Fill
  2663. local side = window.loader and "left" or (info.side or info.Side or "left")
  2664. side = side:lower()
  2665. local page = self
  2666. local section = {window = window, page = page, visibleContent = {}, currentAxis = 20, side = side}
  2667. --
  2668. local section_inline = utility:Create("Frame", {Vector2.new(side == "right" and (window.tab_frame.Size.X/2)+2 or 5,5 + page["sectionOffset"][side]), window.tab_frame}, {
  2669. Size = utility:Size(window.loader and 1 or 0.5, window.loader and -10 or -7, 0, size or 22, window.tab_frame),
  2670. Position = utility:Position(side == "right" and 0.5 or 0, side == "right" and 2 or 5, 0, 5 + page.sectionOffset[side], window.tab_frame),
  2671. Color = theme.inline,
  2672. Visible = page.open
  2673. }, section.visibleContent);section["section_inline"] = section_inline
  2674. --
  2675. library.colors[section_inline] = {
  2676. Color = "inline"
  2677. }
  2678. --
  2679. local section_outline = utility:Create("Frame", {Vector2.new(1,1), section_inline}, {
  2680. Size = utility:Size(1, -2, 1, -2, section_inline),
  2681. Position = utility:Position(0, 1, 0, 1, section_inline),
  2682. Color = theme.outline,
  2683. Visible = page.open
  2684. }, section.visibleContent);section["section_outline"] = section_outline
  2685. --
  2686. library.colors[section_outline] = {
  2687. Color = "outline"
  2688. }
  2689. --
  2690. local section_frame = utility:Create("Frame", {Vector2.new(1,1), section_outline}, {
  2691. Size = utility:Size(1, -2, 1, -2, section_outline),
  2692. Position = utility:Position(0, 1, 0, 1, section_outline),
  2693. Color = theme.darkcontrast,
  2694. Visible = page.open
  2695. }, section.visibleContent);section["section_frame"] = section_frame
  2696. --
  2697. library.colors[section_frame] = {
  2698. Color = "darkcontrast"
  2699. }
  2700. --
  2701. local section_accent = utility:Create("Frame", {Vector2.new(0,0), section_frame}, {
  2702. Size = utility:Size(1, 0, 0, 2, section_frame),
  2703. Position = utility:Position(0, 0, 0, 0, section_frame),
  2704. Color = theme.accent,
  2705. Visible = page.open
  2706. }, section.visibleContent);section["section_accent"] = section_accent
  2707. --
  2708. library.colors[section_accent] = {
  2709. Color = "accent"
  2710. }
  2711. --
  2712. local section_title = utility:Create("TextLabel", {Vector2.new(3,3), section_frame}, {
  2713. Text = name,
  2714. Size = theme.textsize,
  2715. Font = theme.font,
  2716. Color = theme.textcolor,
  2717. OutlineColor = theme.textborder,
  2718. Position = utility:Position(0, 3, 0, 3, section_frame),
  2719. Visible = page.open
  2720. }, section.visibleContent);section["section_title"] = section_title
  2721. --
  2722. library.colors[section_title] = {
  2723. OutlineColor = "textborder",
  2724. Color = "textcolor"
  2725. }
  2726. --
  2727. function section:Update(Padding)
  2728. section_inline.Size = utility:Size(window.loader and 1 or 0.5, window.loader and -10 or -7, 0, fill and (window.tab_frame.Size.Y - (Padding or 0)) or (size or (section.currentAxis+4)), window.tab_frame)
  2729. section_outline.Size = utility:Size(1, -2, 1, -2, section_inline)
  2730. section_frame.Size = utility:Size(1, -2, 1, -2, section_outline)
  2731. end
  2732. --
  2733. page.sectionOffset[side] = page.sectionOffset[side] + 100 + 5
  2734. page.sections[#page.sections + 1] = section
  2735. --
  2736. return setmetatable(section, sections)
  2737. end
  2738. --
  2739. function pages:MultiSection(info)
  2740. local info = info or {}
  2741. local msections = info.sections or info.Sections or {}
  2742. local side = info.side or info.Side or "left"
  2743. local size = info.size or info.Size or 150
  2744. local fill = info.fill or info.Fill
  2745. local callback = info.callback or info.Callback or info.callBack or info.CallBack or function() end
  2746. side = side:lower()
  2747. local window = self.window
  2748. local page = self
  2749. local multiSection = {window = window, page = page, sections = {}, backup = {}, visibleContent = {}, currentSection = nil, side = side}
  2750. --
  2751. local multiSection_inline = utility:Create("Frame", {Vector2.new(side == "right" and (window.tab_frame.Size.X/2)+2 or 5,5 + page["sectionOffset"][side]), window.tab_frame}, {
  2752. Size = utility:Size(window.loader and 1 or 0.5, window.loader and -10 or -7, 0, size, window.tab_frame),
  2753. Position = utility:Position(side == "right" and 0.5 or 0, side == "right" and 2 or 5, 0, 5 + page.sectionOffset[side], window.tab_frame),
  2754. Color = theme.inline,
  2755. Visible = page.open
  2756. }, multiSection.visibleContent);multiSection["section_inline"] = multiSection_inline
  2757. --
  2758. library.colors[multiSection_inline] = {
  2759. Color = "inline"
  2760. }
  2761. --
  2762. local multiSection_outline = utility:Create("Frame", {Vector2.new(1,1), multiSection_inline}, {
  2763. Size = utility:Size(1, -2, 1, -2, multiSection_inline),
  2764. Position = utility:Position(0, 1, 0, 1, multiSection_inline),
  2765. Color = theme.outline,
  2766. Visible = page.open
  2767. }, multiSection.visibleContent);multiSection["section_outline"] = multiSection_outline
  2768. --
  2769. library.colors[multiSection_outline] = {
  2770. Color = "outline"
  2771. }
  2772. --
  2773. local multiSection_frame = utility:Create("Frame", {Vector2.new(1,1), multiSection_outline}, {
  2774. Size = utility:Size(1, -2, 1, -2, multiSection_outline),
  2775. Position = utility:Position(0, 1, 0, 1, multiSection_outline),
  2776. Color = theme.darkcontrast,
  2777. Visible = page.open
  2778. }, multiSection.visibleContent);multiSection["section_frame"] = multiSection_frame
  2779. --
  2780. library.colors[multiSection_frame] = {
  2781. Color = "darkcontrast"
  2782. }
  2783. --
  2784. local multiSection_backFrame = utility:Create("Frame", {Vector2.new(0,2), multiSection_frame}, {
  2785. Size = utility:Size(1, 0, 0, 17, multiSection_frame),
  2786. Position = utility:Position(0, 0, 0, 2, multiSection_frame),
  2787. Color = theme.lightcontrast,
  2788. Visible = page.open
  2789. }, multiSection.visibleContent)
  2790. --
  2791. library.colors[multiSection_backFrame] = {
  2792. Color = "lightcontrast"
  2793. }
  2794. --
  2795. local multiSection_bottomFrame = utility:Create("Frame", {Vector2.new(0,multiSection_backFrame.Size.Y - 1), multiSection_backFrame}, {
  2796. Size = utility:Size(1, 0, 0, 1, multiSection_backFrame),
  2797. Position = utility:Position(0, 0, 1, -1, multiSection_backFrame),
  2798. Color = theme.outline,
  2799. Visible = page.open
  2800. }, multiSection.visibleContent)
  2801. --
  2802. library.colors[multiSection_bottomFrame] = {
  2803. Color = "outline"
  2804. }
  2805. --
  2806. local multiSection_accent = utility:Create("Frame", {Vector2.new(0,0), multiSection_frame}, {
  2807. Size = utility:Size(1, 0, 0, 2, multiSection_frame),
  2808. Position = utility:Position(0, 0, 0, 0, multiSection_frame),
  2809. Color = theme.accent,
  2810. Visible = page.open
  2811. }, multiSection.visibleContent);multiSection["section_accent"] = multiSection_accent
  2812. --
  2813. library.colors[multiSection_accent] = {
  2814. Color = "accent"
  2815. }
  2816. --
  2817. function multiSection:Update(Padding)
  2818. multiSection_inline.Size = utility:Size(window.loader and 1 or 0.5, window.loader and -10 or -7, 0, fill and (window.tab_frame.Size.Y - (Padding or 0)) or size, window.tab_frame)
  2819. multiSection_outline.Size = utility:Size(1, -2, 1, -2, multiSection_inline)
  2820. multiSection_frame.Size = utility:Size(1, -2, 1, -2, multiSection_outline)
  2821. --
  2822. for Index, Value in pairs(multiSection.sections) do
  2823. Value:Update(Padding)
  2824. end
  2825. end
  2826. --
  2827. for i,v in pairs(msections) do
  2828. local msection = {window = window, page = page, currentAxis = 24, sections = {}, visibleContent = {}, section_inline = multiSection_inline, section_outline = multiSection_outline, section_frame = multiSection_frame, section_accent = multiSection_accent}
  2829. --
  2830. local textBounds = utility:GetTextBounds(v, theme.textsize, theme.font)
  2831. --
  2832. local msection_frame = utility:Create("Frame", {Vector2.new(((i - 1) * (1 / #msections)) * multiSection_backFrame.Size.X,0), multiSection_backFrame}, {
  2833. Size = utility:Size(1 / #msections, 0, 1, -1, multiSection_backFrame),
  2834. Position = utility:Position((i - 1) * (1 / #msections), 0, 0, 0, multiSection_backFrame),
  2835. Color = i == 1 and theme.darkcontrast or theme.lightcontrast,
  2836. Visible = page.open
  2837. }, multiSection.visibleContent);msection["msection_frame"] = msection_frame
  2838. --
  2839. library.colors[msection_frame] = {
  2840. Color = i == 1 and "darkcontrast" or "lightcontrast"
  2841. }
  2842. --
  2843. local msection_line = utility:Create("Frame", {Vector2.new(msection_frame.Size.X - (i == #msections and 0 or 1),0), msection_frame}, {
  2844. Size = utility:Size(0, 1, 1, 0, msection_frame),
  2845. Position = utility:Position(1, -(i == #msections and 0 or 1), 0, 0, msection_frame),
  2846. Color = theme.outline,
  2847. Visible = page.open
  2848. }, multiSection.visibleContent)
  2849. --
  2850. library.colors[msection_line] = {
  2851. Color = "outline"
  2852. }
  2853. --
  2854. local msection_title = utility:Create("TextLabel", {Vector2.new(msection_frame.Size.X * 0.5,1), msection_frame}, {
  2855. Text = v,
  2856. Size = theme.textsize,
  2857. Font = theme.font,
  2858. Color = theme.textcolor,
  2859. OutlineColor = theme.textborder,
  2860. Center = true,
  2861. Position = utility:Position(0.5, 0, 0, 1, msection_frame),
  2862. Visible = page.open
  2863. }, multiSection.visibleContent)
  2864. --
  2865. library.colors[msection_title] = {
  2866. OutlineColor = "textborder",
  2867. Color = "textcolor"
  2868. }
  2869. --
  2870. local msection_bottomline = utility:Create("Frame", {Vector2.new(0,msection_frame.Size.Y), msection_frame}, {
  2871. Size = utility:Size(1, (i == #msections and 0 or -1), 0, 1, msection_frame),
  2872. Position = utility:Position(0, 0, 1, 0, msection_frame),
  2873. Color = i == 1 and theme.darkcontrast or theme.outline,
  2874. Visible = page.open
  2875. }, multiSection.visibleContent);msection["msection_bottomline"] = msection_bottomline
  2876. --
  2877. library.colors[msection_bottomline] = {
  2878. Color = i == 1 and "darkcontrast" or "outline"
  2879. }
  2880. --
  2881. function msection:Update()
  2882. if multiSection.currentSection == msection then
  2883. multiSection.visibleContent = utility:Combine(multiSection.backup, multiSection.currentSection.visibleContent)
  2884. else
  2885. for z,x in pairs(msection.visibleContent) do
  2886. x.Visible = false
  2887. end
  2888. end
  2889. end
  2890. --
  2891. library.began[#library.began + 1] = function(Input)
  2892. if Input.UserInputType == Enum.UserInputType.MouseButton1 and window.isVisible and page.open and utility:MouseOverDrawing({msection_frame.Position.X,msection_frame.Position.Y,msection_frame.Position.X + msection_frame.Size.X,msection_frame.Position.Y + msection_frame.Size.Y}) and multiSection.currentSection ~= msection and not window:IsOverContent() then
  2893. multiSection.currentSection.msection_frame.Color = theme.lightcontrast
  2894. multiSection.currentSection.msection_bottomline.Color = theme.outline
  2895. --
  2896. library.colors[multiSection.currentSection.msection_frame] = {
  2897. Color = "lightcontrast"
  2898. }
  2899. --
  2900. library.colors[multiSection.currentSection.msection_bottomline] = {
  2901. Color = "outline"
  2902. }
  2903. --
  2904. for i,v in pairs(multiSection.currentSection.visibleContent) do
  2905. v.Visible = false
  2906. end
  2907. --
  2908. multiSection.currentSection = msection
  2909. msection_frame.Color = theme.darkcontrast
  2910. msection_bottomline.Color = theme.darkcontrast
  2911. --
  2912. library.colors[msection_frame] = {
  2913. Color = "darkcontrast"
  2914. }
  2915. --
  2916. library.colors[msection_bottomline] = {
  2917. Color = "darkcontrast"
  2918. }
  2919. --
  2920. for i,v in pairs(multiSection.currentSection.visibleContent) do
  2921. v.Visible = true
  2922. end
  2923. --
  2924. multiSection.visibleContent = utility:Combine(multiSection.backup, multiSection.currentSection.visibleContent)
  2925. --
  2926. callback(v, msection)
  2927. window:Move(window.main_frame.Position)
  2928. end
  2929. end
  2930. --
  2931. if i == 1 then
  2932. multiSection.currentSection = msection
  2933. callback(v, msection)
  2934. end
  2935. --
  2936. multiSection.sections[#multiSection.sections + 1] = setmetatable(msection, sections)
  2937. end
  2938. --
  2939. for z,x in pairs(multiSection.visibleContent) do
  2940. multiSection.backup[z] = x
  2941. end
  2942. --
  2943. page.sectionOffset[side] = page.sectionOffset[side] + 100 + 5
  2944. page.sections[#page.sections + 1] = multiSection
  2945. --
  2946. return Unpack(multiSection.sections)
  2947. end
  2948. --
  2949. function pages:PlayerList(info)
  2950. local info = info or {}
  2951. --
  2952. local window = self.window
  2953. local page = self
  2954. --
  2955. local playerList = {window = window, page = page, visibleContent = {}, buttons = {}, currentAxis = 20, scrollingindex = 0, scrolling = {false, nil}, items = {}, players = {}}
  2956. --
  2957. local playerList_inline = utility:Create("Frame", {Vector2.new(5,5), window.tab_frame}, {
  2958. Size = utility:Size(1, -10, 0, ((10 * 22) + 4) + 20 + 60 + 12, window.tab_frame),
  2959. Position = utility:Position(0, 5, 0, 5, window.tab_frame),
  2960. Color = theme.inline,
  2961. Visible = page.open
  2962. }, playerList.visibleContent);playerList["playerList_inline"] = playerList_inline
  2963. --
  2964. library.colors[playerList_inline] = {
  2965. Color = "inline"
  2966. }
  2967. --
  2968. local playerList_outline = utility:Create("Frame", {Vector2.new(1,1), playerList_inline}, {
  2969. Size = utility:Size(1, -2, 1, -2, playerList_inline),
  2970. Position = utility:Position(0, 1, 0, 1, playerList_inline),
  2971. Color = theme.outline,
  2972. Visible = page.open
  2973. }, playerList.visibleContent);playerList["playerList_outline"] = playerList_outline
  2974. --
  2975. library.colors[playerList_outline] = {
  2976. Color = "outline"
  2977. }
  2978. --
  2979. local playerList_frame = utility:Create("Frame", {Vector2.new(1,1), playerList_outline}, {
  2980. Size = utility:Size(1, -2, 1, -2, playerList_outline),
  2981. Position = utility:Position(0, 1, 0, 1, playerList_outline),
  2982. Color = theme.darkcontrast,
  2983. Visible = page.open
  2984. }, playerList.visibleContent);playerList["playerList_frame"] = playerList_frame
  2985. --
  2986. library.colors[playerList_frame] = {
  2987. Color = "darkcontrast"
  2988. }
  2989. --
  2990. local playerList_accent = utility:Create("Frame", {Vector2.new(0,0), playerList_frame}, {
  2991. Size = utility:Size(1, 0, 0, 2, playerList_frame),
  2992. Position = utility:Position(0, 0, 0, 0, playerList_frame),
  2993. Color = theme.accent,
  2994. Visible = page.open
  2995. }, playerList.visibleContent);playerList["playerList_accent"] = playerList_accent
  2996. --
  2997. library.colors[playerList_accent] = {
  2998. Color = "accent"
  2999. }
  3000. --
  3001. local playerList_title = utility:Create("TextLabel", {Vector2.new(3,3), playerList_frame}, {
  3002. Text = "Player List - 0 Players",
  3003. Size = theme.textsize,
  3004. Font = theme.font,
  3005. Color = theme.textcolor,
  3006. OutlineColor = theme.textborder,
  3007. Position = utility:Position(0, 3, 0, 3, playerList_frame),
  3008. Visible = page.open
  3009. }, playerList.visibleContent)
  3010. --
  3011. library.colors[playerList_title] = {
  3012. OutlineColor = "textborder",
  3013. Color = "textcolor"
  3014. }
  3015. --
  3016. local list_outline = utility:Create("Frame", {Vector2.new(4,20), playerList_frame}, {
  3017. Size = utility:Size(1, -8, 0, ((10 * 22) + 4), playerList_frame),
  3018. Position = utility:Position(0, 4, 0, 20, playerList_frame),
  3019. Color = theme.outline,
  3020. Visible = page.open
  3021. }, playerList.visibleContent)
  3022. --
  3023. library.colors[list_outline] = {
  3024. Color = "outline"
  3025. }
  3026. --
  3027. local list_inline = utility:Create("Frame", {Vector2.new(1,1), list_outline}, {
  3028. Size = utility:Size(1, -2, 1, -2, list_outline),
  3029. Position = utility:Position(0, 1, 0, 1, list_outline),
  3030. Color = theme.inline,
  3031. Visible = page.open
  3032. }, playerList.visibleContent)
  3033. --
  3034. library.colors[list_inline] = {
  3035. Color = "inline"
  3036. }
  3037. --
  3038. local list_frame = utility:Create("Frame", {Vector2.new(1,1), list_inline}, {
  3039. Size = utility:Size(1, -10, 1, -2, list_inline),
  3040. Position = utility:Position(0, 1, 0, 1, list_inline),
  3041. Color = theme.lightcontrast,
  3042. Visible = page.open
  3043. }, playerList.visibleContent)
  3044. --
  3045. library.colors[list_frame] = {
  3046. Color = "lightcontrast"
  3047. }
  3048. --
  3049. local list_scroll = utility:Create("Frame", {Vector2.new(list_inline.Size.X - 9,1), list_inline}, {
  3050. Size = utility:Size(0, 8, 1, -2, list_inline),
  3051. Position = utility:Position(1, -9, 0, 1, list_inline),
  3052. Color = theme.darkcontrast,
  3053. Visible = page.open
  3054. }, playerList.visibleContent)
  3055. --
  3056. library.colors[list_scroll] = {
  3057. Color = "darkcontrast"
  3058. }
  3059. --
  3060. local list_bar = utility:Create("Frame", {Vector2.new(1,1), list_scroll}, {
  3061. Size = utility:Size(1, -2, 0.5, -2, list_scroll),
  3062. Position = utility:Position(0, 1, 0, 1, list_scroll),
  3063. Color = theme.accent,
  3064. Visible = page.open
  3065. }, playerList.visibleContent)
  3066. --
  3067. library.colors[list_bar] = {
  3068. Color = "accent"
  3069. }
  3070. --
  3071. local list_gradient = utility:Create("Image", {Vector2.new(0,0), list_frame}, {
  3072. Size = utility:Size(1, 0, 1, 0, list_frame),
  3073. Position = utility:Position(0, 0, 0 , 0, list_frame),
  3074. Transparency = 0.25,
  3075. Visible = page.open
  3076. }, playerList.visibleContent)
  3077. --
  3078. for Index = 1, 10 do
  3079. local item = {}
  3080. local listitemposition = (Index - 1) * 22
  3081. --
  3082. local listitem_line
  3083. --
  3084. if Index ~= 10 then
  3085. listitem_line = utility:Create("Frame", {Vector2.new(3,listitemposition + 21), list_frame}, {
  3086. Size = utility:Size(1, -6, 0, 2, list_frame),
  3087. Position = utility:Position(0, 3, 0, listitemposition + 21, list_frame),
  3088. Transparency = 0,
  3089. Color = theme.outline,
  3090. Visible = page.open
  3091. }, playerList.visibleContent)
  3092. --
  3093. library.colors[listitem_line] = {
  3094. Color = "outline"
  3095. }
  3096. end
  3097. --
  3098. local listitem_firstline = utility:Create("Frame", {Vector2.new(1/3 * list_frame.Size.X,listitemposition + 3), list_frame}, {
  3099. Size = utility:Size(0, 2, 0, 16, list_frame),
  3100. Position = utility:Position(1/3, 1, 0, listitemposition + 3, list_frame),
  3101. Transparency = 0,
  3102. Color = theme.outline,
  3103. Visible = page.open
  3104. }, playerList.visibleContent)
  3105. --
  3106. library.colors[listitem_firstline] = {
  3107. Color = "outline"
  3108. }
  3109. --
  3110. local listitem_secondline = utility:Create("Frame", {Vector2.new(2/3 * list_frame.Size.X,listitemposition + 3), list_frame}, {
  3111. Size = utility:Size(0, 2, 0, 16, list_frame),
  3112. Position = utility:Position(2/3, 1, 0, listitemposition + 3, list_frame),
  3113. Transparency = 0,
  3114. Color = theme.outline,
  3115. Visible = page.open
  3116. }, playerList.visibleContent)
  3117. --
  3118. library.colors[listitem_secondline] = {
  3119. Color = "outline"
  3120. }
  3121. --
  3122. local listitem_username = utility:Create("TextLabel", {Vector2.new(4, 4 + listitemposition), list_frame}, {
  3123. Text = "",
  3124. Size = theme.textsize,
  3125. Font = theme.font,
  3126. Color = theme.textcolor,
  3127. OutlineColor = theme.textborder,
  3128. Position = utility:Position(0, 4, 0, 4 + listitemposition, list_frame),
  3129. Visible = page.open
  3130. }, playerList.visibleContent)
  3131. --
  3132. library.colors[listitem_username] = {
  3133. OutlineColor = "textborder",
  3134. Color = "textcolor"
  3135. }
  3136. --
  3137. local listitem_team = utility:Create("TextLabel", {Vector2.new(6 + (1/3 * list_frame.Size.X), 4 + listitemposition), list_frame}, {
  3138. Text = "",
  3139. Size = theme.textsize,
  3140. Font = theme.font,
  3141. Color = theme.textcolor,
  3142. OutlineColor = theme.textborder,
  3143. Position = utility:Position(1/3, 6, 0, 4 + listitemposition, list_frame),
  3144. Visible = page.open
  3145. }, playerList.visibleContent)
  3146. --
  3147. library.colors[listitem_team] = {
  3148. OutlineColor = "textborder",
  3149. Color = "textcolor"
  3150. }
  3151. --
  3152. local listitem_status = utility:Create("TextLabel", {Vector2.new(6 + (2/3 * list_frame.Size.X), 4 + listitemposition), list_frame}, {
  3153. Text = "",
  3154. Size = theme.textsize,
  3155. Font = theme.font,
  3156. Color = theme.textcolor,
  3157. OutlineColor = theme.textborder,
  3158. Position = utility:Position(2/3, 6, 0, 4 + listitemposition, list_frame),
  3159. Visible = page.open
  3160. }, playerList.visibleContent)
  3161. --
  3162. library.colors[listitem_status] = {
  3163. OutlineColor = "textborder",
  3164. Color = "textcolor"
  3165. }
  3166. --
  3167. function item:Set(enabled, selected)
  3168. if listitem_line then
  3169. if window.isVisible then
  3170. listitem_line.Transparency = enabled and 0.3 or 0
  3171. end
  3172. --
  3173. utility:UpdateTransparency(listitem_line, enabled and 0.3 or 0)
  3174. end
  3175. --
  3176. if window.isVisible then
  3177. listitem_firstline.Transparency = enabled and 0.3 or 0
  3178. listitem_secondline.Transparency = enabled and 0.3 or 0
  3179. end
  3180. --
  3181. utility:UpdateTransparency(listitem_firstline, enabled and 0.3 or 0)
  3182. utility:UpdateTransparency(listitem_secondline, enabled and 0.3 or 0)
  3183. --
  3184. if enabled then
  3185. listitem_username.Text = selected[2]
  3186. listitem_team.Text = selected[1].Team and tostring(selected[1].Team) or "None"
  3187. listitem_status.Text = selected[3]
  3188. --
  3189. listitem_username.Color = selected[4] and theme.accent or theme.textcolor
  3190. listitem_status.Color = selected[3] == "Local Player" and Color3.fromRGB(200, 55, 200) or selected[3] == "Priority" and Color3.fromRGB(55, 55, 200) or selected[3] == "Friend" and Color3.fromRGB(55, 200, 55) or selected[3] == "Enemy" and Color3.fromRGB(200, 55, 55) or theme.textcolor
  3191. --
  3192. library.colors[listitem_username] = {
  3193. OutlineColor = "textborder",
  3194. Color = selected[4] and "accent" or "textcolor"
  3195. }
  3196. --
  3197. library.colors[listitem_status] = {
  3198. OutlineColor = "textborder",
  3199. Color = selected[3] == "None" and "textcolor" or nil
  3200. }
  3201. else
  3202. listitem_username.Text = ""
  3203. listitem_team.Text = ""
  3204. listitem_status.Text = ""
  3205. end
  3206. end
  3207. --
  3208. playerList.items[#playerList.items + 1] = item
  3209. end
  3210. --
  3211. local options_iconoutline = utility:Create("Frame", {Vector2.new(0,list_outline.Size.Y + 4), list_outline}, {
  3212. Size = utility:Size(0, 60, 0, 60, list_outline),
  3213. Position = utility:Position(0, 0, 1, 4, list_outline),
  3214. Color = theme.outline,
  3215. Visible = page.open
  3216. }, playerList.visibleContent)
  3217. --
  3218. library.colors[options_iconoutline] = {
  3219. Color = "outline"
  3220. }
  3221. --
  3222. local options_iconinline = utility:Create("Frame", {Vector2.new(1,1), options_iconoutline}, {
  3223. Size = utility:Size(1, -2, 1, -2, options_iconoutline),
  3224. Position = utility:Position(0, 1, 0, 1, options_iconoutline),
  3225. Color = theme.inline,
  3226. Visible = page.open
  3227. }, playerList.visibleContent)
  3228. --
  3229. library.colors[options_iconinline] = {
  3230. Color = "inline"
  3231. }
  3232. --
  3233. local options_iconframe = utility:Create("Frame", {Vector2.new(1,1), options_iconinline}, {
  3234. Size = utility:Size(1, -2, 1, -2, options_iconinline),
  3235. Position = utility:Position(0, 1, 0, 1, options_iconinline),
  3236. Color = theme.lightcontrast,
  3237. Visible = page.open
  3238. }, playerList.visibleContent)
  3239. --
  3240. library.colors[options_iconframe] = {
  3241. Color = "lightcontrast"
  3242. }
  3243. --
  3244. local options_avatar = utility:Create("Image", {Vector2.new(0,0), options_iconframe}, {
  3245. Size = utility:Size(1, 0, 1, 0, options_iconframe),
  3246. Position = utility:Position(0, 0, 0 , 0, options_iconframe),
  3247. Transparency = 0.8,
  3248. Visible = page.open
  3249. }, playerList.visibleContent)
  3250. --
  3251. local options_loadingtext = utility:Create("TextLabel", {Vector2.new((options_iconoutline.Size.X / 2) - 1, (options_iconoutline.Size.X / 2) - 10), options_iconframe}, {
  3252. Text = "..?",
  3253. Size = theme.textsize,
  3254. Font = theme.font,
  3255. Color = theme.textdark,
  3256. OutlineColor = theme.textborder,
  3257. Position = utility:Position(0.5, -1, 0.5, -10, options_iconframe),
  3258. Center = true,
  3259. Visible = page.open
  3260. }, playerList.visibleContent)
  3261. --
  3262. library.colors[options_loadingtext] = {
  3263. OutlineColor = "textborder",
  3264. Color = "textdark"
  3265. }
  3266. --
  3267. local options_title = utility:Create("TextLabel", {Vector2.new(options_iconoutline.Size.X + 5, 0), options_iconoutline}, {
  3268. Text = "No player selected.", -- ("Display Name : %s\nName : %s\nHealth : %s/%s"):format("gg_bbot", "1envo", "100", "100")
  3269. Size = theme.textsize,
  3270. Font = theme.font,
  3271. Color = theme.textcolor,
  3272. OutlineColor = theme.textborder,
  3273. Position = utility:Position(1, 5, 0, 0, options_iconoutline),
  3274. Visible = page.open
  3275. }, playerList.visibleContent)
  3276. --
  3277. library.colors[options_title] = {
  3278. OutlineColor = "textborder",
  3279. Color = "textcolor"
  3280. }
  3281. --
  3282. for Index = 1, 1 do
  3283. local button = {
  3284. open = false,
  3285. current = "None",
  3286. options = {"None", "Friend", "Enemy", "Priority"},
  3287. holder = {buttons = {}, drawings = {}},
  3288. selection = nil
  3289. }
  3290. --
  3291. local button_outline = utility:Create("Frame", {Vector2.new(list_outline.Size.X - 180, list_outline.Size.Y + (Index == 1 and 10 or 36)), list_outline}, {
  3292. Size = utility:Size(0, 180, 0, 22, list_outline),
  3293. Position = utility:Position(1, -180, 1, Index == 1 and 10 or 36, list_outline),
  3294. Color = theme.outline,
  3295. Visible = page.open
  3296. }, playerList.visibleContent)
  3297. --
  3298. library.colors[button_outline] = {
  3299. Color = "outline"
  3300. }
  3301. --
  3302. local button_inline = utility:Create("Frame", {Vector2.new(1,1), button_outline}, {
  3303. Size = utility:Size(1, -2, 1, -2, button_outline),
  3304. Position = utility:Position(0, 1, 0, 1, button_outline),
  3305. Color = theme.inline,
  3306. Visible = page.open
  3307. }, playerList.visibleContent)
  3308. --
  3309. library.colors[button_inline] = {
  3310. Color = "inline"
  3311. }
  3312. --
  3313. local button_frame = utility:Create("Frame", {Vector2.new(1,1), button_inline}, {
  3314. Size = utility:Size(1, -2, 1, -2, button_inline),
  3315. Position = utility:Position(0, 1, 0, 1, button_inline),
  3316. Color = theme.lightcontrast,
  3317. Visible = page.open
  3318. }, playerList.visibleContent)
  3319. --
  3320. library.colors[button_frame] = {
  3321. Color = "lightcontrast"
  3322. }
  3323. --
  3324. local button_gradient = utility:Create("Image", {Vector2.new(0,0), button_frame}, {
  3325. Size = utility:Size(1, 0, 1, 0, button_frame),
  3326. Position = utility:Position(0, 0, 0 , 0, button_frame),
  3327. Transparency = 0.5,
  3328. Visible = page.open
  3329. }, playerList.visibleContent)
  3330. --
  3331. local button_title = utility:Create("TextLabel", {Vector2.new(button_frame.Size.X/2,1), button_frame}, {
  3332. Text = Index == 1 and "Prioritise" or "Friendly",
  3333. Size = theme.textsize,
  3334. Font = theme.font,
  3335. Color = theme.textcolor,
  3336. OutlineColor = theme.textborder,
  3337. Center = true,
  3338. Position = utility:Position(0.5, 0, 0, 1, button_frame),
  3339. Visible = page.open
  3340. }, playerList.visibleContent)
  3341. --
  3342. library.colors[button_title] = {
  3343. OutlineColor = "textborder",
  3344. Color = "textcolor"
  3345. }
  3346. --
  3347. local button_image = utility:Create("Image", {Vector2.new(button_frame.Size.X - 15,button_frame.Size.Y/2 - 3), button_frame}, {
  3348. Size = utility:Size(0, 9, 0, 6, button_frame),
  3349. Position = utility:Position(1, -15, 0.5, -3, button_frame),
  3350. Visible = page.open
  3351. }, playerList.visibleContent)
  3352. --
  3353. utility:LoadImage(button_image, "arrow_down", "https://i.imgur.com/tVqy0nL.png")
  3354. --
  3355. function button:Update(Selection)
  3356. local Visible = Selection ~= nil and (Selection[1] ~= localplayer) or false
  3357. --
  3358. for Index, Value in pairs({button_outline, button_inline, button_frame, button_gradient, button_title, button_image}) do
  3359. Value.Visible = page.open and Visible or false
  3360. --
  3361. if Visible then
  3362. local fnd = table.find(playerList.visibleContent, Value)
  3363. --
  3364. if not fnd then
  3365. playerList.visibleContent[#playerList.visibleContent + 1] = Value
  3366. end
  3367. else
  3368. local fnd = table.find(playerList.visibleContent, Value)
  3369. --
  3370. if fnd then
  3371. table.remove(playerList.visibleContent, fnd)
  3372. end
  3373. end
  3374. end
  3375. --
  3376. if Selection then
  3377. button_title.Text = Selection[3]
  3378. button.current = Selection[3]
  3379. button.selection = Selection
  3380. else
  3381. button.selection = nil
  3382. end
  3383. end
  3384. --
  3385. function button:UpdateValue()
  3386. if button.open and button.holder.inline then
  3387. for i,v in pairs(button.holder.buttons) do
  3388. local value = button.options[i]
  3389. --
  3390. v[1].Text = value
  3391. v[1].Color = value == tostring(button.current) and theme.accent or theme.textcolor
  3392. v[1].Position = utility:Position(0, value == tostring(button.current) and 8 or 6, 0, 2, v[2])
  3393. library.colors[v[1]] = {
  3394. Color = v[1].Text == tostring(button.current) and "accent" or "textcolor"
  3395. }
  3396. utility:UpdateOffset(v[1], {Vector2.new(v[1].Text == tostring(button.current) and 8 or 6, 2), v[2]})
  3397. end
  3398. end
  3399. end
  3400. --
  3401. function button:Close()
  3402. button.open = not button.open
  3403. utility:LoadImage(button_image, "arrow_down", "https://i.imgur.com/tVqy0nL.png")
  3404. --
  3405. for i,v in pairs(button.holder.drawings) do
  3406. utility:Remove(v)
  3407. end
  3408. --
  3409. button.holder.drawings = {}
  3410. button.holder.buttons = {}
  3411. button.holder.inline = nil
  3412. --
  3413. window.currentContent.frame = nil
  3414. window.currentContent.button = nil
  3415. end
  3416. --
  3417. function button:Open()
  3418. window:CloseContent()
  3419. button.open = not button.open
  3420. utility:LoadImage(button_image, "arrow_up", "https://i.imgur.com/SL9cbQp.png")
  3421. --
  3422. local button_open_outline = utility:Create("Frame", {Vector2.new(0,21), button_outline}, {
  3423. Size = utility:Size(1, 0, 0, 3 + (#button.options * 19), button_outline),
  3424. Position = utility:Position(0, 0, 0, 21, button_outline),
  3425. Color = theme.outline,
  3426. Visible = page.open
  3427. }, button.holder.drawings);button.holder.outline = button_open_outline
  3428. --
  3429. library.colors[button_open_outline] = {
  3430. Color = "outline"
  3431. }
  3432. --
  3433. local button_open_inline = utility:Create("Frame", {Vector2.new(1,1), button_open_outline}, {
  3434. Size = utility:Size(1, -2, 1, -2, button_open_outline),
  3435. Position = utility:Position(0, 1, 0, 1, button_open_outline),
  3436. Color = theme.inline,
  3437. Visible = page.open
  3438. }, button.holder.drawings);button.holder.inline = button_open_inline
  3439. --
  3440. library.colors[button_open_inline] = {
  3441. Color = "inline"
  3442. }
  3443. --
  3444. for Index = 1, (#button.options) do
  3445. local Value = button.options[Index]
  3446. --
  3447. if Value then
  3448. local button_value_frame = utility:Create("Frame", {Vector2.new(1,1 + (19 * (Index-1))), button_open_inline}, {
  3449. Size = utility:Size(1, -2, 0, 18, button_open_inline),
  3450. Position = utility:Position(0, 1, 0, 1 + (19 * (Index-1)), button_open_inline),
  3451. Color = theme.lightcontrast,
  3452. Visible = page.open
  3453. }, button.holder.drawings)
  3454. --
  3455. library.colors[button_value_frame] = {
  3456. Color = "lightcontrast"
  3457. }
  3458. --
  3459. local button_value = utility:Create("TextLabel", {Vector2.new(Value == tostring(button.current) and 8 or 6,2), button_value_frame}, {
  3460. Text = Value,
  3461. Size = theme.textsize,
  3462. Font = theme.font,
  3463. Color = Value == tostring(button.current) and theme.accent or theme.textcolor,
  3464. OutlineColor = theme.textborder,
  3465. Position = utility:Position(0, Value == tostring(button.current) and 8 or 6, 0, 2, button_value_frame),
  3466. Visible = page.open
  3467. }, button.holder.drawings)
  3468. --
  3469. button.holder.buttons[#button.holder.buttons + 1] = {button_value, button_value_frame}
  3470. --
  3471. library.colors[button_value] = {
  3472. OutlineColor = "textborder",
  3473. Color = Value == tostring(button.current) and "accent" or "textcolor"
  3474. }
  3475. end
  3476. end
  3477. --
  3478. window.currentContent.frame = button_open_inline
  3479. window.currentContent.button = button
  3480. end
  3481. --
  3482. utility:LoadImage(button_gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")
  3483. --
  3484. library.began[#library.began + 1] = function(Input)
  3485. if Input.UserInputType == Enum.UserInputType.MouseButton1 and (button_outline.Visible or button.open) and window.isVisible then
  3486. if Input.UserInputType == Enum.UserInputType.MouseButton1 and window.isVisible and button_outline.Visible then
  3487. if button.open and button.holder.inline and utility:MouseOverDrawing({button.holder.inline.Position.X, button.holder.inline.Position.Y, button.holder.inline.Position.X + button.holder.inline.Size.X, button.holder.inline.Position.Y + button.holder.inline.Size.Y}) then
  3488. for i,v in pairs(button.holder.buttons) do
  3489. local value = button.options[i]
  3490. --
  3491. if utility:MouseOverDrawing({v[2].Position.X, v[2].Position.Y, v[2].Position.X + v[2].Size.X, v[2].Position.Y + v[2].Size.Y}) and value ~= button.current then
  3492. button.current = value
  3493. button_title.Text = button.current
  3494.  
  3495. if button.selection then
  3496. button.selection[3] = value
  3497. playerList:Refresh(button.selection)
  3498. end
  3499.  
  3500. button:UpdateValue()
  3501. end
  3502. end
  3503. elseif utility:MouseOverDrawing({button_outline.Position.X, button_outline.Position.Y, button_outline.Position.X + button_outline.Size.X, button_outline.Position.Y + button_outline.Size.Y}) and not window:IsOverContent() then
  3504. task.spawn(function()
  3505. utility:LoadImage(button_gradient, "gradientdown", "https://i.imgur.com/XYVD9Mh.png")
  3506. --
  3507. task.wait(0.15)
  3508. --
  3509. utility:LoadImage(button_gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")
  3510. end)
  3511. --
  3512. if not button.open then
  3513. button:Open()
  3514. else
  3515. button:Close()
  3516. end
  3517. else
  3518. if button.open then
  3519. button:Close()
  3520. end
  3521. end
  3522. elseif Input.UserInputType == Enum.UserInputType.MouseButton1 and button.open then
  3523. button:Close()
  3524. end
  3525. end
  3526. end
  3527. --
  3528. playerList.buttons[#playerList.buttons + 1] = button
  3529. end
  3530. --
  3531. utility:LoadImage(list_gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")
  3532. --
  3533. function playerList:GetSelection()
  3534. for Index, Value in pairs(playerList.players) do
  3535. if Value[4] then
  3536. return Value
  3537. end
  3538. end
  3539. end
  3540. --
  3541. function playerList:UpdateScroll()
  3542. if (#playerList.players - 10) > 0 then
  3543. playerList.scrollingindex = math.clamp(playerList.scrollingindex, 0, (#playerList.players - 10))
  3544. --
  3545. list_bar.Transparency = window.isVisible and 1 or 0
  3546. list_bar.Size = utility:Size(1, -2, (10 / #playerList.players), -2, list_scroll)
  3547. list_bar.Position = utility:Position(0, 1, 0, 1 + ((((list_scroll.Size.Y - 2) - list_bar.Size.Y) / (#playerList.players - 10)) * playerList.scrollingindex), list_scroll)
  3548. utility:UpdateTransparency(list_bar, 1)
  3549. utility:UpdateOffset(list_bar, {Vector2.new(1, 1 + ((((list_scroll.Size.Y - 2) - list_bar.Size.Y) / (#playerList.players - 10)) * playerList.scrollingindex)), list_scroll})
  3550. else
  3551. playerList.scrollingindex = 0
  3552. list_bar.Transparency = 0
  3553. utility:UpdateTransparency(list_bar, 0)
  3554. end
  3555. --
  3556. playerList:Refresh()
  3557. end
  3558. --
  3559. local lastselection
  3560. --
  3561. function playerList:Refresh(Relation)
  3562. for Index, Value in pairs(playerList.items) do
  3563. local Found = playerList.players[Index + playerList.scrollingindex]
  3564. --
  3565. if Found then
  3566. Value:Set(true, Found)
  3567. else
  3568. Value:Set(false)
  3569. end
  3570. end
  3571. --
  3572. if Relation then
  3573. library.Relations[Relation[1].UserId] = Relation[3] ~= "None" and Relation[3] or nil
  3574. end
  3575. --
  3576. playerList_title.Text = ("Player List - %s Players"):format(#playerList.items - 1)
  3577. --
  3578. local Selection = playerList:GetSelection()
  3579. --
  3580. playerList.buttons[1]:Update(Selection)
  3581. --
  3582. window:Move(window.main_frame.Position)
  3583. --
  3584. if Selection then
  3585. if lastselection ~= Selection then
  3586. lastselection = Selection
  3587. --
  3588. options_avatar.Data = ""
  3589. options_loadingtext.Text = "..?"
  3590. --
  3591. options_title.Text = ("User ID : %s\nDisplay Name : %s\nName : %s\nHealth : %s/%s"):format(Selection[1].UserId, Selection[1].DisplayName ~= "" and Selection[1].DisplayName or Selection[1].Name, Selection[1].Name, "100", "100")
  3592. --
  3593. local imagedata = game:HttpGet(("https://www.roblox.com/headshot-thumbnail/image?userId=%s&width=100&height=100&format=png"):format(Selection[1].UserId))
  3594. --
  3595. if playerList:GetSelection() == Selection then
  3596. options_avatar.Data = imagedata
  3597. options_loadingtext.Text = ""
  3598. end
  3599. end
  3600. else
  3601. options_title.Text = "No player selected."
  3602. options_avatar.Data = ""
  3603. options_loadingtext.Text = "..?"
  3604. lastselection = nil
  3605. end
  3606. end
  3607. --
  3608. function playerList:Update() end
  3609. --
  3610. utility:Connection(plrs.PlayerAdded, function(Player)
  3611. playerList.players[#playerList.players + 1] = {Player, Player.Name, "None", false}
  3612. --
  3613. playerList:UpdateScroll()
  3614. end)
  3615. --
  3616. utility:Connection(plrs.PlayerRemoving, function(Player)
  3617. for Index, Value in pairs(playerList.players) do
  3618. if Value[1] == Player then
  3619. Remove(playerList.players, Index)
  3620. end
  3621. end
  3622. --
  3623. playerList:UpdateScroll()
  3624. end)
  3625. --
  3626. for Index, Value in pairs(plrs:GetPlayers()) do
  3627. playerList.players[#playerList.players + 1] = {Value, Value.Name, Value == localplayer and "Local Player" or "None", false}
  3628. end
  3629. --
  3630. library.began[#library.began + 1] = function(Input)
  3631. if Input.UserInputType == Enum.UserInputType.MouseButton1 and list_outline.Visible and window.isVisible then
  3632. if utility:MouseOverDrawing({list_bar.Position.X, list_bar.Position.Y, list_bar.Position.X + list_bar.Size.X, list_bar.Position.Y + list_bar.Size.Y}) then
  3633. playerList.scrolling = {true, (utility:MouseLocation().Y - list_bar.Position.Y)}
  3634. elseif utility:MouseOverDrawing({list_frame.Position.X, list_frame.Position.Y, list_frame.Position.X + list_frame.Size.X, list_frame.Position.Y + list_frame.Size.Y}) and not window:IsOverContent() then
  3635. for Index = 1, 10 do
  3636. local Found = playerList.players[Index + playerList.scrollingindex]
  3637. --
  3638. if Found and utility:MouseOverDrawing({list_frame.Position.X, list_frame.Position.Y + 2 + (22 * (Index - 1)), list_frame.Position.X + list_frame.Size.X, list_frame.Position.Y + 2 + (22 * (Index - 1)) + 22}) then
  3639. if Found[4] then
  3640. Found[4] = false
  3641. else
  3642. for Index2, Value2 in pairs(playerList.players) do
  3643. if Value2 ~= Found then
  3644. Value2[4] = false
  3645. end
  3646. end
  3647. --
  3648. Found[4] = true
  3649. end
  3650. --
  3651. playerList:UpdateScroll()
  3652. --
  3653. break
  3654. end
  3655. end
  3656. end
  3657. end
  3658. end
  3659. --
  3660. library.ended[#library.ended + 1] = function(Input)
  3661. if playerList.scrolling[1] and Input.UserInputType == Enum.UserInputType.MouseButton1 then
  3662. playerList.scrolling = {false, nil}
  3663. end
  3664. end
  3665. --
  3666. library.changed[#library.changed + 1] = function(Input)
  3667. if playerList.scrolling[1] then
  3668. local MouseLocation = utility:MouseLocation()
  3669. local Position = math.clamp((MouseLocation.Y - list_scroll.Position.Y - playerList.scrolling[2]), 0, ((list_scroll.Size.Y - list_bar.Size.Y)))
  3670. --
  3671. playerList.scrollingindex = math.clamp(math.round((((Position + list_scroll.Position.Y) - list_scroll.Position.Y) / ((list_scroll.Size.Y - list_bar.Size.Y))) * (#playerList.players - 10)), 0, #playerList.players - 10)
  3672. playerList:UpdateScroll()
  3673. end
  3674. end
  3675. --
  3676. utility:Connection(mouse.WheelForward,function()
  3677. if (#playerList.players - 10) > 0 and page.open and list_bar.Visible and utility:MouseOverDrawing({list_frame.Position.X, list_frame.Position.Y, list_frame.Position.X + list_frame.Size.X, list_frame.Position.Y + list_frame.Size.Y}) and not window:IsOverContent() then
  3678. playerList.scrollingindex = math.clamp(playerList.scrollingindex - 1, 0, #playerList.players - 10)
  3679. playerList:UpdateScroll()
  3680. end
  3681. end)
  3682. --
  3683. utility:Connection(mouse.WheelBackward,function()
  3684. if (#playerList.players - 10) > 0 and page.open and list_bar.Visible and utility:MouseOverDrawing({list_frame.Position.X, list_frame.Position.Y, list_frame.Position.X + list_frame.Size.X, list_frame.Position.Y + list_frame.Size.Y}) and not window:IsOverContent() then
  3685. playerList.scrollingindex = math.clamp(playerList.scrollingindex + 1, 0, #playerList.players - 10)
  3686. playerList:UpdateScroll()
  3687. end
  3688. end)
  3689. --
  3690. playerList:UpdateScroll()
  3691. --
  3692. page.sectionOffset["left"] = page.sectionOffset["left"] + playerList_inline.Size.Y + 5
  3693. page.sectionOffset["right"] = page.sectionOffset["right"] + playerList_inline.Size.Y + 5
  3694. page.sections[#page.sections + 1] = playerList
  3695. return playerList
  3696. end
  3697. --
  3698. function sections:Label(info)
  3699. local info = info or {}
  3700. local name = info.name or info.Name or info.title or info.Title or "New Label"
  3701. local middle = info.middle or info.Middle or info.center or info.Center or false
  3702. local pointer = info.pointer or info.Pointer or info.flag or info.Flag or nil
  3703. --
  3704. local window = self.window
  3705. local page = self.page
  3706. local section = self
  3707. --
  3708. local label = {axis = section.currentAxis}
  3709. --
  3710. local label_title = utility:Create("TextLabel", {Vector2.new(middle and (section.section_frame.Size.X/2) or 4,label.axis), section.section_frame}, {
  3711. Text = name,
  3712. Size = theme.textsize,
  3713. Font = theme.font,
  3714. Color = theme.textcolor,
  3715. OutlineColor = theme.textborder,
  3716. Center = middle,
  3717. Position = utility:Position(middle and 0.5 or 0, middle and 0 or 4, 0, 0, section.section_frame),
  3718. Visible = page.open
  3719. }, section.visibleContent)
  3720. --
  3721. library.colors[label_title] = {
  3722. OutlineColor = "textborder",
  3723. Color = "textcolor"
  3724. }
  3725. --
  3726. if pointer and tostring(pointer) ~= "" and tostring(pointer) ~= " " and not library.pointers[tostring(pointer)] then
  3727. library.pointers[tostring(pointer)] = label
  3728. end
  3729. --
  3730. section.currentAxis = section.currentAxis + label_title.TextBounds.Y + 4
  3731. --
  3732. return label
  3733. end
  3734. --
  3735. function sections:Toggle(info)
  3736. local info = info or {}
  3737. local name = info.name or info.Name or info.title or info.Title or "New Toggle"
  3738. local def = info.def or info.Def or info.default or info.Default or false
  3739. local pointer = info.pointer or info.Pointer or info.flag or info.Flag or nil
  3740. local callback = info.callback or info.callBack or info.Callback or info.CallBack or function()end
  3741. --
  3742. local window = self.window
  3743. local page = self.page
  3744. local section = self
  3745. --
  3746. local toggle = {axis = section.currentAxis, current = def, addedAxis = 0, addedKeybind = nil, colorpickers = 0, keybind = nil}
  3747. --
  3748. local toggle_outline = utility:Create("Frame", {Vector2.new(4,toggle.axis), section.section_frame}, {
  3749. Size = utility:Size(0, 15, 0, 15),
  3750. Position = utility:Position(0, 4, 0, toggle.axis, section.section_frame),
  3751. Color = theme.outline,
  3752. Visible = page.open
  3753. }, section.visibleContent)
  3754. --
  3755. library.colors[toggle_outline] = {
  3756. Color = "outline"
  3757. }
  3758. --
  3759. local toggle_inline = utility:Create("Frame", {Vector2.new(1,1), toggle_outline}, {
  3760. Size = utility:Size(1, -2, 1, -2, toggle_outline),
  3761. Position = utility:Position(0, 1, 0, 1, toggle_outline),
  3762. Color = theme.inline,
  3763. Visible = page.open
  3764. }, section.visibleContent)
  3765. --
  3766. library.colors[toggle_inline] = {
  3767. Color = "inline"
  3768. }
  3769. --
  3770. local toggle_frame = utility:Create("Frame", {Vector2.new(1,1), toggle_inline}, {
  3771. Size = utility:Size(1, -2, 1, -2, toggle_inline),
  3772. Position = utility:Position(0, 1, 0, 1, toggle_inline),
  3773. Color = toggle.current == true and theme.accent or theme.lightcontrast,
  3774. Visible = page.open
  3775. }, section.visibleContent)
  3776. --
  3777. library.colors[toggle_frame] = {
  3778. Color = toggle.current == true and "accent" or "lightcontrast"
  3779. }
  3780. --
  3781. local toggle__gradient = utility:Create("Image", {Vector2.new(0,0), toggle_frame}, {
  3782. Size = utility:Size(1, 0, 1, 0, toggle_frame),
  3783. Position = utility:Position(0, 0, 0 , 0, toggle_frame),
  3784. Transparency = 0.5,
  3785. Visible = page.open
  3786. }, section.visibleContent)
  3787. --
  3788. local toggle_title = utility:Create("TextLabel", {Vector2.new(23,toggle.axis + (15/2) - (utility:GetTextBounds(name, theme.textsize, theme.font).Y/2)), section.section_frame}, {
  3789. Text = name,
  3790. Size = theme.textsize,
  3791. Font = theme.font,
  3792. Color = theme.textcolor,
  3793. OutlineColor = theme.textborder,
  3794. Position = utility:Position(0, 23, 0, toggle.axis + (15/2) - (utility:GetTextBounds(name, theme.textsize, theme.font).Y/2), section.section_frame),
  3795. Visible = page.open
  3796. }, section.visibleContent)
  3797. --
  3798. library.colors[toggle_title] = {
  3799. OutlineColor = "textborder",
  3800. Color = "textcolor"
  3801. }
  3802. --
  3803. utility:LoadImage(toggle__gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")
  3804. --
  3805. function toggle:Get()
  3806. return toggle.current
  3807. end
  3808. --
  3809. function toggle:Set(bool)
  3810. if typeof(bool) == "boolean" then
  3811. toggle.current = bool
  3812. toggle_frame.Color = toggle.current == true and theme.accent or theme.lightcontrast
  3813. --
  3814. library.colors[toggle_frame] = {
  3815. Color = toggle.current == true and "accent" or "lightcontrast"
  3816. }
  3817. --
  3818. callback(toggle.current)
  3819. --
  3820. if toggle.keybind then
  3821. toggle.keybind.active = (bool and (toggle.keybind.mode == "Always" or toggle.keybind.mode == "Off Hold") or false)
  3822. toggle.keybind:Callback()
  3823. --
  3824. if toggle.keybind.mode == "Off Hold" and toggle.current then
  3825. window.keybindslist:Add(toggle.keybind.keybindname, toggle.keybind.keybind_value.Text)
  3826. else
  3827. window.keybindslist:Remove(toggle.keybind.keybindname)
  3828. end
  3829. end
  3830. end
  3831. end
  3832. --
  3833. library.colors[toggle_frame] = {
  3834. Color = toggle.current == true and "accent" or "lightcontrast"
  3835. }
  3836. --
  3837. library.began[#library.began + 1] = function(Input)
  3838. if Input.UserInputType == Enum.UserInputType.MouseButton1 and toggle_outline.Visible and window.isVisible and page.open and utility:MouseOverDrawing({section.section_frame.Position.X, section.section_frame.Position.Y + toggle.axis, section.section_frame.Position.X + section.section_frame.Size.X - toggle.addedAxis, section.section_frame.Position.Y + toggle.axis + 15}) and not window:IsOverContent() then
  3839. toggle.current = not toggle.current
  3840. toggle_frame.Color = toggle.current == true and theme.accent or theme.lightcontrast
  3841. --
  3842. library.colors[toggle_frame] = {
  3843. Color = toggle.current == true and "accent" or "lightcontrast"
  3844. }
  3845. --
  3846. callback(toggle.current)
  3847. --
  3848. if toggle.keybind then
  3849. toggle.keybind.active = (toggle.current and (toggle.keybind.mode == "Always" or toggle.keybind.mode == "Off Hold") or false)
  3850. toggle.keybind:Callback()
  3851. if toggle.keybind.mode == "Off Hold" and toggle.current then
  3852. window.keybindslist:Add(toggle.keybind.keybindname, toggle.keybind.keybind_value.Text)
  3853. else
  3854. window.keybindslist:Remove(toggle.keybind.keybindname)
  3855. end
  3856. end
  3857. end
  3858. end
  3859. --
  3860. if pointer and tostring(pointer) ~= "" and tostring(pointer) ~= " " and not library.pointers[tostring(pointer)] then
  3861. library.pointers[tostring(pointer)] = toggle
  3862. end
  3863. --
  3864. section.currentAxis = section.currentAxis + 15 + 4
  3865. --
  3866. function toggle:Colorpicker(info)
  3867. local info = info or {}
  3868. local cpinfo = info.info or info.Info or name
  3869. local def = info.def or info.Def or info.default or info.Default or Color3.fromRGB(255, 0, 0)
  3870. local transp = info.transparency or info.Transparency or info.transp or info.Transp or info.alpha or info.Alpha or nil
  3871. local pointer = info.pointer or info.Pointer or info.flag or info.Flag or nil
  3872. local callback = info.callback or info.callBack or info.Callback or info.CallBack or function()end
  3873. --
  3874. local hh, ss, vv = def:ToHSV()
  3875. local colorpicker = {toggle, axis = toggle.axis, index = toggle.colorpickers, current = {hh, ss, vv , (transp or 0)}, holding = {picker = false, huepicker = false, transparency = false}, holder = {inline = nil, picker = nil, picker_cursor = nil, huepicker = nil, huepicker_cursor = {}, transparency = nil, transparencybg = nil, transparency_cursor = {}, drawings = {}}}
  3876. --
  3877. local colorpicker_outline = utility:Create("Frame", {Vector2.new(section.section_frame.Size.X-(toggle.colorpickers == 0 and (30+4) or (64 + 4)),colorpicker.axis), section.section_frame}, {
  3878. Size = utility:Size(0, 30, 0, 15),
  3879. Position = utility:Position(1, -(toggle.colorpickers == 0 and (30+4) or (64 + 4)), 0, colorpicker.axis, section.section_frame),
  3880. Color = theme.outline,
  3881. Visible = page.open
  3882. }, section.visibleContent)
  3883. --
  3884. library.colors[colorpicker_outline] = {
  3885. Color = "outline"
  3886. }
  3887. --
  3888. local colorpicker_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_outline}, {
  3889. Size = utility:Size(1, -2, 1, -2, colorpicker_outline),
  3890. Position = utility:Position(0, 1, 0, 1, colorpicker_outline),
  3891. Color = theme.inline,
  3892. Visible = page.open
  3893. }, section.visibleContent)
  3894. --
  3895. library.colors[colorpicker_inline] = {
  3896. Color = "inline"
  3897. }
  3898. --
  3899. local colorpicker__transparency
  3900. if transp then
  3901. colorpicker__transparency = utility:Create("Image", {Vector2.new(1,1), colorpicker_inline}, {
  3902. Size = utility:Size(1, -2, 1, -2, colorpicker_inline),
  3903. Position = utility:Position(0, 1, 0 , 1, colorpicker_inline),
  3904. Visible = page.open
  3905. }, section.visibleContent)
  3906. end
  3907. --
  3908. local colorpicker_frame = utility:Create("Frame", {Vector2.new(1,1), colorpicker_inline}, {
  3909. Size = utility:Size(1, -2, 1, -2, colorpicker_inline),
  3910. Position = utility:Position(0, 1, 0, 1, colorpicker_inline),
  3911. Color = def,
  3912. Transparency = transp and (1 - transp) or 1,
  3913. Visible = page.open
  3914. }, section.visibleContent)
  3915. --
  3916. local colorpicker__gradient = utility:Create("Image", {Vector2.new(0,0), colorpicker_frame}, {
  3917. Size = utility:Size(1, 0, 1, 0, colorpicker_frame),
  3918. Position = utility:Position(0, 0, 0 , 0, colorpicker_frame),
  3919. Transparency = 0.5,
  3920. Visible = page.open
  3921. }, section.visibleContent)
  3922. --
  3923. if transp then
  3924. utility:LoadImage(colorpicker__transparency, "cptransp", "https://i.imgur.com/IIPee2A.png")
  3925. end
  3926. utility:LoadImage(colorpicker__gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")
  3927. --
  3928. function colorpicker:Set(color, transp_val)
  3929. if typeof(color) == "table" then
  3930. if color.Color and color.Transparency then
  3931. local h, s, v = Unpack(color.Color)
  3932. colorpicker.current = {h, s, v , color.Transparency}
  3933. colorpicker_frame.Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  3934. colorpicker_frame.Transparency = 1 - colorpicker.current[4]
  3935. callback(Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3]), colorpicker.current[4])
  3936. else
  3937. colorpicker.current = color
  3938. colorpicker_frame.Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  3939. colorpicker_frame.Transparency = 1 - colorpicker.current[4]
  3940. callback(Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3]), colorpicker.current[4])
  3941. end
  3942. elseif typeof(color) == "Color3" then
  3943. local h, s, v = color:ToHSV()
  3944. colorpicker.current = {h, s, v, (transp_val or 0)}
  3945. colorpicker_frame.Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  3946. colorpicker_frame.Transparency = 1 - colorpicker.current[4]
  3947. callback(Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3]), colorpicker.current[4])
  3948. end
  3949. end
  3950. --
  3951. function colorpicker:Refresh()
  3952. local mouseLocation = utility:MouseLocation()
  3953. if colorpicker.open and colorpicker.holder.picker and colorpicker.holding.picker then
  3954. colorpicker.current[2] = math.clamp(mouseLocation.X - colorpicker.holder.picker.Position.X, 0, colorpicker.holder.picker.Size.X) / colorpicker.holder.picker.Size.X
  3955. --
  3956. colorpicker.current[3] = 1-(math.clamp(mouseLocation.Y - colorpicker.holder.picker.Position.Y, 0, colorpicker.holder.picker.Size.Y) / colorpicker.holder.picker.Size.Y)
  3957. --
  3958. colorpicker.holder.picker_cursor.Position = utility:Position(colorpicker.current[2], -3, 1-colorpicker.current[3] , -3, colorpicker.holder.picker)
  3959. --
  3960. utility:UpdateOffset(colorpicker.holder.picker_cursor, {Vector2.new((colorpicker.holder.picker.Size.X*colorpicker.current[2])-3,(colorpicker.holder.picker.Size.Y*(1-colorpicker.current[3]))-3), colorpicker.holder.picker})
  3961. --
  3962. if colorpicker.holder.transparencybg then
  3963. colorpicker.holder.transparencybg.Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  3964. end
  3965. elseif colorpicker.open and colorpicker.holder.huepicker and colorpicker.holding.huepicker then
  3966. colorpicker.current[1] = (math.clamp(mouseLocation.Y - colorpicker.holder.huepicker.Position.Y, 0, colorpicker.holder.huepicker.Size.Y) / colorpicker.holder.huepicker.Size.Y)
  3967. --
  3968. colorpicker.holder.huepicker_cursor[1].Position = utility:Position(0, -3, colorpicker.current[1], -3, colorpicker.holder.huepicker)
  3969. colorpicker.holder.huepicker_cursor[2].Position = utility:Position(0, 1, 0, 1, colorpicker.holder.huepicker_cursor[1])
  3970. colorpicker.holder.huepicker_cursor[3].Position = utility:Position(0, 1, 0, 1, colorpicker.holder.huepicker_cursor[2])
  3971. colorpicker.holder.huepicker_cursor[3].Color = Color3.fromHSV(colorpicker.current[1], 1, 1)
  3972. --
  3973. utility:UpdateOffset(colorpicker.holder.huepicker_cursor[1], {Vector2.new(-3,(colorpicker.holder.huepicker.Size.Y*colorpicker.current[1])-3), colorpicker.holder.huepicker})
  3974. --
  3975. colorpicker.holder.background.Color = Color3.fromHSV(colorpicker.current[1], 1, 1)
  3976. --
  3977. if colorpicker.holder.transparency_cursor and colorpicker.holder.transparency_cursor[3] then
  3978. colorpicker.holder.transparency_cursor[3].Color = Color3.fromHSV(0, 0, 1 - colorpicker.current[4])
  3979. end
  3980. --
  3981. if colorpicker.holder.transparencybg then
  3982. colorpicker.holder.transparencybg.Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  3983. end
  3984. elseif colorpicker.open and colorpicker.holder.transparency and colorpicker.holding.transparency then
  3985. colorpicker.current[4] = 1 - (math.clamp(mouseLocation.X - colorpicker.holder.transparency.Position.X, 0, colorpicker.holder.transparency.Size.X) / colorpicker.holder.transparency.Size.X)
  3986. --
  3987. colorpicker.holder.transparency_cursor[1].Position = utility:Position(1-colorpicker.current[4], -3, 0, -3, colorpicker.holder.transparency)
  3988. colorpicker.holder.transparency_cursor[2].Position = utility:Position(0, 1, 0, 1, colorpicker.holder.transparency_cursor[1])
  3989. colorpicker.holder.transparency_cursor[3].Position = utility:Position(0, 1, 0, 1, colorpicker.holder.transparency_cursor[2])
  3990. colorpicker.holder.transparency_cursor[3].Color = Color3.fromHSV(0, 0, 1 - colorpicker.current[4])
  3991. colorpicker_frame.Transparency = (1 - colorpicker.current[4])
  3992. --
  3993. utility:UpdateTransparency(colorpicker_frame, (1 - colorpicker.current[4]))
  3994. utility:UpdateOffset(colorpicker.holder.transparency_cursor[1], {Vector2.new((colorpicker.holder.transparency.Size.X*(1-colorpicker.current[4]))-3,-3), colorpicker.holder.transparency})
  3995. --
  3996. colorpicker.holder.background.Color = Color3.fromHSV(colorpicker.current[1], 1, 1)
  3997. end
  3998. --
  3999. colorpicker:Set(colorpicker.current)
  4000. end
  4001. --
  4002. function colorpicker:Get()
  4003. return {Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3]), Transparency = colorpicker.current[4]}
  4004. end
  4005. --
  4006. library.began[#library.began + 1] = function(Input)
  4007. if Input.UserInputType == Enum.UserInputType.MouseButton1 and window.isVisible and colorpicker_outline.Visible then
  4008. if colorpicker.open and colorpicker.holder.inline and utility:MouseOverDrawing({colorpicker.holder.inline.Position.X, colorpicker.holder.inline.Position.Y, colorpicker.holder.inline.Position.X + colorpicker.holder.inline.Size.X, colorpicker.holder.inline.Position.Y + colorpicker.holder.inline.Size.Y}) then
  4009. if colorpicker.holder.picker and utility:MouseOverDrawing({colorpicker.holder.picker.Position.X - 2, colorpicker.holder.picker.Position.Y - 2, colorpicker.holder.picker.Position.X - 2 + colorpicker.holder.picker.Size.X + 4, colorpicker.holder.picker.Position.Y - 2 + colorpicker.holder.picker.Size.Y + 4}) then
  4010. colorpicker.holding.picker = true
  4011. colorpicker:Refresh()
  4012. elseif colorpicker.holder.huepicker and utility:MouseOverDrawing({colorpicker.holder.huepicker.Position.X - 2, colorpicker.holder.huepicker.Position.Y - 2, colorpicker.holder.huepicker.Position.X - 2 + colorpicker.holder.huepicker.Size.X + 4, colorpicker.holder.huepicker.Position.Y - 2 + colorpicker.holder.huepicker.Size.Y + 4}) then
  4013. colorpicker.holding.huepicker = true
  4014. colorpicker:Refresh()
  4015. elseif colorpicker.holder.transparency and utility:MouseOverDrawing({colorpicker.holder.transparency.Position.X - 2, colorpicker.holder.transparency.Position.Y - 2, colorpicker.holder.transparency.Position.X - 2 + colorpicker.holder.transparency.Size.X + 4, colorpicker.holder.transparency.Position.Y - 2 + colorpicker.holder.transparency.Size.Y + 4}) then
  4016. colorpicker.holding.transparency = true
  4017. colorpicker:Refresh()
  4018. end
  4019. elseif utility:MouseOverDrawing({section.section_frame.Position.X + (section.section_frame.Size.X - (colorpicker.index == 0 and (30 + 4 + 2) or (64 + 4 + 2))), section.section_frame.Position.Y + colorpicker.axis, section.section_frame.Position.X + section.section_frame.Size.X - (colorpicker.index == 1 and 36 or 0), section.section_frame.Position.Y + colorpicker.axis + 15}) and not window:IsOverContent() then
  4020. if not colorpicker.open then
  4021. window:CloseContent()
  4022. colorpicker.open = not colorpicker.open
  4023. --
  4024. local colorpicker_open_outline = utility:Create("Frame", {Vector2.new(4,colorpicker.axis + 19), section.section_frame}, {
  4025. Size = utility:Size(1, -8, 0, transp and 219 or 200, section.section_frame),
  4026. Position = utility:Position(0, 4, 0, colorpicker.axis + 19, section.section_frame),
  4027. Color = theme.outline
  4028. }, colorpicker.holder.drawings);colorpicker.holder.inline = colorpicker_open_outline
  4029. --
  4030. library.colors[colorpicker_open_outline] = {
  4031. Color = "outline"
  4032. }
  4033. --
  4034. local colorpicker_open_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_outline}, {
  4035. Size = utility:Size(1, -2, 1, -2, colorpicker_open_outline),
  4036. Position = utility:Position(0, 1, 0, 1, colorpicker_open_outline),
  4037. Color = theme.inline
  4038. }, colorpicker.holder.drawings)
  4039. --
  4040. library.colors[colorpicker_open_inline] = {
  4041. Color = "inline"
  4042. }
  4043. --
  4044. local colorpicker_open_frame = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_inline}, {
  4045. Size = utility:Size(1, -2, 1, -2, colorpicker_open_inline),
  4046. Position = utility:Position(0, 1, 0, 1, colorpicker_open_inline),
  4047. Color = theme.darkcontrast
  4048. }, colorpicker.holder.drawings)
  4049. --
  4050. library.colors[colorpicker_open_frame] = {
  4051. Color = "darkcontrast"
  4052. }
  4053. --
  4054. local colorpicker_open_accent = utility:Create("Frame", {Vector2.new(0,0), colorpicker_open_frame}, {
  4055. Size = utility:Size(1, 0, 0, 2, colorpicker_open_frame),
  4056. Position = utility:Position(0, 0, 0, 0, colorpicker_open_frame),
  4057. Color = theme.accent
  4058. }, colorpicker.holder.drawings)
  4059. --
  4060. library.colors[colorpicker_open_accent] = {
  4061. Color = "accent"
  4062. }
  4063. --
  4064. local colorpicker_title = utility:Create("TextLabel", {Vector2.new(4,2), colorpicker_open_frame}, {
  4065. Text = cpinfo,
  4066. Size = theme.textsize,
  4067. Font = theme.font,
  4068. Color = theme.textcolor,
  4069. OutlineColor = theme.textborder,
  4070. Position = utility:Position(0, 4, 0, 2, colorpicker_open_frame),
  4071. }, colorpicker.holder.drawings)
  4072. --
  4073. library.colors[colorpicker_title] = {
  4074. OutlineColor = "textborder",
  4075. Color = "textcolor"
  4076. }
  4077. --
  4078. local colorpicker_open_picker_outline = utility:Create("Frame", {Vector2.new(4,17), colorpicker_open_frame}, {
  4079. Size = utility:Size(1, -27, 1, transp and -40 or -21, colorpicker_open_frame),
  4080. Position = utility:Position(0, 4, 0, 17, colorpicker_open_frame),
  4081. Color = theme.outline
  4082. }, colorpicker.holder.drawings)
  4083. --
  4084. library.colors[colorpicker_open_picker_outline] = {
  4085. Color = "outline"
  4086. }
  4087. --
  4088. local colorpicker_open_picker_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_picker_outline}, {
  4089. Size = utility:Size(1, -2, 1, -2, colorpicker_open_picker_outline),
  4090. Position = utility:Position(0, 1, 0, 1, colorpicker_open_picker_outline),
  4091. Color = theme.inline
  4092. }, colorpicker.holder.drawings)
  4093. --
  4094. library.colors[colorpicker_open_picker_inline] = {
  4095. Color = "inline"
  4096. }
  4097. --
  4098. local colorpicker_open_picker_bg = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_picker_inline}, {
  4099. Size = utility:Size(1, -2, 1, -2, colorpicker_open_picker_inline),
  4100. Position = utility:Position(0, 1, 0, 1, colorpicker_open_picker_inline),
  4101. Color = Color3.fromHSV(colorpicker.current[1],1,1)
  4102. }, colorpicker.holder.drawings);colorpicker.holder.background = colorpicker_open_picker_bg
  4103. --
  4104. local colorpicker_open_picker_image = utility:Create("Image", {Vector2.new(0,0), colorpicker_open_picker_bg}, {
  4105. Size = utility:Size(1, 0, 1, 0, colorpicker_open_picker_bg),
  4106. Position = utility:Position(0, 0, 0 , 0, colorpicker_open_picker_bg),
  4107. }, colorpicker.holder.drawings);colorpicker.holder.picker = colorpicker_open_picker_image
  4108. --
  4109. local colorpicker_open_picker_cursor = utility:Create("Image", {Vector2.new((colorpicker_open_picker_image.Size.X*colorpicker.current[2])-3,(colorpicker_open_picker_image.Size.Y*(1-colorpicker.current[3]))-3), colorpicker_open_picker_image}, {
  4110. Size = utility:Size(0, 6, 0, 6, colorpicker_open_picker_image),
  4111. Position = utility:Position(colorpicker.current[2], -3, 1-colorpicker.current[3] , -3, colorpicker_open_picker_image),
  4112. }, colorpicker.holder.drawings);colorpicker.holder.picker_cursor = colorpicker_open_picker_cursor
  4113. --
  4114. local colorpicker_open_huepicker_outline = utility:Create("Frame", {Vector2.new(colorpicker_open_frame.Size.X-19,17), colorpicker_open_frame}, {
  4115. Size = utility:Size(0, 15, 1, transp and -40 or -21, colorpicker_open_frame),
  4116. Position = utility:Position(1, -19, 0, 17, colorpicker_open_frame),
  4117. Color = theme.outline
  4118. }, colorpicker.holder.drawings)
  4119. --
  4120. library.colors[colorpicker_open_huepicker_outline] = {
  4121. Color = "outline"
  4122. }
  4123. --
  4124. local colorpicker_open_huepicker_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_huepicker_outline}, {
  4125. Size = utility:Size(1, -2, 1, -2, colorpicker_open_huepicker_outline),
  4126. Position = utility:Position(0, 1, 0, 1, colorpicker_open_huepicker_outline),
  4127. Color = theme.inline
  4128. }, colorpicker.holder.drawings)
  4129. --
  4130. library.colors[colorpicker_open_huepicker_inline] = {
  4131. Color = "inline"
  4132. }
  4133. --
  4134. local colorpicker_open_huepicker_image = utility:Create("Image", {Vector2.new(1,1), colorpicker_open_huepicker_inline}, {
  4135. Size = utility:Size(1, -2, 1, -2, colorpicker_open_huepicker_inline),
  4136. Position = utility:Position(0, 1, 0 , 1, colorpicker_open_huepicker_inline),
  4137. }, colorpicker.holder.drawings);colorpicker.holder.huepicker = colorpicker_open_huepicker_image
  4138. --
  4139. local colorpicker_open_huepicker_cursor_outline = utility:Create("Frame", {Vector2.new(-3,(colorpicker_open_huepicker_image.Size.Y*colorpicker.current[1])-3), colorpicker_open_huepicker_image}, {
  4140. Size = utility:Size(1, 6, 0, 6, colorpicker_open_huepicker_image),
  4141. Position = utility:Position(0, -3, colorpicker.current[1], -3, colorpicker_open_huepicker_image),
  4142. Color = theme.outline
  4143. }, colorpicker.holder.drawings);colorpicker.holder.huepicker_cursor[1] = colorpicker_open_huepicker_cursor_outline
  4144. --
  4145. library.colors[colorpicker_open_huepicker_cursor_outline] = {
  4146. Color = "outline"
  4147. }
  4148. --
  4149. local colorpicker_open_huepicker_cursor_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_huepicker_cursor_outline}, {
  4150. Size = utility:Size(1, -2, 1, -2, colorpicker_open_huepicker_cursor_outline),
  4151. Position = utility:Position(0, 1, 0, 1, colorpicker_open_huepicker_cursor_outline),
  4152. Color = theme.textcolor
  4153. }, colorpicker.holder.drawings);colorpicker.holder.huepicker_cursor[2] = colorpicker_open_huepicker_cursor_inline
  4154. --
  4155. library.colors[colorpicker_open_huepicker_cursor_inline] = {
  4156. Color = "textcolor"
  4157. }
  4158. --
  4159. local colorpicker_open_huepicker_cursor_color = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_huepicker_cursor_inline}, {
  4160. Size = utility:Size(1, -2, 1, -2, colorpicker_open_huepicker_cursor_inline),
  4161. Position = utility:Position(0, 1, 0, 1, colorpicker_open_huepicker_cursor_inline),
  4162. Color = Color3.fromHSV(colorpicker.current[1], 1, 1)
  4163. }, colorpicker.holder.drawings);colorpicker.holder.huepicker_cursor[3] = colorpicker_open_huepicker_cursor_color
  4164. --
  4165. if transp then
  4166. local colorpicker_open_transparency_outline = utility:Create("Frame", {Vector2.new(4,colorpicker_open_frame.Size.Y-19), colorpicker_open_frame}, {
  4167. Size = utility:Size(1, -27, 0, 15, colorpicker_open_frame),
  4168. Position = utility:Position(0, 4, 1, -19, colorpicker_open_frame),
  4169. Color = theme.outline
  4170. }, colorpicker.holder.drawings)
  4171. --
  4172. library.colors[colorpicker_open_transparency_outline] = {
  4173. Color = "outline"
  4174. }
  4175. --
  4176. local colorpicker_open_transparency_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_transparency_outline}, {
  4177. Size = utility:Size(1, -2, 1, -2, colorpicker_open_transparency_outline),
  4178. Position = utility:Position(0, 1, 0, 1, colorpicker_open_transparency_outline),
  4179. Color = theme.inline
  4180. }, colorpicker.holder.drawings)
  4181. --
  4182. library.colors[colorpicker_open_transparency_inline] = {
  4183. Color = "inline"
  4184. }
  4185. --
  4186. local colorpicker_open_transparency_bg = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_transparency_inline}, {
  4187. Size = utility:Size(1, -2, 1, -2, colorpicker_open_transparency_inline),
  4188. Position = utility:Position(0, 1, 0, 1, colorpicker_open_transparency_inline),
  4189. Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  4190. }, colorpicker.holder.drawings);colorpicker.holder.transparencybg = colorpicker_open_transparency_bg
  4191. --
  4192. local colorpicker_open_transparency_image = utility:Create("Image", {Vector2.new(1,1), colorpicker_open_transparency_inline}, {
  4193. Size = utility:Size(1, -2, 1, -2, colorpicker_open_transparency_inline),
  4194. Position = utility:Position(0, 1, 0 , 1, colorpicker_open_transparency_inline),
  4195. }, colorpicker.holder.drawings);colorpicker.holder.transparency = colorpicker_open_transparency_image
  4196. --
  4197. local colorpicker_open_transparency_cursor_outline = utility:Create("Frame", {Vector2.new((colorpicker_open_transparency_image.Size.X*(1-colorpicker.current[4]))-3,-3), colorpicker_open_transparency_image}, {
  4198. Size = utility:Size(0, 6, 1, 6, colorpicker_open_transparency_image),
  4199. Position = utility:Position(1-colorpicker.current[4], -3, 0, -3, colorpicker_open_transparency_image),
  4200. Color = theme.outline
  4201. }, colorpicker.holder.drawings);colorpicker.holder.transparency_cursor[1] = colorpicker_open_transparency_cursor_outline
  4202. --
  4203. library.colors[colorpicker_open_transparency_cursor_outline] = {
  4204. Color = "outline"
  4205. }
  4206. --
  4207. local colorpicker_open_transparency_cursor_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_transparency_cursor_outline}, {
  4208. Size = utility:Size(1, -2, 1, -2, colorpicker_open_transparency_cursor_outline),
  4209. Position = utility:Position(0, 1, 0, 1, colorpicker_open_transparency_cursor_outline),
  4210. Color = theme.textcolor
  4211. }, colorpicker.holder.drawings);colorpicker.holder.transparency_cursor[2] = colorpicker_open_transparency_cursor_inline
  4212. --
  4213. library.colors[colorpicker_open_transparency_cursor_inline] = {
  4214. Color = "textcolor"
  4215. }
  4216. --
  4217. local colorpicker_open_transparency_cursor_color = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_transparency_cursor_inline}, {
  4218. Size = utility:Size(1, -2, 1, -2, colorpicker_open_transparency_cursor_inline),
  4219. Position = utility:Position(0, 1, 0, 1, colorpicker_open_transparency_cursor_inline),
  4220. Color = Color3.fromHSV(0, 0, 1 - colorpicker.current[4]),
  4221. }, colorpicker.holder.drawings);colorpicker.holder.transparency_cursor[3] = colorpicker_open_transparency_cursor_color
  4222. --
  4223. utility:LoadImage(colorpicker_open_transparency_image, "transp", "https://i.imgur.com/ncssKbH.png")
  4224. --utility:LoadImage(colorpicker_open_transparency_image, "transp", "https://i.imgur.com/VcMAYjL.png")
  4225. end
  4226. --
  4227. utility:LoadImage(colorpicker_open_picker_image, "valsat", "https://i.imgur.com/wpDRqVH.png")
  4228. --// utility:LoadImage(colorpicker_open_picker_cursor, "valsat_cursor", "https://raw.githubusercontent.com/mvonwalk/splix-assets/main/Images-cursor.png")
  4229. utility:LoadImage(colorpicker_open_huepicker_image, "hue", "https://i.imgur.com/iEOsHFv.png")
  4230. --
  4231. window.currentContent.frame = colorpicker_open_inline
  4232. window.currentContent.colorpicker = colorpicker
  4233. else
  4234. colorpicker.open = not colorpicker.open
  4235. --
  4236. for i,v in pairs(colorpicker.holder.drawings) do
  4237. utility:Remove(v)
  4238. end
  4239. --
  4240. colorpicker.holder.drawings = {}
  4241. colorpicker.holder.inline = nil
  4242. --
  4243. window.currentContent.frame = nil
  4244. window.currentContent.colorpicker = nil
  4245. end
  4246. else
  4247. if colorpicker.open then
  4248. colorpicker.open = not colorpicker.open
  4249. --
  4250. for i,v in pairs(colorpicker.holder.drawings) do
  4251. utility:Remove(v)
  4252. end
  4253. --
  4254. colorpicker.holder.drawings = {}
  4255. colorpicker.holder.inline = nil
  4256. --
  4257. window.currentContent.frame = nil
  4258. window.currentContent.colorpicker = nil
  4259. end
  4260. end
  4261. elseif Input.UserInputType == Enum.UserInputType.MouseButton1 and colorpicker.open then
  4262. colorpicker.open = not colorpicker.open
  4263. --
  4264. for i,v in pairs(colorpicker.holder.drawings) do
  4265. utility:Remove(v)
  4266. end
  4267. --
  4268. colorpicker.holder.drawings = {}
  4269. colorpicker.holder.inline = nil
  4270. --
  4271. window.currentContent.frame = nil
  4272. window.currentContent.colorpicker = nil
  4273. end
  4274. end
  4275. --
  4276. library.ended[#library.ended + 1] = function(Input)
  4277. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  4278. if colorpicker.holding.picker then
  4279. colorpicker.holding.picker = not colorpicker.holding.picker
  4280. end
  4281. if colorpicker.holding.huepicker then
  4282. colorpicker.holding.huepicker = not colorpicker.holding.huepicker
  4283. end
  4284. if colorpicker.holding.transparency then
  4285. colorpicker.holding.transparency = not colorpicker.holding.transparency
  4286. end
  4287. end
  4288. end
  4289. --
  4290. library.changed[#library.changed + 1] = function()
  4291. if colorpicker.open and colorpicker.holding.picker or colorpicker.holding.huepicker or colorpicker.holding.transparency then
  4292. if window.isVisible then
  4293. colorpicker:Refresh()
  4294. else
  4295. if colorpicker.holding.picker then
  4296. colorpicker.holding.picker = not colorpicker.holding.picker
  4297. end
  4298. if colorpicker.holding.huepicker then
  4299. colorpicker.holding.huepicker = not colorpicker.holding.huepicker
  4300. end
  4301. if colorpicker.holding.transparency then
  4302. colorpicker.holding.transparency = not colorpicker.holding.transparency
  4303. end
  4304. end
  4305. end
  4306. end
  4307. --
  4308. if pointer and tostring(pointer) ~= "" and tostring(pointer) ~= " " and not library.pointers[tostring(pointer)] then
  4309. library.pointers[tostring(pointer)] = colorpicker
  4310. end
  4311. --
  4312. toggle.addedAxis = toggle.addedAxis + 30 + 4 + 2
  4313. toggle.colorpickers = toggle.colorpickers + 1
  4314. --
  4315. return colorpicker, toggle
  4316. end
  4317. --
  4318. function toggle:Keybind(info)
  4319. local info = info or {}
  4320. local def = info.def or info.Def or info.default or info.Default or nil
  4321. local pointer = info.pointer or info.Pointer or info.flag or info.Flag or nil
  4322. local mode = info.mode or info.Mode or "Always"
  4323. local keybindname = info.keybindname or info.keybindName or info.KeybindName or info.Keybindname or nil
  4324. local callback = info.callback or info.callBack or info.Callback or info.CallBack or function()end
  4325. --
  4326. toggle.addedaxis = toggle.addedAxis + 40 + 4 + 2
  4327. --
  4328. local keybind = {keybindname = keybindname or name, axis = toggle.axis, current = {}, selecting = false, mode = mode, open = false, modemenu = {buttons = {}, drawings = {}}, active = false}
  4329. --
  4330. toggle.keybind = keybind
  4331. --
  4332. local allowedKeyCodes = {"Q","W","E","R","T","Y","U","I","O","P","A","S","D","F","G","H","J","K","L","Z","X","C","V","B","N","M","One","Two","Three","Four","Five","Six","Seveen","Eight","Nine","Zero", "Minus", "Equals","F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12","Insert","Tab","Home","End","LeftAlt","LeftControl","LeftShift","RightAlt","RightControl","RightShift","CapsLock"}
  4333. local allowedInputTypes = {"MouseButton1","MouseButton2","MouseButton3"}
  4334. local shortenedInputs = {["MouseButton1"] = "MB1", ["MouseButton2"] = "MB2", ["MouseButton3"] = "MB3", ["Insert"] = "Ins", ["Minus"] = "-", ["Equals"] = "=", ["LeftAlt"] = "LAlt", ["LeftControl"] = "LC", ["LeftShift"] = "LS", ["RightAlt"] = "RAlt", ["RightControl"] = "RC", ["RightShift"] = "RS", ["CapsLock"] = "Caps"}
  4335. --
  4336. local keybind_outline = utility:Create("Frame", {Vector2.new(section.section_frame.Size.X-(40+4),keybind.axis), section.section_frame}, {
  4337. Size = utility:Size(0, 40, 0, 17),
  4338. Position = utility:Position(1, -(40+4), 0, keybind.axis, section.section_frame),
  4339. Color = theme.outline,
  4340. Visible = page.open
  4341. }, section.visibleContent)
  4342. --
  4343. library.colors[keybind_outline] = {
  4344. Color = "outline"
  4345. }
  4346. --
  4347. local keybind_inline = utility:Create("Frame", {Vector2.new(1,1), keybind_outline}, {
  4348. Size = utility:Size(1, -2, 1, -2, keybind_outline),
  4349. Position = utility:Position(0, 1, 0, 1, keybind_outline),
  4350. Color = theme.inline,
  4351. Visible = page.open
  4352. }, section.visibleContent)
  4353. --
  4354. library.colors[keybind_inline] = {
  4355. Color = "inline"
  4356. }
  4357. --
  4358. local keybind_frame = utility:Create("Frame", {Vector2.new(1,1), keybind_inline}, {
  4359. Size = utility:Size(1, -2, 1, -2, keybind_inline),
  4360. Position = utility:Position(0, 1, 0, 1, keybind_inline),
  4361. Color = theme.lightcontrast,
  4362. Visible = page.open
  4363. }, section.visibleContent)
  4364. --
  4365. library.colors[keybind_frame] = {
  4366. Color = "lightcontrast"
  4367. }
  4368. --
  4369. local keybind__gradient = utility:Create("Image", {Vector2.new(0,0), keybind_frame}, {
  4370. Size = utility:Size(1, 0, 1, 0, keybind_frame),
  4371. Position = utility:Position(0, 0, 0 , 0, keybind_frame),
  4372. Transparency = 0.5,
  4373. Visible = page.open
  4374. }, section.visibleContent)
  4375. --
  4376. local keybind_value = utility:Create("TextLabel", {Vector2.new(keybind_outline.Size.X/2,1), keybind_outline}, {
  4377. Text = "...",
  4378. Size = theme.textsize,
  4379. Font = theme.font,
  4380. Color = theme.textcolor,
  4381. OutlineColor = theme.textborder,
  4382. Center = true,
  4383. Position = utility:Position(0.5, 0, 1, 0, keybind_outline),
  4384. Visible = page.open
  4385. }, section.visibleContent);keybind["keybind_value"] = keybind_value
  4386. --
  4387. library.colors[keybind_value] = {
  4388. OutlineColor = "textborder",
  4389. Color = "textcolor"
  4390. }
  4391. --
  4392. utility:LoadImage(keybind__gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")
  4393. --
  4394. function keybind:Shorten(string)
  4395. for i,v in pairs(shortenedInputs) do
  4396. string = string.gsub(string, i, v)
  4397. end
  4398. return string
  4399. end
  4400. --
  4401. function keybind:Change(input)
  4402. input = input or "..."
  4403. local inputTable = {}
  4404. --
  4405. if input.EnumType then
  4406. if input.EnumType == Enum.KeyCode or input.EnumType == Enum.UserInputType then
  4407. if Find(allowedKeyCodes, input.Name) or Find(allowedInputTypes, input.Name) then
  4408. inputTable = {input.EnumType == Enum.KeyCode and "KeyCode" or "UserInputType", input.Name}
  4409. --
  4410. keybind.current = inputTable
  4411. keybind_value.Text = #keybind.current > 0 and keybind:Shorten(keybind.current[2]) or "..."
  4412. --
  4413. return true
  4414. end
  4415. end
  4416. end
  4417. --
  4418. return false
  4419. end
  4420. --
  4421. function keybind:Get()
  4422. return keybind.current
  4423. end
  4424. --
  4425. function keybind:Set(tbl)
  4426. keybind.current = {tbl[1], tbl[2]}
  4427. keybind_value.Text = #keybind.current > 0 and keybind:Shorten(keybind.current[2]) or "..."
  4428.  
  4429. if tbl[3] then
  4430. keybind.mode = tbl[3]
  4431.  
  4432. if keybind.mode == "Toggle" then
  4433. keybind.active = not keybind.active or false
  4434. else
  4435. keybind.active = (keybind.mode == "Always" or keybind.mode == "Off Hold") and (toggle.current) or false
  4436. end
  4437.  
  4438. if keybind.mode == "Off Hold" then
  4439. window.keybindslist:Add(keybindname or name, keybind_value.Text)
  4440. else
  4441. window.keybindslist:Remove(keybindname or name)
  4442. end
  4443. end
  4444.  
  4445. if keybind.current[1] and keybind.current[2] then
  4446. callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active)
  4447. end
  4448. end
  4449. --
  4450. function keybind:Active()
  4451. return keybind.active
  4452. end
  4453. --
  4454. function keybind:Reset()
  4455. for i,v in pairs(keybind.modemenu.buttons) do
  4456. v.Color = v.Text == keybind.mode and theme.accent or theme.textcolor
  4457. --
  4458. library.colors[v] = {
  4459. Color = v.Text == keybind.mode and "accent" or "textcolor"
  4460. }
  4461. end
  4462. --
  4463. keybind.active = (keybind.mode == "Always" or keybind.mode == "Off Hold")
  4464. --
  4465. if keybind.mode == "Off Hold" then
  4466. window.keybindslist:Add(keybindname or name, keybind_value.Text)
  4467. else
  4468. window.keybindslist:Remove(keybindname or name)
  4469. end
  4470. --
  4471. if keybind.current[1] and keybind.current[2] then
  4472. callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active)
  4473. end
  4474. end
  4475. --
  4476. function keybind:Callback()
  4477. if keybind.current[1] and keybind.current[2] then
  4478. callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active)
  4479. end
  4480. end
  4481. --
  4482. keybind:Change(def)
  4483. --
  4484. library.began[#library.began + 1] = function(Input)
  4485. if keybind.current[1] and keybind.current[2] then
  4486. if Input.KeyCode == Enum[keybind.current[1]][keybind.current[2]] or Input.UserInputType == Enum[keybind.current[1]][keybind.current[2]] then
  4487. if keybind.mode == "On Hold" then
  4488. local old = keybind.active
  4489. keybind.active = toggle:Get()
  4490. if keybind.active then window.keybindslist:Add(keybindname or name, keybind_value.Text) else window.keybindslist:Remove(keybindname or name) end
  4491. if keybind.active ~= old then callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active) end
  4492. elseif keybind.mode == "Off Hold" then
  4493. local old = keybind.active
  4494. keybind.active = false
  4495. if keybind.active then window.keybindslist:Add(keybindname or name, keybind_value.Text) else window.keybindslist:Remove(keybindname or name) end
  4496. if keybind.active ~= old then callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active) end
  4497. elseif keybind.mode == "Toggle" then
  4498. local old = keybind.active
  4499. keybind.active = not keybind.active == true and toggle:Get() or false
  4500. if keybind.active then window.keybindslist:Add(keybindname or name, keybind_value.Text) else window.keybindslist:Remove(keybindname or name) end
  4501. if keybind.active ~= old then callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active) end
  4502. end
  4503. end
  4504. end
  4505. --
  4506. if keybind.selecting and window.isVisible then
  4507. local done = keybind:Change(Input.KeyCode.Name ~= "Unknown" and Input.KeyCode or Input.UserInputType)
  4508. if done then
  4509. keybind.selecting = false
  4510. keybind.active = (keybind.mode == "Always" or keybind.mode == "Off Hold") and true or false
  4511. keybind_frame.Color = theme.lightcontrast
  4512. --
  4513. library.colors[keybind_frame] = {
  4514. Color = "lightcontrast"
  4515. }
  4516. --
  4517. window.keybindslist:Remove(keybindname or name)
  4518. if keybind.active then window.keybindslist:Add(keybindname or name, keybind_value.Text) else window.keybindslist:Remove(keybindname or name) end
  4519. callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active)
  4520. end
  4521. end
  4522. --
  4523. if not window.isVisible and keybind.selecting then
  4524. keybind.selecting = false
  4525. keybind_frame.Color = theme.lightcontrast
  4526. --
  4527. library.colors[keybind_frame] = {
  4528. Color = "lightcontrast"
  4529. }
  4530. end
  4531. --
  4532. if Input.UserInputType == Enum.UserInputType.MouseButton1 and window.isVisible and keybind_outline.Visible then
  4533. if utility:MouseOverDrawing({section.section_frame.Position.X + (section.section_frame.Size.X - (40+4+2)), section.section_frame.Position.Y + keybind.axis, section.section_frame.Position.X + section.section_frame.Size.X, section.section_frame.Position.Y + keybind.axis + 17}) and not window:IsOverContent() and not keybind.selecting then
  4534. keybind.selecting = true
  4535. keybind_frame.Color = theme.darkcontrast
  4536. --
  4537. library.colors[keybind_frame] = {
  4538. Color = "darkcontrast"
  4539. }
  4540. end
  4541. if keybind.open and keybind.modemenu.frame then
  4542. if utility:MouseOverDrawing({keybind.modemenu.frame.Position.X, keybind.modemenu.frame.Position.Y, keybind.modemenu.frame.Position.X + keybind.modemenu.frame.Size.X, keybind.modemenu.frame.Position.Y + keybind.modemenu.frame.Size.Y}) then
  4543. local changed = false
  4544. --
  4545. for i,v in pairs(keybind.modemenu.buttons) do
  4546. if utility:MouseOverDrawing({keybind.modemenu.frame.Position.X, keybind.modemenu.frame.Position.Y + (15 * (i - 1)), keybind.modemenu.frame.Position.X + keybind.modemenu.frame.Size.X, keybind.modemenu.frame.Position.Y + (15 * (i - 1)) + 15}) then
  4547. keybind.mode = v.Text
  4548. changed = true
  4549. end
  4550. end
  4551. --
  4552. if changed then keybind:Reset() end
  4553. else
  4554. keybind.open = not keybind.open
  4555. --
  4556. for i,v in pairs(keybind.modemenu.drawings) do
  4557. utility:Remove(v)
  4558. end
  4559. --
  4560. keybind.modemenu.drawings = {}
  4561. keybind.modemenu.buttons = {}
  4562. keybind.modemenu.frame = nil
  4563. --
  4564. window.currentContent.frame = nil
  4565. window.currentContent.keybind = nil
  4566. end
  4567. end
  4568. end
  4569. --
  4570. if Input.UserInputType == Enum.UserInputType.MouseButton2 and window.isVisible and keybind_outline.Visible then
  4571. if utility:MouseOverDrawing({section.section_frame.Position.X + (section.section_frame.Size.X - (40+4+2)), section.section_frame.Position.Y + keybind.axis, section.section_frame.Position.X + section.section_frame.Size.X, section.section_frame.Position.Y + keybind.axis + 17}) and not window:IsOverContent() and not keybind.selecting then
  4572. window:CloseContent()
  4573. keybind.open = not keybind.open
  4574. --
  4575. local modemenu = utility:Create("Frame", {Vector2.new(keybind_outline.Size.X + 2,0), keybind_outline}, {
  4576. Size = utility:Size(0, 68, 0, 64),
  4577. Position = utility:Position(1, 2, 0, 0, keybind_outline),
  4578. Color = theme.outline,
  4579. Visible = page.open
  4580. }, keybind.modemenu.drawings);keybind.modemenu.frame = modemenu
  4581. --
  4582. library.colors[modemenu] = {
  4583. Color = "outline"
  4584. }
  4585. --
  4586. local modemenu_inline = utility:Create("Frame", {Vector2.new(1,1), modemenu}, {
  4587. Size = utility:Size(1, -2, 1, -2, modemenu),
  4588. Position = utility:Position(0, 1, 0, 1, modemenu),
  4589. Color = theme.inline,
  4590. Visible = page.open
  4591. }, keybind.modemenu.drawings)
  4592. --
  4593. library.colors[modemenu_inline] = {
  4594. Color = "inline"
  4595. }
  4596. --
  4597. local modemenu_frame = utility:Create("Frame", {Vector2.new(1,1), modemenu_inline}, {
  4598. Size = utility:Size(1, -2, 1, -2, modemenu_inline),
  4599. Position = utility:Position(0, 1, 0, 1, modemenu_inline),
  4600. Color = theme.lightcontrast,
  4601. Visible = page.open
  4602. }, keybind.modemenu.drawings)
  4603. --
  4604. library.colors[modemenu_frame] = {
  4605. Color = "lightcontrast"
  4606. }
  4607. --
  4608. local keybind__gradient = utility:Create("Image", {Vector2.new(0,0), modemenu_frame}, {
  4609. Size = utility:Size(1, 0, 1, 0, modemenu_frame),
  4610. Position = utility:Position(0, 0, 0 , 0, modemenu_frame),
  4611. Transparency = 0.5,
  4612. Visible = page.open
  4613. }, keybind.modemenu.drawings)
  4614. --
  4615. utility:LoadImage(keybind__gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")
  4616. --
  4617. for i,v in pairs({"Always", "Toggle", "On Hold", "Off Hold"}) do
  4618. local button_title = utility:Create("TextLabel", {Vector2.new(modemenu_frame.Size.X/2,15 * (i-1)), modemenu_frame}, {
  4619. Text = v,
  4620. Size = theme.textsize,
  4621. Font = theme.font,
  4622. Color = v == keybind.mode and theme.accent or theme.textcolor,
  4623. Center = true,
  4624. OutlineColor = theme.textborder,
  4625. Position = utility:Position(0.5, 0, 0, 15 * (i-1), modemenu_frame),
  4626. Visible = page.open
  4627. }, keybind.modemenu.drawings);keybind.modemenu.buttons[#keybind.modemenu.buttons + 1] = button_title
  4628. --
  4629. library.colors[button_title] = {
  4630. OutlineColor = "textborder",
  4631. Color = v == keybind.mode and "accent" or "textcolor"
  4632. }
  4633. end
  4634. --
  4635. window.currentContent.frame = modemenu
  4636. window.currentContent.keybind = keybind
  4637. end
  4638. end
  4639. end
  4640. --
  4641. library.ended[#library.ended + 1] = function(Input)
  4642. if keybind.mode == "On Hold" or keybind.mode == "Off Hold" then
  4643. if keybind.current[1] and keybind.current[2] then
  4644. if Input.KeyCode == Enum[keybind.current[1]][keybind.current[2]] or Input.UserInputType == Enum[keybind.current[1]][keybind.current[2]] then
  4645. if keybind.mode == "On Hold" and keybind.active then
  4646. keybind.active = false
  4647. window.keybindslist:Remove(keybindname or name)
  4648. callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active)
  4649. elseif keybind.mode == "Off Hold" and not keybind.active then
  4650. keybind.active = toggle:Get()
  4651. if keybind.active then window.keybindslist:Add(keybindname or name, keybind_value.Text) else window.keybindslist:Remove(keybindname or name) end
  4652. callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active)
  4653. end
  4654. end
  4655. end
  4656. end
  4657. end
  4658. --
  4659. if pointer and tostring(pointer) ~= "" and tostring(pointer) ~= " " and not library.pointers[tostring(pointer)] then
  4660. library.pointers[tostring(pointer)] = keybind
  4661. end
  4662. --
  4663. toggle.addedAxis = 40+4+2
  4664. --
  4665. return keybind
  4666. end
  4667. --
  4668. return toggle
  4669. end
  4670. --
  4671. function sections:Slider(info)
  4672. local info = info or {}
  4673. local name = info.name or info.Name or info.title or info.Title
  4674. local def = info.def or info.Def or info.default or info.Default or 10
  4675. local min = info.min or info.Min or info.minimum or info.Minimum or 0
  4676. local max = info.max or info.Max or info.maximum or info.Maximum or 100
  4677. local maxtext = info.maximumtext or info.Maximumtext or info.maximumText or info.MaximumText or max
  4678. local sub = info.suffix or info.Suffix or info.ending or info.Ending or info.prefix or info.Prefix or info.measurement or info.Measurement or ""
  4679. local disable = info.disable or info.Disable or info.disabled or info.disabled or false
  4680. local decimals = info.decimals or info.Decimals or 1
  4681. decimals = 1 / decimals
  4682. local pointer = info.pointer or info.Pointer or info.flag or info.Flag or nil
  4683. local callback = info.callback or info.callBack or info.Callback or info.CallBack or function()end
  4684. def = math.clamp(def, min, max)
  4685. --
  4686. local window = self.window
  4687. local page = self.page
  4688. local section = self
  4689. --
  4690. local slider = {min = min, max = max, Disabled = false, sub = sub, decimals = decimals, axis = section.currentAxis, current = -99999, holding = false}
  4691. --
  4692. if name then
  4693. local slider_title = utility:Create("TextLabel", {Vector2.new(4,slider.axis), section.section_frame}, {
  4694. Text = name,
  4695. Size = theme.textsize,
  4696. Font = theme.font,
  4697. Color = theme.textcolor,
  4698. OutlineColor = theme.textborder,
  4699. Position = utility:Position(0, 4, 0, slider.axis, section.section_frame),
  4700. Visible = page.open
  4701. }, section.visibleContent)
  4702. --
  4703. library.colors[slider_title] = {
  4704. OutlineColor = "textborder",
  4705. Color = "textcolor"
  4706. }
  4707. end
  4708. --
  4709. local slider_outline = utility:Create("Frame", {Vector2.new(4,slider.axis + (name and 15 or 0)), section.section_frame}, {
  4710. Size = utility:Size(1, -8, 0, 14, section.section_frame),
  4711. Position = utility:Position(0, 4, 0, slider.axis + (name and 15 or 0), section.section_frame),
  4712. Color = theme.outline,
  4713. Visible = page.open
  4714. }, section.visibleContent)
  4715. --
  4716. library.colors[slider_outline] = {
  4717. Color = "outline"
  4718. }
  4719. --
  4720. local slider_inline = utility:Create("Frame", {Vector2.new(1,1), slider_outline}, {
  4721. Size = utility:Size(1, -2, 1, -2, slider_outline),
  4722. Position = utility:Position(0, 1, 0, 1, slider_outline),
  4723. Color = theme.inline,
  4724. Visible = page.open
  4725. }, section.visibleContent)
  4726. --
  4727. library.colors[slider_inline] = {
  4728. Color = "inline"
  4729. }
  4730. --
  4731. local slider_frame = utility:Create("Frame", {Vector2.new(1,1), slider_inline}, {
  4732. Size = utility:Size(1, -2, 1, -2, slider_inline),
  4733. Position = utility:Position(0, 1, 0, 1, slider_inline),
  4734. Color = theme.lightcontrast,
  4735. Visible = page.open
  4736. }, section.visibleContent)
  4737. --
  4738. library.colors[slider_frame] = {
  4739. Color = "lightcontrast"
  4740. }
  4741. --
  4742. local slider_slide = utility:Create("Frame", {Vector2.new(1,1), slider_inline}, {
  4743. Size = utility:Size(0, (slider_frame.Size.X / (slider.max - slider.min) * (slider.current - slider.min)), 1, -2, slider_inline),
  4744. Position = utility:Position(0, 1, 0, 1, slider_inline),
  4745. Color = theme.accent,
  4746. Visible = page.open
  4747. }, section.visibleContent)
  4748. --
  4749. library.colors[slider_slide] = {
  4750. Color = "accent"
  4751. }
  4752. --
  4753. local slider__gradient = utility:Create("Image", {Vector2.new(0,0), slider_frame}, {
  4754. Size = utility:Size(1, 0, 1, 0, slider_frame),
  4755. Position = utility:Position(0, 0, 0 , 0, slider_frame),
  4756. Transparency = 0.5,
  4757. Visible = page.open
  4758. }, section.visibleContent)
  4759. --
  4760. local textBounds = utility:GetTextBounds(name, theme.textsize, theme.font)
  4761. local slider_value = utility:Create("TextLabel", {Vector2.new(slider_outline.Size.X/2,(slider_outline.Size.Y/2) - (textBounds.Y/2)), slider_outline}, {
  4762. Text = slider.current..slider.sub.."/"..maxtext..slider.sub,
  4763. Size = theme.textsize,
  4764. Font = theme.font,
  4765. Color = theme.textcolor,
  4766. Center = true,
  4767. OutlineColor = theme.textborder,
  4768. Position = utility:Position(0.5, 0, 0, (slider_outline.Size.Y/2) - (textBounds.Y/2), slider_outline),
  4769. Visible = page.open
  4770. }, section.visibleContent)
  4771. --
  4772. library.colors[slider_value] = {
  4773. OutlineColor = "textborder",
  4774. Color = "textcolor"
  4775. }
  4776. --
  4777. utility:LoadImage(slider__gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")
  4778. --
  4779. function slider:Set(value)
  4780. local oldval = slider.current
  4781. --
  4782. slider.current = math.clamp(math.round(value * slider.decimals) / slider.decimals, slider.min, slider.max)
  4783. --
  4784. if slider.current ~= oldval then
  4785. local disabledtext = disable and ((slider.current <= disable[2] or slider.current >= disable[3]) and disable[1])
  4786. local percent = 1 - ((slider.max - slider.current) / (slider.max - slider.min))
  4787. slider_value.Text = disabledtext or (slider.current..slider.sub.."/"..maxtext..slider.sub)
  4788. slider_slide.Size = utility:Size(0, percent * slider_frame.Size.X, 1, -2, slider_inline)
  4789. slider.Disabled = disabledtext ~= nil and disabledtext ~= false
  4790. callback(slider.current)
  4791. end
  4792. end
  4793. --
  4794. function slider:Refresh()
  4795. local mouseLocation = utility:MouseLocation()
  4796. local percent = math.clamp(mouseLocation.X - slider_slide.Position.X, 0, slider_frame.Size.X) / slider_frame.Size.X
  4797. local value = math.round((slider.min + (slider.max - slider.min) * percent) * slider.decimals) / slider.decimals
  4798. value = math.clamp(value, slider.min, slider.max)
  4799. slider:Set(value)
  4800. end
  4801. --
  4802. function slider:Get()
  4803. return slider.current
  4804. end
  4805. --
  4806. slider:Set(def)
  4807. --
  4808. library.began[#library.began + 1] = function(Input)
  4809. if Input.UserInputType == Enum.UserInputType.MouseButton1 and slider_outline.Visible and window.isVisible and page.open and utility:MouseOverDrawing({section.section_frame.Position.X, section.section_frame.Position.Y + slider.axis, section.section_frame.Position.X + section.section_frame.Size.X, section.section_frame.Position.Y + slider.axis + (name and 29 or 14)}) and not window:IsOverContent() then
  4810. slider.holding = true
  4811. slider:Refresh()
  4812. end
  4813. end
  4814. --
  4815. library.ended[#library.ended + 1] = function(Input)
  4816. if Input.UserInputType == Enum.UserInputType.MouseButton1 and slider.holding and window.isVisible then
  4817. slider.holding = false
  4818. end
  4819. end
  4820. --
  4821. library.changed[#library.changed + 1] = function(Input)
  4822. if slider.holding and window.isVisible then
  4823. slider:Refresh()
  4824. end
  4825. end
  4826. --
  4827. if pointer and tostring(pointer) ~= "" and tostring(pointer) ~= " " and not library.pointers[tostring(pointer)] then
  4828. library.pointers[tostring(pointer)] = slider
  4829. end
  4830. --
  4831. section.currentAxis = section.currentAxis + (name and 29 or 14) + 4
  4832. --
  4833. return slider
  4834. end
  4835. --
  4836. function sections:Button(info)
  4837. local info = info or {}
  4838. local name = info.name or info.Name or info.title or info.Title or "New Button"
  4839. local pointer = info.pointer or info.Pointer or info.flag or info.Flag or nil
  4840. local callback = info.callback or info.callBack or info.Callback or info.CallBack or function()end
  4841. --
  4842. local window = self.window
  4843. local page = self.page
  4844. local section = self
  4845. --
  4846. local button = {axis = section.currentAxis}
  4847. --
  4848. local button_outline = utility:Create("Frame", {Vector2.new(4,button.axis), section.section_frame}, {
  4849. Size = utility:Size(1, -8, 0, 20, section.section_frame),
  4850. Position = utility:Position(0, 4, 0, button.axis, section.section_frame),
  4851. Color = theme.outline,
  4852. Visible = page.open
  4853. }, section.visibleContent)
  4854. --
  4855. library.colors[button_outline] = {
  4856. Color = "outline"
  4857. }
  4858. --
  4859. local button_inline = utility:Create("Frame", {Vector2.new(1,1), button_outline}, {
  4860. Size = utility:Size(1, -2, 1, -2, button_outline),
  4861. Position = utility:Position(0, 1, 0, 1, button_outline),
  4862. Color = theme.inline,
  4863. Visible = page.open
  4864. }, section.visibleContent)
  4865. --
  4866. library.colors[button_inline] = {
  4867. Color = "inline"
  4868. }
  4869. --
  4870. local button_frame = utility:Create("Frame", {Vector2.new(1,1), button_inline}, {
  4871. Size = utility:Size(1, -2, 1, -2, button_inline),
  4872. Position = utility:Position(0, 1, 0, 1, button_inline),
  4873. Color = theme.lightcontrast,
  4874. Visible = page.open
  4875. }, section.visibleContent)
  4876. --
  4877. library.colors[button_frame] = {
  4878. Color = "lightcontrast"
  4879. }
  4880. --
  4881. local button_gradient = utility:Create("Image", {Vector2.new(0,0), button_frame}, {
  4882. Size = utility:Size(1, 0, 1, 0, button_frame),
  4883. Position = utility:Position(0, 0, 0 , 0, button_frame),
  4884. Transparency = 0.5,
  4885. Visible = page.open
  4886. }, section.visibleContent)
  4887. --
  4888. local button_title = utility:Create("TextLabel", {Vector2.new(button_frame.Size.X/2,1), button_frame}, {
  4889. Text = name,
  4890. Size = theme.textsize,
  4891. Font = theme.font,
  4892. Color = theme.textcolor,
  4893. OutlineColor = theme.textborder,
  4894. Center = true,
  4895. Position = utility:Position(0.5, 0, 0, 1, button_frame),
  4896. Visible = page.open
  4897. }, section.visibleContent)
  4898. --
  4899. library.colors[button_title] = {
  4900. OutlineColor = "textborder",
  4901. Color = "textcolor"
  4902. }
  4903. --
  4904. utility:LoadImage(button_gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")
  4905. --
  4906. library.began[#library.began + 1] = function(Input)
  4907. if Input.UserInputType == Enum.UserInputType.MouseButton1 and button_outline.Visible and window.isVisible and utility:MouseOverDrawing({section.section_frame.Position.X, section.section_frame.Position.Y + button.axis, section.section_frame.Position.X + section.section_frame.Size.X, section.section_frame.Position.Y + button.axis + 20}) and not window:IsOverContent() then
  4908. task.spawn(function()
  4909. utility:LoadImage(button_gradient, "gradientdown", "https://i.imgur.com/XYVD9Mh.png")
  4910. --
  4911. task.wait(0.15)
  4912. --
  4913. utility:LoadImage(button_gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")
  4914. end)
  4915. --
  4916. callback()
  4917. end
  4918. end
  4919. --
  4920. if pointer and tostring(pointer) ~= "" and tostring(pointer) ~= " " and not library.pointers[tostring(pointer)] then
  4921. library.pointers[tostring(pointer)] = button
  4922. end
  4923. --
  4924. section.currentAxis = section.currentAxis + 20 + 4
  4925. --
  4926. return button
  4927. end
  4928. --
  4929. function sections:TextBox(info)
  4930. local info = info or {}
  4931. local def = info.def or info.Def or info.default or info.Default or ""
  4932. local max = info.max or info.Max or info.maximum or info.Maximum or 200
  4933. local placeholder = info.placeholder or info.Placeholder or info.placeHolder or info.PlaceHolder
  4934. local pointer = info.pointer or info.Pointer or info.flag or info.Flag or nil
  4935. local reactive = info.reactive or info.Reactive;reactive = reactive == nil or reactive
  4936. local callback = info.callback or info.callBack or info.Callback or info.CallBack or function()end
  4937. local identifier = tostring(math.random(500, 500000)) .. "-" .. tostring(math.random(500, 500000)) .. "-" .. tostring(math.random(500, 500000))
  4938. --
  4939. local window = self.window
  4940. local page = self.page
  4941. local section = self
  4942. --
  4943. local textbox = {axis = section.currentAxis, max = max, current = def, oldenter = "", callback = callback}
  4944. --
  4945. local textbox_outline = utility:Create("Frame", {Vector2.new(4,textbox.axis), section.section_frame}, {
  4946. Size = utility:Size(1, -8, 0, 20, section.section_frame),
  4947. Position = utility:Position(0, 4, 0, textbox.axis, section.section_frame),
  4948. Color = theme.outline,
  4949. Visible = page.open
  4950. }, section.visibleContent)
  4951. --
  4952. library.colors[textbox_outline] = {
  4953. Color = "outline"
  4954. }
  4955. --
  4956. local textbox_inline = utility:Create("Frame", {Vector2.new(1,1), textbox_outline}, {
  4957. Size = utility:Size(1, -2, 1, -2, textbox_outline),
  4958. Position = utility:Position(0, 1, 0, 1, textbox_outline),
  4959. Color = theme.inline,
  4960. Visible = page.open
  4961. }, section.visibleContent)
  4962. --
  4963. library.colors[textbox_inline] = {
  4964. Color = "inline"
  4965. }
  4966. --
  4967. local textbox_inneroutline = utility:Create("Frame", {Vector2.new(1,1), textbox_inline}, {
  4968. Size = utility:Size(1, -2, 1, -2, textbox_inline),
  4969. Position = utility:Position(0, 1, 0, 1, textbox_inline),
  4970. Color = theme.outline,
  4971. Visible = page.open
  4972. }, section.visibleContent)
  4973. --
  4974. library.colors[textbox_inneroutline] = {
  4975. Color = "outline"
  4976. }
  4977. --
  4978. local textbox_frame = utility:Create("Frame", {Vector2.new(1,1), textbox_inneroutline}, {
  4979. Size = utility:Size(1, -2, 1, -2, textbox_inneroutline),
  4980. Position = utility:Position(0, 1, 0, 1, textbox_inneroutline),
  4981. Color = theme.lightcontrast,
  4982. Visible = page.open
  4983. }, section.visibleContent)
  4984. --
  4985. library.colors[textbox_frame] = {
  4986. Color = "lightcontrast"
  4987. }
  4988. --
  4989. local textbox_gradient = utility:Create("Image", {Vector2.new(0,0), textbox_frame}, {
  4990. Size = utility:Size(1, 0, 1, 0, textbox_frame),
  4991. Position = utility:Position(0, 0, 0 , 0, textbox_frame),
  4992. Transparency = 0.5,
  4993. Visible = page.open
  4994. }, section.visibleContent)
  4995. --
  4996. local textbox_value = utility:Create("TextLabel", {Vector2.new(textbox_frame.Size.X/2,0), textbox_frame}, {
  4997. Text = textbox.current == "" and placeholder or textbox.current,
  4998. Size = theme.textsize,
  4999. Font = theme.font,
  5000. Color = textbox.current == "" and (placeholder and theme.textdark) or theme.textcolor,
  5001. OutlineColor = theme.textborder,
  5002. Center = true,
  5003. Position = utility:Position(0.5, 0, 0, 0, textbox_frame),
  5004. Visible = page.open
  5005. }, section.visibleContent)
  5006. --
  5007. library.colors[textbox_value] = {
  5008. OutlineColor = "textborder",
  5009. Color = textbox.current == "" and (placeholder and "textdark") or "textcolor"
  5010. }
  5011. --
  5012. utility:LoadImage(textbox_gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")
  5013. --
  5014. function textbox:Get()
  5015. return textbox.current
  5016. end
  5017. --
  5018. function textbox:Set(state, first)
  5019. textbox.current = state or ""
  5020. --
  5021. local newtext = utility:WrapText(textbox.current == "" and placeholder or textbox.current, textbox_frame.Size.X - 30)
  5022. textbox_value.Text = (textbox.current == "" and placeholder or textbox.current) ~= newtext and (newtext .. "...") or newtext
  5023. textbox_value.Color = textbox.current == "" and (placeholder and theme.textdark) or theme.textcolor
  5024. --
  5025. library.colors[textbox_value] = {
  5026. OutlineColor = "textborder",
  5027. Color = textbox.current == "" and (placeholder and "textdark") or "textcolor"
  5028. }
  5029. --
  5030. if not first then
  5031. callback(textbox.current)
  5032. end
  5033. end
  5034. --
  5035. textbox:Set(textbox.current, true)
  5036. --
  5037. library.began[#library.began + 1] = function(Input)
  5038. if Input.UserInputType == Enum.UserInputType.MouseButton1 and textbox_outline.Visible and window.isVisible then
  5039. if reactive and utility:MouseOverDrawing({section.section_frame.Position.X, section.section_frame.Position.Y + textbox.axis, section.section_frame.Position.X + section.section_frame.Size.X, section.section_frame.Position.Y + textbox.axis + 20}) and not window:IsOverContent() then
  5040. task.spawn(function()
  5041. utility:LoadImage(textbox_gradient, "gradientdown", "https://i.imgur.com/XYVD9Mh.png")
  5042. --
  5043. task.wait(0.15)
  5044. --
  5045. utility:LoadImage(textbox_gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")
  5046. end)
  5047. --
  5048. if not (window.currentContent.textbox and window.currentContent.textbox.Name == identifier) then
  5049. window:CloseContent()
  5050. --
  5051. textbox_value.Color = theme.accent
  5052. --
  5053. library.colors[textbox_value] = {
  5054. OutlineColor = "textborder",
  5055. Color = "accent"
  5056. }
  5057. --
  5058. cas:BindActionAtPriority("DisableKeyboard", function() return Enum.ContextActionResult.Sink end, false, 3000, Enum.UserInputType.Keyboard)
  5059. --
  5060. window.currentContent.textbox = {
  5061. Name = identifier,
  5062. Item = textbox,
  5063. Fire = function(Text)
  5064. textbox.current = (Text == "Backspace" and textbox.current:sub(0, #textbox.current - 1) or (textbox.current .. Text)):sub(0, textbox.max)
  5065. --
  5066. local newtext = utility:WrapText(textbox.current == "" and placeholder or textbox.current, textbox_frame.Size.X - 30)
  5067. textbox_value.Text = (textbox.current == "" and placeholder or textbox.current) ~= newtext and (newtext .. "...") or newtext
  5068. textbox.callback(textbox.current)
  5069. end,
  5070. Disconnect = function()
  5071. cas:UnbindAction('DisableKeyboard')
  5072. --
  5073. textbox_value.Color = textbox.current == "" and (placeholder and theme.textdark) or theme.textcolor
  5074. --
  5075. library.colors[textbox_value] = {
  5076. OutlineColor = "textborder",
  5077. Color = textbox.current == "" and (placeholder and "textdark") or "textcolor"
  5078. }
  5079. end
  5080. }
  5081. else
  5082. if window.currentContent.textbox.Name == identifier then
  5083. window:CloseContent()
  5084. end
  5085. end
  5086. elseif reactive then
  5087. if window.currentContent.textbox and window.currentContent.textbox.Name == identifier then
  5088. window:CloseContent()
  5089. end
  5090. end
  5091. --
  5092. if uis:IsKeyDown(Enum.KeyCode.LeftControl) and utility:MouseOverDrawing({section.section_frame.Position.X, section.section_frame.Position.Y + textbox.axis, section.section_frame.Position.X + section.section_frame.Size.X, section.section_frame.Position.Y + textbox.axis + 20}) and not window:IsOverContent() then
  5093. task.spawn(function()
  5094. textbox_value.Color = theme.accent
  5095. --
  5096. library.colors[textbox_value] = {
  5097. OutlineColor = "textborder",
  5098. Color = "accent"
  5099. }
  5100. --
  5101. utility:LoadImage(textbox_gradient, "gradientdown", "https://i.imgur.com/XYVD9Mh.png")
  5102. --
  5103. task.wait(0.15)
  5104. --
  5105. textbox_value.Color = textbox.current == "" and (placeholder and theme.textdark) or theme.textcolor
  5106. --
  5107. library.colors[textbox_value] = {
  5108. OutlineColor = "textborder",
  5109. Color = textbox.current == "" and (placeholder and "textdark") or "textcolor"
  5110. }
  5111. --
  5112. utility:LoadImage(textbox_gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")
  5113. end)
  5114. --
  5115. setclipboard(textbox.current)
  5116. end
  5117. elseif Input.KeyCode and Input.KeyCode == Enum.KeyCode.Return then
  5118. if window.currentContent.textbox and window.currentContent.textbox.Name == identifier then
  5119. window:CloseContent()
  5120. end
  5121. end
  5122. end
  5123. --
  5124. if pointer and tostring(pointer) ~= "" and tostring(pointer) ~= " " and not library.pointers[tostring(pointer)] then
  5125. library.pointers[tostring(pointer)] = textbox
  5126. end
  5127. --
  5128. section.currentAxis = section.currentAxis + 20 + 4
  5129. --
  5130. return textbox
  5131. end
  5132. --
  5133. function sections:ButtonHolder(info)
  5134. local info = info or {}
  5135. local buttons = info.buttons or info.Buttons or {}
  5136. --
  5137. local window = self.window
  5138. local page = self.page
  5139. local section = self
  5140. --
  5141. local buttonHolder = {buttons = {}}
  5142. --
  5143. for i=1, 2 do
  5144. local button = {axis = section.currentAxis}
  5145. --
  5146. local button_outline = utility:Create("Frame", {Vector2.new(i == 2 and ((section.section_frame.Size.X / 2) + 2) or 4,button.axis), section.section_frame}, {
  5147. Size = utility:Size(0.5, -6, 0, 20, section.section_frame),
  5148. Position = utility:Position(0, i == 2 and 2 or 4, 0, button.axis, section.section_frame),
  5149. Color = theme.outline,
  5150. Visible = page.open
  5151. }, section.visibleContent)
  5152. --
  5153. library.colors[button_outline] = {
  5154. Color = "outline"
  5155. }
  5156. --
  5157. local button_inline = utility:Create("Frame", {Vector2.new(1,1), button_outline}, {
  5158. Size = utility:Size(1, -2, 1, -2, button_outline),
  5159. Position = utility:Position(0, 1, 0, 1, button_outline),
  5160. Color = theme.inline,
  5161. Visible = page.open
  5162. }, section.visibleContent)
  5163. --
  5164. library.colors[button_inline] = {
  5165. Color = "inline"
  5166. }
  5167. --
  5168. local button_frame = utility:Create("Frame", {Vector2.new(1,1), button_inline}, {
  5169. Size = utility:Size(1, -2, 1, -2, button_inline),
  5170. Position = utility:Position(0, 1, 0, 1, button_inline),
  5171. Color = theme.lightcontrast,
  5172. Visible = page.open
  5173. }, section.visibleContent)
  5174. --
  5175. library.colors[button_frame] = {
  5176. Color = "lightcontrast"
  5177. }
  5178. --
  5179. local button_gradient = utility:Create("Image", {Vector2.new(0,0), button_frame}, {
  5180. Size = utility:Size(1, 0, 1, 0, button_frame),
  5181. Position = utility:Position(0, 0, 0 , 0, button_frame),
  5182. Transparency = 0.5,
  5183. Visible = page.open
  5184. }, section.visibleContent)
  5185. --
  5186. local button_title = utility:Create("TextLabel", {Vector2.new(button_frame.Size.X/2,1), button_frame}, {
  5187. Text = buttons[i][1],
  5188. Size = theme.textsize,
  5189. Font = theme.font,
  5190. Color = theme.textcolor,
  5191. OutlineColor = theme.textborder,
  5192. Center = true,
  5193. Position = utility:Position(0.5, 0, 0, 1, button_frame),
  5194. Visible = page.open
  5195. }, section.visibleContent)
  5196. --
  5197. library.colors[button_title] = {
  5198. OutlineColor = "textborder",
  5199. Color = "textcolor"
  5200. }
  5201. --
  5202. utility:LoadImage(button_gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")
  5203. --
  5204. library.began[#library.began + 1] = function(Input)
  5205. if Input.UserInputType == Enum.UserInputType.MouseButton1 and button_outline.Visible and window.isVisible and utility:MouseOverDrawing({section.section_frame.Position.X + (i == 2 and (section.section_frame.Size.X/2) or 0), section.section_frame.Position.Y + button.axis, section.section_frame.Position.X + section.section_frame.Size.X - (i == 1 and (section.section_frame.Size.X/2) or 0), section.section_frame.Position.Y + button.axis + 20}) and not window:IsOverContent() then
  5206. task.spawn(function()
  5207. utility:LoadImage(button_gradient, "gradientdown", "https://i.imgur.com/XYVD9Mh.png")
  5208. --
  5209. task.wait(0.15)
  5210. --
  5211. utility:LoadImage(button_gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")
  5212. end)
  5213. --
  5214. buttons[i][2]()
  5215. end
  5216. end
  5217. end
  5218. --
  5219. section.currentAxis = section.currentAxis + 20 + 4
  5220. end
  5221. --
  5222. function sections:Dropdown(info)
  5223. local info = info or {}
  5224. local name = info.name or info.Name or info.title or info.Title
  5225. local max = info.max or info.Max
  5226. local options = info.options or info.Options or {"1", "2", "3"}
  5227. local def = info.def or info.Def or info.default or info.Default or options[1]
  5228. local pointer = info.pointer or info.Pointer or info.flag or info.Flag or nil
  5229. local callback = info.callback or info.callBack or info.Callback or info.CallBack or function()end
  5230. --
  5231. local window = self.window
  5232. local page = self.page
  5233. local section = self
  5234. --
  5235. local dropdown = {open = false, scrollindex = max and 0, scrolling = max and {false, nil}, current = tostring(def), options = options, holder = {buttons = {}, drawings = {}}, axis = section.currentAxis}
  5236. --
  5237. local dropdown_outline = utility:Create("Frame", {Vector2.new(4,name and (dropdown.axis + 15) or dropdown.axis), section.section_frame}, {
  5238. Size = utility:Size(1, -8, 0, 20, section.section_frame),
  5239. Position = utility:Position(0, 4, 0, name and (dropdown.axis + 15) or dropdown.axis, section.section_frame),
  5240. Color = theme.outline,
  5241. Visible = page.open
  5242. }, section.visibleContent)
  5243. --
  5244. library.colors[dropdown_outline] = {
  5245. Color = "outline"
  5246. }
  5247. --
  5248. local dropdown_inline = utility:Create("Frame", {Vector2.new(1,1), dropdown_outline}, {
  5249. Size = utility:Size(1, -2, 1, -2, dropdown_outline),
  5250. Position = utility:Position(0, 1, 0, 1, dropdown_outline),
  5251. Color = theme.inline,
  5252. Visible = page.open
  5253. }, section.visibleContent)
  5254. --
  5255. library.colors[dropdown_inline] = {
  5256. Color = "inline"
  5257. }
  5258. --
  5259. local dropdown_frame = utility:Create("Frame", {Vector2.new(1,1), dropdown_inline}, {
  5260. Size = utility:Size(1, -2, 1, -2, dropdown_inline),
  5261. Position = utility:Position(0, 1, 0, 1, dropdown_inline),
  5262. Color = theme.lightcontrast,
  5263. Visible = page.open
  5264. }, section.visibleContent)
  5265. --
  5266. library.colors[dropdown_frame] = {
  5267. Color = "lightcontrast"
  5268. }
  5269. --
  5270. if name then
  5271. local dropdown_title = utility:Create("TextLabel", {Vector2.new(4,dropdown.axis), section.section_frame}, {
  5272. Text = name,
  5273. Size = theme.textsize,
  5274. Font = theme.font,
  5275. Color = theme.textcolor,
  5276. OutlineColor = theme.textborder,
  5277. Position = utility:Position(0, 4, 0, dropdown.axis, section.section_frame),
  5278. Visible = page.open
  5279. }, section.visibleContent)
  5280. --
  5281. library.colors[dropdown_title] = {
  5282. OutlineColor = "textborder",
  5283. Color = "textcolor"
  5284. }
  5285. end
  5286. --
  5287. local dropdown__gradient = utility:Create("Image", {Vector2.new(0,0), dropdown_frame}, {
  5288. Size = utility:Size(1, 0, 1, 0, dropdown_frame),
  5289. Position = utility:Position(0, 0, 0 , 0, dropdown_frame),
  5290. Transparency = 0.5,
  5291. Visible = page.open
  5292. }, section.visibleContent)
  5293. --
  5294. local dropdown_value = utility:Create("TextLabel", {Vector2.new(3,dropdown_frame.Size.Y/2 - 7), dropdown_frame}, {
  5295. Text = dropdown.current,
  5296. Size = theme.textsize,
  5297. Font = theme.font,
  5298. Color = theme.textcolor,
  5299. OutlineColor = theme.textborder,
  5300. Position = utility:Position(0, 3, 0, (dropdown_frame.Size.Y/2) - 7, dropdown_frame),
  5301. Visible = page.open
  5302. }, section.visibleContent)
  5303. --
  5304. library.colors[dropdown_value] = {
  5305. OutlineColor = "textborder",
  5306. Color = "textcolor"
  5307. }
  5308. --
  5309. local dropdown_image = utility:Create("Image", {Vector2.new(dropdown_frame.Size.X - 15,dropdown_frame.Size.Y/2 - 3), dropdown_frame}, {
  5310. Size = utility:Size(0, 9, 0, 6, dropdown_frame),
  5311. Position = utility:Position(1, -15, 0.5, -3, dropdown_frame),
  5312. Visible = page.open
  5313. }, section.visibleContent);dropdown["dropdown_image"] = dropdown_image
  5314. --
  5315. utility:LoadImage(dropdown_image, "arrow_down", "https://i.imgur.com/tVqy0nL.png")
  5316. utility:LoadImage(dropdown__gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")
  5317. --
  5318. if max then
  5319. local lastupdate = dropdown.scrollindex
  5320. --
  5321. function dropdown:UpdateScroll()
  5322. if dropdown.scrollindex ~= lastupdate then
  5323. if max and dropdown.bar and dropdown.scroll then
  5324. lastupdate = dropdown.scrollindex
  5325. --
  5326. if (#dropdown.options - max) > 0 then
  5327. dropdown.bar.Size = utility:Size(1, 0, (max / #dropdown.options), 0, dropdown.scroll)
  5328. dropdown.bar.Position = utility:Position(0, 0, 0, (((dropdown.scroll.Size.Y - dropdown.bar.Size.Y) / (#dropdown.options - max)) * dropdown.scrollindex), dropdown.scroll)
  5329. utility:UpdateTransparency(dropdown.bar, 1)
  5330. utility:UpdateOffset(dropdown.bar, {Vector2.new(1, (((dropdown.scroll.Size.Y - dropdown.bar.Size.Y) / (#dropdown.options - max)) * dropdown.scrollindex)), dropdown.scroll})
  5331. else
  5332. dropdown.scrollindex = 0
  5333. dropdown.bar.Transparency = 0
  5334. utility:UpdateTransparency(dropdown.bar, 0)
  5335. end
  5336. --
  5337. dropdown:Update()
  5338. end
  5339. end
  5340. end
  5341. end
  5342. --
  5343. function dropdown:Update()
  5344. if dropdown.open and dropdown.holder.inline then
  5345. for i,v in pairs(dropdown.holder.buttons) do
  5346. local value = max and dropdown.options[i + dropdown.scrollindex] or dropdown.options[i]
  5347. --
  5348. v[1].Text = value
  5349. v[1].Color = value == tostring(dropdown.current) and theme.accent or theme.textcolor
  5350. v[1].Position = utility:Position(0, value == tostring(dropdown.current) and 8 or 6, 0, 2, v[2])
  5351. library.colors[v[1]] = {
  5352. Color = v[1].Text == tostring(dropdown.current) and "accent" or "textcolor"
  5353. }
  5354. utility:UpdateOffset(v[1], {Vector2.new(v[1].Text == tostring(dropdown.current) and 8 or 6, 2), v[2]})
  5355. end
  5356. end
  5357. end
  5358. --
  5359. function dropdown:Set(value)
  5360. if typeof(value) == "string" and Find(dropdown.options, value) then
  5361. dropdown.current = value
  5362. dropdown_value.Text = value
  5363. callback(value)
  5364. end
  5365. end
  5366. --
  5367. function dropdown:Get()
  5368. return dropdown.current
  5369. end
  5370. --
  5371. library.began[#library.began + 1] = function(Input)
  5372. if Input.UserInputType == Enum.UserInputType.MouseButton1 and window.isVisible and dropdown_outline.Visible then
  5373. if dropdown.open and dropdown.holder.inline and utility:MouseOverDrawing({dropdown.holder.inline.Position.X, dropdown.holder.inline.Position.Y, dropdown.holder.inline.Position.X + dropdown.holder.inline.Size.X, dropdown.holder.inline.Position.Y + dropdown.holder.inline.Size.Y}) then
  5374. if max and dropdown.bar and utility:MouseOverDrawing({dropdown.bar.Position.X - 1, dropdown.bar.Position.Y - 1, dropdown.bar.Position.X - 1 + dropdown.bar.Size.X + 2, dropdown.bar.Position.Y - 1 + dropdown.bar.Size.Y + 2}) then
  5375. dropdown.scrolling = {true, (utility:MouseLocation().Y - dropdown.bar.Position.Y)}
  5376. else
  5377. for i,v in pairs(dropdown.holder.buttons) do
  5378. local value = max and dropdown.options[(i + dropdown.scrollindex)] or dropdown.options[i]
  5379. --
  5380. if utility:MouseOverDrawing({v[2].Position.X, v[2].Position.Y, v[2].Position.X + v[2].Size.X, v[2].Position.Y + v[2].Size.Y}) and v[1].Text ~= dropdown.current then
  5381. dropdown.current = value
  5382. dropdown_value.Text = dropdown.current
  5383. callback(value)
  5384. dropdown:Update()
  5385. end
  5386. end
  5387. end
  5388. elseif utility:MouseOverDrawing({section.section_frame.Position.X, section.section_frame.Position.Y + dropdown.axis, section.section_frame.Position.X + section.section_frame.Size.X, section.section_frame.Position.Y + dropdown.axis + (name and (15 + 20) or (20))}) and not window:IsOverContent() then
  5389. task.spawn(function()
  5390. utility:LoadImage(dropdown__gradient, "gradientdown", "https://i.imgur.com/XYVD9Mh.png")
  5391. --
  5392. task.wait(0.15)
  5393. --
  5394. utility:LoadImage(dropdown__gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")
  5395. end)
  5396. --
  5397. if not dropdown.open then
  5398. window:CloseContent()
  5399. dropdown.open = not dropdown.open
  5400. utility:LoadImage(dropdown_image, "arrow_up", "https://i.imgur.com/SL9cbQp.png")
  5401. --
  5402. local dropdown_open_outline = utility:Create("Frame", {Vector2.new(0,19), dropdown_outline}, {
  5403. Size = utility:Size(1, 0, 0, 3 + ((max and max or #dropdown.options) * 19), dropdown_outline),
  5404. Position = utility:Position(0, 0, 0, 19, dropdown_outline),
  5405. Color = theme.outline,
  5406. Visible = page.open
  5407. }, dropdown.holder.drawings);dropdown.holder.outline = dropdown_open_outline
  5408. --
  5409. library.colors[dropdown_open_outline] = {
  5410. Color = "outline"
  5411. }
  5412. --
  5413. local dropdown_open_inline = utility:Create("Frame", {Vector2.new(1,1), dropdown_open_outline}, {
  5414. Size = utility:Size(1, -2, 1, -2, dropdown_open_outline),
  5415. Position = utility:Position(0, 1, 0, 1, dropdown_open_outline),
  5416. Color = theme.inline,
  5417. Visible = page.open
  5418. }, dropdown.holder.drawings);dropdown.holder.inline = dropdown_open_inline
  5419. --
  5420. library.colors[dropdown_open_inline] = {
  5421. Color = "inline"
  5422. }
  5423. --
  5424. if max then
  5425. local dropdown_open_scroll = utility:Create("Frame", {Vector2.new(dropdown_open_inline.Size.X - 5,1), dropdown_open_inline}, {
  5426. Size = utility:Size(0, 4, 1, -2, dropdown_open_inline),
  5427. Position = utility:Position(1, -5, 0, 1, dropdown_open_inline),
  5428. Color = theme.darkcontrast,
  5429. Visible = page.open
  5430. }, dropdown.holder.drawings);dropdown.scroll = dropdown_open_scroll
  5431. --
  5432. library.colors[dropdown_open_scroll] = {
  5433. Color = "darkcontrast"
  5434. }
  5435. --
  5436. local dropdown_open_bar = utility:Create("Frame", {Vector2.new(0, (((dropdown_open_scroll.Size.Y - ((max / #dropdown.options) * dropdown_open_scroll.Size.Y)) / (#dropdown.options - max)) * dropdown.scrollindex)), dropdown_open_scroll}, {
  5437. Size = utility:Size(1, 0, (max / #dropdown.options), 0, dropdown_open_scroll),
  5438. Position = utility:Position(0, 0, 0, (((dropdown_open_scroll.Size.Y - ((max / #dropdown.options) * dropdown_open_scroll.Size.Y)) / (#dropdown.options - max)) * dropdown.scrollindex), dropdown_open_scroll),
  5439. Color = theme.accent,
  5440. Visible = page.open
  5441. }, dropdown.holder.drawings);dropdown.bar = dropdown_open_bar
  5442. --
  5443. library.colors[dropdown_open_bar] = {
  5444. Color = "accent"
  5445. }
  5446. end
  5447. --
  5448. for Index = 1, (max and max or #dropdown.options) do
  5449. local Value = max and dropdown.options[Index + dropdown.scrollindex] or dropdown.options[Index]
  5450. --
  5451. if Value then
  5452. local dropdown_value_frame = utility:Create("Frame", {Vector2.new(1,1 + (19 * (Index-1))), dropdown_open_inline}, {
  5453. Size = utility:Size(1, -(max and 7 or 2), 0, 18, dropdown_open_inline),
  5454. Position = utility:Position(0, 1, 0, 1 + (19 * (Index-1)), dropdown_open_inline),
  5455. Color = theme.lightcontrast,
  5456. Visible = page.open
  5457. }, dropdown.holder.drawings)
  5458. --
  5459. library.colors[dropdown_value_frame] = {
  5460. Color = "lightcontrast"
  5461. }
  5462. --
  5463. local dropdown_value = utility:Create("TextLabel", {Vector2.new(Value == tostring(dropdown.current) and 8 or 6,2), dropdown_value_frame}, {
  5464. Text = Value,
  5465. Size = theme.textsize,
  5466. Font = theme.font,
  5467. Color = Value == tostring(dropdown.current) and theme.accent or theme.textcolor,
  5468. OutlineColor = theme.textborder,
  5469. Position = utility:Position(0, Value == tostring(dropdown.current) and 8 or 6, 0, 2, dropdown_value_frame),
  5470. Visible = page.open
  5471. }, dropdown.holder.drawings)
  5472. --
  5473. dropdown.holder.buttons[#dropdown.holder.buttons + 1] = {dropdown_value, dropdown_value_frame}
  5474. --
  5475. library.colors[dropdown_value] = {
  5476. OutlineColor = "textborder",
  5477. Color = Value == tostring(dropdown.current) and "accent" or "textcolor"
  5478. }
  5479. end
  5480. end
  5481. --
  5482. window.currentContent.frame = dropdown_open_inline
  5483. window.currentContent.dropdown = dropdown
  5484. else
  5485. dropdown.open = not dropdown.open
  5486. utility:LoadImage(dropdown_image, "arrow_down", "https://i.imgur.com/tVqy0nL.png")
  5487. --
  5488. for i,v in pairs(dropdown.holder.drawings) do
  5489. utility:Remove(v)
  5490. end
  5491. --
  5492. dropdown.holder.drawings = {}
  5493. dropdown.holder.buttons = {}
  5494. dropdown.holder.inline = nil
  5495. --
  5496. window.currentContent.frame = nil
  5497. window.currentContent.dropdown = nil
  5498. end
  5499. else
  5500. if dropdown.open then
  5501. dropdown.open = not dropdown.open
  5502. utility:LoadImage(dropdown_image, "arrow_down", "https://i.imgur.com/tVqy0nL.png")
  5503. --
  5504. for i,v in pairs(dropdown.holder.drawings) do
  5505. utility:Remove(v)
  5506. end
  5507. --
  5508. dropdown.holder.drawings = {}
  5509. dropdown.holder.buttons = {}
  5510. dropdown.holder.inline = nil
  5511. --
  5512. window.currentContent.frame = nil
  5513. window.currentContent.dropdown = nil
  5514. end
  5515. end
  5516. elseif Input.UserInputType == Enum.UserInputType.MouseButton1 and dropdown.open then
  5517. dropdown.open = not dropdown.open
  5518. utility:LoadImage(dropdown_image, "arrow_down", "https://i.imgur.com/tVqy0nL.png")
  5519. --
  5520. for i,v in pairs(dropdown.holder.drawings) do
  5521. utility:Remove(v)
  5522. end
  5523. --
  5524. dropdown.holder.drawings = {}
  5525. dropdown.holder.buttons = {}
  5526. dropdown.holder.inline = nil
  5527. --
  5528. window.currentContent.frame = nil
  5529. window.currentContent.dropdown = nil
  5530. end
  5531. end
  5532. --
  5533. if max then
  5534. library.ended[#library.ended + 1] = function(Input)
  5535. if dropdown.scrolling and dropdown.scrolling[1] and Input.UserInputType == Enum.UserInputType.MouseButton1 then
  5536. dropdown.scrolling = {false, nil}
  5537. end
  5538. end
  5539. --
  5540. library.changed[#library.changed + 1] = function(Input)
  5541. if dropdown.scrolling and dropdown.scrolling[1] then
  5542. local MouseLocation = utility:MouseLocation()
  5543. local Position = math.clamp((MouseLocation.Y - dropdown.scroll.Position.Y - dropdown.scrolling[2]), 0, ((dropdown.scroll.Size.Y - dropdown.bar.Size.Y)))
  5544. --
  5545. dropdown.scrollindex = math.round((((Position + dropdown.scroll.Position.Y) - dropdown.scroll.Position.Y) / ((dropdown.scroll.Size.Y - dropdown.bar.Size.Y))) * (#dropdown.options - max))
  5546. dropdown:UpdateScroll()
  5547. end
  5548. end
  5549. --
  5550. utility:Connection(mouse.WheelForward,function()
  5551. if page.open and dropdown.open and dropdown.bar and dropdown.bar.Visible and utility:MouseOverDrawing({dropdown.holder.inline.Position.X, dropdown.holder.inline.Position.Y, dropdown.holder.inline.Position.X + dropdown.holder.inline.Size.X, dropdown.holder.inline.Position.Y + dropdown.holder.inline.Size.Y}) then
  5552. dropdown.scrollindex = math.clamp(dropdown.scrollindex - 1, 0, #dropdown.options - max)
  5553. dropdown:UpdateScroll()
  5554. end
  5555. end)
  5556. --
  5557. utility:Connection(mouse.WheelBackward,function()
  5558. if page.open and dropdown.open and dropdown.bar and dropdown.bar.Visible and utility:MouseOverDrawing({dropdown.holder.inline.Position.X, dropdown.holder.inline.Position.Y, dropdown.holder.inline.Position.X + dropdown.holder.inline.Size.X, dropdown.holder.inline.Position.Y + dropdown.holder.inline.Size.Y}) then
  5559. dropdown.scrollindex = math.clamp(dropdown.scrollindex + 1, 0, #dropdown.options - max)
  5560. dropdown:UpdateScroll()
  5561. end
  5562. end)
  5563. end
  5564. --
  5565. if pointer and tostring(pointer) ~= "" and tostring(pointer) ~= " " and not library.pointers[tostring(pointer)] then
  5566. library.pointers[tostring(pointer)] = dropdown
  5567. end
  5568. --
  5569. section.currentAxis = section.currentAxis + (name and 35 or 20) + 4
  5570. --
  5571. return dropdown
  5572. end
  5573. --
  5574. function sections:Multibox(info)
  5575. local info = info or {}
  5576. local name = info.name or info.Name or info.title or info.Title
  5577. local options = info.options or info.Options or {"1", "2", "3"}
  5578. local def = info.def or info.Def or info.default or info.Default or {options[1]}
  5579. local pointer = info.pointer or info.Pointer or info.flag or info.Flag or nil
  5580. local callback = info.callback or info.callBack or info.Callback or info.CallBack or function()end
  5581. local min = info.min or info.Min or info.minimum or info.Minimum or 0
  5582. --
  5583. local window = self.window
  5584. local page = self.page
  5585. local section = self
  5586. --
  5587. local multibox = {open = false, current = def, options = options, holder = {buttons = {}, drawings = {}}, axis = section.currentAxis}
  5588. --
  5589. local multibox_outline = utility:Create("Frame", {Vector2.new(4, name and (multibox.axis + 15) or multibox.axis), section.section_frame}, {
  5590. Size = utility:Size(1, -8, 0, 20, section.section_frame),
  5591. Position = utility:Position(0, 4, 0, name and (multibox.axis + 15) or multibox.axis, section.section_frame),
  5592. Color = theme.outline,
  5593. Visible = page.open
  5594. }, section.visibleContent)
  5595. --
  5596. library.colors[multibox_outline] = {
  5597. Color = "outline"
  5598. }
  5599. --
  5600. local multibox_inline = utility:Create("Frame", {Vector2.new(1,1), multibox_outline}, {
  5601. Size = utility:Size(1, -2, 1, -2, multibox_outline),
  5602. Position = utility:Position(0, 1, 0, 1, multibox_outline),
  5603. Color = theme.inline,
  5604. Visible = page.open
  5605. }, section.visibleContent)
  5606. --
  5607. library.colors[multibox_inline] = {
  5608. Color = "inline"
  5609. }
  5610. --
  5611. local multibox_frame = utility:Create("Frame", {Vector2.new(1,1), multibox_inline}, {
  5612. Size = utility:Size(1, -2, 1, -2, multibox_inline),
  5613. Position = utility:Position(0, 1, 0, 1, multibox_inline),
  5614. Color = theme.lightcontrast,
  5615. Visible = page.open
  5616. }, section.visibleContent)
  5617. --
  5618. library.colors[multibox_frame] = {
  5619. Color = "lightcontrast"
  5620. }
  5621. --
  5622. if name then
  5623. local multibox_title = utility:Create("TextLabel", {Vector2.new(4,multibox.axis), section.section_frame}, {
  5624. Text = name,
  5625. Size = theme.textsize,
  5626. Font = theme.font,
  5627. Color = theme.textcolor,
  5628. OutlineColor = theme.textborder,
  5629. Position = utility:Position(0, 4, 0, multibox.axis, section.section_frame),
  5630. Visible = page.open
  5631. }, section.visibleContent)
  5632. --
  5633. library.colors[multibox_title] = {
  5634. OutlineColor = "textborder",
  5635. Color = "textcolor"
  5636. }
  5637. end
  5638. --
  5639. local multibox__gradient = utility:Create("Image", {Vector2.new(0,0), multibox_frame}, {
  5640. Size = utility:Size(1, 0, 1, 0, multibox_frame),
  5641. Position = utility:Position(0, 0, 0 , 0, multibox_frame),
  5642. Transparency = 0.5,
  5643. Visible = page.open
  5644. }, section.visibleContent)
  5645. --
  5646. local multibox_value = utility:Create("TextLabel", {Vector2.new(3,multibox_frame.Size.Y/2 - 7), multibox_frame}, {
  5647. Text = "",
  5648. Size = theme.textsize,
  5649. Font = theme.font,
  5650. Color = theme.textcolor,
  5651. OutlineColor = theme.textborder,
  5652. Position = utility:Position(0, 3, 0, (multibox_frame.Size.Y/2) - 7, multibox_frame),
  5653. Visible = page.open
  5654. }, section.visibleContent)
  5655. --
  5656. library.colors[multibox_value] = {
  5657. OutlineColor = "textborder",
  5658. Color = "textcolor"
  5659. }
  5660. --
  5661. local multibox_image = utility:Create("Image", {Vector2.new(multibox_frame.Size.X - 15,multibox_frame.Size.Y/2 - 3), multibox_frame}, {
  5662. Size = utility:Size(0, 9, 0, 6, multibox_frame),
  5663. Position = utility:Position(1, -15, 0.5, -3, multibox_frame),
  5664. Visible = page.open
  5665. }, section.visibleContent);multibox["multibox_image"] = multibox_image
  5666. --
  5667. utility:LoadImage(multibox_image, "arrow_down", "https://i.imgur.com/tVqy0nL.png")
  5668. utility:LoadImage(multibox__gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")
  5669. --
  5670. function multibox:Update()
  5671. if multibox.open and multibox.holder.inline then
  5672. for i,v in pairs(multibox.holder.buttons) do
  5673. v[1].Color = Find(multibox.current, v[1].Text) and theme.accent or theme.textcolor
  5674. v[1].Position = utility:Position(0, Find(multibox.current, v[1].Text) and 8 or 6, 0, 2, v[2])
  5675. --
  5676. library.colors[v[1]] = {
  5677. Color = Find(multibox.current, v[1].Text) and "accent" or "textcolor"
  5678. }
  5679. --
  5680. utility:UpdateOffset(v[1], {Vector2.new(Find(multibox.current, v[1].Text) and 8 or 6, 2), v[2]})
  5681. end
  5682. end
  5683. end
  5684. --
  5685. function multibox:Serialize(tbl)
  5686. local str = ""
  5687. --
  5688. for i,v in pairs(tbl) do
  5689. str = str..v..", "
  5690. end
  5691. --
  5692. return string.sub(str, 0, #str - 2)
  5693. end
  5694. --
  5695. function multibox:Resort(tbl,original)
  5696. local newtbl = {}
  5697. --
  5698. for i,v in pairs(original) do
  5699. if Find(tbl, v) then
  5700. newtbl[#newtbl + 1] = v
  5701. end
  5702. end
  5703. --
  5704. return newtbl
  5705. end
  5706. --
  5707. function multibox:Set(tbl)
  5708. if typeof(tbl) == "table" then
  5709. multibox.current = tbl
  5710. --
  5711. local text = multibox:Serialize(multibox:Resort(multibox.current, multibox.options))
  5712. multibox_value.Text = utility:WrapText(text, multibox_frame.Size.X - 25)
  5713. end
  5714. end
  5715. --
  5716. function multibox:Get()
  5717. return multibox.current
  5718. end
  5719. --
  5720. multibox_value.Text = utility:WrapText(multibox:Serialize(multibox:Resort(multibox.current, multibox.options)), multibox_frame.Size.X - 25)
  5721. --
  5722. library.began[#library.began + 1] = function(Input)
  5723. if Input.UserInputType == Enum.UserInputType.MouseButton1 and window.isVisible and multibox_outline.Visible then
  5724. if multibox.open and multibox.holder.inline and utility:MouseOverDrawing({multibox.holder.inline.Position.X, multibox.holder.inline.Position.Y, multibox.holder.inline.Position.X + multibox.holder.inline.Size.X, multibox.holder.inline.Position.Y + multibox.holder.inline.Size.Y}) then
  5725. for i,v in pairs(multibox.holder.buttons) do
  5726. if utility:MouseOverDrawing({v[2].Position.X, v[2].Position.Y, v[2].Position.X + v[2].Size.X, v[2].Position.Y + v[2].Size.Y}) and v[1].Text ~= multibox.current then
  5727. if not Find(multibox.current, v[1].Text) then
  5728. multibox.current[#multibox.current + 1] = v[1].Text
  5729. multibox_value.Text = utility:WrapText(multibox:Serialize(multibox:Resort(multibox.current, multibox.options)), multibox_frame.Size.X - 25)
  5730. multibox:Update()
  5731. else
  5732. if #multibox.current > min then
  5733. Remove(multibox.current, Find(multibox.current, v[1].Text))
  5734. multibox_value.Text = utility:WrapText(multibox:Serialize(multibox:Resort(multibox.current, multibox.options)), multibox_frame.Size.X - 25)
  5735. multibox:Update()
  5736. end
  5737. end
  5738. end
  5739. end
  5740. elseif utility:MouseOverDrawing({section.section_frame.Position.X, section.section_frame.Position.Y + multibox.axis, section.section_frame.Position.X + section.section_frame.Size.X, section.section_frame.Position.Y + multibox.axis + (name and 15 or 0) + 20}) and not window:IsOverContent() then
  5741. task.spawn(function()
  5742. utility:LoadImage(multibox__gradient, "gradientdown", "https://i.imgur.com/XYVD9Mh.png")
  5743. --
  5744. task.wait(0.15)
  5745. --
  5746. utility:LoadImage(multibox__gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")
  5747. end)
  5748. --
  5749. if not multibox.open then
  5750. window:CloseContent()
  5751. multibox.open = not multibox.open
  5752. utility:LoadImage(multibox_image, "arrow_up", "https://i.imgur.com/SL9cbQp.png")
  5753. --
  5754. local multibox_open_outline = utility:Create("Frame", {Vector2.new(0,19), multibox_outline}, {
  5755. Size = utility:Size(1, 0, 0, 3 + (#multibox.options * 19), multibox_outline),
  5756. Position = utility:Position(0, 0, 0, 19, multibox_outline),
  5757. Color = theme.outline,
  5758. Visible = page.open
  5759. }, multibox.holder.drawings);multibox.holder.outline = multibox_open_outline
  5760. --
  5761. library.colors[multibox_open_outline] = {
  5762. Color = "outline"
  5763. }
  5764. --
  5765. local multibox_open_inline = utility:Create("Frame", {Vector2.new(1,1), multibox_open_outline}, {
  5766. Size = utility:Size(1, -2, 1, -2, multibox_open_outline),
  5767. Position = utility:Position(0, 1, 0, 1, multibox_open_outline),
  5768. Color = theme.inline,
  5769. Visible = page.open
  5770. }, multibox.holder.drawings);multibox.holder.inline = multibox_open_inline
  5771. --
  5772. library.colors[multibox_open_inline] = {
  5773. Color = "inline"
  5774. }
  5775. --
  5776. for i,v in pairs(multibox.options) do
  5777. local multibox_value_frame = utility:Create("Frame", {Vector2.new(1,1 + (19 * (i-1))), multibox_open_inline}, {
  5778. Size = utility:Size(1, -2, 0, 18, multibox_open_inline),
  5779. Position = utility:Position(0, 1, 0, 1 + (19 * (i-1)), multibox_open_inline),
  5780. Color = theme.lightcontrast,
  5781. Visible = page.open
  5782. }, multibox.holder.drawings)
  5783. --
  5784. library.colors[multibox_value_frame] = {
  5785. Color = "lightcontrast"
  5786. }
  5787. --[[
  5788. local multibox_value_gradient = utility:Create("Image", {Vector2.new(0,0), multibox_value_frame}, {
  5789. Size = utility:Size(1, 0, 1, 0, multibox_value_frame),
  5790. Position = utility:Position(0, 0, 0 , 0, multibox_value_frame),
  5791. Transparency = 0.5,
  5792. Visible = page.open
  5793. }, multibox.holder.drawings)
  5794. --
  5795. utility:LoadImage(multibox_value_gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")]]
  5796. --
  5797. local multibox_value = utility:Create("TextLabel", {Vector2.new(Find(multibox.current, v) and 8 or 6,2), multibox_value_frame}, {
  5798. Text = v,
  5799. Size = theme.textsize,
  5800. Font = theme.font,
  5801. Color = Find(multibox.current, v) and theme.accent or theme.textcolor,
  5802. OutlineColor = theme.textborder,
  5803. Position = utility:Position(0, Find(multibox.current, v) and 8 or 6, 0, 2, multibox_value_frame),
  5804. Visible = page.open
  5805. }, multibox.holder.drawings);multibox.holder.buttons[#multibox.holder.buttons + 1] = {multibox_value, multibox_value_frame}
  5806. --
  5807. library.colors[multibox_value] = {
  5808. OutlineColor = "textborder",
  5809. Color = Find(multibox.current, v) and "accent" or "textcolor"
  5810. }
  5811. end
  5812. --
  5813. window.currentContent.frame = multibox_open_inline
  5814. window.currentContent.multibox = multibox
  5815. else
  5816. multibox.open = not multibox.open
  5817. utility:LoadImage(multibox_image, "arrow_down", "https://i.imgur.com/tVqy0nL.png")
  5818. --
  5819. for i,v in pairs(multibox.holder.drawings) do
  5820. utility:Remove(v)
  5821. end
  5822. --
  5823. multibox.holder.drawings = {}
  5824. multibox.holder.buttons = {}
  5825. multibox.holder.inline = nil
  5826. --
  5827. window.currentContent.frame = nil
  5828. window.currentContent.multibox = nil
  5829. end
  5830. else
  5831. if multibox.open then
  5832. multibox.open = not multibox.open
  5833. utility:LoadImage(multibox_image, "arrow_down", "https://i.imgur.com/tVqy0nL.png")
  5834. --
  5835. for i,v in pairs(multibox.holder.drawings) do
  5836. utility:Remove(v)
  5837. end
  5838. --
  5839. multibox.holder.drawings = {}
  5840. multibox.holder.buttons = {}
  5841. multibox.holder.inline = nil
  5842. --
  5843. window.currentContent.frame = nil
  5844. window.currentContent.multibox = nil
  5845. end
  5846. end
  5847. elseif Input.UserInputType == Enum.UserInputType.MouseButton1 and multibox.open then
  5848. multibox.open = not multibox.open
  5849. utility:LoadImage(multibox_image, "arrow_down", "https://i.imgur.com/tVqy0nL.png")
  5850. --
  5851. for i,v in pairs(multibox.holder.drawings) do
  5852. utility:Remove(v)
  5853. end
  5854. --
  5855. multibox.holder.drawings = {}
  5856. multibox.holder.buttons = {}
  5857. multibox.holder.inline = nil
  5858. --
  5859. window.currentContent.frame = nil
  5860. window.currentContent.multibox = nil
  5861. end
  5862. end
  5863. --
  5864. if pointer and tostring(pointer) ~= "" and tostring(pointer) ~= " " and not library.pointers[tostring(pointer)] then
  5865. library.pointers[tostring(pointer)] = multibox
  5866. end
  5867. --
  5868. section.currentAxis = section.currentAxis + (name and 35 or 20) + 4
  5869. --
  5870. return multibox
  5871. end
  5872. --
  5873. function sections:Keybind(info)
  5874. local info = info or {}
  5875. local name = info.name or info.Name or info.title or info.Title or "New Keybind"
  5876. local def = info.def or info.Def or info.default or info.Default or nil
  5877. local pointer = info.pointer or info.Pointer or info.flag or info.Flag or nil
  5878. local mode = info.mode or info.Mode or "Always"
  5879. local keybindname = info.keybindname or info.keybindName or info.Keybindname or info.KeybindName or nil
  5880. local callback = info.callback or info.callBack or info.Callback or info.CallBack or function()end
  5881. --
  5882. local window = self.window
  5883. local page = self.page
  5884. local section = self
  5885. --
  5886. local keybind = {keybindname = keybindname or name, axis = section.currentAxis, current = {}, selecting = false, mode = mode, open = false, modemenu = {buttons = {}, drawings = {}}, active = false}
  5887. --
  5888. local allowedKeyCodes = {"Q","W","E","R","T","Y","U","I","O","P","A","S","D","F","G","H","J","K","L","Z","X","C","V","B","N","M","One","Two","Three","Four","Five","Six","Seveen","Eight","Nine","Zero", "Minus", "Equals","F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12","Insert","Tab","Home","End","LeftAlt","LeftControl","LeftShift","RightAlt","RightControl","RightShift","CapsLock"}
  5889. local allowedInputTypes = {"MouseButton1","MouseButton2","MouseButton3"}
  5890. local shortenedInputs = {["MouseButton1"] = "MB1", ["MouseButton2"] = "MB2", ["MouseButton3"] = "MB3", ["Insert"] = "Ins", ["LeftAlt"] = "LAlt", ["LeftControl"] = "LC", ["LeftShift"] = "LS", ["RightAlt"] = "RAlt", ["RightControl"] = "RC", ["RightShift"] = "RS", ["CapsLock"] = "Caps"}
  5891. --
  5892. local keybind_outline = utility:Create("Frame", {Vector2.new(section.section_frame.Size.X-(40+4),keybind.axis), section.section_frame}, {
  5893. Size = utility:Size(0, 40, 0, 17),
  5894. Position = utility:Position(1, -(40+4), 0, keybind.axis, section.section_frame),
  5895. Color = theme.outline,
  5896. Visible = page.open
  5897. }, section.visibleContent)
  5898. --
  5899. library.colors[keybind_outline] = {
  5900. Color = "outline"
  5901. }
  5902. --
  5903. local keybind_inline = utility:Create("Frame", {Vector2.new(1,1), keybind_outline}, {
  5904. Size = utility:Size(1, -2, 1, -2, keybind_outline),
  5905. Position = utility:Position(0, 1, 0, 1, keybind_outline),
  5906. Color = theme.inline,
  5907. Visible = page.open
  5908. }, section.visibleContent)
  5909. --
  5910. library.colors[keybind_inline] = {
  5911. Color = "inline"
  5912. }
  5913. --
  5914. local keybind_frame = utility:Create("Frame", {Vector2.new(1,1), keybind_inline}, {
  5915. Size = utility:Size(1, -2, 1, -2, keybind_inline),
  5916. Position = utility:Position(0, 1, 0, 1, keybind_inline),
  5917. Color = theme.lightcontrast,
  5918. Visible = page.open
  5919. }, section.visibleContent)
  5920. --
  5921. library.colors[keybind_frame] = {
  5922. Color = "lightcontrast"
  5923. }
  5924. --
  5925. local keybind_title = utility:Create("TextLabel", {Vector2.new(4,keybind.axis + (17/2) - (utility:GetTextBounds(name, theme.textsize, theme.font).Y/2)), section.section_frame}, {
  5926. Text = name,
  5927. Size = theme.textsize,
  5928. Font = theme.font,
  5929. Color = theme.textcolor,
  5930. OutlineColor = theme.textborder,
  5931. Position = utility:Position(0, 4, 0, keybind.axis + (17/2) - (utility:GetTextBounds(name, theme.textsize, theme.font).Y/2), section.section_frame),
  5932. Visible = page.open
  5933. }, section.visibleContent)
  5934. --
  5935. library.colors[keybind_title] = {
  5936. OutlineColor = "textborder",
  5937. Color = "textcolor"
  5938. }
  5939. --
  5940. local keybind__gradient = utility:Create("Image", {Vector2.new(0,0), keybind_frame}, {
  5941. Size = utility:Size(1, 0, 1, 0, keybind_frame),
  5942. Position = utility:Position(0, 0, 0 , 0, keybind_frame),
  5943. Transparency = 0.5,
  5944. Visible = page.open
  5945. }, section.visibleContent)
  5946. --
  5947. local keybind_value = utility:Create("TextLabel", {Vector2.new(keybind_outline.Size.X/2,1), keybind_outline}, {
  5948. Text = "...",
  5949. Size = theme.textsize,
  5950. Font = theme.font,
  5951. Color = theme.textcolor,
  5952. OutlineColor = theme.textborder,
  5953. Center = true,
  5954. Position = utility:Position(0.5, 0, 1, 0, keybind_outline),
  5955. Visible = page.open
  5956. }, section.visibleContent)
  5957. --
  5958. library.colors[keybind_value] = {
  5959. OutlineColor = "textborder",
  5960. Color = "textcolor"
  5961. }
  5962. --
  5963. utility:LoadImage(keybind__gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")
  5964. --
  5965. function keybind:Shorten(string)
  5966. for i,v in pairs(shortenedInputs) do
  5967. string = string.gsub(string, i, v)
  5968. end
  5969. return string
  5970. end
  5971. --
  5972. function keybind:Change(input)
  5973. input = input or "..."
  5974. local inputTable = {}
  5975. --
  5976. if input.EnumType then
  5977. if input.EnumType == Enum.KeyCode or input.EnumType == Enum.UserInputType then
  5978. if Find(allowedKeyCodes, input.Name) or Find(allowedInputTypes, input.Name) then
  5979. inputTable = {input.EnumType == Enum.KeyCode and "KeyCode" or "UserInputType", input.Name}
  5980. --
  5981. keybind.current = inputTable
  5982. keybind_value.Text = #keybind.current > 0 and keybind:Shorten(keybind.current[2]) or "..."
  5983. --
  5984. return true
  5985. end
  5986. end
  5987. end
  5988. --
  5989. return false
  5990. end
  5991. --
  5992. function keybind:Get()
  5993. return keybind.current
  5994. end
  5995. --
  5996. function keybind:Set(tbl)
  5997. keybind.current = {tbl[1], tbl[2]}
  5998. keybind_value.Text = #keybind.current > 0 and keybind:Shorten(keybind.current[2]) or "..."
  5999. --
  6000. if tbl[3] then
  6001. keybind.mode = tbl[3]
  6002. end
  6003. --
  6004. keybind.active = (keybind.mode == "Always" or keybind.mode == "Off Hold") and true or false
  6005. --
  6006. if keybind.mode == "Off Hold" then
  6007. window.keybindslist:Add(keybindname or name, keybind_value.Text)
  6008. else
  6009. window.keybindslist:Remove(keybindname or name)
  6010. end
  6011. --
  6012. if keybind.current[1] and keybind.current[2] then
  6013. callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active)
  6014. end
  6015. end
  6016. --
  6017. function keybind:Active()
  6018. return keybind.active
  6019. end
  6020. --
  6021. function keybind:Reset()
  6022. for i,v in pairs(keybind.modemenu.buttons) do
  6023. v.Color = v.Text == keybind.mode and theme.accent or theme.textcolor
  6024. --
  6025. library.colors[v] = {
  6026. Color = v.Text == keybind.mode and "accent" or "textcolor"
  6027. }
  6028. end
  6029. --
  6030. keybind.active = (keybind.mode == "Always" or keybind.mode == "Off Hold") and true or false
  6031. --
  6032. if keybind.mode == "Off Hold" then
  6033. window.keybindslist:Add(keybindname or name, keybind_value.Text)
  6034. else
  6035. window.keybindslist:Remove(keybindname or name)
  6036. end
  6037. --
  6038. if keybind.current[1] and keybind.current[2] then
  6039. callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active)
  6040. end
  6041. end
  6042. --
  6043. keybind:Change(def)
  6044. --
  6045. library.began[#library.began + 1] = function(Input)
  6046. if keybind.current[1] and keybind.current[2] then
  6047. if Input.KeyCode == Enum[keybind.current[1]][keybind.current[2]] or Input.UserInputType == Enum[keybind.current[1]][keybind.current[2]] then
  6048. if keybind.mode == "On Hold" then
  6049. keybind.active = true
  6050. if keybind.active then window.keybindslist:Add(keybindname or name, keybind_value.Text) else window.keybindslist:Remove(keybindname or name) end
  6051. callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active)
  6052. elseif keybind.mode == "Off Hold" then
  6053. keybind.active = false
  6054. if keybind.active then window.keybindslist:Add(keybindname or name, keybind_value.Text) else window.keybindslist:Remove(keybindname or name) end
  6055. callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active)
  6056. elseif keybind.mode == "Toggle" then
  6057. keybind.active = not keybind.active
  6058. if keybind.active then window.keybindslist:Add(keybindname or name, keybind_value.Text) else window.keybindslist:Remove(keybindname or name) end
  6059. callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active)
  6060. end
  6061. end
  6062. end
  6063. --
  6064. if keybind.selecting and window.isVisible then
  6065. local done = keybind:Change(Input.KeyCode.Name ~= "Unknown" and Input.KeyCode or Input.UserInputType)
  6066. if done then
  6067. keybind.selecting = false
  6068. keybind.active = keybind.mode == "Always" and true or false
  6069. keybind_frame.Color = theme.lightcontrast
  6070. --
  6071. library.colors[keybind_frame] = {
  6072. Color = "lightcontrast"
  6073. }
  6074. --
  6075. if keybind.mode == "Off Hold" then
  6076. window.keybindslist:Add(keybindname or name, keybind_value.Text)
  6077. else
  6078. window.keybindslist:Remove(keybindname or name)
  6079. end
  6080. --
  6081. callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active)
  6082. end
  6083. end
  6084. --
  6085. if not window.isVisible and keybind.selecting then
  6086. keybind.selecting = false
  6087. keybind_frame.Color = theme.lightcontrast
  6088. --
  6089. library.colors[keybind_frame] = {
  6090. Color = "lightcontrast"
  6091. }
  6092. end
  6093. --
  6094. if Input.UserInputType == Enum.UserInputType.MouseButton1 and window.isVisible and keybind_outline.Visible then
  6095. if utility:MouseOverDrawing({section.section_frame.Position.X, section.section_frame.Position.Y + keybind.axis, section.section_frame.Position.X + section.section_frame.Size.X, section.section_frame.Position.Y + keybind.axis + 17}) and not window:IsOverContent() and not keybind.selecting then
  6096. keybind.selecting = true
  6097. keybind_frame.Color = theme.darkcontrast
  6098. --
  6099. library.colors[keybind_frame] = {
  6100. Color = "darkcontrast"
  6101. }
  6102. end
  6103. if keybind.open and keybind.modemenu.frame then
  6104. if utility:MouseOverDrawing({keybind.modemenu.frame.Position.X, keybind.modemenu.frame.Position.Y, keybind.modemenu.frame.Position.X + keybind.modemenu.frame.Size.X, keybind.modemenu.frame.Position.Y + keybind.modemenu.frame.Size.Y}) then
  6105. local changed = false
  6106. --
  6107. for i,v in pairs(keybind.modemenu.buttons) do
  6108. if utility:MouseOverDrawing({keybind.modemenu.frame.Position.X, keybind.modemenu.frame.Position.Y + (15 * (i - 1)), keybind.modemenu.frame.Position.X + keybind.modemenu.frame.Size.X, keybind.modemenu.frame.Position.Y + (15 * (i - 1)) + 15}) then
  6109. keybind.mode = v.Text
  6110. changed = true
  6111. end
  6112. end
  6113. --
  6114. if changed then keybind:Reset() end
  6115. else
  6116. keybind.open = not keybind.open
  6117. --
  6118. for i,v in pairs(keybind.modemenu.drawings) do
  6119. utility:Remove(v)
  6120. end
  6121. --
  6122. keybind.modemenu.drawings = {}
  6123. keybind.modemenu.buttons = {}
  6124. keybind.modemenu.frame = nil
  6125. --
  6126. window.currentContent.frame = nil
  6127. window.currentContent.keybind = nil
  6128. end
  6129. end
  6130. end
  6131. --
  6132. if Input.UserInputType == Enum.UserInputType.MouseButton2 and window.isVisible and keybind_outline.Visible then
  6133. if utility:MouseOverDrawing({section.section_frame.Position.X, section.section_frame.Position.Y + keybind.axis, section.section_frame.Position.X + section.section_frame.Size.X, section.section_frame.Position.Y + keybind.axis + 17}) and not window:IsOverContent() and not keybind.selecting then
  6134. window:CloseContent()
  6135. keybind.open = not keybind.open
  6136. --
  6137. local modemenu = utility:Create("Frame", {Vector2.new(keybind_outline.Size.X + 2,0), keybind_outline}, {
  6138. Size = utility:Size(0, 68, 0, 64),
  6139. Position = utility:Position(1, 2, 0, 0, keybind_outline),
  6140. Color = theme.outline,
  6141. Visible = page.open
  6142. }, keybind.modemenu.drawings);keybind.modemenu.frame = modemenu
  6143. --
  6144. library.colors[modemenu] = {
  6145. Color = "outline"
  6146. }
  6147. --
  6148. local modemenu_inline = utility:Create("Frame", {Vector2.new(1,1), modemenu}, {
  6149. Size = utility:Size(1, -2, 1, -2, modemenu),
  6150. Position = utility:Position(0, 1, 0, 1, modemenu),
  6151. Color = theme.inline,
  6152. Visible = page.open
  6153. }, keybind.modemenu.drawings)
  6154. --
  6155. library.colors[modemenu_inline] = {
  6156. Color = "inline"
  6157. }
  6158. --
  6159. local modemenu_frame = utility:Create("Frame", {Vector2.new(1,1), modemenu_inline}, {
  6160. Size = utility:Size(1, -2, 1, -2, modemenu_inline),
  6161. Position = utility:Position(0, 1, 0, 1, modemenu_inline),
  6162. Color = theme.lightcontrast,
  6163. Visible = page.open
  6164. }, keybind.modemenu.drawings)
  6165. --
  6166. library.colors[modemenu_frame] = {
  6167. Color = "lightcontrast"
  6168. }
  6169. --
  6170. local keybind__gradient = utility:Create("Image", {Vector2.new(0,0), modemenu_frame}, {
  6171. Size = utility:Size(1, 0, 1, 0, modemenu_frame),
  6172. Position = utility:Position(0, 0, 0 , 0, modemenu_frame),
  6173. Transparency = 0.5,
  6174. Visible = page.open
  6175. }, keybind.modemenu.drawings)
  6176. --
  6177. utility:LoadImage(keybind__gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")
  6178. --
  6179. for i,v in pairs({"Always", "Toggle", "On Hold", "Off Hold"}) do
  6180. local button_title = utility:Create("TextLabel", {Vector2.new(modemenu_frame.Size.X/2,15 * (i-1)), modemenu_frame}, {
  6181. Text = v,
  6182. Size = theme.textsize,
  6183. Font = theme.font,
  6184. Color = v == keybind.mode and theme.accent or theme.textcolor,
  6185. Center = true,
  6186. OutlineColor = theme.textborder,
  6187. Position = utility:Position(0.5, 0, 0, 15 * (i-1), modemenu_frame),
  6188. Visible = page.open
  6189. }, keybind.modemenu.drawings);keybind.modemenu.buttons[#keybind.modemenu.buttons + 1] = button_title
  6190. --
  6191. library.colors[button_title] = {
  6192. OutlineColor = "textborder",
  6193. Color = v == keybind.mode and "accent" or "textcolor"
  6194. }
  6195. end
  6196. --
  6197. window.currentContent.frame = modemenu
  6198. window.currentContent.keybind = keybind
  6199. end
  6200. end
  6201. end
  6202. --
  6203. library.ended[#library.ended + 1] = function(Input)
  6204. if keybind.mode == "On Hold" or keybind.mode == "Off Hold" then
  6205. if keybind.current[1] and keybind.current[2] then
  6206. if Input.KeyCode == Enum[keybind.current[1]][keybind.current[2]] or Input.UserInputType == Enum[keybind.current[1]][keybind.current[2]] then
  6207. if keybind.mode == "On Hold" then
  6208. if keybind.active then
  6209. keybind.active = false
  6210. window.keybindslist:Remove(keybindname or name)
  6211. callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active)
  6212. end
  6213. else
  6214. keybind.active = true
  6215. if keybind.active then window.keybindslist:Add(keybindname or name, keybind_value.Text) else window.keybindslist:Remove(keybindname or name) end
  6216. callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active)
  6217. end
  6218. end
  6219. end
  6220. end
  6221. end
  6222. --
  6223. if pointer and tostring(pointer) ~= "" and tostring(pointer) ~= " " and not library.pointers[tostring(pointer)] then
  6224. library.pointers[tostring(pointer)] = keybind
  6225. end
  6226. --
  6227. section.currentAxis = section.currentAxis + 17 + 4
  6228. --
  6229. return keybind
  6230. end
  6231. --
  6232. function sections:Colorpicker(info)
  6233. local info = info or {}
  6234. local name = info.name or info.Name or info.title or info.Title or "New Colorpicker"
  6235. local cpinfo = info.info or info.Info or name
  6236. local def = info.def or info.Def or info.default or info.Default or Color3.fromRGB(255, 0, 0)
  6237. local transp = info.transparency or info.Transparency or info.transp or info.Transp or info.alpha or info.Alpha or nil
  6238. local pointer = info.pointer or info.Pointer or info.flag or info.Flag or nil
  6239. local callback = info.callback or info.callBack or info.Callback or info.CallBack or function()end
  6240. --
  6241. local window = self.window
  6242. local page = self.page
  6243. local section = self
  6244. --
  6245. local hh, ss, vv = def:ToHSV()
  6246. local colorpicker = {axis = section.currentAxis, secondColorpicker = false, current = {hh, ss, vv , (transp or 0)}, holding = {picker = false, huepicker = false, transparency = false}, holder = {inline = nil, picker = nil, picker_cursor = nil, huepicker = nil, huepicker_cursor = {}, transparency = nil, transparencybg = nil, transparency_cursor = {}, drawings = {}}}
  6247. --
  6248. local colorpicker_outline = utility:Create("Frame", {Vector2.new(section.section_frame.Size.X-(30+4),colorpicker.axis), section.section_frame}, {
  6249. Size = utility:Size(0, 30, 0, 15),
  6250. Position = utility:Position(1, -(30+4), 0, colorpicker.axis, section.section_frame),
  6251. Color = theme.outline,
  6252. Visible = page.open
  6253. }, section.visibleContent)
  6254. --
  6255. library.colors[colorpicker_outline] = {
  6256. Color = "outline"
  6257. }
  6258. --
  6259. local colorpicker_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_outline}, {
  6260. Size = utility:Size(1, -2, 1, -2, colorpicker_outline),
  6261. Position = utility:Position(0, 1, 0, 1, colorpicker_outline),
  6262. Color = theme.inline,
  6263. Visible = page.open
  6264. }, section.visibleContent)
  6265. --
  6266. library.colors[colorpicker_inline] = {
  6267. Color = "inline"
  6268. }
  6269. --
  6270. local colorpicker__transparency
  6271. if transp then
  6272. colorpicker__transparency = utility:Create("Image", {Vector2.new(1,1), colorpicker_inline}, {
  6273. Size = utility:Size(1, -2, 1, -2, colorpicker_inline),
  6274. Position = utility:Position(0, 1, 0 , 1, colorpicker_inline),
  6275. Visible = page.open
  6276. }, section.visibleContent)
  6277. end
  6278. --
  6279. local colorpicker_frame = utility:Create("Frame", {Vector2.new(1,1), colorpicker_inline}, {
  6280. Size = utility:Size(1, -2, 1, -2, colorpicker_inline),
  6281. Position = utility:Position(0, 1, 0, 1, colorpicker_inline),
  6282. Color = def,
  6283. Transparency = transp and (1 - transp) or 1,
  6284. Visible = page.open
  6285. }, section.visibleContent)
  6286. --
  6287. local colorpicker__gradient = utility:Create("Image", {Vector2.new(0,0), colorpicker_frame}, {
  6288. Size = utility:Size(1, 0, 1, 0, colorpicker_frame),
  6289. Position = utility:Position(0, 0, 0 , 0, colorpicker_frame),
  6290. Transparency = 0.5,
  6291. Visible = page.open
  6292. }, section.visibleContent)
  6293. --
  6294. local colorpicker_title = utility:Create("TextLabel", {Vector2.new(4,colorpicker.axis + (15/2) - (utility:GetTextBounds(name, theme.textsize, theme.font).Y/2)), section.section_frame}, {
  6295. Text = name,
  6296. Size = theme.textsize,
  6297. Font = theme.font,
  6298. Color = theme.textcolor,
  6299. OutlineColor = theme.textborder,
  6300. Position = utility:Position(0, 4, 0, colorpicker.axis + (15/2) - (utility:GetTextBounds(name, theme.textsize, theme.font).Y/2), section.section_frame),
  6301. Visible = page.open
  6302. }, section.visibleContent)
  6303. --
  6304. library.colors[colorpicker_title] = {
  6305. OutlineColor = "textborder",
  6306. Color = "textcolor"
  6307. }
  6308. --
  6309. if transp then
  6310. utility:LoadImage(colorpicker__transparency, "cptransp", "https://i.imgur.com/IIPee2A.png")
  6311. end
  6312. utility:LoadImage(colorpicker__gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")
  6313. --
  6314. function colorpicker:Set(color, transp_val)
  6315. if typeof(color) == "table" then
  6316. colorpicker.current = color
  6317. colorpicker_frame.Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  6318. colorpicker_frame.Transparency = 1 - colorpicker.current[4]
  6319. callback(Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3]), colorpicker.current[4])
  6320. elseif typeof(color) == "Color3" then
  6321. local h, s, v = color:ToHSV()
  6322. colorpicker.current = {h, s, v, (transp_val or 0)}
  6323. colorpicker_frame.Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  6324. colorpicker_frame.Transparency = 1 - colorpicker.current[4]
  6325. callback(Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3]), colorpicker.current[4])
  6326. end
  6327. end
  6328. --
  6329. function colorpicker:Refresh()
  6330. local mouseLocation = utility:MouseLocation()
  6331. if colorpicker.open and colorpicker.holder.picker and colorpicker.holding.picker then
  6332. colorpicker.current[2] = math.clamp(mouseLocation.X - colorpicker.holder.picker.Position.X, 0, colorpicker.holder.picker.Size.X) / colorpicker.holder.picker.Size.X
  6333. --
  6334. colorpicker.current[3] = 1-(math.clamp(mouseLocation.Y - colorpicker.holder.picker.Position.Y, 0, colorpicker.holder.picker.Size.Y) / colorpicker.holder.picker.Size.Y)
  6335. --
  6336. colorpicker.holder.picker_cursor.Position = utility:Position(colorpicker.current[2], -3, 1-colorpicker.current[3] , -3, colorpicker.holder.picker)
  6337. --
  6338. utility:UpdateOffset(colorpicker.holder.picker_cursor, {Vector2.new((colorpicker.holder.picker.Size.X*colorpicker.current[2])-3,(colorpicker.holder.picker.Size.Y*(1-colorpicker.current[3]))-3), colorpicker.holder.picker})
  6339. --
  6340. if colorpicker.holder.transparencybg then
  6341. colorpicker.holder.transparencybg.Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  6342. end
  6343. elseif colorpicker.open and colorpicker.holder.huepicker and colorpicker.holding.huepicker then
  6344. colorpicker.current[1] = (math.clamp(mouseLocation.Y - colorpicker.holder.huepicker.Position.Y, 0, colorpicker.holder.huepicker.Size.Y) / colorpicker.holder.huepicker.Size.Y)
  6345. --
  6346. colorpicker.holder.huepicker_cursor[1].Position = utility:Position(0, -3, colorpicker.current[1], -3, colorpicker.holder.huepicker)
  6347. colorpicker.holder.huepicker_cursor[2].Position = utility:Position(0, 1, 0, 1, colorpicker.holder.huepicker_cursor[1])
  6348. colorpicker.holder.huepicker_cursor[3].Position = utility:Position(0, 1, 0, 1, colorpicker.holder.huepicker_cursor[2])
  6349. colorpicker.holder.huepicker_cursor[3].Color = Color3.fromHSV(colorpicker.current[1], 1, 1)
  6350. --
  6351. utility:UpdateOffset(colorpicker.holder.huepicker_cursor[1], {Vector2.new(-3,(colorpicker.holder.huepicker.Size.Y*colorpicker.current[1])-3), colorpicker.holder.huepicker})
  6352. --
  6353. colorpicker.holder.background.Color = Color3.fromHSV(colorpicker.current[1], 1, 1)
  6354. --
  6355. if colorpicker.holder.transparency_cursor and colorpicker.holder.transparency_cursor[3] then
  6356. colorpicker.holder.transparency_cursor[3].Color = Color3.fromHSV(0, 0, 1 - colorpicker.current[4])
  6357. end
  6358. --
  6359. if colorpicker.holder.transparencybg then
  6360. colorpicker.holder.transparencybg.Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  6361. end
  6362. elseif colorpicker.open and colorpicker.holder.transparency and colorpicker.holding.transparency then
  6363. colorpicker.current[4] = 1 - (math.clamp(mouseLocation.X - colorpicker.holder.transparency.Position.X, 0, colorpicker.holder.transparency.Size.X) / colorpicker.holder.transparency.Size.X)
  6364. --
  6365. colorpicker.holder.transparency_cursor[1].Position = utility:Position(1-colorpicker.current[4], -3, 0, -3, colorpicker.holder.transparency)
  6366. colorpicker.holder.transparency_cursor[2].Position = utility:Position(0, 1, 0, 1, colorpicker.holder.transparency_cursor[1])
  6367. colorpicker.holder.transparency_cursor[3].Position = utility:Position(0, 1, 0, 1, colorpicker.holder.transparency_cursor[2])
  6368. colorpicker.holder.transparency_cursor[3].Color = Color3.fromHSV(0, 0, 1 - colorpicker.current[4])
  6369. colorpicker_frame.Transparency = (1 - colorpicker.current[4])
  6370. --
  6371. utility:UpdateTransparency(colorpicker_frame, (1 - colorpicker.current[4]))
  6372. utility:UpdateOffset(colorpicker.holder.transparency_cursor[1], {Vector2.new((colorpicker.holder.transparency.Size.X*(1-colorpicker.current[4]))-3,-3), colorpicker.holder.transparency})
  6373. --
  6374. colorpicker.holder.background.Color = Color3.fromHSV(colorpicker.current[1], 1, 1)
  6375. end
  6376. --
  6377. colorpicker:Set(colorpicker.current)
  6378. end
  6379. --
  6380. function colorpicker:Get()
  6381. return Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  6382. end
  6383. --
  6384. library.began[#library.began + 1] = function(Input)
  6385. if Input.UserInputType == Enum.UserInputType.MouseButton1 and window.isVisible and colorpicker_outline.Visible then
  6386. if colorpicker.open and colorpicker.holder.inline and utility:MouseOverDrawing({colorpicker.holder.inline.Position.X, colorpicker.holder.inline.Position.Y, colorpicker.holder.inline.Position.X + colorpicker.holder.inline.Size.X, colorpicker.holder.inline.Position.Y + colorpicker.holder.inline.Size.Y}) then
  6387. if colorpicker.holder.picker and utility:MouseOverDrawing({colorpicker.holder.picker.Position.X - 2, colorpicker.holder.picker.Position.Y - 2, colorpicker.holder.picker.Position.X - 2 + colorpicker.holder.picker.Size.X + 4, colorpicker.holder.picker.Position.Y - 2 + colorpicker.holder.picker.Size.Y + 4}) then
  6388. colorpicker.holding.picker = true
  6389. colorpicker:Refresh()
  6390. elseif colorpicker.holder.huepicker and utility:MouseOverDrawing({colorpicker.holder.huepicker.Position.X - 2, colorpicker.holder.huepicker.Position.Y - 2, colorpicker.holder.huepicker.Position.X - 2 + colorpicker.holder.huepicker.Size.X + 4, colorpicker.holder.huepicker.Position.Y - 2 + colorpicker.holder.huepicker.Size.Y + 4}) then
  6391. colorpicker.holding.huepicker = true
  6392. colorpicker:Refresh()
  6393. elseif colorpicker.holder.transparency and utility:MouseOverDrawing({colorpicker.holder.transparency.Position.X - 2, colorpicker.holder.transparency.Position.Y - 2, colorpicker.holder.transparency.Position.X - 2 + colorpicker.holder.transparency.Size.X + 4, colorpicker.holder.transparency.Position.Y - 2 + colorpicker.holder.transparency.Size.Y + 4}) then
  6394. colorpicker.holding.transparency = true
  6395. colorpicker:Refresh()
  6396. end
  6397. elseif utility:MouseOverDrawing({section.section_frame.Position.X, section.section_frame.Position.Y + colorpicker.axis, section.section_frame.Position.X + section.section_frame.Size.X - (colorpicker.secondColorpicker and (30+4) or 0), section.section_frame.Position.Y + colorpicker.axis + 15}) and not window:IsOverContent() then
  6398. if not colorpicker.open then
  6399. window:CloseContent()
  6400. colorpicker.open = not colorpicker.open
  6401. --
  6402. local colorpicker_open_outline = utility:Create("Frame", {Vector2.new(4,colorpicker.axis + 19), section.section_frame}, {
  6403. Size = utility:Size(1, -8, 0, transp and 219 or 200, section.section_frame),
  6404. Position = utility:Position(0, 4, 0, colorpicker.axis + 19, section.section_frame),
  6405. Color = theme.outline
  6406. }, colorpicker.holder.drawings);colorpicker.holder.inline = colorpicker_open_outline
  6407. --
  6408. library.colors[colorpicker_open_outline] = {
  6409. Color = "outline"
  6410. }
  6411. --
  6412. local colorpicker_open_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_outline}, {
  6413. Size = utility:Size(1, -2, 1, -2, colorpicker_open_outline),
  6414. Position = utility:Position(0, 1, 0, 1, colorpicker_open_outline),
  6415. Color = theme.inline
  6416. }, colorpicker.holder.drawings)
  6417. --
  6418. library.colors[colorpicker_open_inline] = {
  6419. Color = "inline"
  6420. }
  6421. --
  6422. local colorpicker_open_frame = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_inline}, {
  6423. Size = utility:Size(1, -2, 1, -2, colorpicker_open_inline),
  6424. Position = utility:Position(0, 1, 0, 1, colorpicker_open_inline),
  6425. Color = theme.darkcontrast
  6426. }, colorpicker.holder.drawings)
  6427. --
  6428. library.colors[colorpicker_open_frame] = {
  6429. Color = "darkcontrast"
  6430. }
  6431. --
  6432. local colorpicker_open_accent = utility:Create("Frame", {Vector2.new(0,0), colorpicker_open_frame}, {
  6433. Size = utility:Size(1, 0, 0, 2, colorpicker_open_frame),
  6434. Position = utility:Position(0, 0, 0, 0, colorpicker_open_frame),
  6435. Color = theme.accent
  6436. }, colorpicker.holder.drawings)
  6437. --
  6438. library.colors[colorpicker_open_accent] = {
  6439. Color = "accent"
  6440. }
  6441. --
  6442. local colorpicker_title = utility:Create("TextLabel", {Vector2.new(4,2), colorpicker_open_frame}, {
  6443. Text = cpinfo,
  6444. Size = theme.textsize,
  6445. Font = theme.font,
  6446. Color = theme.textcolor,
  6447. OutlineColor = theme.textborder,
  6448. Position = utility:Position(0, 4, 0, 2, colorpicker_open_frame),
  6449. }, colorpicker.holder.drawings)
  6450. --
  6451. library.colors[colorpicker_title] = {
  6452. OutlineColor = "textborder",
  6453. Color = "textcolor"
  6454. }
  6455. --
  6456. local colorpicker_open_picker_outline = utility:Create("Frame", {Vector2.new(4,17), colorpicker_open_frame}, {
  6457. Size = utility:Size(1, -27, 1, transp and -40 or -21, colorpicker_open_frame),
  6458. Position = utility:Position(0, 4, 0, 17, colorpicker_open_frame),
  6459. Color = theme.outline
  6460. }, colorpicker.holder.drawings)
  6461. --
  6462. library.colors[colorpicker_open_picker_outline] = {
  6463. Color = "outline"
  6464. }
  6465. --
  6466. local colorpicker_open_picker_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_picker_outline}, {
  6467. Size = utility:Size(1, -2, 1, -2, colorpicker_open_picker_outline),
  6468. Position = utility:Position(0, 1, 0, 1, colorpicker_open_picker_outline),
  6469. Color = theme.inline
  6470. }, colorpicker.holder.drawings)
  6471. --
  6472. library.colors[colorpicker_open_picker_inline] = {
  6473. Color = "inline"
  6474. }
  6475. --
  6476. local colorpicker_open_picker_bg = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_picker_inline}, {
  6477. Size = utility:Size(1, -2, 1, -2, colorpicker_open_picker_inline),
  6478. Position = utility:Position(0, 1, 0, 1, colorpicker_open_picker_inline),
  6479. Color = Color3.fromHSV(colorpicker.current[1],1,1)
  6480. }, colorpicker.holder.drawings);colorpicker.holder.background = colorpicker_open_picker_bg
  6481. --
  6482. local colorpicker_open_picker_image = utility:Create("Image", {Vector2.new(0,0), colorpicker_open_picker_bg}, {
  6483. Size = utility:Size(1, 0, 1, 0, colorpicker_open_picker_bg),
  6484. Position = utility:Position(0, 0, 0 , 0, colorpicker_open_picker_bg),
  6485. }, colorpicker.holder.drawings);colorpicker.holder.picker = colorpicker_open_picker_image
  6486. --
  6487. local colorpicker_open_picker_cursor = utility:Create("Image", {Vector2.new((colorpicker_open_picker_image.Size.X*colorpicker.current[2])-3,(colorpicker_open_picker_image.Size.Y*(1-colorpicker.current[3]))-3), colorpicker_open_picker_image}, {
  6488. Size = utility:Size(0, 6, 0, 6, colorpicker_open_picker_image),
  6489. Position = utility:Position(colorpicker.current[2], -3, 1-colorpicker.current[3] , -3, colorpicker_open_picker_image),
  6490. }, colorpicker.holder.drawings);colorpicker.holder.picker_cursor = colorpicker_open_picker_cursor
  6491. --
  6492. local colorpicker_open_huepicker_outline = utility:Create("Frame", {Vector2.new(colorpicker_open_frame.Size.X-19,17), colorpicker_open_frame}, {
  6493. Size = utility:Size(0, 15, 1, transp and -40 or -21, colorpicker_open_frame),
  6494. Position = utility:Position(1, -19, 0, 17, colorpicker_open_frame),
  6495. Color = theme.outline
  6496. }, colorpicker.holder.drawings)
  6497. --
  6498. library.colors[colorpicker_open_huepicker_outline] = {
  6499. Color = "outline"
  6500. }
  6501. --
  6502. local colorpicker_open_huepicker_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_huepicker_outline}, {
  6503. Size = utility:Size(1, -2, 1, -2, colorpicker_open_huepicker_outline),
  6504. Position = utility:Position(0, 1, 0, 1, colorpicker_open_huepicker_outline),
  6505. Color = theme.inline
  6506. }, colorpicker.holder.drawings)
  6507. --
  6508. library.colors[colorpicker_open_huepicker_inline] = {
  6509. Color = "inline"
  6510. }
  6511. --
  6512. local colorpicker_open_huepicker_image = utility:Create("Image", {Vector2.new(1,1), colorpicker_open_huepicker_inline}, {
  6513. Size = utility:Size(1, -2, 1, -2, colorpicker_open_huepicker_inline),
  6514. Position = utility:Position(0, 1, 0 , 1, colorpicker_open_huepicker_inline),
  6515. }, colorpicker.holder.drawings);colorpicker.holder.huepicker = colorpicker_open_huepicker_image
  6516. --
  6517. local colorpicker_open_huepicker_cursor_outline = utility:Create("Frame", {Vector2.new(-3,(colorpicker_open_huepicker_image.Size.Y*colorpicker.current[1])-3), colorpicker_open_huepicker_image}, {
  6518. Size = utility:Size(1, 6, 0, 6, colorpicker_open_huepicker_image),
  6519. Position = utility:Position(0, -3, colorpicker.current[1], -3, colorpicker_open_huepicker_image),
  6520. Color = theme.outline
  6521. }, colorpicker.holder.drawings);colorpicker.holder.huepicker_cursor[1] = colorpicker_open_huepicker_cursor_outline
  6522. --
  6523. library.colors[colorpicker_open_huepicker_cursor_outline] = {
  6524. Color = "outline"
  6525. }
  6526. --
  6527. local colorpicker_open_huepicker_cursor_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_huepicker_cursor_outline}, {
  6528. Size = utility:Size(1, -2, 1, -2, colorpicker_open_huepicker_cursor_outline),
  6529. Position = utility:Position(0, 1, 0, 1, colorpicker_open_huepicker_cursor_outline),
  6530. Color = theme.textcolor
  6531. }, colorpicker.holder.drawings);colorpicker.holder.huepicker_cursor[2] = colorpicker_open_huepicker_cursor_inline
  6532. --
  6533. library.colors[colorpicker_open_huepicker_cursor_inline] = {
  6534. Color = "textcolor"
  6535. }
  6536. --
  6537. local colorpicker_open_huepicker_cursor_color = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_huepicker_cursor_inline}, {
  6538. Size = utility:Size(1, -2, 1, -2, colorpicker_open_huepicker_cursor_inline),
  6539. Position = utility:Position(0, 1, 0, 1, colorpicker_open_huepicker_cursor_inline),
  6540. Color = Color3.fromHSV(colorpicker.current[1], 1, 1)
  6541. }, colorpicker.holder.drawings);colorpicker.holder.huepicker_cursor[3] = colorpicker_open_huepicker_cursor_color
  6542. --
  6543. if transp then
  6544. local colorpicker_open_transparency_outline = utility:Create("Frame", {Vector2.new(4,colorpicker_open_frame.Size.Y-19), colorpicker_open_frame}, {
  6545. Size = utility:Size(1, -27, 0, 15, colorpicker_open_frame),
  6546. Position = utility:Position(0, 4, 1, -19, colorpicker_open_frame),
  6547. Color = theme.outline
  6548. }, colorpicker.holder.drawings)
  6549. --
  6550. library.colors[colorpicker_open_transparency_outline] = {
  6551. Color = "outline"
  6552. }
  6553. --
  6554. local colorpicker_open_transparency_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_transparency_outline}, {
  6555. Size = utility:Size(1, -2, 1, -2, colorpicker_open_transparency_outline),
  6556. Position = utility:Position(0, 1, 0, 1, colorpicker_open_transparency_outline),
  6557. Color = theme.inline
  6558. }, colorpicker.holder.drawings)
  6559. --
  6560. library.colors[colorpicker_open_transparency_inline] = {
  6561. Color = "inline"
  6562. }
  6563. --
  6564. local colorpicker_open_transparency_bg = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_transparency_inline}, {
  6565. Size = utility:Size(1, -2, 1, -2, colorpicker_open_transparency_inline),
  6566. Position = utility:Position(0, 1, 0, 1, colorpicker_open_transparency_inline),
  6567. Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  6568. }, colorpicker.holder.drawings);colorpicker.holder.transparencybg = colorpicker_open_transparency_bg
  6569. --
  6570. local colorpicker_open_transparency_image = utility:Create("Image", {Vector2.new(1,1), colorpicker_open_transparency_inline}, {
  6571. Size = utility:Size(1, -2, 1, -2, colorpicker_open_transparency_inline),
  6572. Position = utility:Position(0, 1, 0 , 1, colorpicker_open_transparency_inline),
  6573. }, colorpicker.holder.drawings);colorpicker.holder.transparency = colorpicker_open_transparency_image
  6574. --
  6575. local colorpicker_open_transparency_cursor_outline = utility:Create("Frame", {Vector2.new((colorpicker_open_transparency_image.Size.X*(1-colorpicker.current[4]))-3,-3), colorpicker_open_transparency_image}, {
  6576. Size = utility:Size(0, 6, 1, 6, colorpicker_open_transparency_image),
  6577. Position = utility:Position(1-colorpicker.current[4], -3, 0, -3, colorpicker_open_transparency_image),
  6578. Color = theme.outline
  6579. }, colorpicker.holder.drawings);colorpicker.holder.transparency_cursor[1] = colorpicker_open_transparency_cursor_outline
  6580. --
  6581. library.colors[colorpicker_open_transparency_cursor_outline] = {
  6582. Color = "outline"
  6583. }
  6584. --
  6585. local colorpicker_open_transparency_cursor_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_transparency_cursor_outline}, {
  6586. Size = utility:Size(1, -2, 1, -2, colorpicker_open_transparency_cursor_outline),
  6587. Position = utility:Position(0, 1, 0, 1, colorpicker_open_transparency_cursor_outline),
  6588. Color = theme.textcolor
  6589. }, colorpicker.holder.drawings);colorpicker.holder.transparency_cursor[2] = colorpicker_open_transparency_cursor_inline
  6590. --
  6591. library.colors[colorpicker_open_transparency_cursor_inline] = {
  6592. Color = "textcolor"
  6593. }
  6594. --
  6595. local colorpicker_open_transparency_cursor_color = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_transparency_cursor_inline}, {
  6596. Size = utility:Size(1, -2, 1, -2, colorpicker_open_transparency_cursor_inline),
  6597. Position = utility:Position(0, 1, 0, 1, colorpicker_open_transparency_cursor_inline),
  6598. Color = Color3.fromHSV(0, 0, 1 - colorpicker.current[4]),
  6599. }, colorpicker.holder.drawings);colorpicker.holder.transparency_cursor[3] = colorpicker_open_transparency_cursor_color
  6600. --
  6601. utility:LoadImage(colorpicker_open_transparency_image, "transp", "https://i.imgur.com/ncssKbH.png")
  6602. end
  6603. --
  6604. utility:LoadImage(colorpicker_open_picker_image, "valsat", "https://i.imgur.com/wpDRqVH.png")
  6605. utility:LoadImage(colorpicker_open_picker_cursor, "valsat_cursor", "https://raw.githubusercontent.com/mvonwalk/splix-assets/main/Images-cursor.png")
  6606. utility:LoadImage(colorpicker_open_huepicker_image, "hue", "https://i.imgur.com/iEOsHFv.png")
  6607. --
  6608. window.currentContent.frame = colorpicker_open_inline
  6609. window.currentContent.colorpicker = colorpicker
  6610. else
  6611. colorpicker.open = not colorpicker.open
  6612. --
  6613. for i,v in pairs(colorpicker.holder.drawings) do
  6614. utility:Remove(v)
  6615. end
  6616. --
  6617. colorpicker.holder.drawings = {}
  6618. colorpicker.holder.inline = nil
  6619. --
  6620. window.currentContent.frame = nil
  6621. window.currentContent.colorpicker = nil
  6622. end
  6623. else
  6624. if colorpicker.open then
  6625. colorpicker.open = not colorpicker.open
  6626. --
  6627. for i,v in pairs(colorpicker.holder.drawings) do
  6628. utility:Remove(v)
  6629. end
  6630. --
  6631. colorpicker.holder.drawings = {}
  6632. colorpicker.holder.inline = nil
  6633. --
  6634. window.currentContent.frame = nil
  6635. window.currentContent.colorpicker = nil
  6636. end
  6637. end
  6638. elseif Input.UserInputType == Enum.UserInputType.MouseButton1 and colorpicker.open then
  6639. colorpicker.open = not colorpicker.open
  6640. --
  6641. for i,v in pairs(colorpicker.holder.drawings) do
  6642. utility:Remove(v)
  6643. end
  6644. --
  6645. colorpicker.holder.drawings = {}
  6646. colorpicker.holder.inline = nil
  6647. --
  6648. window.currentContent.frame = nil
  6649. window.currentContent.colorpicker = nil
  6650. end
  6651. end
  6652. --
  6653. library.ended[#library.ended + 1] = function(Input)
  6654. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  6655. if colorpicker.holding.picker then
  6656. colorpicker.holding.picker = not colorpicker.holding.picker
  6657. end
  6658. if colorpicker.holding.huepicker then
  6659. colorpicker.holding.huepicker = not colorpicker.holding.huepicker
  6660. end
  6661. if colorpicker.holding.transparency then
  6662. colorpicker.holding.transparency = not colorpicker.holding.transparency
  6663. end
  6664. end
  6665. end
  6666. --
  6667. library.changed[#library.changed + 1] = function()
  6668. if colorpicker.open and colorpicker.holding.picker or colorpicker.holding.huepicker or colorpicker.holding.transparency then
  6669. if window.isVisible then
  6670. colorpicker:Refresh()
  6671. else
  6672. if colorpicker.holding.picker then
  6673. colorpicker.holding.picker = not colorpicker.holding.picker
  6674. end
  6675. if colorpicker.holding.huepicker then
  6676. colorpicker.holding.huepicker = not colorpicker.holding.huepicker
  6677. end
  6678. if colorpicker.holding.transparency then
  6679. colorpicker.holding.transparency = not colorpicker.holding.transparency
  6680. end
  6681. end
  6682. end
  6683. end
  6684. --
  6685. if pointer and tostring(pointer) ~= "" and tostring(pointer) ~= " " and not library.pointers[tostring(pointer)] then
  6686. library.pointers[tostring(pointer)] = colorpicker
  6687. end
  6688. --
  6689. section.currentAxis = section.currentAxis + 15 + 4
  6690. --
  6691. function colorpicker:Colorpicker(info)
  6692. local info = info or {}
  6693. local cpinfo = info.info or info.Info or name
  6694. local def = info.def or info.Def or info.default or info.Default or Color3.fromRGB(255, 0, 0)
  6695. local transp = info.transparency or info.Transparency or info.transp or info.Transp or info.alpha or info.Alpha or nil
  6696. local pointer = info.pointer or info.Pointer or info.flag or info.Flag or nil
  6697. local callback = info.callback or info.callBack or info.Callback or info.CallBack or function()end
  6698. --
  6699. colorpicker.secondColorpicker = true
  6700. --
  6701. local hh, ss, vv = def:ToHSV()
  6702. local colorpicker = {axis = colorpicker.axis, current = {hh, ss, vv , (transp or 0)}, holding = {picker = false, huepicker = false, transparency = false}, holder = {inline = nil, picker = nil, picker_cursor = nil, huepicker = nil, huepicker_cursor = {}, transparency = nil, transparencybg = nil, transparency_cursor = {}, drawings = {}}}
  6703. --
  6704. colorpicker_outline.Position = utility:Position(1, -(60+8), 0, colorpicker.axis, section.section_frame)
  6705. utility:UpdateOffset(colorpicker_outline, {Vector2.new(section.section_frame.Size.X-(60+8),colorpicker.axis), section.section_frame})
  6706. --
  6707. local colorpicker_outline = utility:Create("Frame", {Vector2.new(section.section_frame.Size.X-(30+4),colorpicker.axis), section.section_frame}, {
  6708. Size = utility:Size(0, 30, 0, 15),
  6709. Position = utility:Position(1, -(30+4), 0, colorpicker.axis, section.section_frame),
  6710. Color = theme.outline,
  6711. Visible = page.open
  6712. }, section.visibleContent)
  6713. --
  6714. library.colors[colorpicker_outline] = {
  6715. Color = "outline"
  6716. }
  6717. --
  6718. local colorpicker_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_outline}, {
  6719. Size = utility:Size(1, -2, 1, -2, colorpicker_outline),
  6720. Position = utility:Position(0, 1, 0, 1, colorpicker_outline),
  6721. Color = theme.inline,
  6722. Visible = page.open
  6723. }, section.visibleContent)
  6724. --
  6725. library.colors[colorpicker_inline] = {
  6726. Color = "inline"
  6727. }
  6728. --
  6729. local colorpicker__transparency
  6730. if transp then
  6731. colorpicker__transparency = utility:Create("Image", {Vector2.new(1,1), colorpicker_inline}, {
  6732. Size = utility:Size(1, -2, 1, -2, colorpicker_inline),
  6733. Position = utility:Position(0, 1, 0 , 1, colorpicker_inline),
  6734. Visible = page.open
  6735. }, section.visibleContent)
  6736. end
  6737. --
  6738. local colorpicker_frame = utility:Create("Frame", {Vector2.new(1,1), colorpicker_inline}, {
  6739. Size = utility:Size(1, -2, 1, -2, colorpicker_inline),
  6740. Position = utility:Position(0, 1, 0, 1, colorpicker_inline),
  6741. Color = def,
  6742. Transparency = transp and (1 - transp) or 1,
  6743. Visible = page.open
  6744. }, section.visibleContent)
  6745. --
  6746. local colorpicker__gradient = utility:Create("Image", {Vector2.new(0,0), colorpicker_frame}, {
  6747. Size = utility:Size(1, 0, 1, 0, colorpicker_frame),
  6748. Position = utility:Position(0, 0, 0 , 0, colorpicker_frame),
  6749. Transparency = 0.5,
  6750. Visible = page.open
  6751. }, section.visibleContent)
  6752. --
  6753. if transp then
  6754. utility:LoadImage(colorpicker__transparency, "cptransp", "https://i.imgur.com/IIPee2A.png")
  6755. end
  6756. utility:LoadImage(colorpicker__gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")
  6757. --
  6758. function colorpicker:Set(color, transp_val)
  6759. if typeof(color) == "table" then
  6760. colorpicker.current = color
  6761. colorpicker_frame.Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  6762. colorpicker_frame.Transparency = 1 - colorpicker.current[4]
  6763. callback(Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3]), colorpicker.current[4])
  6764. elseif typeof(color) == "Color3" then
  6765. local h, s, v = color:ToHSV()
  6766. colorpicker.current = {h, s, v, (transp_val or 0)}
  6767. colorpicker_frame.Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  6768. colorpicker_frame.Transparency = 1 - colorpicker.current[4]
  6769. callback(Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3]), colorpicker.current[4])
  6770. end
  6771. end
  6772. --
  6773. function colorpicker:Refresh()
  6774. local mouseLocation = utility:MouseLocation()
  6775. if colorpicker.open and colorpicker.holder.picker and colorpicker.holding.picker then
  6776. colorpicker.current[2] = math.clamp(mouseLocation.X - colorpicker.holder.picker.Position.X, 0, colorpicker.holder.picker.Size.X) / colorpicker.holder.picker.Size.X
  6777. --
  6778. colorpicker.current[3] = 1-(math.clamp(mouseLocation.Y - colorpicker.holder.picker.Position.Y, 0, colorpicker.holder.picker.Size.Y) / colorpicker.holder.picker.Size.Y)
  6779. --
  6780. colorpicker.holder.picker_cursor.Position = utility:Position(colorpicker.current[2], -3, 1-colorpicker.current[3] , -3, colorpicker.holder.picker)
  6781. --
  6782. utility:UpdateOffset(colorpicker.holder.picker_cursor, {Vector2.new((colorpicker.holder.picker.Size.X*colorpicker.current[2])-3,(colorpicker.holder.picker.Size.Y*(1-colorpicker.current[3]))-3), colorpicker.holder.picker})
  6783. --
  6784. if colorpicker.holder.transparencybg then
  6785. colorpicker.holder.transparencybg.Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  6786. end
  6787. elseif colorpicker.open and colorpicker.holder.huepicker and colorpicker.holding.huepicker then
  6788. colorpicker.current[1] = (math.clamp(mouseLocation.Y - colorpicker.holder.huepicker.Position.Y, 0, colorpicker.holder.huepicker.Size.Y) / colorpicker.holder.huepicker.Size.Y)
  6789. --
  6790. colorpicker.holder.huepicker_cursor[1].Position = utility:Position(0, -3, colorpicker.current[1], -3, colorpicker.holder.huepicker)
  6791. colorpicker.holder.huepicker_cursor[2].Position = utility:Position(0, 1, 0, 1, colorpicker.holder.huepicker_cursor[1])
  6792. colorpicker.holder.huepicker_cursor[3].Position = utility:Position(0, 1, 0, 1, colorpicker.holder.huepicker_cursor[2])
  6793. colorpicker.holder.huepicker_cursor[3].Color = Color3.fromHSV(colorpicker.current[1], 1, 1)
  6794. --
  6795. utility:UpdateOffset(colorpicker.holder.huepicker_cursor[1], {Vector2.new(-3,(colorpicker.holder.huepicker.Size.Y*colorpicker.current[1])-3), colorpicker.holder.huepicker})
  6796. --
  6797. colorpicker.holder.background.Color = Color3.fromHSV(colorpicker.current[1], 1, 1)
  6798. --
  6799. if colorpicker.holder.transparency_cursor and colorpicker.holder.transparency_cursor[3] then
  6800. colorpicker.holder.transparency_cursor[3].Color = Color3.fromHSV(0, 0, 1 - colorpicker.current[4])
  6801. end
  6802. --
  6803. if colorpicker.holder.transparencybg then
  6804. colorpicker.holder.transparencybg.Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  6805. end
  6806. elseif colorpicker.open and colorpicker.holder.transparency and colorpicker.holding.transparency then
  6807. colorpicker.current[4] = 1 - (math.clamp(mouseLocation.X - colorpicker.holder.transparency.Position.X, 0, colorpicker.holder.transparency.Size.X) / colorpicker.holder.transparency.Size.X)
  6808. --
  6809. colorpicker.holder.transparency_cursor[1].Position = utility:Position(1-colorpicker.current[4], -3, 0, -3, colorpicker.holder.transparency)
  6810. colorpicker.holder.transparency_cursor[2].Position = utility:Position(0, 1, 0, 1, colorpicker.holder.transparency_cursor[1])
  6811. colorpicker.holder.transparency_cursor[3].Position = utility:Position(0, 1, 0, 1, colorpicker.holder.transparency_cursor[2])
  6812. colorpicker.holder.transparency_cursor[3].Color = Color3.fromHSV(0, 0, 1 - colorpicker.current[4])
  6813. colorpicker_frame.Transparency = (1 - colorpicker.current[4])
  6814. --
  6815. utility:UpdateTransparency(colorpicker_frame, (1 - colorpicker.current[4]))
  6816. utility:UpdateOffset(colorpicker.holder.transparency_cursor[1], {Vector2.new((colorpicker.holder.transparency.Size.X*(1-colorpicker.current[4]))-3,-3), colorpicker.holder.transparency})
  6817. --
  6818. colorpicker.holder.background.Color = Color3.fromHSV(colorpicker.current[1], 1, 1)
  6819. end
  6820. --
  6821. colorpicker:Set(colorpicker.current)
  6822. end
  6823. --
  6824. function colorpicker:Get()
  6825. return Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  6826. end
  6827. --
  6828. library.began[#library.began + 1] = function(Input)
  6829. if Input.UserInputType == Enum.UserInputType.MouseButton1 and window.isVisible and colorpicker_outline.Visible then
  6830. if colorpicker.open and colorpicker.holder.inline and utility:MouseOverDrawing({colorpicker.holder.inline.Position.X, colorpicker.holder.inline.Position.Y, colorpicker.holder.inline.Position.X + colorpicker.holder.inline.Size.X, colorpicker.holder.inline.Position.Y + colorpicker.holder.inline.Size.Y}) then
  6831. if colorpicker.holder.picker and utility:MouseOverDrawing({colorpicker.holder.picker.Position.X - 2, colorpicker.holder.picker.Position.Y - 2, colorpicker.holder.picker.Position.X - 2 + colorpicker.holder.picker.Size.X + 4, colorpicker.holder.picker.Position.Y - 2 + colorpicker.holder.picker.Size.Y + 4}) then
  6832. colorpicker.holding.picker = true
  6833. colorpicker:Refresh()
  6834. elseif colorpicker.holder.huepicker and utility:MouseOverDrawing({colorpicker.holder.huepicker.Position.X - 2, colorpicker.holder.huepicker.Position.Y - 2, colorpicker.holder.huepicker.Position.X - 2 + colorpicker.holder.huepicker.Size.X + 4, colorpicker.holder.huepicker.Position.Y - 2 + colorpicker.holder.huepicker.Size.Y + 4}) then
  6835. colorpicker.holding.huepicker = true
  6836. colorpicker:Refresh()
  6837. elseif colorpicker.holder.transparency and utility:MouseOverDrawing({colorpicker.holder.transparency.Position.X - 2, colorpicker.holder.transparency.Position.Y - 2, colorpicker.holder.transparency.Position.X - 2 + colorpicker.holder.transparency.Size.X + 4, colorpicker.holder.transparency.Position.Y - 2 + colorpicker.holder.transparency.Size.Y + 4}) then
  6838. colorpicker.holding.transparency = true
  6839. colorpicker:Refresh()
  6840. end
  6841. elseif utility:MouseOverDrawing({section.section_frame.Position.X + (section.section_frame.Size.X - (30 + 4 + 2)), section.section_frame.Position.Y + colorpicker.axis, section.section_frame.Position.X + section.section_frame.Size.X, section.section_frame.Position.Y + colorpicker.axis + 15}) and not window:IsOverContent() then
  6842. if not colorpicker.open then
  6843. window:CloseContent()
  6844. colorpicker.open = not colorpicker.open
  6845. --
  6846. local colorpicker_open_outline = utility:Create("Frame", {Vector2.new(4,colorpicker.axis + 19), section.section_frame}, {
  6847. Size = utility:Size(1, -8, 0, transp and 219 or 200, section.section_frame),
  6848. Position = utility:Position(0, 4, 0, colorpicker.axis + 19, section.section_frame),
  6849. Color = theme.outline
  6850. }, colorpicker.holder.drawings);colorpicker.holder.inline = colorpicker_open_outline
  6851. --
  6852. library.colors[colorpicker_open_outline] = {
  6853. Color = "outline"
  6854. }
  6855. --
  6856. local colorpicker_open_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_outline}, {
  6857. Size = utility:Size(1, -2, 1, -2, colorpicker_open_outline),
  6858. Position = utility:Position(0, 1, 0, 1, colorpicker_open_outline),
  6859. Color = theme.inline
  6860. }, colorpicker.holder.drawings)
  6861. --
  6862. library.colors[colorpicker_open_inline] = {
  6863. Color = "inline"
  6864. }
  6865. --
  6866. local colorpicker_open_frame = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_inline}, {
  6867. Size = utility:Size(1, -2, 1, -2, colorpicker_open_inline),
  6868. Position = utility:Position(0, 1, 0, 1, colorpicker_open_inline),
  6869. Color = theme.darkcontrast
  6870. }, colorpicker.holder.drawings)
  6871. --
  6872. library.colors[colorpicker_open_frame] = {
  6873. Color = "darkcontrast"
  6874. }
  6875. --
  6876. local colorpicker_open_accent = utility:Create("Frame", {Vector2.new(0,0), colorpicker_open_frame}, {
  6877. Size = utility:Size(1, 0, 0, 2, colorpicker_open_frame),
  6878. Position = utility:Position(0, 0, 0, 0, colorpicker_open_frame),
  6879. Color = theme.accent
  6880. }, colorpicker.holder.drawings)
  6881. --
  6882. library.colors[colorpicker_open_accent] = {
  6883. Color = "accent"
  6884. }
  6885. --
  6886. local colorpicker_title = utility:Create("TextLabel", {Vector2.new(4,2), colorpicker_open_frame}, {
  6887. Text = cpinfo,
  6888. Size = theme.textsize,
  6889. Font = theme.font,
  6890. Color = theme.textcolor,
  6891. OutlineColor = theme.textborder,
  6892. Position = utility:Position(0, 4, 0, 2, colorpicker_open_frame),
  6893. }, colorpicker.holder.drawings)
  6894. --
  6895. library.colors[colorpicker_title] = {
  6896. OutlineColor = "textborder",
  6897. Color = "textcolor"
  6898. }
  6899. --
  6900. local colorpicker_open_picker_outline = utility:Create("Frame", {Vector2.new(4,17), colorpicker_open_frame}, {
  6901. Size = utility:Size(1, -27, 1, transp and -40 or -21, colorpicker_open_frame),
  6902. Position = utility:Position(0, 4, 0, 17, colorpicker_open_frame),
  6903. Color = theme.outline
  6904. }, colorpicker.holder.drawings)
  6905. --
  6906. library.colors[colorpicker_open_picker_outline] = {
  6907. Color = "outline"
  6908. }
  6909. --
  6910. local colorpicker_open_picker_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_picker_outline}, {
  6911. Size = utility:Size(1, -2, 1, -2, colorpicker_open_picker_outline),
  6912. Position = utility:Position(0, 1, 0, 1, colorpicker_open_picker_outline),
  6913. Color = theme.inline
  6914. }, colorpicker.holder.drawings)
  6915. --
  6916. library.colors[colorpicker_open_picker_inline] = {
  6917. Color = "inline"
  6918. }
  6919. --
  6920. local colorpicker_open_picker_bg = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_picker_inline}, {
  6921. Size = utility:Size(1, -2, 1, -2, colorpicker_open_picker_inline),
  6922. Position = utility:Position(0, 1, 0, 1, colorpicker_open_picker_inline),
  6923. Color = Color3.fromHSV(colorpicker.current[1],1,1)
  6924. }, colorpicker.holder.drawings);colorpicker.holder.background = colorpicker_open_picker_bg
  6925. --
  6926. local colorpicker_open_picker_image = utility:Create("Image", {Vector2.new(0,0), colorpicker_open_picker_bg}, {
  6927. Size = utility:Size(1, 0, 1, 0, colorpicker_open_picker_bg),
  6928. Position = utility:Position(0, 0, 0 , 0, colorpicker_open_picker_bg),
  6929. }, colorpicker.holder.drawings);colorpicker.holder.picker = colorpicker_open_picker_image
  6930. --
  6931. local colorpicker_open_picker_cursor = utility:Create("Image", {Vector2.new((colorpicker_open_picker_image.Size.X*colorpicker.current[2])-3,(colorpicker_open_picker_image.Size.Y*(1-colorpicker.current[3]))-3), colorpicker_open_picker_image}, {
  6932. Size = utility:Size(0, 6, 0, 6, colorpicker_open_picker_image),
  6933. Position = utility:Position(colorpicker.current[2], -3, 1-colorpicker.current[3] , -3, colorpicker_open_picker_image),
  6934. }, colorpicker.holder.drawings);colorpicker.holder.picker_cursor = colorpicker_open_picker_cursor
  6935. --
  6936. local colorpicker_open_huepicker_outline = utility:Create("Frame", {Vector2.new(colorpicker_open_frame.Size.X-19,17), colorpicker_open_frame}, {
  6937. Size = utility:Size(0, 15, 1, transp and -40 or -21, colorpicker_open_frame),
  6938. Position = utility:Position(1, -19, 0, 17, colorpicker_open_frame),
  6939. Color = theme.outline
  6940. }, colorpicker.holder.drawings)
  6941. --
  6942. library.colors[colorpicker_open_huepicker_outline] = {
  6943. Color = "outline"
  6944. }
  6945. --
  6946. local colorpicker_open_huepicker_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_huepicker_outline}, {
  6947. Size = utility:Size(1, -2, 1, -2, colorpicker_open_huepicker_outline),
  6948. Position = utility:Position(0, 1, 0, 1, colorpicker_open_huepicker_outline),
  6949. Color = theme.inline
  6950. }, colorpicker.holder.drawings)
  6951. --
  6952. library.colors[colorpicker_open_huepicker_inline] = {
  6953. Color = "inline"
  6954. }
  6955. --
  6956. local colorpicker_open_huepicker_image = utility:Create("Image", {Vector2.new(1,1), colorpicker_open_huepicker_inline}, {
  6957. Size = utility:Size(1, -2, 1, -2, colorpicker_open_huepicker_inline),
  6958. Position = utility:Position(0, 1, 0 , 1, colorpicker_open_huepicker_inline),
  6959. }, colorpicker.holder.drawings);colorpicker.holder.huepicker = colorpicker_open_huepicker_image
  6960. --
  6961. local colorpicker_open_huepicker_cursor_outline = utility:Create("Frame", {Vector2.new(-3,(colorpicker_open_huepicker_image.Size.Y*colorpicker.current[1])-3), colorpicker_open_huepicker_image}, {
  6962. Size = utility:Size(1, 6, 0, 6, colorpicker_open_huepicker_image),
  6963. Position = utility:Position(0, -3, colorpicker.current[1], -3, colorpicker_open_huepicker_image),
  6964. Color = theme.outline
  6965. }, colorpicker.holder.drawings);colorpicker.holder.huepicker_cursor[1] = colorpicker_open_huepicker_cursor_outline
  6966. --
  6967. library.colors[colorpicker_open_huepicker_cursor_outline] = {
  6968. Color = "outline"
  6969. }
  6970. --
  6971. local colorpicker_open_huepicker_cursor_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_huepicker_cursor_outline}, {
  6972. Size = utility:Size(1, -2, 1, -2, colorpicker_open_huepicker_cursor_outline),
  6973. Position = utility:Position(0, 1, 0, 1, colorpicker_open_huepicker_cursor_outline),
  6974. Color = theme.textcolor
  6975. }, colorpicker.holder.drawings);colorpicker.holder.huepicker_cursor[2] = colorpicker_open_huepicker_cursor_inline
  6976. --
  6977. library.colors[colorpicker_open_huepicker_cursor_inline] = {
  6978. Color = "textcolor"
  6979. }
  6980. --
  6981. local colorpicker_open_huepicker_cursor_color = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_huepicker_cursor_inline}, {
  6982. Size = utility:Size(1, -2, 1, -2, colorpicker_open_huepicker_cursor_inline),
  6983. Position = utility:Position(0, 1, 0, 1, colorpicker_open_huepicker_cursor_inline),
  6984. Color = Color3.fromHSV(colorpicker.current[1], 1, 1)
  6985. }, colorpicker.holder.drawings);colorpicker.holder.huepicker_cursor[3] = colorpicker_open_huepicker_cursor_color
  6986. --
  6987. if transp then
  6988. local colorpicker_open_transparency_outline = utility:Create("Frame", {Vector2.new(4,colorpicker_open_frame.Size.Y-19), colorpicker_open_frame}, {
  6989. Size = utility:Size(1, -27, 0, 15, colorpicker_open_frame),
  6990. Position = utility:Position(0, 4, 1, -19, colorpicker_open_frame),
  6991. Color = theme.outline
  6992. }, colorpicker.holder.drawings)
  6993. --
  6994. library.colors[colorpicker_open_transparency_outline] = {
  6995. Color = "outline"
  6996. }
  6997. --
  6998. local colorpicker_open_transparency_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_transparency_outline}, {
  6999. Size = utility:Size(1, -2, 1, -2, colorpicker_open_transparency_outline),
  7000. Position = utility:Position(0, 1, 0, 1, colorpicker_open_transparency_outline),
  7001. Color = theme.inline
  7002. }, colorpicker.holder.drawings)
  7003. --
  7004. library.colors[colorpicker_open_transparency_inline] = {
  7005. Color = "inline"
  7006. }
  7007. --
  7008. local colorpicker_open_transparency_bg = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_transparency_inline}, {
  7009. Size = utility:Size(1, -2, 1, -2, colorpicker_open_transparency_inline),
  7010. Position = utility:Position(0, 1, 0, 1, colorpicker_open_transparency_inline),
  7011. Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  7012. }, colorpicker.holder.drawings);colorpicker.holder.transparencybg = colorpicker_open_transparency_bg
  7013. --
  7014. local colorpicker_open_transparency_image = utility:Create("Image", {Vector2.new(1,1), colorpicker_open_transparency_inline}, {
  7015. Size = utility:Size(1, -2, 1, -2, colorpicker_open_transparency_inline),
  7016. Position = utility:Position(0, 1, 0 , 1, colorpicker_open_transparency_inline),
  7017. }, colorpicker.holder.drawings);colorpicker.holder.transparency = colorpicker_open_transparency_image
  7018. --
  7019. local colorpicker_open_transparency_cursor_outline = utility:Create("Frame", {Vector2.new((colorpicker_open_transparency_image.Size.X*(1-colorpicker.current[4]))-3,-3), colorpicker_open_transparency_image}, {
  7020. Size = utility:Size(0, 6, 1, 6, colorpicker_open_transparency_image),
  7021. Position = utility:Position(1-colorpicker.current[4], -3, 0, -3, colorpicker_open_transparency_image),
  7022. Color = theme.outline
  7023. }, colorpicker.holder.drawings);colorpicker.holder.transparency_cursor[1] = colorpicker_open_transparency_cursor_outline
  7024. --
  7025. library.colors[colorpicker_open_transparency_cursor_outline] = {
  7026. Color = "outline"
  7027. }
  7028. --
  7029. local colorpicker_open_transparency_cursor_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_transparency_cursor_outline}, {
  7030. Size = utility:Size(1, -2, 1, -2, colorpicker_open_transparency_cursor_outline),
  7031. Position = utility:Position(0, 1, 0, 1, colorpicker_open_transparency_cursor_outline),
  7032. Color = theme.textcolor
  7033. }, colorpicker.holder.drawings);colorpicker.holder.transparency_cursor[2] = colorpicker_open_transparency_cursor_inline
  7034. --
  7035. library.colors[colorpicker_open_transparency_cursor_inline] = {
  7036. Color = "textcolor"
  7037. }
  7038. --
  7039. local colorpicker_open_transparency_cursor_color = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_transparency_cursor_inline}, {
  7040. Size = utility:Size(1, -2, 1, -2, colorpicker_open_transparency_cursor_inline),
  7041. Position = utility:Position(0, 1, 0, 1, colorpicker_open_transparency_cursor_inline),
  7042. Color = Color3.fromHSV(0, 0, 1 - colorpicker.current[4]),
  7043. }, colorpicker.holder.drawings);colorpicker.holder.transparency_cursor[3] = colorpicker_open_transparency_cursor_color
  7044. --
  7045. utility:LoadImage(colorpicker_open_transparency_image, "transp", "https://i.imgur.com/ncssKbH.png")
  7046. --utility:LoadImage(colorpicker_open_transparency_image, "transp", "https://i.imgur.com/VcMAYjL.png")
  7047. end
  7048. --
  7049. utility:LoadImage(colorpicker_open_picker_image, "valsat", "https://i.imgur.com/wpDRqVH.png")
  7050. --// utility:LoadImage(colorpicker_open_picker_cursor, "valsat_cursor", "https://raw.githubusercontent.com/mvonwalk/splix-assets/main/Images-cursor.png")
  7051. utility:LoadImage(colorpicker_open_huepicker_image, "hue", "https://i.imgur.com/iEOsHFv.png")
  7052. --
  7053. window.currentContent.frame = colorpicker_open_inline
  7054. window.currentContent.colorpicker = colorpicker
  7055. else
  7056. colorpicker.open = not colorpicker.open
  7057. --
  7058. for i,v in pairs(colorpicker.holder.drawings) do
  7059. utility:Remove(v)
  7060. end
  7061. --
  7062. colorpicker.holder.drawings = {}
  7063. colorpicker.holder.inline = nil
  7064. --
  7065. window.currentContent.frame = nil
  7066. window.currentContent.colorpicker = nil
  7067. end
  7068. else
  7069. if colorpicker.open then
  7070. colorpicker.open = not colorpicker.open
  7071. --
  7072. for i,v in pairs(colorpicker.holder.drawings) do
  7073. utility:Remove(v)
  7074. end
  7075. --
  7076. colorpicker.holder.drawings = {}
  7077. colorpicker.holder.inline = nil
  7078. --
  7079. window.currentContent.frame = nil
  7080. window.currentContent.colorpicker = nil
  7081. end
  7082. end
  7083. elseif Input.UserInputType == Enum.UserInputType.MouseButton1 and colorpicker.open then
  7084. colorpicker.open = not colorpicker.open
  7085. --
  7086. for i,v in pairs(colorpicker.holder.drawings) do
  7087. utility:Remove(v)
  7088. end
  7089. --
  7090. colorpicker.holder.drawings = {}
  7091. colorpicker.holder.inline = nil
  7092. --
  7093. window.currentContent.frame = nil
  7094. window.currentContent.colorpicker = nil
  7095. end
  7096. end
  7097. --
  7098. library.ended[#library.ended + 1] = function(Input)
  7099. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  7100. if colorpicker.holding.picker then
  7101. colorpicker.holding.picker = not colorpicker.holding.picker
  7102. end
  7103. if colorpicker.holding.huepicker then
  7104. colorpicker.holding.huepicker = not colorpicker.holding.huepicker
  7105. end
  7106. if colorpicker.holding.transparency then
  7107. colorpicker.holding.transparency = not colorpicker.holding.transparency
  7108. end
  7109. end
  7110. end
  7111. --
  7112. library.changed[#library.changed + 1] = function()
  7113. if colorpicker.open and colorpicker.holding.picker or colorpicker.holding.huepicker or colorpicker.holding.transparency then
  7114. if window.isVisible then
  7115. colorpicker:Refresh()
  7116. else
  7117. if colorpicker.holding.picker then
  7118. colorpicker.holding.picker = not colorpicker.holding.picker
  7119. end
  7120. if colorpicker.holding.huepicker then
  7121. colorpicker.holding.huepicker = not colorpicker.holding.huepicker
  7122. end
  7123. if colorpicker.holding.transparency then
  7124. colorpicker.holding.transparency = not colorpicker.holding.transparency
  7125. end
  7126. end
  7127. end
  7128. end
  7129. --
  7130. if pointer and tostring(pointer) ~= "" and tostring(pointer) ~= " " and not library.pointers[tostring(pointer)] then
  7131. library.pointers[tostring(pointer)] = keybind
  7132. end
  7133. --
  7134. return colorpicker
  7135. end
  7136. --
  7137. return colorpicker
  7138. end
  7139. --
  7140. function sections:List(info)
  7141. local info = info or {}
  7142. local max = info.max or info.Max or info.maximum or info.Maximum or 8
  7143. local current = info.def or info.Default or info.current or info.Current or 1
  7144. local options = info.options or info.Options or {"1", "2", "3"}
  7145. --
  7146. local window = self.window
  7147. local page = self.page
  7148. local section = self
  7149. local pointer = info.pointer or info.Pointer or info.flag or info.Flag or nil
  7150. --
  7151. local list = {axis = section.currentAxis, options = options, max = max, current = current, scrollingindex = 0, scrolling = {false, nil}, buttons = {}}
  7152. --
  7153. local list_outline = utility:Create("Frame", {Vector2.new(4,list.axis), section.section_frame}, {
  7154. Size = utility:Size(1, -8, 0, ((list.max * 20) + 4), section.section_frame),
  7155. Position = utility:Position(0, 4, 0, list.axis, section.section_frame),
  7156. Color = theme.outline,
  7157. Visible = page.open
  7158. }, section.visibleContent)
  7159. --
  7160. library.colors[list_outline] = {
  7161. Color = "outline"
  7162. }
  7163. --
  7164. local list_inline = utility:Create("Frame", {Vector2.new(1,1), list_outline}, {
  7165. Size = utility:Size(1, -2, 1, -2, list_outline),
  7166. Position = utility:Position(0, 1, 0, 1, list_outline),
  7167. Color = theme.inline,
  7168. Visible = page.open
  7169. }, section.visibleContent)
  7170. --
  7171. library.colors[list_inline] = {
  7172. Color = "inline"
  7173. }
  7174. --
  7175. local list_frame = utility:Create("Frame", {Vector2.new(1,1), list_inline}, {
  7176. Size = utility:Size(1, -2, 1, -2, list_inline),
  7177. Position = utility:Position(0, 1, 0, 1, list_inline),
  7178. Color = theme.lightcontrast,
  7179. Visible = page.open
  7180. }, section.visibleContent)
  7181. --
  7182. library.colors[list_frame] = {
  7183. Color = "lightcontrast"
  7184. }
  7185. --
  7186. local list_scroll = utility:Create("Frame", {Vector2.new(list_frame.Size.X - 8,0), list_frame}, {
  7187. Size = utility:Size(0, 8, 1, 0, list_frame),
  7188. Position = utility:Position(1, -8, 0, 0, list_frame),
  7189. Color = theme.darkcontrast,
  7190. Visible = page.open
  7191. }, section.visibleContent)
  7192. --
  7193. library.colors[list_scroll] = {
  7194. Color = "darkcontrast"
  7195. }
  7196. --
  7197. local list_bar = utility:Create("Frame", {Vector2.new(1,1), list_scroll}, {
  7198. Size = utility:Size(1, -2, (list.max / #list.options), -2, list_scroll),
  7199. Position = utility:Position(0, 1, 0, 1, list_scroll),
  7200. Color = theme.accent,
  7201. Visible = page.open
  7202. }, section.visibleContent)
  7203. --
  7204. library.colors[list_bar] = {
  7205. Color = "accent"
  7206. }
  7207. --
  7208. local list_gradient = utility:Create("Image", {Vector2.new(0,0), list_frame}, {
  7209. Size = utility:Size(1, 0, 1, 0, list_frame),
  7210. Position = utility:Position(0, 0, 0 , 0, list_frame),
  7211. Transparency = 0.5,
  7212. Visible = page.open
  7213. }, section.visibleContent)
  7214. --
  7215. for i=1, list.max do
  7216. local config_title = utility:Create("TextLabel", {Vector2.new(list_frame.Size.X/2,2 + (20 * (i-1))), list_frame}, {
  7217. Text = list.options[i] or "",
  7218. Size = theme.textsize,
  7219. Font = theme.font,
  7220. Color = i == 1 and theme.accent or theme.textcolor,
  7221. OutlineColor = theme.textborder,
  7222. Center = true,
  7223. Position = utility:Position(0.5, 0, 0, 2 + (20 * (i-1)), list_frame),
  7224. Visible = page.open
  7225. }, section.visibleContent)
  7226. --
  7227. library.colors[config_title] = {
  7228. OutlineColor = "textborder",
  7229. Color = i == 1 and "accent" or "textcolor"
  7230. }
  7231. --
  7232. list.buttons[i] = config_title
  7233. end
  7234. --
  7235. utility:LoadImage(list_gradient, "gradient", "https://i.imgur.com/XYVD9Mh.png")
  7236. --
  7237. function list:UpdateScroll()
  7238. if (#list.options - list.max) > 0 then
  7239. list_bar.Size = utility:Size(1, -2, (list.max / #list.options), -2, list_scroll)
  7240. list_bar.Position = utility:Position(0, 1, 0, 1 + ((((list_scroll.Size.Y - 2) - list_bar.Size.Y) / (#list.options - list.max)) * list.scrollingindex), list_scroll)
  7241. list_bar.Transparency = 1
  7242. utility:UpdateTransparency(list_bar, 1)
  7243. utility:UpdateOffset(list_bar, {Vector2.new(1, 1 + ((((list_scroll.Size.Y - 2) - list_bar.Size.Y) / (#list.options - list.max)) * list.scrollingindex)), list_scroll})
  7244. else
  7245. list.scrollingindex = 0
  7246. list_bar.Transparency = 0
  7247. utility:UpdateTransparency(list_bar, 0)
  7248. end
  7249. --
  7250. list:Refresh()
  7251. end
  7252. --
  7253. function list:Refresh()
  7254. for Index, Value in pairs(list.buttons) do
  7255. Value.Text = list.options[Index + list.scrollingindex] or ""
  7256. Value.Color = (Index + list.scrollingindex) == list.current and theme.accent or theme.textcolor
  7257. --
  7258. library.colors[Value] = {
  7259. OutlineColor = "textborder",
  7260. Color = (Index + list.scrollingindex) == list.current and "accent" or "textcolor"
  7261. }
  7262. end
  7263. end
  7264. --
  7265. function list:Get()
  7266. return list.options[list.current + list.scrollingindex]
  7267. end
  7268. --
  7269. function list:Set(current)
  7270. list.current = current
  7271. list:Refresh()
  7272. end
  7273. --
  7274. library.began[#library.began + 1] = function(Input)
  7275. if Input.UserInputType == Enum.UserInputType.MouseButton1 and list_outline.Visible and window.isVisible then
  7276. if utility:MouseOverDrawing({list_bar.Position.X, list_bar.Position.Y, list_bar.Position.X + list_bar.Size.X, list_bar.Position.Y + list_bar.Size.Y}) then
  7277. list.scrolling = {true, (utility:MouseLocation().Y - list_bar.Position.Y)}
  7278. elseif utility:MouseOverDrawing({section.section_frame.Position.X, section.section_frame.Position.Y + list.axis, section.section_frame.Position.X + section.section_frame.Size.X, section.section_frame.Position.Y + list.axis + ((list.max * 20) + 4)}) and not window:IsOverContent() then
  7279. for i=1, list.max do
  7280. if utility:MouseOverDrawing({section.section_frame.Position.X, section.section_frame.Position.Y + list.axis + 2 + (20 * (i-1)), section.section_frame.Position.X + section.section_frame.Size.X, section.section_frame.Position.Y + list.axis + 2 + (20 * (i-1)) + 20}) then
  7281. list.current = (i + list.scrollingindex)
  7282. list:Refresh()
  7283. end
  7284. end
  7285. end
  7286. end
  7287. end
  7288. --
  7289. library.ended[#library.ended + 1] = function(Input)
  7290. if list.scrolling[1] and Input.UserInputType == Enum.UserInputType.MouseButton1 then
  7291. list.scrolling = {false, nil}
  7292. end
  7293. end
  7294. --
  7295. library.changed[#library.changed + 1] = function(Input)
  7296. if list.scrolling[1] then
  7297. local MouseLocation = utility:MouseLocation()
  7298. local Position = math.clamp((MouseLocation.Y - list_scroll.Position.Y - list.scrolling[2]), 0, ((list_scroll.Size.Y - list_bar.Size.Y)))
  7299. --
  7300. list.scrollingindex = math.round((((Position + list_scroll.Position.Y) - list_scroll.Position.Y) / ((list_scroll.Size.Y - list_bar.Size.Y))) * (#list.options - list.max))
  7301. list:UpdateScroll()
  7302. end
  7303. end
  7304. --
  7305. utility:Connection(mouse.WheelForward,function()
  7306. if page.open and list_bar.Visible and utility:MouseOverDrawing({section.section_frame.Position.X, section.section_frame.Position.Y + list.axis, section.section_frame.Position.X + section.section_frame.Size.X, section.section_frame.Position.Y + list.axis + ((list.max * 20) + 4)}) and not window:IsOverContent() then
  7307. list.scrollingindex = math.clamp(list.scrollingindex - 1, 0, #list.options - list.max)
  7308. list:UpdateScroll()
  7309. end
  7310. end)
  7311. --
  7312. utility:Connection(mouse.WheelBackward,function()
  7313. if page.open and list_bar.Visible and utility:MouseOverDrawing({section.section_frame.Position.X, section.section_frame.Position.Y + list.axis, section.section_frame.Position.X + section.section_frame.Size.X, section.section_frame.Position.Y + list.axis + ((list.max * 20) + 4)}) and not window:IsOverContent() then
  7314. list.scrollingindex = math.clamp(list.scrollingindex + 1, 0, #list.options - list.max)
  7315. list:UpdateScroll()
  7316. end
  7317. end)
  7318. --
  7319. if pointer and tostring(pointer) ~= "" and tostring(pointer) ~= " " and not library.pointers[tostring(pointer)] then
  7320. library.pointers[tostring(pointer)] = list
  7321. end
  7322. --y
  7323. list:UpdateScroll()
  7324. --
  7325. section.currentAxis = section.currentAxis + ((list.max * 20) + 4) + 4
  7326. --
  7327. return list
  7328. end
  7329. end
  7330. -- // Init
  7331. --[[do
  7332. local title_string = "Splix - Private | %A, %B"
  7333. local day = os.date(" %d", os.time())
  7334. local second_string = ", %Y."
  7335. title_string = os.date(title_string, os.time())..day..utility:GetSubPrefix(day)..os.date(second_string, os.time())
  7336. --
  7337. local lib = library:New({name = title_string})
  7338. --
  7339. local aimbot = lib:Page({name = "Aimbot"})
  7340. local visuals = lib:Page({name = "Visuals"})
  7341. local exploits = lib:Page({name = "Exploits"})
  7342. local misc = lib:Page({name = "Miscellaneous"})
  7343. --
  7344. local aimbot_main = aimbot:Section({name = "Main"})
  7345. local aimbot_br = aimbot:Section({name = "Bullet Redirection",side = "right"})
  7346. local aimbot_m, aimbot_mi, aimbot_s = aimbot:MultiSection({sections = {"Main", "Misc", "Settings"}, side = "left"})
  7347. --
  7348. local visuals_team, visuals_enemies, visuals_allies = visuals:MultiSection({sections = {"Team", "Enemies", "Allies"}, side = "left"})
  7349. local visuals_player = visuals:Section({name = "Players"})
  7350. local visuals_miscellaneous = visuals:Section({name = "Miscellaneous",side = "right"})
  7351. --
  7352. local exploits_main = exploits:Section({name = "Main"})
  7353. local exploits_skin = exploits:Section({name = "Skin Changer",side = "right"})
  7354. local exploits_freeze = exploits:Section({name = "Freeze Players"})
  7355. --
  7356. local misc_main = misc:Section({name = "Main"})
  7357. local misc_adj = misc:Section({name = "Adjustments",side = "right"})
  7358. --
  7359. local asd = aimbot_m:Toggle({name = "Aimbot Toggle", def = true, pointer = "aimbot_toggle"})
  7360. asd:Colorpicker({info = "Aimbot FOV Color", def = Color3.fromRGB(0,255,150), transparency = 0.5})
  7361. asd:Colorpicker({info = "Aimbot Outline FOV Color", def = Color3.fromRGB(45,45,45), transparency = 0.25})
  7362. aimbot_s:Label({name = "Some of the features\nhere, May be unsafe.\nUse with caution."})
  7363. aimbot_mi:Colorpicker({info = "Aimbot FOV Color", def = Color3.fromRGB(0,255,150), transparency = 0.5})
  7364. aimbot_mi:Multibox({name = "Aimbot Hitpart", min = 1, options = {"Head", "Torso", "Arms", "Legs"}, def = {"Head", "Torso"}})
  7365. aimbot_s:Dropdown({name = "Aimbot Hitpart", options = {"Head", "Torso", "Arms", "Legs"}, def = "Head"})
  7366. --
  7367. aimbot_main:Label({name = "Some of the features\nhere, May be unsafe.\nUse with caution."})
  7368. local aimbot_toggle = aimbot_main:Toggle({name = "Aimbot Toggle", def = true, pointer = "aimbot_toggle"})
  7369. aimbot_toggle:Colorpicker({info = "Aimbot FOV Color", def = Color3.fromRGB(0,255,150), transparency = 0.5})
  7370. aimbot_toggle:Colorpicker({info = "Aimbot Outline FOV Color", def = Color3.fromRGB(45,45,45), transparency = 0.25})
  7371. aimbot_main:Colorpicker({name = "Locking Color", info = "Aimbot Locked Player Color", def = Color3.fromRGB(205,50,50)}):Colorpicker({info = "Aimbot Outline FOV Color", def = Color3.fromRGB(45,45,45), transparency = 0.25})
  7372. aimbot_main:Toggle({name = "Aimbot Visible", def = true})
  7373. aimbot_main:Slider({name = "Watermark X Offset", min = 0, max = utility:GetScreenSize().X, def = 100, decimals = 1, callback = function(value)
  7374. if lib.watermark and lib.watermark.outline then
  7375. lib.watermark:Update("Offset", Vector2.new(value, lib.watermark.outline.Position.Y))
  7376. end
  7377. end})
  7378. aimbot_main:Slider({name = "Watermark Y Offset", min = 0, max = utility:GetScreenSize().Y, def = 38/2-10, decimals = 1, callback = function(value)
  7379. if lib.watermark and lib.watermark.outline then
  7380. lib.watermark:Update("Offset", Vector2.new(lib.watermark.outline.Position.X, value))
  7381. end
  7382. end})
  7383. aimbot_main:Slider({name = "Aimbot Field Of View", min = 0, max = 1000, def = 125, suffix = "°"})
  7384. aimbot_main:Toggle({name = "Aimbot Toggle", def = true, pointer = "aimbot_toggle"}):Keybind({callback = function(input, active) print(active) end})
  7385. aimbot_main:Keybind({name = "Aimbot Keybind", mode = "Toggle", callback = function(input, active) print(active) end})
  7386. aimbot_main:Keybind({name = "Aimbot Keybind", mode = "On Hold", callback = function(input, active) print(active) end})
  7387. aimbot_main:Multibox({name = "Aimbot Hitpart", min = 1, options = {"Head", "Torso", "Arms", "Legs"}, def = {"Head", "Torso"}})
  7388. aimbot_main:Dropdown({name = "Aimbot Hitpart", options = {"Head", "Torso", "Arms", "Legs"}, def = "Head"})
  7389. --
  7390. aimbot_br:Toggle({name = "Bullet Redirection Toggle", def = true})
  7391. aimbot_br:Slider({name = "B.R. Hitchance", min = 0, max = 100, def = 65, suffix = "%"})
  7392. aimbot_br:Slider({name = "B.R. Accuracy", min = 0, max = 100, def = 90, suffix = "%"})
  7393. --
  7394. visuals_team:Toggle({name = "Draw Boxes", def = true})
  7395. visuals_team:Toggle({name = "Draw Names", def = true})
  7396. visuals_team:Toggle({name = "Draw Health", def = true})
  7397. --
  7398. visuals_enemies:Toggle({name = "Draw Boxes", def = true})
  7399. visuals_enemies:Toggle({name = "Draw Names", def = true})
  7400. visuals_enemies:Toggle({name = "Draw Health", def = true})
  7401. --
  7402. visuals_allies:Toggle({name = "Draw Boxes", def = true})
  7403. visuals_allies:Toggle({name = "Draw Names", def = true})
  7404. visuals_allies:Toggle({name = "Draw Health", def = true})
  7405.  
  7406. --
  7407. visuals_miscellaneous:Toggle({name = "Draw Field Of View"})
  7408. visuals_miscellaneous:Toggle({name = "Draw Server Position"})
  7409. --
  7410. exploits_main:Toggle({name = "God Mode"})
  7411. exploits_main:Toggle({name = "Bypass Suppresion"})
  7412. exploits_main:Toggle({name = "Bypass Fall"})
  7413. exploits_main:Button({name = "Stress Server"})
  7414. exploits_main:Button({name = "Crash Server"})
  7415. --
  7416. exploits_freeze:Toggle({name = "Freeze Toggle"})
  7417. exploits_freeze:Toggle({name = "Freeze On Shoot"})
  7418. exploits_freeze:Slider({name = "Freeze Interval", min = 1, max = 3000, def = 1000, suffix = "ms"})
  7419. --
  7420. exploits_skin:Toggle({name = "Custom Skin"})
  7421. exploits_skin:Slider({name = "Skin Offset Vertical", min = 0, max = 4, def = 1, decimals = 0.01})
  7422. exploits_skin:Slider({name = "Skin Offset Horizontal", min = 0, max = 4, def = 1, decimals = 0.01})
  7423. exploits_skin:Slider({name = "Skin Studs Vertical", min = 0, max = 4, def = 1, decimals = 0.01})
  7424. exploits_skin:Slider({name = "Skin Studs Horizontal", min = 0, max = 4, def = 1, decimals = 0.01})
  7425. --
  7426. misc_main:Toggle({name = "Fly"})
  7427. misc_main:Toggle({name = "Auto Spot", def = true})
  7428. misc_main:Toggle({name = "Hit Logs", def = true})
  7429. misc_main:Toggle({name = "Chat Spam"})
  7430. misc_main:Toggle({name = "Auto Vote"})
  7431. misc_main:Dropdown({name = "Auto Vote Options", options = {"Yes", "No"}, def = "Yes"})
  7432. --
  7433. misc_adj:Toggle({name = "Walk Speed"})
  7434. misc_adj:Toggle({name = "Jump Height"})
  7435. misc_adj:Slider({name = "Walk Speed", min = 16, max = 200, def = 16})
  7436. misc_adj:Slider({name = "Jump Height", min = 50, max = 400, def = 50})
  7437. --
  7438. lib:Initialize()
  7439. end--]]
  7440. --
  7441. return library, utility, library.pointers, theme
Add Comment
Please, Sign In to add comment