a random platformer
@Stage\n\n@Spikes\n\nwhen flag clicked\nswitch costume to (costume9 v)\n\nwhen I receive [new level v]\nnext costume\n\n@Ground\n\nwhen flag clicked\nswitch costume to (level 1 v)\n\nwhen I receive [new level v]\nnext costume\n\nwhen flag clicked\nforever\n    go to x: (19) y: (-35)\n    if <(costume [number v]) = [11]> then\nend\n\n@Player 1\n\nwhen flag clicked\nbroadcast (Restart v)\nshow\nset [x v] to [0]\nset [y v] to [0]\nforever\n    change [y v] by (-1)\n    if <<key (left arrow 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    if <<key (right arrow 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 (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [y v] to [15]\n            if <([abs v] of (x) ) = (x)> 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 (ground 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 <<mouse down?> and <(mouse y) > (y position)>>> and <touching (ground v)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\nend\n\nwhen I receive [restart v]\ngo to x: (-225) y: (-45)\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    if <(x position) > [235]> then\n        broadcast (New Level v)\n        broadcast (Restart v)\n        change [level v] by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (spikes v)?> or <(y position) < [-170]>> then\n        broadcast (Restart v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (jump v)?> then\n        set [y v] to [15]\n    end\nend\n\nwhen flag clicked\ngo to x: (225-) y: (110-)\nforever\n    set drag mode [not draggable v]\nend\n\n@Sprite1\n\nwhen I start as a clone\nshow\nrepeat (100)\n    change y by (2)\n    turn left ((x position) / (100)) degrees\n    change [ghost v] effect by (1)\nend\ndelete this clone\n\nwhen flag clicked\nhide\ngo to [back v] layer\nset size to (75) %\nforever\n    go to x: ((145) * ([sin v] of ((70) * (timer)) )) y: (-90)\n    point in direction ((30) * ([cos v] of ((75) * (timer)) ))\n    change [color v] effect by (3)\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\ngo to [back v] layer\n\n
try turbo mode (shift+green flag)\nuse the arrow keys\n