Home Alone A Platformer

Instructions: Please Subscribe To My Youtube Channel! :D https://www.youtube.com/channel/UCMYa81KvDNX82B045c6HtEA\n\nNew Animation Out! :D https://scratch.mit.edu/projects/780789364/\n\nUse your arrow keys to go threw the levels. I was inspired by my favourite christmas movie home alone. \n\n

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [next level v]\nnext backdrop\n\n@Player\n\nwhen flag clicked\nshow\ngo to [front v] layer\nswitch costume to (costume1 v)\n\nwhen flag clicked\nset [x vel v] to [0]\nset [y vel v] to [0]\nforever\n    if <key (right arrow v) pressed?> then\n        change [x vel v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x vel v] by (-1)\n    end\n    set [x vel v] to ((X vel) * (0.9))\n    change x by (X vel)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change y by (1)\n                            if <touching (level v)?> then\n                                change y by (1)\n                                if <touching (level v)?> then\n                                    change y by (-6)\n                                end\n                                change x by ((X vel) * (-1))\n                                if <key (up arrow v) pressed?> then\n                                    if <(X vel) > [0]> then\n                                        set [x vel v] to [-5]\n                                    else\n                                        set [x vel v] to [5]\n                                    end\n                                    set [y vel v] to [13]\n                                else\n                                    set [x vel v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y vel v] by (-0.8)\n    change y by (Y vel)\n    if <touching (level v)?> then\n        change y by ((Y vel) * (-1))\n        set [y vel v] to [0]\n    end\n    change y by (-1)\n    if <<touching (level v)?> and <key (up arrow v) pressed?>> then\n        set [y vel v] to [12]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(x position) = [357]> then\n        broadcast (Next level v)\n    end\nend\n\nwhen I receive [next level v]\ngo to x: (-81) y: (-34)\n\nwhen flag clicked\nforever\n    if <touching (paint v)?> then\n        go to x: (-93) y: (-32)\n        play sound [Crunch v] until done\n    end\nend\n\nwhen flag clicked\nplay sound [Dance of the Sugar Plum Fairy v] until done\n\nwhen flag clicked\ngo to x: (-81) y: (-34)\n\nwhen I receive [next level v]\nchange [level v] by (1)\n\nwhen flag clicked\nset [level v] to [1]\n\nwhen flag clicked\nforever\n    if <touching (ice v)?> then\n        go to x: (-93) y: (-32)\n        play sound [Crunch v] until done\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (falling presents v)?> then\n        go to x: (-93) y: (-32)\n        play sound [Crunch v] until done\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ice2 v)?> then\n        go to x: (-93) y: (-32)\n        play sound [Crunch v] until done\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (right arrow v) pressed?> and <touching (ice water v)?>> then\n        change [x vel v] by (2)\n    end\nend\n\n@Level\n\nwhen flag clicked\nshow\ngo to [front v] layer\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\n@Paint\n\nwhen flag clicked\nhide\ngo to [back v] layer\n\nwhen flag clicked\nforever\n    if <(Level) = [3]> then\n        wait (1) seconds\n        show\n        go to [front v] layer\n        switch costume to (costume1 v)\n        repeat (13)\n            next costume\n        end\n        wait (0.1) seconds\n        repeat (13)\n            switch costume to ((costume [number v]) - (1))\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [4]> then\n        hide\n        go to [back v] layer\n    end\nend\n\n@Ice\n\nwhen flag clicked\nhide\ngo to [back v] layer\n\nwhen flag clicked\nforever\n    if <(Level) = [4]> then\n        show\n        go to [front v] layer\n        switch costume to (costume1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(Level) = [4]>> then\n        hide\n        go to [back v] layer\n    end\nend\n\n@Falling Presents\n\nwhen flag clicked\nhide\ngo to [back v] layer\n\nwhen flag clicked\nforever\n    if <(Level) = [5]> then\n        create clone of (_myself_ v)\n        wait (0.3) seconds\n    end\nend\n\nwhen I start as a clone\nforever\n    show\n    go to [front v] layer\n    switch costume to (pick random (1) to (3))\n    set y to (181)\n    set x to (pick random (-218) to (218))\n    repeat (24)\n        change y by (-10)\n    end\n    delete this clone\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        hide\n        go to [back v] layer\n        delete this clone\n    end\nend\n\n@Ice Water\n\nwhen flag clicked\nhide\ngo to [back v] layer\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        show\n        go to [front v] layer\n        switch costume to (costume1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(Level) = [6]>> then\n        hide\n        go to [back v] layer\n    end\nend\n\n@Ice2\n\nwhen flag clicked\nhide\ngo to [back v] layer\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        show\n        go to [front v] layer\n        switch costume to (costume1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(Level) = [6]>> then\n        hide\n        go to [back v] layer\n    end\nend\n\n@You Win\n\nwhen flag clicked\nforever\n    hide\n    go to [back v] layer\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [8]> then\n        show\n        go to [front v] layer\n        switch costume to (costume1 v)\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\nhide\ngo to [back v] layer\n\n