adding a script to an instantiated object

I want to make a script that adds a script to and object, and I have:

var Explosion : Transform;
var delay = 10.0;

function Update () {
	gameObject.SendMessage("blowup");
}

function blowup () {
	yield WaitForSeconds(delay);
	Destroy(gameObject);
	var Expl = Instantiate(Explosion, transform.position, transform.rotation);
}

so far. I want Expl to have a script called explosion.js.

That seems kind of silly… I’m assuming your public var “explosion : Transform” is a prefab (which you could declare as GameObject instead of Transform if you want, you’re not directly accessing any variables or functions of the transform from the looks of it anyway). If every explosion prefab should have the explosion script, then just put the script on the prefab!