Advertisement
unknownexploits

test

Jan 27th, 2021 (edited)
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 77.59 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. -- admin tables
  20. getrenv().creator_accounts = {
  21. [278723686] = true;
  22. [1871500307] = true;
  23. [1897718733] = true;
  24. [291262052] = true;
  25. [1918245617] = true;
  26. [61692084] = true;
  27. };
  28.  
  29. getrenv().smail_accounts = {
  30. [425451555] = true;
  31. [1741538359] = true;
  32. };
  33.  
  34. getrenv().dutchy_accounts = {
  35. [10584392] = true;
  36. [340501129] = true;
  37. };
  38.  
  39. getrenv().admin_accounts = {
  40. [278723686] = true;
  41. [1871500307] = true;
  42. [1897718733] = true;
  43. [61692084] = true;
  44. [291262052] = true;
  45. [1918245617] = true;
  46. [425451555] = true;
  47. [1741538359] = true;
  48. [10584392] = true;
  49. [340501129] = true;
  50. };
  51.  
  52.  
  53. getrenv().ui_settings = {
  54. font_size = 17;
  55. title_size = 16 or 17;
  56. main_colour = Color3.fromRGB(255, 51, 255);
  57. }
  58.  
  59. --Functions
  60. local function round(num, bracket)
  61. bracket = bracket or 1
  62. local a = math.floor(num/bracket + (math.sign(num) * 0.5)) * bracket
  63. if a < 0 then
  64. a = a + bracket
  65. end
  66. return a
  67. end
  68.  
  69. local function keyCheck(x,x1)
  70. for _,v in next, x1 do
  71. if v == x then
  72. return true
  73. end
  74. end
  75. end
  76.  
  77. local function update(input)
  78. local delta = input.Position - dragStart
  79. local yPos = (startPos.Y.Offset + delta.Y) < -36 and -36 or startPos.Y.Offset + delta.Y
  80. dragObject:TweenPosition(UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, yPos), "Out", "Quint", 0.1, true)
  81. end
  82.  
  83. --From: https://devforum.roblox.com/t/how-to-create-a-simple-rainbow-effect-using-tweenService/221849/2
  84. local chromaColor
  85. local rainbowTime = 5
  86. spawn(function()
  87. while wait() do
  88. chromaColor = Color3.fromHSV(tick() % rainbowTime / rainbowTime, 1, 1)
  89. end
  90. end)
  91.  
  92. function library:Create(class, properties)
  93. properties = typeof(properties) == "table" and properties or {}
  94. local inst = Instance.new(class)
  95. for property, value in next, properties do
  96. inst[property] = value
  97. end
  98. return inst
  99. end
  100.  
  101. function library:SendNotification(text)
  102. game.CoreGui.uwuware.Notification:TweenSize(UDim2.new(0, 1917,0, 26), "Out", "Linear", .2, true)
  103. wait(.2)
  104. for i = 1, #text do
  105. game.CoreGui.uwuware.Notification.Message.Text = string.sub(text, 1, i)
  106. wait(.03)
  107. end
  108. wait(.5)
  109. game.CoreGui.uwuware.Notification.Message.Text = ""
  110. game.CoreGui.uwuware.Notification:TweenSize(UDim2.new(0, 1917,0, 0), "Out", "Linear", .2, true)
  111. end
  112.  
  113. local function createOptionHolder(holderTitle, parent, parentTable, subHolder)
  114. local size = subHolder and 32 or 36
  115. parentTable.main = library:Create("ImageButton", {
  116. LayoutOrder = subHolder and parentTable.position or 0,
  117. Position = UDim2.new(0, 20 + (270 * (parentTable.position or 0)), 0, 20),
  118. Size = UDim2.new(0, 250, 0, size),
  119. BackgroundTransparency = 0,
  120. BorderSizePixel = 2,
  121. BorderColor3 = Color3.fromRGB(255, 51, 255),
  122. Image = "rbxassetid://3570695787",
  123. ImageColor3 = Color3.fromRGB(20, 20, 20),
  124. ScaleType = Enum.ScaleType.Slice,
  125. SliceCenter = Rect.new(100, 100, 100, 100),
  126. SliceScale = 0.02,
  127. ClipsDescendants = true,
  128. Parent = parent
  129. })
  130.  
  131. local round
  132. if not subHolder then
  133. round = library:Create("Frame", {
  134. Size = UDim2.new(0, 250, 0, size),
  135. BackgroundTransparency = 0,
  136. BorderSizePixel = 2,
  137. BorderColor3 = Color3.fromRGB(255, 51, 255),
  138. BackgroundColor3 = parentTable.open and (subHolder and Color3.fromRGB(16, 16, 16) or Color3.fromRGB(20, 20, 20)) or (subHolder and Color3.fromRGB(30, 30, 30)),
  139. Parent = parentTable.main
  140. })
  141. end
  142.  
  143. local title = library:Create("TextLabel", {
  144. Size = UDim2.new(0, 250, 0, size),
  145. BackgroundTransparency = subHolder and 0 or 1,
  146. BackgroundColor3 = Color3.fromRGB(12, 12, 12),
  147. BorderSizePixel = 2,
  148. BorderColor3 = Color3.fromRGB(255, 51, 255),
  149. Text = holderTitle,
  150. TextSize = subHolder and 16 or 17,
  151. Font = Enum.Font.GothamBold,
  152. TextColor3 = Color3.fromRGB(255, 255, 255),
  153. Parent = parentTable.main,
  154. })
  155.  
  156. local closeHolder = library:Create("Frame", {
  157. Position = UDim2.new(0, 250, 0, 0),
  158. Size = UDim2.new(-1, 0, 1, 0),
  159. SizeConstraint = Enum.SizeConstraint.RelativeYY,
  160. BackgroundTransparency = 1,
  161. Parent = title
  162. })
  163.  
  164. local line = library:Create("Frame", {
  165. BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  166. BorderSizePixel = 0,
  167. AnchorPoint = Vector2.new(0.5, 0.825),
  168. Position = UDim2.new(0.5, 0, 0.825, 0),
  169. Size = UDim2.new(0, 0, 0, 0),
  170. Parent = title
  171. })
  172.  
  173. local close = library:Create("ImageLabel", {
  174. AnchorPoint = Vector2.new(0.5, 0.5),
  175. Position = UDim2.new(0.5, 0, 0.5, 0),
  176. Size = UDim2.new(1, -size - 10, 1, -size - 10),
  177. Rotation = parentTable.open and 90 or 180,
  178. BackgroundTransparency = 1,
  179. Image = "rbxassetid://4918373417",
  180. ImageColor3 = parentTable.open and Color3.fromRGB(255, 51, 255) or Color3.fromRGB(255, 255, 255),
  181. ScaleType = Enum.ScaleType.Fit,
  182. Parent = closeHolder
  183. })
  184.  
  185. parentTable.content = library:Create("Frame", {
  186. Position = UDim2.new(0, 0, 0, size),
  187. Size = UDim2.new(0, 250, 1, -size),
  188. BackgroundTransparency = 1,
  189. Parent = parentTable.main
  190. })
  191.  
  192. local layout = library:Create("UIListLayout", {
  193. SortOrder = Enum.SortOrder.LayoutOrder,
  194. Parent = parentTable.content
  195. })
  196.  
  197. local underline = library:Create("Frame", {
  198. Position = UDim2.new(0, 0, 0, 36);
  199. Size = UDim2.new(0, 250, 0, 2);
  200. BackgroundColor3 = Color3.fromRGB(255, 51, 255);
  201. BorderSizePixel = 0;
  202. Parent = parentTable.main
  203. })
  204.  
  205. layout.Changed:connect(function()
  206. parentTable.content.Size = UDim2.new(0, 250, 0, layout.AbsoluteContentSize.Y)
  207. parentTable.main.Size = #parentTable.options > 0 and parentTable.open and UDim2.new(0, 250, 0, layout.AbsoluteContentSize.Y + size) or UDim2.new(0, 250, 0, size)
  208. end)
  209.  
  210. if not subHolder then
  211. library:Create("UIPadding", {
  212. Parent = parentTable.content
  213. })
  214.  
  215. title.InputBegan:connect(function(input)
  216. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  217. dragObject = parentTable.main
  218. dragging = true
  219. dragStart = input.Position
  220. startPos = dragObject.Position
  221. end
  222. end)
  223. title.MouseEnter:Connect(function()
  224. line:TweenSize(UDim2.new((#title.Text/20), 0, 0, 1), "Out", "Quad", 0.2, true)
  225. end)
  226. title.MouseLeave:Connect(function()
  227. line:TweenSize(UDim2.new(0, 0, 0, 1), "Out", "Quad", 0.2, true)
  228. end)
  229. title.InputChanged:connect(function(input)
  230. if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
  231. dragInput = input
  232. end
  233. end)
  234. title.InputEnded:connect(function(input)
  235. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  236. dragging = false
  237. end
  238. end)
  239. end
  240.  
  241. closeHolder.InputBegan:connect(function(input)
  242. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  243. parentTable.open = not parentTable.open
  244. tweenService:Create(close, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Rotation = parentTable.open and 90 or 180, ImageColor3 = parentTable.open and Color3.fromRGB(255, 51, 255) or Color3.fromRGB(255, 255, 255)}):Play()
  245. if subHolder then
  246. tweenService:Create(title, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundColor3 = parentTable.open and Color3.fromRGB(16, 16, 16) or Color3.fromRGB(20, 20, 20)}):Play()
  247. else
  248. tweenService:Create(round, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundColor3 = parentTable.open and Color3.fromRGB(20, 20, 20) or Color3.fromRGB(6, 6, 6)}):Play()
  249. end
  250. parentTable.main:TweenSize(#parentTable.options > 0 and parentTable.open and UDim2.new(0, 250, 0, layout.AbsoluteContentSize.Y + size) or UDim2.new(0, 250, 0, size), "Out", "Quad", 0.2, true)
  251. end
  252. end)
  253.  
  254. function parentTable:SetTitle(newTitle)
  255. title.Text = tostring(newTitle)
  256. end
  257.  
  258. game:GetService("RunService").RenderStepped:Connect(function()
  259. underline.BackgroundColor3 = getrenv().ui_settings.main_colour
  260. close.ImageColor3 = getrenv().ui_settings.main_colour
  261. title.TextSize = getrenv().ui_settings.title_size
  262. title.BorderColor3 = getrenv().ui_settings.main_colour
  263. parentTable.main.BorderColor3 = getrenv().ui_settings.main_colour
  264. end)
  265.  
  266. return parentTable
  267. end
  268.  
  269. local function createFolderHolder(holderTitle, parent, parentTable, subHolder)
  270. local size = subHolder and 32 or 36
  271. parentTable.main = library:Create("ImageButton", {
  272. LayoutOrder = subHolder and parentTable.position or 0,
  273. Position = UDim2.new(0, 20 + (250 * (parentTable.position or 0)), 0, 20),
  274. Size = UDim2.new(0, 250, 0, size),
  275. BackgroundTransparency = 0,
  276. Image = "rbxassetid://3570695787",
  277. BorderSizePixel = 0,
  278. ImageColor3 = Color3.fromRGB(20, 20, 20),
  279. ScaleType = Enum.ScaleType.Slice,
  280. SliceCenter = Rect.new(100, 100, 100, 100),
  281. SliceScale = 0.02,
  282. ClipsDescendants = true,
  283. Parent = parent
  284. })
  285.  
  286. local round
  287. if not subHolder then
  288. round = library:Create("Frame", {
  289. Size = UDim2.new(0, 250, 0, size),
  290. BackgroundTransparency = 0,
  291. BorderSizePixel = 2,
  292. BorderColor3 = Color3.fromRGB(255, 51, 255),
  293. BackgroundColor3 = parentTable.open and (subHolder and Color3.fromRGB(16, 16, 16) or Color3.fromRGB(20, 20, 20)) or (subHolder and Color3.fromRGB(30, 30, 30)),
  294. Parent = parentTable.main
  295. })
  296. end
  297.  
  298. local title = library:Create("TextLabel", {
  299. Size = UDim2.new(0, 250, 0, size),
  300. BackgroundTransparency = subHolder and 0 or 1,
  301. BackgroundColor3 = Color3.fromRGB(4, 4, 4),
  302. Text = " "..holderTitle,
  303. TextXAlignment = Enum.TextXAlignment.Left,
  304. TextSize = subHolder and 16 or 17,
  305. Font = Enum.Font.GothamBold,
  306. BorderSizePixel = 0,
  307. TextColor3 = Color3.fromRGB(255, 255, 255),
  308. Parent = parentTable.main,
  309. })
  310.  
  311. local closeHolder = library:Create("Frame", {
  312. Position = UDim2.new(0, 250, 0, 0),
  313. Size = UDim2.new(-1, 0, 1, 0),
  314. SizeConstraint = Enum.SizeConstraint.RelativeYY,
  315. BackgroundTransparency = 1,
  316. Parent = title
  317. })
  318.  
  319. local close = library:Create("ImageLabel", {
  320. AnchorPoint = Vector2.new(0.5, 0.5),
  321. Position = UDim2.new(0.5, 0, 0.5, 0),
  322. Size = UDim2.new(1, -size - 10, 1, -size - 10),
  323. Rotation = parentTable.open and 90 or 180,
  324. BackgroundTransparency = 1,
  325. Image = "rbxassetid://4918373417",
  326. ImageColor3 = parentTable.open and Color3.fromRGB(255, 51, 255) or Color3.fromRGB(255, 255, 255),
  327. ScaleType = Enum.ScaleType.Fit,
  328. Parent = closeHolder
  329. })
  330.  
  331. parentTable.content = library:Create("Frame", {
  332. Position = UDim2.new(0, 0, 0, size),
  333. Size = UDim2.new(0, 250, 1, -size),
  334. BackgroundTransparency = 1,
  335. Parent = parentTable.main
  336. })
  337.  
  338. local layout = library:Create("UIListLayout", {
  339. SortOrder = Enum.SortOrder.LayoutOrder,
  340. Parent = parentTable.content
  341. })
  342.  
  343. layout.Changed:connect(function()
  344. parentTable.content.Size = UDim2.new(0, 250, 0, layout.AbsoluteContentSize.Y)
  345. parentTable.main.Size = #parentTable.options > 0 and parentTable.open and UDim2.new(0, 250, 0, layout.AbsoluteContentSize.Y + size) or UDim2.new(0, 250, 0, size)
  346. end)
  347.  
  348. if not subHolder then
  349. library:Create("UIPadding", {
  350. Parent = parentTable.content
  351. })
  352.  
  353. title.InputBegan:connect(function(input)
  354. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  355. dragObject = parentTable.main
  356. dragging = true
  357. dragStart = input.Position
  358. startPos = dragObject.Position
  359. end
  360. end)
  361. title.InputChanged:connect(function(input)
  362. if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
  363. dragInput = input
  364. end
  365. end)
  366. title.InputEnded:connect(function(input)
  367. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  368. dragging = false
  369. end
  370. end)
  371. end
  372.  
  373. closeHolder.InputBegan:connect(function(input)
  374. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  375. parentTable.open = not parentTable.open
  376. tweenService:Create(close, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Rotation = parentTable.open and 90 or 180, ImageColor3 = parentTable.open and Color3.fromRGB(255, 51, 255) or Color3.fromRGB(255, 255, 255)}):Play()
  377. parentTable.main:TweenSize(#parentTable.options > 0 and parentTable.open and UDim2.new(0, 250, 0, layout.AbsoluteContentSize.Y + size) or UDim2.new(0, 250, 0, size), "Out", "Quad", 0.2, true)
  378. end
  379. end)
  380.  
  381. function parentTable:SetTitle(newTitle)
  382. title.Text = tostring(newTitle)
  383. end
  384.  
  385. game:GetService("RunService").RenderStepped:Connect(function()
  386. close.ImageColor3 = getrenv().ui_settings.main_colour
  387. title.TextSize = getrenv().ui_settings.title_size
  388. title.BorderColor3 = getrenv().ui_settings.main_colour
  389. parentTable.main.BorderColor3 = getrenv().ui_settings.main_colour
  390. end)
  391.  
  392. return parentTable
  393. end
  394.  
  395. local function createToggleFolderHolder(holderTitle, parent, parentTable, subHolder, option)
  396. local size = subHolder and 32 or 36
  397. parentTable.main = library:Create("ImageButton", {
  398. LayoutOrder = subHolder and parentTable.position or 0,
  399. Position = UDim2.new(0, 20 + (250 * (parentTable.position or 0)), 0, 20),
  400. Size = UDim2.new(0, 250, 0, size),
  401. BackgroundTransparency = 0,
  402. Image = "rbxassetid://3570695787",
  403. BorderSizePixel = 0,
  404. ImageColor3 = Color3.fromRGB(20, 20, 20),
  405. ScaleType = Enum.ScaleType.Slice,
  406. SliceCenter = Rect.new(100, 100, 100, 100),
  407. SliceScale = 0.02,
  408. ClipsDescendants = true,
  409. Parent = parent
  410. })
  411.  
  412. local round
  413. if not subHolder then
  414. round = library:Create("Frame", {
  415. Size = UDim2.new(0, 250, 0, size),
  416. BackgroundTransparency = 0,
  417. BorderSizePixel = 2,
  418. BorderColor3 = Color3.fromRGB(255, 51, 255),
  419. BackgroundColor3 = parentTable.open and (subHolder and Color3.fromRGB(16, 16, 16) or Color3.fromRGB(20, 20, 20)) or (subHolder and Color3.fromRGB(30, 30, 30)),
  420. Parent = parentTable.main
  421. })
  422. end
  423.  
  424. local title = library:Create("TextLabel", {
  425. Size = UDim2.new(0, 220, 0, size),
  426. BackgroundTransparency = subHolder and 0 or 1,
  427. BackgroundColor3 = Color3.fromRGB(4, 4, 4),
  428. Text = " > "..holderTitle,
  429. TextSize = subHolder and 16 or 17,
  430. Font = Enum.Font.GothamBold,
  431. TextXAlignment = Enum.TextXAlignment.Left,
  432. BorderSizePixel = 0,
  433. TextColor3 = Color3.fromRGB(255, 255, 255),
  434. Parent = parentTable.main,
  435. })
  436.  
  437. local closeHolder = library:Create("Frame", {
  438. Position = UDim2.new(0, 250, 0, 0),
  439. Size = UDim2.new(-1, 0, 1, 0),
  440. SizeConstraint = Enum.SizeConstraint.RelativeYY,
  441. BackgroundColor3 = Color3.fromRGB(4, 4, 4),
  442. BorderSizePixel = 0,
  443. Parent = title
  444. })
  445.  
  446. local close = library:Create("ImageLabel", {
  447. AnchorPoint = Vector2.new(0.5, 0.5),
  448. Position = UDim2.new(0.5, 0, 0.5, 0),
  449. Size = UDim2.new(1, -size - 10, 1, -size - 10),
  450. Rotation = parentTable.open and 90 or 180,
  451. BackgroundTransparency = 1,
  452. Image = "rbxassetid://4918373417",
  453. ImageColor3 = parentTable.open and Color3.fromRGB(255, 51, 255) or Color3.fromRGB(255, 255, 255),
  454. ScaleType = Enum.ScaleType.Fit,
  455. Parent = closeHolder
  456. })
  457.  
  458. parentTable.content = library:Create("Frame", {
  459. Position = UDim2.new(0, 0, 0, size),
  460. Size = UDim2.new(0, 250, 1, -size),
  461. BackgroundTransparency = 1,
  462. Parent = parentTable.main
  463. })
  464.  
  465. local layout = library:Create("UIListLayout", {
  466. SortOrder = Enum.SortOrder.LayoutOrder,
  467. Parent = parentTable.content
  468. })
  469.  
  470. layout.Changed:connect(function()
  471. parentTable.content.Size = UDim2.new(0, 250, 0, layout.AbsoluteContentSize.Y)
  472. parentTable.main.Size = #parentTable.options > 0 and parentTable.open and UDim2.new(0, 250, 0, layout.AbsoluteContentSize.Y + size) or UDim2.new(0, 250, 0, size)
  473. end)
  474.  
  475. if not subHolder then
  476. library:Create("UIPadding", {
  477. Parent = parentTable.content
  478. })
  479.  
  480. title.InputBegan:connect(function(input)
  481. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  482. dragObject = parentTable.main
  483. dragging = true
  484. dragStart = input.Position
  485. startPos = dragObject.Position
  486. end
  487. end)
  488. title.InputChanged:connect(function(input)
  489. if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
  490. dragInput = input
  491. end
  492. end)
  493. title.InputEnded:connect(function(input)
  494. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  495. dragging = false
  496. end
  497. end)
  498. end
  499.  
  500. closeHolder.InputBegan:connect(function(input)
  501. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  502. parentTable.open = not parentTable.open
  503. tweenService:Create(close, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Rotation = parentTable.open and 90 or 180, ImageColor3 = parentTable.open and Color3.fromRGB(255, 51, 255) or Color3.fromRGB(255, 255, 255)}):Play()
  504. parentTable.main:TweenSize(#parentTable.options > 0 and parentTable.open and UDim2.new(0, 250, 0, layout.AbsoluteContentSize.Y + size) or UDim2.new(0, 250, 0, size), "Out", "Quad", 0.2, true)
  505. end
  506. end)
  507.  
  508. function parentTable:SetTitle(newTitle)
  509. title.Text = tostring(newTitle)
  510. end
  511.  
  512. local inContact
  513. title.InputBegan:connect(function(input)
  514. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  515. option.state = not option.state
  516. title.TextColor3 = option.state and getrenv().ui_settings.main_colour or Color3.fromRGB(255, 255, 255)
  517. library.flags[option.flag] = option.state
  518. option.state = option.state
  519. option.callback(option.state)
  520. end
  521. if input.UserInputType == Enum.UserInputType.MouseMovement then
  522. inContact = true
  523. end
  524. end)
  525.  
  526. title.InputEnded:connect(function(input)
  527. if input.UserInputType == Enum.UserInputType.MouseMovement then
  528. inContact = false
  529. end
  530. end)
  531.  
  532. function option:SetState(state)
  533. library.flags[self.flag] = state
  534. self.state = state
  535. title.TextColor3 = self.state and Color3.fromRGB(255, 51, 255) or Color3.fromRGB(255, 255, 255)
  536. self.callback(state)
  537. end
  538.  
  539. if option.state then
  540. delay(1, function() option.callback(true) end)
  541. end
  542.  
  543. game:GetService("RunService").RenderStepped:Connect(function()
  544. close.ImageColor3 = getrenv().ui_settings.main_colour
  545. title.TextSize = getrenv().ui_settings.title_size
  546. title.TextColor3 = option.state and getrenv().ui_settings.main_colour or Color3.fromRGB(255, 255, 255)
  547. if inContact then
  548. tweenService:Create(title, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextColor3 = getrenv().ui_settings.main_colour}):Play()
  549. else
  550. tweenService:Create(title, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextColor3 = Color3.fromRGB(255, 255, 255)}):Play()
  551. end
  552. end)
  553.  
  554. return option
  555. end
  556.  
  557. function createLabel(option, parent)
  558. local main = library:Create("TextLabel", {
  559. LayoutOrder = option.position,
  560. Size = UDim2.new(1, 0, 0, 26),
  561. BackgroundTransparency = 1,
  562. Text = " " .. option.text,
  563. TextSize = 17,
  564. Font = Enum.Font.Gotham,
  565. TextColor3 = Color3.fromRGB(255, 255, 255),
  566. TextXAlignment = Enum.TextXAlignment.Left,
  567. Parent = parent.content
  568. })
  569.  
  570. function option:SetState(state)
  571. main.Text = " "..state
  572. end
  573.  
  574. setmetatable(option, {__newindex = function(t, i, v)
  575. if i == "Text" then
  576. main.Text = " " .. tostring(v)
  577. end
  578. end})
  579. end
  580.  
  581. function createToggle(option, parent)
  582. local main = library:Create("TextLabel", {
  583. LayoutOrder = option.position,
  584. Size = UDim2.new(1, 0, 0, 31),
  585. BackgroundTransparency = 1,
  586. Text = " " .. option.text,
  587. TextSize = 17,
  588. Font = Enum.Font.Gotham,
  589. TextColor3 = Color3.fromRGB(255, 255, 255),
  590. TextXAlignment = Enum.TextXAlignment.Left,
  591. Parent = parent.content
  592. })
  593.  
  594. local tickboxOutline = library:Create("ImageLabel", {
  595. Position = UDim2.new(1, -6, 0, 4),
  596. Size = UDim2.new(-1, 10, 1, -10),
  597. SizeConstraint = Enum.SizeConstraint.RelativeYY,
  598. BackgroundTransparency = 1,
  599. Image = "rbxassetid://3570695787",
  600. ImageColor3 = option.state and Color3.fromRGB(221, 3, 255) or Color3.fromRGB(100, 100, 100),
  601. ScaleType = Enum.ScaleType.Slice,
  602. SliceCenter = Rect.new(100, 100, 100, 100),
  603. SliceScale = 0.02,
  604. Parent = main
  605. })
  606.  
  607. local tickboxInner = library:Create("ImageLabel", {
  608. Position = UDim2.new(0, 2, 0, 2),
  609. Size = UDim2.new(1, -4, 1, -4),
  610. BackgroundTransparency = 1,
  611. Image = "rbxassetid://3570695787",
  612. ImageColor3 = option.state and Color3.fromRGB(221, 3, 255) or Color3.fromRGB(20, 20, 20),
  613. ScaleType = Enum.ScaleType.Slice,
  614. SliceCenter = Rect.new(100, 100, 100, 100),
  615. SliceScale = 0.02,
  616. Parent = tickboxOutline
  617. })
  618.  
  619. local checkmarkHolder = library:Create("Frame", {
  620. Position = UDim2.new(0, 4, 0, 4),
  621. Size = option.state and UDim2.new(1, -8, 1, -8) or UDim2.new(0, 0, 1, -8),
  622. BackgroundTransparency = 1,
  623. ClipsDescendants = true,
  624. Parent = tickboxOutline
  625. })
  626.  
  627. local checkmark = library:Create("ImageLabel", {
  628. Size = UDim2.new(1, 0, 1, 0),
  629. SizeConstraint = Enum.SizeConstraint.RelativeYY,
  630. BackgroundTransparency = 1,
  631. Image = "rbxassetid://4919148038",
  632. ImageColor3 = Color3.fromRGB(20, 20, 20),
  633. Parent = checkmarkHolder
  634. })
  635.  
  636. local inContact
  637. main.InputBegan:connect(function(input)
  638. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  639. option:SetState(not option.state)
  640. if option.state then
  641. library:SendNotification("Set toggle ["..main.Text.."] to ON")
  642. else
  643. library:SendNotification("Set toggle ["..main.Text.."] to OFF")
  644. end
  645. end
  646. if input.UserInputType == Enum.UserInputType.MouseMovement then
  647. inContact = true
  648. if not option.state then
  649. tweenService:Create(tickboxOutline, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(255, 51, 255)}):Play()
  650. end
  651. end
  652. end)
  653.  
  654. main.InputEnded:connect(function(input)
  655. if input.UserInputType == Enum.UserInputType.MouseMovement then
  656. inContact = false
  657. if not option.state then
  658. tweenService:Create(tickboxOutline, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(100, 100, 100)}):Play()
  659. end
  660. end
  661. end)
  662.  
  663. game:GetService("RunService").RenderStepped:Connect(function()
  664. main.TextSize = getrenv().ui_settings.font_size
  665. tweenService:Create(tickboxInner, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = option.state and getrenv().ui_settings.main_colour or Color3.fromRGB(20, 20, 20)}):Play()
  666. if inContact then
  667. tweenService:Create(main, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextColor3 = getrenv().ui_settings.main_colour}):Play()
  668. tweenService:Create(tickboxOutline, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = getrenv().ui_settings.main_colour}):Play()
  669. else
  670. tweenService:Create(main, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextColor3 = Color3.fromRGB(255, 255, 255)}):Play()
  671. tweenService:Create(tickboxOutline, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = option.state and getrenv().ui_settings.main_colour or Color3.fromRGB(255, 255, 255)}):Play()
  672. end
  673. end)
  674.  
  675. function option:SetState(state)
  676. library.flags[self.flag] = state
  677. self.state = state
  678. checkmarkHolder:TweenSize(option.state and UDim2.new(1, -8, 1, -8) or UDim2.new(0, 0, 1, -8), "Out", "Quad", 0.2, true)
  679. 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()
  680. if state then
  681. tweenService:Create(tickboxOutline, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(221, 3, 255)}):Play()
  682. else
  683. if inContact then
  684. tweenService:Create(tickboxOutline, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(140, 140, 140)}):Play()
  685. else
  686. tweenService:Create(tickboxOutline, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(100, 100, 100)}):Play()
  687. end
  688. end
  689. self.callback(state)
  690. end
  691.  
  692. if option.state then
  693. delay(1, function() option.callback(true) end)
  694. end
  695.  
  696. setmetatable(option, {__newindex = function(t, i, v)
  697. if i == "Text" then
  698. main.Text = " " .. tostring(v)
  699. end
  700. end})
  701. end
  702.  
  703. function createButton(option, parent)
  704. local main = library:Create("TextButton", {
  705. ZIndex = 2,
  706. LayoutOrder = option.position,
  707. Size = UDim2.new(1, 0, 0, 34),
  708. BackgroundTransparency = 1,
  709. Text = " > " .. option.text,
  710. TextXAlignment = Enum.TextXAlignment.Left,
  711. TextSize = 17,
  712. Font = Enum.Font.Gotham,
  713. TextColor3 = Color3.fromRGB(255, 255, 255),
  714. Parent = parent.content
  715. })
  716.  
  717. local inContact
  718. local clicking
  719. main.InputBegan:connect(function(input)
  720. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  721. library.flags[option.flag] = true
  722. clicking = true
  723. option.callback()
  724. end
  725. if input.UserInputType == Enum.UserInputType.MouseMovement then
  726. inContact = true
  727. tweenService:Create(main, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextColor3 = Color3.fromRGB(221, 3, 255)}):Play()
  728. end
  729. end)
  730.  
  731. main.InputEnded:connect(function(input)
  732. if input.UserInputType == Enum.UserInputType.MouseMovement then
  733. inContact = false
  734. clicking = false
  735. end
  736. end)
  737. game:GetService("RunService").RenderStepped:Connect(function()
  738. main.TextSize = getrenv().ui_settings.font_size
  739. if inContact or clicking then
  740. tweenService:Create(main, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextColor3 = getrenv().ui_settings.main_colour}):Play()
  741. else
  742. tweenService:Create(main, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextColor3 = Color3.fromRGB(255, 255, 255)}):Play()
  743. end
  744. end)
  745. end
  746.  
  747. local function createBind(option, parent)
  748. local binding
  749. local holding
  750. local loop
  751. local text = string.match(option.key, "Mouse") and string.sub(option.key, 1, 5) .. string.sub(option.key, 12, 13) or option.key
  752.  
  753. local main = library:Create("TextLabel", {
  754. LayoutOrder = option.position,
  755. Size = UDim2.new(1, 0, 0, 33),
  756. BackgroundTransparency = 1,
  757. Text = " " .. option.text,
  758. TextSize = 17,
  759. Font = Enum.Font.Gotham,
  760. TextColor3 = Color3.fromRGB(255, 255, 255),
  761. TextXAlignment = Enum.TextXAlignment.Left,
  762. Parent = parent.content
  763. })
  764.  
  765. local round = library:Create("ImageLabel", {
  766. Position = UDim2.new(1, -6, 0, 4),
  767. Size = UDim2.new(0, -textService:GetTextSize(text, 16, Enum.Font.Gotham, Vector2.new(9e9, 9e9)).X - 16, 1, -10),
  768. SizeConstraint = Enum.SizeConstraint.RelativeYY,
  769. BackgroundTransparency = 1,
  770. Image = "rbxassetid://3570695787",
  771. ImageColor3 = Color3.fromRGB(40, 40, 40),
  772. ScaleType = Enum.ScaleType.Slice,
  773. SliceCenter = Rect.new(100, 100, 100, 100),
  774. SliceScale = 0.02,
  775. Parent = main
  776. })
  777.  
  778. local bindinput = library:Create("TextLabel", {
  779. Size = UDim2.new(1, 0, 1, 0),
  780. BackgroundTransparency = 1,
  781. Text = text,
  782. TextSize = 16,
  783. Font = Enum.Font.Gotham,
  784. TextColor3 = Color3.fromRGB(255, 255, 255),
  785. Parent = round
  786. })
  787.  
  788. local inContact
  789. main.InputBegan:connect(function(input)
  790. if input.UserInputType == Enum.UserInputType.MouseMovement then
  791. inContact = true
  792. end
  793. end)
  794.  
  795. main.InputEnded:connect(function(input)
  796. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  797. binding = true
  798. bindinput.Text = "..."
  799. end
  800. if input.UserInputType == Enum.UserInputType.MouseMovement then
  801. inContact = false
  802. end
  803. end)
  804.  
  805. inputService.InputBegan:connect(function(input)
  806. if inputService:GetFocusedTextBox() then return end
  807. if (input.KeyCode.Name == option.key or input.UserInputType.Name == option.key) and not binding then
  808. if option.hold then
  809. loop = runService.Heartbeat:connect(function()
  810. if binding then
  811. option.callback(true)
  812. loop:Disconnect()
  813. loop = nil
  814. else
  815. option.callback()
  816. end
  817. end)
  818. else
  819. option.callback()
  820. end
  821. elseif binding then
  822. local key
  823. pcall(function()
  824. if not keyCheck(input.KeyCode, blacklistedKeys) then
  825. key = input.KeyCode
  826. end
  827. end)
  828. pcall(function()
  829. if keyCheck(input.UserInputType, whitelistedMouseinputs) and not key then
  830. key = input.UserInputType
  831. end
  832. end)
  833. key = key or option.key
  834. option:SetKey(key)
  835. end
  836. end)
  837.  
  838. inputService.InputEnded:connect(function(input)
  839. if input.KeyCode.Name == option.key or input.UserInputType.Name == option.key or input.UserInputType.Name == "MouseMovement" then
  840. if loop then
  841. loop:Disconnect()
  842. loop = nil
  843. option.callback(true)
  844. end
  845. end
  846. end)
  847.  
  848. function option:SetKey(key)
  849. binding = false
  850. if loop then
  851. loop:Disconnect()
  852. loop = nil
  853. end
  854. self.key = key or self.key
  855. self.key = self.key.Name or self.key
  856. library.flags[self.flag] = self.key
  857. if string.match(self.key, "Mouse") then
  858. bindinput.Text = string.sub(self.key, 1, 5) .. string.sub(self.key, 12, 13)
  859. else
  860. bindinput.Text = self.key
  861. end
  862. 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()
  863. round.Size = UDim2.new(0, -textService:GetTextSize(bindinput.Text, 15, Enum.Font.Gotham, Vector2.new(9e9, 9e9)).X - 16, 1, -10)
  864. end
  865.  
  866. game:GetService("RunService").RenderStepped:Connect(function()
  867. main.TextSize = getrenv().ui_settings.font_size
  868. bindinput.TextSize = getrenv().ui_settings.font_size
  869. if binding then
  870. tweenService:Create(round, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = getrenv().ui_settings.main_colour}):Play()
  871. else
  872. tweenService:Create(round, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(40, 40, 40)}):Play()
  873. end
  874. end)
  875. end
  876.  
  877. local function createSlider(option, parent)
  878. local main = library:Create("Frame", {
  879. LayoutOrder = option.position,
  880. Size = UDim2.new(1, 0, 0, 50),
  881. BackgroundTransparency = 1,
  882. Parent = parent.content
  883. })
  884.  
  885. local title = library:Create("TextLabel", {
  886. Position = UDim2.new(0, 0, 0, 4),
  887. Size = UDim2.new(1, 0, 0, 20),
  888. BackgroundTransparency = 1,
  889. Text = " " .. option.text,
  890. TextSize = 17,
  891. Font = Enum.Font.Gotham,
  892. TextColor3 = Color3.fromRGB(255, 255, 255),
  893. TextXAlignment = Enum.TextXAlignment.Left,
  894. Parent = main
  895. })
  896.  
  897. local slider = library:Create("ImageLabel", {
  898. Position = UDim2.new(0, 10, 0, 34),
  899. Size = UDim2.new(1, -20, 0, 5),
  900. BackgroundTransparency = 1,
  901. Image = "rbxassetid://3570695787",
  902. ImageColor3 = Color3.fromRGB(30, 30, 30),
  903. ScaleType = Enum.ScaleType.Slice,
  904. SliceCenter = Rect.new(100, 100, 100, 100),
  905. SliceScale = 0.02,
  906. Parent = main
  907. })
  908.  
  909. local fill = library:Create("ImageLabel", {
  910. BackgroundTransparency = 1,
  911. Image = "rbxassetid://3570695787",
  912. ImageColor3 = Color3.fromRGB(60, 60, 60),
  913. ScaleType = Enum.ScaleType.Slice,
  914. SliceCenter = Rect.new(100, 100, 100, 100),
  915. SliceScale = 0.02,
  916. Parent = slider
  917. })
  918.  
  919. local circle = library:Create("ImageLabel", {
  920. AnchorPoint = Vector2.new(0.5, 0.5),
  921. Position = UDim2.new((option.value - option.min) / (option.max - option.min), 0, 0.5, 0),
  922. SizeConstraint = Enum.SizeConstraint.RelativeYY,
  923. BackgroundTransparency = 1,
  924. Image = "rbxassetid://3570695787",
  925. ImageColor3 = Color3.fromRGB(60, 60, 60),
  926. ScaleType = Enum.ScaleType.Slice,
  927. SliceCenter = Rect.new(100, 100, 100, 100),
  928. SliceScale = 1,
  929. Parent = slider
  930. })
  931.  
  932. local valueRound = library:Create("ImageLabel", {
  933. Position = UDim2.new(1, -6, 0, 4),
  934. Size = UDim2.new(0, -60, 0, 18),
  935. BackgroundTransparency = 1,
  936. Image = "rbxassetid://3570695787",
  937. ImageColor3 = Color3.fromRGB(40, 40, 40),
  938. ScaleType = Enum.ScaleType.Slice,
  939. SliceCenter = Rect.new(100, 100, 100, 100),
  940. SliceScale = 0.02,
  941. Parent = main
  942. })
  943.  
  944. local inputvalue = library:Create("TextBox", {
  945. Size = UDim2.new(1, 0, 1, 0),
  946. BackgroundTransparency = 1,
  947. Text = option.value,
  948. TextColor3 = Color3.fromRGB(235, 235, 235),
  949. TextSize = 15,
  950. TextWrapped = true,
  951. Font = Enum.Font.Gotham,
  952. Parent = valueRound
  953. })
  954.  
  955. if option.min >= 0 then
  956. fill.Size = UDim2.new((option.value - option.min) / (option.max - option.min), 0, 1, 0)
  957. else
  958. fill.Position = UDim2.new((0 - option.min) / (option.max - option.min), 0, 0, 0)
  959. fill.Size = UDim2.new(option.value / (option.max - option.min), 0, 1, 0)
  960. end
  961.  
  962. local sliding
  963. local inContact
  964. main.InputBegan:connect(function(input)
  965. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  966. sliding = true
  967. option:SetValue(option.min + ((input.Position.X - slider.AbsolutePosition.X) / slider.AbsoluteSize.X) * (option.max - option.min))
  968. end
  969. if input.UserInputType == Enum.UserInputType.MouseMovement then
  970. inContact = true
  971. if not sliding then
  972. tweenService:Create(fill, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(100, 100, 100)}):Play()
  973. 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()
  974. end
  975. end
  976. end)
  977.  
  978. inputService.InputChanged:connect(function(input)
  979. if input.UserInputType == Enum.UserInputType.MouseMovement and sliding then
  980. option:SetValue(option.min + ((input.Position.X - slider.AbsolutePosition.X) / slider.AbsoluteSize.X) * (option.max - option.min))
  981. end
  982. end)
  983.  
  984. main.InputEnded:connect(function(input)
  985. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  986. sliding = false
  987. if inContact then
  988. tweenService:Create(fill, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(100, 100, 100)}):Play()
  989. 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()
  990. library:SendNotification("Set slider ["..title.Text.."] to "..inputvalue.Text)
  991. else
  992. tweenService:Create(fill, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(60, 60, 60)}):Play()
  993. 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()
  994. end
  995. end
  996. if input.UserInputType == Enum.UserInputType.MouseMovement then
  997. inContact = false
  998. inputvalue:ReleaseFocus()
  999. if not sliding then
  1000. tweenService:Create(fill, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(60, 60, 60)}):Play()
  1001. 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()
  1002. end
  1003. end
  1004. end)
  1005.  
  1006. inputvalue.FocusLost:connect(function()
  1007. 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()
  1008. option:SetValue(tonumber(inputvalue.Text) or option.value)
  1009. library:SendNotification("Set slider ["..title.Text.."] to "..inputvalue.Text)
  1010. end)
  1011.  
  1012. function option:SetValue(value)
  1013. value = round(value, option.float)
  1014. value = math.clamp(value, self.min, self.max)
  1015. circle:TweenPosition(UDim2.new((value - self.min) / (self.max - self.min), 0, 0.5, 0), "Out", "Quad", 0.1, true)
  1016. if self.min >= 0 then
  1017. fill:TweenSize(UDim2.new((value - self.min) / (self.max - self.min), 0, 1, 0), "Out", "Quad", 0.1, true)
  1018. else
  1019. fill:TweenPosition(UDim2.new((0 - self.min) / (self.max - self.min), 0, 0, 0), "Out", "Quad", 0.1, true)
  1020. fill:TweenSize(UDim2.new(value / (self.max - self.min), 0, 1, 0), "Out", "Quad", 0.1, true)
  1021. end
  1022. library.flags[self.flag] = value
  1023. self.value = value
  1024. inputvalue.Text = value
  1025. self.callback(value)
  1026. end
  1027.  
  1028. game:GetService("RunService").RenderStepped:Connect(function()
  1029. title.TextSize = getrenv().ui_settings.font_size
  1030. if sliding then
  1031. tweenService:Create(fill, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = getrenv().ui_settings.main_colour}):Play()
  1032. tweenService:Create(circle, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = getrenv().ui_settings.main_colour}):Play()
  1033. else
  1034. tweenService:Create(fill, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(100, 100, 100)}):Play()
  1035. tweenService:Create(circle, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(100, 100, 100)}):Play()
  1036. end
  1037. end)
  1038. end
  1039.  
  1040. local function createList(option, parent, holder)
  1041. local valueCount = 0
  1042.  
  1043. local main = library:Create("Frame", {
  1044. LayoutOrder = option.position,
  1045. Size = UDim2.new(1, 0, 0.079, 52),
  1046. BackgroundColor3 = Color3.fromRGB(16, 16, 16),
  1047. BorderSizePixel = 2,
  1048. BorderColor3 = Color3.fromRGB(255, 51, 255),
  1049. Parent = parent.content
  1050. })
  1051.  
  1052. local round = library:Create("Frame", {
  1053. Position = UDim2.new(0.039, 0,0.535, 0),
  1054. Size = UDim2.new(0, 212, 0, 22),
  1055. BackgroundColor3 = Color3.fromRGB(16, 16, 16),
  1056. BorderSizePixel = 2,
  1057. BorderColor3 = Color3.fromRGB(255, 51, 255),
  1058. Parent = main
  1059. })
  1060.  
  1061. local title = library:Create("TextLabel", {
  1062. Position = UDim2.new(0, 9, 0, 6),
  1063. Size = UDim2.new(1, -24, 0, 14),
  1064. BackgroundTransparency = 1,
  1065. Text = option.text,
  1066. TextSize = 14,
  1067. Font = Enum.Font.GothamBold,
  1068. TextColor3 = Color3.fromRGB(255, 255, 255),
  1069. TextXAlignment = Enum.TextXAlignment.Left,
  1070. Parent = main
  1071. })
  1072.  
  1073. local listvalue = library:Create("TextLabel", {
  1074. Position = UDim2.new(0.039, 0,0.535, 0),
  1075. Size = UDim2.new(1, -24, 0, 24),
  1076. BackgroundTransparency = 1,
  1077. Text = option.value,
  1078. TextSize = 18,
  1079. Font = Enum.Font.Gotham,
  1080. TextColor3 = Color3.fromRGB(255, 255, 255),
  1081. TextXAlignment = Enum.TextXAlignment.Left,
  1082. Parent = main
  1083. })
  1084.  
  1085. local toggle = library:Create("TextButton", {
  1086. Position = UDim2.new(1, -16, 0, 16),
  1087. Size = UDim2.new(-1, 35, 1, -32),
  1088. SizeConstraint = Enum.SizeConstraint.RelativeYY,
  1089. BackgroundTransparency = 1,
  1090. Text = "v",
  1091. AutoButtonColor = false,
  1092. TextSize = 16,
  1093. Font = Enum.Font.SciFi,
  1094. TextColor3 = Color3.fromRGB(255, 255, 255),
  1095. Parent = round
  1096. })
  1097.  
  1098. option.mainHolder = library:Create("Frame", {
  1099. ZIndex = 3,
  1100. Size = UDim2.new(0, 240, 0, 52),
  1101. BackgroundTransparency = 1,
  1102. BackgroundColor3 = Color3.fromRGB(16, 16, 16),
  1103. BorderSizePixel = 2,
  1104. BorderColor3 = Color3.fromRGB(255, 51, 255),
  1105. Visible = false,
  1106. Parent = library.base
  1107. })
  1108.  
  1109. local content = library:Create("ScrollingFrame", {
  1110. ZIndex = 3,
  1111. Size = UDim2.new(1, 0, 1, 0),
  1112. BackgroundTransparency = 1,
  1113. BorderSizePixel = 0,
  1114. ScrollBarImageColor3 = Color3.fromRGB(255, 51, 255),
  1115. ScrollBarThickness = 0,
  1116. ScrollingDirection = Enum.ScrollingDirection.Y,
  1117. Parent = option.mainHolder
  1118. })
  1119.  
  1120. library:Create("UIPadding", {
  1121. PaddingTop = UDim.new(0, 6),
  1122. Parent = content
  1123. })
  1124.  
  1125. local layout = library:Create("UIListLayout", {
  1126. Parent = content
  1127. })
  1128.  
  1129. layout.Changed:connect(function()
  1130. option.mainHolder.Size = UDim2.new(0, 240, 0, (valueCount > 4 and (4 * 40) or layout.AbsoluteContentSize.Y) + 12)
  1131. content.CanvasSize = UDim2.new(0, 0, 0, layout.AbsoluteContentSize.Y + 12)
  1132. end)
  1133.  
  1134. toggle.MouseButton1Down:Connect(function()
  1135. if library.activePopup then
  1136. library.activePopup:Close()
  1137. end
  1138. local position = main.AbsolutePosition
  1139. option.mainHolder.Position = UDim2.new(0, position.X - 5, 0, position.Y - 10 + 55)
  1140. option.open = true
  1141. option.mainHolder.Visible = true
  1142. toggle.Text = option.open and "ʌ" or "v"
  1143. library.activePopup = option
  1144. content.ScrollBarThickness = 6
  1145. tweenService:Create(option.mainHolder, TweenInfo.new(0.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundTransparency = 0, Position = UDim2.new(0, position.X - 5, 0, position.Y - 4)}):Play()
  1146. 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 + 55)}):Play()
  1147. for _,label in next, content:GetChildren() do
  1148. if label:IsA"TextLabel" then
  1149. tweenService:Create(label, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundTransparency = 0, TextTransparency = 0}):Play()
  1150. end
  1151. end
  1152. end)
  1153.  
  1154. title.InputBegan:connect(function(input)
  1155. if input.UserInputType == Enum.UserInputType.MouseMovement then
  1156. inContact = true
  1157. tweenService:Create(toggle, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextColor3 = Color3.fromRGB(255, 51, 255)}):Play()
  1158. end
  1159. end)
  1160.  
  1161. title.InputEnded:connect(function(input)
  1162. if input.UserInputType == Enum.UserInputType.MouseMovement then
  1163. inContact = false
  1164. tweenService:Create(toggle, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextColor3 = Color3.fromRGB(255, 255, 255)}):Play()
  1165. end
  1166. end)
  1167.  
  1168. function option:AddValue(value)
  1169. valueCount = valueCount + 1
  1170. local label = library:Create("TextLabel", {
  1171. ZIndex = 3,
  1172. Size = UDim2.new(1, 0, 0, 20),
  1173. BackgroundColor3 = Color3.fromRGB(30, 30, 30),
  1174. BorderSizePixel = 0,
  1175. Text = " > " .. value,
  1176. TextSize = 14,
  1177. TextTransparency = self.open and 0 or 1,
  1178. Font = Enum.Font.Gotham,
  1179. TextColor3 = Color3.fromRGB(255, 255, 255),
  1180. TextXAlignment = Enum.TextXAlignment.Left,
  1181. Parent = content
  1182. })
  1183.  
  1184. local inContact
  1185. local clicking
  1186. label.InputBegan:connect(function(input)
  1187. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1188. clicking = true
  1189. tweenService:Create(label, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundColor3 = Color3.fromRGB(10, 10, 10)}):Play()
  1190. self:SetValue(value)
  1191. self:Close()
  1192. end
  1193. if input.UserInputType == Enum.UserInputType.MouseMovement then
  1194. inContact = true
  1195. if not clicking then
  1196. tweenService:Create(label, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundColor3 = Color3.fromRGB(20, 20, 20)}):Play()
  1197. tweenService:Create(label, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextColor3 = Color3.fromRGB(255, 51, 255)}):Play()
  1198. end
  1199. end
  1200. end)
  1201.  
  1202. label.InputEnded:connect(function(input)
  1203. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1204. clicking = false
  1205. 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()
  1206. end
  1207. if input.UserInputType == Enum.UserInputType.MouseMovement then
  1208. inContact = false
  1209. if not clicking then
  1210. tweenService:Create(label, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundColor3 = Color3.fromRGB(30, 30, 30)}):Play()
  1211. tweenService:Create(label, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextColor3 = Color3.fromRGB(255, 255, 255)}):Play()
  1212. end
  1213. end
  1214. end)
  1215. end
  1216.  
  1217. if not table.find(option.values, option.value) then
  1218. option:AddValue(option.value)
  1219. end
  1220.  
  1221. for _, value in next, option.values do
  1222. option:AddValue(tostring(value))
  1223. end
  1224.  
  1225. function option:RemoveValue(value)
  1226. for _,label in next, content:GetChildren() do
  1227. if label:IsA"TextLabel" and label.Text == " " .. value then
  1228. label:Destroy()
  1229. valueCount = valueCount - 1
  1230. break
  1231. end
  1232. end
  1233. if self.value == value then
  1234. self:SetValue("")
  1235. end
  1236. end
  1237.  
  1238. function option:SetValue(value)
  1239. library.flags[self.flag] = tostring(value)
  1240. self.value = tostring(value)
  1241. listvalue.Text = self.value
  1242. self.callback(value)
  1243. end
  1244.  
  1245. function option:Close()
  1246. library.activePopup = nil
  1247. self.open = false
  1248. toggle.Text = "v"
  1249. content.ScrollBarThickness = 0
  1250. local position = main.AbsolutePosition
  1251. tweenService:Create(self.mainHolder, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundTransparency = 1, Position = UDim2.new(0, position.X - 5, 0, position.Y -10 + 55)}):Play()
  1252. for _,label in next, content:GetChildren() do
  1253. if label:IsA"TextLabel" then
  1254. tweenService:Create(label, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundTransparency = 1, TextTransparency = 1}):Play()
  1255. end
  1256. end
  1257. wait(0.3)
  1258. --delay(0.3, function()
  1259. if not self.open then
  1260. self.mainHolder.Visible = false
  1261. end
  1262. --end)
  1263. end
  1264.  
  1265. game:GetService("RunService").RenderStepped:Connect(function()
  1266. title.TextSize = getrenv().ui_settings.font_size
  1267. listvalue.TextSize = getrenv().ui_settings.font_size
  1268. tweenService:Create(main, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BorderColor3 = getrenv().ui_settings.main_colour}):Play()
  1269. tweenService:Create(option.mainHolder, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BorderColor3 = getrenv().ui_settings.main_colour}):Play()
  1270. tweenService:Create(content, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ScrollBarImageColor3 = getrenv().ui_settings.main_colour}):Play()
  1271. tweenService:Create(round, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BorderColor3 = getrenv().ui_settings.main_colour}):Play()
  1272. end)
  1273.  
  1274. return option
  1275. end
  1276.  
  1277. local function createBox(option, parent)
  1278. local main = library:Create("Frame", {
  1279. LayoutOrder = option.position,
  1280. Size = UDim2.new(1, 0, 0, 52),
  1281. BackgroundTransparency = 1,
  1282. Parent = parent.content
  1283. })
  1284.  
  1285. local outline = library:Create("ImageLabel", {
  1286. Position = UDim2.new(0, 6, 0, 4),
  1287. Size = UDim2.new(1, -12, 1, -10),
  1288. BackgroundTransparency = 1,
  1289. Image = "rbxassetid://3570695787",
  1290. ImageColor3 = Color3.fromRGB(60, 60, 60),
  1291. ScaleType = Enum.ScaleType.Slice,
  1292. SliceCenter = Rect.new(100, 100, 100, 100),
  1293. SliceScale = 0.02,
  1294. Parent = main
  1295. })
  1296.  
  1297. local round = library:Create("ImageLabel", {
  1298. Position = UDim2.new(0, 8, 0, 6),
  1299. Size = UDim2.new(1, -16, 1, -14),
  1300. BackgroundTransparency = 1,
  1301. Image = "rbxassetid://3570695787",
  1302. ImageColor3 = Color3.fromRGB(20, 20, 20),
  1303. ScaleType = Enum.ScaleType.Slice,
  1304. SliceCenter = Rect.new(100, 100, 100, 100),
  1305. SliceScale = 0.01,
  1306. Parent = main
  1307. })
  1308.  
  1309. local title = library:Create("TextLabel", {
  1310. Position = UDim2.new(0, 12, 0, 8),
  1311. Size = UDim2.new(1, -24, 0, 14),
  1312. BackgroundTransparency = 1,
  1313. Text = option.text,
  1314. TextSize = 14,
  1315. Font = Enum.Font.GothamBold,
  1316. TextColor3 = Color3.fromRGB(100, 100, 100),
  1317. TextXAlignment = Enum.TextXAlignment.Left,
  1318. Parent = main
  1319. })
  1320.  
  1321. local inputvalue = library:Create("TextBox", {
  1322. Position = UDim2.new(0, 12, 0, 20),
  1323. Size = UDim2.new(1, -24, 0, 24),
  1324. BackgroundTransparency = 1,
  1325. Text = option.value,
  1326. TextSize = 18,
  1327. Font = Enum.Font.Gotham,
  1328. TextColor3 = Color3.fromRGB(255, 255, 255),
  1329. TextXAlignment = Enum.TextXAlignment.Left,
  1330. TextWrapped = true,
  1331. Parent = main
  1332. })
  1333.  
  1334. local inContact
  1335. local focused
  1336. main.InputBegan:connect(function(input)
  1337. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1338. if not focused then inputvalue:CaptureFocus() end
  1339. end
  1340. if input.UserInputType == Enum.UserInputType.MouseMovement then
  1341. inContact = true
  1342. if not focused then
  1343. tweenService:Create(outline, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(100, 100, 100)}):Play()
  1344. end
  1345. end
  1346. end)
  1347.  
  1348. main.InputEnded:connect(function(input)
  1349. if input.UserInputType == Enum.UserInputType.MouseMovement then
  1350. inContact = false
  1351. if not focused then
  1352. tweenService:Create(outline, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(60, 60, 60)}):Play()
  1353. end
  1354. end
  1355. end)
  1356.  
  1357. inputvalue.Focused:connect(function()
  1358. focused = true
  1359. end)
  1360.  
  1361. inputvalue.FocusLost:connect(function(enter)
  1362. focused = false
  1363. tweenService:Create(outline, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(60, 60, 60)}):Play()
  1364. option:SetValue(inputvalue.Text, enter)
  1365. end)
  1366.  
  1367. function option:SetValue(value, enter)
  1368. library.flags[self.flag] = tostring(value)
  1369. self.value = tostring(value)
  1370. inputvalue.Text = self.value
  1371. self.callback(value, enter)
  1372. end
  1373.  
  1374. game:GetService("RunService").RenderStepped:Connect(function()
  1375. title.TextSize = getrenv().ui_settings.font_size
  1376. if focused then
  1377. tweenService:Create(outline, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = getrenv().ui_settings.main_colour}):Play()
  1378. else
  1379. tweenService:Create(outline, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(60, 60, 60)}):Play()
  1380. end
  1381. end)
  1382. end
  1383.  
  1384. local function createColorPickerWindow(option)
  1385. option.mainHolder = library:Create("ImageButton", {
  1386. ZIndex = 3,
  1387. Size = UDim2.new(0, 240, 0, 180),
  1388. BackgroundTransparency = 1,
  1389. Image = "rbxassetid://3570695787",
  1390. ImageTransparency = 1,
  1391. ImageColor3 = Color3.fromRGB(30, 30, 30),
  1392. ScaleType = Enum.ScaleType.Slice,
  1393. SliceCenter = Rect.new(100, 100, 100, 100),
  1394. SliceScale = 0.02,
  1395. Parent = library.base
  1396. })
  1397.  
  1398. local hue, sat, val = Color3.toHSV(option.color)
  1399. hue, sat, val = hue == 0 and 1 or hue, sat + 0.005, val - 0.005
  1400. local editinghue
  1401. local editingsatval
  1402. local currentColor = option.color
  1403. local previousColors = {[1] = option.color}
  1404. local originalColor = option.color
  1405. local rainbowEnabled
  1406. local rainbowLoop
  1407.  
  1408. function option:updateVisuals(Color)
  1409. currentColor = Color
  1410. self.visualize2.ImageColor3 = Color
  1411. hue, sat, val = Color3.toHSV(Color)
  1412. hue = hue == 0 and 1 or hue
  1413. self.satval.BackgroundColor3 = Color3.fromHSV(hue, 1, 1)
  1414. self.hueSlider.Position = UDim2.new(1 - hue, 0, 0, 0)
  1415. self.satvalSlider.Position = UDim2.new(sat, 0, 1 - val, 0)
  1416. end
  1417.  
  1418. option.hue = library:Create("ImageLabel", {
  1419. ZIndex = 3,
  1420. AnchorPoint = Vector2.new(0, 1),
  1421. Position = UDim2.new(0, 8, 1, -8),
  1422. Size = UDim2.new(1, -100, 0, 22),
  1423. BackgroundTransparency = 1,
  1424. Image = "rbxassetid://3570695787",
  1425. ImageTransparency = 1,
  1426. ScaleType = Enum.ScaleType.Slice,
  1427. SliceCenter = Rect.new(100, 100, 100, 100),
  1428. SliceScale = 0.02,
  1429. Parent = option.mainHolder
  1430. })
  1431.  
  1432. local Gradient = library:Create("UIGradient", {
  1433. Color = ColorSequence.new({
  1434. ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 0, 0)),
  1435. ColorSequenceKeypoint.new(0.157, Color3.fromRGB(255, 0, 255)),
  1436. ColorSequenceKeypoint.new(0.323, Color3.fromRGB(0, 0, 255)),
  1437. ColorSequenceKeypoint.new(0.488, Color3.fromRGB(0, 255, 255)),
  1438. ColorSequenceKeypoint.new(0.66, Color3.fromRGB(0, 255, 0)),
  1439. ColorSequenceKeypoint.new(0.817, Color3.fromRGB(255, 255, 0)),
  1440. ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 0, 0)),
  1441. }),
  1442. Parent = option.hue
  1443. })
  1444.  
  1445. option.hueSlider = library:Create("Frame", {
  1446. ZIndex = 3,
  1447. Position = UDim2.new(1 - hue, 0, 0, 0),
  1448. Size = UDim2.new(0, 2, 1, 0),
  1449. BackgroundTransparency = 1,
  1450. BackgroundColor3 = Color3.fromRGB(30, 30, 30),
  1451. BorderColor3 = Color3.fromRGB(255, 255, 255),
  1452. Parent = option.hue
  1453. })
  1454.  
  1455. option.hue.InputBegan:connect(function(Input)
  1456. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  1457. editinghue = true
  1458. X = (option.hue.AbsolutePosition.X + option.hue.AbsoluteSize.X) - option.hue.AbsolutePosition.X
  1459. X = (Input.Position.X - option.hue.AbsolutePosition.X) / X
  1460. X = X < 0 and 0 or X > 0.995 and 0.995 or X
  1461. option:updateVisuals(Color3.fromHSV(1 - X, sat, val))
  1462. end
  1463. end)
  1464.  
  1465. inputService.InputChanged:connect(function(Input)
  1466. if Input.UserInputType == Enum.UserInputType.MouseMovement and editinghue then
  1467. X = (option.hue.AbsolutePosition.X + option.hue.AbsoluteSize.X) - option.hue.AbsolutePosition.X
  1468. X = (Input.Position.X - option.hue.AbsolutePosition.X) / X
  1469. X = X <= 0 and 0 or X >= 0.995 and 0.995 or X
  1470. option:updateVisuals(Color3.fromHSV(1 - X, sat, val))
  1471. end
  1472. end)
  1473.  
  1474. option.hue.InputEnded:connect(function(Input)
  1475. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  1476. editinghue = false
  1477. end
  1478. end)
  1479.  
  1480. option.satval = library:Create("ImageLabel", {
  1481. ZIndex = 3,
  1482. Position = UDim2.new(0, 8, 0, 8),
  1483. Size = UDim2.new(1, -100, 1, -42),
  1484. BackgroundTransparency = 1,
  1485. BackgroundColor3 = Color3.fromHSV(hue, 1, 1),
  1486. BorderSizePixel = 0,
  1487. Image = "rbxassetid://4155801252",
  1488. ImageTransparency = 1,
  1489. ClipsDescendants = true,
  1490. Parent = option.mainHolder
  1491. })
  1492.  
  1493. option.satvalSlider = library:Create("Frame", {
  1494. ZIndex = 3,
  1495. AnchorPoint = Vector2.new(0.5, 0.5),
  1496. Position = UDim2.new(sat, 0, 1 - val, 0),
  1497. Size = UDim2.new(0, 4, 0, 4),
  1498. Rotation = 45,
  1499. BackgroundTransparency = 1,
  1500. BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  1501. Parent = option.satval
  1502. })
  1503.  
  1504. option.satval.InputBegan:connect(function(Input)
  1505. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  1506. editingsatval = true
  1507. X = (option.satval.AbsolutePosition.X + option.satval.AbsoluteSize.X) - option.satval.AbsolutePosition.X
  1508. Y = (option.satval.AbsolutePosition.Y + option.satval.AbsoluteSize.Y) - option.satval.AbsolutePosition.Y
  1509. X = (Input.Position.X - option.satval.AbsolutePosition.X) / X
  1510. Y = (Input.Position.Y - option.satval.AbsolutePosition.Y) / Y
  1511. X = X <= 0.005 and 0.005 or X >= 1 and 1 or X
  1512. Y = Y <= 0 and 0 or Y >= 0.995 and 0.995 or Y
  1513. option:updateVisuals(Color3.fromHSV(hue, X, 1 - Y))
  1514. end
  1515. end)
  1516.  
  1517. inputService.InputChanged:connect(function(Input)
  1518. if Input.UserInputType == Enum.UserInputType.MouseMovement and editingsatval then
  1519. X = (option.satval.AbsolutePosition.X + option.satval.AbsoluteSize.X) - option.satval.AbsolutePosition.X
  1520. Y = (option.satval.AbsolutePosition.Y + option.satval.AbsoluteSize.Y) - option.satval.AbsolutePosition.Y
  1521. X = (Input.Position.X - option.satval.AbsolutePosition.X) / X
  1522. Y = (Input.Position.Y - option.satval.AbsolutePosition.Y) / Y
  1523. X = X <= 0.005 and 0.005 or X >= 1 and 1 or X
  1524. Y = Y <= 0 and 0 or Y >= 0.995 and 0.995 or Y
  1525. option:updateVisuals(Color3.fromHSV(hue, X, 1 - Y))
  1526. end
  1527. end)
  1528.  
  1529. option.satval.InputEnded:connect(function(Input)
  1530. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  1531. editingsatval = false
  1532. end
  1533. end)
  1534.  
  1535. option.visualize2 = library:Create("ImageLabel", {
  1536. ZIndex = 3,
  1537. Position = UDim2.new(1, -8, 0, 8),
  1538. Size = UDim2.new(0, -80, 0, 80),
  1539. BackgroundTransparency = 1,
  1540. Image = "rbxassetid://3570695787",
  1541. ImageColor3 = currentColor,
  1542. ScaleType = Enum.ScaleType.Slice,
  1543. SliceCenter = Rect.new(100, 100, 100, 100),
  1544. SliceScale = 0.02,
  1545. Parent = option.mainHolder
  1546. })
  1547.  
  1548. option.resetColor = library:Create("ImageLabel", {
  1549. ZIndex = 3,
  1550. Position = UDim2.new(1, -8, 0, 92),
  1551. Size = UDim2.new(0, -80, 0, 18),
  1552. BackgroundTransparency = 1,
  1553. Image = "rbxassetid://3570695787",
  1554. ImageTransparency = 1,
  1555. ImageColor3 = Color3.fromRGB(20, 20, 20),
  1556. ScaleType = Enum.ScaleType.Slice,
  1557. SliceCenter = Rect.new(100, 100, 100, 100),
  1558. SliceScale = 0.02,
  1559. Parent = option.mainHolder
  1560. })
  1561.  
  1562. option.resetText = library:Create("TextLabel", {
  1563. ZIndex = 3,
  1564. Size = UDim2.new(1, 0, 1, 0),
  1565. BackgroundTransparency = 1,
  1566. Text = "Reset",
  1567. TextTransparency = 1,
  1568. Font = Enum.Font.Code,
  1569. TextSize = 15,
  1570. TextColor3 = Color3.fromRGB(255, 255, 255),
  1571. Parent = option.resetColor
  1572. })
  1573.  
  1574. option.resetColor.InputBegan:connect(function(Input)
  1575. if Input.UserInputType == Enum.UserInputType.MouseButton1 and not rainbowEnabled then
  1576. previousColors = {originalColor}
  1577. option:SetColor(originalColor)
  1578. end
  1579. if Input.UserInputType == Enum.UserInputType.MouseMovement and not dragging then
  1580. tweenService:Create(option.resetColor, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(10, 10, 10)}):Play()
  1581. end
  1582. end)
  1583.  
  1584. option.resetColor.InputEnded:connect(function(Input)
  1585. if Input.UserInputType == Enum.UserInputType.MouseMovement and not dragging then
  1586. tweenService:Create(option.resetColor, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(20, 20, 20)}):Play()
  1587. end
  1588. end)
  1589.  
  1590. option.undoColor = library:Create("ImageLabel", {
  1591. ZIndex = 3,
  1592. Position = UDim2.new(1, -8, 0, 112),
  1593. Size = UDim2.new(0, -80, 0, 18),
  1594. BackgroundTransparency = 1,
  1595. Image = "rbxassetid://3570695787",
  1596. ImageTransparency = 1,
  1597. ImageColor3 = Color3.fromRGB(20, 20, 20),
  1598. ScaleType = Enum.ScaleType.Slice,
  1599. SliceCenter = Rect.new(100, 100, 100, 100),
  1600. SliceScale = 0.02,
  1601. Parent = option.mainHolder
  1602. })
  1603.  
  1604. option.undoText = library:Create("TextLabel", {
  1605. ZIndex = 3,
  1606. Size = UDim2.new(1, 0, 1, 0),
  1607. BackgroundTransparency = 1,
  1608. Text = "Undo",
  1609. TextTransparency = 1,
  1610. Font = Enum.Font.Code,
  1611. TextSize = 15,
  1612. TextColor3 = Color3.fromRGB(255, 255, 255),
  1613. Parent = option.undoColor
  1614. })
  1615.  
  1616. option.undoColor.InputBegan:connect(function(Input)
  1617. if Input.UserInputType == Enum.UserInputType.MouseButton1 and not rainbowEnabled then
  1618. local Num = #previousColors == 1 and 0 or 1
  1619. option:SetColor(previousColors[#previousColors - Num])
  1620. if #previousColors ~= 1 then
  1621. table.remove(previousColors, #previousColors)
  1622. end
  1623. end
  1624. if Input.UserInputType == Enum.UserInputType.MouseMovement and not dragging then
  1625. tweenService:Create(option.undoColor, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(10, 10, 10)}):Play()
  1626. end
  1627. end)
  1628.  
  1629. option.undoColor.InputEnded:connect(function(Input)
  1630. if Input.UserInputType == Enum.UserInputType.MouseMovement and not dragging then
  1631. tweenService:Create(option.undoColor, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(20, 20, 20)}):Play()
  1632. end
  1633. end)
  1634.  
  1635. option.setColor = library:Create("ImageLabel", {
  1636. ZIndex = 3,
  1637. Position = UDim2.new(1, -8, 0, 132),
  1638. Size = UDim2.new(0, -80, 0, 18),
  1639. BackgroundTransparency = 1,
  1640. Image = "rbxassetid://3570695787",
  1641. ImageTransparency = 1,
  1642. ImageColor3 = Color3.fromRGB(20, 20, 20),
  1643. ScaleType = Enum.ScaleType.Slice,
  1644. SliceCenter = Rect.new(100, 100, 100, 100),
  1645. SliceScale = 0.02,
  1646. Parent = option.mainHolder
  1647. })
  1648.  
  1649. option.setText = library:Create("TextLabel", {
  1650. ZIndex = 3,
  1651. Size = UDim2.new(1, 0, 1, 0),
  1652. BackgroundTransparency = 1,
  1653. Text = "Set",
  1654. TextTransparency = 1,
  1655. Font = Enum.Font.Code,
  1656. TextSize = 15,
  1657. TextColor3 = Color3.fromRGB(255, 255, 255),
  1658. Parent = option.setColor
  1659. })
  1660.  
  1661. option.setColor.InputBegan:connect(function(Input)
  1662. if Input.UserInputType == Enum.UserInputType.MouseButton1 and not rainbowEnabled then
  1663. table.insert(previousColors, currentColor)
  1664. option:SetColor(currentColor)
  1665. end
  1666. if Input.UserInputType == Enum.UserInputType.MouseMovement and not dragging then
  1667. tweenService:Create(option.setColor, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(10, 10, 10)}):Play()
  1668. end
  1669. end)
  1670.  
  1671. option.setColor.InputEnded:connect(function(Input)
  1672. if Input.UserInputType == Enum.UserInputType.MouseMovement and not dragging then
  1673. tweenService:Create(option.setColor, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(20, 20, 20)}):Play()
  1674. end
  1675. end)
  1676.  
  1677. option.rainbow = library:Create("ImageLabel", {
  1678. ZIndex = 3,
  1679. Position = UDim2.new(1, -8, 0, 152),
  1680. Size = UDim2.new(0, -80, 0, 18),
  1681. BackgroundTransparency = 1,
  1682. Image = "rbxassetid://3570695787",
  1683. ImageTransparency = 1,
  1684. ImageColor3 = Color3.fromRGB(20, 20, 20),
  1685. ScaleType = Enum.ScaleType.Slice,
  1686. SliceCenter = Rect.new(100, 100, 100, 100),
  1687. SliceScale = 0.02,
  1688. Parent = option.mainHolder
  1689. })
  1690.  
  1691. option.rainbowText = library:Create("TextLabel", {
  1692. ZIndex = 3,
  1693. Size = UDim2.new(1, 0, 1, 0),
  1694. BackgroundTransparency = 1,
  1695. Text = "Rainbow",
  1696. TextTransparency = 1,
  1697. Font = Enum.Font.Code,
  1698. TextSize = 15,
  1699. TextColor3 = Color3.fromRGB(255, 255, 255),
  1700. Parent = option.rainbow
  1701. })
  1702.  
  1703. option.rainbow.InputBegan:connect(function(Input)
  1704. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  1705. rainbowEnabled = not rainbowEnabled
  1706. if rainbowEnabled then
  1707. rainbowLoop = runService.Heartbeat:connect(function()
  1708. option:SetColor(chromaColor)
  1709. option.rainbowText.TextColor3 = chromaColor
  1710. end)
  1711. else
  1712. rainbowLoop:Disconnect()
  1713. option:SetColor(previousColors[#previousColors])
  1714. option.rainbowText.TextColor3 = Color3.fromRGB(255, 255, 255)
  1715. end
  1716. end
  1717. if Input.UserInputType == Enum.UserInputType.MouseMovement and not dragging then
  1718. tweenService:Create(option.rainbow, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(10, 10, 10)}):Play()
  1719. end
  1720. end)
  1721.  
  1722. option.rainbow.InputEnded:connect(function(Input)
  1723. if Input.UserInputType == Enum.UserInputType.MouseMovement and not dragging then
  1724. tweenService:Create(option.rainbow, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(20, 20, 20)}):Play()
  1725. end
  1726. end)
  1727.  
  1728. return option
  1729. end
  1730.  
  1731. local function createColor(option, parent, holder)
  1732. option.main = library:Create("TextLabel", {
  1733. LayoutOrder = option.position,
  1734. Size = UDim2.new(1, 0, 0, 31),
  1735. BackgroundTransparency = 1,
  1736. Text = " " .. option.text,
  1737. TextSize = 17,
  1738. Font = Enum.Font.Gotham,
  1739. TextColor3 = Color3.fromRGB(255, 255, 255),
  1740. TextXAlignment = Enum.TextXAlignment.Left,
  1741. Parent = parent.content
  1742. })
  1743.  
  1744. local colorBoxOutline = library:Create("ImageLabel", {
  1745. Position = UDim2.new(1, -6, 0, 4),
  1746. Size = UDim2.new(-1, 10, 1, -10),
  1747. SizeConstraint = Enum.SizeConstraint.RelativeYY,
  1748. BackgroundTransparency = 1,
  1749. Image = "rbxassetid://3570695787",
  1750. ImageColor3 = Color3.fromRGB(100, 100, 100),
  1751. ScaleType = Enum.ScaleType.Slice,
  1752. SliceCenter = Rect.new(100, 100, 100, 100),
  1753. SliceScale = 0.02,
  1754. Parent = option.main
  1755. })
  1756.  
  1757. option.visualize = library:Create("ImageLabel", {
  1758. Position = UDim2.new(0, 2, 0, 2),
  1759. Size = UDim2.new(1, -4, 1, -4),
  1760. BackgroundTransparency = 1,
  1761. Image = "rbxassetid://3570695787",
  1762. ImageColor3 = option.color,
  1763. ScaleType = Enum.ScaleType.Slice,
  1764. SliceCenter = Rect.new(100, 100, 100, 100),
  1765. SliceScale = 0.02,
  1766. Parent = colorBoxOutline
  1767. })
  1768.  
  1769. local inContact
  1770. option.main.InputBegan:connect(function(input)
  1771. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1772. if not option.mainHolder then createColorPickerWindow(option) end
  1773. if library.activePopup then
  1774. library.activePopup:Close()
  1775. end
  1776. local position = option.main.AbsolutePosition
  1777. option.mainHolder.Position = UDim2.new(0, position.X - 5, 0, position.Y - 10)
  1778. option.open = true
  1779. option.mainHolder.Visible = true
  1780. library.activePopup = option
  1781. 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()
  1782. 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()
  1783. tweenService:Create(option.satval, TweenInfo.new(0.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundTransparency = 0}):Play()
  1784. for _,object in next, option.mainHolder:GetDescendants() do
  1785. if object:IsA"TextLabel" then
  1786. tweenService:Create(object, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextTransparency = 0}):Play()
  1787. elseif object:IsA"ImageLabel" then
  1788. tweenService:Create(object, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageTransparency = 0}):Play()
  1789. elseif object:IsA"Frame" then
  1790. tweenService:Create(object, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundTransparency = 0}):Play()
  1791. end
  1792. end
  1793. end
  1794. if input.UserInputType == Enum.UserInputType.MouseMovement then
  1795. inContact = true
  1796. if not option.open then
  1797. tweenService:Create(colorBoxOutline, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(140, 140, 140)}):Play()
  1798. end
  1799. end
  1800. end)
  1801.  
  1802. option.main.InputEnded:connect(function(input)
  1803. if input.UserInputType == Enum.UserInputType.MouseMovement then
  1804. inContact = true
  1805. if not option.open then
  1806. tweenService:Create(colorBoxOutline, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageColor3 = Color3.fromRGB(100, 100, 100)}):Play()
  1807. end
  1808. end
  1809. end)
  1810.  
  1811. function option:SetColor(newColor)
  1812. if self.mainHolder then
  1813. self:updateVisuals(newColor)
  1814. end
  1815. self.visualize.ImageColor3 = newColor
  1816. library.flags[self.flag] = newColor
  1817. self.color = newColor
  1818. self.callback(newColor)
  1819. end
  1820.  
  1821. game:GetService("RunService").RenderStepped:Connect(function()
  1822. option.main.TextSize = getrenv().ui_settings.font_size
  1823. end)
  1824.  
  1825. function option:Close()
  1826. library.activePopup = nil
  1827. self.open = false
  1828. local position = self.main.AbsolutePosition
  1829. 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()
  1830. tweenService:Create(self.satval, TweenInfo.new(0.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundTransparency = 1}):Play()
  1831. for _,object in next, self.mainHolder:GetDescendants() do
  1832. if object:IsA"TextLabel" then
  1833. tweenService:Create(object, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextTransparency = 1}):Play()
  1834. elseif object:IsA"ImageLabel" then
  1835. tweenService:Create(object, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageTransparency = 1}):Play()
  1836. elseif object:IsA"Frame" then
  1837. tweenService:Create(object, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundTransparency = 1}):Play()
  1838. end
  1839. end
  1840. delay(0.3, function()
  1841. if not self.open then
  1842. self.mainHolder.Visible = false
  1843. end
  1844. end)
  1845. end
  1846. end
  1847.  
  1848. local function loadOptions(option, holder)
  1849. for _,newOption in next, option.options do
  1850. if newOption.type == "label" then
  1851. createLabel(newOption, option)
  1852. elseif newOption.type == "toggle" then
  1853. createToggle(newOption, option)
  1854. elseif newOption.type == "button" then
  1855. createButton(newOption, option)
  1856. elseif newOption.type == "list" then
  1857. createList(newOption, option, holder)
  1858. elseif newOption.type == "box" then
  1859. createBox(newOption, option)
  1860. elseif newOption.type == "bind" then
  1861. createBind(newOption, option)
  1862. elseif newOption.type == "slider" then
  1863. createSlider(newOption, option)
  1864. elseif newOption.type == "color" then
  1865. createColor(newOption, option, holder)
  1866. elseif newOption.type == "folder" then
  1867. newOption:init()
  1868. elseif newOption.type == "togglefolder" then
  1869. newOption:init()
  1870. end
  1871. end
  1872. end
  1873.  
  1874. local function getFnctions(parent)
  1875. function parent:AddLabel(option)
  1876. option = typeof(option) == "table" and option or {}
  1877. option.text = tostring(option.text)
  1878. option.type = "label"
  1879. option.position = #self.options
  1880. table.insert(self.options, option)
  1881.  
  1882. return option
  1883. end
  1884.  
  1885. function parent:AddToggle(option)
  1886. option = typeof(option) == "table" and option or {}
  1887. option.text = tostring(option.text)
  1888. option.state = typeof(option.state) == "boolean" and option.state or false
  1889. option.callback = typeof(option.callback) == "function" and option.callback or function() end
  1890. option.type = "toggle"
  1891. option.position = #self.options
  1892. option.flag = option.flag or option.text
  1893. library.flags[option.flag] = option.state
  1894. table.insert(self.options, option)
  1895.  
  1896. return option
  1897. end
  1898.  
  1899. function parent:AddButton(option)
  1900. option = typeof(option) == "table" and option or {}
  1901. option.text = tostring(option.text)
  1902. option.callback = typeof(option.callback) == "function" and option.callback or function() end
  1903. option.type = "button"
  1904. option.position = #self.options
  1905. option.flag = option.flag or option.text
  1906. table.insert(self.options, option)
  1907.  
  1908. return option
  1909. end
  1910.  
  1911. function parent:AddBind(option)
  1912. option = typeof(option) == "table" and option or {}
  1913. option.text = tostring(option.text)
  1914. option.key = (option.key and option.key.Name) or option.key or "F"
  1915. option.hold = typeof(option.hold) == "boolean" and option.hold or false
  1916. option.callback = typeof(option.callback) == "function" and option.callback or function() end
  1917. option.type = "bind"
  1918. option.position = #self.options
  1919. option.flag = option.flag or option.text
  1920. library.flags[option.flag] = option.key
  1921. table.insert(self.options, option)
  1922.  
  1923. return option
  1924. end
  1925.  
  1926. function parent:AddSlider(option)
  1927. option = typeof(option) == "table" and option or {}
  1928. option.text = tostring(option.text)
  1929. option.min = typeof(option.min) == "number" and option.min or 0
  1930. option.max = typeof(option.max) == "number" and option.max or 0
  1931. option.dual = typeof(option.dual) == "boolean" and option.dual or false
  1932. option.value = math.clamp(typeof(option.value) == "number" and option.value or option.min, option.min, option.max)
  1933. option.value2 = typeof(option.value2) == "number" and option.value2 or option.max
  1934. option.callback = typeof(option.callback) == "function" and option.callback or function() end
  1935. option.float = typeof(option.value) == "number" and option.float or 1
  1936. option.type = "slider"
  1937. option.position = #self.options
  1938. option.flag = option.flag or option.text
  1939. library.flags[option.flag] = option.value
  1940. table.insert(self.options, option)
  1941.  
  1942. return option
  1943. end
  1944.  
  1945. function parent:AddList(option)
  1946. option = typeof(option) == "table" and option or {}
  1947. option.text = tostring(option.text)
  1948. option.values = typeof(option.values) == "table" and option.values or {}
  1949. option.value = tostring(option.value or option.values[1] or "")
  1950. option.callback = typeof(option.callback) == "function" and option.callback or function() end
  1951. option.open = false
  1952. option.type = "list"
  1953. option.position = #self.options
  1954. option.flag = option.flag or option.text
  1955. library.flags[option.flag] = option.value
  1956. table.insert(self.options, option)
  1957.  
  1958. return option
  1959. end
  1960.  
  1961. function parent:AddBox(option)
  1962. option = typeof(option) == "table" and option or {}
  1963. option.text = tostring(option.text)
  1964. option.value = tostring(option.value or "")
  1965. option.callback = typeof(option.callback) == "function" and option.callback or function() end
  1966. option.type = "box"
  1967. option.position = #self.options
  1968. option.flag = option.flag or option.text
  1969. library.flags[option.flag] = option.value
  1970. table.insert(self.options, option)
  1971.  
  1972. return option
  1973. end
  1974.  
  1975. function parent:AddColor(option)
  1976. option = typeof(option) == "table" and option or {}
  1977. option.text = tostring(option.text)
  1978. 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)
  1979. option.callback = typeof(option.callback) == "function" and option.callback or function() end
  1980. option.open = false
  1981. option.type = "color"
  1982. option.position = #self.options
  1983. option.flag = option.flag or option.text
  1984. library.flags[option.flag] = option.color
  1985. table.insert(self.options, option)
  1986.  
  1987. return option
  1988. end
  1989.  
  1990. function parent:AddFolder(title)
  1991. local option = {}
  1992. option.title = tostring(title)
  1993. option.options = {}
  1994. option.open = false
  1995. option.type = "folder"
  1996. option.position = #self.options
  1997. table.insert(self.options, option)
  1998.  
  1999. getFnctions(option)
  2000.  
  2001. function option:init()
  2002. createFolderHolder(self.title, parent.content, self, true)
  2003. loadOptions(self, parent)
  2004. end
  2005.  
  2006. return option
  2007. end
  2008.  
  2009. function parent:AddToggleFolder(option)
  2010. option = typeof(option) == "table" and option or {}
  2011. option.title = tostring(option.text)
  2012. option.state = typeof(option.state) == "boolean" and option.state or false
  2013. option.callback = typeof(option.callback) == "function" and option.callback or function() end
  2014. option.flag = option.flag or option.title
  2015. library.flags[option.flag] = option.state
  2016. option.options = {}
  2017. option.open = false
  2018. option.type = "togglefolder"
  2019. option.position = #self.options
  2020. table.insert(self.options, option)
  2021.  
  2022. getFnctions(option)
  2023.  
  2024. function option:init()
  2025. createToggleFolderHolder(self.title, parent.content, self, true, option)
  2026. loadOptions(self, parent)
  2027. end
  2028.  
  2029. return option
  2030. end
  2031. end
  2032.  
  2033. function library:CreateWindow(title)
  2034. local window = {title = tostring(title), options = {}, open = true, canInit = true, init = false, position = #self.windows}
  2035. getFnctions(window)
  2036.  
  2037. table.insert(library.windows, window)
  2038.  
  2039. return window
  2040. end
  2041.  
  2042. local UIToggle
  2043. local UnlockMouse
  2044. function library:Init()
  2045. self.base = self.base or self:Create("ScreenGui")
  2046. if syn and syn.protect_gui then
  2047. syn.protect_gui(self.base)
  2048. elseif get_hidden_gui then
  2049. get_hidden_gui(self.base)
  2050. else
  2051. game:GetService"Players".LocalPlayer:Kick("Error: protect_gui function not found")
  2052. return
  2053. end
  2054. self.base.Parent = game:GetService("CoreGui")
  2055. self.base.Name = "uwuware"
  2056.  
  2057. self.cursor = self.cursor or self:Create("ImageLabel", {
  2058. Name = "Cursor";
  2059. Image = "http://www.roblox.com/asset/?id=282305376";
  2060. ZIndex = 100;
  2061. Size = UDim2.new(0, 10, 0, 10);
  2062. ImageColor3 = Color3.fromRGB(221, 3, 255);
  2063. BackgroundTransparency = 1;
  2064. BorderSizePixel = 0;
  2065. Parent = self.base
  2066. })
  2067. splitline = Instance.new("Frame")
  2068. splitline.Name = "Line"
  2069. splitline.Parent = game.CoreGui:WaitForChild("uwuware")
  2070. splitline.BackgroundColor3 = Color3.fromRGB(221, 3, 255)
  2071. splitline.BorderSizePixel = 0
  2072. splitline.Size = UDim2.new(0, 1917, 0, 5)
  2073. getrenv().role = "| [member] |"
  2074. getrenv().username = "| "..game.Players.LocalPlayer.Name.." |"
  2075. if getrenv().creator_accounts[game.Players.LocalPlayer.UserId] then
  2076. getrenv().role = "| [dev] |"
  2077. getrenv().username = "| Max |"
  2078. elseif getrenv().admin_accounts[game.Players.LocalPlayer.UserId] then
  2079. getrenv().role = "| [staff] |"
  2080. getrenv().username = "| Smail |"
  2081. end
  2082. loadstring(game:HttpGet("https://raw.githubusercontent.com/zerovectors/notification/master/createnotification", true))()
  2083. loadstring(game:HttpGet("https://raw.githubusercontent.com/zerovectors/framework/master/i%20<3%20evelynn", true))()
  2084. loadstring(game:HttpGet("https://raw.githubusercontent.com/zerovectors/ui-library-test/master/watermark", true))()
  2085. for _, window in next, self.windows do
  2086. if window.canInit and not window.init then
  2087. window.init = true
  2088. createOptionHolder(window.title, self.base, window)
  2089. loadOptions(window)
  2090. end
  2091. end
  2092. textbuttonthing = game.CoreGui.uwuware:WaitForChild("watermark").Text
  2093. textbuttonthing.MouseButton1Down:Connect(function()
  2094. library:Close()
  2095. end)
  2096. spawn(function()
  2097. pcall(function()
  2098. while wait() do
  2099. local timedata = os.date("*t")
  2100. getrenv().usertime = tostring(timedata.hour..";"..timedata.min..";"..timedata.sec)
  2101. game.CoreGui.uwuware.Info.Time.Text = "| "..getrenv().usertime.." |"
  2102. end
  2103. end)
  2104. end)
  2105. end
  2106.  
  2107. function library:Close()
  2108. self.open = not self.open
  2109. if game.Players.LocalPlayer.UserId == 278723686 or game.Players.LocalPlayer.UserId == 425451555 then
  2110. else
  2111. self.cursor.Visible = self.open
  2112. end
  2113. if self.activePopup then
  2114. self.activePopup:Close()
  2115. end
  2116. for _, window in next, self.windows do
  2117. if window.main then
  2118. window.main.Visible = self.open
  2119. end
  2120. end
  2121. end
  2122.  
  2123. function library:Remove()
  2124. self.base:Remove()
  2125. end
  2126.  
  2127. inputService.InputBegan:connect(function(input)
  2128. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  2129. if library.activePopup then
  2130. if input.Position.X < library.activePopup.mainHolder.AbsolutePosition.X or input.Position.Y < library.activePopup.mainHolder.AbsolutePosition.Y then
  2131. library.activePopup:Close()
  2132. end
  2133. end
  2134. if library.activePopup then
  2135. 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
  2136. library.activePopup:Close()
  2137. end
  2138. end
  2139. end
  2140. end)
  2141.  
  2142. inputService.InputChanged:connect(function(input)
  2143. if input.UserInputType == Enum.UserInputType.MouseMovement and library.cursor then
  2144. local mouse = inputService:GetMouseLocation() + Vector2.new(0, -36)
  2145. library.cursor.Position = UDim2.new(-0.004, mouse.X, -0.01, mouse.Y)
  2146. end
  2147. if input == dragInput and dragging then
  2148. update(input)
  2149. end
  2150. end)
  2151.  
  2152. return library
  2153.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement