SCROLL PLATFORMER MAKER ver0.6ｂ


@Stage\n\nwhen flag clicked\nforever\n    if <(プログラム管理) = [オープニング]> then\n        switch backdrop to (0 v)\n    else\n        switch backdrop to (1 v)\n    end\nend\n\n@タイトル\n\nwhen flag clicked\nset [プログラム管理 v] to [オープニング]\nerase all\nset [ghost v] effect to (0)\nset size to (100) %\nhide\npen up\nset pen size to (1)\nset pen color to (#1dff00)\ngo to x: (0) y: (0)\npen down\nrepeat (80)\n    change x by (0.1)\n    change x by (-0.1)\n    change pen size by (15)\nend\npen up\ngo to x: (0) y: (220)\nswitch costume to (琴 v)\nshow\nrepeat (10)\n    change y by (-22)\nend\nwait (1) seconds\nrepeat (26)\n    change x by (-6)\nend\nstamp\nhide\nswitch costume to (mikawakengyo v)\nwait (1) seconds\ngo to x: (80) y: (220)\nshow\nrepeat (10)\n    change y by (-22)\nend\nstamp\nwait (1.5) seconds\nhide\ngo to x: (0) y: (0)\nswitch costume to (黒 v)\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\n    wait (0.1) seconds\nend\nerase all\nbroadcast (プログラムスタート v)\nforever\n    play sound [BGM素材ﾀﾞﾖｰ v] until done\nend\n\nwhen I receive [プログラムスタート v]\nset [プログラム管理 v] to [つくる]\nwait (0.5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\n    wait (0.1) seconds\nend\nhide\n\nswitch costume to (サムネ v)\nset [ghost v] effect to (0)\ngo to [front v] layer\nshow\n\n@ペン\n\nwhen flag clicked\nhide\nリストセットアップ\nset [進度/270 v] to [11]\nset [ブロック選択 v] to [a]\nwait until <(プログラム管理) = [つくる]>\nset [変更 v] to [y]\nforever\n    if <(プログラム管理) = [つくる]> then\n        erase all\n        スタ連 [80]\n        格子\n        マウスに枠を表示\n        交換 <<<(変更) = [y]> and <mouse down?>> and <<[-180] < (mouse x)> and <(mouse x) < [180]>>>\n        割合表示\n    end\n    if <not <(プログラム管理) = [つくる]>> then\n        erase all\n        スタ連 [80]\n        コイン描画\n    end\nend\n\ndefine 格子\nset pen size to (3)\nset pen color to (#000000)\nset [kousi-x v] to [-260]\nset [kousi-y v] to [-180]\nrepeat (9)\n    格子 (kousi-x) (kousi-y) から ((kousi-x) * (-1)) (kousi-y)\n    change [kousi-y v] by (40)\nend\nrepeat (13)\n    格子 (kousi-x) (kousi-y) から (kousi-x) ((kousi-y) * (-1))\n    change [kousi-x v] by (40)\nend\n\ndefine 格子 (ｘ) (ｙ) から (x) (y)\ngo to x: (ｘ) y: (ｙ)\npen down\ngo to x: (x) y: (y)\npen up\n\ndefine リストセットアップ\ndelete all of [ステージ v]\nrepeat (270)\n    add [a] to [ステージ v]\nend\nrepeat (8)\n    repeat (10)\n        add [a] to [ステージ v]\n    end\n    repeat (250)\n        add [z] to [ステージ v]\n    end\n    repeat (10)\n        add [a] to [ステージ v]\n    end\nend\nreplace item (11) of [ステージ v] with [a]\nreplace item (281) of [ステージ v] with [p]\n\ndefine スタ連 (大きさ)\nset [すたれんy v] to [-160]\nset [すたれん座標 v] to ([floor v] of ((進度/270) - (6)) )\nrepeat (9)\n    set [すたれんx v] to [200]\n    go to x: ((((進度/270) mod ([floor v] of (進度/270) )) * (-40)) - (240)) y: (すたれんY)\n    コスチュームを (item (すたれん座標) of [ステージ v]) にする\n    set size to (大きさ) %\n    stamp\n    change [すたれん座標 v] by (1)\n    set [すたれん座標 v] to ([floor v] of (すたれん座標) )\n    repeat (12)\n        go to x: ((((進度/270) mod ([floor v] of (進度/270) )) * (-40)) - (すたれんX)) y: (すたれんY)\n        コスチュームを (item (すたれん座標) of [ステージ v]) にする\n        set size to (大きさ) %\n        stamp\n        change [すたれんx v] by (-40)\n        change [すたれん座標 v] by (1)\n        set [すたれん座標 v] to ([floor v] of (すたれん座標) )\n    end\n    change [すたれんy v] by (40)\n    change [すたれん座標 v] by (257)\nend\n\ndefine コスチュームを (alphabet) にする\nif <(alphabet) = [a]> then\n    特殊土 (alphabet)\nend\nif <(alphabet) = [b]> then\n    switch costume to (6 v)\nend\nif <(alphabet) = [c]> then\n    switch costume to (7 v)\nend\nif <(alphabet) = [d]> then\n    switch costume to (8 v)\nend\nif <(alphabet) = [e]> then\n    switch costume to (9 v)\nend\nif <(alphabet) = [f]> then\n    switch costume to (10 v)\nend\nif <(alphabet) = [g]> then\n    if <[ばね v] contains (すたれん座標)?> then\n        switch costume to (12 v)\n    else\n        switch costume to (11 v)\n    end\nend\nif <(alphabet) = [h]> then\n    if <[coin v] contains (すたれん座標)?> then\n        switch costume to (0 v)\n    else\n        switch costume to (coin　コスチューム)\n    end\nend\nif <(alphabet) = [i]> then\n    switch costume to (15 v)\nend\nif <(alphabet) = [j]> then\n    switch costume to (16 v)\nend\nif <(alphabet) = [k]> then\n    特殊O✕\nend\nif <(alphabet) = [l]> then\n    特殊O\nend\nif <(alphabet) = [m]> then\n    特殊✕\nend\nif <(alphabet) = [n]> then\n    鍵 [25]\nend\nif <(alphabet) = [o]> then\n    鍵 [26]\nend\nif <(alphabet) = [p]> then\n    switch costume to (27 v)\nend\nif <(alphabet) = [q]> then\n    switch costume to (28 v)\nend\nif <(alphabet) = [r]> then\n    switch costume to (29 v)\nend\nif <(alphabet) = [z]> then\n    switch costume to (0 v)\nend\n\ndefine 特殊土 (土)\nif <<(item ((すたれん座標) + (270)) of [ステージ v]) = [a]> or <<(item ((すたれん座標) + (270)) of [ステージ v]) = [b]> or <(item ((すたれん座標) + (270)) of [ステージ v]) = [c]>>> then\n    switch costume to (4 v)\nelse\n    if <<(item ((すたれん座標) + (-1)) of [ステージ v]) = [a]> or <(item ((すたれん座標) + (-1)) of [ステージ v]) = [b]>> then\n        if <<(item ((すたれん座標) + (1)) of [ステージ v]) = [a]> or <(item ((すたれん座標) + (1)) of [ステージ v]) = [c]>> then\n            switch costume to (3 v)\n        else\n            switch costume to (2 v)\n        end\n    else\n        if <not <<(item ((すたれん座標) + (1)) of [ステージ v]) = [a]> or <(item ((すたれん座標) + (1)) of [ステージ v]) = [c]>>> then\n            switch costume to (5 v)\n        else\n            switch costume to (1 v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    set [coin　コスチューム v] to [13]\n    wait (0.5) seconds\n    set [coin　コスチューム v] to [14]\n    wait (0.5) seconds\nend\n\ndefine 特殊O✕\nif <(〇✕スイッチ) = [1]> then\n    switch costume to (17 v)\nend\nif <(〇✕スイッチ) = [2]> then\n    switch costume to (18 v)\nend\nif <(〇✕スイッチ) = [3]> then\n    switch costume to (19 v)\nend\nif <(〇✕スイッチ) = [4]> then\n    switch costume to (20 v)\nend\n\ndefine 特殊O\nif <<(〇✕スイッチ) = [1]> or <(〇✕スイッチ) = [2]>> then\n    switch costume to (21 v)\nend\nif <<(〇✕スイッチ) = [3]> or <(〇✕スイッチ) = [4]>> then\n    switch costume to (22 v)\nend\n\ndefine 特殊✕\nif <<(〇✕スイッチ) = [1]> or <(〇✕スイッチ) = [2]>> then\n    switch costume to (24 v)\nend\nif <<(〇✕スイッチ) = [3]> or <(〇✕スイッチ) = [4]>> then\n    switch costume to (23 v)\nend\n\ndefine 鍵 (なんばー)\nif <(鍵) = [0]> then\n    switch costume to (なんばー)\nend\nif <(鍵) = [1]> then\n    switch costume to (0 v)\nend\n\ndefine マウスに枠を表示\nif <(変更) = [y]> then\n    if <<[-180] < (mouse x)> and <(mouse x) < [180]>> then\n        if <(mouse y) < [180]> then\n            go to x: ((40) * (マウスｘ座標)) y: (((40) * (マウスｙ座標)) - (160))\n            switch costume to (枠 v)\n            set size to (80) %\n            stamp\n        end\n    end\nend\n\nwhen flag clicked\nwait until <(プログラム管理) = [つくる]>\nforever\n    if <<[-180] < (mouse x)> and <(mouse x) < [180]>> then\n        set [マウスｘ座標 v] to (([floor v] of (((mouse x) + (180)) / (40)) ) - (4))\n    end\n    set [マウスｙ座標 v] to ([floor v] of (((mouse y) + (180)) / (40)) )\n    set [結局マウスってどこなん？ v] to (((マウスｙ座標) * (270)) + ((進度/270) + (マウスｘ座標)))\nend\n\ndefine 交換 <ほんとにいいの？>\nif <ほんとにいいの？> then\n    if <<<not <((結局マウスってどこなん？) mod (270)) < [11]>> and <not <[250] < ((結局マウスってどこなん？) mod (270))>>> and <<not <(結局マウスってどこなん？) = [11]>> and <not <(結局マウスってどこなん？) = [281]>>>> then\n        if <(mouse y) < [180]> then\n            replace item (結局マウスってどこなん？) of [ステージ v] with (ブロック選択)\n        end\n    else\n        start sound [ポップ v]\n    end\nend\n\ndefine コイン描画\ngo to x: (-180) y: (140)\nswitch costume to (13 v)\nset size to (100) %\nstamp\nmove (40) steps\nswitch costume to (110 v)\nstamp\nset [coin　変数処理 v] to [1]\nchange x by (8)\nchange y by (-5)\nrepeat (length of (coin))\n    move (23) steps\n    switch costume to ((33) + (letter (coin　変数処理) of (coin)))\n    set size to (150) %\n    stamp\n    change [coin　変数処理 v] by (1)\nend\n\ndefine 割合表示\ngo to x: (-120) y: (160)\nset pen color to (#0043ff)\nset pen size to (10)\npen down\nset x to (120)\npen up\ngo to x: (-120) y: (160)\nset pen color to (#ff0000)\nset pen size to (6)\npen down\nchange x by ((((進度/270) - (10)) / (250)) * (240))\npen up\n\n@主人公\n\nwhen flag clicked\nset [キャラ　y座標 v] to [0]\npoint in direction (90)\ngo to x: (0) y: (0)\nhide\nset size to (70) %\nwait until <(プログラム管理) = [つくる]>\nshow\ngo to [back v] layer\nforever\n    if <(プログラム管理) = [つくる]> then\n        point in direction (90)\n        set x to (0)\n        set y to (キャラ　Y座標)\n    else\n        if <(プログラム管理) = [あそぶ]> then\n            point in direction (90)\n            再描画しない\n            if <touching color (#ff3838)?> then\n                中間獲得\n            end\n            if <touching color (#3838ff)?> then\n                set [エフェクトクローンズ v] to [3]\n                broadcast (エフェクト v)\n                wait (2.3) seconds\n            end\n            if <<touching color (#ff0000)?> or <<touching (_edge_ v)?> and <(y position) < [0]>>> then\n                ヤラレチャッタ\n            end\n        end\n    end\nend\n\nwhen I receive [プレイ開始 v]\nset [〇✕スイッチ v] to [1]\nset [coin v] to [0]\nset [鍵 v] to [0]\ndelete all of [coin v]\ndelete all of [ばね v]\nif <not <(test_hold) = [y]>> then\n    set [スポーン地点 v] to [281]\n    スポーン\nend\nwait (0.2) seconds\nset [速さx v] to [0]\nset [速さy v] to [-1]\nset [壁ホールド v] to [0]\nset [プログラム管理 v] to [あそぶ]\n\ndefine スポーン\nset [進度/270 v] to ((スポーン地点) mod (270))\nset [キャラ　y座標 v] to ((([floor v] of ((スポーン地点) / (270)) ) * (40)) - (160))\nset x to (0)\nset y to (キャラ　Y座標)\n\ndefine 着地\nset [坂 v] to [0]\nset [ストッパー v] to [0]\nchange [落下 v] by (1)\nrepeat until <<(坂) = [20]> or <not <<touching color (#00ff00)?> or <<touching color (#804000)?> or <<touching color (#ff00ff)?> or <<touching color (#0000ff)?> or <<touching color (#0000d6)?> or <touching color (#ff9400)?>>>>>>>>\n    set [速さy v] to [0]\n    change [キャラ　y座標 v] by (1)\n    set y to (キャラ　Y座標)\n    change [坂 v] by (1)\n    set [落下 v] to [0]\nend\nif <<(坂) = [20]> and <(落下) < [30]>> then\n    change [キャラ　y座標 v] by ((坂) * (-1))\n    set y to (キャラ　Y座標)\n    if <(costume [number v]) = [1]> then\n        set [進む倍率 v] to ((進む倍率) * (-1))\n        if <(壁ホールド) = [0]> then\n            change [進度/270 v] by (進む倍率)\n        end\n        set [速さx v] to [0]\n        set [壁ホールド v] to [1]\n    else\n        set [進む倍率 v] to ((進む倍率) * (-1))\n        if <(壁ホールド) = [0]> then\n            change [進度/270 v] by (進む倍率)\n        end\n        set [速さx v] to [0]\n        set [壁ホールド v] to [-1]\n    end\n    change [落下 v] by (4)\n    set [ストッパー v] to [1]\nend\n\ndefine 歩き感知\nif <not <<<key (d v) pressed?> or <<key (right arrow v) pressed?> or <<mouse down?> and <[0] < (mouse x)>>>> and <<key (a v) pressed?> or <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < [0]>>>>>> then\n    if <<key (d v) pressed?> or <<key (right arrow v) pressed?> or <<mouse down?> and <[0] < (mouse x)>>>> then\n        if <not <(壁ホールド) = [1]>> then\n            switch costume to (lightblue012様から借りましたよ v)\n            if <(速さX) < [1]> then\n                change [速さx v] by (0.25)\n                if <[1] < (速さX)> then\n                    set [速さx v] to [1]\n                end\n            end\n            if <(壁ホールド) = [-1]> then\n                set [壁ホールド v] to [0]\n            end\n        end\n    else\n        if <<key (a v) pressed?> or <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < [0]>>>> then\n            if <not <(壁ホールド) = [-1]>> then\n                switch costume to (lightblue012様から借りました v)\n                if <[-1] < (速さX)> then\n                    change [速さx v] by (-0.25)\n                    if <(速さX) < [-1]> then\n                        set [速さx v] to [-1]\n                    end\n                end\n                if <(壁ホールド) = [1]> then\n                    set [壁ホールド v] to [0]\n                end\n            end\n        else\n            set [速さx v] to ((速さX) * (0.875))\n        end\n    end\nelse\n    set [速さx v] to ((速さX) * (0.875))\nend\nif <(ストッパー) = [1]> then\n    set [速さx v] to [0]\nend\n\ndefine 進む倍率計算\nchange y by (-2)\nset [進む倍率 v] to [0]\nset [進む倍率 v] to (速さX)\nif <touching color (#00e6ff)?> then\n    set [進む倍率 v] to ((進む倍率) * (0.5))\nend\nif <touching color (#0000ff)?> then\n    set [進む倍率 v] to ((進む倍率) + (0.5))\nend\nif <touching color (#0000d6)?> then\n    set [進む倍率 v] to ((進む倍率) + (-0.5))\nend\nchange y by (2)\nset [進む倍率 v] to ((進む倍率) * (0.12))\n\ndefine 落下\nジャンプ\nif <(速さY) = [-1]> then\n    if <not <touching color (#00e6ff)?>> then\n        if <(速さY) > [-18]> then\n            change [速さy v] by (-1)\n        end\n    end\nelse\n    if <(速さY) > [3]> then\n        if <touching color (#00e6ff)?> then\n            set [速さy v] to [3]\n        else\n            if <(速さY) > [-18]> then\n                change [速さy v] by (-1)\n            end\n        end\n    else\n        if <[0] > (速さY)> then\n            if <touching color (#00e6ff)?> then\n                set [速さy v] to [-1]\n            else\n                if <(速さY) > [-18]> then\n                    change [速さy v] by (-1)\n                end\n            end\n        else\n            if <(速さY) > [-18]> then\n                change [速さy v] by (-1)\n            end\n        end\n    end\nend\nif <touching color (#ff7a00)?> then\n    broadcast (ばねに触ったよ v)\n    set [速さy v] to [20]\nend\nif <[180] < (キャラ　Y座標)> then\n    set [キャラ　y座標 v] to [180]\nend\n\ndefine ジャンプ\nif <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <<mouse down?> and <[20] < (y position)>>>> then\n    if <<(落下) < [4]> or <touching color (#00e6ff)?>> then\n        set [壁ホールド v] to [0]\n        set [速さy v] to [16]\n    end\n    if <(落下) < [5]> then\n        set [壁ホールド v] to [0]\n    end\nend\n\nwhen I receive [ストップ v]\nset [プログラム管理 v] to [つくる]\nset [キャラ　y座標 v] to [0]\nset [進度/270 v] to ([floor v] of (進度/270) )\ndelete all of [coin v]\ndelete all of [ばね v]\nwait (0.1) seconds\nset [変更 v] to [y]\n\ndefine 再描画しない\n着地\n歩き感知\n着地\n進む倍率計算\nchange [進度/270 v] by (進む倍率)\n着地\n落下\nif <not <<touching color (#00ff00)?> or <<touching color (#804000)?> or <<touching color (#ff00ff)?> or <<touching color (#0000ff)?> or <<touching color (#0000d6)?> or <touching color (#ff9400)?>>>>>>> then\n    change [キャラ　y座標 v] by (速さY)\n    set y to (キャラ　Y座標)\n    着地\nend\nif <<touching color (#00ff00)?> or <<touching color (#804000)?> or <<touching color (#ff00ff)?> or <<touching color (#0000ff)?> or <<touching color (#0000d6)?> or <touching color (#ff9400)?>>>>>> then\n    change [キャラ　y座標 v] by (-1)\n    set y to (キャラ　Y座標)\n    着地\nend\n\nwhen flag clicked\nforever\n    if <(プログラム管理) = [つくる]> then\n        set [鍵 v] to [0]\n        set [〇✕スイッチ v] to [1]\n    else\n        if <(プログラム管理) = [あそぶ]> then\n            if <touching color (#e1ff9c)?> then\n                if <(〇✕スイッチ) = [1]> then\n                    set [〇✕スイッチ v] to [4]\n                    wait (1) seconds\n                    change [〇✕スイッチ v] by (-1)\n                else\n                    set [〇✕スイッチ v] to [2]\n                    wait (1) seconds\n                    change [〇✕スイッチ v] by (-1)\n                end\n            end\n            if <touching color (#ffc97d)?> then\n                set [鍵 v] to [1]\n                set [エフェクトクローンズ v] to [1]\n                broadcast (エフェクト v)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(プログラム管理) = [あそぶ]> then\n        if <touching color (#ffff00)?> then\n            insert (((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) - (271)) at (1) of [coin v] \n            insert (((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) - (270)) at (1) of [coin v] \n            insert (((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) - (269)) at (1) of [coin v] \n            insert (((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) - (1)) at (1) of [coin v] \n            insert ((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) at (1) of [coin v] \n            insert (((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) + (1)) at (1) of [coin v] \n            insert (((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) + (269)) at (1) of [coin v] \n            insert (((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) + (270)) at (1) of [coin v] \n            insert (((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) + (271)) at (1) of [coin v] \n            change [coin v] by (1)\n            wait (0) seconds\n        end\n    end\nend\n\nwhen I receive [ばねに触ったよ v]\ninsert (((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) - (271)) at (1) of [ばね v] \ninsert (((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) - (270)) at (1) of [ばね v] \ninsert (((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) - (269)) at (1) of [ばね v] \ninsert (((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) - (1)) at (1) of [ばね v] \ninsert ((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) at (1) of [ばね v] \ninsert (((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) + (1)) at (1) of [ばね v] \ninsert (((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) + (269)) at (1) of [ばね v] \ninsert (((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) + (270)) at (1) of [ばね v] \ninsert (((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) + (271)) at (1) of [ばね v] \nwait (0.1) seconds\nwait until <not <touching color (#ff7a00)?>>\ndelete all of [ばね v]\n\ndefine 中間獲得\n中間確認 (((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) - (271))\n中間確認 (((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) - (270))\n中間確認 (((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) - (269))\n中間確認 (((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) - (1))\n中間確認 ((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) ))\n中間確認 (((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) + (1))\n中間確認 (((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) + (269))\n中間確認 (((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) + (270))\n中間確認 (((((270) * ([floor v] of (((y position) + (180)) / (20)) )) - (270)) + ([floor v] of (進度/270) )) + (271))\n\ndefine ヤラレチャッタ\npoint in direction (90)\nrepeat (10)\n    turn right (15) degrees\n    change y by (10)\nend\nset [回転 v] to [10]\nrepeat (20)\n    turn right (15) degrees\n    change y by (回転)\n    change [回転 v] by (-1)\nend\nset [やられる速度 v] to [-10]\nrepeat until <<touching (_edge_ v)?> and <(y position) < [0]>>\n    turn right (15) degrees\n    change y by (やられる速度)\n    change [やられる速度 v] by (-2)\nend\nif <(test_hold) = [y]> then\n    set [速さx v] to [0]\n    point in direction (90)\n    hide\n    wait (1) seconds\n    show\n    set [プログラム管理 v] to [つくる]\n    broadcast (ストップ v)\nelse\n    set [速さx v] to [0]\n    point in direction (90)\n    hide\n    wait (1.2) seconds\n    show\n    スポーン\nend\n\ndefine 中間確認 (番号)\nif <(item (番号) of [ステージ v]) = [q]> then\n    set [スポーン地点 v] to (番号)\n    set [エフェクトクローンズ v] to [2]\n    broadcast (エフェクト v)\nend\n\n@ライブラリ\n\nwhen flag clicked\nhide\nforever\n    if <(プログラム管理) = [つくる]> then\n        go to [front v] layer\n        show\n        switch costume to (ブロック選択)\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nset size to (80) %\nforever\n    go to x: (-215) y: (120)\n    repeat (2)\n        repeat (4)\n            change y by (2)\n        end\n        repeat (2)\n            change y by (-4)\n        end\n    end\n    wait (0.8) seconds\nend\n\nwhen this sprite clicked\nif <(変更) = [y]> then\n    set [変更 v] to [n]\n    broadcast (表を開く v)\nend\n\n@両サイド壁\n\nhide\n\nshow\n\nwhen flag clicked\nhide\nwait until <(プログラム管理) = [つくる]>\nshow\nset size to (100) %\ngo to [back v] layer\n\n@パーツ選択\n\nwhen flag clicked\nリスト\nset [ブロック選択 v] to [a]\nhide\nwait until <(プログラム管理) = [つくる]>\nshow\nset size to (100) %\nswitch costume to (ボタン v)\nforever\n    if <(プログラム管理) = [つくる]> then\n        show\n    else\n        hide\n    end\n    go to x: (0) y: (0)\nend\n\nwhen I receive [表を開く v]\ngo to [front v] layer\nswitch costume to (表 v)\nwait (0.2) seconds\nwait until <mouse down?>\nif <mouse down?> then\n    switch costume to (ボタン v)\n    if <[0] < <((((マウスｙ座標) * (-7)) + (41)) + ((マウスｘ座標) + (5))) < [26]>> then\n        set [ブロック選択 v] to (item ((((マウスｙ座標) * (-7)) + (41)) + ((マウスｘ座標) + (5))) of [ペンが場所を知りたいらしいよ v])\n    end\nend\nwait (0.1) seconds\nset [変更 v] to [y]\n\ndefine リスト\ndelete all of [ペンが場所を知りたいらしいよ v]\nadd [a] to [ペンが場所を知りたいらしいよ v]\nadd [b] to [ペンが場所を知りたいらしいよ v]\nadd [c] to [ペンが場所を知りたいらしいよ v]\nadd [d] to [ペンが場所を知りたいらしいよ v]\nadd [e] to [ペンが場所を知りたいらしいよ v]\nadd [f] to [ペンが場所を知りたいらしいよ v]\nadd [g] to [ペンが場所を知りたいらしいよ v]\nadd [h] to [ペンが場所を知りたいらしいよ v]\nadd [i] to [ペンが場所を知りたいらしいよ v]\nadd [j] to [ペンが場所を知りたいらしいよ v]\nadd [k] to [ペンが場所を知りたいらしいよ v]\nadd [l] to [ペンが場所を知りたいらしいよ v]\nadd [m] to [ペンが場所を知りたいらしいよ v]\nadd [n] to [ペンが場所を知りたいらしいよ v]\nadd [o] to [ペンが場所を知りたいらしいよ v]\nadd [q] to [ペンが場所を知りたいらしいよ v]\nadd [r] to [ペンが場所を知りたいらしいよ v]\nadd [a] to [ペンが場所を知りたいらしいよ v]\nadd [a] to [ペンが場所を知りたいらしいよ v]\nadd [a] to [ペンが場所を知りたいらしいよ v]\nadd [a] to [ペンが場所を知りたいらしいよ v]\nadd [a] to [ペンが場所を知りたいらしいよ v]\nadd [a] to [ペンが場所を知りたいらしいよ v]\nadd [a] to [ペンが場所を知りたいらしいよ v]\nadd [z] to [ペンが場所を知りたいらしいよ v]\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    if <(変更) = [y]> then\n        set [変更 v] to [n]\n        broadcast (表を開く v)\n    end\nend\n\n@左ボタン\n\nwhen flag clicked\nhide\nforever\n    go to x: (0) y: (0)\n    if <(プログラム管理) = [つくる]> then\n        go to [front v] layer\n        show\n        switch costume to (ブロック選択)\n        if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n            if <[11] < (進度/270)> then\n                change [進度/270 v] by (-1)\n                wait (0.1) seconds\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <[11] < (進度/270)> then\n    change [進度/270 v] by (-1)\nend\n\n@右ボタン\n\nwhen flag clicked\nhide\nforever\n    go to x: (0) y: (0)\n    if <(プログラム管理) = [つくる]> then\n        go to [front v] layer\n        show\n        switch costume to (ブロック選択)\n        if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n            if <(進度/270) < [260]> then\n                change [進度/270 v] by (1)\n                wait (0.1) seconds\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <(進度/270) < [260]> then\n    change [進度/270 v] by (1)\nend\n\n@セーブ\n\ndefine データ圧縮\ndelete all of [セーブコード v]\nset [圧縮 v] to [2]\nhide list [セーブコード v]\ninsert [1a] at (1) of [セーブコード v] \ninsert [もし処理が遅ければターボモードにしてください] at (2) of [セーブコード v] \nrepeat until <(圧縮) = [2431]>\n    圧縮作業\nend\nreplace item (2) of [セーブコード v] with [トリプルクリックでコピー　Copy with triple click]\n\ndefine 圧縮作業\nset [保持 v] to (item (圧縮) of [ステージ v])\nif <(保持) = (item (圧縮) of [ステージ v])> then\n    set [圧縮テキスト v] to (保持)\n    set [保持回数 v] to [1]\n    change [圧縮 v] by (1)\n    repeat until <not <(item (圧縮) of [ステージ v]) = (保持)>>\n        change [保持回数 v] by (1)\n        change [圧縮 v] by (1)\n    end\n    if <(length of (保持回数)) = [2]> then\n        置き換える [?]\n    end\n    if <(length of (保持回数)) = [3]> then\n        置き換える [\(]\n    end\n    if <(length of (保持回数)) = [4]> then\n        置き換える [\)]\n    end\n    置き換える (保持回数)\n    置き換える (item ((圧縮) - (1)) of [ステージ v])\nelse\n    set [保持回数 v] to [1]\n    change [圧縮 v] by (1)\n    置き換える (item (圧縮) of [ステージ v])\nend\n\ndefine 置き換える (圧縮テキスト)\nset [圧縮テキスト v] to (圧縮テキスト)\nreplace item (1) of [セーブコード v] with (join (item (1) of [セーブコード v]) (圧縮テキスト))\n\nwhen flag clicked\nhide\nshow list [セーブコード v]\nswitch costume to (1 v)\nwait until <(プログラム管理) = [つくる]>\nforever\n    go to x: (0) y: (0)\n    if <(プログラム管理) = [つくる]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <(変更) = [y]> then\n    set [変更 v] to [n]\n    データ圧縮\n    if <[500] < (length of (item (1) of [セーブコード v]))> then\n        add [コメント機能では５００文字までしか投稿できません。⇩５００文字ごとに分割] to [セーブコード v]\n        add [With the comment function, you can only post up to 500 characters. ⇩ Divide every 500 characters] to [セーブコード v]\n        セーブコード分割速度上昇\n    end\n    add [Zキーで閉じる　　 press Z to close] to [セーブコード v]\n    wait until <key (z v) pressed?>\n    show list [セーブコード v]\n    set [変更 v] to [y]\nend\n\ndefine セーブコード分割速度上昇\nset [セーブ分割 v] to [1]\nrepeat ([ceiling v] of ((length of (item (1) of [セーブコード v])) / (500)) )\n    insert (letter (セーブ分割) of (item (1) of [セーブコード v])) at ((5) + ([floor v] of ((セーブ分割) / (500)) )) of [セーブコード v] \n    change [セーブ分割 v] by (1)\n    repeat (499)\n        if <not <(セーブ分割) = ((length of (item (1) of [セーブコード v])) + (1))>> then\n            replace item ((5) + ([floor v] of ((セーブ分割) / (500)) )) of [セーブコード v] with (join (item ((5) + ([floor v] of ((セーブ分割) / (500)) )) of [セーブコード v]) (letter (セーブ分割) of (item (1) of [セーブコード v])))\n            change [セーブ分割 v] by (1)\n        end\n    end\nend\n\n@ロード\n\ndefine 読み込み (セーブコード)\nset [セーブコードの何文字目 v] to [1]\ndelete all of [ステージ v]\nset [何桁が数字 v] to [1]\nrepeat until <(length of (ステージ)) = [2430]>\n    記号対応 (セーブコード)\n    repeat (何桁が数字)\n        set [数字を足していく v] to (((数字を足していく) * (10)) + (letter (セーブコードの何文字目) of (セーブコード)))\n        change [セーブコードの何文字目 v] by (1)\n    end\n    repeat (数字を足していく)\n        add (letter (セーブコードの何文字目) of (セーブコード)) to [ステージ v]\n    end\n    change [セーブコードの何文字目 v] by (1)\n    if <(セーブコードの何文字目) > [100000]> then\n        broadcast (バグったんですけどー！？ v)\n        stop [this script v]\n    end\nend\n\ndefine 記号対応 (あセーブコード)\nset [数字を足していく v] to [0]\nif <(letter (セーブコードの何文字目) of (あセーブコード)) = [?]> then\n    set [何桁が数字 v] to [2]\n    set [セーブコードの何文字目 v] to ((セーブコードの何文字目) + (1))\nelse\n    if <(letter (セーブコードの何文字目) of (あセーブコード)) = [\(]> then\n        set [何桁が数字 v] to [3]\n        set [セーブコードの何文字目 v] to ((セーブコードの何文字目) + (1))\n    else\n        if <(letter (セーブコードの何文字目) of (あセーブコード)) = [\)]> then\n            set [何桁が数字 v] to [4]\n            set [セーブコードの何文字目 v] to ((セーブコードの何文字目) + (1))\n        else\n            if <<not <(letter (セーブコードの何文字目) of (あセーブコード)) = [?]>> and <<not <(letter (セーブコードの何文字目) of (あセーブコード)) = [\(]>> and <not <(letter (セーブコードの何文字目) of (あセーブコード)) = [\)]>>>> then\n                set [何桁が数字 v] to [1]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [ロード表 v] to [n]\nリスト挿入\nhide\nswitch costume to (1 v)\nwait until <(プログラム管理) = [つくる]>\nforever\n    go to x: (0) y: (0)\n    if <(プログラム管理) = [つくる]> then\n        show\n    else\n        hide\n    end\nend\n\ndefine リスト挿入\ndelete all of [ロード　official code v]\ninsert [1a?26a2z\(251a1p2z1b7a1c2z1b2a2z1b1a1f1a1c2z1f2z1r?10a\(210z?20a4z1b5a1c?19z?10a\(210z?20a5z1b3a1c?20z?10a\(210z?20a?30z?10a\(210z?20a?30z?10a\(210z?20a?30z?10a\(210z?20a?30z?10a\(210z?20a?30z?10a\(210z?10a] at (1) of [ロード　official code v] \ninsert [1a?26a1d?14a1d\(237a1p1z8a2e1b4a1d2a1c1z1g1z7a2d4z1f4z1r8a\(199z?20a2z8a2e1z1b3a1d1a1c4z7a1d?11z8a\(199z?20a?10z2e4z1b1z1c5z8a?11z8a\(199z?20a?10z2e?12z1a3i1a3j?11z8a\(199z?20a?10z2e?31z8a\(199z?20a?10z2e?31z8a\(199z?20a?10z2e?31z8a\(199z?20a?10z2e?31z8a\(199z?10a] at (2) of [ロード　official code v] \ninsert [1a?21a8z?12a1d1a1d1z4a1z2d\(227a1p1b9a1f8e3a1c1z2h1z1q1z2e1d1a1d6e2d3a3f2a1f3a7f1a1z2h2z1r2z8a\(171z?20a2z1b8a1z8e2a1c7z2e1d1a1d6e2d3a3z2a1z3a1z2e1z2e1z1a8z8a\(171z?20a3z1b7a1z8e1a1c8z2e1d1a1d6e2d3a3z1b1c2z2f1z2e1z2e1z1a8z8a\(171z?20a4z1b4a2f1z3e2z3e?10z2e1d1a1d2e2d2e2d2a1c7z2e1a2z1a2z1a1c8z8a\(171z?20a5z1b3a6e2z7e2a4z2e3d2e2d6e8z2e?16z8a\(171z?20a9z6e2d7e2a4z7e2d6e8z2e?16z8a\(171z?20a9z6e2d7e2a4z7e2d6e?26z8a\(171z?20a?14z4d6z2a?11z6d?28z8a\(171z?10a] at (3) of [ロード　official code v] \n\nwhen this sprite clicked\nif <(変更) = [y]> then\n    set [変更 v] to [n]\n    set [ロード表 v] to [y]\n    wait (0.2) seconds\n    wait until <mouse down?>\n    if <not <<<[-100] < (mouse y)> and <(mouse y) < [100]>> and <<[-140] < (mouse x)> and <(mouse x) < [100]>>>> then\n        set [ロード表 v] to [n]\n        wait (0.2) seconds\n        set [変更 v] to [y]\n    end\nend\n\nwhen I receive [ロード v]\nif <(ロード番号) = [0]> then\n    go to [front v] layer\n    ask [セーブコードを入力してください。Please enter the save code.] and wait\n    if <<not <(length of (answer)) < [10]>> and < (answer) contains [1a]?>> then\n        set [進度/270 v] to [11]\n        読み込み (answer)\n        set [ロード表 v] to [n]\n        wait (0.2) seconds\n        set [変更 v] to [y]\n    else\n        think [そのコードは読み込めません。The save code cannot be read.] for (2) seconds\n        set [ロード表 v] to [n]\n        wait (0.2) seconds\n        set [変更 v] to [y]\n    end\nelse\n    set [進度/270 v] to [11]\n    読み込み (item (ロード番号) of [ロード　official code v])\n    set [ロード表 v] to [n]\n    wait (0.2) seconds\n    set [変更 v] to [y]\nend\n\n@ロード2\n\nwhen flag clicked\nhide\nswitch costume to (1 v)\nwait until <(プログラム管理) = [つくる]>\nforever\n    go to x: (0) y: (0)\n    if <(プログラム管理) = [つくる]> then\n        if <(ロード表) = [y]> then\n            show\n        else\n            hide\n        end\n    else\n        hide\n    end\n    if <(costume [number v]) = [2]> then\n        show\n        stop [this script v]\n    end\nend\n\nwhen this sprite clicked\nif <[100] < (mouse y)> then\n    set [ロード表 v] to [n]\n    wait (0.2) seconds\n    set [変更 v] to [y]\nelse\n    if <(mouse y) < [-20]> then\n        ロード命令 [0]\n    else\n        if <(mouse y) < [20]> then\n            番号処理 [1]\n        else\n            if <(mouse y) < [60]> then\n                番号処理 [1]\n            else\n                if <(mouse y) < [101]> then\n                    番号処理 [1]\n                else\n                    broadcast (バグったんですけどー！？ v)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [バグったんですけどー！？ v]\nswitch costume to (hello,guys君 v)\nshow\n\ndefine ロード命令 (番号)\nset [ロード番号 v] to (番号)\nbroadcast (ロード v)\n\ndefine 番号処理 (左の番号)\nif <(mouse x) < [-60]> then\n    ロード命令 (左の番号)\nelse\n    if <(mouse x) < [20]> then\n        ロード命令 ((左の番号) + (1))\n    else\n        ロード命令 ((左の番号) + (2))\n    end\nend\n\ngo to [front v] layer\n\n@上ボタン\n\nwhen flag clicked\nhide\nforever\n    go to x: (0) y: (0)\n    if <(プログラム管理) = [つくる]> then\n        go to [front v] layer\n        show\n        switch costume to (ブロック選択)\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            if <(キャラ　Y座標) < [140]> then\n                change [キャラ　y座標 v] by (40)\n                wait (0.1) seconds\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <(キャラ　Y座標) < [140]> then\n    change [キャラ　y座標 v] by (40)\nend\n\n@下ボタン\n\nwhen flag clicked\nhide\nforever\n    go to x: (0) y: (0)\n    if <(プログラム管理) = [つくる]> then\n        go to [front v] layer\n        show\n        switch costume to (ブロック選択)\n        if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n            if <[-140] < (キャラ　Y座標)> then\n                change [キャラ　y座標 v] by (-40)\n                wait (0.1) seconds\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <[-140] < (キャラ　Y座標)> then\n    change [キャラ　y座標 v] by (-40)\nend\n\n@プレイ\n\nwhen flag clicked\nhide\nswitch costume to (1 v)\nwait until <(プログラム管理) = [つくる]>\ngo to x: (0) y: (0)\nshow\nforever\n    if <(プログラム管理) = [つくる]> then\n        switch costume to (1 v)\n    else\n        switch costume to (2 v)\n    end\nend\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    if <(変更) = [y]> then\n        if <[-115] < (mouse y)> then\n            set [test_hold v] to [y]\n            set [変更 v] to [n]\n            broadcast (プレイ開始 v)\n        else\n            set [test_hold v] to [n]\n            set [変更 v] to [n]\n            broadcast (プレイ開始 v)\n        end\n    end\nelse\n    broadcast (ストップ v)\n    wait (1) seconds\nend\n\n@その他\n\nwhen flag clicked\nhide\nswitch costume to (2 v)\nwait until <(プログラム管理) = [つくる]>\ngo to x: (0) y: (0)\nshow\nforever\n    if <(プログラム管理) = [つくる]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nthink [sorry,you can't use it　まだ使えません] for (2) seconds\n\n@エフェクト\n\nwhen I receive [エフェクト v]\nset [ghost v] effect to (0)\nset size to (100) %\ngo to x: (0) y: (0)\nswitch costume to (null v)\nshow\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [ghost v] effect to (0)\nset size to (100) %\ngo to x: (0) y: (0)\nswitch costume to (null v)\nshow\nforever\n    if <(プログラム管理) = [つくる]> then\n        set [クローン？ v] to [0]\n    end\nend\n\nwhen I start as a clone\nset size to (100) %\nset [ghost v] effect to (0)\nif <<not <(クローン？) = [1]>> and <(エフェクトクローンズ) = [1]>> then\n    set [クローン？ v] to [1]\n    switch costume to (鍵 v)\n    go to x: (0) y: (キャラ　Y座標)\n    set size to (100) %\n    repeat (10)\n        change size by (2)\n        change [ghost v] effect by (10)\n    end\nelse\n    if <<not <(クローン？) = [2]>> and <(エフェクトクローンズ) = [2]>> then\n        set [クローン？ v] to [2]\n        switch costume to (はた v)\n        go to x: (0) y: (キャラ　Y座標)\n        set size to (100) %\n        repeat (10)\n            change size by (2)\n            change [ghost v] effect by (10)\n        end\n    else\n        if <(エフェクトクローンズ) = [3]> then\n            set [ゴールエフェクト v] to [-21.5]\n            go to x: (270) y: (0)\n            switch costume to (ゴール v)\n            repeat (20)\n                change x by (ゴールエフェクト)\n                change [ゴールエフェクト v] by (1)\n            end\n            wait (1) seconds\n            set [プログラム管理 v] to [つくる]\n            broadcast (ストップ v)\n            go to [front v] layer\n            repeat (30)\n                go to [front v] layer\n                change x by (ゴールエフェクト)\n                change [ゴールエフェクト v] by (-1)\n            end\n            switch costume to (null v)\n        end\n    end\nend\ndelete this clone\n\n@広告\n\nwhen flag clicked\nset [ghost v] effect to (100)\nhide\ngo to x: (0) y: (-180)\nwait (20) seconds\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\n    change y by (2)\nend\nwait (3) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\n    change y by (-2)\nend\n\n