Advertisement
Xplosive_

Untitled

Apr 17th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var rate = Math.round(World.frameRate * 0.01) + 60
  2. Enem = ["AlienP","AlienY","AlienT","AlienG","AlienB"]
  3. EnemSize = ["0.5","0.6","0.7","0.8","0.9","1"]
  4. spawnarea = ["-30","30"]
  5. dontallow = 1
  6.  
  7. var Background = createSprite(200,200)
  8. var Ghost = createSprite(200,200);
  9. var Score = createSprite(40,40);
  10. var AmmoTitle = createSprite(130, 20);
  11. AmmoTitle.setAnimation("AmmoTitle");
  12. AmmoTitle.scale = 0.7;
  13. AmmoTitle.rotation = 3;
  14. var Ammo = createSprite(170,15);
  15. Ammo.scale = 0.4
  16. var PowerTitle = createSprite(250,25)
  17. PowerTitle.setAnimation("PowerTitle")
  18. PowerTitle.scale = 0.7
  19. var Power  = createSprite(330,5)
  20. var Shield = createSprite(0,-70,150,150)
  21. Shield.visible = 0
  22. b = 0
  23. r = 0
  24. w = 0
  25. var ShotCount = 6
  26. Score.scale = 0.8
  27. var scaleshot = 0.4
  28. Score.setAnimation("Lives3")
  29. z = 0
  30. y = 0
  31. Ghost.setAnimation("ghostNeutral")
  32. Fdir = "N"
  33. var invis = "false"
  34. var Shot = "false"
  35. var ShotT = "False"
  36. ShotCounter()
  37. Run()
  38. draw()
  39. LiveTest()
  40. z--
  41. function draw(){
  42. World.frameRate = 60
  43. if (e > 4)
  44. {var vel12 = "8"}
  45. else if (e > 6)  
  46. {var vel12 = "10"}
  47. else if (e > 8)
  48. {var vel12 = "12"}
  49. else
  50. {var vel12 = "5"}
  51. if (e > 15)
  52. {var vel12N = "-3"}
  53. else if (e > 23)  
  54. {var vel12N = "-4"}
  55. else if (e > 26)
  56. {var vel12N = "-5"}
  57. else
  58. {var vel12N = "-4"
  59. var vel12 = "6"}
  60. GX = Ghost.x;
  61. GY = Ghost.y;
  62. EnemPick =  randomNumber(0,4)
  63. SizePick =  randomNumber(0,5)
  64. VelPicked = randomNumber(2,vel12)
  65. SizePicked = EnemSize[SizePick]
  66. EnemPicked = Enem[EnemPick]
  67. EnemLoc =  randomNumber(0,400)
  68. EnemPick1 =  randomNumber(0,4)
  69. SizePick1 =  randomNumber(0,5)
  70. SizePicked1 = EnemSize[SizePick1]
  71. EnemPicked1 = Enem[EnemPick1]
  72. EnemLoc1 =  randomNumber(0,200)
  73. VelPicked1 = randomNumber(2,vel12)
  74. EnemPick2 =  randomNumber(0,4)
  75. SizePick2 =  randomNumber(0,5)
  76. SizePicked2 = EnemSize[SizePick2]
  77. EnemPicked2 = Enem[EnemPick2]
  78. EnemLoc2 =  randomNumber(0,400)
  79. VelPicked2 = randomNumber(2,vel12)
  80. EnemPick3 =  randomNumber(0,4)
  81. SizePick3 =  randomNumber(0,5)
  82. SizePicked3 = EnemSize[SizePick3]
  83. EnemPicked3 = Enem[EnemPick3]
  84. EnemLoc3 =  randomNumber(0,400)
  85. VelPicked3 = randomNumber(-3,vel12N)
  86. EnemPick4 =  randomNumber(0,4)
  87. SizePick4 =  randomNumber(0,5)
  88. SizePicked4 = EnemSize[SizePick4]
  89. EnemPicked4 = Enem[EnemPick4]
  90. EnemLoc4 =  randomNumber(0,400)
  91. VelPicked4 = randomNumber(-3,vel12N)
  92. EnemPick5 =  randomNumber(0,4)
  93. SizePick5 =  randomNumber(0,5)
  94. SizePicked5 = EnemSize[SizePick5]
  95. EnemPicked5 = Enem[EnemPick5]
  96. EnemLoc5 =  randomNumber(0,400)
  97. VelPicked5 = randomNumber(-3,vel12N)
  98. if (GX > 375) { Ghost.velocityX = 0; Ghost.x = GX - 1.5}
  99. if (GY > 370) { Ghost.velocityY = 0; Ghost.y = GY - 1.5}
  100. if (GX < 25 ) { Ghost.velocityX = 0; Ghost.x = GX + 1.5}
  101. if (GY < 30 ) { Ghost.velocityY = 0; Ghost.y = GY + 1.5}
  102. drawSprites()
  103. Background.setAnimation("Background")
  104. Background.scale = 0.53
  105. if (keyWentDown("W")){var Direction = "Wdown"} else if (keyWentUp("W")){var Direction = "Wup"}
  106. if (keyWentDown("S")){var Direction = "Sdown"} else if (keyWentUp("S")){var Direction = "Sup"}
  107. if (keyWentDown("A")){var Direction = "Adown"} else if (keyWentUp("A")){var Direction = "Aup"}
  108. if (keyWentDown("D")){var Direction = "Ddown"} else if (keyWentUp("D")){var Direction = "Dup"}
  109. if (keyWentDown("space")){var ShotN = "true"} else {ShotN = "false"}
  110. if (keyWentDown("up")){ ShotD = "up"; ShotT = "True"}
  111. if (keyWentDown("down")){ ShotD = "down"; ShotT = "True"}
  112. if (keyWentDown("left")){ ShotD = "left"; ShotT = "True"}
  113. if (keyWentDown("right")){ ShotD = "right"; ShotT = "True"}
  114. if (keyDown("q")){ Invis = "true"} else {Invis = "false"}
  115. if (keyDown("e")){ SlowMo = "true"} else {SlowMo = "false"}
  116. if (ShotCount < 5 && keyDown("r")){setTimeout(function() { ShotCount = "5"},1500)}
  117. if (Ghost.scale !== 0.4 || Ghost.scale == 1.01) {
  118. switch(Direction){ case "undefined":  Fdir = "N"}
  119. switch(Direction){ case "Wdown": Ghost.velocityY = -4.5; var Fdir = "U"}
  120. switch(Direction){ case "Wup": Ghost.velocityY = 0; Fdir = "N"}
  121. switch(Direction){ case "Sdown": Ghost.velocityY = 4.5; var Fdir = "D" }
  122. switch(Direction){ case "Sup": Ghost.velocityY = 0; Fdir = "N"}
  123. switch(Direction){ case "Adown": Ghost.velocityX = -4.5; var Fdir = "L"}
  124. switch(Direction){ case "Aup":  Ghost.velocityX = 0; Fdir = "N"}
  125. switch(Direction){ case "Ddown": Ghost.velocityX = 4.5; var Fdir = "R"}
  126. switch(Direction){ case "Dup": Ghost.velocityX = 0;  Fdir = "N"}
  127. } else {
  128. switch(Direction){ case "undefined":  Fdir = "N"}
  129. switch(Direction){ case "Wdown": Ghost.velocityY = -8.5; var Fdir = "U"}
  130. switch(Direction){ case "Wup": Ghost.velocityY = 0; Fdir = "N"}
  131. switch(Direction){ case "Sdown": Ghost.velocityY = 8.5; var Fdir = "D" }
  132. switch(Direction){ case "Sup": Ghost.velocityY = 0; Fdir = "N"}
  133. switch(Direction){ case "Adown": Ghost.velocityX = -8.5; var Fdir = "L"}
  134. switch(Direction){ case "Aup":  Ghost.velocityX = 0; Fdir = "N"}
  135. switch(Direction){ case "Ddown": Ghost.velocityX = 8.5; var Fdir = "R"}
  136. switch(Direction){ case "Dup": Ghost.velocityX = 0;  Fdir = "N"}
  137. }
  138. switch(Fdir){case "L": Ghost.setAnimation("ghostLeft") }
  139. switch(Fdir){case "R": Ghost.setAnimation("ghostRight") }
  140. switch(Fdir){case "U": Ghost.setAnimation("ghostUp") }
  141. switch(Fdir){case "D": Ghost.setAnimation("ghostDown") }
  142. switch(Fdir){case "N": Ghost.setAnimation("ghostNeutral") }
  143. switch(ShotT) {
  144. case "True":
  145. if (ShotN == "true" && ShotCount > 0){
  146. if (ShotD == "up"){ShootUp(); ShotCounter(); }
  147. if (ShotD == "down"){ShootDown(); ShotCounter();}  
  148. if (ShotD == "left"){ShootLeft(); ShotCounter();}
  149. if (ShotD == "right"){ShootRight(); ShotCounter();}
  150. } else if ( ShotN == "true" &&  ShotCount == 0) {
  151. Ammo.tint = "red"
  152. AmmoTitle.tint = "red"
  153. setTimeout(function(){Ammo.tint = "none"; AmmoTitle.tint = "None"}, 500)
  154. }
  155. break;
  156. case "False":
  157. }
  158. if (ShotCount > 5){
  159. Ammo.setAnimation("AmmoInfinite")
  160. }else {
  161. ammo = "Points" + ShotCount
  162. Ammo.setAnimation(ammo)
  163. Ammo.scale = 0.5
  164. }
  165.  
  166. if (g < 10 && Invis == "true") {
  167. Power.tint = "red"
  168. PowerTitle.tint = "red"
  169. setTimeout(function(){Power.tint = "none"; PowerTitle.tint = "None"}, 500)
  170. }
  171. if (g < 10) {} else {
  172. if (Invis == "false") {
  173. }else {
  174. Ghost.tint = "Cyan"
  175. Shield.visible = 1
  176. Shield.scale = 1.8
  177. Shield.setAnimation("Shield")
  178. setInterval(locUp,0)
  179. function locUp(){
  180. Shield.x = Ghost.x
  181. Shield.y = Ghost.y
  182. Shield.rotationSpeed = 5
  183. }
  184. setTimeout(function(){Ghost.tint = "none"; Shield.scale = 0.01; Setnow()},3000)
  185. }
  186. }
  187. if (g < 2 && SlowMo == "true") {
  188. Power.tint = "red"
  189. PowerTitle.tint = "red"
  190. setTimeout(function(){Power.tint = "none"; PowerTitle.tint = "None"}, 500)
  191. }
  192. if (g < 2) {
  193. } else {
  194. if (SlowMo == "false") {
  195. }else {
  196. if (g > 8){
  197. f = 5
  198. } else{
  199. f = g
  200. }    
  201. setTimeout(function(){Ghost.scale = 1; scaleshot = 0.4;  Ghost.tint = "none"; Setnow(); }, f * 2000)
  202. scaleshot = 0.2;
  203. Ghost.scale = 0.4
  204. }
  205. }
  206. }
  207. function ShotCounter() {
  208. ShotCount--
  209. }
  210. ShootUp();
  211. Shot1.destroy()
  212. ShootDown();
  213. Shot2.destroy()
  214. ShootLeft();
  215. Shot3.destroy()
  216. ShootRight();
  217. Shot4.destroy()
  218. function ShootUp(){
  219. Shot1 = createSprite(GX,GY)
  220. Shot1.setAnimation("Shot")
  221. Shot1.velocityY = -6
  222. Shot1.scale =  scaleshot
  223. Shot1.rotationSpeed = 10
  224. drawSprites()
  225. }
  226. function ShootDown(){
  227. Shot2 = createSprite(GX,GY)
  228. Shot2.setAnimation("Shot")
  229. Shot2.velocityY = 5
  230. Shot2.scale =  scaleshot
  231. Shot2.rotationSpeed = 10
  232. drawSprites()
  233. }
  234. function ShootLeft(){
  235. Shot3 = createSprite(GX,GY)
  236. Shot3.setAnimation("Shot")
  237. Shot3.velocityX = -5
  238. Shot3.scale =  scaleshot
  239. Shot3.rotationSpeed = 10
  240. drawSprites()
  241. }
  242. function ShootRight(){
  243. Shot4 = createSprite(GX,GY)
  244. Shot4.setAnimation("Shot")
  245. Shot4.velocityX = 5
  246. Shot4.scale =  scaleshot
  247. Shot4.rotationSpeed = 10
  248. drawSprites()
  249. }
  250. setInterval(spawner,8000 - World.seconds * 95.5)
  251. function spawner(){
  252. spawn()
  253. TimeSpawn =  8000 - World.seconds * 95.5
  254. if (  8000 - World.seconds * 95.5 < 4000)
  255. {TimeSpawn = 3500;}
  256. else
  257. {TimeSpawn = 8000 - World.seconds * 35.5
  258.  
  259. }
  260. }
  261. spawn();
  262. Run();
  263. setInterval(spawnP,25000)
  264. spawnP()
  265. PowerUp1.destroy()
  266. PowerUp2.destroy()
  267. PowerUp3.destroy()
  268. PowerUp4.destroy()
  269. function spawnP(){
  270. test = randomNumber(0,3)
  271. PowerUp1 = createSprite(randomNumber(100,300),-100)
  272. PowerUp2 = createSprite(randomNumber(100,300),-100)
  273. PowerUp3 = createSprite(randomNumber(100,300),-100)
  274. PowerUp4 = createSprite(randomNumber(100,300),-100)
  275. if (test == 0){
  276. PowerUp1.setAnimation("PowerUpLives")
  277. PowerUp1.velocityY = 5;
  278. PowerUp1.rotationSpeed = 3;
  279. }
  280. if (test == 1){
  281. PowerUp2.setAnimation("PowerUpAmmo")
  282. PowerUp2.velocityY = 5;
  283. PowerUp2.rotationSpeed = 3;
  284. }
  285. if (test == 2){
  286. PowerUp3.setAnimation("PowerUpPower")
  287. PowerUp3.velocityY = 5;
  288. PowerUp3.rotationSpeed = 3;
  289. }
  290. if (test == 3)
  291. PowerUp4.setAnimation("PowerUpSpeed")
  292. PowerUp4.velocityY = 5;
  293. PowerUp4.rotationSpeed = 3;
  294. }
  295. function spawn(){
  296. if (e > 1){
  297. var life = 300
  298. } else {
  299. var life = 0}
  300. if (e > 3) {
  301. var life1 = 300
  302. } else {
  303. var life1 = 0
  304. }
  305. if (e > 13) {
  306. var life2 = 300  
  307. } else {
  308. life2 = 0
  309. }
  310. if (e > 16) {
  311. var life3 = 300  
  312. } else {
  313. var life3 = 0
  314. }
  315. if (e > 20){
  316. var life4 = 300
  317. }else {
  318. var life4 = 0
  319. }
  320. Enemy1 = createSprite(-30,randomNumber(0,400))
  321. Enemy1.setAnimation(EnemPicked);
  322. Enemy1.velocityX = VelPicked;
  323. Enemy1.scale = SizePicked;
  324. Enemy1.lifetime = 300;
  325. Enemy2 = createSprite(-30,randomNumber(0,400));
  326. Enemy2.setAnimation(EnemPicked1);
  327. Enemy2.velocityX = VelPicked1;
  328. Enemy2.scale = SizePicked1;
  329. Enemy2.lifetime = life;
  330. Enemy3 = createSprite(-30,randomNumber(0,400));
  331. Enemy3.setAnimation(EnemPicked1);
  332. Enemy3.velocityX = VelPicked1;
  333. Enemy3.scale = SizePicked1;
  334. Enemy3.lifetime = life1;
  335. Enemy4 = createSprite(430,randomNumber(0,400));
  336. Enemy4.setAnimation(EnemPicked3);
  337. Enemy4.velocityX = VelPicked3;
  338. Enemy4.scale = SizePicked3;
  339. Enemy4.lifetime = life2;
  340. Enemy5 = createSprite(430,randomNumber(0,400));
  341. Enemy5.setAnimation(EnemPicked4);
  342. Enemy5.velocityX = VelPicked4;
  343. Enemy5.scale = SizePicked4;
  344. Enemy5.lifetime = life3;
  345. Enemy6 = createSprite(430,randomNumber(0,400));
  346. Enemy6.setAnimation(EnemPicked5);
  347. Enemy6.velocityX = VelPicked5;
  348. Enemy6.scale = SizePicked5;
  349. Enemy6.lifetime = life4;
  350. }
  351. setInterval(function(){
  352. if (Ghost.isTouching(PowerUp1)){
  353. if (z > 0){
  354. z--
  355. Ghost.tint = "Green"
  356. }
  357. setTimeout(function() {  PowerUp1.destroy(); LiveCheck(); Ghost.tint = "none"},500)
  358. }
  359. if (Ghost.isTouching(PowerUp2)){
  360. ShotCount = 10000
  361. Ghost.tint = "red"
  362. setTimeout(function(){ ShotCount = 5; Ghost.tint = "none" },5000)
  363. setTimeout(function(){ PowerUp2.destroy() },500)
  364. }
  365. if (Ghost.isTouching(PowerUp3)){
  366. B()
  367. Ghost.tint = "Cyan"
  368. setTimeout(function(){ PowerUp3.destroy(); Ghost.tint = "none" },500)
  369. }
  370. if (Ghost.isTouching(PowerUp4)){
  371. Ghost.scale = 1.01
  372. Ghost.tint = "Cyan"
  373. setTimeout(function(){ PowerUp4.destroy(); Ghost.tint = "none" },500)
  374. }
  375. if ( Shield.isTouching(Enemy1)){
  376. Enemy1.destroy()}
  377. if ( Shield.isTouching(Enemy2)){
  378. Enemy2.destroy()}
  379. if ( Shield.isTouching(Enemy3)){
  380. Enemy3.destroy()}
  381. if ( Shield.isTouching(Enemy4)){
  382. Enemy4.destroy()}
  383. if ( Shield.isTouching(Enemy5)){
  384. Enemy5.destroy()}
  385. if ( Shield.isTouching(Enemy6)){
  386. Enemy6.destroy()}
  387. if (Enemy1.isTouching(Ghost) || Enemy2.isTouching(Ghost)  || Enemy3.isTouching(Ghost) || Enemy4.isTouching(Ghost) || Enemy5.isTouching(Ghost) || Enemy6.isTouching(Ghost)){
  388. if (Enemy1.isTouching(Ghost)){Ghost.tint = "orange"; Enemy1.destroy(); setTimeout(function(){Ghost.tint = "none"},200)}
  389. if (Enemy2.isTouching(Ghost)){Ghost.tint = "orange"; Enemy2.destroy(); setTimeout(function(){Ghost.tint = "none"},200)}
  390. if (Enemy3.isTouching(Ghost)){Ghost.tint = "orange"; Enemy3.destroy(); setTimeout(function(){Ghost.tint = "none"},200)}
  391. if (Enemy4.isTouching(Ghost)){Ghost.tint = "orange"; Enemy4.destroy(); setTimeout(function(){Ghost.tint = "none"},200)}
  392. if (Enemy5.isTouching(Ghost)){Ghost.tint = "orange"; Enemy5.destroy(); setTimeout(function(){Ghost.tint = "none"},200)}
  393. if (Enemy6.isTouching(Ghost)){Ghost.tint = "orange"; Enemy6.destroy(); setTimeout(function(){Ghost.tint = "none"},200)}
  394. LiveTest()
  395. LiveCheck()
  396. Score.tint = "red"
  397. setTimeout(function(){Score.tint = "none";}, 500)
  398. if (z == 3){
  399. Score.setAnimation("Lives0");
  400. Shield.setAnimation("Power0");
  401. g = 0
  402. b = 0
  403. setInterval(function(){
  404. Ghost.y = -50
  405. Shot1.destroy()
  406. Shot2.destroy()
  407. Shot3.destroy()
  408. Shot4.destroy()
  409. },0)
  410. gameover()
  411. }
  412. function gameover(){
  413. var gameover = createSprite(200,200);
  414. gameover.scale = 1.5;
  415. gameover.setAnimation("Gameover")
  416. gamer()
  417. Ghost.destroy();
  418. 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)
  419. 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)
  420. 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)
  421. 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)
  422. 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)
  423. 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)  
  424. setInterval(function(){PowerUp1.destroy(); PowerUp2.destroy(); PowerUp3.destroy(); PowerUp1.lifetime = 0; PowerUp2.lifetime = 0; PowerUp3.lifetime = 0 },0)
  425. }}},0)
  426. setInterval(function(){
  427. if(Shot3.x < 5 ){
  428. Shot3.destroy()  
  429. } else if (Shot4.x > 400){
  430. Shot4.destroy()
  431. }
  432. 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); }
  433. 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);  }
  434. 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);  }
  435. 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); }
  436. 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); }
  437. 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); }  
  438. },0)
  439. var Score1 = ["","Points1","Points2","Points3","Points4","Points5","Points6","Points7","Points8","Points9"];
  440. var score = createSprite(20,45);
  441. var score1 = createSprite(65,40);
  442. var score2 = createSprite(50,40);
  443. score.setAnimation("Score")
  444. score.scale = 0.4
  445. score1.scale = 0.5
  446. score2.scale = 0.5
  447. PointAdd()
  448. function PointAdd(){
  449. var h = y++;
  450. if (h == 0) {score1.setAnimation("Points0"); score2.setAnimation("Points0")}
  451. if (h == 1) {score1.setAnimation("Points1"); score2.setAnimation("Points0")}
  452. if (h == 2) {score1.setAnimation("Points2"); score2.setAnimation("Points0")}
  453. if (h == 3) {score1.setAnimation("Points3"); score2.setAnimation("Points0")}
  454. if (h == 4) {score1.setAnimation("Points4"); score2.setAnimation("Points0")}
  455. if (h == 5) {score1.setAnimation("Points5"); score2.setAnimation("Points0")}
  456. if (h == 6) {score1.setAnimation("Points6"); score2.setAnimation("Points0")}
  457. if (h == 7) {score1.setAnimation("Points7"); score2.setAnimation("Points0")}
  458. if (h == 8) {score1.setAnimation("Points8"); score2.setAnimation("Points0")}
  459. if (h == 9) {score1.setAnimation("Points9"); score2.setAnimation("Points0")}
  460. if (h == 10) {score1.setAnimation("Points0"); score2.setAnimation("Points1")}
  461. if (h == 11) {score1.setAnimation("Points1"); score2.setAnimation("Points1")}
  462. if (h == 12) {score1.setAnimation("Points2"); score2.setAnimation("Points1")}
  463. if (h == 13) {score1.setAnimation("Points3"); score2.setAnimation("Points1")}
  464. if (h == 14) {score1.setAnimation("Points4"); score2.setAnimation("Points1")}
  465. if (h == 15) {score1.setAnimation("Points5"); score2.setAnimation("Points1")}
  466. if (h == 16) {score1.setAnimation("Points6"); score2.setAnimation("Points1")}
  467. if (h == 17) {score1.setAnimation("Points7"); score2.setAnimation("Points1")}
  468. if (h == 18) {score1.setAnimation("Points8"); score2.setAnimation("Points1")}
  469. if (h == 19) {score1.setAnimation("Points9"); score2.setAnimation("Points1")}
  470. if (h == 20) {score1.setAnimation("Points0"); score2.setAnimation("Points2")}
  471. if (h == 21) {score1.setAnimation("Points1"); score2.setAnimation("Points2")}
  472. if (h == 22) {score1.setAnimation("Points2"); score2.setAnimation("Points2")}
  473. if (h == 23) {score1.setAnimation("Points3"); score2.setAnimation("Points2")}
  474. if (h == 24) {score1.setAnimation("Points4"); score2.setAnimation("Points2")}
  475. if (h == 25) {score1.setAnimation("Points5"); score2.setAnimation("Points2")}
  476. if (h == 26) {score1.setAnimation("Points6"); score2.setAnimation("Points2")}
  477. if (h == 27) {score1.setAnimation("Points7"); score2.setAnimation("Points2")}
  478. if (h == 28) {score1.setAnimation("Points8"); score2.setAnimation("Points2")}
  479. if (h == 29) {score1.setAnimation("Points9"); score2.setAnimation("Points2")}
  480. if (h == 30) {score1.setAnimation("Points0"); score2.setAnimation("Points3")}
  481. if (h == 31) {score1.setAnimation("Points1"); score2.setAnimation("Points3")}
  482. if (h == 32) {score1.setAnimation("Points2"); score2.setAnimation("Points3")}
  483. if (h == 33) {score1.setAnimation("Points3"); score2.setAnimation("Points3")}
  484. if (h == 34) {score1.setAnimation("Points4"); score2.setAnimation("Points3")}
  485. if (h == 35) {score1.setAnimation("Points5"); score2.setAnimation("Points3")}
  486. if (h == 36) {score1.setAnimation("Points6"); score2.setAnimation("Points3")}
  487. if (h == 37) {score1.setAnimation("Points7"); score2.setAnimation("Points3")}
  488. if (h == 38) {score1.setAnimation("Points8"); score2.setAnimation("Points3")}
  489. if (h == 39) {score1.setAnimation("Points9"); score2.setAnimation("Points3")}
  490. if (h == 40) {score1.setAnimation("Points0"); score2.setAnimation("Points4")}
  491. if (h == 41) {score1.setAnimation("Points1"); score2.setAnimation("Points4")}
  492. if (h == 42) {score1.setAnimation("Points2"); score2.setAnimation("Points4")}
  493. if (h == 43) {score1.setAnimation("Points3"); score2.setAnimation("Points4")}
  494. if (h == 44) {score1.setAnimation("Points4"); score2.setAnimation("Points4")}
  495. if (h == 45) {score1.setAnimation("Points5"); score2.setAnimation("Points4")}
  496. if (h == 46) {score1.setAnimation("Points6"); score2.setAnimation("Points4")}
  497. if (h == 47) {score1.setAnimation("Points7"); score2.setAnimation("Points4")}
  498. if (h == 48) {score1.setAnimation("Points8"); score2.setAnimation("Points4")}
  499. if (h == 49) {score1.setAnimation("Points9"); score2.setAnimation("Points4")}
  500. if (h == 50) {score1.setAnimation("Points0"); score2.setAnimation("Points5")}
  501. if (h == 51) {score1.setAnimation("Points1"); score2.setAnimation("Points5")}
  502. if(h++){
  503. score.tint = "green"
  504. score1.tint = "green"
  505. score2.tint = "green"
  506. setTimeout(function(){score1.tint = "none"; score2.tint = "None"; score.tint = "None"}, 500)
  507. Run();
  508. }
  509. }
  510. Setnow();
  511. function Setnow(){
  512. g = 0
  513. b = 1
  514. }
  515. function SetnowE(){
  516. g = b--;
  517. }
  518. function Run(){
  519. e = r++;
  520. g =  b++
  521. w++;
  522. }
  523. function gamer() {
  524. Score.destroy();
  525. score.x = 165;
  526. score.y = 250;
  527. score2.x = 195;
  528. score2.y = 250;
  529. score1.x = 230;
  530. score1.y = 250;
  531. Power.destroy();
  532. PowerTitle.destroy();
  533. Ammo.destroy();
  534. AmmoTitle.destroy();
  535. }
  536. function B(){
  537. g = 10
  538. b = 10
  539. }
  540. function LiveTest(){
  541. z++
  542. }
  543. function LiveCheck(){
  544. if (z == 0) {
  545. Score.setAnimation("Lives3");
  546. }
  547. if (z == 1){
  548. Score.setAnimation("Lives2");
  549. }
  550. if (z == 2){
  551. Score.setAnimation("Lives1");
  552. }
  553. }
  554. PowerCheck()
  555. setInterval(PowerCheck,0)
  556. function PowerCheck(){
  557. if (g == 0) {
  558. Power.setAnimation("Power0")
  559. }
  560. if (g == 2) {
  561. Power.setAnimation("Power1")
  562. }
  563. if (g == 4) {
  564. Power.setAnimation("Power2")
  565. }
  566. if (g == 6) {
  567. Power.setAnimation("Power3")
  568. }
  569. if (g == 8) {
  570. Power.setAnimation("Power4")
  571. }
  572. if (g == 10) {
  573. Power.setAnimation("Power5")
  574. }
  575. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement