Stumped - A Platformer

Instructions: Green is on a mission, but for what?\n\nCollab with @flamingokid8, the artist of the project! Check her project out! https://scratch.mit.edu/projects/369484118/

@Stage\n\nwhen I receive [its 8 v]\nswitch backdrop to (black v)\n\nwhen flag clicked\nset [ghost v] effect to (0)\nswitch backdrop to (backdrop1 v)\nclear graphic effects\n\nwhen I receive [its 10 v]\nrepeat (95)\n    wait (0.1) seconds\n    change [ghost v] effect by (1)\nend\n\nset [ghost v] effect to (100)\n\nset [ghost v] effect to (0)\n\nchange [ghost v] effect by (1)\n\nwhen I receive [animation v]\nclear graphic effects\nswitch backdrop to (black v)\nclear graphic effects\n\n@platformer\n\nwhen flag clicked\nset [animation v] to [0]\nclear graphic effects\nset [startsratsrats v] to [0]\nhide\nwait until <(startsratsrats) = [1]>\nshow\nset [invisible v] to [0]\nhide variable [x v]\nhide variable [y v]\nset [x v] to [0]\nset [y v] to [0]\nset [level v] to [1]\nset [yy v] to [-1]\nset [xx v] to [1]\nset [v v] to [0]\nset [startpointx v] to [-165]\nset [startpointy v] to [-125]\nset [deaths v] to [0]\nhide variable [deaths v]\nhide variable [level v]\nswitch backdrop to (backdrop1 v)\nshow\ngo to x: (startpointx) y: (startpointy)\nset [xv v] to [0]\nset [yv v] to [0]\nset [ehee v] to [0]\nset [animation v] to [0]\nrepeat until <(animation) = [1]>\n    set size to (50) %\n    go to [front v] layer\n    change [yv v] by (-1)\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [xv v] by (3)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [xv v] by (-3)\n    end\n    set [xv v] to ((Xv) * (0.7))\n    if <touching (secret v)?> then\n        set [ghost v] to [1]\n    else\n        set [ghost v] to [0]\n    end\n    change x by (Xv)\n    if <touching (secret v)?> then\n        set [ghost v] to [1]\n    else\n        set [ghost v] to [0]\n    end\n    if <touching (invisible v)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching (invisible 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 <touching color (#ff0000)?> then\n        if <touching (secret v)?> then\n            set [ghost v] to [1]\n        else\n            set [ghost v] to [0]\n            set [ghost v] to [0]\n            change [deaths v] by (1)\n            go to x: (startpointx) y: (startpointy)\n            set [xv v] to [0]\n            set [yy v] to [0]\n        end\n    end\n    if <touching color (#400000)?> then\n        set [ghost v] to [0]\n        set [ghost v] to [0]\n        change [deaths v] by (1)\n        go to x: (startpointx) y: (startpointy)\n        set [xv v] to [0]\n        set [yy v] to [0]\n    end\n    if <(y position) < [-210]> then\n        go to x: (startpointx) y: (startpointy)\n    end\n    if <[237] < (x position)> then\n        go to x: (startpointx) y: (startpointy)\n        broadcast (next v)\n        set [xv v] to [0]\n        set [yy v] to [0]\n    end\n    if <touching color (#00ffff)?> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [8]\n        else\n            set [yv v] to [-1.5]\n        end\n    end\n    if <(yescloud) = [1]> then\n        if <touching color (#ffffff)?> then\n            change y by (1)\n            if <touching color (#ffffff)?> then\n                change y by (1)\n                if <touching color (#ffffff)?> then\n                    change y by (1)\n                    if <touching color (#ffffff)?> then\n                        change y by (1)\n                        if <touching color (#ffffff)?> then\n                            change y by (1)\n                            if <touching color (#ffffff)?> then\n                                change x by ((Xv) * (-1))\n                                change x by (-1)\n                                change y by (-5)\n                                change x by (1)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change y by (Yv)\n        if <touching color (#ffffff)?> then\n            change y by ((Yv) * (-1))\n            set [yv v] to [0]\n        end\n        change y by (-1)\n        if <touching color (#ffffff)?> then\n            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                set [yv v] to [12]\n            end\n        end\n        change y by (1)\n    else\n        if <touching color (#000008)?> then\n            change y by (1)\n            if <touching color (#000008)?> then\n                change y by (1)\n                if <touching color (#000008)?> then\n                    change y by (1)\n                    if <touching color (#000008)?> then\n                        change y by (1)\n                        if <touching color (#000008)?> then\n                            change y by (1)\n                            if <touching color (#000008)?> then\n                                change x by ((Xv) * (-1))\n                                change x by (-1)\n                                change y by (-5)\n                                change x by (1)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change y by (Yv)\n        if <touching color (#000008)?> then\n            change y by ((Yv) * (-1))\n            set [yv v] to [0]\n        end\n        change y by (-1)\n        if <touching color (#000008)?> then\n            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                set [yv v] to [12]\n            end\n        end\n        change y by (1)\n    end\n    if <(yescloud) = [1]> then\n        if <(y position) < [-175]> then\n            go to x: (startpointx) y: (startpointy)\n        end\n    end\nend\n\nset [startpointx v] to [-222]\nset [startpointy v] to [110]\n\nwhen I receive [ist 4 v]\nif <(its 4) = [0]> then\n    go to x: (startpointx) y: (startpointy)\n    set [its 4 v] to [1]\nend\n\nwhen I receive [its 5 v]\nif <(its 5) = [0]> then\n    go to x: (startpointx) y: (startpointy)\n    set [its 5 v] to [1]\nend\n\nwhen I receive [its 8 v]\nif <(its 8) = [0]> then\n    go to x: (startpointx) y: (startpointy)\n    set [its 8 v] to [1]\nend\n\nwhen I receive [its 9 v]\nif <(its 9) < [2]> then\n    go to x: (startpointx) y: (startpointy)\n    change [its 9 v] by (1)\nend\n\nclear graphic effects\nset [startsratsrats v] to [0]\nhide\nwait until <(startsratsrats) = [1]>\nshow\n\nwhen I receive [animation v]\nset [animation v] to [1]\ngo to x: (0) y: (0)\nglide (0.3) secs to x: (0) y: (50)\nglide (0.3) secs to x: (0) y: (0)\nglide (0.4) secs to x: (0) y: (50)\nbroadcast (next v)\nstop [all v]\n\n@Platform HitBox\n\nwhen flag clicked\nclear graphic effects\nset [startsratsrats v] to [0]\nhide\nwait until <(startsratsrats) = [1]>\nshow\nset [its 4 v] to [0]\nset [its 5 v] to [0]\ngo to x: (0) y: (0)\nswitch costume to (1 v)\nforever\n    if <(costume [number v]) = [4]> then\n        set [startpointx v] to [-222]\n        set [startpointy v] to [110]\n        broadcast (ist 4 v)\n    else\n        if <(costume [number v]) = [5]> then\n            set [startpointx v] to [-165]\n            set [startpointy v] to [-125]\n            broadcast (its 5 v)\n        else\n            if <(costume [number v]) = [8]> then\n                set [startpointx v] to [-222]\n                set [startpointy v] to [110]\n                broadcast (its 8 v)\n            else\n                if <(costume [number v]) = [9]> then\n                    set [startpointx v] to [-165]\n                    set [startpointy v] to [-110]\n                    broadcast (its 9 v)\n                end\n            end\n        end\n    end\n    if <(costume [number v]) > [7]> then\n        set [yescloud v] to [1]\n    else\n        set [yescloud v] to [0]\n    end\nend\n\nwhen I receive [next v]\nnext costume\nif <(costume [number v]) = [4]> then\n    set [startpointx v] to [-222]\n    set [startpointy v] to [110]\n    broadcast (ist 4 v)\nelse\n    if <(costume [number v]) = [5]> then\n        set [startpointx v] to [-165]\n        set [startpointy v] to [-125]\n        broadcast (its 5 v)\n    else\n        if <(costume [number v]) = [8]> then\n            set [startpointx v] to [-222]\n            set [startpointy v] to [110]\n            broadcast (its 8 v)\n        else\n            if <(costume [number v]) = [9]> then\n                set [startpointx v] to [-165]\n                set [startpointy v] to [-110]\n                broadcast (its 9 v)\n            end\n        end\n    end\nend\nif <(costume [number v]) > [7]> then\n    set [yescloud v] to [1]\nelse\n    set [yescloud v] to [0]\nend\nif <(costume [number v]) = [10]> then\n    broadcast (its 10 v)\nelse\n    if <(costume [number v]) = [11]> then\n        broadcast (animation v)\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nshow\nset [startsratsrats v] to [0]\nclear graphic effects\nswitch costume to (costume1 v)\ngo to [front v] layer\nrepeat (2)\n    wait (2) seconds\n    repeat (10)\n        wait (0.1) seconds\n        change [ghost v] effect by (10)\n    end\n    next costume\n    repeat (10)\n        wait (0.1) seconds\n        change [ghost v] effect by (-10)\n    end\n    go to x: (0) y: (0)\n    go to [front v] layer\nend\nwait (2) seconds\nrepeat (10)\n    wait (0.1) seconds\n    change [ghost v] effect by (-10)\nend\nhide\nset [startsratsrats v] to [1]\n\n