-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathazure
749 lines (674 loc) · 28.4 KB
/
azure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
--[[
__ ____ __ __ ____ ____
/__\ (_ )( )( )( _ \( ___)
/(__)\ / /_ )(__)( ) / )__)
(__)(__)(____)(______)(_)\_)(____)
]]--
--light theme
local theme = {
Tab_Color = Color3.fromRGB(255, 255, 255),
Tab_Text_Color = Color3.fromRGB(0, 0, 0),
Description_Color = Color3.fromRGB(255, 255, 255),
Description_Text_Color = Color3.fromRGB(0, 0, 0),
Container_Color = Color3.fromRGB(255, 255, 255),
Container_Text_Color = Color3.fromRGB(0, 0, 0),
Button_Text_Color = Color3.fromRGB(0, 0, 0),
Toggle_Box_Color = Color3.fromRGB(243, 243, 243),
Toggle_Inner_Color = Color3.fromRGB(94, 255, 180),
Toggle_Text_Color = Color3.fromRGB(0, 0, 0),
Toggle_Border_Color = Color3.fromRGB(225, 225, 225),
Slider_Bar_Color = Color3.fromRGB(243, 243, 243),
Slider_Inner_Color = Color3.fromRGB(94, 255, 180),
Slider_Text_Color = Color3.fromRGB(0, 0, 0),
Slider_Border_Color = Color3.fromRGB(255, 255, 255),
Dropdown_Text_Color = Color3.fromRGB(0, 0, 0),
Dropdown_Option_BorderSize = 1,
Dropdown_Option_BorderColor = Color3.fromRGB(235, 235, 235),
Dropdown_Option_Color = Color3.fromRGB(255, 255, 255),
Dropdown_Option_Text_Color = Color3.fromRGB(0, 0, 0),
TextBox_Text_Color = Color3.fromRGB(0, 0, 0),
TextBox_Color = Color3.fromRGB(255, 255, 255),
TextBox_Underline_Color = Color3.fromRGB(94, 255, 180)
}
--dark theme
local dark_theme = {
Tab_Color = Color3.fromRGB(31, 32, 33),
Tab_Text_Color = Color3.fromRGB(255, 255, 255),
Description_Color = Color3.fromRGB(31, 32, 33),
Description_Text_Color = Color3.fromRGB(255, 255, 255),
Container_Color = Color3.fromRGB(31, 32, 33),
Container_Text_Color = Color3.fromRGB(255, 255, 255),
Button_Text_Color = Color3.fromRGB(255, 255, 255),
Toggle_Box_Color = Color3.fromRGB(31, 32, 33),
Toggle_Inner_Color = Color3.fromRGB(255, 92, 92),
Toggle_Text_Color = Color3.fromRGB(255, 255, 255),
Toggle_Border_Color = Color3.fromRGB(50, 49, 50),
Slider_Bar_Color = Color3.fromRGB(31, 32, 33),
Slider_Inner_Color = Color3.fromRGB(255, 92, 92),
Slider_Text_Color = Color3.fromRGB(255, 255, 255),
Slider_Border_Color = Color3.fromRGB(50, 49, 50),
Dropdown_Text_Color = Color3.fromRGB(255, 255, 255),
Dropdown_Option_BorderSize = 1,
Dropdown_Option_BorderColor = Color3.fromRGB(49, 50, 51),
Dropdown_Option_Color = Color3.fromRGB(31, 32, 33),
Dropdown_Option_Text_Color = Color3.fromRGB(255, 255, 255),
TextBox_Text_Color = Color3.fromRGB(255, 255, 255),
TextBox_Color = Color3.fromRGB(31, 32, 33),
TextBox_Underline_Color = Color3.fromRGB(255, 92, 92)
}
if game:GetService("CoreGui"):FindFirstChild("uiui") then game:GetService("CoreGui"):FindFirstChild("uiui"):Destroy() end
local library = {}
local uiui = Instance.new("ScreenGui")
local background = Instance.new("Frame")
local UIListLayout = Instance.new("UIListLayout")
local UIPadding = Instance.new("UIPadding")
local TweenService = game:GetService("TweenService")
uiui.Name = "uiui"
uiui.Parent = game:GetService("CoreGui")
uiui.DisplayOrder = 1
background.Name = "background"
background.Parent = uiui
background.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
background.BackgroundTransparency = 1.000
background.Size = UDim2.new(0, 1234, 0, 664)
UIListLayout.Parent = background
UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
UIListLayout.Padding = UDim.new(0, 10)
UIPadding.Parent = background
UIPadding.PaddingLeft = UDim.new(0, 10)
UIPadding.PaddingTop = UDim.new(0, 10)
function library:CreateTab(text, desc, mode)
text = text or ""
desc = desc or ""
mode = mode or false
if mode then
theme = dark_theme
elseif mode == nil then
theme = _G.CustomTheme
end
local Tab = Instance.new("ImageButton")
local tabtext = Instance.new("TextLabel")
local description = Instance.new("ImageLabel")
local descriptionText = Instance.new("TextLabel")
local container = Instance.new("ImageLabel")
local MainPadder = Instance.new("UIListLayout")
local MainLiser = Instance.new("UIListLayout")
MainPadder.Name = "MainPadder"
MainPadder.Parent = container
MainPadder.SortOrder = Enum.SortOrder.LayoutOrder
MainLiser.Name = "MainLiser"
MainLiser.Parent = container
MainLiser.SortOrder = Enum.SortOrder.LayoutOrder
local TextBounds =
game:GetService("TextService"):GetTextSize(
desc,
14,
Enum.Font.SourceSansLight,
Vector2.new(math.huge, math.huge)
)
Tab.Name = math.random(1, 15) .. text .. " Tab"
Tab.Parent = background
Tab.ImageColor3 = theme.Tab_Color
Tab.BackgroundTransparency = 1.000
Tab.Size = UDim2.new(0, 155, 0, 30)
Tab.Image = "rbxassetid://3570695787"
Tab.ScaleType = Enum.ScaleType.Slice
Tab.SliceCenter = Rect.new(100, 100, 100, 100)
Tab.SliceScale = 0.030
local HoverEffect = true
local IsOpen = false
Tab.MouseEnter:Connect(
function()
if HoverEffect and IsOpen == false then
TweenService:Create(
description,
TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
{Size = UDim2.new(0, TextBounds.X + 20, 0, 30)}
):Play()
else
TweenService:Create(
description,
TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
{Size = UDim2.new(0, 0, 0, 30)}
):Play()
end
end
)
Tab.MouseLeave:Connect(
function()
TweenService:Create(
description,
TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
{Size = UDim2.new(0, 0, 0, 30)}
):Play()
end
)
tabtext.Name = "tabtext"
tabtext.Parent = Tab
tabtext.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
tabtext.BackgroundTransparency = 1.000
tabtext.Size = UDim2.new(0, 155, 0, 30)
tabtext.Font = Enum.Font.SourceSansLight
tabtext.Text = text
tabtext.TextColor3 = theme.Tab_Text_Color
tabtext.TextSize = 16.000
description.Name = "description"
description.Parent = Tab
description.ImageColor3 = theme.Description_Color
description.BackgroundTransparency = 1.000
description.BorderSizePixel = 0
description.ClipsDescendants = true
description.Position = UDim2.new(1.04969442, 0, -0.022590382, 0)
description.Size = UDim2.new(0, 0, 0, 30)
description.Image = "rbxassetid://3570695787"
description.ScaleType = Enum.ScaleType.Slice
description.SliceCenter = Rect.new(100, 100, 100, 100)
description.SliceScale = 0.030
descriptionText.Name = "descriptionText"
descriptionText.Parent = description
descriptionText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
descriptionText.BackgroundTransparency = 1.000
descriptionText.Position = UDim2.new(0, 0, 0.022590382, 0)
descriptionText.Size = UDim2.new(0, TextBounds.X + 20, 0, 30)
descriptionText.Font = Enum.Font.SourceSansLight
descriptionText.Text = desc
descriptionText.TextColor3 = theme.Description_Text_Color
descriptionText.TextSize = 14.000
local BodyYSize = 0
container.Name = "container"
container.Parent = Tab
container.ImageColor3 = theme.Container_Color
container.BackgroundTransparency = 1.000
container.BorderSizePixel = 0
container.ClipsDescendants = true
container.Position = UDim2.new(1.04969442, 0, -0.022590382, 0)
container.Size = UDim2.new(0, 185, 0, 0)
container.Image = "rbxassetid://3570695787"
container.ScaleType = Enum.ScaleType.Slice
container.SliceCenter = Rect.new(100, 100, 100, 100)
container.SliceScale = 0.030
local HoverEffect = true
Tab.MouseButton1Click:Connect(
function()
for i, v in next, background:GetChildren() do
for i, v in next, v:GetChildren() do
if v.Name == "container" and v.Name ~= Tab.Name then
IsOpen = false
TweenService:Create(
v,
TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),
{Size = UDim2.new(0, 185, 0, 0)}
):Play()
HoverEffect = false
end
IsOpen = true
TweenService:Create(
container,
TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),
{Size = UDim2.new(0, 185, 0, BodyYSize)}
):Play()
HoverEffect = true
end
end
if container.Size == UDim2.new(0, 185, 0, BodyYSize) then
IsOpen = false
TweenService:Create(
container,
TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),
{Size = UDim2.new(0, 185, 0, 0)}
):Play()
TweenService:Create(
description,
TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
{Size = UDim2.new(0, TextBounds.X + 20, 0, 30)}
):Play()
HoverEffect = true
elseif container.Size == UDim2.new(0, 185, 0, 0) then
IsOpen = true
TweenService:Create(
container,
TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),
{Size = UDim2.new(0, 185, 0, BodyYSize)}
):Play()
TweenService:Create(
description,
TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
{Size = UDim2.new(0, 0, 0, 30)}
):Play()
HoverEffect = false
end
end
)
local function resize(value)
BodyYSize = BodyYSize + value
end
local s = {}
function s:CreateToggle(text, callback)
text = text or ""
callback = callback or function()
end
local Toggle = Instance.new("TextButton")
local ToggleBox = Instance.new("Frame")
local ToggleInner = Instance.new("Frame")
local ToggleText = Instance.new("TextLabel")
Toggle.Name = "Toggle"
Toggle.Parent = container
Toggle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Toggle.BackgroundTransparency = 1.000
Toggle.Size = UDim2.new(0, 185, 0, 30)
Toggle.Font = Enum.Font.SourceSans
Toggle.Text = ""
Toggle.TextColor3 = Color3.fromRGB(0, 0, 0)
Toggle.TextSize = 14.000
ToggleBox.Name = "ToggleBox"
ToggleBox.Parent = Toggle
ToggleBox.BackgroundColor3 = theme.Toggle_Box_Color
ToggleBox.BorderColor3 = theme.Toggle_Border_Color
ToggleBox.Position = UDim2.new(0.0416216031, 0, 0.166666672, 0)
ToggleBox.Size = UDim2.new(0, 20, 0, 20)
ToggleInner.Name = "ToggleInner"
ToggleInner.Parent = Toggle
ToggleInner.AnchorPoint = Vector2.new(0.5, 0.5)
ToggleInner.BackgroundColor3 = theme.Toggle_Inner_Color
ToggleInner.BorderSizePixel = 0
ToggleInner.Position = UDim2.new(0.096, 0, 0.5, 0)
ToggleText.Name = "ToggleText"
ToggleText.Parent = Toggle
ToggleText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
ToggleText.BackgroundTransparency = 1.000
ToggleText.Position = UDim2.new(0.149729788, 0, 0, 0)
ToggleText.Size = UDim2.new(0, 157, 0, 30)
ToggleText.Font = Enum.Font.SourceSansLight
ToggleText.Text = " " .. text
ToggleText.TextColor3 = theme.Toggle_Text_Color
ToggleText.TextSize = 16.000
ToggleText.TextXAlignment = Enum.TextXAlignment.Left
local Toggled = false
Toggle.MouseButton1Click:Connect(
function()
Toggled = not Toggled
if Toggled then
TweenService:Create(
ToggleInner,
TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
{Size = UDim2.new(0, 20, 0, 20)}
):Play()
elseif not Toggled then
TweenService:Create(
ToggleInner,
TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
{Size = UDim2.new(0, 0, 0, 0)}
):Play()
end
callback(Toggled)
end
)
local aa = {}
function aa:Set(bool)
if bool then
Toggled = true
TweenService:Create(
ToggleInner,
TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
{Size = UDim2.new(0, 20, 0, 20)}
):Play()
else
Toggled = false
TweenService:Create(
ToggleInner,
TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
{Size = UDim2.new(0, 0, 0, 0)}
):Play()
end
end
resize(30)
return aa;
end
function s:CreateSlider(text, minvalue, maxvalue, callback)
text = text or ""
callback = callback or function()
end
minvalue = minvalue or 0
maxvalue = maxvalue or 0
local Slider = Instance.new("TextButton")
local SliderText = Instance.new("TextLabel")
local Slider_2 = Instance.new("Frame")
local SliderInner = Instance.new("Frame")
Slider.Name = "Slider"
Slider.Parent = container
Slider.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Slider.BackgroundTransparency = 1.000
Slider.Position = UDim2.new(0, 0, 0.410958916, 0)
Slider.Size = UDim2.new(0, 185, 0, 45)
Slider.Font = Enum.Font.SourceSans
Slider.Text = ""
Slider.TextColor3 = Color3.fromRGB(0, 0, 0)
Slider.TextSize = 14.000
SliderText.Name = "SliderText"
SliderText.Parent = Slider
SliderText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
SliderText.BackgroundTransparency = 1.000
SliderText.Position = UDim2.new(0.0362162739, 0, -0.0666666701, 0)
SliderText.Size = UDim2.new(0, 157, 0, 30)
SliderText.Font = Enum.Font.SourceSansLight
SliderText.Text = text .. " / " .. minvalue
SliderText.TextColor3 = theme.Slider_Text_Color
SliderText.TextSize = 16.000
SliderText.TextXAlignment = Enum.TextXAlignment.Left
Slider_2.Name = "Slider"
Slider_2.Parent = Slider
Slider_2.BackgroundColor3 = theme.Slider_Bar_Color
Slider_2.BorderColor3 = theme.Slider_Border_Color
Slider_2.Position = UDim2.new(0.0319999084, 0, 0.588888884, 0)
Slider_2.Size = UDim2.new(0, 172, 0, 9)
SliderInner.Name = "SliderInner"
SliderInner.Parent = Slider_2
SliderInner.BackgroundColor3 = theme.Slider_Inner_Color
SliderInner.BorderSizePixel = 0
SliderInner.Position = UDim2.new(0, 0, 0.055555556, 0)
SliderInner.Size = UDim2.new(0, 0, 0, 9)
local mouse = game.Players.LocalPlayer:GetMouse()
local uis = game:GetService("UserInputService")
local Value
local down = false
Slider.MouseButton1Down:Connect(function()
down = true
Value = math.floor((((tonumber(maxvalue) - tonumber(minvalue)) / 172) * SliderInner.AbsoluteSize.X) +tonumber(minvalue)) or 0
SliderText.Text = text .. " / " .. Value
pcall(callback, Value)
SliderInner:TweenSize(UDim2.new(0, math.clamp(mouse.X - SliderInner.AbsolutePosition.X, 0, 172), 0, 9), Enum.EasingDirection.InOut, Enum.EasingStyle.Linear, .07)
while game:GetService("RunService").RenderStepped:wait() and down do
Value = math.floor((((tonumber(maxvalue) - tonumber(minvalue)) / 172) * SliderInner.AbsoluteSize.X) +tonumber(minvalue)) or 0
SliderText.Text = text .. " / " .. Value
pcall(callback, Value)
SliderInner:TweenSize(UDim2.new(0, math.clamp(mouse.X - SliderInner.AbsolutePosition.X, 0, 172), 0, 9), Enum.EasingDirection.InOut, Enum.EasingStyle.Linear, .07)
end
end)
uis.InputEnded:connect(function(key)
if key.UserInputType == Enum.UserInputType.MouseButton1 and down then
down = false
Value = math.floor((((tonumber(maxvalue) - tonumber(minvalue)) / 172) * SliderInner.AbsoluteSize.X) +tonumber(minvalue)) or 0
SliderText.Text = text .. " / " .. Value
pcall(callback, Value)
SliderInner:TweenSize(UDim2.new(0, math.clamp(mouse.X - SliderInner.AbsolutePosition.X, 0, 172), 0, 9), Enum.EasingDirection.InOut, Enum.EasingStyle.Linear, 0.1)
end
end)
local ss = {}
function ss:Set(SliderAmount)
SliderAmount = tonumber(SliderAmount) or 0
SliderAmount = (((SliderAmount >= 0 and SliderAmount <= 100) and SliderAmount) / 100)
TweenService:Create(
SliderInner,
TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
{Size = UDim2.new(SliderAmount or 0, 0, 0, 9)}
):Play()
local p = math.floor((SliderAmount or 0) * 100)
local difference = maxvalue - minvalue
local Value = math.floor(((difference / 100) * p) + minvalue)
SliderText.Text = text .. " / " .. Value
pcall(callback, Value)
end
resize(45)
return ss
end
function s:CreateDropDown(text, list, callback)
callback = callback or function() end
text = text or ""
list = list or {}
resize(30)
local IsDropped = false
local DropYSize = 0
local DropdownButton = Instance.new("TextButton")
local DropdownText = Instance.new("TextLabel")
local DropdownOpen = Instance.new("TextButton")
local UIListLayout_2 = Instance.new("UIListLayout")
local Dropdown = Instance.new("Frame")
Dropdown.Name = "Dropdown"
Dropdown.Parent = container
Dropdown.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Dropdown.BackgroundTransparency = 1.000
Dropdown.ClipsDescendants = true
Dropdown.Position = UDim2.new(0, 0, 0.205479458, 0)
Dropdown.Size = UDim2.new(0, 184, 0, 30)
DropdownButton.Name = "DropdownButton"
DropdownButton.Parent = Dropdown
DropdownButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
DropdownButton.BackgroundTransparency = 1.000
DropdownButton.Size = UDim2.new(0, 185, 0, 30)
DropdownButton.Font = Enum.Font.SourceSans
DropdownButton.Text = ""
DropdownButton.TextColor3 = Color3.fromRGB(0, 0, 0)
DropdownButton.TextSize = 17.000
DropdownText.Name = "DropdownText"
DropdownText.Parent = DropdownButton
DropdownText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
DropdownText.BackgroundTransparency = 1.000
DropdownText.Size = UDim2.new(0, 155, 0, 30)
DropdownText.Font = Enum.Font.SourceSansLight
DropdownText.Text = " " .. text .. " / " .. ""
DropdownText.TextColor3 = theme.Dropdown_Text_Color
DropdownText.TextSize = 16.000
DropdownText.TextXAlignment = Enum.TextXAlignment.Left
DropdownOpen.Name = "DropdownOpen"
DropdownOpen.Parent = DropdownButton
DropdownOpen.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
DropdownOpen.BackgroundTransparency = 1.000
DropdownOpen.Position = UDim2.new(0.838, 0, 0, 0)
DropdownOpen.Size = UDim2.new(0, 30, 0, 30)
DropdownOpen.Font = Enum.Font.SourceSans
DropdownOpen.Text = "+"
DropdownOpen.TextColor3 = theme.Dropdown_Text_Color
DropdownOpen.TextSize = 14.000
UIListLayout_2.Parent = Dropdown
UIListLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
for i, v in next, list do
local Option1 = Instance.new("TextButton")
Option1.Name = "Option1"
Option1.Parent = Dropdown
Option1.BackgroundColor3 = theme.Dropdown_Option_Color
Option1.BorderColor3 = theme.Dropdown_Option_BorderColor
Option1.BorderSizePixel = theme.Dropdown_Option_BorderSize
Option1.BackgroundTransparency = 0
Option1.Position = UDim2.new(0, 0, 0.5, 0)
Option1.Size = UDim2.new(0, 184, 0, 30)
Option1.Font = Enum.Font.SourceSansLight
Option1.Text = v
Option1.TextColor3 = theme.Dropdown_Option_Text_Color
Option1.TextSize = 16.000
Option1.AutoButtonColor = false
DropYSize = DropYSize + 30
Option1.MouseButton1Click:Connect(
function()
callback(v)
DropdownText.Text = " " .. text .. " / " .. v
TweenService:Create(
Dropdown,
TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
{Size = UDim2.new(0, 184, 0, 30)}
):Play()
TweenService:Create(
container,
TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
{Size = UDim2.new(0, 185, 0, BodyYSize)}
):Play()
IsDropped = false
DropdownOpen.Text = "+"
end
)
end
DropdownButton.MouseButton1Click:Connect(
function()
if IsDropped then
IsDropped = false
DropdownOpen.Text = "+"
TweenService:Create(
Dropdown,
TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
{Size = UDim2.new(0, 184, 0, 30)}
):Play()
TweenService:Create(
container,
TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
{Size = UDim2.new(0, 185, 0, BodyYSize)}
):Play()
else
IsDropped = true
DropdownOpen.Text = "-"
DropdownText.Text = " " .. text .. " / "
TweenService:Create(
Dropdown,
TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
{Size = UDim2.new(0, 184, 0, DropYSize + 30)}
):Play()
TweenService:Create(
container,
TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
{Size = UDim2.new(0, 185, 0, BodyYSize + DropYSize + 1)}
):Play()
end
end
)
Tab.MouseButton1Click:Connect(
function()
IsDropped = false
DropdownOpen.Text = "+"
TweenService:Create(
Dropdown,
TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
{Size = UDim2.new(0, 184, 0, 30)}
):Play()
TweenService:Create(
container,
TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
{Size = UDim2.new(0, 185, 0, 0)}
):Play()
end
)
--[[local ssss = {}
function ssss:Add(name)
local Option1 = Dropdown:FindFirstChild("Option1"):Clone()
Option1.Name = "Option1"
Option1.Parent = Dropdown
Option1.BackgroundColor3 = theme.Dropdown_Option_Color
Option1.BorderColor3 = theme.Dropdown_Option_BorderColor
Option1.BorderSizePixel = theme.Dropdown_Option_BorderSize
Option1.BackgroundTransparency = 0
Option1.Position = UDim2.new(0, 0, 0.5, 0)
Option1.Size = UDim2.new(0, 184, 0, 30)
Option1.Font = Enum.Font.SourceSansLight
Option1.Text = name
Option1.TextColor3 = theme.Dropdown_Option_Text_Color
Option1.TextSize = 16.000
Option1.AutoButtonColor = false
DropYSize = DropYSize + 30
Option1.MouseButton1Click:Connect(
function()
callback(name)
DropdownText.Text = " " .. text .. " / " .. name
TweenService:Create(
Dropdown,
TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
{Size = UDim2.new(0, 184, 0, 30)}
):Play()
TweenService:Create(
container,
TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
{Size = UDim2.new(0, 185, 0, BodyYSize)}
):Play()
IsDropped = false
DropdownOpen.Text = "+"
end
)
if IsDropped then
TweenService:Create(
Dropdown,
TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
{Size = UDim2.new(0, 184, 0, DropYSize + 30)}
):Play()
TweenService:Create(
container,
TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
{Size = UDim2.new(0, 184, 0, BodyYSize + DropYSize)}
):Play()
end
local s2 = {}
function s2:Remove()
Option1:Destroy()
end
end
return ssss;]]
end
function s:CreateButton(text, callback)
text = text or ""
callback = callback or function()
end
local Button = Instance.new("TextButton")
Button.Name = text
Button.Parent = container
Button.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Button.BackgroundTransparency = 1.000
Button.Position = UDim2.new(0, 0, 0.777777851, 0)
Button.Size = UDim2.new(0, 185, 0, 30)
Button.Font = Enum.Font.SourceSansLight
Button.Text = text
Button.TextColor3 = theme.Button_Text_Color
Button.TextSize = 16.000
Button.MouseButton1Down:Connect(
function()
Button.TextSize = 14
end
)
Button.MouseButton1Up:Connect(
function()
pcall(callback)
Button.TextSize = 16
end
)
resize(30)
end
function s:CreateTextBox(string, callback)
resize(30)
string = string or ""
callback = callback or function() end
local TextBox = Instance.new("TextBox")
local TextboxUnderline = Instance.new("Frame")
TextBox.Parent = container
TextBox.BackgroundColor3 = theme.TextBox_Color
TextBox.BorderSizePixel = 0
TextBox.Position = UDim2.new(0, 0, 0.818181813, 0)
TextBox.Size = UDim2.new(0, 185, 0, 30)
TextBox.ClearTextOnFocus = false
TextBox.Font = Enum.Font.SourceSansLight
TextBox.PlaceholderColor3 = theme.TextBox_Text_Color
TextBox.PlaceholderText = string
TextBox.Text = ""
TextBox.TextColor3 = theme.TextBox_Text_Color
TextBox.TextSize = 15.000
TextBox.Focused:Connect(function()
TextboxUnderline:TweenSize(UDim2.new(0,185,0,2), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 0.1)
end)
TextBox.FocusLost:Connect(function(enterpressed)
if enterpressed then
TextboxUnderline:TweenSize(UDim2.new(0,0,0,2), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 0.1)
callback(TextBox.Text)
TextBox.Text = ""
else
TextboxUnderline:TweenSize(UDim2.new(0,0,0,2), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 0.1)
end
end)
TextboxUnderline.Name = "TextboxUnderline"
TextboxUnderline.Parent = TextBox
TextboxUnderline.AnchorPoint = Vector2.new(0.5, 0.5)
TextboxUnderline.BackgroundColor3 = theme.TextBox_Underline_Color
TextboxUnderline.BorderSizePixel = 0
TextboxUnderline.Position = UDim2.new(0.50075686, 0, 0.966666639, 0)
TextboxUnderline.Size = UDim2.new(0, 0, 0, 2)
local TextBoxInfo = {}
function TextBoxInfo:Edit(text)
TextBox.Text = text
end
return TextBoxInfo
end
return s
end
return library