title
stringlengths
5
100
content
stringlengths
10
791k
instructions
stringlengths
0
8.7k
Platformer
@Stage\n\n@Sprite2\n\nwhen flag clicked\nforever\n if <(Level) = [14]> then\n if <touching color (#ff00bf)?> then\n switch costume to (costume2 v)\n wait (5) seconds\n switch costume to (costume3 v)\n end\n end\nend\n\nwhen flag clicked\nforever\n if <touching color (#00cccc)?> then\n if <key (up arrow v) pressed?> then\n set [yv v] to [5]\n else\n set [yv v] to [-1]\n end\n end\nend\n\nwhen flag clicked\nforever\n if <touching color (#ff0000)?> then\n go to x: (-215) y: (-127)\n change [deaths v] by (1)\n end\nend\n\nwhen flag clicked\nhide\nswitch costume to (costume3 v)\nswitch backdrop to (untitled v)\nset [level v] to [0]\nset [deaths v] to [0]\nforever\n if <touching color (#ffff00)?> then\n next backdrop\n go to x: (-215) y: (-127)\n change [level v] by (1)\n end\nend\n\nwhen I receive [play v]\ngo to x: (-215) y: (-127)\n\nwhen flag clicked\nforever\n if <touching color (#ff9400)?> then\n next backdrop\n wait (0.1) seconds\n next backdrop\n wait (0.1) seconds\n next backdrop\n end\nend\n\nwhen flag clicked\nforever\n if <(Deaths) = [20]> then\n hide\n switch backdrop to (backdrop19 v)\n wait (1) seconds\n switch backdrop to (backdrop21 v)\n wait (1) seconds\n switch backdrop to (backdrop20 v)\n wait (1) seconds\n switch backdrop to (backdrop23 v)\n wait (1) seconds\n switch backdrop to (backdrop22 v)\n wait (1) seconds\n hide\n stop [all v]\n end\nend\n\nwhen flag clicked\ngo to x: (-285) y: (-157)\nforever\n if <key (right arrow v) pressed?> then\n change [xv v] by (1)\n end\n if <key (left arrow v) pressed?> then\n change [xv v] by (-1)\n end\n set [xv v] to ((Xv) * (0.9))\n change x by (Xv)\n if <touching color (#000000)?> then\n change y by (1)\n if <touching color (#000000)?> then\n change y by (1)\n if <touching color (#000000)?> then\n change y by (1)\n if <touching color (#000000)?> then\n change y by (1)\n if <touching color (#000000)?> then\n change y by (1)\n if <touching color (#000000)?> then\n change x by ((Xv) * (-1))\n change y by (-5)\n if <key (up arrow v) pressed?> then\n if <(Xv) > [0]> then\n set [xv v] to [-5]\n else\n set [xv v] to [5]\n end\n set [yv v] to [10]\n else\n set [xv v] to [0]\n end\n end\n end\n end\n end\n end\n end\n change [yv v] by (-1)\n change y by (Yv)\n if <touching color (#000000)?> then\n change y by ((Yv) * (-1))\n set [yv v] to [0]\n end\n change y by (-1)\n if <touching color (#000000)?> then\n if <key (up arrow v) pressed?> then\n set [yv v] to [15]\n end\n end\n change y by (1)\nend\n\nwhen flag clicked\nforever\n if <key (r v) pressed?> then\n wait (1) seconds\n go to x: (-215) y: (-127)\n end\nend\n\nwhen flag clicked\nforever\n if <touching color (#e0e026)?> then\n say [Faked!] for (5) seconds\n end\nend\n\nwhen flag clicked\nforever\n if <(username) = [raystar123]> then\n if <key (space v) pressed?> then\n wait (0.5) seconds\n next backdrop\n change [level v] by (1)\n end\n end\nend\n\nwhen I receive [play v]\nshow\n\nwhen flag clicked\nforever\n if <(Level) = [23]> then\n hide\n wait (5) seconds\n stop [all v]\n end\nend\n\nswitch backdrop to (backdrop30 v)\n\nwhen flag clicked\nforever\n if <touching color (#0aff0a)?> then\n set [yv v] to [20]\n end\nend\n\nwhen flag clicked\nforever\n if <(Level) = [18]> then\n if <touching color (#ff00bf)?> then\n switch costume to (costume2 v)\n wait (5) seconds\n switch costume to (costume3 v)\n end\n end\nend\n\n@Sprite1\n\nwhen flag clicked\nshow\nforever\n go to x: (-19) y: (-75)\n if <<touching (mouse-pointer v)?> and <mouse down?>> then\n broadcast (play v)\n end\nend\n\nwhen I receive [play v]\nhide\nswitch backdrop to (backdrop1 v)\nstop [other scripts in sprite v]\n\n@Sprite3\n\nwhen flag clicked\nforever\n go to x: (40) y: (0)\nend\n\nwhen flag clicked\nforever\n if <(Level) = [11]> then\n repeat (10)\n wait (1) seconds\n switch costume to (costume2 v)\n wait (1) seconds\n switch costume to (costume1 v)\n end\n end\nend\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\n\nwhen flag clicked\nforever\n if <(Level) = [11]> then\n show\n else\n hide\n end\nend\n\n@Sprite4\n\nwhen flag clicked\nforever\n if <(Level) = [11]> then\n repeat (10)\n wait (1) seconds\n switch costume to (costume1 v)\n wait (1) seconds\n switch costume to (costume2 v)\n end\n end\nend\n\nwhen flag clicked\nhide\nswitch costume to (costume2 v)\n\nwhen flag clicked\nforever\n go to x: (150) y: (0)\nend\n\nwhen flag clicked\nforever\n if <(Level) = [11]> then\n show\n else\n hide\n end\nend\n\n@Sprite5\n\nwhen flag clicked\nforever\n go to x: (250) y: (0)\nend\n\nwhen flag clicked\nforever\n if <(Level) = [11]> then\n repeat (10)\n wait (1) seconds\n switch costume to (costume2 v)\n wait (1) seconds\n switch costume to (costume1 v)\n end\n end\nend\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\n\nwhen flag clicked\nforever\n if <(Level) = [11]> then\n show\n else\n hide\n end\nend\n\n
This is the Platformer\nUse the arrow keys to move\nPress 'r' to reset\nIn this game there are platforms that you need to overcome and reach your goal, but be warned there are dangers among you and water levels so use them to your advantage,\nThe gems you gain will give you 5 seconds of smallness so you can fit through tight spots.\n\n
Platform
@Stage\n\nwhen flag clicked\nshow list [alphabet v]\nhide variable [☁ usernameoflowscore v]\nset volume to (75) %\nhide variable [time v]\nhide variable [deaths v]\nstart sound [Crypt of the Necrodancer OST - Crypteque \(1-2\).mp3 v]\nforever\n if <<key (m v) pressed?> and <(volume) = [0]>> then\n set volume to (75) %\n wait (0.5) seconds\n end\n if <key (m v) pressed?> then\n set volume to (0) %\n wait (0.5) seconds\n end\nend\n\nwhen I receive [switch v]\nnext backdrop\nwait (0.1) seconds\n\nwhen I receive [end v]\nset [score v] to ((Time) + ((Deaths) * (7)))\nif <(☁ LowestScore) > (Score)> then\n set [☁ lowestscore v] to (Score)\n block name [] (username)\n set [☁ usernameoflowscore v] to (ltn)\nend\nshow variable [deaths v]\nshow variable [time v]\nshow variable [score v]\nshow variable [☁ lowestscore v]\nshow variable [ntl v]\nntl (☁ usernameoflowscore)\n\ndefine block name (variable) (text)\nset [counter v] to [0]\nset [ltn v] to []\nrepeat (30)\n if <<[alphabet v] contains (letter (counter) of (text))?> and <(item # of (letter (counter) of (text)) in [alphabet v]) > [9]>> then\n set [ltn v] to (join (ltn) (item # of (letter (counter) of (text)) in [alphabet v]))\n end\n if <<[alphabet v] contains (letter (counter) of (text))?> and <(item # of (letter (counter) of (text)) in [alphabet v]) < [11]>> then\n set [ltn v] to (join (join (ltn) [0]) (item # of (letter (counter) of (text)) in [alphabet v]))\n end\n change [counter v] by (1)\nend\n\ndefine ntl (numbers/ variables)\nset [counter v] to [1]\nset [ntl v] to []\nrepeat (30)\n set [finder v] to (join (letter (counter) of (numbers/ variables)) (letter ((counter) + (1)) of (numbers/ variables)))\n set [ntl v] to (join (ntl) (item (finder) of [alphabet v]))\n change [counter v] by (2)\nend\n\n@Title\n\nwhen backdrop switches to [back1 v]\nhide\n\nwhen flag clicked\nhide variable [☁ lowestscore v]\nhide variable [ntl v]\nhide variable [score v]\nswitch backdrop to (back0 v)\nshow\npoint in direction (90)\nset [movement v] to [0]\nset size to (100) %\ngo to x: (-5) y: (800)\nrepeat (7)\n change y by (-16)\nend\nrepeat (5)\n change y by (2)\nend\nforever\n turn right ([cos v] of (Movement) ) degrees\n change [movement v] by (9.5)\nend\n\nset size to (100) %\n\n@Playbutton\n\nwhen flag clicked\ngo to x: (0) y: (-800)\nrepeat (9)\n change y by (20)\nend\ngo to x: (0) y: (-35)\n\nwhen flag clicked\nshow\nforever\n if <touching (mouse-pointer v)?> then\n switch costume to (century gothic3 v)\n else\n switch costume to (century gothic v)\n end\nend\n\nwhen backdrop switches to [back1 v]\nhide\n\nwhen this sprite clicked\nbroadcast (start v)\nswitch backdrop to (back1 v)\n\n@Sprite1\n\nwhen flag clicked\nset size to (80) %\nset [deaths v] to [-2]\nset [time v] to [0]\nswitch backdrop to (1 v)\nhide\ngo to x: (-180) y: (-40)\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n change [xv v] by (-1)\n end\n if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n change [xv v] by (1)\n end\n set [xv v] to ((xv) * (0.85))\n change x by (xv)\n if <touching color (#666666)?> then\n change y by (-2)\n if <touching color (#666666)?> then\n change y by (1)\n if <touching color (#666666)?> then\n change y by (1)\n if <touching color (#666666)?> then\n change y by (1)\n if <touching color (#666666)?> then\n change y by (1)\n if <touching color (#666666)?> then\n change y by (1)\n if <touching color (#666666)?> then\n change y by (-5)\n change x by ((-1) * (xv))\n if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <not <(xv) = [0]>>> then\n set [mode v] to [walljump]\n set [yv v] to [8]\n set [xv v] to (((xv) / ([abs v] of (xv) )) * (-10))\n else\n set [mode v] to [wallslide]\n set [xv v] to [0]\n end\n end\n end\n end\n end\n end\n end\n change y by (2)\n end\n change y by (-3)\n if <touching color (#666666)?> then\n if <(yv) = [-3]> then\n if <<key (a v) pressed?> or <<key (d v) pressed?> or <<key (left arrow v) pressed?> or <key (right arrow v) pressed?>>>> then\n set [mode v] to [run]\n else\n if <([abs v] of (xv) ) > [.1]> then\n set [mode v] to [skid]\n else\n set [mode v] to [stand]\n end\n end\n end\n if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n set [mode v] to [jump]\n set [yv v] to [9]\n end\n end\n if <<<<(mode) = [jump]> or <(mode) = [walljump]>> and <(yv) < [0]>> or <<<(mode) = [run]> or <(mode) = [skid]>> and <(yv) < [-3]>>> then\n set [mode v] to [fall]\n end\n change y by (3)\n if <(yv) > [-15]> then\n change [yv v] by (-0.5)\n end\n change y by (-2)\n if <not <touching color (#666666)?>> then\n change y by (-1)\n if <not <touching color (#666666)?>> then\n change y by (-1)\n if <not <touching color (#666666)?>> then\n change y by (-1)\n if <not <touching color (#666666)?>> then\n change y by (-1)\n if <not <touching color (#666666)?>> then\n change y by (-1)\n if <not <touching color (#666666)?>> then\n change y by (5)\n end\n end\n end\n end\n end\n end\n change y by (2)\n change y by (yv)\n if <touching color (#666666)?> then\n change y by (-2)\n if <touching color (#666666)?> then\n change y by ((-1) * (yv))\n set [yv v] to [-3]\n end\n change y by (2)\n end\n if <touching color (#ff9400)?> then\n set [yv v] to [15]\n end\nend\n\nwhen flag clicked\nforever\n if <touching color (#ff6102)?> then\n change [deaths v] by (1)\n go to x: (-197) y: (-72)\n if <(backdrop [name v]) = [back4]> then\n go to x: (-212) y: (60)\n end\n if <(backdrop [name v]) = [back8]> then\n go to x: (-200) y: (32)\n end\n if <<<(backdrop [name v]) = [back5]> or <(backdrop [name v]) = [back6]>> or <(backdrop [name v]) = [back7]>> then\n go to x: (-212) y: (100)\n end\n end\nend\n\nwhen I receive [start v]\nswitch backdrop to (2 v)\nshow\ngo to x: (-197) y: (-72)\nforever\n repeat until <(backdrop [name v]) = [final]>\n change [time v] by (1)\n wait (1) seconds\n end\nend\n\nwhen flag clicked\nforever\n if <touching color (#00ff55)?> then\n broadcast (switch v)\n go to x: (-197) y: (-72)\n wait (0.1) seconds\n if <(backdrop [name v]) = [back4]> then\n go to x: (-212) y: (60)\n end\n if <(backdrop [name v]) = [back8]> then\n go to x: (-200) y: (32)\n end\n if <<<(backdrop [name v]) = [back5]> or <(backdrop [name v]) = [back6]>> or <(backdrop [name v]) = [back7]>> then\n go to x: (-212) y: (100)\n end\n end\nend\n\nshow\nset size to (500) %\n\nwhen backdrop switches to [final v]\nhide\nbroadcast (end v)\n\n@Sprite2\n\nwhen flag clicked\nset size to (100) %\ngo to x: (189) y: (-48)\nhide\nforever\n glide (3) secs to x: (-50) y: (-60)\n glide (3) secs to x: (200) y: (-60)\nend\n\nwhen flag clicked\nforever\n if <(backdrop [name v]) = [back2]> then\n show\n else\n hide\n end\nend\n\nshow\nset size to (300) %\n\n@Sprite3\n\nwhen flag clicked\nforever\n if <(backdrop [name v]) = [back2]> then\n show\n else\n hide\n end\nend\n\nwhen flag clicked\ngo to x: (189) y: (41)\nhide\nforever\n glide (2) secs to x: (-15) y: (10)\n glide (2) secs to x: (189) y: (10)\nend\n\n@costume1\n\nwhen flag clicked\ngo to x: (55) y: (20)\npoint in direction (180)\nforever\n if <(backdrop [name v]) = [back6]> then\n show\n repeat (20)\n change y by (1.2)\n end\n repeat (20)\n change y by (-1.2)\n end\n else\n hide\n end\nend\n\n@costume2\n\nwhen flag clicked\ngo to x: (-95) y: (20)\npoint in direction (180)\nforever\n if <(backdrop [name v]) = [back6]> then\n show\n repeat (20)\n change y by (1.2)\n end\n repeat (20)\n change y by (-1.2)\n end\n else\n hide\n end\nend\n\n
Arrow Keys or WASD to move.\n\nComment your score =D\n\nThanks @purplemoondust for curating this! \n+ What the community is loving! Thanks!\n+ What the community is remixing! \n\n\n
Light - A Platformer
@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nset [deaths v] to [0]\nhide variable [deaths v]\nwait (1) seconds\nwait until <(Level) = [7]>\nswitch backdrop to (backdrop2 v)\nshow variable [deaths v]\nstop [all v]\n\nwhen flag clicked\nforever\n play sound [Assassin's Creed Rogue OST - Animus Black \(Track 02\).mp3 v] until done\nend\n\n@Player\n\nwhen flag clicked\n\nwhen flag clicked\nset rotation style [left-right v]\nforever\n if <(Attack) = [0]> then\n if <key (left arrow v) pressed?> then\n point in direction (-90)\n next costume\n wait (0.06) seconds\n end\n if <key (right arrow v) pressed?> then\n point in direction (90)\n next costume\n wait (0.06) seconds\n end\n end\n if <not <key (left arrow v) pressed?>> then\n switch costume to (costume1 v)\n end\n if <not <key (right arrow v) pressed?>> then\n switch costume to (costume1 v)\n end\nend\n\nwhen flag clicked\nInit\nshow\nforever\n if <(Pause?) = [0]> then\n set [speed x v] to ((0.7) * (speed x))\n if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <(change y) < [4]>> then\n change [change y v] by (-1)\n else\n change [change y v] by (-2)\n end\n if <(Wall jump) > [0]> then\n change [wall jump v] by (-1)\n else\n if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n change [speed x v] by (-2)\n end\n if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n change [speed x v] by (2)\n end\n end\n if <(speed x) < [-0.5]> then\n Walk (-90) (speed x)\n else\n if <(speed x) > [0.5]> then\n Walk (90) (speed x)\n else\n set [frame v] to [0]\n end\n end\n if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n if <<(jump key) = [0]> and <(falling?) < [3]>> then\n set [change y v] to [16]\n set [falling? v] to [6]\n set [jump key v] to [1]\n end\n else\n set [jump key v] to [0]\n end\n change [change y v] by (-1)\n change y by (change y)\n Touch Ground <(change y) > [0]>\n Set Costume\n if <[230] < (x position)> then\n change [level v] by (1)\n go to x: (-148) y: (-80)\n end\n end\nend\n\ndefine Touch Ground <>\nchange [falling? v] by (1)\nrepeat until <not <touching (entities v)?>>\n set [change y v] to [0]\n if <up?> then\n change y by (-1)\n else\n change y by (1)\n set [falling? v] to [0]\n end\nend\n\ndefine None\npoint in direction (direction)\nchange x by (speed)\nset [slope v] to [0]\nchange [frame v] by (0.5)\nrepeat until <<(slope) = [8]> or <not <touching (entities v)?>>>\n change y by (1)\n change [slope v] by (1)\nend\nif <(slope) = [8]> then\n change x by ((0) - (speed))\n change y by ((0) - (slope))\n if <(Wall jump) = [0]> then\n set [speed x v] to ((-4) * (speed))\n set [change y v] to [11]\n set [falling? v] to [6]\n set [wall jump v] to [15]\n else\n set [speed x v] to [0]\n end\nend\n\ndefine Set Costume\nif <(falling?) < [3]> then\n if <(Frame) = [0]> then\n switch costume to (costume2 v)\n else\n switch costume to ([floor v] of ((4) + ((Frame) mod (9))) )\n end\nelse\n if <(change y) > [0]> then\n switch costume to (costume2 v)\n else\n switch costume to (costume11 v)\n end\nend\n\ndefine Init\nset [level v] to [1]\nset [wall jump v] to [0]\nset [slope v] to [0]\nset [jump key v] to [0]\nset rotation style [left-right v]\nhide\nset [falling? v] to [0]\nset [change y v] to [0]\ngo to x: (-230) y: (-143)\nset [pause? v] to [0]\ngo to [front v] layer\nhide\nset [xv v] to [0]\nset [intro started? v] to [0]\nset [new game? v] to [0]\nset [yv v] to [0]\n\nchange [level v] by (1)\n\nchange y by (-10)\n\nchange y by (10)\n\nwhen I receive [reset v]\nchange [deaths v] by (1)\ngo to x: (-212) y: (-120)\n\nchange x by (10)\n\nchange y by (10000000)\n\nset y to (0)\nchange y by (100)\n\nforever\n if <(Pause?) = [0]> then\n if <(Attack) = [0]> then\n if <<(y position) < [-175]> or <touching color (#ff0000)?>> then\n go to x: (198) y: (-143)\n set [xv v] to [0]\n set [yv v] to [0]\n end\n if <key (left arrow v) pressed?> then\n change [xv v] by (-1)\n end\n if <key (right arrow v) pressed?> then\n change [xv v] by (1)\n end\n set [xv v] to ((xv) * (0.85))\n change x by (xv)\n if <touching color (#000008)?> then\n change y by (-2)\n if <touching color (#000008)?> then\n change y by (1)\n if <touching color (#000008)?> then\n change y by (1)\n if <touching color (#000008)?> then\n change y by (1)\n if <touching color (#000008)?> then\n change y by (1)\n if <touching color (#000008)?> then\n change y by (1)\n if <touching color (#000008)?> then\n change y by (-5)\n change x by ((-1) * (xv))\n if <<key (up arrow v) pressed?> and <not <(xv) = [0]>>> then\n set [mode v] to [walljump]\n set [yv v] to [8]\n set [xv v] to (((xv) / ([abs v] of (xv) )) * (-10))\n else\n set [mode v] to [wallslide]\n set [xv v] to [0]\n end\n end\n end\n end\n end\n end\n end\n change y by (2)\n end\n change y by (-3)\n if <touching color (#000008)?> then\n if <(yv) = [-3]> then\n if <<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> then\n set [mode v] to [run]\n else\n if <([abs v] of (xv) ) > [.1]> then\n set [mode v] to [skid]\n else\n set [mode v] to [stand]\n end\n end\n end\n if <key (up arrow v) pressed?> then\n set [mode v] to [jump]\n set [yv v] to [9]\n end\n end\n if <<<<(mode) = [jump]> or <(mode) = [walljump]>> and <(yv) < [0]>> or <<<(mode) = [run]> or <(mode) = [skid]>> and <(yv) < [-3]>>> then\n set [mode v] to [fall]\n end\n change y by (3)\n if <(yv) > [-15]> then\n change [yv v] by (-0.5)\n end\n change y by (-2)\n if <not <touching color (#000008)?>> then\n change y by (-1)\n if <not <touching color (#000008)?>> then\n change y by (-1)\n if <not <touching color (#000008)?>> then\n change y by (-1)\n if <not <touching color (#000008)?>> then\n change y by (-1)\n if <not <touching color (#000008)?>> then\n change y by (-1)\n if <not <touching color (#000008)?>> then\n change y by (5)\n end\n end\n end\n end\n end\n end\n change y by (2)\n change y by (yv)\n if <touching color (#000008)?> then\n change y by (-2)\n if <touching color (#000008)?> then\n change y by ((-1) * (yv))\n set [yv v] to [-3]\n end\n change y by (2)\n end\n end\n end\nend\n\nwhen [i v] key pressed\nchange [level v] by (1)\n\nset [change y v] to [200]\n\nset [pause? v] to [0]\n\nset [pause? v] to [1]\n\nwhen flag clicked\nforever\n if <touching color (#cc0000)?> then\n broadcast (rESET v)\n end\n if <(y position) < [-178]> then\n broadcast (rESET v)\n end\nend\n\nwhen [r v] key pressed\nbroadcast (rESET v)\n\nwhen flag clicked\nwait (1) seconds\nwait until <(Level) = [7]>\nhide\n\n@Dust\n\nwhen I start as a clone\nshow\ngo to x: (pick random (-240) to (240)) y: (pick random (-180) to (180))\nforever\n point in direction (pick random (-180) to (180))\n wait (pick random (0.8) to (5)) seconds\nend\n\nwhen I start as a clone\nshow\ngo to x: (pick random (-240) to (240)) y: (pick random (-180) to (180))\nforever\n move (0.3) steps\n if <(distance to [torch v]) > [20]> then\n set [brightness v] effect to (80)\n show\n end\n if <(distance to [torch v]) > [40]> then\n set [brightness v] effect to (60)\n show\n end\n if <(distance to [torch v]) > [50]> then\n show\n set [brightness v] effect to (30)\n end\n if <(distance to [torch v]) > [75]> then\n show\n set [brightness v] effect to (20)\n end\n if <(distance to [torch v]) > [80]> then\n show\n set [brightness v] effect to (5)\n end\n if <(distance to [torch v]) > [95]> then\n set [brightness v] effect to (5)\n show\n end\n if <(distance to [torch v]) > [100]> then\n set [brightness v] effect to (0)\n hide\n end\nend\n\nset [lag saver v] to [1]\n\nif <(Lag saver) = [0]> then\nend\n\nset [lag reducer v] to [25]\n\ndefine Create Clones Of Myself\nrepeat (Lag reducer)\n create clone of (_myself_ v)\nend\n\nset [lag reducer v] to [0]\n\nif <(distance to [player v]) > [20]> then\n set [brightness v] effect to (80)\n show\nend\nif <(distance to [player v]) > [50]> then\n show\n set [brightness v] effect to (30)\nend\nif <(distance to [player v]) > [75]> then\n set [brightness v] effect to (5)\n show\nend\nif <(distance to [player v]) > [100]> then\n set [brightness v] effect to (0)\n hide\nend\n\nset [lag saver v] to [0]\n\nrepeat until <(CloneID) = [5]>\n change [cloneid v] by (1)\n create clone of (_myself_ v)\nend\nif <not <(CloneID) = [5]>> then\n hide\n delete this clone\nend\n\nwhen flag clicked\nhide\nset [cloneid v] to [0]\nCreate Clones Of Myself\n\n@Torch\n\nwhen flag clicked\npoint in direction (90)\nset rotation style [left-right v]\nset [xy v] to (direction)\nset [leftright? v] to [90]\nforever\n if <([direction v] of [player v]) = [90]> then\n go to x: (([x position v] of [player v]) + (5)) y: ([y position v] of [player v])\n point in direction (90)\n end\n if <([direction v] of [player v]) = [-90]> then\n go to x: (([x position v] of [player v]) - (9)) y: ([y position v] of [player v])\n point in direction (-90)\n end\nend\n\nif then\n point in direction (90)\nelse\nend\n\nwhen flag clicked\nforever\nend\n\nif then\nend\n\nif <<([abs v] of (round (XY)) ) = [91]> or <<([abs v] of (round (XY)) ) = [90]> or <([abs v] of (round (XY)) ) = [89]>>> then\n set [leftright? v] to [1]\nend\n\nif <(Leftright?) = [0]> then\n point in direction (XY)\nend\nif <key (k v) pressed?> then\n change [xy v] by (3)\n set [leftright? v] to [0]\nend\nif <key (l v) pressed?> then\n change [xy v] by (-3)\n set [leftright? v] to [0]\nend\nif <(Leftright?) = [1]> then\n set rotation style [left-right v]\nelse\n set rotation style [all around v]\nend\n\nwhen I receive [reset v]\n\n@Entities\n\ndefine Glow Effect\nif <(distance to [torch v]) > [30]> then\n set [ghost v] effect to (0)\nend\nif <(distance to [torch v]) > [45]> then\n set [ghost v] effect to (15)\nend\nif <(distance to [torch v]) > [50]> then\n set [ghost v] effect to (25)\nend\nif <(distance to [torch v]) > [60]> then\n set [ghost v] effect to (40)\nend\nif <(distance to [torch v]) > [70]> then\n set [ghost v] effect to (50)\nend\nif <(distance to [torch v]) > [80]> then\n set [ghost v] effect to (65)\nend\nif <(distance to [torch v]) > [90]> then\n set [ghost v] effect to (85)\nend\nif <(distance to [torch v]) > [100]> then\n set [ghost v] effect to (100)\nend\n\nwhen I start as a clone\nshow\nwait until <(Level) = [1]>\nrepeat until <(Level) = [2]>\n Glow Effect\nend\ndelete this clone\n\nif <(distance to [sprite1 v]) > [30]> then\n set [brightness v] effect to (80)\nend\nif <(distance to [sprite1 v]) > [60]> then\n set [brightness v] effect to (60)\nend\nif <(distance to [sprite1 v]) > [80]> then\n set [brightness v] effect to (40)\nend\nif <(distance to [sprite1 v]) > [90]> then\n set [brightness v] effect to (20)\nend\nif <(distance to [sprite1 v]) > [100]> then\n set [brightness v] effect to (0)\nend\n\nwhen flag clicked\ngo to x: (-240) y: (-170)\nwait until <(Level) = [2]>\nCreate Vertical Line (4)\nCreate Horizontal Line (4)\nchange x by (90)\nCreate Horizontal Line (4)\ngo to x: (97) y: (-166)\nCreate Vertical Line (5)\nstop [this script v]\n\ndefine None\nrepeat (length)\n create clone of (_myself_ v)\n change [cloneid v] by (1)\n change y by (10)\nend\n\nwhen I start as a clone\nwait (0.1) seconds\n\nwhen flag clicked\ngo to x: (-240) y: (-170)\nwait (1) seconds\nwait until <(Level) = [4]>\nwait (-1) seconds\ngo to x: (-240) y: (-170)\nCreate Vertical Line (4)\nchange x by (80)\nCreate Horizontal Line (2)\nchange y by (-30)\nCreate Vertical Line (1)\nchange x by (90)\nCreate Vertical Line (1)\n\nwhen I start as a clone\nwait until <(Level) = [4]>\nwait until <(Level) = [5]>\ndelete this clone\n\nwhen I start as a clone\nforever\n Glow Effect\nend\n\nwhen flag clicked\ngo to x: (-240) y: (-170)\nwait (1) seconds\nwait until <(Level) = [5]>\nwait (-1) seconds\ngo to x: (-210) y: (-170)\nCreate Vertical Line (2)\nchange x by (90)\nCreate Horizontal Line (1)\nchange x by (90)\nCreate Horizontal Line (7)\nchange x by (90)\nCreate Horizontal Line (3)\n\nwhen I start as a clone\nwait until <(Level) = [2]>\nrepeat until <(Level) = [3]>\n Glow Effect\nend\ndelete this clone\n\nwhen flag clicked\n\nwhen I start as a clone\nwait until <(Level) = [4]>\nwait until <(Level) = [5]>\ndelete this clone\n\nwait until <(Level) = [5]>\nset x to (0)\nset y to (-180)\nCreate Horizontal Line (15)\nset x to (-200)\nset y to (-59)\nCreate Horizontal Line (1)\n\nchange x by (90)\nCreate Horizontal Line (7)\nchange x by (90)\n\nwhen [space v] key pressed\n\nwhen flag clicked\nset x to (-240)\nset y to (-175)\nhide\nset [cloneid v] to [0]\nCreate Vertical Line (20)\nset y to (0)\nset x to (-240)\nCreate Vertical Line (20)\n\ndefine None\nrepeat (lenght)\n create clone of (_myself_ v)\n change [cloneid v] by (1)\n change x by (30)\nend\n\nwhen I start as a clone\nwait until <(Level) = [5]>\nwait until <(Level) = [6]>\ndelete this clone\n\nwhen I start as a clone\nwait until <(Level) = [3]>\nwait until <(Level) = [4]>\ndelete this clone\n\nwhen flag clicked\ngo to x: (-240) y: (-170)\nwait (1) seconds\nwait until <(Level) = [3]>\nwait (-1) seconds\ngo to x: (-220) y: (-170)\nCreate Vertical Line (4)\nchange x by (90)\nCreate Horizontal Line (3)\nchange x by (80)\nCreate Horizontal Line (3)\nchange x by (90)\nCreate Horizontal Line (1)\n\nchange [level v] by (1)\n\nwhen flag clicked\ngo to x: (-240) y: (-170)\nwait (1) seconds\nwait until <(Level) = [6]>\nwait (-1) seconds\ngo to x: (-210) y: (-170)\nCreate Vertical Line (18)\nchange x by (90)\nCreate Horizontal Line (20)\ngo to x: (50) y: (-80)\nCreate Vertical Line (4)\ngo to x: (58) y: (20)\nCreate Vertical Line (3)\ngo to x: (62) y: (100)\nCreate Vertical Line (2)\n\n@Sprite1\n\nwhen flag clicked\nset [fpsstack v] to [0]\nforever\n wait (1) seconds\n set [fps v] to (fpsstack)\n set [fpsstack v] to [0]\nend\n\nwhen flag clicked\nforever\n change [fpsstack v] by (1)\nend\n\n
Use the WASD keys to move. You need to use your torch to see what's ahead. If you get stuck press R to reset. If your game is lagging click See Inside and go to the dust sprite and read the comments to know how to reduce the lag. And don't worry, the first and the last levels lag due to block increase.\n\nPress R if you are stuck.\n
Horse Platformer
@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [message1 v]\nnext backdrop\n\nwhen backdrop switches to [backdrop2 v]\nbroadcast (tree v)\n\nwhen backdrop switches to [backdrop4 v]\nbroadcast (message 2 v)\n\nwhen backdrop switches to [backdrop3 v]\nbroadcast (tree 2 v)\n\nwhen backdrop switches to [backdrop4 v]\nbroadcast (tree 3 v) and wait\n\n@horse\n\nwhen I receive [platform v]\n\nwhen flag clicked\nset rotation style [left-right v]\npoint in direction (-90)\nswitch costume to (costume1 v)\ngo to x: (-178) y: (60)\nforever\n if <key (left arrow v) pressed?> then\n point in direction (90)\n change [xvel v] by (-1)\n set [direction v] to [-5]\n end\n if <key (right arrow v) pressed?> then\n point in direction (-90)\n change [xvel v] by (1)\n set [direction v] to [5]\n end\n set [xvel v] to ((XVel) * (0.9))\n change x by (XVel)\n if <touching color (#000000)?> then\n change y by (1)\n if <touching color (#000000)?> then\n change y by (1)\n if <touching color (#000000)?> then\n change y by (1)\n if <touching color (#000000)?> then\n change y by (1)\n end\n end\n if <touching color (#000000)?> then\n change y by (1)\n if <touching color (#000000)?> then\n change x by ((XVel) * (-1))\n change y by (-5)\n if <key (up arrow v) pressed?> then\n if <(XVel) > [0]> then\n set [xvel v] to [-5]\n else\n set [xvel v] to [5]\n end\n set [yvel v] to [10]\n else\n set [yvel v] to [0]\n end\n end\n end\n end\n end\n change [yvel v] by (-1)\n change y by (YVel)\n if <touching color (#000000)?> then\n change y by ((YVel) * (-1))\n set [yvel v] to [0]\n end\n change y by (-1)\n if <touching color (#000000)?> then\n if <key (up arrow v) pressed?> then\n set [yvel v] to [15]\n end\n end\n change y by (1)\n if <<(x position) = [205]> or <(x position) > [205]>> then\n broadcast (message1 v)\n go to x: (-178) y: (60)\n end\n if <touching color (#003fff)?> then\n go to x: (-178) y: (60)\n end\nend\n\nwhen [left arrow v] key pressed\nrepeat until <<(costume [number v]) = [1]> and <not <key (left arrow v) pressed?>>>\n wait (0.1) seconds\n next costume\nend\n\nwhen [right arrow v] key pressed\nrepeat until <<(costume [number v]) = [1]> and <not <key (right arrow v) pressed?>>>\n wait (0.1) seconds\n next costume\nend\n\nwhen flag clicked\ngo to x: (-178) y: (-126)\nshow\n\nwhen flag clicked\nforever\n if <touching (water v)?> then\n go to x: (-178) y: (-126)\n end\nend\n\ngo to x: (-178) y: (-126)\n\nforever\n if <key (right arrow v) pressed?> then\n change [x_vel v] by (1)\n end\n if <key (left arrow v) pressed?> then\n change [x_vel v] by (-1)\n end\n set [x_vel v] to ((0.9) * (x_vel))\n change x by (x_vel)\n set [t v] to [0]\n walls\n if <not <(t) = [s]>> then\n add (t) to [bugs v]\n end\n change [y_vel v] by (-0.8)\n change y by (y_vel)\n if <touching (level v)?> then\n change y by ((-1) * (y_vel))\n if <<key (up arrow v) pressed?> and <(y_vel) < [0]>> then\n set [y_vel v] to [10]\n else\n set [y_vel v] to [0]\n end\n end\n broadcast (message1 v)\n check\nend\n\nwhen [right arrow v] key pressed\nrepeat until <not <key (right arrow v) pressed?>>\n play sound [Horse Gallop Sound EffectYouTube v] until done\nend\n\nhide\n\nhide\n\n@apple\n\nwhen flag clicked\nset [apples v] to [0]\nset [pixelate v] effect to (25)\nshow\nforever\n if <touching (horse v)?> then\n start sound [chomp v]\n hide\n change [apples v] by (1)\n end\nend\n\nwhen I receive [message1 v]\nshow\n\n@Tree\n\nwhen flag clicked\ngo to x: (10) y: (-68)\nhide\n\nwhen I receive [message 2 v]\nhide\n\nwhen I receive [tree v]\nshow\n\nwhen I receive [tree 2 v]\nshow\n\nwhen backdrop switches to [backdrop4 v]\nshow\ngo to x: (-61) y: (-71)\n\nwhen I receive [tree 3 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\nwhen backdrop switches to [backdrop1 v]\ngo to x: (10) y: (-68)\nhide\n\nwhen backdrop switches to [backdrop5 v]\nhide\n\n@water\n\nwhen flag clicked\nswitch costume to (water v)\ngo to x: (29) y: (-252)\nhide\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nswitch costume to (water v)\ngo to x: (29) y: (-252)\nhide\n\nwhen backdrop switches to [backdrop4 v]\nswitch costume to (water2 v)\ngo to x: (107) y: (-252)\nshow\n\nwhen backdrop switches to [backdrop5 v]\nhide\n\n@Tree2\n\nshow\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop4 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\nwhen backdrop switches to [backdrop5 v]\nhide\n\n@horse2\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nshow variable [apples v]\n\nhide variable [apples v]\n\nshow\n\ngo to [front v] layer\n\n@Gingerbread House\n\nwhen backdrop switches to [backdrop5 v]\nshow\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\n@Gingerbread House2\n\nwhen backdrop switches to [backdrop5 v]\nshow\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\ngo to [front v] layer\n\n
Note:\nI know horses typically like water, but they also don't climb trees. :) Also, this game is very old, so there will most likely not be any more levels, as I'm not active on Scratch anymore.\nInstructions:\nUse your arrow keys to move left, right or up. Move forward and up to wall jump. Do not touch the water (horses definitely hate water). Collect the apple and touch the right wall to go to the next level.\nCollect as many apples as you can (the levels just repeat)!\nHave fun <3
100 Lvl Platformer [Hard]
@Stage\n\n@Your\n\nwhen I receive [message1 v]\nset [clircles: v] to [1]\nswitch backdrop to (backdrop1 v)\nset [level v] to [1]\ngo to x: (-223) y: (-167)\nset [yv v] to [0]\n\nwhen backdrop switches to [backdrop25 v]\nset [clircles: v] to [0]\nwait (4) seconds\nif <(Clircles:) = [0]> then\n switch backdrop to (backdrop26 v)\nend\n\nwhen I receive [pause v]\nset [game v] to [0]\n\nwhen I receive [unpause v]\nset [game v] to [1]\n\nwhen flag clicked\nforever\n if <key (r v) pressed?> then\n start sound [pop v]\n set [yv v] to [0]\n go to x: (-223) y: (-167)\n change [deaths v] by (1)\n wait until <not <key (r v) pressed?>>\n end\nend\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nset [ghost v] effect to (0)\nset [deaths v] to [0]\nhide variable [deaths v]\nset [level v] to [1]\nset [clircles: v] to [0]\nset [volume: v] to [100]\nset [game v] to [1]\nset [xv v] to [0]\nset [yv v] to [0]\nhide variable [sho v]\ngo to x: (-220) y: (-172)\npoint in direction (90)\nshow\nforever\n if <(game) = [1]> then\n change [yv v] by (-0.5)\n if <key (right arrow v) pressed?> then\n change [xv v] by (0.7)\n point in direction (90)\n end\n if <key (left arrow v) pressed?> then\n change [xv v] by (-0.7)\n point in direction (90)\n end\n set [xv v] to ((Xv) * (0.9))\n change x by (Xv)\n if <touching color (#000008)?> then\n change y by (1)\n if <touching color (#000008)?> then\n change y by (1)\n if <touching color (#000008)?> then\n change y by (1)\n if <touching color (#000008)?> then\n change y by (1)\n if <touching color (#000008)?> then\n change y by (1)\n if <touching color (#000008)?> then\n change x by ((Xv) * (-1))\n change x by (-1)\n change y by (-5)\n change x by (1)\n if <key (up arrow v) pressed?> then\n start sound [jump v]\n if <(Xv) > [0]> then\n set [xv v] to [-8]\n else\n set [xv v] to [8]\n end\n set [yv v] to [10]\n else\n set [xv v] to [0]\n end\n end\n end\n end\n end\n end\n end\n change y by (Yv)\n if <touching color (#000008)?> then\n change y by ((Yv) * (-1))\n set [yv v] to [0]\n end\n change y by (-1)\n if <touching color (#000008)?> then\n if <key (up arrow v) pressed?> then\n start sound [jump v]\n set [yv v] to [10]\n end\n end\n change y by (1)\n if <touching color (#ffff00)?> then\n start sound [next lvl v]\n set [yv v] to [0]\n go to x: (-223) y: (-167)\n switch backdrop to (next backdrop v)\n change [level v] by (1)\n end\n if <touching color (#003fff)?> then\n start sound [jump v]\n set [yv v] to [15]\n end\n if <touching color (#00ffff)?> then\n if <key (up arrow v) pressed?> then\n set [yv v] to [5]\n else\n set [yv v] to [-1]\n end\n end\n if <touching color (#ff0000)?> then\n start sound [bxsb v]\n repeat (10)\n change [ghost v] effect by (10)\n end\n set [yv v] to [0]\n set [xv v] to [0]\n go to x: (-223) y: (-167)\n set [ghost v] effect to (0)\n change [deaths v] by (1)\n end\n if <(level) = [101]> then\n set [sho v] to [The end!]\n end\n if <(level) < [101]> then\n set [sho v] to (join [Level ] (join (level) [/100]))\n end\n if <(backdrop [name v]) = [backdrop101]> then\n set [sho v] to [¯\_\(ツ\)_/¯]\n end\n if <(backdrop [name v]) = [backdrop103]> then\n set [sho v] to [♪~ ᕕ\(ᐛ\)ᕗ]\n end\n if <touching color (#00cc44)?> then\n go to (portal v)\n end\n end\n if <touching color (#00ff55)?> then\n go to x: (216) y: (-160)\n end\nend\n\nwhen flag clicked\nset [your time v] to [0]\nforever\n change [your time v] by (1)\n wait (1) seconds\nend\n\n@Sprite1\n\nwhen flag clicked\ngo to x: (216) y: (-160)\n\nwhen backdrop switches to [null v]\nrepeat until <not <(backdrop [name v]) = [null]>>\n if <touching (mouse-pointer v)?> then\n show\n end\nend\n\n
---------------------------------------------------------------------\nMAKE SURE TO PLAY IN PLAYER MODE TO GET THE HIGH SCORE (DO NOT PRESS "See Inside" IT WILL NOT COUNT YOUR HIGHSCORE IF YOU FINISH! ---------- GET TO LEVEL 100 TO SET HIGHSCORE!\n!!!Try to get the lowest TIme!!!\n---------------------------------------------------------------------\nIf you find any glitches or problems please comment down below to notify me!\n---------------------------------------------------------------------\n[Hard Levels]\n---------------------------------------------------------------------\nTry and defeat the 100 Levels and get the least amount of points as possible to get the HighScore!\n---------------------------------------------------------------------\nUse the Arrow Keys to Move\nYou can Wall Jump\nRed = Death\nBlue = Bouncy\nLight Blue = Water (Float/Climb)\nYellow = Next Level\nPress R to restart the Level\nGreen = Teleport to end
SCRATCH WARS - A Star wars platformer
@Stage\n\nwhen [a v] key pressed\nif <(Intro) = [0]> then\n set [pause v] to [1]\n stop all sounds\n set [intro v] to [1]\n switch backdrop to (menu3 v)\n broadcast (INTRO_2 v)\nend\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nset [pause v] to [1]\nset volume to (80) %\nforever\n if <(Intro) = [0]> then\n play sound [Star Wars-The Imperial March \( Darth Vader Theme Song \) 8-bit.mp3 v] until done\n end\n if <(Intro) = [3]> then\n play sound [Star Wars-The Imperial March \( Darth Vader Theme Song \) 8-bit.mp3 v] until done\n end\nend\n\nwhen I receive [z_sound_1 v]\nplay sound [ltsaberhit01 v] until done\n\nwhen I receive [z_sound_2 v]\nplay sound [pistol-1 v] until done\n\nwhen I receive [fire_1 v]\nplay sound [pistol-1 v] until done\n\nwhen I receive [death_2 v]\nplay sound [ltsaberbodyhit01 v] until done\n\nwhen I receive [destroyed v]\nplay sound [270311__littlerobotsoundfactory__explosion-03 v] until done\n\nwhen I receive [jump v]\nplay sound [270323__littlerobotsoundfactory__jump-03 v] until done\n\nwhen I receive [door_destroyed v]\nplay sound [270311__littlerobotsoundfactory__explosion-03 v] until done\n\nwhen I receive [fall_sound v]\nplay sound [270343__littlerobotsoundfactory__shoot-01 v] until done\n\nwhen I receive [death_1 v]\nplay sound [270311__littlerobotsoundfactory__explosion-03 v] until done\n\nwhen I receive [death_1 v]\nplay sound [ltsaberbodyhit01 v] until done\n\nwhen I receive [scontro v]\nplay sound [pistol-1 v] until done\n\nwhen I receive [vader_hit v]\nplay sound [ltsaberbodyhit01 v] until done\n\nrepeat until <(Intro) = [1]>\n if <(Intro) = [0]> then\n set [tempo v] to ((tempo) + (1))\n if <(tempo) = [600]> then\n switch backdrop to (menu2 v)\n end\n if <(tempo) = [1200]> then\n switch backdrop to (backdrop1 v)\n set [tempo v] to [0]\n end\n end\n if <(Intro) = [1]> then\n switch backdrop to (menu3 v)\n end\n if <(Intro) = [3]> then\n end\nend\n\nwhen I receive [fire_2 v]\nplay sound [pistol-1 v] until done\n\nwhen I receive [fire_5 v]\nplay sound [pistol-1 v] until done\n\nwhen I receive [fire_4 v]\nplay sound [pistol-1 v] until done\n\nwhen I receive [fire_3 v]\nplay sound [pistol-1 v] until done\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\n@Sprite1\n\ndefine None\nset [dx v] to [0]\nrepeat until <(DX) = ([abs v] of (vx) )>\n set [dx v] to ((DX) + (1))\n change x by (-1)\n if <touching (sprite2 v)?> then\n set [dx v] to ([abs v] of (vx) )\n change x by (1)\n set [vx v] to [0]\n end\n if <<touching (plaat_01 v)?> and <(On_a_Moving_plat) = [0]>> then\n set [dx v] to ([abs v] of (vx) )\n change x by (1)\n set [vx v] to [0]\n end\n if <touching (falling_plaat v)?> then\n set [dx v] to ([abs v] of (vx) )\n change x by (1)\n set [vx v] to [0]\n end\n if <touching (falling_plaat2 v)?> then\n set [dx v] to ([abs v] of (vx) )\n change x by (1)\n set [vx v] to [0]\n end\n if <touching (falling_plaat3 v)?> then\n set [dx v] to ([abs v] of (vx) )\n change x by (1)\n set [vx v] to [0]\n end\nend\n\ndefine Jump_calc\nif <(GROUNDED) > [0]> then\n if <(GROUNDED) = (Jump_Delay)> then\n broadcast (JUMP v)\n end\n set [vy v] to (Jump_Strenght)\n set [grounded v] to ((GROUNDED) - (1))\nend\n\nwhen I receive [restart v]\nset [progressi v] to [0]\nset [gravity v] to [-4]\nset [jump_strenght v] to [15]\nset [jump_delay v] to [8]\nset [acc_x v] to [1]\nset [dec_x v] to [2]\nset [vx_max v] to [8]\nset [vx v] to [0]\nset [vy v] to [0]\nset [dx v] to [0]\nset [dy v] to [0]\nset [add_v_max v] to [2]\nset [on_a_moving_plat v] to [0]\ngo to [front v] layer\ngo [backward v] (12) layers\nset [grounded v] to [0]\nwait (0.1) seconds\ngo to x: (-196) y: (-146)\npoint in direction (90)\n\nwhen I receive [death_fall v]\nif <(PROGRESSI) < [2]> then\n go to x: (-196) y: (-146)\nend\nif <<(PROGRESSI) = [2]> or <(PROGRESSI) = [3]>> then\n go to x: (-221) y: (75)\nend\nif <<(PROGRESSI) = [4]> or <(PROGRESSI) = [5]>> then\n go to x: (-216) y: (76)\nend\nif <<(PROGRESSI) = [6]> or <(PROGRESSI) = [7]>> then\n go to x: (-219) y: (-155)\nend\nif <<(PROGRESSI) = [8]> or <(PROGRESSI) = [9]>> then\n go to x: (-215) y: (94)\nend\nif <<(PROGRESSI) = [10]> or <(PROGRESSI) = [11]>> then\n go to x: (-219) y: (62)\nend\nif <<(PROGRESSI) = [12]> or <(PROGRESSI) = [13]>> then\n go to x: (-213) y: (93)\nend\nif <<(PROGRESSI) = [14]> or <(PROGRESSI) = [15]>> then\n go to x: (-179) y: (-142)\nend\nif <<(PROGRESSI) = [16]> or <(PROGRESSI) = [17]>> then\n go to x: (-218) y: (-142)\nend\nif <<(PROGRESSI) = [18]> or <(PROGRESSI) = [19]>> then\n go to x: (-217) y: (75)\nend\nif <<(PROGRESSI) = [20]> or <(PROGRESSI) = [21]>> then\n go to x: (-217) y: (-142)\nend\nif <(PROGRESSI) = [22]> then\n go to x: (-161) y: (-142)\nend\n\ndefine None\nif <(vy) = [0]> then\nend\nif <(vy) < [0]> then\n set [dy v] to [0]\n repeat until <(DY) = ([abs v] of (vy) )>\n set [dy v] to ((DY) + (1))\n change y by (-1)\n if <touching (sprite2 v)?> then\n set [grounded v] to (Jump_Delay)\n set [dy v] to ([abs v] of (vy) )\n change y by (1)\n set [vy v] to [0]\n set [add_vy v] to [0]\n end\n if <not <touching (plaat_01 v)?>> then\n set [on_a_moving_plat v] to [0]\n end\n if <touching (plaat_01 v)?> then\n set [on_a_moving_plat v] to [1]\n set [grounded v] to (Jump_Delay)\n set [dy v] to ([abs v] of (vy) )\n change y by (1)\n set [vy v] to [0]\n set [add_vy v] to (VY_addizionale)\n end\n if <touching (falling_plaat v)?> then\n set [on_a_falling_plat v] to [1]\n set [grounded v] to (Jump_Delay)\n set [dy v] to ([abs v] of (vy) )\n change y by (1)\n set [vy v] to [0]\n set [add_vy v] to [0]\n end\n if <touching (falling_plaat2 v)?> then\n set [on_a_falling_plat2 v] to [1]\n set [grounded v] to (Jump_Delay)\n set [dy v] to ([abs v] of (vy) )\n change y by (1)\n set [vy v] to [0]\n set [add_vy v] to [0]\n end\n if <touching (falling_plaat3 v)?> then\n set [on_a_falling_plat3 v] to [1]\n set [grounded v] to (Jump_Delay)\n set [dy v] to ([abs v] of (vy) )\n change y by (1)\n set [vy v] to [0]\n set [add_vy v] to [0]\n end\n end\n change y by (ADD_VY)\nend\nif <(vy) > [0]> then\n set [dy v] to [0]\n repeat until <(DY) = ([abs v] of (vy) )>\n set [dy v] to ((DY) + (1))\n change y by (1)\n if <touching (sprite2 v)?> then\n set [grounded v] to [0]\n set [dy v] to ([abs v] of (vy) )\n change y by (-1)\n set [vy v] to [0]\n end\n if <<touching (plaat_01 v)?> and <(On_a_Moving_plat) = [0]>> then\n set [grounded v] to [0]\n set [dy v] to ([abs v] of (vy) )\n change y by (-10)\n set [vy v] to [-10]\n end\n if <(y position) > [160]> then\n set [grounded v] to [0]\n set [dy v] to ([abs v] of (vy) )\n change y by (-1)\n set [vy v] to [0]\n end\n if <touching (falling_plaat v)?> then\n set [grounded v] to [0]\n set [dy v] to ([abs v] of (vy) )\n change y by (-1)\n set [vy v] to [0]\n end\n if <touching (falling_plaat2 v)?> then\n set [grounded v] to [0]\n set [dy v] to ([abs v] of (vy) )\n change y by (-1)\n set [vy v] to [0]\n end\n if <touching (falling_plaat3 v)?> then\n set [grounded v] to [0]\n set [dy v] to ([abs v] of (vy) )\n change y by (-1)\n set [vy v] to [0]\n end\n end\nend\n\ndefine None\nset [dx v] to [0]\nrepeat until <(DX) = ([abs v] of (vx) )>\n set [dx v] to ((DX) + (1))\n change x by (1)\n if <touching (sprite2 v)?> then\n set [dx v] to ([abs v] of (vx) )\n change x by (-1)\n set [vx v] to [0]\n end\n if <<touching (plaat_01 v)?> and <(On_a_Moving_plat) = [0]>> then\n set [dx v] to ([abs v] of (vx) )\n change x by (-1)\n set [vx v] to [0]\n end\n if <touching (falling_plaat v)?> then\n set [dx v] to ([abs v] of (vx) )\n change x by (-1)\n set [vx v] to [0]\n end\n if <touching (falling_plaat2 v)?> then\n set [dx v] to ([abs v] of (vx) )\n change x by (-1)\n set [vx v] to [0]\n end\n if <touching (falling_plaat3 v)?> then\n set [dx v] to ([abs v] of (vx) )\n change x by (-1)\n set [vx v] to [0]\n end\nend\n\ndefine Check_moving_plat\nif <(VY_addizionale) < [0]> then\n if <(Delta_Y) > [-17]> then\n go to x: (x position) y: (([y position v] of [plaat_01 v]) + (17))\n end\nend\nif <(VY_addizionale) > [0]> then\n if <(Delta_Y) > [-25]> then\n go to x: (x position) y: (([y position v] of [plaat_01 v]) + (25))\n end\nend\n\nwhen I receive [end_game v]\nrepeat until <(y position) = [-142]>\n change [vy v] by (Gravity)\n Collisioni_giù (Vy)\nend\npoint towards (vader_01 v)\n\nwhen I receive [level_change v]\nset [pause v] to [0]\nset [grounded v] to [0]\nif <(PROGRESSI) = [2]> then\n go to x: (-221) y: (75)\nend\nif <(PROGRESSI) = [4]> then\n go to x: (-221) y: (75)\nend\nif <(PROGRESSI) = [4]> then\n go to x: (-216) y: (76)\nend\nif <(PROGRESSI) = [6]> then\n go to x: (-219) y: (-155)\nend\nif <(PROGRESSI) = [8]> then\n go to x: (-215) y: (94)\nend\nif <(PROGRESSI) = [10]> then\n go to x: (-219) y: (62)\nend\nif <(PROGRESSI) = [12]> then\n go to x: (-213) y: (93)\nend\nif <(PROGRESSI) = [14]> then\n go to x: (-179) y: (-142)\nend\nif <(PROGRESSI) = [16]> then\n go to x: (-218) y: (-142)\nend\nif <(PROGRESSI) = [18]> then\n go to x: (-217) y: (75)\nend\nif <(PROGRESSI) = [20]> then\n go to x: (-217) y: (-142)\nend\nif <(PROGRESSI) = [22]> then\n go to x: (-161) y: (-142)\nend\nshow\n\ndefine Calc_V_max_SX\nif <(GROUNDED) = (Jump_Delay)> then\n if <(Vx) < ((Vx_MAX) * (-1))> then\n set [vx v] to ((Vx_MAX) * (-1))\n end\nelse\n if <(Vx) < (((Vx_MAX) * (-1)) + ((ADD_V_MAX) * (-1)))> then\n set [vx v] to (((Vx_MAX) * (-1)) + ((ADD_V_MAX) * (-1)))\n end\nend\n\nwhen I receive [death_1 v]\nset [vx v] to [0]\nset [vy v] to [0]\n\ndefine Calc_V_max_DX\nif <(GROUNDED) = (Jump_Delay)> then\n if <(Vx) > (Vx_MAX)> then\n set [vx v] to (Vx_MAX)\n end\nelse\n if <(Vx) > ((Vx_MAX) + (ADD_V_MAX))> then\n set [vx v] to ((Vx_MAX) + (ADD_V_MAX))\n end\nend\n\nwhen flag clicked\nset [progressi v] to [0]\nset [gravity v] to [-4]\nset [jump_strenght v] to [15]\nset [jump_delay v] to [8]\nset [acc_x v] to [1]\nset [dec_x v] to [1]\nset [vx_max v] to [8]\nset [vx v] to [0]\nset [vy v] to [0]\nset [dx v] to [0]\nset [dy v] to [0]\nset [add_v_max v] to [2]\nset [on_a_moving_plat v] to [0]\n\nwhen I receive [very end v]\nhide\n\nwhen [space v] key pressed\ngo to (mouse-pointer v)\n\nwhen I receive [go v]\nshow\ngo to [front v] layer\ngo [backward v] (12) layers\nset [grounded v] to [0]\nbroadcast (RESTART v)\nwait (0.1) seconds\ngo to x: (-196) y: (-146)\npoint in direction (90)\nforever\n if <(PAUSE) = [0]> then\n if <<key (z v) pressed?> or <key (up arrow v) pressed?>> then\n Jump_calc\n set [add_vy v] to [0]\n end\n change [vy v] by (Gravity)\n Collisioni_giù (Vy)\n if <key (right arrow v) pressed?> then\n change [vx v] by (Acc_X)\n Calc_V_max_DX\n if <(Vx) > [0]> then\n Collisioni_DX (Vx)\n else\n Collisioni_SX (Vx)\n end\n end\n if <key (left arrow v) pressed?> then\n change [vx v] by ((Acc_X) * (-1))\n Calc_V_max_SX\n if <(Vx) < [0]> then\n Collisioni_SX (Vx)\n else\n Collisioni_DX (Vx)\n end\n end\n if <<not <key (left arrow v) pressed?>> and <not <key (right arrow v) pressed?>>> then\n if <(Vx) < [0]> then\n change [vx v] by (Dec_X)\n if <(Vx) > [0]> then\n set [vx v] to [0]\n end\n Collisioni_SX (Vx)\n end\n if <(Vx) > [0]> then\n change [vx v] by ((Dec_X) * (-1))\n if <(Vx) < [0]> then\n set [vx v] to [0]\n end\n Collisioni_DX (Vx)\n end\n end\n if <<not <key (z v) pressed?>> and <not <key (up arrow v) pressed?>>> then\n if <<(GROUNDED) > [0]> and <(GROUNDED) < (Jump_Delay)>> then\n set [grounded v] to [0]\n end\n end\n if <(Vy) < [0]> then\n set [grounded v] to [0]\n end\n if <(On_a_Moving_plat) = [1]> then\n if <not <(Vy) > [0]>> then\n Check_moving_plat\n end\n end\n end\nend\n\nwhen flag clicked\nhide\n\n@Cube_01\n\nwhen I receive [restart v]\ngo to x: (-196) y: (-146)\ngo to [front v] layer\ngo [backward v] (1) layers\nset [fire_premuto v] to [0]\nset [spada_counter v] to [0]\nset [delay_spada v] to [1]\nset rotation style [left-right v]\npoint in direction (90)\nset [clones counter v] to [0]\nset [clones_count_max v] to [2]\nset [sprite_n v] to [1]\n\ndefine Change_Level\nhide\nset [sprite_n v] to [1]\nswitch costume to (cube_01 v)\npoint in direction (90)\nset [vx v] to [0]\nset [vy v] to [0]\nset [pause v] to [1]\nset [progressi v] to ((PROGRESSI) + (1))\nset [fire_premuto v] to [0]\nbroadcast (LEVEL_CHANGE v)\n\nwhen I receive [death_1 v]\nset [pause v] to [1]\nset [fire_premuto v] to [0]\nDeath_1\n\nwhen I receive [death_2 v]\nset [pause v] to [1]\nset [fire_premuto v] to [0]\nDeath_2\n\ndefine Death_2\nset [sprite_n v] to [11]\nswitch costume to (jedi_10 v)\nset [vx v] to [0]\nset [vy v] to [0]\nset [pause v] to [1]\nset [fire_premuto v] to [0]\nwait (0.3) seconds\nset [brightness v] effect to (50)\nwait (0.2) seconds\nset [brightness v] effect to (0)\nwait (0.2) seconds\nset [brightness v] effect to (50)\nwait (0.2) seconds\nset [brightness v] effect to (0)\nDeath_by_fall\n\ndefine Death_1\nset [sprite_n v] to [10]\nswitch costume to (jedi_09 v)\nset [vx v] to [0]\nset [vy v] to [0]\nset [pause v] to [1]\nset [fire_premuto v] to [0]\nwait (0.3) seconds\nset [brightness v] effect to (50)\nwait (0.2) seconds\nset [brightness v] effect to (0)\nwait (0.2) seconds\nset [brightness v] effect to (50)\nwait (0.2) seconds\nset [brightness v] effect to (0)\nDeath_by_fall\n\ndefine Movimento_spada\nif <(Spada_counter) = (Delay_spada)> then\n change [sprite_n v] by (1)\n switch costume to (Sprite_N)\n set [spada_counter v] to [0]\nend\nchange [spada_counter v] by (1)\n\nwhen I receive [go v]\nshow\ngo to x: (-196) y: (-146)\nswitch costume to (jedi_14 v)\ngo to [front v] layer\ngo [backward v] (1) layers\nset [fire_premuto v] to [0]\nset [spada_counter v] to [0]\nset [delay_spada v] to [1]\nset rotation style [left-right v]\npoint in direction (90)\nset [clones counter v] to [0]\nset [clones_count_max v] to [2]\nset [sprite_n v] to [1]\nSword\nforever\n if <(Intro) > [2]> then\n go to x: ([x position v] of [sprite1 v]) y: ([y position v] of [sprite1 v])\n end\n if <(PAUSE) = [0]> then\n if <(Sprite_N) = [9]> then\n switch costume to (cube_2 v)\n set [sprite_n v] to [2]\n end\n if <not <key (a v) pressed?>> then\n set [fire_premuto v] to [0]\n end\n if <(Sprite_N) > [2]> then\n Movimento_spada\n end\n if <(Ghost_Effect) = [1]> then\n if <(Clones Counter) = [0]> then\n set [clones counter v] to [1]\n end\n if <(Clones Counter) > [0]> then\n set [clones counter v] to ((Clones Counter) + (1))\n if <(Clones Counter) = (Clones_count_MAX)> then\n create clone of (_myself_ v)\n set [clones counter v] to [0]\n end\n end\n end\n if <key (right arrow v) pressed?> then\n point in direction (90)\n end\n if <key (left arrow v) pressed?> then\n point in direction (-90)\n end\n if <<(Sprite_N) < [3]> and <not <key (a v) pressed?>>> then\n if <key (right arrow v) pressed?> then\n if <(GROUNDED) = (Jump_Delay)> then\n set [sprite_n v] to [2]\n switch costume to (cube_2 v)\n end\n end\n if <key (left arrow v) pressed?> then\n if <(GROUNDED) = (Jump_Delay)> then\n set [sprite_n v] to [2]\n switch costume to (cube_2 v)\n end\n end\n if <<not <key (left arrow v) pressed?>> and <not <key (right arrow v) pressed?>>> then\n if <(GROUNDED) = (Jump_Delay)> then\n set [sprite_n v] to [1]\n switch costume to (cube_01 v)\n end\n end\n if <(GROUNDED) < (Jump_Delay)> then\n set [sprite_n v] to [2]\n switch costume to (cube_2 v)\n end\n else\n if <<<(Sprite_N) < [3]> and <key (a v) pressed?>> and <(Fire_premuto) = [0]>> then\n set [sprite_n v] to [3]\n switch costume to (Sprite_N)\n set [fire_premuto v] to [1]\n broadcast (Z_SOUND_1 v)\n end\n end\n verifica_bordo\n end\nend\n\ndefine Sword\ngo to x: (-196) y: (-146)\nwait (1) seconds\nstart sound [ltsaberon01 v]\nswitch costume to (jedi_13 v)\nwait (0.1) seconds\nswitch costume to (jedi_12 v)\nwait (0.1) seconds\nswitch costume to (jedi_11 v)\nwait (0.1) seconds\nswitch costume to (cube_01 v)\nwait (1) seconds\nset [intro v] to [3]\nset [pause v] to [0]\n\ndefine verifica_bordo\nif <(PAUSE) = [0]> then\n if <(y position) < [-180]> then\n broadcast (FALL_SOUND v)\n Death_by_fall\n end\n if <(x position) > [238]> then\n hide\n set [pause v] to [1]\n go to x: (0) y: (0)\n Change_Level\n end\nend\n\nwhen I receive [end_game v]\npoint towards (vader_01 v)\nswitch costume to (cube_01 v)\nwait (4) seconds\nsay [What?] for (2) seconds\nwait (13) seconds\nsay [Someone told me that you killed him!] for (2) seconds\nwait (10) seconds\nsay [No! That's not true! That's impossible!] for (3) seconds\nbroadcast (VERY END v)\n\nwhen I receive [level_change v]\nset [fire_premuto v] to [0]\nset [pause v] to [0]\nshow\n\nwhen I start as a clone\ngo to [front v] layer\ngo [backward v] (7) layers\nset [ghost v] effect to (70)\nrepeat (10)\n change [ghost v] effect by (3)\n change y by (ADD_VY)\nend\ndelete this clone\n\nwhen I receive [very end v]\nhide\n\nwhen flag clicked\nforever\n if <key (space v) pressed?> then\n if <<(PAUSE) = [0]> and <(Ghost_Effect) = [3]>> then\n set [ghost_effect v] to [0]\n end\n if <<(PAUSE) = [0]> and <(Ghost_Effect) = [1]>> then\n set [ghost_effect v] to [2]\n end\n else\n if <(Ghost_Effect) = [0]> then\n set [ghost_effect v] to [1]\n end\n if <(Ghost_Effect) = [2]> then\n set [ghost_effect v] to [3]\n end\n end\nend\n\nwhen flag clicked\nset [ghost_effect v] to [1]\nhide\ngo to x: (-196) y: (-146)\n\ndefine Death_by_fall\nhide\nif <(Sprite_N) = [10]> then\n set [sprite_n v] to [1]\n switch costume to (cube_01 v)\n point in direction (90)\n set [vx v] to [0]\n set [vy v] to [0]\n set [pause v] to [1]\n broadcast (DEATH_FALL v)\n wait (0.3) seconds\n show\n set [pause v] to [0]\nelse\n set [sprite_n v] to [1]\n switch costume to (cube_01 v)\n point in direction (90)\n set [vx v] to [0]\n set [vy v] to [0]\n set [pause v] to [1]\n broadcast (DEATH_FALL v)\n wait (0.3) seconds\n go to x: ([x position v] of [sprite1 v]) y: ([y position v] of [sprite1 v])\n show\n wait (0.2) seconds\n set [ghost v] effect to (50)\n wait (0.2) seconds\n set [ghost v] effect to (0)\n wait (0.2) seconds\n set [ghost v] effect to (50)\n wait (0.2) seconds\n set [ghost v] effect to (0)\n set [pause v] to [0]\nend\n\nwhen [space v] key pressed\ngo to (mouse-pointer v)\n\n@Sprite2\n\nwhen I receive [restart v]\ngo to [front v] layer\ngo [backward v] (11) layers\ngo to x: (0) y: (0)\n\nwhen flag clicked\nhide\n\nwhen I receive [go v]\nshow\ngo to [front v] layer\ngo [backward v] (11) layers\ngo to x: (0) y: (0)\nforever\n if <(PROGRESSI) = [0]> then\n switch costume to (costume1 v)\n end\n if <(PROGRESSI) = [1]> then\n switch costume to (costume2 v)\n end\n if <(PROGRESSI) = [2]> then\n switch costume to (stage3 v)\n end\n if <(PROGRESSI) = [3]> then\n switch costume to (stage2 v)\n end\n if <(PROGRESSI) = [4]> then\n switch costume to (stage4 v)\n end\n if <(PROGRESSI) = [5]> then\n switch costume to (stage5 v)\n end\n if <(PROGRESSI) = [6]> then\n switch costume to (stage6 v)\n end\n if <(PROGRESSI) = [7]> then\n switch costume to (stage7 v)\n end\n if <(PROGRESSI) = [8]> then\n switch costume to (stage8 v)\n end\n if <(PROGRESSI) = [9]> then\n switch costume to (stage9 v)\n end\n if <(PROGRESSI) = [10]> then\n switch costume to (stage10 v)\n end\n if <(PROGRESSI) = [11]> then\n switch costume to (stage11 v)\n end\n if <(PROGRESSI) = [12]> then\n switch costume to (stage12 v)\n end\n if <(PROGRESSI) = [13]> then\n switch costume to (stage13 v)\n end\n if <(PROGRESSI) = [14]> then\n switch costume to (stage14 v)\n end\n if <(PROGRESSI) = [15]> then\n switch costume to (stage15 v)\n end\n if <(PROGRESSI) = [16]> then\n switch costume to (stage16 v)\n end\n if <(PROGRESSI) = [17]> then\n switch costume to (stage17 v)\n end\n if <(PROGRESSI) = [18]> then\n switch costume to (stage18 v)\n end\n if <(PROGRESSI) = [19]> then\n switch costume to (stage19 v)\n end\n if <(PROGRESSI) = [20]> then\n switch costume to (stage20 v)\n end\n if <(PROGRESSI) = [21]> then\n switch costume to (stage21 v)\n end\n if <(PROGRESSI) = [22]> then\n switch costume to (stage22 v)\n end\nend\n\nwhen I receive [very end v]\nhide\n\n@stage1_2\n\nwhen I receive [restart v]\ngo to x: (0) y: (0)\ngo to [front v] layer\ngo [backward v] (10) layers\n\nwhen flag clicked\nhide\n\nwhen I receive [go v]\nshow\ngo to x: (0) y: (0)\ngo to [front v] layer\ngo [backward v] (10) layers\nforever\n if <(PROGRESSI) = [0]> then\n switch costume to (stage1_2 v)\n end\n if <(PROGRESSI) = [1]> then\n switch costume to (stage1_2 v)\n end\n if <(PROGRESSI) = [2]> then\n switch costume to (stage2_2 v)\n end\n if <(PROGRESSI) = [3]> then\n switch costume to (stage2_2 v)\n end\n if <(PROGRESSI) = [4]> then\n switch costume to (stage3_2 v)\n end\n if <(PROGRESSI) = [5]> then\n switch costume to (stage3_2 v)\n end\n if <(PROGRESSI) = [6]> then\n switch costume to (stage4_2 v)\n end\n if <(PROGRESSI) = [7]> then\n switch costume to (stage4_2 v)\n end\n if <(PROGRESSI) = [8]> then\n switch costume to (stage5_2 v)\n end\n if <(PROGRESSI) = [9]> then\n switch costume to (stage5_2 v)\n end\n if <(PROGRESSI) = [10]> then\n switch costume to (stage6_2 v)\n end\n if <(PROGRESSI) = [11]> then\n switch costume to (stage6_2 v)\n end\n if <(PROGRESSI) = [12]> then\n switch costume to (stage7_2 v)\n end\n if <(PROGRESSI) = [13]> then\n switch costume to (stage7_2 v)\n end\n if <(PROGRESSI) = [14]> then\n switch costume to (stage8_2 v)\n end\n if <(PROGRESSI) = [15]> then\n switch costume to (stage8_2 v)\n end\n if <(PROGRESSI) = [16]> then\n switch costume to (stage9_2 v)\n end\n if <(PROGRESSI) = [17]> then\n switch costume to (stage9_2 v)\n end\n if <(PROGRESSI) = [18]> then\n switch costume to (stage10_2 v)\n end\n if <(PROGRESSI) = [19]> then\n switch costume to (stage10_2 v)\n end\n if <(PROGRESSI) = [20]> then\n switch costume to (stage11_2 v)\n end\n if <(PROGRESSI) = [21]> then\n switch costume to (stage11_2 v)\n end\n if <(PROGRESSI) = [22]> then\n switch costume to (stage12_2 v)\n end\nend\n\nwhen I receive [very end v]\nhide\n\n@Door_01\n\ndefine Destroyed\nbroadcast (DOOR_DESTROYED v)\nset [brightness v] effect to (25)\nwait (0.1) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [progressi v] to ((PROGRESSI) + (1))\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nhide\nset [brightness v] effect to (0)\n\nwhen I receive [restart v]\nwait (0.05) seconds\nset [destroyed v] to [0]\nset [costume v] to [1]\ngo to x: (151) y: (106)\nswitch costume to (door_01 v)\nshow\ngo to [front v] layer\ngo [backward v] (9) layers\n\nwhen I receive [death_fall v]\nwait (0.3) seconds\nif <(PROGRESSI) = [1]> then\n set [costume v] to [1]\n set [destroyed v] to [0]\n set [progressi v] to [0]\n switch costume to (door_01 v)\n show\nend\nif <(PROGRESSI) = [3]> then\n set [costume v] to [1]\n set [destroyed v] to [0]\n set [progressi v] to [2]\n switch costume to (door_01 v)\n show\nend\nif <(PROGRESSI) = [5]> then\n set [costume v] to [1]\n set [destroyed v] to [0]\n set [progressi v] to [4]\n switch costume to (door_01 v)\n show\nend\nif <(PROGRESSI) = [7]> then\n set [costume v] to [1]\n set [destroyed v] to [0]\n set [progressi v] to [6]\n switch costume to (door_01 v)\n show\nend\nif <(PROGRESSI) = [9]> then\n set [costume v] to [1]\n set [destroyed v] to [0]\n set [progressi v] to [8]\n switch costume to (door_01 v)\n show\nend\nif <(PROGRESSI) = [11]> then\n set [costume v] to [1]\n set [destroyed v] to [0]\n set [progressi v] to [10]\n switch costume to (door_01 v)\n show\nend\nif <(PROGRESSI) = [13]> then\n set [costume v] to [1]\n set [destroyed v] to [0]\n set [progressi v] to [12]\n switch costume to (door_01 v)\n show\nend\nif <(PROGRESSI) = [15]> then\n set [costume v] to [1]\n set [destroyed v] to [0]\n set [progressi v] to [14]\n switch costume to (door_01 v)\n show\nend\nif <(PROGRESSI) = [17]> then\n set [costume v] to [1]\n set [destroyed v] to [0]\n set [progressi v] to [16]\n switch costume to (door_01 v)\n show\nend\nif <(PROGRESSI) = [19]> then\n set [costume v] to [1]\n set [destroyed v] to [0]\n set [progressi v] to [18]\n switch costume to (door_01 v)\n show\nend\nif <(PROGRESSI) = [21]> then\n set [costume v] to [1]\n set [destroyed v] to [0]\n set [progressi v] to [20]\n switch costume to (door_01 v)\n show\nend\n\nwhen I receive [level_change v]\nif <(PROGRESSI) = [2]> then\n set [costume v] to [1]\n set [destroyed v] to [0]\n switch costume to (door_01 v)\n go to x: (220) y: (107)\n show\nend\nif <(PROGRESSI) = [4]> then\n set [costume v] to [1]\n set [destroyed v] to [0]\n switch costume to (door_01 v)\n go to x: (227) y: (-123)\n show\nend\nif <(PROGRESSI) = [6]> then\n set [costume v] to [1]\n set [destroyed v] to [0]\n switch costume to (door_01 v)\n go to x: (57) y: (107)\n show\nend\nif <(PROGRESSI) = [8]> then\n set [costume v] to [1]\n set [destroyed v] to [0]\n switch costume to (door_01 v)\n go to x: (200) y: (-120)\n show\nend\nif <(PROGRESSI) = [10]> then\n set [costume v] to [1]\n set [destroyed v] to [0]\n switch costume to (door_01 v)\n go to x: (225) y: (124)\n show\nend\nif <(PROGRESSI) = [12]> then\n set [costume v] to [1]\n set [destroyed v] to [0]\n switch costume to (door_01 v)\n go to x: (207) y: (-111)\n show\nend\nif <(PROGRESSI) = [14]> then\n set [costume v] to [1]\n set [destroyed v] to [0]\n switch costume to (door_01 v)\n go to x: (226) y: (-111)\n show\nend\nif <(PROGRESSI) = [16]> then\n set [costume v] to [1]\n set [destroyed v] to [0]\n switch costume to (door_01 v)\n go to x: (227) y: (106)\n show\nend\nif <(PROGRESSI) = [18]> then\n set [costume v] to [1]\n set [destroyed v] to [0]\n switch costume to (door_01 v)\n go to x: (227) y: (-111)\n show\nend\nif <(PROGRESSI) = [20]> then\n set [costume v] to [1]\n set [destroyed v] to [0]\n switch costume to (door_01 v)\n go to x: (227) y: (106)\n show\nend\nif <(PROGRESSI) = [22]> then\n hide\n set [costume v] to [1]\n set [destroyed v] to [1]\n switch costume to (door_01 v)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [go v]\nwait (0.05) seconds\nset [destroyed v] to [0]\nset [costume v] to [1]\ngo to x: (151) y: (106)\nswitch costume to (door_01 v)\nshow\ngo to [front v] layer\ngo [backward v] (9) layers\nforever\n if <<(PAUSE) = [0]> and <(Destroyed) = [0]>> then\n if <touching (cube_01 v)?> then\n if <(Sprite_N) > [3]> then\n set [destroyed v] to [1]\n Destroyed\n end\n end\n end\nend\n\n@Enemy_1_01\n\nwhen I receive [end_fire_1 v]\nif <(firing) < [2]> then\n set [firing v] to [0]\n set [contatore v] to [0]\nend\n\ndefine Destroyed\nbroadcast (DESTROYED v)\nset [brightness v] effect to (25)\nwait (0.1) seconds\nset [costume v] to [3]\nswitch costume to (Costume)\nif <([direction v] of [cube_01 v]) = [90]> then\n change x by (20)\nelse\n change x by (-20)\nend\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nhide\nset [brightness v] effect to (0)\n\ndefine Fire\nswitch costume to (enemy_1_02 v)\nset [firing v] to [1]\nbroadcast (FIRE_1 v)\n\nwhen I receive [death_fall v]\nwait (0.3) seconds\nset [firing v] to [0]\nset [contatore v] to [0]\nswitch costume to (enemy_1_01 v)\nif <(PROGRESSI) < [2]> then\n point in direction (90)\n go to x: ((X_Sinistra) + (1)) y: (y position)\n show\nend\nif <<(PROGRESSI) = [2]> or <(PROGRESSI) = [3]>> then\n point in direction (90)\n go to x: ((X_Sinistra) + (1)) y: (y position)\n show\nend\nif <<(PROGRESSI) = [4]> or <(PROGRESSI) = [5]>> then\n point in direction (-90)\n go to x: ((X_destra) - (1)) y: (y position)\n show\nend\nif <<(PROGRESSI) = [6]> or <(PROGRESSI) = [7]>> then\n set [firing v] to [2]\n hide\nend\nif <<(PROGRESSI) = [8]> or <(PROGRESSI) = [9]>> then\n hide\n set [firing v] to [2]\nend\nif <<(PROGRESSI) = [10]> or <(PROGRESSI) = [11]>> then\n point in direction (-90)\n go to x: ((X_destra) - (1)) y: (y position)\n show\nend\nif <<(PROGRESSI) = [12]> or <(PROGRESSI) = [13]>> then\n point in direction (-90)\n go to x: ((X_destra) - (1)) y: (y position)\n show\nend\nif <<(PROGRESSI) = [14]> or <(PROGRESSI) = [15]>> then\n hide\n set [firing v] to [2]\nend\nif <<(PROGRESSI) = [16]> or <(PROGRESSI) = [17]>> then\n point in direction (-90)\n go to x: ((X_destra) - (1)) y: (y position)\n show\nend\nif <<(PROGRESSI) = [18]> or <(PROGRESSI) = [19]>> then\n point in direction (-90)\n go to x: ((X_destra) - (1)) y: (y position)\n show\nend\nif <<(PROGRESSI) = [20]> or <(PROGRESSI) = [21]>> then\n point in direction (-90)\n go to x: ((X_destra) - (1)) y: (y position)\n show\nend\nif <(PROGRESSI) = [22]> then\n hide\n set [firing v] to [2]\nend\n\nwhen I receive [level_change v]\nset rotation style [left-right v]\nset [firing v] to [0]\nset [contatore v] to [0]\nset [restart_speed v] to [0]\nset [velocità v] to (Velocità_max)\npoint in direction (90)\nswitch costume to (enemy_1_01 v)\nif <(PROGRESSI) = [2]> then\n set [visible v] to [1]\n go to x: (-146) y: (-121)\n set [x_sinistra v] to [-146]\n set [x_destra v] to [19]\n show\nend\nif <(PROGRESSI) = [4]> then\n set [visible v] to [1]\n go to x: (108) y: (107)\n set [x_sinistra v] to [-49]\n set [x_destra v] to [108]\n show\nend\nif <(PROGRESSI) = [6]> then\n set [visible v] to [0]\n set [firing v] to [2]\n hide\nend\nif <(PROGRESSI) = [8]> then\n set [visible v] to [0]\n set [firing v] to [2]\n hide\nend\nif <(PROGRESSI) = [10]> then\n set [velocità_max v] to [3]\n set [delay v] to [12]\n set [visible v] to [1]\n go to x: (-101) y: (-107)\n set [x_sinistra v] to [-207]\n set [x_destra v] to [-107]\n show\nend\nif <(PROGRESSI) = [12]> then\n set [velocità_max v] to [3]\n set [delay v] to [15]\n set [visible v] to [1]\n go to x: (156) y: (125)\n set [x_sinistra v] to [-21]\n set [x_destra v] to [156]\n show\nend\nif <(PROGRESSI) = [14]> then\n set [visible v] to [0]\n set [firing v] to [2]\n hide\nend\nif <(PROGRESSI) = [16]> then\n set [velocità_max v] to [4]\n set [delay v] to [12]\n set [visible v] to [1]\n go to x: (161) y: (109)\n set [x_sinistra v] to [-37]\n set [x_destra v] to [161]\n show\nend\nif <(PROGRESSI) = [18]> then\n set [velocità_max v] to [4]\n set [delay v] to [10]\n set [visible v] to [1]\n go to x: (170) y: (-112)\n set [x_sinistra v] to [-56]\n set [x_destra v] to [170]\n show\nend\nif <(PROGRESSI) = [20]> then\n set [velocità_max v] to [4]\n set [delay v] to [10]\n set [visible v] to [1]\n go to x: (170) y: (-112)\n set [x_sinistra v] to [-56]\n set [x_destra v] to [170]\n show\nend\nif <(PROGRESSI) = [22]> then\n set [visible v] to [0]\n set [firing v] to [2]\n hide\nend\n\nwhen I receive [restart v]\nset [visible v] to [1]\nset [x_sinistra v] to [-151]\nset [x_destra v] to [-75]\nset rotation style [left-right v]\nset [firing v] to [0]\nset [delay v] to [20]\nset [contatore v] to [0]\nset [h v] to [30]\nset [restart_speed v] to [0]\nset [dy v] to [60]\nset [velocità_max v] to [2]\nset [velocità v] to (Velocità_max)\ngo to x: (-151) y: (67)\npoint in direction (90)\nshow\ngo to [front v] layer\ngo [backward v] (2) layers\nswitch costume to (enemy_1_01 v)\n\nwhen flag clicked\nhide\n\nwhen I receive [go v]\nshow\nset [visible v] to [1]\nset [x_sinistra v] to [-151]\nset [x_destra v] to [-75]\nset rotation style [left-right v]\nset [firing v] to [0]\nset [delay v] to [20]\nset [contatore v] to [0]\nset [h v] to [30]\nset [restart_speed v] to [0]\nset [dy v] to [60]\nset [velocità_max v] to [2]\nset [velocità v] to (Velocità_max)\ngo to x: (-151) y: (67)\npoint in direction (90)\nshow\ngo to [front v] layer\ngo [backward v] (2) layers\nswitch costume to (enemy_1_01 v)\nforever\n if <<(PAUSE) = [0]> and <(Visible) = [1]>> then\n if <<touching (cube_01 v)?> and <(Sprite_N) > [3]>> then\n set [firing v] to [2]\n Destroyed\n else\n if <(firing) = [1]> then\n if <([abs v] of (([x position v] of [enemy_1_03_laser v]) - (x position)) ) > [40]> then\n switch costume to (enemy_1_01 v)\n end\n else\n switch costume to (enemy_1_01 v)\n end\n change x by (Velocità)\n if <(x position) < (X_Sinistra)> then\n set [velocità v] to (Velocità_max)\n point in direction (90)\n end\n if <(x position) > (X_destra)> then\n set [velocità v] to ((Velocità_max) * (-1))\n point in direction (-90)\n end\n if <<(([y position v] of [sprite1 v]) + (H)) > ((y position) - (DY))> and <(([y position v] of [sprite1 v]) + (H)) < ((y position) + (DY))>> then\n set [contatore v] to ((Contatore) + (1))\n if <not <(Velocità) = [0]>> then\n set [restart_speed v] to (Velocità)\n end\n set [velocità v] to [0]\n point towards (sprite1 v)\n if <<(Contatore) = (Delay)> and <(firing) = [0]>> then\n Fire\n end\n else\n set [contatore v] to [0]\n if <(Velocità) = [0]> then\n set [velocità v] to (Restart_speed)\n if <(Restart_speed) > [0]> then\n point in direction (90)\n else\n point in direction (-90)\n end\n end\n end\n end\n end\nend\n\n@Enemy_1_03_laser\n\ndefine animate\nswitch costume to (enemy_1_03_laser_01 v)\nwait (0.01) seconds\nswitch costume to (enemy_1_03_laser_02 v)\nwait (0.05) seconds\nswitch costume to (enemy_1_03_laser_03 v)\nwait (0.05) seconds\nswitch costume to (enemy_1_03_laser_04 v)\nwait (0.05) seconds\nhide\ngo to x: (0) y: (0)\nswitch costume to (enemy_1_03_laser v)\n\ndefine animate2\nbroadcast (Z_SOUND_2 v)\ncreate clone of (_myself_ v)\n\nwhen I receive [fire_1 v]\nshow\nset rotation style [left-right v]\nif <<([direction v] of [enemy_1_01 v]) > [0]> and <([direction v] of [enemy_1_01 v]) < [180]>> then\n point in direction (90)\nelse\n point in direction (-90)\nend\ngo to x: ([x position v] of [enemy_1_01 v]) y: ([y position v] of [enemy_1_01 v])\nset [moving v] to [1]\nset [rimbalzo v] to [0]\n\nwhen I receive [level_change v]\nhide\nset [rimbalzo v] to [0]\nset [moving v] to [0]\nset rotation style [left-right v]\nswitch costume to (enemy_1_03_laser v)\n\nwhen I receive [death_fall v]\nwait (0.3) seconds\nhide\nset [rimbalzo v] to [0]\nset [moving v] to [0]\nset rotation style [left-right v]\nswitch costume to (enemy_1_03_laser v)\n\nwhen I start as a clone\ngo to [front v] layer\nswitch costume to (enemy_1_03_laser_02 v)\nwait (0.01) seconds\nswitch costume to (enemy_1_03_laser_01 v)\nwait (0.01) seconds\nswitch costume to (enemy_1_03_laser v)\nset [velocità_2 v] to (((-1) * (Velocità)) * (2))\nforever\n if <(moving) = [1]> then\n move (Velocità_2) steps\n end\n if <touching (_edge_ v)?> then\n set [moving v] to [0]\n set [rimbalzo v] to [0]\n hide\n broadcast (END_FIRE_1 v)\n delete this clone\n end\nend\n\nwhen I receive [restart v]\nset [rimbalzo v] to [0]\nset [moving v] to [0]\nset [velocità v] to [10]\nset rotation style [left-right v]\ngo to [front v] layer\ngo [backward v] (3) layers\nhide\nswitch costume to (enemy_1_03_laser v)\n\ndefine rimbalza\nif <<([x position v] of [cube_01 v]) > (x position)> and <([direction v] of [cube_01 v]) = [-90]>> then\n set rotation style [all around v]\n point in direction (pick random (75) to (135))\n go to x: ((x position) - (10)) y: (y position)\n set [velocità_2 v] to [0]\n set [rimbalzo v] to [1]\n animate2\nelse\n if <<([x position v] of [cube_01 v]) < (x position)> and <([direction v] of [cube_01 v]) = [90]>> then\n set rotation style [all around v]\n point in direction (pick random (-135) to (-75))\n go to x: ((x position) + (10)) y: (y position)\n set [velocità_2 v] to [0]\n set [rimbalzo v] to [1]\n animate2\n else\n set [rimbalzo v] to [0]\n set [vx v] to [0]\n set [vy v] to [0]\n set [moving v] to [0]\n broadcast (DEATH_1 v)\n animate\n broadcast (END_FIRE_1 v)\n end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [go v]\nset [rimbalzo v] to [0]\nset [moving v] to [0]\nset [velocità v] to [10]\nset rotation style [left-right v]\ngo to [front v] layer\ngo [backward v] (3) layers\nhide\nswitch costume to (enemy_1_03_laser v)\nforever\n if <(PAUSE) = [0]> then\n if <(rimbalzo) = [0]> then\n if <(moving) = [1]> then\n move (Velocità) steps\n end\n if <touching (sprite1 v)?> then\n if <(Sprite_N) > [2]> then\n rimbalza\n else\n set [vx v] to [0]\n set [vy v] to [0]\n set [moving v] to [0]\n broadcast (DEATH_1 v)\n animate\n broadcast (END_FIRE_1 v)\n end\n else\n if <touching (sprite2 v)?> then\n set [moving v] to [0]\n animate\n broadcast (END_FIRE_1 v)\n end\n if <touching (door_01 v)?> then\n if <([costume # v] of [door_01 v]) < [4]> then\n set [moving v] to [0]\n animate\n broadcast (END_FIRE_1 v)\n end\n end\n if <touching (_edge_ v)?> then\n set [moving v] to [0]\n hide\n animate\n broadcast (END_FIRE_1 v)\n end\n end\n else\n hide\n end\n end\nend\n\n@plaat_01\n\nwhen flag clicked\nhide\ngo to [front v] layer\ngo [backward v] (6) layers\nset [visible v] to [0]\nset [y_giu v] to [0]\nset [y_su v] to [0]\nset [vy_addizionale v] to [4]\nforever\n set [delta_y v] to ((y position) - ([y position v] of [cube_01 v]))\n if <(PROGRESSI) < [2]> then\n hide\n end\n if <<(PROGRESSI) = [2]> or <(PROGRESSI) = [3]>> then\n if <(PAUSE) = [0]> then\n show\n change y by (VY_addizionale)\n if <(y position) < (Y_giu)> then\n set [vy_addizionale v] to ((VY_addizionale) * (-1))\n end\n if <(y position) > (Y_su)> then\n set [vy_addizionale v] to ((VY_addizionale) * (-1))\n end\n end\n end\n if <<(PROGRESSI) = [4]> or <(PROGRESSI) = [5]>> then\n hide\n end\n if <<(PROGRESSI) = [6]> or <(PROGRESSI) = [7]>> then\n hide\n end\n if <<(PROGRESSI) = [8]> or <(PROGRESSI) = [9]>> then\n hide\n end\n if <<(PROGRESSI) = [10]> or <(PROGRESSI) = [11]>> then\n if <(PAUSE) = [0]> then\n show\n change y by (VY_addizionale)\n if <(y position) < (Y_giu)> then\n set [vy_addizionale v] to ((VY_addizionale) * (-1))\n end\n if <(y position) > (Y_su)> then\n set [vy_addizionale v] to ((VY_addizionale) * (-1))\n end\n end\n end\n if <<(PROGRESSI) = [12]> or <(PROGRESSI) = [13]>> then\n hide\n end\n if <<(PROGRESSI) = [14]> or <(PROGRESSI) = [15]>> then\n hide\n end\n if <<(PROGRESSI) = [16]> or <(PROGRESSI) = [17]>> then\n hide\n end\n if <<(PROGRESSI) = [18]> or <(PROGRESSI) = [19]>> then\n hide\n end\n if <<(PROGRESSI) = [20]> or <(PROGRESSI) = [21]>> then\n hide\n end\n if <(PROGRESSI) = [22]> then\n hide\n end\nend\n\nwhen I receive [level_change v]\nif <(PROGRESSI) < [2]> then\n hide\nend\nif <<(PROGRESSI) = [2]> or <(PROGRESSI) = [3]>> then\n go to [front v] layer\n go [backward v] (6) layers\n show\n go to x: (106) y: (-141)\n set [y_giu v] to [-141]\n set [y_su v] to [44]\nend\nif <<(PROGRESSI) = [4]> or <(PROGRESSI) = [5]>> then\n hide\nend\nif <<(PROGRESSI) = [6]> or <(PROGRESSI) = [7]>> then\n hide\nend\nif <<(PROGRESSI) = [8]> or <(PROGRESSI) = [9]>> then\n hide\nend\nif <<(PROGRESSI) = [10]> or <(PROGRESSI) = [11]>> then\n go to [front v] layer\n go [backward v] (6) layers\n show\n go to x: (12) y: (120)\n set [y_giu v] to [-140]\n set [y_su v] to [120]\nend\nif <<(PROGRESSI) = [12]> or <(PROGRESSI) = [13]>> then\n hide\nend\nif <<(PROGRESSI) = [14]> or <(PROGRESSI) = [15]>> then\n hide\nend\nif <<(PROGRESSI) = [16]> or <(PROGRESSI) = [17]>> then\n hide\nend\nif <<(PROGRESSI) = [18]> or <(PROGRESSI) = [19]>> then\n hide\nend\nif <<(PROGRESSI) = [20]> or <(PROGRESSI) = [21]>> then\n hide\nend\nif <(PROGRESSI) = [22]> then\n hide\nend\n\nwhen I receive [restart v]\nhide\ngo to [front v] layer\ngo [backward v] (6) layers\nset [visible v] to [0]\nset [y_giu v] to [0]\nset [y_su v] to [0]\nset [vy_addizionale v] to [4]\n\n@plaat_01_shadow\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (8) layers\nforever\n go to x: ([x position v] of [plaat_01 v]) y: ([y position v] of [plaat_01 v])\n if <(PROGRESSI) < [2]> then\n hide\n end\n if <<(PROGRESSI) = [2]> or <(PROGRESSI) = [3]>> then\n show\n end\n if <<(PROGRESSI) = [4]> or <(PROGRESSI) = [5]>> then\n hide\n end\n if <<(PROGRESSI) = [6]> or <(PROGRESSI) = [7]>> then\n hide\n end\n if <<(PROGRESSI) = [8]> or <(PROGRESSI) = [9]>> then\n hide\n end\n if <<(PROGRESSI) = [10]> or <(PROGRESSI) = [11]>> then\n show\n end\n if <<(PROGRESSI) = [12]> or <(PROGRESSI) = [13]>> then\n hide\n end\n if <<(PROGRESSI) = [14]> or <(PROGRESSI) = [15]>> then\n hide\n end\n if <<(PROGRESSI) = [16]> or <(PROGRESSI) = [17]>> then\n hide\n end\n if <<(PROGRESSI) = [18]> or <(PROGRESSI) = [19]>> then\n hide\n end\n if <<(PROGRESSI) = [20]> or <(PROGRESSI) = [21]>> then\n hide\n end\n if <(PROGRESSI) = [22]> then\n hide\n end\nend\n\nwhen I receive [restart v]\ngo to [front v] layer\ngo [backward v] (8) layers\n\n@Enemy_1_2\n\nwhen flag clicked\nset [visible v] to [0]\nset [x_sinistra v] to [-151]\nset [x_destra v] to [-75]\nset rotation style [left-right v]\nset [firing v] to [2]\nset [delay v] to [15]\nset [contatore v] to [0]\nset [h v] to [30]\nset [restart_speed v] to [0]\nset [dy v] to [60]\nset [velocità_max v] to [3]\nset [velocità v] to (Velocità_max)\ngo to x: (-151) y: (67)\npoint in direction (90)\ngo to [front v] layer\ngo [backward v] (4) layers\nhide\nswitch costume to (enemy_1_01 v)\nforever\n if <<(PAUSE) = [0]> and <(Visible) = [1]>> then\n if <<touching (cube_01 v)?> and <(Sprite_N) > [3]>> then\n set [firing v] to [2]\n Destroyed\n else\n if <(firing) = [1]> then\n if <([abs v] of (([x position v] of [enemy_1_03_laser2 v]) - (x position)) ) > [40]> then\n switch costume to (enemy_1_01 v)\n end\n else\n switch costume to (enemy_1_01 v)\n end\n change x by (Velocità)\n if <(x position) < (X_Sinistra)> then\n set [velocità v] to (Velocità_max)\n point in direction (90)\n end\n if <(x position) > (X_destra)> then\n set [velocità v] to ((Velocità_max) * (-1))\n point in direction (-90)\n end\n if <<(([y position v] of [sprite1 v]) + (H)) > ((y position) - (DY))> and <(([y position v] of [sprite1 v]) + (H)) < ((y position) + (DY))>> then\n set [contatore v] to ((Contatore) + (1))\n if <not <(Velocità) = [0]>> then\n set [restart_speed v] to (Velocità)\n end\n set [velocità v] to [0]\n point towards (sprite1 v)\n if <<(Contatore) = (Delay)> and <(firing) = [0]>> then\n Fire\n end\n else\n set [contatore v] to [0]\n if <(Velocità) = [0]> then\n set [velocità v] to (Restart_speed)\n if <(Restart_speed) > [0]> then\n point in direction (90)\n else\n point in direction (-90)\n end\n end\n end\n end\n end\nend\n\ndefine Fire\nswitch costume to (enemy_1_02 v)\nset [firing v] to [1]\nbroadcast (FIRE_2 v)\n\ndefine Destroyed\nbroadcast (DESTROYED v)\nset [brightness v] effect to (25)\nwait (0.1) seconds\nset [costume v] to [3]\nswitch costume to (Costume)\nwait (0.01) seconds\nif <([direction v] of [cube_01 v]) = [90]> then\n change x by (20)\nelse\n change x by (-20)\nend\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nhide\nset [brightness v] effect to (0)\n\nwhen I receive [level_change v]\nset rotation style [left-right v]\nset [firing v] to [0]\nset [contatore v] to [0]\nset [restart_speed v] to [0]\nset [velocità v] to (Velocità_max)\npoint in direction (90)\nswitch costume to (enemy_1_01 v)\nif <(PROGRESSI) < [4]> then\n hide\n set [firing v] to [2]\n set [visible v] to [0]\nend\nif <(PROGRESSI) = [4]> then\n show\n go to [front v] layer\n go [backward v] (1) layers\n set [firing v] to [0]\n go to x: (-126) y: (1)\n set [x_sinistra v] to [-126]\n set [x_destra v] to [59]\n set [visible v] to [1]\nend\nif <(PROGRESSI) = [6]> then\n show\n go to [front v] layer\n go [backward v] (1) layers\n set [firing v] to [0]\n go to x: (-111) y: (37)\n set [x_sinistra v] to [-111]\n set [x_destra v] to [-34]\n set [delay v] to [10]\n set [visible v] to [1]\nend\nif <(PROGRESSI) = [8]> then\n hide\n set [firing v] to [2]\n set [visible v] to [0]\nend\nif <(PROGRESSI) = [10]> then\n hide\n set [firing v] to [2]\n set [visible v] to [0]\nend\nif <(PROGRESSI) = [12]> then\n hide\n set [firing v] to [2]\n set [visible v] to [0]\nend\nif <(PROGRESSI) = [14]> then\n hide\n set [firing v] to [2]\n set [visible v] to [0]\nend\nif <(PROGRESSI) = [16]> then\n hide\n set [firing v] to [2]\n set [visible v] to [0]\nend\nif <(PROGRESSI) = [18]> then\n show\n go to [front v] layer\n go [backward v] (1) layers\n set [firing v] to [0]\n go to x: (171) y: (108)\n set [x_sinistra v] to [70]\n set [x_destra v] to [171]\n set [delay v] to [10]\n set [visible v] to [1]\n set [velocità_max v] to [3]\nend\nif <(PROGRESSI) = [20]> then\n show\n go to [front v] layer\n go [backward v] (1) layers\n set [firing v] to [0]\n go to x: (171) y: (108)\n set [x_sinistra v] to [70]\n set [x_destra v] to [171]\n set [delay v] to [10]\n set [visible v] to [1]\n set [velocità_max v] to [3]\nend\nif <(PROGRESSI) = [22]> then\n hide\n set [firing v] to [2]\n set [visible v] to [0]\nend\n\nwhen I receive [death_fall v]\nwait (0.3) seconds\nset [firing v] to [0]\nset [contatore v] to [0]\nswitch costume to (enemy_1_01 v)\nif <(PROGRESSI) < [4]> then\n hide\n set [firing v] to [2]\nend\nif <<(PROGRESSI) = [4]> or <(PROGRESSI) = [5]>> then\n show\n set [firing v] to [0]\n point in direction (-90)\n go to x: ((X_destra) - (1)) y: (y position)\nend\nif <<(PROGRESSI) = [6]> or <(PROGRESSI) = [7]>> then\n show\n set [firing v] to [0]\n point in direction (-90)\n go to x: ((X_destra) - (1)) y: (y position)\nend\nif <<(PROGRESSI) = [8]> or <(PROGRESSI) = [9]>> then\n hide\n set [firing v] to [2]\nend\nif <<(PROGRESSI) = [10]> or <(PROGRESSI) = [11]>> then\n hide\n set [firing v] to [2]\nend\nif <<(PROGRESSI) = [12]> or <(PROGRESSI) = [13]>> then\n hide\n set [firing v] to [2]\nend\nif <<(PROGRESSI) = [14]> or <(PROGRESSI) = [15]>> then\n hide\n set [firing v] to [2]\nend\nif <<(PROGRESSI) = [16]> or <(PROGRESSI) = [17]>> then\n hide\n set [firing v] to [2]\nend\nif <<(PROGRESSI) = [18]> or <(PROGRESSI) = [19]>> then\n show\n set [firing v] to [0]\n point in direction (-90)\n go to x: ((X_destra) + (1)) y: (y position)\nend\nif <<(PROGRESSI) = [20]> or <(PROGRESSI) = [21]>> then\n show\n set [firing v] to [0]\n point in direction (-90)\n go to x: ((X_destra) + (1)) y: (y position)\nend\nif <(PROGRESSI) = [22]> then\n hide\n set [firing v] to [2]\nend\n\nwhen I receive [restart v]\nset [visible v] to [0]\nset [x_sinistra v] to [-151]\nset [x_destra v] to [-75]\nset rotation style [left-right v]\nset [firing v] to [2]\nset [delay v] to [15]\nset [contatore v] to [0]\nset [h v] to [30]\nset [restart_speed v] to [0]\nset [dy v] to [60]\nset [velocità_max v] to [3]\nset [velocità v] to (Velocità_max)\ngo to x: (-151) y: (67)\npoint in direction (90)\ngo to [front v] layer\ngo [backward v] (4) layers\nhide\nswitch costume to (enemy_1_01 v)\n\nwhen I receive [end_fire_2 v]\nif <(firing) < [2]> then\n set [firing v] to [0]\n set [contatore v] to [0]\nend\n\nwhen flag clicked\nif <touching (enemy_1_03_laser5 v)?> then\n switch costume to (enemy_1_06 v)\nend\n\n@Enemy_1_03_laser2\n\nwhen flag clicked\nset [rimbalzo v] to [0]\nset [moving v] to [0]\nset [velocità v] to [12]\nset rotation style [left-right v]\ngo to [front v] layer\ngo [backward v] (5) layers\nhide\nswitch costume to (enemy_1_03_laser v)\nforever\n if <(PAUSE) = [0]> then\n if <(rimbalzo) = [0]> then\n if <(moving) = [1]> then\n move (Velocità) steps\n end\n if <touching (sprite1 v)?> then\n if <(Sprite_N) > [2]> then\n rimbalza\n else\n set [vx v] to [0]\n set [vy v] to [0]\n set [moving v] to [0]\n broadcast (DEATH_1 v)\n animate\n broadcast (END_FIRE_2 v)\n end\n else\n if <touching (sprite2 v)?> then\n set [moving v] to [0]\n animate\n broadcast (END_FIRE_2 v)\n end\n if <touching (door_01 v)?> then\n if <([costume # v] of [door_01 v]) < [4]> then\n set [moving v] to [0]\n animate\n broadcast (END_FIRE_2 v)\n end\n end\n if <touching (_edge_ v)?> then\n set [moving v] to [0]\n hide\n animate\n broadcast (END_FIRE_2 v)\n end\n end\n else\n hide\n end\n end\nend\n\ndefine animate\nswitch costume to (enemy_1_03_laser_01 v)\nwait (0.01) seconds\nswitch costume to (enemy_1_03_laser_02 v)\nwait (0.05) seconds\nswitch costume to (enemy_1_03_laser_03 v)\nwait (0.05) seconds\nswitch costume to (enemy_1_03_laser_04 v)\nwait (0.05) seconds\nhide\ngo to x: (0) y: (0)\nswitch costume to (enemy_1_03_laser v)\n\ndefine animate2\ncreate clone of (_myself_ v)\n\nwhen I receive [level_change v]\nhide\nset [rimbalzo v] to [0]\nset [moving v] to [0]\nset rotation style [left-right v]\nswitch costume to (enemy_1_03_laser v)\n\nwhen I receive [death_fall v]\nwait (0.3) seconds\nhide\nset [rimbalzo v] to [0]\nset [moving v] to [0]\nset rotation style [left-right v]\nswitch costume to (enemy_1_03_laser v)\n\nwhen I start as a clone\ngo to [front v] layer\nswitch costume to (enemy_1_03_laser_02 v)\nwait (0.01) seconds\nswitch costume to (enemy_1_03_laser_01 v)\nwait (0.01) seconds\nswitch costume to (enemy_1_03_laser v)\nset [velocità_2 v] to (((-1) * (Velocità)) * (2))\nforever\n if <(moving) = [1]> then\n move (Velocità_2) steps\n end\n if <touching (_edge_ v)?> then\n set [moving v] to [0]\n set [rimbalzo v] to [0]\n hide\n broadcast (END_FIRE_2 v)\n delete this clone\n end\nend\n\nwhen I receive [restart v]\nset [rimbalzo v] to [0]\nset [moving v] to [0]\nset [velocità v] to [12]\nset rotation style [left-right v]\ngo to [front v] layer\ngo [backward v] (5) layers\nhide\nswitch costume to (enemy_1_03_laser v)\n\nwhen I receive [fire_2 v]\nshow\ngo to [front v] layer\ngo [backward v] (2) layers\nset rotation style [left-right v]\nif <<([direction v] of [enemy_1_2 v]) > [0]> and <([direction v] of [enemy_1_2 v]) < [180]>> then\n point in direction (90)\nelse\n point in direction (-90)\nend\ngo to x: ([x position v] of [enemy_1_2 v]) y: ([y position v] of [enemy_1_2 v])\nset [moving v] to [1]\nset [rimbalzo v] to [0]\n\ndefine rimbalza\nif <<([x position v] of [cube_01 v]) > (x position)> and <([direction v] of [cube_01 v]) = [-90]>> then\n set rotation style [all around v]\n point in direction (pick random (75) to (135))\n go to x: ((x position) - (10)) y: (y position)\n set [velocità_2 v] to [0]\n set [rimbalzo v] to [1]\n animate2\nelse\n if <<([x position v] of [cube_01 v]) < (x position)> and <([direction v] of [cube_01 v]) = [90]>> then\n set rotation style [all around v]\n point in direction (pick random (-135) to (-75))\n go to x: ((x position) + (10)) y: (y position)\n set [velocità_2 v] to [0]\n set [rimbalzo v] to [1]\n animate2\n else\n set [rimbalzo v] to [0]\n set [vx v] to [0]\n set [vy v] to [0]\n set [moving v] to [0]\n broadcast (DEATH_1 v)\n animate\n broadcast (END_FIRE_2 v)\n end\nend\n\n@Enemy_1_3\n\nwhen I receive [end_fire_3 v]\nif <(firing) < [2]> then\n set [firing v] to [0]\n set [contatore v] to [0]\nend\n\ndefine Destroyed\nif <(dying) = [1]> then\n broadcast (DESTROYED v)\n set [brightness v] effect to (25)\n wait (0.1) seconds\n set [costume v] to [3]\n switch costume to (Costume)\n wait (0.01) seconds\n if <([direction v] of [cube_01 v]) = [90]> then\n change x by (40)\n else\n change x by (-40)\n end\n set [costume v] to ((Costume) + (1))\n switch costume to (Costume)\n wait (0.01) seconds\n set [costume v] to ((Costume) + (1))\n switch costume to (Costume)\n wait (0.01) seconds\n set [costume v] to ((Costume) + (1))\n switch costume to (Costume)\n wait (0.01) seconds\n set [costume v] to ((Costume) + (1))\n switch costume to (Costume)\n wait (0.01) seconds\n set [costume v] to ((Costume) + (1))\n switch costume to (Costume)\n wait (0.01) seconds\n set [costume v] to ((Costume) + (1))\n switch costume to (Costume)\n wait (0.01) seconds\n set [costume v] to ((Costume) + (1))\n switch costume to (Costume)\n wait (0.01) seconds\n set [dying v] to [0]\n hide\n set [brightness v] effect to (0)\nend\n\ndefine Cammina_o_Fermo\nif <(Velocità) = [0]> then\n switch costume to (enemy_1_01 v)\nelse\n if <(Walk_Delay) = [0]> then\n if <(Walk_Costume) > [20]> then\n set [walk_costume v] to [11]\n end\n switch costume to (Walk_Costume)\n end\n set [walk_delay v] to ((Walk_Delay) + (1))\n if <(Walk_Delay) > [2]> then\n set [walk_delay v] to [0]\n set [walk_costume v] to ((Walk_Costume) + (1))\n end\nend\n\nwhen I receive [level_change v]\nset rotation style [left-right v]\nset [firing v] to [0]\nset [contatore v] to [0]\nset [restart_speed v] to [0]\nset [velocità v] to (Velocità_max)\npoint in direction (90)\nswitch costume to (enemy_1_01 v)\nif <(PROGRESSI) < [4]> then\n hide\n set [firing v] to [2]\n set [visible v] to [0]\nend\nif <(PROGRESSI) = [4]> then\n hide\n set [firing v] to [2]\n set [visible v] to [0]\nend\nif <(PROGRESSI) = [6]> then\n set [dying v] to [0]\n show\n go to [front v] layer\n go [backward v] (1) layers\n set [firing v] to [0]\n go to x: (206) y: (102)\n set [x_sinistra v] to [97]\n set [x_destra v] to [206]\n set [delay v] to [15]\n set [visible v] to [1]\nend\nif <(PROGRESSI) = [8]> then\n set [dying v] to [0]\n show\n go to [front v] layer\n go [backward v] (1) layers\n set [firing v] to [0]\n go to x: (151) y: (120)\n set [x_sinistra v] to [17]\n set [x_destra v] to [151]\n set [delay v] to [10]\n set [visible v] to [1]\nend\nif <(PROGRESSI) = [10]> then\n set [dying v] to [0]\n show\n go to [front v] layer\n go [backward v] (1) layers\n set [firing v] to [0]\n go to x: (175) y: (-2)\n set [x_sinistra v] to [114]\n set [x_destra v] to [175]\n set [delay v] to [10]\n set [visible v] to [1]\nend\nif <(PROGRESSI) = [12]> then\n set [dying v] to [0]\n show\n go to [front v] layer\n go [backward v] (1) layers\n set [firing v] to [0]\n go to x: (22) y: (-3)\n set [x_sinistra v] to [22]\n set [x_destra v] to [143]\n set [delay v] to [10]\n set [visible v] to [1]\nend\nif <(PROGRESSI) = [14]> then\n hide\n set [firing v] to [2]\n set [visible v] to [0]\nend\nif <(PROGRESSI) = [16]> then\n set [dying v] to [0]\n show\n go to [front v] layer\n go [backward v] (1) layers\n set [firing v] to [0]\n go to x: (-159) y: (-3)\n set [x_sinistra v] to [-159]\n set [x_destra v] to [-64]\n set [delay v] to [10]\n set [visible v] to [1]\nend\nif <(PROGRESSI) = [18]> then\n set [dying v] to [0]\n show\n go to [front v] layer\n go [backward v] (1) layers\n set [firing v] to [0]\n go to x: (-148) y: (-3)\n set [x_sinistra v] to [-148]\n set [x_destra v] to [-76]\n set [delay v] to [10]\n set [visible v] to [1]\nend\nif <(PROGRESSI) = [20]> then\n hide\n set [firing v] to [2]\n set [visible v] to [0]\nend\nif <(PROGRESSI) = [22]> then\n hide\n set [firing v] to [2]\n set [visible v] to [0]\nend\n\nwhen flag clicked\nset [dying v] to [0]\nset [visible v] to [0]\nset [walk_delay v] to [0]\nset [walk_costume v] to [11]\nset [x_sinistra v] to [-151]\nset [x_destra v] to [-75]\nset rotation style [left-right v]\nset [firing v] to [2]\nset [delay v] to [15]\nset [contatore v] to [0]\nset [h v] to [30]\nset [restart_speed v] to [0]\nset [dy v] to [60]\nset [velocità_max v] to [2]\nset [velocità v] to (Velocità_max)\ngo to x: (-151) y: (67)\npoint in direction (90)\ngo to [front v] layer\ngo [backward v] (4) layers\nhide\nswitch costume to (enemy_1_01 v)\nforever\n if <<(PAUSE) = [0]> and <(Visible) = [1]>> then\n if <<touching (cube_01 v)?> and <(Sprite_N) > [3]>> then\n set [firing v] to [2]\n set [dying v] to [1]\n Destroyed\n else\n if <(firing) = [1]> then\n if <([abs v] of (([x position v] of [enemy_1_03_laser3 v]) - (x position)) ) > [40]> then\n switch costume to (enemy_1_01 v)\n end\n else\n Cammina_o_Fermo\n end\n change x by (Velocità)\n if <(x position) < (X_Sinistra)> then\n set [velocità v] to (Velocità_max)\n point in direction (90)\n end\n if <(x position) > (X_destra)> then\n set [velocità v] to ((Velocità_max) * (-1))\n point in direction (-90)\n end\n if <<(([y position v] of [sprite1 v]) + (H)) > ((y position) - (DY))> and <(([y position v] of [sprite1 v]) + (H)) < ((y position) + (DY))>> then\n set [contatore v] to ((Contatore) + (1))\n if <not <(Velocità) = [0]>> then\n set [restart_speed v] to (Velocità)\n end\n set [velocità v] to [0]\n point towards (sprite1 v)\n if <<(Contatore) = (Delay)> and <(firing) = [0]>> then\n Fire\n end\n else\n set [contatore v] to [0]\n if <(Velocità) = [0]> then\n set [velocità v] to (Restart_speed)\n if <(Restart_speed) > [0]> then\n point in direction (90)\n else\n point in direction (-90)\n end\n end\n end\n end\n end\nend\n\nwhen I receive [restart v]\nset [dying v] to [0]\nset [visible v] to [0]\nset [walk_delay v] to [0]\nset [walk_costume v] to [11]\nset [x_sinistra v] to [-151]\nset [x_destra v] to [-75]\nset rotation style [left-right v]\nset [firing v] to [2]\nset [delay v] to [15]\nset [contatore v] to [0]\nset [h v] to [30]\nset [restart_speed v] to [0]\nset [dy v] to [60]\nset [velocità_max v] to [2]\nset [velocità v] to (Velocità_max)\ngo to x: (-151) y: (67)\npoint in direction (90)\ngo to [front v] layer\ngo [backward v] (4) layers\nhide\nswitch costume to (enemy_1_01 v)\n\ndefine Fire\nswitch costume to (enemy_1_02 v)\nset [firing v] to [1]\nbroadcast (FIRE_3 v)\n\nwhen I receive [death_fall v]\nwait (0.3) seconds\nset [firing v] to [0]\nset [contatore v] to [0]\nswitch costume to (enemy_1_01 v)\nif <(PROGRESSI) < [4]> then\n hide\n set [firing v] to [2]\nend\nif <<(PROGRESSI) = [4]> or <(PROGRESSI) = [5]>> then\n hide\n set [firing v] to [2]\nend\nif <<(PROGRESSI) = [6]> or <(PROGRESSI) = [7]>> then\n show\n set [dying v] to [0]\n set [firing v] to [0]\n point in direction (-90)\n go to x: ((X_destra) - (1)) y: (y position)\nend\nif <<(PROGRESSI) = [8]> or <(PROGRESSI) = [9]>> then\n show\n set [dying v] to [0]\n set [firing v] to [0]\n point in direction (-90)\n go to x: ((X_destra) - (1)) y: (y position)\nend\nif <<(PROGRESSI) = [10]> or <(PROGRESSI) = [11]>> then\n show\n set [dying v] to [0]\n set [firing v] to [0]\n point in direction (-90)\n go to x: ((X_destra) - (1)) y: (y position)\nend\nif <<(PROGRESSI) = [12]> or <(PROGRESSI) = [13]>> then\n show\n set [dying v] to [0]\n set [firing v] to [0]\n point in direction (-90)\n go to x: ((X_destra) - (1)) y: (y position)\nend\nif <<(PROGRESSI) = [14]> or <(PROGRESSI) = [15]>> then\n hide\n set [firing v] to [2]\nend\nif <<(PROGRESSI) = [16]> or <(PROGRESSI) = [17]>> then\n show\n set [dying v] to [0]\n set [firing v] to [0]\n point in direction (90)\n go to x: ((X_Sinistra) - (1)) y: (y position)\nend\nif <<(PROGRESSI) = [18]> or <(PROGRESSI) = [19]>> then\n show\n set [dying v] to [0]\n set [firing v] to [0]\n point in direction (90)\n go to x: ((X_Sinistra) - (1)) y: (y position)\nend\nif <<(PROGRESSI) = [20]> or <(PROGRESSI) = [21]>> then\n hide\n set [firing v] to [2]\nend\nif <(PROGRESSI) = [22]> then\n hide\n set [firing v] to [2]\nend\n\n@Enemy_1_03_laser3\n\nwhen flag clicked\nset [rimbalzo v] to [0]\nset [moving v] to [0]\nset [velocità v] to [12]\nset rotation style [left-right v]\ngo to [front v] layer\ngo [backward v] (5) layers\nhide\nswitch costume to (enemy_1_03_laser v)\nforever\n if <(PAUSE) = [0]> then\n if <(rimbalzo) = [0]> then\n if <(moving) = [1]> then\n move (Velocità) steps\n end\n if <touching (sprite1 v)?> then\n if <(Sprite_N) > [2]> then\n rimbalza\n else\n set [vx v] to [0]\n set [vy v] to [0]\n set [moving v] to [0]\n broadcast (DEATH_1 v)\n animate\n broadcast (END_FIRE_3 v)\n end\n else\n if <touching (sprite2 v)?> then\n set [moving v] to [0]\n animate\n broadcast (END_FIRE_3 v)\n end\n if <touching (door_01 v)?> then\n if <([costume # v] of [door_01 v]) < [4]> then\n set [moving v] to [0]\n animate\n broadcast (END_FIRE_3 v)\n end\n end\n if <touching (_edge_ v)?> then\n set [moving v] to [0]\n hide\n animate\n broadcast (END_FIRE_3 v)\n end\n end\n else\n hide\n end\n end\nend\n\ndefine animate\nswitch costume to (enemy_1_03_laser_01 v)\nwait (0.01) seconds\nswitch costume to (enemy_1_03_laser_02 v)\nwait (0.05) seconds\nswitch costume to (enemy_1_03_laser_03 v)\nwait (0.05) seconds\nswitch costume to (enemy_1_03_laser_04 v)\nwait (0.05) seconds\nhide\ngo to x: (0) y: (0)\nswitch costume to (enemy_1_03_laser v)\n\ndefine animate2\ncreate clone of (_myself_ v)\n\nwhen I receive [level_change v]\nhide\nset [rimbalzo v] to [0]\nset [moving v] to [0]\nset rotation style [left-right v]\nswitch costume to (enemy_1_03_laser v)\n\nwhen I receive [death_fall v]\nwait (0.3) seconds\nhide\nset [rimbalzo v] to [0]\nset [moving v] to [0]\nset rotation style [left-right v]\nswitch costume to (enemy_1_03_laser v)\n\nwhen I start as a clone\ngo to [front v] layer\nswitch costume to (enemy_1_03_laser_02 v)\nwait (0.01) seconds\nswitch costume to (enemy_1_03_laser_01 v)\nwait (0.01) seconds\nswitch costume to (enemy_1_03_laser v)\nset [velocità_2 v] to (((-1) * (Velocità)) * (2))\nforever\n if <(moving) = [1]> then\n move (Velocità_2) steps\n end\n if <touching (_edge_ v)?> then\n set [moving v] to [0]\n set [rimbalzo v] to [0]\n hide\n broadcast (END_FIRE_3 v)\n delete this clone\n end\nend\n\nwhen I receive [restart v]\nset [rimbalzo v] to [0]\nset [moving v] to [0]\nset [velocità v] to [12]\nset rotation style [left-right v]\ngo to [front v] layer\ngo [backward v] (5) layers\nhide\nswitch costume to (enemy_1_03_laser v)\n\nwhen I receive [fire_3 v]\nshow\ngo to [front v] layer\ngo [backward v] (2) layers\nset rotation style [left-right v]\nif <<([direction v] of [enemy_1_3 v]) > [0]> and <([direction v] of [enemy_1_3 v]) < [180]>> then\n point in direction (90)\nelse\n point in direction (-90)\nend\ngo to x: ([x position v] of [enemy_1_3 v]) y: ([y position v] of [enemy_1_3 v])\nset [moving v] to [1]\nset [rimbalzo v] to [0]\n\ndefine rimbalza\nif <<([x position v] of [cube_01 v]) > (x position)> and <([direction v] of [cube_01 v]) = [-90]>> then\n set rotation style [all around v]\n point in direction (pick random (75) to (135))\n go to x: ((x position) - (10)) y: (y position)\n set [velocità_2 v] to [0]\n set [rimbalzo v] to [1]\n animate2\nelse\n if <<([x position v] of [cube_01 v]) < (x position)> and <([direction v] of [cube_01 v]) = [90]>> then\n set rotation style [all around v]\n point in direction (pick random (-135) to (-75))\n go to x: ((x position) + (10)) y: (y position)\n set [velocità_2 v] to [0]\n set [rimbalzo v] to [1]\n animate2\n else\n set [rimbalzo v] to [0]\n set [vx v] to [0]\n set [vy v] to [0]\n set [moving v] to [0]\n broadcast (DEATH_1 v)\n animate\n broadcast (END_FIRE_3 v)\n end\nend\n\n@Enemy_1_4\n\nwhen I receive [end_fire_4 v]\nif <(firing) < [2]> then\n set [firing v] to [0]\n set [contatore v] to [0]\nend\n\ndefine Destroyed\nbroadcast (DESTROYED v)\nset [brightness v] effect to (25)\nwait (0.1) seconds\nset [costume v] to [3]\nswitch costume to (Costume)\nwait (0.01) seconds\nif <([direction v] of [cube_01 v]) = [90]> then\n change x by (40)\nelse\n change x by (-40)\nend\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.01) seconds\nhide\nset [brightness v] effect to (0)\n\ndefine Cammina_o_Fermo\nif <(Velocità) = [0]> then\n switch costume to (enemy_1_01 v)\nelse\n if <(Walk_Delay) = [0]> then\n if <(Walk_Costume) > [20]> then\n set [walk_costume v] to [11]\n end\n switch costume to (Walk_Costume)\n end\n set [walk_delay v] to ((Walk_Delay) + (1))\n if <(Walk_Delay) > [2]> then\n set [walk_delay v] to [0]\n set [walk_costume v] to ((Walk_Costume) + (1))\n end\nend\n\nwhen flag clicked\nset [visible v] to [0]\nset [walk_delay v] to [0]\nset [walk_costume v] to [11]\nset [x_sinistra v] to [-151]\nset [x_destra v] to [-75]\nset rotation style [left-right v]\nset [firing v] to [2]\nset [delay v] to [15]\nset [contatore v] to [0]\nset [h v] to [30]\nset [restart_speed v] to [0]\nset [dy v] to [60]\nset [velocità_max v] to [2]\nset [velocità v] to (Velocità_max)\ngo to x: (-151) y: (67)\npoint in direction (90)\ngo to [front v] layer\ngo [backward v] (4) layers\nhide\nswitch costume to (enemy_1_01 v)\nforever\n if <<(PAUSE) = [0]> and <(Visible) = [1]>> then\n if <<touching (cube_01 v)?> and <(Sprite_N) > [3]>> then\n set [firing v] to [2]\n Destroyed\n else\n if <(firing) = [1]> then\n if <([abs v] of (([x position v] of [enemy_1_03_laser4 v]) - (x position)) ) > [40]> then\n switch costume to (enemy_1_01 v)\n end\n else\n Cammina_o_Fermo\n end\n change x by (Velocità)\n if <(x position) < (X_Sinistra)> then\n set [velocità v] to (Velocità_max)\n point in direction (90)\n end\n if <(x position) > (X_destra)> then\n set [velocità v] to ((Velocità_max) * (-1))\n point in direction (-90)\n end\n if <<(([y position v] of [sprite1 v]) + (H)) > ((y position) - (DY))> and <(([y position v] of [sprite1 v]) + (H)) < ((y position) + (DY))>> then\n set [contatore v] to ((Contatore) + (1))\n if <not <(Velocità) = [0]>> then\n set [restart_speed v] to (Velocità)\n end\n set [velocità v] to [0]\n point towards (sprite1 v)\n if <<(Contatore) = (Delay)> and <(firing) = [0]>> then\n Fire\n end\n else\n set [contatore v] to [0]\n if <(Velocità) = [0]> then\n set [velocità v] to (Restart_speed)\n if <(Restart_speed) > [0]> then\n point in direction (90)\n else\n point in direction (-90)\n end\n end\n end\n end\n end\nend\n\nwhen I receive [level_change v]\nset rotation style [left-right v]\nset [firing v] to [0]\nset [contatore v] to [0]\nset [restart_speed v] to [0]\nset [velocità v] to (Velocità_max)\npoint in direction (90)\nswitch costume to (enemy_1_01 v)\nif <(PROGRESSI) < [4]> then\n hide\n set [firing v] to [2]\n set [visible v] to [0]\nend\nif <(PROGRESSI) = [4]> then\n hide\n set [firing v] to [2]\n set [visible v] to [0]\nend\nif <(PROGRESSI) = [6]> then\n hide\n set [firing v] to [2]\n set [visible v] to [0]\nend\nif <(PROGRESSI) = [8]> then\n show\n go to [front v] layer\n go [backward v] (1) layers\n set [firing v] to [0]\n go to x: (17) y: (-3)\n set [x_sinistra v] to [17]\n set [x_destra v] to [151]\n set [delay v] to [15]\n set [visible v] to [1]\nend\nif <(PROGRESSI) = [10]> then\n show\n go to [front v] layer\n go [backward v] (1) layers\n set [firing v] to [0]\n go to x: (194) y: (119)\n set [x_sinistra v] to [140]\n set [x_destra v] to [194]\n set [delay v] to [15]\n set [visible v] to [1]\nend\nif <(PROGRESSI) = [12]> then\n show\n go to [front v] layer\n go [backward v] (1) layers\n set [firing v] to [0]\n go to x: (148) y: (-116)\n set [x_sinistra v] to [-69]\n set [x_destra v] to [148]\n set [delay v] to [15]\n set [visible v] to [1]\nend\nif <(PROGRESSI) = [14]> then\n hide\n set [firing v] to [2]\n set [visible v] to [0]\nend\nif <(PROGRESSI) = [16]> then\n show\n go to [front v] layer\n go [backward v] (1) layers\n set [firing v] to [0]\n go to x: (184) y: (-3)\n set [x_sinistra v] to [78]\n set [x_destra v] to [184]\n set [delay v] to [10]\n set [visible v] to [1]\nend\nif <(PROGRESSI) = [18]> then\n show\n go to [front v] layer\n go [backward v] (1) layers\n set [firing v] to [0]\n go to x: (191) y: (-2)\n set [x_sinistra v] to [55]\n set [x_destra v] to [191]\n set [delay v] to [10]\n set [visible v] to [1]\nend\nif <(PROGRESSI) = [20]> then\n hide\n set [firing v] to [2]\n set [visible v] to [0]\nend\nif <(PROGRESSI) = [22]> then\n hide\n set [firing v] to [2]\n set [visible v] to [0]\nend\n\nwhen I receive [death_fall v]\nwait (0.3) seconds\nset [firing v] to [0]\nset [contatore v] to [0]\nswitch costume to (enemy_1_01 v)\nif <(PROGRESSI) < [4]> then\n hide\n set [firing v] to [2]\nend\nif <<(PROGRESSI) = [4]> or <(PROGRESSI) = [5]>> then\n hide\n set [firing v] to [2]\nend\nif <<(PROGRESSI) = [6]> or <(PROGRESSI) = [7]>> then\n hide\n set [firing v] to [2]\nend\nif <<(PROGRESSI) = [8]> or <(PROGRESSI) = [9]>> then\n show\n set [firing v] to [0]\n point in direction (-90)\n go to x: ((X_destra) - (1)) y: (y position)\nend\nif <<(PROGRESSI) = [10]> or <(PROGRESSI) = [11]>> then\n show\n set [firing v] to [0]\n point in direction (-90)\n go to x: ((X_destra) - (1)) y: (y position)\nend\nif <<(PROGRESSI) = [12]> or <(PROGRESSI) = [13]>> then\n show\n set [firing v] to [0]\n point in direction (-90)\n go to x: ((X_destra) - (1)) y: (y position)\nend\nif <<(PROGRESSI) = [14]> or <(PROGRESSI) = [15]>> then\n hide\n set [firing v] to [2]\nend\nif <<(PROGRESSI) = [16]> or <(PROGRESSI) = [17]>> then\n show\n set [firing v] to [0]\n point in direction (-90)\n go to x: ((X_destra) + (1)) y: (y position)\nend\nif <<(PROGRESSI) = [18]> or <(PROGRESSI) = [19]>> then\n show\n set [firing v] to [0]\n point in direction (-90)\n go to x: ((X_destra) + (1)) y: (y position)\nend\nif <<(PROGRESSI) = [20]> or <(PROGRESSI) = [21]>> then\n hide\n set [firing v] to [2]\nend\nif <(PROGRESSI) = [22]> then\n hide\n set [firing v] to [2]\nend\n\ndefine Fire\nswitch costume to (enemy_1_02 v)\nset [firing v] to [1]\nbroadcast (FIRE_4 v)\n\nwhen I receive [restart v]\nset [visible v] to [0]\nset [walk_delay v] to [0]\nset [walk_costume v] to [11]\nset [x_sinistra v] to [-151]\nset [x_destra v] to [-75]\nset rotation style [left-right v]\nset [firing v] to [2]\nset [delay v] to [15]\nset [contatore v] to [0]\nset [h v] to [30]\nset [restart_speed v] to [0]\nset [dy v] to [60]\nset [velocità_max v] to [2]\nset [velocità v] to (Velocità_max)\ngo to x: (-151) y: (67)\npoint in direction (90)\ngo to [front v] layer\ngo [backward v] (4) layers\nhide\nswitch costume to (enemy_1_01 v)\n\n@Enemy_1_03_laser4\n\nwhen flag clicked\nset [rimbalzo v] to [0]\nset [moving v] to [0]\nset [velocità v] to [12]\nset rotation style [left-right v]\ngo to [front v] layer\ngo [backward v] (5) layers\nhide\nswitch costume to (enemy_1_03_laser v)\nforever\n if <(PAUSE) = [0]> then\n if <(rimbalzo) = [0]> then\n if <(moving) = [1]> then\n move (Velocità) steps\n end\n if <touching (sprite1 v)?> then\n if <(Sprite_N) > [2]> then\n rimbalza\n else\n set [vx v] to [0]\n set [vy v] to [0]\n set [moving v] to [0]\n broadcast (DEATH_1 v)\n animate\n broadcast (END_FIRE_4 v)\n end\n else\n if <touching (sprite2 v)?> then\n set [moving v] to [0]\n animate\n broadcast (END_FIRE_4 v)\n end\n if <touching (door_01 v)?> then\n if <([costume # v] of [door_01 v]) < [4]> then\n set [moving v] to [0]\n animate\n broadcast (END_FIRE_4 v)\n end\n end\n if <touching (_edge_ v)?> then\n set [moving v] to [0]\n hide\n animate\n broadcast (END_FIRE_4 v)\n end\n end\n else\n hide\n end\n end\nend\n\ndefine animate\nswitch costume to (enemy_1_03_laser_01 v)\nwait (0.01) seconds\nswitch costume to (enemy_1_03_laser_02 v)\nwait (0.05) seconds\nswitch costume to (enemy_1_03_laser_03 v)\nwait (0.05) seconds\nswitch costume to (enemy_1_03_laser_04 v)\nwait (0.05) seconds\nhide\ngo to x: (0) y: (0)\nswitch costume to (enemy_1_03_laser v)\n\ndefine animate2\ncreate clone of (_myself_ v)\n\nwhen I receive [level_change v]\nhide\nset [rimbalzo v] to [0]\nset [moving v] to [0]\nset rotation style [left-right v]\nswitch costume to (enemy_1_03_laser v)\n\nwhen I receive [death_fall v]\nwait (0.3) seconds\nhide\nset [rimbalzo v] to [0]\nset [moving v] to [0]\nset rotation style [left-right v]\nswitch costume to (enemy_1_03_laser v)\n\nwhen I start as a clone\ngo to [front v] layer\nswitch costume to (enemy_1_03_laser_02 v)\nwait (0.01) seconds\nswitch costume to (enemy_1_03_laser_01 v)\nwait (0.01) seconds\nswitch costume to (enemy_1_03_laser v)\nset [velocità_2 v] to (((-1) * (Velocità)) * (2))\nforever\n if <(moving) = [1]> then\n move (Velocità_2) steps\n end\n if <touching (_edge_ v)?> then\n set [moving v] to [0]\n set [rimbalzo v] to [0]\n hide\n broadcast (END_FIRE_4 v)\n delete this clone\n end\nend\n\nwhen I receive [restart v]\nset [rimbalzo v] to [0]\nset [moving v] to [0]\nset [velocità v] to [12]\nset rotation style [left-right v]\ngo to [front v] layer\ngo [backward v] (5) layers\nhide\nswitch costume to (enemy_1_03_laser v)\n\nwhen I receive [fire_4 v]\nshow\ngo to [front v] layer\ngo [backward v] (2) layers\nset rotation style [left-right v]\nif <<([direction v] of [enemy_1_4 v]) > [0]> and <([direction v] of [enemy_1_4 v]) < [180]>> then\n point in direction (90)\nelse\n point in direction (-90)\nend\ngo to x: ([x position v] of [enemy_1_4 v]) y: ([y position v] of [enemy_1_4 v])\nset [moving v] to [1]\nset [rimbalzo v] to [0]\n\ndefine rimbalza\nif <<([x position v] of [cube_01 v]) > (x position)> and <([direction v] of [cube_01 v]) = [-90]>> then\n set rotation style [all around v]\n point in direction (pick random (75) to (135))\n go to x: ((x position) - (10)) y: (y position)\n set [velocità_2 v] to [0]\n set [rimbalzo v] to [1]\n animate2\nelse\n if <<([x position v] of [cube_01 v]) < (x position)> and <([direction v] of [cube_01 v]) = [90]>> then\n set rotation style [all around v]\n point in direction (pick random (-135) to (-75))\n go to x: ((x position) + (10)) y: (y position)\n set [velocità_2 v] to [0]\n set [rimbalzo v] to [1]\n animate2\n else\n set [rimbalzo v] to [0]\n set [vx v] to [0]\n set [vy v] to [0]\n set [moving v] to [0]\n broadcast (DEATH_1 v)\n animate\n broadcast (END_FIRE_4 v)\n end\nend\n\n@Laser_death_1\n\nwhen flag clicked\nhide\ngo to [front v] layer\ngo [backward v] (5) layers\nforever\n if <(PAUSE) = [0]> then\n if <touching (sprite1 v)?> then\n set [vy v] to [0]\n broadcast (DEATH_1 v)\n end\n end\nend\n\nwhen I receive [level_change v]\nif <(PROGRESSI) < [2]> then\n hide\nend\nif <<(PROGRESSI) = [2]> or <(PROGRESSI) = [3]>> then\n hide\nend\nif <<(PROGRESSI) = [4]> or <(PROGRESSI) = [5]>> then\n hide\nend\nif <<(PROGRESSI) = [6]> or <(PROGRESSI) = [7]>> then\n hide\nend\nif <<(PROGRESSI) = [8]> or <(PROGRESSI) = [9]>> then\n show\n go to [front v] layer\n go [backward v] (5) layers\n switch costume to (laser_death_1 v)\n go to x: (-100) y: (84)\nend\nif <<(PROGRESSI) = [10]> or <(PROGRESSI) = [11]>> then\n show\n go to [front v] layer\n go [backward v] (5) layers\n switch costume to (laser_death_1 v)\n go to x: (10) y: (164)\nend\nif <<(PROGRESSI) = [12]> or <(PROGRESSI) = [13]>> then\n show\n go to [front v] layer\n go [backward v] (5) layers\n switch costume to (laser_death_1_2 v)\n go to x: (-52) y: (-45)\nend\nif <<(PROGRESSI) = [14]> or <(PROGRESSI) = [15]>> then\n hide\nend\nif <<(PROGRESSI) = [16]> or <(PROGRESSI) = [17]>> then\n hide\nend\nif <<(PROGRESSI) = [18]> or <(PROGRESSI) = [19]>> then\n show\n go to [front v] layer\n go [backward v] (5) layers\n switch costume to (laser_death_1 v)\n go to x: (-9) y: (-45)\nend\nif <<(PROGRESSI) = [20]> or <(PROGRESSI) = [21]>> then\n hide\nend\n\nwhen I receive [restart v]\nhide\ngo to [front v] layer\ngo [backward v] (5) layers\n\n@Laser_death_2\n\nwhen flag clicked\nset [transparency v] to [100]\nset [contatore_max v] to [40]\nset [contatore v] to (Contatore_MAX)\nhide\ngo to [front v] layer\ngo [backward v] (5) layers\nforever\n if <(PAUSE) = [0]> then\n if <<touching (sprite1 v)?> and <(Transparency) = [0]>> then\n broadcast (DEATH_1 v)\n end\n if <<(PROGRESSI) = [8]> or <(PROGRESSI) = [9]>> then\n set [contatore v] to ((Contatore) + (1))\n if <<(Contatore) > ((Contatore_MAX) - (5))> and <(Contatore) < (Contatore_MAX)>> then\n show\n set [transparency v] to ((Transparency) - (20))\n set [ghost v] effect to (Transparency)\n end\n if <(Contatore) = (Contatore_MAX)> then\n set [transparency v] to [0]\n set [ghost v] effect to (0)\n show\n go to [front v] layer\n go [backward v] (5) layers\n go to x: (-47) y: (-107)\n end\n if <<(Contatore) > (((Contatore_MAX) * (2)) - (5))> and <(Contatore) < ((Contatore_MAX) * (2))>> then\n set [transparency v] to ((Transparency) + (20))\n set [ghost v] effect to (Transparency)\n end\n if <(Contatore) = ((Contatore_MAX) * (2))> then\n hide\n set [contatore v] to [0]\n set [transparency v] to [100]\n end\n end\n if <<(PROGRESSI) = [12]> or <(PROGRESSI) = [13]>> then\n set [contatore v] to ((Contatore) + (1))\n if <<(Contatore) > ((Contatore_MAX) - (5))> and <(Contatore) < (Contatore_MAX)>> then\n show\n set [transparency v] to ((Transparency) - (20))\n set [ghost v] effect to (Transparency)\n end\n if <(Contatore) = (Contatore_MAX)> then\n set [transparency v] to [0]\n set [ghost v] effect to (0)\n show\n go to [front v] layer\n go [backward v] (5) layers\n go to x: (-158) y: (-98)\n end\n if <<(Contatore) > (((Contatore_MAX) * (2)) - (5))> and <(Contatore) < ((Contatore_MAX) * (2))>> then\n set [transparency v] to ((Transparency) + (20))\n set [ghost v] effect to (Transparency)\n end\n if <(Contatore) = ((Contatore_MAX) * (2))> then\n hide\n set [contatore v] to [0]\n set [transparency v] to [100]\n end\n end\n end\nend\n\nwhen I receive [restart v]\nset [transparency v] to [100]\nset [contatore_max v] to [40]\nset [contatore v] to (Contatore_MAX)\nhide\ngo to [front v] layer\ngo [backward v] (5) layers\n\nwhen I receive [level_change v]\nif <(PROGRESSI) < [2]> then\n hide\nend\nif <<(PROGRESSI) = [2]> or <(PROGRESSI) = [3]>> then\n hide\nend\nif <<(PROGRESSI) = [4]> or <(PROGRESSI) = [5]>> then\n hide\nend\nif <<(PROGRESSI) = [6]> or <(PROGRESSI) = [7]>> then\n hide\nend\nif <<(PROGRESSI) = [8]> or <(PROGRESSI) = [9]>> then\n set [contatore v] to [0]\n show\n go to [front v] layer\n go [backward v] (5) layers\n go to x: (-48) y: (-107)\nend\nif <<(PROGRESSI) = [10]> or <(PROGRESSI) = [11]>> then\n hide\nend\nif <<(PROGRESSI) = [12]> or <(PROGRESSI) = [13]>> then\n set [contatore v] to [0]\n show\n go to [front v] layer\n go [backward v] (5) layers\n go to x: (-158) y: (-98)\nend\nif <<(PROGRESSI) = [14]> or <(PROGRESSI) = [15]>> then\n set [contatore v] to [0]\n set [transparency v] to [0]\n set [ghost v] effect to (0)\n show\n go to [front v] layer\n go [backward v] (5) layers\n go to x: (165) y: (-97)\nend\nif <<(PROGRESSI) = [16]> or <(PROGRESSI) = [17]>> then\n hide\nend\nif <<(PROGRESSI) = [20]> or <(PROGRESSI) = [21]>> then\n hide\nend\n\nwhen I receive [end_laser v]\nshow\nset [transparency v] to ((Transparency) - (20))\nset [ghost v] effect to (Transparency)\nwait (0.1) seconds\nset [transparency v] to ((Transparency) - (20))\nset [ghost v] effect to (Transparency)\nwait (0.1) seconds\nset [transparency v] to ((Transparency) - (20))\nset [ghost v] effect to (Transparency)\nwait (0.1) seconds\nset [transparency v] to ((Transparency) - (20))\nset [ghost v] effect to (Transparency)\nwait (0.1) seconds\nhide\n\n@Enemy_1_5\n\nwhen I receive [end_fire_5 v]\nif <(firing) < [2]> then\n set [firing v] to [0]\n set [contatore v] to [0]\nend\n\ndefine Hit\nbroadcast (DESTROYED v)\nset [brightness v] effect to (25)\nswitch costume to (enemy_1_04 v)\nwait (0.1) seconds\nif <([direction v] of [cube_01 v]) = [90]> then\n glide (0.2) secs to x: ((x position) + (70)) y: (y position)\nelse\n glide (0.2) secs to x: ((x position) - (70)) y: (y position)\nend\nswitch costume to (enemy_1_01 v)\nwait (0.1) seconds\nset [damage v] to ((damage) + (1))\nset [boss_health v] to ((damage) + (1))\nif <(damage) < [8]> then\n set [brightness v] effect to (0)\n switch costume to (storm04 v)\n Fly\nelse\n die\nend\n\nwhen flag clicked\nset [damage v] to [0]\nset [visible v] to [0]\nset rotation style [left-right v]\nset [firing v] to [2]\nset [delay v] to [15]\nset [contatore v] to [0]\nset [h v] to [30]\nset [restart_speed v] to [0]\nset [dy v] to [60]\nset [velocità_max v] to [2]\nset [velocità v] to (Velocità_max)\ngo to x: (-151) y: (67)\npoint in direction (90)\ngo to [front v] layer\nhide\nswitch costume to (enemy_1_01 v)\nforever\n if <<(PAUSE) = [0]> and <(Visible) = [1]>> then\n if <<touching (cube_01 v)?> and <(Sprite_N) > [3]>> then\n set [firing v] to [2]\n Hit\n else\n if <([x position v] of [cube_01 v]) > (x position)> then\n point in direction (90)\n else\n point in direction (-90)\n end\n if <(firing) = [1]> then\n if <([abs v] of (([x position v] of [enemy_1_03_laser4 v]) - (x position)) ) > [40]> then\n switch costume to (enemy_1_01 v)\n end\n end\n if <<(([y position v] of [sprite1 v]) + (H)) > ((y position) - (DY))> and <(([y position v] of [sprite1 v]) + (H)) < ((y position) + (DY))>> then\n set [contatore v] to ((Contatore) + (1))\n if <not <(Velocità) = [0]>> then\n set [restart_speed v] to (Velocità)\n end\n set [velocità v] to [0]\n point towards (sprite1 v)\n if <<(Contatore) = (Delay)> and <(firing) = [0]>> then\n Fire\n end\n else\n set [contatore v] to [0]\n end\n end\n end\nend\n\nwhen I receive [level_change v]\nset rotation style [left-right v]\nset [firing v] to [0]\nset [contatore v] to [0]\nset [restart_speed v] to [0]\nset [velocità v] to (Velocità_max)\npoint in direction (90)\nswitch costume to (enemy_1_01 v)\nif <(PROGRESSI) < [14]> then\n hide\n set [firing v] to [2]\n set [visible v] to [0]\nend\nif <(PROGRESSI) = [14]> then\n show\n go to [front v] layer\n go [backward v] (1) layers\n set [firing v] to [0]\n go to x: (59) y: (-106)\n set [delay v] to [12]\n set [visible v] to [1]\n set [damage v] to [0]\nend\nif <(PROGRESSI) > [15]> then\n hide\n set [firing v] to [2]\n set [visible v] to [0]\nend\n\nwhen I receive [death_fall v]\nwait (0.3) seconds\nset [firing v] to [0]\nset [contatore v] to [0]\nswitch costume to (enemy_1_01 v)\nif <(PROGRESSI) < [14]> then\n hide\n set [firing v] to [2]\nend\nif <<(PROGRESSI) = [14]> or <(PROGRESSI) = [15]>> then\n go to x: (59) y: (-106)\n show\n set [firing v] to [0]\n set [damage v] to [0]\n point in direction (-90)\nend\nif <(PROGRESSI) > [15]> then\n hide\n set [firing v] to [2]\nend\n\ndefine Cammina_o_Fermo\nif <(Velocità) = [0]> then\n switch costume to (enemy_1_01 v)\nelse\n if <(Walk_Delay) = [0]> then\n if <(Walk_Costume) > [20]> then\n set [walk_costume v] to [11]\n end\n switch costume to (Walk_Costume)\n end\n set [walk_delay v] to ((Walk_Delay) + (1))\n if <(Walk_Delay) > [2]> then\n set [walk_delay v] to [0]\n set [walk_costume v] to ((Walk_Costume) + (1))\n end\nend\n\ndefine die\nbroadcast (DOOR_DESTROYED v)\nset [firing v] to [2]\nwait (0.05) seconds\nswitch costume to (enemy_1_04 v)\nwait (0.05) seconds\nswitch costume to (enemy_1_05 v)\nwait (0.05) seconds\nswitch costume to (enemy_1_06 v)\nwait (0.05) seconds\nswitch costume to (enemy_1_07 v)\nwait (0.05) seconds\nswitch costume to (enemy_1_08 v)\nwait (0.05) seconds\nswitch costume to (storm17 v)\nwait (0.05) seconds\nswitch costume to (storm16 v)\nwait (0.05) seconds\nswitch costume to (storm2 v)\nwait (0.05) seconds\nhide\nbroadcast (END_LASER v)\n\ndefine Fly\nif <(y position) = [-106]> then\n set [position_y v] to [7]\nend\nif <(y position) = [7]> then\n set [position_y v] to [129]\nend\nif <(y position) = [129]> then\n set [position_y v] to [-106]\nend\nglide (1) secs to x: (x position) y: (POSITION_Y)\nglide (0.2) secs to x: (59) y: (y position)\nset [firing v] to [0]\nset [contatore v] to [0]\nswitch costume to (enemy_1_01 v)\n\nwhen I receive [restart v]\nset [damage v] to [0]\nset [visible v] to [0]\nset [walk_delay v] to [0]\nset [walk_costume v] to [11]\nset [x_sinistra v] to [-151]\nset [x_destra v] to [-75]\nset rotation style [left-right v]\nset [firing v] to [2]\nset [delay v] to [15]\nset [contatore v] to [0]\nset [h v] to [30]\nset [restart_speed v] to [0]\nset [dy v] to [60]\nset [velocità_max v] to [2]\nset [velocità v] to (Velocità_max)\ngo to x: (59) y: (-106)\npoint in direction (90)\ngo to [front v] layer\ngo [backward v] (4) layers\nhide\nswitch costume to (enemy_1_01 v)\n\ndefine Fire\nswitch costume to (enemy_1_02 v)\nset [firing v] to [1]\nbroadcast (FIRE_5 v)\n\n@Enemy_1_03_laser5\n\nwhen flag clicked\nset [rimbalzo v] to [0]\nset [moving v] to [0]\nset [velocità v] to [12]\nset rotation style [left-right v]\ngo to [front v] layer\ngo [backward v] (5) layers\nhide\nswitch costume to (enemy_1_03_laser v)\nforever\n if <(PAUSE) = [0]> then\n if <(rimbalzo) = [0]> then\n if <(moving) = [1]> then\n move (Velocità) steps\n end\n if <touching (sprite1 v)?> then\n if <(Sprite_N) > [2]> then\n rimbalza\n else\n set [vx v] to [0]\n set [vy v] to [0]\n set [moving v] to [0]\n broadcast (DEATH_1 v)\n animate\n broadcast (END_FIRE_5 v)\n end\n else\n if <touching (sprite2 v)?> then\n set [moving v] to [0]\n animate\n broadcast (END_FIRE_5 v)\n end\n if <touching (door_01 v)?> then\n if <([costume # v] of [door_01 v]) < [4]> then\n set [moving v] to [0]\n animate\n broadcast (END_FIRE_5 v)\n end\n end\n if <touching (_edge_ v)?> then\n set [moving v] to [0]\n hide\n animate\n broadcast (END_FIRE_5 v)\n end\n end\n else\n hide\n end\n end\nend\n\ndefine animate\nswitch costume to (enemy_1_03_laser_01 v)\nwait (0.01) seconds\nswitch costume to (enemy_1_03_laser_02 v)\nwait (0.05) seconds\nswitch costume to (enemy_1_03_laser_03 v)\nwait (0.05) seconds\nswitch costume to (enemy_1_03_laser_04 v)\nwait (0.05) seconds\nhide\ngo to x: (0) y: (0)\nswitch costume to (enemy_1_03_laser v)\n\ndefine animate2\ncreate clone of (_myself_ v)\n\nwhen I receive [level_change v]\nhide\nset [rimbalzo v] to [0]\nset [moving v] to [0]\nset rotation style [left-right v]\nswitch costume to (enemy_1_03_laser v)\n\nwhen I receive [death_fall v]\nwait (0.3) seconds\nhide\nset [rimbalzo v] to [0]\nset [moving v] to [0]\nset rotation style [left-right v]\nswitch costume to (enemy_1_03_laser v)\n\nwhen I start as a clone\ngo to [front v] layer\nswitch costume to (enemy_1_03_laser_02 v)\nwait (0.01) seconds\nswitch costume to (enemy_1_03_laser_01 v)\nwait (0.01) seconds\nswitch costume to (enemy_1_03_laser v)\nset [velocità_2 v] to (((-1) * (Velocità)) * (2))\nforever\n if <(moving) = [1]> then\n move (Velocità_2) steps\n end\n if <touching (_edge_ v)?> then\n set [moving v] to [0]\n set [rimbalzo v] to [0]\n hide\n broadcast (END_FIRE_5 v)\n delete this clone\n end\nend\n\nwhen I receive [restart v]\nset [rimbalzo v] to [0]\nset [moving v] to [0]\nset [velocità v] to [12]\nset rotation style [left-right v]\ngo to [front v] layer\ngo [backward v] (5) layers\nhide\nswitch costume to (enemy_1_03_laser v)\n\nwhen I receive [fire_5 v]\nshow\ngo to [front v] layer\ngo [backward v] (2) layers\nset rotation style [left-right v]\nif <<([direction v] of [enemy_1_5 v]) > [0]> and <([direction v] of [enemy_1_5 v]) < [180]>> then\n point in direction (90)\nelse\n point in direction (-90)\nend\ngo to x: ([x position v] of [enemy_1_5 v]) y: (([y position v] of [enemy_1_5 v]) - (7))\nset [moving v] to [1]\nset [rimbalzo v] to [0]\n\ndefine rimbalza\nif <<([x position v] of [cube_01 v]) > (x position)> and <([direction v] of [cube_01 v]) = [-90]>> then\n set rotation style [all around v]\n point in direction (pick random (75) to (135))\n go to x: ((x position) - (10)) y: (y position)\n set [velocità_2 v] to [0]\n set [rimbalzo v] to [1]\n animate2\nelse\n if <<([x position v] of [cube_01 v]) < (x position)> and <([direction v] of [cube_01 v]) = [90]>> then\n set rotation style [all around v]\n point in direction (pick random (-135) to (-75))\n go to x: ((x position) + (10)) y: (y position)\n set [velocità_2 v] to [0]\n set [rimbalzo v] to [1]\n animate2\n else\n set [rimbalzo v] to [0]\n set [vx v] to [0]\n set [vy v] to [0]\n set [moving v] to [0]\n broadcast (DEATH_1 v)\n animate\n broadcast (END_FIRE_5 v)\n end\nend\n\n@health_01\n\nwhen I receive [restart v]\nhide\nset [boss_health v] to [1]\n\nwhen I receive [level_change v]\nset [boss_health v] to [1]\n\nwhen flag clicked\nhide\ngo to [front v] layer\nset [boss_health v] to [1]\nforever\n if <(PROGRESSI) < [14]> then\n hide\n end\n if <<(PROGRESSI) = [14]> or <(PROGRESSI) = [15]>> then\n if <(BOSS_HEALTH) = [9]> then\n hide\n else\n show\n switch costume to (BOSS_HEALTH)\n end\n end\n if <(PROGRESSI) > [15]> then\n hide\n end\nend\n\nwhen I receive [death_fall v]\nset [boss_health v] to [1]\n\n@falling_plaat\n\nwhen flag clicked\nhide\ngo to [front v] layer\ngo [backward v] (6) layers\nset [visible v] to [0]\nset [velocità_caduta v] to [0]\nset [contatore v] to [0]\nforever\n if <(Visible) = [1]> then\n if <<(on_a_falling_plat) = [1]> and <(Velocità_caduta) = [0]>> then\n set [contatore v] to ((Contatore) + (1))\n if <(Contatore) = [10]> then\n set [velocità_caduta v] to [-10]\n end\n end\n if <(Velocità_caduta) < [0]> then\n change y by (Velocità_caduta)\n set [velocità_caduta v] to ((Velocità_caduta) - (4))\n end\n if <touching (_edge_ v)?> then\n set [visible v] to [0]\n hide\n end\n end\nend\n\nwhen I receive [restart v]\nhide\ngo to [front v] layer\ngo [backward v] (6) layers\nset [visible v] to [0]\nset [velocità_caduta v] to [0]\nset [contatore v] to [0]\n\nwhen I receive [death_fall v]\nif <(PROGRESSI) < [20]> then\n hide\n set [visible v] to [0]\nend\nif <<(PROGRESSI) = [20]> or <(PROGRESSI) = [21]>> then\n go to x: (-119) y: (-81)\n set [on_a_falling_plat v] to [0]\n set [velocità_caduta v] to [0]\n set [visible v] to [1]\n set [contatore v] to [0]\n show\nend\nif <(PROGRESSI) > [21]> then\n hide\n set [visible v] to [0]\nend\n\nwhen I receive [level_change v]\nif <(PROGRESSI) < [20]> then\n hide\n set [visible v] to [0]\nend\nif <<(PROGRESSI) = [20]> or <(PROGRESSI) = [21]>> then\n go to x: (-119) y: (-81)\n set [on_a_falling_plat v] to [0]\n set [velocità_caduta v] to [0]\n set [visible v] to [1]\n set [contatore v] to [0]\n show\nend\nif <(PROGRESSI) > [21]> then\n hide\n set [visible v] to [0]\nend\n\n@falling_plaat2\n\nwhen flag clicked\nhide\ngo to [front v] layer\ngo [backward v] (6) layers\nset [visible v] to [0]\nset [velocità_caduta v] to [0]\nset [contatore v] to [0]\nforever\n if <(Visible) = [1]> then\n if <<(on_a_falling_plat2) = [1]> and <(Velocità_caduta) = [0]>> then\n set [contatore v] to ((Contatore) + (1))\n if <(Contatore) = [10]> then\n set [velocità_caduta v] to [-10]\n end\n end\n if <(Velocità_caduta) < [0]> then\n change y by (Velocità_caduta)\n set [velocità_caduta v] to ((Velocità_caduta) - (4))\n end\n if <touching (_edge_ v)?> then\n set [visible v] to [0]\n hide\n end\n end\nend\n\nwhen I receive [restart v]\nhide\ngo to [front v] layer\ngo [backward v] (6) layers\nset [visible v] to [0]\nset [velocità_caduta v] to [0]\n\nwhen I receive [death_fall v]\nif <(PROGRESSI) < [20]> then\n hide\n set [visible v] to [0]\nend\nif <<(PROGRESSI) = [20]> or <(PROGRESSI) = [21]>> then\n go to x: (-25) y: (2)\n set [on_a_falling_plat2 v] to [0]\n set [velocità_caduta v] to [0]\n set [visible v] to [1]\n set [contatore v] to [0]\n show\nend\nif <(PROGRESSI) > [21]> then\n hide\n set [visible v] to [0]\nend\n\nwhen I receive [level_change v]\nif <(PROGRESSI) < [20]> then\n hide\n set [visible v] to [0]\nend\nif <<(PROGRESSI) = [20]> or <(PROGRESSI) = [21]>> then\n go to x: (-25) y: (2)\n set [on_a_falling_plat2 v] to [0]\n set [velocità_caduta v] to [0]\n set [visible v] to [1]\n set [contatore v] to [0]\n show\nend\nif <(PROGRESSI) > [21]> then\n hide\n set [visible v] to [0]\nend\n\n@falling_plaat3\n\nwhen flag clicked\nhide\ngo to [front v] layer\ngo [backward v] (6) layers\nset [visible v] to [0]\nset [velocità_caduta v] to [0]\nset [contatore v] to [0]\nforever\n if <(Visible) = [1]> then\n if <<(on_a_falling_plat3) = [1]> and <(Velocità_caduta) = [0]>> then\n set [contatore v] to ((Contatore) + (1))\n if <(Contatore) = [10]> then\n set [velocità_caduta v] to [-10]\n end\n end\n if <(Velocità_caduta) < [0]> then\n change y by (Velocità_caduta)\n set [velocità_caduta v] to ((Velocità_caduta) - (4))\n end\n if <touching (_edge_ v)?> then\n set [visible v] to [0]\n hide\n end\n end\nend\n\nwhen I receive [restart v]\nhide\ngo to [front v] layer\ngo [backward v] (6) layers\nset [visible v] to [0]\nset [velocità_caduta v] to [0]\n\nwhen I receive [death_fall v]\nif <(PROGRESSI) < [20]> then\n hide\n set [visible v] to [0]\nend\nif <<(PROGRESSI) = [20]> or <(PROGRESSI) = [21]>> then\n go to x: (97) y: (-10)\n set [on_a_falling_plat3 v] to [0]\n set [velocità_caduta v] to [0]\n set [visible v] to [1]\n set [contatore v] to [0]\n show\nend\nif <(PROGRESSI) > [21]> then\n hide\n set [visible v] to [0]\nend\n\nwhen I receive [level_change v]\nif <(PROGRESSI) < [20]> then\n hide\n set [visible v] to [0]\nend\nif <<(PROGRESSI) = [20]> or <(PROGRESSI) = [21]>> then\n go to x: (97) y: (-10)\n set [on_a_falling_plat3 v] to [0]\n set [velocità_caduta v] to [0]\n set [visible v] to [1]\n set [contatore v] to [0]\n show\nend\nif <(PROGRESSI) > [21]> then\n hide\n set [visible v] to [0]\nend\n\n@Vader_01\n\nwhen flag clicked\nhide\ngo to [front v] layer\nswitch costume to (vader_01 v)\nset [damage v] to [0]\nset [rimbalzo v] to [0]\nset [taking_damage v] to [0]\nset [gravity v] to [-3]\nset [vel_y v] to [0]\nset [contatore_1 v] to [0]\nset [probability v] to [0]\nset [attack_distance v] to [60]\nset [is_swording v] to [0]\nset [sword_retard v] to [20]\nset [sword_delay v] to [15]\nforever\n if <<(PAUSE) = [0]> and <(Visible) = [1]>> then\n if <(taking_damage) = [0]> then\n set [delta_x v] to ((x position) - ([x position v] of [sprite1 v]))\n Direction_calc\n Jump_Calc\n Move\n if <([abs v] of (Delta_X) ) < (Attack_Distance)> then\n if <<(Is_Swording) = [1]> and <<([costume # v] of [cube_01 v]) > [2]> and <([costume # v] of [cube_01 v]) < [9]>>> then\n if <(Probability) > [1]> then\n Sword\n end\n else\n if <(Is_Swording) = [1]> then\n if <(Contatore_1) = (Sword_Retard)> then\n Sword\n end\n else\n Sword\n end\n end\n if <(Contatore_1) < (Sword_Retard)> then\n set [contatore_1 v] to ((Contatore_1) + (1))\n end\n else\n set [contatore_1 v] to [0]\n if <(Is_Swording) > [1]> then\n Sword\n end\n end\n if <([abs v] of (Delta_X) ) > ((Attack_Distance) - (1))> then\n if <(BOSS_2_HEALTH) < [5]> then\n set [probability v] to (pick random (1) to (3))\n else\n set [probability v] to (pick random (1) to (2))\n end\n end\n if <touching (sprite1 v)?> then\n hit\n end\n end\n if <<(taking_damage) = [1]> and <([costume # v] of [vader_01 v]) = [1]>> then\n set [taking_damage v] to [0]\n set [probability v] to [2]\n end\n if <(rimbalzo) = [1]> then\n if <([abs v] of (Delta_X) ) > [70]> then\n set [rimbalzo v] to [0]\n end\n end\n end\nend\n\ndefine Direction_calc\nif <(Delta_X) > [0]> then\n point in direction (-90)\nelse\n point in direction (90)\nend\n\ndefine Sword\nset [contatore_1 v] to [0]\nset [is_swording v] to ((Is_Swording) + (1))\nif <(Is_Swording) < [9]> then\n switch costume to (Is_Swording)\nend\nif <(Is_Swording) = [9]> then\n switch costume to (vader_09 v)\nend\nif <(Is_Swording) > [9]> then\n switch costume to (vader_01 v)\n if <(Is_Swording) = (sword_delay)> then\n set [is_swording v] to [1]\n end\nend\n\ndefine Jump_Calc\nif <<(Vy) > [0]> and <([abs v] of (Delta_X) ) < [150]>> then\n if <(Vel_y) = [0]> then\n set [vel_y v] to [20]\n end\nend\nif <not <(Vel_y) = [0]>> then\n change [vel_y v] by (Gravity)\n change y by (Vel_y)\nend\nif <(y position) < [-141]> then\n set [vel_y v] to [0]\n set y to (-141)\nend\n\ndefine hit\nif <<([costume # v] of [cube_01 v]) > [4]> and <([costume # v] of [cube_01 v]) < [8]>> then\n if <<([costume # v] of [vader_01 v]) > [2]> and <([costume # v] of [vader_01 v]) < [9]>> then\n if <(Delta_X) > [0]> then\n if <<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> then\n set [vx v] to [-15]\n else\n set [vx v] to [-20]\n end\n set [rimbalzo v] to [1]\n broadcast (SCONTRO v)\n else\n if <<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> then\n set [vx v] to [15]\n else\n set [vx v] to [20]\n end\n set [rimbalzo v] to [1]\n broadcast (SCONTRO v)\n end\n else\n if <(taking_damage) = [0]> then\n switch costume to (vader_10 v)\n set [taking_damage v] to [1]\n set [contatore_1 v] to ((Sword_Retard) / (2))\n Damage\n end\n end\nelse\n set [taking_damage v] to [0]\n if <(rimbalzo) = [0]> then\n if <<([costume # v] of [vader_01 v]) > [4]> and <([costume # v] of [vader_01 v]) < [7]>> then\n broadcast (DEATH_2 v)\n end\n end\nend\n\ndefine Damage\nbroadcast (VADER_HIT v)\nset [brightness v] effect to (50)\nswitch costume to (vader_10 v)\nwait (0.1) seconds\nset [brightness v] effect to (25)\nswitch costume to (vader_11 v)\nwait (0.1) seconds\nset [brightness v] effect to (0)\nswitch costume to (vader_12 v)\nwait (0.1) seconds\nswitch costume to (vader_01 v)\nset [damage v] to ((damage) + (1))\nset [boss_2_health v] to ((damage) + (1))\nif <(damage) > [7]> then\n set [pause v] to [1]\n END\nend\n\ndefine Move\nif <([x position v] of [sprite1 v]) < [0]> then\n if <([x position v] of [sprite1 v]) > [-120]> then\n if <(Delta_X) > [50]> then\n change x by (-5)\n end\n end\nelse\n if <([x position v] of [sprite1 v]) < [120]> then\n if <(Delta_X) < [-50]> then\n change x by (5)\n end\n end\nend\nif <(x position) < [-165]> then\n set x to (-165)\nend\nif <(x position) > [165]> then\n set x to (165)\nend\n\ndefine END\nbroadcast (END_GAME v)\nrepeat until <(y position) = [-141]>\n if <not <(Vel_y) = [0]>> then\n change [vel_y v] by (Gravity)\n change y by (Vel_y)\n end\n if <(y position) < [-141]> then\n set [vel_y v] to [0]\n set y to (-141)\n end\nend\npoint towards (sprite1 v)\nwait (0.5) seconds\nsay [Wait!] for (2) seconds\nwait (6) seconds\nsay [If only you knew the power of the Dark Side] for (4) seconds\nwait (1) seconds\nsay [Do you know what happened to your father?] for (4) seconds\nwait (8) seconds\nsay [No, I am your father!] for (3) seconds\n\nSword\n\nwhen I receive [level_change v]\nif <(PROGRESSI) = [22]> then\n set [damage v] to [0]\n set [rimbalzo v] to [0]\n set [vel_y v] to [0]\n set [contatore_1 v] to [0]\n set [probability v] to [0]\n set [is_swording v] to [1]\n switch costume to (vader_01 v)\n go to x: (76) y: (-141)\n set rotation style [left-right v]\n point in direction (-90)\n set [visible v] to [1]\n set [taking_damage v] to [0]\n show\n go to [front v] layer\nend\n\nwhen I receive [death_fall v]\nif <(PROGRESSI) = [22]> then\n set [damage v] to [0]\n set [rimbalzo v] to [0]\n set [vel_y v] to [0]\n set [contatore_1 v] to [0]\n set [probability v] to [0]\n set [is_swording v] to [1]\n switch costume to (vader_01 v)\n go to x: (76) y: (-141)\n set rotation style [left-right v]\n point in direction (-90)\n set [visible v] to [1]\n set [taking_damage v] to [0]\n show\n go to [front v] layer\nend\n\nwhen I receive [very end v]\nhide\n\n@Vader_HIT\n\nwhen flag clicked\nhide\nset rotation style [left-right v]\nset [delay v] to [0.01]\n\nwhen I receive [scontro v]\npoint in direction ([direction v] of [vader_01 v])\ngo to x: ([x position v] of [vader_01 v]) y: ([y position v] of [vader_01 v])\ngo to [front v] layer\nshow\nset [ghost v] effect to (50)\nwait (delay) seconds\nhide\n\n@health_2\n\nwhen I receive [restart v]\nhide\nset [boss_2_health v] to [1]\n\nwhen I receive [level_change v]\nset [boss_2_health v] to [1]\n\nwhen flag clicked\nhide\ngo to [front v] layer\nset [boss_2_health v] to [1]\nforever\n if <(PROGRESSI) < [22]> then\n hide\n end\n if <(PROGRESSI) = [22]> then\n if <(BOSS_2_HEALTH) = [9]> then\n hide\n else\n show\n switch costume to (BOSS_2_HEALTH)\n end\n end\nend\n\nwhen I receive [death_fall v]\nset [boss_2_health v] to [1]\n\n@menu4\n\nwhen I receive [intro_2 v]\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nset volume to (100) %\nstart sound [Star Wars Theme Song \(8 Bit Remix Cover Version\) - 8 Bit Universe.mp3 v]\nwait (0.5) seconds\nshow\nrepeat (20)\n set [ghost v] to ((ghost) - (5))\n set [ghost v] effect to (ghost)\nend\nwait (3) seconds\nrepeat (20)\n set [ghost v] to ((ghost) + (5))\n set [ghost v] effect to (ghost)\nend\nset [ghost v] effect to (0)\nhide\nwait (1) seconds\nswitch costume to (menu5 v)\nset size to (2) %\nshow\nrepeat (50)\n change size by (2)\nend\nwait (6) seconds\nset [ghost v] to [0]\nrepeat (50)\n set [ghost v] to ((ghost) + (2))\n set [ghost v] effect to (ghost)\nend\nhide\nwait (1) seconds\nswitch costume to (z1 v)\nset [ghost v] effect to (0)\nset size to (100) %\ngo to x: (0) y: (-50)\nset [clone_n v] to [1]\ncreate clone of (_myself_ v)\nset [clone_n v] to [2]\ncreate clone of (_myself_ v)\nset [clone_n v] to [3]\ncreate clone of (_myself_ v)\nset [clone_n v] to [4]\ncreate clone of (_myself_ v)\nset [clone_n v] to [5]\ncreate clone of (_myself_ v)\nset [clone_n v] to [6]\ncreate clone of (_myself_ v)\nset [clone_n v] to [7]\ncreate clone of (_myself_ v)\nset [clone_n v] to [8]\ncreate clone of (_myself_ v)\nwait (52) seconds\nif <(Intro) = [1]> then\n stop all sounds\n set volume to (60) %\n stop [other scripts in sprite v]\n hide\n broadcast (GO v)\n set [intro v] to [2]\nend\n\nwhen flag clicked\nset size to (100) %\nswitch costume to (menu4 v)\nset [ghost v] to [100]\nhide\ngo to x: (0) y: (0)\n\ndefine Title_1\nrepeat until <(y position) = [120]>\n if <(y position) < [-62]> then\n change y by (0.1)\n else\n change y by (0.05)\n end\n change size by (-0.1)\n change [ghost v] effect by (0.15)\nend\ndelete this clone\n\nwhen [space v] key pressed\nif <(Intro) = [1]> then\n stop all sounds\n set volume to (60) %\n stop [other scripts in sprite v]\n hide\n broadcast (GO v)\n set [intro v] to [2]\nend\n\nwhen I start as a clone\nif <(Clone_N) = [1]> then\n show\n switch costume to (z1 v)\n Title_1\nend\nif <(Clone_N) = [2]> then\n wait (3) seconds\n show\n switch costume to (z2 v)\n Title_1\nend\nif <(Clone_N) = [3]> then\n wait (6) seconds\n show\n switch costume to (z3 v)\n Title_1\nend\nif <(Clone_N) = [4]> then\n wait (12) seconds\n show\n switch costume to (z4 v)\n Title_1\nend\nif <(Clone_N) = [5]> then\n wait (15) seconds\n show\n switch costume to (z5 v)\n Title_1\nend\nif <(Clone_N) = [6]> then\n wait (18) seconds\n show\n switch costume to (z6 v)\n Title_1\nend\nif <(Clone_N) = [7]> then\n wait (24) seconds\n show\n switch costume to (z7 v)\n Title_1\nend\nif <(Clone_N) = [8]> then\n wait (27) seconds\n show\n switch costume to (z8 v)\n Title_1\nend\n\nwhen I receive [very end v]\nset [ghost v] effect to (0)\nswitch costume to (menu6 v)\nshow\nwait (4) seconds\nset [intro v] to [4]\nstop all sounds\nstart sound [Star Wars Theme Song \(8 Bit Remix Cover Version\) - 8 Bit Universe.mp3 v]\nset [ghost v] effect to (0)\nswitch costume to (menu7 v)\nwait (6) seconds\nhide\nswitch costume to (menu5 v)\nset size to (2) %\nshow\nrepeat (50)\n change size by (2)\nend\nwait (6) seconds\nset [ghost v] to [0]\nrepeat (50)\n set [ghost v] to ((ghost) + (2))\n set [ghost v] effect to (ghost)\nend\nhide\nwait (1) seconds\nswitch costume to (menu8 v)\nset [ghost v] effect to (100)\nset size to (100) %\nshow\nrepeat (50)\n set [ghost v] to ((ghost) - (2))\n set [ghost v] effect to (ghost)\nend\nset [ghost v] effect to (0)\nset size to (100) %\nwait (6) seconds\nrepeat (50)\n set [ghost v] to ((ghost) + (2))\n set [ghost v] effect to (ghost)\nend\nhide\nset [ghost v] effect to (0)\nset size to (100) %\n\n@Screen Shot 2016-04-24 at 5.05.39 PM\n\nwhen flag clicked\nhide\nif then\n vader_01 dissapears then\nend\n\ndefine vader_01 dissapears then\n\n@menu1\n\nwhen flag clicked\nset [intro v] to [0]\nset [tempo v] to [0]\ngo to x: (0) y: (0)\nswitch costume to (menu1 v)\nset [ghost v] effect to (0)\nrepeat until <(Intro) = [1]>\n if <(Intro) = [0]> then\n set [tempo v] to ((tempo) + (1))\n if <(tempo) = [800]> then\n switch costume to (menu1 v)\n end\n if <(tempo) = [1200]> then\n switch costume to (menu2 v)\n set [tempo v] to [0]\n end\n end\n if <(Intro) = [1]> then\n switch costume to (menu1 v)\n set [ghost v] effect to (100)\n end\n if <(Intro) = [3]> then\n switch costume to (menu1 v)\n set [ghost v] effect to (100)\n end\nend\nforever\n go to [front v] layer\nend\n\nwhen I receive [intro_2 v]\nset [ghost v] effect to (100)\nswitch costume to (menu1 v)\n\n
Press Arrow keys to move\nPress A to FIRE\nPress Z to JUMP\nPress SPACE BAR to skip the intro\n\nUPDATE: v1.2 : \nYou can jump pressing UP ARROW as well\nDuring the game, press SPACE BAR to turn Ghost effect OFF and ON\n\nUPDATE: v1.3 : \nMade a jump in stage 5 easier\nI also made a change where if you press the space bar, sprite 1 follows the mouse
Watermelon Platformer
@Stage\n\nwhen I receive [next v]\nnext backdrop\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\n@Sprite1\n\nwhen flag clicked\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n if <key (right arrow v) pressed?> then\n change [xv v] by (1)\n end\n if <key (left arrow v) pressed?> then\n change [xv v] by (-1)\n end\n set [xv v] to ((Xv) * (0.9))\n change x by (Xv)\n if <touching color (#666666)?> then\n change y by (1)\n if <touching color (#666666)?> then\n change y by (1)\n if <touching color (#666666)?> then\n change y by (1)\n if <touching color (#666666)?> then\n change y by (1)\n if <touching color (#666666)?> then\n change y by (1)\n if <touching color (#666666)?> then\n change x by ((Xv) * (-1))\n change y by (-5)\n if <key (up arrow v) pressed?> then\n if <(Xv) > [0]> then\n set [xv v] to [-5]\n else\n set [xv v] to [5]\n end\n set [yv v] to [10]\n else\n set [xv v] to [0]\n end\n end\n end\n end\n end\n end\n end\n change [yv v] by (-1)\n change y by (Yv)\n if <touching color (#666666)?> then\n change y by ((Yv) * (-1))\n set [yv v] to [0]\n end\n change y by (-1)\n if <touching color (#666666)?> then\n if <key (up arrow v) pressed?> then\n set [yv v] to [20]\n end\n end\n change y by (1)\nend\n\nwhen flag clicked\ngo to x: (-60) y: (-155)\nforever\n wait until <touching (sprite2 v)?>\n broadcast (Next v)\n go to x: (-60) y: (-155)\nend\n\nwhen flag clicked\nforever\n if <touching color (#ff0000)?> then\n go to x: (-60) y: (-155)\n end\nend\n\nwhen flag clicked\nforever\n if <touching color (#00ff55)?> then\n set [yv v] to [26]\n end\nend\n\nwhen flag clicked\nforever\n if <touching color (#ffff00)?> then\n set [xv v] to [13]\n end\nend\n\nwhen flag clicked\nforever\n if <touching color (#ff9400)?> then\n set [xv v] to [-13]\n end\nend\n\nwhen flag clicked\nforever\n if <touching color (#c96fff)?> then\n set [yv v] to [-13]\n end\nend\n\nwhen flag clicked\nforever\n if <touching color (#7f00ff)?> then\n set [yv v] to [13]\n end\nend\n\n@Sprite2\n\n@Sprite3\n\nwhen flag clicked\nhide\n\n
Arrow keys to move.\n
Scrolling Platformer Base
@Stage\n\nforever\n if <(level) = [1]> then\n repeat until <(level) = [2]>\n play sound [ v] until done\n end\n end\n if <(level) = [2]> then\n repeat until <(level) = [3]>\n play sound [ v] until done\n end\n end\n if <(level) = [3]> then\n repeat until <(level) = [4]>\n play sound [ v] until done\n end\n end\nend\n\nwhen flag clicked\n\nforever\n play sound [ v] until done\nend\n\n@Player\n\nwhen flag clicked\nset [speed v] to [12]\nset [jump height v] to [12]\nforever\n set [color water v] to <touching color (#00ffff)?>\n set [color bounce v] to <touching color (#cc98fe)?>\n set [color hurt v] to <touching color (#ff0000)?>\n set [color win v] to <touching color (#ffff00)?>\nend\n\nwhen flag clicked\nforever\n if <(color water) = [false]> then\n wait until <(color water) = [true]>\n play sound [splash v] until done\n end\nend\n\nwhen flag clicked\nforever\n if <(color water) = [true]> then\n play sound [water v] until done\n end\nend\n\nwhen flag clicked\nforever\n if <(color bounce) = [false]> then\n wait until <(color bounce) = [true]>\n play sound [boing v] until done\n end\nend\n\ndefine walk\nif <(x) < [0]> then\n change [frame v] by ((x) / (-8))\nelse\n change [frame v] by ((x) / (8))\nend\n\ndefine touch ground\nchange [falling? v] by (1)\nrepeat until <not <touching color (#000000)?>>\n if <(y) > [0]> then\n change y by (-1)\n else\n change y by (1)\n set [falling? v] to [0]\n end\n set [y v] to [0]\nend\n\ndefine set costume\nif <(falling?) < [3]> then\n if <(frame) = [0]> then\n switch costume to (stand v)\n else\n switch costume to (([floor v] of ((3) + ((frame) mod (3))) ) - (1))\n end\nelse\n if <(y) > [0]> then\n if <(color water) = [true]> then\n switch costume to (swim v)\n else\n switch costume to (jump v)\n end\n else\n switch costume to (fall v)\n end\nend\n\nwhen [r v] key pressed\npoint in direction (90)\ngo to x: (-35) y: (0)\nswitch costume to (stand v)\ngo to [front v] layer\nshow\nset [y v] to [0]\nset [game playing? v] to [true]\n\nwhen flag clicked\npoint in direction (90)\nswitch backdrop to (1 v)\nswitch costume to (stand v)\ngo to [front v] layer\nshow\nset [y v] to [0]\nset [game playing? v] to [true]\ngo to x: (-35) y: (0)\nforever\n if <(game playing?) = [true]> then\n switch costume to (hitbox v)\n change y by (y)\n touch ground\n set [x v] to ((x) * (0.7))\n if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n change [x v] by ((speed) * (-0.05))\n end\n if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n change [x v] by ((speed) * (0.05))\n end\n if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n point in direction (-90)\n walk\n else\n if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n point in direction (90)\n walk\n else\n set [frame v] to [0]\n end\n end\n if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(falling?) < [3]>> then\n set [y v] to (jump height)\n end\n if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <(y) < [4]>> then\n change [y v] by (-1)\n else\n change [y v] by (-2)\n end\n set costume\n if <(costume [number v]) = [1]> then\n go to x: (-35) y: (0)\n switch costume to (stand v)\n end\n if <(color win) = [true]> then\n set [game playing? v] to [false]\n switch costume to (win v)\n play sound [win v] until done\n next backdrop\n broadcast (next level v)\n switch costume to (stand v)\n set [y v] to [0]\n set [game playing? v] to [true]\n end\n if <<(color hurt) = [true]> or <<(y position) < [-150]> and <(color water) = [false]>>> then\n set [game playing? v] to [false]\n switch costume to (hurt v)\n play sound [hurt v] until done\n broadcast (hurt v)\n set [y v] to [0]\n set [game playing? v] to [true]\n switch costume to (stand v)\n set y to (0)\n end\n if <(color water) = [true]> then\n if <not <<key (down arrow v) pressed?> or <key (s v) pressed?>>> then\n set [y v] to ((y) * (0.5))\n end\n end\n if <(color bounce) = [true]> then\n if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n set [y v] to [8]\n else\n set [y v] to [18]\n end\n end\n if <(y position) > [259]> then\n hide\n wait until <(y position) < [259]>\n show\n end\n end\nend\n\nwhen flag clicked\nforever\n if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n if <(color water) = [true]> then\n set [y v] to (jump height)\n start sound [swim v]\n switch costume to (swim v)\n wait until <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>>\n else\n start sound [jump v]\n wait until <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>>\n end\n end\n if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n repeat until <not <<key (down arrow v) pressed?> or <key (s v) pressed?>>>\n switch costume to (duck v)\n end\n end\nend\n\n@Level\n\nwhen flag clicked\nset [level v] to [1]\nnext level\nforever\n if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n repeat until <not <<key (right arrow v) pressed?> or <key (d v) pressed?>>>\n if <([game playing? v] of [player v]) = [true]> then\n change x by ((speed) * (-1))\n wait (0.01) seconds\n end\n end\n end\n if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n repeat until <not <<key (left arrow v) pressed?> or <key (a v) pressed?>>>\n if <([game playing? v] of [player v]) = [true]> then\n change x by (speed)\n wait (0.01) seconds\n end\n end\n end\nend\n\nwhen I receive [hurt v]\ngo to x: (740) y: (420)\n\nwhen [r v] key pressed\ngo to x: (740) y: (420)\n\nwhen I receive [next level v]\nchange [level v] by (1)\nnext level\ngo to x: (740) y: (420)\n\ndefine next level\nswitch costume to (none v)\nset size to (400) %\nswitch costume to (level)\ngo to x: (740) y: (420)\n\n
This is not supposed to be a game! This is a base used for remixing and making your own scrolling platformer. Change the character, levels and background to make your own game.\n\nRed is lava, blue is water, purple is bouncy, and yellow is the end of the level. Press R to restart. If you have any questions about making a platformer with this base, ask in the comments and I'll help!
Egnaro's Adventure 【Platformer】
"@Stage\\n\\nwhen flag clicked\\nforever\\n switch backdrop to (Level)\\nend\\n\\nwhen I receive (...TRUNCATED)
"[This game was designed to be played on a computer, and probably doesn't work on mobile. Sorry for (...TRUNCATED)
Adventures of Crystal: A Platformer
"@Stage\\n\\nwhen I receive [test account v]\\nswitch backdrop to (screen shot 2016-03-31 at 3.55.10(...TRUNCATED)

Scratch platformers 10k

This is a dataset featuring 10k search results for platformer on Scratch.

There are 3 fields:

  • The instrucions (how to play, ...)
  • The title
  • The code in the scratchblocks format

I also added @ + the sprite name before the blocks.

Downloads last month
74
Edit dataset card