xxxxxxxxxx
8
/***************************************************************************/
/* */
/* This obfuscated code was created by Javascript Obfuscator Free Version.*/
/* Javascript Obfuscator Free Version can be downloaded here */
/* http://javascriptobfuscator.com */
/* */
/***************************************************************************/
var _$_2f4c=["zombie.otf","How to play","font-size","20px","style","font-family","myFont","background-color","rgb(99,123,99)","position","padding","15px","border-radius","10px","Play","rgb(104,142,104)","Back","#6d4141","player health: ","health","zombies killed: ","white","black","red","You killed "," zombie(s)","#876969 ","mousePressed","#4E7334","#312E8C","#038C7F","rgb(250,227,197)","x","y","#F59C9C","#CB5E5E","blue","darkblue","#e17d17","rgb(116,0,0)","#422020","This is you\x0AYou have been living \x0Ain the zombie apocalypse, \x0Adoing all you can to \x0Asurvive. When faced with \x0Aa zombie, click W to jump \x0Aand S to duck. You can also attack by pressing\x0AE to shoot a gun at the zombie,\x0Aor D to roll a bomb in its direction","This is your enemy:\x0AThe Zombie.\x0AIt will be attacking \x0Ayou - you have to kill \x0Ait or be eaten!\x0AAnd BEWARE: it\x0Awon\'t just attack you\x0Aup close, they\'re \x0Aliable to throw their \x0Aarms at you!","BEWARE: the arm\x0AThe zombie will \x0Aat some point yeet \x0Aits arm at you, and \x0Ayou have to jump \x0Aor duck to dodge it","#697B7B","rgb(143,193,143)","Jumping Game","rgb(128,144,151)","#C6BFBF ","#AFADAD ","#808076 ","rgb(92,92,92)","green","rgb(116, 0, 0)","vy","width","length","display","log","zmbx","arm","armactive","pow","a","lime","armthrow","armthrowtime","active"];let playerBullets=[];var currentBullets=0;let playerBomb=[];var currentBomb=0;let enemyBullets=[];let enemyshemeny=[];var currentEnemy=0;var shoot=0;var toss=0;var pplay=0;var myFont;var btnhowto;var btnplay;var btnback;var player={x:100,y:375,vy:5,health:100};var b1x=-5;var b2x=300;var b3x=600;var ground={x:0,y:450,width:140};var jump=false;var gravity=0.1;var armx=6;var army=40;var duck=0;var score=0;var angle=0;var zmbtime=0;var zomb={x:750,y:0,os:1};var zmb=0;function preload(){myFont= loadFont(_$_2f4c[0])}function setup(){textFont(myFont);createCanvas(700,500);angleMode(DEGREES);push();btnhowto= createButton(_$_2f4c[1]);btnhowto[_$_2f4c[4]](_$_2f4c[2],_$_2f4c[3]);btnhowto[_$_2f4c[4]](_$_2f4c[5],_$_2f4c[6]);btnhowto[_$_2f4c[4]](_$_2f4c[7],_$_2f4c[8]);btnhowto[_$_2f4c[9]](300,320);btnhowto[_$_2f4c[4]](_$_2f4c[10],_$_2f4c[11]);btnhowto[_$_2f4c[4]](_$_2f4c[12],_$_2f4c[13]);btnplay= createButton(_$_2f4c[14]);btnplay[_$_2f4c[4]](_$_2f4c[2],_$_2f4c[3]);btnplay[_$_2f4c[4]](_$_2f4c[5],_$_2f4c[6]);btnplay[_$_2f4c[4]](_$_2f4c[7],_$_2f4c[15]);btnplay[_$_2f4c[9]](330,260);btnplay[_$_2f4c[4]](_$_2f4c[10],_$_2f4c[11]);btnplay[_$_2f4c[4]](_$_2f4c[12],_$_2f4c[13]);btnback= createButton(_$_2f4c[16]);btnback[_$_2f4c[4]](_$_2f4c[2],_$_2f4c[3]);btnback[_$_2f4c[4]](_$_2f4c[5],_$_2f4c[6]);btnback[_$_2f4c[4]](_$_2f4c[7],_$_2f4c[17]);btnback[_$_2f4c[9]](-330,-260);btnback[_$_2f4c[4]](_$_2f4c[10],_$_2f4c[11]);btnback[_$_2f4c[4]](_$_2f4c[12],_$_2f4c[13]);pop();zmbtime= int(random(5,100))}function draw(){if(pplay== 0){homepage()}else {if(pplay== 1){btnhowto[_$_2f4c[9]](-500,-500);btnplay[_$_2f4c[9]](-500,-500);backdrop();playerDraw();playermovement();enemyDraw();b1x-= 1;b2x-= 1;b3x-= 1;zombiespawn();pewpew();arrrghh();boom();text(_$_2f4c[18]+ player[_$_2f4c[19]],50,50);text(_$_2f4c[20]+ score,400,50);if(player[_$_2f4c[19]]<= 0){pplay= 3}}else {if(pplay== 2){howto()}else {if(pplay== 3){end()}}}}}function end(){push();fill(_$_2f4c[21]);stroke(_$_2f4c[22]);background(_$_2f4c[23]);textSize(55);text(_$_2f4c[24]+ score+ _$_2f4c[25],150,250);pop()}function play(){pplay= 1}function howto(){pplay= 2;background(_$_2f4c[26]);btnhowto[_$_2f4c[9]](-500,-500);btnplay[_$_2f4c[9]](-500,-500);btnback[_$_2f4c[9]](20,430);btnback[_$_2f4c[27]](back);push();fill(_$_2f4c[28]);stroke(_$_2f4c[28]);rect(600- 20,375- 300,30,15);rect(600,330- 300,30,30);fill(_$_2f4c[29]);stroke(_$_2f4c[22]);rect(600,410- 300,15,40);rect(600+ 10,410- 300,20,40);fill(_$_2f4c[30]);stroke(_$_2f4c[30]);rect(600,360- 300,30,50);fill(_$_2f4c[28]);stroke(_$_2f4c[28]);rect(600- 25,365- 300,30,15);pop();push();fill(_$_2f4c[31]);stroke(_$_2f4c[31]);square(player[_$_2f4c[32]]- 75,player[_$_2f4c[33]]- 40- 300,25);fill(_$_2f4c[34]);stroke(_$_2f4c[35]);rect(player[_$_2f4c[32]]- 75,player[_$_2f4c[33]]- 15- 300,25,40);fill(_$_2f4c[36]);stroke(_$_2f4c[37]);rect(player[_$_2f4c[32]]- 75,player[_$_2f4c[33]]+ 25- 300,10,45);rect(player[_$_2f4c[32]]- 75,player[_$_2f4c[33]]+ 25- 300,25,10);rect(player[_$_2f4c[32]]- 75+ 9,player[_$_2f4c[33]]+ 25- 300,16,45);fill(_$_2f4c[38]);stroke(_$_2f4c[38]);rect(player[_$_2f4c[32]]- 75,player[_$_2f4c[33]]- 40- 300,25,5);strokeWeight(3);stroke(_$_2f4c[39]);line(player[_$_2f4c[32]]+ 16- 75,player[_$_2f4c[33]]- 8- 300,player[_$_2f4c[32]]+ armx- 75,player[_$_2f4c[33]]- 300+ 20);pop();push();fill(_$_2f4c[28]);stroke(_$_2f4c[28]);translate(350,250);rotate(angle);rectMode(CENTER);angle+= 2;rect(0,0,60,30);pop();push();fill(_$_2f4c[40]);stroke(_$_2f4c[17]);textSize(23);text(_$_2f4c[41],10,175);text(_$_2f4c[42],500,200);text(_$_2f4c[43],270,50);pop()}function back(){pplay= 0;btnback[_$_2f4c[9]](-220,-430);btnhowto[_$_2f4c[9]](300,320);btnplay[_$_2f4c[9]](330,260)}function homepage(){if(pplay== 0){background(_$_2f4c[44]);textSize(75);fill(_$_2f4c[45]);text(_$_2f4c[46],154,150);textSize(30);if(zomb[_$_2f4c[32]]>= -50){push();push();fill(_$_2f4c[28]);stroke(_$_2f4c[28]);rect(zomb[_$_2f4c[32]]- 20,375- zomb[_$_2f4c[33]],30,15);rect(zomb[_$_2f4c[32]],330- zomb[_$_2f4c[33]],30,30);fill(_$_2f4c[29]);stroke(_$_2f4c[22]);rect(zomb[_$_2f4c[32]],410- zomb[_$_2f4c[33]],15,40);rect(zomb[_$_2f4c[32]]+ 10,410- zomb[_$_2f4c[33]],20,40);fill(_$_2f4c[30]);stroke(_$_2f4c[30]);rect(zomb[_$_2f4c[32]],360- zomb[_$_2f4c[33]],30,50);fill(_$_2f4c[28]);stroke(_$_2f4c[28]);rect(zomb[_$_2f4c[32]]- 25,365- zomb[_$_2f4c[33]],30,15);pop()}else {zomb[_$_2f4c[32]]= 700;zomb[_$_2f4c[33]]= int(random(-40,500))};zomb[_$_2f4c[32]]-= 1;btnhowto[_$_2f4c[27]](howto);btnplay[_$_2f4c[27]](play)}}function backdrop(){push();background(_$_2f4c[47]);fill(_$_2f4c[48]);stroke(_$_2f4c[49]);rect(ground[_$_2f4c[32]],ground[_$_2f4c[33]],700,50);pop();push();if(b1x>= -340){fill(_$_2f4c[50]);stroke(_$_2f4c[50]);rect(b1x,240,140,210);fill(_$_2f4c[51]);rect(b1x+ 9,247,37,37);rect(b1x+ 51.5,247,37,37);rect(b1x+ 9,297,37,37);rect(b1x+ 94,297,37,37);rect(b1x+ 9,347,37,37);rect(b1x+ 51.5,347,37,37);rect(b1x+ 9,397,37,37);rect(b1x+ 94,397,37,37);fill(_$_2f4c[52]);stroke(_$_2f4c[52]);rect(b1x,240,140,23);strokeWeight(16);line(b1x+ 7,250,b1x+ 7,310);line(b1x+ 56,250,b1x+ 55,290);line(b1x+ 132.6,248,b1x+ 132,340);line(b1x+ 90,250,b1x+ 90,370);pop()}else {b1x= 800};if(b2x>= -340){push();fill(_$_2f4c[50]);stroke(_$_2f4c[50]);rect(b2x,150,200,300);fill(_$_2f4c[51]);rect(b2x+ 101,160,42,42);rect(b2x+ 147,160,42,42);rect(b2x+ 9,209,42,42);rect(b2x+ 55,209,42,42);rect(b2x+ 101,209,42,42);rect(b2x+ 147,209,42,42);rect(b2x+ 9,258,42,42);rect(b2x+ 55,258,42,42);rect(b2x+ 147,258,42,42);rect(b2x+ 9,307,42,42);rect(b2x+ 101,307,42,42);rect(b2x+ 147,307,42,42);rect(b2x+ 9,356,42,42);rect(b2x+ 55,356,42,42);rect(b2x+ 101,356,42,42);rect(b2x+ 147,356,42,42);rect(b2x+ 9,405,42,36);rect(b2x+ 101,405,42,36);fill(_$_2f4c[52]);stroke(_$_2f4c[52]);rect(b2x,140,200,45,4);strokeWeight(32);line(b2x+ 16,180,b2x+ 16,310);line(b2x+ 184.6,180,b2x+ 185,290);strokeWeight(35);line(b2x+ 102.6,180,b2x+ 102,340);line(b2x+ 56,180,b2x+ 55,370);line(b2x+ 145,180,b2x+ 145,222);pop()}else {b2x= 800};if(b3x>= -340){push();fill(_$_2f4c[50]);stroke(_$_2f4c[50]);rect(b3x,10,340,440);fill(_$_2f4c[51]);rect(b3x+ 9,39,57,57);rect(b3x+ 141,39,57,57);rect(b3x+ 207,39,57,57);rect(b3x+ 273,39,57,57);rect(b3x+ 9,105,57,57);rect(b3x+ 75,105,57,57);rect(b3x+ 141,105,57,57);rect(b3x+ 9,171,57,57);rect(b3x+ 141,171,57,57);rect(b3x+ 207,171,57,57);rect(b3x+ 273,171,57,57);rect(b3x+ 9,237,57,57);rect(b3x+ 75,237,57,57);rect(b3x+ 207,237,57,57);rect(b3x+ 273,237,57,57);rect(b3x+ 75,303,57,57);rect(b3x+ 207,303,57,57);rect(b3x+ 273,303,57,57);rect(b3x+ 9,369,57,57);rect(b3x+ 75,369,57,57);rect(b3x+ 141,369,57,57);rect(b3x+ 273,369,57,57);fill(_$_2f4c[52]);stroke(_$_2f4c[52]);rect(b3x,8,341,65,4);strokeWeight(37);line(b3x+ 18,44,b3x+ 16,310);line(b3x+ 100,44,b3x+ 100,290);line(b3x+ 159,44,b3x+ 159,340);line(b3x+ 250,44,b3x+ 250,370);line(b3x+ 323,44,b3x+ 324,222);pop()}else {b3x= 800}}function playerDraw(){if(duck== 0){push();fill(_$_2f4c[31]);stroke(_$_2f4c[31]);square(player[_$_2f4c[32]],player[_$_2f4c[33]]- 40,25);fill(_$_2f4c[34]);stroke(_$_2f4c[35]);rect(player[_$_2f4c[32]],player[_$_2f4c[33]]- 15,25,40);fill(_$_2f4c[36]);stroke(_$_2f4c[37]);rect(player[_$_2f4c[32]],player[_$_2f4c[33]]+ 25,10,45);rect(player[_$_2f4c[32]],player[_$_2f4c[33]]+ 25,25,10);rect(player[_$_2f4c[32]]+ 9,player[_$_2f4c[33]]+ 25,16,45);fill(_$_2f4c[38]);stroke(_$_2f4c[38]);rect(player[_$_2f4c[32]],player[_$_2f4c[33]]- 40,25,5);strokeWeight(3);if(shoot== 1&& toss== 0){stroke(_$_2f4c[39]);line(player[_$_2f4c[32]]+ 16,player[_$_2f4c[33]]- 8,player[_$_2f4c[32]]+ armx,player[_$_2f4c[33]]- 20)}else {if(toss== 0){stroke(_$_2f4c[39]);line(player[_$_2f4c[32]]+ 16,player[_$_2f4c[33]]- 8,player[_$_2f4c[32]]+ armx,player[_$_2f4c[33]]+ 20)}};if(toss== 1&& shoot== 0){stroke(_$_2f4c[53]);line(player[_$_2f4c[32]]+ 16,player[_$_2f4c[33]]- 8,player[_$_2f4c[32]]+ armx,player[_$_2f4c[33]]+ 20)}else {if(toss== 0&& shoot== 0){stroke(_$_2f4c[39]);line(player[_$_2f4c[32]]+ 16,player[_$_2f4c[33]]- 8,player[_$_2f4c[32]]+ armx,player[_$_2f4c[33]]+ 20)}};pop()}else {if(duck== 1){push();fill(_$_2f4c[34]);stroke(_$_2f4c[35]);rect(player[_$_2f4c[32]],player[_$_2f4c[33]]+ 40,20,20);fill(_$_2f4c[36]);stroke(_$_2f4c[36]);rect(player[_$_2f4c[32]],player[_$_2f4c[33]]+ 60,20,5);rect(player[_$_2f4c[32]],player[_$_2f4c[33]]+ 65,8,10);rect(player[_$_2f4c[32]]+ 12,player[_$_2f4c[33]]+ 65,8,10);fill(_$_2f4c[31]);stroke(_$_2f4c[31]);square(player[_$_2f4c[32]]+ 2,player[_$_2f4c[33]]+ 20,20);fill(_$_2f4c[38]);stroke(_$_2f4c[38]);rect(player[_$_2f4c[32]]+ 2,player[_$_2f4c[33]]+ 20,20,5);strokeWeight(3);stroke(_$_2f4c[39]);line(player[_$_2f4c[32]]+ 16,player[_$_2f4c[33]]+ 45,player[_$_2f4c[32]],player[_$_2f4c[33]]+ 50);pop();duck= 0}}}function playermovement(){player[_$_2f4c[33]]+= player[_$_2f4c[54]];player[_$_2f4c[54]]+= gravity;if(player[_$_2f4c[33]]> ground[_$_2f4c[33]]- 70&& player[_$_2f4c[32]]<= ground[_$_2f4c[55]]){player[_$_2f4c[33]]= ground[_$_2f4c[33]]- 70;player[_$_2f4c[54]]= 0;jump= false};if(keyIsDown(83)){duck= 1}}function enemyDraw(){for(let _0x14766=0;_0x14766< enemyshemeny[_$_2f4c[56]];_0x14766++){enemyshemeny[_0x14766][_$_2f4c[57]]()}}function keyPressed(){if(jump=== false&& keyCode=== 87){player[_$_2f4c[54]]-= 8.3;jump= true;armx= 6;army= 40;toss= 0;shoot= 0;console[_$_2f4c[58]](jump)};if(keyCode== 69&& jump== false){shoot= 1;armx= 29;army= 20;playerBullets[currentBullets]= new pBl();currentBullets++;toss= 0};if(keyCode== 68&& jump== false){playerBomb[currentBomb]= new pBm();currentBomb++;toss= 1;shoot= 0};if(keyCode== 80){enemyshemeny[currentEnemy]= new Enemy();currentEnemy++}}function arrrghh(){for(let _0x1470B=0;_0x1470B< enemyshemeny[_$_2f4c[56]];_0x1470B++){if(enemyshemeny[_0x1470B][_$_2f4c[59]]- 10<= player[_$_2f4c[32]]+ 35&& jump== false&& enemyshemeny[_0x1470B][_$_2f4c[59]]> player[_$_2f4c[32]]- 10){enemyshemeny[_0x1470B][_$_2f4c[59]]+= 9;if(player[_$_2f4c[19]]> 0){player[_$_2f4c[19]]-= 1}};if(enemyshemeny[_0x1470B][_$_2f4c[60]]+ 20<= player[_$_2f4c[32]]+ 35&& duck== 0&& enemyshemeny[_0x1470B][_$_2f4c[61]]== 1&& player[_$_2f4c[33]]>= 360){enemyshemeny[_0x1470B][_$_2f4c[60]]= -1000;print(_$_2f4c[62]);enemyshemeny[_0x1470B][_$_2f4c[61]]= 0;player[_$_2f4c[19]]-= 25}else {if(enemyshemeny[_0x1470B][_$_2f4c[60]]+ 20<= player[_$_2f4c[32]]+ 35&& duck== 1){enemyshemeny[_0x1470B][_$_2f4c[61]]= 0}}}}function boom(){for(let _0x14766=0;_0x14766< playerBomb[_$_2f4c[56]];_0x14766++){playerBomb[_0x14766][_$_2f4c[57]]();for(let _0x1470B=0;_0x1470B< enemyshemeny[_$_2f4c[56]];_0x1470B++){if(playerBomb[_0x14766][_$_2f4c[32]]>= enemyshemeny[_0x1470B][_$_2f4c[59]]&& playerBomb[_0x14766][_$_2f4c[63]]== 1&& enemyshemeny[_0x1470B][_$_2f4c[19]]> 0){enemyshemeny[_0x1470B][_$_2f4c[19]]-= 20;playerBomb[_0x14766][_$_2f4c[63]]= 0}}}}function pewpew(){push();if(duck== 0&& shoot== 1){fill(_$_2f4c[22]);stroke(_$_2f4c[22]);rect(129,player[_$_2f4c[33]]- 28,4,8,2);rect(129,player[_$_2f4c[33]]- 31,12,4,2)};pop();for(let _0x14766=0;_0x14766< playerBullets[_$_2f4c[56]];_0x14766++){playerBullets[_0x14766][_$_2f4c[57]]();for(let _0x1470B=0;_0x1470B< enemyshemeny[_$_2f4c[56]];_0x1470B++){if(playerBullets[_0x14766][_$_2f4c[32]]>= enemyshemeny[_0x1470B][_$_2f4c[59]]&& playerBullets[_0x14766][_$_2f4c[63]]== 1&& enemyshemeny[_0x1470B][_$_2f4c[19]]> 0){playerBullets[_0x14766][_$_2f4c[63]]= 0;enemyshemeny[_0x1470B][_$_2f4c[19]]-= 20}}}}function zombiespawn(){if(zmb> zmbtime){enemyshemeny[currentEnemy]= new Enemy();currentEnemy++;zmbtime= int(random(5,1000));zmb= 0}else {zmb+= 1}}class pBl{ constructor(){this[_$_2f4c[32]]= player[_$_2f4c[32]]+ 45;this[_$_2f4c[33]]= player[_$_2f4c[33]]+ 11- 40;this[_$_2f4c[63]]= 1} display(){if(this[_$_2f4c[63]]== 1){push();fill(_$_2f4c[64]);ellipse(this[_$_2f4c[32]],this[_$_2f4c[33]],6,3);this[_$_2f4c[32]]+= 1;pop()}else {this[_$_2f4c[32]]= -1000}}};class pBm{ constructor(){this[_$_2f4c[32]]= player[_$_2f4c[32]]+ 45;this[_$_2f4c[33]]= 440;this[_$_2f4c[63]]= 1} display(){if(this[_$_2f4c[63]]== 1){push();fill(_$_2f4c[22]);ellipse(this[_$_2f4c[32]],this[_$_2f4c[33]],27,27);pop();this[_$_2f4c[32]]+= 1}else {this[_$_2f4c[32]]= 10000}}};class Enemy{ constructor(){this[_$_2f4c[59]]= 600;this[_$_2f4c[60]]= 575;this[_$_2f4c[19]]= 100;this[_$_2f4c[65]]= 0;this[_$_2f4c[66]]= random(50,300);this[_$_2f4c[61]]= 1;this[_$_2f4c[67]]= 1} display(){if(this[_$_2f4c[67]]== 1){if(this[_$_2f4c[19]]> 0){push();fill(_$_2f4c[28]);stroke(_$_2f4c[28]);rect(this[_$_2f4c[59]]- 20,375,30,15);rect(this[_$_2f4c[59]],330,30,30);fill(_$_2f4c[29]);stroke(_$_2f4c[22]);rect(this[_$_2f4c[59]],410,15,40);rect(this[_$_2f4c[59]]+ 10,410,20,40);fill(_$_2f4c[30]);stroke(_$_2f4c[30]);rect(this[_$_2f4c[59]],360,30,50);if(this[_$_2f4c[61]]== 1){if(this[_$_2f4c[65]]> this[_$_2f4c[66]]){push();fill(_$_2f4c[28]);stroke(_$_2f4c[28]);translate(this[_$_2f4c[60]]- 25,365);this[_$_2f4c[60]]-= 7;rotate(angle);rectMode(CENTER);angle++;rect(0,0,30,15);pop()}else {push();fill(_$_2f4c[28]);stroke(_$_2f4c[28]);this[_$_2f4c[65]]++;this[_$_2f4c[60]]= this[_$_2f4c[59]]- 25;rect(this[_$_2f4c[59]]- 25,365,30,15);pop()}};pop();this[_$_2f4c[59]]-= 1}else {this[_$_2f4c[59]]= -1000;this[_$_2f4c[67]]= 0;score+= 1}}}}