David le cube 2 (platformer)

Instructions: Allez voir le 1 si ce n'est pas encore fait\nhttps://scratch.mit.edu/projects/639760972/\nC'est un jeu d'aventure :\nles flèches pour se diriger et sauter.\nAmusez-vous et si vous arrivez jusqu'à la fin ( ça m'étonnerais): dites en commentaires la réponse de David. :)\n

@Stage\n\nclear graphic effects\nswitch backdrop to (menu v)\n\nwhen flag clicked\nwait (7) seconds\nswitch backdrop to (menu v)\n\n@David\n\nwhen flag clicked\nset [mode v] to [0]\nset [gravité v] to [-1]\nset [force saut v] to [12]\nset [accélération v] to [1.5]\nset [résistance v] to [0.8]\nset [vitesse y v] to [0]\nswitch costume to (costume1 v)\ngo to x: (-143) y: (58)\nforever\n    if <key (up arrow v) pressed?> then\n        if <(chute) < [3]> then\n            set [vitesse y v] to (force saut)\n        end\n    end\n    if <key (left arrow v) pressed?> then\n        change [vitesse x v] by ((0) - (accélération))\n        switch costume to (costume2 v)\n    end\n    if <key (right arrow v) pressed?> then\n        change [vitesse x v] by (1.5)\n        switch costume to (costume1 v)\n    end\n    set [vitesse x v] to ((résistance) * (vitesse x))\n    change [vitesse y v] by (gravité)\n    mouvement pas (([abs v] of (vitesse y) ) + ([abs v] of (vitesse x) ))\nend\n\ndefine mouvement pas (pas)\nchange [chute v] by (1)\nrepeat (pas)\n    set [dernière valeur v] to (x position)\n    change x by ((vitesse x) / (pas))\n    if <touching color (#7ea2a9)?> then\n        set x to (dernière valeur)\n        set [vitesse x v] to [0]\n    end\n    set [dernière valeur v] to (y position)\n    change y by ((vitesse y) / (pas))\n    if <touching color (#7ea2a9)?> then\n        set y to (dernière valeur)\n        if <(vitesse y) < [0]> then\n            set [chute v] to [0]\n        end\n        set [vitesse y v] to [0]\n    end\nend\n\nwhen flag clicked\nhide variable [niveau v]\nhide variable [vie v]\n\nwhen backdrop switches to [decor1 v]\nshow variable [niveau v]\nset [niveau v] to [1]\nset [vie v] to [8]\n\nwhen backdrop switches to [decor1 v]\nset size to (30) %\ngo to x: (-170) y: (219)\nshow\n\nwhen flag clicked\nforever\n    if <touching color (#ff0000)?> then\n        change [vie v] by (-1)\n        go to x: (-170) y: (219)\n        start sound [oh non v]\n        switch costume to (david mal v)\n        wait (0.2) seconds\n        switch costume to (costume1 v)\n    end\n    if <(Vie) = [0]> then\n        switch backdrop to (game over v)\n        hide\n        wait (5) seconds\n        switch backdrop to (menu v)\n        set [niveau v] to [1]\n        set [vie v] to [6]\n        hide variable [niveau v]\n        hide variable [vie v]\n    end\n    if <touching color (#fff700)?> then\n        switch backdrop to (next backdrop v)\n        go to x: (-143) y: (58)\n        change [niveau v] by (1)\n    end\n    if <touching color (#ffa100)?> then\n        set [force saut v] to [20]\n        wait (3) seconds\n        set [force saut v] to [12]\n    end\n    if <touching color (#00ffff)?> then\n        change [vie v] by (-2)\n        go to x: (-170) y: (219)\n        switch costume to (david mal v)\n        wait (0.2) seconds\n        switch costume to (costume1 v)\n    end\n    if <(backdrop [number v]) = [2]> then\n        start sound [i'm david v]\n    end\n    if <touching color (#cf00ff)?> then\n        go to x: (66) y: (123)\n        start sound [Teleport2 v]\n    end\n    if <touching color (#caff00)?> then\n        glide (0.2) secs to x: (11) y: (3)\n    end\n    if <touching color (#c0ff00)?> then\n        glide (0.2) secs to x: (-69) y: (3)\n    end\n    if <touching color (#b3ff00)?> then\n        glide (0.2) secs to x: (-150) y: (3)\n    end\n    if <touching color (#e900ff)?> then\n        go to x: (108) y: (80)\n        start sound [Teleport2 v]\n    end\n    if <touching color (#ffac58)?> then\n        next backdrop\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <key (space v) pressed?> then\n        go to x: (-143) y: (58)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (cubebleu v)?> then\n        set size to (10) %\n        if <touching color (#fff700)?> then\n            set size to (30) %\n            switch backdrop to (next backdrop v)\n            go to x: (-143) y: (58)\n            change [niveau v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (cubebleu2 v)?> then\n        set size to (30) %\n        go to x: (-137) y: (69)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(backdrop [number v]) = [19]> then\n        switch costume to (davidsniperd v)\n    end\n    if <(backdrop [number v]) = [20]> then\n        switch costume to (davidsniperd v)\n    end\n    if <(backdrop [number v]) = [21]> then\n        switch costume to (davidsniperd v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(backdrop [number v]) = [22]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(username) = [Swagg1111]> then\n        if <key (down arrow v) pressed?> then\n            next backdrop\n            go to x: (-143) y: (58)\n        end\n    end\nend\n\nwhen flag clicked\nset [temps v] to [0]\nhide variable [temps v]\nforever\n    if <(backdrop [number v]) = [26]> then\n        hide variable [temps v]\n    end\n    if <(backdrop [number v]) = [1]> then\n        hide variable [temps v]\n    end\n    if <(backdrop [number v]) = [2]> then\n        hide variable [temps v]\n        set [temps v] to [0]\n    end\n    if <(backdrop [number v]) = [3]> then\n        show variable [temps v]\n        wait (1) seconds\n        change [temps v] by (1)\n    end\n    if <(backdrop [number v]) = [4]> then\n        show variable [temps v]\n        wait (1) seconds\n        change [temps v] by (1)\n    end\n    if <(backdrop [number v]) = [5]> then\n        show variable [temps v]\n        wait (1) seconds\n        change [temps v] by (1)\n    end\n    if <(backdrop [number v]) = [6]> then\n        show variable [temps v]\n        wait (1) seconds\n        change [temps v] by (1)\n    end\n    if <(backdrop [number v]) = [7]> then\n        show variable [temps v]\n        wait (1) seconds\n        change [temps v] by (1)\n    end\n    if <(backdrop [number v]) = [8]> then\n        show variable [temps v]\n        wait (1) seconds\n        change [temps v] by (1)\n    end\n    if <(backdrop [number v]) = [9]> then\n        show variable [temps v]\n        wait (1) seconds\n        change [temps v] by (1)\n    end\n    if <(backdrop [number v]) = [10]> then\n        show variable [temps v]\n        wait (1) seconds\n        change [temps v] by (1)\n    end\n    if <(backdrop [number v]) = [11]> then\n        show variable [temps v]\n        wait (1) seconds\n        change [temps v] by (1)\n    end\n    if <(backdrop [number v]) = [12]> then\n        show variable [temps v]\n        wait (1) seconds\n        change [temps v] by (1)\n    end\n    if <(backdrop [number v]) = [13]> then\n        show variable [temps v]\n        wait (1) seconds\n        change [temps v] by (1)\n    end\n    if <(backdrop [number v]) = [14]> then\n        show variable [temps v]\n        wait (1) seconds\n        change [temps v] by (1)\n    end\n    if <(backdrop [number v]) = [15]> then\n        show variable [temps v]\n        wait (1) seconds\n        change [temps v] by (1)\n    end\n    if <(backdrop [number v]) = [16]> then\n        show variable [temps v]\n        wait (1) seconds\n        change [temps v] by (1)\n    end\n    if <(backdrop [number v]) = [17]> then\n        show variable [temps v]\n        wait (1) seconds\n        change [temps v] by (1)\n    end\n    if <(backdrop [number v]) = [18]> then\n        show variable [temps v]\n        wait (1) seconds\n        change [temps v] by (1)\n    end\n    if <(backdrop [number v]) = [19]> then\n        show variable [temps v]\n        wait (1) seconds\n        change [temps v] by (1)\n    end\n    if <(backdrop [number v]) = [20]> then\n        show variable [temps v]\n        wait (1) seconds\n        change [temps v] by (1)\n    end\n    if <(backdrop [number v]) = [21]> then\n        show variable [temps v]\n        wait (1) seconds\n        change [temps v] by (1)\n    end\n    if <(backdrop [number v]) = [22]> then\n        show variable [temps v]\n        wait (1) seconds\n        change [temps v] by (1)\n    end\n    if <(backdrop [number v]) = [28]> then\n        hide variable [temps v]\n    end\nend\n\nwhen flag clicked\nforever\n    hide variable [temps2 v]\n    if <(backdrop [number v]) = [28]> then\nend\n\nwhen flag clicked\nset [temps2 v] to [0]\nforever\n    hide variable [temps2 v]\n    if <(backdrop [number v]) = [3]> then\n        wait (1) seconds\n        change [temps2 v] by (1)\n    end\n    if <(backdrop [number v]) = [4]> then\n        wait (1) seconds\n        change [temps2 v] by (1)\n    end\n    if <(backdrop [number v]) = [5]> then\n        wait (1) seconds\n        change [temps2 v] by (1)\n    end\n    if <(backdrop [number v]) = [6]> then\n        wait (1) seconds\n        change [temps2 v] by (1)\n    end\n    if <(backdrop [number v]) = [7]> then\n        wait (1) seconds\n        change [temps2 v] by (1)\n    end\n    if <(backdrop [number v]) = [8]> then\n        wait (1) seconds\n        change [temps2 v] by (1)\n    end\n    if <(backdrop [number v]) = [9]> then\n        wait (1) seconds\n        change [temps2 v] by (1)\n    end\n    if <(backdrop [number v]) = [10]> then\n        wait (1) seconds\n        change [temps2 v] by (1)\n    end\n    if <(backdrop [number v]) = [11]> then\n        wait (1) seconds\n        change [temps2 v] by (1)\n    end\n    if <(backdrop [number v]) = [12]> then\n        wait (1) seconds\n        change [temps2 v] by (1)\n    end\n    if <(backdrop [number v]) = [13]> then\n        wait (1) seconds\n        change [temps2 v] by (1)\n    end\n    if <(backdrop [number v]) = [14]> then\n        wait (1) seconds\n        change [temps2 v] by (1)\n    end\n    if <(backdrop [number v]) = [15]> then\n        wait (1) seconds\n        change [temps2 v] by (1)\n    end\n    if <(backdrop [number v]) = [16]> then\n        wait (1) seconds\n        change [temps2 v] by (1)\n    end\n    if <(backdrop [number v]) = [17]> then\n        wait (1) seconds\n        change [temps2 v] by (1)\n    end\n    if <(backdrop [number v]) = [18]> then\n        wait (1) seconds\n        change [temps2 v] by (1)\n    end\n    if <(backdrop [number v]) = [19]> then\n        wait (1) seconds\n        change [temps2 v] by (1)\n    end\n    if <(backdrop [number v]) = [20]> then\n        wait (1) seconds\n        change [temps2 v] by (1)\n    end\n    if <(backdrop [number v]) = [21]> then\n        wait (1) seconds\n        change [temps2 v] by (1)\n    end\n    if <(backdrop [number v]) = [22]> then\n        wait (1) seconds\n        change [temps2 v] by (1)\n    end\n    if <(backdrop [number v]) = [28]> then\n        show variable [temps2 v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(backdrop [number v]) = [15]> then\n        say (join [Bravo tu es fort ] (username)) for (2) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    hide variable [best score v]\n    if <(backdrop [number v]) = [28]> then\n        show variable [best score v]\n    end\n    if <(Best score) > (Temps2)> then\n        set [best score v] to (Temps2)\n    end\nend\n\nwhen I receive [fleche haut v]\nrepeat (2)\n    if <(chute) < [3]> then\n        set [vitesse y v] to (force saut)\n    end\n    if <key (left arrow v) pressed?> then\n        change [vitesse x v] by ((0) - (accélération))\n        switch costume to (costume2 v)\n    end\n    if <key (right arrow v) pressed?> then\n        change [vitesse x v] by (1.5)\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [fleche gauche v]\nrepeat (2)\n    change [vitesse x v] by ((0) - (accélération))\n    switch costume to (costume2 v)\nend\n\nwhen I receive [fleche droite v]\nrepeat (2)\n    change [vitesse x v] by (1.5)\n    switch costume to (costume1 v)\nend\n\nwhen backdrop switches to [menu v]\nstart sound [BLACK SUN v]\n\nwhen backdrop switches to [decor1 v]\nstop all sounds\nforever\n    play sound [BLACK SUN2 v] until done\nend\n\n@play\n\nwhen this sprite clicked\nswitch backdrop to (decor1 v)\nstart sound [pop v]\n\nwhen backdrop switches to [menu v]\nshow\ngo to x: (10) y: (-70)\nforever\n    set size to (100) %\n    if <touching (mouse-pointer v)?> then\n        set size to (120) %\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(backdrop [number v]) = [1]>> then\n        hide\n    end\nend\n\nwhen flag clicked\nhide\nwait (7) seconds\nshow\n\n@Sprite1\n\nwhen flag clicked\nhide\nforever\n    if <(backdrop [number v]) = [5]> then\n        show\n        go to x: (-92) y: (-74)\n        glide (0.5) secs to x: (185) y: (-74)\n        glide (0.5) secs to x: (-92) y: (-74)\n        if <(backdrop [number v]) = [6]> then\n            hide\n        end\n        if <not <(backdrop [number v]) = [5]>> then\n            hide\n        end\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nhide\nforever\n    if <(backdrop [number v]) = [5]> then\n        show\n        go to x: (-274) y: (-191)\n        glide (0.3) secs to x: (-175) y: (-191)\n        glide (0.5) secs to x: (-274) y: (-191)\n    end\n    if <not <(backdrop [number v]) = [5]>> then\n        hide\n    end\nend\n\n@Clown\n\nwhen flag clicked\nhide\nforever\n    if <not <(backdrop [number v]) = [7]>> then\n        hide\n    end\n    if <(backdrop [number v]) = [7]> then\n        show\n        go to x: (176) y: (-90)\n        start sound [Crazy Laugh v]\n        repeat (3)\n            switch costume to (gauchehaut v)\n            wait (0.2) seconds\n            change x by (-30)\n            switch costume to (gauchebas v)\n            wait (0.2) seconds\n            change x by (-30)\n        end\n        start sound [Crazy Laugh v]\n        repeat (3)\n            switch costume to (droitebas v)\n            wait (0.2) seconds\n            change x by (30)\n            switch costume to (droitehaut v)\n            wait (0.2) seconds\n            change x by (30)\n        end\n    end\n    if <(backdrop [number v]) = [8]> then\n        hide\n    end\nend\n\n@Clown2\n\nwhen flag clicked\nhide\nforever\n    if <(backdrop [number v]) = [8]> then\n        show\n        go to x: (219) y: (-94)\n        start sound [Crazy Laugh v]\n        repeat (3)\n            switch costume to (gauchehaut v)\n            wait (0.5) seconds\n            change x by (-30)\n            switch costume to (gauchebas v)\n            wait (0.5) seconds\n            change x by (-30)\n        end\n        start sound [Crazy Laugh v]\n        repeat (3)\n            switch costume to (droitebas v)\n            wait (0.5) seconds\n            change x by (30)\n            switch costume to (droitehaut v)\n            wait (0.5) seconds\n            change x by (30)\n        end\n    end\n    if <not <(backdrop [number v]) = [8]>> then\n        hide\n    end\nend\n\n@Clown3\n\nwhen flag clicked\nhide\nforever\n    if <(backdrop [number v]) = [8]> then\n        show\n        go to x: (-135) y: (-94)\n        start sound [Crazy Laugh v]\n        repeat (3)\n            switch costume to (droitehaut v)\n            wait (0.5) seconds\n            change x by (30)\n            switch costume to (droitebas v)\n            wait (0.5) seconds\n            change x by (30)\n        end\n        start sound [Crazy Laugh v]\n        repeat (3)\n            switch costume to (gauchebas v)\n            wait (0.5) seconds\n            change x by (-30)\n            switch costume to (gauchehaut v)\n            wait (0.5) seconds\n            change x by (-30)\n        end\n    end\n    if <not <(backdrop [number v]) = [8]>> then\n        hide\n    end\nend\n\n@Sprite3\n\nwhen flag clicked\nhide\nforever\n    if <(backdrop [number v]) = [9]> then\n        show\n        go to x: (-76) y: (126)\n        glide (0.7) secs to x: (-76) y: (-57)\n        glide (0.7) secs to x: (-76) y: (126)\n    end\n    if <not <(backdrop [number v]) = [9]>> then\n        hide\n    end\nend\n\n@Sprite4\n\nwhen flag clicked\nhide\nforever\n    if <(backdrop [number v]) = [9]> then\n        show\n        go to x: (-36) y: (126)\n        glide (0.7) secs to x: (-36) y: (-57)\n        glide (0.7) secs to x: (-36) y: (126)\n    end\n    if <not <(backdrop [number v]) = [9]>> then\n        hide\n    end\nend\n\n@Sprite5\n\nwhen flag clicked\nhide\nforever\n    if <(backdrop [number v]) = [9]> then\n        show\n        go to x: (0) y: (126)\n        glide (0.7) secs to x: (0) y: (-57)\n        glide (0.7) secs to x: (0) y: (126)\n    end\n    if <not <(backdrop [number v]) = [9]>> then\n        hide\n    end\nend\n\n@ghost\n\nwhen flag clicked\nhide\nforever\n    if <(backdrop [number v]) = [10]> then\n        show\n        go to x: (-202) y: (2)\n        switch costume to (costume1 v)\n        glide (1.3) secs to x: (116) y: (6)\n        switch costume to (costume2 v)\n        glide (1.3) secs to x: (-202) y: (2)\n    end\n    if <not <(backdrop [number v]) = [10]>> then\n        hide\n    end\n    if <touching (david v)?> then\n        change [vie v] by (-2)\n    end\nend\n\n@Sprite6\n\nwhen this sprite clicked\nstart sound [Laugh3 v]\nsay [                                                                       Tu as cru que ça allait être aussi facile ?┌\( ಠ_ಠ\)┘TRICHEUR !] for (3) seconds\n\nwhen flag clicked\ngo to x: (-205) y: (166)\nforever\n    if <(backdrop [number v]) = [1]> then\n        hide\n    end\n    if <(backdrop [number v]) = [3]> then\n        show\n    end\n    forever\n        switch costume to (skip v)\n        if <touching (mouse-pointer v)?> then\n            switch costume to (costume1 v)\n        end\n    end\nend\n\nwhen backdrop switches to [decor1 v]\nshow\n\n@Sprite8\n\nwhen flag clicked\ngo to x: (-141) y: (166)\nforever\n    if <(backdrop [number v]) = [1]> then\n        hide\n    end\n    if <(backdrop [number v]) = [3]> then\n        show\n    end\n    forever\n        switch costume to (skip v)\n        if <touching (mouse-pointer v)?> then\n            switch costume to (costume1 v)\n        end\n    end\nend\n\nwhen backdrop switches to [decor1 v]\nshow\n\n@Heart\n\nwhen flag clicked\ngo to x: (166) y: (166)\nforever\n    if <(backdrop [number v]) = [1]> then\n        hide\n    end\n    if <(backdrop [number v]) = [3]> then\n        show\n    end\n    switch costume to (8 v)\n    if <(Vie) = [7]> then\n        switch costume to (7 v)\n    end\n    if <(Vie) = [6]> then\n        switch costume to (6 v)\n    end\n    if <(Vie) = [5]> then\n        switch costume to (5 v)\n    end\n    if <(Vie) = [4]> then\n        switch costume to (4 v)\n    end\n    if <(Vie) = [3]> then\n        switch costume to (3 v)\n    end\n    if <(Vie) = [2]> then\n        switch costume to (2 v)\n    end\n    if <(Vie) = [1]> then\n        switch costume to (1 v)\n    end\nend\n\n@cubebleu\n\nwhen flag clicked\nforever\n    if <(backdrop [number v]) = [12]> then\n        show\n    end\n    if <not <(backdrop [number v]) = [12]>> then\n        hide\n    end\nend\n\n@cubebleu2\n\nwhen flag clicked\nforever\n    if <(backdrop [number v]) = [17]> then\n        show\n    end\n    if <not <(backdrop [number v]) = [17]>> then\n        hide\n    end\nend\n\n@canon\n\nwhen flag clicked\nforever\n    hide\n    if <(backdrop [number v]) = [18]> then\n        show\n    end\n    if <not <(backdrop [number v]) = [18]>> then\n        hide\n    end\n    switch costume to (canon v)\n    wait (0.5) seconds\n    switch costume to (canontir v)\nend\n\n@bouletdecanon\n\nwhen flag clicked\nforever\n    hide\n    if <(backdrop [number v]) = [18]> then\n        show\n    end\n    if <not <(backdrop [number v]) = [18]>> then\n        hide\n    end\n    go to x: (-140) y: (15)\n    glide (0.5) secs to x: (168) y: (15)\n    if <touching (david v)?> then\n        hide\n    end\nend\n\n@cible\n\nwhen flag clicked\nforever\n    hide\n    if <(backdrop [number v]) = [22]> then\n        show\n        go to [front v] layer\n        start sound [chargementarme v]\n        go to (mouse-pointer v)\n        if <mouse down?> then\n            start sound [tir v]\n            broadcast (tir v)\n        end\n    end\n    if <not <(backdrop [number v]) = [22]>> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(compteur) = [20]> and <(backdrop [number v]) = [22]>> then\n        hide\n        switch backdrop to (prison v)\n        stop [all v]\n    end\nend\n\n@Personnages\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset [score v] to [0]\nhide\nforever\n    if <(backdrop [number v]) = [22]> then\n        go to x: (14) y: (-16)\n        show\n        wait (pick random (0.5) to (3)) seconds\n        switch costume to (pick random (1) to (5))\n        show\n        wait (pick random (0.5) to (2)) seconds\n        hide\n    end\n    if <not <(backdrop [number v]) = [22]>> then\n        hide\n    end\n    if <(costume [number v]) = [1]> then\n        wait (3) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(score) = [1]> then\n        hide\n        switch backdrop to (victoire v)\n        wait (8) seconds\n        switch backdrop to (le boss v)\n        wait (3) seconds\n        switch backdrop to (resultats v)\n        stop [all v]\n    end\n    if <(score) = [-1]> then\n        hide\n        switch backdrop to (prison v)\n        stop [all v]\n    end\nend\n\nwhen I receive [tir v]\nif <touching (cible v)?> then\n    stop [other scripts in sprite v]\n    if <(costume [number v]) = [1]> then\n        change [score v] by (1)\n        switch costume to (roimort v)\n        hide\n        start sound [aie v]\n    end\n    if <not <(costume [number v]) = [1]>> then\n        change [score v] by (-1)\n        hide\n        start sound [aie v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(compteur) = [20]> and <(backdrop [number v]) = [22]>> then\n        hide\n        go to [back v] layer\n        switch backdrop to (prison v)\n        stop [all v]\n    end\nend\n\n@Personnages2\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset [score v] to [0]\nhide\nforever\n    if <(backdrop [number v]) = [22]> then\n        go to x: (-76) y: (-16)\n        show\n        wait (pick random (0.5) to (3)) seconds\n        switch costume to (pick random (1) to (5))\n        show\n        wait (pick random (0.5) to (2)) seconds\n        hide\n    end\n    if <not <(backdrop [number v]) = [22]>> then\n        hide\n    end\n    if <(costume [number v]) = [1]> then\n        wait (3) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(compteur) = [20]> and <(backdrop [number v]) = [22]>> then\n        hide\n        go to [back v] layer\n        switch backdrop to (prison v)\n        stop [all v]\n    end\nend\n\nwhen I receive [tir v]\nif <touching (cible v)?> then\n    stop [other scripts in sprite v]\n    if <(costume [number v]) = [1]> then\n        change [score v] by (1)\n        switch costume to (roimort v)\n        hide\n        start sound [aie v]\n    end\n    if <not <(costume [number v]) = [1]>> then\n        change [score v] by (-1)\n        switch costume to (soldatmort v)\n        hide\n        start sound [aie v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(score) = [1]> then\n        hide\n        switch backdrop to (victoire v)\n        wait (8) seconds\n        switch backdrop to (le boss v)\n        wait (3) seconds\n        switch backdrop to (resultats v)\n        stop [all v]\n    end\n    if <(score) = [-1]> then\n        hide\n        switch backdrop to (prison v)\n        stop [all v]\n    end\nend\n\n@Personnages3\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset [score v] to [0]\nhide\nforever\n    if <(backdrop [number v]) = [22]> then\n        go to x: (93) y: (-16)\n        show\n        wait (pick random (0.5) to (3)) seconds\n        switch costume to (pick random (1) to (5))\n        show\n        wait (pick random (0.5) to (2)) seconds\n        hide\n    end\n    if <not <(backdrop [number v]) = [22]>> then\n        hide\n    end\n    if <(costume [number v]) = [1]> then\n        wait (3) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(compteur) = [20]> and <(backdrop [number v]) = [22]>> then\n        hide\n        switch backdrop to (prison v)\n        stop [all v]\n    end\nend\n\nwhen I receive [tir v]\nif <touching (cible v)?> then\n    stop [other scripts in sprite v]\n    if <(costume [number v]) = [1]> then\n        change [score v] by (1)\n        switch costume to (roimort v)\n        hide\n        start sound [aie v]\n    end\n    if <not <(costume [number v]) = [1]>> then\n        change [score v] by (-1)\n        switch costume to (soldatmort v)\n        hide\n        start sound [aie v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(score) = [1]> then\n        hide\n        switch backdrop to (victoire v)\n        wait (8) seconds\n        switch backdrop to (le boss v)\n        wait (3) seconds\n        switch backdrop to (resultats v)\n        stop [all v]\n    end\n    if <(score) = [-1]> then\n        hide\n        switch backdrop to (prison v)\n        stop [all v]\n    end\nend\n\n@Personnages4\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset [score v] to [0]\nhide\nforever\n    if <(backdrop [number v]) = [22]> then\n        go to x: (-182) y: (40)\n        show\n        wait (pick random (0.5) to (3)) seconds\n        switch costume to (pick random (1) to (5))\n        show\n        wait (pick random (0.5) to (3)) seconds\n        hide\n    end\n    if <not <(backdrop [number v]) = [22]>> then\n        hide\n    end\n    if <(costume [number v]) = [1]> then\n        wait (3) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(compteur) = [20]> and <(backdrop [number v]) = [22]>> then\n        hide\n        switch backdrop to (prison v)\n        stop [all v]\n    end\nend\n\nwhen I receive [tir v]\nif <touching (cible v)?> then\n    stop [other scripts in sprite v]\n    if <(costume [number v]) = [1]> then\n        change [score v] by (1)\n        switch costume to (roimort v)\n        hide\n        start sound [aie v]\n    end\n    if <not <(costume [number v]) = [1]>> then\n        change [score v] by (-1)\n        switch costume to (soldatmort v)\n        hide\n        start sound [aie v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(score) = [1]> then\n        hide\n        switch backdrop to (victoire v)\n        wait (8) seconds\n        switch backdrop to (le boss v)\n        wait (3) seconds\n        switch backdrop to (resultats v)\n        stop [all v]\n    end\n    if <(score) = [-1]> then\n        hide\n        switch backdrop to (prison v)\n        stop [all v]\n    end\nend\n\n@Personnages6\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset [score v] to [0]\nhide\nforever\n    if <(backdrop [number v]) = [22]> then\n        go to x: (-184) y: (-54)\n        show\n        wait (pick random (0.5) to (3)) seconds\n        switch costume to (pick random (1) to (5))\n        show\n        wait (pick random (0.5) to (2)) seconds\n        hide\n    end\n    if <not <(backdrop [number v]) = [22]>> then\n        hide\n    end\n    if <(costume [number v]) = [1]> then\n        wait (3) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(compteur) = [20]> and <(backdrop [number v]) = [22]>> then\n        hide\n        switch backdrop to (prison v)\n        stop [all v]\n    end\nend\n\nwhen I receive [tir v]\nif <touching (cible v)?> then\n    stop [other scripts in sprite v]\n    if <(costume [number v]) = [1]> then\n        change [score v] by (1)\n        switch costume to (roimort v)\n        hide\n        start sound [aie v]\n    end\n    if <not <(costume [number v]) = [1]>> then\n        change [score v] by (-1)\n        switch costume to (soldatmort v)\n        hide\n        start sound [aie v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(score) = [1]> then\n        hide\n        switch backdrop to (victoire v)\n        wait (8) seconds\n        switch backdrop to (le boss v)\n        wait (3) seconds\n        switch backdrop to (resultats v)\n        stop [all v]\n    end\n    if <(score) = [-1]> then\n        hide\n        switch backdrop to (prison v)\n        stop [all v]\n    end\nend\n\n@Personnages7\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset [score v] to [0]\nhide\nforever\n    if <(backdrop [number v]) = [22]> then\n        go to x: (199) y: (-51)\n        show\n        wait (pick random (0.5) to (3)) seconds\n        switch costume to (pick random (1) to (5))\n        show\n        wait (pick random (0.5) to (2)) seconds\n        hide\n    end\n    if <not <(backdrop [number v]) = [22]>> then\n        hide\n    end\n    if <(costume [number v]) = [1]> then\n        wait (3) seconds\n    end\nend\n\nwhen I receive [tir v]\nif <touching (cible v)?> then\n    stop [other scripts in sprite v]\n    if <(costume [number v]) = [1]> then\n        change [score v] by (1)\n        switch costume to (roimort v)\n        hide\n        start sound [aie v]\n    end\n    if <not <(costume [number v]) = [1]>> then\n        change [score v] by (-1)\n        switch costume to (soldatmort v)\n        hide\n        start sound [aie v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(compteur) = [20]> and <(backdrop [number v]) = [22]>> then\n        hide\n        switch backdrop to (prison v)\n        stop [all v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(score) = [1]> then\n        hide\n        switch backdrop to (victoire v)\n        wait (8) seconds\n        switch backdrop to (le boss v)\n        wait (3) seconds\n        switch backdrop to (resultats v)\n        stop [all v]\n    end\n    if <(score) = [-1]> then\n        hide\n        switch backdrop to (prison v)\n        stop [all v]\n    end\nend\n\n@compteur sniper\n\nwhen flag clicked\nset [compteur v] to [0]\nhide\nforever\n    if <not <(backdrop [number v]) = [22]>> then\n        hide\n    end\n    if <(backdrop [number v]) = [22]> then\n        show\n        switch costume to (costume9 v)\n        change [compteur v] by (1)\n        start sound [A Guitar v]\n        wait (1) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (compteur)\nend\n\nwhen flag clicked\nforever\n    if <<(compteur) = [20]> and <(backdrop [number v]) = [22]>> then\n        hide\n        switch backdrop to (prison v)\n        stop [all v]\n    end\nend\n\n@Personnages5\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset [score v] to [0]\nhide\nforever\n    if <(backdrop [number v]) = [22]> then\n        go to x: (196) y: (46)\n        show\n        wait (pick random (0.5) to (3)) seconds\n        switch costume to (pick random (1) to (5))\n        show\n        wait (pick random (0.5) to (2)) seconds\n        hide\n    end\n    if <not <(backdrop [number v]) = [22]>> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(compteur) = [20]> and <(backdrop [number v]) = [22]>> then\n        hide\n        switch backdrop to (prison v)\n        stop [all v]\n    end\nend\n\nwhen I receive [tir v]\nif <touching (cible v)?> then\n    stop [other scripts in sprite v]\n    if <(costume [number v]) = [1]> then\n        change [score v] by (1)\n        switch costume to (roimort v)\n        hide\n        start sound [aie v]\n    end\n    if <not <(costume [number v]) = [1]>> then\n        change [score v] by (-1)\n        switch costume to (soldatmort v)\n        hide\n        start sound [aie v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(score) = [1]> then\n        hide\n        switch backdrop to (victoire v)\n        wait (8) seconds\n        switch backdrop to (le boss v)\n        wait (3) seconds\n        switch backdrop to (resultats v)\n        stop [all v]\n    end\n    if <(score) = [-1]> then\n        hide\n        switch backdrop to (prison v)\n        stop [all v]\n    end\nend\n\n@fleche haut\n\nwhen flag clicked\nforever\n    if <(mode) = [-1]> then\n        hide\n    end\n    if <(mode) = [1]> then\n        show\n    end\nend\n\nwhen flag clicked\nset [mode v] to [0]\nhide\ngo to x: (10) y: (-70)\nset [ghost v] effect to (25)\n\nwhen flag clicked\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        broadcast (fleche haut v)\n    end\nend\n\n@fleche droite\n\nwhen flag clicked\nset [mode v] to [0]\nhide\ngo to x: (161) y: (-109)\nset [ghost v] effect to (25)\n\nwhen flag clicked\nforever\n    if <(mode) = [-1]> then\n        hide\n    end\n    if <(mode) = [1]> then\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        broadcast (fleche droite v)\n    end\nend\n\n@flrche gauche\n\nwhen flag clicked\nset [mode v] to [0]\nhide\ngo to x: (-131) y: (-109)\nset [ghost v] effect to (25)\n\nwhen flag clicked\nforever\n    if <(mode) = [-1]> then\n        hide\n    end\n    if <(mode) = [1]> then\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        broadcast (fleche gauche v)\n    end\nend\n\n@options\n\nwhen this sprite clicked\nswitch backdrop to (option v)\nstart sound [pop v]\n\nwhen backdrop switches to [menu v]\nshow\ngo to x: (-15) y: (-135)\nforever\n    set size to (100) %\n    if <touching (mouse-pointer v)?> then\n        set size to (120) %\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(backdrop [number v]) = [1]>> then\n        hide\n    end\nend\n\nwhen flag clicked\nhide\nwait (7) seconds\nshow\n\n@pc\n\nwhen this sprite clicked\nswitch backdrop to (decor1 v)\nstart sound [pop v]\nchange [mode v] by (-1)\n\nwhen backdrop switches to [option v]\nshow\ngo to x: (-105) y: (7)\nforever\n    set size to (100) %\n    if <touching (mouse-pointer v)?> then\n        set size to (120) %\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(backdrop [number v]) = [27]>> then\n        hide\n    end\nend\n\n@mobile\n\nwhen this sprite clicked\nswitch backdrop to (decor1 v)\nstart sound [pop v]\nchange [mode v] by (1)\n\nwhen backdrop switches to [option v]\nshow\ngo to x: (121) y: (7)\nforever\n    set size to (100) %\n    if <touching (mouse-pointer v)?> then\n        set size to (120) %\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(backdrop [number v]) = [27]>> then\n        hide\n    end\nend\n\n@arrière plan 2\n\nwhen flag clicked\ngo to [back v] layer\ngo to x: (0) y: (0)\nhide\nwait (1) seconds\nshow\nrepeat (2)\n    change [color v] effect by (25)\n    wait (0.5) seconds\nend\nhide\n\nwhen flag clicked\nwait (7) seconds\nhide\n\n@arrière plan\n\nwhen flag clicked\nshow\nset [brightness v] effect to (0)\ngo to x: (0) y: (0)\ngo to [back v] layer\nrepeat (10)\n    change [brightness v] effect by (10)\n    wait (0.1) seconds\nend\nhide\n\nwhen flag clicked\nwait (7) seconds\nhide\n\n@ensemble\n\nwhen flag clicked\ngo to [front v] layer\ngo to x: (309) y: (15)\nhide\nset size to (100) %\nwait (3) seconds\nshow\nglide (0.5) secs to x: (7) y: (-11)\nrepeat (4)\n    wait (0.5) seconds\n    change size by (20)\n    wait (0.5) seconds\n    change size by (-20)\nend\n\nwhen flag clicked\nwait (7) seconds\nhide\n\n@Heart2\n\nwhen flag clicked\nstart sound [prod 36 v]\ngo to x: (-161) y: (109)\nhide\nswitch costume to (costume1 v)\nwait (3.5) seconds\nshow\nrepeat (7)\n    next costume\n    wait (0.5) seconds\nend\n\nwhen flag clicked\nwait (7) seconds\nhide\n\n@sozai2\n\nwhen flag clicked\nset size to (190) %\ngo to x: (-126) y: (-13)\ngo to [front v] layer\nhide\nwait (1.75) seconds\nshow\nrepeat (25)\n    next costume\nend\nhide\n\nwhen flag clicked\nwait (7) seconds\nhide\n\n@sozai3\n\nwhen flag clicked\nset size to (190) %\ngo to x: (109) y: (-17)\ngo to [front v] layer\nhide\nwait (1.75) seconds\nshow\nrepeat (25)\n    next costume\nend\nhide\n\nwhen flag clicked\nwait (7) seconds\nhide\n\n@sozai4\n\nwhen flag clicked\nset size to (190) %\ngo to x: (31) y: (30)\ngo to [front v] layer\nhide\nwait (1.75) seconds\nshow\nrepeat (25)\n    next costume\nend\nhide\n\nwhen flag clicked\nwait (7) seconds\nhide\n\n@sozai5\n\nwhen flag clicked\nset size to (190) %\ngo to x: (31) y: (-190)\ngo to [front v] layer\nhide\nwait (1.75) seconds\nshow\nrepeat (25)\n    next costume\nend\nhide\n\nwhen flag clicked\nwait (7) seconds\nhide\n\n@Sprite7\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\nhide\nwait (2) seconds\nshow\n\nwhen flag clicked\nwait (7) seconds\nhide\n\n@Sprite9\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nwait (3.5) seconds\nshow\n\nwhen flag clicked\nwait (7) seconds\nhide\n\n@swagg_prev_ui\n\nwhen flag clicked\nset size to (100) %\ngo to x: (8) y: (-5)\nhide\nwait (1) seconds\nshow\nrepeat (18)\n    change size by (5)\n    wait (0.01) seconds\nend\nhide\n\nwhen flag clicked\nwait (7) seconds\nhide\n\n