local A=Piano.Case:GetChildren()local X=0 function HighlightPianoKey(U,r)if not Settings.KeyAesthetics then return end local l=math.ceil(U/12)local b=(U-1)%12+1 if X<20 then X=X+1 local r=A[math.random(1,#A)]:clone()r.Parent=Piano.Keys.Parts r.Name=U r.Color=Color3.fromRGB(math.random(70,255),math.random(70,255),math.random(70,255))r.Material=Materials[math.random(1,#Materials)]r.Position=Vector3.new(r.Position.x+math.random(-5,5),r.Position.y,r.Position.z+math.random(-5,5))r.Transparency=0 local l=math.random(.6,2.0)local b=0 while b<=l do wait(.05)b=b+.05 if math.random(1,4)~=1 then for A=1,5,1 do if math.random(1,2)==1 then if A==1 then r.Color=Color3.fromRGB(math.random(70,255),math.random(70,255),math.random(70,255))elseif A==2 then r.Material=Materials[math.random(1,#Materials)]elseif A==3 then r.Position=Vector3.new(r.Position.x+math.random(-8.0,8.0),r.Position.y,r.Position.z+math.random(-8.0,8.0))elseif A==4 then r.Orientation=Vector3.new(r.Orientation.x+math.random(-80,80),r.Orientation.y+math.random(-80,80),r.Orientation.z+math.random(-80,80))elseif A==5 then r.Size=Vector3.new(r.Size.x+math.random(-2.0,2.0),r.Size.y+math.random(-2.0,2.0),r.Size.z+math.random(-2.0,2.0))end end end end end X=X-1 r:destroy()end return end

local parts = Piano.Case:GetChildren()
local PartAmt = 0
function HighlightPianoKey(note1,transpose)
	if not Settings.KeyAesthetics then return end
	local octave = math.ceil(note1/12)
	local note2 = (note1 - 1)%12 + 1
	if PartAmt < 20 then
		PartAmt = PartAmt + 1
		local part = parts[math.random(1,#parts)]:clone()
		part.Parent = Piano.Keys.Parts
		part.Name = note1
		part.Color = Color3.fromRGB(math.random(70,255),math.random(70,255),math.random(70,255))
		part.Material = Materials[math.random(1,#Materials)]
		part.Position = Vector3.new(part.Position.x + math.random(-5,5),part.Position.y,part.Position.z + math.random(-5,5))
		part.Transparency = 0
		local lifelen = math.random(0.6,2.0)
		local t = 0
		
		while t <= lifelen do
			wait(.05)
			t = t + .05
			if math.random(1,4) ~= 1 then
				for i = 1,5 do
					if math.random(1,2) == 1 then
						if i == 1 then
							part.Color = Color3.fromRGB(math.random(70,255),math.random(70,255),math.random(70,255))
						elseif i == 2 then
							part.Material = Materials[math.random(1,#Materials)]
						elseif i == 3 then
							part.Position = Vector3.new(part.Position.x + math.random(-8.0,8.0),part.Position.y,part.Position.z + math.random(-8.0,8.0))
						elseif i == 4 then
							part.Orientation = Vector3.new(part.Orientation.x + math.random(-80,80),part.Orientation.y + math.random(-80,80),part.Orientation.z + math.random(-80,80))
						elseif i == 5 then
							part.Size = Vector3.new(part.Size.x + math.random(-2.0,2.0),part.Size.y + math.random(-2.0,2.0),part.Size.z + math.random(-2.0,2.0))
						end
					end
				end
			end
		end
		PartAmt = PartAmt - 1
		part:destroy()
	end
	return
end
