local n={}for U=1,61,1 do n[U]=false end function HighlightPianoKey(U,G)if not Settings.KeyAesthetics then return end local y=math.ceil(U/12)local h=(U-1)%12+1 local d=Piano.Keys.Keys:FindFirstChild(U)if d then if IsBlack(U)then d.Color=Color3.fromRGB(229,91,188)d.ParticleEmitter.Color=ColorSequence.new({ColorSequenceKeypoint.new(0,Color3.fromRGB(229,91,188));ColorSequenceKeypoint.new(1,Color3.fromRGB(229,91,188))})else d.Color=Color3.fromRGB(229,117,214)d.ParticleEmitter.Color=ColorSequence.new({ColorSequenceKeypoint.new(0,Color3.fromRGB(229,117,214)),ColorSequenceKeypoint.new(1,Color3.fromRGB(229,117,214))})end d.Transparency=0 d.ParticleEmitter:Emit(1)n[U]=true local G=d local y={}y.Size=Vector3.new(d.Size.x+1,d.Size.y,d.Size.z)y.Position=Vector3.new(d.Position.x,d.Position.y+.5,d.Position.z)Tween(G,y,.2,true,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false)n[U]=false wait(.1)if not n[U]then y={}y.Size=Vector3.new(.13,.39,.39)y.Position=Vector3.new(d.Position.x,orgins[tostring(U)][1].y,d.Position.z)Tween(G,y,.1,true,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false)end 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 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 + 0.5, key.Position.z)
		Tween(obj, Properties, 0.2, true, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false)
		vars[note1] = false
		wait(0.1)
		if not vars[note1] then
			Properties = {}
			Properties.Size = Vector3.new(0.13, 0.39, 0.39)
			Properties.Position = Vector3.new(key.Position.x, orgins[tostring(note1)][1].y, key.Position.z)
			Tween(obj, Properties, 0.1, true, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false)
		end
	end
	return
end
