Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Function Storage ]]--
- -- Recursive Children --
- function GetRecursiveChildren(P)
- local n,t,G={},table.foreach
- function G(c,p)
- table.insert(n,p)
- t(p:GetChildren(),G)
- end
- t(P:GetChildren(),G)
- return n
- end
- --[[ Lerps ]]--
- -- lerp --
- function lerp(a,b,c)
- return a+(b-a)*c
- end
- -- colerp --
- function colerp(a,b,c)
- return Color3.new(a.r+(b.r-a.r)*c,a.g+(b.g-a.g)*c,a.b+(b.b-a.b)*c)
- end
- -- glerp --
- function glerp(a,b,c)
- local axs,axo,ays,ayo,bxs,bxo,bys,byo=a.X.Scale,a.X.Offset,a.Y.Scale,a.Y.Offset,b.X.Scale,b.X.Offset,b.Y.Scale,b.Y.Offset
- return UDim2.new(axs+(bxs-axs)*c,axo+(bxo-axo)*c,ays+(bys-ays)*c,ayo+(byo-ayo)*c)
- end
- -- vlerp --
- function vlerp(a,b,c)
- local x=pcall(function()return a.Z end)
- local d=x and Vector3.new or Vector2.new
- return d(a.X+(b.X-a.X)*c,a.Y+(b.Y-a.Y)*c,x and a.Z-(b.Z-a.Z)*c)
- end
- -- clerp --
- function clerp(a,b,m)
- local c,d={a:components()},{b:components()}
- table.foreach(c,function(a,b)c[a]=c[a]+(d[a]-c[a])*m end)
- return CFrame.new(unpack(c))
- end
- --[[ |Lerps end| ]]--
- -- Get All BrickColors --
- function GetAllBrickColors()
- local T={}
- for r=1,255,10 do for g=1,255,10 do for b=1,255,10 do
- local C=BrickColor.new(r/255,g/255,b/255)
- if not T[C.Name] then
- T[C.Name]=C.Name
- end
- end end end
- return T
- end
- -- sleep --
- function sleep(T)
- local n = tick()
- repeat coroutine.yield() until tick()-n>(T or 0)
- return tick()-n
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement