Circulatory Platformer

Instructions: Use the arrow keys to move around and collect each item to progress to the next level.

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [end v]\nswitch backdrop to (backdrop2 v)\n\n@ThumbNail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nforever\n    reset timer\nend\n\nwhen [timer v] > (0.001)\nshow\n\n@RetroRadar\n\nwhen flag clicked\nhide\nforever\n    create clone of (_myself_ v)\n    turn right (92.5) degrees\nend\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (100)\nset size to (pick random (400) to (300)) %\nrepeat (20)\n    move (6) steps\n    change size by (10)\n    change [ghost v] effect by (-5)\nend\nrepeat (20)\n    move (6) steps\n    change size by (-10)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\nwhen I receive [message1 v]\nhide\nstop [other scripts in sprite v]\nbroadcast (message2 v)\nstop [this script v]\n\n@Heart\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (2) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nclear graphic effects\nbroadcast (message1 v)\nforever\n    wait until <<(Hitbox XvelV) > [220]> and <(Touch.Active1) = [1]>>\n    broadcast (next level v)\n    wait until <<(Hitbox XvelV) > [220]> and <(Touch.Active2) = [1]>>\n    broadcast (next level v)\n    wait until <<(Hitbox XvelV) > [220]> and <(Touch.Active3) = [1]>>\n    broadcast (next level v)\n    wait until <<(Hitbox XvelV) > [220]> and <(Touch.Active4) = [1]>>\n    broadcast (next level v)\n    wait until <<(Hitbox XvelV) > [220]> and <(Touch.Active5) = [1]>>\n    broadcast (End v)\nend\n\nwhen [timer v] > (0.001)\nhide\n\nwhen [timer v] > (0.001)\nhide\n\n@Character\n\nwhen flag clicked\nhide\nset rotation style [left-right v]\npoint in direction (90)\nforever\n    go to (hitbox v)\n    change y by (-6)\nend\n\nwhen I receive [game over v]\nhide\n\nwhen I receive [message1 v]\nshow\nforever\n    if <key (right arrow v) pressed?> then\n        point in direction (90)\n        wait (0.04) seconds\n        if <(costume [number v]) = [5]> then\n            switch costume to (walk 1 v)\n        else\n            next costume\n        end\n    end\n    if <key (left arrow v) pressed?> then\n        point in direction (-90)\n        wait (0.04) seconds\n        if <(costume [number v]) = [5]> then\n            switch costume to (walk 1 v)\n        else\n            next costume\n        end\n    end\n    if <not <<key (right arrow v) pressed?> or <key (left arrow v) pressed?>>> then\n        switch costume to (stand v)\n    end\nend\n\nwait until <<(x position) > [220]> and <(Touch.Active1) = [1]>>\nbroadcast (next level v)\nwait until <<(x position) > [220]> and <(Touch.Active2) = [1]>>\nbroadcast (next level v)\nwait until <<(x position) > [220]> and <(Touch.Active3) = [1]>>\nbroadcast (next level v)\nwait until <<(x position) > [220]> and <(Touch.Active4) = [1]>>\nbroadcast (next level v)\nwait until <<(x position) > [220]> and <(Touch.Active5) = [1]>>\nbroadcast (next level v)\n\nwhen [timer v] > (0.001)\nhide\n\nwhen I receive [end v]\nhide\n\n@Hitbox\n\nwhen flag clicked\nset [level v] to [0]\nset [ghost v] effect to (100)\ngo to [front v] layer\nhide\n\nwhen I receive [next level v]\nStart Position\nchange [level v] by (1)\n\ndefine Start Position\nset [y_vel v] to [0]\nset [x_vel v] to [0]\nset size to (100) %\ngo to x: (-220) y: (-76)\n\nwhen I receive [message1 v]\nset [level v] to [1]\nset [y_vel v] to [0]\nset [x_vel v] to [0]\nStart Position\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\nforever\n    change [y_vel v] by (-1)\n    if <key (right arrow v) pressed?> then\n        change [x_vel v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x_vel v] by (-1)\n    end\n    set [x_vel v] to ((x_vel) * (0.9))\n    change x by (x_vel)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change y by (1)\n                            if <touching (level v)?> then\n                                change y by (-6)\n                                if <key (up arrow v) pressed?> then\n                                    set [y_vel v] to [8]\n                                    if <(x_vel) > [0]> then\n                                        set [x_vel v] to [-10]\n                                    else\n                                        set [x_vel v] to [10]\n                                    end\n                                else\n                                    change x by ((x_vel) * (-1))\n                                    set [x_vel v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (y_vel)\n    if <touching (level v)?> then\n        change y by ((y_vel) * (-1))\n        set [y_vel v] to [0]\n    end\n    change y by (-1)\n    if <(x position) > [220]> then\n        if <(level) = [11]> then\n            broadcast (next level v)\n            broadcast (game over v)\n            stop [this script v]\n        else\n        end\n    end\n    if <<touching (level v)?> and <key (up arrow v) pressed?>> then\n        set [y_vel v] to [12]\n    end\n    if <<<<touching (obstacles v)?> or <touching (chainsaw/ax v)?>> or <<touching (bullets1 v)?> or <touching (bullets2 v)?>>> or <<touching (smasher1 v)?> or <touching (smasher2 v)?>>> then\n        Start Position\n    end\n    if <touching (trampoline v)?> then\n        set [y_vel v] to [16]\n    end\n    change y by (1)\nend\n\nwhen I receive [game over v]\nhide\n\nwhen flag clicked\nforever\n    set [hitbox xvelv v] to (x position)\nend\n\nwhen [timer v] > (0.001)\nhide\n\nwhen I receive [end v]\nhide\n\n@Level\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [message1 v]\nshow\nforever\n    switch costume to (level)\nend\n\nwhen [timer v] > (0.001)\nhide\n\nwhen I receive [end v]\nhide\n\n@[Real] Heart\n\nwhen flag clicked\nset [touch.active1 v] to [0]\nswitch costume to (costume1 v)\ngo to x: (187) y: (-62)\nhide\nwait until <(level) = [1]>\n\nwhen [timer v] > (0.001)\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [message1 v]\nshow\nforever\n    if <touching (character v)?> then\n        set [touch.active1 v] to [1]\n        hide\n        switch costume to (costume2 v)\n        stop [this script v]\n    end\nend\n\n@Aorta\n\nwhen flag clicked\nset [touch.active2 v] to [0]\nswitch costume to (costume1 v)\ngo to x: (197) y: (105)\nhide\nwait until <(level) = [2]>\nshow\nforever\n    if <touching (character v)?> then\n        set [touch.active2 v] to [1]\n        hide\n        switch costume to (costume2 v)\n        stop [this script v]\n    end\nend\n\nwhen [timer v] > (0.001)\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nif <(level) = [2]> then\n    show\nelse\n    hide\nend\n\n@Veins\n\nwhen flag clicked\nset [touch.active4 v] to [0]\nswitch costume to (costume1 v)\ngo to x: (-29) y: (-94)\nhide\nwait until <(level) = [4]>\nshow\nforever\n    if <touching (character v)?> then\n        set [touch.active4 v] to [1]\n        hide\n        switch costume to (costume2 v)\n        stop [this script v]\n    end\nend\n\nwhen [timer v] > (0.001)\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nif <(level) = [4]> then\n    show\nelse\n    hide\nend\n\n@Arteries\n\nwhen I receive [next level v]\nif <(level) = [5]> then\n    show\nelse\n    hide\nend\n\nwhen flag clicked\nhide\n\nwhen [timer v] > (0.001)\nhide\n\nwhen flag clicked\nset [touch.active5 v] to [0]\nswitch costume to (costume1 v)\ngo to x: (102) y: (-23)\nhide\nwait until <(level) = [5]>\nshow\nforever\n    if <touching (character v)?> then\n        set [touch.active5 v] to [1]\n        hide\n        switch costume to (costume2 v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [end v]\nhide\n\n@Confetti\n\nwhen I start as a clone\nshow\ngo [backward v] (10) layers\nset size to (pick random (1) to (100)) %\npoint in direction (pick random (0) to (90))\nset [color v] effect to (pick random (1) to (100))\ngo to x: (pick random (-240) to (240)) y: (180)\nglide (pick random (7) to (10)) secs to x: (pick random (-180) to (180)) y: (pick random (-90) to (90))\nrepeat (15)\n    change [ghost v] effect by (7)\nend\ndelete this clone\n\nwhen I receive [end v]\nrepeat (100)\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nhide\n\n@Superior Vena Cava\n\nwhen flag clicked\nset [touch.active3 v] to [0]\nswitch costume to (costume1 v)\ngo to x: (266) y: (4)\nhide\nwait until <(level) = [3]>\nshow\nforever\n    if <touching (character v)?> then\n        set [touch.active3 v] to [1]\n        hide\n        switch costume to (costume2 v)\n        stop [this script v]\n    end\nend\n\nwhen [timer v] > (0.001)\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nif <(level) = [3]> then\n    show\nelse\n    hide\nend\n\n