【kokyumaguroとコラボ‼︎】山と海のplatformer!!

Instructions: \n矢印キーで操作！モバイルも対応！WASDでも操作できます\n\n少し簡単にしました！\n\n@_-05kappa_FX-_様

@Stage\n\nwhen flag clicked\nswitch backdrop to (背景2 v)\n\nwhen I receive [海だぁ v]\nswitch backdrop to (背景3 v)\n\n@主人公\n\nwhen flag clicked\nset [海ですが何か？ v] to [0]\nswitch costume to (コスチューム1 v)\ngo to x: (-210) y: (100)\nset size to (80) %\nset rotation style [left-right v]\nshow\nset [x座標 v] to [0]\nset [y座標 v] to [0]\nset [ステージの番号 v] to [1]\nスポーン地点\nforever\n    if <<<(mouse x) > (x position)> and <mouse down?>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>> then\n        point in direction (90)\n        change [x座標 v] by (1.75)\n    end\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n        point in direction (-90)\n        change [x座標 v] by (-1.75)\n    end\n    set [x座標 v] to ((x座標) * (0.8))\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 x by ((x座標) * (-1))\n                            change y by (-5)\n                            if <<<mouse down?> and <(y position) < (mouse y)>> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n                                set [y座標 v] to [15]\n                                if <(direction) = [90]> then\n                                    set [x座標 v] to [-15]\n                                else\n                                    set [x座標 v] to [15]\n                                end\n                            else\n                                set [x座標 v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y座標 v] by (-1)\n    change y by (y座標)\n    if <touching (ステージ v)?> then\n        change y by ((y座標) * (-1))\n        set [y座標 v] to [0]\n    end\n    change y by (-1)\n    if <touching (ステージ v)?> then\n        if <<<mouse down?> and <(y position) < (mouse y)>> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n            start sound [ジャンプ v]\n            change [y座標 v] by (15)\n        end\n    end\n    change y by (1)\n    if <<touching (障害物 v)?> or <(y position) < [-160]>> then\n        start sound [たひぬ v]\n        スポーン地点\n    end\n    if <<(x position) > [240]> and <not <(ステージの番号) = [14]>>> then\n        broadcast (NEXT v)\n        スポーン地点\n        wait (1) seconds\n        change [ステージの番号 v] by (1)\n        wait (1.9) seconds\n    end\n    if <<<key (s v) pressed?> or <<mouse down?> and <(mouse y) < (y position)>>> or <key (down arrow v) pressed?>> then\n        switch costume to (コスチューム2 v)\n    else\n        switch costume to (コスチューム1 v)\n    end\n    if <key (r v) pressed?> then\n        スポーン地点\n    end\nend\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\n\nforever\nend\n\nwhen flag clicked\nforever\n    if <touching color (#ffb900)?> then\n        set [y座標 v] to [20]\n        broadcast (バネ v)\n    end\nend\n\nwhen I receive [海だぁ v]\nset [海ですが何か？ v] to [1]\n\nwhen flag clicked\nwait (1) seconds\nforever\n    if <(海ですが何か？) = [1]> then\n        hide\n        stop [other scripts in sprite v]\n        stop all sounds\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    play sound [9 v] until done\nend\n\ndefine スポーン地点\nswitch costume to (コスチューム1 v)\nset [ghost v] effect to (0)\nset size to (80) %\ngo to x: (-180) y: (-30)\nset rotation style [left-right v]\nset [x座標 v] to [0]\nset [y座標 v] to [0]\nshow\nbroadcast (リセット v)\n\nwhen I start as a clone\nrepeat (10)\n    change size by (-5)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\n@バネ\n\nwhen flag clicked\nset size to (80) %\nhide\nswitch costume to (バネ v)\n\nwhen I receive [バネ v]\nswitch costume to (バネ v)\nrepeat (5)\n    next costume\nend\nswitch costume to (バネ v)\n\nwhen I receive [next v]\nwait (1.01) seconds\nif <<<(ステージの番号) = [11]> or <(ステージの番号) = [12]>> or > then\n    set size to (80) %\n    switch costume to (バネ v)\n    go to x: (-113) y: (-43)\n    show\nelse\n    if <(ステージの番号) = [13]> then\n        show\n        go to x: (-17) y: (-45)\n    else\n        hide\n    end\nend\n\nwhen flag clicked\ndelete this clone\n\n@障害物\n\nwhen flag clicked\ngo [backward v] (1) layers\ngo to x: (0) y: (0)\nshow\ngo to [front v] layer\ngo [backward v] (1) layers\nforever\n    switch costume to (ステージの番号)\n    if <(ステージの番号) = [6]> then\n        go to x: (0) y: (0)\n        hide\n        wait (1) seconds\n        repeat (2)\n            create clone of (_myself_ v)\n        end\n    else\n        if <(ステージの番号) = [13]> then\n            go to x: (-2) y: (107)\n            set size to (100) %\n            repeat (20)\n                change size by (0.1)\n            end\n            repeat (20)\n                change size by (-0.1)\n            end\n        else\n            set size to (100) %\n            show\n            go to x: (0) y: (0)\n        end\n    end\nend\n\nwhen I receive [メッセージ1 v]\nshow\n\nwhen I start as a clone\nshow\nset x to (pick random (180) to (-180))\nrepeat until <touching (_edge_ v)?>\n    change y by (-7)\nend\ndelete this clone\n\n@ステージ\n\nwhen flag clicked\ngo to x: (-24) y: (-45)\ngo to [front v] layer\nswitch costume to (ステージの番号)\nshow\nforever\n    switch costume to (ステージの番号)\nend\n\nwhen I receive [next v]\nwait (1) seconds\nif <(ステージの番号) = [14]> then\n    broadcast (海だぁ v)\nend\n\n@NEXT\n\nwhen flag clicked\nhide\n\nwhen I receive [next v]\nset [next中 v] to [1]\nset [next終了 v] to [0]\nstart sound [文字表示の衝撃音2 v]\nset [みんな集まったか？ v] to [0]\ngo to [front v] layer\nNEXTのクローン作製\n幕を [-100] の明るさでクローンを作る\nwait (0.1) seconds\n幕を [-50] の明るさでクローンを作る\nwait (0.1) seconds\n幕を [-30] の明るさでクローンを作る\nwait (0.1) seconds\n幕を [0] の明るさでクローンを作る\nwait until <(NEXT終了) = [1]>\nset [next中 v] to [0]\n\ndefine NEXTのクローン作製\ngo to [front v] layer\nswitch costume to (コスチューム1 v)\ncreate clone of (_myself_ v)\nswitch costume to (コスチューム2 v)\ncreate clone of (_myself_ v)\nswitch costume to (コスチューム3 v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\ngo [backward v] (3) layers\nif <(costume [number v]) = [1]> then\n    clear graphic effects\n    go to [front v] layer\n    show\n    go to x: (0) y: (-381)\n    repeat until <[-1] < (y position)>\n        change y by (((0) - (y position)) / (5))\n    end\n    broadcast (みんな集まったぞ！ v)\n    broadcast (隠す v)\n    change y by (1)\n    repeat until <[250] < (y position)>\n        change y by ((y position) / (5))\n    end\n    set [next終了 v] to [1]\n    delete this clone\nend\nif <(costume [number v]) = [3]> then\n    show\n    go to [front v] layer\n    go [backward v] (1) layers\n    go to x: (-228) y: (0)\n    repeat until <[-1] < (x position)>\n        change x by (((0) - (x position)) / (7))\n    end\n    wait until <(みんな集まったか？) = [1]>\n    change x by (-1)\n    repeat until <(x position) < [-227]>\n        change x by ((x position) / (7))\n    end\n    delete this clone\nend\nif <(costume [number v]) = [2]> then\n    show\n    go to [front v] layer\n    go [backward v] (1) layers\n    go to x: (228) y: (0)\n    repeat until <(x position) < [1]>\n        change x by (((0) - (x position)) / (7))\n    end\n    wait until <(みんな集まったか？) = [1]>\n    change x by (1)\n    start sound [文字表示の衝撃音1 v]\n    repeat until <[224] < (x position)>\n        change x by ((x position) / (7))\n    end\n    delete this clone\nend\n\nwhen I receive [みんな集まったぞ！ v]\nset [みんな集まったか？ v] to [1]\n\ndefine 幕を (明るさ) の明るさでクローンを作る\nswitch costume to (コスチューム2 v)\nset [brightness v] effect to (明るさ)\ncreate clone of (_myself_ v)\nswitch costume to (コスチューム3 v)\nset [brightness v] effect to (明るさ)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [next中 v] to [0]\n\n@サムネ用\n\nwhen flag clicked\nhide\n\nwhen [timer v] > (0)\ngo to [front v] layer\nshow\n\nwhen flag clicked\nforever\n    reset timer\nend\n\n@NEXT35億\n\nwhen flag clicked\nhide\n\nwhen I receive [next2 v]\nset [next中 v] to [1]\nset [next終了 v] to [0]\nstart sound [文字表示の衝撃音2 v]\nset [みんな集まったか？ v] to [0]\ngo to [front v] layer\nNEXTのクローン作製\n幕を [-100] の明るさでクローンを作る\nwait (0.1) seconds\n幕を [-50] の明るさでクローンを作る\nwait (0.1) seconds\n幕を [-30] の明るさでクローンを作る\nwait (0.1) seconds\n幕を [0] の明るさでクローンを作る\nwait until <(NEXT終了) = [1]>\nset [next中 v] to [0]\n\ndefine NEXTのクローン作製\ngo to [front v] layer\nswitch costume to (コスチューム1 v)\ncreate clone of (_myself_ v)\nswitch costume to (コスチューム2 v)\ncreate clone of (_myself_ v)\nswitch costume to (コスチューム3 v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\ngo [backward v] (3) layers\nif <(costume [number v]) = [1]> then\n    clear graphic effects\n    go to [front v] layer\n    show\n    go to x: (0) y: (-381)\n    repeat until <[-1] < (y position)>\n        change y by (((0) - (y position)) / (5))\n    end\n    broadcast (みんな集まったぞ！ v)\n    broadcast (隠す v)\n    change y by (1)\n    repeat until <[250] < (y position)>\n        change y by ((y position) / (5))\n    end\n    set [next終了 v] to [1]\n    delete this clone\nend\nif <(costume [number v]) = [3]> then\n    show\n    go to [front v] layer\n    go [backward v] (1) layers\n    go to x: (-228) y: (0)\n    repeat until <[-1] < (x position)>\n        change x by (((0) - (x position)) / (7))\n    end\n    wait until <(みんな集まったか？) = [1]>\n    change x by (-1)\n    repeat until <(x position) < [-227]>\n        change x by ((x position) / (7))\n    end\n    delete this clone\nend\nif <(costume [number v]) = [2]> then\n    show\n    go to [front v] layer\n    go [backward v] (1) layers\n    go to x: (228) y: (0)\n    repeat until <(x position) < [1]>\n        change x by (((0) - (x position)) / (7))\n    end\n    wait until <(みんな集まったか？) = [1]>\n    change x by (1)\n    start sound [文字表示の衝撃音1 v]\n    repeat until <[224] < (x position)>\n        change x by ((x position) / (7))\n    end\n    delete this clone\nend\n\nwhen I receive [みんな集まったぞ！ v]\nset [みんな集まったか？ v] to [1]\n\ndefine 幕を (明るさ) の明るさでクローンを作る\nswitch costume to (コスチューム2 v)\nset [brightness v] effect to (明るさ)\ncreate clone of (_myself_ v)\nswitch costume to (コスチューム3 v)\nset [brightness v] effect to (明るさ)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [next中 v] to [0]\n\n@主人公2\n\nwhen I receive [海だぁ v]\nswitch costume to (コスチューム1 v)\ngo to x: (-210) y: (100)\nset size to (80) %\nset rotation style [left-right v]\nshow\nset [x v] to [0]\nset [y v] to [0]\nスポーン地点\nforever\n    if <<<mouse down?> and <(x position) < (mouse x)>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>> then\n        point in direction (90)\n        change [x v] by (1)\n    end\n    if <<<mouse down?> and <(mouse x) < (x position)>> or <<key (a v) pressed?> or <key (left arrow v) pressed?>>> then\n        point in direction (-90)\n        change [x v] by (-1)\n    end\n    set [x v] to ((x) * (0.8))\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 x by ((x) * (-1))\n                            change y by (-5)\n                            if <<<mouse down?> and <(y position) < (mouse x)>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n                                set [y v] to [10]\n                                if <(direction) = [90]> then\n                                    set [x v] to [-7]\n                                else\n                                    set [x v] to [7]\n                                end\n                            else\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v] by (-0.15)\n    change y by (y)\n    if <touching (ステージ v)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<<mouse down?> and <(y position) < (mouse x)>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        set [y v] to [2]\n    end\n    change y by (1)\n    if <<touching (障害物 v)?> or <(y position) < [-175]>> then\n        start sound [たひぬ v]\n        スポーン地点\n    end\n    if <<(x position) > [240]> and <not <(ステージの番号) = [24]>>> then\n        broadcast (NEXT2 v)\n        change [ステージの番号 v] by (1)\n        スポーン地点\n        wait (3) seconds\n    end\nend\n\nwhen I receive [海だぁ v]\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I receive [海だぁ v]\nshow\nforever\n    if <<key (s v) pressed?> or <<key (down arrow v) pressed?> or <<(mouse y) < (y position)> and <mouse down?>>>> then\n        switch costume to (コスチューム2 v)\n    else\n        switch costume to (コスチューム1 v)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [海だぁ v]\nforever\n    if <key (r v) pressed?> then\n        スポーン地点\n    end\nend\n\nwhen I receive [海だぁ v]\nforever\n    play sound [Water v] until done\nend\n\nwhen flag clicked\nforever\n    if <not <(ステージの番号) = [24]>> then\n        wait (1) seconds\n        change [time v] by (1)\n    end\n    if <(ステージの番号) = [24]> then\n        if <(time) < [50]> then\n    end\nend\n\ndefine スポーン地点\nswitch costume to (コスチューム1 v)\nset [ghost v] effect to (0)\nset size to (80) %\ngo to x: (-180) y: (-30)\nset rotation style [left-right v]\nset [x v] to [0]\nset [y v] to [0]\nshow\nbroadcast (リセット v)\n\nwhen I start as a clone\nrepeat (10)\n    change size by (-5)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\n@ステージ2\n\nwhen flag clicked\ngo to [front v] layer\nswitch costume to (ステージの番号)\nshow\nforever\n    switch costume to (ステージの番号)\nend\n\nwhen flag clicked\ngo to x: (-24) y: (-45)\ngo to [front v] layer\ngo [backward v] (2) layers\nforever\n    if <touching (主人公2 v)?> then\n        set [ghost v] effect to (40)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\n