Allergic to Colour (A Pixel Platformer)
@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop2 v)\n\nwhen flag clicked\nforever\n    play sound [medieval2 v] until done\nend\n\n@Hitbox\n\ndefine Touching Ground? <>\nchange [fall count v] by (1)\nrepeat until <not <touching (ground v)?>>\n    if <ceiling> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [fall count v] to [0]\n    end\n    set [y velocity v] to [0]\nend\n\nwhen flag clicked\nset [x spawn v] to [-220]\nset [y spawn v] to [-80]\nforever\n    spawn smoother\nend\n\ndefine None\npoint in direction (direction)\nchange x by (speed)\nset [wall v] to [0]\nrepeat until <<(wall) = [8]> or <not <touching (ground v)?>>>\n    change y by (1)\n    change [wall v] by (1)\nend\nif <(wall) = [8]> then\n    change x by ((0) - (speed))\n    change y by ((0) - (wall))\nend\n\nwhen flag clicked\nset size to (300) %\nset rotation style [left-right v]\nset [y velocity v] to [0]\nforever\n    if <<(y velocity) < [4]> or <key (up arrow v) pressed?>> then\n        change [y velocity v] by (-1)\n    else\n        change [y velocity v] by (-2)\n    end\n    change y by (y velocity)\n    Touching Ground? <(y velocity) > [0]>\nend\n\nwhen flag clicked\nset [recent spawn v] to [0]\npoint in direction (90)\nSpawn\nset [ghost v] effect to (100)\ngo to x: (-20) y: (-80)\nforever\n    if <key (right arrow v) pressed?> then\n        Direction (90) Speed (6)\n    end\n    if <key (left arrow v) pressed?> then\n        Direction (-90) Speed (-6)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (up arrow v) pressed?> and <(fall count) < [3]>> then\n        set [y velocity v] to [12]\n    end\nend\n\nwhen flag clicked\nforever\n    set [x v] to (x position)\n    set [y v] to (y position)\nend\n\nwhen I receive [respawn v]\nSpawn\n\ndefine spawn smoother\nif <(x position) > [235]> then\n    if <(STAGE:) < [13]> then\n        set [x spawn v] to [-220]\n        set [y spawn v] to [-75]\n        change [stage: v] by (1)\n        Spawn\n    end\nend\nif <(x position) < [-235]> then\n    if <(STAGE:) > [1]> then\n        set [x spawn v] to [220]\n        set [y spawn v] to [-75]\n        change [stage: v] by (-1)\n        Spawn\n    end\nend\n\ndefine Spawn\ngo to x: (x spawn) y: (y spawn)\nbroadcast (spawn v)\n\nif <touching color (#e6e8e8)?> then\n    broadcast (respawn v)\nend\n\nwhen I receive [respawn v]\nset [recent spawn v] to [1]\nwait (8) seconds\nset [recent spawn v] to [0]\n\nwhen I receive [spawn v]\nset [recent spawn v] to [1]\nwait (0.8) seconds\nset [recent spawn v] to [0]\n\n@Ground\n\nwhen flag clicked\ngo to x: (475) y: (60)\nset [stage: v] to [1]\nforever\n    set size to (300) %\n    switch costume to (STAGE:)\n    go to [front v] layer\n    go [backward v] (4) layers\nend\n\n@Scenery\n\nwhen flag clicked\ngo to x: (0) y: (-65)\nset size to (300) %\ngo to [front v] layer\ngo [backward v] (1) layers\nforever\n    go to [front v] layer\n    go [backward v] (3) layers\n    switch costume to (STAGE:)\nend\n\n@Sprite1\n\nwhen flag clicked\ngo to x: (0) y: (50)\ngo to [front v] layer\nshow\nset [ghost v] effect to (0)\nwait (1) seconds\nrepeat (25)\n    change [ghost v] effect by (4)\n    wait (0.0002) seconds\nend\n\n@! and ?\n\nwhen flag clicked\nset size to (300) %\nhide\nforever\n    go to x: (x) y: ((y) + (50))\n    go to [front v] layer\nend\n\ndefine !\nswitch costume to (costume1 v)\nshow\nset [ghost v] effect to (0)\nrepeat (20)\n    change [ghost v] effect by (7)\n    wait (0.0002) seconds\nend\n\ndefine text1\nswitch costume to (costume2 v)\nshow\nset [ghost v] effect to (0)\nrepeat (25)\n    change [ghost v] effect by (4)\n    wait (0.02) seconds\nend\n\ndefine text2\nswitch costume to (costume4 v)\nshow\nset [ghost v] effect to (0)\nrepeat (25)\n    change [ghost v] effect by (4)\n    wait (0.02) seconds\nend\n\nwhen flag clicked\nwait until <(STAGE:) = [2]>\ntext1\n\nwhen flag clicked\nwait until <(Mini Collected?) = [1]>\ntext2\n\nwhen I receive [respawn v]\n!\n\n@New Guy\n\nwhen flag clicked\nshow\ngo to [front v] layer\nforever\n    set [costume v] to [6]\n    switch costume to (costume)\n    if <(fall count) < [3]> then\n        if <<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> then\n            set [costume v] to [2]\n            switch costume to (costume)\n            wait (0.075) seconds\n        end\n        if <<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> then\n            set [costume v] to [3]\n            switch costume to (costume)\n            wait (0.075) seconds\n        end\n        if <<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> then\n            set [costume v] to [4]\n            switch costume to (costume)\n            wait (0.075) seconds\n        end\n        if <<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> then\n            set [costume v] to [5]\n            switch costume to (costume)\n            wait (0.075) seconds\n        end\n    end\n    if <<(fall count) > [3]> and <(y velocity) > [-5]>> then\n        set [costume v] to [7]\n        switch costume to (costume)\n    end\n    if <(end) = [1]> then\n        hide\n    end\nend\n\nwhen flag clicked\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset size to (300) %\nset rotation style [left-right v]\npoint in direction (-90)\nforever\n    go to [front v] layer\n    follow smoother\nend\n\nwhen I receive [respawn v]\npoint in direction (-90)\n\ndefine follow smoother\ngo to (hitbox v)\nif <key (left arrow v) pressed?> then\n    point in direction (90)\nend\nif <key (right arrow v) pressed?> then\n    point in direction (-90)\nend\n\nwhen flag clicked\nforever\n    if <touching color (#cc0000)?> then\n        broadcast (respawn v)\n    end\n    if <touching color (#ffff00)?> then\n        broadcast (respawn v)\n    end\n    if <touching color (#009933)?> then\n        broadcast (respawn v)\n    end\n    if <touching color (#006622)?> then\n        broadcast (respawn v)\n    end\n    if <touching color (#7f00ff)?> then\n        broadcast (respawn v)\n    end\n    if <touching color (#ff0000)?> then\n        broadcast (respawn v)\n    end\n    if <touching color (#00ff55)?> then\n        broadcast (respawn v)\n    end\n    if <touching color (#990072)?> then\n        broadcast (respawn v)\n    end\n    if <touching color (#330066)?> then\n        broadcast (respawn v)\n    end\n    if <touching color (#ff00bf)?> then\n        broadcast (respawn v)\n    end\n    if <touching color (#003fff)?> then\n        broadcast (respawn v)\n    end\nend\n\n@cloud 1\n\nwhen flag clicked\ngo to x: (-310) y: (110)\nforever\n    go [backward v] (11) layers\n    repeat (570)\n        change x by (1)\n    end\n    go to x: (-310) y: (110)\nend\n\n@cloud 2\n\nwhen flag clicked\ngo to x: (-310) y: (75)\nforever\n    go [backward v] (10) layers\n    repeat (570)\n        change x by (1)\n        wait (0.02) seconds\n    end\n    go to x: (-310) y: (75)\nend\n\n@butterfly\n\nwhen flag clicked\nset size to (300) %\nforever\n    switch costume to (costume1 v)\n    wait (0.2) seconds\n    switch costume to (costume2 v)\n    wait (0.05) seconds\nend\n\nwhen flag clicked\ngo to x: (-110) y: (-70)\nset rotation style [left-right v]\nforever\n    wait (0.1) seconds\n    point in direction (-90)\n    repeat (110)\n        change x by (2)\n    end\n    point in direction (90)\n    repeat (110)\n        change x by (-2)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(STAGE:) = [9]> then\n        show\n    else\n        hide\n    end\nend\n\n@Mountains\n\nwhen flag clicked\nshow\nforever\n    go [backward v] (10) layers\n    set size to (300) %\nend\n\n@drop\n\nwhen flag clicked\ngo to x: (-35) y: (65)\nset size to (200) %\nforever\n    go [backward v] (1) layers\n    if <(STAGE:) = [10]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    go to x: (-35) y: (65)\n    repeat (18)\n        change y by (-10)\n    end\nend\n\n@drop2\n\nwhen flag clicked\ngo to x: (0) y: (65)\nset size to (200) %\nforever\n    if <(STAGE:) = [10]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nwait (0.5) seconds\nforever\n    go to x: (0) y: (65)\n    repeat (18)\n        change y by (-10)\n    end\nend\n\n@drop3\n\nwhen flag clicked\ngo to x: (35) y: (65)\nset size to (200) %\nforever\n    go [backward v] (1) layers\n    if <(STAGE:) = [10]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nwait (0.25) seconds\nforever\n    go to x: (35) y: (65)\n    repeat (18)\n        change y by (-10)\n    end\nend\n\n@Mini\n\nwhen flag clicked\nset [mini collected? v] to [0]\ngo to x: (70) y: (-98)\nset size to (300) %\nhide\nwait until <(STAGE:) = [13]>\nshow\nwait (0.5) seconds\nrepeat until <touching (new guy v)?>\n    go to [front v] layer\nend\nset [mini collected? v] to [1]\nforever\n    show\n    go to [front v] layer\n    go to (lagger8 v)\n    if <(recent spawn) = [  1]> then\n        go to x: (x) y: ((y) - (20))\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(end) = [1]> then\n        hide\n    end\nend\n\n@lagger\n\nwhen flag clicked\nwait until <(STAGE:) > [11]>\nforever\n    go to x: (x) y: ((y) - (20))\nend\n\n@lagger2\n\nwhen flag clicked\nwait until <(STAGE:) > [11]>\nforever\n    go to (lagger v)\nend\n\n@lagger3\n\nwhen flag clicked\nwait until <(STAGE:) > [11]>\nforever\n    go to (lagger2 v)\nend\n\n@lagger4\n\nwhen flag clicked\nwait until <(STAGE:) > [11]>\nforever\n    go to (lagger3 v)\nend\n\n@lagger5\n\nwhen flag clicked\nwait until <(STAGE:) > [11]>\nforever\n    go to (lagger4 v)\nend\n\n@lagger6\n\nwhen flag clicked\nwait until <(STAGE:) > [11]>\nforever\n    go to (lagger5 v)\nend\n\n@lagger7\n\nwhen flag clicked\nwait until <(STAGE:) > [11]>\nforever\n    go to (lagger6 v)\nend\n\n@lagger8\n\nwhen flag clicked\nwait until <(STAGE:) > [11]>\nforever\n    go to (lagger7 v)\nend\n\n@End\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    go to [front v] layer\n    go to [front v] layer\nend\n\nwhen flag clicked\nset [end v] to [0]\ngo to x: (0) y: (0)\nhide\nset [mini collected? v] to [0]\nwait until <(Mini Collected?) = [1]>\nwait until <(STAGE:) = [1]>\nset [ghost v] effect to (100)\nshow\nrepeat (25)\n    change [ghost v] effect by (-4)\nend\nset [end v] to [1]\n\n
HOW TO PLAY:\n-Press green flag TWICE (It will not work properly if you click it just once)\n-If you are experiencing lag run in smallscreen\n-Try and not touch any colour, doing so will cause you to die and restart the level.\n-To move you use the LEFT and RIGHT arrows. \n-To jump you use the -UP arrow.\n-Every level is passable\nP.S. Some levels are supposed to be hard