Advertisement
unknownexploits

teefus

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