platformer

Instructions: モバイル又は矢印キー操作デース！

@Stage\n\nwhen flag clicked\nswitch backdrop to (背景2 v)\n\n@NEXT\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nset [変数 v] to [9999]\n\nwhen I receive [next v]\ngo to [front v] layer\nshow\nset [変数 v] to [0]\ngo to x: (0) y: (180)\nstart sound [Finger Snap v]\nrepeat (10)\n    change y by ((-1) - ((y position) / (3)))\nend\nwait (0.5) seconds\nrepeat until <(y position) > [179]>\n    change y by ((y position) / (3))\nend\nhide\nset [変数 v] to [9999]\n\n@ステージ\n\nwhen flag clicked\nshow\ngo to x: (0) y: (-20)\nswitch costume to (1 v)\n\nwhen I receive [next v]\nnext costume\n\nwhen [timer v] > (0)\nhide\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [5]> then\n        broadcast (表示4 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [3]> then\n        broadcast (表示2 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [1]> then\n        broadcast (消す v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [4]> then\n        broadcast (表示3 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [6]> then\n        broadcast (表示5 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [ゴール]> then\n        broadcast (終わり v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [7]> then\n        forever\n            broadcast (表示6 v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [2]> then\n        broadcast (消す v)\n    end\nend\n\nwhen flag clicked\nhide variable [時間 v]\nrepeat until <(costume [name v]) = [ゴール]>\n    wait (1) seconds\n    change [時間 v] by (1)\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [ゴール]> then\n        wait (1) seconds\n        change [時間 v] by (-1)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [8]> then\n        broadcast (消す v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [9]> then\n        go to x: (0) y: (-32)\n        broadcast (消す v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [10]> then\n        broadcast (消す v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [11]> then\n        forever\n            broadcast (表示7 v)\n        end\n    end\nend\n\n@player\n\nwhen flag clicked\nshow\nswitch costume to (sprite1 v)\ngo to x: (-200) y: (10)\npoint in direction (90)\nset size to (80) %\nforever\n    reset timer\n    if <(変数) = [9999]> then\n        show\n        change [y v] by (-1)\n        if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<(mouse x) > [0]> and <mouse down?>>>> then\n            change [x v] by (0.77)\n            create clone of (_myself_ v)\n        end\n        if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<(mouse x) < [0]> and <mouse down?>>>> then\n            change [x v] by (-0.77)\n            create clone of (_myself_ v)\n        end\n        set [x v] to ((x) * (.88))\n        change x by (x)\n        if <touching (ステージ v)?> then\n            change y by (1)\n            if <touching (ステージ v)?> then\n                change y by (1)\n                if <touching (ステージ v)?> then\n                    change y by (1)\n                    if <touching (ステージ v)?> then\n                        change y by (1)\n                        if <touching (ステージ v)?> then\n                            change y by (1)\n                            if <touching (ステージ v)?> then\n                                change y by (1)\n                                if <touching (ステージ v)?> then\n                                    change y by (-6)\n                                    change x by ((x) * (-1))\n                                    if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>>> then\n                                        if <(x) > [0]> then\n                                            set [x v] to [-10]\n                                        else\n                                            set [x v] to [10]\n                                        end\n                                        set [y v] to [12]\n                                    else\n                                        set [x v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change y by (y)\n        if <touching (ステージ v)?> then\n            change y by ((0) - (y))\n            set [y v] to [0]\n        end\n        change y by (-1)\n        if <<<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>>> and <touching (ステージ v)?>> then\n            start sound [10 v]\n            set [y v] to [12]\n        end\n        change y by (1)\n        if <(x position) > [230]> then\n            broadcast (NEXT v)\n            go to x: (-200) y: (-20)\n        end\n        if <<[-178] > (y position)> or <<touching (障害物 v)?> or <touching color (#d84c52)?>>> then\n            to by contenew\n        end\n        if <touching (あお v)?> then\n            set [y v] to [20]\n        end\n    end\nend\n\nwhen I start as a clone\nswitch costume to (sprite2 v)\nrepeat (10)\n    change [ghost v] effect by (10)\n    change size by (-7)\nend\ndelete this clone\n\ndefine to by contenew\ngo to [front v] layer\nswitch costume to (sprite3 v)\nset [変数 v] to [0]\npoint in direction (90)\nset rotation style [all around v]\nset [出久 v] to (pick random (15) to (18))\nstart sound [crashed oof 2 v]\nrepeat until <[-180] > (y position)>\n    show\n    go to [front v] layer\n    turn right (出久) degrees\n    change y by (出久)\n    change [出久 v] by (-1)\nend\nhide\nswitch costume to (sprite1 v)\nwait (0.5) seconds\nset [x v] to [0]\nset [y v] to [0]\ngo to x: (-200) y: (-20)\npoint in direction (90)\nset [変数 v] to [9999]\n\nwhen [timer v] > (0)\nhide\n\nwhen I receive [終わり v]\nhide\n\nwhen flag clicked\nforever\n    reset timer\nend\n\nmove (10) steps\n\nwhen I receive [最後の v]\nhide\nstop [other scripts in sprite v]\n\nforever\n\n@障害物\n\nwhen flag clicked\nhide\n\nwhen I receive [消す v]\nhide\n\nwhen I receive [表示2 v]\nswitch costume to (針3 v)\ngo to x: (-90) y: (-78)\nshow\n\nwhen I receive [表示3 v]\nswitch costume to (針4 v)\nshow\n\nwhen I receive [表示4 v]\nswitch costume to (針5 v)\nshow\n\nwhen I receive [表示5 v]\nswitch costume to (針5 v)\nshow\n\nwhen I receive [終わり v]\nhide\n\nwhen I receive [表示6 v]\nswitch costume to (針6 v)\ngo to x: (1) y: (-10)\n\nwhen flag clicked\nif <<(x position) = [1]> and <(y position) = [-10]>> then\n    forever\n        show\n        wait (1) seconds\n        hide\n        wait (1) seconds\n    end\nend\n\nwhen I receive [表示7 v]\nswitch costume to (針7 v)\nshow\n\n@スプライト1\n\nwhen flag clicked\nforever\n    play sound [日曜の午後 v] until done\nend\n\nwhen flag clicked\nhide variable [時間 v]\nforever\n    wait (1) seconds\n    change [時間 v] by (1)\nend\n\nwhen I receive [終わり v]\nshow variable [時間 v]\n\nwhen flag clicked\nset [時間 v] to [0]\n\n