脱出プラットフォーマー（escape platformer） 

Instructions: これ1600人も見てるんだーすげー\n\n右上を目指そう\n矢印で動きます。\n右下の地図が邪魔な時、タップかQキーで消したり、表示したりできます。\nＺキーで矢印が消えます\nＸキーで再び表示します\n中心が赤いとき、矢印の位置を自由に\n動かせます\nスペースキーで扉に入れます\n裏クリアがあります。\nがんばれー\n\nあるコメントをすると次の作品拡散手伝うよ\n（裏クリア）\n\n難易度★☆☆☆☆

@Stage\n\nwhen flag clicked\nswitch backdrop to (レンガ v)\nset [動くな v] to [0]\nset [動き v] to [0]\nforever\n    if <(ステージ) = [21]> then\n        play sound [Movie 2 v] until done\n    else\n        play sound [Video Game 2 v] until done\n    end\n    if <(ステージ) = [25]> then\n        switch backdrop to (背景1 v)\n        stop [all v]\n    end\n    if <(ステージ) = [26]> then\n        switch backdrop to (背景2 v)\n        stop [all v]\n    end\nend\n\nwhen I receive [動くな v]\nchange [動くな v] by (-1)\nif <(動くな) = [0]> then\n    set [動き v] to [0]\nend\n\nwhen I receive [動いた v]\nset [動くな v] to [4]\n\n@地面\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (1 v)\nshow\n\nwhen I receive [→ v]\nswitch costume to ((costume [name v]) + (1))\nchange [ステージ v] by (1)\n\nwhen I receive [← v]\nswitch costume to ((costume [name v]) + (-1))\nchange [ステージ v] by (-1)\n\nwhen I receive [↑ v]\nswitch costume to ((costume [name v]) + (6))\nchange [ステージ v] by (6)\n\nwhen I receive [↓ v]\nswitch costume to ((costume [name v]) + (-6))\nchange [ステージ v] by (-6)\n\nwhen I receive [1 v]\nswitch costume to (1 v)\n\n@針\n\nwhen I receive [↓ v]\nswitch costume to ((costume [number v]) + (-6))\n\nwhen I receive [↑ v]\nswitch costume to ((costume [number v]) + (6))\n\nwhen I receive [→ v]\nswitch costume to ((costume [number v]) + (1))\n\nwhen I receive [← v]\nswitch costume to ((costume [number v]) + (-1))\n\nwhen flag clicked\nswitch costume to (1 v)\n\nshow\n\n@キャラ\n\nwhen flag clicked\nshow\nclear graphic effects\nset size to (100) %\ngo to [front v] layer\nset [x v] to [0]\nset [y v] to [0]\nset [ステージ v] to [1]\npoint in direction (90)\nset rotation style [left-right v]\ngo to x: (-200) y: (0)\n\nwhen flag clicked\ngo to x: (-210) y: (-90)\nwait (0.01) seconds\nforever\n    if <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<(動き) = [2]> or <(動き) = [6]>>> then\n        change [x v] by (-1)\n        point in direction (-90)\n    end\n    if <<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <<(動き) = [1]> or <(動き) = [5]>>> then\n        change [x v] by (1)\n        point in direction (90)\n    end\n    set [x v] to ((X) * (0.92))\n    change x by (X)\n    if <<touching (地面 v)?> or <<<touching (鍵11 v)?> or <touching (鍵22 v)?>> or <<touching (鍵33 v)?> or <touching (鍵44 v)?>>>> then\n        change y by (1)\n        if <<touching (地面 v)?> or <<<touching (鍵11 v)?> or <touching (鍵22 v)?>> or <<touching (鍵33 v)?> or <touching (鍵44 v)?>>>> then\n            change y by (1)\n            if <<touching (地面 v)?> or <<<touching (鍵11 v)?> or <touching (鍵22 v)?>> or <<touching (鍵33 v)?> or <touching (鍵44 v)?>>>> then\n                change y by (1)\n                if <<touching (地面 v)?> or <<<touching (鍵11 v)?> or <touching (鍵22 v)?>> or <<touching (鍵33 v)?> or <touching (鍵44 v)?>>>> then\n                    change y by (1)\n                    if <<touching (地面 v)?> or <<<touching (鍵11 v)?> or <touching (鍵22 v)?>> or <<touching (鍵33 v)?> or <touching (鍵44 v)?>>>> then\n                        change y by (1)\n                        if <<touching (地面 v)?> or <<<touching (鍵11 v)?> or <touching (鍵22 v)?>> or <<touching (鍵33 v)?> or <touching (鍵44 v)?>>>> then\n                            change y by (1)\n                            if <<touching (地面 v)?> or <<<touching (鍵11 v)?> or <touching (鍵22 v)?>> or <<touching (鍵33 v)?> or <touching (鍵44 v)?>>>> then\n                                change y by (1)\n                                if <<touching (地面 v)?> or <<<touching (鍵11 v)?> or <touching (鍵22 v)?>> or <<touching (鍵33 v)?> or <touching (鍵44 v)?>>>> then\n                                    change x by ((0) - (X))\n                                    change y by (-5)\n                                    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<(動き) = [5]> or <(動き) = [5]>>> then\n                                        start sound [Teleport2 v]\n                                        if <[0] < (X)> then\n                                            set [x v] to [-10]\n                                        else\n                                            set [x v] to [10]\n                                        end\n                                        set [y v] to [15]\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    end\n    change [y v] by (-1)\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 (-2)\n    if <<<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <(動き) = [3]>> and <touching (地面 v)?>> then\n        start sound [Teleport2 v]\n        set [y v] to [15]\n    end\n    change y by (1)\nend\n\nwhen I receive [→ v]\nhide\nset [リスポーン地点 v] to [5]\nwait (1) seconds\ngo to (扉左 v)\nshow\nrepeat until <not <(リスポーン地点) = [5]>>\n    if <touching (針 v)?> then\n        go to (扉左 v)\n    end\nend\n\nwhen I receive [← v]\nhide\nset [リスポーン地点 v] to [3]\nwait (1) seconds\ngo to (扉右 v)\nshow\nrepeat until <not <(リスポーン地点) = [3]>>\n    if <touching (針 v)?> then\n        go to (扉右 v)\n    end\nend\n\nwhen I receive [↑ v]\nhide\nwait (1) seconds\nset [リスポーン地点 v] to [2]\ngo to (扉下 v)\nshow\nrepeat until <not <(リスポーン地点) = [2]>>\n    if <touching (針 v)?> then\n        go to (扉下 v)\n    end\nend\n\nwhen I receive [↓ v]\nhide\nset [リスポーン地点 v] to [7]\nwait (1) seconds\ngo to (扉上 v)\nshow\nrepeat until <not <(リスポーン地点) = [7]>>\n    if <touching (針 v)?> then\n        go to (扉上 v)\n    end\nend\n\nwhen I receive [→ v]\nrepeat (10)\n    if <(ステージ) = [21]> then\n        go to x: (-200) y: (150)\n        forever\n    end\n    wait (0.1) seconds\nend\n\nplay sound [Teleport2 v] until done\n\nwhen flag clicked\nshow\nset [hp v] to [3]\nhide variable [hp v]\nforever\n    if <(ステージ) = [21]> then\n        show variable [hp v]\n        if <touching (弾 v)?> then\n            change [hp v] by (-1)\n            wait (1) seconds\n            if <(HP) < [0]> then\n                set [ステージ v] to [1]\n                hide variable [hp v]\n                broadcast (1 v)\n                wait (1) seconds\n            end\n        end\n    end\n    set [hp v] to [3]\nend\n\nwhen flag clicked\nforever\n    if <(ステージ) = [25]> then\n        hide\n    end\n    if <(ステージ) = [26]> then\n        hide\n    end\nend\n\n@現在地\n\nwhen I receive [隠す v]\nhide\n\nwhen I receive [見せる v]\nshow\n\nwhen flag clicked\ngo to x: (120) y: (-160)\nwait (0.1) seconds\ngo to [front v] layer\nshow\n\nwhen I receive [→ v]\nchange x by (20)\n\nwhen I receive [← v]\nchange x by (-20)\n\nwhen I receive [↑ v]\nchange y by (20)\n\nwhen I receive [↓ v]\nchange y by (-20)\n\nwhen flag clicked\nforever\n    if <(ステージ) = [25]> then\n        hide\n    end\n    if <(ステージ) = [26]> then\n        hide\n    end\nend\n\n@地図\n\nwhen flag clicked\ngo to x: (170) y: (-130)\nset size to (500) %\nshow\nset [地図 v] to [0]\nwait (0.05) seconds\ngo to [front v] layer\nforever\n    if <(地図) = [0]> then\n        if <<key (q v) pressed?> or <<mouse down?> and <touching (mouse-pointer v)?>>> then\n            hide\n            broadcast (隠す v)\n            wait (1) seconds\n            set [地図 v] to [1]\n        end\n    end\n    if <(地図) = [1]> then\n        if <<key (q v) pressed?> or <<mouse down?> and <touching (mouse-pointer v)?>>> then\n            show\n            broadcast (見せる v)\n            wait (1) seconds\n            set [地図 v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(ステージ) = [25]> then\n        hide\n    end\n    if <(ステージ) = [26]> then\n        hide\n    end\nend\n\n@扉右\n\nwhen flag clicked\nforever\n    if <touching (キャラ v)?> then\n        if <<(動き) = [4]> or <key (space v) pressed?>> then\n            broadcast (→ v)\n            wait (1) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <[右 v] contains (ステージ)?> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\ndelete all of [右 v]\nadd [1] to [右 v]\nadd [2] to [右 v]\nadd [3] to [右 v]\nadd [5] to [右 v]\nadd [7] to [右 v]\nadd [8] to [右 v]\nadd [15] to [右 v]\nadd [16] to [右 v]\nadd [19] to [右 v]\nadd [20] to [右 v]\nadd [22] to [右 v]\nadd [23] to [右 v]\nadd [24] to [右 v]\n\nwhen flag clicked\nforever\n    if <(ステージ) = [1]> then\n        go to x: (200) y: (0)\n    end\n    if <(ステージ) = [2]> then\n        go to x: (204) y: (-130)\n    end\n    if <(ステージ) = [3]> then\n        go to x: (207) y: (41)\n    end\n    if <(ステージ) = [5]> then\n        go to x: (204) y: (-52)\n    end\n    if <(ステージ) = [7]> then\n        go to x: (204) y: (-130)\n    end\n    if <(ステージ) = [8]> then\n        go to x: (204) y: (-130)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(ステージ) = [15]> then\n        go to x: (210) y: (-35)\n    end\n    if <(ステージ) = [16]> then\n        go to x: (210) y: (75)\n    end\n    if <(ステージ) = [19]> then\n        go to x: (204) y: (-130)\n    end\n    if <(ステージ) = [20]> then\n        go to x: (185) y: (94)\n    end\n    if <(ステージ) = [22]> then\n        go to x: (220) y: (58)\n    end\n    if <(ステージ) = [23]> then\n        go to x: (200) y: (137)\n    end\n    if <(ステージ) = [24]> then\n        go to x: (200) y: (20)\n    end\nend\n\n@扉左\n\nwhen flag clicked\nforever\n    if <touching (キャラ v)?> then\n        if <<(動き) = [4]> or <key (space v) pressed?>> then\n            broadcast (← v)\n            wait (1) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <[左 v] contains (ステージ)?> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\ndelete all of [左 v]\nadd [2] to [左 v]\nadd [3] to [左 v]\nadd [4] to [左 v]\nadd [6] to [左 v]\nadd [8] to [左 v]\nadd [9] to [左 v]\nadd [16] to [左 v]\nadd [17] to [左 v]\nadd [20] to [左 v]\nadd [23] to [左 v]\nadd [24] to [左 v]\n\nwhen flag clicked\nforever\n    if <(ステージ) = [23]> then\n        go to x: (-216) y: (86)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(ステージ) = [2]> then\n        go to x: (-200) y: (-130)\n    end\n    if <(ステージ) = [3]> then\n        go to x: (-200) y: (-130)\n    end\n    if <(ステージ) = [4]> then\n        go to x: (-212) y: (-97)\n    end\n    if <(ステージ) = [6]> then\n        go to x: (-200) y: (-130)\n    end\n    if <(ステージ) = [8]> then\n        go to x: (-220) y: (87)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(ステージ) = [9]> then\n        go to x: (-209) y: (-101)\n    end\n    if <(ステージ) = [16]> then\n        go to x: (-210) y: (-135)\n    end\n    if <(ステージ) = [17]> then\n        go to x: (-215) y: (134)\n    end\n    if <(ステージ) = [20]> then\n        go to x: (-200) y: (110)\n    end\n    if <(ステージ) = [23]> then\n        go to x: (-212) y: (87)\n    end\n    if <(ステージ) = [24]> then\n        go to x: (-200) y: (-130)\n    end\nend\n\n@扉上\n\nwhen flag clicked\nforever\n    if <touching (キャラ v)?> then\n        if <<(動き) = [4]> or <key (space v) pressed?>> then\n            broadcast (↑ v)\n            wait (1) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <[上 v] contains (ステージ)?> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\ndelete all of [上 v]\nadd [1] to [上 v]\nadd [4] to [上 v]\nadd [6] to [上 v]\nadd [7] to [上 v]\nadd [9] to [上 v]\nadd [11] to [上 v]\nadd [12] to [上 v]\nadd [13] to [上 v]\nadd [14] to [上 v]\nadd [16] to [上 v]\nadd [18] to [上 v]\n\nwhen flag clicked\nforever\n    if <(ステージ) = [1]> then\n        go to x: (-175) y: (49)\n    end\n    if <(ステージ) = [4]> then\n        go to x: (40) y: (123)\n    end\n    if <(ステージ) = [6]> then\n        go to x: (-200) y: (35)\n    end\n    if <(ステージ) = [7]> then\n        go to x: (-215) y: (123)\n    end\n    if <(ステージ) = [9]> then\n        go to x: (212) y: (137)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(ステージ) = [11]> then\n        go to x: (-210) y: (-65)\n    end\n    if <(ステージ) = [12]> then\n        go to x: (210) y: (105)\n    end\n    if <(ステージ) = [13]> then\n        go to x: (0) y: (112)\n    end\n    if <(ステージ) = [14]> then\n        go to x: (-20) y: (132)\n    end\n    if <(ステージ) = [16]> then\n        go to x: (-50) y: (132)\n    end\n    if <(ステージ) = [18]> then\n        go to x: (212) y: (137)\n    end\nend\n\n@扉下\n\nwhen flag clicked\nforever\n    if <touching (キャラ v)?> then\n        if <<(動き) = [4]> or <key (space v) pressed?>> then\n            broadcast (↓ v)\n            wait (1) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <[下 v] contains (ステージ)?> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\ndelete all of [下 v]\nadd [7] to [下 v]\nadd [10] to [下 v]\nadd [12] to [下 v]\nadd [13] to [下 v]\nadd [15] to [下 v]\nadd [17] to [下 v]\nadd [18] to [下 v]\nadd [19] to [下 v]\nadd [20] to [下 v]\nadd [22] to [下 v]\nadd [24] to [下 v]\n\nwhen flag clicked\nswitch costume to (扉下 v)\nforever\n    if <(ステージ) = [24]> then\n        repeat until <not <(ステージ) = [24]>>\n            switch costume to (偽針 v)\n        end\n    end\n    switch costume to (扉下 v)\nend\n\nwhen flag clicked\nforever\n    if <(ステージ) = [7]> then\n        go to x: (-188) y: (-132)\n    end\n    if <(ステージ) = [10]> then\n        go to x: (-200) y: (-130)\n    end\n    if <(ステージ) = [12]> then\n        go to x: (-200) y: (-130)\n    end\n    if <(ステージ) = [13]> then\n        go to x: (202) y: (-56)\n    end\n    if <(ステージ) = [15]> then\n        go to x: (-202) y: (-116)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(ステージ) = [17]> then\n        go to x: (210) y: (-130)\n    end\n    if <(ステージ) = [18]> then\n        go to x: (-200) y: (-145)\n    end\n    if <(ステージ) = [19]> then\n        go to x: (-212) y: (110)\n    end\n    if <(ステージ) = [20]> then\n        go to x: (150) y: (-130)\n    end\n    if <(ステージ) = [22]> then\n        go to x: (-215) y: (52)\n    end\n    if <(ステージ) = [24]> then\n        go to x: (-61) y: (-132)\n    end\nend\n\n@弾\n\nwhen I receive [撃て！ v]\nforever\n    wait (1) seconds\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nswitch costume to (pick random (1) to (3))\nforever\n    if <(costume [number v]) = [1]> then\n        turn right (pick random (1) to (10)) degrees\n        turn left (pick random (1) to (10)) degrees\n        move (15) steps\n    end\n    if <(costume [number v]) = [2]> then\n        broadcast (分身 v)\n        move (15) steps\n    end\n    if <(costume [number v]) = [3]> then\n        point towards (キャラ v)\n        move (15) steps\n    end\n    if <(ステージ) = [26]> then\n        hide\n    end\n    if <(HP) < [0]> then\n        hide\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nwait (10) seconds\ndelete this clone\n\nwhen I receive [分身 v]\nforever\n    move (10) steps\nend\n\nwhen flag clicked\nforever\n    if <(HP) < [0]> then\n        hide\n    end\nend\n\n@ボス\n\nwhen flag clicked\nhide\nforever\n    if <(ステージ) = [21]> then\n        show\n        broadcast (撃て！ v)\n        wait (30) seconds\n        set [ステージ v] to [26]\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(HP) < [0]> then\n        hide\n    end\nend\n\n@右\n\nwhen flag clicked\ngo to x: (-140) y: (-100)\nswitch costume to (固定 v)\nshow\n\nwhen flag clicked\nforever\n    go to (中心 v)\nend\n\nwhen flag clicked\nforever\n    if <key (z v) pressed?> then\n        hide\n    end\n    if <key (x v) pressed?> then\n        show\n    end\nend\n\nwhen I receive [隠れる v]\nhide\n\nwhen I receive [見つかる v]\nshow\n\nwhen this sprite clicked\nbroadcast (動いた v)\n\nwhen I receive [動いた v]\nif <touching (mouse-pointer v)?> then\n    if <(動き) = [3]> then\n        set [動き v] to [5]\n    else\n        set [動き v] to [1]\n    end\nelse\n    broadcast (動くな v)\n    stop [this script v]\nend\n\n@左\n\nwhen flag clicked\ngo to x: (-140) y: (-100)\nswitch costume to (固定 v)\n\nwhen flag clicked\nforever\n    go to (中心 v)\nend\n\nwhen flag clicked\nforever\n    if <key (z v) pressed?> then\n        hide\n    end\n    if <key (x v) pressed?> then\n        show\n    end\nend\n\nwhen I receive [見つかる v]\nshow\n\nwhen I receive [隠れる v]\nhide\n\nwhen this sprite clicked\nbroadcast (動いた v)\n\nwhen I receive [動いた v]\nif <touching (mouse-pointer v)?> then\n    if <(動き) = [3]> then\n        set [動き v] to [6]\n    else\n        set [動き v] to [2]\n    end\nelse\n    broadcast (動くな v)\n    stop [this script v]\nend\n\n@上\n\nwhen flag clicked\ngo to x: (-140) y: (-100)\nswitch costume to (固定 v)\n\nwhen flag clicked\nforever\n    go to (中心 v)\nend\n\nwhen flag clicked\nforever\n    if <key (z v) pressed?> then\n        hide\n    end\n    if <key (x v) pressed?> then\n        show\n    end\nend\n\nwhen I receive [見つかる v]\nshow\n\nwhen I receive [隠れる v]\nhide\n\nwhen this sprite clicked\nbroadcast (動いた v)\n\nwhen I receive [動いた v]\nif <touching (mouse-pointer v)?> then\n    set [動き v] to [3]\n    wait (0.7) seconds\n    set [動き v] to [0]\nelse\n    broadcast (動くな v)\n    stop [this script v]\nend\n\n@下\n\nwhen flag clicked\ngo to x: (-140) y: (-100)\nswitch costume to (固定 v)\n\nwhen flag clicked\nforever\n    go to (中心 v)\nend\n\nwhen flag clicked\nforever\n    if <key (z v) pressed?> then\n        hide\n    end\n    if <key (x v) pressed?> then\n        show\n    end\nend\n\nwhen I receive [見つかる v]\nshow\n\nwhen I receive [隠れる v]\nhide\n\nwhen this sprite clicked\nbroadcast (動いた v)\n\nwhen I receive [動いた v]\nif <touching (mouse-pointer v)?> then\n    set [動き v] to [4]\nelse\n    broadcast (動くな v)\n    stop [this script v]\nend\n\n@中心\n\nwhen flag clicked\ngo to x: (-140) y: (-100)\nswitch costume to (固定 v)\n\nwhen this sprite clicked\nnext costume\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [1]> then\n        broadcast (隠れる v)\n        go to (mouse-pointer v)\n        broadcast (見つかる v)\n    else\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (z v) pressed?> then\n        broadcast (隠れる v)\n        hide\n    end\n    if <key (x v) pressed?> then\n        broadcast (見つかる v)\n        show\n    end\nend\n\n@鍵1\n\nwhen flag clicked\nforever\n    switch costume to (鍵１ v)\n    if <(ステージ) = [10]> then\n        show\n    else\n        hide\n    end\n    if <touching (キャラ v)?> then\n        hide\n        set [鍵１ v] to [1]\n        stop [this script v]\n    end\nend\n\n@鍵11\n\nwhen flag clicked\nset [鍵１ v] to [0]\nhide\nforever\n    switch costume to (鍵扉１ v)\n    if <(ステージ) = [1]> then\n        show\n    else\n        hide\n    end\n    if <(鍵１) = [1]> then\n        stop [this script v]\n    end\nend\n\n@鍵2\n\nwait (0.5) seconds\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    switch costume to (鍵２ v)\n    if <(ステージ) = [14]> then\n        show\n    else\n        hide\n    end\n    if <touching (キャラ v)?> then\n        hide\n        set [鍵２ v] to [1]\n        stop [this script v]\n    end\nend\n\n@鍵22\n\nwhen flag clicked\nset [鍵２ v] to [0]\nhide\nforever\n    switch costume to (鍵扉２ v)\n    if <(ステージ) = [7]> then\n        show\n    else\n        hide\n    end\n    if <(鍵２) = [1]> then\n        stop [this script v]\n    end\nend\n\nwait (0.5) seconds\n\n@鍵3\n\nwhen flag clicked\nforever\n    switch costume to (鍵３ v)\n    if <(ステージ) = [11]> then\n        show\n    else\n        hide\n    end\n    if <touching (キャラ v)?> then\n        hide\n        set [鍵３ v] to [1]\n        stop [this script v]\n    end\nend\n\n@鍵33\n\nwhen flag clicked\nset [鍵３ v] to [0]\nhide\nforever\n    switch costume to (鍵扉３ v)\n    if <(ステージ) = [16]> then\n        show\n    else\n        hide\n    end\n    if <(鍵３) = [1]> then\n        stop [this script v]\n    end\nend\n\n@鍵4\n\nwhen flag clicked\nforever\n    switch costume to (鍵４ v)\n    if <(ステージ) = [5]> then\n        show\n    else\n        hide\n    end\n    if <touching (キャラ v)?> then\n        hide\n        set [鍵４ v] to [1]\n        stop [this script v]\n    end\nend\n\n@鍵44\n\nwhen flag clicked\nset [鍵４ v] to [0]\nhide\nforever\n    switch costume to (鍵扉４ v)\n    if <(ステージ) = [20]> then\n        show\n    else\n        hide\n    end\n    if <(鍵４) = [1]> then\n        stop [this script v]\n    end\nend\n\n