platformer
@Stage\n\nwhen flag clicked\nswitch backdrop to (背景1 v)\n\nwhen flag clicked\nplay sound [ᴍᴜsɪᴄs v] until done\n\n@主人公\n\ndefine 初期設定\ngo to [front v] layer\ngo to x: (-170) y: (0)\nshow\nset [x v] to [0]\nset [y v] to [118]\nset [ジャンプ v] to [0]\n\nwhen flag clicked\n初期設定\nbroadcast (START v)\n\nwhen I receive [start v]\npoint in direction (90)\nforever\n    next costume\n    wait (0.1) seconds\nend\n\nwhen I receive [start v]\nforever\n    if <key (right arrow v) pressed?> then\n        change [x v] by (10)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x v] by (-10)\n    end\nend\n\nwhen I receive [start v]\nforever\n    change y by (ジャンプ)\n    change [ジャンプ v] by (-1)\n    if <touching color (#73ec2d)?> then\n        set [ジャンプ v] to [0]\n        if <key (up arrow v) pressed?> then\n            set [ジャンプ v] to [10]\n        end\n        if <<touching (ジャンプ台1 v)?> or <touching (ジャンプ台2 v)?>> then\n            set [ジャンプ v] to [15]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (固定型モンスター v)?> or <touching (_edge_ v)?>> then\n        初期設定\n    end\nend\n\nwhen flag clicked\nset [point v] to [0]\n\nwhen I receive [start v]\nreset timer\n\nwhen I receive [goal v]\nhide\nstop [other scripts in sprite v]\n\n@ステージ1\n\nwhen I receive [start v]\nshow\nforever\n    set x to (-118)\n    set x to ((0) - (x))\nend\n\nwhen I receive [start v]\nforever\n    if <[360] < (x)> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [goal v]\nhide\n\nwhen I receive [goal v]\nhide\nstop [other scripts in sprite v]\n\n@ステージ2\n\nwhen I receive [start v]\nshow\nforever\n    set y to (-118)\n    set x to ((480) - (x))\nend\n\nwhen I receive [start v]\nforever\n    if <(((480) * (2)) - (120)) < (x)> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [goal v]\nhide\n\nwhen I receive [goal v]\nhide\nstop [other scripts in sprite v]\n\n@ステージ3\n\nwhen I receive [start v]\nshow\nforever\n    set y to (-118)\n    set x to (((480) * (2)) - (x))\nend\n\nwhen I receive [start v]\nforever\n    if <(((480) * (3)) - (120)) < (x)> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [goal v]\nhide\n\nwhen I receive [goal v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [goal v]\nhide\nstop [other scripts in sprite v]\n\n@ステージ4\n\nwhen I receive [start v]\nshow\nforever\n    set y to (-118)\n    set x to (((480) * (3)) - (x))\nend\n\nwhen I receive [start v]\nforever\n    if <(((480) * (4)) - (120)) < (x)> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [goal v]\nhide\n\nwhen I receive [goal v]\nhide\nstop [other scripts in sprite v]\n\n@ステージ5\n\nwhen I receive [start v]\nshow\nforever\n    set y to (-118)\n    set x to (((480) * (4)) - (x))\nend\n\nwhen I receive [start v]\nforever\n    if <(((480) * (5)) - (120)) < (x)> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [goal v]\nhide\n\nwhen I receive [goal v]\nhide\nstop [other scripts in sprite v]\n\n@ステージ6\n\nwhen I receive [start v]\nshow\nforever\n    set y to (-118)\n    set x to (((480) * (5)) - (x))\nend\n\nwhen I receive [start v]\nforever\n    if <(((480) * (6)) - (120)) < (x)> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [goal v]\nhide\n\nwhen I receive [goal v]\nhide\nstop [other scripts in sprite v]\n\n@ジャンプ台1\n\nwhen I receive [start v]\nshow\nforever\n    set y to (-20)\n    set x to ((480) - (x))\nend\n\nwhen I receive [start v]\nforever\n    if <(((480) * (2)) - (120)) < (x)> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [goal v]\nhide\n\nwhen I receive [goal v]\nhide\nstop [other scripts in sprite v]\n\n@ジャンプ台2\n\nwhen I receive [start v]\nforever\n    if <(((480) * (5)) - (120)) < (x)> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [start v]\nshow\nforever\n    set y to (-70)\n    set x to (((480) * (4)) - (x))\nend\n\nwhen I receive [goal v]\nhide\n\nwhen I receive [goal v]\nhide\nstop [other scripts in sprite v]\n\n@スプライト5\n\nwhen I receive [start v]\nset [ghost v] effect to (0)\nhide\ngo to x: (163) y: (164)\nforever\n    if <(x) = [1480]> then\n        show\n        glide (0.5) secs to x: (163) y: (110)\n        wait (3) seconds\n        repeat (10)\n            change [ghost v] effect by (10)\n            wait (0.1) seconds\n        end\n        hide\n    end\nend\n\nwhen I receive [goal v]\nhide\n\nwhen I receive [goal v]\nhide\nstop [other scripts in sprite v]\n\n@固定型モンスター\n\nwhen flag clicked\nset size to (70) %\nforever\n    set rotation style [left-right v]\n    point in direction (90)\n    repeat until <(distance to [mouse-pointer v]) < [50]>\n        repeat (5)\n            change size by (1)\n        end\n        repeat (5)\n            change size by (-1)\n        end\n    end\nend\n\nwhen I receive [start v]\nshow\nforever\n    set y to (0)\n    set x to (((480) * (2)) - (x))\nend\n\nwhen I receive [start v]\nforever\n    if <(((480) * (3)) - (120)) < (x)> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [goal v]\nhide\n\nwhen I receive [goal v]\nhide\nstop [other scripts in sprite v]\n\n@コイン\n\nwhen I receive [start v]\nshow\nforever\n    set y to (-30)\n    set x to ((0) - (x))\nend\n\nwhen I receive [start v]\nforever\n    if <[360] < (x)> then\n        hide\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <touching (主人公 v)?> then\n        play sound [Coin v] until done\n        hide\n        set [point v] to ((point) + (10))\n    end\nend\n\nwhen I receive [goal v]\nhide\n\nwhen I receive [goal v]\nhide\nstop [other scripts in sprite v]\n\n@コイン2\n\nwhen I receive [start v]\nshow\nforever\n    set y to (-30)\n    set x to ((0) - (x))\nend\n\nwhen I receive [start v]\nforever\n    if <touching (主人公 v)?> then\n        play sound [Coin v] until done\n        hide\n        set [point v] to ((point) + (10))\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <[360] < (x)> then\n        hide\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen I receive [goal v]\nhide\n\nwhen I receive [goal v]\nhide\nstop [other scripts in sprite v]\n\n@コイン3\n\nwhen I receive [start v]\nshow\nforever\n    set y to (-30)\n    set x to ((0) - (x))\nend\n\nwhen I receive [start v]\nforever\n    if <[360] < (x)> then\n        hide\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <touching (主人公 v)?> then\n        play sound [Coin v] until done\n        hide\n        set [point v] to ((point) + (10))\n    end\nend\n\nwhen I receive [goal v]\nhide\n\n@コイン4\n\nwhen I receive [start v]\nforever\n    if <touching (主人公 v)?> then\n        play sound [Coin v] until done\n        hide\n        set [point v] to ((point) + (70))\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(((480) * (5)) - (120)) < (x)> then\n        hide\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen I receive [start v]\nshow\nforever\n    set y to (100)\n    set x to (((480) * (4)) - (x))\nend\n\nwhen I receive [goal v]\nhide\n\nwhen I receive [goal v]\nhide\nstop [other scripts in sprite v]\n\n@スプライト1\n\nwhen I receive [start v]\nswitch costume to (checkpoint0 v)\nset size to (70) %\nshow\nforever\n    set y to (-7)\n    set x to (((480) * (5)) - (x))\nend\n\nwhen I receive [start v]\nforever\n    if <(((480) * (6)) - (120)) < (x)> then\n        hide\n    else\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (主人公 v)?> then\n        switch costume to (checkpoint1 v)\n        broadcast (goal v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [goal v]\nset [time v] to (timer)\n\nwhen I receive [goal v]\nhide\nstop [other scripts in sprite v]\n\n@スプライト2\n\nwhen I receive [goal v]\ngo to [front v] layer\nshow\nrepeat (20)\n    change [brightness v] effect by (5)\nend\nwait (1) seconds\nhide\n\nwhen flag clicked\nhide\n\n@ステージ7\n\nwhen I receive [start v]\nset y to (-118)\nset x to (0)\nhide\n\nwhen I receive [goal v]\nshow\n\n@スプライト3\n\nwhen I receive [goal v]\nshow\n\nwhen I receive [start v]\nset y to (130)\nset x to (0)\nhide\n\n@結果\n\nwhen flag clicked\ngo to x: (-300) y: (-14)\nhide\n\nwhen I receive [goal v]\nwait (4) seconds\nshow\nglide (3) secs to x: (-30) y: (-14)\n\n@ランク\n\nwhen I receive [goal v]\nwait (3) seconds\nif <<(point) = [100]> and <(time) < [15]>> then\n    set [rank v] to [s]\nelse\n    if <<(point) = [100]> and <(time) < [30]>> then\n        set [rank v] to [a]\n    else\n        if <<[69] < (point)> and <(time) < [45]>> then\n            set [rank v] to [b]\n        else\n            if <<[29] < (point)> and <(time) < [60]>> then\n                set [rank v] to [c]\n            else\n                if <<(point) < [29]> and <(time) < [120]>> then\n                    set [rank v] to [d]\n                else\n                    set [rank v] to [e]\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [goal v]\nwait (7.5) seconds\nswitch costume to (rank)\nshow\nrepeat (25)\n    turn right (14.4) degrees\n    change size by (2)\nend\n\nwhen flag clicked\nset size to (0) %\nhide\n\n
障害物をよけて、コインをとりながらゴール(旗)を目指して下さい。最後にタイムとポイントによってランク(S~E)が出ます。\n