I am making a survival game i want to chop trees with a axe modle (that i already have in the game)

but when i go to try to copy someone elses script they never work and i always get tons of error messages from the console (take in to mind i am very new to this) but everytime i copy paste, watch someone else script while i copy it. They never seem to work like i said I just get error messages plz help me. :frowning: i am on unity 5.5.2 is it that they are on a other version and the scripts are not the same??

If you dont mind can u give me a script that works for my version? this is my current axe (hitting tree)
script private var hasAxe : boolean = false;

private var canSwing : boolean = true;
private var isSwinging : boolean = false;

private var controller : CharacterController;

var swingTimer : float = 1;

function Start ()
{
hasAxe =true;
controller = GameObject.Find(“First Person Controller”).GetComponent(CharacterController);

{
//IDLE SECTION
if(controller.velocity.magnitude <= 0 && isSwinging == false)
{
animation.Play(“Idle”);
animation[“Idle”].wrapMode = WrapMode.Loop;
animation[“Idle”].speed = 0.2;
}

//SPRINTING
if(controller.velocity.magnitude <= 0 && Input.GetKey(KeyCode.LeftShift))
{
    animation.Play("Sprint");
    animation["Sprint"].wrapMode = WrapMode.Loop;
}

//AXE SWINGING
if(hasAxe == true && canSwing == true) 
{
    if(Input.GetMousButton (0))
    {
    

        //SWINGING ANIMATIONS 
        animation.Play("Swing");
        animation["Swing"].speed = 2;
        isSwinging = true;
        canSwing = false;
    }
}

if(canSwing == false)
{
    swingTimer -=Time.deltaTime;
}

if(swingTimer <= 0)
{
    swingTimer = 1;
    canSwing = true;
    isSwinging =false;
}

}