The Very Long Journey (a platformer)
@Stage\n\nwhen flag clicked\nswitch backdrop to (start v)\nwait (2) seconds\nswitch backdrop to (how it all went v)\nwait (10) seconds\nbroadcast (intro v)\n\nwhen I receive [start v]\nswitch backdrop to (backdrop1 v)\nforever\n    set [level v] to (backdrop [number v])\nend\n\nwhen I receive [intro v]\nswitch backdrop to (intro v)\nset [ghost v] effect to (100)\nrepeat (50)\n    wait (0.01) seconds\n    change [ghost v] effect by (-2)\nend\nwait (5) seconds\nrepeat (5)\n    wait (0.01) seconds\n    change [ghost v] effect by (20)\nend\nset [ghost v] effect to (0)\nswitch backdrop to (title v)\nwait (3) seconds\nbroadcast (start v)\n\nwhen I receive [next v]\nwait (0.01) seconds\nnext backdrop\n\nwhen I receive [game over v]\nswitch backdrop to (game over v)\n\nwhen I receive [you win!!! v]\nswitch backdrop to (you win!!! v)\nwait (5) seconds\nswitch backdrop to (click green flag v)\n\n@Sprite1\n\ndefine reset\ngo to x: (-100) y: (-38)\n\nwhen backdrop switches to [backdrop45 v]\nforever\n    if <touching (sprite4 v)?> then\n        broadcast (game over v)\n        hide\n        stop [other scripts in sprite v]\n    end\nend\n\nwhen flag clicked\nhide variable [level v]\nhide\n\nwhen I receive [start v]\nswitch costume to (costume1 v)\ngo to [front v] layer\nshow\ngo to x: (-100) y: (-38)\nshow variable [level v]\nset [level v] to [1]\nset [xv v] to [0]\nset [yv v] to [0]\nset [deaths v] to [0]\nforever\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xv v] by (-1)\n    end\n    change x by (xv)\n    set [xv v] to ((xv) * (0.9))\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                        if <touching color (#000000)?> then\n                            if <key (up arrow v) pressed?> then\n                                if <(xv) > [0]> then\n                                    set [xv v] to [-7]\n                                else\n                                    set [xv v] to [7]\n                                end\n                                set [yv v] to [10]\n                            else\n                                set [xv v] to ((xv) * (-1.3))\n                                change x by (xv)\n                                set [xv v] to [0]\n                                change x by ((xv) / (5))\n                            end\n                            change y by (-5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-0.5)\n    change y by (yv)\n    if <touching color (#000000)?> then\n        set [yv v] to ((yv) * (-0.25))\n        change y by (yv)\n        if <touching color (#000000)?> then\n            change y by (yv)\n            if <touching color (#000000)?> then\n                change y by (yv)\n                if <touching color (#000000)?> then\n                    change y by (yv)\n                end\n            end\n        end\n    end\n    change y by (-1)\n    if <<touching color (#000000)?> and <key (up arrow v) pressed?>> then\n        set [yv v] to [10]\n    end\n    change y by (1)\nend\n\nwhen I receive [start v]\nforever\n    if <key (right arrow v) pressed?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\n    if <key (left arrow v) pressed?> then\n        switch costume to (costume3 v)\n    else\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <key (r v) pressed?> then\n        reset\n    end\n    if <key (s v) pressed?> then\n        broadcast (next v)\n        reset\n    end\n    if <<touching color (#ff0000)?> or <(y position) < [-100]>> then\n        change [deaths v] by (1)\n        reset\n    end\n    if <touching color (#ff9400)?> then\n        set [yv v] to [0]\n    end\n    if <touching color (#ffff00)?> then\n        set [yv v] to [15]\n    end\n    if <touching color (#006622)?> then\n        repeat until <not <touching color (#006622)?>>\n            switch costume to (costume4 v)\n        end\n        if <not <touching color (#006622)?>> then\n            set size to (100) %\n        end\n    end\n    if <touching color (#003fff)?> then\n        set [yv v] to [5]\n    end\n    if <touching color (#66004c)?> then\n        repeat until <not <touching color (#66004c)?>>\n            switch costume to (costume5 v)\n        end\n        if <not <touching color (#66004c)?>> then\n            set size to (100) %\n        end\n    end\n    if <(x position) > [350]> then\n        broadcast (next v)\n        reset\n    end\n    if <<(level) = [27]> and <touching (sprite2 v)?>> then\n        go to x: (158) y: (-51)\n    end\nend\n\nwhen backdrop switches to [backdrop100 v]\nforever\n    if <touching (sprite7 v)?> then\n        broadcast (you win!!! v)\n        hide\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop27 v]\nforever\n    switch costume to (costume1 v)\n    go to [front v] layer\n    show\n    set size to (75) %\n    go to x: (-126) y: (-126)\n    repeat until <not <(level) = [27]>>\n        next costume\n        wait (0.1) seconds\n    end\n    if <not <(level) = [27]>> then\n        hide\n    end\nend\n\n@Sprite3\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop28 v]\ngo to [front v] layer\nshow\ngo to x: (88) y: (-12)\nrepeat until <not <(level) = [28]>>\n    switch costume to (pick random (1) to (4))\n    wait (0.1) seconds\nend\nif <not <(level) = [28]>> then\n    hide\nend\n\n@Sprite4\n\nwhen backdrop switches to [backdrop45 v]\nset size to (100) %\ngo to [front v] layer\nshow\ngo to x: (37) y: (58)\nrepeat (6)\n    wait (5) seconds\n    change size by (15)\nend\nhide\n\nwhen I receive [game over v]\nhide\n\nwhen flag clicked\nhide\nforever\n    if <not <(level) = [45]>> then\n    end\nend\n\n@Sprite5\n\nwhen backdrop switches to [backdrop45 v]\ngo to [front v] layer\nshow\ngo to x: (92) y: (17)\nwait (35) seconds\nhide\n\nwhen I receive [game over v]\nhide\n\nwhen flag clicked\nhide\nforever\n    if <not <(level) = [45]>> then\n    end\nend\n\n@Sprite6\n\nwhen flag clicked\nhide\n\nwhen I receive [intro v]\npoint in direction (90)\nset size to (0) %\ngo to [front v] layer\nshow\ngo to x: (-5) y: (7)\nrepeat (50)\n    wait (0.01) seconds\n    change size by (2)\n    turn right (57.6) degrees\nend\nwait (5) seconds\nrepeat (5)\n    wait (0.01) seconds\n    change y by (38)\n    change [ghost v] effect by (20)\nend\nhide\n\n@Sprite7\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop100 v]\ngo to [front v] layer\nshow\ngo to x: (154) y: (25)\n\nwhen I receive [you win!!! v]\nhide\n\n
Arrow keys to move around.\nAvoid red. It is lava.\nOrange is quicksand. It makes you sink.\nYellow makes you jump really high.\nGreen makes you smaller.\nBlue makes you jump just a little bit.\nPurple makes you larger than usual.\n"r" key to restart a level.\n"s" key to skip a level.\nEnjoy the game! If you did, please leave a ❤ and ★! \nWhen you're finished, please check out my other games too!\nhttps://scratch.mit.edu/studios/4685976/projects/