`,]']>S}Wup8d%qy)6o;]AsVl3>̼̬̬ʬ̬̜̼̬|v|vgggg|u|u|v|VugWugwgg|u|u""""B$AD1131131!"!!,,B"BD,DD3B43. "" 33 33 3D 3D 2# 33233#3C433DD34DDCDDDD""3333D3D3!""!!"o?//-_oeV_Vef_VV_e2C2C2C2C2C2C2C2C-===. 3D23C 3CD23DD23DD 3CD23C 3DDLDLLDDDDLLDLDD343#D43DD3#DD3#D4343#D333LDC4C33ofof2C2C7CgCgFgVgVgV-. 3D 3D 33 33 ""DDDD4DDC3DD33C43233# 332# D3D33333""DDLDDgVgVgVgVgVgVgVݿݯDL34̙ə̙ ̜̜̜ ݯݯݟݟ4343D"13223  " "  "" ̙DL34DDDODD4ODD4ODD4?DDD333DDDDDDCDDDDDDDD3333333331331133#"3#"3#3!໻̫̫̫̫̫̫̫̫˼ ˼ ˼ ˼ ˼ ˼ ˼ ˼ 4343D"13223333?33#?33#?33#333333333233333333131131313133133133#3!1#1#3#3#3#𫪪̫̫̫̫̫̫̫̫˼ ˼ ˼ ˼ ˼ ˼ ˼ ˼ ppppppppppppppppppppppppppp`pppppppppppppppppppppppppppppp`ppppppppppppp`pppppppppppppppppppppppppppppp`ppppppppppppp`ccccccccc#ppppppH9pp"ccccccccc`ppppppppppppp`cccccc*cJcLccccccccLcccccccLcc`ppppppppppppp``pppppppppppppppppppppppppppp`pppQpppppppppppppppppppppppppp`ppppppppppppp`SSSSSSSSSSSSSSSSSSSSSSSSSSSSSS`ppppppppppppp`HppppXHppppppppp70pppppppppGXp`ppppppppppppp`pppppp)pJp*ppppppppLpppppppLpp`ppppppppppppp``pppppppppppppppppppppppppppp`pppaPppppppppppppppppppppppppp`ppppppppppppp`p56ppppppppppp56ppppppppppp56p`ppppppppppppp`9ppppGWppppppppppp1ppppppppWGp`ppppppppppppp`;pppppp=>ppppp*=>pppppp`ppppppppppppp``pppppppppppppppppppppppppppp`pbppppdpppppppppppppppppbppdpp`ppppppppppppp`pppppppppppVpppppBpppppppppppp`ppppppppppppp`ppppppp@Appppppppppppppppppppp`ppppppppppppp`ppppppMNppppppMNpppppKMNpppppp`ppppppppppppp``pppppppppppppppppppppppppppp`pbppppppppppppppppppPpbppdpp`ppppppppppppp`pppfVpppppppppppp34ppppppppppp`ppppppppppppp`pppppppppppppppppppppppppppppp`ppppppppppppp`p)pppppppppppppppppppppppppppp`ppppppppppppp``pppppppppppppppppppppppppppp`pbpppPppppppppppppppaPbppdpp`ppppppppppppp`pppUppppppppppppBCDppppppppppp`ppppppppppppp`pppppppppppppppppppppppppppppp`ppppppppppppp`ppppppppppppppppppppppppp`ppppppppppppp``pppppppppppppppppppppppppppp`pbpppppppppppppppdpp`ppppppppppppp`ppppppppVpƱppppppfppp`ppppppppppppp`ppp70ppppppppppppppAp0pppppppp`ppppppppppppp`pLpppppppppppbppdppppppppp]^_p`ppppppppppppp`ננ`pppppppppppppppppppppppppppp`pbppbpppdppppppppppbpppdpdpp`ppppppppppppp`ppppppppppb56ppppqrdpppUeppppp`ppppppppppppp`pppXpAppppppppppppA71Apppppp@p`pppppppppppppppppppppbppdppppppppppppppppppppp``pppppppppppppppppppppppppppp`pbppbpppdppppppppppbpppdpp`ppppppppppppp`pppp34ppppbEFppppppdpppppppppp`ppppppppppppp`pppGipppppppppgApp7HAppppip7p0`ppppppppppppp`ppppdppppppppbppdppppppppbpppp`ppppppppppppp``pppppppppppppppppppppppppppp`pbQpbpppdpppppppPppbpppdpp`ppppppppppppp`pfepCDBpppbefVpppppdppppppBpfV`ppppppppppppp`ppghhpYppppppphpppGWYpppphhXgp`ppppppppppppp`pp]_dppbppdppbppp]`ppppppppppppp````````````pppppppppppppppppppppppppppp`pppppppppppppppppppppppppppppp`ppppppppppppp`pppppppppppppppppppppppppppppp`ppppppppppppp`pppppppppppppppppppppppppppppp`ppppppppppppp`pppppppppppppppppppppppp:;0 then print("Combo x",101,112,15) print(cmb,141,112,15) end end end if cba>0 then print("Combo Broken",90+jitter,112+jitter,2) cba=cba-1 end end if plyDead == false then if pause == false then if bs==false then scoreRaw = scoreRaw + 1 score = (scoreRaw//(24))*scM end end end if score>hs then hs=score end if score >= 10 then scoreXOffset = -2 end if score >= 100 then scoreXOffset = -4 end if score >= 1000 then scoreXOffset = -7 end if score >= 10000 then scoreColor = 3 scoreXOffset = -10 end end --variable box gameTimeRaw = 0 gameTime = 0 fTim = 0 nf = false foe = "..." shopped=false levedUp=false lTim = 0 load = false lId = 1 movId = 1 mId1 = 1 mId2 = 1 mId3 = 1 mId5 = -4 function mapGen() if seed == 1 then l2 = "Cold Freezer" l3 = "Greenhouse" l4 = "Gelatin Sewers" mId1 = 1 mId2 = 1 mId3 = 1 mId4 = 1 mId5 = -4 end if seed == 2 then l4 = "Cold Freezer" l2 = "Greenhouse" l3 = "Gelatin Sewers" mId1 = 2 mId2 = 1 mId3 = -2 mId4 = 3 mId5 = -4 end if seed == 3 then l3 = "Cold Freezer" l4 = "Greenhouse" l2 = "Gelatin Sewers" mId1 = 3 mId2 = -2 mId3 = 1 mId4 = 2 mId5 = -4 end end sId=0 spUp=false vt="Boss Defeated!!" function gameplay() if bs==false then print("Time", 1, 1) print(gameTime, 1, 10) end if plyDead == false then if pause == false then gameTimeRaw = gameTimeRaw + 1 gameTime = gameTimeRaw//60 end end if pause == false then if fTim>-1 then if plyDead==false then fTim = fTim + 1 end end end if fTim == 1800 then --1800 if spUp==true then enemyBonus=enemyBonus+0.05 enemySpawn=enemySpawn+0.05 sId=sId+1 else if idf<11 then nf = true end shopped = false end end if fTim > 1805 then --1805 if spUp==false then if idf<11 then print("NEW FOE!", 80, 30+swing, 2, false, 2) print(foe, 80, 42+swing, 15) end else print("SPEED UP!", 76, 30+swing, 2, false, 2) print("Foes are now faster!", 76, 42+swing, 15) end pause = true fTim = fTim + 1 end if fTim == 1905 then --1905 pause=false spUp=false fTim=-1 if idf==10 then idf=11 end end newFoe() nextLvl() mapGen() --game chain if shopped == false then if gameTime == 60 then pause = true shopOn = true end end if gameTime >= 90 then SL = false if lId==1 then print(vt, 40, 30+swing, 12, false, 2) else print("Level Complete!", 40, 30+swing, 15, false, 2) end pause = true shopped = false if load == false then if scen==false then lTim = lTim + 1 end end end if lTim >= 180 then load = true end if bs==true then fTim=-1 end end lvl = "Screw Hill" SL = true l2 = "Cold Freezer" l3 = "Greenhouse" l4 = "Gelatin Sewers" l5 = "nil" scen=false function loading() if lId == 1 then lvl = "Screw Hill" movId = mId5 spUp=false if idf<11 then if load==true then end end end if lId == 2 then lvl = l2 movId = mId1 if idf<11 then if load==true then fTim=0 end end end if lId == 3 then lvl = l3 movId = mId2 if load==true then if idf<11 then fTim=0 end end end if lId == 4 then lvl = l4 movId = mId3 spUp=true if load==true then if sId<3 then fTim=0 end end end if lId == 5 then lvl = l5 movId = mId4 spUp=false end if load == true then if scen==false then anger=0 boop=0 lTim = lTim + 1 starY=-10 heartY=-10 poY=-10 pause = true cls(15) print("Next level", 25, 20+swing, 12, false, 2) print(lvl, 25, 36+swing, 12, false, 1) bs=false if lap >= 2 then print("Lap", 1, 129, lap) print(lap, 25, 129, lap) end end if lTim>=240 then if idf= 480 then p = p + 180 pause = false levedUp = true gameTimeRaw = 0 load = false if SL == false then lvlUp = true spark = true end if m2==1 then music(1,-1,true) m2=0 end lId = lId + 1 if lId==6 then egX=1785 egY=28 gbX=1976 atk=1 ewX=0 ewY=0 mLiv=false am=3 amt=0 amY=-10 BT=0 bHP=20 blb=19 ow=0 cut=0 dv=true bsb=5 b2=0 music(3,-1,true) bs=true bossOn=true end lTim = 0 end end idf = 0 function newFoe() if nf == true then id = math.random(1,10) if id == 1 then if bullet1On == false then bullet1On = true foe = "Bullet" nf = false idf = idf + 1 end end if id == 2 then if bullet2On == false then bullet2On = true foe = "Fast bullet" nf = false idf = idf + 1 end end if id == 3 then if bullet3On == false then bullet3On = true foe = "Magnetic bullet" nf = false idf = idf + 1 end end if id == 4 then if bullet4On == false then bullet4On = true foe = "Explosive bullet" nf = false idf = idf + 1 end end if id == 5 then if snailOn == false then snailOn = true foe = "Immortal snail" nf = false idf = idf + 1 end end if id == 6 then if anvilOn == false then anvilOn = true foe = "Anvil" nf = false idf = idf + 1 end end if id == 7 then if laserOn == false then laserOn = true foe = "Laser" nf = false idf = idf + 1 end end if id == 8 then if bombOn == false then bombOn = true foe = "Bomb" nf = false idf = idf + 1 end end if id == 9 then if dvdOn == false then dvdOn = true foe = "The DVD logo" nf = false idf = idf + 1 end end if id == 10 then if ghostyOn == false then ghostyOn = true foe = "Ghost" nf = false idf = idf + 1 end end end end upgradeSpr1 = 480 upgradeSpr2 = 482 upgradeSpr3 = 484 price1 = 2 price2 = 2 price3 = 2 amount1 = 0 amount2 = 0 amount3 = 0 priceTag1 = price1 priceTag2 = price2 priceTag3 = price3 p1 = 65 p2 = 65 p3 = 65 price1Color = 15 price2Color = 15 price3Color = 15 p4c=15 goSpr = 486 upgradeTimer = 0 pr1=0 pr2=0 pr3=0 up4s=424 price4=2 v=0 v2=0 function shop() price1Color = 15 price2Color = 15 price3Color = 15 p4c=15 priceTag1 = price1 priceTag2 = price2 priceTag3 = price3 v=0 v2=0 if price1 > plyCoins then price1Color = 2 end if price2 > plyCoins then price2Color = 2 end if price3 > plyCoins then price3Color = 2 end if price4 > plyCoins then p4c=2 end if price1==10 then pr1=-4 end if price2==10 then pr2=-4 end if price3==10 then pr3=-4 end if price1 > 10 then price1Color = 6 priceTag1 = "MAX" p2 = -200 pr1=0 end if price2 > 10 then price2Color = 6 priceTag2 = "MAX" p1 = -200 pr2=0 end if price3 > 10 then price3Color = 6 priceTag3 = "MAX" p3 = -200 pr3=0 end if shopOn == true then v=-110 v2=-48 if upgradeTimer > 0 then upgradeTimer = upgradeTimer - 1 end bi2(upgradeSpr1,64,amount1,72,priceTag1,pr1,price1Color,p2,80,0) bi2(upgradeSpr2,104,amount2,112,priceTag2,pr2,price2Color,p1,120,0) bi2(upgradeSpr3,144,amount3,152,priceTag3,pr3,price3Color,p3,160,0) bi2(up4s,0,1,8,price4,0,p4c,65,16,6) spr(goSpr, 104, 109, 0, 2, 0, 0, 2, 1) upgradeSpr1 = 480 upgradeSpr2 = 482 upgradeSpr3 = 484 up4s=424 goSpr = 486 if HP>=mHP then print("MAX",6,24,15) end if bi(0,31,6)==true then up4s=426 if bshop("HEAL","Heal yourself by 1HP!",HP,price4,6,mHP)==true then HP=HP+1 if price4<8 then price4=price4+1 end end end if bi(64,95,0)==true then upgradeSpr1=448 if bshop("JUMP UPGRADE","Charge jumps faster!",amount1,price1,9,5)==true then plyJumpBonus=plyJumpBonus+0.2 amount1=amount1+1 price1=price1+2 end end if bi(104,135,0)==true then upgradeSpr2 = 450 if bshop("SPEED UPGRADE","Walk faster!",amount2,price2,14,5)==true then plySpeedBonus=plySpeedBonus+0.1 amount2=amount2+1 price2=price2+2 end end if bi(144,175,0)==true then upgradeSpr3 = 452 if bshop("COIN SPAWNRATE","Feed your greed!",amount3,price3,3,5)==true then coinTimerBonus=coinTimerBonus+0.5 amount3=amount3+1 price3=price3+2 end end if mouseX > 104 then if mouseX < 137 then if mouseY < 124 then if mouseY > 109 then goSpr = 502 if mouseClick == true then UIs() pause = false shopOn = false p = p + 150 spark = true shopped = true end end end end end end end function bi(x1,x2,y) if mouseY <= 61-y then if mouseY >= 30 then if mouseX >= x1 then if mouseX <= x2 then return true end end end end end function bi2(s,x,a,x2,pt,p,pc,pp,x3,y) spr(s, x, 30, 0, 2, 0, 0, 2, 2) if x>0 then print(a, x2, 22, 15) print(" /5", x2+2, 22, 15) end print(pt, x2+p, 67-y, pc) spr(384, x3, pp-y, 0) end function bshop(t1,t2,amo,pr,c,ma) print(t1, 1, 114, c) print(t2, 1, 124, 15, 0, 1, true) if mouseClick == true then if amo < ma then if upgradeTimer==0 then if plyCoins >= pr then sfx(4,"E-5",-1,1,5) plyCoins = plyCoins - pr upgradeTimer=30 return true end end end end end function player() spr(plySpr, plyX - camera.x , plyY+(ico*2), pbc, 1, plyFlip, plyRotate, 2, 2) --does the collision plyEnemyColX = plyX+8 plyEnemyColY = plyY+8 + crouchValue end function movement() plySpeedModifier = 0 if pause == false then pMov = false if plyOnGround == false then plySpeedModifier = 0.5 + plySpeedBonus end if jumpCharging == true then plySpeedModifier = -0.5 - (plySpeedBonus/2) end if btn(2) or key(1) then plyX = plyX - 1 - plySpeedModifier - plySpeedBonus + sd plyFlip = 0 pMov = true end if btn(3) or key(4) then plyX = plyX + 1 + plySpeedModifier + plySpeedBonus - sd plyFlip = 1 pMov = true end end end jd=0 function playerJump() jumpCharging = false jcl = false if pause == false then if jc >= 50 then jcl = true end --starts to charge jump if btn(1) or key(48) then if plyOnGround == true then jumpInitiate = true jumpCharging = true SGC = 0 pbc=0 if hat3==7 then if jc>=2 then jd=rnd(-2,2) cgl() cgl() cgl() cgl() end end if jcl == false then jc = jc + 1 + plyJumpBonus-jd end else jc=0 plySpr=sk crouchValue=0 end end --does the jump if jumpInitiate == true then if jumpCharging == false then if jc > 0 then crouchValue = 0 if pBlink == false then plySpr = sk end jc = jc - 1 plyY = plyY - 1 * (1+(jc//25)) end end end end end pj1=2 pj2=4 pj3=6 pj4=8 function jumpBar() if jumpCharging == true then spr(barTop, plyX + 16 - camera.x, plyY - 4, 1, 1, 0, 0, 1, 1) spr(barBottom, plyX + 16 - camera.x, plyY + 4, 1, 1, 0, 0, 1, 1) end if jc <= 0 then barBottom = 28 end if jc >= 1 then if jumpCharging == true then if pBlink == false then plySpr = pj1 end crouchValue = 1 end end if jc >= 5 then barBottom = 29 end if jc >= 10 then barBottom = 30 end if jc >= 15 then barBottom = 31 end if jc < 20 then barTop = 12 end if jc >= 20 then barTop = 44 if jumpCharging == true then if pBlink == false then plySpr = pj2 end crouchValue = 2 end end if jc >= 25 then barTop = 45 end if jc >= 30 then barTop = 46 end if jc >= 35 then barTop = 47 end if jc >= 40 then barTop = 13 if jumpCharging == true then if pBlink == false then plySpr = pj3 end crouchValue = 3 end end if jc >= 50 then barTop = 15 barBottom = 14 end --blinking if jcl == true then blinkValue = blinkValue + 1 if blinkValue == 10 then blinkValue = 0 end if pBlink == false then if blinkValue == 0 then plySpr = pj4 end if blinkValue == 1 then plySpr = pj3 end end end end function gravity() if plyOnGround == false then pMov = true if pause == false then if jc <=5 then gc = gc + 1 SGC = gc plyY = plyY + 1 *(1+(gc/25)) end end end if plyOnGround == true then gc = 0 pp=10 if onSlime == false then SGC = 0 end end end function groundCollision() plyOnGround = false plyColX = (plyX+1)//8 plyColY = (plyY-1)//8 plyCol2X = (plyX+12)//8 tileCheck = mget(plyColX, plyColY+2) tileCheck2 = mget(plyCol2X, plyColY+2) if tileCheck >= 192 then plyOnGround = true if hat2>-1 then onIce = false slippery = 0 end end if tileCheck2 >= 192 then plyOnGround = true if hat2>-1 then onIce = false slippery = 0 end end plyColCorrectionY = (plyY-2)//8 tileCheckCorrection = mget(plyColX+1, plyColCorrectionY+2) if tileCheckCorrection >= 177 then plyY = plyY - 1 end end function mapObjects() if tileCheck >= 177 then if tileCheck <= 179 then onIce = true plyOnGround = true end end if tileCheck2 >= 177 then if tileCheck2 <= 179 then onIce = true plyOnGround = true end end if tileCheck >= 180 then if tileCheck <= 183 then onSlime = true plyOnGround = true end end if tileCheck2 >= 180 then if tileCheck2 <= 183 then onSlime = true plyOnGround = true end end if tileCheck == 192 then if not hat3==-1 then onSlime = false end end ice() boing() end slippery = 0 function ice() if onIce == true then if pause == false then plyX = plyX + slippery if btn(3) then if slippery < 2-ics then slippery = slippery + 0.03*(1-(ics/2)) end end if btn(2) then if slippery > -2+ics then slippery = slippery - 0.03*(1-(ics/2)) end end end end end bAn = 0 function boing() if bAn > 1 then plySpr = pj1 crouchValue=1 if pause == false then bAn = bAn - 1 end end if bAn > 6 then plySpr = pj2 crouchValue=2 end if bAn > 11 then plySpr = pj3 crouchValue=3 end if bAn == 1 then plySpr = sk crouchValue=0 bAn = 0 pp=10 end if onSlime == true then if not btn(1) then if SGC >= 10 then sfx(13,"B-3",-1,0,7) jc = SGC + 4 jumpInitiate = true bAn = 16 end end if plyOnGround == false then onSlime = false end end end function audio1(id,pia,aId,v,t,ts,z) if t>=ts then if z==nil then sfx(id,pia,-1,aId,v) end end end function ac(t,ts) if t>=ts then return 0 end end --variable box bullet1X = 380 bullet1Y = 93 bullet2X = 473 bullet2Y = 73 bullet3X = 380 bullet3Y = 93 bullet4X = 473 bullet4Y = 73 function bullet1() spr(320, bullet1X-camera.x, bullet1Y, 0, 1, 0, 0, 1, 1, 1) if pause == false then bullet1X = bullet1X + 1 + enemyBonus end if bullet1X < 473 + mapOffset then enemyCollision(bullet1X, bullet1Y) end if bullet1X >= 473 + mapOffset then bullet1X = 217 + mapOffset bullet1Timer = 0 blaster1Spr = 400 z1=1 end end blaster1Spr = 400 function bullet1Ai() if bullet1On == true then if pause == false then bullet1YVariation() bullet1Timer = bullet1Timer + 1 + enemySpawn end if bullet1Timer >= 140 then blaster1Spr = 432 end if bullet1Timer >= 150 then blaster1Spr = 400 bullet1() end if bullet1Timer >= 160 then blaster1Spr = 432 end audio1(2,"B-1",0,8,bullet1Timer,155,z1) z1=ac(bullet1Timer,155) spr(blaster1Spr, 233+mapOffset-camera.x, bullet1Y, 0) end end bullet1YChange = -0.4 - enemyBonus function bullet1YVariation() if bullet1Timer < 130 then bullet1Y = bullet1Y + bullet1YChange if bullet1Y <= 43 then bullet1YChange = 0.4 + enemyBonus end if bullet1Y >= 93 then bullet1YChange = -0.4 - enemyBonus end end end --variable box plyDead = false eneX = "eneX" eneY = "eneY" function enemyCollision(eneX, eneY) if plyEnemyColX <= eneX+14 then if plyEnemyColX >= eneX-6 then if plyEnemyColY >= eneY-7+crouchValue then if plyEnemyColY <= eneY+14 then pHit = true end end end end end function bullet3() spr(336, bullet3X-camera.x, bullet3Y, 0, 1, 0, 0, 1, 1, 1) if pause == false then bullet3X = bullet3X + 0.7 + enemyBonus end if bullet3X < 473 + mapOffset then enemyCollision(bullet3X, bullet3Y) end if bullet3X >= 473 + mapOffset then bullet3X = 217 + mapOffset bullet3Timer = 0 blaster3Spr = 433 end end blaster3Spr = 400 function bullet3Ai() if bullet3On == true then if pause == false then bullet3YVariation() bullet3Timer = bullet3Timer + 1 + enemySpawn end --chase if bullet3Timer > 360 then if bullet3X <= plyX then if bullet3X >= 245 + mapOffset then if pause == false then if plyDead == false then if bullet3Y < plyY+6 then bullet3Y = bullet3Y + 0.05 + (enemyBonus/4) end if bullet3Y > plyY+6 then bullet3Y = bullet3Y - 0.05 - (enemyBonus/4) end end end end end end if bullet3Timer >= 370 then blaster3Spr = 432 end if bullet3Timer >= 380 then blaster3Spr = 433 bullet3() end if bullet3Timer >= 390 then blaster3Spr = 432 end audio1(2,"B-2",0,8,bullet3Timer,385,z3) z3=ac(bullet3Timer,385) spr(blaster3Spr, 233+mapOffset-camera.x, bullet3Ys, 0) end end bullet3YChange = -0.2 - enemyBonus bullet3Ys = bullet3Y function bullet3YVariation() if bullet3Timer < 360 then bullet3Y = bullet3Ys bullet3Ys = bullet3Ys + bullet3YChange if bullet3Ys <= 43 then bullet3YChange = 0.2 + enemyBonus end if bullet3Ys >= 93 then bullet3YChange = -0.2 - enemyBonus end end end bullet2Speed = 0.01 function bullet2() spr(337, bullet2X-camera.x, bullet2Y, 0, 1, 0, 0, 1, 1, 1) if pause == false then bullet2X = bullet2X - bullet2Speed if bullet2X < 473 + mapOffset then enemyCollision(bullet2X, bullet2Y) bullet2Speed = bullet2Speed + 0.01 + (enemyBonus/50) end end if bullet2X <= 217 + mapOffset then bullet2X = 473 + mapOffset bullet2Timer = 150 bullet2Speed = 0.01 end end blaster2Spr = 416 function bullet2Ai() if bullet2On == true then if pause == false then bullet2YVariation() bullet2Timer = bullet2Timer + 1 + enemySpawn end if bullet2Timer < 350 then blaster2Spr = 416 end if bullet2Timer >= 350 then bullet2() blaster2Spr = 432 end if bullet2Timer >= 360 then blaster2Spr = 416 end if bullet2Timer >= 370 then blaster2Spr = 432 end audio1(2,"F-2",0,8,bullet2Timer,375,z2) z2=ac(bullet2Timer,375) spr(blaster2Spr, 465+mapOffset-camera.x, bullet2Y, 0, 1, 1, 0) end end bullet2YChange = -0.3 - enemyBonus function bullet2YVariation() if bullet2Timer < 350 then bullet2Y = bullet2Y + bullet2YChange if bullet2Y <= 43 then bullet2YChange = 0.3 + enemyBonus end if bullet2Y >= 93 then bullet2YChange = -0.3 - enemyBonus end end end bullet4Spr = 353 function bullet4() if bExplode == false then spr(bullet4Spr, bullet4X-camera.x, bullet4Y, 0, 1, 0, 0, 1, 1, 1) if pause == false then bullet4X = bullet4X - 0.8 - enemyBonus end if bullet4X < 473 + mapOffset then bullet4Collision() end end if bullet4X <= 217 + mapOffset then bullet4X = 473 + mapOffset bullet4Timer = -140 end end bTimer = 0 ticTac2 = 0 function bullet4Ai() explosionCollision(explosion2X, explosion2Y, bExplode) if bExplode == false then explosion2X = bullet4X explosion2Y = bullet4Y end if bullet4On == true then if pause == false then bullet4YVariation() bullet4Timer = bullet4Timer + 1 + enemySpawn end if bullet4Timer < 350 then blaster5Spr = 421 end if bullet4Timer >= 350 then blaster5Spr = 437 end if bullet4Timer >= 360 then blaster5Spr = 421 end if bullet4Timer >= 370 then blaster5Spr = 437 bullet4() end audio1(2,"C-1",0,8,bullet4Timer,365,z4) z4=ac(bullet4Timer,365) spr(blaster5Spr, 465+mapOffset-camera.x, bullet4Y, 0, 1, 1, 0) --detonation2 if pause == false then if bExplode == true then spr(explosionSpr, explosion2X-8-camera.x, explosion2Y-8, 0, 1, 0, 0, 3, 3) explosion2X = explosion2X + jitter explosion2Y = explosion2Y + jitter bTimer = bTimer + 1 end if bTimer >= 120 - (enemyBonus*120) then bExplode = false bullet4X = 473 + mapOffset bullet4Timer = -140 bTimer = 0 bTicTac = false ticTac2 = 0 end if bTicTac == true then ticTac2 = ticTac2 + 1 + enemyBonus end end if ticTac2 >= 10 then bullet4Spr = 369 end if ticTac2 >= 20 then bullet4Spr = 353 end if ticTac2 >= 30 then bullet4Spr = 369 end if ticTac2 >= 40 then bExplode = true bullet4Spr = 353 end audio1(6,"B-2",0,10,ticTac2,40,z7) z7=ac(ticTac2,40) end end bullet4YChange = -0.25 - enemyBonus function bullet4YVariation() if bullet4Timer < 350 then bullet4Y = bullet4Y + bullet4YChange if bullet4Y <= 43 then bullet4YChange = 0.25 + enemyBonus end if bullet4Y >= 93 then bullet4YChange = -0.25 - enemyBonus end end end function bullet4Collision() if bExplode == false then if plyEnemyColX <= bullet4X+14 then if plyEnemyColX >= bullet4X-6 then if plyEnemyColY >= bullet4Y-7+crouchValue then if plyEnemyColY <= bullet4Y+14 then pHit = true bExplode = true ticTac2=40 end end end end end if plyEnemyColX <= bullet4X+30 then if plyEnemyColX >= bullet4X-22 then if plyEnemyColY >= bullet4Y-23+crouchValue then if plyEnemyColY <= bullet4Y+30 then if plyDead == false then bTicTac = true end end end end end end function snail() spr(321, snailX-camera.x, snailY, 0, 1, snailFlip, 0, 1, 1, 1) enemyCollision(snailX, snailY) end function snailAi() if snailOn == true then snail() if pause == false then if snailX > plyX+4 then if plyDead == false then snailX = snailX - 0.05 - (enemyBonus/8) snailFlip = 1 end end if snailX < plyX+4 then if plyDead == false then snailX = snailX + 0.05 + (enemyBonus/8) snailFlip = 0 end end if plyDead == true then if HP <= 0 then snailX = snailX + 0.2 snailFlip = 0 print("lol what a bozo", (snailX-23)-camera.x, snailY-5, 15, false, 1, true) end end end end end ghostyX = 224 ghostyY = -8 gFlip = 0 gSpr = 373 function ghosty() spr(gSpr, ghostyX-camera.x, ghostyY, 0, 1, gFlip, 0, 1, 1, 1) end gmX = 0 gmY = 0 ghostyOn = false function ghostyAi() if ghostyOn == true then ghosty() enemyCollision(ghostyX, ghostyY) if pause == false then ghostyY = ghostyY + (swing/10) if plyDead == false then ghostyX = ghostyX + gmX ghostyY = ghostyY + gmY gm = false if plyX+6 <= ghostyX then gFlip = 0 gSpr = 373 gm = true gmX = -0.2 - (enemyBonus/4) if plyFlip == 1 then gSpr = 389 gmX = -gmX-0.05 gm = false gmY = -gmY+0.05 gFlip = 1 end end if plyX+2 >= ghostyX then gmX = 0.2 + (enemyBonus/4) gFlip = 1 gSpr = 373 gm = true if plyFlip == 0 then gSpr = 389 gmX = -gmX+0.05 gm = false gmY = -gmY-0.05 gFlip = 0 end end if gm == true then if plyY+6 <= ghostyY then gmY = -0.2 - (enemyBonus/2) end if plyY+2 >= ghostyY then gmY = 0.2 + (enemyBonus/2) end end if ghostyX >= 472 + mapOffset then ghostyX = 219 + mapOffset end if ghostyX <= 218 + mapOffset then ghostyX = 471 + mapOffset end end end end end DVDC = 2 function dvd() print("DVD", dvdX-camera.x, dvdY, DVDC) spr(357, (dvdX-1)-camera.x, dvdY-1, 0, 1, 0, 0, 3, 1) enemyCollision(dvdX, dvdY) enemyCollision(dvdX+8, dvdY) end DXV = 0.5 DYV = 0.5 function dvdAi() if dvdOn == true then dvd() if pause == false then dvdX = dvdX + DXV dvdY = dvdY + DYV end if dvdY >= 132 then DYV = -0.5 - enemyBonus DVDC = DVDC + 1 end if dvdY <= 0 then DYV = 0.5 + enemyBonus DVDC = DVDC + 1 end if dvdX >= 456 + mapOffset then DXV = -0.5 - enemyBonus DVDC = DVDC + 1 end if dvdX <= 232 + mapOffset then DXV = 0.5 + enemyBonus DVDC = DVDC + 1 end if DVDC == 12 then DVDC = 2 end if DVDC == 7 then DVDC = 9 end end end function dvdXVary() dvdX = dvdX + 1 if dvdX >= 457 + mapOffset then dvdX = 234 + mapOffset end end anvilX = 372 anvilY = -30 anvilSprite = 322 function anvil() spr(anvilSprite, anvilX-camera.x, anvilY, 0, 1, 0, 0, 3, 2) anvilCollision() end --variable box anvilGravityCharge = 0 anvilOnGround = true anvilTimer = 0 function anvilAi() if anvilOn == true then anvil() anvilXVariation() if pause == false then anvilTimer = anvilTimer + 1 + enemySpawn if anvilOnGround == false then anvilGravityCharge = anvilGravityCharge + 1 anvilY = anvilY + 1 *(1+(anvilGravityCharge/25)) end if anvilOnGround == true then anvilGravityCharge = 0 if z5==1 then sfx(3,"C-1",-1,0,7) z5=0 end end end --makes the anvil fall if anvilTimer >= 400 then if anvilTimer <= 405 then anvilOnGround = false z5=1 end end if anvilTimer >= 700 then anvilSprite = 325 end if anvilTimer >= 710 then anvilSprite = 322 end if anvilTimer >= 720 then anvilSprite = 325 end if anvilTimer >= 730 then anvilSprite = 322 end if anvilTimer >= 740 then anvilSprite = 325 end if anvilTimer >= 750 then anvilY = -40 anvilSprite = 322 anvilTimer = 0 anvilOnGround = true end end end function anvilWarning() if anvilTimer > 300 + (enemyBonus*50) then if anvilTimer < 400 then if bs==false then spr(328, (anvilX+9)-camera.x, 8, 0, 1, 0, 0, 1, 2) end end end end function anvilXVariation() if anvilTimer >= 200 then if anvilTimer < 300 then anvilX = anvilX + 1.4 end end if anvilX >= 457 + mapOffset then anvilX = 234 + mapOffset end end function anvilExtra() if anvilOnGround == true then if anvilY > -30 then if plyEnemyColY >= anvilY-4+crouchValue then if plyEnemyColY < anvilY+1 then plyOnGround = true if hat2>-1 then onIce = false slippery = 0 end if hat3==-1 then onSlime=true if ss==false then SGC=SGC-(SGC/3) end end if anvilPlat == true then plyX = plyX + platM end if plyEnemyColY > anvilY-3.5+crouchValue then plyY = plyY - 0.5 end end end end end end function anvilCollision() if plyEnemyColX <= anvilX+30 then if plyEnemyColX >= anvilX-5 then anvilExtra() if plyEnemyColY >= anvilY-4+crouchValue then if plyEnemyColY <= anvilY+22 then if anvilOnGround == false then pHit = true end end end end end --anvil ground collision anvilColX = (anvilX+1)//8 anvilColY = (anvilY-1)//8 anvilCol2X = (anvilX+18)//8 anvilTileCheck = mget(anvilColX, anvilColY+2) anvilTileCheck2 = mget(anvilCol2X, anvilColY+2) if anvilTileCheck >= 177 then anvilOnGround = true end if anvilTileCheck2 >= 177 then anvilOnGround = true end --anvil tile correction anvilColCorrectionY = (anvilY-2)//8 anvilTileCheckCorrection = mget(anvilColX+1, anvilColCorrectionY+2) if anvilTileCheckCorrection >= 177 then anvilY = anvilY - 1 end end explosion1X = 416 explosion1Y = 32 bombExplode = false bombGravityCharge = 0 bombSpr = 352 blaster4Spr = 401 function bomb() if bombExplode == false then spr(bombSpr, bombX-camera.x, bombY, 0, 1, 0, 0, 1, 1) end spr(blaster4Spr, bombX-camera.x, 0, 9) end explosionSpr = 402 explAnim = 0 jitter = -0.5 bombTimer = 0 bombX = 400 bombTic = false bombExplode = false ticTac = 0 bombOnGround = false function bombAi() if bombOn == true then bomb() explosionCollision(explosion1X, explosion1Y, bombExplode) bombXVariation() if pause == false then bombTimer = bombTimer + 1 + enemySpawn if bombOnGround == false then if bombTimer >= 0 then bombGravityCharge = bombGravityCharge + 1 + enemyBonus bombY = bombY + 0.5 *(1+(bombGravityCharge/25)) explosion1X = bombX explosion1Y = bombY end end end if bombTimer >= -30 then blaster4Spr = 417 end if bombTimer >= -20 then blaster4Spr = 401 end if bombTimer >= -10 then blaster4Spr = 417 end if bombOnGround == true then bombGravityCharge = 0 end bombColX = (bombX)//8 bombColY = (bombY-9)//8 bombCol2X = (bombX+8)//8 bombTileCheck = mget(bombColX, bombColY+2) bombTileCheck2 = mget(bombCol2X, bombColY+2) if bombTileCheck >= 177 then bombOnGround = true bombTic = true end if bombTileCheck2 >= 177 then bombOnGround = true bombTic = true end --tile correction bombColCorrectionY = (bombY+6)//8 bombTileCheckCorrection = mget(bombColX+3, bombColCorrectionY) if bombTileCheckCorrection >= 177 then bombY = bombY - 1 end if pause == false then if bombTic == true then ticTac = ticTac + 1 + enemyBonus end if ticTac >= 10 then bombSpr = 368 end if ticTac >= 20 then bombSpr = 352 end if ticTac >= 30 then bombSpr = 368 end if ticTac >= 40 then bombSpr = 352 end if ticTac >= 50 then bombSpr = 368 end if ticTac >= 60 then bombExplode = true bombSpr = 352 end audio1(6,"E-3",0,10,ticTac,60,z6) z6=ac(ticTac,60) explosion1X = explosion1X + jitter explosion1Y = explosion1Y + jitter end --detonation if bombExplode == true then spr(explosionSpr, explosion1X-8-camera.x, explosion1Y-8, 0, 1, 0, 0, 3, 3) end if ticTac >= 180 - (enemyBonus*120) then bombTimer = -270 bombExplode = false bombY = -10 bombOnGround = false ticTac = 0 blaster4Spr = 401 bombTic = false end end end bVary = 0.3 function bombXVariation() if pause == false then if bombTimer < -30 then bombX = bombX + bVary end end if bombX >= 451 + mapOffset then bVary = -0.3 - enemyBonus end if bombX <= 250 + mapOffset then bVary = 0.3 + enemyBonus end if bombX >= 461 + mapOffset then bombX = bombX - offsetSave end end function explosionCollision(expX, expY, exp) if exp == true then if plyEnemyColX <= expX+20 then if plyEnemyColX >= expX-12 then if plyEnemyColY >= expY-14+crouchValue then if plyEnemyColY <= expY+18 then pHit = true end end end end end end laserX = 200 laserXVaryValue = 0.4 + enemyBonus laserPew = false laserTimer = -20 laserBaseSpr = 508 laserSpr = 495 laserAnimate = 0 function laserAi() if laserOn == true then laser() laserCollision() if laserPew == true then laserAnimate = laserAnimate + 1 end if laserAnimate > 10 then laserBaseSpr = 492 laserSpr = 495 end if laserAnimate > 20 then laserAnimate = 0 laserBaseSpr = 508 laserSpr = 494 end if pause == false then laserXVariation() laserTimer = laserTimer + 1 + enemySpawn end if laserTimer >= 350 then laserPew = true end if laserTimer >= 650 then laserPew = false laserTimer = -50 end audio1(8,"B-5",2,10,laserTimer,500,z8) z8=ac(laserTimer,500) end end function laser() spr(laserBaseSpr, laserX-camera.x, 129, 0, 1, 0, 0, 2, 1) spr(laserBaseSpr, laserX-camera.x, -1, 0, 1, 2, 0, 2, 1) if laserPew == true then if laserTimer >= 500 then spr(laserSpr, (laserX+4)-camera.x, 114, 0, 1, 0, 0, 1, 2) spr(laserSpr, (laserX+4)-camera.x, 98, 0, 1, 0, 0, 1, 2) spr(laserSpr, (laserX+4)-camera.x, 82, 0, 1, 0, 0, 1, 2) spr(laserSpr, (laserX+4)-camera.x, 66, 0, 1, 0, 0, 1, 2) spr(laserSpr, (laserX+4)-camera.x, 50, 0, 1, 0, 0, 1, 2) spr(laserSpr, (laserX+4)-camera.x, 34, 0, 1, 0, 0, 1, 2) spr(laserSpr, (laserX+4)-camera.x, 18, 0, 1, 0, 0, 1, 2) spr(laserSpr, (laserX+4)-camera.x, 6, 0, 1, 0, 0, 1, 2) end end end function laserXVariation() if laserPew == false then laserBaseSpr = 508 laserX = laserX + laserXVaryValue end if laserX >= 441 + mapOffset then laserXVaryValue = -0.4 - enemyBonus end if laserX <= 260 + mapOffset then laserXVaryValue = 0.4 + enemyBonus end if laserX >= 451 + mapOffset then laserX = 200 + mapOffset end end function laserCollision() if laserPew == true then if laserTimer >= 500 then if plyEnemyColX <= laserX+18 then if plyEnemyColX >= laserX-1 then if plyEnemyColY >= 6 then pHit = true end end end end end end egs1 = 318 egs2 = 319 egs3 = 334 egs4 = 335 egX=1785 egY=28 egAn=0 bug=1 BT=0 bossOn=true bHit=false bHP=20 ow=0 blb=19 mRng=0 function bhb() rectb(egX-3-camera.x,egY-10,21,6,12) rect(egX-2-camera.x,egY-9,blb,4,2) end cut=0 esp=300 function cutscene() if scen==true then cls(0) cut=cut+1 print(">CODE CORRUPTED",1,9,2,false,2) spr(esp,206,102,9,2,0,0,2,2) if cut>=60 then print(">Corrupted code has been found, applying",1,33,12) print("self-fix protocol...",1,41,12) end if cut>=600 then print(">Self-fix protocol failed, closing game...",1,57,12) end if cut>=840 then print(">ERROR",1,73,2) end if cut>=960 then print(">ERROR",1,81,2) end if cut>=1050 then print(">ERROR",1,89,2) end if cut>=1110 then print(">ERROR",1,97,2) end if cut>=1140 then print(">ERROR",1,105,2) end if cut>=1150 then print(">ERROR",1,113,2) end if cut>=1160 then print(">ERROR",1,121,2) end if cut>=1170 then print(">Hi there :)",1,129,2) end if cut>=1200 then esp=318 end if cut>=1230 then scen=false lTim=480 esp=300 cut=0 end end end gs1=318 gs2=319 gs3=334 gs4=335 bsb=5 zi=0 function boss() gs1=318 gs2=319 gs3=334 gs4=335 zi=0 if bossOn==false then if bs==true then if cut>-1 then cut=cut+0.3 spr(460,egX+swing-camera.x,egY-cut,9,1,0,0,2,2) end if cut>=120 then gameTimeRaw=(90*60) lap=lap+1 cut=-1 end end end if bossOn==true then lTim=0 gameTimeRaw=0 spark=false if dv==true then plyX=1784 plyY=88 dv=false end local z=bossCol(plyEnemyColX,plyEnemyColY) if z==true then pHit=true end if bHit==true then ow=20 blb=blb-0.9 bHP=bHP-1 sX=0 score=score+25 mRng=math.random(1,4) end if bHP<6+(lap*2) then b2=1 if lap==1 then am=math.random(1,9) ah=0 end end if b2==1 then gs3=380 gs4=381 bsb=2 zi=1 amX=amX+math.random(-2,2) egs1=bugAn(egs1,gs1) egs4=bugAn(egs4,gs4) egX=egX+gbmY egY=egY+gbmY GBA=math.random(1,500) mRng=math.random(1,250) if mRng>=235 then cls(0) end end bHit = bossCol(sX,sY) bossAi() gun() bhb() bVis() gBul() minion() if mRng==4 then if mLiv==false then miX=egX+8 miY=egY+8 mLiv=true mRng=0 end end if bHP<=0 then lId=1 mRng=0 seg=1 bossOn=false music() m2=1 end if ow>=15 then cls(0) end if ow==10 then cls(2) end if ow==0 then spr(egs1, egX-camera.x, egY+(swing/2), 9, 1, 0, 0) spr(egs2, egX+8-camera.x, egY+(swing/3), 9, 1, 0, 0) spr(egs3, egX-camera.x, egY+8+(swing/4), 9, 1, 0, 0) spr(egs4, egX+8-camera.x, egY+8+swing, 9, 1, 0, 0) end egAn=egAn+1 if egAn==1 then bug=math.random(1,4) end if bug==1 then egs1=bugAn(egs1,gs1) end if bug==2 then egs2=bugAn(egs2,gs2) end if bug==3 then egs3=bugAn(egs3,gs3) end if bug==4 then egs4=bugAn(egs4,gs4) end if ow>0 then ow=ow-1 sfx(math.random(1,8),math.random(1,60),-1,math.random(0,3),5) spr(350, egX-camera.x, egY, 9, 1, 0, 0, math.random(1,2), math.random(1,2)) egY=egY+math.random(-2,2) egX=egX+math.random(-2,2) end end end gbX=1976 gbY=88 gFl=0 gbOn=true GBA=0 gbm=0 gbwX=0 gbG=0 gbmY=0 gbmX=0 function gBul() gbG=gbG+1 if GBA==1 then gbX=1584 gbwX=1680 gFl=0 gbY=math.random(38,86) GBA=0 end if GBA==2 then gbX=1992 gbwX=1896 gFl=1 gbY=math.random(38,86) GBA=0 end if gbG>=5 then gbmY=math.random(-1,1)/2 gbmX=math.random(0,4+zi)/2 gbG=0 end spr(math.random(331,333), gbX-camera.x, gbY, 0, 1, gFl) enemyCollision(gbX, gbY) gbY=gbY+gbmY if gFl==0 then gbX=gbX+gbmX if gbX>=gbwX then gbwX=0 end else gbX=gbX-gbmX if gbX<=gbwX then gbwX=0 end end spr(346,gbwX-camera.x,gbY,9,1,gFl) spr(330,gbwX-camera.x,gbY-8,9) end miX=1896 miY=8 mmX=0 mmY=0 mLiv=false function minion() local mcr=math.random(-1,1)/2 if mLiv==true then enemyCollision(miX,miY) spr(285,miX+mcr-camera.x,miY+mcr,9) if plyDead==false then miX=miX+mmX miY=miY+mmY end if plyX>miX then mmX=0.3+(swing/10)+(zi/5) end if plyXmiY then mmY=0.3+(swing/10)+(zi/5) end if plyY=miX then if sX<=miX+8 then if sY>=miY-4 then if sY<=miY+8 then sX=0 mRng=0 sfx(0,math.random(10,48),-1,1,5) mLiv=false end end end end end end function bossCol(colX,colY,bop) if colX <= egX+21 then if colX >= egX-5 then if colY >= egY-7+crouchValue then if colY <= egY+22 then return true end end end end end chX=0 chY=0 slyX=plyX slyY=plyY atk=1 ewX=0 ewY=0 bsp=0 function bossAi() if plyDead==false then if atk<=1 then if BT<=50 then if atk>-1 then slyX=plyX+2 slyY=plyY-8 end end if BT>=5 then if BT<=80 then line(slyX+6-camera.x,slyY+14,egX+8-camera.x,egY+8,2) spr(348,slyX-camera.x,slyY+8,0,1,0,0,2,2) end end if BT==160 then if atk==0 then slyX=1781 slyY=28 BT=5 atk=-1 if GBA==3 then GBA=math.random(1,3) end else if atk>-1 then BT=3 atk=0 GBA=math.random(1,3) end end end if BT>=260 then atk=math.random(0,3) if GBA==3 then GBA=math.random(1,2) end BT=0 end bsp=math.random(1,bsb) if egX>slyX-4 then chX=-1-(swing/bsp) end if egXslyY-4 then chY=-1-(swing/bsp) end if egY=4 then BT=BT+1 if BT<=50 then egX=egX+math.random(-3,3) else egX=egX+chX egY=egY+chY end end end if atk>=2 then if BT==2 then ewX=plyX+8 ewY=plyY-8 BT=BT+1 end if BT>=3 then if BT<=4 then spr(329, ewX-camera.x, ewY, 9, 1, 0, 0, 1, 2) end end if BT==5 then egX=ewX egY=ewY BT=3 atk=1 end end end end function bVis() local bn=math.random(-2,2) local bn2=math.random(-2,2) print("Error",3+bn,30+bn2,2) print("Error",210+bn2,70+bn,2) print("Error",75+bn2,120+bn,2) if bHP==20 then print("! Press UP to shoot !",70,110,12) end end function bugAn(egs,sp) if egAn>=30 then egs=math.random(256,511) end if egAn>=45 then egs=sp BT=BT+1 egAn=0 end return egs end pew=0 pf=0 ggm=-8 sX=0 sY=0 function gun() if plyDead==false then ammo() if btn(0) or key(23) then if pew==0 then if am>0 then am=am-1 sfx(2,"B-2",-1,0,5) pew=1 end end end if plyFlip==1 then ggm=16 else ggm=-8 end if pew>=1 then if pew==1 then if plyFlip==1 then pf=-4 else pf=4 end sX=plyX sY=plyY sD2=ggm sD=plyFlip end pew=pew+1 sX=sX-pf if pew>=60 then pew=0 end spr(313, sX+sD2-camera.x, sY+4, 0, 1, sD) end spr(312, plyX+ggm-camera.x, plyY+4, 0, 1, plyFlip) end end coinSpr = 384 function coin() print(plyCoins, 228, 3, 3) spr(coinSpr, 218, 1, 0) coinSpr = 384 if platAn >= 85 then coinSpr = 385 end if coinTimer >= 2 then if coinTimer <= 50*(1+coinTimerBonus) then print("+1", savedCoinX-camera.x, coinY, 3) if pause == false then coinY = coinY - 0.5 end end end if coinOn == true then savedCoinX = coinX spr(coinSpr, coinX-camera.x, coinY, 0, 1, 0, 0, 1, 1, 1) itemCollision(coinX, coinY, "coin") end end function cXv() coinX = coinX + 1.6 if coinX >= 457 + mapOffset then coinX = coinX - 213 end end coinTimer = 0 function coinRespawn() if coinOn == false then if pause == false then coinTimer = coinTimer + 1 + coinTimerBonus cXv() end end if coinTimer >= 850 then coinOn = true coinTimer = 0 coinY = 92 end end cmb=0 tr=0 function itemCollision(itemX, itemY, item) if plyEnemyColX <= itemX+14 then if plyEnemyColX >= itemX-6 then if plyEnemyColY >= itemY-8+crouchValue then if plyEnemyColY <= itemY+14 then if item == "coin" then plyCoins = plyCoins + 1 scoreRaw = scoreRaw + 240 --10 sfx(4,"E-5",-1,1,5) coinOn = false end if item == "star" then scoreRaw = scoreRaw + 1200 --50 cmb=cmb+1 if DTC<270 then DTC=DTC+15 end p = 900 pBlink = false sfx(5,"B-4",-1,1,7) starOn = false spark = true starY=-10 dTim=0 end if item == "heart" then scoreRaw = scoreRaw + 720 --30 cmb=cmb+1 if DTC<270 then DTC=DTC+15 end if HP < mHP then HP = HP + 1 end sfx(5,"B-3",-1,1,7) heartOn = false heartY=-10 dTim=0 end if item == "point" then scoreRaw = scoreRaw + 240 --10 cmb=cmb+1 tr=tr+1 if DTC<270 then DTC=DTC+15 end poY=-10 sfx(4,"E-4",-1,1,5) pointOn = false dTim=0 end if item=="ammo" then if ah>=2 then am=am+math.random(2,3)+b2 amt=0 sfx(4,"E-4",-1,1,5) else if HP < mHP then HP=HP + 1 end sfx(5,"B-3",-1,2,7) amt=240 ah=3 end amY=-10 end end end end end end starSpr = 264 function star() if starOn == true then if pause==false then starY=starY+0.3 starX=starX+(swing/4) end spr(starSpr, starX-camera.x, starY, 0, 1, 0, 0, 1, 1, 1) itemCollision(starX, starY, "star") if starY>140 then sY=-10 starOn=false if cmb>0 then cba=90 end DTC=0 cmb=0 dTim=0 starY=-10 end end end heartSpr = 280 function heart() if heartOn == true then if pause==false then heartY=heartY+0.3 heartX=heartX+(swing/4) end spr(heartSpr, heartX-camera.x, heartY, 9, 1, 0, 0, 1, 1, 1) itemCollision(heartX, heartY, "heart") if heartY>140 then sY=-10 heartOn=false if cmb>0 then cba=90 end DTC=0 cmb=0 dTim=0 heartY=-10 end end end pointOn=false poX=0 poY=-10 poSpr=296 function points() if pointOn == true then spr(poSpr, poX-camera.x, poY, 0) if pause==false then poY=poY+0.3 poX=poX+(swing/4) end itemCollision(poX, poY, "point") end if poY>140 then sY=-10 pointOn=false if cmb>0 then cba=90 end DTC=0 cmb=0 dTim=0 poY=-10 end itemText(poX,poY,pointOn) end itt=0 function itemText(iX,iY,iOn) if iOn==true then sX=iX sY=iY itt=0 else if itt>-1 then itt=itt+1 end end if itt>=1 then print("+1",sX-camera.x,sY-(itt/2),15) end if itt>=60 then itt=-1 end end dTim=0 dId=0 DTC=0 function drops() if pause==false then if dTim<300-DTC then dTim=dTim+1 end end if dTim==300-DTC then dId=math.random(1,100) dTim=dTim+1 end if dId>=1 then if dId<=5 then starOn=true starX=math.random(248+mapOffsetRaw*240,448+mapOffsetRaw*240) dId=0 end end if dId>=6 then if dId<=15+j then heartOn=true heartX=math.random(248+mapOffsetRaw*240,448+mapOffsetRaw*240) dId=0 end end if dId>=16+j then pointOn=true poX=math.random(248+mapOffsetRaw*240,448+mapOffsetRaw*240) poSpr=math.random(405,411) dId=0 end end amX=1720 amY=-10 am=0 amt=0 ah=0 function ammo() amt=amt+1 if amt==10 then amX=math.random(1720,1856) ah=math.random(1,8) end if amt>=480+(120*zi) then amY=amY+0.4 if ah>=2 then spr(314,amX+3-camera.x,amY+3,0) spr(313,amX-camera.x,amY,0) else spr(280,amX-camera.x,amY,9) end itemCollision(amX, amY, "ammo") end if amY>=160 then amt=0 amY=-10 end spr(313,plyX+7-camera.x,plyY-8,0) print(am,plyX+1-camera.x,plyY-8,12) end platY = 72 fanSpr = 470 function platform() platformAi() spr(32, platX-camera.x, platY, 0, 1, 0, 0, 1, 1) spr(33, platX+8-camera.x, platY, 0, 1, 0, 0, 1, 1) spr(33, platX+16-camera.x, platY, 0, 1, 0, 0, 1, 1) spr(33, platX+24-camera.x, platY, 0, 1, 0, 0, 1, 1) spr(33, platX+32-camera.x, platY, 0, 1, 0, 0, 1, 1) spr(32, platX+40-camera.x, platY, 0, 1, 1, 0, 1, 1) spr(fanSpr, platX+16-camera.x, platY+6, 0, 1, 0, 0, 2, 1) end function platformAi() if plyX >= platX-14 then if plyX <= platX+46 then if plyY <= platY-8 then if plyY >= platY-15 then plyOnGround = true if hat2>-1 then onIce = false slippery = 0 end if pause == false then plyX = plyX + platM end if plyY+14 > platY then plyY = plyY - 1 end end end end end anvilPlat = false if anvilX >= platX-19 then if anvilX <= platX+45 then if anvilY <= platY-8 then if anvilY >= platY-15 then anvilOnGround = true anvilPlat = true if anvilY+15 > platY then anvilY = anvilY - 1 end if pause == false then anvilX = anvilX + platM end end end end end if bombX >= platX-8 then if bombX <= platX+40 then if bombY <= platY then if bombY >= platY-8 then bombTic = true bombOnGround = true if pause == false then bombX = bombX + platM if bombExplode == false then explosion1X = explosion1X + platM end end end end end end --move if pause == false then platX = platX + platM end if platX <= 978 then platM = 0.2 end if platX >= 1120 then platM = -0.2 end end hp1Spr = 280 hp2Spr = 280 hp3Spr = 280 function die() hp1Spr = 280 hp2Spr = 280 hp3Spr = 280 jit3 = 0 jit2 = 0 if HP <= 2 then hp3Spr = 281 jit3 = jitter end if HP <= 1 then hp2Spr = 281 jit2 = jitter end if HP <= 0 then hp1Spr = 281 end if shopOn==true then jit3=0 jit2=0 end if kaizoOn==false then if mHP == 3 then spr(hp1Spr, 111+v, 120+v2, 9, 1) spr(hp3Spr, 129+v-jit3, 120+v2+jit3, 9, 1) spr(hp2Spr, 120+v+jit2, 120+v2-jit2, 9, 1) end if mHP == 2 then spr(hp2Spr, 124+v+jit2, 120+v2-jit2, 9, 1) spr(hp1Spr, 115+v, 120+v2, 9, 1) end else spr(hp2Spr, 120+v+jit2, 120-jit2, 9, 1) end if pause == false then if pHit == true then if p <= 0 then HP = HP - 1 sfx(12,"B-2",-1,1,12) p = 180 pBlink = true if cmb>0 then cba=90 end DTC=0 cmb=0 jc = 25 jumpInitiate = true else pHit = false end end if pBlink == true then hitAn = hitAn + 1 if hitAn >= 10 then plySpr = 490 end if hitAn >= 20 then plySpr = 488 hitAn = 0 end end if HP <= 0 then plyDead = true rs=0 BT=0 end if plyDead == true then screen = 3 gSpr = 389 idf = 10 mRng=0 end end end pSpr = 262 pX = plyX pY = plyY pX2 = plyX pY2 = plyY starTimSpr = 264 function poo() if p > 0 then if spark == true then spr(starTimSpr, plyX+4-camera.x, plyY - 10, 0, 1, 0, 0, 1, 1) spr(pSpr, plyX-camera.x, plyY, 0, 1, 0, 0, 2, 2) if p >= 300 then starTimSpr = 264 end if p <= 300 then starTimSpr = 265 end if p <= 100 then starTimSpr = 266 end if pMov == true then spr(pSpr, pX-camera.x, pY, 0, 1, 0, 1, 2, 2) spr(pSpr, pX2-camera.x, pY2, 0, 1, 0, 2, 2, 2) end end if pause == false then p = p - 1 end end if p <= 0 then spark = false if pBlink == true then plySpr = sk pBlink = false end end pAn = pAn + 1 if pAn >= 15 then pSpr = 294 end if pAn == 15 then pX = plyX pY = plyY end if pAn == 30 then pX2 = plyX pY2 = plyY end if pAn >= 30 then pSpr = 262 pAn = 0 end end mapOffsetRaw = 0 mapOffset = mapOffsetRaw*30*8 camera = {x = 30, y = 0} camera.x = plyX+mapOffset - 115 function screenView() map(camera.x//8, camera.y) mapOffset = mapOffsetRaw*30*8 camera.x = 348+mapOffset - 115 end plyX = 348 + mapOffset function loop() if plyX >= 472 + mapOffset then plyX = 219 + mapOffset end if plyX <= 218 + mapOffset then plyX = 471 + mapOffset end if plyY>=160 then plyY=72 end end function ghostAnimation() spr(292, plyX+(swing*2)-camera.x, plyY, 0, 1, plyFlip, plyRotate, 2, 2) if pause == false then plyY = plyY - 0.3 end end --variable box screen = 0 function screenChangeMenu() if btnp(4) then screen = 0 end end m1=1 m2=1 function screenMenu() if screen == 0 then initialValues() newFoe() bullet1YVariation() bullet3YVariation() bullet4YVariation() anvilXVariation() cXv() laserXVariation() bombXVariation() dvdXVary() menuAnimation() hatSel() print("Trash",7,118,13) spr(405,7,124,0) print(tr,17,126,15) if wdb==false then spr(playSpr, 103, 74, 0, 2, 0, 0, 2, 1) print("HighScore:",7,6,14) print(hs,64,6,15) print("by Alvario", 204, 1, 13, false, 1, true) print("Cosmetics ->", 164, 124, 13, false, 1, true) difSelect() menuMouse() kaizo() if m1==1 then music(0,-1,true) m1=0 end end mapOffset = mapOffsetRaw*30*8 animation() end end function UIs() sfx(10,"B-3",-1,0,5) end haL=false haR=false hat=0 hat2=0 hat3=0 haLS=446 haRS=446 haL2S=446 haR2S=446 haL3S=446 haR3S=446 HCD=false wdb=false wdpr=false wdS=238 ces=224 uId1=false uId2=false uId3=false bh1=false bh2=false bh3=false bhs1=374 bhs2=374 bhs3=374 function hatSel() wdpr=button(210,233,133,114) wdS=238 ces=224 if wdpr==true then wdS=236 if mouseClick==true then if HCD==false then UIs() HCD=true if wdb==true then wdb=false else wdb=true end end else HCD=false end end spr(wdS,206,112,0,2,0,0,2,2) ico=0 ics=0 ces=224 --menu wear if hat3==-1 then if uId1==true then ces=227 end end if hat2==-1 then if uId3==true then hatfy2(200,2,0,16,plyFlip) ico=-2 else uId3=buyHat(87,"45",bhs3,bh3,45) end end if hat2==2 then hatfy2(242,1,-8,-4,0) hatfy2(242,1,24,-4,1) end if hat2==3 then if plyFlip==1 then fgm=24 else fgm=0 end hatfy2(312,1,-16+(fgm*2),8,plyFlip) end if hat2==4 then hatfy2(216,2,0,16,plyFlip) ico=-1.5 end if hat2==1 then hatfy2(229,3,-8,4,plyFlip) end if hat2==5 then hatfy2(126,2,0,20,plyFlip) end if hat==1 then hatfy2(240,1,8,-12,plyFlip) end if hat==2 then hatfy2(243,1,8,-12,plyFlip) end if hat==3 then hatfy2(241,1,8,-12,plyFlip) end if hat==-1 then if uId2==true then hatfy2(fanSpr,2,0,-10,3) else uId2=buyHat(0,"60",bhs2,bh2,60) end end if hat3==5 then hatfy2(106,2,0,16,plyFlip) end if hat==4 then hatfy2(244,2,0,-12,plyFlip) end if hat==5 then hatfy2(246,2,0,-12,plyFlip) end if hat==6 then hatfy2(226,1,8,-12,0) end if hat==7 then hatfy2(286,2,0,-10,plyFlip) end if hat==8 then hatfy2(ces,2,0,-10,plyFlip) end if hat==9 then hatfy2(219,1,8,-10,plyFlip) hatfy2(220,1,8,-26,plyFlip) hatfy2(221,1,8,-42,plyFlip) end if hat==10 then hatfy2(248,1,8,-12,plyFlip) end if hat==11 then hatfy2(232,2,0,-12,plyFlip) end if hat==12 then hatfy2(322,3,-6,-26,0) hatfy2(338,3,-6,-10,0) end if wdb==true then print("Menu ->", 182, 124, 13, false, 1, true) haLS=446 haRS=446 haL=button(94,103,25,10) haR=button(136,145,25,10) haL2S=446 haR2S=446 haL2=button(182,191,25,10) haR2=button(224,233,25,10) haL3S=446 haR3S=446 haL3=button(6,15,25,10) haR3=button(48,57,25,10) if haL==true then if mouseClick==true then haLS=430 if HCD==false then UIs() hat=hat-1 HCD=true end else HCD=false end end if haR==true then if mouseClick==true then haRS=430 if HCD==false then UIs() hat=hat+1 HCD=true end else HCD=false end end if hat<-1 then hat=12 end if hat>12 then hat=-1 end --hat 2-- if haL2==true then if mouseClick==true then haL2S=430 if HCD==false then UIs() hat2=hat2-1 HCD=true end else HCD=false end end if haR2==true then if mouseClick==true then haR2S=430 if HCD==false then UIs() hat2=hat2+1 HCD=true end else HCD=false end end if hat2<-1 then hat2=5 end if hat2>5 then hat2=-1 end --skin-- if haL3==true then if mouseClick==true then haL3S=430 if HCD==false then UIs() hat3=hat3-1 HCD=true end else HCD=false end end if haR3==true then if mouseClick==true then haR3S=430 if HCD==false then UIs() hat3=hat3+1 HCD=true end else HCD=false end end if hat3<-1 then hat3=6+seg end if hat3>6+seg then hat3=-1 end spr(haLS, 92, 10, 0, 2) spr(haRS, 132, 10, 0, 2, 1) spr(234,112,10,0,1,0,0,2,2) print("Hat", 111, 30, 15) spr(haL2S, 180, 10, 0, 2) spr(haR2S, 220, 10, 0, 2, 1) spr(234,200,10,0,1,0,0,2,2) print("Extra", 194, 30, 15) spr(haL3S, 4, 10, 0, 2) spr(haR3S, 44, 10, 0, 2, 1) print("Face", 21, 30, 15) spr(sk,24,10,pbc,1,0,0,2,2) if hat2==-1 then hatfy3(200,84,17,8,2) end if hat==8 then hatfy3(ces,-4,1,0,1) hatfy3(ces+1,4,1,0,1) end if hat2==2 then hatfy3(242,80,4,0,1) hatfy3(242,96,4,1,1) end if hat2==3 then hatfy3(312,76,10,0,1) end if hat2==4 then hatfy3(216,84,17,8,2) end if hat2==1 then hatfy3(229,80,8,8,3) end if hat2==5 then hatfy3(126,84,16,8,2) end if hat==1 then hatfy3(240,0,0,0,1) end if hat==2 then hatfy3(243,0,0,0,1) end if hat==3 then hatfy3(241,0,0,0,1) end if hat==4 then hatfy3(244,-4,0,0,2) end if hat==5 then hatfy3(246,-4,0,0,2) end if hat==6 then hatfy3(226,0,0,0,1) end if hat==7 then hatfy3(286,-4,1,0,2) end if hat==-1 then hatfy3(fanSpr,-4,0,3,2) end if hat==9 then hatfy3(219,0,1,0,1) hatfy3(220,0,-7,0,1) end if hat==10 then hatfy3(248,0,0,0,1) end if hat==11 then hatfy3(232,-4,0,0,2) end if hat==12 then hatfy3(322,-7,-7,-8,3) hatfy3(338,-7,1,0,3) end pj1=2 pj2=4 if hat3==-1 then if uId1==true then sk=168 pj1=170 pj2=138 else uId1=buyHat(-87,"30",bhs1,bh1,30) spr(168,24,10,0,1,0,0,2,2) sk=0 end end if hat3==0 then sk=0 end if hat3==1 then sk=172 end if hat3==2 then sk=142 end if hat3==3 then sk=140 end if hat3==4 then sk=174 end if hat3==5 then sk=0 hatfy3(106,-92,14,0,2) end end if hat3==6 then sk=108 end pbc=0 if hat3==7 then rn=rnd(256,511) sk=282 pj1=rn pj2=rn pj3=rn pj4=rn pbc=9 end end function buyHat(oX,pr,bhs,bh,pr2) if wdb==true then bh=button(106+oX,135+oX,60,45) if bh==true then bhs=390 if mouseClick==true then if tr>=pr2 then tr=tr-pr2 sfx(4,"E-5",-1,1,5) return true else bhs=376 end end else bhs=374 end print("Locked",103+oX,37,2) spr(bhs,104+oX,45,0,2,0,0,2,1) print(pr,111+oX,64,15) spr(405,124+oX,62,0) end end pp=10 ss=true ico=0 ics=0 fgm=0 wa=0 wu=0 nsX=0 nsY=0 elc=0 function wear() local cv=crouchValue if hat2==-1 then if uId3==false then hat2=0 end end pj1=2 pj2=4 pj3=6 pj4=8 ico=0 ics=0 if plyFlip==1 then fgm=24 else fgm=0 end if uId3==true then if hat2==-1 then hatfy(222,1,0+(fgm/12)+wu,8,plyFlip) hatfy(222,1,6+(fgm/12)-wu,8,plyFlip) ico=-2 ics=-2 onIce=true end end if hat2==2 then hatfy(242,1,-4,-2,0) hatfy(242,1,12,-2,1) end if hat2==3 then if bossOn==false then hatfy(312,1,-8+fgm,4,plyFlip) end end if hat2==4 then hatfy(218,1,0+(fgm/12),8+wa,plyFlip) hatfy(218,1,6+(fgm/12),8-wa,plyFlip) ico=-1.5 end if pMov==true then if plyOnGround==true then wa=jitter*4 wu=swing/2 else wa=1.5 wu=0 end else wa=0 wu=0 end if hat2==5 then hatfy(126,2,0,10-(cv/2),plyFlip) end if hat2==1 then hatfy(229,3,-4,2,plyFlip) end if hat==1 then hatfy(240,1,4,-6,plyFlip) end if hat==2 then hatfy(243,1,4,-6,plyFlip) end if hat==3 then hatfy(241,1,4,-6,plyFlip) end if hat==4 then hatfy(244,2,0,-6,plyFlip) end if hat==5 then hatfy(246,2,0,-6,plyFlip) end if hat==-1 then if uId2==true then hatfy(fanSpr,2,0,-5,3) jd=0.3 if plyOnGround==false then platAn=platAn+3 if pause==false then if btnp(0) or keyp(23) then if pp>0 then jc=jc+pp gc=0 pp=pp-0.4 end end end end else jd=0 end end if hat==6 then hatfy(226,1,4,-6,0) end if hat==7 then hatfy(286,2,0,-5,plyFlip) if pHit==true then sfx(6,"B-2",-1,1,8) end if pBlink==true then spr(explosionSpr,nsX-16+jitter-camera.x,nsY+jitter-16,0,2,0,0,3,3) else nsX=plyX nsY=plyY end end if hat==8 then hatfy(ces,2,0,-5,plyFlip) end if hat==9 then hatfy(219,1,4,-5,plyFlip) hatfy(220,1,4,-13,plyFlip) hatfy(221,1,4,-21,plyFlip) end if hat==10 then hatfy(248,1,4,-6,plyFlip) end if hat==11 then hatfy(232,2,0,-6,plyFlip) end if uId1==true then if hat3==-1 then sk=168 pj1=170 pj2=138 pj3=136 pj4=150 ces=227 if plyOnGround==true then onSlime=true if ss==false then SGC=SGC/2.5 ss=true end end if plyOnGround==false then if btnp(1) or keyp(19) then gc=100 jc=0 ss=false end end end end local cv=crouchValue if hat3==2 then if pBlink==false then hatfy(110,2,0,8,plyFlip) end end if hat3==5 then hatfy(106,2,0,8,plyFlip) end pbc=0 if hat3==7 then sk=282 pbc=9 rn=rnd(256,511) sd=rnd(-20,20)/10 spr(285,plyX+4+(swing*10)-camera.x,plyY+4+(jitter*10),9) if elc<=300 then elc=elc+1 end if elc<=5 then cls(0) sfx(rnd(1,8),rnd(1,60),-1,rnd(0,3),4) end if elc>=300 then if pause==false then spr(329,mouseX-10,mouseY-14,9,1,0,0,1,2) if mouseClick==true then plyX=mouseX+218+(242*mapOffsetRaw) plyY=mouseY-20 elc=0 end end end if plyY>=95 then plyY=-8 cls(0) end pj1=rn pj2=rn pj3=rn pj4=rn plyX=plyX+(rnd(-10,10)/20) end if hat==12 then hatfy(322,3,-3,-13,0) hatfy(338,3,-3,-5,0) jd=0.4 sd=0.3 if plyOnGround==false then if pause==false then plyY=plyY+0.6 end if jc<=0 then if p<=30 then p=30 spark=true end end else plySpr=pj3 crouchValue=3 end else sd=0 jd=0 end end function cgl() spr(rnd(256,511),plyX+rnd(-8,16)-camera.x,plyY+rnd(-8,16),0) end function rnd(r,t) return math.random(r,t) end function hatfy(sp,s,oX,oY,fl) local cv=crouchValue spr(sp,plyX+oX-camera.x,plyY+oY+cv+(ico*2),0,1,fl,0,s,1) end function hatfy2(sp,s,oX,oY,fl) local cv=crouchValue*2 spr(sp,menuAlvX+oX,80+oY+cv+(ico*4),0,2,fl,0,s,1) end function hatfy3(sp,ex2,ex,fl,s) spr(sp,116+ex2,4+ex,0,1,fl,0,s,1) end function button(x1,x2,y1,y2) if mouseX >= x1 then if mouseX <= x2 then if mouseY <= y1 then if mouseY >= y2 then return true else return false end end end end end sli = 478 sliY = 66 difT = "Normal" SE = 3 scM = 2 mHP = 3 function difSelect() j=0 if kaizoOn==false then spr(383, 10, 50, 0) spr(399, 10, 58, 0) spr(415, 10, 66, 0) spr(431, 10, 74, 0) spr(447, 10, 82, 0) sli = 478 if sliY < 82 then difT = "Easy" SE = 2 bId = -0.05 j=10 scM = 1 end if sliY < 73 then difT = "Normal" SE = 3 bId = 0 j=5 scM = 2 mHP = 3 end if sliY < 58 then difT = "Hard" SE = 4 bId = 0.05 j=0 scM = 3 mHP = 2 end if mouseX > 6 then if mouseX < 22 then if mouseY < sliY+8 then if mouseY > sliY then if mouseClick == true then sli = 462 sliY = mouseY-4 end end end end end if sliY < 51 then sliY = 51 end if sliY > 80 then sliY = 80 end spr(sli, 6, sliY, 0, 1, 0, 0, 2, 1) print(difT, 1, 92, 15) end end menuAlvX = 186 boop = 0 BC = 1 alvCD = 0 anger = 0 kc = 15 TS = 256 hs=0 function menuAnimation() local mouseFlw = 0 local flw = true crouchValue=0 if mouseClick == false then BC = 1 end if mouseX > menuAlvX then if mouseX < menuAlvX+32 then if mouseY < 112 then if mouseY > 80 then plySpr = pj1 crouchValue=1 flw = false if mouseClick == true then plySpr = pj2 crouchValue=2 if BC == 1 then if boop < 10 then sfx(11,"B-2",-1,0,5) alvCD = alvCD + 10 if kaizoOn==false then anger = anger + 0.1 boop = boop + 1 end BC = 0 end end end end end end end if alvCD==100 then sfx(12,"B-2",-1,1,12) end if boop >= 10 then flw = false if anger < 9.9 then print("Stop!", menuAlvX+3, 70, 15) plySpr = 488 else print("CLICK ME AGAIN I", menuAlvX-29, 62, 1) print("DARE YOU!", menuAlvX-10, 70, 1) plySpr = 490 end if alvCD > 0 then alvCD = alvCD - 1 end menuAlvX = menuAlvX + (jitter*3) end if mouseX > menuAlvX+16 then if flw == true then mouseFlw = -0.5 plyFlip = 1 end end if mouseX < menuAlvX+16 then if flw == true then mouseFlw = 0.5 plyFlip = 0 end end menuAlvX = menuAlvX - mouseFlw if alvCD <= 0 then boop = 0 end if menuAlvX < 32 then menuAlvX = 32 end spr(plySpr, menuAlvX, 80+(ico*4), pbc, 2, plyFlip, 0, 2, 2) if wdb==false then spr(TS, 86, 40+swing, 0, 2, 0, 0, 4, 2) end line(0, 110, 240, 110, 15) line(0, 111, 240, 111, 15) end kaizoOn = false kt=false function kaizo() local j=(swing/2) if anger >= 10 then kaizoOn = true end if kaizoOn == true then difT = "Kaizo" SE = 5 bId = 0.1 TS = 288 if screen==0 then if wdb==false then spr(456,220,0-j,0,1,0,0,2,2) spr(456,147,0-j,0,1,0,0,2,2) print("Kaizo Mode",165,6-j,kc) end print("No Turning Back",80,124,kc) end HP = 1 vbank(1) scM=5 vt="WHAT THE F#CK??" end end playSpr = 260 function menuMouse() playSpr = 260 if mouseX > 102 then if mouseX < 135 then if mouseY < 89 then if mouseY > 74 then playSpr = 276 if mouseClick == true then offsetSave = 0 screen = 1 sfx(9,"B-3",-1,0,7) music() m2=1 plySpr=sk end end end end end end function strFoes() if dif > 0 then nf = true dif = dif - 1 end end bs=false function screenGame() if screen == 1 then screenView() movement() playerJump() jumpBar() die() loop() gravity() groundCollision() mapObjects() platform() player() moveScreen() drops() wear() if bs==false then bullet1Ai() bullet2Ai() bullet3Ai() bullet4Ai() coin() star() heart() points() coinRespawn() snailAi() anvilAi() laserAi() bombAi() dvdAi() ghostyAi() end boss() poo() anvilWarning() strFoes() gameplay() loading() shop() scoreSystem() kaizo() cutscene() if load==false then if key(18) then rs=rs+1 rect(1,131,1+(rs*3.96),4,2) print("Reseting...",1,125,2) else rs=0 end end if rs>=60 then HP=0 end end end function screenDeath() if screen == 3 then screenView() screenChangeMenu() ghostAnimation() gameplay() platform() if m1==0 then music(2,-1,true) m1=1 end if bs==false then bullet1Ai() bullet2Ai() bullet3Ai() bullet4Ai() coin() star() heart() points() drops() coinRespawn() snailAi() anvilAi() laserAi() bombAi() dvdAi() ghostyAi() end boss() anvilWarning() scoreSystem() kaizo() if kaizoOn==false then if mHP == 3 then spr(281, 111-jitter, 120+jitter, 9, 1) spr(281, 120+jitter, 120-jitter, 9, 1) spr(281, 129-jitter, 120+jitter, 9, 1) end if mHP == 2 then spr(281, 124+jitter, 120-jitter, 9, 1) spr(281, 115-jitter, 120+jitter, 9, 1) end end spr(288, 86, 40, 0, 2, 0, 0, 4, 2) print("Press z to restart", 70, 70) end if swingTimer == 50 then ghostSwing = -0.2 end end offsetSave = 0 swing = 0 SMF = 0.2 SM = 0 function animation() if SMF <= -0.2 then SM = 0.01 end if SMF >= 0.2 then SM = -0.01 end SMF = SMF + SM swing = swing + SMF if pause == false then explAnim = explAnim + 1 if explAnim >= 20 then explAnim = 0 end end if explAnim >= 0 then explosionSpr = 354 jitter = 0.2 kc = 11 end if explAnim >= 10 then explosionSpr = 402 jitter = -0.2 kc = 3 end platAn = platAn + 1 if platAn >= 25 then fanSpr = 454 end if platAn >= 50 then fanSpr = 438 end if platAn >= 75 then fanSpr = 454 end if platAn >= 100 then fanSpr = 470 platAn = 0 end end rs=0 scrnChange = false objMov = 0 function devCommands() if key(9) then if scen==true then cut=cut+10 print("Skipping...",1,130,12) end if load==true then if lId<5 then lTim=lTim+5 print("Skipping...",1,130,12) end end end end function nextLvl() if lvlUp == true then if mapOffsetRaw < 7 then mapOffsetRaw = mapOffsetRaw + 1.5 * movId offsetSave = offsetSave + 360 * movId if lId<6 then plyX = plyX + 360 * movId end objMov = 360 * movId scrnChange = true lvlUp = false end end end function moveScreen() if scrnChange==true then bullet1X = objOS(bullet1X) bullet2X = objOS(bullet2X) bullet3X = objOS(bullet3X) bullet4X = objOS(bullet4X) snailX = objOS(snailX) bombX = objOS(bombX) laserX = objOS(laserX) anvilX = objOS(anvilX) dvdX = objOS(dvdX) ghostyX = objOS(ghostyX) explosion1X = objOS(explosion1X) explosion2X = objOS(explosion2X) coinX = objOS(coinX) heartX = objOS(heartX) starX = objOS(starX) poX = objOS(poX) scrnChange = false end end function objOS(z) z = z + objMov return z end function mouseHandler() mouseX, mouseY, mouseClick = mouse() end function TIC() if scen==false then cls(12) end mouseHandler() animation() screenMenu() screenGame() screenDeath() devCommands() --print(commandOutput, 1, 10, 3) --print(pbc, 1, 30, 6) --print(uId3, 1, 40, 6) end