· 6 years ago · Jul 26, 2019, 10:22 AM
1local Spice
2Spice = setmetatable({
3 Audio = setmetatable({
4 new = function(name,id,props)
5 local sound = setmetatable({
6 Name = name;
7 Length = 0;
8 connect = function(self,...)
9 return Spice.Audio.connect(self,...)
10 end;
11 disconnect = function(self,...)
12 return Spice.Audio.disconnect(self,...)
13 end;
14 },{
15 Sound = Spice.newInstance('Sound',{SoundId = 'rbxassetid://'..id});
16 __call = function(self,parent,start,en)
17 local start, en = start and start or self.StartTime or 0, en and en or self.EndTime or self.Length
18 local a = self.so:Clone()
19 a.Parent = parent
20 a.TimePosition = start
21 a:Play()
22 Spice.destroyIn(a,en-start)
23 end;
24 __index = function(self,ind)
25 local soun = getmetatable(self).Sound
26 if Spice.Properties.hasProperty(soun,ind) then
27 return Spice.Misc.getArgument(2,Spice.Properties.hasProperty(soun,ind))
28 elseif ind:sub(1,2):lower() == 'so' then
29 return soun
30 else
31 return false
32 end
33 end;
34 });
35 sound.Sound.Parent = workspace
36 repeat wait() until sound.Sound.TimeLength ~= 0
37 sound.Length = sound.Sound.TimeLength
38 sound.Sound.Parent = nil
39 getmetatable(Spice.Audio).Sounds[name] = sound;
40 getmetatable(Spice.Audio).Remotes[name] = {};
41 Spice.Audio.setSoundProperties(sound, props or {})
42 return sound
43 end;
44 getSound = function(name)
45 return Spice.getAudio(name).Sound
46 end;
47 getAudio = function(name)
48 return type(name) == 'string' and getmetatable(Spice.Audio).Sounds[name] or type(name) == 'table' and name.Sound and name or false, type(name) == 'string' and name or type(name) == 'table' and name.Sound and name.Name
49 end;
50 getAudioConnections = function(name)
51 local a,b = Spice.getAudio(name)
52 return getmetatable(Spice.Audio).Remotes[b]
53 end;
54 setSoundProperties = function(name,prop)
55 if type(name) == 'string' then name = Spice.getSound(name) end
56 Spice.Properties.setProperties(name,prop)
57 for i,v in pairs(prop)do
58 if i == 'StartTime' or i == 'EndTime' then
59 name[i] = v
60 end
61 end
62 end;
63 connect = function(name,object,connector,...)
64 local audio, name = Spice.getAudio(name)
65 local args = {...}
66 local rems = Spice.getAudioConnections(name)
67 if not rems[object] then
68 rems[object] = {}
69 end
70 local connect = object[connector]:connect(function()
71 audio(object,unpack(args))
72 end)
73 rems[object][connector] = connect
74 end;
75 disconnect = function(name,button,con)
76 local audio, name = Spice.getAudio(name)
77 local rems = Spice.getAudioConnections(name)
78 local but = rems[button]
79 if not button then
80 for butz,v in next,rems do
81 for cons, x in next, v do
82 Spice.Audio.disconnect(name,butz,cons)
83 end
84 end
85 elseif not con then
86 for i,v in next,but do
87 Spice.Audio.disconnect(name,button,i)
88 end
89 else
90 but[con]:Disconnect()
91 end
92 end;
93 play = function(name,...)
94 Spice.getSound(name)(...)
95 end;
96 },{
97 Sounds = {};
98 Remotes = {};
99 });
100 Color = setmetatable({
101 fromRGB = function(r,g,b)
102 return Color3.fromRGB(r,g,b)
103 end;
104 toRGB = function(color)
105 if not color then return nil end
106 local r = Spice.Misc.round
107 return r(color.r*255),r(color.g*255),r(color.b*255)
108 end;
109 editRGB = function(color,...)
110 local round,op = Spice.Misc.round,Spice.Misc.operation
111 local sign,nr,ng,nb,nc
112 local args = {...}
113 if type(args[1]) ~= 'string' then
114 sign = '+'
115 nr,bg,nb = args[1],args[2],args[3]
116 else
117 sign = args[1]
118 nr,ng,nb = args[2],args[3],args[4]
119 args[1],args[2],args[3] = nr,ng,nb
120 end
121 local r,g,b = Spice.Color.toRGB(color)
122 nc = {r,g,b}
123 if not b then
124 if not g then
125 g = 1
126 end
127 nc[g] = op(nc[g],r,sign)
128 else
129 for i,v in pairs(nc)do
130 nc[i] = op(v,args[i],sign)
131 end
132 end
133 return Color3.fromRGB(unpack(nc))
134 end;
135 setRGB = function(color,...)
136 local args = {...}
137 local nr,ng,nb,nc
138 local r,g,b = Spice.Color.toRGB(color)
139 nc = {r,g,b}
140 if #args < 3 then
141 if not args[2] then
142 args[2] = 1
143 end
144 nc[args[2]] = args[1]
145 else
146 for i,v in pairs(nc)do
147 nc[i] = args[i]
148 end
149 end
150 return Color3.fromRGB(unpack(nc))
151 end;
152 fromHSV = function(h,s,v)
153 return Color3.fromHSV(h/360,s/100,v/100)
154 end;
155 toHSV = function(color)
156 if not color then return nil end
157 local r = Spice.Misc.round
158 local h,s,v = Color3.toHSV(color)
159 return r(h*360),r(s*100),r(v*100)
160 end;
161 editHSV = function(color,...)
162 local round,op = Spice.Misc.round,Spice.Misc.operation
163 local sign,nr,ng,nb,nc
164 local args = {...}
165 if type(args[1]) ~= 'string' then
166 sign = '+'
167 nr,bg,nb = args[1],args[2],args[3]
168 else
169 sign = args[1]
170 nr,ng,nb = args[2],args[3],args[4]
171 args[1],args[2],args[3] = nr,ng,nb
172 end
173 local r,g,b = Spice.Color.toHSV(color)
174 nc = {r,g,b}
175 if not b then
176 if not g then
177 g = 1
178 end
179 nc[g] = op(nc[g],r,sign)
180 else
181 for i,v in pairs(nc)do
182 nc[i] = op(v,args[i],sign)
183 end
184 end
185 return Spice.Color.fromHSV(unpack(nc))
186 end;
187 setHSV = function(color,...)
188 local args = {...}
189 local nr,ng,nb,nc
190 local r,g,b = Spice.Color.toHSV(color)
191 nc = {r,g,b}
192 if #args < 3 then
193 if not args[2] then
194 args[2] = 1
195 end
196 nc[args[2]] = args[1]
197 else
198 for i,v in pairs(nc)do
199 nc[i] = args[i] and args[i] or nc[i]
200 end
201 end
202 return Spice.Color.fromHSV(unpack(nc))
203 end;
204 fromHex = function(hex)
205 if hex:sub(1,1) == '#' then
206 hex = hex:sub(2)
207 end
208 local r,g,b
209 if #hex >= 6 then
210 r = tonumber(hex:sub(1,2),16)
211 g = tonumber(hex:sub(3,4),16)
212 b = tonumber(hex:sub(5,6),16)
213 elseif #hex >= 3 then
214 r = tonumber(hex:sub(1,1):rep(2),16)
215 g = tonumber(hex:sub(2,2):rep(2),16)
216 b = tonumber(hex:sub(3,3):rep(2),16)
217 end
218 return Color3.fromRGB(r,g,b)
219 end;
220 toHex = function(color,hash)
221 if not color then return nil end
222 local r,g,b = Spice.Color.toRGB(color)
223 r = string.format('%02X',r)
224 g = string.format('%02X',g)
225 b = string.format('%02X',b)
226 return (not hash and '#' or '')..tostring(r)..tostring(g)..tostring(b)
227 end;
228 fromString = function(pName)
229 local colors = {
230 Color3.new(253/255, 41/255, 67/255), -- BrickColor.new("Bright red").Color,
231 Color3.new(1/255, 162/255, 255/255), -- BrickColor.new("Bright blue").Color,
232 Color3.new(2/255, 184/255, 87/255), -- BrickColor.new("Earth green").Color,
233 BrickColor.new("Bright violet").Color,
234 BrickColor.new("Bright orange").Color,
235 BrickColor.new("Bright yellow").Color,
236 BrickColor.new("Light reddish violet").Color,
237 BrickColor.new("Brick yellow").Color
238 }
239 local value = 0
240 for index = 1, #pName do
241 local cValue = string.byte(string.sub(pName, index, index))
242 local reverseIndex = #pName - index + 1
243 if #pName%2 == 1 then
244 reverseIndex = reverseIndex - 1
245 end
246 if reverseIndex%4 >= 2 then
247 cValue = -cValue
248 end
249 value = value + cValue
250 end
251 return colors[(value % #colors) + 1]
252 end;
253 getReciprocal = function(color)
254 local h,s,v = Spice.Color.toHSV(color)
255 return Spice.Color.fromHSV(h,v,s)
256 end;
257 getInverse = function(color)
258 local h,s,v = Spice.Color.toHSV(color)
259 return Spice.Color.fromHSV((h + 180) % 360, v, s)
260 end;
261 getObjectsOfColor = function(color,directory)
262 local objs = {}
263 for i,obj in pairs(Spice.Instance:getInstanceOf(directory):GetDescendants())do
264 for prop, val in pairs(Spice.Properties.getProperties(obj))do
265 if val == color then
266 table.insert(objs,obj)
267 end
268 end
269 end
270 return objs
271 end;
272 insertColor = function(name,col,...)
273 local index = getmetatable(Spice.Color).Colors
274 local subs = {}
275 for i,v in next,{...} or {} do
276 if not index[v] then
277 index[v] = {}
278 end
279 index = index[v]
280 end
281 for i,v in next, type(col) == 'table' and col or {} do
282 if type(v) == 'table' then
283 rawset(subs,i,v)
284 if type(i) == 'number' then
285 table.remove(col,i)
286 else
287 col[i] = nil
288 end
289 end
290 end
291 if index[name] then
292 Spice.Table.insert(index[name],col)
293 else
294 index[name] = type(col) == 'table' and col or {col}
295 end
296 for i,v in next,subs do
297 Spice.Color.insertColor(name,v,unpack({...}),i)
298 end
299 end;
300 getColor = function(name,id,...)
301 local set = type(id) == 'string' and Spice.Color.getColorSet(name,id,...) or Spice.Color.getColorSet(name,...)
302 return set and set[type(id) == 'number' and id or next(set)]
303 end;
304 getColorSet = function(name,...)
305 local set = {}
306 local index = getmetatable(Spice.Color).Colors
307 for i,v in next,{...} do
308 index = Spice.Table.search(index,v)
309 end
310 local col = index[name]
311 for i,v in next, col do
312 if typeof(v) == 'Color3' then
313 set[i] = v
314 end
315 end
316 return set
317 end;
318 removeColor = function(name,...)
319 local index = getmetatable(Spice.Color).Colors
320 for i,v in next,{...} or {} do
321 index = index[v]
322 end
323 index[name] = nil
324 end;
325 new = function(...)
326 local args = {...}
327 if type(args[1]) == 'string' then
328 if args[1]:sub(1,1) == '#' then
329 return Spice.Color.fromHex(args[1])
330 else
331 return Spice.Color.getColor(...)
332 end
333 elseif args[4] and args[4] == true then
334 return Spice.Color.fromHSV(args[1],args[2],args[3])
335 elseif #args == 3 then
336 return Spice.Color.fromRGB(args[1],args[2],args[3])
337 end
338 end;
339 },{
340 Colors = {};
341 });
342 Effects = setmetatable({
343 --TweenInfo: Time EasingStyle EasingDirection RepeatCount Reverses DelayTime
344 --TweenCreate: Instance TweenInfo dictionary
345 new = function(name,func)
346 getmetatable(Spice.Effects).Effects[name] = func
347 end;
348 newLocal = function(who,name,func)
349 local effects = Spice.Effects
350 local storage = getmetatable(effects).Effects
351 local id = #storage..'_'..who.Name..'_'..name
352 storage[id] = name
353 return {
354 Name = name;
355 ID = id;
356 Function = func;
357 affect = function(self,who,...)
358 effects.affect(who,self.Function,...)
359 end;
360 affectChildren = function(self,...)
361 effects.affectChildren(who,self.Function,...)
362 end;
363 affectDescendants = function(self,...)
364 effects.affectDescendants(who,self.Function,...)
365 end;
366 affectChildAdded = function(self,...)
367 effects.affectChildAdded(who,self.Function,...)
368 end
369 }
370 end;
371 getEffect = function(name)
372 return Spice.Table.search(getmetatable(Spice.Effects).Effects,name)
373 end;
374 affect = function(who,name,...)
375 who = Spice.Instance.getInstanceOf(who)
376 name = type(name) == 'function' and name or Spice.Effects.getEffect(name)
377 return name(who,...)
378 end;
379 affectChildren = function(who,name,...)
380 who = Spice.Instance.getInstanceOf(who)
381 for i,v in next,who:GetChildren() do
382 Spice.Effects.affect(v,name,...)
383 end
384 end;
385 affectDescendants = function(who,name,...)
386 who = Spice.Instance.getInstanceOf(who)
387 for i,v in next,who:GetDescendants() do
388 Spice.Effects.affect(v,name,...)
389 end
390 end;
391 affectChildAdded = function(who,name,...)
392 who = Spice.Instance.getInstanceOf(who)
393 local args = {...}
394 who.ChildAdded:connect(function(c)
395 Spice.Effects.affect(c,name,unpack(args))
396 end)
397 end;
398 affectAllChildren = function(who, name, ...)
399 Spice.Effects.affectChildren(who,name,...)
400 Spice.Effects.affectChildAdded(who,name,...)
401 end;
402 },
403 {
404 Effects = {};
405 });
406 Imagery = setmetatable({
407 new = function(name, id,props, ...)
408 if type(id) ~= 'string' then id = 'rbxassetid://'..id end
409 if not props then props = {} end
410 props.Name = name
411 props.Image = id
412 props.BackgroundTransparency = 1
413 local ImageLabel = Instance.new('ImageLabel')
414 Spice.Properties.setProperties(ImageLabel,props)
415 local index = getmetatable(Spice.Imagery).Images
416 for i,v in next,{...} do
417 if index[v] and type(index[v]) ~= 'table' then index[v] = {index[v]} end
418 if not index[v] then index[v] = {} end
419 index = index[v]
420 end
421 index[name] = ImageLabel
422 end;
423 get = function(...)
424 local index = getmetatable(Spice.Imagery).Images
425 for i,v in next, {...} do
426 index = index[v]
427 end
428 return index
429 end;
430 getImage = function(name,...)
431 local got = Spice.Imagery.get(...)
432 local gotten = got[name]
433 if type(gotten) == 'table' then
434 for i,v in next, gotten do
435 if type(v) == 'userdata' then
436 return v:Clone(), i
437 end
438 end
439 else
440 return gotten:Clone()
441 end
442 end;
443 insertImage = function(parent,props,...)
444 local image = Spice.Imagery.getImage(...)
445 image.Parent = parent
446 Spice.Properties.setProperties(image,props)
447 end;
448 getImageProperties = function(image)
449 return {ImageRectOffset = image.ImageRectOffset, ImageRectSize = image.ImageRectSize, ScaleType = image.ScaleType, Image = image.Image, ImageColor3 = image.ImageColor3}
450 end;
451 play = function(to,speed,loop,...)
452 local got = Spice.Imagery.get(...)
453 spawn(function()
454 repeat
455 for i,v in next, got do
456 if type(v) == 'userdata' then
457 Spice.Properties.setProperties(to, Spice.Imagery.getImageProperties(v))
458 end
459 wait(speed)
460 end
461 until not loop
462 end)
463 end;
464 fromSheet = function(id, xaxis, yaxis, xsiz, ysiz, names,...)
465 local cnt = 1
466 for y = 0, yaxis - 1 do
467 for x = 0, xaxis - 1 do
468 local index = Spice.Misc.stringFilterOut(names[cnt] or 'Icon','_',nil,true)
469 local name = index[#index]
470 table.remove(index,#index)
471 Spice.Imagery.new(name, id, {ImageRectOffset = Vector2.new(x*xsiz, y*ysiz), ImageRectSize = Vector2.new(xsiz, ysiz)}, ..., unpack(index))
472 cnt = cnt + 1
473 end
474 end
475 end;
476 toImage = function(object, ...)
477 Spice.Properties.setProperties(object, Spice.Imagery.getImageProperties(Spice.Imagery.getImage(...)))
478 end;
479 },
480 {
481 Images = {};
482 });
483 Instance = setmetatable({
484 newClass = function(name,funct)
485 local self = Spice.Instance
486 local pt = Spice.Table
487 getmetatable(self).Classes[name] = setmetatable({funct,Objects = {}},{
488 __call = function(self,...)
489 return self[1](...)
490 end;
491 __index = function(self,ind)
492 return pt.contains(self.Objects,ind)
493 end;
494 })
495 end;
496 isA = function(is,a)
497 local self = Spice.Instance
498 if self.isAClass(is) then
499 is = Instance.new(is)
500 return is:IsA(a)
501 end
502 return false
503 end;
504 isAClass = function(is,custom)
505 if pcall(function() return Instance.new(is) end) or custom and getmetatable(Spice.Instance).Classes[is] then
506 return true
507 else
508 return false
509 end
510 end;
511 newPure = function(class,...)
512 local args = {...}
513 if type(args[#args]) ~= 'table' then
514 table.insert(args,{})
515 end
516 table.insert(args[#args],true)
517 return Spice.Instance.new(class,unpack(args))
518 end;
519 new = function(class,...)
520 local self = Spice.Instance
521 local pt = Spice.Table
522 local args,storage,new,parent,properties = {...},getmetatable(self).Classes
523 if typeof(args[1]) == 'Instance' or self.isAnObject(args[1]) then
524 parent = self.getInstanceOf(args[1])
525 table.remove(args,1)
526 end
527 if type(args[#args]) == 'table' then
528 properties = args[#args]
529 table.remove(args,#args)
530 end
531 new = pt.find(storage,class) and pt.find(storage,class)(unpack(args)) or Instance.new(class)
532 new.Parent = parent or new.Parent
533 local a = next(properties or {})
534 if type(a) ~= 'number' then
535 Spice.Properties.setPropertiesToDefault(new)
536 else
537 table.remove(properties,a)
538 end
539 Spice.Properties.setProperties(new,properties or {})
540 return new
541 end;
542 newInstance = function(class,parent,props)
543 local new = Instance.new(class)
544 local parent = Spice.Instance.getInstanceOf(parent)
545 props = props or type(parent) == 'table' and parent
546 parent = type(parent) ~= 'table' and parent or nil
547 local a = next(props or {})
548 return Spice.Properties.setProperties(Instance.new(class,parent),props or {})
549 end;
550 newObject = function(...)
551 local args,obj,class,parent,props = {...},{}
552 for i,v in next,args do
553 class = type(v) == 'string' and Spice.Instance.isAClass(v) and v or class
554 parent = typeof(v) == 'Instance' and v or parent
555 props = type(v) == 'table' and Spice.Table.length(obj) > 0 and v or props
556 obj = type(v) == 'table' and Spice.Table.length(obj) == 0 and v or obj
557 end
558 local ins = Spice.Instance.newInstance(class,parent)
559 local new = newproxy(true)
560 getmetatable(new).__index = {setmetatable = function(self, tab) for i,v in next, getmetatable(self) do getmetatable(self)[i] = nil end for i,v in next, tab do getmetatable(self)[i] = v end end}
561 local newmeta = {
562 Instance = ins, Object = obj, Index = {}, NewIndex = {};
563 __index = function(proxy,ind)
564 local self = getmetatable(proxy)
565 if ind == 'Instance' or ind == 'Object' then return self[ind] end
566 if Spice.Table.contains(self.Index,ind) then
567 local ret = Spice.Table.find(self.Index,ind)
568 return type(ret) ~= 'function' and ret or ret(proxy)
569 elseif Spice.Table.contains(self.Object,ind) or not Spice.Properties.hasProperty(self.Instance,ind) then
570 return Spice.Table.find(self.Object,ind)
571 elseif Spice.Properties.hasProperty(self.Instance,ind) then
572 return self.Instance[Spice.Properties[ind]]
573 end
574 end;
575 __newindex = function(proxy,ind,new)
576 local self = getmetatable(proxy)
577 if Spice.Table.contains(self.NewIndex,ind) then
578 Spice.Table.find(self.NewIndex,ind)(self,new)
579 elseif Spice.Table.contains(self.Object,ind) or not Spice.Properties.hasProperty(self.Instance,ind) or type(new) == 'function' then
580 rawset(self.Object,ind,new)
581 elseif Spice.Properties.hasProperty(self.Instance,ind) then
582 self.Instance[Spice.Properties[ind]] = new
583 end
584 end;
585 __call = function(self,prop)
586 local self = getmetatable(self)
587 Spice.Properties.setProperties(self.Instance,prop)
588 end;
589 __namecall = function(proxy, ...)
590 local args = {...}
591 local name = args[#args]
592 table.remove(args,#args)
593 local self = getmetatable(proxy)
594 local default = {
595 Index = function(name,what)
596 rawset(self.Index,name,what)
597 end;
598 NewIndex = function(name,what)
599 if type(what) == 'function' then
600 rawset(self.NewIndex,name,what)
601 end
602 end;
603 Clone = function(parent,prop)
604 return Spice.Instance.cloneObject(proxy,parent,prop)
605 end;
606 }
607 if default[name] then return default[name](unpack(args)) end
608 if self.Instance[name] and type(self.Instance[name]) == 'function' then
609 return self.Instance[name](self.Instance,unpack(args))
610 end
611 end
612 }
613 new:setmetatable(newmeta)
614 rawset(getmetatable(Spice.Instance).Objects,new.Instance,new)
615 Spice.Properties.setProperties(new,props or {})
616 return new
617 end;
618 clone = function(ins,parent,prop)
619 if type(ins) == 'table' then
620 return Spice.Instance.cloneObject(ins,parent,prop)
621 else
622 local clone = ins:Clone()
623 clone.Parent = typeof(parent) == 'Instance' and parent or nil
624 Spice.Properties.setProperties(clone, prop or type(parent) == 'table' or {})
625 return clone
626 end
627 end;
628 cloneObject = function(obj,parent,prop)
629 local ins = obj.Instance:Clone()
630 ins.Parent = parent
631 local clone = Spice.Table.clone(obj)
632 clone.Instance = ins
633 Spice.setProperties(clone.Instance, prop and prop or {})
634 rawset(getmetatable(Spice.Instance).Objects,clone.Instance,clone)
635 return clone
636 end;
637 getInstanceOf = function(who)
638 local self = getmetatable(Spice.Instance).Objects
639 return Spice.Table.indexOf(self,who) or who
640 end;
641 getObjectOf = function(who)
642 local self = getmetatable(Spice.Instance).Objects
643 return Spice.Table.find(self,who) or nil
644 end;
645 isAnObject = function(who)
646 return Spice.Instance.getObjectOf(who) and true or false
647 end;
648 getAncestors = function(who)
649 local anc = {game}
650 who = Spice.Instance.getInstanceOf(who)
651 local chain = Spice.Misc.stringFilterOut(who:GetFullName(),'%.','game',nil,true)
652 local ind = game
653 for i,v in next,chain do
654 ind = ind[v]
655 table.insert(anc,ind)
656 end
657 return Spice.Table.pack(Spice.Table.reverse(anc),2)
658 end;
659 },{
660 Classes = {};
661 Objects = {};
662 });
663 Metasphere = setmetatable({},{
664 __index = function(self,index)
665 return getmetatable(Spice[index])
666 end;
667 __newindex = function(self,index,newindex)
668 setmetatable(Spice[index],newindex)
669 end;
670 });
671 Misc = {
672 getAssetId = function(id)
673 id = tonumber(id)
674 id = game:GetService("InsertService"):LoadAsset(id):GetChildren()[1]
675 id = id[Spice.Misc.switch('Graphic','PantsTemplate','ShirtTemplate','Texture'):Filter('ShirtGraphic', 'Shirt', 'Pants', 'Decal')(id.ClassName)]
676 return id:sub(id:find'='+1)
677 end;
678 getTextSize = function(text)
679 if type(text) == 'string' then
680 text = Spice.Instance.new("TextLabel",{Text = text})
681 end
682 return game:GetService("TextService"):GetTextSize(text.Text,text.TextSize,text.Font,text.AbsoluteSize)
683 end;
684 getPlayer = function(speaker, ...)
685 local players = setmetatable({},{
686 __call = function(self, plr)
687 if not Spice.Table.contains(self,plr) then
688 table.insert(self,plr)
689 end
690 end
691 })
692 local gp = game:GetService("Players")
693 for _,v in next, {...} do
694 if v == 'all' then
695 for _,plr in next, gp:GetPlayers() do
696 players(plr)
697 end
698 elseif v == 'others' then
699 for _, plr in next, gp:Players() do
700 if plr ~= speaker then
701 players(plr)
702 end
703 end
704 elseif v == 'me' then
705 players(speaker)
706 else
707 local results = Spice.Table.search(gp:GetPlayers(), v, true, true)
708 for i, plr in next, results do
709 print(typeof(plr), plr, typeof(Spice.Table.search(gp:GetPlayers(), v)))
710 players(plr)
711 end
712 end
713 end
714 return setmetatable(players,{__call = function(self, func) for i,v in next,self do func(v) end end})
715 end;
716 doAfter = function(wai,fun,...)
717 local args = {...}
718 spawn(function()
719 wait(wai)
720 do fun(unpack(args)) end
721 end)
722 end;
723 runTimer = function()
724 return setmetatable({startTime = 0,running = false},{
725 __call = function(self,start)
726 local gettime
727 if start or not self.running then
728 self.running = true
729 self.startTime = tick()
730 return true, tick()
731 else
732 self.running = false
733 gettime = tick() - self.startTime
734 self.startTime = 0
735 end
736 return gettime or self.startTime
737 end
738 })
739 end;
740 searchAPI = function(link,typ)
741 local tab = {}
742 link = game.HttpService:UrlEncode(link:sub(link:find'?'+1,#link))
743 local proxy = 'https://www.classy-studios.com/APIs/Proxy.php?Subdomain=search&Dir=catalog/json?'
744 if not typ then
745 link = game:GetService'HttpService':JSONDecode(game:GetService'HttpService':GetAsync(proxy..link))
746 else
747 link = game:GetService'HttpService':JSONDecode(game:HttpGetAsync(proxy..link))
748 end
749 for i,v in pairs(link)do
750 tab[v.Name] = v
751 end
752 return tab
753 end;
754 getArgument = function(num,...)
755 return ({...})[num]
756 end;
757 destroyIn = function(who,seconds)
758 game:GetService("Debris"):AddItem(Spice.Instance.getInstanceOf(who),seconds)
759 end;
760 exists = function(yes)
761 return yes ~= nil and true or false
762 end;
763 stringFilterOut = function(string,starting,ending,...)
764 local args,disregard,tostr,flip = {...}
765 for i,v in pairs(args)do
766 if type(v) == 'boolean' then
767 if flip == nil then flip = v else tostr = v end
768 elseif type(v) == 'string' then
769 disregard = v
770 end
771 end
772 local filter,out = {},{}
773 for i in string:gmatch(starting) do
774 if not Spice.Misc.contains(string:match(starting),type(disregard)=='table' and unpack(disregard) or disregard) then
775 local filtered = string:sub(string:find(starting),ending and Spice.getArgument(2,string:find(ending)) or Spice.getArgument(2,string:find(starting)))
776 local o = string:sub(1,(ending and string:find(ending) or string:find(starting))-1)
777 table.insert(filter,filtered~=disregard and filtered or nil)
778 table.insert(out,o~=disregard and o or nil)
779 else
780 table.insert(out,string:sub(1,string:find(starting))~=disregard and string:sub(1,string:find(starting)) or nil)
781 end
782 string = string:sub((ending and Spice.getArgument(2,string:find(ending)) or Spice.getArgument(2,string:find(starting))) + 1)
783 end
784 table.insert(out,string)
785 filter = tostr and table.concat(filter) or filter
786 out = tostr and table.concat(out) or out
787 return flip and out or filter, flip and filter or out
788 end;
789 dynamicProperty = function(obj,to)
790 obj = Spice.Instance.getInstanceOf(obj)
791 if obj.ClassName:find'Text' then
792 return 'Text'
793 elseif obj.ClassName:find'Image' then
794 return 'Image'
795 end
796 return 'Background'..to or ''
797 end;
798 switch = function(...)
799 return setmetatable({filter = {},Default = false,data = {...},
800 Filter = function(self,...)
801 self.filter = {...}
802 return self
803 end;
804 Get = function(self,what)
805 local yes = Spice.Misc.exists
806 local i = what
807 if yes(Spice.Table.find(self.data,what)) then
808 i = Spice.Table.indexOf(self.data,what)
809 end
810 if yes(Spice.Table.find(self.filter,what)) then
811 i = Spice.Table.indexOf(self.filter,what)
812 end
813 return self.data[i]
814 end},{
815 __call = function(self,what,...)
816 local get = self:Get(what)
817 return get and (type(get) ~= 'function' and get or get(...)) or self.Default
818 end;
819 })
820 end;
821 round = function(num)
822 return math.floor(num+.5)
823 end;
824 contains = function(containing,...)
825 for _,content in next,{...} do
826 if content == containing then
827 return true
828 end
829 end
830 return false
831 end;
832 operation = function(a,b,opa)
833 return Spice.Misc.switch(a+b,a-b,a*b,a/b,a%b,a^b,a^(1/b),a*b,a^b,a^(1/b)):Filter('+','-','*','/','%','^','^/','x','pow','rt')(opa)
834 end;
835 };
836 Positioning = {
837 new = function(...)
838 local args = {...}
839 if #args == 4 or (typeof(args[1]) == 'UDim' or typeof(args[2]) == 'UDim') then
840 return UDim2.new(unpack(args))
841 else
842 local a,b = args[1], args[3] == nil and args[1] or args[2]
843 return Spice.Misc.switch(UDim2.new(a,0,b,0),UDim2.new(0,a,0,b),UDim2.new(a,b,a,b),UDim2.new(a,0,0,b),UDim2.new(0,a,b,0)):Filter('s','o','b','so','os')(args[3] or args[2] or 1)
844 end
845 end;
846 fromUDim = function(a,b)
847 return Spice.Misc.switch(UDim.new(a,b), UDim.new(a,a))(b and 1 or 2)
848 end;
849 fromVector2 = function(a,b)
850 return Spice.Misc.switch(Vector2.new(a,b), Vector2.new(a,a))(b and 1 or 2)
851 end;
852 fromPosition = function(a,b)
853 local x,y
854 local pos = Spice.Misc.switch(UDim.new(0,0),UDim.new(.5,0),UDim.new(1,0),UDim2.new(.5,0)):Filter('top','mid','bottom','center')
855 y = pos(a) or (pos(b) and b~='mid' and b~='center')
856 pos:Filter('left','mid','right','center')
857 x = pos(b) or (pos(a) and a~='mid' and a~='center')
858 return UDim2.new(x or UDim.new(0,0),y or UDim.new(0,0))
859 end;
860 fromOffset = function(a,b)
861 return UDim2.new(0,a,0,b)
862 end;
863 fromScale = function(a,b)
864 return UDim2.new(a,0,b,0)
865 end;
866 };
867 Properties = setmetatable({
868 getDefault = function(classname)
869 local def = {}
870 for i,v in next, getmetatable(Spice.Properties).Default do
871 if type(i) == 'number' then
872 for i,v in next, v do
873 if Spice.Instance.isA(classname,i) or classname == i or (i == 'GuiText' and classname:find'Text') then
874 table.insert(def,Spice.Table.clone(v))
875 end
876 end
877 else
878 if Spice.Instance.isA(classname,i) or classname == i or (i == 'GuiText' and classname:find'Text') then
879 table.insert(def,Spice.Table.clone(v))
880 end
881 end
882 end
883 for i = 2,#def do
884 def[1] = Spice.Table.mergeTo(def[i],def[1])
885 end
886 return def[1]
887 end;
888 setDefault = function(classname,properties,arch)
889 if arch then
890 local d = getmetatable(Spice.Properties).Default
891 if not d[arch] then
892 d[arch] = {[classname] = properties}
893 else
894 d[arch][classname] = properties
895 end
896 else
897 getmetatable(Spice.Properties).Default[classname] = properties
898 end
899 end;
900 setPropertiesToDefault = function(who)
901 Spice.Properties.setProperties(who,Spice.Properties.getDefault(who.ClassName) or {})
902 end;
903 new = function(name,func,...)
904 local storage = getmetatable(Spice.Properties).Custom
905 storage[name] = setmetatable({func,...},{
906 __call = function(self,...)
907 return self[1](...)
908 end;
909 __index = function(self,indexed)
910 if #self == 1 then
911 return true
912 end
913 for i = 2,#self do
914 if self[i]:lower() == 'all' or indexed:IsA(self[i]) or (self[i] == 'GuiText' and indexed.ClassName:find'Text') then
915 return true
916 end
917 end
918 return false
919 end;
920 })
921 end;
922 hasProperty = function(who,prop)
923 who = Spice.Instance.getInstanceOf(who)
924 if pcall(function() return who[Spice.Properties[prop]] end) then
925 return true, who[Spice.Properties[prop]]
926 else
927 return false
928 end
929 end;
930 getProperties = function(who)
931 who = Spice.Instance.getInstanceOf(who)
932 local p = getmetatable(Spice.Properties).RobloxAPI
933 local new = {}
934 for i,v in next,p do
935 if Spice.Properties.hasProperty(who,v) then
936 rawset(new,v,who[v])
937 end
938 end
939 return new
940 end;
941 setProperties = function(who,props)
942 local vanil = who
943 who = Spice.Instance.getInstanceOf(who)
944 local c = getmetatable(Spice.Properties).Custom
945 for i,v in next,props do
946 local hasnormal, hassub = pcall(function() return vanil[i] and true or false end),pcall(function() return vanil[Spice.Properties[i]] and true or false end)
947 if type(i) == 'string' then
948 local custom,cargs, normal
949 if c[i] and c[i][who] then
950 cargs = v
951 if type(cargs) ~= 'table' then cargs = {cargs} end
952 custom = c(i)
953 end
954 if Spice.Properties[i]:find'Color3' and (type(v) == 'string' or type(v) == 'table') then
955 v = type(v) == 'table' and v or {v}
956 Spice.Theming.insertObject(v[1],vanil,Spice.Properties[i],unpack(Spice.Table.pack(v,2) or {}))
957 elseif hasnormal or hassub then
958 local normal
959 if hasnormal then
960 normal = i
961 else
962 normal = Spice.Properties[i]
963 end
964 if custom and custom <= normal then
965 c[i](who,unpack(cargs))
966 else
967 pcall(function() vanil[normal] = v end)
968 end
969 elseif custom then
970 c[i](who,unpack(cargs))
971 end
972 end
973 end
974 return vanil
975 end;
976 getObjectOfProperty = function(property,directory)
977 directory = Spice.Instance.getInstanceOf(directory)
978 local objects = {}
979 for _,object in next,type(directory) == 'table' and directory or directory:GetDescendants() do
980 if Spice.Properties.hasProperty(object,property) then
981 table.insert(objects,object)
982 end
983 end
984 return objects
985 end;
986
987 },{
988 __call = function(self,ind)
989 return Spice.Table.search(getmetatable(self).RobloxAPI,ind)
990 end;
991 __index = function(self,ind)
992 return Spice.Table.search(getmetatable(self).RobloxAPI,ind) or ind
993 end;
994 Default = {};
995 Custom = setmetatable({},{
996 __call = function(self,ind,take)
997 for i,v in next,self do
998 if i:sub(1,#ind):lower() == ind:lower() then
999 return take and v or i
1000 end
1001 end
1002 return false
1003 end;
1004 __index = function(self,ind)
1005 return self(ind,true)
1006 end});
1007 RobloxAPI = {
1008 'Shape','Anchored','BackSurfaceInput','BottomParamA','BottomParamB','BottomSurface','BottomSurfaceInput','BrickColor','CFrame','CanCollide','CenterOfMass','CollisionGroupId','Color','CustomPhysicalProperties','FrontParamA','FrontParamB','FrontSurface','FrontSurfaceInput';
1009 'LeftParamA','LeftParamB','LeftSurface','LeftSurfaceInput','Locked','Material','Orientation','Reflectance','ResizeIncrement','ResizeableFaces','RightParamA','RightParamB','RightSurface','RightSurfaceInput','RotVelocity','TopParamA','TopParamB','TopSurface','TopSurfaceInput','Velocity';
1010 'Archivable','ClassName','Name','Parent','AttachmentForward','AttachmentPoint','AttachmentPos','AttachmentRight','AttachmentUp';
1011 'Animation','AnimationId','IsPlaying','Length','Looped','Priority','Speed','TimePosition','WeightCurrent','WeightTarget','Axis','CFrame','Orientation';
1012 'Position','Rotation','SeconaryAxis','Visible','WorldAxis','WorldOrientation','WorldPosition','WorldSecondaryAxis','Version','DisplayOrder','ResetOnSpawn','Enabled';
1013 'AbsolutePosition','AbsoluteRotation','AbsoluteSize','ScreenOrientation','ShowDevelopmentGui','Attachment0','Attachment1','Color','CurveSize0','CurveSize1','FaceCamera';
1014 'LightEmission','Segments','Texture','TextureLength','TextureMode','TextureSpeed','Transparency','Width0','Width1','ZOffset','AngularVelocity','MaxTorque','P','Force','D';
1015 'MaxForce','Location','Velocity','CartoonFactor','MaxSpeed','MaxThrust','Target','TargetOffset','TargetRadius','ThrustD','ThrustP','TurnD','TurnP','Value','CameraSubject','CameraType';
1016 'FieldOfView','Focus','HeadLocked','HeadScale','ViewportSize','HeadColor','HeadColor3','LeftArmColor','LeftArmColor3','LeftLegColor','LeftLegColor3','RightArmColor','RightArmColor3','RightLegColor','RightLegColor3','TorsoColor','TorsoColor3';
1017 'BaseTextureId','BodyPart','MeshId','OverlayTextureId','PantsTemplate','ShirtTemplate','Graphic','SkinColor','LoadDefaultChat','CursorIcon','MaxActivationDistance','MaxAngularVelocity','PrimaryAxisOnly','ReactionTorqueEnabled','Responsiveness','RigidityEnabled';
1018 'ApplyAtCenterOfMass','MaxVelocity','ReactionForceEnabled','Radius','Restitution','TwistLimitsEnabled','TwistLowerAngle','TwistUpperAngle','UpperAngle','ActuatorType','AngularSpeed','CurrentAngle','LimitsEnabled','LowerAngle','MotorMaxAcceleration','MotorMaxTorque','ServoMaxTorque','TargetAngle';
1019 'InverseSquareLaw','Magnitude','Thickness','CurrentPosition','LowerLimit','Size','TargetPosition','UpperLimit','Heat','SecondaryColor';
1020 'BackgroundColor3','AnchorPoint','BackgroundTransparency','BorderColor3','BorderSizePixel','ClipsDescendants','Draggable','LayoutOrder','NextSelectionDown','NextSelectionLeft','NextSelectionRight','NextSelectionUp','Selectable','SelectionImageObject','SizeConstraint','SizeFromContents','ZIndex';
1021 'Style','AutoButtonColor','Modal','Selected','Image','ImageColor3','ImageRectOffset','ImageRectSize','ImageTransparency','IsLoaded','ScaleType','SliceCenter','TextSize','TileSize','Font','Text','TextBounds','TextColor3','TextFits';
1022 'TextScaled','TextStrokeColor3','TextStrokeTransparency','TextTransparency','TextWrapped','TextXAlignment','TextYAlignment','Active','AbsoluteWindowSize','BottomImage','CanvasPosition','CanvasSize','HorizontalScrollBarInset','MidImage','ScrollBarThickness','ScrollingEnabled','TopImage','VerticalScrollBarInset';
1023 'VerticalScrollBarPosition','ClearTextOnFocus','MultiLine','PlaceholderColor3','PlaceholderText','ShowNativeInput','Adornee','AlwaysOnTop','ExtentsOffset','ExtentsOffsetWorldSpace','LightInfluence','MaxDistance','PlayerToHideForm','SizeOffset','StudsOffset','StudsOffsetWorldSpace','ToolPunchThroughDistance','Face','DecayTime','Density','Diffusion','Duty','Frequency';
1024 'Depth','Mix','Rate','Attack','GainMakeup','Ratio','Release','SieChain','Threshold','Level','Delay','DryLevel','Feedback','WetLevel','HighGain','LowGain','MidGain','Octave','Volume','MaxSize','MinSize','AspectRatio','DominantAxis','AspectType','MaxTextSize','MinTextSize','CellPadding','CellSize','FillDirectionMaxCells','StartCorner';
1025 'AbsoluteContentSize','FillDirection','HorizontalAlignment','SortOrder','VerticalAlignment','Padding','Animated','Circular','CurrentPage','EasingDirection','EasingStyle','GamepadInputEnabled','ScrollWhellInputEnabled','TweenTime','TouchImputEnable','FillEmptySpaceColumns','FillEmptySpaceRows','MajorAxis','PaddingBottom','PaddingLeft','PaddingRight','PaddingTop','Scale'
1026 }
1027 });
1028 Table = {
1029 insert = function(tabl,...)
1030 for i,v in pairs(...) do
1031 if type(v) == 'table' then
1032 Spice.Table.insert(tabl,v)
1033 else
1034 rawset(tabl,i,v)
1035 end
1036 end
1037 end;
1038 pack = function(tabl,start,en)
1039 local new = {}
1040 for i = start or 1, en or #tabl do
1041 table.insert(new,tabl[i])
1042 end
1043 return new
1044 end;
1045 mergeTo = function(from,to)
1046 for i,v in next, from do
1047 to[i] = v
1048 end
1049 return to
1050 end;
1051 merge = function(a,b)
1052 local a,b = Spice.Table.clone(a), Spice.Table.clone(b)
1053 return Spice.Table.mergeTo(b,a)
1054 end;
1055 clone = function(tab)
1056 local clone = {}
1057 for i,v in next,tab do
1058 if type(v) == 'table' then
1059 clone[i] = Spice.Table.clone(v)
1060 if getmetatable(v) then
1061 local metaclone = Spice.Table.clone(getmetatable(v))
1062 setmetatable(clone[i],metaclone)
1063 end
1064 else
1065 clone[i] = Spice.Instance.getObjectOf(v) or v
1066 end
1067 end
1068 if getmetatable(tab) then
1069 local metaclone = getmetatable(tab)
1070 setmetatable(clone,metaclone)
1071 end
1072 return clone
1073 end;
1074 contains = function(tabl,contains)
1075 for i,v in next,tabl do
1076 if v == contains or (typeof(i) == typeof(contains) and v == contains) or i == contains then
1077 return true,v,i
1078 end
1079 end
1080 return nil
1081 end;
1082 toNumeralIndex = function(tabl)
1083 local new = {}
1084 for index,v in next,tabl do
1085 if type(index) ~= 'number' then
1086 table.insert(new,{index,v})
1087 else
1088 table.insert(new,index,v)
1089 end
1090 end
1091 setmetatable(new,{
1092 __index = function(self,index)
1093 for i,v in next,self do
1094 if type(v) == 'table' and v[1] == index then
1095 return v[2]
1096 end
1097 end
1098 end
1099 })
1100 return new
1101 end;
1102 length = function(tab)
1103 return #Spice.Table.toNumeralIndex(tab)
1104 end;
1105 reverse = function(tab)
1106 local new ={}
1107 for i,v in next,tab do
1108 table.insert(new,tab[#tab-i+1])
1109 end
1110 return new
1111 end;
1112 indexOf = function(tabl,val)
1113 return Spice.Misc.getArgument(3,Spice.Table.contains(tabl,val))
1114 end;
1115 valueOfNext = function(tab,nex)
1116 local i,v = next(tab,nex)
1117 return v
1118 end;
1119 find = function(tabl,this)
1120 return Spice.Misc.getArgument(2,Spice.Table.contains(tabl,this))
1121 end;
1122 search = function(tabl,this,extra,keep)
1123 if not getmetatable(tabl) then setmetatable(tabl,{}) end
1124 local meta = getmetatable(tabl)
1125 if not meta['0US3D'] then
1126 meta['0US3D'] = {}
1127 end
1128 local used = meta['0US3D']
1129 local likely = {}
1130 if used[this] then
1131 return unpack(used[this])
1132 end
1133 if Spice.Table.contains(tabl,this) then
1134 local found = Spice.Table.find(tabl,this)
1135 if not extra then used[this] = {found} return found end
1136 table.insert(likely, found)
1137 end
1138 for i,v in next,tabl do
1139 if type(i) == 'string' or type(v) == 'string' then
1140 local subject = type(i) == 'string' and i or type(v) == 'string' and v
1141 local caps = Spice.Misc.stringFilterOut(subject,'%u',nil,false,true)
1142 local numc = caps..(subject:match('%d+$') or '')
1143 if subject:lower():sub(1,#this) == this:lower() or caps:lower() == this:lower() or numc:lower() == this:lower() then
1144 if not extra then
1145 used[this] = {v, i}
1146 return v, i
1147 end
1148 table.insert(likely,v)
1149 end
1150 end
1151 end
1152 table.sort(likely,function(a,b) if #a == #b then return a:lower() < b:lower() end return #a < #b end);
1153 local resin = Spice.Table.indexOf(tabl,likely[1])
1154 local firstresult = tabl[resin]
1155 used[this] = {keep and #likely > 0 and likely or firstresult and firstresult or false, firstresult and Spice.Table.indexOf(tabl,firstresult), likely}
1156 return keep and #likely > 0 and likely or firstresult and firstresult or false, firstresult and Spice.Table.indexOf(tabl,firstresult), likely
1157 end;
1158 anonSetMetatable = function(tabl,set)
1159 local old = getmetatable(tabl)
1160 local new = Spice.Table.clone(setmetatable(tabl,set))
1161 setmetatable(tabl,old)
1162 return new
1163 end;
1164 };
1165 Theming = setmetatable({
1166 isActive = function(themeName)
1167 for i,v in next, getmetatable(Spice.Theming).Active do
1168 if v.ThemeName == themeName then
1169 return true, v
1170 end
1171 end
1172 return false
1173 end;
1174 newTheme = function(name,...)
1175 getmetatable(Spice.Theming).Themes[name] = setmetatable({
1176 ...
1177 },{...})
1178 end;
1179 setTheme = function(name, ...)
1180 local vals = getmetatable(Spice.Theming).Themes[name]
1181 for i,v in next, {...} do
1182 if v then
1183 vals[i] = v
1184 end
1185 end
1186 local check, active = Spice.Theming.isActive(name)
1187 if check then
1188 for object,v in next, active.Objects do
1189 for property, index in next, v do
1190 pcall(function()
1191 if active.lerp then
1192 Spice.Tweening.new(object,property,vals[index],type(active.lerp) == 'table' and unpack(active.lerp) or active.lerp)
1193 else
1194 object[property] = vals[index]
1195 end
1196 end)
1197 end
1198 end
1199 end
1200 end;
1201 themeToDefault = function(name)
1202 Spice.Theming.setTheme(name, unpack(getmetatable(getmetatable(Spice.Theming).Themes[name])))
1203 end;
1204 getTheme = function(name)
1205 return getmetatable(Spice.Theming).Themes[name]
1206 end;
1207 new = function(name, themeName, ...)
1208 local act = setmetatable({
1209 Objects = {};
1210 ThemeName = themeName;
1211 lerp = false;
1212 Name = name;
1213 toTheme = function(self,to)
1214 Spice.Theming.set(self.Name, to)
1215 end;
1216 Insert = function(self, ...)
1217 Spice.Theming.insertObject(self.Name, ...)
1218 end;
1219 Set = function(self, ...)
1220 Spice.Theming.setTheme(self.ThemeName, ...)
1221 end;
1222 Sync = function(self)
1223 Spice.Theming.sync(self.Name)
1224 end;
1225 toDefault = function(self)
1226 Spice.Theming.themeToDefault(self.ThemeName)
1227 end;
1228 setLerpStyle = function(self,tim,...)
1229 if not tim then
1230 self.lerp = false
1231 elseif ... then
1232 self.lerp = {tim,...}
1233 else
1234 self.lerp = tim
1235 end
1236 end;
1237 },{
1238 Theme = {};
1239 __index = function(self,ind)
1240 if ind == 'Theme' then
1241 return getmetatable(self).Theme
1242 end
1243 end;
1244 __newindex = function(self,ind,new)
1245 if ind == 'Theme' then
1246 self.ThemeName = new
1247 getmetatable(self).Theme = Spice.Theming.getTheme(new)
1248 end
1249 end;
1250 })
1251 act.Theme = themeName
1252 if ... then
1253 Spice.Theming.setTheme(themeName,...)
1254 end
1255 getmetatable(Spice.Theming).Active[name] = act
1256 return act
1257 end;
1258 set = function(name, to)
1259 getmetatable(Spice.Theming).Active[name].Theme = to
1260 end;
1261 insertObject = function(name,obj,prop,ind)
1262 prop = Spice.Properties[prop]
1263 local active = getmetatable(Spice.Theming).Active[name]
1264 local link = getmetatable(Spice.Theming).ObjectLinks
1265 if link[obj] then
1266 link[obj][obj][prop] = nil
1267 else
1268 link[obj] = active.Objects
1269 end
1270 if not active.Objects[obj] then active.Objects[obj] = {} end
1271 active.Objects[obj][prop] = ind or 1
1272 obj[prop] = active.Theme[ind or 1]
1273 end;
1274 sync = function(name)
1275 local active = getmetatable(Spice.Theming).Active[name]
1276 for object,v in next, active.Objects do
1277 for property, index in next, v do
1278 pcall(function()
1279 if active.lerp then
1280 Spice.Tweening.new(object,property,active.Theme[index],type(active.lerp) == 'table' and unpack(active.lerp) or active.lerp)
1281 else
1282 object[property] = active.Theme[index]
1283 end
1284 end)
1285 end
1286 end
1287 end;
1288 },{
1289 Active = {};
1290 Themes = {};
1291 ObjectLinks = {};
1292 });
1293 Tweening = {
1294 tween = function(what,prop,to,...)
1295 if type(what) == 'table' and type(what[1]) == 'userdata' then
1296 local data = {}
1297 for i,what in next,what do
1298 data[i] = Spice.Tweening.new(what,prop,to,...)
1299 end
1300 return data
1301 end
1302 what = Spice.getInstanceOf(what)
1303 local args = {...}
1304 local props = {}
1305 local tim,style,direction,rep,reverse,delay
1306 for i,v in next,args do
1307 if type(v) == 'string' or typeof(v) == 'EnumItem' then
1308 if style == nil then
1309 style = v and type(v) ~= 'string' or Enum.EasingStyle[v]
1310 else
1311 direction = v and type(v) ~= 'string' or Enum.EasingDirection[v]
1312 end
1313 elseif type(v) == 'number' then
1314 if tim == nil then
1315 tim = v
1316 elseif rep == nil then
1317 rep = v
1318 else
1319 delay = v
1320 end
1321 elseif type(v) == 'boolean' then
1322 reverse = v
1323 end
1324 end
1325 for i,v in next,type(prop) == 'table' and prop or {prop} do
1326 props[Spice.Properties[v]] = type(to) ~= 'table' and to or to[i]
1327 end
1328 return game:GetService('TweenService'):Create(what,TweenInfo.new(tim,style or Enum.EasingStyle.Linear,direction or Enum.EasingDirection.In,rep or 0,reverse or false,delay or 0),props):Play()
1329 end;
1330 tweenGuiObject = function(object,typ,...)
1331 typ = typ:lower()
1332 object = Spice.Instance.getInstanceOf(object)
1333 local interupt,udim,udim2,time,style,direction,after = true
1334 for i,v in pairs({...})do
1335 if typeof(v) == 'UDim2' then
1336 udim2 = udim and v or nil
1337 udim = udim and udim or v
1338 elseif type(v) == 'function' then
1339 after = v
1340 elseif type(v) == 'boolean' then
1341 interupt = v
1342 elseif type(v) == 'number' then
1343 time = v
1344 elseif type(v) == 'string' then
1345 style = style and style or v
1346 direction = style and nil or v
1347 end
1348 end
1349 if udim2 then
1350 object:TweenSizeAndPosition(udim2,udim,direction or 'Out',style or 'Quad',time or .3,interupt,after)
1351 elseif typ:find'p' then
1352 object:TweenPosition(udim,direction or 'Out',style or 'Quad',time or .3,interupt,after)
1353 else
1354 object:TweenSize(udim,direction or 'Out',style or 'Quad',time or .3,interupt,after)
1355 end
1356 end;
1357 rotate = function(object, to, timer)
1358 object = Spice.Instance.getInstanceOf(object)
1359 Spice.Tweening.new(object, 'Rotation', to, timer)
1360 end
1361 };
1362 Utility = {
1363 AutoUpdate = function(name,typ)
1364 local ret = false
1365 local file
1366 pcall( function()
1367 if not name then
1368 file = Spice.Util.gitFile(typ,'Spice')
1369 elseif name:lower() == 'all' then
1370 for i,v in next, Spice do
1371 if type(i) == 'string' and type(v) == 'table' then
1372 Spice.Util.AutoUpdate(i,typ)
1373 end
1374 end
1375 else
1376 file = Spice.Util.gitFile(typ,name)
1377 end
1378
1379 file = file + ('\n return '..(name and name or 'Spice'))
1380 ret = file()
1381 if name then
1382 Spice[name] = ret
1383 end
1384 end)
1385 return ret
1386 end;
1387 gitFile = function(typ,...)
1388 local http
1389 local htt = not typ and game:GetService('HttpService').GetAsync or game.HttpGet
1390 function http(link)
1391 return htt(typ and htt or game:GetService('HttpService'),link)
1392 end
1393 local directory = table.concat({...},'/')
1394 return setmetatable({Data = http('https://raw.githubusercontent.com/Karmaid/Spice/master/'..directory..'.lua')},{
1395 __call = function(self,...)
1396 return loadstring(self.Data)(...)
1397 end;
1398 __concat = function(a,b)
1399 return tostring(a)..tostring(b)
1400 end;
1401 __add = function(a,b)
1402 local val = type(a) == 'string' and a or type(b) == 'string' and b or ''
1403 local tab = type(a) ~= 'string' and a or type(b) ~= 'string' and b
1404 tab.Data = tab.Data..val
1405 return tab
1406 end;
1407 __tostring = function(self)
1408 return tostring(self.Data)
1409 end
1410 })
1411 end;
1412 getSpiceCompressed = function(upd,typ)
1413 local main = not upd and Spice or Spice.Util.AutoUpdate()
1414 local citrus = [[local Spice
1415 Spice = setmetatable({
1416 ]]
1417
1418 local rest = [[
1419 },{
1420 __index = function(self,nam)
1421 if rawget(self,nam) then
1422 return rawget(self,nam)
1423 end
1424 for i,v in next, self do
1425 if rawget(v,nam) then
1426 return rawget(v,nam)
1427 end
1428 end
1429 end
1430 })
1431 table.sort(getmetatable(Spice.Properties).RobloxAPI,function(a,b) if #a == #b then return a:lower() < b:lower() end return #a < #b end);
1432 ]]
1433 for i,v in next,main do
1434 if type(i) == 'string' and type(v) == 'table' then
1435 citrus = citrus..string.gsub(''..Spice.Util.gitFile(typ,i),'\n','\n\t')
1436 end
1437 end
1438 return citrus..rest
1439 end;
1440 };
1441},{
1442 __index = function(self,nam)
1443 if rawget(self,nam) then
1444 return rawget(self,nam)
1445 end
1446 for i,v in next, self do
1447 if rawget(v,nam) then
1448 return rawget(v,nam)
1449 end
1450 end
1451 end
1452})
1453table.sort(getmetatable(Spice.Properties).RobloxAPI,function(a,b) if #a == #b then return a:lower() < b:lower() end return #a < #b end);
1454local appleGlyphsPart1 = {
1455 'About','Add User','Address Book','Advertising', 'Air Play', 'Airdrop','Airplane Mode On', 'Albums', 'Attention', 'Apple';
1456 'Alarm Clock', 'Approval', 'Attach', 'Bar Chart', 'Bank Cards', 'Bank Card Back', 'Audio', 'Ball Point Pen', 'Automation', 'Book';
1457 'Calendar', 'Businessman', 'Browse Podcasts', 'Briefcase', 'Bookmark', 'Box', 'Bookmark Ribbon', "Bell", 'Bed', 'Buy';
1458 'Cell Phone', 'Camera', 'Car', 'Cancel', 'Calculator', 'Cellular Network', 'Chat', 'Circled Play', 'Checked', 'Checked Checkbox';
1459 'Contact Card', 'Compass', 'Compact Camera', 'Computer', 'Comments', 'Combo Chart', 'Collaboartion', 'Clock', 'Coins', 'Cloud';
1460 'Download', 'Documents', 'Define Location', 'Decline', 'Delivery', 'Database', 'Create New', 'Conference', 'Copy', 'Document';
1461 'Filter', 'Folder', 'Flash Light', 'Facebook', 'Face ID', 'File', 'Exit', 'Duplicate', 'Worldwide Location', 'Error';
1462 'Dashboard', 'Following', 'For You', 'Gallery', 'Geo Fence', 'Globe', 'Genuis', 'Game Controller', 'Contacts', 'Globe Earth';
1463 'Gift', 'Hand Cursor', 'Graduation Cap', 'Health Data', 'Happy', 'Health Sources', 'Handshake', 'Help', 'Heart', 'High Battery';
1464 'Instagram', 'Invisible', 'Investment', 'Image File', 'Idea', 'Info', 'Home Automation', 'Home', 'High Priority', 'iPhone';
1465}
1466
1467local appleGlyphsPart2 = {
1468 'iPhone X', 'Key', 'Layers', 'Keypad', 'Laptop', 'Link', 'List', 'Lock', 'Literature', 'Line Chart';
1469 'Lock Orientation', 'Moon Symbol', 'Money Bag', 'Monitor', 'Money Box', 'Minus', 'Microphone', 'Money', 'Message', 'Menu';
1470 'Memories', 'Marker', 'Meeting', 'Medical ID', 'Map', 'Maintenance', 'Map Marker', 'Paper Plane', 'Paper Money', 'Order';
1471 'Ok', 'Open', 'Online Support', 'News', 'Musical Notes', 'Note', 'Music Library', 'Movie', 'Resturant', 'Report Card';
1472 'Refresh', 'Product', 'Radio Waves', 'QR Code', 'Price Tag', 'Plus', 'Print', 'Play', 'Planner', 'Pie Chart';
1473 'People', 'Picture', 'Phone', 'PDF', 'Password', 'Pencil', 'Search', 'Server', 'Security Checked', 'Save';
1474 'Rocket', 'Screenshot', 'Shopping Cart', 'Shopping Bag', 'Shopping Cart Loaded', 'Shop', 'Settings', 'Services', 'SMS', 'Star';
1475 'Stack of Photos', 'Spotlight', 'Shutdown', 'Speech Bubble', 'Support', 'Thumbs Up', 'Synchronize', 'Stopwatch', 'Statistics', 'Sun';
1476 'Trash', 'Truck', 'Training', 'Today Apps', 'Timer', 'Voicemail', 'Wallet', 'Visible', 'Wallet App', 'Wifi';
1477 'Trophy', 'Video Call', 'User Male', 'Videos Purchase', 'User Group Mixed', 'User Group Men', 'US Dollar', 'Twitter', 'Upload', 'Unlock';
1478}
1479
1480
1481Spice.Imagery.fromSheet('rbxassetid://1574419350',10, 10, 90, 90, appleGlyphsPart1, 'iOS11')
1482Spice.Imagery.fromSheet('rbxassetid://1573947013',10, 10, 90, 90, appleGlyphsPart2, 'iOS11')
1483
1484Spice.Color.fromMaterial = function(name,i,ac)
1485 local id = Spice.Misc.switch(1,2,3,4,5,6,7,8,9,10):Filter(unpack(Spice.Misc.switch({50,100,200,300,400,500,600,700,800,900},{100,200,400,700}):Filter(false,true)(Spice.Misc.exists(ac))))
1486 id = id(i or 500)
1487 return id and Spice.Color.getColor(name,id,'Material',ac and 'Accent')
1488end;
1489
1490Spice.Color.insertColor('Red',{Spice.Color.fromRGB(255, 235, 238),Spice.Color.fromRGB(255, 205, 210),Spice.Color.fromRGB(239, 154, 154),Spice.Color.fromRGB(229, 115, 115),Spice.Color.fromRGB(239, 83, 80),Spice.Color.fromRGB(244, 67, 54),Spice.Color.fromRGB(229, 57, 53),Spice.Color.fromRGB(211, 47, 47),Spice.Color.fromRGB(198, 40, 40),Spice.Color.fromRGB(183, 28, 28),}, 'Material')
1491Spice.Color.insertColor('Pink',{Spice.Color.fromRGB(252, 228, 236),Spice.Color.fromRGB(248, 187, 208),Spice.Color.fromRGB(244, 143, 177),Spice.Color.fromRGB(240, 98, 146),Spice.Color.fromRGB(236, 64, 122),Spice.Color.fromRGB(233, 30, 99),Spice.Color.fromRGB(216, 27, 96),Spice.Color.fromRGB(194, 24, 91),Spice.Color.fromRGB(173, 20, 87),Spice.Color.fromRGB(136, 14, 79),}, 'Material')
1492Spice.Color.insertColor('Purple',{Spice.Color.fromRGB(243, 229, 245),Spice.Color.fromRGB(225, 190, 231),Spice.Color.fromRGB(206, 147, 216),Spice.Color.fromRGB(186, 104, 200),Spice.Color.fromRGB(171, 71, 188),Spice.Color.fromRGB(156, 39, 176),Spice.Color.fromRGB(142, 36, 170),Spice.Color.fromRGB(123, 31, 162),Spice.Color.fromRGB(106, 27, 154),Spice.Color.fromRGB(74, 20, 140),}, 'Material')
1493Spice.Color.insertColor('Deep purple',{Spice.Color.fromRGB(237, 231, 246),Spice.Color.fromRGB(209, 196, 233),Spice.Color.fromRGB(179, 157, 219),Spice.Color.fromRGB(149, 117, 205),Spice.Color.fromRGB(126, 87, 194),Spice.Color.fromRGB(103, 58, 183),Spice.Color.fromRGB(94, 53, 177),Spice.Color.fromRGB(81, 45, 168),Spice.Color.fromRGB(69, 39, 160),Spice.Color.fromRGB(49, 27, 146),}, 'Material')
1494Spice.Color.insertColor('Indigo',{Spice.Color.fromRGB(232, 234, 246),Spice.Color.fromRGB(197, 202, 233),Spice.Color.fromRGB(159, 168, 218),Spice.Color.fromRGB(121, 134, 203),Spice.Color.fromRGB(92, 107, 192),Spice.Color.fromRGB(63, 81, 181),Spice.Color.fromRGB(57, 73, 171),Spice.Color.fromRGB(48, 63, 159),Spice.Color.fromRGB(40, 53, 147),Spice.Color.fromRGB(26, 35, 126),}, 'Material')
1495Spice.Color.insertColor('Blue',{Spice.Color.fromRGB(227, 242, 253),Spice.Color.fromRGB(187, 222, 251),Spice.Color.fromRGB(144, 202, 249),Spice.Color.fromRGB(100, 181, 246),Spice.Color.fromRGB(66, 165, 245),Spice.Color.fromRGB(33, 150, 243),Spice.Color.fromRGB(30, 136, 229),Spice.Color.fromRGB(25, 118, 210),Spice.Color.fromRGB(21, 101, 192),Spice.Color.fromRGB(13, 71, 161),}, 'Material')
1496Spice.Color.insertColor('Light blue',{Spice.Color.fromRGB(225, 245, 254),Spice.Color.fromRGB(179, 229, 252),Spice.Color.fromRGB(129, 212, 250),Spice.Color.fromRGB(79, 195, 247),Spice.Color.fromRGB(41, 182, 246),Spice.Color.fromRGB(3, 169, 244),Spice.Color.fromRGB(3, 155, 229),Spice.Color.fromRGB(2, 136, 209),Spice.Color.fromRGB(2, 119, 189),Spice.Color.fromRGB(1, 87, 155),}, 'Material')
1497Spice.Color.insertColor('Cyan',{Spice.Color.fromRGB(224, 247, 250),Spice.Color.fromRGB(178, 235, 242),Spice.Color.fromRGB(128, 222, 234),Spice.Color.fromRGB(77, 208, 225),Spice.Color.fromRGB(38, 198, 218),Spice.Color.fromRGB(0, 188, 212),Spice.Color.fromRGB(0, 172, 193),Spice.Color.fromRGB(0, 151, 167),Spice.Color.fromRGB(0, 131, 143),Spice.Color.fromRGB(0, 96, 100),}, 'Material')
1498Spice.Color.insertColor('Teal',{Spice.Color.fromRGB(224, 242, 241),Spice.Color.fromRGB(178, 223, 219),Spice.Color.fromRGB(128, 203, 196),Spice.Color.fromRGB(77, 182, 172),Spice.Color.fromRGB(38, 166, 154),Spice.Color.fromRGB(0, 150, 136),Spice.Color.fromRGB(0, 137, 123),Spice.Color.fromRGB(0, 121, 107),Spice.Color.fromRGB(0, 105, 92),Spice.Color.fromRGB(0, 77, 64),}, 'Material')
1499Spice.Color.insertColor('Green',{Spice.Color.fromRGB(232, 245, 233),Spice.Color.fromRGB(200, 230, 201),Spice.Color.fromRGB(165, 214, 167),Spice.Color.fromRGB(129, 199, 132),Spice.Color.fromRGB(102, 187, 106),Spice.Color.fromRGB(76, 175, 80),Spice.Color.fromRGB(67, 160, 71),Spice.Color.fromRGB(56, 142, 60),Spice.Color.fromRGB(46, 125, 50),Spice.Color.fromRGB(27, 94, 32),}, 'Material')
1500Spice.Color.insertColor('Light green',{Spice.Color.fromRGB(241, 248, 233),Spice.Color.fromRGB(220, 237, 200),Spice.Color.fromRGB(197, 225, 165),Spice.Color.fromRGB(174, 213, 129),Spice.Color.fromRGB(156, 204, 101),Spice.Color.fromRGB(139, 195, 74),Spice.Color.fromRGB(124, 179, 66),Spice.Color.fromRGB(104, 159, 56),Spice.Color.fromRGB(85, 139, 47),Spice.Color.fromRGB(51, 105, 30),}, 'Material')
1501Spice.Color.insertColor('Lime',{Spice.Color.fromRGB(249, 251, 231),Spice.Color.fromRGB(240, 244, 195),Spice.Color.fromRGB(230, 238, 156),Spice.Color.fromRGB(220, 231, 117),Spice.Color.fromRGB(212, 225, 87),Spice.Color.fromRGB(205, 220, 57),Spice.Color.fromRGB(192, 202, 51),Spice.Color.fromRGB(175, 180, 43),Spice.Color.fromRGB(158, 157, 36),Spice.Color.fromRGB(130, 119, 23),}, 'Material')
1502Spice.Color.insertColor('Yellow',{Spice.Color.fromRGB(255, 253, 231),Spice.Color.fromRGB(255, 249, 196),Spice.Color.fromRGB(255, 245, 157),Spice.Color.fromRGB(255, 241, 118),Spice.Color.fromRGB(255, 238, 88),Spice.Color.fromRGB(255, 235, 59),Spice.Color.fromRGB(253, 216, 53),Spice.Color.fromRGB(251, 192, 45),Spice.Color.fromRGB(249, 168, 37),Spice.Color.fromRGB(245, 127, 23),}, 'Material')
1503Spice.Color.insertColor('Amber',{Spice.Color.fromRGB(255, 248, 225),Spice.Color.fromRGB(255, 236, 179),Spice.Color.fromRGB(255, 224, 130),Spice.Color.fromRGB(255, 213, 79),Spice.Color.fromRGB(255, 202, 40),Spice.Color.fromRGB(255, 193, 7),Spice.Color.fromRGB(255, 179, 0),Spice.Color.fromRGB(255, 160, 0),Spice.Color.fromRGB(255, 143, 0),Spice.Color.fromRGB(255, 111, 0),}, 'Material')
1504Spice.Color.insertColor('Orange',{Spice.Color.fromRGB(255, 243, 224),Spice.Color.fromRGB(255, 224, 178),Spice.Color.fromRGB(255, 204, 128),Spice.Color.fromRGB(255, 183, 77),Spice.Color.fromRGB(255, 167, 38),Spice.Color.fromRGB(255, 152, 0),Spice.Color.fromRGB(251, 140, 0),Spice.Color.fromRGB(245, 124, 0),Spice.Color.fromRGB(239, 108, 0),Spice.Color.fromRGB(230, 81, 0),}, 'Material')
1505Spice.Color.insertColor('Deep orange',{Spice.Color.fromRGB(251, 233, 231),Spice.Color.fromRGB(255, 204, 188),Spice.Color.fromRGB(255, 171, 145),Spice.Color.fromRGB(255, 138, 101),Spice.Color.fromRGB(255, 112, 67),Spice.Color.fromRGB(255, 87, 34),Spice.Color.fromRGB(244, 81, 30),Spice.Color.fromRGB(230, 74, 25),Spice.Color.fromRGB(216, 67, 21),Spice.Color.fromRGB(191, 54, 12),}, 'Material')
1506Spice.Color.insertColor('Brown',{Spice.Color.fromRGB(239, 235, 233),Spice.Color.fromRGB(215, 204, 200),Spice.Color.fromRGB(188, 170, 164),Spice.Color.fromRGB(161, 136, 127),Spice.Color.fromRGB(141, 110, 99),Spice.Color.fromRGB(121, 85, 72),Spice.Color.fromRGB(109, 76, 65),Spice.Color.fromRGB(93, 64, 55),Spice.Color.fromRGB(78, 52, 46),Spice.Color.fromRGB(62, 39, 35),}, 'Material')
1507Spice.Color.insertColor('Grey',{Spice.Color.fromRGB(250, 250, 250),Spice.Color.fromRGB(245, 245, 245),Spice.Color.fromRGB(238, 238, 238),Spice.Color.fromRGB(224, 224, 224),Spice.Color.fromRGB(189, 189, 189),Spice.Color.fromRGB(158, 158, 158),Spice.Color.fromRGB(117, 117, 117),Spice.Color.fromRGB(97, 97, 97),Spice.Color.fromRGB(66, 66, 66),Spice.Color.fromRGB(33, 33, 33),}, 'Material')
1508Spice.Color.insertColor('Blue grey',{Spice.Color.fromRGB(236, 239, 241),Spice.Color.fromRGB(207, 216, 220),Spice.Color.fromRGB(176, 190, 197),Spice.Color.fromRGB(144, 164, 174),Spice.Color.fromRGB(120, 144, 156),Spice.Color.fromRGB(96, 125, 139),Spice.Color.fromRGB(84, 110, 122),Spice.Color.fromRGB(69, 90, 100),Spice.Color.fromRGB(55, 71, 79),Spice.Color.fromRGB(38, 50, 56),}, 'Material')
1509Spice.Color.insertColor('Red',{Spice.Color.fromRGB(255, 138, 128),Spice.Color.fromRGB(255, 82, 82),Spice.Color.fromRGB(255, 23, 68),Spice.Color.fromRGB(213, 0, 0),}, 'Material', 'Accent')
1510Spice.Color.insertColor('Pink',{Spice.Color.fromRGB(255, 128, 171),Spice.Color.fromRGB(255, 64, 129),Spice.Color.fromRGB(245, 0, 87),Spice.Color.fromRGB(197, 17, 98),}, 'Material', 'Accent')
1511Spice.Color.insertColor('Purple',{Spice.Color.fromRGB(234, 128, 252),Spice.Color.fromRGB(224, 64, 251),Spice.Color.fromRGB(213, 0, 249),Spice.Color.fromRGB(170, 0, 255),}, 'Material', 'Accent')
1512Spice.Color.insertColor('Deep purple',{Spice.Color.fromRGB(179, 136, 255),Spice.Color.fromRGB(124, 77, 255),Spice.Color.fromRGB(101, 31, 255),Spice.Color.fromRGB(98, 0, 234),}, 'Material', 'Accent')
1513Spice.Color.insertColor('Indigo',{Spice.Color.fromRGB(140, 158, 255),Spice.Color.fromRGB(83, 109, 254),Spice.Color.fromRGB(61, 90, 254),Spice.Color.fromRGB(48, 79, 254),}, 'Material', 'Accent')
1514Spice.Color.insertColor('Blue',{Spice.Color.fromRGB(130, 177, 255),Spice.Color.fromRGB(68, 138, 255),Spice.Color.fromRGB(41, 121, 255),Spice.Color.fromRGB(41, 98, 255),}, 'Material', 'Accent')
1515Spice.Color.insertColor('Light blue',{Spice.Color.fromRGB(128, 216, 255),Spice.Color.fromRGB(64, 196, 255),Spice.Color.fromRGB(0, 176, 255),Spice.Color.fromRGB(0, 145, 234),}, 'Material', 'Accent')
1516Spice.Color.insertColor('Cyan',{Spice.Color.fromRGB(132, 255, 255),Spice.Color.fromRGB(24, 255, 255),Spice.Color.fromRGB(0, 229, 255),Spice.Color.fromRGB(0, 184, 212),}, 'Material', 'Accent')
1517Spice.Color.insertColor('Teal',{Spice.Color.fromRGB(167, 255, 235),Spice.Color.fromRGB(100, 255, 218),Spice.Color.fromRGB(29, 233, 182),Spice.Color.fromRGB(0, 191, 165),}, 'Material', 'Accent')
1518Spice.Color.insertColor('Green',{Spice.Color.fromRGB(185, 246, 202),Spice.Color.fromRGB(105, 240, 174),Spice.Color.fromRGB(0, 230, 118),Spice.Color.fromRGB(0, 200, 83),}, 'Material', 'Accent')
1519Spice.Color.insertColor('Light green',{Spice.Color.fromRGB(204, 255, 144),Spice.Color.fromRGB(178, 255, 89),Spice.Color.fromRGB(118, 255, 3),Spice.Color.fromRGB(100, 221, 23),}, 'Material', 'Accent')
1520Spice.Color.insertColor('Lime',{Spice.Color.fromRGB(244, 255, 129),Spice.Color.fromRGB(238, 255, 65),Spice.Color.fromRGB(198, 255, 0),Spice.Color.fromRGB(174, 234, 0),}, 'Material', 'Accent')
1521Spice.Color.insertColor('Yellow',{Spice.Color.fromRGB(255, 255, 141),Spice.Color.fromRGB(255, 255, 0),Spice.Color.fromRGB(255, 234, 0),Spice.Color.fromRGB(255, 214, 0),}, 'Material', 'Accent')
1522Spice.Color.insertColor('Amber',{Spice.Color.fromRGB(255, 229, 127),Spice.Color.fromRGB(255, 215, 64),Spice.Color.fromRGB(255, 196, 0),Spice.Color.fromRGB(255, 171, 0),}, 'Material', 'Accent')
1523Spice.Color.insertColor('Orange',{Spice.Color.fromRGB(255, 209, 128),Spice.Color.fromRGB(255, 171, 64),Spice.Color.fromRGB(255, 145, 0),Spice.Color.fromRGB(255, 109, 0),}, 'Material', 'Accent')
1524Spice.Color.insertColor('Deep orange',{Spice.Color.fromRGB(255, 158, 128),Spice.Color.fromRGB(255, 110, 64),Spice.Color.fromRGB(255, 61, 0),Spice.Color.fromRGB(221, 44, 0),}, 'Material', 'Accent')
1525
1526
1527local hsv,hex = Spice.fromHSV, Spice.fromHex
1528
1529Spice.Color.insertColor('Red',{
1530 [-1] = hsv(358,65,100);
1531 [0] = hsv(358,71,100);
1532 [1] = hsv(358,76,93);
1533 [2] = hsv(357,83,82);
1534},'Citrus')
1535Spice.Color.insertColor('Red',{
1536 [-1] = hsv(359,30,100);
1537 [0] = hsv(359,47,100);
1538 [1] = hsv(358,59,100);
1539 [2] = hsv(358,50,91)
1540},'Citrus','Light')
1541Spice.Color.insertColor('Peach',{
1542 [-1] = hsv(3,65,100);
1543 [0] = hsv(3,71,100);
1544 [1] = hsv(2,76,93);
1545 [2] = hsv(3,83,82);
1546},'Citrus')
1547Spice.Color.insertColor('Peach',{
1548 [-1] = hsv(3,30,100);
1549 [0] = hsv(4,47,100);
1550 [1] = hsv(3,59,100);
1551 [2] = hsv(4,50,91)
1552},'Citrus','Light')
1553Spice.Color.insertColor('Orange',{
1554 [-1] = hsv(13,65,100);
1555 [0] = hsv(13,71,100);
1556 [1] = hsv(13,76,93);
1557 [2] = hsv(12,83,82);
1558},'Citrus')
1559Spice.Color.insertColor('Orange',{
1560 [-1] = hsv(14,30,100);
1561 [0] = hsv(13,47,100);
1562 [1] = hsv(13,59,100);
1563 [2] = hsv(14,50,91)
1564},'Citrus','Light')
1565Spice.Color.insertColor('Yellow',{
1566 [-1] = hsv(41,65,100);
1567 [0] = hsv(41,71,100);
1568 [1] = hsv(41,76,93);
1569 [2] = hsv(40,83,82);
1570},'Citrus')
1571Spice.Color.insertColor('Yellow',{
1572 [-1] = hsv(42,30,100);
1573 [0] = hsv(41,47,100);
1574 [1] = hsv(40,59,100);
1575 [2] = hsv(42,50,91)
1576},'Citrus','Light')
1577Spice.Color.insertColor('Lime',{
1578 [-1] = hex'AFEF51';
1579 [0] = hex'A4E542';
1580 [1] = hex'94D82F';
1581 [2] = hex'80C41B';
1582},'Citrus')
1583Spice.Color.insertColor('Lime',{
1584 [-1] = hex'DEFFB2';
1585 [0] = hex'CDFF87';
1586 [1] = hex'BFF76C';
1587 [2] = hex'B7EA75';
1588},'Citrus','Light')
1589Spice.Color.insertColor('Green',{
1590 [-1] = hsv(121,66,93);
1591 [0] = hsv(121,71,89);
1592 [1] = hsv(121,78,84);
1593 [2] = hsv(121,86,76);
1594 Light = {
1595 [-1] = hsv(122,30,100);
1596 [0] = hsv(122,47,100);
1597 [1] = hsv(121,56,96);
1598 [2] = hsv(123,50,91)
1599 };
1600},'Citrus')
1601Spice.Color.insertColor('Teal',{
1602 Light = {
1603 [-1] = hex'B8FEF6';
1604 [0] = hex'90FEF1';
1605 [1] = hex'78F6E7';
1606 [2] = hex'75EADF';
1607 };
1608 [-1] = hex'5EEFDC';
1609 [0] = hex'51E6D2';
1610 [1] = hex'3ED8C4';
1611 [2] = hex'2CC6B1';
1612},'Citrus')
1613Spice.Color.insertColor('Cyan',{
1614 Light = {
1615 [-1] = hex'B8FAFE';
1616 [0] = hex'90F9FE';
1617 [1] = hex'78F0F6';
1618 [2] = hex'75E2EA'
1619 };
1620 [-1] = hex'5EEAEF';
1621 [0] = hex'51E1E6';
1622 [1] = hex'3ED2D8';
1623 [2] = hex'2CC1C6';
1624},'Citrus')
1625Spice.Color.insertColor('Blue',{
1626 Light = {
1627 [2] = hsv(210,50,92);
1628 [-1] = hsv(209,30,100);
1629 [0] = hsv(209,47,100);
1630 [1] = hsv(207,59,100);
1631 };
1632 [-1] = hsv(208,65,100);
1633 [0] = hsv(208,71,100);
1634 [1] = hsv(207,76,93);
1635 [2] = hsv(208,83,82);
1636},'Citrus')
1637Spice.Color.insertColor('Naval coacoa',{
1638 Light = {
1639 [-1] = hsv(230,19,90);
1640 [0] = hsv(230,32,86);
1641 [1] = hsv(229,41,83);
1642 [2] = hsv(231,37,83)
1643 };
1644 [-1] = hsv(230,47,81);
1645 [0] = hsv(230,53,79);
1646 [1] = hsv(230,58,72);
1647 [2] = hsv(230,64,62);
1648},'Citrus')
1649Spice.Color.insertColor('Indigo',{
1650 Light = {
1651 [-1] = hsv(244,30,100);
1652 [0] = hsv(244,47,100);
1653 [1] = hsv(242,59,100);
1654 [2] = hsv(245,50,91)
1655 };
1656 [-1] = hsv(243,65,100);
1657 [0] = hsv(243,71,100);
1658 [1] = hsv(242,76,93);
1659 [2] = hsv(243,83,82);
1660},'Citrus')
1661Spice.Color.insertColor('Purple',{
1662 Light = {
1663 [-1] = hsv(261,30,100);
1664 [0] = hsv(261,47,100);
1665 [1] = hsv(259,59,100);
1666 [2] = hsv(261,50,91)
1667 };
1668 [-1] = hsv(260,65,100);
1669 [0] = hsv(260,71,100);
1670 [1] = hsv(259,76,93);
1671 [2] = hsv(260,83,82);
1672},'Citrus')
1673Spice.Color.insertColor('Pink',{
1674 Light = {
1675 [-1] = hsv(326,24,100);
1676 [0] = hsv(326,38,100);
1677 [1] = hsv(324,48,100);
1678 [2] = hsv(329,40,93)
1679 };
1680 [-1] = hsv(324,52,100);
1681 [0] = hsv(325,58,100);
1682 [1] = hsv(324,61,94);
1683 [2] = hsv(325,65,85);
1684},'Citrus')
1685Spice.Color.insertColor('Amaranth',{
1686 Light = {
1687 [-1] = hsv(345,28,100);
1688 [0] = hsv(345,44,100);
1689 [1] = hsv(343,55,100);
1690 [2] = hsv(346,45,92)
1691 };
1692 [-1] = hsv(344,61,100);
1693 [0] = hsv(344,67,100);
1694 [1] = hsv(344,72,94);
1695 [2] = hsv(344,77,83);
1696},'Citrus')
1697Spice.Color.insertColor('Grey',{
1698 Light = {
1699 [-1] = hsv(0,0,98);
1700 [0] = hsv(0,0,96);
1701 [1] = hsv(0,0,87);
1702 [2] = hsv(0,0,80)
1703 };
1704 Blue = {
1705 [-1] = hsv(219,21,36);
1706 [0] = hsv(219,25,34);
1707 [1] = hsv(220,25,27);
1708 [2] = hsv(218,25,21)
1709 };
1710 Dark = {
1711 [-1] = hsv(0,0,25);
1712 [0] = hsv(0,0,21);
1713 [1] = hsv(0,0,12);
1714 [2] = hsv(0,0,2);
1715 };
1716 [-1] = hsv(220,10,32);
1717 [0] = hsv(213,12,27);
1718 [1] = hsv(217,12,24);
1719 [2] = hsv(220,12,18);
1720},'Citrus')
1721Spice.Color.insertColor('Brown',{
1722 Light = {
1723 [-1] = hex'7B6C67';
1724 [0] = hex'745D56';
1725 [1] = hex'6F5149';
1726 [2] = hex'6A534C'
1727 };
1728 [-1] = hex'6D4C43';
1729 [0] = hex'6B463C';
1730 [1] = hex'623D33';
1731 [2] = hex'543127'
1732},'Citrus')
1733
1734function citrusColor(name,main,inverse,...)
1735 local alias = {...}
1736 for i,v in pairs(main)do
1737 main[i] = Spice.Color.fromHex(v)
1738 end
1739 local inv = {}
1740 for i,v in pairs(inverse)do
1741 inverse[i] = Spice.Color.fromHex(v)
1742 inv[#inverse-i+1] = inverse[i]
1743 end
1744 local new = main
1745 main.Inverse = inv
1746 Spice.Color.insertColor(name,new,'CitrusV4')
1747end
1748
1749citrusColor('Ruby',{'EA8A97';
1750 'E06071';
1751 'CF3F4E';
1752 'C43140';
1753 '9E1F2C';
1754 '891A27';
1755 '77111F';},
1756 {'EE8896';
1757 'E57683';
1758 'E0616E';
1759 'CE3B4A';
1760 'C0303F';
1761 '9F1F30';
1762'751522';})
1763
1764citrusColor('Red',{'EA8B8A','E06260','CF463F','C43831','9E251F','891E1A','771211'},
1765 {'EE8988','E57A76','E06761','CE423B','C03730','9F211F','751615'},'Mahogany'
1766)
1767citrusColor('Deep orange',{'EA958A','E06F60','CF543F','C44731','9E321F','89291A','771D11'},
1768 {'EE9488','E58576','E07461','CE513B','C04530','9F2E1F','752015'},'Peach','Mojo'
1769)
1770citrusColor('Orange',{'EAA58A','E08460','CF6C3F','C45F31','9E471F','893B1A','772E11'},
1771 {'EEA588','E59776','E08961','CE693B','C05D30','9F431F','753015'},'Raw sienna','Tuscany'
1772)
1773citrusColor('Yellow',{'EAC58A','E0AF60','CF9C3F','C49031','9E711F','89601A','775011'},
1774 {'EEC788','E5BC76','E0B361','CE9A3B','C08D30','9F6E1F','755015'},'Gold'
1775)
1776citrusColor('Lime',{'C7EA8A','B1E060','96CF3F','8AC431','6C9E1F','5F891A','527711'},
1777 {'C9EE88','BBE576','AEE061','94CE3B','87C030','709F1F','527515'}, 'Pear','Atlantis'
1778)
1779citrusColor('Mint',{'8AEABD','60E0A4','3FCF90','31C484','1F9E67','1A8957','117747'},
1780 {'88EEBE','76E5B3','61E0A9','3BCE8E','30C081','1F9F63','157548'},'Jade','Shamrock','Jewel'
1781)
1782citrusColor('Green',{'8AEA95','60E06F','3FCF54','31C447','1F9E32','1A8929','11771D'},
1783 {'88EE94','76E585','61E074','3BCE51','30C045','1F9F2E','157520'},'Apple','Emerald'
1784)
1785citrusColor("Teal",{'8AEADD','60E0CF','3FCFC0','31C4B5','1F9E91','1A897C','117769'},
1786 {'88EEE0','76E5D8','61E0D3','3BCEBF','30C0B1','1F9F8E','157568'},'Aquamarine'
1787)
1788citrusColor("Cyan",{'8ADFEA','60D1E0','3FBACF','31AEC4','1F8B9E','1A7A89','116C77'},
1789 {'88E3EE','76D6E5','61CDE0','3BB8CE','30ABC0','1F909F','156A75'}
1790)
1791citrusColor("Light blue",{'8ACFEA','60BCE0','3FA2CF','3196C4','1F769E','1A6889','115B77'},
1792 {'88D2EE','76C4E5','61B8E0','3BA0CE','3093C0','1F7B9F','155A75'},'Cornflower','Blumine'
1793)
1794citrusColor('Blue',{'8AAFEA','6091E0','3F72CF','3165C4','1F4C9E','1A4389','113877'},
1795 {'88AFEE','769FE5','618EE0','3B6FCE','3063C0','1F509F','153A75'},'Indigo','Cerulean blue'
1796)
1797citrusColor('Purple',{'AD8AEA','8F60E0','783FCF','6C31C4','521F9E','441A89','361177'},
1798 {'AD88EE','A076E5','9461E0','763BCE','6930C0','4E1F9F','381575'}
1799)
1800citrusColor('Pink',{'EA8ADF','E060D1','CF3FBA','C431AE','9E1F8B','891A7A','77116B'},
1801 {'EE88E2','E576D6','E061CD','CE3BB8','C030AB','9F1F90','75156A'},'Violet','Orchid'
1802)
1803citrusColor('Hot pink',{'EA8AB7','E0609C','CF3F7E','C43171','9E1F56','891A4C','771141'},
1804 {'EE88B8','E576A8','E06198','CE3B7B','C0306F','9F1F5B','751542'},'Rose'
1805)
1806
1807Spice.Properties.new("Ripple",function(button,...)
1808 local args = {...}
1809 button.AutoButtonColor = false
1810 button.ClipsDescendants = true
1811 button.MouseButton1Down:connect(function(mx,my)
1812 local circle
1813 local props = {Parent = button,AnchorPoint = Vector2.new(.5,.5), Transparency = 1, Name = 'Circle', Position = UDim2.new(0, mx-button.AbsolutePosition.X, -.5, my-button.AbsolutePosition.Y)}
1814 if Spice.Instance.isAClass("Circle",true) then
1815 circle = Spice.Instance.newPure("Circle",props)
1816 else
1817 circle = Spice.Instance.newInstance("ImageLabel",Spice.Table.merge(props,{Image = 'rbxassetid://1533003925'}))
1818 end
1819 local who = circle
1820 local color, timer, typ, siz, lightness = Color3.new(0,0,0), .8, Spice.Misc.dynamicProperty(who), who.Parent:IsA'GuiObject' and (who.Parent.AbsoluteSize.X > who.Parent.AbsoluteSize.Y and who.Parent.AbsoluteSize.X or who.Parent.AbsoluteSize.Y)
1821 local mid = false
1822 for i,v in next, args do
1823 typ = type(v) == 'string' and v or typ
1824 color = typeof(v) == 'Color3' and v or color
1825 timer = lightness and type(v) == 'number' and v or timer
1826 lightness = not lightness and type(v) == 'number' and v or lightness
1827 mid = type(v) == 'boolean' and v or mid
1828 end
1829 if not lightness then lightness = .85 end
1830 Spice.Properties.setProperties(who,{[typ..'Color3'] = color, [typ..'Transparency'] = lightness})
1831 Spice.Misc.destroyIn(who,timer + .01)
1832 siz = siz*1.5
1833 if not mid then
1834 Spice.Tweening.tweenGuiObject(who,'siz',UDim2.new(0,siz,0,siz),timer,'Sine','Out')
1835 else
1836 Spice.Tweening.tweenGuiObject(who,'both',UDim2.new(.5, 0, .5, 0),UDim2.new(0,siz,0,siz),timer,'Quad','Out')
1837 end
1838 Spice.Tweening.new(who,'ImageTransparency',1,timer,'Sine','Out')
1839 end)
1840end, 'GuiButton')
1841
1842
1843Spice.Properties.new("Draggable",function(gui, tween,...)
1844 local UserInputService = game:GetService("UserInputService")
1845 local args = {...}
1846 local dragging
1847 local dragInput
1848 local dragStart
1849 local startPos
1850 local function update(input)
1851 local delta = input.Position - dragStart
1852 if not tween then
1853 gui.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
1854 else
1855 Spice.Tweening.new(gui,'Position', UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y), tween or .1,unpack(args))
1856 --wait(time or .3)
1857 end
1858 end
1859 gui.InputBegan:Connect(function(input)
1860 if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
1861 dragging = true
1862 dragStart = input.Position
1863 startPos = gui.Position
1864
1865 input.Changed:Connect(function()
1866 if input.UserInputState == Enum.UserInputState.End then
1867 dragging = false
1868 end
1869 end)
1870 end
1871 end)
1872 gui.InputChanged:Connect(function(input)
1873 if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
1874 dragInput = input
1875 end
1876 end)
1877 UserInputService.InputChanged:Connect(function(input)
1878 if input == dragInput and dragging then
1879 update(input)
1880 end
1881 end)
1882end)
1883
1884Spice.Instance.newClass("RoundedGuiObject",function(radius) --radius is udim2
1885 local roundFolder = Spice.Instance.newInstance('Folder',{Name = 'Round'})
1886 local radiusFolder = Spice.Instance.newInstance('Folder',roundFolder,{Name = 'RadiusValues'})
1887 local getRadius = function(...)
1888 local args = type(({...})[1]) == 'table' and ({...})[1] or {...}
1889 if #args >= 4 then
1890 return {args[1],args[2],args[3],args[4]}
1891 elseif #args >= 2 then
1892 return {args[1],args[2],args[2],args[3] or args[1]}
1893 elseif #args == 1 then
1894 return {args[1],args[1],args[1],args[1]}
1895 else
1896 return {0,0,0,0}
1897 end
1898 end
1899 local radii = getRadius(radius)
1900 local lRT = {{Vector2.new(0,0),Vector2.new(1,0),Vector2.new(0,1),Vector2.new(1,1)}, {UDim2.new(0,0,0,0),UDim2.new(1,0,0,0),UDim2.new(0,0,1,0),UDim2.new(1,0,1,0)}, {Vector2.new(0,0),Vector2.new(250,0),Vector2.new(0,250),Vector2.new(250,250)}}
1901 Spice.Instance.newInstance('Frame',roundFolder,{Name = 'Center',BorderSizePixel = 0;BackgroundColor3 = Color3.new(.2,.2,.2)})
1902 for i = 1,4 do
1903 local roundSize = radii[i]
1904 local c = Spice.Instance.newInstance('ImageLabel',roundFolder,{
1905 ImageColor3 = Color3.new(.2,.2,.2);
1906 Name = 'Corner_'..i;
1907 Image = 'rbxassetid://1487012691';
1908 BackgroundTransparency = 1;
1909 Size = UDim2.new(0,roundSize,0,roundSize);
1910 AnchorPoint = lRT[1][i];
1911 Position = lRT[2][i];
1912 ImageRectSize = Vector2.new(250,250);
1913 ImageRectOffset = lRT[3][i];
1914 })
1915 Spice.Instance.newInstance('IntValue', radiusFolder, {Name = c.Name, Value = roundSize}).Changed:connect(function(a)
1916 c.Size = UDim2.new(0,a,0,a)
1917 end)
1918 c:GetPropertyChangedSignal('Size'):connect(function()
1919 local id = i
1920 local c1,c2,c3,c4 = roundFolder.Corner_1,roundFolder.Corner_2,roundFolder.Corner_3,roundFolder.Corner_4
1921 local cs1,cs2,cs3,cs4 = c1.Size.X.Offset, c2.Size.X.Offset, c3.Size.X.Offset, c4.Size.X.Offset
1922 if id == 1 or id == 2 then
1923 roundFolder.Top.Position = UDim2.new(0,cs1,0,0)
1924 roundFolder.Top.Size = UDim2.new(1, -(cs1+cs2), 0, (cs1 >= cs2 and cs1 or cs2))
1925 end
1926 if id == 1 or id == 3 then
1927 roundFolder.Left.Position = UDim2.new(0,0,0,cs1)
1928 roundFolder.Left.Size = UDim2.new(0,(cs1 >= cs3 and cs1 or cs3), 1, -(cs1+cs3))
1929 end
1930 if id == 2 or id == 4 then
1931 roundFolder.Right.Position = UDim2.new(1,0,0,cs2)
1932 roundFolder.Right.Size = UDim2.new(0,(cs2 >= cs4 and cs2 or cs4), 1, -(cs4+cs2))
1933 end
1934 if id == 3 or id == 4 then
1935 roundFolder.Bottom.Position = UDim2.new(0,cs3,1,0)
1936 roundFolder.Bottom.Size = UDim2.new(1, -(cs3+cs4), 0, (cs3 >= cs4 and cs3 or cs4))
1937 end
1938 roundFolder.Center.Position = UDim2.new(0, roundFolder.Left.Size.X.Offset, 0, roundFolder.Top.Size.Y.Offset)
1939 roundFolder.Center.Size = UDim2.new(1, - (roundFolder.Right.Size.X.Offset + roundFolder.Left.Size.X.Offset) , 1, - (roundFolder.Bottom.Size.Y.Offset + roundFolder.Top.Size.Y.Offset) )
1940 end)
1941 end
1942 lRT = {{Vector2.new(0,0), Vector2.new(0,0), Vector2.new(0,1), Vector2.new(1,0)},{UDim2.new(0,0,0,0), UDim2.new(0,0,0,0), UDim2.new(0,0,1,0), UDim2.new(1,0,0,0)}, {'Top','Left','Bottom','Right'}}
1943 for i = 1,4 do
1944 local roundSize = radii[i]
1945 Spice.Instance.newInstance("Frame",roundFolder,{
1946 Size = UDim2.new(0,0,0,0);
1947 Position = lRT[2][i];
1948 BorderSizePixel = 0;
1949 Name = lRT[3][i];
1950 BackgroundColor3 = Color3.new(.2,.2,.2);
1951 AnchorPoint = lRT[1][i];
1952 })
1953 end
1954 local connected
1955 local function spacesaver(prop,to)
1956 roundFolder.Top[prop] = roundFolder.Parent[prop]
1957 roundFolder.Bottom[prop] = roundFolder.Parent[prop]
1958 roundFolder.Left[prop] = roundFolder.Parent[prop]
1959 roundFolder.Right[prop] = roundFolder.Parent[prop]
1960 roundFolder.Center[prop] = roundFolder.Parent[prop]
1961 roundFolder.Corner_1[to or prop] = roundFolder.Parent[prop]
1962 roundFolder.Corner_2[to or prop] = roundFolder.Parent[prop]
1963 roundFolder.Corner_3[to or prop] = roundFolder.Parent[prop]
1964 roundFolder.Corner_4[to or prop] = roundFolder.Parent[prop]
1965 end
1966 local connect = function(prop,to)
1967 if connected then connected:Disconnect() end
1968 pcall(function()
1969 spacesaver(prop,to)
1970 connected = roundFolder.Parent:GetPropertyChangedSignal(prop):connect(function()
1971 spacesaver(prop,to)
1972 end)
1973 end)
1974 end
1975 roundFolder.AncestryChanged:connect(function()
1976 pcall(function() roundFolder.Parent.BackgroundTransparency = 1 connect('BackgroundColor3','ImageColor3') end)
1977 end)
1978 connect('BackgroundColor3','ImageColor3')
1979 return roundFolder
1980end)
1981
1982Spice.Properties.new("Round",function(who, ...)
1983 local round = Spice.Instance.new('RoundedGuiObject',{Size = UDim2.new(1,0,1,0), Name = 'RoundedGuiObject'})
1984 local setRound = function(who,...)
1985 local function getRadius(...)
1986 local args = type(({...})[1]) == 'table' and ({...})[1] or {...}
1987 if #args >= 4 then
1988 return {args[1],args[2],args[3],args[4]}
1989 elseif #args >= 2 then
1990 return {args[1],args[2],args[2],args[3] or args[1]}
1991 elseif #args == 1 then
1992 return {args[1],args[1],args[1],args[1]}
1993 else
1994 return {0,0,0,0}
1995 end
1996 end
1997 local rad = getRadius(...)
1998 local val = who.RadiusValues
1999 val.Corner_1.Value = rad[1]
2000 val.Corner_2.Value = rad[2]
2001 val.Corner_3.Value = rad[3]
2002 val.Corner_4.Value = rad[4]
2003 end
2004 setRound(round,...)
2005 who.ZIndex = who.ZIndex + 1
2006 round.Parent = who
2007end)
2008
2009Spice.Instance.newClass('RoundedFrame',function(roundsize)
2010 local frame = Spice.Instance.newObject('Frame',{TopBarColor3 = Color3.fromRGB(163,162,165),BottomBarColor3 = Color3.fromRGB(163,162,165),BackgroundTransparency = 0, RoundSize = roundsize or 8},{Round = roundsize or 8})
2011 frame:NewIndex('RoundSize',function(self,new)
2012 for i,v in next, self.Instance.RoundedGuiObject.RadiusValues:GetChildren() do
2013 v.Value = new
2014 end
2015 self.Object.RoundSize = new
2016 end)
2017 frame:NewIndex('BackgroundTransparency',function(self,new)
2018 self.Object.BackgroundTransparency = new
2019 for i,v in next, self.Instance.RoundedGuiObject:GetChildren() do
2020 if v:IsA'GuiObject' then
2021 if v.ClassName == 'ImageLabel' then
2022 v.ImageTransparency = new
2023 else
2024 v.BackgroundTransparency = new
2025 end
2026 end
2027 end
2028 end)
2029 frame:NewIndex('TopBarColor3',function(self,new)
2030 local round = self.Instance.RoundedGuiObject
2031 round.Corner_1.ImageColor3 = new
2032 round.Corner_2.ImageColor3 = new
2033 round.Top.BackgroundColor3 = new
2034 self.Object.TopBarColor3 = new
2035 end)
2036 frame:NewIndex('BottomBarColor3',function(self,new)
2037 local round = self.Instance.RoundedGuiObject
2038 round.Corner_3.ImageColor3 = new
2039 round.Corner_4.ImageColor3 = new
2040 round.Top.BackgroundColor3 = new
2041 self.Object.BottomBarColor3 = new
2042 end)
2043 frame:NewIndex('TopBarRoundSize',function(self,new)
2044 local round = self.Instance.RoundedGuiObject.RadiusValues
2045 round.Corner_1.Value = new
2046 round.Corner_2.Value = new
2047 end)
2048 frame:NewIndex('BottomBarRoundSize',function(self,new)
2049 local round = self.Instance.RoundedGuiObject.RadiusValues
2050 round.Corner_3.Value = new
2051 round.Corner_4.Value = new
2052 end)
2053 frame:Index('TopBarRoundSize',function(self)
2054 return self.Instance.RoundedGuiObject.RadiusValues.Corner_1.Value
2055 end)
2056 frame:Index('BottomBarRoundSize',function(self)
2057 return self.Instance.RoundedGuiObject.RadiusValues.Corner_3.Value
2058 end)
2059 return frame
2060end)
2061
2062Spice.Instance.newClass("Icon",function(...)
2063 return Spice.Imagery.insertImage(...)
2064end)
2065Spice.Instance.newClass("IconButton",function(...)
2066 return Spice.Imagery.toImage(Spice.Instance.newInstace('ImageButton'), ...)
2067end)
2068
2069Spice.Properties.new("List",function(who, props)
2070 Spice.Instance.newInstance('UIListLayout',who, props and type(props) == 'table' and props or nil)
2071end)
2072Spice.Properties.new("Grid",function(who, props)
2073 Spice.Instance.newInstance('UIGridLayout',who, props and type(props) == 'table' and props or nil)
2074end)
2075Spice.Properties.new("Page",function(who, props)
2076 Spice.Instance.newInstance('UIPageLayout',who, props and type(props) == 'table' and props or nil)
2077end)
2078Spice.Properties.new("Spacing",function(who, props)
2079 Spice.Instance.newInstance('UIPadding',who, props and type(props) == 'table' and props or nil)
2080end)
2081
2082_G.Spice = Spice
2083--c00lgui reborn v1.9
2084--Spice v1.7.2
2085
2086local Spice = _G.Spice
2087local Audio, Color, Effects, Icon, Item, Misc, UD, Props, Settings, Table, Theme, Util = Spice.Audio, Spice.Color, Spice.Effects, Spice.Iconography, Spice.Instance, Spice.Misc, Spice.Positioning, Spice.Properties, Spice.Settings, Spice.Table, Spice.Theming, Spice.Util
2088local create, create2, create3, create4, clone = Item.new, Item.newObject, Item.newInstance, Item.newPure, Item.clone
2089local set, has, get, is = Props.setProperties, Props.hasProperty, Item.getInstanceOf, Item.isA
2090local garg = Misc.getArgument
2091local um, ud, v2 = UD.fromUDim, UD.new, UD.fromVector2
2092local hex,rgb,hsv = Color.fromHex, Color.fromRGB, Color.fromHSV
2093local tween = Misc.tweenService
2094
2095--Indexing Old Spice Tables
2096Spice.Theming = setmetatable({
2097 new = function(name,...)
2098 local theme = {
2099 AutoSync = true;
2100 Name = name;
2101 Values = setmetatable({...},{
2102 __call = function(self,index,typ)
2103 local vals = typ and {} or self
2104 if typ then
2105 for i,v in next, self do
2106 if type(v) == typ then
2107 table.insert(vals,v)
2108 end
2109 end
2110 end
2111 return vals[index or 1], vals
2112 end;
2113 });
2114 Objects = {};
2115 Set = function(self,...)
2116 Spice.Theming.setTheme(self,...)
2117 end;
2118 Insert = function(self,...)
2119 Spice.Theming.insertObject(self,...)
2120 end;
2121 Sync = function(self,...)
2122 Spice.Theming.sync(self,...)
2123 end;
2124 }
2125 getmetatable(Spice.Theming).Themes[name] = theme
2126 return theme
2127 end;
2128 getTheme = function(name,index,typ)
2129 local theme = type(name) == 'table' and name or type(name) == 'string' and getmetatable(Spice.Theming).Themes[name]
2130 return index and theme.Values(index,typ) or theme
2131 end;
2132 setTheme = function(name,...)
2133 local theme = type(name) == 'table' and name or Spice.Theming.getTheme(name)
2134 local args = {...}
2135 if #args == 2 and type(args[2]) == 'number' then
2136 theme.Values[args[2]] = args[1]
2137 else
2138 theme.Values = setmetatable({...},getmetatable(theme.Values))
2139 end
2140 local run = theme.AutoSync and theme:Sync()
2141 end;
2142 insertObject = function(name,obj,prop,ind)
2143 local theme = type(name) == 'table' and name or Spice.Theming.getTheme(name)
2144 local value = theme.Values(ind,type(obj[prop]))
2145 if not Spice.Instance.isAnObject(obj) then
2146 prop = Spice.Properties[prop]
2147 end
2148 if not theme.Objects[obj] then
2149 theme.Objects[obj] = {}
2150 end
2151 theme.Objects[obj][prop] = ind or 1
2152 obj[prop] = theme.AutoSync and value or obj[prop]
2153 end;
2154 sync = function(name,lerp,tim,...)
2155 if not name then
2156 for i,v in next, getmetatable(Spice.Theming).Themes do
2157 Spice.Theming.sync(v)
2158 end
2159 else
2160 name = type(name) == 'table' and name or Spice.Theming.getTheme(name)
2161 for obj,v in next, name.Objects do
2162 for prop,ind in next, v do
2163 local value = name.Values(ind,type(obj[prop]))
2164 if not lerp then
2165 obj[prop] = value
2166 else
2167 Spice.Tweening.new(obj,prop,value,tim or 1,...)
2168 end
2169 end
2170 end
2171 end
2172 end
2173},{
2174 Themes = {};
2175});
2176Theme = Spice.Theming
2177Spice.Iconography = setmetatable({
2178 insertIconList = function(img,xlen,ylen,xgrid,ygrid,names)
2179 if not names then names = ygrid ygrid = xgrid end
2180 local count = 1
2181 for y = 0, ylen-1,1 do
2182 for x = 0,xlen-1,1 do
2183 local icon = Instance.new("ImageLabel")
2184 icon.BackgroundTransparency = 1
2185 icon.Image = img
2186 icon.ImageRectOffset = Vector2.new(x*xgrid,y*ygrid)
2187 icon.ImageRectSize = Vector2.new(xgrid,ygrid)
2188 local namefil = Spice.Misc.stringFilterOut(names[count] or 'Icon','_',nil,true)
2189 local name = namefil[#namefil]
2190 table.remove(namefil,#namefil)
2191 Spice.Iconography.insertIcon(name,icon,unpack(namefil))
2192 count = count + 1
2193 end
2194 end
2195 end;
2196 insertIcon = function(name,icon,...)
2197 if type(icon) == 'number' then local tempi = Instance.new("ImageLabel") tempi.Image = 'rbxassetid://'..icon icon = tempi end
2198 local index = getmetatable(Spice.Iconography).Icons
2199 for i,v in next,{...} or {} do
2200 v = v:sub(1,1):upper()..v:sub(2)
2201 if not index[v] then
2202 index[v] = {}
2203 end
2204 index = index[v]
2205 end
2206 if index[name] and type(index[name]) ~= 'table' then
2207 index[name] = {index[name]}
2208 end
2209 if index[name] then
2210 table.insert(index[name],icon)
2211 else
2212 index[name] = icon
2213 end
2214 end;
2215 new = function(name,...)
2216 local index = getmetatable(Spice.Iconography).Icons
2217 local props
2218 for i,v in next,{...} or {} do
2219 if type(v) == 'table' then props = v else
2220 v = v:sub(1,1):upper()..v:sub(2)
2221 index = index[v]
2222 end
2223 end
2224 local icon = Spice.Table.search(index,name)
2225 local times = 3
2226 repeat times = times - 1
2227 if type(icon) == 'table' then
2228 _, icon = next(icon)
2229 end
2230 until times == 0 or type(icon) == 'userdata'
2231 return props and Spice.Properties.setProperties(icon:Clone(), props) or icon:Clone() or nil
2232 end;
2233 getIconData = function(...)
2234 local i = Spice.Iconography.new(...)
2235 return {Image = i.Image, ImageRectSize = i.ImageRectSize, ImageRectOffset = i.ImageRectOffset}
2236 end;
2237 newButton = function(...)
2238 local args, props = {}
2239 for i,v in next, {...} do
2240 if type(v) == 'table' then props = v else
2241 table.insert(args,v)
2242 end
2243 end
2244 local i = Spice.Table.merge(Spice.Iconography.getIconData(unpack(args)), props)
2245 return Spice.Instance.newInstance('ImageButton',i)
2246 end;
2247},{
2248 Icons = {}
2249 }
2250);
2251Icon = Spice.Iconography
2252Spice.Instance.newClass("Icon",function(...)
2253 return Spice.Iconography.new(...)
2254end)
2255Spice.Instance.newClass("IconButton",function(...)
2256 return Spice.Instance.newInstance("ImageButton",Spice.Table.merge(Spice.Iconography.getIconData(...),{BackgroundTransparency = 1}))
2257end)
2258local appleGlyphsPart1 = {
2259 'iOS11_About','iOS11_Add User','iOS11_Address Book','iOS11_Advertising', 'iOS11_Air Play', 'iOS11_Airdrop','iOS11_Airplane Mode On', 'iOS11_Albums', 'iOS11_Attention', 'iOS11_Apple';
2260 'iOS11_Alarm Clock', 'iOS11_Approval', 'iOS11_Attach', 'iOS11_Bar Chart', 'iOS11_Bank Cards', 'iOS11_Bank Card Back', 'iOS11_Audio', 'iOS11_Ball Point Pen', 'iOS11_Automation', 'iOS11_Book';
2261 'iOS11_Calendar', 'iOS11_Businessman', 'iOS11_Browse Podcasts', 'iOS11_Briefcase', 'iOS11_Bookmark', 'iOS11_Box', 'iOS11_Bookmark Ribbon', "Bell", 'iOS11_Bed', 'iOS11_Buy';
2262 'iOS11_Cell Phone', 'iOS11_Camera', 'iOS11_Car', 'iOS11_Cancel', 'iOS11_Calculator', 'iOS11_Cellular Network', 'iOS11_Chat', 'iOS11_Circled Play', 'iOS11_Checked', 'iOS11_Checked Checkbox';
2263 'iOS11_Contact Card', 'iOS11_Compass', 'iOS11_Compact Camera', 'iOS11_Computer', 'iOS11_Comments', 'iOS11_Combo Chart', 'iOS11_Collaboartion', 'iOS11_Clock', 'iOS11_Coins', 'iOS11_Cloud';
2264 'iOS11_Download', 'iOS11_Documents', 'iOS11_Define Location', 'iOS11_Decline', 'iOS11_Delivery', 'iOS11_Database', 'iOS11_Create New', 'iOS11_Conference', 'iOS11_Copy', 'iOS11_Document';
2265 'iOS11_Filter', 'iOS11_Folder', 'iOS11_Flash Light', 'iOS11_Facebook', 'iOS11_Face ID', 'iOS11_File', 'iOS11_Exit', 'iOS11_Duplicate', 'iOS11_Worldwide Location', 'iOS11_Error';
2266 'iOS11_Dashboard', 'iOS11_Following', 'iOS11_For You', 'iOS11_Gallery', 'iOS11_Geo Fence', 'iOS11_Globe', 'iOS11_Genuis', 'iOS11_Game Controller', 'iOS11_Contacts', 'iOS11_Globe Earth';
2267 'iOS11_Gift', 'iOS11_Hand Cursor', 'iOS11_Graduation Cap', 'iOS11_Health Data', 'iOS11_Happy', 'iOS11_Health Sources', 'iOS11_Handshake', 'iOS11_Help', 'iOS11_Heart', 'iOS11_High Battery';
2268 'iOS11_Instagram', 'iOS11_Invisible', 'iOS11_Investment', 'iOS11_Image File', 'iOS11_Idea', 'iOS11_Info', 'iOS11_Home Automation', 'iOS11_Home', 'iOS11_High Priority', 'iOS11_iPhone';
2269}
2270local appleGlyphsPart2 = {
2271 'iOS11_iPhone X', 'iOS11_Key', 'iOS11_Layers', 'iOS11_Keypad', 'iOS11_Laptop', 'iOS11_Link', 'iOS11_List', 'iOS11_Lock', 'iOS11_Literature', 'iOS11_Line Chart';
2272 'iOS11_Lock Orientation', 'iOS11_Moon Symbol', 'iOS11_Money Bag', 'iOS11_Monitor', 'iOS11_Money Box', 'iOS11_Minus', 'iOS11_Microphone', 'iOS11_Money', 'iOS11_Message', 'iOS11_Menu';
2273 'iOS11_Memories', 'iOS11_Marker', 'iOS11_Meeting', 'iOS11_Medical ID', 'iOS11_Map', 'iOS11_Maintenance', 'iOS11_Map Marker', 'iOS11_Paper Plane', 'iOS11_Paper Money', 'iOS11_Order';
2274 'iOS11_Ok', 'iOS11_Open', 'iOS11_Online Support', 'iOS11_News', 'iOS11_Musical Notes', 'iOS11_Note', 'iOS11_Music Library', 'iOS11_Movie', 'iOS11_Resturant', 'iOS11_Report Card';
2275 'iOS11_Refresh', 'iOS11_Product', 'iOS11_Radio Waves', 'iOS11_QR Code', 'iOS11_Price Tag', 'iOS11_Plus', 'iOS11_Print', 'iOS11_Play', 'iOS11_Planner', 'iOS11_Pie Chart';
2276 'iOS11_People', 'iOS11_Picture', 'iOS11_Phone', 'iOS11_PDF', 'iOS11_Password', 'iOS11_Pencil', 'iOS11_Search', 'iOS11_Server', 'iOS11_Security Checked', 'iOS11_Save';
2277 'iOS11_Rocket', 'iOS11_Screenshot', 'iOS11_Shopping Cart', 'iOS11_Shopping Bag', 'iOS11_Shopping Cart Loaded', 'iOS11_Shop', 'iOS11_Settings', 'iOS11_Services', 'iOS11_SMS', 'iOS11_Star';
2278 'iOS11_Stack of Photos', 'iOS11_Spotlight', 'iOS11_Shutdown', 'iOS11_Speech Bubble', 'iOS11_Support', 'iOS11_Thumbs Up', 'iOS11_Synchronize', 'iOS11_Stopwatch', 'iOS11_Statistics', 'iOS11_Sun';
2279 'iOS11_Trash', 'iOS11_Truck', 'iOS11_Training', 'iOS11_Today Apps', 'iOS11_Timer', 'iOS11_Voicemail', 'iOS11_Wallet', 'iOS11_Visible', 'iOS11_Wallet App', 'iOS11_Wifi';
2280 'iOS11_Trophy', 'iOS11_Video Call', 'iOS11_User Male', 'iOS11_Videos Purchase', 'iOS11_User Group Mixed', 'iOS11_User Group Men', 'iOS11_US Dollar', 'iOS11_Twitter', 'iOS11_Upload', 'iOS11_Unlock';
2281}
2282Spice.Iconography.insertIconList('rbxassetid://1574419350',10, 10, 90, 90, appleGlyphsPart1)
2283Spice.Iconography.insertIconList('rbxassetid://1573947013',10, 10, 90, 90, appleGlyphsPart2)
2284Spice.Tweening.new = Spice.Tweening.tween
2285--Dims
2286local lp = game.Players.LocalPlayer
2287local pg = game.CoreGui
2288local sg = Instance.new("ScreenGui", pg)
2289sg.DisplayOrder = 5
2290
2291--Creation Settings
2292Props.setDefault('GuiObject',{BorderSizePixel = 0})
2293
2294--Theme
2295local theme_Primary = Theme.new('Primary', rgb(255,91,76))--rgb(255,91,76))
2296local theme_Background = Theme.new('Background', Color3.new(1,1,1))
2297local theme_Highlight = Theme.new('Highlight', rgb(81,81,81))
2298
2299--New Additions
2300Spice.Instance.newClass("Field",function(siz,...)
2301 local rest = type(siz) == 'string' and true or false
2302 local pos, br, pad, brcol
2303 local args = {...}
2304 if type(args[1]) == 'number' then
2305 pos, br, pad, brcol = ...
2306 else
2307 br, pad, brcol = ...
2308 end
2309 local field = Spice.Instance.newInstance("Frame",nil,{Position = ud(0,pos or 0,2),Transparency = 1,Size = not rest and ud(1,siz,4) or ud(1,0,1),BorderSizePixel = 0})
2310 if br then
2311 local bre = Spice.Instance.newInstance('Frame',field,{Size = ud(1,-(pad or 0)*2,0,1),BackgroundColor3 = brcol or hex'#e9e9e9',BorderSizePixel = 0,Position = ud(0,pad or 0,1,0),ap = v2(0,1)})
2312 end
2313 if rest then
2314 field.AncestryChanged:connect(function(me, mom)
2315 me.Size = ud(1,0,1,-me.Position.Y.Offset - (me.Position.Y.Scale*mom.AbsoluteSize.Y))
2316 end)
2317 end
2318 return field
2319end)
2320
2321Spice.Properties.new('Shadow',function(self, thicc, lightness)
2322 local a = Spice.Instance.newInstance('ImageLabel', self, {Name = 'Shadow',bt = 1, pos = ud(0,1,1), siz = ud(1,thicc and type(thicc) == 'number' and thicc or 8,4), Image = 'rbxasset://textures/ui/TopBar/dropshadow@2x.png', it = lightness or .8})
2323end)
2324
2325--Data Storage
2326local data_Tabs = {
2327 ['Test'] = {
2328 ['Button_1'] = function()
2329 print'mega gay'
2330 end
2331 }
2332}
2333
2334for i,v in next, game:GetObjects('rbxassetid://01926535129')[1]:GetChildren() do
2335 if v.Name ~= 'Music' then
2336 local buttons = {}
2337 for i,v in next, v:GetChildren() do
2338 buttons[v.Name] = loadstring(v.Value)
2339 end
2340 data_Tabs[v.Name] = buttons
2341 end
2342end
2343--Script
2344local main = create('RoundedFrame',sg,25,{
2345 Draggable = {.2, 'Quint', 'Out'},
2346 siz = ud(336,'o'),
2347 ap = v2(.5),
2348 pos = ud(.5),
2349 bac = 'Background',
2350 cd = true,
2351 Active = true
2352})
2353
2354local Top = create('Field',main,32,{Shadow = 12,zi = 2})
2355local topBar = create2('Frame',Top,{Bar = {main.RoundedGuiObject.Corner_1,main.RoundedGuiObject.Corner_2,main.RoundedGuiObject.Top}},{bac = theme_Background.Values[1],pos = ud(0,main.RoundSize,2), siz = ud(1,0,1,-main.RoundSize), bsp = 0})
2356topBar.Instance.Changed:connect(function(what)
2357 for i,v in next, topBar.Bar do
2358 pcall(function()
2359 if what:find'Background' and v.ClassName == 'ImageLabel' then
2360 v['Image'..what:sub(#('Background')+1)] = topBar.Instance[what]
2361 else
2362 v[what] = topBar.Instance[what]
2363 end
2364 end)
2365 end
2366end)
2367local button_search = Icon.newButton('Search','iOS11',{Parent = Top, siz = ud(22,'o'), pos = ud(main.RoundSize-8,.5,5), ap = v2(0,.5), bt = 1, ic = 'Highlight',zi = 2})
2368
2369local field_Title = create3('Frame',Top,{ap = v2(.5), bt = 1, pos = ud(.5), siz = ud(100,1,5), cd = true,zi = 2})
2370local title_c00lgui = create3('TextLabel',field_Title,{ap = v2(0,.5),zi = 2, bt = 1, pos = ud(5,.5,5), siz = ud(45,1,5), cd = true, Font = Enum.Font.SourceSans, Text = 'c00lgui', tc = 'Primary', ts = 18})
2371local title_reborn = create3('TextLabel',field_Title,{ap = v2(0,.5),zi = 2, bt = 1, pos = ud(50,.5,5), siz = ud(44,1,5), cd = true, Font = Enum.Font.SourceSans, Text = ' reborn', texts = 18, tc = 'Highlight'})
2372Top.Shadow.ZIndex = 2
2373local Head = create('Field',main,50,35)
2374local field_Tabs = create3('Frame', Head, {bt = 1, pos = ud(15,0,2), siz = ud(0,0,1,0), cd = true, List = {{Padding = um(0,10), FillDirection = 'Horizontal', vert = Enum.VerticalAlignment.Center}}})
2375local Body = create('Field', main, 'rest', 32,{pos = ud(0,88,2),Grid = {{CellPadding = ud(5,'o'), CellSize = ud(1,-42,0,50), HorizontalAlignment = 'Center'}}})
2376function clearBody()
2377 for i,v in next, Body:GetChildren() do
2378 if v.ClassName == 'Frame' then
2379 v:Destroy()
2380 end
2381 end
2382end
2383local field_Body = create('Field', main,'rest', 32, {cd = true})
2384Body.Position = ud(0,0,2)
2385Body.Parent = field_Body
2386Body.Position = ud(0,55,2)
2387for i,v in next, data_Tabs do
2388 local tab = create3('TextButton', field_Tabs, {act = true,ap = v2(0,.5), bt = 1,Ripple = true, Font = 'SourceSans', Text = i, tc = rgb(178,178,178), ts = 24})
2389 tab.Size = ud(Spice.Misc.getTextSize(tab).X+15, 1,5)
2390 tab.MouseButton1Click:connect(function()
2391 for i,v in next, field_Tabs:GetChildren() do
2392 if v.ClassName == 'TextButton' then
2393 v.TextColor3 = Spice.Color.toRGB(topBar.Instance.BackgroundColor3) == 33 and rgb(255,255,255) or rgb(178,178,178)
2394 end
2395 end
2396 tab.TextColor3 = Spice.Color.toRGB(topBar.Instance.BackgroundColor3) == 33 and theme_Primary.Values[1] or rgb(33,33,33)
2397 clearBody()
2398 for i,v in next, v do
2399 local ghost = create3('Frame', Body, {nam = i,bac = rgb(245,245,245),bt = 1,bsp = 0, Shadow = 0,abc = false,ap = v2(.5,0)})
2400 local button = create3('TextButton', ghost, {bt = 1,siz = ud(1),Text = i,Name = i,bsp = 0,Ripple = true,Shadow = true,abc = false, Font = 'SourceSans', text = i, tc = rgb(75,75,75), ts = 18})
2401 ghost.InputBegan:connect(function(input)
2402 if input.UserInputType == Enum.UserInputType.MouseMovement then
2403 Spice.Tweening.new(ghost, 'bt', 0, .3)
2404 Spice.Tweening.new(ghost.Shadow, 'Size', ud(1,8,4), .3)
2405 end
2406 end)
2407 ghost.InputEnded:connect(function(input)
2408 if input.UserInputType == Enum.UserInputType.MouseMovement then
2409 Spice.Tweening.new(ghost, 'bt', 1, .3)
2410 Spice.Tweening.new(ghost.Shadow, 'Size', ud(1,0,4), .3)
2411 end
2412 end)
2413 button.MouseButton1Click:connect(v)
2414 end
2415 end)
2416 field_Tabs.Size = field_Tabs.Size + ud(tab.AbsoluteSize.X,0,2)
2417end
2418local scrollingOnTabs = false
2419local tabpos = 15
2420local scrollTabs = function(newpos)
2421 if newpos <= 15 and newpos >= -(field_Tabs.Size.X.Offset-300) then-->= -((#Body:GetChildren()-1)*50 - 200) and newpos <= 55 then
2422 tabpos = newpos
2423 field_Tabs.Position = ud(newpos,0,2)
2424 end
2425end
2426Head.MouseWheelForward:connect(function()
2427 scrollingOnTabs = true
2428 scrollTabs(tabpos + 10)
2429end)
2430Head.MouseWheelBackward:connect(function()
2431 scrollingOnTabs = true
2432 scrollTabs(tabpos - 10)
2433end)
2434Head.InputEnded:connect(function(input)
2435 if input.UserInputType == Enum.UserInputType.MouseWheel then
2436 scrollingOnTabs = false
2437 end
2438end)
2439local body_Pos = 55
2440local setPosition = function(newpos)
2441 if newpos == 35 and Head.Position.Y.Offset == 35 then
2442 Spice.Tweening.tweenGuiObject(button_search,'pos',ud(main.RoundSize-8,-.5,5))
2443 Spice.Tweening.tweenGuiObject(field_Title,'pos',ud(.5,-.5,1))
2444 Spice.Tweening.new(topBar,'bac',rgb(33,33,33),.3)
2445 Spice.Tweening.tweenGuiObject(Head,'both',ud(0),ud(1,32,4))
2446 for i,v in next, field_Tabs:GetChildren() do
2447 if v.ClassName == 'TextButton' then
2448 if v.TextColor3 == rgb(33,33,33) then
2449 v.TextColor3 = theme_Primary.Values[1]
2450 else
2451 v.TextColor3 = rgb(255,255,255)
2452 end
2453 v.TextSize = 18
2454 v.Size = ud(v.TextBounds.X+8,1,5)
2455 end
2456 end
2457 elseif newpos == 45 and Head.Position.Y.Offset < 35 then
2458 Spice.Tweening.tweenGuiObject(button_search,'pos',ud(main.RoundSize-8,.5,5))
2459 Spice.Tweening.tweenGuiObject(field_Title,'pos',ud(.5))
2460 Spice.Tweening.new(topBar,'bac',theme_Background.Values[1],.3)
2461 Spice.Tweening.tweenGuiObject(Head,'both',ud(0,35,2),ud(1,50,4))
2462 for i,v in next, field_Tabs:GetChildren() do
2463 if v.ClassName == 'TextButton' then
2464 if v.TextColor3 == theme_Primary.Values[1] then
2465 v.TextColor3 = rgb(33,33,33)
2466 else
2467 v.TextColor3 = rgb(178,178,178)
2468 end
2469 v.TextSize = 24
2470 v.Size = ud(v.TextBounds.X+15,1,5)
2471 end
2472 end
2473 end
2474 if newpos >= -((#Body:GetChildren()-1)*50 - 200) and newpos <= 55 then
2475 body_Pos = newpos
2476 Body.Position = ud(0, newpos,2)
2477 end
2478end
2479field_Body.MouseWheelForward:connect(function(x,y)
2480 wait()
2481 if not scrollingOnTabs then
2482 setPosition(body_Pos + 10)
2483 end
2484end)
2485field_Body.MouseWheelBackward:connect(function(x,y)
2486 wait()
2487 if not scrollingOnTabs then
2488 setPosition(body_Pos - 10)
2489 end
2490end)
2491
2492button_search.MouseButton1Click:connect(function()
2493 button_search.ImageColor3 = hex'fff'
2494 Spice.Tweening.tweenGuiObject(field_Title,'pos',ud(.5,-.5,1))
2495 Spice.Tweening.new(topBar,'bac',theme_Primary.Values[1],.3)
2496 local tb = create3('TextBox', button_search, {pc = hex'fff',tc = hex'fff',bt = 1, pos = ud(1,5,0,0), siz = ud(0,1,5), Font = 'SourceSans', PlaceholderText = 'Search', ts = 18,zi = 2,txa = 'Left'})
2497 Spice.Tweening.tweenGuiObject(tb,'siz',ud(250,1,5))
2498 create3('Frame',tb,{bsp = 0,bac = hex'fff', pos = ud(0,1,1), siz = ud(1,1,4), zi = 2})
2499 local TextBox = tb--put textbox here
2500 TextBox:GetPropertyChangedSignal('Text'):connect(function()
2501 local directory = Body--put directory here
2502 for i,v in next,directory:GetChildren() do
2503 if v.ClassName == 'Frame' then
2504 v.Visible = false
2505 if v.Name:sub(1,#TextBox.Text):lower() == TextBox.Text:lower() then
2506 v.Visible = true
2507 end
2508 if #TextBox.Text < 1 then
2509 v.Visible = true
2510 end
2511 end
2512 end
2513 end)
2514 tb.FocusLost:connect(function()
2515 tb:Destroy()
2516 Spice.Tweening.tweenGuiObject(field_Title,'pos',ud(.5,.5,1))
2517 Spice.Tweening.new(topBar,'bac',theme_Background.Values[1],.3)
2518 button_search.ImageColor3 = theme_Highlight.Values[1]
2519 end)
2520end)