· 6 years ago · Jan 01, 2020, 08:12 PM
1local is_synapse_function = is_synapse_function or issentinelclosure
2local Library
3local uESP
4local Utils = {}
5local Library
6local TweenService = game:GetService("TweenService")
7local window
8local universal
9local loopAPI = {}
10local LoopThreads = {}
11
12
13local function Resize (part,new,_delay)
14 _delay = _delay or 0.5
15 local tweenInfo = TweenInfo.new(_delay, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
16 local tween = TweenService:Create(part, tweenInfo, new)
17 tween:Play()
18end
19do -- Loop API (since jailtapper)
20 local function CreateThread(func)
21 local thread = coroutine.create(func)
22 coroutine.resume(thread)
23 end
24 function loopAPI:CreateLoop(name, WaitMethod, func, runLoop)
25 LoopThreads[name] = {}
26 LoopThreads[name]["running"] = false
27 LoopThreads[name]["destroy"] = false
28 CreateThread(function()
29 while true do
30 if typeof(WaitMethod) == "userdata" then WaitMethod:Wait() else WaitMethod() end
31 if LoopThreads[name]["running"] then
32 func()
33 end
34 if LoopThreads[name]["destroy"] then
35 LoopThreads[name] = nil
36 break
37 end
38 end
39 end)
40 if runLoop then
41 self:RunLoop(name)
42 end
43 end
44 function loopAPI:RunLoop(name, WaitMethod, func)
45 if LoopThreads[name] then
46 LoopThreads[name]["running"] = true
47 end
48 end
49 function loopAPI:StopLoop(name)
50 if LoopThreads[name] then
51 LoopThreads[name]["running"] = false
52 end
53 end
54 function loopAPI:DestroyLoop(name)
55 if LoopThreads[name] then
56 LoopThreads[name]["destroy"] = true
57 end
58 end
59end
60local function CreateDrag(gui)
61 local UserInputService = game:GetService("UserInputService")
62 local dragging
63 local dragInput
64 local dragStart
65 local startPos
66
67 local function update(input)
68 local delta = input.Position - dragStart
69 Resize(gui, {Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)}, 0.16)
70 end
71
72 gui.InputBegan:Connect(function(input)
73 if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
74 dragging = true
75 dragStart = input.Position
76 startPos = gui.Position
77
78 input.Changed:Connect(function()
79 if input.UserInputState == Enum.UserInputState.End then
80 dragging = false
81 end
82 end)
83 end
84 end)
85
86 gui.InputChanged:Connect(function(input)
87 if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
88 dragInput = input
89 end
90 end)
91
92 UserInputService.InputChanged:Connect(function(input)
93 if input == dragInput and dragging then
94 update(input)
95 end
96 end)
97end
98do -- UI Library
99
100 --// Services \\--
101 local TweenService = game:GetService("TweenService")
102 local RunService = game:GetService("RunService")
103 local UserInputService = game:GetService("UserInputService")
104 local CoreGui = RunService:IsStudio() and game:GetService("Players").LocalPlayer.PlayerGui or game:GetService("CoreGui")
105
106 --// Functions \\--
107 local BlacklistedKeys = { --add or remove keys if you find the need to
108 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.One,Enum.KeyCode.Two,Enum.KeyCode.Three,Enum.KeyCode.Four,Enum.KeyCode.Five,Enum.KeyCode.Six,Enum.KeyCode.Seven,Enum.KeyCode.Eight,Enum.KeyCode.Nine,Enum.KeyCode.Zero,Enum.KeyCode.Escape,Enum.KeyCode.F1,Enum.KeyCode.F2,Enum.KeyCode.F3,Enum.KeyCode.F4,Enum.KeyCode.F5,Enum.KeyCode.F6,Enum.KeyCode.F7,Enum.KeyCode.F8,Enum.KeyCode.F9,Enum.KeyCode.F10,Enum.KeyCode.F11,Enum.KeyCode.F12
109 }
110
111 local WhitelistedMouseInputs = { --add or remove mouse inputs if you find the need to
112 Enum.UserInputType.MouseButton1,Enum.UserInputType.MouseButton2,Enum.UserInputType.MouseButton3
113 }
114
115 local function keyCheck(x,x1)
116 for _,v in next, x1 do
117 if v == x then
118 return true
119 end
120 end
121 end
122
123 local function Round(num, bracket)
124 bracket = bracket or 1
125 local a = math.floor(num/bracket + (math.sign(num) * 0.5)) * bracket
126 if a < 0 then
127 a = a + bracket
128 end
129 return a
130 end
131
132 local function AddHighlight(obj)
133 local InContact
134 obj.InputBegan:connect(function(input)
135 if input.UserInputType == Enum.UserInputType.MouseMovement then
136 InContact = true
137 TweenService:Create(obj, TweenInfo.new(0.2), {BackgroundTransparency = 0.9}):Play()
138 end
139 if input.UserInputType == Enum.UserInputType.MouseButton1 then
140 TweenService:Create(obj, TweenInfo.new(0.4), {BackgroundTransparency = 0.8}):Play()
141 end
142 end)
143 obj.InputEnded:connect(function(input)
144 if input.UserInputType == Enum.UserInputType.MouseMovement then
145 InContact = false
146 TweenService:Create(obj, TweenInfo.new(0.4), {BackgroundTransparency = 1}):Play()
147 end
148 if input.UserInputType == Enum.UserInputType.MouseButton1 and InContact then
149 TweenService:Create(obj, TweenInfo.new(0.2), {BackgroundTransparency = 0.9}):Play()
150 end
151 end)
152 end
153
154 local DDCheck
155 local ExtFrames = {}
156 local function CloseExt()
157 if not DDCheck then return end
158 DDCheck.Closed = true
159 DDCheck.Container.Size = UDim2.new(DDCheck.Container.Size.X.Scale, DDCheck.Container.Size.X.Offset, 0, 0)
160 if DDCheck.Closed then DDCheck.Main.Parent.Parent.ClipsDescendants = true end
161 if DDCheck.Arrow then
162 DDCheck.Arrow.Text = ">"
163 end
164 for _,v in next, ExtFrames do
165 v.Parent = nil
166 end
167 DDCheck = nil
168 end
169 for i=1,4 do
170 local Frame = Instance.new("Frame")
171 Frame.ZIndex = 50
172 Frame.BackgroundTransparency = 1
173 Frame.Visible = true
174 if i == 1 then
175 Frame.Size = UDim2.new(0,1000,0,-1000)
176 elseif i == 2 then
177 Frame.Size = UDim2.new(0,1000,0,1000)
178 Frame.Position = UDim2.new(1,0,0,0)
179 elseif i == 3 then
180 Frame.Size = UDim2.new(0,-1000,0,1000)
181 Frame.Position = UDim2.new(1,0,1,0)
182 elseif i == 4 then
183 Frame.Size = UDim2.new(0,-1000,0,-1000)
184 Frame.Position = UDim2.new(0,0,1,0)
185 end
186 table.insert(ExtFrames, Frame)
187 Frame.InputBegan:connect(function(input)
188 if input.UserInputType == Enum.UserInputType.MouseButton1 then
189 CloseExt()
190 end
191 end)
192 end
193
194 local function CloseWindow(Obj)
195 for _,v in next, ExtFrames do
196 DDCheck = Obj
197 v.Parent = Obj.Container
198 end
199 end
200
201 local ChromaColor
202 spawn(function()
203 local a = 0
204 while wait() do
205 ChromaColor = Color3.fromHSV(a,1,1)
206 a = a >= 1 and 0 or a + 0.01
207 end
208 end)
209
210 --LIBRARY
211 Library = {Tabs = {}, FocusedTab = nil, Open = true}
212
213 Library.settings = {
214 UiToggle = Enum.KeyCode.RightShift,
215 Theme = Color3.fromRGB(255,65,65)
216 }
217
218 UserInputService.InputBegan:connect(function(input)
219 if input.KeyCode == Library.settings.UiToggle and Library.Base then
220 Library.Open = not Library.Open
221 if Library.FocusedTab then
222 if Library.Open then
223 Library.Base.Enabled = true
224 for _,Tab in next, Library.Tabs do
225 Tab.ButtonHolder.Visible = Tab.Visible
226 end
227 else
228 CloseExt()
229 for _,Tab in next, Library.Tabs do
230 Tab.ButtonHolder.Visible = false
231 end
232 Library.Base.Enabled = false
233 end
234 end
235 end
236 end)
237
238 UserInputService.InputChanged:connect(function(input)
239 if input.UserInputType == Enum.UserInputType.MouseMovement and Library.Pointer then
240 local Mouse = UserInputService:GetMouseLocation() + Vector2.new(0,-36)
241 Library.Pointer.Position = UDim2.new(0,Mouse.X,0,Mouse.Y)
242 end
243 end)
244
245 function Library:Create(class, properties)
246 local inst = Instance.new(class)
247 for property, value in pairs(properties) do
248 inst[property] = value
249 end
250 return inst
251 end
252
253 function Library:CreateTab(TabName)
254 local Tab = {Sections = {}, Visible = true}
255
256 self.Base = self.Base or self:Create("ScreenGui", {
257 ZIndexBehavior = Enum.ZIndexBehavior.Global,
258 Parent = CoreGui
259 })
260
261 self.Line = self.Line or self:Create("Frame", {
262 AnchorPoint = Vector2.new(0.5,0),
263 Position = UDim2.new(0.5,0,1,0),
264 Size = UDim2.new(0,0,0,-2),
265 BackgroundColor3 = Library.settings.Theme,
266 BorderSizePixel = 0
267 })
268
269 self.Pointer = self.Pointer or self:Create("Frame", {
270 ZIndex = 100,
271 AnchorPoint = Vector2.new(0,0),
272 Size = UDim2.new(0,4,0,4),
273 BackgroundColor3 = Color3.fromRGB(255,255,255),
274 Parent = self.Base
275 })
276
277 self.PointerDot = self.PointerDot or self:Create("Frame", {
278 ZIndex = 100,
279 Size = UDim2.new(0,2,0,2),
280 BackgroundColor3 = Library.settings.Theme,
281 BorderSizePixel = 0,
282 Parent = self.Pointer
283 })
284
285 Tab.XPos = 5 + (#self.Tabs * 205)
286
287 Tab.ButtonHolder = self:Create("Frame", {
288 Position = UDim2.new(0,Tab.XPos,0,5),
289 Size = UDim2.new(0,200,0,28),
290 BackgroundColor3 = Color3.fromRGB(40,40,40),
291 BorderSizePixel = 0,
292 Parent = self.Base
293 })
294
295 Tab.Button = self:Create("TextButton", {
296 Size = UDim2.new(1,0,1,0),
297 BackgroundTransparency = 1,
298 BackgroundColor3 = Color3.fromRGB(255,255,255),
299 BorderSizePixel = 0,
300 Text = TabName,
301 TextSize = 18,
302 TextColor3 = Color3.fromRGB(255,255,255),
303 Font = Enum.Font.SourceSans,
304 AutoButtonColor = false,
305 Modal = true,
306 Parent = Tab.ButtonHolder
307 })
308
309 Tab.Main = self:Create("Frame", {
310 ZIndex = -10,
311 Position = UDim2.new(0,0,0,-36),
312 Size = UDim2.new(1,0,1,36),
313 BackgroundTransparency = 1,
314 BackgroundColor3 = Color3.new(),
315 Visible = false,
316 Parent = self.Base
317 })
318
319 AddHighlight(Tab.Button)
320
321 self.FocusOnTab = self.FocusOnTab or function(t)
322 if self.FocusedTab then
323 self.FocusedTab.Main.Visible = false
324 end
325 self.FocusedTab = t
326 self.FocusedTab.Main.Visible = true
327 end
328
329 Tab.Button.MouseButton1Click:connect(function()
330 if self.FocusedTab ~= Tab then
331 if DDCheck then
332 DDCheck.Main.Parent.Parent.ClipsDescendants = true
333 end
334 self.FocusOnTab(Tab)
335 end
336 end)
337
338 if not self.FocusedTab then
339 self.FocusOnTab(Tab)
340 end
341
342 function Tab:AddSection(SectionName)
343 local Section = {Options = {}}
344 Section.YSize = 24
345
346 Section.Main = Library:Create("Frame", {
347 Position = UDim2.new(0,5 + (#self.Sections * 205),0,74),
348 Size = UDim2.new(0,200,0,24),
349 BackgroundColor3 = Color3.fromRGB(20,20,20),
350 BorderSizePixel = 0,
351 ClipsDescendants = true,
352 Parent = self.Main
353 })
354
355 Section.Label = Library:Create("TextLabel", {
356 Size = UDim2.new(1,0,0,24),
357 BackgroundColor3 = Color3.fromRGB(30,30,30),
358 BorderSizePixel = 0,
359 Text = SectionName,
360 TextSize = 16,
361 TextColor3 = Color3.fromRGB(255,255,255),
362 Font = Enum.Font.SourceSans,
363 Parent = Section.Main
364 })
365
366 Section.Content = Library:Create("Frame", {
367 Position = UDim2.new(0,0,0,24),
368 Size = UDim2.new(1,0,1,-24),
369 BackgroundTransparency = 1,
370 BorderSizePixel = 0,
371 Parent = Section.Main
372 })
373
374 Section.Layout = Library:Create("UIListLayout", {
375 SortOrder = Enum.SortOrder.LayoutOrder,
376 Parent = Section.Content
377 })
378
379 function Section:AddLabel(LabelText)
380 local Label = {}
381
382 Label.Main = Library:Create("TextLabel", {
383 LayoutOrder = #self.Options + 1,
384 Size = UDim2.new(1,0,0,22),
385 BackgroundTransparency = 1,
386 Text = " "..LabelText,
387 TextSize = 16,
388 TextColor3 = Color3.fromRGB(255,255,255),
389 Font = Enum.Font.SourceSans,
390 TextXAlignment = Enum.TextXAlignment.Left,
391 Parent = self.Content
392 })
393
394 Section.YSize = Section.YSize + 22
395 Section.Main.Size = UDim2.new(0,200,0,Section.YSize)
396 table.insert(self.Options, Label)
397 return Label
398 end
399
400 function Section:AddButton(ButtonText, Callback)
401 local Button = {}
402 Callback = Callback or function() end
403
404 Button.Main = Library:Create("TextButton", {
405 LayoutOrder = #self.Options + 1,
406 Size = UDim2.new(1,0,0,22),
407 BackgroundTransparency = 1,
408 BackgroundColor3 = Color3.fromRGB(220,220,220),
409 BorderSizePixel = 0,
410 Text = " "..ButtonText,
411 TextSize = 16,
412 TextColor3 = Color3.fromRGB(255,255,255),
413 Font = Enum.Font.SourceSans,
414 TextXAlignment = Enum.TextXAlignment.Left,
415 AutoButtonColor = false,
416 Parent = self.Content
417 })
418
419 AddHighlight(Button.Main)
420
421 Button.Main.MouseButton1Click:connect(function()
422 Callback()
423 end)
424
425 Section.YSize = Section.YSize + 22
426 Section.Main.Size = UDim2.new(0,200,0,Section.YSize)
427 table.insert(self.Options, Button)
428 return Button
429 end
430
431 function Section:AddToggle(ToggleText, Callback)
432 local Toggle = {State = false, Callback = Callback}
433 Toggle.Callback = Callback or function() end
434
435 Toggle.Main = Library:Create("TextButton", {
436 LayoutOrder = #self.Options + 1,
437 Size = UDim2.new(1,0,0,22),
438 BackgroundTransparency = 1,
439 BackgroundColor3 = Color3.fromRGB(220,220,220),
440 BorderSizePixel = 0,
441 Text = " "..ToggleText,
442 TextSize = 16,
443 TextColor3 = Color3.fromRGB(255,255,255),
444 Font = Enum.Font.SourceSans,
445 TextXAlignment = Enum.TextXAlignment.Left,
446 AutoButtonColor = false,
447 Parent = self.Content
448 })
449
450 Toggle.Visualize = Library:Create("Frame", {
451 Position = UDim2.new(1,-2,0,2),
452 Size = UDim2.new(0,-18,0,18),
453 BackgroundColor3 = Color3.fromRGB(35,35,35),
454 BorderSizePixel = 0,
455 Parent = Toggle.Main
456 })
457
458 AddHighlight(Toggle.Main)
459
460 local on = TweenService:Create(Toggle.Visualize, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundColor3 = Library.settings.Theme})
461 local off = TweenService:Create(Toggle.Visualize, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundColor3 = Color3.fromRGB(35,35,35)})
462
463 function Toggle:SetToggle(State)
464 Toggle.State = State
465 if Toggle.State then
466 on:Play()
467 else
468 off:Play()
469 end
470 Toggle.Callback(Toggle.State)
471 end
472
473 Toggle.Main.MouseButton1Click:connect(function()
474 Toggle:SetToggle(not Toggle.State)
475 end)
476
477 Section.YSize = Section.YSize + 22
478 Section.Main.Size = UDim2.new(0,200,0,Section.YSize)
479 table.insert(self.Options, Toggle)
480 return Toggle
481 end
482
483 function Section:AddBox(BoxText, Callback)
484 local Box = {Callback = Callback}
485 Box.Callback = Callback or function() end
486
487 Box.Main = Library:Create("TextButton", {
488 LayoutOrder = #self.Options + 1,
489 Size = UDim2.new(1,0,0,42),
490 BackgroundTransparency = 1,
491 BackgroundColor3 = Color3.fromRGB(220,220,220),
492 BorderSizePixel = 0,
493 Text = " "..BoxText,
494 TextSize = 16,
495 TextColor3 = Color3.fromRGB(255,255,255),
496 Font = Enum.Font.SourceSans,
497 TextXAlignment = Enum.TextXAlignment.Left,
498 TextYAlignment = Enum.TextYAlignment.Top,
499 AutoButtonColor = false,
500 Parent = self.Content
501 })
502
503 Box.Box = Library:Create("TextBox", {
504 Position = UDim2.new(0,2,0,20),
505 Size = UDim2.new(1,-4,0,20),
506 BackgroundColor3 = Color3.fromRGB(35,35,35),
507 BorderSizePixel = 0,
508 Text = "",
509 TextColor3 = Color3.fromRGB(240,240,240),
510 ClipsDescendants = true,
511 Parent = Box.Main
512 })
513
514 AddHighlight(Box.Main)
515
516 Box.Main.MouseButton1Click:connect(function()
517 Box.Box:CaptureFocus()
518 end)
519
520 Box.Box.FocusLost:connect(function(EnterPressed)
521 TweenService:Create(Box.Main, TweenInfo.new(0.4), {BackgroundTransparency = 1}):Play()
522 Box.Callback(Box.Box.Text, EnterPressed)
523 end)
524
525 Section.YSize = Section.YSize + 42
526 Section.Main.Size = UDim2.new(0,200,0,Section.YSize)
527 table.insert(self.Options, Box)
528 return Box
529 end
530
531 function Section:AddDropdown(DropdownText, Options, Callback, Groupbox)
532 if Options then
533 if typeof(Options) == "function" then
534 Callback = Options
535 Options = {}
536 end
537 if typeof(Options) == "boolean" then
538 Groupbox = Options
539 Callback = typeof(Options) == "function" and Options or function() end
540 Options = {}
541 end
542 end
543 if Callback and typeof(Callback) == "boolean" then
544 Groupbox = Callback
545 Callback = function() end
546 end
547 local Dropdown = {Order = 0, Closed = true, Value = Groupbox and nil or Options[1], Callback = Callback, Selected = {}}
548 Dropdown.Callback = Callback or function() end
549
550 Dropdown.Main = Library:Create("TextButton", {
551 LayoutOrder = #self.Options + 1,
552 Size = UDim2.new(1,0,0,42),
553 BackgroundTransparency = 1,
554 BackgroundColor3 = Color3.fromRGB(220,220,220),
555 BorderSizePixel = 0,
556 Text = " "..DropdownText,
557 TextSize = 16,
558 TextColor3 = Color3.fromRGB(255,255,255),
559 Font = Enum.Font.SourceSans,
560 TextXAlignment = Enum.TextXAlignment.Left,
561 TextYAlignment = Enum.TextYAlignment.Top,
562 AutoButtonColor = false,
563 Parent = self.Content
564 })
565
566 Dropdown.Label = Library:Create("TextLabel", {
567 Position = UDim2.new(0,2,0,20),
568 Size = UDim2.new(1,-4,0,20),
569 BackgroundColor3 = Color3.fromRGB(35,35,35),
570 BorderSizePixel = 0,
571 Text = Groupbox and "" or Dropdown.Value,
572 TextSize = 16,
573 TextColor3 = Color3.fromRGB(255,255,255),
574 TextTruncate = Enum.TextTruncate.AtEnd,
575 Font = Enum.Font.SourceSans,
576 Parent = Dropdown.Main
577 })
578
579 Dropdown.Arrow = Library:Create("TextLabel", {
580 Position = UDim2.new(1,0,0,2),
581 Size = UDim2.new(0,-16,0,16),
582 Rotation = 90,
583 BackgroundTransparency = 1,
584 Text = ">",
585 TextColor3 = Color3.fromRGB(80,80,80),
586 Font = Enum.Font.Arcade,
587 TextSize = 18,
588 Parent = Dropdown.Label
589 })
590
591 Dropdown.Container = Library:Create("Frame", {
592 ZIndex = 2,
593 Position = UDim2.new(0,0,1,2),
594 Size = UDim2.new(1,0,0,0),
595 BackgroundTransparency = 1,
596 Parent = Dropdown.Label
597 })
598
599 Dropdown.SubContainer = Library:Create("Frame", {
600 Size = UDim2.new(1,0,1,0),
601 BackgroundTransparency = 1,
602 ClipsDescendants = true,
603 Parent = Dropdown.Container
604 })
605
606 Dropdown.Contentholder = Library:Create("ScrollingFrame", {
607 ZIndex = 2,
608 Size = UDim2.new(1,0,1,0),
609 BackgroundColor3 = Color3.fromRGB(40,40,40),
610 BorderColor3 = Color3.fromRGB(30,30,30),
611 ScrollBarThickness = 6,
612 ScrollBarImageColor3 = Color3.fromRGB(80,80,80),
613 BottomImage = "rbxasset://textures/ui/Scroll/scroll-middle.png",
614 TopImage = "rbxasset://textures/ui/Scroll/scroll-middle.png",
615 Parent = Dropdown.SubContainer
616 })
617
618 Dropdown.Layout = Library:Create("UIListLayout", {
619 Padding = UDim.new(0,0),
620 SortOrder = Enum.SortOrder.LayoutOrder,
621 Parent = Dropdown.Contentholder
622 })
623
624 AddHighlight(Dropdown.Main)
625
626 Dropdown.Main.InputBegan:connect(function(input)
627 if input.UserInputType == Enum.UserInputType.MouseButton1 then
628 Dropdown.Closed = not Dropdown.Closed
629 if Dropdown.Closed then
630 Dropdown.Arrow.Text = ">"
631 Dropdown.Container:TweenSize(UDim2.new(1,0,0,0), "Out", "Quad", 0.2, true, function() if Dropdown.Closed then self.Main.ClipsDescendants = true end end)
632 else
633 CloseWindow(Dropdown)
634 self.Main.ClipsDescendants = false
635 Dropdown.Arrow.Text = "<"
636 if Dropdown.Order > 5 then
637 Dropdown.Container:TweenSize(UDim2.new(1,0,0,5*20), "Out", "Quad", 0.3, true)
638 else
639 Dropdown.Container:TweenSize(UDim2.new(1,0,0,Dropdown.Order*20), "Out", "Quad", 0.3, true)
640 end
641 end
642 end
643 end)
644
645 local SelectedCount = 0
646 local function AddOptions(Options)
647 for _,value in pairs(Options) do
648 Dropdown.Order = Dropdown.Order + 1
649 local State
650 local Pos = Dropdown.Order
651
652 local Option = Library:Create("TextButton", {
653 ZIndex = 3,
654 LayoutOrder = Dropdown.Order,
655 Size = UDim2.new(1,0,0,20),
656 BackgroundTransparency = 1,
657 BackgroundColor3 = Color3.fromRGB(255,255,255),
658 Text = value,
659 TextSize = 16,
660 TextColor3 = Color3.fromRGB(240,240,240),
661 Font = Enum.Font.SourceSans,
662 AutoButtonColor = false,
663 Parent = Dropdown.Contentholder
664 })
665
666 AddHighlight(Option)
667
668 Option.MouseButton1Click:connect(function()
669 Dropdown.Value = value
670 if Groupbox then
671 State = not State
672 SelectedCount = SelectedCount + (State and 1 or -1)
673 if State then
674 Option.BackgroundColor3 = Library.settings.Theme
675 Dropdown.Selected[value] = value
676 else
677 Option.BackgroundColor3 = Color3.fromRGB(255,255,255)
678 Dropdown.Selected[value] = nil
679 end
680 local Text = ""
681 for _,v in next, Dropdown.Selected do
682 Text = SelectedCount > 1 and Text .. v .. ", " or Text .. v
683 end
684 Dropdown.Label.Text = SelectedCount > 1 and string.sub(Text, 1, string.len(Text) - 2) or Text
685 if not State then return end
686 else
687 self.Main.ClipsDescendants = true
688 Dropdown.Label.Text = Dropdown.Value
689 Dropdown.Closed = true
690 Dropdown.Arrow.Text = ">"
691 Dropdown.Container:TweenSize(UDim2.new(1,0,0,0), "Out", "Quad", 0.2, true)
692 end
693 Dropdown.Callback(Dropdown.Value)
694 end)
695 Dropdown.Contentholder.CanvasSize = UDim2.new(0,0,0,Dropdown.Order*20)
696 end
697 end
698
699 AddOptions(Options)
700
701 if Groupbox then
702 function Dropdown:IsSelected(Value)
703 for _, v in next, self.Selected do
704 if v == Value then
705 return true
706 end
707 end
708 return false
709 end
710 end
711
712 function Dropdown:Refresh(options, keep)
713 if not keep then
714 Dropdown.Selected = {}
715 Dropdown.Label.Text = Groupbox and "" or options[1]
716 for _,v in pairs(Dropdown.Contentholder:GetChildren()) do
717 if v:IsA"TextButton" then
718 v:Destroy()
719 Dropdown.Order = Dropdown.Order - 1
720 Dropdown.Contentholder.CanvasSize = UDim2.new(0,0,0,Dropdown.Layout.AbsoluteContentSize.Y)
721 end
722 end
723 end
724 AddOptions(options)
725 end
726
727 if not Groupbox then
728 function Dropdown:SetValue(value)
729 Dropdown.Value = value
730 Dropdown.Label.Text = Dropdown.Value
731 Dropdown.Callback(Dropdown.Value)
732 end
733 end
734
735 Section.YSize = Section.YSize + 42
736 Section.Main.Size = UDim2.new(0,200,0,Section.YSize)
737 table.insert(self.Options, Dropdown)
738 return Dropdown
739 end
740
741 function Section:AddKeybind(BindText, BindKey, Callback, Hold)
742 if BindKey then
743 if typeof(BindKey) == "function" then
744 Hold = Callback or false
745 Callback = BindKey
746 BindKey = Enum.KeyCode.F
747 end
748 if typeof(BindKey) == "string" then
749 if not keyCheck(Enum.KeyCode[BindKey:upper()], BlacklistedKeys) then
750 BindKey = Enum.KeyCode[BindKey:upper()]
751 end
752 if keyCheck(BindKey, WhitelistedMouseInputs) then
753 BindKey = Enum.UserInputType[BindKey:upper()]
754 end
755 end
756 if typeof(BindKey) == "boolean" then
757 Hold = BindKey
758 BindKey = Enum.KeyCode.F
759 end
760 end
761 local Bind = {Binding = false, Holding = false, Key = BindKey, Hold = Hold, Callback = Callback}
762 Bind.Callback = Callback or function() end
763
764 local Bounds = game:GetService('TextService'):GetTextSize(Bind.Key.Name, 16, Enum.Font.SourceSans, Vector2.new(math.huge, math.huge))
765 Bind.Main = Library:Create("TextButton", {
766 LayoutOrder = #self.Options + 1,
767 Size = UDim2.new(1,0,0,22),
768 BackgroundTransparency = 1,
769 BackgroundColor3 = Color3.fromRGB(220,220,220),
770 Text = " "..BindText,
771 TextSize = 16,
772 TextColor3 = Color3.fromRGB(255,255,255),
773 Font = Enum.Font.SourceSans,
774 TextXAlignment = Enum.TextXAlignment.Left,
775 AutoButtonColor = false,
776 Parent = self.Content
777 })
778
779 Bind.Label = Library:Create("TextLabel", {
780 Position = UDim2.new(1,-2,0,2),
781 Size = UDim2.new(0,-Bounds.X-8,0,18),
782 BackgroundColor3 = Color3.fromRGB(35,35,35),
783 BorderSizePixel = 0,
784 Text = Bind.Key.Name,
785 TextSize = 16,
786 TextColor3 = Color3.fromRGB(255,255,255),
787 Font = Enum.Font.SourceSans,
788 Parent = Bind.Main
789 })
790
791 AddHighlight(Bind.Main)
792
793 Bind.Main.InputBegan:connect(function(input)
794 if input.UserInputType == Enum.UserInputType.MouseButton1 then
795 Bind.Label.Text = "..."
796 Bind.Label.Size = UDim2.new(0,-Bind.Label.TextBounds.X-8,1,-4)
797 end
798 end)
799
800 Bind.Main.InputEnded:connect(function(input)
801 if input.UserInputType == Enum.UserInputType.MouseButton1 then
802 Bind.Binding = true
803 end
804 end)
805
806 local function SetKey(key)
807 Bind.Key = key
808 Bind.Label.Text = Bind.Key.Name
809 if string.match(tostring(key), "Mouse") then
810 Bind.Label.Text = string.sub(tostring(key), 20, 24)..string.sub(tostring(key), 31, 32)
811 end
812 Bind.Label.Size = UDim2.new(0,-Bind.Label.TextBounds.X-8,1,-4)
813 Bind.Callback(Bind.Key)
814 end
815
816 local Loop
817 local function DisconnectLoop()
818 if Loop then
819 Loop:Disconnect()
820 Bind.Callback(true)
821 end
822 end
823
824 UserInputService.InputBegan:connect(function(input)
825 if Bind.Binding then
826 if input.KeyCode == Enum.KeyCode.Backspace then
827 SetKey(Bind.Key)
828 Bind.Binding = false
829 else
830 if not keyCheck(input.KeyCode, BlacklistedKeys) then
831 SetKey(input.KeyCode)
832 Bind.Binding = false
833 end
834 if keyCheck(input.UserInputType, WhitelistedMouseInputs) then
835 SetKey(input.UserInputType)
836 Bind.Binding = false
837 end
838 end
839 DisconnectLoop()
840 else
841 if not Library.Open then
842 if input.KeyCode.Name == Bind.Key.Name or input.UserInputType.Name == Bind.Key.Name then
843 Bind.Holding = true
844 if Bind.Hold then
845 Loop = RunService.RenderStepped:connect(function()
846 Bind.Callback()
847 if Library.Open or Bind.Holding == false or not Bind.Hold then
848 DisconnectLoop()
849 end
850 end)
851 else
852 Bind.Callback()
853 end
854 end
855 end
856 end
857 end)
858
859 UserInputService.InputEnded:connect(function(input)
860 if input.KeyCode.Name == Bind.Key.Name or input.UserInputType.Name == Bind.Key.Name then
861 Bind.Holding = false
862 DisconnectLoop()
863 end
864 end)
865
866 function Bind:SetKeybind(Key)
867 if typeof(Key) == "string" then
868 if not keyCheck(Enum.KeyCode[Key:upper()], BlacklistedKeys) then
869 Key = Enum.KeyCode[Key:upper()]
870 end
871 if keyCheck(Enum.KeyCode[Key:upper()], WhitelistedMouseInputs) then
872 Key = Enum.UserInputType[Key:upper()]
873 end
874 end
875 DisconnectLoop()
876 SetKey(Key)
877 end
878
879 Section.YSize = Section.YSize + 22
880 Section.Main.Size = UDim2.new(0,200,0,Section.YSize)
881 table.insert(self.Options, Bind)
882 return Bind
883 end
884
885 function Section:AddSlider(SliderText, MinVal, MaxVal, SetVal, Callback, Float)
886 if SetVal and typeof(SetVal) == "function" then
887 Float = Callback
888 Callback = SetVal
889 SetVal = 0
890 end
891 if Callback and typeof(Callback) == "number" then
892 Float = Callback
893 Callback = function() end
894 end
895 SetVal = SetVal or 0
896 if SetVal > MaxVal then
897 SetVal = MaxVal
898 end
899 if SetVal < MinVal then
900 SetVal = MinVal
901 end
902 local Slider = {Value = SetVal, Callback = Callback}
903 Slider.Callback = Callback or function() end
904 Float = Float or 1
905
906 Slider.Main = Library:Create("TextButton", {
907 LayoutOrder = #self.Options + 1,
908 Size = UDim2.new(1,0,0,42),
909 BackgroundTransparency = 1,
910 BackgroundColor3 = Color3.fromRGB(220,220,220),
911 Text = " "..SliderText,
912 TextSize = 16,
913 TextColor3 = Color3.fromRGB(255,255,255),
914 Font = Enum.Font.SourceSans,
915 TextXAlignment = Enum.TextXAlignment.Left,
916 TextYAlignment = Enum.TextYAlignment.Top,
917 AutoButtonColor = false,
918 Parent = self.Content
919 })
920
921 Slider.Holder = Library:Create("Frame", {
922 Position = UDim2.new(0,0,0,18),
923 Size = UDim2.new(1,0,0,17),
924 BackgroundTransparency = 1,
925 Parent = Slider.Main
926 })
927
928 Slider.Visualize = Library:Create("TextBox", {
929 Position = UDim2.new(0,0,0.6,0),
930 Size = UDim2.new(1,0,0.4,0),
931 BackgroundTransparency = 1,
932 Text = Slider.Value,
933 TextSize = 16,
934 TextColor3 = Color3.fromRGB(255,255,255),
935 Font = Enum.Font.SourceSans,
936 TextWrapped = true,
937 Parent = Slider.Holder
938 })
939
940 Slider.Bar = Library:Create("Frame", {
941 AnchorPoint = Vector2.new(0.5,0.5),
942 Position = UDim2.new(0.5,0,0.2,0),
943 Size = UDim2.new(1,-6,0,2),
944 BackgroundColor3 = Color3.fromRGB(35,35,35),
945 BorderSizePixel = 0,
946 Parent = Slider.Holder
947 })
948
949 Slider.Fill = Library:Create("Frame", {
950 BackgroundColor3 = Library.settings.Theme,
951 BorderSizePixel = 0,
952 Parent = Slider.Bar
953 })
954 if MinVal >= 0 then
955 Slider.Fill.Size = UDim2.new((SetVal - MinVal) / (MaxVal - MinVal),0,1,0)
956 else
957 Slider.Fill.Position = UDim2.new((0 - MinVal) / (MaxVal - MinVal),0,0,0)
958 Slider.Fill.Size = UDim2.new(SetVal / (MaxVal - MinVal),0,1,0)
959 end
960
961 Slider.Box = Library:Create("Frame", {
962 AnchorPoint = Vector2.new(0.5,0.5),
963 Position = UDim2.new((SetVal - MinVal) / (MaxVal - MinVal),0,0.5,0),
964 Size = UDim2.new(0,4,0,12),
965 BackgroundColor3 = Color3.fromRGB(5,5,5),
966 BorderSizePixel = 0,
967 Parent = Slider.Bar
968 })
969
970 AddHighlight(Slider.Main)
971
972 function Slider:SetValue(Value)
973 Value = Round(Value, Float)
974 if Value >= MaxVal then
975 Value = MaxVal
976 end
977 if Value <= MinVal then
978 Value = MinVal
979 end
980 Slider.Box.Position = UDim2.new((Value - MinVal) / (MaxVal - MinVal),0,0.5,0)
981 if MinVal >= 0 then
982 Slider.Fill.Size = UDim2.new((Value - MinVal) / (MaxVal - MinVal),0,1,0)
983 else
984 Slider.Fill.Size = UDim2.new(Value / (MaxVal - MinVal),0,1,0)
985 end
986 Slider.Value = Value
987 Slider.Visualize.Text = Value
988 Slider.Callback(Value)
989 end
990
991 local Sliding
992 local Modifying
993 Slider.Main.InputBegan:connect(function(input)
994 if input.UserInputType == Enum.UserInputType.MouseButton1 then
995 if UserInputService:IsKeyDown(Enum.KeyCode.LeftControl) then
996 Modifying = true
997 Slider.Visualize:CaptureFocus()
998 else
999 Sliding = true
1000 Slider:SetValue(MinVal + ((input.Position.X - Slider.Bar.AbsolutePosition.X) / Slider.Bar.AbsoluteSize.X) * (MaxVal - MinVal))
1001 input.Changed:connect(function()
1002 if input.UserInputState == Enum.UserInputState.End then
1003 Sliding = false
1004 end
1005 end)
1006 end
1007 end
1008 end)
1009
1010 Slider.Visualize.Focused:connect(function()
1011 if not Modifying then
1012 Slider.Visualize:ReleaseFocus()
1013 end
1014 end)
1015
1016 Slider.Visualize.FocusLost:connect(function()
1017 if Modifying then
1018 if tonumber(Slider.Visualize.Text) then
1019 Slider:SetValue(tonumber(Slider.Visualize.Text))
1020 else
1021 Slider.Visualize.Text = Slider.Value
1022 end
1023 end
1024 Modifying = false
1025 end)
1026
1027 UserInputService.InputChanged:connect(function(input)
1028 if Modifying then
1029 if input.KeyCode == Enum.KeyCode.Escape or input.KeyCode == Enum.KeyCode.Space then
1030 Slider.Visualize:ReleaseFocus()
1031 end
1032 end
1033 if input.UserInputType == Enum.UserInputType.MouseMovement and Sliding then
1034 Slider:SetValue(MinVal + ((input.Position.X - Slider.Bar.AbsolutePosition.X) / Slider.Bar.AbsoluteSize.X) * (MaxVal - MinVal))
1035 end
1036 end)
1037
1038 Section.YSize = Section.YSize + 42
1039 Section.Main.Size = UDim2.new(0,200,0,Section.YSize)
1040 table.insert(self.Options, Slider)
1041 return Slider
1042 end
1043
1044 function Section:AddCP(ColorText, NewColor, Alpha, Callback)
1045 if Alpha then
1046 if typeof(Alpha) == "function" then
1047 Callback = Alpha
1048 Alpha = 1
1049 end
1050 end
1051 if NewColor then
1052 if typeof(NewColor) == "function" then
1053 Callback = NewColor
1054 NewColor = Color3.fromRGB(255,255,255)
1055 Alpha = 1
1056 end
1057 if typeof(NewColor) == "number" then
1058 Callback = Alpha
1059 Alpha = NewColor
1060 NewColor = Color3.fromRGB(255,255,255)
1061 end
1062 end
1063 Alpha = Alpha or 1
1064 local Color = {Color = NewColor, Alpha = Alpha, Closed = true, Callback = Callback}
1065 Color.Callback = Callback or function() end
1066 local Rain
1067 local Hue, Sat, Val = Color3.toHSV(Color3.fromRGB(NewColor.r*255,NewColor.g*255,NewColor.b*255))
1068 if Hue == 0 then
1069 Hue = 1
1070 end
1071
1072 Color.Main = Library:Create("TextButton", {
1073 LayoutOrder = #self.Options + 1,
1074 Size = UDim2.new(1,0,0,22),
1075 BackgroundTransparency = 1,
1076 BackgroundColor3 = Color3.fromRGB(220,220,220),
1077 Text = " "..tostring(ColorText),
1078 TextColor3 = Color3.fromRGB(255,255,255),
1079 Font = Enum.Font.SourceSans,
1080 TextSize = 16,
1081 TextXAlignment = Enum.TextXAlignment.Left,
1082 AutoButtonColor = false,
1083 Parent = self.Content,
1084 })
1085
1086 Color.Visualizebg = Library:Create("ImageLabel", {
1087 Position = UDim2.new(1,-2,0,2),
1088 Size = UDim2.new(0,-18,0,18),
1089 BorderSizePixel = 0,
1090 Image = "rbxassetid://3887014957",
1091 ScaleType = Enum.ScaleType.Tile,
1092 TileSize = UDim2.new(0,9,0,9),
1093 Parent = Color.Main
1094 })
1095
1096 Color.Visualize = Library:Create("Frame", {
1097 Size = UDim2.new(1,0,1,0),
1098 BackgroundTransparency = 1 - Color.Alpha,
1099 BackgroundColor3 = Color.Color,
1100 BorderSizePixel = 0,
1101 Parent = Color.Visualizebg,
1102 })
1103
1104 Color.Container = Library:Create("Frame", {
1105 Position = UDim2.new(1,4,0,0),
1106 Size = UDim2.new(0,200,0,0),
1107 BackgroundColor3 = Color3.fromRGB(40,40,40),
1108 BorderSizePixel = 0,
1109 Parent = Color.Visualize
1110 })
1111
1112 Color.SubContainer = Library:Create("Frame", {
1113 Size = UDim2.new(1,0,1,0),
1114 BackgroundTransparency = 1,
1115 ClipsDescendants = true,
1116 Parent = Color.Container
1117 })
1118
1119 Color.SatVal = Library:Create("ImageLabel", {
1120 ZIndex = 2,
1121 Position = UDim2.new(0,5,0,5),
1122 Size = UDim2.new(1,-30,1,-30),
1123 BackgroundColor3 = Color3.fromHSV(Hue,1,1),
1124 BorderSizePixel = 0,
1125 Image = "rbxassetid://4155801252",
1126 Parent = Color.SubContainer
1127 })
1128
1129 Color.Pointer = Library:Create("Frame", {
1130 ZIndex = 2,
1131 AnchorPoint = Vector2.new(0.5,0.5),
1132 Position = UDim2.new(Sat,0,1-Val,0),
1133 Size = UDim2.new(0,4,0,4),
1134 BackgroundTransparency = 0.4,
1135 BackgroundColor3 = Color3.fromRGB(255,255,255),
1136 BorderColor3 = Color3.fromRGB(0,0,0),
1137 Parent = Color.SatVal
1138 })
1139
1140 Color.Hue = Library:Create("ImageLabel", {
1141 ZIndex = 2,
1142 AnchorPoint = Vector2.new(1,0),
1143 Position = UDim2.new(1,-5,0,5),
1144 Size = UDim2.new(0,15,1,-30),
1145 BackgroundTransparency = 0,
1146 Image = "rbxassetid://4174584406",
1147 Parent = Color.SubContainer
1148 })
1149
1150 Color.Pointer1 = Library:Create("TextLabel", {
1151 ZIndex = 2,
1152 AnchorPoint = Vector2.new(0,0.5),
1153 Position = UDim2.new(1,-10,1-Hue,0),
1154 Size = UDim2.new(0,16,0,16),
1155 BackgroundTransparency = 1,
1156 Text = utf8.char(9668),
1157 TextColor3 = Color3.fromRGB(0,0,0),
1158 TextStrokeTransparency = 0,
1159 TextStrokeColor3 = Color3.fromRGB(130,130,130),
1160 TextSize = 6,
1161 Parent = Color.Hue
1162 })
1163
1164 Color.Alphabg = Library:Create("ImageLabel", {
1165 ZIndex = 2,
1166 Position = UDim2.new(0,5,1,-20),
1167 Size = UDim2.new(1,-30,0,15),
1168 BorderSizePixel = 0,
1169 Image = "rbxassetid://3887014957",
1170 ScaleType = Enum.ScaleType.Tile,
1171 TileSize = UDim2.new(0,10,0,10),
1172 Parent = Color.SubContainer
1173 })
1174
1175 Color.Alphaimg = Library:Create("ImageLabel", {
1176 ZIndex = 2,
1177 Size = UDim2.new(1,0,1,0),
1178 BackgroundTransparency = 1,
1179 Image = "rbxassetid://3887017050",
1180 ImageColor3 = NewColor,
1181 Parent = Color.Alphabg
1182 })
1183
1184 Color.Pointer2 = Library:Create("TextLabel", {
1185 ZIndex = 2,
1186 AnchorPoint = Vector2.new(0.5,0),
1187 Position = UDim2.new(1 - Color.Alpha,0,1,-10),
1188 Size = UDim2.new(0,16,0,16),
1189 BackgroundTransparency = 1,
1190 Text = utf8.char(9650),
1191 TextColor3 = Color3.fromRGB(0,0,0),
1192 TextStrokeTransparency = 0,
1193 TextStrokeColor3 = Color3.fromRGB(130,130,130),
1194 TextSize = 6,
1195 Parent = Color.Alphabg
1196 })
1197
1198 Color.Rainbow = Library:Create("Frame", {
1199 ZIndex = 2,
1200 AnchorPoint = Vector2.new(1,1),
1201 Position = UDim2.new(1,-5,1,-5),
1202 Size = UDim2.new(0,15,0,15),
1203 BackgroundTransparency = 0.4,
1204 BackgroundColor3 = Color3.fromRGB(20,20,20),
1205 BorderSizePixel = 0,
1206 Parent = Color.SubContainer
1207 })
1208
1209 spawn(function()
1210 while wait() do
1211 Color.Rainbow.BackgroundColor3 = ChromaColor
1212 end
1213 end)
1214
1215 AddHighlight(Color.Main)
1216
1217 Color.Main.InputBegan:connect(function(input)
1218 if input.UserInputType == Enum.UserInputType.MouseButton1 then
1219 Color.Closed = not Color.Closed
1220 if Color.Closed then
1221 Color.Container:TweenSize(UDim2.new(0,200,0,0), "Out", "Quad", 0.2, true, function() if Color.Closed then self.Main.ClipsDescendants = true end end)
1222 else
1223 CloseWindow(Color)
1224 self.Main.ClipsDescendants = false
1225 Color.Container:TweenSize(UDim2.new(0,200,0,200), "Out", "Quad", 0.3, true)
1226 end
1227 end
1228 end)
1229
1230 local Modifying
1231 local Modifying1
1232 local Modifying2
1233
1234 function Color:UpdateSatVal(InputPos)
1235 local x = (InputPos.X - Color.SatVal.AbsolutePosition.X) / Color.SatVal.AbsoluteSize.X
1236 local y = (InputPos.Y - Color.SatVal.AbsolutePosition.Y) / Color.SatVal.AbsoluteSize.Y
1237 x = tonumber(string.format("%.2f", x))
1238 y = tonumber(string.format("%.2f", y))
1239 y = y > 1 and 1 or y < 0 and 0 or y
1240 x = x > 1 and 1 or x < 0 and 0 or x
1241 Color.Pointer.Position = UDim2.new(x,0,y,0)
1242 Sat = x
1243 Val = 1-y
1244 Color.Color = Color3.fromHSV(Hue, Sat, Val)
1245 Color.Visualize.BackgroundColor3 = Color.Color
1246 Color.Alphaimg.ImageColor3 = Color.Color
1247 Color.Callback(Color.Color, Color.Alpha)
1248 end
1249
1250 function Color:UpdateHue(InputPos)
1251 local y = (InputPos.Y - Color.Hue.AbsolutePosition.Y) / Color.Hue.AbsoluteSize.Y
1252 y = tonumber(string.format("%.2f", y))
1253 y = y > 1 and 1 or y < 0 and 0 or y
1254 Hue = 1-y
1255 Color.Color = Color3.fromHSV(Hue, Sat, Val)
1256 Color.Pointer1.Position = UDim2.new(1,-10,1-Hue,0)
1257 Color.Visualize.BackgroundColor3 = Color.Color
1258 Color.SatVal.BackgroundColor3 = Color3.fromHSV(Hue,1,1)
1259 Color.Alphaimg.ImageColor3 = Color.Color
1260 Color.Callback(Color.Color, Color.Alpha)
1261 end
1262
1263 function Color:SetAlpha(Alpha)
1264 local x = (Alpha - Color.Alphabg.AbsolutePosition.X) / Color.Alphabg.AbsoluteSize.X
1265 x = tonumber(string.format("%.2f", x))
1266 x = x > 1 and 1 or x < 0 and 0 or x
1267 Color.Alpha = 1 - x
1268 Color.Pointer2.Position = UDim2.new(1 - Color.Alpha,0,1,-10)
1269 Color.Visualize.BackgroundTransparency = 1 - Color.Alpha
1270 Color.Callback(Color.Color, Color.Alpha)
1271 end
1272
1273 UserInputService.InputChanged:connect(function(input)
1274 if not Rain and input.UserInputType == Enum.UserInputType.MouseMovement and Modifying or Modifying1 or Modifying2 then
1275 local Mouse = UserInputService:GetMouseLocation() + Vector2.new(0, -36)
1276 if Modifying then
1277 Color:UpdateSatVal(Mouse)
1278 end
1279 if Modifying1 then
1280 Color:UpdateHue(Mouse)
1281 end
1282 if Modifying2 then
1283 Color:SetAlpha(Mouse.X)
1284 end
1285 end
1286 end)
1287
1288 Color.SatVal.InputBegan:connect(function(input)
1289 if not Rain and input.UserInputType == Enum.UserInputType.MouseButton1 then
1290 Modifying = true
1291 Color:UpdateSatVal(input.Position)
1292 input.Changed:connect(function()
1293 if input.UserInputState == Enum.UserInputState.End then
1294 Modifying = false
1295 end
1296 end)
1297 end
1298 end)
1299
1300 Color.SatVal.InputChanged:connect(function(input)
1301 if not Rain and input.UserInputType == Enum.UserInputType.MouseMovement and Modifying then
1302 Color:UpdateSatVal(input.Position)
1303 end
1304 end)
1305
1306 Color.Hue.InputBegan:connect(function(input)
1307 if not Rain and input.UserInputType == Enum.UserInputType.MouseButton1 then
1308 Modifying1 = true
1309 Color:UpdateHue(input.Position)
1310 input.Changed:connect(function()
1311 if input.UserInputState == Enum.UserInputState.End then
1312 Modifying1 = false
1313 end
1314 end)
1315 end
1316 end)
1317
1318 Color.Hue.InputChanged:connect(function(input)
1319 if not Rain and input.UserInputType == Enum.UserInputType.MouseMovement and Modifying1 then
1320 Color:UpdateHue(input.Position)
1321 end
1322 end)
1323
1324 Color.Alphabg.InputBegan:connect(function(input)
1325 if input.UserInputType == Enum.UserInputType.MouseButton1 then
1326 Modifying2 = true
1327 Color:SetAlpha(input.Position.X)
1328 input.Changed:connect(function()
1329 if input.UserInputState == Enum.UserInputState.End then
1330 Modifying2 = false
1331 end
1332 end)
1333 end
1334 end)
1335
1336 Color.Alphabg.InputChanged:connect(function(input)
1337 if input.UserInputType == Enum.UserInputType.MouseMovement and Modifying2 then
1338 Color:SetAlpha(input.Position.X)
1339 end
1340 end)
1341
1342 local OldColor
1343 local RainbowLoop
1344 Color.Rainbow.InputBegan:connect(function(input)
1345 if input.UserInputType == Enum.UserInputType.MouseButton1 then
1346 Rain = not Rain
1347 Color.Rainbow.BackgroundTransparency = Rain and 1 or 0.4
1348 if Rain then
1349 OldColor = Color.Color
1350 RainbowLoop = RunService.RenderStepped:connect(function()
1351 Color.Color = ChromaColor
1352 Color.Callback(Color.Color, Color.Alpha)
1353 end)
1354 else
1355 RainbowLoop:Disconnect()
1356 Color.Color = OldColor
1357 Color.Callback(Color.Color, Color.Alpha)
1358 end
1359 end
1360 end)
1361
1362 Section.YSize = Section.YSize + 22
1363 Section.Main.Size = UDim2.new(0,200,0,Section.YSize)
1364 table.insert(self.Options, Color)
1365 return Color
1366 end
1367
1368 table.insert(self.Sections, Section)
1369 return Section
1370 end
1371
1372 table.insert(self.Tabs, Tab)
1373 return Tab
1374 end
1375end
1376return Library