for this script here, do I put it under the plane in the default tab?
this.energy = 100;
this.max = 100;
this.takeDamage = function(damage)
{
this.energy -= damage;
if(this.energy <= 0){
this.energy = 0;
}
this.energyBar.scaleX = this.energy/this.max;
this.play();
}