function UnDigify(T)if T<1 or T>61 then return""elseif T==1 then return"\049"elseif T==2 then return"\033"elseif T==3 then return"\050"elseif T==4 then return"\064"elseif T==5 then return"\051"elseif T==6 then return"\052"elseif T==7 then return"\036"elseif T==8 then return"\053"elseif T==9 then return"\037"elseif T==10 then return"\054"elseif T==11 then return"\094"elseif T==12 then return"\055"elseif T==13 then return"\056"elseif T==14 then return"\042"elseif T==15 then return"\057"elseif T==16 then return"\040"elseif T==17 then return"\048"elseif T==18 then return"\113"elseif T==19 then return"\081"elseif T==20 then return"\119"elseif T==21 then return"\087"elseif T==22 then return"\101"elseif T==23 then return"\069"elseif T==24 then return"\114"elseif T==25 then return"\116"elseif T==26 then return"\084"elseif T==27 then return"\121"elseif T==28 then return"\089"elseif T==29 then return"\117"elseif T==30 then return"\105"elseif T==31 then return"\073"elseif T==32 then return"\111"elseif T==33 then return"\079"elseif T==34 then return"\112"elseif T==35 then return"\080"elseif T==36 then return"\097"elseif T==37 then return"\115"elseif T==38 then return"\083"elseif T==39 then return"\100"elseif T==40 then return"\068"elseif T==41 then return"\102"elseif T==42 then return"\103"elseif T==43 then return"\071"elseif T==44 then return"\104"elseif T==45 then return"\072"elseif T==46 then return"\106"elseif T==47 then return"\074"elseif T==48 then return"\107"elseif T==49 then return"\108"elseif T==50 then return"\076"elseif T==51 then return"\122"elseif T==52 then return"\090"elseif T==53 then return"\120"elseif T==54 then return"\099"elseif T==55 then return"\067"elseif T==56 then return"\118"elseif T==57 then return"\086"elseif T==58 then return"\098"elseif T==59 then return"\066"elseif T==60 then return"\110"elseif T==61 then return"\109"else return"\063"end end function IsBlack(T)if T%12==2 or T%12==4 or T%12==7 or T%12==9 or T%12==11 then return true end end local T=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")function Tween(j,y,Q,u,...)local q=TweenInfo.new(Q,...)local m=T:Create(j,q,y)m:Play()if u then m.Completed:wait()end return end function clone(T,j)if j and T then local j=T:Clone()j.Parent=T local y=j local Q={}Q.Position=Vector3.new(j.Position.x,j.Position.y+2.4,j.Position.z)Q.Size=Vector3.new(j.Size.x+4.8,j.Size.y,j.Size.z)Tween(y,Q,.2,true,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,true)j:Destroy()end return end function HighlightPianoKey(T,j)if not Settings.KeyAesthetics then return end local y=math.ceil(T/12)local Q=(T-1)%12+1 local u=Piano.Case.Circles[T]local q=true if u then local T=u:Clone()T.Parent=Piano.Keys.ActiveParts T.Transparency=0 local j=T local y={}y.CFrame=T.CFrame+T.CFrame.lookVector*-20 y.Transparency=1 Tween(j,y,2,false,Enum.EasingStyle.Linear,Enum.EasingDirection.Out)clone(T,true)wait(.1)clone(T,true)wait(.1)clone(T,true)wait(.1)clone(T,true)wait(.3)T:Destroy()end return end


function UnDigify(digit)
	if digit < 1 or digit > 61 then
		return ""
	elseif digit == 1 then
		return "1"
	elseif digit == 2 then
		return "!"
	elseif digit == 3 then
		return "2"
	elseif digit == 4 then
		return "@"
	elseif digit == 5 then
		return "3"
	elseif digit == 6 then
		return "4"
	elseif digit == 7 then
		return "$"
	elseif digit == 8 then
		return "5"
	elseif digit == 9 then
		return "%"
	elseif digit == 10 then
		return "6"
	elseif digit == 11 then
		return "^"
	elseif digit == 12 then
		return "7"
	elseif digit == 13 then
		return "8"
	elseif digit == 14 then
		return "*"
	elseif digit == 15 then
		return "9"
	elseif digit == 16 then
		return "("
	elseif digit == 17 then
		return "0"
	elseif digit == 18 then
		return "q"
	elseif digit == 19 then
		return "Q"
	elseif digit == 20 then
		return "w"
	elseif digit == 21 then
		return "W"
	elseif digit == 22 then
		return "e"
	elseif digit == 23 then
		return "E"
	elseif digit == 24 then
		return "r"
	elseif digit == 25 then
		return "t"
	elseif digit == 26 then
		return "T"
	elseif digit == 27 then
		return "y"
	elseif digit == 28 then
		return "Y"
	elseif digit == 29 then
		return "u"
	elseif digit == 30 then
		return "i"
	elseif digit == 31 then
		return "I"
	elseif digit == 32 then
		return "o"
	elseif digit == 33 then
		return "O"
	elseif digit == 34 then
		return "p"
	elseif digit == 35 then
		return "P"
	elseif digit == 36 then
		return "a"
	elseif digit == 37 then
		return "s"
	elseif digit == 38 then
		return "S"
	elseif digit == 39 then
		return "d"
	elseif digit == 40 then
		return "D"
	elseif digit == 41 then
		return "f"
	elseif digit == 42 then
		return "g"
	elseif digit == 43 then
		return "G"
	elseif digit == 44 then
		return "h"
	elseif digit == 45 then
		return "H"
	elseif digit == 46 then
		return "j"
	elseif digit == 47 then
		return "J"
	elseif digit == 48 then
		return "k"
	elseif digit == 49 then
		return "l"
	elseif digit == 50 then
		return "L"
	elseif digit == 51 then
		return "z"
	elseif digit == 52 then
		return "Z"
	elseif digit == 53 then
		return "x"
	elseif digit == 54 then
		return "c"
	elseif digit == 55 then
		return "C"
	elseif digit == 56 then
		return "v"
	elseif digit == 57 then
		return "V"
	elseif digit == 58 then
		return "b"
	elseif digit == 59 then
		return "B"
	elseif digit == 60 then
		return "n"
	elseif digit == 61 then
		return "m"
  	else
    	return "?"
	end
end
function IsBlack(note)
	if note%12 == 2 or note%12 == 4 or note%12 == 7 or note%12 == 9 or note%12 == 11 then
		return true
	end
end

local TweenService = game:GetService("TweenService")
function Tween(obj,Goal,Time,Wait,...)
    local TwInfo = TweenInfo.new(Time,...)
    local twn = TweenService:Create(obj, TwInfo, Goal)
    twn:Play()
    if Wait then
        twn.Completed:wait()
    end
	return
end

function clone(part,on)
	if on and part then
		local cln = part:Clone()
		cln.Parent = part
		local obj = cln
		local Properties = {}
		Properties.Position = Vector3.new(cln.Position.x,cln.Position.y + 2.4,cln.Position.z)
		Properties.Size = Vector3.new(cln.Size.x + 4.8,cln.Size.y,cln.Size.z)
		Tween(obj,Properties,.2,true,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,true)
		cln:Destroy()
	end
	return
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 k = Piano.Case.Circles[note1]
	local Upwords = true
	if k then
		local key = k:Clone()
		key.Parent = Piano.Keys.ActiveParts
		key.Transparency = 0
		local obj = key
		local Properties = {}
		Properties.CFrame = key.CFrame + key.CFrame.lookVector * -20
		Properties.Transparency = 1
		Tween(obj,Properties,2,false,Enum.EasingStyle.Linear,Enum.EasingDirection.Out)
		clone(key,true)
		wait(.1)
		clone(key,true)
		wait(.1)
		clone(key,true)
		wait(.1)
		clone(key,true)
		wait(.3)
		key:Destroy()
	end
	return
end
