А33333333333333333333333333333333нЮонооооююююяяясяссясся М М АА ММ ММАММ ММ М А АММАМ АММ АМ АММА А А М МА М МА ААМММАМ М А ААМА АМАМ МяссссясясяясяссясясАМАА А А ММАААМАМААААМАМАМММ АМА А МАА АМ ААА АМ АМ А ММА А АА АМААА ААМАА АМААММ А АМ М АА АМА АМ 3333333ѓ333€33ѓ333833ѓ333333ѓ3338333€333€8833€€33ѓ€33838ѓ333333333333333333333333ѓ833€€3ѓ338833ѓ3333333833ѓ€33€€3ѓ3ѓ3838ѓ3ѓ383833ѓ333€83€€€38338333ѓ33ѓ333€83ѓ3ѓ333333333333333333338333ѓ3333833#$%!"#$% ! !"# !"#$% !"#$#$%#$% !"#$% ! !"#$% !"#$% !"#$% !"#$% !"#$% !"# >076>614р;Ђ;`7p;11966>9;130>09;>09??{А?НМЬЭЭЭЭЭЭЭСЭЭМЭЭЭМбоооооооооооооЮЭЭЭЭЭЭЭЭооооооооооооОооооооооооЮЭЭЭЭЭЭЭНЬННЬЭЭЭЭЭЭЭЭНМЬЭЭЭЭЭЭЭЭЭЭЭМММНММЭММММММНМЬМ НМЬНМЭММБМЭМРБ МооооооооооооооЭЭЭЭЭЭЭнооооооооооооОооооооооооЮЭЭЭЭЭЭЭН НРММЭНМЭЭЭМ НМЬНМЭММЭНМЬМАЬНМАМММАМЬНЭНМЭМ МЬММАБМБбоооооооооооооЮЭЭЭЭЭЭоооооооооооооОооооооооооЮЭЭЭЭЭЭЭНММАЬМЬЬАЬЭЭНМЭМ МЬМЬМАЬ РЬММРНМ МЬ ЬМЬЭМЬМ ЭМР МММБ АоооооооооооооооЭЭЭнооооооооооооооОоооооооооооЭЭЭЭЭЭЭН АА МР ММ ЭЭЭМЬМ ЭМР МР МЬММЬЭМРМЬМ ЬЭМММНМЬНМ МБМММбооооооооооооооооооооооооооооооооомооооооооооЭЭЭЭЭЭЭН НА МР А ЭЭММНМЬНМ МРЭНМЬМРЭНМЬММ ММ ЭЭЬ РЭЭбоооооооообоооооооообоооооооооооомооооооооооЭЭЭЭЭЭЭЭЭР Р НМЭЭ РЭЭР РЭЭР РЭЭЬРМРЭЭНЭЭЭЭЭЭЭЭбоооооообоооооообооооооооооомооооооооооЮЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭРЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭНЬЭЬЭНМЬЬЭНМЬЬЭЭНЭЭЭЭЭЭЭоооооооооооооооооомооооооооооЮЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭоооооооомоооооооооооЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭоооооооомоооооооооооЮЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭоооооооомоооооооооооЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭбооооооомоооооооооооСЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭоЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭбоооооооОоооооооооооЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭооЮЭЭЭЭЭЭЭЭЭЭЭЭЭЭбоооооооОоооооооооооСЭЭЭЭЭЭЭЭЭЭоЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭноооЮЭЭЭЭЭЭЭЭЭЭЭЭоооооооОооооооооооЭЭЭЭЭЭЭЭЭноЮЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭооооЮЭЭЭЭЭЭЭЭЭЭЭЭоооооооОооооооооооЭЭЭЭЭЭЭноооЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭноооооЭЭЭЭЭЭЭЭЭЭЭЭЃбооооооОооооооооообЮЭЭЭЭоооооЮЭЭЭЭЭЭоЮЭЭЭЭЭЭЭЭЭооооооЭЭЭЭЭЭЭЭЭЭЭЭ€Ѓ€бооооооОооооооооообоооооооооооЭЭЭЭЭноооооЭЭЭЭЭнооооооЮЭЭЭЭЭЭЭЭЭЭЭЃ€€€€€€ооооооОоооооооообооооооооооооЭЭЭноооооооЭЭЭноооооооЮЭЭЭЭЭЭЭЭЭЭЌ€€€Ѓ€€боооооОоооооооооооооооооооооооооооооооооооооооооооЋЭЭЭЭЭЭЭЭЭЭЃ€ЃЃЃЃЃ€оооооОооооооооооооооооооооооооооооооооооооооооооЋСЭЭЭЭЭЭЭЭ€€ЃЃбооооомоооооообоооооооооооооооооооооооооооооооооЭЭЭЭЭЭЭЭЃЃЃЃ€ЃЃооооомооооооооооооооооооооооооооооооооооооооСЭЭЭЭЭЭЭЃЃЃЃбоооомооооообоооооооооооооооооооооооооооооооСЭЭЭЭЭЭбооомоооооооооооооооооооооооооооооооооооСЭЭЭЭЭЃ€боомоооо€боооооооооооооооооооооооооооооСЭЭЭЭ€€омооЋ€€€ооооооооооооооооооооооооооооЃ€€€€боооооооооооооооооооооооооооЃ€ЃЃЃЃбоооооооооооооооооооооооооЃ€€БЃооооооооооооооооооооооЃЃЊЃ€ЃооооооооооооооооооЃЃЃЃооооооооооооооооооЃЃЃооооооооооооооооооЃ€€€€БЃоооооооооооооооооо€€Ѓ€€€€Ѓ€€€€Ѓ€€€€Б€иоооооооооооооооооЃ€€€€€€€€БЃбоооооооооооооооооЃ€ЃЃЃЃЃЃЃЃЃЃбоооооооооооооооооЃ€€ЃЃЃЃооооооооооооооооЃЃЃЃ€ЃЃ€ЃЃЃ€ЃЃооооооооооооооооЃЃЃЃЃЃЃЃБЃбоооооооооооооооБооооооооооооооБбоооооооооооооБооооооооооообоооооооооооооооооооообоооооооооБбоооооооБооооББББЃЃ€ЃЊ€€€€ЊЃ€€€€Ѓ€€Ѓ€€€€Ѓ€Ѓ€ЃЃЃЃЃЃ€€ЃЃБЃЃЃ€ЃЃЃБЃЃЃББББЃЃЃ€€Ѓ€€€€Ѓ€€€€Б€€Ѓ€€€€Ѓ€€€€БЃ€€€€Ѓ€ЃЃЃЃБЃ€ЃЃЃЃЃ€€ЃЃ€€ЃЃЃЃЃ€ЃЃЃЃЃ€ЃЃЃЃЃЃЃЃЃББББББЃЃ€ЊЃ€€€Ѓ€И€€€€Ѓ€€€€ИЃ€€Ѓ€ЃЃЃБЃЃ€Ѓ€€БЃЃЃЃЃЃБ€ЃЃЃЃБЃЃЃ!Ѓ€Ѓ€Ѓ€€€€1!€€Ѓ€€€Ѓ8€€€ЃЃЃЃA!БЃ€ЃЃЃ€€ЃБAЃБ€€ЃЃЃ€ЃБЃЃЃЃЃЃЃ1!A11ББDЃЃнЮоннЮоннЮоннЮоннЮоннЮоннЮоннЮоннЮоннЮоннЮоннЮоннЮоннЮоннЮоннЮоннЮоннЮоннЮоннЮоннЮоннЮоннЮоннЮоннЮоннЮоннЮоннЮоннЮоннЮонооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооооююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююююяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясяссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссяссяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяясясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссясссяссясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясяяяяяяяяяяяяяМяПяяМяМПяяяяяяМяяяяяссссссссссссссссссссссссссссссссссссссссссссссссссБМьМрБ сссММсрМьБММБМьссБМьсМьсММсМьБМьБьБсМьсММАБМьБсссссссссссссссА МП ММПММА АП АП МПМА МП АП ПА МПМАМ Пясясясясясясясясясясясясясясясясясясясясясясясясяс Б МрБ сясМрМАММрМрП ПряБ сАМрАМПМА срМьАМАрМАрМ сПрясясясясясясясяяяяяяяяяяяяяяяяяяяяяяяяПМ ПМяМяяМяММрПМП ПяП яМПМ МьП яПМьММрПМьяяяяяяяясясссясссясссясссясссясссясссясссясссясссясссясссясярссрсрМ рсрсрссясяссяссрясряясссясссясссяссясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясясяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссссМПММПППМППППМПМясясясясясясясясясясясясясясясясясясясясПМяМПсПМьА яМрсяМьсММрПМьММьМсьБМ рМьяМ сМ яМ сМ ПБАсМьПььсММяМрясПМьБМсМБясяяяяяяяяяяяяяяяяяяяяМАьММьА МП ряП АПМАьМ П Мр А МП АП П П П ПАМАМПММПМАМрМ МьММьясясссясссясссясссясссясссясссясссясссяссМь Б МА сМссБ БАрМА МьБ яМр Б МА БАММБММБММПММБрАММААААрМА МрБьМ сМр сПМ ПМ ММММММА МММПМПМ ММ    ММАААММА ПМП ПМПМ ясясясясясясясясясясясясясясясясясясясясяряррсясррсярсряссяяссяясМ рррррярясрс¦--- title: Lingthing Dodge -- author: OdiStudio Games, OdiStudio4444@gmail.com -- desc: DODGE LIGHTNING!!! -- site: website link -- license: MIT License (change this to your license of choice) -- version: 0.1 -- script: lua t=0 x=90 y=24 rnd=math.random -- crash bolt c=1 pp={} function addPp(x,y,c) local p={} p.x=x p.y=y p.t=0 p.dx=math.random(-4,4)/30 p.dy=math.random(-4,4)/30 p.c=c table.insert(pp,p) end function ticPp() for k,p in pairs(pp) do p.x=p.x+p.dx p.y=p.y+p.dy p.t=p.t+1 pix(p.x,p.y,p.c) if p.t>100 then table.remove(pp,k) end end end -- bolt bolt={} function addBolt(x,y,dir) local b={} -- b.x=x b.y=y b.x1=b.x+math.random(-15,15) b.xx=0 b.y1=b.y+30 b.x2=0 b.y2=b.y1+30 b.x3=0 b.y3=b.y2+30 b.x4=0 b.y4=b.y3+30 b.x5=0 b.y5=b.y4+30 -- b.dir=dir b.dx=0 b.dy=0 b.t=0 b.tt=0 table.insert(bolt,b) end function ticBolt() ticPp() for k,b in pairs(bolt) do -- move bolt sfx(0,"E-4",2,2,6) if b.x<=b.x1 then b.x2=b.x+math.random(-5,5) b.x3=b.x+math.random(-5,5) b.x4=b.x+math.random(-5,5) b.x5=b.x+math.random(-5,5) elseif b.x>b.x1 then b.x2=b.x+math.random(-5,5) b.x3=b.x+math.random(-5,5) b.x4=b.x+math.random(-5,5) b.x5=b.x+math.random(-5,5) end -- graphics if b.t<=60 and b.dir==4 then line(b.x,b.y,b.x1,b.y1,12) line(b.x1,b.y1,b.x2,b.y2,12) line(b.x2,b.y2,b.x3,b.y3,12) line(b.x3,b.y3,b.x4,b.y4,12) line(b.x4,b.y4,b.x5,b.y5,12) elseif b.dir==1 or b.dir==2 or b.dir==3 then line(b.x,b.y,b.x1,b.y1,12) line(b.x1,b.y1,b.x2,b.y2,12) line(b.x2,b.y2,b.x3,b.y3,12) line(b.x3,b.y3,b.x4,b.y4,12) line(b.x4,b.y4,b.x5,b.y5,12) end if b.t>60 and b.dir==4 then for x1=240,-10,-15 do spr(2+b.t*20/40%3,x1,97,0,1,0,0,2,2) end end b.xx=b.x1 -- crash bolt if b.tt>=2 then b.tt=0 addPp(b.x,107,12) addPp(b.x,107,2) addPp(b.x,107,3) addPp(b.x,107,4) end b.tt=b.tt+1 -- beahvior bolt if b.dir==0 then b.dir=1 end if b.dir==1 then b.dx=0.5 end if b.dir==2 then b.dx=-0.5 end if b.dir==3 then b.dx=0 end if b.dir==4 then b.dx=0 spr(2+b.t*20/40%3,b.x-7,94,0,1,0,0,2,2) end b.x=b.x+b.dx b.x1=b.x+b.dx -- remove bolt b.t=b.t+1 if b.t>=60 then if b.dir==1 or b.dir==2 or b.dir==3 then table.remove(bolt,k) end end if b.t>=70 and b.dir==4 then table.remove(bolt,k) end end end -- spawn bolt sb={} function addSb(x,y,find) local s={} s.x=x s.y=y s.dx=0 s.dy=0 s.rd=math.random(4) s.c=0 s.t=0 s.find=find table.insert(sb,s) end function ticSb() for k,s in pairs(sb) do if s.find==1 then s.x=s.x elseif s.find==2 then for k,p in pairs(player) do if p.x-8<=s.x then s.x=s.x-0.8 elseif p.x>s.x then s.x=s.x+0.8 end end elseif s.find==3 then for k,p in pairs(player) do if p.x-8<=s.x then s.x=s.x-1.5 elseif p.x>s.x then s.x=s.x+1.5 end end elseif s.find==4 then for k,p in pairs(player) do s.x=p.x-4 end end spr(2+s.t*20/40%3,s.x,s.y,0,1,0,0,2,2) spr(2+s.t*20/40%3,s.x-10,s.y,0,1,0,0,2,2) spr(2+s.t*20/40%3,s.x+10,s.y,0,1,0,0,2,2) s.t=s.t+1 -- if s.rd==0 then s.rd=1 end if score.sc<=40 then if s.rd==4 then s.rd=math.random(3) end end -- if s.t>=60 then table.remove(sb,k) addBolt(s.x+15,-31,s.rd) end end ticBolt() end -- dash particles dp={} function addDp(x,y,c) local d={} d.x=x d.y=y d.t=0 d.dx=math.random(-40,40)/30 d.dy=math.random(-40,40)/30 d.c=c table.insert(dp,d) end function ticDp() for k,d in pairs(dp) do d.x=d.x+d.dx d.y=d.y+d.dy d.t=d.t+1 pix(d.x,d.y,d.c) if d.t>10 then table.remove(dp,k) end end end -- dash particles 2 dpp={} function addDpp(x,y,c) local dp={} dp.x=x dp.y=y dp.t=0 dp.dx=math.random(-4,4)/30 dp.dy=0 dp.wh=8 dp.c=c table.insert(dpp,dp) end function ticDpp() for k,dp in pairs(dpp) do dp.x=dp.x+dp.dx dp.y=dp.y+dp.dy dp.t=dp.t+1 rectb(dp.x,dp.y,dp.wh,dp.wh,dp.c) if dp.t>10 then table.remove(dpp,k) end end end -- spawn spawn={} function addSpawn(x,y,c) local s={} s.x=x s.y=y s.c=c s.rx=s.x+math.random(-50,50) s.ry=s.y+math.random(-50,50) s.dxy=math.random(20,30)/15 s.t=0 table.insert(spawn,s) end function ticSpawn() for k,s in pairs(spawn) do pix(s.rx,s.ry,s.c) circ(s.x-1,s.y,2,s.c) -- beahvior if s.rx>s.x then s.rx=s.rx-s.dxy elseif s.rxs.y then s.ry=s.ry-s.dxy elseif s.ry=s.x-2 and s.rx<=s.x+2 and s.ry>=s.x-15 and s.ry<=s.x-13 then table.remove(spawn,k) end end end -- -- player player={} function addPlayer(x,y) local pl={} pl.x=x pl.y=y pl.color=11 pl.dl=0 pl.dr=0 pl.wh=8 pl.g=0.81 pl.tt=0 pl.ti=0 table.insert(player,pl) end function ticPlayer() for k,pl in pairs(player) do -- variables pl.x=pl.x pl.y=pl.y+pl.g -- graphics rect(pl.x,pl.y,pl.wh,pl.wh,pl.color) -- limit move if pl.x<0 then pl.x=0 elseif pl.x>232 then pl.x=232 end -- Gravity if pl.y<96 then pl.g=pl.g+0.50 elseif pl.y>=96 then pl.g=0 pl.y=96 end -- control jump and move -- move pl.tt=pl.tt+1 pl.ti=pl.ti+1 if btn(2) then pl.x=pl.x-2 -- effect move if pl.y==96 and pl.tt>=3 then pl.tt=0 addPp(pl.x,104,12) addPp(pl.x,104,12) end end if btn(3) then pl.x=pl.x+2 -- effect move if pl.y==96 and pl.tt>=3 then pl.tt=0 addPp(pl.x,104,12) addPp(pl.x,104,12) end end -- jump if btnp(4) or keyp(48) then if pl.g==0 then pl.g=pl.g-6 end end -- config dash -- left if btn(2) and pl.dl==0 then pl.dl=1 pl.dr=0 -- right elseif btn(3) and pl.dr==0 then pl.dr=1 pl.dl=0 end -- dash -- left if btnp(5) and pl.dl==1 then pl.x=pl.x-40 for i=1,1 do for x=0,40,1 do addDp(pl.x+x,pl.y+2,11) end for xx=0,40,10 do addDpp(pl.x+xx,pl.y,11) end end end -- right if btnp(5) and pl.dr==1 then pl.x=pl.x+40 for i=1,1 do for x=-40,10,1 do addDp(pl.x+x,pl.y+2,11) end for xx=-40,0,10 do addDpp(pl.x+xx,pl.y,11) end end end -- remove player for s,b in pairs(bolt) do if b.x<=pl.x+10 and b.x>=pl.x-5 then for k,p in pairs(player) do spr(2+pl.ti*20/40%3,p.x-4,p.y-2,0,1,0,0,2,2) end table.remove(player,k) for i=1,100 do addDp(pl.x+5,pl.y+5,11) p=0 die=0 zero=Die end end if pl.y<=98 and pl.y>=90 and b.dir==4 and b.t>=60 then for k,p in pairs(player) do spr(2+pl.ti*20/40%3,p.x-4,p.y-2,0,1,0,0,2,2) end table.remove(player,k) for i=1,100 do addDp(pl.x+5,pl.y+5,11) p=0 die=0 zero=Die end end end end ticDp() ticDpp() end -- cloud cloud={} cloud1={} function addCloud(x,y) local c={} c.x=x c.y=y c.dx=rnd(30.0)/60.0 c.dy=rnd(-2.0,2.0)/180.0 c.r=rnd(4,20) c.fm=rnd(5) c.co=13 table.insert(cloud,c) end function ticCloud() for k,c in pairs(cloud) do c.x=c.x-c.dx c.y=c.y+c.dy if c.fm==1 then circ(c.x-c.r,c.y,c.r,c.co) circ(c.x+c.r,c.y,c.r,c.co) circ(c.x,c.y-c.r,c.r,c.co) elseif c.fm==2 then circ(c.x-c.r,c.y-c.r,c.r,c.co) circ(c.x-c.r,c.y,c.r,c.co) circ(c.x+c.r,c.y,c.r,c.co) circ(c.x,c.y-c.r,c.r,c.co) circ(c.x,c.y,c.r,c.co) elseif c.fm==3 then circ(c.x-c.r,c.y,c.r,c.co) circ(c.x+c.r,c.y,c.r,c.co) circ(c.x,c.y-c.r,c.r,c.co) circ(c.x,c.y+c.r,c.r,c.co) elseif c.fm==4 then circ(c.x,c.y,c.r,c.co) elseif c.fm==5 then circ(c.x,c.y,c.r,c.co) circ(c.x-c.r,c.y,c.r,c.co) circ(c.x,c.y-c.r,c.r,c.co) circ(c.x+c.r,c.y,c.r,c.co) circ(c.x+c.r*2,c.y,c.r,c.co) circ(c.x+c.r*2,c.y+c.r,c.r,c.co) circ(c.x+c.r*2,c.y-c.r,c.r,c.co) end if c.x<=-200 then table.remove(cloud,k) end end end -- cloud 1 function addCloud1(x,y) local c1={} c1.x=x c1.y=y c1.dx=rnd(30.0)/80.0 c1.dy=rnd(-2.0,2.0)/180.0 c1.r=rnd(4,20) c1.fm=rnd(5) c1.co=14 table.insert(cloud1,c1) end function ticCloud1() for k,c1 in pairs(cloud1) do c1.x=c1.x-c1.dx c1.y=c1.y+c1.dy if c1.fm==1 then circ(c1.x-c1.r,c1.y,c1.r,c1.co) circ(c1.x+c1.r,c1.y,c1.r,c1.co) circ(c1.x,c1.y-c1.r,c1.r,c1.co) elseif c1.fm==2 then circ(c1.x-c1.r,c1.y-c1.r,c1.r,c1.co) circ(c1.x-c1.r,c1.y,c1.r,c1.co) circ(c1.x+c1.r,c1.y,c1.r,c1.co) circ(c1.x,c1.y-c1.r,c1.r,c1.co) circ(c1.x,c1.y,c1.r,c1.co) elseif c1.fm==3 then circ(c1.x-c1.r,c1.y,c1.r,c1.co) circ(c1.x+c1.r,c1.y,c1.r,c1.co) circ(c1.x,c1.y-c1.r,c1.r,c1.co) circ(c1.x,c1.y+c1.r,c1.r,c1.co) elseif c1.fm==4 then circ(c1.x,c1.y,c1.r,c1.co) elseif c1.fm==5 then circ(c1.x,c1.y,c1.r,c1.co) circ(c1.x-c1.r,c1.y,c1.r,c1.co) circ(c1.x,c1.y-c1.r,c1.r,c1.co) circ(c1.x+c1.r,c1.y,c1.r,c1.co) circ(c1.x+c1.r*2,c1.y,c1.r,c1.co) circ(c1.x+c1.r*2,c1.y+c1.r,c1.r,c1.co) circ(c1.x+c1.r*2,c1.y-c1.r,c1.r,c1.co) end if c1.x<=-200 then table.remove(cloud1,k) end end end -- draw cloud tc=0 bec=0 function drawCloud() tc=tc+1 mc=math.random(-10,10) -- ticCloud1() ticCloud() -- if bec==0 then bec=1 for i=280,-40,-40 do addCloud(i,mc) addCloud1(i,mc) end end -- if tc>=20 then addCloud(280,mc) addCloud1(280,mc) tc=0 end end -- end cloud -- sp=0 bx=0 by=0 -- draw scene play function drawBo() -- graphism map(30,0,30,17,0,0,3) drawCloud() Bo() map(0,0,30,17,0,0,3) end --add lingthing tsp=0 tspp=1 rr=0 dsp=80 ssb=0 function Bo() -- addBolt sp=sp+1 bx=math.random(5,230) by=-9 -- if tspp==0 then tsp=tsp+1 end if tsp>=300 then tsp=0 tspp=1 end -- speed spawn bolt if score.sc==score.sc+1 then ssb=ssb+1 end if ssb>=10 then ssb=0 dsp=dsp-1 end -- behavior spawn sb if score.sc<60 then rr=math.random(3) else rr=math.random(4) end -- if sp>=dsp and tspp==1 then sp=0 addSb(bx,by,rr) sfx(0,"E-4") end ticSb() end -- score score={ t=0, sc=0, high=180 } function Score() score.t=score.t+1 -- behavior if score.t>=40 and #player>=1 then score.sc=score.sc+1 score.t=0 end if score.sc>=score.high then score.high=score.sc end -- graphism print("Score: "..score.sc,1,1,0) print("Score: "..score.sc,0,0,12) print("Hing Score: "..score.high,156,1,0) print("Hing Score: "..score.high,155,0,12) end -- spawn player p=0 delay=200 dt=0 die=100 function Player() -- die variable if die<100 then die=die+1 else die=100 end -- touch to begein play if p==0 and #player<=0 and die==100 then dt=dt+1 if dt>=0 and dt<=35 then print("presse to play!",140,98,12) end print("email: odistudio4444@gmail.com",81,131,0) print("email: odistudio4444@gmail.com",80,130,12) print("all rigth reserved(c)",101,121,0) print("all rigth reserved(c)",100,120,12) end if dt>=60 then dt=0 end -- add particles if p==0 and #player<=0 and btnp(5) and delay>=200 and die==100 then p=1 delay=0 tspp=0 score.sc=0 ssb=0 dsp=80 end if p==1 and delay>=150 and delay<=152 and tspp==0 then for i=1,200 do addSpawn(115,100,11) end end -- add player if #sb<=0 and p==1 and delay>=200 and die==100 then addPlayer(111,98) p=0 end -- ticPlayer() ticSpawn() -- if delay<=200 then delay=delay+1 end end -- play scene function zero() zero=play end function play() cls(1) drawBo() Player() Score() end dd=0 function Die() if dd>=30 then dd=0 zero=play end dd=dd+1 end -- tic function function TIC() zero() end