Advertisement
unknownexploits

testwoo

Aug 30th, 2020
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 57.54 KB | None | 0 0
  1. local library = {flags = {}, windows = {}, open = true}
  2.  
  3. --Services
  4. local runService = game:GetService"RunService"
  5. local tweenService = game:GetService"TweenService"
  6. local textService = game:GetService"TextService"
  7. local inputService = game:GetService"UserInputService"
  8.  
  9. --Locals
  10. local dragging, dragInput, dragStart, startPos, dragObject
  11.  
  12. local blacklistedKeys = { --add or remove keys if you find the need to
  13. Enum.KeyCode.Unknown,Enum.KeyCode.W,Enum.KeyCode.A,Enum.KeyCode.S,Enum.KeyCode.D,Enum.KeyCode.Slash,Enum.KeyCode.Tab,Enum.KeyCode.Backspace,Enum.KeyCode.Escape
  14. }
  15. local whitelistedMouseinputs = { --add or remove mouse inputs if you find the need to
  16. Enum.UserInputType.MouseButton1,Enum.UserInputType.MouseButton2,Enum.UserInputType.MouseButton3
  17. }
  18.  
  19. --Functions
  20. local function round(num, bracket)
  21. bracket = bracket or 1
  22. local a = math.floor(num/bracket + (math.sign(num) * 0.5)) * bracket
  23. if a < 0 then
  24. a = a + bracket
  25. end
  26. return a
  27. end
  28.  
  29. local function keyCheck(x,x1)
  30. for _,v in next, x1 do
  31. if v == x then
  32. return true
  33. end
  34. end
  35. end
  36.  
  37. local function update(input)
  38. local delta = input.Position - dragStart
  39. local yPos = (startPos.Y.Offset + delta.Y) < -36 and -36 or startPos.Y.Offset + delta.Y
  40. dragObject:TweenPosition(UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, yPos), "Out", "Quint", 0.1, true)
  41. end
  42.  
  43. --From: https://devforum.roblox.com/t/how-to-create-a-simple-rainbow-effect-using-tweenService/221849/2
  44. local chromaColor
  45. local rainbowTime = 5
  46. spawn(function()
  47. while wait() do
  48. chromaColor = Color3.fromHSV(tick() % rainbowTime / rainbowTime, 1, 1)
  49. end
  50. end)
  51.  
  52. function library:Create(class, properties)
  53. properties = typeof(properties) == "table" and properties or {}
  54. local inst = Instance.new(class)
  55. for property, value in next, properties do
  56. inst[property] = value
  57. end
  58. return inst
  59. end
  60.  
  61. local function createOptionHolder(holderTitle, parent, parentTable, subHolder)
  62. local size = subHolder and 25 or 35
  63. parentTable.main = library:Create("ImageButton", {
  64. LayoutOrder = subHolder and parentTable.position or 0,
  65. Position = UDim2.new(0, 20 + (250 * (parentTable.position or 0)), 0, 20),
  66. Size = UDim2.new(0, 230, 0, size),
  67. BackgroundTransparency = 1,
  68. Image = "rbxassetid://3570695787",
  69. ImageColor3 = Color3.fromRGB(20, 20, 20),
  70. ScaleType = Enum.ScaleType.Slice,
  71. SliceCenter = Rect.new(100, 100, 100, 100),
  72. SliceScale = 0.02,
  73. ClipsDescendants = true,
  74. Parent = parent
  75. })
  76.  
  77. local round
  78. if not subHolder then
  79. round = library:Create("Frame", {
  80. Size = UDim2.new(1, 0, 0, size),
  81. BackgroundTransparency = 0,
  82. BackgroundColor3 = parentTable.open and (subHolder and Color3.fromRGB(16, 16, 16) or Color3.fromRGB(20, 20, 20)) or (subHolder and Color3.fromRGB(20, 20, 20) or Color3.fromRGB(6, 6, 6)),
  83. Parent = parentTable.main
  84. })
  85. end
  86.  
  87. local title = library:Create("TextLabel", {
  88. Size = UDim2.new(1, 0, 0, size),
  89. BackgroundTransparency = 0.5,
  90. BackgroundColor3 = Color3.fromRGB(0, 0, 0),
  91. BorderColor3 = Color3.new(0, 0, 139 / 255),
  92. BorderSizePixel = 3,
  93. Text = holderTitle,
  94. TextSize = subHolder and 20 or 21,
  95. Font = Enum.Font.Code,
  96. TextColor3 = Color3.fromRGB(255, 255, 255),
  97. Parent = parentTable.main
  98. })
  99.  
  100. parentTable.content = library:Create("Frame", {
  101. Position = UDim2.new(0, 0, 0, size),
  102. Size = UDim2.new(1, 0, 1, -size),
  103. BackgroundTransparency = 1,
  104. Parent = parentTable.main
  105. })
  106.  
  107. local layout = library:Create("UIListLayout", {
  108. SortOrder = Enum.SortOrder.LayoutOrder,
  109. Parent = parentTable.content
  110. })
  111.  
  112. layout.Changed:connect(function()
  113. parentTable.content.Size = UDim2.new(1, 0, 0, layout.AbsoluteContentSize.Y)
  114. parentTable.main.Size = #parentTable.options > 0 and parentTable.open and UDim2.new(0, 230, 0, layout.AbsoluteContentSize.Y + size) or UDim2.new(0, 230, 0, size)
  115. end)
  116.  
  117. if not subHolder then
  118. library:Create("UIPadding", {
  119. Parent = parentTable.content
  120. })
  121.  
  122. title.InputBegan:connect(function(input)
  123. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  124. dragObject = parentTable.main
  125. dragging = true
  126. dragStart = input.Position
  127. startPos = dragObject.Position
  128. end
  129. end)
  130. title.InputChanged:connect(function(input)
  131. if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
  132. dragInput = input
  133. end
  134. end)
  135. title.InputEnded:connect(function(input)
  136. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  137. dragging = false
  138. end
  139. end)
  140. end
  141.  
  142. local line = library:Create("Frame", {
  143. Position = UDim2.new(0, 0, 0, 37);
  144. Size = UDim2.new(1, 0, 0, 3);
  145. BackgroundColor3 = Color3.fromRGB(206, 7, 255);
  146. BorderSizePixel = 0;
  147. Parent = parentTable.main
  148. })
  149.  
  150. function parentTable:SetTitle(newTitle)
  151. title.Text = tostring(newTitle)
  152. end
  153.  
  154. return parentTable
  155. end
  156.  
  157. local function createLabel(option, parent)
  158. local main = library:Create("TextLabel", {
  159. LayoutOrder = option.position,
  160. Size = UDim2.new(1, 0, 0, 26),
  161. BackgroundTransparency = 1,
  162. Text = " " .. option.text,
  163. TextSize = 17,
  164. Font = Enum.Font.Gotham,
  165. TextColor3 = Color3.fromRGB(255, 255, 255),
  166. TextXAlignment = Enum.TextXAlignment.Left,
  167. Parent = parent.content
  168. })
  169.  
  170. setmetatable(option, {__newindex = function(t, i, v)
  171. if i == "Text" then
  172. main.Text = " " .. tostring(v)
  173. end
  174. end})
  175. end
  176.  
  177. function createToggle(option, parent)
  178. local main = library:Create("TextLabel", {
  179. LayoutOrder = option.position,
  180. Size = UDim2.new(1, 0, 0, 31),
  181. BackgroundTransparency = 1,
  182. Text = " " .. option.text,
  183. TextSize = 17,
  184. Font = Enum.Font.Gotham,
  185. TextColor3 = Color3.fromRGB(255, 255, 255),
  186. TextXAlignment = Enum.TextXAlignment.Left,
  187. Parent = parent.content
  188. })
  189.  
  190. local tickboxOutline = library:Create("ImageLabel", {
  191. Position = UDim2.new(1, -6, 0, 4),
  192. Size = UDim2.new(-1, 10, 1, -10),
  193. SizeConstraint = Enum.SizeConstraint.RelativeYY,
  194. BackgroundTransparency = 1,
  195. Image = "rbxassetid://3570695787",
  196. ImageColor3 = option.state and Color3.fromRGB(221, 3, 255) or Color3.fromRGB(100, 100, 100),
  197. ScaleType = Enum.ScaleType.Slice,
  198. SliceCenter = Rect.new(100, 100, 100, 100),
  199. SliceScale = 0.02,
  200. Parent = main
  201. })
  202.  
  203. local tickboxInner = library:Create("ImageLabel", {
  204. Position = UDim2.new(0, 2, 0, 2),
  205. Size = UDim2.new(1, -4, 1, -4),
  206. BackgroundTransparency = 1,
  207. Image = "rbxassetid://3570695787",
  208. ImageColor3 = option.state and Color3.fromRGB(221, 3, 255) or Color3.fromRGB(20, 20, 20),
  209. ScaleType = Enum.ScaleType.Slice,
  210. SliceCenter = Rect.new(100, 100, 100, 100),
  211. SliceScale = 0.02,
  212. Parent = tickboxOutline
  213. })
  214.  
  215. local checkmarkHolder = library:Create("Frame", {
  216. Position = UDim2.new(0, 4, 0, 4),
  217. Size = option.state and UDim2.new(1, -8, 1, -8) or UDim2.new(0, 0, 1, -8),
  218. BackgroundTransparency = 1,
  219. ClipsDescendants = true,
  220. Parent = tickboxOutline
  221. })
  222.  
  223. local checkmark = library:Create("ImageLabel", {
  224. Size = UDim2.new(1, 0, 1, 0),
  225. SizeConstraint = Enum.SizeConstraint.RelativeYY,
  226. BackgroundTransparency = 1,
  227. Image = "rbxassetid://4919148038",
  228. ImageColor3 = Color3.fromRGB(20, 20, 20),
  229. Parent = checkmarkHolder
  230. })
  231.  
  232. local inContact
  233. main.InputBegan:connect(function(input)
  234. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  235. option:SetState(not option.state)
  236. end
  237. if input.UserInputType == Enum.UserInputType.MouseMovement then
  238. inContact = true
  239. if not option.state then
  240. tweenService:Create(tickboxOutline, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(140, 140, 140)}):Play()
  241. end
  242. end
  243. end)
  244.  
  245. main.InputEnded:connect(function(input)
  246. if input.UserInputType == Enum.UserInputType.MouseMovement then
  247. inContact = true
  248. if not option.state then
  249. tweenService:Create(tickboxOutline, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(100, 100, 100)}):Play()
  250. end
  251. end
  252. end)
  253.  
  254. function option:SetState(state)
  255. library.flags[self.flag] = state
  256. self.state = state
  257. checkmarkHolder:TweenSize(option.state and UDim2.new(1, -8, 1, -8) or UDim2.new(0, 0, 1, -8), "Out", "Quad", 0.2, true)
  258. tweenService:Create(tickboxInner, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = state and Color3.fromRGB(221, 3, 255) or Color3.fromRGB(20, 20, 20)}):Play()
  259. if state then
  260. tweenService:Create(tickboxOutline, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(221, 3, 255)}):Play()
  261. else
  262. if inContact then
  263. tweenService:Create(tickboxOutline, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(140, 140, 140)}):Play()
  264. else
  265. tweenService:Create(tickboxOutline, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(100, 100, 100)}):Play()
  266. end
  267. end
  268. self.callback(state)
  269. end
  270.  
  271. if option.state then
  272. delay(1, function() option.callback(true) end)
  273. end
  274.  
  275. setmetatable(option, {__newindex = function(t, i, v)
  276. if i == "Text" then
  277. main.Text = " " .. tostring(v)
  278. end
  279. end})
  280. end
  281.  
  282. function createButton(option, parent)
  283. local main = library:Create("TextLabel", {
  284. ZIndex = 2,
  285. LayoutOrder = option.position,
  286. Size = UDim2.new(1, 0, 0, 34),
  287. BackgroundTransparency = 1,
  288. Text = " " .. option.text,
  289. TextSize = 17,
  290. Font = Enum.Font.Gotham,
  291. TextColor3 = Color3.fromRGB(255, 255, 255),
  292. Parent = parent.content
  293. })
  294.  
  295. local round = library:Create("ImageLabel", {
  296. AnchorPoint = Vector2.new(0.5, 0.5),
  297. Position = UDim2.new(0.5, 0, 0.5, 0),
  298. Size = UDim2.new(1, -12, 1, -10),
  299. BackgroundTransparency = 1,
  300. Image = "rbxassetid://3570695787",
  301. ImageColor3 = Color3.fromRGB(40, 40, 40),
  302. ScaleType = Enum.ScaleType.Slice,
  303. SliceCenter = Rect.new(100, 100, 100, 100),
  304. SliceScale = 0.02,
  305. Parent = main
  306. })
  307.  
  308. local inContact
  309. local clicking
  310. main.InputBegan:connect(function(input)
  311. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  312. library.flags[option.flag] = true
  313. clicking = true
  314. tweenService:Create(round, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(221, 3, 255)}):Play()
  315. option.callback()
  316. end
  317. if input.UserInputType == Enum.UserInputType.MouseMovement then
  318. inContact = true
  319. tweenService:Create(round, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(60, 60, 60)}):Play()
  320. end
  321. end)
  322.  
  323. main.InputEnded:connect(function(input)
  324. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  325. clicking = false
  326. if inContact then
  327. tweenService:Create(round, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(60, 60, 60)}):Play()
  328. else
  329. tweenService:Create(round, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(40, 40, 40)}):Play()
  330. end
  331. end
  332. if input.UserInputType == Enum.UserInputType.MouseMovement then
  333. inContact = false
  334. if not clicking then
  335. tweenService:Create(round, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(40, 40, 40)}):Play()
  336. end
  337. end
  338. end)
  339. end
  340.  
  341. local function createBind(option, parent)
  342. local binding
  343. local holding
  344. local loop
  345. local text = string.match(option.key, "Mouse") and string.sub(option.key, 1, 5) .. string.sub(option.key, 12, 13) or option.key
  346.  
  347. local main = library:Create("TextLabel", {
  348. LayoutOrder = option.position,
  349. Size = UDim2.new(1, 0, 0, 33),
  350. BackgroundTransparency = 1,
  351. Text = " " .. option.text,
  352. TextSize = 17,
  353. Font = Enum.Font.Gotham,
  354. TextColor3 = Color3.fromRGB(255, 255, 255),
  355. TextXAlignment = Enum.TextXAlignment.Left,
  356. Parent = parent.content
  357. })
  358.  
  359. local round = library:Create("ImageLabel", {
  360. Position = UDim2.new(1, -6, 0, 4),
  361. Size = UDim2.new(0, -textService:GetTextSize(text, 16, Enum.Font.Gotham, Vector2.new(9e9, 9e9)).X - 16, 1, -10),
  362. SizeConstraint = Enum.SizeConstraint.RelativeYY,
  363. BackgroundTransparency = 1,
  364. Image = "rbxassetid://3570695787",
  365. ImageColor3 = Color3.fromRGB(40, 40, 40),
  366. ScaleType = Enum.ScaleType.Slice,
  367. SliceCenter = Rect.new(100, 100, 100, 100),
  368. SliceScale = 0.02,
  369. Parent = main
  370. })
  371.  
  372. local bindinput = library:Create("TextLabel", {
  373. Size = UDim2.new(1, 0, 1, 0),
  374. BackgroundTransparency = 1,
  375. Text = text,
  376. TextSize = 16,
  377. Font = Enum.Font.Gotham,
  378. TextColor3 = Color3.fromRGB(255, 255, 255),
  379. Parent = round
  380. })
  381.  
  382. local inContact
  383. main.InputBegan:connect(function(input)
  384. if input.UserInputType == Enum.UserInputType.MouseMovement then
  385. inContact = true
  386. if not binding then
  387. tweenService:Create(round, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(60, 60, 60)}):Play()
  388. end
  389. end
  390. end)
  391.  
  392. main.InputEnded:connect(function(input)
  393. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  394. binding = true
  395. bindinput.Text = "..."
  396. tweenService:Create(round, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(221, 3, 255)}):Play()
  397. end
  398. if input.UserInputType == Enum.UserInputType.MouseMovement then
  399. inContact = false
  400. if not binding then
  401. tweenService:Create(round, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(40, 40, 40)}):Play()
  402. end
  403. end
  404. end)
  405.  
  406. inputService.InputBegan:connect(function(input)
  407. if inputService:GetFocusedTextBox() then return end
  408. if (input.KeyCode.Name == option.key or input.UserInputType.Name == option.key) and not binding then
  409. if option.hold then
  410. loop = runService.Heartbeat:connect(function()
  411. if binding then
  412. option.callback(true)
  413. loop:Disconnect()
  414. loop = nil
  415. else
  416. option.callback()
  417. end
  418. end)
  419. else
  420. option.callback()
  421. end
  422. elseif binding then
  423. local key
  424. pcall(function()
  425. if not keyCheck(input.KeyCode, blacklistedKeys) then
  426. key = input.KeyCode
  427. end
  428. end)
  429. pcall(function()
  430. if keyCheck(input.UserInputType, whitelistedMouseinputs) and not key then
  431. key = input.UserInputType
  432. end
  433. end)
  434. key = key or option.key
  435. option:SetKey(key)
  436. end
  437. end)
  438.  
  439. inputService.InputEnded:connect(function(input)
  440. if input.KeyCode.Name == option.key or input.UserInputType.Name == option.key or input.UserInputType.Name == "MouseMovement" then
  441. if loop then
  442. loop:Disconnect()
  443. loop = nil
  444. option.callback(true)
  445. end
  446. end
  447. end)
  448.  
  449. function option:SetKey(key)
  450. binding = false
  451. if loop then
  452. loop:Disconnect()
  453. loop = nil
  454. end
  455. self.key = key or self.key
  456. self.key = self.key.Name or self.key
  457. library.flags[self.flag] = self.key
  458. if string.match(self.key, "Mouse") then
  459. bindinput.Text = string.sub(self.key, 1, 5) .. string.sub(self.key, 12, 13)
  460. else
  461. bindinput.Text = self.key
  462. end
  463. tweenService:Create(round, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = inContact and Color3.fromRGB(60, 60, 60) or Color3.fromRGB(40, 40, 40)}):Play()
  464. round.Size = UDim2.new(0, -textService:GetTextSize(bindinput.Text, 15, Enum.Font.Gotham, Vector2.new(9e9, 9e9)).X - 16, 1, -10)
  465. end
  466. end
  467.  
  468. local function createSlider(option, parent)
  469. local main = library:Create("Frame", {
  470. LayoutOrder = option.position,
  471. Size = UDim2.new(1, 0, 0, 50),
  472. BackgroundTransparency = 1,
  473. Parent = parent.content
  474. })
  475.  
  476. local title = library:Create("TextLabel", {
  477. Position = UDim2.new(0, 0, 0, 4),
  478. Size = UDim2.new(1, 0, 0, 20),
  479. BackgroundTransparency = 1,
  480. Text = " " .. option.text,
  481. TextSize = 17,
  482. Font = Enum.Font.Gotham,
  483. TextColor3 = Color3.fromRGB(255, 255, 255),
  484. TextXAlignment = Enum.TextXAlignment.Left,
  485. Parent = main
  486. })
  487.  
  488. local slider = library:Create("ImageLabel", {
  489. Position = UDim2.new(0, 10, 0, 34),
  490. Size = UDim2.new(1, -20, 0, 5),
  491. BackgroundTransparency = 1,
  492. Image = "rbxassetid://3570695787",
  493. ImageColor3 = Color3.fromRGB(30, 30, 30),
  494. ScaleType = Enum.ScaleType.Slice,
  495. SliceCenter = Rect.new(100, 100, 100, 100),
  496. SliceScale = 0.02,
  497. Parent = main
  498. })
  499.  
  500. local fill = library:Create("ImageLabel", {
  501. BackgroundTransparency = 1,
  502. Image = "rbxassetid://3570695787",
  503. ImageColor3 = Color3.fromRGB(60, 60, 60),
  504. ScaleType = Enum.ScaleType.Slice,
  505. SliceCenter = Rect.new(100, 100, 100, 100),
  506. SliceScale = 0.02,
  507. Parent = slider
  508. })
  509.  
  510. local circle = library:Create("ImageLabel", {
  511. AnchorPoint = Vector2.new(0.5, 0.5),
  512. Position = UDim2.new((option.value - option.min) / (option.max - option.min), 0, 0.5, 0),
  513. SizeConstraint = Enum.SizeConstraint.RelativeYY,
  514. BackgroundTransparency = 1,
  515. Image = "rbxassetid://3570695787",
  516. ImageColor3 = Color3.fromRGB(60, 60, 60),
  517. ScaleType = Enum.ScaleType.Slice,
  518. SliceCenter = Rect.new(100, 100, 100, 100),
  519. SliceScale = 1,
  520. Parent = slider
  521. })
  522.  
  523. local valueRound = library:Create("ImageLabel", {
  524. Position = UDim2.new(1, -6, 0, 4),
  525. Size = UDim2.new(0, -60, 0, 18),
  526. BackgroundTransparency = 1,
  527. Image = "rbxassetid://3570695787",
  528. ImageColor3 = Color3.fromRGB(40, 40, 40),
  529. ScaleType = Enum.ScaleType.Slice,
  530. SliceCenter = Rect.new(100, 100, 100, 100),
  531. SliceScale = 0.02,
  532. Parent = main
  533. })
  534.  
  535. local inputvalue = library:Create("TextBox", {
  536. Size = UDim2.new(1, 0, 1, 0),
  537. BackgroundTransparency = 1,
  538. Text = option.value,
  539. TextColor3 = Color3.fromRGB(235, 235, 235),
  540. TextSize = 15,
  541. TextWrapped = true,
  542. Font = Enum.Font.Gotham,
  543. Parent = valueRound
  544. })
  545.  
  546. if option.min >= 0 then
  547. fill.Size = UDim2.new((option.value - option.min) / (option.max - option.min), 0, 1, 0)
  548. else
  549. fill.Position = UDim2.new((0 - option.min) / (option.max - option.min), 0, 0, 0)
  550. fill.Size = UDim2.new(option.value / (option.max - option.min), 0, 1, 0)
  551. end
  552.  
  553. local sliding
  554. local inContact
  555. main.InputBegan:connect(function(input)
  556. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  557. tweenService:Create(fill, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(221, 3, 255)}):Play()
  558. tweenService:Create(circle, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Size = UDim2.new(3.5, 0, 3.5, 0), ImageColor3 = Color3.fromRGB(221, 3, 255)}):Play()
  559. sliding = true
  560. option:SetValue(option.min + ((input.Position.X - slider.AbsolutePosition.X) / slider.AbsoluteSize.X) * (option.max - option.min))
  561. end
  562. if input.UserInputType == Enum.UserInputType.MouseMovement then
  563. inContact = true
  564. if not sliding then
  565. tweenService:Create(fill, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(100, 100, 100)}):Play()
  566. tweenService:Create(circle, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Size = UDim2.new(2.8, 0, 2.8, 0), ImageColor3 = Color3.fromRGB(100, 100, 100)}):Play()
  567. end
  568. end
  569. end)
  570.  
  571. inputService.InputChanged:connect(function(input)
  572. if input.UserInputType == Enum.UserInputType.MouseMovement and sliding then
  573. option:SetValue(option.min + ((input.Position.X - slider.AbsolutePosition.X) / slider.AbsoluteSize.X) * (option.max - option.min))
  574. end
  575. end)
  576.  
  577. main.InputEnded:connect(function(input)
  578. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  579. sliding = false
  580. if inContact then
  581. tweenService:Create(fill, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(100, 100, 100)}):Play()
  582. tweenService:Create(circle, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Size = UDim2.new(2.8, 0, 2.8, 0), ImageColor3 = Color3.fromRGB(100, 100, 100)}):Play()
  583. else
  584. tweenService:Create(fill, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(60, 60, 60)}):Play()
  585. tweenService:Create(circle, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Size = UDim2.new(0, 0, 0, 0), ImageColor3 = Color3.fromRGB(60, 60, 60)}):Play()
  586. end
  587. end
  588. if input.UserInputType == Enum.UserInputType.MouseMovement then
  589. inContact = false
  590. inputvalue:ReleaseFocus()
  591. if not sliding then
  592. tweenService:Create(fill, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(60, 60, 60)}):Play()
  593. tweenService:Create(circle, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Size = UDim2.new(0, 0, 0, 0), ImageColor3 = Color3.fromRGB(60, 60, 60)}):Play()
  594. end
  595. end
  596. end)
  597.  
  598. inputvalue.FocusLost:connect(function()
  599. tweenService:Create(circle, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Size = UDim2.new(0, 0, 0, 0), ImageColor3 = Color3.fromRGB(60, 60, 60)}):Play()
  600. option:SetValue(tonumber(inputvalue.Text) or option.value)
  601. end)
  602.  
  603. function option:SetValue(value)
  604. value = round(value, option.float)
  605. value = math.clamp(value, self.min, self.max)
  606. circle:TweenPosition(UDim2.new((value - self.min) / (self.max - self.min), 0, 0.5, 0), "Out", "Quad", 0.1, true)
  607. if self.min >= 0 then
  608. fill:TweenSize(UDim2.new((value - self.min) / (self.max - self.min), 0, 1, 0), "Out", "Quad", 0.1, true)
  609. else
  610. fill:TweenPosition(UDim2.new((0 - self.min) / (self.max - self.min), 0, 0, 0), "Out", "Quad", 0.1, true)
  611. fill:TweenSize(UDim2.new(value / (self.max - self.min), 0, 1, 0), "Out", "Quad", 0.1, true)
  612. end
  613. library.flags[self.flag] = value
  614. self.value = value
  615. inputvalue.Text = value
  616. self.callback(value)
  617. end
  618. end
  619.  
  620. local function createList(option, parent, holder)
  621. local valueCount = 0
  622.  
  623. local main = library:Create("Frame", {
  624. LayoutOrder = option.position,
  625. Size = UDim2.new(1, 0, 0, 52),
  626. BackgroundTransparency = 1,
  627. Parent = parent.content
  628. })
  629.  
  630. local round = library:Create("ImageLabel", {
  631. Position = UDim2.new(0, 6, 0, 4),
  632. Size = UDim2.new(1, -12, 1, -10),
  633. BackgroundTransparency = 1,
  634. Image = "rbxassetid://3570695787",
  635. ImageColor3 = Color3.fromRGB(40, 40, 40),
  636. ScaleType = Enum.ScaleType.Slice,
  637. SliceCenter = Rect.new(100, 100, 100, 100),
  638. SliceScale = 0.02,
  639. Parent = main
  640. })
  641.  
  642. local title = library:Create("TextLabel", {
  643. Position = UDim2.new(0, 12, 0, 8),
  644. Size = UDim2.new(1, -24, 0, 14),
  645. BackgroundTransparency = 1,
  646. Text = option.text,
  647. TextSize = 14,
  648. Font = Enum.Font.GothamBold,
  649. TextColor3 = Color3.fromRGB(140, 140, 140),
  650. TextXAlignment = Enum.TextXAlignment.Left,
  651. Parent = main
  652. })
  653.  
  654. local listvalue = library:Create("TextLabel", {
  655. Position = UDim2.new(0, 12, 0, 20),
  656. Size = UDim2.new(1, -24, 0, 24),
  657. BackgroundTransparency = 1,
  658. Text = option.value,
  659. TextSize = 18,
  660. Font = Enum.Font.Gotham,
  661. TextColor3 = Color3.fromRGB(255, 255, 255),
  662. TextXAlignment = Enum.TextXAlignment.Left,
  663. Parent = main
  664. })
  665.  
  666. library:Create("ImageLabel", {
  667. Position = UDim2.new(1, -16, 0, 16),
  668. Size = UDim2.new(-1, 32, 1, -32),
  669. SizeConstraint = Enum.SizeConstraint.RelativeYY,
  670. Rotation = 90,
  671. BackgroundTransparency = 1,
  672. Image = "rbxassetid://4918373417",
  673. ImageColor3 = Color3.fromRGB(140, 140, 140),
  674. ScaleType = Enum.ScaleType.Fit,
  675. Parent = round
  676. })
  677.  
  678. option.mainHolder = library:Create("ImageButton", {
  679. ZIndex = 3,
  680. Size = UDim2.new(0, 240, 0, 52),
  681. BackgroundTransparency = 1,
  682. Image = "rbxassetid://3570695787",
  683. ImageTransparency = 1,
  684. ImageColor3 = Color3.fromRGB(30, 30, 30),
  685. ScaleType = Enum.ScaleType.Slice,
  686. SliceCenter = Rect.new(100, 100, 100, 100),
  687. SliceScale = 0.02,
  688. Visible = false,
  689. Parent = library.base
  690. })
  691.  
  692. local content = library:Create("ScrollingFrame", {
  693. ZIndex = 3,
  694. Size = UDim2.new(1, 0, 1, 0),
  695. BackgroundTransparency = 1,
  696. BorderSizePixel = 0,
  697. ScrollBarImageColor3 = Color3.fromRGB(),
  698. ScrollBarThickness = 0,
  699. ScrollingDirection = Enum.ScrollingDirection.Y,
  700. Parent = option.mainHolder
  701. })
  702.  
  703. library:Create("UIPadding", {
  704. PaddingTop = UDim.new(0, 6),
  705. Parent = content
  706. })
  707.  
  708. local layout = library:Create("UIListLayout", {
  709. Parent = content
  710. })
  711.  
  712. layout.Changed:connect(function()
  713. option.mainHolder.Size = UDim2.new(0, 240, 0, (valueCount > 4 and (4 * 40) or layout.AbsoluteContentSize.Y) + 12)
  714. content.CanvasSize = UDim2.new(0, 0, 0, layout.AbsoluteContentSize.Y + 12)
  715. end)
  716.  
  717. local inContact
  718. round.InputBegan:connect(function(input)
  719. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  720. if library.activePopup then
  721. library.activePopup:Close()
  722. end
  723. local position = main.AbsolutePosition
  724. option.mainHolder.Position = UDim2.new(0, position.X - 5, 0, position.Y - 10)
  725. option.open = true
  726. option.mainHolder.Visible = true
  727. library.activePopup = option
  728. content.ScrollBarThickness = 6
  729. tweenService:Create(option.mainHolder, TweenInfo.new(0.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {ImageTransparency = 0, Position = UDim2.new(0, position.X - 5, 0, position.Y - 4)}):Play()
  730. tweenService:Create(option.mainHolder, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0.1), {Position = UDim2.new(0, position.X - 5, 0, position.Y + 1)}):Play()
  731. for _,label in next, content:GetChildren() do
  732. if label:IsA"TextLabel" then
  733. tweenService:Create(label, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundTransparency = 0, TextTransparency = 0}):Play()
  734. end
  735. end
  736. end
  737. if input.UserInputType == Enum.UserInputType.MouseMovement then
  738. inContact = true
  739. if not option.open then
  740. tweenService:Create(round, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(60, 60, 60)}):Play()
  741. end
  742. end
  743. end)
  744.  
  745. round.InputEnded:connect(function(input)
  746. if input.UserInputType == Enum.UserInputType.MouseMovement then
  747. inContact = false
  748. if not option.open then
  749. tweenService:Create(round, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(40, 40, 40)}):Play()
  750. end
  751. end
  752. end)
  753.  
  754. function option:AddValue(value)
  755. valueCount = valueCount + 1
  756. local label = library:Create("TextLabel", {
  757. ZIndex = 3,
  758. Size = UDim2.new(1, 0, 0, 40),
  759. BackgroundColor3 = Color3.fromRGB(30, 30, 30),
  760. BorderSizePixel = 0,
  761. Text = " " .. value,
  762. TextSize = 14,
  763. TextTransparency = self.open and 0 or 1,
  764. Font = Enum.Font.Gotham,
  765. TextColor3 = Color3.fromRGB(255, 255, 255),
  766. TextXAlignment = Enum.TextXAlignment.Left,
  767. Parent = content
  768. })
  769.  
  770. local inContact
  771. local clicking
  772. label.InputBegan:connect(function(input)
  773. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  774. clicking = true
  775. tweenService:Create(label, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundColor3 = Color3.fromRGB(10, 10, 10)}):Play()
  776. self:SetValue(value)
  777. self:Close()
  778. end
  779. if input.UserInputType == Enum.UserInputType.MouseMovement then
  780. inContact = true
  781. if not clicking then
  782. tweenService:Create(label, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundColor3 = Color3.fromRGB(20, 20, 20)}):Play()
  783. end
  784. end
  785. end)
  786.  
  787. label.InputEnded:connect(function(input)
  788. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  789. clicking = false
  790. tweenService:Create(label, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundColor3 = inContact and Color3.fromRGB(20, 20, 20) or Color3.fromRGB(30, 30, 30)}):Play()
  791. end
  792. if input.UserInputType == Enum.UserInputType.MouseMovement then
  793. inContact = false
  794. if not clicking then
  795. tweenService:Create(label, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundColor3 = Color3.fromRGB(30, 30, 30)}):Play()
  796. end
  797. end
  798. end)
  799. end
  800.  
  801. if not table.find(option.values, option.value) then
  802. option:AddValue(option.value)
  803. end
  804.  
  805. for _, value in next, option.values do
  806. option:AddValue(tostring(value))
  807. end
  808.  
  809. function option:RemoveValue(value)
  810. for _,label in next, content:GetChildren() do
  811. if label:IsA"TextLabel" and label.Text == " " .. value then
  812. label:Destroy()
  813. valueCount = valueCount - 1
  814. break
  815. end
  816. end
  817. if self.value == value then
  818. self:SetValue("")
  819. end
  820. end
  821.  
  822. function option:SetValue(value)
  823. library.flags[self.flag] = tostring(value)
  824. self.value = tostring(value)
  825. listvalue.Text = self.value
  826. self.callback(value)
  827. end
  828.  
  829. function option:Close()
  830. library.activePopup = nil
  831. self.open = false
  832. content.ScrollBarThickness = 0
  833. local position = main.AbsolutePosition
  834. tweenService:Create(round, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = inContact and Color3.fromRGB(60, 60, 60) or Color3.fromRGB(40, 40, 40)}):Play()
  835. tweenService:Create(self.mainHolder, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageTransparency = 1, Position = UDim2.new(0, position.X - 5, 0, position.Y -10)}):Play()
  836. for _,label in next, content:GetChildren() do
  837. if label:IsA"TextLabel" then
  838. tweenService:Create(label, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundTransparency = 1, TextTransparency = 1}):Play()
  839. end
  840. end
  841. wait(0.3)
  842. --delay(0.3, function()
  843. if not self.open then
  844. self.mainHolder.Visible = false
  845. end
  846. --end)
  847. end
  848.  
  849. return option
  850. end
  851.  
  852. local function createBox(option, parent)
  853. local main = library:Create("Frame", {
  854. LayoutOrder = option.position,
  855. Size = UDim2.new(1, 0, 0, 52),
  856. BackgroundTransparency = 1,
  857. Parent = parent.content
  858. })
  859.  
  860. local outline = library:Create("ImageLabel", {
  861. Position = UDim2.new(0, 6, 0, 4),
  862. Size = UDim2.new(1, -12, 1, -10),
  863. BackgroundTransparency = 1,
  864. Image = "rbxassetid://3570695787",
  865. ImageColor3 = Color3.fromRGB(60, 60, 60),
  866. ScaleType = Enum.ScaleType.Slice,
  867. SliceCenter = Rect.new(100, 100, 100, 100),
  868. SliceScale = 0.02,
  869. Parent = main
  870. })
  871.  
  872. local round = library:Create("ImageLabel", {
  873. Position = UDim2.new(0, 8, 0, 6),
  874. Size = UDim2.new(1, -16, 1, -14),
  875. BackgroundTransparency = 1,
  876. Image = "rbxassetid://3570695787",
  877. ImageColor3 = Color3.fromRGB(20, 20, 20),
  878. ScaleType = Enum.ScaleType.Slice,
  879. SliceCenter = Rect.new(100, 100, 100, 100),
  880. SliceScale = 0.01,
  881. Parent = main
  882. })
  883.  
  884. local title = library:Create("TextLabel", {
  885. Position = UDim2.new(0, 12, 0, 8),
  886. Size = UDim2.new(1, -24, 0, 14),
  887. BackgroundTransparency = 1,
  888. Text = option.text,
  889. TextSize = 14,
  890. Font = Enum.Font.GothamBold,
  891. TextColor3 = Color3.fromRGB(100, 100, 100),
  892. TextXAlignment = Enum.TextXAlignment.Left,
  893. Parent = main
  894. })
  895.  
  896. local inputvalue = library:Create("TextBox", {
  897. Position = UDim2.new(0, 12, 0, 20),
  898. Size = UDim2.new(1, -24, 0, 24),
  899. BackgroundTransparency = 1,
  900. Text = option.value,
  901. TextSize = 18,
  902. Font = Enum.Font.Gotham,
  903. TextColor3 = Color3.fromRGB(255, 255, 255),
  904. TextXAlignment = Enum.TextXAlignment.Left,
  905. TextWrapped = true,
  906. Parent = main
  907. })
  908.  
  909. local inContact
  910. local focused
  911. main.InputBegan:connect(function(input)
  912. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  913. if not focused then inputvalue:CaptureFocus() end
  914. end
  915. if input.UserInputType == Enum.UserInputType.MouseMovement then
  916. inContact = true
  917. if not focused then
  918. tweenService:Create(outline, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(100, 100, 100)}):Play()
  919. end
  920. end
  921. end)
  922.  
  923. main.InputEnded:connect(function(input)
  924. if input.UserInputType == Enum.UserInputType.MouseMovement then
  925. inContact = false
  926. if not focused then
  927. tweenService:Create(outline, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(60, 60, 60)}):Play()
  928. end
  929. end
  930. end)
  931.  
  932. inputvalue.Focused:connect(function()
  933. focused = true
  934. tweenService:Create(outline, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(221, 3, 255)}):Play()
  935. end)
  936.  
  937. inputvalue.FocusLost:connect(function(enter)
  938. focused = false
  939. tweenService:Create(outline, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(60, 60, 60)}):Play()
  940. option:SetValue(inputvalue.Text, enter)
  941. end)
  942.  
  943. function option:SetValue(value, enter)
  944. library.flags[self.flag] = tostring(value)
  945. self.value = tostring(value)
  946. inputvalue.Text = self.value
  947. self.callback(value, enter)
  948. end
  949. end
  950.  
  951. local function createColorPickerWindow(option)
  952. option.mainHolder = library:Create("ImageButton", {
  953. ZIndex = 3,
  954. Size = UDim2.new(0, 240, 0, 180),
  955. BackgroundTransparency = 1,
  956. Image = "rbxassetid://3570695787",
  957. ImageTransparency = 1,
  958. ImageColor3 = Color3.fromRGB(30, 30, 30),
  959. ScaleType = Enum.ScaleType.Slice,
  960. SliceCenter = Rect.new(100, 100, 100, 100),
  961. SliceScale = 0.02,
  962. Parent = library.base
  963. })
  964.  
  965. local hue, sat, val = Color3.toHSV(option.color)
  966. hue, sat, val = hue == 0 and 1 or hue, sat + 0.005, val - 0.005
  967. local editinghue
  968. local editingsatval
  969. local currentColor = option.color
  970. local previousColors = {[1] = option.color}
  971. local originalColor = option.color
  972. local rainbowEnabled
  973. local rainbowLoop
  974.  
  975. function option:updateVisuals(Color)
  976. currentColor = Color
  977. self.visualize2.ImageColor3 = Color
  978. hue, sat, val = Color3.toHSV(Color)
  979. hue = hue == 0 and 1 or hue
  980. self.satval.BackgroundColor3 = Color3.fromHSV(hue, 1, 1)
  981. self.hueSlider.Position = UDim2.new(1 - hue, 0, 0, 0)
  982. self.satvalSlider.Position = UDim2.new(sat, 0, 1 - val, 0)
  983. end
  984.  
  985. option.hue = library:Create("ImageLabel", {
  986. ZIndex = 3,
  987. AnchorPoint = Vector2.new(0, 1),
  988. Position = UDim2.new(0, 8, 1, -8),
  989. Size = UDim2.new(1, -100, 0, 22),
  990. BackgroundTransparency = 1,
  991. Image = "rbxassetid://3570695787",
  992. ImageTransparency = 1,
  993. ScaleType = Enum.ScaleType.Slice,
  994. SliceCenter = Rect.new(100, 100, 100, 100),
  995. SliceScale = 0.02,
  996. Parent = option.mainHolder
  997. })
  998.  
  999. local Gradient = library:Create("UIGradient", {
  1000. Color = ColorSequence.new({
  1001. ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 0, 0)),
  1002. ColorSequenceKeypoint.new(0.157, Color3.fromRGB(255, 0, 255)),
  1003. ColorSequenceKeypoint.new(0.323, Color3.fromRGB(0, 0, 255)),
  1004. ColorSequenceKeypoint.new(0.488, Color3.fromRGB(0, 255, 255)),
  1005. ColorSequenceKeypoint.new(0.66, Color3.fromRGB(0, 255, 0)),
  1006. ColorSequenceKeypoint.new(0.817, Color3.fromRGB(255, 255, 0)),
  1007. ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 0, 0)),
  1008. }),
  1009. Parent = option.hue
  1010. })
  1011.  
  1012. option.hueSlider = library:Create("Frame", {
  1013. ZIndex = 3,
  1014. Position = UDim2.new(1 - hue, 0, 0, 0),
  1015. Size = UDim2.new(0, 2, 1, 0),
  1016. BackgroundTransparency = 1,
  1017. BackgroundColor3 = Color3.fromRGB(30, 30, 30),
  1018. BorderColor3 = Color3.fromRGB(255, 255, 255),
  1019. Parent = option.hue
  1020. })
  1021.  
  1022. option.hue.InputBegan:connect(function(Input)
  1023. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  1024. editinghue = true
  1025. X = (option.hue.AbsolutePosition.X + option.hue.AbsoluteSize.X) - option.hue.AbsolutePosition.X
  1026. X = (Input.Position.X - option.hue.AbsolutePosition.X) / X
  1027. X = X < 0 and 0 or X > 0.995 and 0.995 or X
  1028. option:updateVisuals(Color3.fromHSV(1 - X, sat, val))
  1029. end
  1030. end)
  1031.  
  1032. inputService.InputChanged:connect(function(Input)
  1033. if Input.UserInputType == Enum.UserInputType.MouseMovement and editinghue then
  1034. X = (option.hue.AbsolutePosition.X + option.hue.AbsoluteSize.X) - option.hue.AbsolutePosition.X
  1035. X = (Input.Position.X - option.hue.AbsolutePosition.X) / X
  1036. X = X <= 0 and 0 or X >= 0.995 and 0.995 or X
  1037. option:updateVisuals(Color3.fromHSV(1 - X, sat, val))
  1038. end
  1039. end)
  1040.  
  1041. option.hue.InputEnded:connect(function(Input)
  1042. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  1043. editinghue = false
  1044. end
  1045. end)
  1046.  
  1047. option.satval = library:Create("ImageLabel", {
  1048. ZIndex = 3,
  1049. Position = UDim2.new(0, 8, 0, 8),
  1050. Size = UDim2.new(1, -100, 1, -42),
  1051. BackgroundTransparency = 1,
  1052. BackgroundColor3 = Color3.fromHSV(hue, 1, 1),
  1053. BorderSizePixel = 0,
  1054. Image = "rbxassetid://4155801252",
  1055. ImageTransparency = 1,
  1056. ClipsDescendants = true,
  1057. Parent = option.mainHolder
  1058. })
  1059.  
  1060. option.satvalSlider = library:Create("Frame", {
  1061. ZIndex = 3,
  1062. AnchorPoint = Vector2.new(0.5, 0.5),
  1063. Position = UDim2.new(sat, 0, 1 - val, 0),
  1064. Size = UDim2.new(0, 4, 0, 4),
  1065. Rotation = 45,
  1066. BackgroundTransparency = 1,
  1067. BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  1068. Parent = option.satval
  1069. })
  1070.  
  1071. option.satval.InputBegan:connect(function(Input)
  1072. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  1073. editingsatval = true
  1074. X = (option.satval.AbsolutePosition.X + option.satval.AbsoluteSize.X) - option.satval.AbsolutePosition.X
  1075. Y = (option.satval.AbsolutePosition.Y + option.satval.AbsoluteSize.Y) - option.satval.AbsolutePosition.Y
  1076. X = (Input.Position.X - option.satval.AbsolutePosition.X) / X
  1077. Y = (Input.Position.Y - option.satval.AbsolutePosition.Y) / Y
  1078. X = X <= 0.005 and 0.005 or X >= 1 and 1 or X
  1079. Y = Y <= 0 and 0 or Y >= 0.995 and 0.995 or Y
  1080. option:updateVisuals(Color3.fromHSV(hue, X, 1 - Y))
  1081. end
  1082. end)
  1083.  
  1084. inputService.InputChanged:connect(function(Input)
  1085. if Input.UserInputType == Enum.UserInputType.MouseMovement and editingsatval then
  1086. X = (option.satval.AbsolutePosition.X + option.satval.AbsoluteSize.X) - option.satval.AbsolutePosition.X
  1087. Y = (option.satval.AbsolutePosition.Y + option.satval.AbsoluteSize.Y) - option.satval.AbsolutePosition.Y
  1088. X = (Input.Position.X - option.satval.AbsolutePosition.X) / X
  1089. Y = (Input.Position.Y - option.satval.AbsolutePosition.Y) / Y
  1090. X = X <= 0.005 and 0.005 or X >= 1 and 1 or X
  1091. Y = Y <= 0 and 0 or Y >= 0.995 and 0.995 or Y
  1092. option:updateVisuals(Color3.fromHSV(hue, X, 1 - Y))
  1093. end
  1094. end)
  1095.  
  1096. option.satval.InputEnded:connect(function(Input)
  1097. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  1098. editingsatval = false
  1099. end
  1100. end)
  1101.  
  1102. option.visualize2 = library:Create("ImageLabel", {
  1103. ZIndex = 3,
  1104. Position = UDim2.new(1, -8, 0, 8),
  1105. Size = UDim2.new(0, -80, 0, 80),
  1106. BackgroundTransparency = 1,
  1107. Image = "rbxassetid://3570695787",
  1108. ImageColor3 = currentColor,
  1109. ScaleType = Enum.ScaleType.Slice,
  1110. SliceCenter = Rect.new(100, 100, 100, 100),
  1111. SliceScale = 0.02,
  1112. Parent = option.mainHolder
  1113. })
  1114.  
  1115. option.resetColor = library:Create("ImageLabel", {
  1116. ZIndex = 3,
  1117. Position = UDim2.new(1, -8, 0, 92),
  1118. Size = UDim2.new(0, -80, 0, 18),
  1119. BackgroundTransparency = 1,
  1120. Image = "rbxassetid://3570695787",
  1121. ImageTransparency = 1,
  1122. ImageColor3 = Color3.fromRGB(20, 20, 20),
  1123. ScaleType = Enum.ScaleType.Slice,
  1124. SliceCenter = Rect.new(100, 100, 100, 100),
  1125. SliceScale = 0.02,
  1126. Parent = option.mainHolder
  1127. })
  1128.  
  1129. option.resetText = library:Create("TextLabel", {
  1130. ZIndex = 3,
  1131. Size = UDim2.new(1, 0, 1, 0),
  1132. BackgroundTransparency = 1,
  1133. Text = "Reset",
  1134. TextTransparency = 1,
  1135. Font = Enum.Font.Code,
  1136. TextSize = 15,
  1137. TextColor3 = Color3.fromRGB(255, 255, 255),
  1138. Parent = option.resetColor
  1139. })
  1140.  
  1141. option.resetColor.InputBegan:connect(function(Input)
  1142. if Input.UserInputType == Enum.UserInputType.MouseButton1 and not rainbowEnabled then
  1143. previousColors = {originalColor}
  1144. option:SetColor(originalColor)
  1145. end
  1146. if Input.UserInputType == Enum.UserInputType.MouseMovement and not dragging then
  1147. tweenService:Create(option.resetColor, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(10, 10, 10)}):Play()
  1148. end
  1149. end)
  1150.  
  1151. option.resetColor.InputEnded:connect(function(Input)
  1152. if Input.UserInputType == Enum.UserInputType.MouseMovement and not dragging then
  1153. tweenService:Create(option.resetColor, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(20, 20, 20)}):Play()
  1154. end
  1155. end)
  1156.  
  1157. option.undoColor = library:Create("ImageLabel", {
  1158. ZIndex = 3,
  1159. Position = UDim2.new(1, -8, 0, 112),
  1160. Size = UDim2.new(0, -80, 0, 18),
  1161. BackgroundTransparency = 1,
  1162. Image = "rbxassetid://3570695787",
  1163. ImageTransparency = 1,
  1164. ImageColor3 = Color3.fromRGB(20, 20, 20),
  1165. ScaleType = Enum.ScaleType.Slice,
  1166. SliceCenter = Rect.new(100, 100, 100, 100),
  1167. SliceScale = 0.02,
  1168. Parent = option.mainHolder
  1169. })
  1170.  
  1171. option.undoText = library:Create("TextLabel", {
  1172. ZIndex = 3,
  1173. Size = UDim2.new(1, 0, 1, 0),
  1174. BackgroundTransparency = 1,
  1175. Text = "Undo",
  1176. TextTransparency = 1,
  1177. Font = Enum.Font.Code,
  1178. TextSize = 15,
  1179. TextColor3 = Color3.fromRGB(255, 255, 255),
  1180. Parent = option.undoColor
  1181. })
  1182.  
  1183. option.undoColor.InputBegan:connect(function(Input)
  1184. if Input.UserInputType == Enum.UserInputType.MouseButton1 and not rainbowEnabled then
  1185. local Num = #previousColors == 1 and 0 or 1
  1186. option:SetColor(previousColors[#previousColors - Num])
  1187. if #previousColors ~= 1 then
  1188. table.remove(previousColors, #previousColors)
  1189. end
  1190. end
  1191. if Input.UserInputType == Enum.UserInputType.MouseMovement and not dragging then
  1192. tweenService:Create(option.undoColor, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(10, 10, 10)}):Play()
  1193. end
  1194. end)
  1195.  
  1196. option.undoColor.InputEnded:connect(function(Input)
  1197. if Input.UserInputType == Enum.UserInputType.MouseMovement and not dragging then
  1198. tweenService:Create(option.undoColor, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(20, 20, 20)}):Play()
  1199. end
  1200. end)
  1201.  
  1202. option.setColor = library:Create("ImageLabel", {
  1203. ZIndex = 3,
  1204. Position = UDim2.new(1, -8, 0, 132),
  1205. Size = UDim2.new(0, -80, 0, 18),
  1206. BackgroundTransparency = 1,
  1207. Image = "rbxassetid://3570695787",
  1208. ImageTransparency = 1,
  1209. ImageColor3 = Color3.fromRGB(20, 20, 20),
  1210. ScaleType = Enum.ScaleType.Slice,
  1211. SliceCenter = Rect.new(100, 100, 100, 100),
  1212. SliceScale = 0.02,
  1213. Parent = option.mainHolder
  1214. })
  1215.  
  1216. option.setText = library:Create("TextLabel", {
  1217. ZIndex = 3,
  1218. Size = UDim2.new(1, 0, 1, 0),
  1219. BackgroundTransparency = 1,
  1220. Text = "Set",
  1221. TextTransparency = 1,
  1222. Font = Enum.Font.Code,
  1223. TextSize = 15,
  1224. TextColor3 = Color3.fromRGB(255, 255, 255),
  1225. Parent = option.setColor
  1226. })
  1227.  
  1228. option.setColor.InputBegan:connect(function(Input)
  1229. if Input.UserInputType == Enum.UserInputType.MouseButton1 and not rainbowEnabled then
  1230. table.insert(previousColors, currentColor)
  1231. option:SetColor(currentColor)
  1232. end
  1233. if Input.UserInputType == Enum.UserInputType.MouseMovement and not dragging then
  1234. tweenService:Create(option.setColor, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(10, 10, 10)}):Play()
  1235. end
  1236. end)
  1237.  
  1238. option.setColor.InputEnded:connect(function(Input)
  1239. if Input.UserInputType == Enum.UserInputType.MouseMovement and not dragging then
  1240. tweenService:Create(option.setColor, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(20, 20, 20)}):Play()
  1241. end
  1242. end)
  1243.  
  1244. option.rainbow = library:Create("ImageLabel", {
  1245. ZIndex = 3,
  1246. Position = UDim2.new(1, -8, 0, 152),
  1247. Size = UDim2.new(0, -80, 0, 18),
  1248. BackgroundTransparency = 1,
  1249. Image = "rbxassetid://3570695787",
  1250. ImageTransparency = 1,
  1251. ImageColor3 = Color3.fromRGB(20, 20, 20),
  1252. ScaleType = Enum.ScaleType.Slice,
  1253. SliceCenter = Rect.new(100, 100, 100, 100),
  1254. SliceScale = 0.02,
  1255. Parent = option.mainHolder
  1256. })
  1257.  
  1258. option.rainbowText = library:Create("TextLabel", {
  1259. ZIndex = 3,
  1260. Size = UDim2.new(1, 0, 1, 0),
  1261. BackgroundTransparency = 1,
  1262. Text = "Rainbow",
  1263. TextTransparency = 1,
  1264. Font = Enum.Font.Code,
  1265. TextSize = 15,
  1266. TextColor3 = Color3.fromRGB(255, 255, 255),
  1267. Parent = option.rainbow
  1268. })
  1269.  
  1270. option.rainbow.InputBegan:connect(function(Input)
  1271. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  1272. rainbowEnabled = not rainbowEnabled
  1273. if rainbowEnabled then
  1274. rainbowLoop = runService.Heartbeat:connect(function()
  1275. option:SetColor(chromaColor)
  1276. option.rainbowText.TextColor3 = chromaColor
  1277. end)
  1278. else
  1279. rainbowLoop:Disconnect()
  1280. option:SetColor(previousColors[#previousColors])
  1281. option.rainbowText.TextColor3 = Color3.fromRGB(255, 255, 255)
  1282. end
  1283. end
  1284. if Input.UserInputType == Enum.UserInputType.MouseMovement and not dragging then
  1285. tweenService:Create(option.rainbow, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(10, 10, 10)}):Play()
  1286. end
  1287. end)
  1288.  
  1289. option.rainbow.InputEnded:connect(function(Input)
  1290. if Input.UserInputType == Enum.UserInputType.MouseMovement and not dragging then
  1291. tweenService:Create(option.rainbow, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(20, 20, 20)}):Play()
  1292. end
  1293. end)
  1294.  
  1295. return option
  1296. end
  1297.  
  1298. local function createColor(option, parent, holder)
  1299. option.main = library:Create("TextLabel", {
  1300. LayoutOrder = option.position,
  1301. Size = UDim2.new(1, 0, 0, 31),
  1302. BackgroundTransparency = 1,
  1303. Text = " " .. option.text,
  1304. TextSize = 17,
  1305. Font = Enum.Font.Gotham,
  1306. TextColor3 = Color3.fromRGB(255, 255, 255),
  1307. TextXAlignment = Enum.TextXAlignment.Left,
  1308. Parent = parent.content
  1309. })
  1310.  
  1311. local colorBoxOutline = library:Create("ImageLabel", {
  1312. Position = UDim2.new(1, -6, 0, 4),
  1313. Size = UDim2.new(-1, 10, 1, -10),
  1314. SizeConstraint = Enum.SizeConstraint.RelativeYY,
  1315. BackgroundTransparency = 1,
  1316. Image = "rbxassetid://3570695787",
  1317. ImageColor3 = Color3.fromRGB(100, 100, 100),
  1318. ScaleType = Enum.ScaleType.Slice,
  1319. SliceCenter = Rect.new(100, 100, 100, 100),
  1320. SliceScale = 0.02,
  1321. Parent = option.main
  1322. })
  1323.  
  1324. option.visualize = library:Create("ImageLabel", {
  1325. Position = UDim2.new(0, 2, 0, 2),
  1326. Size = UDim2.new(1, -4, 1, -4),
  1327. BackgroundTransparency = 1,
  1328. Image = "rbxassetid://3570695787",
  1329. ImageColor3 = option.color,
  1330. ScaleType = Enum.ScaleType.Slice,
  1331. SliceCenter = Rect.new(100, 100, 100, 100),
  1332. SliceScale = 0.02,
  1333. Parent = colorBoxOutline
  1334. })
  1335.  
  1336. local inContact
  1337. option.main.InputBegan:connect(function(input)
  1338. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1339. if not option.mainHolder then createColorPickerWindow(option) end
  1340. if library.activePopup then
  1341. library.activePopup:Close()
  1342. end
  1343. local position = option.main.AbsolutePosition
  1344. option.mainHolder.Position = UDim2.new(0, position.X - 5, 0, position.Y - 10)
  1345. option.open = true
  1346. option.mainHolder.Visible = true
  1347. library.activePopup = option
  1348. tweenService:Create(option.mainHolder, TweenInfo.new(0.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {ImageTransparency = 0, Position = UDim2.new(0, position.X - 5, 0, position.Y - 4)}):Play()
  1349. tweenService:Create(option.mainHolder, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0.1), {Position = UDim2.new(0, position.X - 5, 0, position.Y + 1)}):Play()
  1350. tweenService:Create(option.satval, TweenInfo.new(0.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundTransparency = 0}):Play()
  1351. for _,object in next, option.mainHolder:GetDescendants() do
  1352. if object:IsA"TextLabel" then
  1353. tweenService:Create(object, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextTransparency = 0}):Play()
  1354. elseif object:IsA"ImageLabel" then
  1355. tweenService:Create(object, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageTransparency = 0}):Play()
  1356. elseif object:IsA"Frame" then
  1357. tweenService:Create(object, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundTransparency = 0}):Play()
  1358. end
  1359. end
  1360. end
  1361. if input.UserInputType == Enum.UserInputType.MouseMovement then
  1362. inContact = true
  1363. if not option.open then
  1364. tweenService:Create(colorBoxOutline, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(140, 140, 140)}):Play()
  1365. end
  1366. end
  1367. end)
  1368.  
  1369. option.main.InputEnded:connect(function(input)
  1370. if input.UserInputType == Enum.UserInputType.MouseMovement then
  1371. inContact = true
  1372. if not option.open then
  1373. tweenService:Create(colorBoxOutline, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(100, 100, 100)}):Play()
  1374. end
  1375. end
  1376. end)
  1377.  
  1378. function option:SetColor(newColor)
  1379. if self.mainHolder then
  1380. self:updateVisuals(newColor)
  1381. end
  1382. self.visualize.ImageColor3 = newColor
  1383. library.flags[self.flag] = newColor
  1384. self.color = newColor
  1385. self.callback(newColor)
  1386. end
  1387.  
  1388. function option:Close()
  1389. library.activePopup = nil
  1390. self.open = false
  1391. local position = self.main.AbsolutePosition
  1392. tweenService:Create(self.mainHolder, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageTransparency = 1, Position = UDim2.new(0, position.X - 5, 0, position.Y - 10)}):Play()
  1393. tweenService:Create(self.satval, TweenInfo.new(0.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundTransparency = 1}):Play()
  1394. for _,object in next, self.mainHolder:GetDescendants() do
  1395. if object:IsA"TextLabel" then
  1396. tweenService:Create(object, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextTransparency = 1}):Play()
  1397. elseif object:IsA"ImageLabel" then
  1398. tweenService:Create(object, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageTransparency = 1}):Play()
  1399. elseif object:IsA"Frame" then
  1400. tweenService:Create(object, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundTransparency = 1}):Play()
  1401. end
  1402. end
  1403. delay(0.3, function()
  1404. if not self.open then
  1405. self.mainHolder.Visible = false
  1406. end
  1407. end)
  1408. end
  1409. end
  1410.  
  1411. local function loadOptions(option, holder)
  1412. for _,newOption in next, option.options do
  1413. if newOption.type == "label" then
  1414. createLabel(newOption, option)
  1415. elseif newOption.type == "toggle" then
  1416. createToggle(newOption, option)
  1417. elseif newOption.type == "button" then
  1418. createButton(newOption, option)
  1419. elseif newOption.type == "list" then
  1420. createList(newOption, option, holder)
  1421. elseif newOption.type == "box" then
  1422. createBox(newOption, option)
  1423. elseif newOption.type == "bind" then
  1424. createBind(newOption, option)
  1425. elseif newOption.type == "slider" then
  1426. createSlider(newOption, option)
  1427. elseif newOption.type == "color" then
  1428. createColor(newOption, option, holder)
  1429. elseif newOption.type == "folder" then
  1430. newOption:init()
  1431. end
  1432. end
  1433. end
  1434.  
  1435. local function getFnctions(parent)
  1436. function parent:AddLabel(option)
  1437. option = typeof(option) == "table" and option or {}
  1438. option.text = tostring(option.text)
  1439. option.type = "label"
  1440. option.position = #self.options
  1441. table.insert(self.options, option)
  1442.  
  1443. return option
  1444. end
  1445.  
  1446. function parent:AddToggle(option)
  1447. option = typeof(option) == "table" and option or {}
  1448. option.text = tostring(option.text)
  1449. option.state = typeof(option.state) == "boolean" and option.state or false
  1450. option.callback = typeof(option.callback) == "function" and option.callback or function() end
  1451. option.type = "toggle"
  1452. option.position = #self.options
  1453. option.flag = option.flag or option.text
  1454. library.flags[option.flag] = option.state
  1455. table.insert(self.options, option)
  1456.  
  1457. return option
  1458. end
  1459.  
  1460. function parent:AddButton(option)
  1461. option = typeof(option) == "table" and option or {}
  1462. option.text = tostring(option.text)
  1463. option.callback = typeof(option.callback) == "function" and option.callback or function() end
  1464. option.type = "button"
  1465. option.position = #self.options
  1466. option.flag = option.flag or option.text
  1467. table.insert(self.options, option)
  1468.  
  1469. return option
  1470. end
  1471.  
  1472. function parent:AddBind(option)
  1473. option = typeof(option) == "table" and option or {}
  1474. option.text = tostring(option.text)
  1475. option.key = (option.key and option.key.Name) or option.key or "F"
  1476. option.hold = typeof(option.hold) == "boolean" and option.hold or false
  1477. option.callback = typeof(option.callback) == "function" and option.callback or function() end
  1478. option.type = "bind"
  1479. option.position = #self.options
  1480. option.flag = option.flag or option.text
  1481. library.flags[option.flag] = option.key
  1482. table.insert(self.options, option)
  1483.  
  1484. return option
  1485. end
  1486.  
  1487. function parent:AddSlider(option)
  1488. option = typeof(option) == "table" and option or {}
  1489. option.text = tostring(option.text)
  1490. option.min = typeof(option.min) == "number" and option.min or 0
  1491. option.max = typeof(option.max) == "number" and option.max or 0
  1492. option.dual = typeof(option.dual) == "boolean" and option.dual or false
  1493. option.value = math.clamp(typeof(option.value) == "number" and option.value or option.min, option.min, option.max)
  1494. option.value2 = typeof(option.value2) == "number" and option.value2 or option.max
  1495. option.callback = typeof(option.callback) == "function" and option.callback or function() end
  1496. option.float = typeof(option.value) == "number" and option.float or 1
  1497. option.type = "slider"
  1498. option.position = #self.options
  1499. option.flag = option.flag or option.text
  1500. library.flags[option.flag] = option.value
  1501. table.insert(self.options, option)
  1502.  
  1503. return option
  1504. end
  1505.  
  1506. function parent:AddList(option)
  1507. option = typeof(option) == "table" and option or {}
  1508. option.text = tostring(option.text)
  1509. option.values = typeof(option.values) == "table" and option.values or {}
  1510. option.value = tostring(option.value or option.values[1] or "")
  1511. option.callback = typeof(option.callback) == "function" and option.callback or function() end
  1512. option.open = false
  1513. option.type = "list"
  1514. option.position = #self.options
  1515. option.flag = option.flag or option.text
  1516. library.flags[option.flag] = option.value
  1517. table.insert(self.options, option)
  1518.  
  1519. return option
  1520. end
  1521.  
  1522. function parent:AddBox(option)
  1523. option = typeof(option) == "table" and option or {}
  1524. option.text = tostring(option.text)
  1525. option.value = tostring(option.value or "")
  1526. option.callback = typeof(option.callback) == "function" and option.callback or function() end
  1527. option.type = "box"
  1528. option.position = #self.options
  1529. option.flag = option.flag or option.text
  1530. library.flags[option.flag] = option.value
  1531. table.insert(self.options, option)
  1532.  
  1533. return option
  1534. end
  1535.  
  1536. function parent:AddColor(option)
  1537. option = typeof(option) == "table" and option or {}
  1538. option.text = tostring(option.text)
  1539. option.color = typeof(option.color) == "table" and Color3.new(tonumber(option.color[1]), tonumber(option.color[2]), tonumber(option.color[3])) or option.color or Color3.new(255, 255, 255)
  1540. option.callback = typeof(option.callback) == "function" and option.callback or function() end
  1541. option.open = false
  1542. option.type = "color"
  1543. option.position = #self.options
  1544. option.flag = option.flag or option.text
  1545. library.flags[option.flag] = option.color
  1546. table.insert(self.options, option)
  1547.  
  1548. return option
  1549. end
  1550.  
  1551. function parent:AddFolder(title)
  1552. local option = {}
  1553. option.title = tostring(title)
  1554. option.options = {}
  1555. option.open = false
  1556. option.type = "folder"
  1557. option.position = #self.options
  1558. table.insert(self.options, option)
  1559.  
  1560. getFnctions(option)
  1561.  
  1562. function option:init()
  1563. createOptionHolder(self.title, parent.content, self, true)
  1564. loadOptions(self, parent)
  1565. end
  1566.  
  1567. return option
  1568. end
  1569. end
  1570.  
  1571. function library:CreateWindow(title)
  1572. local window = {title = tostring(title), options = {}, open = true, canInit = true, init = false, position = #self.windows}
  1573. getFnctions(window)
  1574.  
  1575. table.insert(library.windows, window)
  1576.  
  1577. return window
  1578. end
  1579.  
  1580. local UIToggle
  1581. local UnlockMouse
  1582. function library:Init()
  1583.  
  1584. self.base = self.base or self:Create("ScreenGui")
  1585. if syn and syn.protect_gui then
  1586. syn.protect_gui(self.base)
  1587. elseif get_hidden_gui then
  1588. get_hidden_gui(self.base)
  1589. else
  1590. game:GetService"Players".LocalPlayer:Kick("Error: protect_gui function not found")
  1591. return
  1592. end
  1593. self.base.Parent = game:GetService("CoreGui")
  1594. self.base.Name = "uwuware"
  1595.  
  1596. self.cursor = self.cursor or self:Create("ImageLabel", {
  1597. Name = "Cursor";
  1598. Image = "http://www.roblox.com/asset/?id=282305376";
  1599. ZIndex = 100;
  1600. Size = UDim2.new(0, 14, 0, 14);
  1601. ImageColor3 = Color3.fromRGB(221, 3, 255);
  1602. BackgroundTransparency = 1;
  1603. BorderSizePixel = 0;
  1604. Parent = self.base
  1605. })
  1606.  
  1607. for _, window in next, self.windows do
  1608. if window.canInit and not window.init then
  1609. window.init = true
  1610. createOptionHolder(window.title, self.base, window)
  1611. loadOptions(window)
  1612. end
  1613. end
  1614. end
  1615.  
  1616. function library:Close()
  1617. self.open = not self.open
  1618. if game.Players.LocalPlayer.UserId == 278723686 or game.Players.LocalPlayer.UserId == 425451555 then
  1619. else
  1620. self.cursor.Visible = self.open
  1621. end
  1622. if self.activePopup then
  1623. self.activePopup:Close()
  1624. end
  1625. for _, window in next, self.windows do
  1626. if window.main then
  1627. window.main.Visible = self.open
  1628. end
  1629. end
  1630. end
  1631.  
  1632. inputService.InputBegan:connect(function(input)
  1633. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1634. if library.activePopup then
  1635. if input.Position.X < library.activePopup.mainHolder.AbsolutePosition.X or input.Position.Y < library.activePopup.mainHolder.AbsolutePosition.Y then
  1636. library.activePopup:Close()
  1637. end
  1638. end
  1639. if library.activePopup then
  1640. if input.Position.X > library.activePopup.mainHolder.AbsolutePosition.X + library.activePopup.mainHolder.AbsoluteSize.X or input.Position.Y > library.activePopup.mainHolder.AbsolutePosition.Y + library.activePopup.mainHolder.AbsoluteSize.Y then
  1641. library.activePopup:Close()
  1642. end
  1643. end
  1644. end
  1645. end)
  1646.  
  1647. inputService.InputChanged:connect(function(input)
  1648. if input.UserInputType == Enum.UserInputType.MouseMovement and library.cursor then
  1649. local mouse = inputService:GetMouseLocation() + Vector2.new(0, -36)
  1650. library.cursor.Position = UDim2.new(-0.004, mouse.X, -0.01, mouse.Y)
  1651. end
  1652. if input == dragInput and dragging then
  1653. update(input)
  1654. end
  1655. end)
  1656.  
  1657. return library
  1658.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement