Slime Platformer 2: Whose Funeral Is This?

Instructions: =============== Series so Far=================\n1. https://scratch.mit.edu/projects/501459810\n2. https://scratch.mit.edu/projects/505124384\n3. https://scratch.mit.edu/projects/520963964\n==========================================\n✅ Advertising - Please keep it to a minimum and don't force it on anyone who doesn't want it. :)\n✅ Feedback\n❌ Spam\n❌ F4F\n❌ Hate - Seriously NO HATE\n❌ Reporting Advertising/ Saying it isn't allowed\nArrow Keys or AWSD to move.\nR to reset the level if you want to\nAvoid the Gravestones, Crosses & Jumping Skeleton!

@Stage\n\nwhen I receive [bye ocean  v]\nswitch backdrop to (light2 v)\n\n@SPIKES\n\nwhen flag clicked\nset size to (50) %\n\nwhen flag clicked\nshow\nswitch costume to (1 v)\n\nwhen I receive [new v]\nnext costume\n\nwhen I receive [bounce training v]\ngo to x: (199) y: (16)\n\nwhen flag clicked\ngo to x: (244) y: (14)\n\nwhen I receive [roof spikes 1 v]\ngo to x: (160) y: (19)\n\nwhen I receive [duplicate of 1 but harder v]\ngo to x: (145) y: (13)\n\nwhen I receive [mushroom mario v]\ngo to x: (145) y: (13)\n\nwhen I receive [lava 1 v]\ngo to x: (265) y: (15)\n\nwhen I receive [ocean v]\ngo to x: (150) y: (7)\n\nwhen I receive [kiokiokiobaby v]\ngo to x: (178) y: (12)\nchange [ghost v] effect by (25)\nchange [pixelate v] effect by (25)\n\nwhen I receive [babyteach v]\ngo to x: (246) y: (9)\n\nwhen I receive [roof earth =? v]\n\nwhen I receive [end v]\nhide\n\nwhen flag clicked\nforever\n    set size to (50) %\nend\n\n@Platform\n\nwhen flag clicked\nswitch costume to (1 v)\n\nwhen I receive [end v]\nhide\n\nwhen I receive [kiokiokiobaby v]\nhide\n\nwhen I receive [new v]\nif <(costume [name v]) = [12]> then\n    broadcast (End v)\nelse\n    next costume\nend\n\nwhen flag clicked\nswitch costume to (1 v)\nshow\ngo to [front v] layer\ngo [backward v] (1) layers\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [2]> then\n        broadcast (BOUNCE TRAINING v)\n    end\nend\n\nwhen [space v] key pressed\nbroadcast (Mute v)\n\nwhen [u v] key pressed\nbroadcast (Unmute v)\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [3]> then\n        broadcast (Roof spikes 1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [4]> then\n        broadcast (DUPLICATE OF 1 but harder v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [6]> then\n        broadcast (MUSHROOM MARIO v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [5]> then\n        broadcast (ROOF EARTH =? v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [9]> then\n        broadcast (Lava 1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [10]> then\n        broadcast (OCEAN v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [11]> then\n        broadcast (BYE OCEAN  v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [11]> then\n        broadcast (KIOKIOKIOBABY v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [12]> then\n        broadcast (BABYTEACH v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [7]> then\n        broadcast (ROOF EATH 2 v)\n    end\nend\n\n@Good Slime\n\nwhen flag clicked\nshow\n\nwhen I receive [mute v]\nset volume to (0) %\n\nwhen I receive [unmute v]\nset volume to (100) %\n\nwhen I receive [start v]\nshow variable [☁ record v]\nshow variable [time v]\nset [time v] to [0]\nforever\n    change [time v] by (0.04)\nend\n\nwhen flag clicked\nhide variable [time v]\nhide variable [☁ record v]\n\nwhen flag clicked\nswitch costume to (player2 v)\nwait (4) seconds\nbroadcast (Unmute v)\nforever\n    play sound [the piano moosic v] until done\nend\n\nwhen flag clicked\nset size to (100) %\nshow\ngo to [front v] layer\nswitch backdrop to (1 v)\ngo to x: (-200) y: (0)\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [xv v] by (1)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <<touching (platform v)?> or <touching (moving platform v)?>> then\n        change y by (1)\n        if <<touching (platform v)?> or <touching (moving platform v)?>> then\n            change y by (1)\n            if <<touching (platform v)?> or <touching (moving platform v)?>> then\n                change y by (1)\n                if <<touching (platform v)?> or <touching (moving platform v)?>> then\n                    change y by (1)\n                    if <<touching (platform v)?> or <touching (moving platform v)?>> then\n                        change y by (1)\n                        if <<touching (platform v)?> or <touching (moving platform v)?>> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                                set [yv v] to [10]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <<touching (platform v)?> or <touching (moving platform v)?>> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching (platform v)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [yv v] to [15]\n        end\n    end\n    change y by (1)\n    if <(x position) > [220]> then\n        set [xv v] to [0]\n        set [yv v] to [0]\n        broadcast (New v)\n        go to x: (-200) y: (0)\n    end\n    if <<<[-160] > (y position)> or <touching (lava  v)?>> or <<key (r v) pressed?> or <touching (skeleton v)?>>> then\n        switch costume to (player2 v)\n        set [xv v] to [0]\n        set [yv v] to [0]\n        start sound [Crunch v]\n        repeat (20)\n            change [ghost v] effect by (5)\n            change size by (.2)\n            change [pixelate v] effect by (20)\n        end\n        set size to (100) %\n        clear graphic effects\n        go to x: (-200) y: (0)\n        go to x: (-200) y: (0)\n    end\n    if <<touching (sprite1 v)?> or <<touching (sprite3 v)?> or <<touching (sprite2 v)?> or <touching (spikes v)?>>>> then\n        set [xv v] to [0]\n        set [yv v] to [0]\n        start sound [Crunch v]\n        repeat (20)\n            change [ghost v] effect by (5)\n            change size by (.2)\n            change [pixelate v] effect by (20)\n        end\n        set size to (15) %\n        clear graphic effects\n        go to x: (-200) y: (0)\n    end\nend\n\nwhen [space v] key pressed\nbroadcast (Mute v)\n\nwhen flag clicked\nforever\n    set size to (100) %\nend\n\nwhen I receive [end v]\nhide\n\nwhen I receive [kiokiokiobaby v]\nhide\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [ocean v]\nshow\nforever\n    repeat (20)\n        change [pixelate v] effect by (20)\n    end\n    hide\n    repeat (20)\n        change [pixelate v] effect by (20)\n    end\n    go to x: (pick random (-90) to (114)) y: (pick random (-161) to (151))\n    show\nend\n\n@Skeleton\n\nwhen flag clicked\nhide\nforever\n    next costume\n    wait (0.2) seconds\nend\n\nwhen I receive [mushroom mario v]\ngo to x: (-57) y: (-88)\nshow\n\nwhen I receive [mushroom mario v]\nforever\n    glide (1.5) secs to x: (-57) y: (130)\n    glide (1) secs to x: (-57) y: (-88)\nend\n\nwhen I receive [ocean v]\nhide\n\n@Sprite2\n\nwhen flag clicked\nhide\n\nwhen I receive [ocean v]\nshow\nforever\n    repeat (20)\n        change [pixelate v] effect by (20)\n    end\n    hide\n    repeat (20)\n        change [pixelate v] effect by (20)\n    end\n    go to x: (pick random (-90) to (114)) y: (pick random (-161) to (151))\n    show\nend\n\n@Sprite3\n\nwhen flag clicked\nhide\n\nwhen I receive [ocean v]\nshow\nforever\n    repeat (20)\n        change [pixelate v] effect by (20)\n    end\n    hide\n    repeat (20)\n        change [pixelate v] effect by (20)\n    end\n    go to x: (pick random (-90) to (114)) y: (pick random (-161) to (151))\n    show\nend\n\n