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