Online Platformer Race 2/オンラインプラットフォーマーレース2

Instructions: (日本語は下)\n<English>\nIt's the second version of https://scratch.mit.edu/projects/875466091/.\n<add things>\n・VS CPU\n・Fixed most of bugs\n__________________________________________\nIf you enjoyed this game, please ★ or ♥ or follow!\n*New Scratcher can't play it on online.\nArrow key=Move\nC key= chat\nYou should reach the goal ASAP(before your opponent reach there).\nThere may be some bugs, if you noticed them, please tell me about it on comment.\nIf both 1P and 2P play, you will be a spectator.\n<日本語>\nOnline Platfomer Raceの第二弾です。\n＜追加仕様＞\n・大部分のバグを修正\n・CPU対戦\n____________________________________________\n楽しんでいただければ★・♥・フォローお願いします！\n*New Scratcherはオンラインでプレイできません。\n矢印キー=動く\nCキー=チャット\nプラットフォーマーをクリアし、ゴールに相手よりも早くたどり着いてください。\nバグ等あればコメントで教えてください。\n1Pと2Pが両方プレイしている場合、観戦者となります。\nまた、この作品で@ahopanmanさんのコンテストに応募します。

@Stage\n\nadd [なにか] to [生存確認 v]\n\nwhen flag clicked\nforever\n    play sound [Tobu - Roots v] until done\nend\n\n@Sprite1\n\nwhen flag clicked\nset [online? v] to [0]\n\ndefine 2.5D (x) (y)\ngo to [front v] layer\nset [地形x v] to (x)\nset [地形y v] to (y)\ncreate clone of (_myself_ v)\nnext costume\n\nwhen I start as a clone\nshow\nforever\n    go to [back v] layer\n    go to x: ((地形x) - (x)) y: ((地形y) - (y))\n    if <<[480] > ([abs v] of ((地形x) - (x)) )> and <[360] > ([abs v] of ((地形y) - (y)) )>> then\n        show\n    else\n        hide\n    end\n    if <(costume [number v]) = [2]> then\n        if <<((1Px) - (200000)) > [150]> and <((2Px) - (200000)) > [150]>> then\n            switch costume to (costume4 v)\n            if <(savepointx) = [0]> then\n                reset timer\n                set [savepointx v] to [250]\n                set [savepointy v] to [0]\n            end\n            repeat until <<((1Px) - (200000)) > [400]> and <((2Px) - (200000)) > [400]>>\n                go to x: ((地形x) - (x)) y: ((地形y) - (y))\n            end\n            switch costume to (costume2 v)\n        end\n    end\n    if <(costume [number v]) = [11]> then\n        if <<<(☁ 22P) = []> or <(☁ 2Pstats) = [00]>> and <(online?) = [1]>> then\n            switch costume to (costume2 v)\n        end\n    end\n    if <(refresh) = [1]> then\n        delete this clone\n    end\nend\n\nstart sound [制限時間タイマー（倍速） v]\n\ndefine sea\nset [i v] to [-1440]\nrepeat (12)\n    set [ghost v] effect to (0)\n    switch costume to (コスチューム1 v)\n    2.5D (i) [-360]\n    change [i v] by (480)\nend\n\nwhen I start as a clone\nshow\nforever\n    set rotation style [all around v]\n    if <(costume [number v]) = [7]> then\n        turn right (0.7) degrees\n    end\nend\n\nchange x by (-1)\n\nwhen I receive [game v]\nshow variable [お知らせ v]\nset rotation style [left-right v]\nshow variable [eng sub v]\nset [☁ 2pstats v] to [00]\nhide\nset [brightness v] effect to (-5)\nclear graphic effects\npoint in direction (90)\nif <(online?) = [0]> then\n    switch costume to (costume4 v)\nelse\n    switch costume to (costume2 v)\nend\n2.5D [0] [0]\nswitch costume to (costume3 v)\n2.5D [480] [0]\n2.5D [1100] [0]\n2.5D [1580] [0]\nswitch costume to (コスチューム5 v)\n2.5D [1580] [480]\nswitch costume to (コスチューム5 v)\n2.5D [1580] [960]\n2.5D [2060] [1200]\n2.5D [2600] [1200]\n2.5D [2600] [1200]\nswitch costume to (コスチューム6 v)\n2.5D [2600] [1560]\nsea\n\nwhen I receive [refresh v]\nset [refresh v] to [1]\nwait (1) seconds\nset [refresh v] to [0]\nshow variable [お知らせ v]\nset rotation style [left-right v]\nshow variable [eng sub v]\nset [☁ 2pstats v] to [00]\nhide\nset [brightness v] effect to (-5)\nclear graphic effects\nswitch costume to (costume2 v)\npoint in direction (90)\n2.5D [0] [0]\n2.5D [480] [0]\n2.5D [1100] [0]\n2.5D [1580] [0]\nswitch costume to (コスチューム5 v)\n2.5D [1580] [480]\nswitch costume to (コスチューム5 v)\n2.5D [1580] [960]\n2.5D [2060] [1200]\n2.5D [2600] [1200]\n2.5D [2600] [1200]\nswitch costume to (コスチューム6 v)\n2.5D [2600] [1560]\nsea\n\nwhen I receive [game v]\n\n\n    switch costume to (costume2 v)\nend\n\nwait (1) seconds\n\n@Sprite2\n\nwhen flag clicked\n\ndefine fix (lim)\nset [lim v] to [-1]\nrepeat until <<(lim) > (lim)> or <not <touching (sprite1 v)?>>>\n    change [lim v] by (1)\n    change y by (1)\nend\nset y to (0)\nchange [y v] by (lim)\nif <(lim) > (lim)> then\n    change [y v] by ((lim) * (-1))\n    change [x v] by ((xx) * (-1))\n    set [xx v] to [0]\nend\n\n\n\nset [brightness v] effect to (-20)\n\nwhen flag clicked\n\nask [あなたの名前は何ですか?] and wait\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\nshow\ngo to x: (0) y: (0)\nset [x v] to [0]\nset [y v] to [0]\nset [yy v] to [0]\nset [savepointx v] to [0]\nset [savepointy v] to [0]\nset [保存x v] to [0]\nset [保存y v] to [0]\nset [time v] to [0]\nclear graphic effects\nset size to (40) %\nforever\n    change [time v] by (1)\n    if <<<(何p?) = [1]> or <(何p?) = [2]>> or <(何p?) = [4]>> then\n        clear graphic effects\n        fix [14]\n        change [yy v] by (-1)\n        if <<key (left arrow v) pressed?> or <<(mouse x) < [-50]> and <mouse down?>>> then\n            set [time v] to [0]\n            if <touching color (#bdffff)?> then\n                change [xx v] by (-0.9)\n            else\n                change [xx v] by (-1.7)\n            end\n        end\n        if <<key (right arrow v) pressed?> or <<[50] < (mouse x)> and <mouse down?>>> then\n            set [time v] to [0]\n            if <touching color (#bdffff)?> then\n                change [xx v] by (0.9)\n            else\n                change [xx v] by (1.7)\n            end\n        end\n        if <touching color (#c8feff)?> then\n            set [xx v] to ((xx) * (0.95))\n        else\n            set [xx v] to ((xx) * (0.85))\n        end\n        change [x v] by (xx)\n        change y by (yy)\n        if <touching (sprite1 v)?> then\n            change y by ((yy) * (-1))\n            set [yy v] to [0]\n        end\n        if <not <(lim) > (lim)>> then\n            if <touching (sprite1 v)?> then\n                if <<key (up arrow v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>> then\n                    set [time v] to [0]\n                    change [y v] by (10)\n                    set [yy v] to [15]\n                    start sound [ニュッ2 \(1\) v]\n                end\n            end\n        end\n        change [y v] by (y position)\n        set y to (0)\n        if <<[-145] > (y)> or <touching (仕掛け v)?>> then\n            set [x v] to (savepointx)\n            set [y v] to (savepointy)\n            start sound [Chomp v]\n        end\n        if <touching color (#0026f2)?> then\n            change [y v] by (5)\n            set [yy v] to [28]\n            start sound [ニュッ2 \(1\) v]\n        end\n        if <(chatt) = [9]> then\n            say (username)\n        else\n            say (item ((chatt) + (1)) of [☁online chat v])\n        end\n    else\n        if <(何p?) = [3]> then\n            if <key (left arrow v) pressed?> then\n                set [time v] to [0]\n                change [x v] by (-8)\n            end\n            if <key (right arrow v) pressed?> then\n                change [x v] by (8)\n                set [time v] to [0]\n            end\n            if <key (up arrow v) pressed?> then\n                set [time v] to [0]\n                change [y v] by (8)\n            end\n            if <key (down arrow v) pressed?> then\n                set [time v] to [0]\n                change [y v] by (-8)\n            end\n            set [ghost v] effect to (50)\n            say [ユーザー数が3人以上のため、観戦モードとなっています\(チャットは使えません\)。]\n        end\n    end\nend\n\nwhen I receive [online v]\nforever\n    if <<(time) > [3000]> and <not <(username) = [sax723]>>> then\n        set [お知らせ v] to [しばらくの間放置していたため、もう一度旗を押してください。]\n        set [eng sub v] to [You didn't controll for a while, please push the flag again.]\n        stop [all v]\n    end\nend\n\nwhen I receive [online game start v]\nforever\n    if <(何p?) = [1]> then\n        if <(☁ 2Pstats) = [01]> then\n            set [勝ち負け v] to [2]\n            set [お知らせ v] to [2Pがゴールしました！]\n            set [eng sub v] to [2P won!]\n        end\n    end\n    if <(何p?) = [2]> then\n        if <(☁ stats) = [01]> then\n            set [勝ち負け v] to [2]\n            set [お知らせ v] to [1Pがゴールしました！]\n            set [eng sub v] to [1P won!]\n        end\n    end\nend\n\n@Sprite3\n\nwhen flag clicked\ngo to [back v] layer\n\nwhen I receive [game v]\nforever\n    go to [front v] layer\nend\n\n@仕掛け\n\nwhen flag clicked\n\ndefine 2.5D (x) (y)\ngo to [front v] layer\nset [地形x v] to (x)\nset [地形y v] to (y)\ncreate clone of (_myself_ v)\nnext costume\n\nwhen I start as a clone\nshow\nforever\n    go to [back v] layer\n    go to x: ((地形x) - (x)) y: ((地形y) - (y))\n    if <<[480] > ([abs v] of ((地形x) - (x)) )> and <[360] > ([abs v] of ((地形y) - (y)) )>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [6]> then\n        turn right (1) degrees\n    end\n    if <(costume [number v]) = [5]> then\n        turn left (1) degrees\n    end\nend\n\nwhen I receive [game v]\nhide\nforever\n    erase all\nend\n\nwhen I receive [game v]\nhide\nset [brightness v] effect to (-5)\nswitch costume to (costume2 v)\n2.5D [0] [0]\n2.5D [480] [0]\n2.5D [1100] [0]\n2.5D [1580] [0]\nrepeat (2)\n    switch costume to (コスチューム2 v)\n    2.5D (pick random (1860) to (2060)) (pick random (1200) to (1500))\nend\n2.5D [2540] [100]\nswitch costume to (コスチューム1 v)\n2.5D [-480] [0]\nswitch costume to (コスチューム3 v)\n2.5D [-480] [0]\n\n@Sprite5\n\nif  then\nend\n\nwhen I receive [ゴール v]\nwait (0.5) seconds\nif <([floor v] of ((gtime) * (10)) ) > (☁ wr)> then\n    set [☁ wr v] to ([floor v] of (gtime) )\nend\nrecord [1]\nrecord [2]\nset [count v] to [1]\n\nwhen flag clicked\n\ndefine record (あ)\nif <(count) = [0]> then\n    if <(あ) = [0]> then\n        set [い v] to [0]\n        go to x: (-200) y: (140)\n        set size to (50) %\n        go to [back v] layer\n        set [22 v] to [1]\n        repeat (8)\n            create clone of (_myself_ v)\n            change x by (22)\n            change [22 v] by (1)\n        end\n    end\n    if <(あ) = [0]> then\n        set [い v] to [0]\n        go to x: (-200) y: (140)\n        set size to (50) %\n        go to [back v] layer\n        set [22 v] to [1]\n        repeat (8)\n            create clone of (_myself_ v)\n            change x by (22)\n            change [22 v] by (1)\n        end\n    end\n    if <(あ) = [1]> then\n        set [い v] to [1]\n        go to x: (50) y: (100)\n        set size to (50) %\n        set [22 v] to [1]\n        repeat (8)\n            go to [front v] layer\n            create clone of (_myself_ v)\n            change x by (22)\n            change [22 v] by (1)\n        end\n    end\n    if <(あ) = [2]> then\n        go to x: (100) y: (0)\n        set size to (50) %\n        set [22 v] to [1]\n        repeat (8)\n            set [い v] to [2]\n            go to [front v] layer\n            create clone of (_myself_ v)\n            change x by (22)\n            change [22 v] by (1)\n        end\n    end\nend\n\nwhen I start as a clone\nshow\nswitch costume to (0 v)\nforever\n    if <(い) = [0]> then\n        show\n        if <(online?) = [1]> then\n            if <<((1Px) - (200000)) > [150]> and <((2Px) - (200000)) > [150]>> then\n                show\n            else\n                hide\n            end\n        end\n        if <(22) = ((length of ([ceiling v] of ((timer) * (100)) )) + (1))> then\n            switch costume to (m v)\n        else\n            switch costume to (letter (22) of ([ceiling v] of ((timer) * (100)) ))\n        end\n    else\n        if <(い) = [1]> then\n            if <(22) = ((length of (gtime)) + (1))> then\n                switch costume to (m v)\n            else\n                switch costume to (letter (22) of ([floor v] of ((gtime) * (10)) ))\n            end\n        else\n            if <(22) = ((length of (☁ wr)) + (1))> then\n                switch costume to (m v)\n            else\n                switch costume to (letter (22) of ([floor v] of ((☁ wr) * (10)) ))\n            end\n        end\n    end\n    if <(length of ([ceiling v] of ((timer) * (100)) )) > ((22) - (2))> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [game v]\nhide\nset [count v] to [0]\nrecord [0]\n\n@スプライト1\n\nset [i v] to [10]\nrepeat (70)\n    add (join [0] (i)) to [code v]\n    change [i v] by (1)\nend\n\nwhen I start as a clone\nset size to (40) %\nforever\n    switch costume to (oo)\n    if <<(何p?) = (oo)> or <<(online?) = [0]> and <(oo) = [1]>>> then\n        hide\n    else\n        if <<(oo) = [1]> and <(☁ 11P) = []>> then\n            hide\n        else\n            show\n        end\n        if <<(oo) = [2]> and <(☁ 22P) = []>> then\n            hide\n        else\n            show\n        end\n    end\n    if <(online?) = [1]> then\n        if <(oo) = [1]> then\n            go to x: (((1Px) - (200000)) - (x)) y: (((1Py) - (200000)) - (y))\n            if <(letter (length of (☁ 11P)) of (☁ 11P)) = [9]> then\n                say (1Puser)\n            else\n                say (item (letter (length of (☁ 11P)) of (☁ 11P)) of [☁online chat v])\n            end\n        else\n            go to x: (((2Px) - (200000)) - (x)) y: (((2Py) - (200000)) - (y))\n            if <(letter (length of (☁ 22P)) of (☁ 22P)) = [9]> then\n                say (2Puser)\n            else\n                say (item (letter (length of (☁ 22P)) of (☁ 22P)) of [☁online chat v])\n            end\n        end\n    else\n        show\n        if <(oo) = [1]> then\n            go to x: (((1Px) - (200000)) - (x)) y: (((1Py) - (200000)) - (y))\n        else\n            if <(autoval) = [3]> then\n                go to x: ((item (((timer) * ((45) + (((answer) * (9)) - (33.75)))) + (2448)) of [autox v]) - (x)) y: ((item (((timer) * ((30) + (((answer) * (9)) - (33.75)))) + (2448)) of [autoy v]) - (y))\n                say [CPU]\n                if <(((timer) * ((30) + (((answer) * (9)) - (33.75)))) + (2448)) > [5565]> then\n                    go to x: ((item (5565) of [autox v]) - (x)) y: ((item (5565) of [autoy v]) - (y))\n                    say [CPUがゴール！]\n                end\n            end\n            if <(autoval) = [1]> then\n                go to x: ((item ([ceiling v] of ((timer) * ((5) + (((answer) * (1.5)) - (3.75)))) ) of [autox v]) - (x)) y: ((item ([ceiling v] of ((timer) * ((5) + (((answer) * (1.5)) - (3.75)))) ) of [autoy v]) - (y))\n                say [CPU]\n                if <((timer) * (5)) > [379]> then\n                    go to x: ((item (379) of [autox v]) - (x)) y: ((item (379) of [autoy v]) - (y))\n                    say [CPUがゴール！]\n                end\n            end\n            if <(autoval) = [2]> then\n                go to x: ((item (((timer) * ((30) + (((answer) * (9)) - (33.75)))) + (380)) of [autox v]) - (x)) y: ((item (((timer) * ((30) + (((answer) * (9)) - (33.75)))) + (380)) of [autoy v]) - (y))\n                say [CPU]\n                if <(((timer) * ((30) + (((answer) * (9)) - (33.75)))) + (380)) > [2448]> then\n                    go to x: ((item (2447) of [autox v]) - (x)) y: ((item (2447) of [autoy v]) - (y))\n                    say [CPUがゴール！]\n                end\n            end\n        end\n    end\nend\n\nset [hits v] to [500]\n\nwhen I receive [game v]\nreset timer\nshow list [player v]\nshow list [chat v]\nhide\n\nwhen I receive [game v]\nset [autoval v] to (pick random (1) to (2))\nwait ((1) + ((online?) * (8))) seconds\nif <(online?) = [1]> then\n    set [chatt v] to [9]\n    set [oo v] to [1]\n    repeat (2)\n        create clone of (_myself_ v)\n        change [oo v] by (1)\n    end\nelse\n    set [chatt v] to [9]\n    set [oo v] to [2]\n    create clone of (_myself_ v)\nend\n\nshow\ngo to [front v] layer\n\ndefine 文字 (用途)\n\nwhen flag clicked\n\nadd [9] to [mozi v]\n\nwhen flag clicked\n\nforever\n\nwhen flag clicked\nhide\n\nwhen I receive [online v]\n\nadd [Z] to [mozi v]\n\ndelete (29) of [mozi v]\n\n@スプライト2\n\nwhen I receive [online v]\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [usercheck v]\n文字 [2]\n文字 [1]\nif <<(☁ 11P) = []> and <(何p?) = [2]>> then\n    set [x v] to [0]\n    set [y v] to [0]\n    set [savepointx v] to [0]\n    set [savepointy v] to [0]\n    set [お知らせ v] to [1Pの人が抜けたため、自動的にゲームが終了しました。]\n    set [eng sub v] to [The game ended automatically because the 1P person left.]\n    set [何p? v] to [1]\n    set [☁ 11p v] to (☁ 22P)\n    set [☁ 22p v] to []\n    broadcast (refresh v)\nend\n\nwhen flag clicked\n\nif <[] > [0]> then\n    if <[] > [0]> then\n        set [何p? v] to [4]\n    else\n        set [何p? v] to [3]\n    end\nend\n\nwhen flag clicked\n\nask [あなたの名前は何ですか?] and wait\n\nwhen flag clicked\n\nbroadcast (usercheck v)\nwait (0.2) seconds\n\nadd [なにか] to [☁online chat v]\n\nset [☁ 22p v] to (join (join (join (join (join (pick random (100) to (998)) [999]) [003004999]) (([ceiling v] of ((timer) * (5)) ) + (200000))) (join [999] [200050])) (join [999] (chatt)))\n\nreplace item (2) of [☁online chat v] with [The course is hard.../コースが難しい...]\n\nwhen flag clicked\n\nwhen I receive [online v]\nif <(online?) = [1]> then\n    wait (7) seconds\n    if <<not <(☁ 11P) = []>> and <not <(☁ 22P) = []>>> then\n        set [何p? v] to [3]\n    else\n        if <not <(☁ 11P) = []>> then\n            set [何p? v] to [2]\n        else\n            set [何p? v] to [1]\n        end\n        broadcast (usercheck v) and wait\n        if <(1Puser) = (username)> then\n            set [何p? v] to [1]\n        end\n        if <(2Puser) = (username)> then\n            set [何p? v] to [2]\n        end\n    end\nend\nforever\n    if <(何p?) = [1]> then\n        set [☁ 11p v] to (join (join (join (join (join (pick random (100) to (998)) [999]) (coooo)) (([ceiling v] of (x) ) + (200000))) (join [999] (([ceiling v] of (y) ) + (200000)))) (join [999] (chatt)))\n    end\n    if <(何p?) = [2]> then\n        set [☁ 22p v] to (join (join (join (join (join (pick random (100) to (998)) [999]) (coooo)) (([ceiling v] of (x) ) + (200000))) (join [999] (([ceiling v] of (y) ) + (200000)))) (join [999] (chatt)))\n    end\n    broadcast (usercheck v)\n    wait (0.2) seconds\nend\n\nwhen I receive [online v]\nforever\n    set [ry v] to [1]\n    repeat (5)\n        replace item (ry) of [生存確認 v] with (join (letter (1) of (☁ 11P)) (join (letter (2) of (☁ 11P)) (letter (3) of (☁ 11P))))\n        replace item ((ry) + (5)) of [生存確認 v] with (join (letter (1) of (☁ 22P)) (join (letter (2) of (☁ 22P)) (letter (3) of (☁ 22P))))\n        replace item ((ry) + (10)) of [生存確認 v] with (join (letter (1) of (☁ 33P)) (join (letter (2) of (☁ 33P)) (letter (3) of (☁ 33P))))\n        replace item ((ry) + (15)) of [生存確認 v] with (join (letter (1) of (☁ 44P)) (join (letter (2) of (☁ 44P)) (letter (3) of (☁ 44P))))\n        wait (1.2) seconds\n        change [ry v] by (1)\n    end\n    set [player count v] to [2]\n    if <(item (1) of [生存確認 v]) = (item (2) of [生存確認 v])> then\n        if <(item (2) of [生存確認 v]) = (item (3) of [生存確認 v])> then\n            if <(item (3) of [生存確認 v]) = (item (4) of [生存確認 v])> then\n                if <(item (4) of [生存確認 v]) = (item (5) of [生存確認 v])> then\n                    change [player count v] by (-1)\n                    if <(online?) = [1]> then\n                        set [☁ 11p v] to []\n                    end\n                end\n            end\n        end\n    end\n    if <(item (6) of [生存確認 v]) = (item (7) of [生存確認 v])> then\n        if <(item (7) of [生存確認 v]) = (item (8) of [生存確認 v])> then\n            if <(item (8) of [生存確認 v]) = (item (9) of [生存確認 v])> then\n                if <(item (9) of [生存確認 v]) = (item (10) of [生存確認 v])> then\n                    change [player count v] by (-1)\n                    if <(online?) = [1]> then\n                        set [☁ 22p v] to []\n                    end\n                    if <not <[] = (☁ 22P)>> then\n                        if <(何p?) = [1]> then\n                            set [x v] to [0]\n                            set [y v] to [0]\n                            set [savepointx v] to [0]\n                            set [savepointy v] to [0]\n                            set [お知らせ v] to [2Pの人が抜けたため、自動的にゲームが終了しました。]\n                            set [eng sub v] to [The game ended automatically because the 2P person left.]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nbroadcast (game v)\n\ndefine 文字 (用途)\nif <(用途) = [1]> then\n    set [読み取り番目 v] to [1]\n    set [1puser v] to []\n    set [1px v] to []\n    set [1py v] to []\n    set [2puser v] to []\n    set [2px v] to []\n    set [2py v] to []\n    set [読み取り（部屋名） v] to [4]\n    repeat until <(読み取り（部屋名）) > (length of (☁ 11P))>\n        if <(join (join (letter (読み取り（部屋名）) of (☁ 11P)) (letter ((読み取り（部屋名）) + (1)) of (☁ 11P))) (letter ((読み取り（部屋名）) + (2)) of (☁ 11P))) = [999]> then\n            change [読み取り番目 v] by (1)\n        else\n            if <(読み取り番目) = [2]> then\n                set [1puser v] to (join (1Puser) (item (item # of (join (join (letter (読み取り（部屋名）) of (☁ 11P)) (letter ((読み取り（部屋名）) + (1)) of (☁ 11P))) (letter ((読み取り（部屋名）) + (2)) of (☁ 11P))) in [code v]) of [mozi v]))\n            end\n            if <(読み取り番目) = [3]> then\n                set [1px v] to (join (1Px) (join (join (letter (読み取り（部屋名）) of (☁ 11P)) (letter ((読み取り（部屋名）) + (1)) of (☁ 11P))) (letter ((読み取り（部屋名）) + (2)) of (☁ 11P))))\n            end\n            if <(読み取り番目) = [4]> then\n                set [1py v] to (join (1Py) (join (join (letter (読み取り（部屋名）) of (☁ 11P)) (letter ((読み取り（部屋名）) + (1)) of (☁ 11P))) (letter ((読み取り（部屋名）) + (2)) of (☁ 11P))))\n            end\n        end\n        change [読み取り（部屋名） v] by (3)\n    end\n    set [読み取り番目 v] to [1]\n    set [2puser v] to []\n    set [読み取り（部屋名） v] to [4]\n    repeat until <(読み取り（部屋名）) > (length of (☁ 22P))>\n        if <(join (join (letter (読み取り（部屋名）) of (☁ 22P)) (letter ((読み取り（部屋名）) + (1)) of (☁ 22P))) (letter ((読み取り（部屋名）) + (2)) of (☁ 22P))) = [999]> then\n            change [読み取り番目 v] by (1)\n        else\n            if <(読み取り番目) = [2]> then\n                set [2puser v] to (join (2Puser) (item (item # of (join (join (letter (読み取り（部屋名）) of (☁ 22P)) (letter ((読み取り（部屋名）) + (1)) of (☁ 22P))) (letter ((読み取り（部屋名）) + (2)) of (☁ 22P))) in [code v]) of [mozi v]))\n            end\n            if <(読み取り番目) = [3]> then\n                set [2px v] to (join (2Px) (join (join (letter (読み取り（部屋名）) of (☁ 22P)) (letter ((読み取り（部屋名）) + (1)) of (☁ 22P))) (letter ((読み取り（部屋名）) + (2)) of (☁ 22P))))\n            end\n            if <(読み取り番目) = [4]> then\n                set [2py v] to (join (2Py) (join (join (letter (読み取り（部屋名）) of (☁ 22P)) (letter ((読み取り（部屋名）) + (1)) of (☁ 22P))) (letter ((読み取り（部屋名）) + (2)) of (☁ 22P))))\n            end\n        end\n        change [読み取り（部屋名） v] by (3)\n    end\nend\nif <(用途) = [2]> then\n    set [coooo v] to []\n    set [s v] to [1]\n    change [読み取り番目 v] by (1)\n    set [answer v] to (username)\n    repeat until <(s) > (length of (answer))>\n        set [coooo v] to (join (coooo) (item (item # of (letter (s) of (answer)) in [mozi v]) of [code v]))\n        change [s v] by (1)\n    end\n    set [coooo v] to (join (coooo) [999])\nend\n\nwhen flag clicked\nshow list [player v]\nshow list [chat v]\nhide\n\nadd [9] to [mozi v]\n\nwhen flag clicked\n\nforever\n\nwhen flag clicked\nset [お知らせ v] to [They can both be started by stepping on a button.]\nset [eng sub v] to [2人とも、ボタンを踏むことでスタートできます。]\n\nwhen I receive [online v]\nshow\ngo to [front v] layer\n\nwhen I receive [game v]\nset [何p? v] to [4]\n\n@仕掛け2\n\nwhen flag clicked\n\ndefine 2.5D (x) (y)\ngo to [back v] layer\nset [地形x v] to (x)\nset [地形y v] to (y)\ncreate clone of (_myself_ v)\nnext costume\n\nwhen I start as a clone\nshow\nforever\n    go to [back v] layer\n    go to x: ((地形x) - (x)) y: ((地形y) - (y))\n    if <<[480] > ([abs v] of ((地形x) - (x)) )> and <[360] > ([abs v] of ((地形y) - (y)) )>> then\n        show\n    else\n        hide\n    end\n    if <<(costume [number v]) = [4]> and <touching (sprite2 v)?>> then\n        set [savepointx v] to [1770]\n        set [savepointy v] to [250]\n        switch costume to (コスチューム8 v)\n        start sound [決定ボタンを押す4 v]\n        repeat until <not <touching (sprite2 v)?>>\n            go to [back v] layer\n            go to x: ((地形x) - (x)) y: ((地形y) - (y))\n            if <<[480] > ([abs v] of ((地形x) - (x)) )> and <[360] > ([abs v] of ((地形y) - (y)) )>> then\n                show\n            else\n                hide\n            end\n        end\n    end\n    if <<(costume [number v]) = [11]> and <touching (sprite2 v)?>> then\n        set [勝ち負け v] to [1]\n        broadcast (ゴール v)\n        set [gtime v] to ([ceiling v] of ((timer) * (100)) )\n        set [savepointx v] to [4000]\n        set [savepointy v] to [100]\n        switch costume to (goal2 v)\n        start sound [決定ボタンを押す4 v]\n        repeat until <[1] = [2]>\n            go to x: ((地形x) - (x)) y: ((地形y) - (y))\n            if <<[480] > ([abs v] of ((地形x) - (x)) )> and <[360] > ([abs v] of ((地形y) - (y)) )>> then\n                show\n            else\n                hide\n            end\n            go to [back v] layer\n        end\n    end\n    if <<(costume [number v]) = [5]> and <touching (sprite2 v)?>> then\n        set [savepointx v] to [2200]\n        set [savepointy v] to [1200]\n        switch costume to (コスチューム9 v)\n        start sound [決定ボタンを押す4 v]\n        repeat until <not <touching (sprite2 v)?>>\n            go to [back v] layer\n            go to x: ((地形x) - (x)) y: ((地形y) - (y))\n            if <<[480] > ([abs v] of ((地形x) - (x)) )> and <[360] > ([abs v] of ((地形y) - (y)) )>> then\n                show\n            else\n                hide\n            end\n        end\n    end\nend\n\nwhen flag clicked\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [6]> then\n        turn right (1) degrees\n    end\nend\n\nplay sound [cheer v] until done\n\nwhen I receive [game v]\nhide\nset [brightness v] effect to (-5)\nswitch costume to (costume2 v)\n2.5D [0] [0]\n2.5D [480] [0]\n2.5D [1100] [0]\n2.5D [1580] [200]\n2.5D [2200] [1200]\n2.5D [2540] [100]\nset [r v] to [1840]\nset [i v] to [3020]\nrepeat (4)\n    switch costume to (コスチューム6 v)\n    2.5D (i) (r)\n    change [r v] by (400)\n    change [i v] by (30)\nend\n2.5D [3500] [200]\nswitch costume to (goal v)\n2.5D (i) [3440]\n\nwhen I receive [game v]\nhide\nforever\n    erase all\nend\n\nforever\n    add (x) to [autox v]\n    add (y) to [autoy v]\nend\n\nwhen I receive [game v]\n\nforever\n    delete (379) of [autox v]\n    delete (379) of [autoy v]\nend\n\n@スプライト4\n\nset [☁ chat v] to (join (☁ chat) (chatt))\n\nset [☁ chat v] to (join (☁ chat) (chatt))\n\nset [☁ chat v] to (join (☁ chat) (chatt))\n\nset [☁ chat v] to (join (☁ chat) (chatt))\n\nset [☁ chat v] to (join (☁ chat) (chatt))\n\nset [☁ chat v] to (join (☁ chat) (chatt))\n\nset [☁ chat v] to (join (☁ chat) (chatt))\n\nwhen I receive [online game start v]\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nset [☁ chat v] to []\n\nask [あなたの名前は何ですか?] and wait\n\nwhen I receive [online game start v]\n\ndefine chat\n\nreplace item (4) of [chat v] with [add bot]\n\nwhen flag clicked\nset [bot制作命令 v] to [0]\n\n\n    set [chatt v] to (join (何p?) [4])\nend\n\nwhen flag clicked\n\nwait (1) seconds\n\nwhen I receive [online v]\nset [ghost v] effect to (100)\nshow\nforever\n    hide\n    if <key (c v) pressed?> then\n        show\n        set [ghost v] effect to (100)\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n        repeat until <not <key (c v) pressed?>>\n            if <key (0 v) pressed?> then\n                set [chatt v] to [0]\n                wait until <not <key (0 v) pressed?>>\n            end\n            if <key (1 v) pressed?> then\n                set [chatt v] to [1]\n                wait until <not <key (1 v) pressed?>>\n            end\n            if <key (2 v) pressed?> then\n                set [chatt v] to [2]\n                wait until <not <key (2 v) pressed?>>\n            end\n            if <key (4 v) pressed?> then\n                set [chatt v] to [4]\n                wait until <not <key (4 v) pressed?>>\n            end\n            if <key (3 v) pressed?> then\n                set [chatt v] to [3]\n                wait until <not <key (3 v) pressed?>>\n            end\n            if <key (5 v) pressed?> then\n                set [chatt v] to [5]\n                wait until <not <key (5 v) pressed?>>\n            end\n            if <key (6 v) pressed?> then\n                set [chatt v] to [6]\n                wait until <not <key (6 v) pressed?>>\n            end\n            if <key (7 v) pressed?> then\n                set [chatt v] to [7]\n                wait until <not <key (7 v) pressed?>>\n            end\n            if <key (8 v) pressed?> then\n                set [chatt v] to [8]\n                wait until <not <key (8 v) pressed?>>\n            end\n            if <key (9 v) pressed?> then\n                set [chatt v] to [9]\n                wait until <not <key (9 v) pressed?>>\n            end\n        end\n        set [chatt v] to [9]\n    end\nend\n\nadd [Thank you!/ありがとうございました！] to [☁online chat v]\n\n@Sprite4\n\nwhen flag clicked\nhide\nif <(username) = [sax723]> then\n    show variable [☁ 22p v]\n    show variable [☁ 11p v]\nend\nif <not <(username) = [sax723]>> then\n    hide variable [☁ 11p v]\n    hide variable [☁ 22p v]\nend\ngo to [front v] layer\nshow\ngo [backward v] (8) layers\n\nrepeat (10)\n\nwhen I receive [game v]\nhide\n\n@スプライト3\n\nwhen flag clicked\nshow\nforever\n    go to [front v] layer\n    glide (1) secs to x: (pick random (2) to (-2)) y: (pick random (2) to (-2))\nend\n\nwait (1) seconds\n\nwhen I receive [game v]\nhide\n\n@スプライト5\n\nwhen flag clicked\ngo to [front v] layer\nshow\ngo to x: (100) y: (-140)\nclear graphic effects\nwait until <<touching (mouse-pointer v)?> and <mouse down?>>\nset [online? v] to [1]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nbroadcast (online v)\nbroadcast (game v)\n\nglide (1) secs to x: (pick random (2) to (-2)) y: (pick random (2) to (-2))\n\nwait (1) seconds\n\nwhen I receive [game v]\nhide\n\nwhen flag clicked\nset [☁ 11p v] to []\nset [☁ 22p v] to []\nforever\n    wait (1) seconds\n    if <<(☁ 11P) = []> and <(☁ 22P) = []>> then\n        say [誰もプレイヤーがいません...]\n    else\n        say [誰かが待っています。]\n    end\nend\n\n@スプラ イト6\n\nwhen flag clicked\nclear graphic effects\nshow\ngo to x: (-20) y: (-140)\ngo to [front v] layer\nwait until <<touching (mouse-pointer v)?> and <mouse down?>>\nrepeat until <<<[6] > (answer)> and <(answer) > [0]>> and <((answer) mod (1)) = [0]>>\n    ask [How good is CPU? CPUの強さは?\(1~5\)] and wait\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nbroadcast (game v)\n\nwait (1) seconds\n\nwhen I receive [game v]\nhide\n\n\n\n@スプライト6\n\nwhen I receive [ゴール v]\nswitch costume to (勝ち負け)\nshow\nset [ghost v] effect to (100)\nif <(何p?) = [1]> then\n    set [☁ stats v] to [01]\nelse\n    if <(何p?) = [2]> then\n        set [☁ 2pstats v] to [01]\n    end\nend\nwait (1) seconds\nhide variable [お知らせ v]\nhide variable [eng sub v]\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (5) seconds\nstop [all v]\n\nif  then\nend\n\nwhen flag clicked\nset [☁ 2pstats v] to [00]\nset [☁ stats v] to [00]\nhide\nset [ghost v] effect to (100)\n\n