colorless a mobile platformer
@Stage\n\nwhen I receive [next level v]\nif <<(level) = [5]> or <(level) = [6]>> then\n    switch backdrop to (gray void v)\nend\n\nwhen flag clicked\nswitch backdrop to (white sky v)\n\nwhen I receive [ending v]\nchange [level v] by (1)\nswitch backdrop to (blue sky v)\n\n@Player\n\nwhen flag clicked\nswitch costume to (player2 v)\nshow\nset size to (100) %\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 (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 <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 (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 <key (w 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)\n    if <<touching (spikes v)?> or <touching (waves v)?>> then\n        set rotation style [all around v]\n        repeat (10)\n            change size by (-10)\n            change [ghost v] effect by (10)\n            turn right (15) degrees\n        end\n        clear graphic effects\n        set size to (100) %\n        set rotation style [left-right v]\n        point in direction (90)\n        go to x: (-210) y: (0)\n        set [y v] to [0]\n        set [x v] to [0]\n    end\n    if <(x position) > [222]> then\n        broadcast (Next Level v)\n        go to x: (-210) y: (0)\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?> and <touching (bouncer v)?>> then\n        set [y v] to [20]\n    end\nend\n\nwhen I receive [ending v]\nswitch costume to (player v)\ngo to x: (-210) y: (0)\nset [y v] to [0]\nset [x v] to [0]\n\n@Ground\n\ndefine setup\ngo to [front v] layer\ngo to x: (0) y: (0)\n\nwhen flag clicked\nwait (0.0000000001) seconds\nwait until <(setup?) = [Done]>\nsetup\nforever\n    switch costume to (join [level] (level))\nend\n\n@text\n\nwhen flag clicked\nwait (0.0000000001) seconds\nwait until <(setup?) = [Done]>\nsetup\nforever\n    switch costume to (join [text] (level))\nend\n\ndefine setup\ngo to [back v] layer\ngo to x: (-50) y: (75)\n\n@Code\n\ndefine world setup\nset [level v] to [1]\n\nwhen flag clicked\nset [setup? v] to [doing...]\nworld setup\nset [setup? v] to [Done]\n\nwhen I receive [next level v]\nchange [level v] by (1)\n\nwhen flag clicked\nrepeat until <(level) = [7]>\n    play sound [Green Hill Zone theme \[Slow\] v] until done\nend\nforever\n    play sound [Green Hill Zone Theme v] until done\nend\n\nwhen flag clicked\nwait until <(level) = [7]>\nstop all sounds\n\n@Spikes\n\nwhen flag clicked\nhide\nwait (0.00001) seconds\nswitch costume to (spikes4 v)\nwait until <(setup?) = [Done]>\nsetup\nforever\n    switch costume to (join [spikes] (level))\nend\n\nwhen I receive [next level v]\nif <(level) > [2]> then\n    show\nelse\n    hide\nend\n\ndefine setup\ngo to [back v] layer\ngo to x: (0) y: (0)\n\n@thumbnail\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\n@switch..?\n\nwhen I receive [next level v]\n\nwhen flag clicked\nrepeat until <(level) = [6]>\n    hide\nend\nshow\nwait until <touching (player v)?>\nbroadcast (ending v)\nhide\n\n
try and bring the colors back!\nnote: if you see a question mark or a switch in the first level restart your browser because it's a scratch glitch\nsee inside if you don't believe me!