SCRATCH WARS THE CLONE WARS Jedi Master

Instructions: In this game you need to break the green power generators, then the doors open.\nPress Arrow keys to move\nPress A to FIRE\nPress UP ARROW to JUMP\nPress SPACE BAR to skip the intro\nIf you get angry press the 7 Key\n\nDuring the game, press SPACE BAR to turn Ghost effect ON and OFF\n\nIt tells you your score at the end.\n\nHard version!\nLink to Normal version: https://scratch.mit.edu/projects/192751978/

@Stage\n\nwhen I receive [death_fall v]\nchange [death count v] by (1)\n\nswitch backdrop to (menu3 v)\n\nset [second v] to [58]\n\nset [minute v] to [59]\n\nwhen I receive [end_game v]\n\nwhen I receive [go v]\nforever\n    if <(PAUSE) = [0]> then\n        if <(Second) < [59]> then\n            wait (1) seconds\n            change [second v] by (1)\n        else\n            if <(Minute) < [59]> then\n                wait (1) seconds\n                change [minute v] by (1)\n                set [second v] to [0]\n            else\n                wait (1) seconds\n                change [hour v] by (1)\n                set [minute v] to [0]\n                set [second v] to [0]\n            end\n        end\n    end\nend\n\nwhen I receive [destroyed v]\nplay sound [270311__littlerobotsoundfactory__explosion-03 v] until done\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\nwait until <(PROGRESSI) = [22]>\nstop all sounds\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nset [color v] to [1]\nset [hour v] to [0]\nset [minute v] to [0]\nset [second v] to [0]\nset [death count v] to [0]\nset [pause v] to [1]\nset volume to (80) %\nforever\n    if <(Intro) = [0]> then\n        play sound [EP1__The_Droid_Invasion_and_The_Appearance_Of_Darth_Maul v] until done\n    end\n    if <(Intro) = [3]> then\n        if <(PROGRESSI) = [22]> then\n            play sound [Duel Of Fates NES v] until done\n        else\n            play sound [EP1__The_Droid_Invasion_and_The_Appearance_Of_Darth_Maul v] until done\n        end\n    end\nend\n\nwhen I receive [death_2 v]\nplay sound [ltsaberbodyhit01 v] until done\n\nwhen I receive [jump v]\nplay sound [270323__littlerobotsoundfactory__jump-03 v] until done\n\nwhen I receive [fire_4 v]\nplay sound [pistol-1 v] until done\n\nwhen I receive [death_1 v]\nplay sound [ltsaberbodyhit01 v] until done\n\nwhen I receive [fall_sound v]\nplay sound [270343__littlerobotsoundfactory__shoot-01 v] until done\n\nwhen I receive [z_sound_2 v]\nplay sound [pistol-1 v] until done\n\nwhen I receive [z_sound_1 v]\nplay sound [ltsaberhit01 v] until done\n\nwhen I receive [fire_6 v]\nplay sound [Electric-Arc-2 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\nend\n\nwhen I receive [fire_2 v]\nplay sound [Geonosian Blaster.mp3 v] until done\n\nwhen I receive [fire_3 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 [vader_hit v]\nplay sound [ltsaberbodyhit01 v] until done\n\nwhen I receive [scontro v]\nplay sound [pistol-1 v] until done\n\nwhen I receive [door_destroyed v]\nplay sound [270311__littlerobotsoundfactory__explosion-03 v] until done\n\nwhen I receive [death_1 v]\nplay sound [270311__littlerobotsoundfactory__explosion-03 v] until done\n\nwhen I receive [fire_1 v]\nplay sound [Geonosian Blaster.mp3 v] until done\n\n@Sprite1\n\nif <(Color Change) = [0]> then\n\nwhen flag clicked\nhide\n\nwhen I receive [cad_"death" v]\nif <<(y position) > [-29]> and <(x position) < [171]>> then\n    glide (0.1) secs to x: (x position) y: (-29)\nend\nif <<(y position) > [31]> and <(x position) > [170]>> then\n    glide (0.1) secs to x: (x position) y: (31)\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 [death_1 v]\nset [vx v] to [0]\nset [vy v] to [0]\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\ngo to x: (-80) y: (80)\nbroadcast (level_change v)\nset [progressi v] to [14]\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.2) seconds\ngo to x: (-196) y: (-145)\npoint in direction (90)\nforever\n    if <(PAUSE) = [0]> then\n        if <(PROGRESSI) = [14]> then\n            if <<(y position) < [-141]> and <(x position) < [95]>> then\n                change x by (-2)\n                wait (0.01) seconds\n            end\n        end\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 (w v) pressed?>> and <not <key (up arrow v) pressed?>>> and <not <key (z 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 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: (18)\nend\nif <(PROGRESSI) = [4]> then\n    go to x: (-221) y: (76)\nend\nif <(PROGRESSI) = [4]> then\n    go to x: (-216) y: (77)\nend\nif <(PROGRESSI) = [6]> then\n    go to x: (-219) y: (-154)\nend\nif <(PROGRESSI) = [8]> then\n    go to x: (-215) y: (-10)\nend\nif <(PROGRESSI) = [10]> then\n    go to x: (-219) y: (-150)\nend\nif <(PROGRESSI) = [12]> then\n    go to x: (-213) y: (94)\nend\nif <(PROGRESSI) = [14]> then\n    go to x: (-219) y: (-90)\nend\nif <(PROGRESSI) = [16]> then\n    go to x: (-218) y: (-141)\nend\nif <(PROGRESSI) = [18]> then\n    go to x: (-217) y: (-141)\nend\nif <(PROGRESSI) = [20]> then\n    go to x: (-217) y: (-141)\nend\nif <(PROGRESSI) = [22]> then\n    go to x: (-223) y: (76)\nend\nshow\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\ndefine Collisioni_DX (vx)\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\n    if <<touching (plaat_02 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\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\ndefine Collisioni_SX (vx)\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\n    if <<touching (plaat_02 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\nend\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 [very end v]\nhide\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\ndefine Collisioni_giù (vy)\nif <(vy) = [0]> then\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        if <touching (plaat_02 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    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\nwhen I receive [death_fall v]\nif <(PROGRESSI) < [2]> then\n    go to x: (-196) y: (-145)\nend\nif <<(PROGRESSI) = [2]> or <(PROGRESSI) = [3]>> then\n    go to x: (-221) y: (18)\nend\nif <<(PROGRESSI) = [4]> or <(PROGRESSI) = [5]>> then\n    go to x: (-216) y: (77)\nend\nif <<(PROGRESSI) = [6]> or <(PROGRESSI) = [7]>> then\n    go to x: (-219) y: (-154)\nend\nif <<(PROGRESSI) = [8]> or <(PROGRESSI) = [9]>> then\n    go to x: (-215) y: (-10)\nend\nif <<(PROGRESSI) = [10]> or <(PROGRESSI) = [11]>> then\n    go to x: (-219) y: (-150)\nend\nif <<(PROGRESSI) = [12]> or <(PROGRESSI) = [13]>> then\n    go to x: (-213) y: (94)\nend\nif <<(PROGRESSI) = [14]> or <(PROGRESSI) = [15]>> then\n    go to x: (-219) y: (-90)\nend\nif <<(PROGRESSI) = [16]> or <(PROGRESSI) = [17]>> then\n    go to x: (-218) y: (-141)\nend\nif <<(PROGRESSI) = [18]> or <(PROGRESSI) = [19]>> then\n    go to x: (-217) y: (-141)\nend\nif <<(PROGRESSI) = [20]> or <(PROGRESSI) = [21]>> then\n    go to x: (-217) y: (-141)\nend\nif <(PROGRESSI) = [22]> then\n    go to x: (-223) y: (76)\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\n@menu1\n\nwhen flag clicked\nset [intro v] to [0]\nset [tempo v] to [0]\nset [color v] to [1]\ngo to x: (0) y: (0)\nshow\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) = [2000]> then\n            switch costume to (Color)\n        end\n        if <(tempo) = [2500]> then\n            switch costume to ((Color) + (1))\n            set [tempo v] to [0]\n        end\n    end\n    if <(Intro) = [1]> then\n        switch costume to (Color)\n        set [ghost v] effect to (100)\n    end\n    if <(Intro) = [3]> then\n        switch costume to ((Color) + (1))\n        set [ghost v] effect to (100)\n    end\nend\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nforever\n    if <key (1 v) pressed?> then\n        start sound [ltsaberon01 v]\n        set [color v] to [1]\n    end\n    if <key (2 v) pressed?> then\n        start sound [ltsaberon01 v]\n        set [color v] to [3]\n    end\n    if <key (3 v) pressed?> then\n        start sound [ltsaberon01 v]\n        set [color v] to [5]\n    end\n    if <key (4 v) pressed?> then\n        start sound [ltsaberon01 v]\n        set [color v] to [7]\n    end\n    if <key (5 v) pressed?> then\n        start sound [ltsaberon01 v]\n        set [color v] to [9]\n    end\n    if <key (6 v) pressed?> then\n        start sound [ltsaberon01 v]\n        set [color v] to [11]\n    end\n    if <key (7 v) pressed?> then\n        start sound [ltsaberon01 v]\n        set [color v] to [13]\n    end\n    if <key (8 v) pressed?> then\n        start sound [ltsaberon01 v]\n        set [color v] to [15]\n    end\n    if <not <(Intro) = [0]>> then\n        stop [this script v]\n    end\nend\n\nwhen I receive [intro_2 v]\nset [ghost v] effect to (100)\nswitch costume to (Color)\nif <(Color) = [1]> then\n    set [color v] to [2]\nend\nif <(Color) = [3]> then\n    set [color v] to [14]\nend\nif <(Color) = [5]> then\n    set [color v] to [26]\nend\nif <(Color) = [7]> then\n    set [color v] to [38]\nend\nif <(Color) = [9]> then\n    set [color v] to [50]\nend\nif <(Color) = [11]> then\n    set [color v] to [62]\nend\nif <(Color) = [13]> then\n    set [color v] to [74]\nend\nif <(Color) = [15]> then\n    set [color v] to [86]\nend\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 (0.3) seconds\nrepeat (6)\n    wait (0.01) seconds\n    next costume\nend\nwait (0.3) seconds\nstart sound [ltsaberon01 v]\nrepeat (8)\n    wait (0.01) seconds\n    next costume\nend\nwait (4.5) seconds\nset [ghost v] to [0]\nrepeat (50)\n    set [ghost v] to ((ghost) + (2))\n    set [ghost v] effect to (ghost)\n    change volume by (-1)\nend\nhide\nrepeat (18)\n    wait (0.1) seconds\n    change volume by (-3)\nend\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\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\nswitch costume to (menu6 v)\nwait (4) seconds\n\nwhen flag clicked\nhide variable [death count v]\nhide variable [time v]\nset size to (100) %\nswitch costume to (menu4 v)\nset [ghost v] to [100]\nhide\ngo to x: (0) y: (0)\n\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\n\nwhen I receive [end_game v]\nshow\nset [intro v] to [4]\nstop all sounds\nswitch costume to (menu6 v)\nset [ghost v] effect to (0)\nset [ghost v] to [0]\nset size to (2) %\nwait (7) seconds\nshow\nstart sound [Star Wars Theme Song \(8 Bit Remix Cover Version\) - 8 Bit Universe.mp3 v]\ngo to [front v] layer\nrepeat (45)\n    change size by (2)\nend\nwait (2) seconds\nrepeat (50)\n    set [ghost v] to ((ghost) + (2))\n    set [ghost v] effect to (ghost)\nend\nwait (0.8) seconds\nswitch costume to (menu5 v)\nset [ghost v] effect to (100)\nrepeat (50)\n    set [ghost v] to ((ghost) - (2))\n    set [ghost v] effect to (ghost)\nend\nwait (0.3) seconds\nrepeat (6)\n    wait (0.01) seconds\n    next costume\nend\nwait (0.3) seconds\nstart sound [ltsaberon01 v]\nrepeat (8)\n    wait (0.01) seconds\n    next costume\nend\nwait (1.2) 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 (0.5) 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 (1.5) 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) %\nif <(Hour) > [0]> then\n    switch costume to (menu2 v)\nelse\n    if <(Minute) > [0]> then\n        switch costume to (menu9 v)\n    else\n        switch costume to (menu3 v)\n    end\nend\nshow\nbroadcast (Numbers v)\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\n@Sprite4\n\nwhen I receive [numbers v]\ncreate clone of (_myself_ v)\nset [stat v] to [0]\n\nwhen flag clicked\nset [stat v] to [0]\nhide\n\nwhen I start as a clone\nswitch costume to (costume1 v)\nshow\nif <(Hour) > [0]> then\n    go to x: (-85) y: (-9)\n    repeat until <(Hour) = [0]>\n        next costume\n        change [hour v] by (-1)\n    end\n    set [stat v] to [1]\n    create clone of (sprite4 v)\nelse\n    if <<(Minute) > [9]> or <(stat) = [1]>> then\n        go to x: (-53) y: (-9)\n        repeat until <(Minute) < [10]>\n            next costume\n            change [minute v] by (-10)\n        end\n        set [stat v] to [2]\n        create clone of (sprite4 v)\n    else\n        if <<(Minute) > [0]> or <(stat) = [2]>> then\n            go to x: (-28) y: (-9)\n            repeat until <(Minute) = [0]>\n                next costume\n                change [minute v] by (-1)\n            end\n            set [stat v] to [3]\n            create clone of (sprite4 v)\n        else\n            if <<(Second) > [9]> or <(stat) = [3]>> then\n                go to x: (6) y: (-9)\n                repeat until <(Second) < [10]>\n                    next costume\n                    change [second v] by (-10)\n                end\n                set [stat v] to [4]\n                create clone of (sprite4 v)\n            else\n                if <<(Second) > [0]> or <(stat) = [4]>> then\n                    go to x: (30) y: (-9)\n                    repeat until <(Second) = [0]>\n                        next costume\n                        change [second v] by (-1)\n                    end\n                    set [stat v] to [5]\n                    create clone of (sprite4 v)\n                else\n                    go to x: (-47) y: (99)\n                    if <(Death count) > [999]> then\n                        repeat until <(Death count) < [1000]>\n                            next costume\n                            change [death count v] by (-1000)\n                        end\n                        set [stat v] to [6]\n                        create clone of (sprite4 v)\n                    else\n                        go to x: (-22) y: (99)\n                        if <<(Death count) > [99]> or <(stat) = [6]>> then\n                            repeat until <(Death count) < [100]>\n                                next costume\n                                change [death count v] by (-100)\n                            end\n                            set [stat v] to [7]\n                            create clone of (sprite4 v)\n                        else\n                            go to x: (3) y: (99)\n                            if <<(Death count) > [9]> or <(stat) = [7]>> then\n                                repeat until <(Death count) < [10]>\n                                    next costume\n                                    change [death count v] by (-10)\n                                end\n                                set [stat v] to [8]\n                                create clone of (sprite4 v)\n                            else\n                                go to x: (28) y: (99)\n                                repeat until <(Death count) = [0]>\n                                    next costume\n                                    change [death count v] by (-1)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nbroadcast (END_GAME v)\n\nwhen [q v] key pressed\nhide\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 [very end v]\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\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 [costume v] to ((Costume) + (1))\nset [progressi v] to ((PROGRESSI) + (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: (48) y: (-116)\nswitch costume to (door_01 v)\nshow\ngo to [front v] layer\ngo [backward v] (9) layers\n\nwhen flag clicked\nhide\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    switch costume to (door_01 v)\n    show\n    set [progressi v] to [0]\nend\nif <(PROGRESSI) = [2]> then\n    set [costume v] to [1]\n    set [destroyed 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    switch costume to (door_01 v)\n    show\n    set [progressi v] to [2]\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    show\n    set [progressi v] to [4]\nend\nif <(PROGRESSI) = [5]> then\n    set [costume v] to [1]\n    set [destroyed v] to [0]\n    switch costume to (door_01 v)\n    show\n    set [progressi v] to [4]\nend\nif <(PROGRESSI) = [7]> then\n    set [costume v] to [1]\n    set [destroyed v] to [0]\n    switch costume to (door_01 v)\n    show\n    set [progressi v] to [6]\nend\nif <(PROGRESSI) = [9]> then\n    set [costume v] to [1]\n    set [destroyed v] to [0]\n    switch costume to (door_01 v)\n    show\n    set [progressi v] to [8]\nend\nif <(PROGRESSI) = [11]> then\n    set [costume v] to [1]\n    set [destroyed v] to [0]\n    switch costume to (door_01 v)\n    show\n    set [progressi v] to [10]\nend\nif <(PROGRESSI) = [13]> then\n    set [costume v] to [1]\n    set [destroyed v] to [0]\n    switch costume to (door_01 v)\n    show\n    set [progressi v] to [12]\nend\nif <(PROGRESSI) = [15]> then\n    set [costume v] to [1]\n    set [destroyed v] to [0]\n    switch costume to (door_01 v)\n    show\n    set [progressi v] to [14]\nend\nif <(PROGRESSI) = [17]> then\n    set [costume v] to [1]\n    set [destroyed v] to [0]\n    switch costume to (door_01 v)\n    show\n    set [progressi v] to [16]\nend\nif <(PROGRESSI) = [19]> then\n    set [costume v] to [1]\n    set [destroyed v] to [0]\n    switch costume to (door_01 v)\n    show\n    set [progressi v] to [18]\nend\nif <(PROGRESSI) = [21]> then\n    set [costume v] to [1]\n    set [destroyed v] to [0]\n    switch costume to (door_01 v)\n    show\n    set [progressi v] to [20]\nend\n\ngo to x: (-146) y: (85)\n\ngo to x: (227) y: (106)\n\nwhen I receive [go v]\nwait (0.05) seconds\nset [destroyed v] to [0]\nset [costume v] to [1]\ngo to x: (48) y: (-116)\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\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: (-110) y: (128)\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: (133)\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: (90) y: (105)\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: (-181) y: (108)\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: (113)\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: (118) y: (1)\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: (-236) y: (49)\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: (-190) y: (105)\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: (-10) y: (105)\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: (-154) y: (84)\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\nforever\n    if <<(Destroyed) = [0]> and <(PAUSE) = [0]>> then\n        switch costume to (door_01 v)\n        wait (0.1) seconds\n        switch costume to (door_2 v)\n        wait (0.1) seconds\n    end\nend\n\n@Door_2\n\ndefine Destroyed\nwait (0.1) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.05) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.05) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.05) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.05) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.05) seconds\nset [costume v] to ((Costume) + (1))\nswitch costume to (Costume)\nwait (0.05) seconds\nswitch costume to (door_07 v)\n\nwhen I receive [restart v]\nwait (0.05) seconds\nset [destroyed v] to [0]\nset [costume v] to [1]\ngo to x: (99) y: (106)\nshow\nswitch costume to (door_01 v)\ngo to [front v] layer\ngo [backward v] (9) layers\n\nwhen I receive [death_fall v]\nwait (0.3) seconds\nif <(PROGRESSI) = [0]> then\n    set [costume v] to [1]\n    set [destroyed v] to [0]\n    switch costume to (door_01 v)\n    show\nend\nif <(PROGRESSI) = [1]> then\n    set [costume v] to [1]\n    set [destroyed v] to [0]\n    switch costume to (door_01 v)\n    show\nend\nif <(PROGRESSI) = [2]> then\n    set [costume v] to [1]\n    set [destroyed 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    switch costume to (door_01 v)\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    show\nend\nif <(PROGRESSI) = [5]> then\n    set [costume v] to [1]\n    set [destroyed v] to [0]\n    switch costume to (door_01 v)\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: (63) y: (20)\n    show\nend\nif <(PROGRESSI) = [7]> then\n    set [costume v] to [1]\n    set [destroyed v] to [0]\n    switch costume to (door_01 v)\n    go to x: (63) y: (20)\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    show\nend\nif <(PROGRESSI) = [9]> then\n    set [costume v] to [1]\n    set [destroyed v] to [0]\n    switch costume to (door_01 v)\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    show\nend\nif <(PROGRESSI) = [11]> then\n    set [costume v] to [1]\n    set [destroyed v] to [0]\n    switch costume to (door_01 v)\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    show\nend\nif <(PROGRESSI) = [13]> then\n    set [costume v] to [1]\n    set [destroyed v] to [0]\n    switch costume to (door_01 v)\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    show\nend\nif <(PROGRESSI) = [15]> then\n    set [costume v] to [1]\n    set [destroyed v] to [0]\n    switch costume to (door_01 v)\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    show\nend\nif <(PROGRESSI) = [17]> then\n    set [costume v] to [1]\n    set [destroyed v] to [0]\n    switch costume to (door_01 v)\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    show\nend\nif <(PROGRESSI) = [19]> then\n    set [costume v] to [1]\n    set [destroyed v] to [0]\n    switch costume to (door_01 v)\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    show\nend\nif <(PROGRESSI) = [21]> then\n    set [costume v] to [1]\n    set [destroyed v] to [0]\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: (-124)\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: (63) y: (20)\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: (235) 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: (228) y: (-111)\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: (99) y: (106)\nshow\nswitch costume to (door_01 v)\ngo to [front v] layer\ngo [backward v] (9) layers\n\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\nbroadcast (DOOR_DESTROYED v)\nset [brightness v] effect to (25)\n\nwhen I receive [door_destroyed v]\nDestroyed\n\nset [brightness v] effect to (0)\nhide\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            change y by (VY_addizionale)\n            if <(y position) < (Y_giu)> then\n                show\n                switch costume to (plaat_2 v)\n                set [vy_addizionale v] to ((VY_addizionale) * (-1))\n            end\n            if <(y position) > (Y_su)> then\n                hide\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 [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\nwhen I receive [level_change v]\nif <(PROGRESSI) < [2]> then\n    hide\nend\nif <<(PROGRESSI) = [2]> or <(PROGRESSI) = [3]>> then\n    switch costume to (plaat_01 v)\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    switch costume to (plaat_2 v)\n    go to [front v] layer\n    go [backward v] (6) layers\n    show\n    go to x: (9) y: (-174)\n    set [y_giu v] to [-180]\n    set [y_su v] to [180]\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\n@plaat_02\n\nwhen I receive [restart v]\ngo to [front v] layer\ngo [backward v] (15) layers\ngo to x: (0) y: (-3)\n\nwhen flag clicked\nhide\n\ndefine CVB\nwait (0.01) seconds\nnext costume\n\nwhen I receive [very end v]\nhide\n\nwhen I receive [go v]\ngo to [front v] layer\ngo [backward v] (15) layers\ngo to x: (0) y: (-3)\nforever\n    if <(PROGRESSI) < [14]> then\n        hide\n    end\n    if <<(PROGRESSI) = [14]> or <(PROGRESSI) = [15]>> then\n        go to [front v] layer\n        go [backward v] (15) layers\n        show\n        CVB\n    end\n    if <(PROGRESSI) > [15]> then\n        hide\n    end\nend\n\n@falling_plaat\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nset [ghost v] effect to (0)\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            wait (3) seconds\n            broadcast (J.G.I.D.A v)\n        end\n    end\nend\n\nwhen I receive [restart v]\nhide\nset [ghost v] effect to (0)\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 [level_change v]\nif <(PROGRESSI) < [4]> then\n    hide\n    set [visible v] to [0]\nend\nif <<(PROGRESSI) = [4]> or <(PROGRESSI) = [5]>> then\n    go to x: (189) y: (18)\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) > [5]> and <(PROGRESSI) < [16]>> then\n    hide\n    set [visible v] to [0]\nend\nif <<(PROGRESSI) = [16]> or <(PROGRESSI) = [17]>> then\n    go to x: (-101) y: (-96)\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) = [18]> or <(PROGRESSI) = [19]>> then\n    hide\n    set [visible v] to [0]\nend\nif <<(PROGRESSI) > [19]> and <(PROGRESSI) < [20]>> then\n    hide\n    set [visible v] to [0]\nend\nif <<(PROGRESSI) = [20]> or <(PROGRESSI) = [21]>> then\n    go to x: (-100) y: (-95)\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\ngo to x: (189) y: (18)\n\nwhen I receive [death_fall v]\nif <(PROGRESSI) < [4]> then\n    hide\n    set [visible v] to [0]\nend\nif <<(PROGRESSI) = [4]> or <(PROGRESSI) = [5]>> then\n    go to x: (189) y: (18)\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) > [5]> and <(PROGRESSI) < [16]>> then\n    hide\n    set [visible v] to [0]\nend\nif <<(PROGRESSI) = [16]> or <(PROGRESSI) = [17]>> then\n    go to x: (-101) y: (-96)\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) = [18]> or <(PROGRESSI) = [19]>> then\n    hide\n    set [visible v] to [0]\nend\nif <<(PROGRESSI) > [19]> and <(PROGRESSI) < [20]>> then\n    hide\n    set [visible v] to [0]\nend\nif <<(PROGRESSI) = [20]> or <(PROGRESSI) = [21]>> then\n    go to x: (-100) y: (-95)\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 [j.g.i.d.a v]\nset [on_a_falling_plat v] to [0]\nset [velocità_caduta v] to [0]\nset [visible v] to [1]\nset [contatore v] to [0]\nset [ghost v] effect to (100)\nshow\nif <<(PROGRESSI) = [4]> or <(PROGRESSI) = [5]>> then\n    go to x: (189) y: (18)\nend\nif <<(PROGRESSI) = [16]> or <(PROGRESSI) = [17]>> then\n    go to x: (-101) y: (-96)\nend\nif <<(PROGRESSI) = [20]> or <(PROGRESSI) = [21]>> then\n    go to x: (-100) y: (-95)\nend\nwait (0.3) seconds\nset [ghost v] effect to (60)\nset [brightness v] effect to (50)\nwait (0.2) seconds\nset [ghost v] effect to (40)\nset [brightness v] effect to (0)\nwait (0.2) seconds\nset [ghost v] effect to (20)\nset [brightness v] effect to (50)\nwait (0.2) seconds\nset [ghost v] effect to (0)\nset [brightness v] effect to (0)\n\n@falling_plaat2\n\nwhen I receive [j.g.i.d.a.2 v]\nset [on_a_falling_plat2 v] to [0]\nset [velocità_caduta v] to [0]\nset [visible v] to [1]\nset [contatore v] to [0]\nset [ghost v] effect to (100)\nshow\nif <<(PROGRESSI) = [20]> or <(PROGRESSI) = [21]>> then\n    go to x: (-10) y: (-47)\nend\nwait (0.3) seconds\nset [ghost v] effect to (60)\nset [brightness v] effect to (50)\nwait (0.2) seconds\nset [ghost v] effect to (40)\nset [brightness v] effect to (0)\nwait (0.2) seconds\nset [ghost v] effect to (20)\nset [brightness v] effect to (50)\nwait (0.2) seconds\nset [ghost v] effect to (0)\nset [brightness v] effect to (0)\n\nwhen I receive [restart v]\nhide\ngo to [front v] layer\ngo [backward v] (6) layers\nset [ghost v] effect to (0)\nset [visible v] to [0]\nset [velocità_caduta v] to [0]\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\ngo to [front v] layer\ngo [backward v] (6) layers\nset [ghost v] effect to (0)\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            wait (3) seconds\n            broadcast (J.G.I.D.A.2 v)\n        end\n    end\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: (-10) y: (-47)\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 [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: (-10) y: (-47)\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\ngo to x: (0) y: (0)\nhide\nset [ghost v] effect to (0)\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            wait (3) seconds\n            broadcast (J.G.I.D.A.3 v)\n        end\n    end\nend\n\nwhen I receive [restart v]\nhide\nset [ghost v] effect to (0)\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 [j.g.i.d.a.3 v]\nset [on_a_falling_plat3 v] to [0]\nset [velocità_caduta v] to [0]\nset [visible v] to [1]\nset [contatore v] to [0]\nset [ghost v] effect to (100)\nshow\nif <<(PROGRESSI) = [20]> or <(PROGRESSI) = [21]>> then\n    go to x: (23) y: (26)\nend\nwait (0.3) seconds\nset [ghost v] effect to (60)\nset [brightness v] effect to (50)\nwait (0.2) seconds\nset [ghost v] effect to (40)\nset [brightness v] effect to (0)\nwait (0.2) seconds\nset [ghost v] effect to (20)\nset [brightness v] effect to (50)\nwait (0.2) seconds\nset [ghost v] effect to (0)\nset [brightness v] effect 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: (23) y: (26)\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: (23) y: (26)\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@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: (65)\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: (-85) y: (-150)\nend\nif <<(PROGRESSI) = [14]> or <(PROGRESSI) = [15]>> then\n    go to x: (26) y: (-28)\n    hide\n    wait until <(Cad_Bane1) = [1]>\n    wait (0.1) seconds\n    switch costume to (laser_death_1_7 v)\n    go to [front v] layer\n    show\n    wait (0.02) seconds\n    switch costume to (laser_death_1_8 v)\n    wait (0.02) seconds\n    switch costume to (laser_death_1_9 v)\n    wait (0.02) seconds\n    switch costume to (laser_death_1_10 v)\n    wait (0.02) seconds\n    switch costume to (laser_death_1_11 v)\n    wait (0.02) seconds\n    switch costume to (laser_death_1_12 v)\n    wait (0.02) seconds\n    switch costume to (laser_death_1_13 v)\n    wait (0.02) seconds\n    switch costume to (laser_death_1_14 v)\n    wait (0.02) seconds\n    switch costume to (laser_death_1_15 v)\n    go [backward v] (5) layers\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: (-160)\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\nwhen I receive [door_destroyed v]\nif <<(PROGRESSI) = [12]> or <(PROGRESSI) = [13]>> then\n    wait (0.05) seconds\n    switch costume to (laser_death_1_3 v)\n    wait (0.05) seconds\n    switch costume to (laser_death_1_4 v)\n    wait (0.05) seconds\n    switch costume to (laser_death_1_5 v)\n    wait (0.05) seconds\n    switch costume to (laser_death_1_6 v)\n    wait (0.05) seconds\n    hide\n    switch costume to (laser_death_1_2 v)\nend\n\nwhen I receive [death_fall v]\nset [cad_bane1 v] to [0]\nif <<(PROGRESSI) = [12]> or <(PROGRESSI) = [13]>> then\n    show\n    switch costume to (laser_death_1_2 v)\nend\nif <<(PROGRESSI) = [14]> or <(PROGRESSI) = [15]>> then\n    hide\n    wait until <(Cad_Bane1) = [1]>\n    wait (0.1) seconds\n    switch costume to (laser_death_1_7 v)\n    show\n    wait (0.02) seconds\n    switch costume to (laser_death_1_8 v)\n    wait (0.02) seconds\n    switch costume to (laser_death_1_9 v)\n    wait (0.02) seconds\n    switch costume to (laser_death_1_10 v)\n    wait (0.02) seconds\n    switch costume to (laser_death_1_11 v)\n    wait (0.02) seconds\n    switch costume to (laser_death_1_12 v)\n    wait (0.02) seconds\n    switch costume to (laser_death_1_13 v)\n    wait (0.02) seconds\n    switch costume to (laser_death_1_14 v)\n    wait (0.02) seconds\n    switch costume to (laser_death_1_15 v)\nend\n\nwhen I receive [go v]\nforever\n    if <<(PROGRESSI) = [14]> or <(PROGRESSI) = [15]>> then\n        if <<(costume [number v]) = [15]> and <(distance to [cube_01 v]) < [40.0]>> then\n            switch costume to (laser_death_1_16 v)\n            wait (0.05) seconds\n            switch costume to (laser_death_1_15 v)\n        end\n    end\nend\n\nshow\n\nswitch costume to (laser_death_1_2 v)\ngo to x: (-85) y: (-150)\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: (-46) 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: (-99)\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) = [10]> or <(PROGRESSI) = [11]>> 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: (-185) y: (117)\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 [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\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    switch costume to (laser_death_1 v)\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    set [contatore v] to [0]\n    switch costume to (laser_death_2 v)\n    show\n    go to [front v] layer\n    go [backward v] (5) layers\n    go to x: (-185) y: (117)\nend\nif <<(PROGRESSI) = [12]> or <(PROGRESSI) = [13]>> then\n    set [contatore v] to [0]\n    switch costume to (laser_death_1 v)\n    show\n    go to [front v] layer\n    go [backward v] (5) layers\n    go to x: (158) y: (-102)\nend\nif <<(PROGRESSI) = [14]> or <(PROGRESSI) = [15]>> then\n    set [contatore v] to [0]\n    set [transparency v] to [0]\n    switch costume to (laser_death_3 v)\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: (-183) y: (48)\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 [death_fall v]\nif <<(PROGRESSI) = [14]> or <(PROGRESSI) = [15]>> then\n    set [contatore v] to [0]\n    set [transparency v] to [0]\n    switch costume to (laser_death_3 v)\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: (-183) y: (48)\nend\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 (Color)\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_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    next costume\n    set [spada_counter v] to [0]\nend\nchange [spada_counter v] by (1)\n\ndefine Sword\nwait (1) seconds\nstart sound [ltsaberon01 v]\nswitch costume to ((Color) + (9))\nwait (0.1) seconds\nnext costume\nwait (0.1) seconds\nnext costume\nwait (0.1) seconds\nswitch costume to (Color)\nwait (1) seconds\nset [intro v] to [3]\nset [pause v] to [0]\nset [color change 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 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 [3]\nhide\ngo to x: (-196) y: (-146)\n\ndefine Death_by_fall\nif <(Sprite_N) = [10]> then\n    set [sprite_n v] to [1]\n    switch costume to (Color)\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 (Color)\n    hide\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 I receive [go v]\nshow\ngo to x: (-196) y: (-146)\nswitch costume to (jedi_00 v)\ngo to [front v] layer\ngo [backward v] (1) layers\nset [color change v] to [0]\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]\ngo to x: (-196) y: (-146)\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 <(Color Change) = [0]> then\n            if <(Sprite_N) = [9]> then\n                set [sprite_n v] to [2]\n                switch costume to ((Color) + (1))\n            end\n            if <not <key (a v) pressed?>> then\n                set [fire_premuto v] to [0]\n            end\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 <(Color Change) = [0]> 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 ((Color) + (1))\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 ((Color) + (1))\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 (Color)\n                    end\n                end\n                if <(GROUNDED) < (Jump_Delay)> then\n                    set [sprite_n v] to [2]\n                    switch costume to ((Color) + (1))\n                end\n            end\n        else\n            if <(Color Change) = [0]> then\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 ((Color) + (2))\n                    set [fire_premuto v] to [1]\n                    broadcast (Z_SOUND_1 v)\n                end\n            end\n        end\n        verifica_bordo\n    end\nend\n\nwhen I receive [death_1 v]\nset [pause v] to [1]\nset [fire_premuto v] to [0]\nDeath_1\n\nswitch costume to (Sprite_N)\n\nwhen I receive [cad_"death" v]\nswitch costume to (Color)\npoint in direction (-90)\nwait until <([costume # v] of [sprite3 v]) > [2]>\nif <(PROGRESSI) = [16]> then\n    stop [this script v]\nelse\n    switch costume to (jedi_10 v)\n    wait (0.3) seconds\n    set [brightness v] effect to (50)\n    wait (0.2) seconds\n    set [brightness v] effect to (0)\n    wait (0.2) seconds\n    set [brightness v] effect to (50)\n    wait (0.2) seconds\n    set [brightness v] effect to (0)\nend\n\nwhen flag clicked\nforever\n    if <<(Color Change) = [0]> and <(PAUSE) = [0]>> then\n        if <key (1 v) pressed?> then\n            set [color change v] to [1]\n            start sound [ltsaberon2 v]\n            switch costume to (Color)\n            wait (0.5) seconds\n            switch costume to ((Color) + (11))\n            wait (0.1) seconds\n            switch costume to ((Color) + (10))\n            wait (0.1) seconds\n            switch costume to ((Color) + (9))\n            wait (0.1) seconds\n            switch costume to (jedi_00 v)\n            wait (0.1) seconds\n            set [color v] to [2]\n            Sword\n        end\n        if <key (2 v) pressed?> then\n            set [color change v] to [1]\n            start sound [ltsaberon2 v]\n            switch costume to (Color)\n            wait (0.5) seconds\n            switch costume to ((Color) + (11))\n            wait (0.1) seconds\n            switch costume to ((Color) + (10))\n            wait (0.1) seconds\n            switch costume to ((Color) + (9))\n            wait (0.1) seconds\n            switch costume to (jedi_00 v)\n            wait (0.1) seconds\n            set [color v] to [14]\n            Sword\n        end\n        if <key (3 v) pressed?> then\n            set [color change v] to [1]\n            start sound [ltsaberon2 v]\n            switch costume to (Color)\n            wait (0.5) seconds\n            switch costume to ((Color) + (11))\n            wait (0.1) seconds\n            switch costume to ((Color) + (10))\n            wait (0.1) seconds\n            switch costume to ((Color) + (9))\n            wait (0.1) seconds\n            switch costume to (jedi_00 v)\n            wait (0.1) seconds\n            set [color v] to [26]\n            Sword\n        end\n        if <key (4 v) pressed?> then\n            set [color change v] to [1]\n            start sound [ltsaberon2 v]\n            switch costume to (Color)\n            wait (0.5) seconds\n            switch costume to ((Color) + (11))\n            wait (0.1) seconds\n            switch costume to ((Color) + (10))\n            wait (0.1) seconds\n            switch costume to ((Color) + (9))\n            wait (0.1) seconds\n            switch costume to (jedi_00 v)\n            wait (0.1) seconds\n            set [color v] to [38]\n            Sword\n        end\n        if <key (5 v) pressed?> then\n            set [color change v] to [1]\n            start sound [ltsaberon2 v]\n            switch costume to (Color)\n            wait (0.5) seconds\n            switch costume to ((Color) + (11))\n            wait (0.1) seconds\n            switch costume to ((Color) + (10))\n            wait (0.1) seconds\n            switch costume to ((Color) + (9))\n            wait (0.1) seconds\n            switch costume to (jedi_00 v)\n            wait (0.1) seconds\n            set [color v] to [50]\n            Sword\n        end\n        if <key (6 v) pressed?> then\n            set [color change v] to [1]\n            start sound [ltsaberon2 v]\n            switch costume to (Color)\n            wait (0.5) seconds\n            switch costume to ((Color) + (11))\n            wait (0.1) seconds\n            switch costume to ((Color) + (10))\n            wait (0.1) seconds\n            switch costume to ((Color) + (9))\n            wait (0.1) seconds\n            switch costume to (jedi_00 v)\n            wait (0.1) seconds\n            set [color v] to [62]\n            Sword\n        end\n        if <key (7 v) pressed?> then\n            set [color change v] to [1]\n            start sound [ltsaberon2 v]\n            switch costume to (Color)\n            wait (0.5) seconds\n            switch costume to ((Color) + (11))\n            wait (0.1) seconds\n            switch costume to ((Color) + (10))\n            wait (0.1) seconds\n            switch costume to ((Color) + (9))\n            wait (0.1) seconds\n            switch costume to (jedi_00 v)\n            wait (0.1) seconds\n            set [color v] to [74]\n            Sword\n        end\n        if <key (8 v) pressed?> then\n            set [color change v] to [1]\n            start sound [ltsaberon2 v]\n            switch costume to (Color)\n            wait (0.5) seconds\n            switch costume to ((Color) + (11))\n            wait (0.1) seconds\n            switch costume to ((Color) + (10))\n            wait (0.1) seconds\n            switch costume to ((Color) + (9))\n            wait (0.1) seconds\n            switch costume to (jedi_00 v)\n            wait (0.1) seconds\n            set [color v] to [86]\n            Sword\n        end\n        if <<key (9 v) pressed?> and <key (0 v) pressed?>> then\n            repeat until <<<<<<<<key (8 v) pressed?> or <key (7 v) pressed?>> or <key (6 v) pressed?>> or <key (5 v) pressed?>> or <key (4 v) pressed?>> or <key (3 v) pressed?>> or <key (2 v) pressed?>> or <key (1 v) pressed?>>\n                set [color v] to (pick random (1) to (97))\n                switch costume to (Color)\n                wait (0.1) seconds\n            end\n        end\n    end\nend\n\nstart sound [ltsaberon2 v]\nswitch costume to (Color)\nwait (0.5) seconds\nswitch costume to ((Color) + (11))\nwait (0.1) seconds\nswitch costume to ((Color) + (10))\nwait (0.1) seconds\nswitch costume to ((Color) + (9))\nwait (0.1) seconds\nswitch costume to (jedi_00 v)\nwait (0.1) seconds\n\nwhen I receive [level_change v]\nset [fire_premuto v] to [0]\nset [pause v] to [0]\nshow\n\nwhen I receive [end_game v]\npoint towards (vader_01 v)\nswitch costume to (Color)\nwait (2) seconds\nsay [Surrender!] for (2) seconds\nwait (1) seconds\nsay [You are under arrest!] for (4) seconds\nwait (2.8) seconds\nbroadcast (VERY END v)\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\nwhen I receive [death_fall v]\nwait (0.3) seconds\nset [flap v] to [0]\nset [firing v] to [0]\nset [contatore v] to [0]\nswitch costume to (enemy_1_01 v)\nif <(PROGRESSI) < [2]> then\n    set [flap v] to [1]\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    set [flap v] to [1]\n    point in direction (90)\n    go to x: ((X_destra) - (1)) y: (y position)\n    show\nend\nif <<(PROGRESSI) = [4]> or <(PROGRESSI) = [5]>> then\n    set [flap v] to [1]\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    hide\n    set [firing v] to [2]\nend\nif <<(PROGRESSI) = [12]> or <(PROGRESSI) = [13]>> then\n    set [flap v] to [1]\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    set [flap v] to [1]\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    set [flap v] to [1]\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    set [flap v] to [1]\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 [restart v]\nset [flap v] to [1]\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: (20)\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 [flap v] to [1]\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: (20)\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                end\n            else\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                    set [flap v] to [0]\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 Destroyed\nset [flap v] to [0]\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)\nwait (0.1) seconds\nset [flap v] to [1]\n\nwhen I receive [go v]\nforever\n    if <(Flap) = [1]> then\n        switch costume to (enemy_1_4 v)\n        wait (0.1) seconds\n        switch costume to (enemy_1_01 v)\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) = [2]> then\n    set [flap v] to [1]\n    set [visible v] to [1]\n    go to x: (18) y: (-122)\n    set [x_sinistra v] to [-200]\n    set [x_destra v] to [19]\n    show\nend\nif <(PROGRESSI) = [4]> then\n    set [flap v] to [1]\n    set [visible v] to [1]\n    go to x: (18) y: (107)\n    set [x_sinistra v] to [-98]\n    set [x_destra v] to [18]\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 [visible v] to [0]\n    set [firing v] to [2]\n    hide\nend\nif <(PROGRESSI) = [12]> then\n    set [flap v] to [1]\n    set [velocità_max v] to [3]\n    set [delay v] to [15]\n    set [visible v] to [1]\n    go to x: (106) y: (125)\n    set [x_sinistra v] to [-21]\n    set [x_destra v] to [100]\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 [flap v] to [1]\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: (2)\n    set [x_sinistra v] to [-37]\n    set [x_destra v] to [161]\n    show\nend\nif <(PROGRESSI) = [18]> then\n    set [flap v] to [1]\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 [65]\n    set [x_destra v] to [170]\n    show\nend\nif <(PROGRESSI) = [20]> then\n    set [flap v] to [1]\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 [70]\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\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 [moving v] to [0]\n    move (-15) steps\n    animate\n    broadcast (END_FIRE_1 v)\nelse\n    if <<([x position v] of [cube_01 v]) < (x position)> and <([direction v] of [cube_01 v]) = [90]>> then\n        set [moving v] to [0]\n        move (-15) steps\n        animate\n        broadcast (END_FIRE_1 v)\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_2 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@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                end\n            else\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                    set [flap v] to [0]\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)\nwait (0.1) seconds\nset [flap v] to [1]\n\ndefine Destroyed\nset [flap v] to [0]\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 [flap v] to [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: (-15) y: (104)\n    set [flap v] to [1]\n    set [x_sinistra v] to [-15]\n    set [x_destra v] to [160]\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 [flap v] to [1]\n    set [x_sinistra v] to [-110]\n    set [x_destra v] to [90]\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 [flap v] to [1]\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]\nset [flap v] to [0]\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    set [flap v] to [1]\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    set [flap v] to [1]\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    set [flap v] to [1]\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    set [flap v] to [1]\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 I receive [go v]\nforever\n    if <(Flap) = [1]> then\n        switch costume to (enemy_1_4 v)\n        wait (0.1) seconds\n        switch costume to (enemy_1_01 v)\n    end\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_2 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 [moving v] to [0]\n    move (-15) steps\n    animate\n    broadcast (END_FIRE_2 v)\nelse\n    if <<([x position v] of [cube_01 v]) < (x position)> and <([direction v] of [cube_01 v]) = [90]>> then\n        set [moving v] to [0]\n        move (-15) steps\n        animate\n        broadcast (END_FIRE_2 v)\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\nset rotation style [all around v]\npoint in direction (pick random (75) to (135))\ngo to x: ((x position) - (10)) y: (y position)\nset [velocità_2 v] to [0]\nset [rimbalzo v] to [1]\nanimate2\n\nset rotation style [all around v]\npoint in direction (pick random (-135) to (-75))\ngo to x: ((x position) + (10)) y: (y position)\nset [velocità_2 v] to [0]\nset [rimbalzo v] to [1]\nanimate2\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    set [death v] to [1]\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)\n    if <(Count Dooku) = [3]> then\n        change [battle droids v] by (1)\n    end\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 flag clicked\nset [a.s.v.t.i.p.d.n v] to [0]\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 <<(A.S.V.T.I.P.D.N) = [0]> and <<(([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\nwhen I receive [death_fall v]\nwait (0.3) seconds\nset [a.s.v.t.i.p.d.n v] to [0]\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]\n    set [battle droids v] to [1]\n    set [death v] to [1]\n    forever\n        if <<(Battle droids) = [3]> or <(Battle droids) = [6]>> then\n            set [count dooku v] to [0]\n        end\n    end\nend\n\nwhen I receive [droids v]\nwait (2) seconds\nif <(Count Dooku) = [3]> then\n    set [death v] to [0]\n    if <(Battle droids) = [1]> then\n        set [dying v] to [0]\n        show\n        go to [front v] layer\n        go [backward v] (1) layers\n        set [visible v] to [1]\n        if <([x position v] of [cube_01 v]) > [0]> then\n            go to x: (-210) y: (-117)\n            set [a.s.v.t.i.p.d.n v] to [1]\n            set [x_sinistra v] to [-131]\n            set [x_destra v] to [131]\n            wait (1.5) seconds\n            set [a.s.v.t.i.p.d.n v] to [0]\n        else\n            go to x: (210) y: (-117)\n            set [a.s.v.t.i.p.d.n v] to [1]\n            set [x_destra v] to [-131]\n            set [x_sinistra v] to [131]\n            wait (1.5) seconds\n            set [a.s.v.t.i.p.d.n v] to [0]\n        end\n    end\n    if <(Battle droids) = [4]> then\n        set [dying v] to [0]\n        show\n        go to [front v] layer\n        go [backward v] (1) layers\n        set [delay v] to [10]\n        set [visible v] to [1]\n        go to x: (-210) y: (-117)\n        set [a.s.v.t.i.p.d.n v] to [1]\n        set [x_sinistra v] to [-210]\n        set [x_destra v] to [-131]\n        wait (1) seconds\n        set [a.s.v.t.i.p.d.n v] to [0]\n    end\n    if <(Death) = [0]> then\n        set [delay v] to [10]\n        set [firing v] to [0]\n        Fire\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: (169) y: (13)\n    set [x_sinistra v] to [95]\n    set [x_destra v] to [170]\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: (104)\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: (-126)\n    set [x_sinistra v] to [122]\n    set [x_destra v] to [210]\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: (-4)\n    set [x_sinistra v] to [-42]\n    set [x_destra v] to [90]\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: (100)\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: (-150) y: (-4)\n    set [x_sinistra v] to [-150]\n    set [x_destra v] to [-90]\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 [battle droids v] to [1]\n    set [x_sinistra v] to [210]\n    set [x_destra v] to [131]\n    set [firing v] to [2]\n    set [visible v] to [0]\n    set [death v] to [1]\n    forever\n        if <<(Battle droids) = [3]> or <(Battle droids) = [6]>> then\n            set [count dooku v] to [0]\n        end\n    end\nend\n\ndefine Fire\nswitch costume to (enemy_1_02 v)\nset [firing v] to [1]\nbroadcast (FIRE_3 v)\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]) + (8))\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\nset [death v] to [1]\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)\nif <(Count Dooku) = [3]> then\n    change [battle droids v] by (1)\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 flag clicked\nset [a.s.v.t.i.p.d.n 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            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 <<(A.S.V.T.I.P.D.N) = [0]> and <<(([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 [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\nwhen I receive [droids v]\nwait (2) seconds\nif <(Count Dooku) = [3]> then\n    set [death v] to [0]\n    if <(Battle droids) = [1]> then\n        set [dying v] to [0]\n        wait (0.5) seconds\n        show\n        go to [front v] layer\n        go [backward v] (1) layers\n        set [visible v] to [1]\n        if <([x position v] of [cube_01 v]) > [0]> then\n            go to x: (-210) y: (-117)\n            set [a.s.v.t.i.p.d.n v] to [1]\n            set [x_sinistra v] to [-131]\n            set [x_destra v] to [131]\n            wait (0.8) seconds\n            set [a.s.v.t.i.p.d.n v] to [0]\n        else\n            go to x: (210) y: (-117)\n            set [a.s.v.t.i.p.d.n v] to [1]\n            set [x_destra v] to [-131]\n            set [x_sinistra v] to [131]\n            wait (0.8) seconds\n            set [a.s.v.t.i.p.d.n v] to [0]\n        end\n    end\n    if <(Battle droids) = [4]> then\n        set [dying v] to [0]\n        show\n        go to [front v] layer\n        go [backward v] (1) layers\n        set [delay v] to [10]\n        set [visible v] to [1]\n        go to x: (210) y: (-117)\n        set [a.s.v.t.i.p.d.n v] to [1]\n        set [x_sinistra v] to [-210]\n        set [x_destra v] to [-131]\n        wait (1) seconds\n        set [a.s.v.t.i.p.d.n v] to [0]\n    end\n    if <(Death) = [0]> then\n        set [delay v] to [10]\n        set [firing v] to [0]\n        Fire\n    end\nend\n\nglide (0.8) secs to x: (170) y: (-117)\n\nif <(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)\nend\nset [walk_delay v] to ((Walk_Delay) + (1))\nif <(Walk_Delay) > [2]> then\n    set [walk_delay v] to [0]\n    set [walk_costume v] to ((Walk_Costume) + (1))\nend\n\nCammina_o_Fermo\n\nwhen I receive [death_fall v]\nwait (0.3) seconds\nset [a.s.v.t.i.p.d.n v] to [0]\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]\n    set [death v] to [1]\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: (-5)\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: (118)\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: (-117)\n    set [x_sinistra v] to [-25]\n    set [x_destra v] to [133]\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: (100)\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: (150) y: (-4)\n    set [x_sinistra v] to [75]\n    set [x_destra v] to [150]\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 [battle droids v] to [1]\n    set [x_sinistra v] to [210]\n    set [x_destra v] to [131]\n    set [firing v] to [2]\n    set [visible v] to [0]\n    set [death v] to [1]\nend\n\ndefine Fire\nswitch costume to (enemy_1_02 v)\nset [firing v] to [1]\nbroadcast (FIRE_4 v)\n\nglide (0.8) secs to x: (-170) y: (-117)\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]) + (8))\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@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\nstart sound [Jetpack2.mp3 v]\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) < [5]> then\n    set [brightness v] effect to (0)\n    switch costume to (storm04 v)\n    Fly\nelse\n    set [brightness v] effect to (0)\n    set [cad_bane1 v] to [0]\n    set [pause v] to [1]\n    broadcast (Cad_"Death" v)\n    die\nend\n\nwhen flag clicked\nset [cad_bane1 v] to [0]\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        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            if <<<(Cad_Bane1) = [2]> and <([x position v] of [sprite1 v]) > [-185]>> and <([y position v] of [sprite1 v]) > [-30]>> 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\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\nbroadcast (DOOR_DESTROYED v)\n\ndefine die\nset [firing v] to [2]\nset [position_y v] to [138]\npoint in direction (-90)\nswitch costume to (storm04 v)\nglide (1) secs to x: (-186) y: (139)\nswitch costume to (enemy_1_01 v)\npoint in direction (90)\nbroadcast (END_LASER v)\nbroadcast (TD v)\nwait (0.2) seconds\nswitch costume to (enemy_1_2 v)\nwait (0.5) seconds\nswitch costume to (enemy_1_01 v)\nsay [Good luck Jedi!] for (3) seconds\nwait (0.5) seconds\nstart sound [Jetpack3.mp3 v]\nswitch costume to (storm04 v)\nglide (0.5) secs to x: (-186) y: (200)\nhide\nset [pause v] to [0]\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 [139]\nend\nif <(y position) = [139]> then\n    set [position_y v] to [-106]\nend\nif <<(y position) = [-106]> or <(y position) = [139]>> then\n    set [cad_bane1 v] to [0]\n    glide (0.7) secs to x: (120) y: (POSITION_Y)\nelse\n    set [cad_bane1 v] to [2]\n    glide (1) secs to x: (-186) y: (POSITION_Y)\nend\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\nwhen I receive [level_change v]\nset rotation style [left-right v]\nset [cad_bane1 v] to [0]\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: (120) y: (-106)\n    set [delay v] to [12]\n    set [visible v] to [1]\n    set [damage v] to [0]\n    wait until <(y position) = [7]>\n    set [cad_bane1 v] to [1]\n    point in direction (-90)\n    wait (0.1) seconds\n    point in direction (-90)\n    switch costume to (enemy_1_2 v)\n    wait (0.5) seconds\n    point in direction (-90)\n    switch costume to (enemy_1_01 v)\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]\nset [cad_bane1 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: (120) y: (-106)\n    show\n    set [firing v] to [0]\n    set [damage v] to [0]\n    point in direction (-90)\n    wait until <(y position) = [7]>\n    set [cad_bane1 v] to [1]\n    point in direction (-90)\n    wait (0.1) seconds\n    point in direction (-90)\n    switch costume to (enemy_1_2 v)\n    wait (0.5) seconds\n    point in direction (-90)\n    switch costume to (enemy_1_01 v)\nend\nif <(PROGRESSI) > [15]> 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_5 v)\nwait (0.1) seconds\nswitch costume to (enemy_1_01 v)\n\n@Sprite3\n\nwhen flag clicked\nswitch costume to (costume3 v)\nset [turn v] to [0]\nhide\n\nwhen I receive [td v]\nforever\n    if <(Turn) = [1]> then\n        turn right (6) degrees\n    end\nend\n\nwhen I receive [level_change v]\nset [turn v] to [0]\nhide\nif <<(PROGRESSI) > [14]> and <(costume [number v]) > [1]>> then\n    switch costume to (costume3 v)\n    stop [other scripts in sprite v]\n    stop all sounds\nend\n\nwhen I receive [death_fall v]\nset [turn v] to [0]\nhide\nstop [other scripts in sprite v]\nwait (0.2) seconds\nif <<<(PROGRESSI) = [14]> or <(PROGRESSI) = [15]>> and <(costume [number v]) = [2]>> then\n    stop all sounds\nend\nswitch costume to (costume3 v)\n\nwait (0.1) seconds\nchange size by (20)\nwait (0.1) seconds\nchange size by (40)\nwait (0.1) seconds\nchange size by (40)\nwait (0.1) seconds\nswitch costume to (costume2 v)\nwait (1) seconds\n\nwhen I receive [td v]\nswitch costume to (costume1 v)\ngo to [front v] layer\nset [turn v] to [0]\ngo to (enemy_1_5 v)\nchange y by (-20)\nchange x by (-10)\nshow\nstart sound [td.mp3 v]\nwait (0.2) seconds\nchange x by (10)\nset [turn v] to [1]\nwait (0.01) seconds\nglide (0.2) secs to x: (-84) y: (125)\nglide (0.3) secs to x: (-2) y: (103)\nglide (0.1) secs to x: (15) y: (112)\nglide (0.05) secs to x: (25) y: (102)\nglide (0.5) secs to x: (58) y: (-23)\nglide (0.1) secs to x: (65) y: (-2)\nglide (0.2) secs to x: (87) y: (-22)\nglide (0.1) secs to x: (99) y: (-17)\nglide (0.1) secs to x: (105) y: (-23)\nglide (0.5) secs to x: (134) y: (-23)\nset [turn v] to [0]\nwait until <(PAUSE) = [0]>\nwait (8) seconds\nstart sound [Explosion-4 v]\ngo to x: (0) y: (0)\npoint in direction (90)\nset [pause v] to [1]\nrepeat (15)\n    next costume\n    wait (0.01) seconds\nend\nwait (0.5) seconds\nset [pause v] to [0]\nbroadcast (DEATH_FALL v)\nhide\nswitch costume to (costume1 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\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\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\nwhen I receive [fire_5 v]\nif <(Cad_Bane1) = [2]> then\n    show\n    go to [front v] layer\n    go [backward v] (2) layers\n    set rotation style [all around v]\n    go to x: ([x position v] of [enemy_1_5 v]) y: (([y position v] of [enemy_1_5 v]) - (7))\n    point towards (cube_01 v)\n    turn left (5) degrees\n    set [moving v] to [1]\n    set [rimbalzo v] to [0]\nelse\n    show\n    go to [front v] layer\n    go [backward v] (2) layers\n    set rotation style [left-right v]\n    if <<([direction v] of [enemy_1_5 v]) > [0]> and <([direction v] of [enemy_1_5 v]) < [180]>> then\n        point in direction (90)\n    else\n        point in direction (-90)\n    end\n    go to x: ([x position v] of [enemy_1_5 v]) y: (([y position v] of [enemy_1_5 v]) - (7))\n    set [moving v] to [1]\n    set [rimbalzo v] to [0]\nend\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\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\ndefine animate2\ncreate clone of (_myself_ v)\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\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\ngo to x: (178) y: (155)\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) = [6]> then\n            switch costume to (health_6 v)\n            wait (6) seconds\n            hide\n        else\n            go to [front v] layer\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@Vader_01\n\nwhen flag clicked\nhide\ngo to [front v] layer\nswitch costume to (vader_01 v)\nset [count dooku v] to [0]\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            if <not <(Count Dooku) = [3]>> 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]) > [3]> and <([costume # v] of [cube_01 v]) < [11]>> or <<([costume # v] of [cube_01 v]) > [15]> and <([costume # v] of [cube_01 v]) < [23]>>> or <<([costume # v] of [cube_01 v]) > [27]> and <([costume # v] of [cube_01 v]) < [35]>>> or <<([costume # v] of [cube_01 v]) > [39]> and <([costume # v] of [cube_01 v]) < [47]>>> or <<([costume # v] of [cube_01 v]) > [51]> and <([costume # v] of [cube_01 v]) < [59]>>> or <<([costume # v] of [cube_01 v]) > [63]> and <([costume # v] of [cube_01 v]) < [71]>>> or <<([costume # v] of [cube_01 v]) > [75]> and <([costume # v] of [cube_01 v]) < [83]>>> or <<([costume # v] of [cube_01 v]) > [87]> and <([costume # v] of [cube_01 v]) < [95]>>>> 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            else\n                Jump\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 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)\nchange [count dooku v] by (1)\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\nstart sound [ltsaberon2 v]\nswitch costume to (vader_01 v)\nwait (0.1) seconds\nswitch costume to (vader_2 v)\nwait (0.1) seconds\nswitch costume to (vader_3 v)\nwait (0.1) seconds\nswitch costume to (vader_4 v)\nwait (0.1) seconds\nswitch costume to (vader_5 v)\n\ndefine hit\nif <<<<<<<<<([costume # v] of [cube_01 v]) > [5]> and <([costume # v] of [cube_01 v]) < [9]>> or <<([costume # v] of [cube_01 v]) > [17]> and <([costume # v] of [cube_01 v]) < [21]>>> or <<([costume # v] of [cube_01 v]) > [29]> and <([costume # v] of [cube_01 v]) < [33]>>> or <<([costume # v] of [cube_01 v]) > [41]> and <([costume # v] of [cube_01 v]) < [45]>>> or <<([costume # v] of [cube_01 v]) > [53]> and <([costume # v] of [cube_01 v]) < [57]>>> or <<([costume # v] of [cube_01 v]) > [65]> and <([costume # v] of [cube_01 v]) < [69]>>> or <<([costume # v] of [cube_01 v]) > [77]> and <([costume # v] of [cube_01 v]) < [81]>>> or <<([costume # v] of [cube_01 v]) > [89]> and <([costume # v] of [cube_01 v]) < [93]>>> 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 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\nwhen I receive [death_fall v]\nif <(PROGRESSI) = [22]> then\n    set [count dooku v] to [0]\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    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    switch costume to (vader_8 v)\n    show\n    go to [front v] layer\n    wait (1) seconds\n    switch costume to (vader_5 v)\n    wait (0.5) seconds\n    start sound [ltsaberon01 v]\n    switch costume to (vader_4 v)\n    wait (0.1) seconds\n    switch costume to (vader_3 v)\n    wait (0.1) seconds\n    switch costume to (vader_2 v)\n    wait (0.1) seconds\n    switch costume to (vader_01 v)\n    wait (1) seconds\nend\n\nwhen I receive [very end v]\nhide\n\ndefine Jump\nif <<(Count Dooku) = [3]> and <(PAUSE) = [0]>> then\n    broadcast (Droids v)\n    wait (0.5) seconds\n    switch costume to (vader_8 v)\n    point towards (menu1 v)\n    if <(direction) > [0]> then\n        start sound [270323__littlerobotsoundfactory__jump-03 v]\n        glide (0.7) secs to x: (-25) y: (77)\n    else\n        start sound [270323__littlerobotsoundfactory__jump-03 v]\n        glide (0.7) secs to x: (25) y: (77)\n    end\n    glide (0.2) secs to x: (0) y: (39)\n    switch costume to (vader_6 v)\n    repeat until <not <(Count Dooku) = [3]>>\n        if <(BOSS_2_HEALTH) > [1]> then\n            point towards (cube_01 v)\n            wait (0.5) seconds\n            Fire\n            wait (1) seconds\n        end\n    end\n    if <not <(BOSS_2_HEALTH) = [1]>> then\n        set [count dooku v] to [0]\n        switch costume to (vader_01 v)\n        start sound [270323__littlerobotsoundfactory__jump-03 v]\n        point in direction (90)\n        glide (0.2) secs to x: (25) y: (77)\n        glide (0.7) secs to x: (50) y: (-141)\n        set [battle droids v] to [4]\n    end\nend\n\nwhen I receive [level_change v]\nif <(PROGRESSI) = [22]> then\n    set [count dooku v] to [0]\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    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    switch costume to (vader_8 v)\n    show\n    go to [front v] layer\n    wait (1) seconds\n    switch costume to (vader_5 v)\n    wait (0.5) seconds\n    start sound [ltsaberon01 v]\n    switch costume to (vader_4 v)\n    wait (0.1) seconds\n    switch costume to (vader_3 v)\n    wait (0.1) seconds\n    switch costume to (vader_2 v)\n    wait (0.1) seconds\n    switch costume to (vader_01 v)\nend\n\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\ndefine Fire\nswitch costume to (vader_7 v)\nset [firing v] to [1]\nbroadcast (FIRE_6 v)\nwait (0.1) seconds\nswitch costume to (vader_6 v)\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@Enemy_1_03_laser6\n\nanimate2\n\nrepeat (20)\n    create clone of (_myself_ v)\nend\n\nturn right (7) degrees\n\ndefine rimbalza\nif <<([x position v] of [cube_01 v]) > (x position)> and <([direction v] of [cube_01 v]) = [-90]>> then\n    set [velocità_2 v] to [0]\n    set [rimbalzo v] to [1]\n    animate\nelse\n    if <<([x position v] of [cube_01 v]) < (x position)> and <([direction v] of [cube_01 v]) = [90]>> then\n        set [velocità_2 v] to [0]\n        set [rimbalzo v] to [1]\n        animate\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_6 v)\n    end\nend\n\nset [ghost v] effect to (0)\n\nset rotation style [all around v]\npoint in direction (pick random (-135) to (-75))\ngo to x: ((x position) + (10)) y: (y position)\n\ndefine animate2\ncreate clone of (_myself_ v)\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 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à)) * (1))\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_6 v)\n        delete this clone\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\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 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 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)\nend\ndelete this clone\n\nchange y by (10)\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_6 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_6 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_6 v)\n                end\n            end\n        else\n            hide\n        end\n    end\nend\n\nset rotation style [all around v]\npoint in direction (pick random (75) to (135))\ngo to x: ((x position) - (10)) y: (y position)\n\nwhen I receive [fire_6 v]\nshow\ngo to [front v] layer\ngo [backward v] (2) layers\nset rotation style [all around v]\nif <([direction v] of [vader_01 v]) > [0]> then\n    go to x: (([x position v] of [vader_01 v]) + (18)) y: (([y position v] of [vader_01 v]) + (15))\nelse\n    go to x: (([x position v] of [vader_01 v]) - (11)) y: (([y position v] of [vader_01 v]) + (12))\nend\npoint towards (cube_01 v)\nif <(direction) > [0]> then\n    turn left (7) degrees\nend\nset [moving v] to [1]\nset [rimbalzo v] to [0]\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\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            go to [front v] layer\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\ngo to x: (178) y: (155)\n\nwhen I receive [end_game v]\ngo to [front v] layer\nhide\n\ngo to [front v] layer\n\n