local u={}function u.Appear(u)u.Visible=true end function u.Fade(u,v,o)u.Visible=true if u:IsA("\084\101\120\116\076\097\098\101\108")then u.TextTransparency=1-v*(1-o.TextTransparency)elseif u:IsA("\073\109\097\103\101\076\097\098\101\108")then u.ImageTransparency=1-v*(1-o.ImageTransparency)end end function u.Wiggle(u,v,o)u.Visible=true local t=(o.InitialSize.Y.Offset*(1-v))*o.AnimateStyleAmplitude u.Position=o.InitialPosition+UDim2.new(0,0,0,(math.sin(((v*math.pi)*2)*o.AnimateStyleNumPeriods)*t)/2)end function u.Swing(u,v,o)u.Visible=true local t=(90*(1-v))*o.AnimateStyleAmplitude u.Rotation=math.sin(((v*math.pi)*2)*o.AnimateStyleNumPeriods)*t end function u.Spin(u,v,o)u.Visible=true u.Position=o.InitialPosition+UDim2.new(0,o.InitialSize.X.Offset/2,0,o.InitialSize.Y.Offset/2)u.AnchorPoint=Vector2.new(.5,.5)u.Rotation=(v*o.AnimateStyleNumPeriods)*360 end function u.Rainbow(u,v,o)u.Visible=true local t=Color3.fromHSV((v*o.AnimateStyleNumPeriods)%1,1,1)if u:IsA("\084\101\120\116\076\097\098\101\108")then local z=getColorFromString(o.TextColor3)u.TextColor3=Color3.new(t.r+v*(z.r-t.r),t.g+v*(z.g-t.g),t.b+v*(z.b-t.b))else local z=getColorFromString(o.ImageColor3)u.ImageColor3=Color3.new(t.r+v*(z.r-t.r),t.g+v*(z.g-t.g),t.b+v*(z.b-t.b))end end

	-- characters: A list of the characters to be animated.
	-- animateAlpha: A value of 0 - 1 that represents the lifetime of the animation
	-- properties: A dictionary of all the properties at that character, including InitialSize and InitialPosition
	
local animationStyles = {}

function animationStyles.Appear(character)
	character.Visible = true
end

function animationStyles.Fade(character, animateAlpha, properties)
	character.Visible = true
	if character:IsA("TextLabel") then
		character.TextTransparency = 1 - (animateAlpha * (1 - properties.TextTransparency))
	elseif character:IsA("ImageLabel") then
		character.ImageTransparency = 1 - (animateAlpha * (1 - properties.ImageTransparency))
	end
end

function animationStyles.Wiggle(character, animateAlpha, properties)
	character.Visible = true
	local amplitude = properties.InitialSize.Y.Offset * (1 - animateAlpha) * properties.AnimateStyleAmplitude
	character.Position = properties.InitialPosition + UDim2.new(0, 0, 0, math.sin(animateAlpha * math.pi * 2 * properties.AnimateStyleNumPeriods) * amplitude / 2)
end

function animationStyles.Swing(character, animateAlpha, properties)
	character.Visible = true
	local amplitude = 90 * (1 - animateAlpha) * properties.AnimateStyleAmplitude
	character.Rotation = math.sin(animateAlpha * math.pi * 2 * properties.AnimateStyleNumPeriods) * amplitude
end

function animationStyles.Spin(character, animateAlpha, properties)
	character.Visible = true
	character.Position = properties.InitialPosition + UDim2.new(0, properties.InitialSize.X.Offset / 2, 0, properties.InitialSize.Y.Offset / 2)
	character.AnchorPoint = Vector2.new(0.5, 0.5)
	character.Rotation = animateAlpha * properties.AnimateStyleNumPeriods * 360
end

function animationStyles.Rainbow(character, animateAlpha, properties)
	character.Visible = true
	local rainbowColor = Color3.fromHSV(animateAlpha * properties.AnimateStyleNumPeriods % 1, 1, 1)
	if character:IsA("TextLabel") then
		local initialColor = getColorFromString(properties.TextColor3)
		character.TextColor3 = Color3.new(rainbowColor.r + animateAlpha * (initialColor.r - rainbowColor.r), rainbowColor.g + animateAlpha * (initialColor.g - rainbowColor.g), rainbowColor.b + animateAlpha * (initialColor.b - rainbowColor.b))
	else
		local initialColor = getColorFromString(properties.ImageColor3)
		character.ImageColor3 = Color3.new(rainbowColor.r + animateAlpha * (initialColor.r - rainbowColor.r), rainbowColor.g + animateAlpha * (initialColor.g - rainbowColor.g), rainbowColor.b + animateAlpha * (initialColor.b - rainbowColor.b))
	end
end

