Pen Platformer
@Stage\n\nwhen flag clicked\nforever\n    play sound [DEAF KEV - Invincible \[NCS Release\].mp3 v] until done\nend\n\n@Player\n\ndefine Touch Ground <up?>\nchange [falling? v] by (1)\nrepeat until <not <touching (ground v)?>>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    set [speed y v] to [0]\nend\nchange y by (-1)\n\ndefine Walk (direction) (speed)\npoint in direction (direction)\nchange x by (speed)\nset [slope v] to [0]\nrepeat until <<(slope) = [8]> or <not <touching (ground v)?>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <(slope) = [8]> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope))\nend\n\nwhen flag clicked\nset size to (75) %\ngo to [front v] layer\nset rotation style [left-right v]\npoint in direction (90)\ngo to x: (-180) y: (-120)\nset [ghost v] effect to (0)\nshow\nset [speed y v] to [0]\nset [falling? v] to [10]\nforever\n    switch costume to (player v)\n    change [speed y v] by (-1)\n    change y by (speed y)\n    Touch Ground <(speed y) > [0]>\n    if <touching (virus v)?> then\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        set [speed y v] to [0]\n        go to x: (-180) y: (-120)\n        set [ghost v] effect to (0)\n    end\n    if <touching color (#0068ff)?> then\n        if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n            Walk (-90) (-10)\n        end\n        if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n            Walk (90) (10)\n        end\n    else\n        if <touching color (#ff00e3)?> then\n            if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n                Walk (-90) (-2)\n            end\n            if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n                Walk (90) (2)\n            end\n        else\n            if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n                Walk (-90) (-6)\n            end\n            if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n                Walk (90) (6)\n            end\n        end\n    end\n    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <(falling?) < [3]>> then\n        set [speed y v] to [15]\n    end\n    if <(y position) < [-179]> then\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        set [speed y v] to [0]\n        go to x: (-180) y: (-120)\n        set [ghost v] effect to (0)\n    end\n    if <(x position) > [219]> then\n        go to x: (-180) y: (-120)\n        broadcast (Next level v)\n    end\nend\n\n@Ground\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\n\n@Glitch\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\n@Text\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\n@Virus\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nswitch costume to (costume1 v)\n\n@Other\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\n@Thumbnail\n\ngo to x: (0) y: (0)\nshow\ngo to [front v] layer\n\nwhen flag clicked\nhide\n\n
Arrow keys to move\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nThis is a platformer that is for new Scratchers. But even if you are not a new Scratcher you can still enjoy the platformer. \n\nInstructions:\nArrow keys to move\nSpace key to skip a level\n\nHelpful links for new Scratchers:\nScratch wiki: https://en.scratch-wiki.info/\nDiscussion forums: https://scratch.mit.edu/discuss/ Scratch welcoming committee: https://scratch.mit.edu/studios/146521\n\nPlease like favorite and follow!\n\nCan you find the rainbow color? It only has a 0.5% chance of dropping. Comment in the comments section if you found it!