Advertisement
unknownexploits

ccefwuhfuweui

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