Monumental | Scrolling Platformer


@Stage\n\nwhen I receive [almost start v]\nforever\n    play sound [Vexento - Occupy v] until done\nend\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [the end v]\nwait (1) seconds\nswitch backdrop to (backdrop2 v)\n\n@Sprite1\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nswitch costume to (costume4 v)\nhide\n\n@slimy\n\nwhen I receive [almost start v]\nshow\ngo to x: (-167) y: (-34)\nforever\n    change [yv v] by (-0.5)\n    if <key (right arrow v) pressed?> then\n        if <(water) = [0]> then\n            change [xv v] by (0.7)\n        end\n    end\n    go to [front v] layer\n    if <key (left arrow v) pressed?> then\n        change [xv v] by (-0.7)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <<touching color (#737373)?> or <touching color (#616161)?>> then\n        change y by (1)\n        if <<touching color (#737373)?> or <touching color (#616161)?>> then\n            change y by (1)\n            if <<touching color (#737373)?> or <touching color (#616161)?>> then\n                change y by (1)\n                if <<touching color (#737373)?> or <touching color (#616161)?>> then\n                    change y by (1)\n                    if <<touching color (#737373)?> or <touching color (#616161)?>> then\n                        change y by (1)\n                    end\n                    if <<touching color (#737373)?> or <touching color (#616161)?>> then\n                        change x by ((Xv) * (-1))\n                        change x by (-1)\n                        change y by (-5)\n                        change x by (1)\n                        if <key (up arrow v) pressed?> then\n                            if <(Xv) < [0]> then\n                                set [yv v] to [10]\n                                set [xv v] to [10]\n                            else\n                                set [yv v] to [10]\n                                set [xv v] to [-10]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (Yv)\n    if <<touching color (#737373)?> or <touching color (#616161)?>> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <<key (up arrow v) pressed?> and <(Shrunk?) = [0]>> then\n        if <<touching color (#737373)?> or <touching color (#616161)?>> then\n            set [yv v] to [8]\n        end\n    end\n    if <<touching color (#0035bc)?> or <touching color (#004aff)?>> then\n        set [yv v] to [20]\n    end\n    change y by (1)\n    if <touching (level_sensor v)?> then\n        broadcast (NextLevel v)\n        go to x: (-190) y: (-101)\n    end\n    if <<touching color (#e54d4d)?> or <touching color (#a93a3a)?>> then\n        go to x: (-190) y: (-101)\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <<touching (door_sensor v)?> and <(Level?) = [15]>> then\n        broadcast (The end v)\n        hide\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\ngo to x: (-167) y: (-34)\nset [shrunk? v] to [0]\nset size to (100) %\n\nwhen I receive [almost start v]\nforever\n    if <key (space v) pressed?> then\n        repeat until <(size) = [60]>\n            change size by (-10)\n        end\n        set [shrunk? v] to [1]\n    else\n        repeat until <(size) = [100]>\n            change size by (10)\n        end\n        set [shrunk? v] to [0]\n    end\nend\n\n@Sprite5\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [almost start v]\nshow\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [nextlevel v]\nnext costume\nwait (0.4) seconds\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    set [level? v] to (costume [number v])\nend\n\nwhen I receive [the end v]\nwait (1) seconds\nswitch costume to (costume18 v)\n\n@Sprite3\n\nwhen flag clicked\npoint in direction (90)\nset size to (100) %\nset [move v v] to [22]\ngo to [front v] layer\nhide\nwait (0.3) seconds\ngo to x: (-302) y: (0)\nshow\nrepeat until <(move v) < [1]>\n    change x by (move v)\n    change [move v v] by (-0.8)\nend\nwait (1) seconds\nbroadcast (shocky thing v)\nrepeat until <(size) > [140]>\n    change size by (15)\nend\nrepeat until <(size) < [100]>\n    change size by (-15)\nend\nwait (1) seconds\nbroadcast (breeze v)\nwait (0.3) seconds\nrepeat until <(x position) > [290]>\n    change x by (10)\n    turn right (15) degrees\nend\nhide\n\n@Sprite2\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\n\nwhen I receive [shocky thing v]\nswitch costume to (costume2 v)\nwait (0.1) seconds\nswitch costume to (costume1 v)\n\nwhen I receive [almost start v]\nhide\n\nwhen flag clicked\nstart sound [Still Standing v]\n\nwhen I receive [almost start v]\nrepeat until <(volume) = [0]>\n    change volume by (-5)\nend\nclear sound effects\n\nwhen flag clicked\nset volume to (100) %\n\n@Sprite4\n\nwhen flag clicked\ngo to x: (-251) y: (2)\nhide\n\nwhen I receive [breeze v]\nset [ghost v] effect to (30)\nshow\nrepeat until <(x position) > [250]>\n    change x by (10)\nend\nhide\nbroadcast (logo v)\n\n@Sprite6\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nset [ghost v] effect to (100)\nshow\n\nwhen I receive [logo v]\nwait (1) seconds\nrepeat (5)\n    change [ghost v] effect by (-20)\nend\nwait (2) seconds\nbroadcast (almost start v)\nhide\n\n@mouse trail\n\nwhen I start as a clone\nset size to (100) %\nshow\n\nwhen I start as a clone\nrepeat (7)\n    change [ghost v] effect by (15)\nend\ndelete this clone\n\nwhen I start as a clone\nclear graphic effects\n\nwhen I receive [almost start v]\nforever\n    hide\n    go to (slimy v)\nend\n\nwhen I receive [almost start v]\nforever\n    wait (0.1) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset size to ([size v] of [slimy v]) %\n\nwhen I receive [the end v]\nstop [other scripts in sprite v]\nhide\n\n@Level_sensor\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    set [ghost v] effect to (100)\nend\n\n@~The key~\n\nwhen flag clicked\ngo to x: (177) y: (69)\nforever\n    repeat (20)\n        change y by (-0.3)\n    end\n    repeat (20)\n        change y by (0.3)\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen flag clicked\nforever\n    if <(Level?) = [13]> then\n        if <(costume [number v]) = [1]> then\n            show\n        end\n    else\n        hide\n    end\n    if <touching (slimy v)?> then\n        switch costume to (costume2 v)\n        hide\n        broadcast (Open seseme v)\n    end\nend\n\nwhen I receive [open seseme v]\nplay sound [collect v] until done\n\n@Sprite7\n\nwhen flag clicked\ngo to x: (298) y: (-17)\ngo to [back v] layer\n\nwhen I receive [open seseme v]\nrepeat (10)\n    change y by (5)\nend\nswitch costume to (costume2 v)\nhide\n\nif <touching (slimy v)?> then\nend\n\nshow\n\nhide\n\nwhen flag clicked\nforever\n    if <(Level?) = [13]> then\n        if <(costume [number v]) = [1]> then\n            show\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\n@Door_sensor\n\nwhen flag clicked\nhide\nforever\n    go to x: (7) y: (5)\n    set [ghost v] effect to (100)\n    if <(Level?) = [15]> then\n        show\n    else\n        hide\n    end\nend\n\n@Sprite8\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [the end v]\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (1) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nwait (1) seconds\nbroadcast (that one message v)\n\n@Sprite9\n\nwhen I receive [that one message v]\nset [ghost v] effect to (100)\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\n\nwhen flag clicked\ngo to x: (-97) y: (127)\nhide\n\n