mathljn

Untitled

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