Geometry World - A Platformer
@Stage\n\n@Player\n\nwhen flag clicked\nStart\n\ndefine Start\nset [jump v] to [14]\nset [speed v] to [1]\ngo to x: (-212) y: (0)\nshow\nforever\n    if on edge, bounce\n    go to [front v] layer\n    set [y v] to [0]\n    set [x v] to [0]\n    forever\n        switch costume to (player v)\n        change [y v] by (-1)\n        set [x v] to ((x) * (0.9))\n        if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<(x position) > (mouse x)> and <mouse down?>>>> then\n            change [x v] by (join [-] (speed))\n        end\n        if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<(mouse x) > (x position)> and <mouse down?>>>> then\n            change [x v] by ([abs v] of (speed) )\n        end\n        change x by (x)\n        if  then\n            change y by (1)\n        end\n        if  then\n            change y by (1)\n        end\n        if  then\n            change y by (1)\n        end\n        if  then\n            change y by (1)\n        end\n        if  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 y) > (y position)> and <mouse down?>>>> then\n                set [y v] to [10]\n                if <([abs v] of (x) ) = (x)> then\n                    set [x v] to [-4]\n                else\n                    set [x v] to [4]\n                end\n            else\n                set [x v] to [0]\n            end\n        end\n        change y by (y)\n        if  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 y) > (y position)> and <mouse down?>>>> and <<touching (level v)?> or <touching (players v)?>>> then\n            set [y v] to ((jump) * (1.1))\n        end\n        change y by (1)\n        if <(x position) > [230]> then\n            broadcast (New Level v)\n            go to x: (-212) y: (0)\n            wait until <not <(x position) > [230]>>\n        end\n        if <(y position) < [-170]> then\n            go to x: (-212) y: (0)\n        end\n        change y by (-10)\n        if <<touching color (#ff3f3f)?> or <touching color (#ff6a6a)?>> then\n            broadcast (Redo v)\n        end\n        change y by (10)\n    end\nend\n\nwhen I start as a clone\nnext costume\nclear graphic effects\nset size to (150) %\nrepeat (10)\n    change [brightness v] effect by (3)\n    change [ghost v] effect by (10)\n    change size by (-1)\nend\ndelete this clone\n\nwhen flag clicked\nswitch costume to (player v)\nforever\n    wait (0) seconds\n    create clone of (_myself_ v)\nend\n\nwhen [s v] key pressed\nbroadcast (Skip v)\n\nwhen I receive [skip v]\nbroadcast (New Level v)\ngo to x: (-212) y: (0)\nwait until <not <(x position) > [230]>>\n\nwhen [r v] key pressed\nbroadcast (Redo v)\n\nwhen I receive [redo v]\ngo to x: (-212) y: (0)\n\n@Level\n\nwhen flag clicked\nswitch costume to (1 v)\nforever\n    go to [front v] layer\n    go [backward v] (3) layers\nend\n\nwhen I receive [new level v]\nif <not <(costume [number v]) = [8]>> then\n    next costume\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\n