Simplicity (Minimalist Platformer)

Instructions: A minimalist game consisting of a ball, 5 colors of lines, and 4 hidden keys. It's harder than it sounds.

@Stage\n\nwhen [k v] key pressed\nif <key (space v) pressed?> then\n    ask [Hello. Are you trying to cheat? Well I took that off   :P] and wait\nend\n\nask [Set SCROLL.] and wait\nset [gravity v] to [20]\nset [scroll v] to (answer)\n\n@Reset\n\nwhen I receive [reset v]\nshow\ngo to [front v] layer\nset [ghost v] effect to (100)\nrepeat (5)\n    change [ghost v] effect by (-20)\nend\nswitch backdrop to (backdrop v)\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nclear graphic effects\nhide\n\nwhen I receive [slow reset \(called on win\) v]\nshow\ngo to [front v] layer\nset [ghost v] effect to (100)\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nbroadcast (Show Win Screen v)\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\nclear graphic effects\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\n@Character\n\nwhen flag clicked\nhide\nswitch backdrop to (intro v)\nset [scroll v] to [0]\nwait (0.5) seconds\nwait until <not <mouse down?>>\nwait until <<<key (space v) pressed?> or <<key (up arrow v) pressed?> or <<key (down arrow v) pressed?> or <<key (right arrow v) pressed?> or <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<key (b v) pressed?> or <<key (c v) pressed?> or <<key (d v) pressed?> or <<key (e v) pressed?> or <<key (f v) pressed?> or <<key (g v) pressed?> or <<key (h v) pressed?> or <<key (i v) pressed?> or <<key (j v) pressed?> or <<key (k v) pressed?> or <<key (l v) pressed?> or <<key (m v) pressed?> or <<key (n v) pressed?> or <<key (o v) pressed?> or <<key (p v) pressed?> or <<key (q v) pressed?> or <<key (r v) pressed?> or <<key (s v) pressed?> or <<key (t v) pressed?> or <<key (u v) pressed?> or <<key (v v) pressed?> or <<key (w v) pressed?> or <<key (x v) pressed?> or <<key (y v) pressed?> or <<key (z v) pressed?> or <<key (0 v) pressed?> or <<key (1 v) pressed?> or <<key (2 v) pressed?> or <<key (3 v) pressed?> or <<key (4 v) pressed?> or <<key (5 v) pressed?> or <<key (6 v) pressed?> or <<key (7 v) pressed?> or <<key (8 v) pressed?> or <key (9 v) pressed?>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> or <mouse down?>>\nbroadcast (Reset v)\n\nwhen I receive [reset v]\nshow\nset [scroll v] to [0]\ngo [backward v] (100) layers\ngo to x: (0) y: (180)\nset [gravity v] to [-5]\nset [speed v] to [0]\nwait (0.1) seconds\nforever\n    Check\n    if <(y position) < [-179]> then\n        broadcast (Reset v)\n    end\nend\n\ndefine Check\nif <key (right arrow v) pressed?> then\n    change [speed v] by (1)\nend\nif <key (left arrow v) pressed?> then\n    change [speed v] by (-1)\nend\nchange y by (Gravity)\nif <<<<<touching color (#000000)?> or <touching color (#006622)?>> or <<touching color (#ff0000)?> or <touching color (#ffff01)?>>> or <touching color (#0033cc)?>> and <(Gravity) < [0]>> then\n    repeat until <not <<<<touching color (#000000)?> or <touching color (#006622)?>> or <<touching color (#ff0000)?> or <touching color (#ffff01)?>>> or <touching color (#0033cc)?>>>\n        change y by (1)\n    end\n    change y by (-1)\n    set [gravity v] to [10]\nelse\n    change [gravity v] by (-1)\nend\nset [speed v] to ((Speed) / (1.1))\nchange [scroll v] by (() - (Speed))\n\nwhen I receive [secret v]\nset [gravity v] to [10]\nwait (0.5) seconds\nstop [other scripts in sprite v]\n\nwhen I receive [slow reset \(called on win\) v]\nstop [other scripts in sprite v]\n\n@Secret #\n\nwhen flag clicked\nset [secrets found v] to [0]\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [reset v]\nwait (0.1) seconds\nhide\n\nwhen I receive [secret v]\nswitch costume to (Secrets Found)\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen flag clicked\nwait (1) seconds\nwait until <(Scroll) > [6480]>\nswitch costume to (secret 5 v)\ngo to [front v] layer\nbroadcast (Slow Reset \(called on Win\) v)\n\nwhen I receive [show win screen v]\nshow\n\n@Secret 1\n\nwhen flag clicked\nhide\nswitch costume to (costume v)\nset y to (-120)\n\nwhen I receive [reset v]\nclear graphic effects\nif <(Secrets Found) = [0]> then\n    show\n    switch costume to (costume v)\n    repeat until <touching (character v)?>\n        set x to ((Scroll) + (2400))\n    end\n    change [secrets found v] by (1)\n    broadcast (Secret v)\n    wait (3) seconds\n    broadcast (Reset v)\nelse\n    hide\nend\n\n@Secret 2\n\nwhen flag clicked\nhide\nswitch costume to (costume v)\nset y to (-100)\n\nwhen I receive [reset v]\nclear graphic effects\nif <(Secrets Found) < [2]> then\n    show\n    switch costume to (costume v)\n    repeat until <touching (character v)?>\n        set x to ((Scroll) + (7000))\n    end\n    change [secrets found v] by (1)\n    broadcast (Secret v)\n    wait (3) seconds\n    broadcast (Reset v)\nelse\n    hide\nend\n\n@Back 1\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to (Scroll)\nend\n\nwhen I receive [reset v]\nshow\n\n@Back 2\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (400))\nend\n\nwhen I receive [reset v]\nshow\n\n@Back 3\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (800))\nend\n\nwhen I receive [reset v]\nshow\n\n@Back 4\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (1200))\nend\n\nwhen I receive [reset v]\nshow\n\n@Back 5\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (1600))\nend\n\nwhen I receive [reset v]\nshow\n\n@Back 6\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (2000))\nend\n\nwhen I receive [reset v]\nshow\n\n@Back 7\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (2400))\nend\n\nwhen I receive [reset v]\nshow\n\n@Back 8\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (2800))\nend\n\nwhen I receive [reset v]\nshow\n\n@Back 9\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (3200))\nend\n\nwhen I receive [reset v]\nshow\n\n@Back 10\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (3600))\nend\n\nwhen I receive [reset v]\nshow\n\n@Back 11\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (4000))\nend\n\nwhen I receive [reset v]\nshow\n\n@Back 12\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (4400))\nend\n\nwhen I receive [reset v]\nshow\n\n@Back 13\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (4800))\nend\n\nwhen I receive [reset v]\nshow\nif <(Secrets Found) > [0]> then\n    clear graphic effects\nelse\n    set [ghost v] effect to (90)\nend\n\n@Back 14\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (5200))\nend\n\nwhen I receive [reset v]\nshow\nif <(Secrets Found) > [0]> then\n    clear graphic effects\nelse\n    set [ghost v] effect to (90)\nend\n\n@Back 15\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (5600))\nend\n\nwhen I receive [reset v]\nshow\n\n@Back 16\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (6000))\nend\n\nwhen I receive [reset v]\nshow\n\n@Back 17\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (6400))\nend\n\nwhen I receive [reset v]\nshow\n\n@Back 18\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (6800))\nend\n\nwhen I receive [reset v]\nshow\n\n@Back -1\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) - (400))\nend\n\nwhen I receive [reset v]\nshow\nif <(Secrets Found) > [1]> then\n    clear graphic effects\nelse\n    set [ghost v] effect to (90)\nend\n\n@Back -2\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) - (800))\nend\n\nwhen I receive [reset v]\nshow\nif <(Secrets Found) > [1]> then\n    clear graphic effects\nelse\n    set [ghost v] effect to (90)\nend\n\n@Back -3\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) - (1200))\nend\n\nwhen I receive [reset v]\nshow\n\n@Back -4\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) - (1600))\nend\n\nwhen I receive [reset v]\nshow\n\n@Back -5\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) - (2000))\nend\n\nwhen I receive [reset v]\nshow\n\n@Back -6\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) - (2400))\nend\n\nwhen I receive [reset v]\nshow\n\n@Back -7\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) - (2800))\nend\n\nwhen I receive [reset v]\nshow\n\n@Back -8\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) - (3200))\nend\n\nwhen I receive [reset v]\nshow\nif <(Secrets Found) > [3]> then\n    clear graphic effects\nelse\n    set [ghost v] effect to (90)\nend\n\n@Secret 3\n\nwhen flag clicked\nhide\nswitch costume to (costume v)\nset y to (-140)\n\nwhen I receive [reset v]\nclear graphic effects\nif <(Secrets Found) < [3]> then\n    show\n    switch costume to (costume v)\n    repeat until <touching (character v)?>\n        set x to ((Scroll) - (2626))\n    end\n    change [secrets found v] by (1)\n    broadcast (Secret v)\n    wait (3) seconds\n    broadcast (Reset v)\nelse\n    hide\nend\n\n@Back 19\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (7200))\nend\n\nwhen I receive [reset v]\nshow\nif <(Secrets Found) > [2]> then\n    clear graphic effects\nelse\n    set [ghost v] effect to (90)\nend\n\n@Back 20\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (7600))\nend\n\nwhen I receive [reset v]\nshow\nif <(Secrets Found) > [2]> then\n    clear graphic effects\nelse\n    set [ghost v] effect to (90)\nend\n\n@Back 21\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (8000))\nend\n\nwhen I receive [reset v]\nshow\nif <(Secrets Found) > [2]> then\n    clear graphic effects\nelse\n    set [ghost v] effect to (90)\nend\n\n@Back 22\n\nwhen I receive [reset v]\nshow\nif <(Secrets Found) > [2]> then\n    clear graphic effects\nelse\n    set [ghost v] effect to (90)\nend\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (8400))\nend\n\n@Back 23\n\nwhen I receive [reset v]\nshow\nif <(Secrets Found) > [2]> then\n    clear graphic effects\nelse\n    set [ghost v] effect to (90)\nend\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (8800))\nend\n\n@Back 24\n\nwhen I receive [reset v]\nshow\nif <(Secrets Found) > [2]> then\n    clear graphic effects\nelse\n    set [ghost v] effect to (90)\nend\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (9200))\nend\n\n@Back 25\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (9600))\nend\n\nwhen I receive [reset v]\nshow\nif <(Secrets Found) > [2]> then\n    clear graphic effects\nelse\n    set [ghost v] effect to (90)\nend\n\n@Back 26\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (10000))\nend\n\nwhen I receive [reset v]\nshow\nif <(Secrets Found) > [2]> then\n    clear graphic effects\nelse\n    set [ghost v] effect to (90)\nend\n\n@Back 27\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (10400))\nend\n\nwhen I receive [reset v]\nshow\nif <(Secrets Found) > [2]> then\n    clear graphic effects\nelse\n    set [ghost v] effect to (90)\nend\n\n@Back 28\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) + (10800))\nend\n\nwhen I receive [reset v]\nshow\nif <(Secrets Found) > [2]> then\n    clear graphic effects\nelse\n    set [ghost v] effect to (90)\nend\n\n@Secret 4\n\nwhen flag clicked\nhide\nswitch costume to (costume v)\nset y to (-10)\n\nwhen I receive [reset v]\nclear graphic effects\nif <(Secrets Found) < [4]> then\n    show\n    switch costume to (costume v)\n    repeat until <touching (character v)?>\n        set x to ((Scroll) + (10000))\n    end\n    change [secrets found v] by (1)\n    broadcast (Secret v)\n    wait (3) seconds\n    broadcast (Reset v)\nelse\n    hide\nend\n\n@Back -9\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) - (3600))\nend\n\nwhen I receive [reset v]\nshow\nif <(Secrets Found) > [3]> then\n    clear graphic effects\nelse\n    set [ghost v] effect to (90)\nend\n\n@Back -10\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) - (4000))\nend\n\nwhen I receive [reset v]\nshow\nif <(Secrets Found) > [3]> then\n    clear graphic effects\nelse\n    set [ghost v] effect to (90)\nend\n\n@Back -11\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) - (4400))\nend\n\nwhen I receive [reset v]\nshow\nif <(Secrets Found) > [3]> then\n    clear graphic effects\nelse\n    set [ghost v] effect to (90)\nend\n\n@Back -12\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) - (4800))\nend\n\nwhen I receive [reset v]\nshow\nif <(Secrets Found) > [3]> then\n    clear graphic effects\nelse\n    set [ghost v] effect to (90)\nend\n\n@Back -13\n\nwhen I receive [reset v]\nshow\nif <(Secrets Found) > [3]> then\n    clear graphic effects\nelse\n    set [ghost v] effect to (90)\nend\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) - (5200))\nend\n\n@Back -14\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) - (5600))\nend\n\nwhen I receive [reset v]\nshow\nif <(Secrets Found) > [3]> then\n    clear graphic effects\nelse\n    set [ghost v] effect to (90)\nend\n\n@Back -15\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) - (6000))\nend\n\nwhen I receive [reset v]\nshow\nif <(Secrets Found) > [3]> then\n    clear graphic effects\nelse\n    set [ghost v] effect to (90)\nend\n\n@Back -16\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) - (6400))\nend\n\nwhen I receive [reset v]\nshow\nif <(Secrets Found) > [3]> then\n    clear graphic effects\nelse\n    set [ghost v] effect to (90)\nend\n\n@Back -17\n\nwhen flag clicked\nhide\nset y to (0)\nforever\n    set x to ((Scroll) - (6840))\nend\n\nwhen I receive [reset v]\nshow\nif <(Secrets Found) > [3]> then\n    clear graphic effects\nelse\n    set [ghost v] effect to (90)\nend\n\n