✂Draw , a platformer 2 !✏        V1.01
@Stage\n\nwhen flag clicked\nswitch backdrop to (arrière plan4 v)\n\nwhen I receive [commencer v]\nforever\n    if <<<<(level) = [1]> or <<(level) = [2]> or <<(level) = [3]> or <(level) = [4]>>>> or <(level) = [5]>> or <(level) = [10]>> then\n        switch backdrop to (arrière plan1 v)\n    end\n    if <<(level) = [6]> or <<(level) = [7]> or <<(level) = [8]> or <(level) = [9]>>>> then\n        switch backdrop to (arrière plan2 v)\n    end\nend\n\nwhen I receive [commencer v]\nforever\n    if <<(level) = [10]> or <(level) = [9]>> then\n        switch backdrop to (arrière plan1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    play sound [Musique libre de droits Tobu, Wholm & Blume - Cool v] until done\nend\n\n@Player\n\nwhen flag clicked\nswitch backdrop to (arrière plan4 v)\nset [nombre de niveaux v] to [17]\nset [level v] to [1]\nerase all\nshow\nswitch costume to (player v)\nset size to (10) %\ngo to x: (0) y: (0)\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by ((((230) + (([cos v] of ((timer) * (200)) ) * (10))) - (size)) / (3))\n        if <mouse down?> then\n            broadcast (commencer v)\n        end\n    else\n        change size by ((((200) + (([cos v] of ((timer) * (200)) ) * (10))) - (size)) / (3))\n    end\n    point in direction ((90) + (([cos v] of ((timer) * (50)) ) * (10)))\nend\n\nwhen I receive [play v]\nset size to (120) %\nset volume to (80) %\npoint in direction (90)\nhide\nshow\ngo to x: (-207) y: (70)\nforever\n    set [x v] to [0]\n    set [y v] to [0]\n    forever\n        change [y v] by (-1)\n        set [x v] to ((x) * (0.9))\n        if <key (right arrow v) pressed?> then\n            change [x v] by (1)\n        end\n        if <key (left arrow v) pressed?> then\n            change [x v] by (-1)\n        end\n        change x by (x)\n        if <<touching (level v)?> or <touching color (#fb00e6)?>> then\n            change y by (1)\n        end\n        if <<touching (level v)?> or <touching color (#fb00e6)?>> then\n            change y by (1)\n        end\n        if <<touching (level v)?> or <touching color (#fb00e6)?>> then\n            change y by (1)\n        end\n        if <<touching (level v)?> or <touching color (#fb00e6)?>> then\n            change y by (1)\n        end\n        if <<touching (level v)?> or <touching color (#fb00e6)?>> then\n            change y by (-4)\n            change x by ((x) * (-1))\n            set [x v] to [0]\n        end\n        change y by (y)\n        if <<touching (level v)?> or <touching color (#fb00e6)?>> then\n            change y by ((y) - ((y) * (2)))\n            set [y v] to [0]\n        end\n        change y by (-1)\n        if <<key (up arrow v) pressed?> and <<touching (level v)?> or <touching color (#fb00e6)?>>> then\n            broadcast (jump v)\n            change [y v] by (14)\n        end\n        change y by (1)\n        if <(x position) > [220]> then\n            broadcast (play v)\n            broadcast (new level v)\n            change [level v] by (1)\n        end\n        if <touching (dangers v)?> then\n            broadcast (play v)\n        end\n        if <<(y position) < [-170]> and <(level) = [5]>> then\n            broadcast (play v)\n            broadcast (new level v)\n            change [level v] by (1)\n        end\n        if <touching (bounce v)?> then\n            set [y v] to [20]\n        end\n        if <<(y position) < [-170]> and <not <(level) = [5]>>> then\n            broadcast (play v)\n        end\n    end\nend\n\nstart sound [Death v]\n\nwhen I receive [commencer v]\nstop [other scripts in sprite v]\nbroadcast (play v)\n\nwhen I receive [play v]\nforever\n    go to [front v] layer\nend\n\nwhen I receive [jump v]\nwait (0.01) seconds\nplay sound [Jump2 v] until done\n\nplay sound [uuhhh\(1\) v] until done\n\nif <key (up arrow v) pressed?> then\n    set [y v] to [8]\nend\n\nif <(level) = [8]> then\n    if <(y position) > [175]> then\n        change [level v] by (1)\n        broadcast (new level v)\n    end\nend\n\nif <not <(level) = [16]>> then\n    go to x: (-207) y: (70)\nend\nif <(level) = [16]> then\n    go to x: (0) y: (70)\nend\n\nwhen I receive [costume suivant v]\nnext costume\n\nwhen I receive [costume précédent v]\nswitch costume to ((costume [number v]) - (1))\n\n\n    broadcast (play v)\n    broadcast (new level v)\n    change [level v] by (1)\nend\n\nif <touching (bounce v)?> then\n    set [y v] to [20]\nend\n\n@level\n\nwhen flag clicked\nhide\n\nwhen I receive [new level v]\nnext costume\n\nwhen I receive [commencer v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (14 v)\n\n@pen\n\nwhen I receive [commencer v]\nset pen size to (15)\nerase all\nwait (0.2) seconds\nforever\n    if <not <(level) = [5]>> then\n        pen up\n        if <mouse down?> then\n            if <touching (protect player v)?> then\n                pen up\n            else\n                pen down\n            end\n        end\n        go to x: (mouse x) y: (mouse y)\n    else\n        pen up\n    end\nend\n\nwhen flag clicked\n\nwhen I receive [new level v]\nerase all\n\nwhen flag clicked\nforever\n    set pen color to (#fb00e6)\nend\n\nwhen I receive [play v]\nerase all\n\n@restart level\n\nwhen I receive [commencer v]\nshow\ngo to x: (-187) y: (-145)\nset size to (35) %\nforever\n    go to [front v] layer\n    point in direction (90)\n    change size by (((30) - (size)) / (5))\n    if <touching (mouse-pointer v)?> then\n        change size by (((32) - (size)) / (5))\n        point in direction ((90) + (([cos v] of ((timer) * (300)) ) * (10)))\n        if <mouse down?> then\n            change size by (((10) - (size)) / (5))\n            broadcast (play v)\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\n@dangers\n\nwhen I receive [new level v]\ngo to [front v] layer\nnext costume\n\nwhen I receive [commencer v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (1 v)\n\nwhen flag clicked\nhide\n\n@bounce\n\nwhen flag clicked\n\nwhen I receive [new level v]\ngo to [front v] layer\ngo [backward v] (1) layers\nnext costume\n\nwhen I receive [commencer v]\ngo to [front v] layer\ngo [backward v] (1) layers\ngo to x: (0) y: (0)\nshow\nswitch costume to (1 v)\n\n@deco\n\nwhen flag clicked\nhide\n\nwhen I receive [new level v]\ngo to [front v] layer\ngo [backward v] (1) layers\nnext costume\n\nwhen I receive [commencer v]\ngo to [front v] layer\ngo [backward v] (1) layers\ngo to x: (0) y: (0)\nshow\nswitch costume to (1 v)\n\n@level2\n\nwhen flag clicked\n\nwhen I receive [new level v]\nnext costume\n\nwhen I receive [commencer v]\ngo to x: (0) y: (0)\nclear graphic effects\nshow\nswitch costume to (1 v)\n\nwhen I receive [commencer v]\nforever\n    if <touching (player v)?> then\n        change [ghost v] effect by (10)\n    else\n        change [ghost v] effect by (-10)\n    end\nend\n\n@flèches menu\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (costume suivant v)\nelse\n    broadcast (costume précédent v)\nend\n\nwhen flag clicked\nhide\nswitch costume to (flèche droite v)\nrepeat (2)\n    create clone of (_myself_ v)\n    next costume\nend\n\nwhen I start as a clone\nshow\nset size to (80) %\nif <(costume [number v]) = [1]> then\n    go to x: (75) y: (0)\nelse\n    go to x: (-75) y: (0)\nend\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by ((((100) + (([cos v] of ((timer) * (200)) ) * (10))) - (size)) / (3))\n    else\n        change size by ((((80) + (([cos v] of ((timer) * (200)) ) * (10))) - (size)) / (3))\n    end\nend\n\nwhen I receive [commencer v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <touching (mouse-pointer v)?> then\n        set [ok utiliser stylo ? v] to [non]\n        wait until <not <touching (mouse-pointer v)?>>\n        set [ok utiliser stylo ? v] to [oui]\n    end\n    if <mouse down?> then\n        wait until <not <mouse down?>>\n    end\nend\n\n