--[[
AnimateKey(note1,px,py,pz,ox,oy,oz,Time)
--note1(1-61), position x, position y, position z, orientation x, orientation y, orientation z, time

local obj = --object or gui or wahtever goes here
local Properties = {}
Properties.Size = UDim2.new()
Tween(obj,Properties,2,true,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false)
--Obj,Property,Time,wait,Easingstyle,EasingDirection,RepeatAmt,Reverse
]]

local vars = {}
for i = 1,61 do
	vars[i] = false
end
function HighlightPianoKey(note1,transpose)
	if not Settings.KeyAesthetics then return end
	local octave = math.ceil(note1/12)
	local note2 = (note1 - 1)%12 + 1
	local key = Piano.Keys.Keys:FindFirstChild(note1)
	if key then
		if IsBlack(note1) then
			key.Color = Color3.fromRGB(229, 91, 188)
			key.ParticleEmitter.Color = ColorSequence.new({ColorSequenceKeypoint.new( 0, Color3.fromRGB(229, 91, 188)),ColorSequenceKeypoint.new( 1, Color3.fromRGB(229, 91, 188))})
		else
			key.Color = Color3.fromRGB(229, 117, 214)
			key.ParticleEmitter.Color = ColorSequence.new({ColorSequenceKeypoint.new( 0, Color3.fromRGB(229, 117, 214)),ColorSequenceKeypoint.new( 1, Color3.fromRGB(229, 117, 214))})
		end
		key.Transparency = 0
		key.ParticleEmitter:Emit(1)
		vars[note1] = true
		local obj = key
		local Properties = {}
		Properties.Size = Vector3.new(key.Size.x + 1,key.Size.y,key.Size.z)
		Properties.Position = Vector3.new(key.Position.x,key.Position.y + .5,key.Position.z)
		Tween(obj,Properties,.2,true,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false)
		vars[note1] = false
		wait(.1)
		if not vars[note1] then
			Properties = {}
			Properties.Size = Vector3.new(.13,.39,.39)
			Properties.Position = Vector3.new(key.Position.x,orgins[tostring(note1)][1].y,key.Position.z)
			Tween(obj,Properties,.1,true,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false)
		end
	end
	return
end
