1 | local Kavo = {} |
2 | |
3 | local tween = game:GetService("TweenService") |
4 | local tweeninfo = TweenInfo.new |
5 | local input = game:GetService("UserInputService") |
6 | local run = game:GetService("RunService") |
7 | |
8 | local Utility = {} |
9 | local Objects = {} |
10 | function Kavo:DraggingEnabled(frame, parent) |
11 | |
12 | parent = parent or frame |
13 | local mobile = Enum.UserInputType.Touch |
14 | -- stolen from wally or kiriot, kek |
15 | local dragging = false |
16 | local dragInput, mousePos, framePos |
17 | |
18 | frame.InputBegan:Connect(function(input) |
19 | if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == mobile then |
20 | dragging = true |
21 | mousePos = input.Position |
22 | framePos = parent.Position |
23 | |
24 | input.Changed:Connect(function() |
25 | if input.UserInputState == Enum.UserInputState.End then |
26 | dragging = false |
27 | end |
28 | end) |
29 | end |
30 | end) |
31 | |
32 | frame.InputChanged:Connect(function(input) |
33 | if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == mobile then |
34 | dragInput = input |
35 | end |
36 | end) |
37 | |
38 | input.InputChanged:Connect(function(input) |
39 | if input == dragInput and dragging then |
40 | local delta = input.Position - mousePos |
41 | parent.Position = UDim2.new(framePos.X.Scale, framePos.X.Offset + delta.X, framePos.Y.Scale, framePos.Y.Offset + delta.Y) |
42 | end |
43 | end) |
44 | end |
45 | |
46 | function Utility:TweenObject(obj, properties, duration, ...) |
47 | tween:Create(obj, tweeninfo(duration, ...), properties):Play() |
48 | end |
49 | |
50 | |
51 | local themes = { |
52 | SchemeColor = Color3.fromRGB(74, 99, 135), |
53 | Background = Color3.fromRGB(36, 37, 43), |
54 | Header = Color3.fromRGB(28, 29, 34), |
55 | TextColor = Color3.fromRGB(255,255,255), |
56 | ElementColor = Color3.fromRGB(32, 32, 38) |
57 | } |
58 | local themeStyles = { |
59 | DarkTheme = { |
60 | SchemeColor = Color3.fromRGB(64, 64, 64), |
61 | Background = Color3.fromRGB(0, 0, 0), |
62 | Header = Color3.fromRGB(0, 0, 0), |
63 | TextColor = Color3.fromRGB(255,255,255), |
64 | ElementColor = Color3.fromRGB(20, 20, 20) |
65 | }, |
66 | LightTheme = { |
67 | SchemeColor = Color3.fromRGB(150, 150, 150), |
68 | Background = Color3.fromRGB(255,255,255), |
69 | Header = Color3.fromRGB(200, 200, 200), |
70 | TextColor = Color3.fromRGB(0,0,0), |
71 | ElementColor = Color3.fromRGB(224, 224, 224) |
72 | }, |
73 | BloodTheme = { |
74 | SchemeColor = Color3.fromRGB(227, 27, 27), |
75 | Background = Color3.fromRGB(10, 10, 10), |
76 | Header = Color3.fromRGB(5, 5, 5), |
77 | TextColor = Color3.fromRGB(255,255,255), |
78 | ElementColor = Color3.fromRGB(20, 20, 20) |
79 | }, |
80 | GrapeTheme = { |
81 | SchemeColor = Color3.fromRGB(166, 71, 214), |
82 | Background = Color3.fromRGB(64, 50, 71), |
83 | Header = Color3.fromRGB(36, 28, 41), |
84 | TextColor = Color3.fromRGB(255,255,255), |
85 | ElementColor = Color3.fromRGB(74, 58, 84) |
86 | }, |
87 | Ocean = { |
88 | SchemeColor = Color3.fromRGB(86, 76, 251), |
89 | Background = Color3.fromRGB(26, 32, 58), |
90 | Header = Color3.fromRGB(38, 45, 71), |
91 | TextColor = Color3.fromRGB(200, 200, 200), |
92 | ElementColor = Color3.fromRGB(38, 45, 71) |
93 | }, |
94 | Midnight = { |
95 | SchemeColor = Color3.fromRGB(26, 189, 158), |
96 | Background = Color3.fromRGB(44, 62, 82), |
97 | Header = Color3.fromRGB(57, 81, 105), |
98 | TextColor = Color3.fromRGB(255, 255, 255), |
99 | ElementColor = Color3.fromRGB(52, 74, 95) |
100 | }, |
101 | Sentinel = { |
102 | SchemeColor = Color3.fromRGB(230, 35, 69), |
103 | Background = Color3.fromRGB(32, 32, 32), |
104 | Header = Color3.fromRGB(24, 24, 24), |
105 | TextColor = Color3.fromRGB(119, 209, 138), |
106 | ElementColor = Color3.fromRGB(24, 24, 24) |
107 | }, |
108 | Synapse = { |
109 | SchemeColor = Color3.fromRGB(46, 48, 43), |
110 | Background = Color3.fromRGB(13, 15, 12), |
111 | Header = Color3.fromRGB(36, 38, 35), |
112 | TextColor = Color3.fromRGB(152, 99, 53), |
113 | ElementColor = Color3.fromRGB(24, 24, 24) |
114 | }, |
115 | Serpent = { |
116 | SchemeColor = Color3.fromRGB(0, 166, 58), |
117 | Background = Color3.fromRGB(31, 41, 43), |
118 | Header = Color3.fromRGB(22, 29, 31), |
119 | TextColor = Color3.fromRGB(255,255,255), |
120 | ElementColor = Color3.fromRGB(22, 29, 31) |
121 | } |
122 | } |
123 | local oldTheme = "" |
124 | |
125 | local SettingsT = { |
126 | |
127 | } |
128 | |
129 | local Name = "KavoConfig.JSON" |
130 | |
131 | pcall(function() |
132 | |
133 | if not pcall(function() readfile(Name) end) then |
134 | writefile(Name, game:service'HttpService':JSONEncode(SettingsT)) |
135 | end |
136 | |
137 | Settings = game:service'HttpService':JSONEncode(readfile(Name)) |
138 | end) |
139 | |
140 | local LibName = tostring(math.random(1, 100))..tostring(math.random(1,50))..tostring(math.random(1, 100)) |
141 | |
142 | function Kavo:ToggleUI() |
143 | if game.CoreGui[LibName].Enabled then |
144 | game.CoreGui[LibName].Enabled = false |
145 | else |
146 | game.CoreGui[LibName].Enabled = true |
147 | end |
148 | end |
149 | |
150 | function Kavo.CreateLib(kavName, themeList) |
151 | if not themeList then |
152 | themeList = themes |
153 | end |
154 | if themeList == "DarkTheme" then |
155 | themeList = themeStyles.DarkTheme |
156 | elseif themeList == "LightTheme" then |
157 | themeList = themeStyles.LightTheme |
158 | elseif themeList == "BloodTheme" then |
159 | themeList = themeStyles.BloodTheme |
160 | elseif themeList == "GrapeTheme" then |
161 | themeList = themeStyles.GrapeTheme |
162 | elseif themeList == "Ocean" then |
163 | themeList = themeStyles.Ocean |
164 | elseif themeList == "Midnight" then |
165 | themeList = themeStyles.Midnight |
166 | elseif themeList == "Sentinel" then |
167 | themeList = themeStyles.Sentinel |
168 | elseif themeList == "Synapse" then |
169 | themeList = themeStyles.Synapse |
170 | elseif themeList == "Serpent" then |
171 | themeList = themeStyles.Serpent |
172 | else |
173 | if themeList.SchemeColor == nil then |
174 | themeList.SchemeColor = Color3.fromRGB(74, 99, 135) |
175 | elseif themeList.Background == nil then |
176 | themeList.Background = Color3.fromRGB(36, 37, 43) |
177 | elseif themeList.Header == nil then |
178 | themeList.Header = Color3.fromRGB(28, 29, 34) |
179 | elseif themeList.TextColor == nil then |
180 | themeList.TextColor = Color3.fromRGB(255,255,255) |
181 | elseif themeList.ElementColor == nil then |
182 | themeList.ElementColor = Color3.fromRGB(32, 32, 38) |
183 | end |
184 | end |
185 | |
186 | themeList = themeList or {} |
187 | local selectedTab |
188 | kavName = kavName or "Library" |
189 | table.insert(Kavo, kavName) |
190 | for i,v in pairs(game.CoreGui:GetChildren()) do |
191 | if v:IsA("ScreenGui") and v.Name == kavName then |
192 | v:Destroy() |
193 | end |
194 | end |
195 | local ScreenGui = Instance.new("ScreenGui") |
196 | local Main = Instance.new("Frame") |
197 | local MainCorner = Instance.new("UICorner") |
198 | local MainHeader = Instance.new("Frame") |
199 | local headerCover = Instance.new("UICorner") |
200 | local coverup = Instance.new("Frame") |
201 | local title = Instance.new("TextLabel") |
202 | local close = Instance.new("ImageButton") |
203 | local MainSide = Instance.new("Frame") |
204 | local sideCorner = Instance.new("UICorner") |
205 | local coverup_2 = Instance.new("Frame") |
206 | local tabFrames = Instance.new("Frame") |
207 | local tabListing = Instance.new("UIListLayout") |
208 | local pages = Instance.new("Frame") |
209 | local Pages = Instance.new("Folder") |
210 | local infoContainer = Instance.new("Frame") |
211 | |
212 | local blurFrame = Instance.new("Frame") |
213 | |
214 | Kavo:DraggingEnabled(MainHeader, Main) |
215 | |
216 | blurFrame.Name = "blurFrame" |
217 | blurFrame.Parent = pages |
218 | blurFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0) |
219 | blurFrame.BackgroundTransparency = 1 |
220 | blurFrame.BorderSizePixel = 0 |
221 | blurFrame.Position = UDim2.new(-0.0222222228, 0, -0.0371747203, 0) |
222 | blurFrame.Size = UDim2.new(0, 376, 0, 289) |
223 | blurFrame.ZIndex = 999 |
224 | |
225 | ScreenGui.Parent = game.CoreGui |
226 | ScreenGui.Name = LibName |
227 | ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling |
228 | ScreenGui.ResetOnSpawn = false |
229 | |
230 | Main.Name = "Main" |
231 | Main.Parent = ScreenGui |
232 | Main.BackgroundColor3 = themeList.Background |
233 | Main.ClipsDescendants = true |
234 | Main.Position = UDim2.new(0.336503863, 0, 0.275485456, 0) |
235 | Main.Size = UDim2.new(0, 525, 0, 318) |
236 | |
237 | MainCorner.CornerRadius = UDim.new(0, 4) |
238 | MainCorner.Name = "MainCorner" |
239 | MainCorner.Parent = Main |
240 | |
241 | MainHeader.Name = "MainHeader" |
242 | MainHeader.Parent = Main |
243 | MainHeader.BackgroundColor3 = themeList.Header |
244 | Objects[MainHeader] = "BackgroundColor3" |
245 | MainHeader.Size = UDim2.new(0, 525, 0, 29) |
246 | headerCover.CornerRadius = UDim.new(0, 4) |
247 | headerCover.Name = "headerCover" |
248 | headerCover.Parent = MainHeader |
249 | |
250 | coverup.Name = "coverup" |
251 | coverup.Parent = MainHeader |
252 | coverup.BackgroundColor3 = themeList.Header |
253 | Objects[coverup] = "BackgroundColor3" |
254 | coverup.BorderSizePixel = 0 |
255 | coverup.Position = UDim2.new(0, 0, 0.758620679, 0) |
256 | coverup.Size = UDim2.new(0, 525, 0, 7) |
257 | |
258 | title.Name = "title" |
259 | title.Parent = MainHeader |
260 | title.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
261 | title.BackgroundTransparency = 1.000 |
262 | title.BorderSizePixel = 0 |
263 | title.Position = UDim2.new(0.0171428565, 0, 0.344827592, 0) |
264 | title.Size = UDim2.new(0, 204, 0, 8) |
265 | title.Font = Enum.Font.Gotham |
266 | title.RichText = true |
267 | title.Text = kavName |
268 | title.TextColor3 = Color3.fromRGB(245, 245, 245) |
269 | title.TextSize = 16.000 |
270 | title.TextXAlignment = Enum.TextXAlignment.Left |
271 | |
272 | close.Name = "close" |
273 | close.Parent = MainHeader |
274 | close.BackgroundTransparency = 1.000 |
275 | close.Position = UDim2.new(0.949999988, 0, 0.137999997, 0) |
276 | close.Size = UDim2.new(0, 21, 0, 21) |
277 | close.ZIndex = 2 |
278 | close.Image = "rbxassetid://3926305904" |
279 | close.ImageRectOffset = Vector2.new(284, 4) |
280 | close.ImageRectSize = Vector2.new(24, 24) |
281 | close.MouseButton1Click:Connect(function() |
282 | game.TweenService:Create(close, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), { |
283 | ImageTransparency = 1 |
284 | }):Play() |
285 | wait() |
286 | game.TweenService:Create(Main, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { |
287 | Size = UDim2.new(0,0,0,0), |
288 | Position = UDim2.new(0, Main.AbsolutePosition.X + (Main.AbsoluteSize.X / 2), 0, Main.AbsolutePosition.Y + (Main.AbsoluteSize.Y / 2)) |
289 | }):Play() |
290 | wait(1) |
291 | ScreenGui:Destroy() |
292 | end) |
293 | |
294 | MainSide.Name = "MainSide" |
295 | MainSide.Parent = Main |
296 | MainSide.BackgroundColor3 = themeList.Header |
297 | Objects[MainSide] = "Header" |
298 | MainSide.Position = UDim2.new(-7.4505806e-09, 0, 0.0911949649, 0) |
299 | MainSide.Size = UDim2.new(0, 149, 0, 289) |
300 | |
301 | sideCorner.CornerRadius = UDim.new(0, 4) |
302 | sideCorner.Name = "sideCorner" |
303 | sideCorner.Parent = MainSide |
304 | |
305 | coverup_2.Name = "coverup" |
306 | coverup_2.Parent = MainSide |
307 | coverup_2.BackgroundColor3 = themeList.Header |
308 | Objects[coverup_2] = "Header" |
309 | coverup_2.BorderSizePixel = 0 |
310 | coverup_2.Position = UDim2.new(0.949939311, 0, 0, 0) |
311 | coverup_2.Size = UDim2.new(0, 7, 0, 289) |
312 | |
313 | tabFrames.Name = "tabFrames" |
314 | tabFrames.Parent = MainSide |
315 | tabFrames.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
316 | tabFrames.BackgroundTransparency = 1.000 |
317 | tabFrames.Position = UDim2.new(0.0438990258, 0, -0.00066378375, 0) |
318 | tabFrames.Size = UDim2.new(0, 135, 0, 283) |
319 | |
320 | tabListing.Name = "tabListing" |
321 | tabListing.Parent = tabFrames |
322 | tabListing.SortOrder = Enum.SortOrder.LayoutOrder |
323 | |
324 | pages.Name = "pages" |
325 | pages.Parent = Main |
326 | pages.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
327 | pages.BackgroundTransparency = 1.000 |
328 | pages.BorderSizePixel = 0 |
329 | pages.Position = UDim2.new(0.299047589, 0, 0.122641519, 0) |
330 | pages.Size = UDim2.new(0, 360, 0, 269) |
331 | |
332 | Pages.Name = "Pages" |
333 | Pages.Parent = pages |
334 | |
335 | infoContainer.Name = "infoContainer" |
336 | infoContainer.Parent = Main |
337 | infoContainer.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
338 | infoContainer.BackgroundTransparency = 1.000 |
339 | infoContainer.BorderColor3 = Color3.fromRGB(27, 42, 53) |
340 | infoContainer.ClipsDescendants = true |
341 | infoContainer.Position = UDim2.new(0.299047619, 0, 0.874213815, 0) |
342 | infoContainer.Size = UDim2.new(0, 368, 0, 33) |
343 | |
344 | |
345 | coroutine.wrap(function() |
346 | while wait() do |
347 | Main.BackgroundColor3 = themeList.Background |
348 | MainHeader.BackgroundColor3 = themeList.Header |
349 | MainSide.BackgroundColor3 = themeList.Header |
350 | coverup_2.BackgroundColor3 = themeList.Header |
351 | coverup.BackgroundColor3 = themeList.Header |
352 | end |
353 | end)() |
354 | |
355 | function Kavo:ChangeColor(prope,color) |
356 | if prope == "Background" then |
357 | themeList.Background = color |
358 | elseif prope == "SchemeColor" then |
359 | themeList.SchemeColor = color |
360 | elseif prope == "Header" then |
361 | themeList.Header = color |
362 | elseif prope == "TextColor" then |
363 | themeList.TextColor = color |
364 | elseif prope == "ElementColor" then |
365 | themeList.ElementColor = color |
366 | end |
367 | end |
368 | local Tabs = {} |
369 | |
370 | local first = true |
371 | |
372 | function Tabs:NewTab(tabName) |
373 | tabName = tabName or "Tab" |
374 | local tabButton = Instance.new("TextButton") |
375 | local UICorner = Instance.new("UICorner") |
376 | local page = Instance.new("ScrollingFrame") |
377 | local pageListing = Instance.new("UIListLayout") |
378 | |
379 | local function UpdateSize() |
380 | local cS = pageListing.AbsoluteContentSize |
381 | |
382 | game.TweenService:Create(page, TweenInfo.new(0.15, Enum.EasingStyle.Linear, Enum.EasingDirection.In), { |
383 | CanvasSize = UDim2.new(0,cS.X,0,cS.Y) |
384 | }):Play() |
385 | end |
386 | |
387 | page.Name = "Page" |
388 | page.Parent = Pages |
389 | page.Active = true |
390 | page.BackgroundColor3 = themeList.Background |
391 | page.BorderSizePixel = 0 |
392 | page.Position = UDim2.new(0, 0, -0.00371747208, 0) |
393 | page.Size = UDim2.new(1, 0, 1, 0) |
394 | page.ScrollBarThickness = 5 |
395 | page.Visible = false |
396 | page.ScrollBarImageColor3 = Color3.fromRGB(themeList.SchemeColor.r * 255 - 16, themeList.SchemeColor.g * 255 - 15, themeList.SchemeColor.b * 255 - 28) |
397 | |
398 | pageListing.Name = "pageListing" |
399 | pageListing.Parent = page |
400 | pageListing.SortOrder = Enum.SortOrder.LayoutOrder |
401 | pageListing.Padding = UDim.new(0, 5) |
402 | |
403 | tabButton.Name = tabName.."TabButton" |
404 | tabButton.Parent = tabFrames |
405 | tabButton.BackgroundColor3 = themeList.SchemeColor |
406 | Objects[tabButton] = "SchemeColor" |
407 | tabButton.Size = UDim2.new(0, 135, 0, 28) |
408 | tabButton.AutoButtonColor = false |
409 | tabButton.Font = Enum.Font.Gotham |
410 | tabButton.Text = tabName |
411 | tabButton.TextColor3 = themeList.TextColor |
412 | Objects[tabButton] = "TextColor3" |
413 | tabButton.TextSize = 14.000 |
414 | tabButton.BackgroundTransparency = 1 |
415 | |
416 | if first then |
417 | first = false |
418 | page.Visible = true |
419 | tabButton.BackgroundTransparency = 0 |
420 | UpdateSize() |
421 | else |
422 | page.Visible = false |
423 | tabButton.BackgroundTransparency = 1 |
424 | end |
425 | |
426 | UICorner.CornerRadius = UDim.new(0, 5) |
427 | UICorner.Parent = tabButton |
428 | table.insert(Tabs, tabName) |
429 | |
430 | UpdateSize() |
431 | page.ChildAdded:Connect(UpdateSize) |
432 | page.ChildRemoved:Connect(UpdateSize) |
433 | |
434 | tabButton.MouseButton1Click:Connect(function() |
435 | UpdateSize() |
436 | for i,v in next, Pages:GetChildren() do |
437 | v.Visible = false |
438 | end |
439 | page.Visible = true |
440 | for i,v in next, tabFrames:GetChildren() do |
441 | if v:IsA("TextButton") then |
442 | if themeList.SchemeColor == Color3.fromRGB(255,255,255) then |
443 | Utility:TweenObject(v, {TextColor3 = Color3.fromRGB(255,255,255)}, 0.2) |
444 | end |
445 | if themeList.SchemeColor == Color3.fromRGB(0,0,0) then |
446 | Utility:TweenObject(v, {TextColor3 = Color3.fromRGB(0,0,0)}, 0.2) |
447 | end |
448 | Utility:TweenObject(v, {BackgroundTransparency = 1}, 0.2) |
449 | end |
450 | end |
451 | if themeList.SchemeColor == Color3.fromRGB(255,255,255) then |
452 | Utility:TweenObject(tabButton, {TextColor3 = Color3.fromRGB(0,0,0)}, 0.2) |
453 | end |
454 | if themeList.SchemeColor == Color3.fromRGB(0,0,0) then |
455 | Utility:TweenObject(tabButton, {TextColor3 = Color3.fromRGB(255,255,255)}, 0.2) |
456 | end |
457 | Utility:TweenObject(tabButton, {BackgroundTransparency = 0}, 0.2) |
458 | end) |
459 | local Sections = {} |
460 | local focusing = false |
461 | local viewDe = false |
462 | |
463 | coroutine.wrap(function() |
464 | while wait() do |
465 | page.BackgroundColor3 = themeList.Background |
466 | page.ScrollBarImageColor3 = Color3.fromRGB(themeList.SchemeColor.r * 255 - 16, themeList.SchemeColor.g * 255 - 15, themeList.SchemeColor.b * 255 - 28) |
467 | tabButton.TextColor3 = themeList.TextColor |
468 | tabButton.BackgroundColor3 = themeList.SchemeColor |
469 | end |
470 | end)() |
471 | |
472 | function Sections:NewSection(secName, hidden) |
473 | secName = secName or "Section" |
474 | local sectionFunctions = {} |
475 | local modules = {} |
476 | hidden = hidden or false |
477 | local sectionFrame = Instance.new("Frame") |
478 | local sectionlistoknvm = Instance.new("UIListLayout") |
479 | local sectionHead = Instance.new("Frame") |
480 | local sHeadCorner = Instance.new("UICorner") |
481 | local sectionName = Instance.new("TextLabel") |
482 | local sectionInners = Instance.new("Frame") |
483 | local sectionElListing = Instance.new("UIListLayout") |
484 | |
485 | if hidden then |
486 | sectionHead.Visible = false |
487 | else |
488 | sectionHead.Visible = true |
489 | end |
490 | |
491 | sectionFrame.Name = "sectionFrame" |
492 | sectionFrame.Parent = page |
493 | sectionFrame.BackgroundColor3 = themeList.Background--36, 37, 43 |
494 | sectionFrame.BorderSizePixel = 0 |
495 | |
496 | sectionlistoknvm.Name = "sectionlistoknvm" |
497 | sectionlistoknvm.Parent = sectionFrame |
498 | sectionlistoknvm.SortOrder = Enum.SortOrder.LayoutOrder |
499 | sectionlistoknvm.Padding = UDim.new(0, 5) |
500 | |
501 | for i,v in pairs(sectionInners:GetChildren()) do |
502 | while wait() do |
503 | if v:IsA("Frame") or v:IsA("TextButton") then |
504 | function size(pro) |
505 | if pro == "Size" then |
506 | UpdateSize() |
507 | updateSectionFrame() |
508 | end |
509 | end |
510 | v.Changed:Connect(size) |
511 | end |
512 | end |
513 | end |
514 | sectionHead.Name = "sectionHead" |
515 | sectionHead.Parent = sectionFrame |
516 | sectionHead.BackgroundColor3 = themeList.SchemeColor |
517 | Objects[sectionHead] = "BackgroundColor3" |
518 | sectionHead.Size = UDim2.new(0, 352, 0, 33) |
519 | |
520 | sHeadCorner.CornerRadius = UDim.new(0, 4) |
521 | sHeadCorner.Name = "sHeadCorner" |
522 | sHeadCorner.Parent = sectionHead |
523 | |
524 | sectionName.Name = "sectionName" |
525 | sectionName.Parent = sectionHead |
526 | sectionName.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
527 | sectionName.BackgroundTransparency = 1.000 |
528 | sectionName.BorderColor3 = Color3.fromRGB(27, 42, 53) |
529 | sectionName.Position = UDim2.new(0.0198863633, 0, 0, 0) |
530 | sectionName.Size = UDim2.new(0.980113626, 0, 1, 0) |
531 | sectionName.Font = Enum.Font.Gotham |
532 | sectionName.Text = secName |
533 | sectionName.RichText = true |
534 | sectionName.TextColor3 = themeList.TextColor |
535 | Objects[sectionName] = "TextColor3" |
536 | sectionName.TextSize = 14.000 |
537 | sectionName.TextXAlignment = Enum.TextXAlignment.Left |
538 | if themeList.SchemeColor == Color3.fromRGB(255,255,255) then |
539 | Utility:TweenObject(sectionName, {TextColor3 = Color3.fromRGB(0,0,0)}, 0.2) |
540 | end |
541 | if themeList.SchemeColor == Color3.fromRGB(0,0,0) then |
542 | Utility:TweenObject(sectionName, {TextColor3 = Color3.fromRGB(255,255,255)}, 0.2) |
543 | end |
544 | |
545 | sectionInners.Name = "sectionInners" |
546 | sectionInners.Parent = sectionFrame |
547 | sectionInners.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
548 | sectionInners.BackgroundTransparency = 1.000 |
549 | sectionInners.Position = UDim2.new(0, 0, 0.190751448, 0) |
550 | |
551 | sectionElListing.Name = "sectionElListing" |
552 | sectionElListing.Parent = sectionInners |
553 | sectionElListing.SortOrder = Enum.SortOrder.LayoutOrder |
554 | sectionElListing.Padding = UDim.new(0, 3) |
555 | |
556 | |
557 | coroutine.wrap(function() |
558 | while wait() do |
559 | sectionFrame.BackgroundColor3 = themeList.Background |
560 | sectionHead.BackgroundColor3 = themeList.SchemeColor |
561 | tabButton.TextColor3 = themeList.TextColor |
562 | tabButton.BackgroundColor3 = themeList.SchemeColor |
563 | sectionName.TextColor3 = themeList.TextColor |
564 | end |
565 | end)() |
566 | |
567 | local function updateSectionFrame() |
568 | local innerSc = sectionElListing.AbsoluteContentSize |
569 | sectionInners.Size = UDim2.new(1, 0, 0, innerSc.Y) |
570 | local frameSc = sectionlistoknvm.AbsoluteContentSize |
571 | sectionFrame.Size = UDim2.new(0, 352, 0, frameSc.Y) |
572 | end |
573 | updateSectionFrame() |
574 | UpdateSize() |
575 | local Elements = {} |
576 | function Elements:NewButton(bname,tipINf, callback) |
577 | showLogo = showLogo or true |
578 | local ButtonFunction = {} |
579 | tipINf = tipINf or "Tip: Clicking this nothing will happen!" |
580 | bname = bname or "Click Me!" |
581 | callback = callback or function() end |
582 | |
583 | local buttonElement = Instance.new("TextButton") |
584 | local UICorner = Instance.new("UICorner") |
585 | local btnInfo = Instance.new("TextLabel") |
586 | local viewInfo = Instance.new("ImageButton") |
587 | local touch = Instance.new("ImageLabel") |
588 | local Sample = Instance.new("ImageLabel") |
589 | |
590 | table.insert(modules, bname) |
591 | |
592 | buttonElement.Name = bname |
593 | buttonElement.Parent = sectionInners |
594 | buttonElement.BackgroundColor3 = themeList.ElementColor |
595 | buttonElement.ClipsDescendants = true |
596 | buttonElement.Size = UDim2.new(0, 352, 0, 33) |
597 | buttonElement.AutoButtonColor = false |
598 | buttonElement.Font = Enum.Font.SourceSans |
599 | buttonElement.Text = "" |
600 | buttonElement.TextColor3 = Color3.fromRGB(0, 0, 0) |
601 | buttonElement.TextSize = 14.000 |
602 | Objects[buttonElement] = "BackgroundColor3" |
603 | |
604 | UICorner.CornerRadius = UDim.new(0, 4) |
605 | UICorner.Parent = buttonElement |
606 | |
607 | viewInfo.Name = "viewInfo" |
608 | viewInfo.Parent = buttonElement |
609 | viewInfo.BackgroundTransparency = 1.000 |
610 | viewInfo.LayoutOrder = 9 |
611 | viewInfo.Position = UDim2.new(0.930000007, 0, 0.151999995, 0) |
612 | viewInfo.Size = UDim2.new(0, 23, 0, 23) |
613 | viewInfo.ZIndex = 2 |
614 | viewInfo.Image = "rbxassetid://3926305904" |
615 | viewInfo.ImageColor3 = themeList.SchemeColor |
616 | Objects[viewInfo] = "ImageColor3" |
617 | viewInfo.ImageRectOffset = Vector2.new(764, 764) |
618 | viewInfo.ImageRectSize = Vector2.new(36, 36) |
619 | |
620 | Sample.Name = "Sample" |
621 | Sample.Parent = buttonElement |
622 | Sample.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
623 | Sample.BackgroundTransparency = 1.000 |
624 | Sample.Image = "http://www.roblox.com/asset/?id=4560909609" |
625 | Sample.ImageColor3 = themeList.SchemeColor |
626 | Objects[Sample] = "ImageColor3" |
627 | Sample.ImageTransparency = 0.600 |
628 | |
629 | local moreInfo = Instance.new("TextLabel") |
630 | local UICorner = Instance.new("UICorner") |
631 | |
632 | moreInfo.Name = "TipMore" |
633 | moreInfo.Parent = infoContainer |
634 | moreInfo.BackgroundColor3 = Color3.fromRGB(themeList.SchemeColor.r * 255 - 14, themeList.SchemeColor.g * 255 - 17, themeList.SchemeColor.b * 255 - 13) |
635 | moreInfo.Position = UDim2.new(0, 0, 2, 0) |
636 | moreInfo.Size = UDim2.new(0, 353, 0, 33) |
637 | moreInfo.ZIndex = 9 |
638 | moreInfo.Font = Enum.Font.GothamSemibold |
639 | moreInfo.Text = " "..tipINf |
640 | moreInfo.RichText = true |
641 | moreInfo.TextColor3 = themeList.TextColor |
642 | Objects[moreInfo] = "TextColor3" |
643 | moreInfo.TextSize = 14.000 |
644 | moreInfo.TextXAlignment = Enum.TextXAlignment.Left |
645 | Objects[moreInfo] = "BackgroundColor3" |
646 | |
647 | UICorner.CornerRadius = UDim.new(0, 4) |
648 | UICorner.Parent = moreInfo |
649 | |
650 | touch.Name = "touch" |
651 | touch.Parent = buttonElement |
652 | touch.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
653 | touch.BackgroundTransparency = 1.000 |
654 | touch.BorderColor3 = Color3.fromRGB(27, 42, 53) |
655 | touch.Position = UDim2.new(0.0199999996, 0, 0.180000007, 0) |
656 | touch.Size = UDim2.new(0, 21, 0, 21) |
657 | touch.Image = "rbxassetid://3926305904" |
658 | touch.ImageColor3 = themeList.SchemeColor |
659 | Objects[touch] = "SchemeColor" |
660 | touch.ImageRectOffset = Vector2.new(84, 204) |
661 | touch.ImageRectSize = Vector2.new(36, 36) |
662 | touch.ImageTransparency = 0 |
663 | |
664 | btnInfo.Name = "btnInfo" |
665 | btnInfo.Parent = buttonElement |
666 | btnInfo.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
667 | btnInfo.BackgroundTransparency = 1.000 |
668 | btnInfo.Position = UDim2.new(0.096704483, 0, 0.272727281, 0) |
669 | btnInfo.Size = UDim2.new(0, 314, 0, 14) |
670 | btnInfo.Font = Enum.Font.GothamSemibold |
671 | btnInfo.Text = bname |
672 | btnInfo.RichText = true |
673 | btnInfo.TextColor3 = themeList.TextColor |
674 | Objects[btnInfo] = "TextColor3" |
675 | btnInfo.TextSize = 14.000 |
676 | btnInfo.TextXAlignment = Enum.TextXAlignment.Left |
677 | |
678 | if themeList.SchemeColor == Color3.fromRGB(255,255,255) then |
679 | Utility:TweenObject(moreInfo, {TextColor3 = Color3.fromRGB(0,0,0)}, 0.2) |
680 | end |
681 | if themeList.SchemeColor == Color3.fromRGB(0,0,0) then |
682 | Utility:TweenObject(moreInfo, {TextColor3 = Color3.fromRGB(255,255,255)}, 0.2) |
683 | end |
684 | |
685 | updateSectionFrame() |
686 | UpdateSize() |
687 | |
688 | local ms = game.Players.LocalPlayer:GetMouse() |
689 | |
690 | local btn = buttonElement |
691 | local sample = Sample |
692 | |
693 | btn.MouseButton1Click:Connect(function() |
694 | if not focusing then |
695 | callback() |
696 | local c = sample:Clone() |
697 | c.Parent = btn |
698 | local x, y = (ms.X - c.AbsolutePosition.X), (ms.Y - c.AbsolutePosition.Y) |
699 | c.Position = UDim2.new(0, x, 0, y) |
700 | local len, size = 0.35, nil |
701 | if btn.AbsoluteSize.X >= btn.AbsoluteSize.Y then |
702 | size = (btn.AbsoluteSize.X * 1.5) |
703 | else |
704 | size = (btn.AbsoluteSize.Y * 1.5) |
705 | end |
706 | c:TweenSizeAndPosition(UDim2.new(0, size, 0, size), UDim2.new(0.5, (-size / 2), 0.5, (-size / 2)), 'Out', 'Quad', len, true, nil) |
707 | for i = 1, 10 do |
708 | c.ImageTransparency = c.ImageTransparency + 0.05 |
709 | wait(len / 12) |
710 | end |
711 | c:Destroy() |
712 | else |
713 | for i,v in next, infoContainer:GetChildren() do |
714 | Utility:TweenObject(v, {Position = UDim2.new(0,0,2,0)}, 0.2) |
715 | focusing = false |
716 | end |
717 | Utility:TweenObject(blurFrame, {BackgroundTransparency = 1}, 0.2) |
718 | end |
719 | end) |
720 | local hovering = false |
721 | btn.MouseEnter:Connect(function() |
722 | if not focusing then |
723 | game.TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), { |
724 | BackgroundColor3 = Color3.fromRGB(themeList.ElementColor.r * 255 + 8, themeList.ElementColor.g * 255 + 9, themeList.ElementColor.b * 255 + 10) |
725 | }):Play() |
726 | hovering = true |
727 | end |
728 | end) |
729 | btn.MouseLeave:Connect(function() |
730 | if not focusing then |
731 | game.TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), { |
732 | BackgroundColor3 = themeList.ElementColor |
733 | }):Play() |
734 | hovering = false |
735 | end |
736 | end) |
737 | viewInfo.MouseButton1Click:Connect(function() |
738 | if not viewDe then |
739 | viewDe = true |
740 | focusing = true |
741 | for i,v in next, infoContainer:GetChildren() do |
742 | if v ~= moreInfo then |
743 | Utility:TweenObject(v, {Position = UDim2.new(0,0,2,0)}, 0.2) |
744 | end |
745 | end |
746 | Utility:TweenObject(moreInfo, {Position = UDim2.new(0,0,0,0)}, 0.2) |
747 | Utility:TweenObject(blurFrame, {BackgroundTransparency = 0.5}, 0.2) |
748 | Utility:TweenObject(btn, {BackgroundColor3 = themeList.ElementColor}, 0.2) |
749 | wait(1.5) |
750 | focusing = false |
751 | Utility:TweenObject(moreInfo, {Position = UDim2.new(0,0,2,0)}, 0.2) |
752 | Utility:TweenObject(blurFrame, {BackgroundTransparency = 1}, 0.2) |
753 | wait(0) |
754 | viewDe = false |
755 | end |
756 | end) |
757 | coroutine.wrap(function() |
758 | while wait() do |
759 | if not hovering then |
760 | buttonElement.BackgroundColor3 = themeList.ElementColor |
761 | end |
762 | viewInfo.ImageColor3 = themeList.SchemeColor |
763 | Sample.ImageColor3 = themeList.SchemeColor |
764 | moreInfo.BackgroundColor3 = Color3.fromRGB(themeList.SchemeColor.r * 255 - 14, themeList.SchemeColor.g * 255 - 17, themeList.SchemeColor.b * 255 - 13) |
765 | moreInfo.TextColor3 = themeList.TextColor |
766 | touch.ImageColor3 = themeList.SchemeColor |
767 | btnInfo.TextColor3 = themeList.TextColor |
768 | end |
769 | end)() |
770 | |
771 | function ButtonFunction:UpdateButton(newTitle) |
772 | btnInfo.Text = newTitle |
773 | end |
774 | return ButtonFunction |
775 | end |
776 | |
777 | function Elements:NewTextBox(tname, tTip, callback) |
778 | tname = tname or "Textbox" |
779 | tTip = tTip or "Gets a value of Textbox" |
780 | callback = callback or function() end |
781 | local textboxElement = Instance.new("TextButton") |
782 | local UICorner = Instance.new("UICorner") |
783 | local viewInfo = Instance.new("ImageButton") |
784 | local write = Instance.new("ImageLabel") |
785 | local TextBox = Instance.new("TextBox") |
786 | local UICorner_2 = Instance.new("UICorner") |
787 | local togName = Instance.new("TextLabel") |
788 | |
789 | textboxElement.Name = "textboxElement" |
790 | textboxElement.Parent = sectionInners |
791 | textboxElement.BackgroundColor3 = themeList.ElementColor |
792 | textboxElement.ClipsDescendants = true |
793 | textboxElement.Size = UDim2.new(0, 352, 0, 33) |
794 | textboxElement.AutoButtonColor = false |
795 | textboxElement.Font = Enum.Font.SourceSans |
796 | textboxElement.Text = "" |
797 | textboxElement.TextColor3 = Color3.fromRGB(0, 0, 0) |
798 | textboxElement.TextSize = 14.000 |
799 | |
800 | UICorner.CornerRadius = UDim.new(0, 4) |
801 | UICorner.Parent = textboxElement |
802 | |
803 | viewInfo.Name = "viewInfo" |
804 | viewInfo.Parent = textboxElement |
805 | viewInfo.BackgroundTransparency = 1.000 |
806 | viewInfo.LayoutOrder = 9 |
807 | viewInfo.Position = UDim2.new(0.930000007, 0, 0.151999995, 0) |
808 | viewInfo.Size = UDim2.new(0, 23, 0, 23) |
809 | viewInfo.ZIndex = 2 |
810 | viewInfo.Image = "rbxassetid://3926305904" |
811 | viewInfo.ImageColor3 = themeList.SchemeColor |
812 | viewInfo.ImageRectOffset = Vector2.new(764, 764) |
813 | viewInfo.ImageRectSize = Vector2.new(36, 36) |
814 | |
815 | write.Name = "write" |
816 | write.Parent = textboxElement |
817 | write.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
818 | write.BackgroundTransparency = 1.000 |
819 | write.BorderColor3 = Color3.fromRGB(27, 42, 53) |
820 | write.Position = UDim2.new(0.0199999996, 0, 0.180000007, 0) |
821 | write.Size = UDim2.new(0, 21, 0, 21) |
822 | write.Image = "rbxassetid://3926305904" |
823 | write.ImageColor3 = themeList.SchemeColor |
824 | write.ImageRectOffset = Vector2.new(324, 604) |
825 | write.ImageRectSize = Vector2.new(36, 36) |
826 | |
827 | TextBox.Parent = textboxElement |
828 | TextBox.BackgroundColor3 = Color3.fromRGB(themeList.ElementColor.r * 255 - 6, themeList.ElementColor.g * 255 - 6, themeList.ElementColor.b * 255 - 7) |
829 | TextBox.BorderSizePixel = 0 |
830 | TextBox.ClipsDescendants = true |
831 | TextBox.Position = UDim2.new(0.488749921, 0, 0.212121218, 0) |
832 | TextBox.Size = UDim2.new(0, 150, 0, 18) |
833 | TextBox.ZIndex = 99 |
834 | TextBox.ClearTextOnFocus = false |
835 | TextBox.Font = Enum.Font.Gotham |
836 | TextBox.PlaceholderColor3 = Color3.fromRGB(themeList.SchemeColor.r * 255 - 19, themeList.SchemeColor.g * 255 - 26, themeList.SchemeColor.b * 255 - 35) |
837 | TextBox.PlaceholderText = "Type here!" |
838 | TextBox.Text = "" |
839 | TextBox.TextColor3 = themeList.SchemeColor |
840 | TextBox.TextSize = 12.000 |
841 | |
842 | UICorner_2.CornerRadius = UDim.new(0, 4) |
843 | UICorner_2.Parent = TextBox |
844 | |
845 | togName.Name = "togName" |
846 | togName.Parent = textboxElement |
847 | togName.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
848 | togName.BackgroundTransparency = 1.000 |
849 | togName.Position = UDim2.new(0.096704483, 0, 0.272727281, 0) |
850 | togName.Size = UDim2.new(0, 138, 0, 14) |
851 | togName.Font = Enum.Font.GothamSemibold |
852 | togName.Text = tname |
853 | togName.RichText = true |
854 | togName.TextColor3 = themeList.TextColor |
855 | togName.TextSize = 14.000 |
856 | togName.TextXAlignment = Enum.TextXAlignment.Left |
857 | |
858 | local moreInfo = Instance.new("TextLabel") |
859 | local UICorner = Instance.new("UICorner") |
860 | |
861 | moreInfo.Name = "TipMore" |
862 | moreInfo.Parent = infoContainer |
863 | moreInfo.BackgroundColor3 = Color3.fromRGB(themeList.SchemeColor.r * 255 - 14, themeList.SchemeColor.g * 255 - 17, themeList.SchemeColor.b * 255 - 13) |
864 | moreInfo.Position = UDim2.new(0, 0, 2, 0) |
865 | moreInfo.Size = UDim2.new(0, 353, 0, 33) |
866 | moreInfo.ZIndex = 9 |
867 | moreInfo.Font = Enum.Font.GothamSemibold |
868 | moreInfo.RichText = true |
869 | moreInfo.Text = " "..tTip |
870 | moreInfo.TextColor3 = Color3.fromRGB(255, 255, 255) |
871 | moreInfo.TextSize = 14.000 |
872 | moreInfo.TextXAlignment = Enum.TextXAlignment.Left |
873 | |
874 | if themeList.SchemeColor == Color3.fromRGB(255,255,255) then |
875 | Utility:TweenObject(moreInfo, {TextColor3 = Color3.fromRGB(0,0,0)}, 0.2) |
876 | end |
877 | if themeList.SchemeColor == Color3.fromRGB(0,0,0) then |
878 | Utility:TweenObject(moreInfo, {TextColor3 = Color3.fromRGB(255,255,255)}, 0.2) |
879 | end |
880 | |
881 | UICorner.CornerRadius = UDim.new(0, 4) |
882 | UICorner.Parent = moreInfo |
883 | |
884 | |
885 | updateSectionFrame() |
886 | UpdateSize() |
887 | |
888 | local btn = textboxElement |
889 | local infBtn = viewInfo |
890 | |
891 | btn.MouseButton1Click:Connect(function() |
892 | if focusing then |
893 | for i,v in next, infoContainer:GetChildren() do |
894 | Utility:TweenObject(v, {Position = UDim2.new(0,0,2,0)}, 0.2) |
895 | focusing = false |
896 | end |
897 | Utility:TweenObject(blurFrame, {BackgroundTransparency = 1}, 0.2) |
898 | end |
899 | end) |
900 | local hovering = false |
901 | btn.MouseEnter:Connect(function() |
902 | if not focusing then |
903 | game.TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), { |
904 | BackgroundColor3 = Color3.fromRGB(themeList.ElementColor.r * 255 + 8, themeList.ElementColor.g * 255 + 9, themeList.ElementColor.b * 255 + 10) |
905 | }):Play() |
906 | hovering = true |
907 | end |
908 | end) |
909 | |
910 | btn.MouseLeave:Connect(function() |
911 | if not focusing then |
912 | game.TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), { |
913 | BackgroundColor3 = themeList.ElementColor |
914 | }):Play() |
915 | hovering = false |
916 | end |
917 | end) |
918 | |
919 | TextBox.FocusLost:Connect(function(EnterPressed) |
920 | if focusing then |
921 | for i,v in next, infoContainer:GetChildren() do |
922 | Utility:TweenObject(v, {Position = UDim2.new(0,0,2,0)}, 0.2) |
923 | focusing = false |
924 | end |
925 | Utility:TweenObject(blurFrame, {BackgroundTransparency = 1}, 0.2) |
926 | end |
927 | if not EnterPressed then |
928 | return |
929 | else |
930 | callback(TextBox.Text) |
931 | wait(0.18) |
932 | TextBox.Text = "" |
933 | end |
934 | end) |
935 | |
936 | viewInfo.MouseButton1Click:Connect(function() |
937 | if not viewDe then |
938 | viewDe = true |
939 | focusing = true |
940 | for i,v in next, infoContainer:GetChildren() do |
941 | if v ~= moreInfo then |
942 | Utility:TweenObject(v, {Position = UDim2.new(0,0,2,0)}, 0.2) |
943 | end |
944 | end |
945 | Utility:TweenObject(moreInfo, {Position = UDim2.new(0,0,0,0)}, 0.2) |
946 | Utility:TweenObject(blurFrame, {BackgroundTransparency = 0.5}, 0.2) |
947 | Utility:TweenObject(btn, {BackgroundColor3 = themeList.ElementColor}, 0.2) |
948 | wait(1.5) |
949 | focusing = false |
950 | Utility:TweenObject(moreInfo, {Position = UDim2.new(0,0,2,0)}, 0.2) |
951 | Utility:TweenObject(blurFrame, {BackgroundTransparency = 1}, 0.2) |
952 | wait(0) |
953 | viewDe = false |
954 | end |
955 | end) |
956 | coroutine.wrap(function() |
957 | while wait() do |
958 | if not hovering then |
959 | textboxElement.BackgroundColor3 = themeList.ElementColor |
960 | end |
961 | TextBox.BackgroundColor3 = Color3.fromRGB(themeList.ElementColor.r * 255 - 6, themeList.ElementColor.g * 255 - 6, themeList.ElementColor.b * 255 - 7) |
962 | viewInfo.ImageColor3 = themeList.SchemeColor |
963 | moreInfo.BackgroundColor3 = Color3.fromRGB(themeList.SchemeColor.r * 255 - 14, themeList.SchemeColor.g * 255 - 17, themeList.SchemeColor.b * 255 - 13) |
964 | moreInfo.TextColor3 = themeList.TextColor |
965 | write.ImageColor3 = themeList.SchemeColor |
966 | togName.TextColor3 = themeList.TextColor |
967 | TextBox.PlaceholderColor3 = Color3.fromRGB(themeList.SchemeColor.r * 255 - 19, themeList.SchemeColor.g * 255 - 26, themeList.SchemeColor.b * 255 - 35) |
968 | TextBox.TextColor3 = themeList.SchemeColor |
969 | end |
970 | end)() |
971 | end |
972 | |
973 | function Elements:NewToggle(tname, nTip, callback) |
974 | local TogFunction = {} |
975 | tname = tname or "Toggle" |
976 | nTip = nTip or "Prints Current Toggle State" |
977 | callback = callback or function() end |
978 | local toggled = false |
979 | table.insert(SettingsT, tname) |
980 | |
981 | local toggleElement = Instance.new("TextButton") |
982 | local UICorner = Instance.new("UICorner") |
983 | local toggleDisabled = Instance.new("ImageLabel") |
984 | local toggleEnabled = Instance.new("ImageLabel") |
985 | local togName = Instance.new("TextLabel") |
986 | local viewInfo = Instance.new("ImageButton") |
987 | local Sample = Instance.new("ImageLabel") |
988 | |
989 | toggleElement.Name = "toggleElement" |
990 | toggleElement.Parent = sectionInners |
991 | toggleElement.BackgroundColor3 = themeList.ElementColor |
992 | toggleElement.ClipsDescendants = true |
993 | toggleElement.Size = UDim2.new(0, 352, 0, 33) |
994 | toggleElement.AutoButtonColor = false |
995 | toggleElement.Font = Enum.Font.SourceSans |
996 | toggleElement.Text = "" |
997 | toggleElement.TextColor3 = Color3.fromRGB(0, 0, 0) |
998 | toggleElement.TextSize = 14.000 |
999 | |
1000 | UICorner.CornerRadius = UDim.new(0, 4) |
1001 | UICorner.Parent = toggleElement |
1002 | |
1003 | toggleDisabled.Name = "toggleDisabled" |
1004 | toggleDisabled.Parent = toggleElement |
1005 | toggleDisabled.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
1006 | toggleDisabled.BackgroundTransparency = 1.000 |
1007 | toggleDisabled.Position = UDim2.new(0.0199999996, 0, 0.180000007, 0) |
1008 | toggleDisabled.Size = UDim2.new(0, 21, 0, 21) |
1009 | toggleDisabled.Image = "rbxassetid://3926309567" |
1010 | toggleDisabled.ImageColor3 = themeList.SchemeColor |
1011 | toggleDisabled.ImageRectOffset = Vector2.new(628, 420) |
1012 | toggleDisabled.ImageRectSize = Vector2.new(48, 48) |
1013 | |
1014 | toggleEnabled.Name = "toggleEnabled" |
1015 | toggleEnabled.Parent = toggleElement |
1016 | toggleEnabled.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
1017 | toggleEnabled.BackgroundTransparency = 1.000 |
1018 | toggleEnabled.Position = UDim2.new(0.0199999996, 0, 0.180000007, 0) |
1019 | toggleEnabled.Size = UDim2.new(0, 21, 0, 21) |
1020 | toggleEnabled.Image = "rbxassetid://3926309567" |
1021 | toggleEnabled.ImageColor3 = themeList.SchemeColor |
1022 | toggleEnabled.ImageRectOffset = Vector2.new(784, 420) |
1023 | toggleEnabled.ImageRectSize = Vector2.new(48, 48) |
1024 | toggleEnabled.ImageTransparency = 1.000 |
1025 | |
1026 | togName.Name = "togName" |
1027 | togName.Parent = toggleElement |
1028 | togName.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
1029 | togName.BackgroundTransparency = 1.000 |
1030 | togName.Position = UDim2.new(0.096704483, 0, 0.272727281, 0) |
1031 | togName.Size = UDim2.new(0, 288, 0, 14) |
1032 | togName.Font = Enum.Font.GothamSemibold |
1033 | togName.Text = tname |
1034 | togName.RichText = true |
1035 | togName.TextColor3 = themeList.TextColor |
1036 | togName.TextSize = 14.000 |
1037 | togName.TextXAlignment = Enum.TextXAlignment.Left |
1038 | |
1039 | viewInfo.Name = "viewInfo" |
1040 | viewInfo.Parent = toggleElement |
1041 | viewInfo.BackgroundTransparency = 1.000 |
1042 | viewInfo.LayoutOrder = 9 |
1043 | viewInfo.Position = UDim2.new(0.930000007, 0, 0.151999995, 0) |
1044 | viewInfo.Size = UDim2.new(0, 23, 0, 23) |
1045 | viewInfo.ZIndex = 2 |
1046 | viewInfo.Image = "rbxassetid://3926305904" |
1047 | viewInfo.ImageColor3 = themeList.SchemeColor |
1048 | viewInfo.ImageRectOffset = Vector2.new(764, 764) |
1049 | viewInfo.ImageRectSize = Vector2.new(36, 36) |
1050 | |
1051 | Sample.Name = "Sample" |
1052 | Sample.Parent = toggleElement |
1053 | Sample.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
1054 | Sample.BackgroundTransparency = 1.000 |
1055 | Sample.Image = "http://www.roblox.com/asset/?id=4560909609" |
1056 | Sample.ImageColor3 = themeList.SchemeColor |
1057 | Sample.ImageTransparency = 0.600 |
1058 | |
1059 | local moreInfo = Instance.new("TextLabel") |
1060 | local UICorner = Instance.new("UICorner") |
1061 | |
1062 | moreInfo.Name = "TipMore" |
1063 | moreInfo.Parent = infoContainer |
1064 | moreInfo.BackgroundColor3 = Color3.fromRGB(themeList.SchemeColor.r * 255 - 14, themeList.SchemeColor.g * 255 - 17, themeList.SchemeColor.b * 255 - 13) |
1065 | moreInfo.Position = UDim2.new(0, 0, 2, 0) |
1066 | moreInfo.Size = UDim2.new(0, 353, 0, 33) |
1067 | moreInfo.ZIndex = 9 |
1068 | moreInfo.Font = Enum.Font.GothamSemibold |
1069 | moreInfo.RichText = true |
1070 | moreInfo.Text = " "..nTip |
1071 | moreInfo.TextColor3 = themeList.TextColor |
1072 | moreInfo.TextSize = 14.000 |
1073 | moreInfo.TextXAlignment = Enum.TextXAlignment.Left |
1074 | |
1075 | UICorner.CornerRadius = UDim.new(0, 4) |
1076 | UICorner.Parent = moreInfo |
1077 | |
1078 | local ms = game.Players.LocalPlayer:GetMouse() |
1079 | |
1080 | if themeList.SchemeColor == Color3.fromRGB(255,255,255) then |
1081 | Utility:TweenObject(moreInfo, {TextColor3 = Color3.fromRGB(0,0,0)}, 0.2) |
1082 | end |
1083 | if themeList.SchemeColor == Color3.fromRGB(0,0,0) then |
1084 | Utility:TweenObject(moreInfo, {TextColor3 = Color3.fromRGB(255,255,255)}, 0.2) |
1085 | end |
1086 | |
1087 | local btn = toggleElement |
1088 | local sample = Sample |
1089 | local img = toggleEnabled |
1090 | local infBtn = viewInfo |
1091 | |
1092 | updateSectionFrame() |
1093 | UpdateSize() |
1094 | |
1095 | btn.MouseButton1Click:Connect(function() |
1096 | if not focusing then |
1097 | if toggled == false then |
1098 | game.TweenService:Create(img, TweenInfo.new(0.11, Enum.EasingStyle.Linear,Enum.EasingDirection.In), { |
1099 | ImageTransparency = 0 |
1100 | }):Play() |
1101 | local c = sample:Clone() |
1102 | c.Parent = btn |
1103 | local x, y = (ms.X - c.AbsolutePosition.X), (ms.Y - c.AbsolutePosition.Y) |
1104 | c.Position = UDim2.new(0, x, 0, y) |
1105 | local len, size = 0.35, nil |
1106 | if btn.AbsoluteSize.X >= btn.AbsoluteSize.Y then |
1107 | size = (btn.AbsoluteSize.X * 1.5) |
1108 | else |
1109 | size = (btn.AbsoluteSize.Y * 1.5) |
1110 | end |
1111 | c:TweenSizeAndPosition(UDim2.new(0, size, 0, size), UDim2.new(0.5, (-size / 2), 0.5, (-size / 2)), 'Out', 'Quad', len, true, nil) |
1112 | for i = 1, 10 do |
1113 | c.ImageTransparency = c.ImageTransparency + 0.05 |
1114 | wait(len / 12) |
1115 | end |
1116 | c:Destroy() |
1117 | else |
1118 | game.TweenService:Create(img, TweenInfo.new(0.11, Enum.EasingStyle.Linear,Enum.EasingDirection.In), { |
1119 | ImageTransparency = 1 |
1120 | }):Play() |
1121 | local c = sample:Clone() |
1122 | c.Parent = btn |
1123 | local x, y = (ms.X - c.AbsolutePosition.X), (ms.Y - c.AbsolutePosition.Y) |
1124 | c.Position = UDim2.new(0, x, 0, y) |
1125 | local len, size = 0.35, nil |
1126 | if btn.AbsoluteSize.X >= btn.AbsoluteSize.Y then |
1127 | size = (btn.AbsoluteSize.X * 1.5) |
1128 | else |
1129 | size = (btn.AbsoluteSize.Y * 1.5) |
1130 | end |
1131 | c:TweenSizeAndPosition(UDim2.new(0, size, 0, size), UDim2.new(0.5, (-size / 2), 0.5, (-size / 2)), 'Out', 'Quad', len, true, nil) |
1132 | for i = 1, 10 do |
1133 | c.ImageTransparency = c.ImageTransparency + 0.05 |
1134 | wait(len / 12) |
1135 | end |
1136 | c:Destroy() |
1137 | end |
1138 | toggled = not toggled |
1139 | pcall(callback, toggled) |
1140 | else |
1141 | for i,v in next, infoContainer:GetChildren() do |
1142 | Utility:TweenObject(v, {Position = UDim2.new(0,0,2,0)}, 0.2) |
1143 | focusing = false |
1144 | end |
1145 | Utility:TweenObject(blurFrame, {BackgroundTransparency = 1}, 0.2) |
1146 | end |
1147 | end) |
1148 | local hovering = false |
1149 | btn.MouseEnter:Connect(function() |
1150 | if not focusing then |
1151 | game.TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), { |
1152 | BackgroundColor3 = Color3.fromRGB(themeList.ElementColor.r * 255 + 8, themeList.ElementColor.g * 255 + 9, themeList.ElementColor.b * 255 + 10) |
1153 | }):Play() |
1154 | hovering = true |
1155 | end |
1156 | end) |
1157 | btn.MouseLeave:Connect(function() |
1158 | if not focusing then |
1159 | game.TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), { |
1160 | BackgroundColor3 = themeList.ElementColor |
1161 | }):Play() |
1162 | hovering = false |
1163 | end |
1164 | end) |
1165 | |
1166 | coroutine.wrap(function() |
1167 | while wait() do |
1168 | if not hovering then |
1169 | toggleElement.BackgroundColor3 = themeList.ElementColor |
1170 | end |
1171 | toggleDisabled.ImageColor3 = themeList.SchemeColor |
1172 | toggleEnabled.ImageColor3 = themeList.SchemeColor |
1173 | togName.TextColor3 = themeList.TextColor |
1174 | viewInfo.ImageColor3 = themeList.SchemeColor |
1175 | Sample.ImageColor3 = themeList.SchemeColor |
1176 | moreInfo.BackgroundColor3 = Color3.fromRGB(themeList.SchemeColor.r * 255 - 14, themeList.SchemeColor.g * 255 - 17, themeList.SchemeColor.b * 255 - 13) |
1177 | moreInfo.TextColor3 = themeList.TextColor |
1178 | end |
1179 | end)() |
1180 | viewInfo.MouseButton1Click:Connect(function() |
1181 | if not viewDe then |
1182 | viewDe = true |
1183 | focusing = true |
1184 | for i,v in next, infoContainer:GetChildren() do |
1185 | if v ~= moreInfo then |
1186 | Utility:TweenObject(v, {Position = UDim2.new(0,0,2,0)}, 0.2) |
1187 | end |
1188 | end |
1189 | Utility:TweenObject(moreInfo, {Position = UDim2.new(0,0,0,0)}, 0.2) |
1190 | Utility:TweenObject(blurFrame, {BackgroundTransparency = 0.5}, 0.2) |
1191 | Utility:TweenObject(btn, {BackgroundColor3 = themeList.ElementColor}, 0.2) |
1192 | wait(1.5) |
1193 | focusing = false |
1194 | Utility:TweenObject(moreInfo, {Position = UDim2.new(0,0,2,0)}, 0.2) |
1195 | Utility:TweenObject(blurFrame, {BackgroundTransparency = 1}, 0.2) |
1196 | wait(0) |
1197 | viewDe = false |
1198 | end |
1199 | end) |
1200 | function TogFunction:UpdateToggle(newText, isTogOn) |
1201 | isTogOn = isTogOn or toggle |
1202 | if newText ~= nil then |
1203 | togName.Text = newText |
1204 | end |
1205 | if isTogOn then |
1206 | toggled = true |
1207 | game.TweenService:Create(img, TweenInfo.new(0.11, Enum.EasingStyle.Linear,Enum.EasingDirection.In), { |
1208 | ImageTransparency = 0 |
1209 | }):Play() |
1210 | pcall(callback, toggled) |
1211 | else |
1212 | toggled = false |
1213 | game.TweenService:Create(img, TweenInfo.new(0.11, Enum.EasingStyle.Linear,Enum.EasingDirection.In), { |
1214 | ImageTransparency = 1 |
1215 | }):Play() |
1216 | pcall(callback, toggled) |
1217 | end |
1218 | end |
1219 | return TogFunction |
1220 | end |
1221 | |
1222 | function Elements:NewSlider(slidInf, slidTip, maxvalue, minvalue, callback) |
1223 | slidInf = slidInf or "Slider" |
1224 | slidTip = slidTip or "Slider tip here" |
1225 | maxvalue = maxvalue or 500 |
1226 | minvalue = minvalue or 16 |
1227 | startVal = startVal or 0 |
1228 | callback = callback or function() end |
1229 | |
1230 | local sliderElement = Instance.new("TextButton") |
1231 | local UICorner = Instance.new("UICorner") |
1232 | local togName = Instance.new("TextLabel") |
1233 | local viewInfo = Instance.new("ImageButton") |
1234 | local sliderBtn = Instance.new("TextButton") |
1235 | local UICorner_2 = Instance.new("UICorner") |
1236 | local UIListLayout = Instance.new("UIListLayout") |
1237 | local sliderDrag = Instance.new("Frame") |
1238 | local UICorner_3 = Instance.new("UICorner") |
1239 | local write = Instance.new("ImageLabel") |
1240 | local val = Instance.new("TextLabel") |
1241 | |
1242 | sliderElement.Name = "sliderElement" |
1243 | sliderElement.Parent = sectionInners |
1244 | sliderElement.BackgroundColor3 = themeList.ElementColor |
1245 | sliderElement.ClipsDescendants = true |
1246 | sliderElement.Size = UDim2.new(0, 352, 0, 33) |
1247 | sliderElement.AutoButtonColor = false |
1248 | sliderElement.Font = Enum.Font.SourceSans |
1249 | sliderElement.Text = "" |
1250 | sliderElement.TextColor3 = Color3.fromRGB(0, 0, 0) |
1251 | sliderElement.TextSize = 14.000 |
1252 | |
1253 | UICorner.CornerRadius = UDim.new(0, 4) |
1254 | UICorner.Parent = sliderElement |
1255 | |
1256 | togName.Name = "togName" |
1257 | togName.Parent = sliderElement |
1258 | togName.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
1259 | togName.BackgroundTransparency = 1.000 |
1260 | togName.Position = UDim2.new(0.096704483, 0, 0.272727281, 0) |
1261 | togName.Size = UDim2.new(0, 138, 0, 14) |
1262 | togName.Font = Enum.Font.GothamSemibold |
1263 | togName.Text = slidInf |
1264 | togName.RichText = true |
1265 | togName.TextColor3 = themeList.TextColor |
1266 | togName.TextSize = 14.000 |
1267 | togName.TextXAlignment = Enum.TextXAlignment.Left |
1268 | |
1269 | viewInfo.Name = "viewInfo" |
1270 | viewInfo.Parent = sliderElement |
1271 | viewInfo.BackgroundTransparency = 1.000 |
1272 | viewInfo.LayoutOrder = 9 |
1273 | viewInfo.Position = UDim2.new(0.930000007, 0, 0.151999995, 0) |
1274 | viewInfo.Size = UDim2.new(0, 23, 0, 23) |
1275 | viewInfo.ZIndex = 2 |
1276 | viewInfo.Image = "rbxassetid://3926305904" |
1277 | viewInfo.ImageColor3 = themeList.SchemeColor |
1278 | viewInfo.ImageRectOffset = Vector2.new(764, 764) |
1279 | viewInfo.ImageRectSize = Vector2.new(36, 36) |
1280 | |
1281 | sliderBtn.Name = "sliderBtn" |
1282 | sliderBtn.Parent = sliderElement |
1283 | sliderBtn.BackgroundColor3 = Color3.fromRGB(themeList.ElementColor.r * 255 + 5, themeList.ElementColor.g * 255 + 5, themeList.ElementColor.b * 255 + 5) |
1284 | sliderBtn.BorderSizePixel = 0 |
1285 | sliderBtn.Position = UDim2.new(0.488749951, 0, 0.393939406, 0) |
1286 | sliderBtn.Size = UDim2.new(0, 149, 0, 6) |
1287 | sliderBtn.AutoButtonColor = false |
1288 | sliderBtn.Font = Enum.Font.SourceSans |
1289 | sliderBtn.Text = "" |
1290 | sliderBtn.TextColor3 = Color3.fromRGB(0, 0, 0) |
1291 | sliderBtn.TextSize = 14.000 |
1292 | |
1293 | UICorner_2.Parent = sliderBtn |
1294 | |
1295 | UIListLayout.Parent = sliderBtn |
1296 | UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder |
1297 | UIListLayout.VerticalAlignment = Enum.VerticalAlignment.Center |
1298 | |
1299 | sliderDrag.Name = "sliderDrag" |
1300 | sliderDrag.Parent = sliderBtn |
1301 | sliderDrag.BackgroundColor3 = themeList.SchemeColor |
1302 | sliderDrag.BorderColor3 = Color3.fromRGB(74, 99, 135) |
1303 | sliderDrag.BorderSizePixel = 0 |
1304 | sliderDrag.Size = UDim2.new(-0.671140969, 100,1,0) |
1305 | |
1306 | UICorner_3.Parent = sliderDrag |
1307 | |
1308 | write.Name = "write" |
1309 | write.Parent = sliderElement |
1310 | write.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
1311 | write.BackgroundTransparency = 1.000 |
1312 | write.BorderColor3 = Color3.fromRGB(27, 42, 53) |
1313 | write.Position = UDim2.new(0.0199999996, 0, 0.180000007, 0) |
1314 | write.Size = UDim2.new(0, 21, 0, 21) |
1315 | write.Image = "rbxassetid://3926307971" |
1316 | write.ImageColor3 = themeList.SchemeColor |
1317 | write.ImageRectOffset = Vector2.new(404, 164) |
1318 | write.ImageRectSize = Vector2.new(36, 36) |
1319 | |
1320 | val.Name = "val" |
1321 | val.Parent = sliderElement |
1322 | val.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
1323 | val.BackgroundTransparency = 1.000 |
1324 | val.Position = UDim2.new(0.352386296, 0, 0.272727281, 0) |
1325 | val.Size = UDim2.new(0, 41, 0, 14) |
1326 | val.Font = Enum.Font.GothamSemibold |
1327 | val.Text = minvalue |
1328 | val.TextColor3 = themeList.TextColor |
1329 | val.TextSize = 14.000 |
1330 | val.TextTransparency = 1.000 |
1331 | val.TextXAlignment = Enum.TextXAlignment.Right |
1332 | |
1333 | local moreInfo = Instance.new("TextLabel") |
1334 | local UICorner = Instance.new("UICorner") |
1335 | |
1336 | moreInfo.Name = "TipMore" |
1337 | moreInfo.Parent = infoContainer |
1338 | moreInfo.BackgroundColor3 = Color3.fromRGB(themeList.SchemeColor.r * 255 - 14, themeList.SchemeColor.g * 255 - 17, themeList.SchemeColor.b * 255 - 13) |
1339 | moreInfo.Position = UDim2.new(0, 0, 2, 0) |
1340 | moreInfo.Size = UDim2.new(0, 353, 0, 33) |
1341 | moreInfo.ZIndex = 9 |
1342 | moreInfo.Font = Enum.Font.GothamSemibold |
1343 | moreInfo.Text = " "..slidTip |
1344 | moreInfo.TextColor3 = themeList.TextColor |
1345 | moreInfo.TextSize = 14.000 |
1346 | moreInfo.RichText = true |
1347 | moreInfo.TextXAlignment = Enum.TextXAlignment.Left |
1348 | |
1349 | UICorner.CornerRadius = UDim.new(0, 4) |
1350 | UICorner.Parent = moreInfo |
1351 | |
1352 | if themeList.SchemeColor == Color3.fromRGB(255,255,255) then |
1353 | Utility:TweenObject(moreInfo, {TextColor3 = Color3.fromRGB(0,0,0)}, 0.2) |
1354 | end |
1355 | if themeList.SchemeColor == Color3.fromRGB(0,0,0) then |
1356 | Utility:TweenObject(moreInfo, {TextColor3 = Color3.fromRGB(255,255,255)}, 0.2) |
1357 | end |
1358 | |
1359 | |
1360 | updateSectionFrame() |
1361 | UpdateSize() |
1362 | local mouse = game:GetService("Players").LocalPlayer:GetMouse(); |
1363 | |
1364 | local ms = game.Players.LocalPlayer:GetMouse() |
1365 | local uis = game:GetService("UserInputService") |
1366 | local btn = sliderElement |
1367 | local infBtn = viewInfo |
1368 | local hovering = false |
1369 | btn.MouseEnter:Connect(function() |
1370 | if not focusing then |
1371 | game.TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), { |
1372 | BackgroundColor3 = Color3.fromRGB(themeList.ElementColor.r * 255 + 8, themeList.ElementColor.g * 255 + 9, themeList.ElementColor.b * 255 + 10) |
1373 | }):Play() |
1374 | hovering = true |
1375 | end |
1376 | end) |
1377 | btn.MouseLeave:Connect(function() |
1378 | if not focusing then |
1379 | game.TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), { |
1380 | BackgroundColor3 = themeList.ElementColor |
1381 | }):Play() |
1382 | hovering = false |
1383 | end |
1384 | end) |
1385 | |
1386 | coroutine.wrap(function() |
1387 | while wait() do |
1388 | if not hovering then |
1389 | sliderElement.BackgroundColor3 = themeList.ElementColor |
1390 | end |
1391 | moreInfo.TextColor3 = themeList.TextColor |
1392 | moreInfo.BackgroundColor3 = Color3.fromRGB(themeList.SchemeColor.r * 255 - 14, themeList.SchemeColor.g * 255 - 17, themeList.SchemeColor.b * 255 - 13) |
1393 | val.TextColor3 = themeList.TextColor |
1394 | write.ImageColor3 = themeList.SchemeColor |
1395 | togName.TextColor3 = themeList.TextColor |
1396 | viewInfo.ImageColor3 = themeList.SchemeColor |
1397 | sliderBtn.BackgroundColor3 = Color3.fromRGB(themeList.ElementColor.r * 255 + 5, themeList.ElementColor.g * 255 + 5, themeList.ElementColor.b * 255 + 5) |
1398 | sliderDrag.BackgroundColor3 = themeList.SchemeColor |
1399 | end |
1400 | end)() |
1401 | |
1402 | local Value |
1403 | sliderBtn.MouseButton1Down:Connect(function() |
1404 | if not focusing then |
1405 | game.TweenService:Create(val, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), { |
1406 | TextTransparency = 0 |
1407 | }):Play() |
1408 | Value = math.floor((((tonumber(maxvalue) - tonumber(minvalue)) / 149) * sliderDrag.AbsoluteSize.X) + tonumber(minvalue)) or 0 |
1409 | pcall(function() |
1410 | callback(Value) |
1411 | end) |
1412 | sliderDrag:TweenSize(UDim2.new(0, math.clamp(mouse.X - sliderDrag.AbsolutePosition.X, 0, 149), 0, 6), "InOut", "Linear", 0.05, true) |
1413 | moveconnection = mouse.Move:Connect(function() |
1414 | val.Text = Value |
1415 | Value = math.floor((((tonumber(maxvalue) - tonumber(minvalue)) / 149) * sliderDrag.AbsoluteSize.X) + tonumber(minvalue)) |
1416 | pcall(function() |
1417 | callback(Value) |
1418 | end) |
1419 | sliderDrag:TweenSize(UDim2.new(0, math.clamp(mouse.X - sliderDrag.AbsolutePosition.X, 0, 149), 0, 6), "InOut", "Linear", 0.05, true) |
1420 | end) |
1421 | releaseconnection = uis.InputEnded:Connect(function(Mouse) |
1422 | if Mouse.UserInputType == Enum.UserInputType.MouseButton1 then |
1423 | Value = math.floor((((tonumber(maxvalue) - tonumber(minvalue)) / 149) * sliderDrag.AbsoluteSize.X) + tonumber(minvalue)) |
1424 | pcall(function() |
1425 | callback(Value) |
1426 | end) |
1427 | val.Text = Value |
1428 | game.TweenService:Create(val, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), { |
1429 | TextTransparency = 1 |
1430 | }):Play() |
1431 | sliderDrag:TweenSize(UDim2.new(0, math.clamp(mouse.X - sliderDrag.AbsolutePosition.X, 0, 149), 0, 6), "InOut", "Linear", 0.05, true) |
1432 | moveconnection:Disconnect() |
1433 | releaseconnection:Disconnect() |
1434 | end |
1435 | end) |
1436 | else |
1437 | for i,v in next, infoContainer:GetChildren() do |
1438 | Utility:TweenObject(v, {Position = UDim2.new(0,0,2,0)}, 0.2) |
1439 | focusing = false |
1440 | end |
1441 | Utility:TweenObject(blurFrame, {BackgroundTransparency = 1}, 0.2) |
1442 | end |
1443 | end) |
1444 | viewInfo.MouseButton1Click:Connect(function() |
1445 | if not viewDe then |
1446 | viewDe = true |
1447 | focusing = true |
1448 | for i,v in next, infoContainer:GetChildren() do |
1449 | if v ~= moreInfo then |
1450 | Utility:TweenObject(v, {Position = UDim2.new(0,0,2,0)}, 0.2) |
1451 | end |
1452 | end |
1453 | Utility:TweenObject(moreInfo, {Position = UDim2.new(0,0,0,0)}, 0.2) |
1454 | Utility:TweenObject(blurFrame, {BackgroundTransparency = 0.5}, 0.2) |
1455 | Utility:TweenObject(btn, {BackgroundColor3 = themeList.ElementColor}, 0.2) |
1456 | wait(1.5) |
1457 | focusing = false |
1458 | Utility:TweenObject(moreInfo, {Position = UDim2.new(0,0,2,0)}, 0.2) |
1459 | Utility:TweenObject(blurFrame, {BackgroundTransparency = 1}, 0.2) |
1460 | wait(0) |
1461 | viewDe = false |
1462 | end |
1463 | end) |
1464 | end |
1465 | |
1466 | function Elements:NewDropdown(dropname, dropinf, list, callback) |
1467 | local DropFunction = {} |
1468 | dropname = dropname or "Dropdown" |
1469 | list = list or {} |
1470 | dropinf = dropinf or "Dropdown info" |
1471 | callback = callback or function() end |
1472 | |
1473 | local opened = false |
1474 | local DropYSize = 33 |
1475 | |
1476 | |
1477 | local dropFrame = Instance.new("Frame") |
1478 | local dropOpen = Instance.new("TextButton") |
1479 | local listImg = Instance.new("ImageLabel") |
1480 | local itemTextbox = Instance.new("TextLabel") |
1481 | local viewInfo = Instance.new("ImageButton") |
1482 | local UICorner = Instance.new("UICorner") |
1483 | local UIListLayout = Instance.new("UIListLayout") |
1484 | local Sample = Instance.new("ImageLabel") |
1485 | |
1486 | local ms = game.Players.LocalPlayer:GetMouse() |
1487 | Sample.Name = "Sample" |
1488 | Sample.Parent = dropOpen |
1489 | Sample.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
1490 | Sample.BackgroundTransparency = 1.000 |
1491 | Sample.Image = "http://www.roblox.com/asset/?id=4560909609" |
1492 | Sample.ImageColor3 = themeList.SchemeColor |
1493 | Sample.ImageTransparency = 0.600 |
1494 | |
1495 | dropFrame.Name = "dropFrame" |
1496 | dropFrame.Parent = sectionInners |
1497 | dropFrame.BackgroundColor3 = themeList.Background |
1498 | dropFrame.BorderSizePixel = 0 |
1499 | dropFrame.Position = UDim2.new(0, 0, 1.23571432, 0) |
1500 | dropFrame.Size = UDim2.new(0, 352, 0, 33) |
1501 | dropFrame.ClipsDescendants = true |
1502 | local sample = Sample |
1503 | local btn = dropOpen |
1504 | dropOpen.Name = "dropOpen" |
1505 | dropOpen.Parent = dropFrame |
1506 | dropOpen.BackgroundColor3 = themeList.ElementColor |
1507 | dropOpen.Size = UDim2.new(0, 352, 0, 33) |
1508 | dropOpen.AutoButtonColor = false |
1509 | dropOpen.Font = Enum.Font.SourceSans |
1510 | dropOpen.Text = "" |
1511 | dropOpen.TextColor3 = Color3.fromRGB(0, 0, 0) |
1512 | dropOpen.TextSize = 14.000 |
1513 | dropOpen.ClipsDescendants = true |
1514 | dropOpen.MouseButton1Click:Connect(function() |
1515 | if not focusing then |
1516 | if opened then |
1517 | opened = false |
1518 | dropFrame:TweenSize(UDim2.new(0, 352, 0, 33), "InOut", "Linear", 0.08) |
1519 | wait(0.1) |
1520 | updateSectionFrame() |
1521 | UpdateSize() |
1522 | local c = sample:Clone() |
1523 | c.Parent = btn |
1524 | local x, y = (ms.X - c.AbsolutePosition.X), (ms.Y - c.AbsolutePosition.Y) |
1525 | c.Position = UDim2.new(0, x, 0, y) |
1526 | local len, size = 0.35, nil |
1527 | if btn.AbsoluteSize.X >= btn.AbsoluteSize.Y then |
1528 | size = (btn.AbsoluteSize.X * 1.5) |
1529 | else |
1530 | size = (btn.AbsoluteSize.Y * 1.5) |
1531 | end |
1532 | c:TweenSizeAndPosition(UDim2.new(0, size, 0, size), UDim2.new(0.5, (-size / 2), 0.5, (-size / 2)), 'Out', 'Quad', len, true, nil) |
1533 | for i = 1, 10 do |
1534 | c.ImageTransparency = c.ImageTransparency + 0.05 |
1535 | wait(len / 12) |
1536 | end |
1537 | c:Destroy() |
1538 | else |
1539 | opened = true |
1540 | dropFrame:TweenSize(UDim2.new(0, 352, 0, UIListLayout.AbsoluteContentSize.Y), "InOut", "Linear", 0.08, true) |
1541 | wait(0.1) |
1542 | updateSectionFrame() |
1543 | UpdateSize() |
1544 | local c = sample:Clone() |
1545 | c.Parent = btn |
1546 | local x, y = (ms.X - c.AbsolutePosition.X), (ms.Y - c.AbsolutePosition.Y) |
1547 | c.Position = UDim2.new(0, x, 0, y) |
1548 | local len, size = 0.35, nil |
1549 | if btn.AbsoluteSize.X >= btn.AbsoluteSize.Y then |
1550 | size = (btn.AbsoluteSize.X * 1.5) |
1551 | else |
1552 | size = (btn.AbsoluteSize.Y * 1.5) |
1553 | end |
1554 | c:TweenSizeAndPosition(UDim2.new(0, size, 0, size), UDim2.new(0.5, (-size / 2), 0.5, (-size / 2)), 'Out', 'Quad', len, true, nil) |
1555 | for i = 1, 10 do |
1556 | c.ImageTransparency = c.ImageTransparency + 0.05 |
1557 | wait(len / 12) |
1558 | end |
1559 | c:Destroy() |
1560 | end |
1561 | else |
1562 | for i,v in next, infoContainer:GetChildren() do |
1563 | Utility:TweenObject(v, {Position = UDim2.new(0,0,2,0)}, 0.2) |
1564 | focusing = false |
1565 | end |
1566 | Utility:TweenObject(blurFrame, {BackgroundTransparency = 1}, 0.2) |
1567 | end |
1568 | end) |
1569 | |
1570 | listImg.Name = "listImg" |
1571 | listImg.Parent = dropOpen |
1572 | listImg.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
1573 | listImg.BackgroundTransparency = 1.000 |
1574 | listImg.BorderColor3 = Color3.fromRGB(27, 42, 53) |
1575 | listImg.Position = UDim2.new(0.0199999996, 0, 0.180000007, 0) |
1576 | listImg.Size = UDim2.new(0, 21, 0, 21) |
1577 | listImg.Image = "rbxassetid://3926305904" |
1578 | listImg.ImageColor3 = themeList.SchemeColor |
1579 | listImg.ImageRectOffset = Vector2.new(644, 364) |
1580 | listImg.ImageRectSize = Vector2.new(36, 36) |
1581 | |
1582 | itemTextbox.Name = "itemTextbox" |
1583 | itemTextbox.Parent = dropOpen |
1584 | itemTextbox.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
1585 | itemTextbox.BackgroundTransparency = 1.000 |
1586 | itemTextbox.Position = UDim2.new(0.0970000029, 0, 0.273000002, 0) |
1587 | itemTextbox.Size = UDim2.new(0, 138, 0, 14) |
1588 | itemTextbox.Font = Enum.Font.GothamSemibold |
1589 | itemTextbox.Text = dropname |
1590 | itemTextbox.RichText = true |
1591 | itemTextbox.TextColor3 = themeList.TextColor |
1592 | itemTextbox.TextSize = 14.000 |
1593 | itemTextbox.TextXAlignment = Enum.TextXAlignment.Left |
1594 | |
1595 | viewInfo.Name = "viewInfo" |
1596 | viewInfo.Parent = dropOpen |
1597 | viewInfo.BackgroundTransparency = 1.000 |
1598 | viewInfo.LayoutOrder = 9 |
1599 | viewInfo.Position = UDim2.new(0.930000007, 0, 0.151999995, 0) |
1600 | viewInfo.Size = UDim2.new(0, 23, 0, 23) |
1601 | viewInfo.ZIndex = 2 |
1602 | viewInfo.Image = "rbxassetid://3926305904" |
1603 | viewInfo.ImageColor3 = themeList.SchemeColor |
1604 | viewInfo.ImageRectOffset = Vector2.new(764, 764) |
1605 | viewInfo.ImageRectSize = Vector2.new(36, 36) |
1606 | |
1607 | UICorner.CornerRadius = UDim.new(0, 4) |
1608 | UICorner.Parent = dropOpen |
1609 | |
1610 | local Sample = Instance.new("ImageLabel") |
1611 | |
1612 | Sample.Name = "Sample" |
1613 | Sample.Parent = dropOpen |
1614 | Sample.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
1615 | Sample.BackgroundTransparency = 1.000 |
1616 | Sample.Image = "http://www.roblox.com/asset/?id=4560909609" |
1617 | Sample.ImageColor3 = themeList.SchemeColor |
1618 | Sample.ImageTransparency = 0.600 |
1619 | |
1620 | UIListLayout.Parent = dropFrame |
1621 | UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder |
1622 | UIListLayout.Padding = UDim.new(0, 3) |
1623 | |
1624 | updateSectionFrame() |
1625 | UpdateSize() |
1626 | |
1627 | local ms = game.Players.LocalPlayer:GetMouse() |
1628 | local uis = game:GetService("UserInputService") |
1629 | local infBtn = viewInfo |
1630 | |
1631 | local moreInfo = Instance.new("TextLabel") |
1632 | local UICorner = Instance.new("UICorner") |
1633 | |
1634 | moreInfo.Name = "TipMore" |
1635 | moreInfo.Parent = infoContainer |
1636 | moreInfo.BackgroundColor3 = Color3.fromRGB(themeList.SchemeColor.r * 255 - 14, themeList.SchemeColor.g * 255 - 17, themeList.SchemeColor.b * 255 - 13) |
1637 | moreInfo.Position = UDim2.new(0, 0, 2, 0) |
1638 | moreInfo.Size = UDim2.new(0, 353, 0, 33) |
1639 | moreInfo.ZIndex = 9 |
1640 | moreInfo.RichText = true |
1641 | moreInfo.Font = Enum.Font.GothamSemibold |
1642 | moreInfo.Text = " "..dropinf |
1643 | moreInfo.TextColor3 = themeList.TextColor |
1644 | moreInfo.TextSize = 14.000 |
1645 | moreInfo.TextXAlignment = Enum.TextXAlignment.Left |
1646 | |
1647 | local hovering = false |
1648 | btn.MouseEnter:Connect(function() |
1649 | if not focusing then |
1650 | game.TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), { |
1651 | BackgroundColor3 = Color3.fromRGB(themeList.ElementColor.r * 255 + 8, themeList.ElementColor.g * 255 + 9, themeList.ElementColor.b * 255 + 10) |
1652 | }):Play() |
1653 | hovering = true |
1654 | end |
1655 | end) |
1656 | btn.MouseLeave:Connect(function() |
1657 | if not focusing then |
1658 | game.TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), { |
1659 | BackgroundColor3 = themeList.ElementColor |
1660 | }):Play() |
1661 | hovering = false |
1662 | end |
1663 | end) |
1664 | coroutine.wrap(function() |
1665 | while wait() do |
1666 | if not hovering then |
1667 | dropOpen.BackgroundColor3 = themeList.ElementColor |
1668 | end |
1669 | Sample.ImageColor3 = themeList.SchemeColor |
1670 | dropFrame.BackgroundColor3 = themeList.Background |
1671 | listImg.ImageColor3 = themeList.SchemeColor |
1672 | itemTextbox.TextColor3 = themeList.TextColor |
1673 | viewInfo.ImageColor3 = themeList.SchemeColor |
1674 | moreInfo.BackgroundColor3 = Color3.fromRGB(themeList.SchemeColor.r * 255 - 14, themeList.SchemeColor.g * 255 - 17, themeList.SchemeColor.b * 255 - 13) |
1675 | moreInfo.TextColor3 = themeList.TextColor |
1676 | end |
1677 | end)() |
1678 | UICorner.CornerRadius = UDim.new(0, 4) |
1679 | UICorner.Parent = moreInfo |
1680 | |
1681 | if themeList.SchemeColor == Color3.fromRGB(255,255,255) then |
1682 | Utility:TweenObject(moreInfo, {TextColor3 = Color3.fromRGB(0,0,0)}, 0.2) |
1683 | end |
1684 | if themeList.SchemeColor == Color3.fromRGB(0,0,0) then |
1685 | Utility:TweenObject(moreInfo, {TextColor3 = Color3.fromRGB(255,255,255)}, 0.2) |
1686 | end |
1687 | |
1688 | viewInfo.MouseButton1Click:Connect(function() |
1689 | if not viewDe then |
1690 | viewDe = true |
1691 | focusing = true |
1692 | for i,v in next, infoContainer:GetChildren() do |
1693 | if v ~= moreInfo then |
1694 | Utility:TweenObject(v, {Position = UDim2.new(0,0,2,0)}, 0.2) |
1695 | end |
1696 | end |
1697 | Utility:TweenObject(moreInfo, {Position = UDim2.new(0,0,0,0)}, 0.2) |
1698 | Utility:TweenObject(blurFrame, {BackgroundTransparency = 0.5}, 0.2) |
1699 | Utility:TweenObject(btn, {BackgroundColor3 = themeList.ElementColor}, 0.2) |
1700 | wait(1.5) |
1701 | focusing = false |
1702 | Utility:TweenObject(moreInfo, {Position = UDim2.new(0,0,2,0)}, 0.2) |
1703 | Utility:TweenObject(blurFrame, {BackgroundTransparency = 1}, 0.2) |
1704 | wait(0) |
1705 | viewDe = false |
1706 | end |
1707 | end) |
1708 | |
1709 | for i,v in next, list do |
1710 | local optionSelect = Instance.new("TextButton") |
1711 | local UICorner_2 = Instance.new("UICorner") |
1712 | local Sample1 = Instance.new("ImageLabel") |
1713 | |
1714 | local ms = game.Players.LocalPlayer:GetMouse() |
1715 | Sample1.Name = "Sample1" |
1716 | Sample1.Parent = optionSelect |
1717 | Sample1.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
1718 | Sample1.BackgroundTransparency = 1.000 |
1719 | Sample1.Image = "http://www.roblox.com/asset/?id=4560909609" |
1720 | Sample1.ImageColor3 = themeList.SchemeColor |
1721 | Sample1.ImageTransparency = 0.600 |
1722 | |
1723 | local sample1 = Sample1 |
1724 | DropYSize = DropYSize + 33 |
1725 | optionSelect.Name = "optionSelect" |
1726 | optionSelect.Parent = dropFrame |
1727 | optionSelect.BackgroundColor3 = themeList.ElementColor |
1728 | optionSelect.Position = UDim2.new(0, 0, 0.235294119, 0) |
1729 | optionSelect.Size = UDim2.new(0, 352, 0, 33) |
1730 | optionSelect.AutoButtonColor = false |
1731 | optionSelect.Font = Enum.Font.GothamSemibold |
1732 | optionSelect.Text = " "..v |
1733 | optionSelect.TextColor3 = Color3.fromRGB(themeList.TextColor.r * 255 - 6, themeList.TextColor.g * 255 - 6, themeList.TextColor.b * 255 - 6) |
1734 | optionSelect.TextSize = 14.000 |
1735 | optionSelect.TextXAlignment = Enum.TextXAlignment.Left |
1736 | optionSelect.ClipsDescendants = true |
1737 | optionSelect.MouseButton1Click:Connect(function() |
1738 | if not focusing then |
1739 | opened = false |
1740 | callback(v) |
1741 | itemTextbox.Text = v |
1742 | dropFrame:TweenSize(UDim2.new(0, 352, 0, 33), 'InOut', 'Linear', 0.08) |
1743 | wait(0.1) |
1744 | updateSectionFrame() |
1745 | UpdateSize() |
1746 | local c = sample1:Clone() |
1747 | c.Parent = optionSelect |
1748 | local x, y = (ms.X - c.AbsolutePosition.X), (ms.Y - c.AbsolutePosition.Y) |
1749 | c.Position = UDim2.new(0, x, 0, y) |
1750 | local len, size = 0.35, nil |
1751 | if optionSelect.AbsoluteSize.X >= optionSelect.AbsoluteSize.Y then |
1752 | size = (optionSelect.AbsoluteSize.X * 1.5) |
1753 | else |
1754 | size = (optionSelect.AbsoluteSize.Y * 1.5) |
1755 | end |
1756 | c:TweenSizeAndPosition(UDim2.new(0, size, 0, size), UDim2.new(0.5, (-size / 2), 0.5, (-size / 2)), 'Out', 'Quad', len, true, nil) |
1757 | for i = 1, 10 do |
1758 | c.ImageTransparency = c.ImageTransparency + 0.05 |
1759 | wait(len / 12) |
1760 | end |
1761 | c:Destroy() |
1762 | else |
1763 | for i,v in next, infoContainer:GetChildren() do |
1764 | Utility:TweenObject(v, {Position = UDim2.new(0,0,2,0)}, 0.2) |
1765 | focusing = false |
1766 | end |
1767 | Utility:TweenObject(blurFrame, {BackgroundTransparency = 1}, 0.2) |
1768 | end |
1769 | end) |
1770 | |
1771 | UICorner_2.CornerRadius = UDim.new(0, 4) |
1772 | UICorner_2.Parent = optionSelect |
1773 | |
1774 | local oHover = false |
1775 | optionSelect.MouseEnter:Connect(function() |
1776 | if not focusing then |
1777 | game.TweenService:Create(optionSelect, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), { |
1778 | BackgroundColor3 = Color3.fromRGB(themeList.ElementColor.r * 255 + 8, themeList.ElementColor.g * 255 + 9, themeList.ElementColor.b * 255 + 10) |
1779 | }):Play() |
1780 | oHover = true |
1781 | end |
1782 | end) |
1783 | optionSelect.MouseLeave:Connect(function() |
1784 | if not focusing then |
1785 | game.TweenService:Create(optionSelect, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), { |
1786 | BackgroundColor3 = themeList.ElementColor |
1787 | }):Play() |
1788 | oHover = false |
1789 | end |
1790 | end) |
1791 | coroutine.wrap(function() |
1792 | while wait() do |
1793 | if not oHover then |
1794 | optionSelect.BackgroundColor3 = themeList.ElementColor |
1795 | end |
1796 | optionSelect.TextColor3 = Color3.fromRGB(themeList.TextColor.r * 255 - 6, themeList.TextColor.g * 255 - 6, themeList.TextColor.b * 255 - 6) |
1797 | Sample1.ImageColor3 = themeList.SchemeColor |
1798 | end |
1799 | end)() |
1800 | end |
1801 | |
1802 | function DropFunction:Refresh(newList) |
1803 | newList = newList or {} |
1804 | for i,v in next, dropFrame:GetChildren() do |
1805 | if v.Name == "optionSelect" then |
1806 | v:Destroy() |
1807 | end |
1808 | end |
1809 | for i,v in next, newList do |
1810 | local optionSelect = Instance.new("TextButton") |
1811 | local UICorner_2 = Instance.new("UICorner") |
1812 | local Sample11 = Instance.new("ImageLabel") |
1813 | local ms = game.Players.LocalPlayer:GetMouse() |
1814 | Sample11.Name = "Sample11" |
1815 | Sample11.Parent = optionSelect |
1816 | Sample11.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
1817 | Sample11.BackgroundTransparency = 1.000 |
1818 | Sample11.Image = "http://www.roblox.com/asset/?id=4560909609" |
1819 | Sample11.ImageColor3 = themeList.SchemeColor |
1820 | Sample11.ImageTransparency = 0.600 |
1821 | |
1822 | local sample11 = Sample11 |
1823 | DropYSize = DropYSize + 33 |
1824 | optionSelect.Name = "optionSelect" |
1825 | optionSelect.Parent = dropFrame |
1826 | optionSelect.BackgroundColor3 = themeList.ElementColor |
1827 | optionSelect.Position = UDim2.new(0, 0, 0.235294119, 0) |
1828 | optionSelect.Size = UDim2.new(0, 352, 0, 33) |
1829 | optionSelect.AutoButtonColor = false |
1830 | optionSelect.Font = Enum.Font.GothamSemibold |
1831 | optionSelect.Text = " "..v |
1832 | optionSelect.TextColor3 = Color3.fromRGB(themeList.TextColor.r * 255 - 6, themeList.TextColor.g * 255 - 6, themeList.TextColor.b * 255 - 6) |
1833 | optionSelect.TextSize = 14.000 |
1834 | optionSelect.TextXAlignment = Enum.TextXAlignment.Left |
1835 | optionSelect.ClipsDescendants = true |
1836 | UICorner_2.CornerRadius = UDim.new(0, 4) |
1837 | UICorner_2.Parent = optionSelect |
1838 | optionSelect.MouseButton1Click:Connect(function() |
1839 | if not focusing then |
1840 | opened = false |
1841 | callback(v) |
1842 | itemTextbox.Text = v |
1843 | dropFrame:TweenSize(UDim2.new(0, 352, 0, 33), 'InOut', 'Linear', 0.08) |
1844 | wait(0.1) |
1845 | updateSectionFrame() |
1846 | UpdateSize() |
1847 | local c = sample11:Clone() |
1848 | c.Parent = optionSelect |
1849 | local x, y = (ms.X - c.AbsolutePosition.X), (ms.Y - c.AbsolutePosition.Y) |
1850 | c.Position = UDim2.new(0, x, 0, y) |
1851 | local len, size = 0.35, nil |
1852 | if optionSelect.AbsoluteSize.X >= optionSelect.AbsoluteSize.Y then |
1853 | size = (optionSelect.AbsoluteSize.X * 1.5) |
1854 | else |
1855 | size = (optionSelect.AbsoluteSize.Y * 1.5) |
1856 | end |
1857 | c:TweenSizeAndPosition(UDim2.new(0, size, 0, size), UDim2.new(0.5, (-size / 2), 0.5, (-size / 2)), 'Out', 'Quad', len, true, nil) |
1858 | for i = 1, 10 do |
1859 | c.ImageTransparency = c.ImageTransparency + 0.05 |
1860 | wait(len / 12) |
1861 | end |
1862 | c:Destroy() |
1863 | else |
1864 | for i,v in next, infoContainer:GetChildren() do |
1865 | Utility:TweenObject(v, {Position = UDim2.new(0,0,2,0)}, 0.2) |
1866 | focusing = false |
1867 | end |
1868 | Utility:TweenObject(blurFrame, {BackgroundTransparency = 1}, 0.2) |
1869 | end |
1870 | end) |
1871 | updateSectionFrame() |
1872 | UpdateSize() |
1873 | local hov = false |
1874 | optionSelect.MouseEnter:Connect(function() |
1875 | if not focusing then |
1876 | game.TweenService:Create(optionSelect, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), { |
1877 | BackgroundColor3 = Color3.fromRGB(themeList.ElementColor.r * 255 + 8, themeList.ElementColor.g * 255 + 9, themeList.ElementColor.b * 255 + 10) |
1878 | }):Play() |
1879 | hov = true |
1880 | end |
1881 | end) |
1882 | optionSelect.MouseLeave:Connect(function() |
1883 | if not focusing then |
1884 | game.TweenService:Create(optionSelect, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), { |
1885 | BackgroundColor3 = themeList.ElementColor |
1886 | }):Play() |
1887 | hov = false |
1888 | end |
1889 | end) |
1890 | coroutine.wrap(function() |
1891 | while wait() do |
1892 | if not oHover then |
1893 | optionSelect.BackgroundColor3 = themeList.ElementColor |
1894 | end |
1895 | optionSelect.TextColor3 = Color3.fromRGB(themeList.TextColor.r * 255 - 6, themeList.TextColor.g * 255 - 6, themeList.TextColor.b * 255 - 6) |
1896 | Sample11.ImageColor3 = themeList.SchemeColor |
1897 | end |
1898 | end)() |
1899 | end |
1900 | if opened then |
1901 | dropFrame:TweenSize(UDim2.new(0, 352, 0, UIListLayout.AbsoluteContentSize.Y), "InOut", "Linear", 0.08, true) |
1902 | wait(0.1) |
1903 | updateSectionFrame() |
1904 | UpdateSize() |
1905 | else |
1906 | dropFrame:TweenSize(UDim2.new(0, 352, 0, 33), "InOut", "Linear", 0.08) |
1907 | wait(0.1) |
1908 | updateSectionFrame() |
1909 | UpdateSize() |
1910 | end |
1911 | end |
1912 | return DropFunction |
1913 | end |
1914 | function Elements:NewKeybind(keytext, keyinf, first, callback) |
1915 | keytext = keytext or "KeybindText" |
1916 | keyinf = keyinf or "KebindInfo" |
1917 | callback = callback or function() end |
1918 | local oldKey = first.Name |
1919 | local keybindElement = Instance.new("TextButton") |
1920 | local UICorner = Instance.new("UICorner") |
1921 | local togName = Instance.new("TextLabel") |
1922 | local viewInfo = Instance.new("ImageButton") |
1923 | local touch = Instance.new("ImageLabel") |
1924 | local Sample = Instance.new("ImageLabel") |
1925 | local togName_2 = Instance.new("TextLabel") |
1926 | |
1927 | local ms = game.Players.LocalPlayer:GetMouse() |
1928 | local uis = game:GetService("UserInputService") |
1929 | local infBtn = viewInfo |
1930 | |
1931 | local moreInfo = Instance.new("TextLabel") |
1932 | local UICorner1 = Instance.new("UICorner") |
1933 | |
1934 | local sample = Sample |
1935 | |
1936 | keybindElement.Name = "keybindElement" |
1937 | keybindElement.Parent = sectionInners |
1938 | keybindElement.BackgroundColor3 = themeList.ElementColor |
1939 | keybindElement.ClipsDescendants = true |
1940 | keybindElement.Size = UDim2.new(0, 352, 0, 33) |
1941 | keybindElement.AutoButtonColor = false |
1942 | keybindElement.Font = Enum.Font.SourceSans |
1943 | keybindElement.Text = "" |
1944 | keybindElement.TextColor3 = Color3.fromRGB(0, 0, 0) |
1945 | keybindElement.TextSize = 14.000 |
1946 | keybindElement.MouseButton1Click:connect(function(e) |
1947 | if not focusing then |
1948 | togName_2.Text = ". . ." |
1949 | local a, b = game:GetService('UserInputService').InputBegan:wait(); |
1950 | if a.KeyCode.Name ~= "Unknown" then |
1951 | togName_2.Text = a.KeyCode.Name |
1952 | oldKey = a.KeyCode.Name; |
1953 | end |
1954 | local c = sample:Clone() |
1955 | c.Parent = keybindElement |
1956 | local x, y = (ms.X - c.AbsolutePosition.X), (ms.Y - c.AbsolutePosition.Y) |
1957 | c.Position = UDim2.new(0, x, 0, y) |
1958 | local len, size = 0.35, nil |
1959 | if keybindElement.AbsoluteSize.X >= keybindElement.AbsoluteSize.Y then |
1960 | size = (keybindElement.AbsoluteSize.X * 1.5) |
1961 | else |
1962 | size = (keybindElement.AbsoluteSize.Y * 1.5) |
1963 | end |
1964 | c:TweenSizeAndPosition(UDim2.new(0, size, 0, size), UDim2.new(0.5, (-size / 2), 0.5, (-size / 2)), 'Out', 'Quad', len, true, nil) |
1965 | for i = 1, 10 do |
1966 | c.ImageTransparency = c.ImageTransparency + 0.05 |
1967 | wait(len / 12) |
1968 | end |
1969 | else |
1970 | for i,v in next, infoContainer:GetChildren() do |
1971 | Utility:TweenObject(v, {Position = UDim2.new(0,0,2,0)}, 0.2) |
1972 | focusing = false |
1973 | end |
1974 | Utility:TweenObject(blurFrame, {BackgroundTransparency = 1}, 0.2) |
1975 | end |
1976 | end) |
1977 | |
1978 | game:GetService("UserInputService").InputBegan:connect(function(current, ok) |
1979 | if not ok then |
1980 | if current.KeyCode.Name == oldKey then |
1981 | callback() |
1982 | end |
1983 | end |
1984 | end) |
1985 | |
1986 | moreInfo.Name = "TipMore" |
1987 | moreInfo.Parent = infoContainer |
1988 | moreInfo.BackgroundColor3 = Color3.fromRGB(themeList.SchemeColor.r * 255 - 14, themeList.SchemeColor.g * 255 - 17, themeList.SchemeColor.b * 255 - 13) |
1989 | moreInfo.Position = UDim2.new(0, 0, 2, 0) |
1990 | moreInfo.Size = UDim2.new(0, 353, 0, 33) |
1991 | moreInfo.ZIndex = 9 |
1992 | moreInfo.RichText = true |
1993 | moreInfo.Font = Enum.Font.GothamSemibold |
1994 | moreInfo.Text = " "..keyinf |
1995 | moreInfo.TextColor3 = themeList.TextColor |
1996 | moreInfo.TextSize = 14.000 |
1997 | moreInfo.TextXAlignment = Enum.TextXAlignment.Left |
1998 | |
1999 | Sample.Name = "Sample" |
2000 | Sample.Parent = keybindElement |
2001 | Sample.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
2002 | Sample.BackgroundTransparency = 1.000 |
2003 | Sample.Image = "http://www.roblox.com/asset/?id=4560909609" |
2004 | Sample.ImageColor3 = themeList.SchemeColor |
2005 | Sample.ImageTransparency = 0.600 |
2006 | |
2007 | |
2008 | togName.Name = "togName" |
2009 | togName.Parent = keybindElement |
2010 | togName.BackgroundColor3 = themeList.TextColor |
2011 | togName.BackgroundTransparency = 1.000 |
2012 | togName.Position = UDim2.new(0.096704483, 0, 0.272727281, 0) |
2013 | togName.Size = UDim2.new(0, 222, 0, 14) |
2014 | togName.Font = Enum.Font.GothamSemibold |
2015 | togName.Text = keytext |
2016 | togName.RichText = true |
2017 | togName.TextColor3 = themeList.TextColor |
2018 | togName.TextSize = 14.000 |
2019 | togName.TextXAlignment = Enum.TextXAlignment.Left |
2020 | |
2021 | viewInfo.Name = "viewInfo" |
2022 | viewInfo.Parent = keybindElement |
2023 | viewInfo.BackgroundTransparency = 1.000 |
2024 | viewInfo.LayoutOrder = 9 |
2025 | viewInfo.Position = UDim2.new(0.930000007, 0, 0.151999995, 0) |
2026 | viewInfo.Size = UDim2.new(0, 23, 0, 23) |
2027 | viewInfo.ZIndex = 2 |
2028 | viewInfo.Image = "rbxassetid://3926305904" |
2029 | viewInfo.ImageColor3 = themeList.SchemeColor |
2030 | viewInfo.ImageRectOffset = Vector2.new(764, 764) |
2031 | viewInfo.ImageRectSize = Vector2.new(36, 36) |
2032 | viewInfo.MouseButton1Click:Connect(function() |
2033 | if not viewDe then |
2034 | viewDe = true |
2035 | focusing = true |
2036 | for i,v in next, infoContainer:GetChildren() do |
2037 | if v ~= moreInfo then |
2038 | Utility:TweenObject(v, {Position = UDim2.new(0,0,2,0)}, 0.2) |
2039 | end |
2040 | end |
2041 | Utility:TweenObject(moreInfo, {Position = UDim2.new(0,0,0,0)}, 0.2) |
2042 | Utility:TweenObject(blurFrame, {BackgroundTransparency = 0.5}, 0.2) |
2043 | Utility:TweenObject(keybindElement, {BackgroundColor3 = themeList.ElementColor}, 0.2) |
2044 | wait(1.5) |
2045 | focusing = false |
2046 | Utility:TweenObject(moreInfo, {Position = UDim2.new(0,0,2,0)}, 0.2) |
2047 | Utility:TweenObject(blurFrame, {BackgroundTransparency = 1}, 0.2) |
2048 | wait(0) |
2049 | viewDe = false |
2050 | end |
2051 | end) |
2052 | updateSectionFrame() |
2053 | UpdateSize() |
2054 | local oHover = false |
2055 | keybindElement.MouseEnter:Connect(function() |
2056 | if not focusing then |
2057 | game.TweenService:Create(keybindElement, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), { |
2058 | BackgroundColor3 = Color3.fromRGB(themeList.ElementColor.r * 255 + 8, themeList.ElementColor.g * 255 + 9, themeList.ElementColor.b * 255 + 10) |
2059 | }):Play() |
2060 | oHover = true |
2061 | end |
2062 | end) |
2063 | keybindElement.MouseLeave:Connect(function() |
2064 | if not focusing then |
2065 | game.TweenService:Create(keybindElement, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), { |
2066 | BackgroundColor3 = themeList.ElementColor |
2067 | }):Play() |
2068 | oHover = false |
2069 | end |
2070 | end) |
2071 | |
2072 | UICorner1.CornerRadius = UDim.new(0, 4) |
2073 | UICorner1.Parent = moreInfo |
2074 | |
2075 | if themeList.SchemeColor == Color3.fromRGB(255,255,255) then |
2076 | Utility:TweenObject(moreInfo, {TextColor3 = Color3.fromRGB(0,0,0)}, 0.2) |
2077 | end |
2078 | if themeList.SchemeColor == Color3.fromRGB(0,0,0) then |
2079 | Utility:TweenObject(moreInfo, {TextColor3 = Color3.fromRGB(255,255,255)}, 0.2) |
2080 | end |
2081 | |
2082 | UICorner.CornerRadius = UDim.new(0, 4) |
2083 | UICorner.Parent = keybindElement |
2084 | |
2085 | touch.Name = "touch" |
2086 | touch.Parent = keybindElement |
2087 | touch.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
2088 | touch.BackgroundTransparency = 1.000 |
2089 | touch.BorderColor3 = Color3.fromRGB(27, 42, 53) |
2090 | touch.Position = UDim2.new(0.0199999996, 0, 0.180000007, 0) |
2091 | touch.Size = UDim2.new(0, 21, 0, 21) |
2092 | touch.Image = "rbxassetid://3926305904" |
2093 | touch.ImageColor3 = themeList.SchemeColor |
2094 | touch.ImageRectOffset = Vector2.new(364, 284) |
2095 | touch.ImageRectSize = Vector2.new(36, 36) |
2096 | |
2097 | togName_2.Name = "togName" |
2098 | togName_2.Parent = keybindElement |
2099 | togName_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
2100 | togName_2.BackgroundTransparency = 1.000 |
2101 | togName_2.Position = UDim2.new(0.727386296, 0, 0.272727281, 0) |
2102 | togName_2.Size = UDim2.new(0, 70, 0, 14) |
2103 | togName_2.Font = Enum.Font.GothamSemibold |
2104 | togName_2.Text = oldKey |
2105 | togName_2.TextColor3 = themeList.SchemeColor |
2106 | togName_2.TextSize = 14.000 |
2107 | togName_2.TextXAlignment = Enum.TextXAlignment.Right |
2108 | |
2109 | coroutine.wrap(function() |
2110 | while wait() do |
2111 | if not oHover then |
2112 | keybindElement.BackgroundColor3 = themeList.ElementColor |
2113 | end |
2114 | togName_2.TextColor3 = themeList.SchemeColor |
2115 | touch.ImageColor3 = themeList.SchemeColor |
2116 | viewInfo.ImageColor3 = themeList.SchemeColor |
2117 | togName.BackgroundColor3 = themeList.TextColor |
2118 | togName.TextColor3 = themeList.TextColor |
2119 | Sample.ImageColor3 = themeList.SchemeColor |
2120 | moreInfo.TextColor3 = themeList.TextColor |
2121 | moreInfo.BackgroundColor3 = Color3.fromRGB(themeList.SchemeColor.r * 255 - 14, themeList.SchemeColor.g * 255 - 17, themeList.SchemeColor.b * 255 - 13) |
2122 | |
2123 | end |
2124 | end)() |
2125 | end |
2126 | |
2127 | function Elements:NewColorPicker(colText, colInf, defcolor, callback) |
2128 | colText = colText or "ColorPicker" |
2129 | callback = callback or function() end |
2130 | defcolor = defcolor or Color3.fromRGB(1,1,1) |
2131 | local h, s, v = Color3.toHSV(defcolor) |
2132 | local ms = game.Players.LocalPlayer:GetMouse() |
2133 | local colorOpened = false |
2134 | local colorElement = Instance.new("TextButton") |
2135 | local UICorner = Instance.new("UICorner") |
2136 | local colorHeader = Instance.new("Frame") |
2137 | local UICorner_2 = Instance.new("UICorner") |
2138 | local touch = Instance.new("ImageLabel") |
2139 | local togName = Instance.new("TextLabel") |
2140 | local viewInfo = Instance.new("ImageButton") |
2141 | local colorCurrent = Instance.new("Frame") |
2142 | local UICorner_3 = Instance.new("UICorner") |
2143 | local UIListLayout = Instance.new("UIListLayout") |
2144 | local colorInners = Instance.new("Frame") |
2145 | local UICorner_4 = Instance.new("UICorner") |
2146 | local rgb = Instance.new("ImageButton") |
2147 | local UICorner_5 = Instance.new("UICorner") |
2148 | local rbgcircle = Instance.new("ImageLabel") |
2149 | local darkness = Instance.new("ImageButton") |
2150 | local UICorner_6 = Instance.new("UICorner") |
2151 | local darkcircle = Instance.new("ImageLabel") |
2152 | local toggleDisabled = Instance.new("ImageLabel") |
2153 | local toggleEnabled = Instance.new("ImageLabel") |
2154 | local onrainbow = Instance.new("TextButton") |
2155 | local togName_2 = Instance.new("TextLabel") |
2156 | |
2157 | --Properties: |
2158 | local Sample = Instance.new("ImageLabel") |
2159 | Sample.Name = "Sample" |
2160 | Sample.Parent = colorHeader |
2161 | Sample.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
2162 | Sample.BackgroundTransparency = 1.000 |
2163 | Sample.Image = "http://www.roblox.com/asset/?id=4560909609" |
2164 | Sample.ImageColor3 = themeList.SchemeColor |
2165 | Sample.ImageTransparency = 0.600 |
2166 | |
2167 | local btn = colorHeader |
2168 | local sample = Sample |
2169 | |
2170 | colorElement.Name = "colorElement" |
2171 | colorElement.Parent = sectionInners |
2172 | colorElement.BackgroundColor3 = themeList.ElementColor |
2173 | colorElement.BackgroundTransparency = 1.000 |
2174 | colorElement.ClipsDescendants = true |
2175 | colorElement.Position = UDim2.new(0, 0, 0.566834569, 0) |
2176 | colorElement.Size = UDim2.new(0, 352, 0, 33) |
2177 | colorElement.AutoButtonColor = false |
2178 | colorElement.Font = Enum.Font.SourceSans |
2179 | colorElement.Text = "" |
2180 | colorElement.TextColor3 = Color3.fromRGB(0, 0, 0) |
2181 | colorElement.TextSize = 14.000 |
2182 | colorElement.MouseButton1Click:Connect(function() |
2183 | if not focusing then |
2184 | if colorOpened then |
2185 | colorOpened = false |
2186 | colorElement:TweenSize(UDim2.new(0, 352, 0, 33), "InOut", "Linear", 0.08) |
2187 | wait(0.1) |
2188 | updateSectionFrame() |
2189 | UpdateSize() |
2190 | local c = sample:Clone() |
2191 | c.Parent = btn |
2192 | local x, y = (ms.X - c.AbsolutePosition.X), (ms.Y - c.AbsolutePosition.Y) |
2193 | c.Position = UDim2.new(0, x, 0, y) |
2194 | local len, size = 0.35, nil |
2195 | if btn.AbsoluteSize.X >= btn.AbsoluteSize.Y then |
2196 | size = (btn.AbsoluteSize.X * 1.5) |
2197 | else |
2198 | size = (btn.AbsoluteSize.Y * 1.5) |
2199 | end |
2200 | c:TweenSizeAndPosition(UDim2.new(0, size, 0, size), UDim2.new(0.5, (-size / 2), 0.5, (-size / 2)), 'Out', 'Quad', len, true, nil) |
2201 | for i = 1, 10 do |
2202 | c.ImageTransparency = c.ImageTransparency + 0.05 |
2203 | wait(len / 12) |
2204 | end |
2205 | c:Destroy() |
2206 | else |
2207 | colorOpened = true |
2208 | colorElement:TweenSize(UDim2.new(0, 352, 0, 141), "InOut", "Linear", 0.08, true) |
2209 | wait(0.1) |
2210 | updateSectionFrame() |
2211 | UpdateSize() |
2212 | local c = sample:Clone() |
2213 | c.Parent = btn |
2214 | local x, y = (ms.X - c.AbsolutePosition.X), (ms.Y - c.AbsolutePosition.Y) |
2215 | c.Position = UDim2.new(0, x, 0, y) |
2216 | local len, size = 0.35, nil |
2217 | if btn.AbsoluteSize.X >= btn.AbsoluteSize.Y then |
2218 | size = (btn.AbsoluteSize.X * 1.5) |
2219 | else |
2220 | size = (btn.AbsoluteSize.Y * 1.5) |
2221 | end |
2222 | c:TweenSizeAndPosition(UDim2.new(0, size, 0, size), UDim2.new(0.5, (-size / 2), 0.5, (-size / 2)), 'Out', 'Quad', len, true, nil) |
2223 | for i = 1, 10 do |
2224 | c.ImageTransparency = c.ImageTransparency + 0.05 |
2225 | wait(len / 12) |
2226 | end |
2227 | c:Destroy() |
2228 | end |
2229 | else |
2230 | for i,v in next, infoContainer:GetChildren() do |
2231 | Utility:TweenObject(v, {Position = UDim2.new(0,0,2,0)}, 0.2) |
2232 | focusing = false |
2233 | end |
2234 | Utility:TweenObject(blurFrame, {BackgroundTransparency = 1}, 0.2) |
2235 | end |
2236 | end) |
2237 | UICorner.CornerRadius = UDim.new(0, 4) |
2238 | UICorner.Parent = colorElement |
2239 | |
2240 | colorHeader.Name = "colorHeader" |
2241 | colorHeader.Parent = colorElement |
2242 | colorHeader.BackgroundColor3 = themeList.ElementColor |
2243 | colorHeader.Size = UDim2.new(0, 352, 0, 33) |
2244 | colorHeader.ClipsDescendants = true |
2245 | |
2246 | UICorner_2.CornerRadius = UDim.new(0, 4) |
2247 | UICorner_2.Parent = colorHeader |
2248 | |
2249 | touch.Name = "touch" |
2250 | touch.Parent = colorHeader |
2251 | touch.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
2252 | touch.BackgroundTransparency = 1.000 |
2253 | touch.BorderColor3 = Color3.fromRGB(27, 42, 53) |
2254 | touch.Position = UDim2.new(0.0199999996, 0, 0.180000007, 0) |
2255 | touch.Size = UDim2.new(0, 21, 0, 21) |
2256 | touch.Image = "rbxassetid://3926305904" |
2257 | touch.ImageColor3 = themeList.SchemeColor |
2258 | touch.ImageRectOffset = Vector2.new(44, 964) |
2259 | touch.ImageRectSize = Vector2.new(36, 36) |
2260 | |
2261 | togName.Name = "togName" |
2262 | togName.Parent = colorHeader |
2263 | togName.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
2264 | togName.BackgroundTransparency = 1.000 |
2265 | togName.Position = UDim2.new(0.096704483, 0, 0.272727281, 0) |
2266 | togName.Size = UDim2.new(0, 288, 0, 14) |
2267 | togName.Font = Enum.Font.GothamSemibold |
2268 | togName.Text = colText |
2269 | togName.TextColor3 = themeList.TextColor |
2270 | togName.TextSize = 14.000 |
2271 | togName.RichText = true |
2272 | togName.TextXAlignment = Enum.TextXAlignment.Left |
2273 | |
2274 | local moreInfo = Instance.new("TextLabel") |
2275 | local UICorner = Instance.new("UICorner") |
2276 | |
2277 | moreInfo.Name = "TipMore" |
2278 | moreInfo.Parent = infoContainer |
2279 | moreInfo.BackgroundColor3 = Color3.fromRGB(themeList.SchemeColor.r * 255 - 14, themeList.SchemeColor.g * 255 - 17, themeList.SchemeColor.b * 255 - 13) |
2280 | moreInfo.Position = UDim2.new(0, 0, 2, 0) |
2281 | moreInfo.Size = UDim2.new(0, 353, 0, 33) |
2282 | moreInfo.ZIndex = 9 |
2283 | moreInfo.Font = Enum.Font.GothamSemibold |
2284 | moreInfo.Text = " "..colInf |
2285 | moreInfo.TextColor3 = themeList.TextColor |
2286 | moreInfo.TextSize = 14.000 |
2287 | moreInfo.RichText = true |
2288 | moreInfo.TextXAlignment = Enum.TextXAlignment.Left |
2289 | |
2290 | UICorner.CornerRadius = UDim.new(0, 4) |
2291 | UICorner.Parent = moreInfo |
2292 | |
2293 | viewInfo.Name = "viewInfo" |
2294 | viewInfo.Parent = colorHeader |
2295 | viewInfo.BackgroundTransparency = 1.000 |
2296 | viewInfo.LayoutOrder = 9 |
2297 | viewInfo.Position = UDim2.new(0.930000007, 0, 0.151999995, 0) |
2298 | viewInfo.Size = UDim2.new(0, 23, 0, 23) |
2299 | viewInfo.ZIndex = 2 |
2300 | viewInfo.Image = "rbxassetid://3926305904" |
2301 | viewInfo.ImageColor3 = themeList.SchemeColor |
2302 | viewInfo.ImageRectOffset = Vector2.new(764, 764) |
2303 | viewInfo.ImageRectSize = Vector2.new(36, 36) |
2304 | viewInfo.MouseButton1Click:Connect(function() |
2305 | if not viewDe then |
2306 | viewDe = true |
2307 | focusing = true |
2308 | for i,v in next, infoContainer:GetChildren() do |
2309 | if v ~= moreInfo then |
2310 | Utility:TweenObject(v, {Position = UDim2.new(0,0,2,0)}, 0.2) |
2311 | end |
2312 | end |
2313 | Utility:TweenObject(moreInfo, {Position = UDim2.new(0,0,0,0)}, 0.2) |
2314 | Utility:TweenObject(blurFrame, {BackgroundTransparency = 0.5}, 0.2) |
2315 | Utility:TweenObject(colorElement, {BackgroundColor3 = themeList.ElementColor}, 0.2) |
2316 | wait(1.5) |
2317 | focusing = false |
2318 | Utility:TweenObject(moreInfo, {Position = UDim2.new(0,0,2,0)}, 0.2) |
2319 | Utility:TweenObject(blurFrame, {BackgroundTransparency = 1}, 0.2) |
2320 | wait(0) |
2321 | viewDe = false |
2322 | end |
2323 | end) |
2324 | |
2325 | colorCurrent.Name = "colorCurrent" |
2326 | colorCurrent.Parent = colorHeader |
2327 | colorCurrent.BackgroundColor3 = defcolor |
2328 | colorCurrent.Position = UDim2.new(0.792613626, 0, 0.212121218, 0) |
2329 | colorCurrent.Size = UDim2.new(0, 42, 0, 18) |
2330 | |
2331 | UICorner_3.CornerRadius = UDim.new(0, 4) |
2332 | UICorner_3.Parent = colorCurrent |
2333 | |
2334 | UIListLayout.Parent = colorElement |
2335 | UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder |
2336 | UIListLayout.Padding = UDim.new(0, 3) |
2337 | |
2338 | colorInners.Name = "colorInners" |
2339 | colorInners.Parent = colorElement |
2340 | colorInners.BackgroundColor3 = themeList.ElementColor |
2341 | colorInners.Position = UDim2.new(0, 0, 0.255319148, 0) |
2342 | colorInners.Size = UDim2.new(0, 352, 0, 105) |
2343 | |
2344 | UICorner_4.CornerRadius = UDim.new(0, 4) |
2345 | UICorner_4.Parent = colorInners |
2346 | |
2347 | rgb.Name = "rgb" |
2348 | rgb.Parent = colorInners |
2349 | rgb.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
2350 | rgb.BackgroundTransparency = 1.000 |
2351 | rgb.Position = UDim2.new(0.0198863633, 0, 0.0476190485, 0) |
2352 | rgb.Size = UDim2.new(0, 211, 0, 93) |
2353 | rgb.Image = "http://www.roblox.com/asset/?id=6523286724" |
2354 | |
2355 | UICorner_5.CornerRadius = UDim.new(0, 4) |
2356 | UICorner_5.Parent = rgb |
2357 | |
2358 | rbgcircle.Name = "rbgcircle" |
2359 | rbgcircle.Parent = rgb |
2360 | rbgcircle.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
2361 | rbgcircle.BackgroundTransparency = 1.000 |
2362 | rbgcircle.Size = UDim2.new(0, 14, 0, 14) |
2363 | rbgcircle.Image = "rbxassetid://3926309567" |
2364 | rbgcircle.ImageColor3 = Color3.fromRGB(0, 0, 0) |
2365 | rbgcircle.ImageRectOffset = Vector2.new(628, 420) |
2366 | rbgcircle.ImageRectSize = Vector2.new(48, 48) |
2367 | |
2368 | darkness.Name = "darkness" |
2369 | darkness.Parent = colorInners |
2370 | darkness.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
2371 | darkness.BackgroundTransparency = 1.000 |
2372 | darkness.Position = UDim2.new(0.636363626, 0, 0.0476190485, 0) |
2373 | darkness.Size = UDim2.new(0, 18, 0, 93) |
2374 | darkness.Image = "http://www.roblox.com/asset/?id=6523291212" |
2375 | |
2376 | UICorner_6.CornerRadius = UDim.new(0, 4) |
2377 | UICorner_6.Parent = darkness |
2378 | |
2379 | darkcircle.Name = "darkcircle" |
2380 | darkcircle.Parent = darkness |
2381 | darkcircle.AnchorPoint = Vector2.new(0.5, 0) |
2382 | darkcircle.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
2383 | darkcircle.BackgroundTransparency = 1.000 |
2384 | darkcircle.Size = UDim2.new(0, 14, 0, 14) |
2385 | darkcircle.Image = "rbxassetid://3926309567" |
2386 | darkcircle.ImageColor3 = Color3.fromRGB(0, 0, 0) |
2387 | darkcircle.ImageRectOffset = Vector2.new(628, 420) |
2388 | darkcircle.ImageRectSize = Vector2.new(48, 48) |
2389 | |
2390 | toggleDisabled.Name = "toggleDisabled" |
2391 | toggleDisabled.Parent = colorInners |
2392 | toggleDisabled.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
2393 | toggleDisabled.BackgroundTransparency = 1.000 |
2394 | toggleDisabled.Position = UDim2.new(0.704659104, 0, 0.0657142699, 0) |
2395 | toggleDisabled.Size = UDim2.new(0, 21, 0, 21) |
2396 | toggleDisabled.Image = "rbxassetid://3926309567" |
2397 | toggleDisabled.ImageColor3 = themeList.SchemeColor |
2398 | toggleDisabled.ImageRectOffset = Vector2.new(628, 420) |
2399 | toggleDisabled.ImageRectSize = Vector2.new(48, 48) |
2400 | |
2401 | toggleEnabled.Name = "toggleEnabled" |
2402 | toggleEnabled.Parent = colorInners |
2403 | toggleEnabled.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
2404 | toggleEnabled.BackgroundTransparency = 1.000 |
2405 | toggleEnabled.Position = UDim2.new(0.704999983, 0, 0.0659999996, 0) |
2406 | toggleEnabled.Size = UDim2.new(0, 21, 0, 21) |
2407 | toggleEnabled.Image = "rbxassetid://3926309567" |
2408 | toggleEnabled.ImageColor3 = themeList.SchemeColor |
2409 | toggleEnabled.ImageRectOffset = Vector2.new(784, 420) |
2410 | toggleEnabled.ImageRectSize = Vector2.new(48, 48) |
2411 | toggleEnabled.ImageTransparency = 1.000 |
2412 | |
2413 | onrainbow.Name = "onrainbow" |
2414 | onrainbow.Parent = toggleEnabled |
2415 | onrainbow.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
2416 | onrainbow.BackgroundTransparency = 1.000 |
2417 | onrainbow.Position = UDim2.new(2.90643607e-06, 0, 0, 0) |
2418 | onrainbow.Size = UDim2.new(1, 0, 1, 0) |
2419 | onrainbow.Font = Enum.Font.SourceSans |
2420 | onrainbow.Text = "" |
2421 | onrainbow.TextColor3 = Color3.fromRGB(0, 0, 0) |
2422 | onrainbow.TextSize = 14.000 |
2423 | |
2424 | togName_2.Name = "togName" |
2425 | togName_2.Parent = colorInners |
2426 | togName_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
2427 | togName_2.BackgroundTransparency = 1.000 |
2428 | togName_2.Position = UDim2.new(0.779999971, 0, 0.100000001, 0) |
2429 | togName_2.Size = UDim2.new(0, 278, 0, 14) |
2430 | togName_2.Font = Enum.Font.GothamSemibold |
2431 | togName_2.Text = "Rainbow" |
2432 | togName_2.TextColor3 = themeList.TextColor |
2433 | togName_2.TextSize = 14.000 |
2434 | togName_2.TextXAlignment = Enum.TextXAlignment.Left |
2435 | |
2436 | if themeList.SchemeColor == Color3.fromRGB(255,255,255) then |
2437 | Utility:TweenObject(moreInfo, {TextColor3 = Color3.fromRGB(0,0,0)}, 0.2) |
2438 | end |
2439 | if themeList.SchemeColor == Color3.fromRGB(0,0,0) then |
2440 | Utility:TweenObject(moreInfo, {TextColor3 = Color3.fromRGB(255,255,255)}, 0.2) |
2441 | end |
2442 | local hovering = false |
2443 | |
2444 | colorElement.MouseEnter:Connect(function() |
2445 | if not focusing then |
2446 | game.TweenService:Create(colorElement, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), { |
2447 | BackgroundColor3 = Color3.fromRGB(themeList.ElementColor.r * 255 + 8, themeList.ElementColor.g * 255 + 9, themeList.ElementColor.b * 255 + 10) |
2448 | }):Play() |
2449 | hovering = true |
2450 | end |
2451 | end) |
2452 | colorElement.MouseLeave:Connect(function() |
2453 | if not focusing then |
2454 | game.TweenService:Create(colorElement, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), { |
2455 | BackgroundColor3 = themeList.ElementColor |
2456 | }):Play() |
2457 | hovering = false |
2458 | end |
2459 | end) |
2460 | |
2461 | if themeList.SchemeColor == Color3.fromRGB(255,255,255) then |
2462 | Utility:TweenObject(moreInfo, {TextColor3 = Color3.fromRGB(0,0,0)}, 0.2) |
2463 | end |
2464 | if themeList.SchemeColor == Color3.fromRGB(0,0,0) then |
2465 | Utility:TweenObject(moreInfo, {TextColor3 = Color3.fromRGB(255,255,255)}, 0.2) |
2466 | end |
2467 | coroutine.wrap(function() |
2468 | while wait() do |
2469 | if not hovering then |
2470 | colorElement.BackgroundColor3 = themeList.ElementColor |
2471 | end |
2472 | touch.ImageColor3 = themeList.SchemeColor |
2473 | colorHeader.BackgroundColor3 = themeList.ElementColor |
2474 | togName.TextColor3 = themeList.TextColor |
2475 | moreInfo.BackgroundColor3 = Color3.fromRGB(themeList.SchemeColor.r * 255 - 14, themeList.SchemeColor.g * 255 - 17, themeList.SchemeColor.b * 255 - 13) |
2476 | moreInfo.TextColor3 = themeList.TextColor |
2477 | viewInfo.ImageColor3 = themeList.SchemeColor |
2478 | colorInners.BackgroundColor3 = themeList.ElementColor |
2479 | toggleDisabled.ImageColor3 = themeList.SchemeColor |
2480 | toggleEnabled.ImageColor3 = themeList.SchemeColor |
2481 | togName_2.TextColor3 = themeList.TextColor |
2482 | Sample.ImageColor3 = themeList.SchemeColor |
2483 | end |
2484 | end)() |
2485 | updateSectionFrame() |
2486 | UpdateSize() |
2487 | local plr = game.Players.LocalPlayer |
2488 | local mouse = plr:GetMouse() |
2489 | local uis = game:GetService('UserInputService') |
2490 | local rs = game:GetService("RunService") |
2491 | local colorpicker = false |
2492 | local darknesss = false |
2493 | local dark = false |
2494 | local rgb = rgb |
2495 | local dark = darkness |
2496 | local cursor = rbgcircle |
2497 | local cursor2 = darkcircle |
2498 | local color = {1,1,1} |
2499 | local rainbow = false |
2500 | local rainbowconnection |
2501 | local counter = 0 |
2502 | -- |
2503 | local function zigzag(X) return math.acos(math.cos(X*math.pi))/math.pi end |
2504 | counter = 0 |
2505 | local function mouseLocation() |
2506 | return plr:GetMouse() |
2507 | end |
2508 | local function cp() |
2509 | if colorpicker then |
2510 | local ml = mouseLocation() |
2511 | local x,y = ml.X - rgb.AbsolutePosition.X,ml.Y - rgb.AbsolutePosition.Y |
2512 | local maxX,maxY = rgb.AbsoluteSize.X,rgb.AbsoluteSize.Y |
2513 | if x<0 then x=0 end |
2514 | if x>maxX then x=maxX end |
2515 | if y<0 then y=0 end |
2516 | if y>maxY then y=maxY end |
2517 | x = x/maxX |
2518 | y = y/maxY |
2519 | local cx = cursor.AbsoluteSize.X/2 |
2520 | local cy = cursor.AbsoluteSize.Y/2 |
2521 | cursor.Position = UDim2.new(x,-cx,y,-cy) |
2522 | color = {1-x,1-y,color[3]} |
2523 | local realcolor = Color3.fromHSV(color[1],color[2],color[3]) |
2524 | colorCurrent.BackgroundColor3 = realcolor |
2525 | callback(realcolor) |
2526 | end |
2527 | if darknesss then |
2528 | local ml = mouseLocation() |
2529 | local y = ml.Y - dark.AbsolutePosition.Y |
2530 | local maxY = dark.AbsoluteSize.Y |
2531 | if y<0 then y=0 end |
2532 | if y>maxY then y=maxY end |
2533 | y = y/maxY |
2534 | local cy = cursor2.AbsoluteSize.Y/2 |
2535 | cursor2.Position = UDim2.new(0.5,0,y,-cy) |
2536 | cursor2.ImageColor3 = Color3.fromHSV(0,0,y) |
2537 | color = {color[1],color[2],1-y} |
2538 | local realcolor = Color3.fromHSV(color[1],color[2],color[3]) |
2539 | colorCurrent.BackgroundColor3 = realcolor |
2540 | callback(realcolor) |
2541 | end |
2542 | end |
2543 | |
2544 | local function setcolor(tbl) |
2545 | local cx = cursor.AbsoluteSize.X/2 |
2546 | local cy = cursor.AbsoluteSize.Y/2 |
2547 | color = {tbl[1],tbl[2],tbl[3]} |
2548 | cursor.Position = UDim2.new(color[1],-cx,color[2]-1,-cy) |
2549 | cursor2.Position = UDim2.new(0.5,0,color[3]-1,-cy) |
2550 | local realcolor = Color3.fromHSV(color[1],color[2],color[3]) |
2551 | colorCurrent.BackgroundColor3 = realcolor |
2552 | end |
2553 | local function setrgbcolor(tbl) |
2554 | local cx = cursor.AbsoluteSize.X/2 |
2555 | local cy = cursor.AbsoluteSize.Y/2 |
2556 | color = {tbl[1],tbl[2],color[3]} |
2557 | cursor.Position = UDim2.new(color[1],-cx,color[2]-1,-cy) |
2558 | local realcolor = Color3.fromHSV(color[1],color[2],color[3]) |
2559 | colorCurrent.BackgroundColor3 = realcolor |
2560 | callback(realcolor) |
2561 | end |
2562 | local function togglerainbow() |
2563 | if rainbow then |
2564 | game.TweenService:Create(toggleEnabled, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), { |
2565 | ImageTransparency = 1 |
2566 | }):Play() |
2567 | rainbow = false |
2568 | rainbowconnection:Disconnect() |
2569 | else |
2570 | game.TweenService:Create(toggleEnabled, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), { |
2571 | ImageTransparency = 0 |
2572 | }):Play() |
2573 | rainbow = true |
2574 | rainbowconnection = rs.RenderStepped:Connect(function() |
2575 | setrgbcolor({zigzag(counter),1,1}) |
2576 | counter = counter + 0.01 |
2577 | end) |
2578 | end |
2579 | end |
2580 | |
2581 | onrainbow.MouseButton1Click:Connect(togglerainbow) |
2582 | -- |
2583 | mouse.Move:connect(cp) |
2584 | rgb.MouseButton1Down:connect(function()colorpicker=true end) |
2585 | dark.MouseButton1Down:connect(function()darknesss=true end) |
2586 | uis.InputEnded:Connect(function(input) |
2587 | if input.UserInputType.Name == 'MouseButton1' or input.UserInputType.Name == 'Touch' then |
2588 | if darknesss then darknesss = false end |
2589 | if colorpicker then colorpicker = false end |
2590 | end |
2591 | end) |
2592 | setcolor({h,s,v}) |
2593 | end |
2594 | |
2595 | function Elements:NewLabel(title) |
2596 | local labelFunctions = {} |
2597 | local label = Instance.new("TextLabel") |
2598 | local UICorner = Instance.new("UICorner") |
2599 | label.Name = "label" |
2600 | label.Parent = sectionInners |
2601 | label.BackgroundColor3 = themeList.SchemeColor |
2602 | label.BorderSizePixel = 0 |
2603 | label.ClipsDescendants = true |
2604 | label.Text = title |
2605 | label.Size = UDim2.new(0, 352, 0, 33) |
2606 | label.Font = Enum.Font.Gotham |
2607 | label.Text = " "..title |
2608 | label.RichText = true |
2609 | label.TextColor3 = themeList.TextColor |
2610 | Objects[label] = "TextColor3" |
2611 | label.TextSize = 14.000 |
2612 | label.TextXAlignment = Enum.TextXAlignment.Left |
2613 | |
2614 | UICorner.CornerRadius = UDim.new(0, 4) |
2615 | UICorner.Parent = label |
2616 | |
2617 | if themeList.SchemeColor == Color3.fromRGB(255,255,255) then |
2618 | Utility:TweenObject(label, {TextColor3 = Color3.fromRGB(0,0,0)}, 0.2) |
2619 | end |
2620 | if themeList.SchemeColor == Color3.fromRGB(0,0,0) then |
2621 | Utility:TweenObject(label, {TextColor3 = Color3.fromRGB(255,255,255)}, 0.2) |
2622 | end |
2623 | |
2624 | coroutine.wrap(function() |
2625 | while wait() do |
2626 | label.BackgroundColor3 = themeList.SchemeColor |
2627 | label.TextColor3 = themeList.TextColor |
2628 | end |
2629 | end)() |
2630 | updateSectionFrame() |
2631 | UpdateSize() |
2632 | function labelFunctions:UpdateLabel(newText) |
2633 | if label.Text ~= " "..newText then |
2634 | label.Text = " "..newText |
2635 | end |
2636 | end |
2637 | return labelFunctions |
2638 | end |
2639 | return Elements |
2640 | end |
2641 | return Sections |
2642 | end |
2643 | return Tabs |
2644 | end |
2645 | return Kavo |