Platformer game

Instructions: FR :\n-------------------------------------------------------------------------\n<< ___Bonjour à tous …\nLe but est d'arriver jusqu'au drapeau sans mourir…\nSi tu aimes tu peux le liker et le favoriser.___ >>\n-------------------------------------------------------------------------\n

@Stage\n\nwhen flag clicked\nswitch backdrop to (arrière plan3 v)\n\nswitch backdrop to (arrière plan2 v)\n\n@Sprite1\n\nwhen flag clicked\nshow variable [niveaux v]\nshow\nswitch costume to (costume6 v)\nset [x v] to [0]\nset [y v] to [0]\ngo to [front v] layer\nforever\n    mouvement\nend\n\ndefine mouvement\nif <key (right arrow v) pressed?> then\n    switch costume to (costume6 v)\n    change [x v] by (1)\nend\nif <key (left arrow v) pressed?> then\n    switch costume to (costume2 v)\n    change [x v] by (-1)\nend\nchange x by (x)\nset [x v] to ((x) * (0.9))\nif <touching color (#000000)?> then\n    change y by (1)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change x by ((x) * (-1))\n                        change y by (-5)\n                        if <key (up arrow v) pressed?> then\n                            if <(x) > [0]> then\n                                set [x v] to [-10]\n                            else\n                                set [x v] to [10]\n                            end\n                            set [y v] to [15]\n                        else\n                            set [x v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange [y v] by (-1)\nchange y by (y)\nif <touching color (#000000)?> then\n    change y by ((y) * (-1))\n    set [y v] to [0]\nend\nchange y by (-1)\nif <key (up arrow v) pressed?> then\n    if <touching color (#000000)?> then\n        set [y v] to [13]\n    end\nend\nchange y by (1)\nchange [scrollx v] by ((x position) * (-1))\nchange [scrolly v] by ((y position) * (-1))\ngo to x: (0) y: (0)\nif <touching color (#b18f00)?> then\n    start sound [Big Boing v]\n    change [y v] by (8)\nend\nif <touching color (#ba009b)?> then\n    start sound [Big Boing v]\n    change [y v] by (12)\nend\nif <touching color (#9e0084)?> then\n    start sound [Big Boing v]\n    change [y v] by (20)\nend\nif <<touching color (#005acf)?> and <(niveaux) = [2]>> then\n    broadcast (level 3 v)\nend\nif <<touching color (#005acf)?> and <(niveaux) = [3]>> then\n    broadcast (level 4 v)\nend\nif <<touching color (#005acf)?> and <(niveaux) = [4]>> then\n    broadcast (level 5 v)\nend\nif <<touching color (#005acf)?> and <(niveaux) = [5]>> then\n    broadcast (level 6 v)\nend\nif <<touching color (#005acf)?> and <(niveaux) = [1]>> then\n    broadcast (level 2 v)\nend\nif <<touching color (#005acf)?> and <(niveaux) = [6]>> then\n    broadcast (level 7 v)\nend\nif <<touching color (#005acf)?> and <(niveaux) = [7]>> then\n    broadcast (level 8 v)\nend\nif <<touching color (#005acf)?> and <(niveaux) = [8]>> then\n    broadcast (level 9 v)\nend\nif <<touching color (#005acf)?> and <(niveaux) = [9]>> then\n    broadcast (level 10 v)\nend\nif <<(niveaux) = [1]> and <(scrolly) > [470]>> then\n    set [scrollx v] to [294]\n    set [scrolly v] to [0]\nend\nif <<(niveaux) = [2]> and <(scrolly) > [470]>> then\n    set [scrollx v] to [294]\n    set [scrolly v] to [100]\nend\nif <<(niveaux) = [3]> and <(scrolly) > [470]>> then\n    set [scrollx v] to [222]\n    set [scrolly v] to [100]\nend\nif <<(niveaux) = [4]> and <(scrolly) > [470]>> then\n    set [scrollx v] to [240]\n    set [scrolly v] to [200]\nend\nif <<(niveaux) = [5]> and <(scrolly) > [470]>> then\n    set [scrollx v] to [335]\n    set [scrolly v] to [100]\nend\nif <<(niveaux) = [6]> and <(scrolly) > [470]>> then\n    set [scrollx v] to [290]\n    set [scrolly v] to [100]\nend\nif <<(niveaux) = [7]> and <(scrolly) > [470]>> then\n    set [scrollx v] to [310]\n    set [scrolly v] to [200]\nend\nif <<(niveaux) = [8]> and <(scrolly) > [470]>> then\n    set [scrollx v] to [241]\n    set [scrolly v] to [100]\nend\nif <<(niveaux) = [9]> and <(scrolly) > [470]>> then\n    set [scrollx v] to [240]\n    set [scrolly v] to [346]\nend\nif <<(niveaux) = [10]> and <(scrolly) > [470]>> then\n    set [scrollx v] to [-340]\n    set [scrolly v] to [303]\nend\nif <<(niveaux) = [4]> and <touching color (#cf0000)?>> then\n    start sound [C Trombone v]\n    hide\n    set [scrollx v] to [248]\n    set [scrolly v] to [100]\n    switch costume to (costume6 v)\n    show\nend\nif <<(niveaux) = [5]> and <touching color (#cf0000)?>> then\n    start sound [C Trombone v]\n    hide\n    set [scrollx v] to [335]\n    set [scrolly v] to [100]\n    switch costume to (costume6 v)\n    show\nend\nif <<(niveaux) = [8]> and <touching color (#cf0000)?>> then\n    start sound [C Trombone v]\n    hide\n    set [scrollx v] to [241]\n    set [scrolly v] to [100]\n    switch costume to (costume6 v)\n    show\nend\nif <<(niveaux) = [9]> and <touching color (#cf0000)?>> then\n    start sound [C Trombone v]\n    hide\n    set [scrollx v] to [242]\n    set [scrolly v] to [346]\n    switch costume to (costume6 v)\n    show\nend\n\nwhen flag clicked\nplay sound [lumx-mokaby-d v] until done\nplay sound [lumx-mokaby-d v] until done\nplay sound [lumx-mokaby-d v] until done\nplay sound [lumx-mokaby-d v] until done\nplay sound [lumx-mokaby-d v] until done\nplay sound [lumx-mokaby-d v] until done\n\n@map\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\nset [niveaux v] to [1]\nset [scrollx v] to [294]\nset [scrolly v] to [0]\nforever\n    go to x: (scrollx) y: (scrolly)\nend\n\nwhen I receive [level 2 v]\nswitch costume to (costume2 v)\nset [niveaux v] to [2]\nset [scrollx v] to [291]\nset [scrolly v] to [100]\n\nwhen I receive [level 3 v]\nswitch costume to (costume3 v)\nhide\nset [niveaux v] to [3]\nset [scrollx v] to [223]\nset [scrolly v] to [100]\nshow\n\nwhen I receive [level 4 v]\nswitch costume to (costume4 v)\nhide\nset [niveaux v] to [4]\nset [scrollx v] to [239]\nset [scrolly v] to [100]\nshow\n\nwhen I receive [level 5 v]\nswitch costume to (costume5 v)\nhide\nset [niveaux v] to [5]\nset [scrollx v] to [337]\nset [scrolly v] to [100]\nshow\n\nwhen I receive [level 6 v]\nswitch costume to (costume6 v)\nhide\nset [niveaux v] to [6]\nset [scrollx v] to [290]\nset [scrolly v] to [100]\nshow\n\nwhen I receive [level 7 v]\nswitch costume to (costume7 v)\nhide\nset [niveaux v] to [7]\nset [scrollx v] to [290]\nset [scrolly v] to [350]\nshow\n\nwhen I receive [level 8 v]\nswitch costume to (costume8 v)\nhide\nset [niveaux v] to [8]\nset [scrollx v] to [241]\nset [scrolly v] to [300]\nshow\n\nwhen I receive [level 10 v]\nswitch costume to (finisch v)\nhide\nset [niveaux v] to [10]\nset [scrollx v] to [-340]\nset [scrolly v] to [100]\nshow\n\nwhen I receive [level 9 v]\nswitch costume to (costume9 v)\nhide\nset [niveaux v] to [9]\nset [scrollx v] to [242]\nset [scrolly v] to [346]\nshow\n\n@Sprite2\n\nwhen flag clicked\ngo to [front v] layer\nhide\nforever\n    create clone of (_myself_ v)\n    wait (0.5) seconds\nend\n\nwhen I start as a clone\nshow\nturn right (pick random (-20) to (20)) degrees\nset size to (pick random (40) to (10)) %\ngo to x: (pick random (-268) to (268)) y: (265)\nset [pixelate v] effect to (pick random (2) to (5))\nrepeat (90)\n    turn right (0.5) degrees\n    change y by (-2)\n    change [ghost v] effect by (1)\nend\ndelete this clone\n\n