Space platformer 1

Instructions: français:\nLa gravité est très faible (ne sauter pas trop haut ou attention aux danger). Les flèches servent de touche. Tous les niveaux sont possibles.\nEnglish:\nThe gravity is very low (do not jump too high or watch out for danger).arrows are used as keys. All levels are possible.

@Stage\n\n@joueur\n\nwhen flag clicked\nset [level v] to [1]\nswitch costume to (atomix 3 v)\nbroadcast (1az v)\nforever\n    go to [front v] layer\n    move\n    create clone of (_myself_ v)\nend\n\ndefine move\nif <<<mouse down?> and <(mouse x) > [50]>> or <key (right arrow v) pressed?>> then\n    change [speedx v] by (1)\nend\nif <<<mouse down?> and <(mouse x) < [-50]>> or <key (left arrow v) pressed?>> then\n    change [speedx v] by (-1)\nend\nset [speedx v] to ((SpeedX) * (0.9))\nchange x by (SpeedX)\nif <touching (platforme  v)?> then\n    change y by (1)\n    if <touching (platforme  v)?> then\n        change y by (1)\n        if <touching (platforme  v)?> then\n            change y by (1)\n            if <touching (platforme  v)?> then\n                change y by (1)\n                if <touching (platforme  v)?> then\n                    change y by (-4)\n                    change x by ((SpeedX) * (-1))\n                    if <<<mouse down?> and <(mouse y) > [50]>> or <<key (space v) pressed?> or <key (up arrow v) pressed?>>> then\n                        if <(SpeedX) > [0]> then\n                            set [speedx v] to [-10]\n                        else\n                            set [speedx v] to [10]\n                        end\n                        set [speedy v] to [13]\n                    else\n                        set [speedx v] to [0]\n                    end\n                end\n            end\n        end\n    end\nend\nchange [speedy v] by (-1)\nchange y by (SpeedY)\nif <touching (platforme  v)?> then\n    change y by ((SpeedY) * (-1))\n    set [speedy v] to [0]\nend\nchange y by (-1)\nif <<<touching (platforme  v)?> and <<mouse down?> and <(mouse y) > [50]>>> or <<key (space v) pressed?> or <key (up arrow v) pressed?>>> then\n    set [speedy v] to [13]\nend\nchange y by (1)\n\nwhen I start as a clone\nset size to (90) %\nswitch costume to (atomix 2 v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I receive [1az v]\ngo to x: (-200) y: (0)\nset [speedx v] to [0]\nset [speedy v] to [0]\n\ndefine Spé détect\nif <(x position) > [222]> then\n    go to x: (-200) y: (0)\n    change [level v] by (1)\nend\nif <(y position) < [-163]> then\n    set [x v] to (x position)\n    set [y v] to (y position)\n    repeat (10)\n        change [ghost v] effect by (10)\n        go to x: (X) y: (Y)\n    end\n    broadcast (1az v)\n    repeat (10)\n        change [ghost v] effect by (-10)\n        go to x: (-200) y: (0)\n    end\nend\nif <touching (danger v)?> then\n    set [x v] to (x position)\n    set [y v] to (y position)\n    repeat (10)\n        change [ghost v] effect by (10)\n        go to x: (X) y: (Y)\n    end\n    broadcast (1az v)\n    repeat (10)\n        change [ghost v] effect by (-10)\n        go to x: (-200) y: (0)\n    end\nend\n\nwhen flag clicked\nforever\n    Spé détect\nend\n\nwhen flag clicked\nforever\n    hide variable [speedx v]\n    hide variable [speedy v]\n    hide variable [x v]\n    hide variable [y v]\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite1 v)?> then\n        point in direction (90)\n        change y by (-10)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#00a726)?> then\n        switch costume to (atomix 1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (left arrow v) pressed?> then\n        switch costume to (atomix 2 v)\n    else\n        switch costume to (atomix 1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (right arrow v) pressed?> then\n        switch costume to (atomix 3 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (up arrow v) pressed?> then\n        switch costume to (atomix 4 v)\n    else\n        switch costume to (atomix 1 v)\n    end\nend\n\nwhen flag clicked\nhide\nwait (2) seconds\nshow\n\n@platforme \n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    switch costume to (level)\nend\n\nwhen flag clicked\nhide\nwait (2) seconds\nshow\n\n@danger\n\nwhen flag clicked\nshow\ngo to [back v] layer\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nshow\nforever\n    set [ghost v] effect to (15)\n    go to [back v] layer\n    go to x: (0) y: (0)\n    repeat (10)\n        change y by (0.5)\n    end\n    repeat (10)\n        change y by (-0.5)\n    end\nend\n\nwhen flag clicked\ngo to (platforme  v)\nif <touching (platforme  v)?> then\n\nwhen flag clicked\nhide\nwait (2) seconds\nshow\n\n@écran début\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\nend\n\nwhen flag clicked\nhide variable [level v]\nwait (3) seconds\nshow variable [level v]\n\nwhen flag clicked\nshow\nwait (2) seconds\nhide\n\n@Sprite1\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\n