Advertisement
unknownexploits

teefdws

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