Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var rate = Math.round(World.frameRate * 0.01) + 60
- Enem = ["AlienP","AlienY","AlienT","AlienG","AlienB"]
- EnemSize = ["0.5","0.6","0.7","0.8","0.9","1"]
- spawnarea = ["-30","30"]
- dontallow = 1
- var Background = createSprite(200,200)
- var Ghost = createSprite(200,200);
- var Score = createSprite(65,65);
- var AmmoTitle = createSprite(50, 390);
- AmmoTitle.setAnimation("AmmoTitle");
- AmmoTitle.scale = 0.7;
- AmmoTitle.rotation = 3;
- var Ammo = createSprite(90,387);
- var PowerTitle = createSprite(250,390)
- PowerTitle.setAnimation("PowerTitle")
- PowerTitle.scale = 0.7
- var Power = createSprite(330,370)
- var Shield = createSprite(0,-70,150,150)
- Shield.visible = 0
- b = 0
- r = 0
- w = 0
- var ShotCount = 6
- Score.scale = 0.8
- var scaleshot = 0.4
- Score.setAnimation("Lives3")
- z = 0
- y = 0
- Ghost.setAnimation("ghostNeutral")
- Fdir = "N"
- var invis = "false"
- var Shot = "false"
- var ShotT = "False"
- ShotCounter()
- Run()
- draw()
- LiveTest()
- z--
- function draw(){
- World.frameRate = 60
- if (e > 4)
- {var vel12 = "8"}
- else if (e > 6)
- {var vel12 = "10"}
- else if (e > 8)
- {var vel12 = "12"}
- else
- {var vel12 = "5"}
- if (e > 15)
- {var vel12N = "-3"}
- else if (e > 23)
- {var vel12N = "-4"}
- else if (e > 26)
- {var vel12N = "-5"}
- else
- {var vel12N = "-4"
- var vel12 = "6"}
- GX = Ghost.x;
- GY = Ghost.y;
- EnemPick = randomNumber(0,4)
- SizePick = randomNumber(0,5)
- VelPicked = randomNumber(2,vel12)
- SizePicked = EnemSize[SizePick]
- EnemPicked = Enem[EnemPick]
- EnemLoc = randomNumber(0,400)
- EnemPick1 = randomNumber(0,4)
- SizePick1 = randomNumber(0,5)
- SizePicked1 = EnemSize[SizePick1]
- EnemPicked1 = Enem[EnemPick1]
- EnemLoc1 = randomNumber(0,200)
- VelPicked1 = randomNumber(2,vel12)
- EnemPick2 = randomNumber(0,4)
- SizePick2 = randomNumber(0,5)
- SizePicked2 = EnemSize[SizePick2]
- EnemPicked2 = Enem[EnemPick2]
- EnemLoc2 = randomNumber(0,400)
- VelPicked2 = randomNumber(2,vel12)
- EnemPick3 = randomNumber(0,4)
- SizePick3 = randomNumber(0,5)
- SizePicked3 = EnemSize[SizePick3]
- EnemPicked3 = Enem[EnemPick3]
- EnemLoc3 = randomNumber(0,400)
- VelPicked3 = randomNumber(-3,vel12N)
- EnemPick4 = randomNumber(0,4)
- SizePick4 = randomNumber(0,5)
- SizePicked4 = EnemSize[SizePick4]
- EnemPicked4 = Enem[EnemPick4]
- EnemLoc4 = randomNumber(0,400)
- VelPicked4 = randomNumber(-3,vel12N)
- EnemPick5 = randomNumber(0,4)
- SizePick5 = randomNumber(0,5)
- SizePicked5 = EnemSize[SizePick5]
- EnemPicked5 = Enem[EnemPick5]
- EnemLoc5 = randomNumber(0,400)
- VelPicked5 = randomNumber(-3,vel12N)
- if (GX > 375) { Ghost.velocityX = 0; Ghost.x = GX - 1.5}
- if (GY > 370) { Ghost.velocityY = 0; Ghost.y = GY - 1.5}
- if (GX < 25 ) { Ghost.velocityX = 0; Ghost.x = GX + 1.5}
- if (GY < 30 ) { Ghost.velocityY = 0; Ghost.y = GY + 1.5}
- drawSprites()
- Background.setAnimation("Background")
- Background.scale = 0.53
- if (keyWentDown("W")){var Direction = "Wdown"} else if (keyWentUp("W")){var Direction = "Wup"}
- if (keyWentDown("S")){var Direction = "Sdown"} else if (keyWentUp("S")){var Direction = "Sup"}
- if (keyWentDown("A")){var Direction = "Adown"} else if (keyWentUp("A")){var Direction = "Aup"}
- if (keyWentDown("D")){var Direction = "Ddown"} else if (keyWentUp("D")){var Direction = "Dup"}
- if (keyWentDown("space")){var ShotN = "true"} else {ShotN = "false"}
- if (keyWentDown("up")){ ShotD = "up"; ShotT = "True"}
- if (keyWentDown("down")){ ShotD = "down"; ShotT = "True"}
- if (keyWentDown("left")){ ShotD = "left"; ShotT = "True"}
- if (keyWentDown("right")){ ShotD = "right"; ShotT = "True"}
- if (keyDown("q")){ Invis = "true"} else {Invis = "false"}
- if (keyDown("e")){ SlowMo = "true"} else {SlowMo = "false"}
- if (ShotCount < 5 && keyDown("r")){setTimeout(function() { ShotCount = "5"},1500)}
- if (Ghost.scale !== 0.4) {
- switch(Direction){ case "undefined": Fdir = "N"}
- switch(Direction){ case "Wdown": Ghost.velocityY = -4.5; var Fdir = "U"}
- switch(Direction){ case "Wup": Ghost.velocityY = 0; Fdir = "N"}
- switch(Direction){ case "Sdown": Ghost.velocityY = 4.5; var Fdir = "D" }
- switch(Direction){ case "Sup": Ghost.velocityY = 0; Fdir = "N"}
- switch(Direction){ case "Adown": Ghost.velocityX = -4.5; var Fdir = "L"}
- switch(Direction){ case "Aup": Ghost.velocityX = 0; Fdir = "N"}
- switch(Direction){ case "Ddown": Ghost.velocityX = 4.5; var Fdir = "R"}
- switch(Direction){ case "Dup": Ghost.velocityX = 0; Fdir = "N"}
- } else {
- switch(Direction){ case "undefined": Fdir = "N"}
- switch(Direction){ case "Wdown": Ghost.velocityY = -8.5; var Fdir = "U"}
- switch(Direction){ case "Wup": Ghost.velocityY = 0; Fdir = "N"}
- switch(Direction){ case "Sdown": Ghost.velocityY = 8.5; var Fdir = "D" }
- switch(Direction){ case "Sup": Ghost.velocityY = 0; Fdir = "N"}
- switch(Direction){ case "Adown": Ghost.velocityX = -8.5; var Fdir = "L"}
- switch(Direction){ case "Aup": Ghost.velocityX = 0; Fdir = "N"}
- switch(Direction){ case "Ddown": Ghost.velocityX = 8.5; var Fdir = "R"}
- switch(Direction){ case "Dup": Ghost.velocityX = 0; Fdir = "N"}
- }
- switch(Fdir){case "L": Ghost.setAnimation("ghostLeft") }
- switch(Fdir){case "R": Ghost.setAnimation("ghostRight") }
- switch(Fdir){case "U": Ghost.setAnimation("ghostUp") }
- switch(Fdir){case "D": Ghost.setAnimation("ghostDown") }
- switch(Fdir){case "N": Ghost.setAnimation("ghostNeutral") }
- switch(ShotT) {
- case "True":
- if (ShotN == "true" && ShotCount > 0){
- if (ShotD == "up"){ShootUp(); ShotCounter(); }
- if (ShotD == "down"){ShootDown(); ShotCounter();}
- if (ShotD == "left"){ShootLeft(); ShotCounter();}
- if (ShotD == "right"){ShootRight(); ShotCounter();}
- } else if ( ShotN == "true" && ShotCount == 0) {
- Ammo.tint = "red"
- AmmoTitle.tint = "red"
- setTimeout(function(){Ammo.tint = "none"; AmmoTitle.tint = "None"}, 500)
- }
- break;
- case "False":
- }
- if (ShotCount > 5){
- Ammo.setAnimation("Points8")
- }else {
- ammo = "Points" + ShotCount
- Ammo.setAnimation(ammo)
- Ammo.scale = 0.5
- }
- if (g < 10 && Invis == "true") {
- Power.tint = "red"
- PowerTitle.tint = "red"
- setTimeout(function(){Power.tint = "none"; PowerTitle.tint = "None"}, 500)
- }
- if (g < 10) {} else {
- if (Invis == "false") {
- }else {
- Ghost.tint = "Cyan"
- Shield.visible = 1
- Shield.scale = 1.8
- Shield.setAnimation("Shield")
- setInterval(locUp,0)
- function locUp(){
- Shield.x = Ghost.x
- Shield.y = Ghost.y
- Shield.rotationSpeed = 5
- }
- setTimeout(function(){Ghost.tint = "none"; Shield.scale = 0.01; Setnow()},3000)
- }
- }
- if (g < 2 && SlowMo == "true") {
- Power.tint = "red"
- PowerTitle.tint = "red"
- setTimeout(function(){Power.tint = "none"; PowerTitle.tint = "None"}, 500)
- }
- if (g < 2) {
- } else {
- if (SlowMo == "false") {
- }else {
- if (g > 8){
- f = 5
- } else{
- f = g
- }
- setTimeout(function(){Ghost.scale = 1; scaleshot = 0.4; Ghost.tint = "none"; Setnow(); }, f * 2000)
- scaleshot = 0.2;
- Ghost.scale = 0.4
- }
- }
- }
- function ShotCounter() {
- ShotCount--
- }
- ShootUp();
- Shot1.destroy()
- ShootDown();
- Shot2.destroy()
- ShootLeft();
- Shot3.destroy()
- ShootRight();
- Shot4.destroy()
- function ShootUp(){
- Shot1 = createSprite(GX,GY)
- Shot1.setAnimation("Shot")
- Shot1.velocityY = -6
- Shot1.scale = scaleshot
- Shot1.rotationSpeed = 10
- drawSprites()
- }
- function ShootDown(){
- Shot2 = createSprite(GX,GY)
- Shot2.setAnimation("Shot")
- Shot2.velocityY = 5
- Shot2.scale = scaleshot
- Shot2.rotationSpeed = 10
- drawSprites()
- }
- function ShootLeft(){
- Shot3 = createSprite(GX,GY)
- Shot3.setAnimation("Shot")
- Shot3.velocityX = -5
- Shot3.scale = scaleshot
- Shot3.rotationSpeed = 10
- drawSprites()
- }
- function ShootRight(){
- Shot4 = createSprite(GX,GY)
- Shot4.setAnimation("Shot")
- Shot4.velocityX = 5
- Shot4.scale = scaleshot
- Shot4.rotationSpeed = 10
- drawSprites()
- }
- setInterval(spawner,8000 - World.seconds * 95.5)
- function spawner(){
- spawn()
- TimeSpawn = 8000 - World.seconds * 95.5
- if ( 8000 - World.seconds * 95.5 < 1000)
- {TimeSpawn = 3500;}
- else
- {TimeSpawn = 8000 - World.seconds * 35.5
- console.log(TimeSpawn)
- }
- }
- spawn();
- Run();
- setInterval(spawnP,25000)
- spawnP()
- function spawnP(){
- test = randomNumber(0,2)
- PowerUp1 = createSprite(randomNumber(100,300),-100)
- PowerUp2 = createSprite(randomNumber(100,300),-100)
- PowerUp3 = createSprite(randomNumber(100,300),-100)
- if (test == 0){
- PowerUp1.setAnimation("PowerUpLives")
- PowerUp1.velocityY = 5;
- PowerUp1.rotationSpeed = 3;
- }
- if (test == 1){
- PowerUp2.setAnimation("PowerUpAmmo")
- PowerUp2.velocityY = 5;
- PowerUp2.rotationSpeed = 3;
- }
- if (test == 2){
- PowerUp3.setAnimation("PowerUpPower")
- PowerUp3.velocityY = 5;
- PowerUp3.rotationSpeed = 3;
- }
- }
- function spawn(){
- if (e > 1){
- var life = 300
- } else {
- var life = 0}
- if (e > 3) {
- var life1 = 300
- } else {
- var life1 = 0
- }
- if (e > 13) {
- var life2 = 300
- } else {
- life2 = 0
- }
- if (e > 16) {
- var life3 = 300
- } else {
- var life3 = 0
- }
- if (e > 20){
- var life4 = 300
- }else {
- var life4 = 0
- }
- Enemy1 = createSprite(-30,randomNumber(0,400))
- Enemy1.setAnimation(EnemPicked);
- Enemy1.velocityX = VelPicked;
- Enemy1.scale = SizePicked;
- Enemy1.lifetime = 300;
- Enemy2 = createSprite(-30,randomNumber(0,400));
- Enemy2.setAnimation(EnemPicked1);
- Enemy2.velocityX = VelPicked1;
- Enemy2.scale = SizePicked1;
- Enemy2.lifetime = life;
- Enemy3 = createSprite(-30,randomNumber(0,400));
- Enemy3.setAnimation(EnemPicked1);
- Enemy3.velocityX = VelPicked1;
- Enemy3.scale = SizePicked1;
- Enemy3.lifetime = life1;
- Enemy4 = createSprite(430,randomNumber(0,400));
- Enemy4.setAnimation(EnemPicked3);
- Enemy4.velocityX = VelPicked3;
- Enemy4.scale = SizePicked3;
- Enemy4.lifetime = life2;
- Enemy5 = createSprite(430,randomNumber(0,400));
- Enemy5.setAnimation(EnemPicked4);
- Enemy5.velocityX = VelPicked4;
- Enemy5.scale = SizePicked4;
- Enemy5.lifetime = life3;
- Enemy6 = createSprite(430,randomNumber(0,400));
- Enemy6.setAnimation(EnemPicked5);
- Enemy6.velocityX = VelPicked5;
- Enemy6.scale = SizePicked5;
- Enemy6.lifetime = life4;
- }
- setInterval(function(){
- if (Ghost.isTouching(PowerUp1)){
- if (z > 0){
- z--
- Ghost.tint = "Green"
- }
- setTimeout(function() { PowerUp1.destroy(); LiveCheck(); Ghost.tint = "none"},500)
- }
- if (Ghost.isTouching(PowerUp2)){
- ShotCount = 10000
- Ghost.tint = "red"
- setTimeout(function(){ ShotCount = 5; Ghost.tint = "none" },5000)
- setTimeout(function(){ PowerUp2.destroy() },500)
- }
- if (Ghost.isTouching(PowerUp3)){
- B()
- Ghost.tint = "Cyan"
- setTimeout(function(){ PowerUp3.destroy(); Ghost.tint = "none" },500)
- }
- if ( Shield.isTouching(Enemy1)){
- Enemy1.destroy()}
- if ( Shield.isTouching(Enemy2)){
- Enemy2.destroy()}
- if ( Shield.isTouching(Enemy3)){
- Enemy3.destroy()}
- if ( Shield.isTouching(Enemy4)){
- Enemy4.destroy()}
- if ( Shield.isTouching(Enemy5)){
- Enemy5.destroy()}
- if ( Shield.isTouching(Enemy6)){
- Enemy6.destroy()}
- if (Enemy1.isTouching(Ghost) || Enemy2.isTouching(Ghost) || Enemy3.isTouching(Ghost) || Enemy4.isTouching(Ghost) || Enemy5.isTouching(Ghost) || Enemy6.isTouching(Ghost)){
- if (Enemy1.isTouching(Ghost)){Ghost.tint = "orange"; Enemy1.destroy(); setTimeout(function(){Ghost.tint = "none"},200)}
- if (Enemy2.isTouching(Ghost)){Ghost.tint = "orange"; Enemy2.destroy(); setTimeout(function(){Ghost.tint = "none"},200)}
- if (Enemy3.isTouching(Ghost)){Ghost.tint = "orange"; Enemy3.destroy(); setTimeout(function(){Ghost.tint = "none"},200)}
- if (Enemy4.isTouching(Ghost)){Ghost.tint = "orange"; Enemy4.destroy(); setTimeout(function(){Ghost.tint = "none"},200)}
- if (Enemy5.isTouching(Ghost)){Ghost.tint = "orange"; Enemy5.destroy(); setTimeout(function(){Ghost.tint = "none"},200)}
- if (Enemy6.isTouching(Ghost)){Ghost.tint = "orange"; Enemy6.destroy(); setTimeout(function(){Ghost.tint = "none"},200)}
- LiveTest()
- LiveCheck()
- Score.tint = "red"
- setTimeout(function(){Score.tint = "none";}, 500)
- if (z == 3){
- Score.setAnimation("Lives0");
- Shield.setAnimation("Power0");
- g = 0
- b = 0
- setInterval(function(){
- Ghost.y = -50
- Shot1.destroy()
- Shot2.destroy()
- Shot3.destroy()
- Shot4.destroy()
- },0)
- gameover()
- }
- function gameover(){
- var gameover = createSprite(200,200);
- gameover.scale = 1.5;
- gameover.setAnimation("Gameover")
- gamer()
- Ghost.destroy();
- setInterval(function(){Enemy1.destroy(); Enemy1.destroy(); Enemy1.destroy(); Enemy1.velocityX = 0; Enemy1.lifetime = 0; Enemy1.scale = 0.01; Ghost.velocityX = 0; Ghost.velocityY = 0;},0)
- setInterval(function(){Enemy2.destroy(); Enemy2.destroy(); Enemy2.destroy(); Enemy2.velocityX = 0; Enemy2.lifetime = 0; Enemy2.scale = 0.01; Ghost.velocityX = 0; Ghost.velocityY = 0;},0)
- setInterval(function(){Enemy3.destroy(); Enemy3.destroy(); Enemy3.destroy(); Enemy3.velocityX = 0; Enemy3.lifetime = 0; Enemy3.scale = 0.01; Ghost.velocityX = 0; Ghost.velocityY = 0;},0)
- setInterval(function(){Enemy4.destroy(); Enemy4.destroy(); Enemy4.destroy(); Enemy4.velocityX = 0; Enemy4.lifetime = 0; Enemy4.scale = 0.01; Ghost.velocityX = 0; Ghost.velocityY = 0;},0)
- setInterval(function(){Enemy5.destroy(); Enemy5.destroy(); Enemy5.destroy(); Enemy5.velocityX = 0; Enemy5.lifetime = 0; Enemy5.scale = 0.01; Ghost.velocityX = 0; Ghost.velocityY = 0;},0)
- setInterval(function(){Enemy6.destroy(); Enemy6.destroy(); Enemy6.destroy(); Enemy6.velocityX = 0; Enemy6.lifetime = 0; Enemy6.scale = 0.01; Ghost.velocityX = 0; Ghost.velocityY = 0;},0)
- setInterval(function(){PowerUp1.destroy(); PowerUp2.destroy(); PowerUp3.destroy(); PowerUp1.lifetime = 0; PowerUp2.lifetime = 0; PowerUp3.lifetime = 0 },0)
- }}},0)
- setInterval(function(){
- if(Shot3.x < 5 ){
- Shot3.destroy()
- } else if (Shot4.x > 400){
- Shot4.destroy()
- }
- if(Enemy1.isTouching(Shot1) || Enemy1.isTouching(Shot2) || Enemy1.isTouching(Shot3) || Enemy3.isTouching(Shot4) ){Shot1.destroy(); Shot2.destroy(); Shot3.destroy(); Shot4.destroy(); Enemy1.velocityX = "0"; Enemy1.tint = "red"; setTimeout(function() {Enemy1.destroy(); PointAdd() },320); }
- if(Enemy2.isTouching(Shot1) || Enemy2.isTouching(Shot2) || Enemy2.isTouching(Shot3) || Enemy2.isTouching(Shot4) ){Shot1.destroy(); Shot2.destroy(); Shot3.destroy(); Shot4.destroy(); Enemy2.velocityX = "0"; Enemy2.tint = "red"; setTimeout(function() {Enemy2.destroy(); PointAdd() },320); }
- if(Enemy3.isTouching(Shot1) || Enemy3.isTouching(Shot2) || Enemy3.isTouching(Shot3) || Enemy3.isTouching(Shot4) ){Shot1.destroy(); Shot2.destroy(); Shot3.destroy(); Shot4.destroy(); Enemy3.velocityX = "0"; Enemy3.tint = "red"; setTimeout(function() {Enemy3.destroy(); PointAdd() },320); }
- if(Enemy4.isTouching(Shot1) || Enemy4.isTouching(Shot2) || Enemy4.isTouching(Shot3) || Enemy4.isTouching(Shot4) ){Shot1.destroy(); Shot2.destroy(); Shot3.destroy(); Shot4.destroy(); Enemy4.velocityX = "0"; Enemy4.tint = "red"; setTimeout(function() {Enemy4.destroy(); PointAdd() },320); }
- if(Enemy5.isTouching(Shot1) || Enemy5.isTouching(Shot2) || Enemy5.isTouching(Shot3) || Enemy5.isTouching(Shot4) ){Shot1.destroy(); Shot2.destroy(); Shot3.destroy(); Shot4.destroy(); Enemy5.velocityX = "0"; Enemy5.tint = "red"; setTimeout(function() {Enemy5.destroy(); PointAdd() },320); }
- if(Enemy6.isTouching(Shot1) || Enemy6.isTouching(Shot2) || Enemy6.isTouching(Shot3) || Enemy6.isTouching(Shot4) ){Shot1.destroy(); Shot2.destroy(); Shot3.destroy(); Shot4.destroy(); Enemy6.velocityX = "0"; Enemy6.tint = "red"; setTimeout(function() {Enemy6.destroy(); PointAdd() },320); }
- },0)
- var Score1 = ["","Points1","Points2","Points3","Points4","Points5","Points6","Points7","Points8","Points9"];
- var score = createSprite(250,45);
- var score1 = createSprite(300,40);
- var score2 = createSprite(280,40);
- score.setAnimation("Score")
- score.scale = 0.4
- score1.scale = 0.5
- score2.scale = 0.5
- PointAdd()
- function PointAdd(){
- var h = y++;
- if (h == 0) {score1.setAnimation("Points0"); score2.setAnimation("Points0")}
- if (h == 1) {score1.setAnimation("Points1"); score2.setAnimation("Points0")}
- if (h == 2) {score1.setAnimation("Points2"); score2.setAnimation("Points0")}
- if (h == 3) {score1.setAnimation("Points3"); score2.setAnimation("Points0")}
- if (h == 4) {score1.setAnimation("Points4"); score2.setAnimation("Points0")}
- if (h == 5) {score1.setAnimation("Points5"); score2.setAnimation("Points0")}
- if (h == 6) {score1.setAnimation("Points6"); score2.setAnimation("Points0")}
- if (h == 7) {score1.setAnimation("Points7"); score2.setAnimation("Points0")}
- if (h == 8) {score1.setAnimation("Points8"); score2.setAnimation("Points0")}
- if (h == 9) {score1.setAnimation("Points9"); score2.setAnimation("Points0")}
- if (h == 10) {score1.setAnimation("Points0"); score2.setAnimation("Points1")}
- if (h == 11) {score1.setAnimation("Points1"); score2.setAnimation("Points1")}
- if (h == 12) {score1.setAnimation("Points2"); score2.setAnimation("Points1")}
- if (h == 13) {score1.setAnimation("Points3"); score2.setAnimation("Points1")}
- if (h == 14) {score1.setAnimation("Points4"); score2.setAnimation("Points1")}
- if (h == 15) {score1.setAnimation("Points5"); score2.setAnimation("Points1")}
- if (h == 16) {score1.setAnimation("Points6"); score2.setAnimation("Points1")}
- if (h == 17) {score1.setAnimation("Points7"); score2.setAnimation("Points1")}
- if (h == 18) {score1.setAnimation("Points8"); score2.setAnimation("Points1")}
- if (h == 19) {score1.setAnimation("Points9"); score2.setAnimation("Points1")}
- if (h == 20) {score1.setAnimation("Points0"); score2.setAnimation("Points2")}
- if (h == 21) {score1.setAnimation("Points1"); score2.setAnimation("Points2")}
- if (h == 22) {score1.setAnimation("Points2"); score2.setAnimation("Points2")}
- if (h == 23) {score1.setAnimation("Points3"); score2.setAnimation("Points2")}
- if (h == 24) {score1.setAnimation("Points4"); score2.setAnimation("Points2")}
- if (h == 25) {score1.setAnimation("Points5"); score2.setAnimation("Points2")}
- if (h == 26) {score1.setAnimation("Points6"); score2.setAnimation("Points2")}
- if (h == 27) {score1.setAnimation("Points7"); score2.setAnimation("Points2")}
- if (h == 28) {score1.setAnimation("Points8"); score2.setAnimation("Points2")}
- if (h == 29) {score1.setAnimation("Points9"); score2.setAnimation("Points2")}
- if (h == 30) {score1.setAnimation("Points0"); score2.setAnimation("Points3")}
- if (h == 31) {score1.setAnimation("Points1"); score2.setAnimation("Points3")}
- if (h == 32) {score1.setAnimation("Points2"); score2.setAnimation("Points3")}
- if (h == 33) {score1.setAnimation("Points3"); score2.setAnimation("Points3")}
- if (h == 34) {score1.setAnimation("Points4"); score2.setAnimation("Points3")}
- if (h == 35) {score1.setAnimation("Points5"); score2.setAnimation("Points3")}
- if (h == 36) {score1.setAnimation("Points6"); score2.setAnimation("Points3")}
- if (h == 37) {score1.setAnimation("Points7"); score2.setAnimation("Points3")}
- if (h == 38) {score1.setAnimation("Points8"); score2.setAnimation("Points3")}
- if (h == 39) {score1.setAnimation("Points9"); score2.setAnimation("Points3")}
- if (h == 40) {score1.setAnimation("Points0"); score2.setAnimation("Points4")}
- if (h == 41) {score1.setAnimation("Points1"); score2.setAnimation("Points4")}
- if (h == 42) {score1.setAnimation("Points2"); score2.setAnimation("Points4")}
- if (h == 43) {score1.setAnimation("Points3"); score2.setAnimation("Points4")}
- if (h == 44) {score1.setAnimation("Points4"); score2.setAnimation("Points4")}
- if (h == 45) {score1.setAnimation("Points5"); score2.setAnimation("Points4")}
- if (h == 46) {score1.setAnimation("Points6"); score2.setAnimation("Points4")}
- if (h == 47) {score1.setAnimation("Points7"); score2.setAnimation("Points4")}
- if (h == 48) {score1.setAnimation("Points8"); score2.setAnimation("Points4")}
- if (h == 49) {score1.setAnimation("Points9"); score2.setAnimation("Points4")}
- if (h == 50) {score1.setAnimation("Points0"); score2.setAnimation("Points5")}
- if (h == 51) {score1.setAnimation("Points1"); score2.setAnimation("Points5")}
- if(h++){
- score.tint = "green"
- score1.tint = "green"
- score2.tint = "green"
- setTimeout(function(){score1.tint = "none"; score2.tint = "None"; score.tint = "None"}, 500)
- Run();
- }
- }
- Setnow();
- function Setnow(){
- g = 0
- b = 1
- }
- function SetnowE(){
- g = b--;
- }
- function Run(){
- e = r++;
- g = b++
- w++;
- }
- function gamer() {
- Score.destroy();
- score.x = 165;
- score.y = 250;
- score2.x = 195;
- score2.y = 250;
- score1.x = 230;
- score1.y = 250;
- Power.destroy();
- PowerTitle.destroy();
- Ammo.destroy();
- AmmoTitle.destroy();
- }
- function B(){
- g = 10
- b = 10
- }
- function LiveTest(){
- z++
- }
- function LiveCheck(){
- if (z == 0) {
- Score.setAnimation("Lives3");
- }
- if (z == 1){
- Score.setAnimation("Lives2");
- }
- if (z == 2){
- Score.setAnimation("Lives1");
- }
- }
- PowerCheck()
- setInterval(PowerCheck,0)
- function PowerCheck(){
- if (g == 0) {
- Power.setAnimation("Power0")
- }
- if (g == 2) {
- Power.setAnimation("Power1")
- }
- if (g == 4) {
- Power.setAnimation("Power2")
- }
- if (g == 6) {
- Power.setAnimation("Power3")
- }
- if (g == 8) {
- Power.setAnimation("Power4")
- }
- if (g == 10) {
- Power.setAnimation("Power5")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement