script doesn't do anything

i made a script but nothing happens, i might have just made some simple mistake because i havent used unity in about 4 months

var health = 999;
var bullet1 : GameObject;
var bullet2 : GameObject;
var player : Transform;

function Start () {
Invoke("Shoot",3);
}

function OnCollisionEnter () {
health -= 1;
}

function Shoot () {
if(health >= 800){
if(health <= 1000){
transform.LookAt(player);
Instantiate(bullet1,transform.position,transform.rotation);
yield WaitForSeconds(0.01);
Instantiate(bullet2,transform.position,transform.rotation);
yield WaitForSeconds(0.02);
Instantiate(bullet1,transform.position,transform.rotation);
yield WaitForSeconds(0.04);
Instantiate(bullet2,transform.position,transform.rotation);
yield WaitForSeconds(0.08);
Instantiate(bullet1,transform.position,transform.rotation);
yield WaitForSeconds(0.16);
Instantiate(bullet2,transform.position,transform.rotation);
yield WaitForSeconds(0.24);
Instantiate(bullet1,transform.position,transform.rotation);
yield WaitForSeconds(0.32);
Instantiate(bullet2,transform.position,transform.rotation);
Invoke("Shoot",0.5);
}
}
}

what i want to do is shoot a stream of bullets at the player but no bullets appear, there are no error messages and the bullets and player are assigned to the object correctly

i removed the waitforseconds thing because that was the only thing there that i hadn’t used before and it started working but then it stopped again for no reason.

here is my script now

var health = 5000;
var bullet1 : GameObject;
var bullet2 : GameObject;
var bullet1f : GameObject;
var bullet2f : GameObject;
var player : Transform;

function Start () {
Invoke("Shoot",3);
}

function OnTriggerEnter () {
health -= 1;
}

function Shoot () {
if(health >= 5000){
if(health <= 4750){
transform.LookAt(player);
Instantiate(bullet1,transform.position,transform.rotation);
Instantiate(bullet2,transform.position,transform.rotation);
Invoke("Shoot",0.5);
}
}
if(health >= 4750){
if(health <= 4500){
transform.LookAt(player);
Instantiate(bullet1f,transform.position,transform.rotation);
Instantiate(bullet2f,transform.position,transform.rotation);
Invoke("Shoot",0.5);
}
}
if(health >= 4500){
if(health <= 4250){
transform.LookAt(player);
transform.Rotate(Vector3.left * 30);
Instantiate(bullet1,transform.position,transform.rotation);
transform.Rotate(Vector3.right * 15);
Instantiate(bullet1,transform.position,transform.rotation);
transform.Rotate(Vector3.right * 15);
Instantiate(bullet1,transform.position,transform.rotation);
transform.Rotate(Vector3.right * 15);
Instantiate(bullet1,transform.position,transform.rotation);
transform.Rotate(Vector3.right * 15);
Instantiate(bullet1,transform.position,transform.rotation);
transform.Rotate(Vector3.left * 30);
Invoke("Shoot",0.5);
}
}
}