.: Levels - A Platformer :.
@Stage\n\nwhen flag clicked\nforever\n    play sound [Video Game 1 v] until done\n    set volume to (70) %\nend\n\n@Level\n\nwhen flag clicked\nset [level v] to [1]\nshow\ngo to [front v] layer\nset [yv v] to [0]\ngo to x: (-200) y: (-136)\nset [xv v] to [0]\nforever\n    if <<touching color (#ccd8ff)?> and <touching (level's land v)?>> then\n        start sound [Pew v]\n        if <(level) = [1]> then\n            set [yv v] to [0]\n            go to x: (-200) y: (-136)\n            set [xv v] to [0]\n        end\n        if <(level) = [2]> then\n            set [yv v] to [0]\n            go to x: (-200) y: (-21)\n            set [xv v] to [0]\n        end\n        if <(level) = [3]> then\n            set [yv v] to [0]\n            go to x: (-200) y: (65)\n            set [xv v] to [0]\n        end\n        if <(level) = [4]> then\n            set [yv v] to [0]\n            go to x: (-200) y: (-136)\n            set [xv v] to [0]\n        end\n        if <(level) = [5]> then\n            set [yv v] to [0]\n            go to x: (-200) y: (-21)\n            set [xv v] to [0]\n        end\n        if <(level) = [6]> then\n            set [yv v] to [0]\n            go to x: (-200) y: (65)\n            set [xv v] to [0]\n        end\n        if <(level) = [7]> then\n            set [yv v] to [0]\n            go to x: (-200) y: (-136)\n            set [xv v] to [0]\n        end\n        if <(level) = [8]> then\n            set [yv v] to [0]\n            go to x: (-200) y: (-21)\n            set [xv v] to [0]\n        end\n        if <(level) = [9]> then\n            set [yv v] to [0]\n            go to x: (-200) y: (65)\n            set [xv v] to [0]\n        end\n        if <(level) = [10]> then\n            set [yv v] to [0]\n            go to x: (-200) y: (-136)\n            set [xv v] to [0]\n        end\n    end\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (0.7)\n    end\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 (#ffffff)?> and <touching (level's land v)?>> then\n        change y by (1.6)\n        if <<touching color (#ffffff)?> and <touching (level's land v)?>> then\n            change y by (1.6)\n            if <<touching color (#ffffff)?> and <touching (level's land v)?>> then\n                change y by (1.6)\n                if <<touching color (#ffffff)?> and <touching (level's land v)?>> then\n                    change y by (1.6)\n                    if <<touching color (#ffffff)?> and <touching (level's land v)?>> then\n                        change y by (1.6)\n                        if <<touching color (#ffffff)?> and <touching (level's land v)?>> then\n                            change x by ((Xv) * (-1))\n                            change y by (8)\n                            if <key (up arrow 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 [14]\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 color (#ffffff)?> and <touching (level's land v)?>> 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)?> and <touching (level's land v)?>> then\n        if <key (up arrow v) pressed?> then\n            start sound [Coin v]\n            set [yv v] to [16]\n        end\n    end\n    if <touching (level up v)?> then\n        start sound [Collect v]\n        broadcast (nextlevel v)\n        change [level v] by (1)\n        set [yv v] to [0]\n        set [xv v] to [0]\n        if <(level) = [2]> then\n            go to x: (-200) y: (-21)\n        end\n        if <(level) = [3]> then\n            go to x: (-200) y: (65)\n        end\n        if <(level) = [4]> then\n            go to x: (-200) y: (-136)\n        end\n        if <(level) = [5]> then\n            go to x: (-200) y: (-21)\n        end\n        if <(level) = [6]> then\n            go to x: (-200) y: (65)\n        end\n        if <(level) = [7]> then\n            go to x: (-200) y: (-136)\n        end\n        if <(level) = [8]> then\n            go to x: (-200) y: (-21)\n        end\n        if <(level) = [9]> then\n            go to x: (-200) y: (65)\n        end\n        if <(level) = [10]> then\n            go to x: (-200) y: (-136)\n        end\n    end\n    change y by (1)\nend\n\n@Level's Land\n\nwhen flag clicked\nswitch costume to (level 1 v)\n\nwhen I receive [nextlevel v]\nnext costume\n\n@Level Shadow\n\nwhen flag clicked\ngo to x: (-247) y: (-88)\nclear graphic effects\nset [ghost v] effect to (40)\nforever\n    point towards (level v)\n    move ((distance to [level v]) / (6)) steps\nend\n\n@Level Up\n\nwhen flag clicked\nshow\ngo to x: (215) y: (-122)\nforever\n    if <(level) = [1]> then\n        go to x: (213) y: (-122)\n    end\n    if <(level) = [2]> then\n        go to x: (213) y: (6)\n    end\n    if <(level) = [3]> then\n        go to x: (213) y: (91)\n    end\n    if <(level) = [4]> then\n        go to x: (213) y: (-122)\n    end\n    if <(level) = [5]> then\n        go to x: (213) y: (6)\n    end\n    if <(level) = [6]> then\n        go to x: (213) y: (91)\n    end\n    if <(level) = [7]> then\n        go to x: (213) y: (-122)\n    end\n    if <(level) = [8]> then\n        go to x: (213) y: (6)\n    end\n    if <(level) = [9]> then\n        go to x: (213) y: (91)\n    end\n    if <(level) = [10]> then\n        go to x: (213) y: (-122)\n    end\n    if <(level) = [11]> then\n        hide\n        go to x: (0) y: (0)\n    end\nend\n\n@Game Over!\n\nwhen flag clicked\ngo to x: (0) y: (116)\nhide\nforever\n    if <(level) = [11]> then\n        show\n        if <touching (mouse-pointer v)?> then\n            set [size v] to (((0.8) * (size)) + (((90) - (size)) * (0.2)))\n            change size by (size)\n        else\n            set [size v] to (((0.8) * (size)) + (((75) - (size)) * (0.2)))\n            change size by (size)\n        end\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\nforever\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    go to x: (0) y: (0)\nend\n\n