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

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
