Combo Script Problem

Hello Unity3D.I have a problem with my combo script.Anytime i put my combo script into my character.My character freezes and is not able to do the combo or anything at all.If anyone knows why this problem occurs.Can anyone please tell me why?(I have been stuck on this for 2 weeks now…)

P.S Heres a script i have been trying to get with

#pragma strict  
var recordInput : String = "";
var waitClearSeconds : float = 1; //wait 1 second adter the last input before clear, you will have to adjust this setting later
 
 function Update() {
 
 RecordInput();
 
 waitClearSeconds -= Time.deltaTime; 
 
 if(waitClearSeconds < 0f) {
 GetCombo();
 Clear();
 					}
 }
 
 function RecordInput() {
 
 Input.GetKeyDown("k"); 
 {
 animation.Play("Rex_Sword_Kick");
 recordInput += "k";
 waitClearSeconds = 0.2f; //reset the wait time to avoid clearing too early
 }
 Input.GetKeyDown("k");
 {
 animation.Play("Rex_Sword_Kick_2");
 recordInput += "kk";
 waitClearSeconds = 0.2f; //reset the wait time to avoid clearing too early
 }
 Input.GetKeyDown("k");
 { 
 animation.Play("Rex_Seal_Combo");
 recordInput += "kkk";
 waitClearSeconds = 0.2f; //reset the wait time to avoid clearing too early
 
 	}	
 
 
 }
 
 
function GetCombo() {
 
if(recordInput == "kkk") 
 
Input.GetKeyDown("p");
{
animation.Play("Spinning_Slashes");
recordInput += "kkkp";
waitClearSeconds = 0.2f;
	}
}
function Clear() {
recordInput = "";
 
 }

your 3 if statements are checking the same conditions…so they will all triggered when you press k