Snow White Platformer
@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop2 v)\n\nwhen flag clicked\nforever\n    play sound [My Neighbor Totoro v] until done\nend\n\n@Sprite2\n\nwhen flag clicked\ngo to [front v] layer\nset [☁ number of stars collected v] to [0]\nhide variable [for the stars v]\nshow variable [☁ number of stars collected v]\nhide variable [obstacle number v]\nshow\nswitch costume to (apple1 v)\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nforever\n    set [obstacle number v] to (costume [number v])\nend\n\n@Sprite4\n\nwhen flag clicked\ngo to x: (-220) y: (-60)\nclear graphic effects\nset [x v] to [0]\nset [y v] to [0]\n\nwhen flag clicked\nswitch costume to (costume1 v)\nshow\ngo to x: (-220) y: (-60)\nforever\n    if <touching color (#ba1e12)?> then\n        go to x: (-220) y: (-60)\n    end\n    if <key (right arrow v) pressed?> then\n        move (5) steps\n    end\n    if <key (left arrow v) pressed?> then\n        move (-5) steps\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#f3f0a8)?> then\n        broadcast (next level v)\n        go to x: (-220) y: (-60)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#795e14)?> then\n        if <key (up arrow v) pressed?> then\n            repeat (20)\n                change y by (5)\n            end\n            repeat (20)\n                change y by (-5)\n            end\n        end\n    else\n        change [y v] by (-1)\n    end\nend\n\nwhen flag clicked\nforever\n    set [x v] to (x position)\n    set [y v] to (y position)\nend\n\nwhen I receive [next level v]\nstop [other scripts in sprite v]\nbroadcast (stop, but repeat v)\ngo to x: (-220) y: (-60)\n\nwhen I receive [stop, but repeat v]\nforever\n    if <touching color (#795e14)?> then\n        if <key (up arrow v) pressed?> then\n            repeat (20)\n                change y by (5)\n            end\n            repeat (20)\n                change y by (-5)\n            end\n        end\n    end\nend\n\nwhen I receive [stop, but repeat v]\nforever\n    set [x v] to (x position)\n    set [y v] to (y position)\nend\n\nwhen I receive [stop, but repeat v]\nforever\n    if <touching color (#ba1e12)?> then\n        go to x: (-220) y: (-60)\n        broadcast (stop, but repeat v)\n    end\n    if <key (right arrow v) pressed?> then\n        move (5) steps\n    end\n    if <key (left arrow v) pressed?> then\n        move (-5) steps\n    end\nend\n\nwhen I receive [stop, but repeat v]\nforever\n    if <touching color (#f3f0a8)?> then\n        broadcast (next level v)\n        go to x: (-220) y: (-60)\n    end\nend\n\nwhen [down arrow v] key pressed\nnext costume\nwait (0.7) seconds\nnext costume\n\nwhen flag clicked\nforever\n    if <[] = [0]> then\n        broadcast (ohoh sorry v)\n        stop [other scripts in sprite v]\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nset [☁ number of stars collected v] to [0]\nshow\ngo to [back v] layer\n\n@Sprite3\n\nwhen flag clicked\nshow\nswitch costume to (star v)\nshow variable [☁ number of stars collected v]\ngo to x: (-24) y: (-136)\n\nwhen flag clicked\nshow\nforever\n    if <touching color (#eda31a)?> then\n        hide\n        broadcast (star collected v)\n        change [☁ number of stars collected v] by (1)\n        stop [this script v]\n    end\nend\n\nwhen I receive [star collected v]\ngo to x: (0) y: (-50)\nforever\n    if <(Obstacle number) = [2]> then\n        go to x: (-10) y: (-50)\n        show\n        forever\n            if <touching color (#eda31a)?> then\n                change [☁ number of stars collected v] by (1)\n                hide\n                broadcast (star collected 2 v)\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [star collected 2 v]\nforever\n    if <(Obstacle number) = [3]> then\n        go to x: (20) y: (-140)\n        show\n        forever\n            if <touching color (#eda31a)?> then\n                change [☁ number of stars collected v] by (1)\n                hide\n                broadcast (star collected 3 v)\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [star collected 3 v]\nforever\n    if <(Obstacle number) = [4]> then\n        go to x: (-20) y: (-46)\n        show\n        forever\n            if <touching color (#eda31a)?> then\n                change [☁ number of stars collected v] by (1)\n                hide\n                broadcast (star collected 4 v)\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [star collected 4 v]\nforever\n    if <(Obstacle number) = [5]> then\n        go to x: (-66) y: (-40)\n        show\n        forever\n            if <touching color (#eda31a)?> then\n                change [☁ number of stars collected v] by (1)\n                hide\n                broadcast (star collected 5 v)\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [star collected 5 v]\nforever\n    if <(Obstacle number) = [6]> then\n        go to x: (84) y: (-45)\n        show\n        forever\n            if <touching color (#eda31a)?> then\n                change [☁ number of stars collected v] by (1)\n                hide\n                broadcast (star collected 6 v)\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [star collected 6 v]\nforever\n    if <(Obstacle number) = [7]> then\n        go to x: (81) y: (-63)\n        show\n        forever\n            if <touching color (#eda31a)?> then\n                change [☁ number of stars collected v] by (1)\n                hide\n                broadcast (star collected 7 v)\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [star collected 7 v]\nforever\n    if <(Obstacle number) = [8]> then\n        go to x: (-43) y: (-80)\n        show\n        forever\n            if <touching color (#eda31a)?> then\n                change [☁ number of stars collected v] by (1)\n                hide\n                broadcast (star collected 8 v)\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [star collected 8 v]\nforever\n    if <(Obstacle number) = [9]> then\n        go to x: (76) y: (-60)\n        show\n        forever\n            if <touching color (#eda31a)?> then\n                change [☁ number of stars collected v] by (1)\n                hide\n                broadcast (star collected 9 v)\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [star collected 9 v]\nforever\n    if <(Obstacle number) = [10]> then\n        go to x: (48) y: (-146)\n        show\n        forever\n            if <touching color (#eda31a)?> then\n                change [☁ number of stars collected v] by (1)\n                hide\n                broadcast (star collected 10 v)\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [star collected 10 v]\nforever\n    if <(Obstacle number) = [11]> then\n        go to x: (13) y: (-70)\n        show\n        forever\n            if <touching color (#eda31a)?> then\n                change [☁ number of stars collected v] by (1)\n                hide\n                broadcast (star collected 11 v)\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [star collected 11 v]\nforever\n    if <(Obstacle number) = [12]> then\n        go to x: (73) y: (-35)\n        show\n        forever\n            if <touching color (#eda31a)?> then\n                change [☁ number of stars collected v] by (1)\n                hide\n                broadcast (star collected 12 v)\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [star collected 12 v]\nforever\n    if <(Obstacle number) = [13]> then\n        go to x: (-100) y: (-144)\n        show\n        forever\n            if <touching color (#eda31a)?> then\n                change [☁ number of stars collected v] by (1)\n                hide\n                broadcast (star collected 13 v)\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [star collected 13 v]\nforever\n    if <(Obstacle number) = [14]> then\n        broadcast (finish but repeat v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [finish but repeat v]\nif <(Obstacle number) = [1]> then\n    go to x: (-24) y: (-136)\n    show\n    forever\n        if <touching color (#eda31a)?> then\n            change [☁ number of stars collected v] by (1)\n            hide\n            broadcast (star collected v)\n            stop [this script v]\n        end\n    end\nend\n\n