Platformer

Instructions: Arrow keys

@Stage\n\nwhen flag clicked\nforever\n    play sound [Nebula v] until done\nend\n\n@　\n\nwhen flag clicked\nset [stage v] to [1]\nforever\n    switch costume to (Stage)\nend\n\n@ \n\nwhen flag clicked\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n@ 2\n\nwhen flag clicked\nset [stage v] to [1]\nforever\n    switch costume to (Stage)\nend\n\n@ 3\n\nwhen flag clicked\nswitch costume to (1 v)\ngo to x: (-210) y: (-90)\nshow\nset size to (100) %\ngo to [front v] layer\nshow\nset [x v] to [0]\nset [y v] to [0]\npoint in direction (90)\ngo to x: (-201) y: (152)\ngo to x: (-213) y: (-34)\nforever\n    set rotation style [left-right v]\n    if <<key (left arrow v) pressed?> or <<(mouse x) < (x position)> and <mouse down?>>> then\n        switch costume to (3 v)\n        change [x2 v] by (-0.9)\n    end\n    if <<key (right arrow v) pressed?> or <<(x position) < (mouse x)> and <mouse down?>>> then\n        switch costume to (2 v)\n        change [x2 v] by (0.9)\n    end\n    if <not <<key (left arrow v) pressed?> or <key (right arrow v) pressed?>>> then\n        switch costume to (1 v)\n    end\n    set [x2 v] to ((X2) * (0.9))\n    change x by (X2)\n    if <touching ( 2 v)?> then\n        change y by (1)\n        if <touching ( 2 v)?> then\n            change y by (1)\n            if <touching ( 2 v)?> then\n                change y by (1)\n                if <touching ( 2 v)?> then\n                    change y by (1)\n                    if <touching ( 2 v)?> then\n                        change y by (1.0)\n                        if <touching ( 2 v)?> then\n                            change x by ((X2) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <<[0] < (mouse y)> and <mouse down?>>> then\n                                if <(X2) > [0]> then\n                                    set [x2 v] to [-7]\n                                else\n                                    set [x2 v] to [7]\n                                end\n                                set [y2 v] to [10]\n                            else\n                                set [x2 v] to [0.0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (-1)\n    if <<touching ( 2 v)?> or <<touching ( 2 v)?> or <touching (動く地面 v)?>>> then\n        if <<key (up arrow v) pressed?> or <<(y position) < (mouse y)> and <mouse down?>>> then\n            start sound [JUMP v]\n            set [y2 v] to [15]\n        end\n    end\n    change y by (1)\n    change [y2 v] by (-1)\n    change y by (Y2)\n    if <<touching ( 2 v)?> or <touching ( 2 v)?>> then\n        change y by ((Y2) * (-1))\n        set [y2 v] to [0]\n    end\n    if <(x position) > [230]> then\n        change [stage v] by (1)\n        broadcast (次 v)\n        hide\n        set [x2 v] to [0]\n        go to x: (-201) y: (-100)\n        show\n    end\n    if <<<touching (　 v)?> or <touching ( 8 v)?>> or <(y position) < [-174]>> then\n        set [x2 v] to [0]\n        set [y2 v] to [0]\n        start sound [Oops v]\n        repeat (20)\n            change [ghost v] effect by (20)\n        end\n        go to x: (-201) y: (-100)\n        repeat (10)\n            change [ghost v] effect by (-8)\n        end\n    end\n    if <<touching ( 4 v)?> or <<touching ( 5 v)?> or <<touching ( 6 v)?> or <touching ( 7 v)?>>>> then\n        set [y2 v] to [20]\n    end\nend\n\n@ 4\n\nwhen flag clicked\nhide\nforever\n    if <(Stage) = [6]> then\n        show\n    end\n    if <(Stage) = [7]> then\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (コスチューム1 v)\nforever\n    if <touching ( 3 v)?> then\n        repeat (3)\n            next costume\n        end\n        repeat (3)\n            switch costume to ((costume [number v]) - (1))\n        end\n    end\nend\n\nwait (0.005) seconds\n\nwait (0.005) seconds\n\n@ 5\n\nwhen flag clicked\nhide\nforever\n    if <(Stage) = [7]> then\n        show\n    end\n    if <(Stage) = [8]> then\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (コスチューム1 v)\nforever\n    if <touching ( 3 v)?> then\n        repeat (3)\n            next costume\n        end\n        repeat (3)\n            switch costume to ((costume [number v]) - (1))\n        end\n    end\nend\n\nwait (0.005) seconds\n\nwait (0.005) seconds\n\n@ 6\n\nwhen flag clicked\nhide\nforever\n    if <(Stage) = [7]> then\n        show\n    end\n    if <(Stage) = [8]> then\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (コスチューム1 v)\nforever\n    if <touching ( 3 v)?> then\n        repeat (3)\n            next costume\n        end\n        repeat (3)\n            switch costume to ((costume [number v]) - (1))\n        end\n    end\nend\n\nwait (0.005) seconds\n\nwait (0.005) seconds\n\n@ 7\n\nwhen flag clicked\nhide\nforever\n    if <(Stage) = [7]> then\n        show\n    end\n    if <(Stage) = [8]> then\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (コスチューム1 v)\nforever\n    if <touching ( 3 v)?> then\n        repeat (3)\n            next costume\n        end\n        repeat (3)\n            switch costume to ((costume [number v]) - (1))\n        end\n    end\nend\n\nwait (0.005) seconds\n\nwait (0.005) seconds\n\n@ 8\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    turn right (5) degrees\nend\n\nwhen flag clicked\nhide\nforever\n    if <(Stage) = [8]> then\n        show\n    end\n    if <(Stage) = [9]> then\n        hide\n    end\nend\n\n@ 9\n\nwhen flag clicked\nhide\nforever\n    if <(Stage) = [11]> then\n        show\n    end\n    if <(Stage) = [12]> then\n        show\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (  v)?> then\n        change [ghost v] effect by (25)\n        wait (0.01) seconds\n    else\n        change [ghost v] effect by (-25)\n        wait (0.01) seconds\n    end\nend\n\n@ 10\n\nwhen flag clicked\nhide\nforever\n    if <(Stage) = [11]> then\n        show\n    end\n    if <(Stage) = [12]> then\n        show\n        hide\n    end\nend\n\n