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