Advertisement
Xplosive_

ASDsadas

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