Platformer
@Stage\n\n@Platform\n\nwhen flag clicked\n\nhide\n\nwhen flag clicked\n\nwhen flag clicked\nshow\nswitch costume to (1 v)\nset [lv# v] to [1]\ngo to x: (0) y: (0)\n\nwhen I receive [next level v]\nnext costume\n\n@Player\n\nwhen flag clicked\nshow\nset size to (25) %\ngo to x: (-210) y: (0)\nset rotation style [left-right v]\nhide variable [y v]\nhide variable [x v]\nset [y v] to [0]\nset [x v] to [0]\nforever\n    change [y v] by (-1)\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n        change [x v] by (-1)\n        point in direction (-90)\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v] by (1)\n        point in direction (90)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (platform v)?> then\n        change y by (1)\n    end\n    if <touching (platform v)?> then\n        change y by (1)\n    end\n    if <touching (platform v)?> then\n        change y by (1)\n    end\n    if <touching (platform v)?> then\n        change y by (1)\n    end\n    if <touching (platform v)?> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [y v] to [17]\n            if <(x) > [0]> then\n                set [x v] to [-10]\n            else\n                set [x v] to [10]\n            end\n        else\n            set [x v] to [0]\n        end\n    end\n    change y by (y)\n    if <touching (platform v)?> 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?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> and <touching (platform v)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    if <<<touching (spikes v)?> or <touching (saw v)?>> or <<<<<<(y position) < [-180]> or <touching (lava v)?>> or <touching (boss v)?>> or <touching (saw 2 v)?>> or <touching (enemy ai blue v)?>> or <touching (enemy ai geen v)?>>> then\n        broadcast (Die v)\n        repeat (10)\n            change [ghost v] effect by (10)\n            change size by (-10)\n        end\n        clear graphic effects\n        set size to (25) %\n        point in direction (90)\n        go to x: (-210) y: (50)\n        set [y v] to [0]\n        set [x v] to [0]\n    end\n    if <touching (bouncer v)?> then\n        set [y v] to [15]\n    end\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> and <touching (bouncer v)?>> then\n        set [y v] to [20]\n    end\nend\n\nwhen [space v] key pressed\nnext costume\n\nwhen flag clicked\nforever\n    if <(x position) = [241]> then\n        broadcast (Next Level v)\n        go to x: (-215) y: (30)\n        wait (1) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#ff0000)?> then\n        broadcast (Die v)\n    end\nend\n\nwhen I receive [die v]\ngo to x: (-250) y: (30)\n\nwhen flag clicked\nswitch costume to (player4 v)\n\n@Figur1\n\nwhen flag clicked\ngo to [back v] layer\n\n@Figur2\n\nwhen flag clicked\nforever\n    hide\nend\n\n
Move with the arrow keys or awds or touch\nPress space to change the color\n