【Rotate】100%PEN Platformer
@Stage\n\n@サムネ\n\nwhen flag clicked\nhide\n\nerase all\nshow\n\n@all\n\ndefine 四角同士の当たり判定確認 (x1) (y1) (x2) (y2) (x3) (y3) (x4) (y4)\nset [四角当たり判定 v] to <<<(y1) > (y4)> and <(y3) > (y2)>> and <<(x4) > (x1)> and <(x2) > (x3)>>>\n\ndefine /fill (x1) (y1) (x2) (y2) (x3) (y3) (変数)\nreplace item (1) of [/fill v] with ([sqrt v] of ((((x1) - (x2)) * ((x1) - (x2))) + (((y1) - (y2)) * ((y1) - (y2)))) )\nreplace item (2) of [/fill v] with ([sqrt v] of ((((x2) - (x3)) * ((x2) - (x3))) + (((y2) - (y3)) * ((y2) - (y3)))) )\nreplace item (3) of [/fill v] with ([sqrt v] of ((((x3) - (x1)) * ((x3) - (x1))) + (((y3) - (y1)) * ((y3) - (y1)))) )\nreplace item (4) of [/fill v] with (((item (1) of [/fill v]) + ((item (2) of [/fill v]) + (item (3) of [/fill v]))) / (2))\nreplace item (6) of [/fill v] with ([sqrt v] of ((((item (4) of [/fill v]) - (item (1) of [/fill v])) * (((item (4) of [/fill v]) - (item (2) of [/fill v])) * ((item (4) of [/fill v]) - (item (3) of [/fill v])))) / (item (4) of [/fill v])) )\nreplace item (4) of [/fill v] with ((((x1) * (item (2) of [/fill v])) + (((x2) * (item (3) of [/fill v])) + ((x3) * (item (1) of [/fill v])))) / ((item (1) of [/fill v]) + ((item (2) of [/fill v]) + (item (3) of [/fill v]))))\nreplace item (5) of [/fill v] with ((((y1) * (item (2) of [/fill v])) + (((y2) * (item (3) of [/fill v])) + ((y3) * (item (1) of [/fill v])))) / ((item (1) of [/fill v]) + ((item (2) of [/fill v]) + (item (3) of [/fill v]))))\nreplace item (7) of [/fill v] with [2]\nset pen size to (item (6) of [/fill v])\nGo to (((((item (7) of [/fill v]) - (1)) * (x1)) + (item (4) of [/fill v])) / (item (7) of [/fill v])) (((((item (7) of [/fill v]) - (1)) * (y1)) + (item (5) of [/fill v])) / (item (7) of [/fill v])) (変数)\npen down\nrepeat until <(round (item (6) of [/fill v])) < [1]>\n    set pen size to (item (6) of [/fill v])\n    Go to (((((item (7) of [/fill v]) - (1)) * (x1)) + (item (4) of [/fill v])) / (item (7) of [/fill v])) (((((item (7) of [/fill v]) - (1)) * (y1)) + (item (5) of [/fill v])) / (item (7) of [/fill v])) (変数)\n    Go to (((((item (7) of [/fill v]) - (1)) * (x2)) + (item (4) of [/fill v])) / (item (7) of [/fill v])) (((((item (7) of [/fill v]) - (1)) * (y2)) + (item (5) of [/fill v])) / (item (7) of [/fill v])) (変数)\n    Go to (((((item (7) of [/fill v]) - (1)) * (x3)) + (item (4) of [/fill v])) / (item (7) of [/fill v])) (((((item (7) of [/fill v]) - (1)) * (y3)) + (item (5) of [/fill v])) / (item (7) of [/fill v])) (変数)\n    Go to (((((item (7) of [/fill v]) - (1)) * (x1)) + (item (4) of [/fill v])) / (item (7) of [/fill v])) (((((item (7) of [/fill v]) - (1)) * (y1)) + (item (5) of [/fill v])) / (item (7) of [/fill v])) (変数)\n    replace item (6) of [/fill v] with ((item (6) of [/fill v]) / (2))\n    replace item (7) of [/fill v] with ((item (7) of [/fill v]) * (2))\nend\nset pen size to (1)\nGo to (x1) (y1) (変数)\npen down\nGo to (x2) (y2) (変数)\nGo to (x3) (y3) (変数)\nGo to (x1) (y1) (変数)\npen up\n\ndefine 地点への向き (ax) (ay) (bx) (by)\nset [地点への向き v] to (() - (([atan v] of (((ay) - (by)) / ((ax) - (bx))) ) + ((((90) * ((1) - (<[0] < ((ax) - (bx))> * (2)))) * ((1) - (<<((ax) - (bx)) = [0]> and <[0] < ((ay) - (by))>> * (2)))) * ((1) + (<<((ax) - (bx)) = [0]> and <((ay) - (by)) < [0]>> * (2))))))\n\ndefine 二点間距離 (a x) (a y) (b x) (b y)\nset [二点間距離 v] to ([sqrt v] of ((((a x) - (b x)) * ((a x) - (b x))) + (((a y) - (b y)) * ((a y) - (b y)))) )\n\ndefine fill (x1) (y1) (x2) (y2)\nreplace item (3) of [fill v] with <((x1) - (x2)) < [0]>\nreplace item (4) of [fill v] with <((y1) - (y2)) < [0]>\nreplace item (1) of [fill v] with (((x1) + ((-.5) + (item (3) of [fill v]))) - (item (13) of [fill v]))\nreplace item (2) of [fill v] with (((y1) + ((-.5) + (item (4) of [fill v]))) - (item (14) of [fill v]))\nreplace item (3) of [fill v] with (((x2) + ((.5) - (item (3) of [fill v]))) - (item (13) of [fill v]))\nreplace item (4) of [fill v] with (((y2) + ((.5) - (item (4) of [fill v]))) - (item (14) of [fill v]))\nDirection (item (1) of [fill v]) (item (2) of [fill v]) [5] [6]\nDirection (item (1) of [fill v]) (item (4) of [fill v]) [7] [8]\nDirection (item (3) of [fill v]) (item (2) of [fill v]) [9] [10]\nDirection (item (3) of [fill v]) (item (4) of [fill v]) [11] [12]\nreplace item (5) of [@変数 v] with [7]\nreplace item (1) of [fill v] with (item (5) of [fill v])\nreplace item (2) of [fill v] with (item (6) of [fill v])\nreplace item (3) of [fill v] with (item (5) of [fill v])\nreplace item (4) of [fill v] with (item (6) of [fill v])\nrepeat (3)\n    if <(item (item (5) of [@変数 v]) of [fill v]) < (item (1) of [fill v])> then\n        replace item (1) of [fill v] with (item (item (5) of [@変数 v]) of [fill v])\n    end\n    if <(item ((item (5) of [@変数 v]) + (1)) of [fill v]) > (item (2) of [fill v])> then\n        replace item (2) of [fill v] with (item ((item (5) of [@変数 v]) + (1)) of [fill v])\n    end\n    if <(item (item (5) of [@変数 v]) of [fill v]) > (item (3) of [fill v])> then\n        replace item (3) of [fill v] with (item (item (5) of [@変数 v]) of [fill v])\n    end\n    if <(item ((item (5) of [@変数 v]) + (1)) of [fill v]) < (item (4) of [fill v])> then\n        replace item (4) of [fill v] with (item ((item (5) of [@変数 v]) + (1)) of [fill v])\n    end\n    replace item (5) of [@変数 v] with ((item (5) of [@変数 v]) + (2))\nend\n四角同士の当たり判定確認 [-241] [181] [241] [-181] (item (1) of [fill v]) (item (2) of [fill v]) (item (3) of [fill v]) (item (4) of [fill v])\nif <(四角当たり判定) = [true]> then\n    replace item (18) of [fill v] with (letter (1) of (item ((item (1) of [@変数 v]) + (4)) of [stage v]))\n    replace item (19) of [fill v] with (letter (2) of (item ((item (1) of [@変数 v]) + (4)) of [stage v]))\n    if <(item (18) of [fill v]) = [7]> then\n        if <(item (19) of [fill v]) = [1]> then\n            /fill (item (11) of [fill v]) (item (12) of [fill v]) (item (7) of [fill v]) (item (8) of [fill v]) (item (9) of [fill v]) (item (10) of [fill v]) []\n        else\n            if <(item (19) of [fill v]) = [2]> then\n                /fill (item (11) of [fill v]) (item (12) of [fill v]) (item (5) of [fill v]) (item (6) of [fill v]) (item (9) of [fill v]) (item (10) of [fill v]) []\n            else\n                if <(item (19) of [fill v]) = [3]> then\n                    /fill (item (5) of [fill v]) (item (6) of [fill v]) (item (7) of [fill v]) (item (8) of [fill v]) (item (11) of [fill v]) (item (12) of [fill v]) []\n                else\n                    /fill (item (5) of [fill v]) (item (6) of [fill v]) (item (7) of [fill v]) (item (8) of [fill v]) (item (9) of [fill v]) (item (10) of [fill v]) []\n                end\n            end\n        end\n    else\n        if <(軽量化) = [2]> then\n            set pen size to (1)\n            go to x: (item (5) of [fill v]) y: (item (6) of [fill v])\n            pen down\n            go to x: (item (7) of [fill v]) y: (item (8) of [fill v])\n            go to x: (item (11) of [fill v]) y: (item (12) of [fill v])\n            go to x: (item (9) of [fill v]) y: (item (10) of [fill v])\n            go to x: (item (5) of [fill v]) y: (item (6) of [fill v])\n            pen up\n        else\n            fill (item (5) of [fill v]) (item (6) of [fill v]) (item (7) of [fill v]) (item (8) of [fill v]) (item (11) of [fill v]) (item (12) of [fill v]) (item (9) of [fill v]) (item (10) of [fill v]) ((direction) + (90))\n        end\n    end\nend\n\n/fill (item (5) of [fill v]) (item (6) of [fill v]) (item (7) of [fill v]) (item (8) of [fill v]) (item (9) of [fill v]) (item (10) of [fill v]) []\n/fill (item (11) of [fill v]) (item (12) of [fill v]) (item (7) of [fill v]) (item (8) of [fill v]) (item (9) of [fill v]) (item (10) of [fill v]) []\n\ndefine stage追加 (x1) (y1) (x2) (y2) (ブロック) (色)\nif <(x1) < (x2)> then\n    add (x1) to [stage v]\nelse\n    add (x2) to [stage v]\nend\nif <(y1) < (y2)> then\n    add (y2) to [stage v]\nelse\n    add (y1) to [stage v]\nend\nif <(x1) < (x2)> then\n    add (x2) to [stage v]\nelse\n    add (x1) to [stage v]\nend\nif <(y1) < (y2)> then\n    add (y1) to [stage v]\nelse\n    add (y2) to [stage v]\nend\nadd (ブロック) to [stage v]\nadd (色) to [stage v]\n\nwhen flag clicked\nReset\nforever\n    cam direction [5]\n    if <<(イベント) = [0]> or <<(イベント) = [3]> or <(イベント) = [5]>>> then\n        cam 追尾 (x) ((y) + (60)) [10]\n    else\n        if <[-120] < (x)> then\n            cam 追尾 [0] [2086] [10]\n        else\n            cam 追尾 [-1110] [2086] [10]\n            if <[-1220] < (x)> then\n                set [cam x v] to ((x) + (110))\n            end\n        end\n    end\n    背景描画\n    stage描画\n    if <(イベント) = [5]> then\n        You won\n    end\n    player描画 [100]\n    move\n    if <<(イベント) = [2]> or (item (5) of [押されてるキー v])> then\n        if <(チェックポイントx) = [-1240]> then\n            set [イベント v] to [1]\n            set [イベント2 v] to [2]\n        else\n            if <<(チェックポイントx) = [60]> or <(チェックポイントx) = [-470]>> then\n                set [イベント v] to [3]\n                set [イベント2 v] to [0]\n            else\n                if <(チェックポイントy) = [1]> then\n                    set [イベント v] to [5]\n                    set [イベント2 v] to [0]\n                else\n                    set [イベント v] to [0]\n                    set [イベント2 v] to [0]\n                end\n            end\n        end\n        set [x v] to ((チェックポイントx) + (((-10) * <(チェックポイントd) = [1]>) + ((10) * <(チェックポイントd) = [2]>)))\n        set [y v] to ((チェックポイントy) + (((-10) * <(チェックポイントd) = [3]>) + ((10) * <(チェックポイントd) = [4]>)))\n        set [direction 2 v] to (チェックポイントd)\n        set [direction 4 v] to [0]\n        set [x speed v] to [0]\n        set [y speed v] to [0]\n        set [落下量 v] to [0]\n        stage更新\n    end\n    if <(イベント) = [4]> then\n        ゴール\n    end\nend\n\ndefine stage描画\ndelete all of [stage当たり判定 v]\nreplace item (13) of [fill v] with (((<(direction 2) = [3]> * (-60)) + (<(direction 2) = [4]> * (60))) + (cam x))\nreplace item (14) of [fill v] with ((<<(direction 2) = [1]> or <(direction 2) = [2]>> * (cam y)) + ((<<(direction 2) = [3]> or <(direction 2) = [4]>> * (cam y)) + ((<<(direction 2) = [4]> or <(direction 2) = [3]>> * (-45)) + (<(direction 2) = [2]> * (-120)))))\nreplace item (1) of [@変数 v] with [1]\nrepeat ((length of [stage v]) / (6))\n    set pen color to (item ((item (1) of [@変数 v]) + (5)) of [stage v])\n    if <<(item ((item (1) of [@変数 v]) + (4)) of [stage v]) = [4]> or <<(item ((item (1) of [@変数 v]) + (4)) of [stage v]) = [6]> or <(item ((item (1) of [@変数 v]) + (4)) of [stage v]) = [10]>>> then\n        描画2 (item (item (1) of [@変数 v]) of [stage v]) (item ((item (1) of [@変数 v]) + (1)) of [stage v]) (item ((item (1) of [@変数 v]) + (2)) of [stage v]) (item ((item (1) of [@変数 v]) + (3)) of [stage v]) (item ((item (1) of [@変数 v]) + (5)) of [stage v])\n    else\n        if <(item ((item (1) of [@変数 v]) + (4)) of [stage v]) = [5]> then\n    end\n    if <((item (item (1) of [@変数 v]) of [stage v]) - (x)) < [51]> then\n        if <((item ((item (1) of [@変数 v]) + (1)) of [stage v]) - (y)) > [-51]> then\n            if <((item ((item (1) of [@変数 v]) + (2)) of [stage v]) - (x)) > [-51]> then\n                if <((item ((item (1) of [@変数 v]) + (3)) of [stage v]) - (y)) < [51]> then\n                    add (item (item (1) of [@変数 v]) of [stage v]) to [stage当たり判定 v]\n                    add (item ((item (1) of [@変数 v]) + (1)) of [stage v]) to [stage当たり判定 v]\n                    add (item ((item (1) of [@変数 v]) + (2)) of [stage v]) to [stage当たり判定 v]\n                    add (item ((item (1) of [@変数 v]) + (3)) of [stage v]) to [stage当たり判定 v]\n                    add (item ((item (1) of [@変数 v]) + (4)) of [stage v]) to [stage当たり判定 v]\n                    add (item ((item (1) of [@変数 v]) + (5)) of [stage v]) to [stage当たり判定 v]\n                end\n            end\n        end\n    end\n    replace item (1) of [@変数 v] with ((item (1) of [@変数 v]) + (6))\nend\n\ndefine Reset\nset [チェックポイントx v] to [10]\nset [チェックポイントy v] to [0]\nset [チェックポイントd v] to [1]\nset [x v] to [0]\nset [y v] to [0]\nset [cam x v] to [0]\nset [cam y v] to [60]\nset [x speed v] to [0]\nset [y speed v] to [0]\nset [direction v] to [0]\nset [direction 2 v] to [1]\nset [direction 3 v] to [0]\nset [direction 4 v] to [0]\nset [direction 5 v] to [1]\nset [イベント v] to [0]\nset [イベント2 v] to [0]\nset [落下量 v] to [0]\nstage更新\n\ndefine move\n押されてるキー\nset [direction 5 v] to (direction 2)\nmove2 ((1) + <(direction 2) > [2]>)\nmove2 ((2) - <(direction 2) > [2]>)\nif <(item (3) of [押されてるキー v]) > [1]> then\n    replace item (3) of [押されてるキー v] with ((item (3) of [押されてるキー v]) + (1))\nend\n\ndefine 当たり判定確認 (x,y)\ndelete all of [player当たり判定 v]\nrepeat (length of [触れているブロック v])\n    insert [0] at (1) of [触れているブロック v] \n    delete (length of [触れているブロック v]) of [触れているブロック v]\nend\nreplace item (1) of [触れているブロック2 v] with []\nplayer当たり判定追加 ((x) + (-20)) ((y) + (20))\nplayer当たり判定追加 ((x) + (20)) ((y) + (-20))\nif <(x,y) = [1]> then\n    replace item (4) of [触れているブロック2 v] with ((1) - (<(x speed) < [0]> * (2)))\n    replace item (3) of [触れているブロック2 v] with ((x) + ((20) * (item (4) of [触れているブロック2 v])))\nelse\n    replace item (4) of [触れているブロック2 v] with ((1) - (<(y speed) < [0]> * (2)))\n    replace item (3) of [触れているブロック2 v] with ((y) + ((20) * (item (4) of [触れているブロック2 v])))\nend\nreplace item (1) of [@変数 v] with [1]\nrepeat ((length of [stage当たり判定 v]) / (6))\n    if <(item ((item (1) of [@変数 v]) + (4)) of [stage当たり判定 v]) = [10]> then\n        二点間距離 (item (item (1) of [@変数 v]) of [stage当たり判定 v]) (item ((item (1) of [@変数 v]) + (1)) of [stage当たり判定 v]) (x) (y)\n        if <(二点間距離) < [50]> then\n            replace item (10) of [触れているブロック v] with [1]\n        end\n    else\n        repeat (length of [player当たり判定 v])\n            四角同士の当たり判定確認 (item (item (1) of [@変数 v]) of [stage当たり判定 v]) (item ((item (1) of [@変数 v]) + (1)) of [stage当たり判定 v]) (item ((item (1) of [@変数 v]) + (2)) of [stage当たり判定 v]) (item ((item (1) of [@変数 v]) + (3)) of [stage当たり判定 v]) (item (1) of [player当たり判定 v]) (item (2) of [player当たり判定 v]) (item (3) of [player当たり判定 v]) (item (4) of [player当たり判定 v])\n            if <(四角当たり判定) = [true]> then\n                replace item (item ((item (1) of [@変数 v]) + (4)) of [stage当たり判定 v]) of [触れているブロック v] with [1]\n                if <(item ((item (1) of [@変数 v]) + (4)) of [stage当たり判定 v]) = [4]> then\n                    if <not <<(チェックポイントx) = (item (item (1) of [@変数 v]) of [stage当たり判定 v])> and <<(チェックポイントy) = (item ((item (1) of [@変数 v]) + (1)) of [stage当たり判定 v])> and <(チェックポイントd) = (item ((item (1) of [@変数 v]) + (5)) of [stage当たり判定 v])>>>> then\n                        start sound [ v]\n                        set [チェックポイントx v] to (item (item (1) of [@変数 v]) of [stage当たり判定 v])\n                        set [チェックポイントy v] to (item ((item (1) of [@変数 v]) + (1)) of [stage当たり判定 v])\n                        set [チェックポイントd v] to (item ((item (1) of [@変数 v]) + (5)) of [stage当たり判定 v])\n                    end\n                end\n            end\n        end\n    end\n    replace item (1) of [@変数 v] with ((item (1) of [@変数 v]) + (6))\nend\nイベント\n\ndefine player当たり判定追加 (x) (y)\nadd (x) to [player当たり判定 v]\nadd (y) to [player当たり判定 v]\n\ndefine 座標調整 (x,y) (触れているブロック)\nif <(x,y) = [1]> then\n    replace item (3) of [@変数 v] with (x)\n    replace item (4) of [@変数 v] with (x speed)\nelse\n    replace item (3) of [@変数 v] with (y)\n    replace item (4) of [@変数 v] with (y speed)\nend\nrepeat until <([abs v] of (item (4) of [@変数 v]) ) < [.1]>\n    replace item (4) of [@変数 v] with ((item (4) of [@変数 v]) / (2))\n    replace item (3) of [@変数 v] with ((item (3) of [@変数 v]) + (item (4) of [@変数 v]))\n    if <(x,y) = [1]> then\n        set [x v] to (item (3) of [@変数 v])\n    else\n        set [y v] to (item (3) of [@変数 v])\n    end\n    当たり判定確認 (x,y)\n    if (item (触れているブロック) of [触れているブロック v]) then\n        replace item (3) of [@変数 v] with ((item (3) of [@変数 v]) - (item (4) of [@変数 v]))\n    end\nend\nif <(x,y) = [1]> then\n    set [x v] to (item (3) of [@変数 v])\nelse\n    set [y v] to (item (3) of [@変数 v])\nend\n\ndefine Direction (x) (y) (fill1) (fill2)\n地点への向き (x) (y) [] []\n二点間距離 (x) (y) [] []\nreplace item (fill1) of [fill v] with (() + ((二点間距離) * ([sin v] of ((地点への向き) + (direction)) )))\nreplace item (fill2) of [fill v] with (() + ((二点間距離) * ([cos v] of ((地点への向き) + (direction)) )))\n\ndefine cam direction (speed)\nchange [direction 4 v] by ((() - (direction 4)) / (speed))\nset [direction v] to ((direction 4) + ((<(direction 2) = [1]> * (0)) + ((<(direction 2) = [2]> * (-180)) + ((<(direction 2) = [3]> * (90)) + (<(direction 2) = [4]> * (-90))))))\n\ndefine cam 追尾 (x) (y) (speed)\nchange [cam x v] by (((x) - (cam x)) / (speed))\nchange [cam y v] by (((y) - (cam y)) / (speed))\n\ndefine 背景描画\nerase all\ngo to x: (0) y: (0)\nset pen size to (666)\nset pen color to (#f5f5f5)\npen down\npen up\n\nset pen color to (#b3e8a8)\n\ndefine 押されてるキー\nタブレット\nreplace item (1) of [押されてるキー v] with <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > [110]>>>\nreplace item (2) of [押されてるキー v] with <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < [-110]>>>\nreplace item (4) of [押されてるキー v] with <<key (down arrow v) pressed?> or <key (s v) pressed?>>\nreplace item (5) of [押されてるキー v] with <key (r v) pressed?>\nif <((item (3) of [押されてるキー v]) + ()) > [0]> then\n    if <<not <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > [50]>>>> or <((item (3) of [押されてるキー v]) + ()) > [10]>> then\n        replace item (3) of [押されてるキー v] with [0]\n    end\nelse\n    if <((item (3) of [押されてるキー v]) + ()) = [0]> then\n        replace item (3) of [押されてるキー v] with <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > [50]>>>\n    end\nend\n\ndefine イベント\nif <<(イベント) = [4]> or (item (10) of [触れているブロック v])> then\n    set [イベント v] to [4]\nelse\n    if <<(イベント) = [2]> or <<<not (item (1) of [触れているブロック v])> and (item (2) of [触れているブロック v])> or <(item (5) of [触れているブロック v]) and <(落下量) > [700]>>>> then\n        if <(イベント) = [2]> then\n    else\n        if (item (3) of [触れているブロック v]) then\n            if <(イベント2) = [0]> then\n                set [イベント v] to [1]\n                set [イベント2 v] to [1]\n                if <(direction 2) = [2]> then\n                    set [direction 2 v] to [3]\n                    set [direction 4 v] to [90]\n                    set [y speed v] to [8]\n                end\n                stage更新\n            else\n                if <(イベント2) = [2]> then\n                    set [イベント v] to [0]\n                    set [イベント2 v] to [3]\n                    stage更新\n                end\n            end\n        else\n            if (item (8) of [触れているブロック v]) then\n                if <(イベント2) = [2]> then\n                    set [イベント v] to [3]\n                    set [イベント2 v] to [4]\n                    stage更新\n                else\n                    if <<(イベント2) = [5]> or <(イベント2) = [0]>> then\n                        set [イベント v] to [1]\n                        set [イベント2 v] to [6]\n                        if <(direction 2) = [1]> then\n                            set [direction 2 v] to [3]\n                            set [direction 4 v] to [-90]\n                            set [y speed v] to [-8]\n                        end\n                        stage更新\n                    end\n                end\n            else\n                if (item (9) of [触れているブロック v]) then\n            end\n        end\n        if <not (item (3) of [触れているブロック v])> then\n            if <(イベント2) = [1]> then\n                set [イベント2 v] to [2]\n            end\n            if <(イベント2) = [3]> then\n                if <(y) > [1800]> then\n                    set [イベント v] to [1]\n                    set [イベント2 v] to [1]\n                    stage更新\n                else\n                    set [イベント2 v] to [0]\n                end\n            end\n            if <(イベント2) = [2]> then\n                if <(y) < [1780]> then\n                    set [イベント v] to [0]\n                    set [イベント2 v] to [0]\n                    stage更新\n                end\n            end\n        end\n        if <not (item (8) of [触れているブロック v])> then\n            if <(イベント2) = [4]> then\n                set [イベント2 v] to [5]\n            end\n            if <(イベント2) = [5]> then\n                if <(y) > [2262]> then\n                    set [イベント v] to [3]\n                    set [イベント2 v] to [0]\n                    stage更新\n                else\n                    if <(y) < [2240]> then\n                        set [イベント v] to [1]\n                        set [イベント2 v] to [2]\n                        stage更新\n                    end\n                end\n            end\n            if <(イベント2) = [6]> then\n                if <(y) > [2262]> then\n                    set [イベント v] to [3]\n                    set [イベント2 v] to [0]\n                    stage更新\n                else\n                    set [イベント2 v] to [2]\n                end\n            end\n        end\n    end\nend\n\ndefine 描画2 (x1) (y1) (x2) (y2) (向き)\nreplace item (1) of [fill v] with ((x1) - (item (13) of [fill v]))\nreplace item (2) of [fill v] with ((y1) - (item (14) of [fill v]))\nreplace item (3) of [fill v] with ((x2) - (item (13) of [fill v]))\nreplace item (4) of [fill v] with ((y2) - (item (14) of [fill v]))\nDirection (item (1) of [fill v]) (item (2) of [fill v]) [5] [6]\nDirection (item (1) of [fill v]) (item (4) of [fill v]) [7] [8]\nDirection (item (3) of [fill v]) (item (2) of [fill v]) [9] [10]\nDirection (item (3) of [fill v]) (item (4) of [fill v]) [11] [12]\nreplace item (5) of [@変数 v] with [7]\nreplace item (1) of [fill v] with (item (5) of [fill v])\nreplace item (2) of [fill v] with (item (6) of [fill v])\nreplace item (3) of [fill v] with (item (5) of [fill v])\nreplace item (4) of [fill v] with (item (6) of [fill v])\nrepeat (3)\n    if <(item (item (5) of [@変数 v]) of [fill v]) < (item (1) of [fill v])> then\n        replace item (1) of [fill v] with (item (item (5) of [@変数 v]) of [fill v])\n    end\n    if <(item ((item (5) of [@変数 v]) + (1)) of [fill v]) > (item (2) of [fill v])> then\n        replace item (2) of [fill v] with (item ((item (5) of [@変数 v]) + (1)) of [fill v])\n    end\n    if <(item (item (5) of [@変数 v]) of [fill v]) > (item (3) of [fill v])> then\n        replace item (3) of [fill v] with (item (item (5) of [@変数 v]) of [fill v])\n    end\n    if <(item ((item (5) of [@変数 v]) + (1)) of [fill v]) < (item (4) of [fill v])> then\n        replace item (4) of [fill v] with (item ((item (5) of [@変数 v]) + (1)) of [fill v])\n    end\n    replace item (5) of [@変数 v] with ((item (5) of [@変数 v]) + (2))\nend\n四角同士の当たり判定確認 [-250] [190] [250] [-190] (item (1) of [fill v]) (item (2) of [fill v]) (item (3) of [fill v]) (item (4) of [fill v])\nif <(四角当たり判定) = [true]> then\n    if <(item ((item (1) of [@変数 v]) + (4)) of [stage v]) = [10]> then\n        Direction ((x1) - (item (13) of [fill v])) ((y1) - (item (14) of [fill v])) [1] [2]\n        replace item (3) of [fill v] with [60]\n        go to x: (item (1) of [fill v]) y: (item (2) of [fill v])\n        set pen color to (#f590d0)\n        repeat (10)\n            set pen size to (item (3) of [fill v])\n            pen down\n            pen up\n            change pen (saturation v) by (-2.5)\n            replace item (3) of [fill v] with ((item (3) of [fill v]) + (-6))\n        end\n    else\n        if <(item ((item (1) of [@変数 v]) + (4)) of [stage v]) = [6]> then\n            replace item (1) of [fill v] with ((x1) - (item (13) of [fill v]))\n            replace item (2) of [fill v] with ((y1) - (item (14) of [fill v]))\n            replace item (3) of [fill v] with ((x2) - (item (13) of [fill v]))\n            replace item (4) of [fill v] with ((y2) - (item (14) of [fill v]))\n            replace item (16) of [fill v] with (join (letter (2) of (向き)) (join (letter (3) of (向き)) (letter (4) of (向き))))\n            replace item (17) of [fill v] with ((<(letter (1) of (向き)) = [1]> * (0)) + ((<(letter (1) of (向き)) = [2]> * (180)) + ((<(letter (1) of (向き)) = [3]> * (270)) + (<(letter (1) of (向き)) = [4]> * (90)))))\n            set pen size to (6)\n            set pen color to (#ceaf8e)\n            Direction 2 [0] [-20] [] [] [5] [6] (item (17) of [fill v]) []\n            Direction 2 [0] [17] [] [] [7] [8] (item (17) of [fill v]) []\n            Direction (item (5) of [fill v]) (item (6) of [fill v]) [9] [10]\n            go to x: (item (9) of [fill v]) y: (item (10) of [fill v])\n            pen down\n            Direction (item (7) of [fill v]) (item (8) of [fill v]) [9] [10]\n            go to x: (item (9) of [fill v]) y: (item (10) of [fill v])\n            pen up\n            set pen color to (#efcca7)\n            Direction 2 [-15] [10] [0] [5] [5] [6] ((item (17) of [fill v]) + (item (16) of [fill v])) (向き)\n            Direction 2 [-15] [0] [0] [5] [7] [8] ((item (17) of [fill v]) + (item (16) of [fill v])) (向き)\n            Direction 2 [10] [10] [0] [5] [9] [10] ((item (17) of [fill v]) + (item (16) of [fill v])) (向き)\n            Direction (item (5) of [fill v]) (item (6) of [fill v]) [5] [6]\n            Direction (item (7) of [fill v]) (item (8) of [fill v]) [7] [8]\n            Direction (item (9) of [fill v]) (item (10) of [fill v]) [9] [10]\n            /fill (item (5) of [fill v]) (item (6) of [fill v]) (item (7) of [fill v]) (item (8) of [fill v]) (item (9) of [fill v]) (item (10) of [fill v]) []\n            Direction 2 [10] [0] [0] [5] [5] [6] ((item (17) of [fill v]) + (item (16) of [fill v])) (向き)\n            Direction (item (5) of [fill v]) (item (6) of [fill v]) [5] [6]\n            /fill (item (5) of [fill v]) (item (6) of [fill v]) (item (7) of [fill v]) (item (8) of [fill v]) (item (9) of [fill v]) (item (10) of [fill v]) []\n            Direction 2 [20] [5] [0] [5] [7] [8] ((item (17) of [fill v]) + (item (16) of [fill v])) (向き)\n            Direction (item (7) of [fill v]) (item (8) of [fill v]) [7] [8]\n            /fill (item (5) of [fill v]) (item (6) of [fill v]) (item (7) of [fill v]) (item (8) of [fill v]) (item (9) of [fill v]) (item (10) of [fill v]) []\n        else\n            replace item (15) of [fill v] with [0]\n            if <(向き) = [1]> then\n                replace item (1) of [fill v] with ((x1) - (item (13) of [fill v]))\n                replace item (2) of [fill v] with (((y2) - (item (14) of [fill v])) + (40))\n                replace item (3) of [fill v] with (((x1) - (item (13) of [fill v])) + (40))\n                replace item (4) of [fill v] with ((y2) - (item (14) of [fill v]))\n            else\n                if <(向き) = [2]> then\n                    replace item (1) of [fill v] with (((x1) - (item (13) of [fill v])) + (22))\n                    replace item (2) of [fill v] with ((y2) - (item (14) of [fill v]))\n                    replace item (3) of [fill v] with (((x1) - (item (13) of [fill v])) + (-18))\n                    replace item (4) of [fill v] with (((y2) - (item (14) of [fill v])) + (40))\n                else\n                    if <(向き) = [3]> then\n                        replace item (1) of [fill v] with ((x2) - (item (13) of [fill v]))\n                        replace item (2) of [fill v] with (((y2) - (item (14) of [fill v])) + (40))\n                        replace item (3) of [fill v] with (((x2) - (item (13) of [fill v])) + (-40))\n                        replace item (4) of [fill v] with ((y2) - (item (14) of [fill v]))\n                    else\n                        replace item (1) of [fill v] with (((x2) - (item (13) of [fill v])) + (-40))\n                        replace item (2) of [fill v] with (((y2) - (item (14) of [fill v])) + (-18))\n                        replace item (3) of [fill v] with ((x2) - (item (13) of [fill v]))\n                        replace item (4) of [fill v] with (((y2) - (item (14) of [fill v])) + (22))\n                    end\n                end\n            end\n            set pen size to (1)\n            if <<(x1) = (チェックポイントx)> and <(y1) = (チェックポイントy)>> then\n                set pen color to (#7fe8e8)\n            else\n                set pen color to (#f57070)\n            end\n            repeat (32)\n                if <(向き) < [3]> then\n                    Direction ((item (1) of [fill v]) + ((((item (3) of [fill v]) - (item (1) of [fill v])) / (40)) * ((7) + ((item (15) of [fill v]) * (1))))) ((item (2) of [fill v]) + ((((item (4) of [fill v]) - (item (2) of [fill v])) / (40)) * ((13) + (([sin v] of (((timer) * (200)) + ((item (15) of [fill v]) * (10))) ) * ((item (15) of [fill v]) / (4)))))) [5] [6]\n                else\n                    Direction ((item (3) of [fill v]) + ((((item (1) of [fill v]) - (item (3) of [fill v])) / (40)) * ((13) + (([sin v] of (((timer) * (200)) + ((item (15) of [fill v]) * (10))) ) * ((item (15) of [fill v]) / (4)))))) ((item (4) of [fill v]) + ((((item (2) of [fill v]) - (item (4) of [fill v])) / (40)) * ((7) + ((item (15) of [fill v]) * (1))))) [5] [6]\n                end\n                go to x: (item (5) of [fill v]) y: (item (6) of [fill v])\n                pen down\n                if <(向き) < [3]> then\n                    Direction ((item (1) of [fill v]) + ((((item (3) of [fill v]) - (item (1) of [fill v])) / (40)) * ((7) + ((item (15) of [fill v]) * (1))))) ((item (2) of [fill v]) + ((((item (4) of [fill v]) - (item (2) of [fill v])) / (40)) * ((30) + (([sin v] of (((timer) * (200)) + ((item (15) of [fill v]) * (10))) ) * ((item (15) of [fill v]) / (4)))))) [5] [6]\n                else\n                    Direction ((item (3) of [fill v]) + ((((item (1) of [fill v]) - (item (3) of [fill v])) / (40)) * ((30) + (([sin v] of (((timer) * (200)) + ((item (15) of [fill v]) * (10))) ) * ((item (15) of [fill v]) / (4)))))) ((item (4) of [fill v]) + ((((item (2) of [fill v]) - (item (4) of [fill v])) / (40)) * ((7) + ((item (15) of [fill v]) * (1))))) [5] [6]\n                end\n                go to x: (item (5) of [fill v]) y: (item (6) of [fill v])\n                pen up\n                replace item (15) of [fill v] with ((item (15) of [fill v]) + (.5))\n            end\n            set pen size to (5)\n            set pen color to (#e8aa64)\n            if <(向き) < [3]> then\n                Direction ((item (1) of [fill v]) + (((item (3) of [fill v]) - (item (1) of [fill v])) / (8))) ((item (4) of [fill v]) + ()) [5] [6]\n            else\n                Direction ((item (1) of [fill v]) + ()) ((item (4) of [fill v]) + (((item (2) of [fill v]) - (item (4) of [fill v])) / (8))) [5] [6]\n            end\n            go to x: (item (5) of [fill v]) y: (item (6) of [fill v])\n            pen down\n            if <(向き) < [3]> then\n                Direction ((item (1) of [fill v]) + (((item (3) of [fill v]) - (item (1) of [fill v])) / (8))) ((item (2) of [fill v]) + (((item (4) of [fill v]) - (item (2) of [fill v])) / (8))) [5] [6]\n            else\n                Direction ((item (3) of [fill v]) + (((item (1) of [fill v]) - (item (3) of [fill v])) / (8))) ((item (4) of [fill v]) + (((item (2) of [fill v]) - (item (4) of [fill v])) / (8))) [5] [6]\n            end\n            go to x: (item (5) of [fill v]) y: (item (6) of [fill v])\n            pen up\n            set pen size to (10)\n            set pen color to (#e8d34a)\n            pen down\n            pen up\n        end\n    end\nend\n\ndefine stage更新\ndelete all of [stage v]\nif <(イベント) = [0]> then\n    if <(軽量化) = [0]> then\n        stage追加 [160] [-60] [200] [-100] [6] [1000]\n        stage追加 [260] [200] [300] [160] [6] [3350]\n        stage追加 [60] [340] [20] [380] [6] [2010]\n        stage追加 [-640] [500] [-680] [540] [6] [4180]\n        stage追加 [-570] [910] [-610] [950] [6] [3000]\n        stage追加 [-500] [1300] [-540] [1260] [6] [1000]\n        stage追加 [-530] [1440] [-570] [1480] [6] [2340]\n        stage追加 [-1240] [1620] [-1200] [1660] [6] [3000]\n        stage追加 [-610] [1400] [-650] [1420] [6] [1200]\n    end\n    stage追加 [-200] [-100] [300] [-120] [1] [#b3e8a8]\n    stage追加 [300] [240] [320] [-120] [1] [#b3e8a8]\n    stage追加 [0] [400] [300] [380] [1] [#b3e8a8]\n    stage追加 [-150] [470] [40] [450] [1] [#b3e8a8]\n    stage追加 [-300] [540] [-110] [520] [1] [#b3e8a8]\n    stage追加 [-450] [610] [-260] [590] [1] [#b3e8a8]\n    stage追加 [-600] [680] [-410] [660] [1] [#b3e8a8]\n    stage追加 [-700] [900] [-680] [450] [1] [#b3e8a8]\n    stage追加 [-610] [830] [-570] [852] [4] [3]\n    stage追加 [-570] [1260] [-550] [800] [1] [#b3e8a8]\n    stage追加 [-590] [1060] [-570] [1000] [2] [#f36767]\n    stage追加 [-590] [1260] [-570] [1200] [2] [#f36767]\n    stage追加 [-550] [1260] [-450] [1240] [1] [#b3e8a8]\n    stage追加 [-450] [1500] [-430] [1240] [1] [#b3e8a8]\n    stage追加 [-1350] [1360] [-500] [1380] [2] [#f36767]\n    stage追加 [-1200] [1480] [-450] [1500] [1] [#b3e8a8]\n    stage追加 [-655] [1470] [-605] [1480] [2] [#f36767]\n    stage追加 [-670] [1380] [-590] [1390] [1] [#b3e8a8]\n    stage追加 [-855] [1470] [-805] [1480] [2] [#f36767]\n    stage追加 [-870] [1380] [-790] [1390] [1] [#b3e8a8]\n    stage追加 [-1055] [1470] [-1005] [1480] [2] [#f36767]\n    stage追加 [-1070] [1380] [-990] [1390] [1] [#b3e8a8]\n    []\n    stage追加 [-2000] [-120] [320] [-1000] [5] [#f5f5f5]\n    stage追加 [320] [1800] [2000] [-1000] [5] [#f5f5f5]\n    stage追加 [-2000] [1360] [-700] [-120] [5] [#f5f5f5]\n    stage追加 [120] [1800] [6000] [1820] [5] [#f5f5f5]\n    []\n    stage追加 [-1330] [1800] [-1200] [1820] [3] [#d8caf8]\n    stage追加 [-1240] [1929] [-1200] [1951] [4] [3]\n    stage追加 [-1350] [2282] [-1330] [1380] [2] [#f36767]\n    stage追加 [-1200] [2180] [-1180] [1500] [1] [#b3e8a8]\n    stage追加 [-1330] [2099] [-1270] [2119] [1] [#b3e8a8]\n    stage追加 [-1260] [2038] [-1190] [2058] [1] [#b3e8a8]\n    stage追加 [-1010] [1820] [-990] [2000] [1] [#b3e8a8]\n    []\n    stage追加 [120] [1800] [-1180] [1820] [2] [#f36767]\nelse\n    if <(イベント) = [1]> then\n        if <(軽量化) = [0]> then\n            stage追加 [100] [2450] [60] [2472] [6] [3000]\n            stage追加 [-1240] [1620] [-1200] [1660] [6] [3000]\n        end\n        stage追加 [-1200] [1480] [-450] [1500] [1] [#b3e8a8]\n        stage追加 [-1330] [1800] [-1200] [1820] [3] [#d8caf8]\n        stage追加 [-1240] [1929] [-1200] [1951] [4] [3]\n        stage追加 [-1350] [2282] [-1330] [1380] [2] [#f36767]\n        stage追加 [-1200] [2180] [-1180] [1500] [1] [#b3e8a8]\n        stage追加 [-1330] [2099] [-1270] [2119] [1] [#b3e8a8]\n        stage追加 [-1260] [2038] [-1190] [2058] [1] [#b3e8a8]\n        []\n        stage追加 [-1010] [2100] [-990] [2260] [1] [#b3e8a8]\n        stage追加 [-1010] [1820] [-990] [2000] [1] [#b3e8a8]\n        stage追加 [-820] [1820] [-800] [2180] [1] [#b3e8a8]\n        stage追加 [-640] [2125] [-620] [2175] [2] [#f36767]\n        stage追加 [-640] [1985] [-620] [2035] [2] [#f36767]\n        stage追加 [-620] [1950] [-430] [2280] [2] [#f36767]\n        stage追加 [-285] [1800] [-265] [1900] [2] [#f36767]\n        []\n        stage追加 [-435] [2260] [-1330] [2282] [2] [#f36767]\n        stage追加 [1000] [1800] [-1180] [1820] [2] [#f36767]\n        stage追加 [-55] [2260] [-265] [2282] [2] [#f36767]\n        []\n        stage追加 [-630] [1900] [-610] [2282] [1] [#b3e8a8]\n        stage追加 [-535] [1900] [-515] [2282] [1] [#b3e8a8]\n        stage追加 [-440] [1900] [-420] [2282] [1] [#b3e8a8]\n        stage追加 [-285] [1900] [-265] [2000] [1] [#b3e8a8]\n        stage追加 [-285] [2100] [-265] [2260] [1] [#b3e8a8]\n        stage追加 [-265] [2260] [-420] [2282] [1] [#b3e8a8]\n        stage追加 [100] [2260] [-55] [2282] [8] [#d8caf8]\n        stage追加 [100] [1820] [120] [3000] [1] [#b3e8a8]\n    else\n        if <(イベント) = [3]> then\n            if <(軽量化) = [0]> then\n                stage追加 [100] [2450] [60] [2472] [6] [3000]\n                stage追加 [100] [2800] [60] [2822] [6] [3340]\n                stage追加 [-1000] [3660] [-960] [3620] [6] [1180]\n            end\n            stage追加 [-265] [1800] [1000] [1820] [2] [#f36767]\n            stage追加 [-55] [2260] [-1000] [2282] [2] [#f36767]\n            stage追加 [100] [2260] [-55] [2282] [8] [#d8caf8]\n            stage追加 [60] [2700] [100] [2722] [4] [3]\n            stage追加 [100] [1820] [120] [3000] [1] [#b3e8a8]\n            stage追加 [100] [2900] [90] [2970] [9] [#eff18c]\n            stage追加 [-70] [3070] [-50] [3200] [1] [#b3e8a8]\n            stage追加 [-70] [3100] [-80] [3170] [9] [#eff18c]\n            stage追加 [-240] [3270] [-220] [3400] [1] [#b3e8a8]\n            stage追加 [-250] [3300] [-240] [3370] [9] [#eff18c]\n            stage追加 [-470] [3589] [-430] [3611] [4] [3]\n            stage追加 [-430] [3470] [-410] [3900] [1] [#b3e8a8]\n            stage追加 [-430] [3880] [-1200] [3900] [2] [#f36767]\n            stage追加 [-560] [3580] [-1200] [3600] [2] [#f36767]\n            stage追加 [-440] [3700] [-430] [3780] [9] [#eff18c]\n            stage追加 [-570] [3600] [-560] [3640] [9] [#eff18c]\n            stage追加 [-570] [3840] [-560] [3880] [9] [#eff18c]\n            stage追加 [-710] [3700] [-700] [3780] [9] [#eff18c]\n            stage追加 [-955] [3670] [-945] [3880] [9] [#eff18c]\n            stage追加 [-1180] [3600] [-890] [3620] [1] [#b3e8a8]\n            stage追加 [-1180] [3890] [-1200] [3590] [2] [#f36767]\n            stage追加 [-1100] [3700] [-1060] [3680] [10] []\n            stage追加 [120] [1800] [1000] [4000] [5] [#f5f5f5]\n            stage追加 [-1300] [3900] [120] [5000] [5] [#f5f5f5]\n            stage追加 [-1300] [0] [-3000] [3900] [5] [#f5f5f5]\n        else\n            if <(イベント) = [5]> then\n                stage追加 [-700] [-50] [700] [-70] [1] [#b3e8a8]\n                stage追加 [700] [0] [720] [-70] [9] [#eff18c]\n                stage追加 [-700] [0] [-720] [-70] [9] [#eff18c]\n                stage追加 [-2000] [-2000] [2000] [-70] [5] [#f5f5f5]\n            end\n        end\n    end\nend\n\ndefine player描画 (大きさ)\nset pen color to (#e0adf1)\nfill ((x) + ((-20) * ((大きさ) / (100)))) ((y) + ((20) * ((大きさ) / (100)))) ((x) + ((20) * ((大きさ) / (100)))) ((y) + ((-20) * ((大きさ) / (100))))\n\nset pen color to (#f1f1f1)\n\ndefine Direction 2 (x1) (y1) (x2) (y2) (fill1) (fill2) (direction) (向き)\n地点への向き (x1) (y1) (x2) (y2)\n二点間距離 (x1) (y1) (x2) (y2)\nreplace item (fill1) of [fill v] with (((<(letter (1) of (向き)) = [3]> * (-5)) + (<(letter (1) of (向き)) = [4]> * (5))) + (((item (1) of [fill v]) + (((item (3) of [fill v]) - (item (1) of [fill v])) / (2))) + ((二点間距離) * ([sin v] of ((地点への向き) + (direction)) ))))\nreplace item (fill2) of [fill v] with (((<(letter (1) of (向き)) = [1]> * (5)) + (<(letter (1) of (向き)) = [2]> * (-5))) + (((item (2) of [fill v]) + (((item (4) of [fill v]) - (item (2) of [fill v])) / (2))) + ((二点間距離) * ([cos v] of ((地点への向き) + (direction)) ))))\n\ndefine move2 (x,y)\nreplace item (6) of [@変数 v] with (x,y)\nif <(x,y) = [1]> then\n    if  then\n        set [x speed v] to (((x speed) + (((item (3) of [押されてるキー v]) - (item (4) of [押されてるキー v])) * (<(direction 2) = [4]> - <(direction 2) = [3]>))) * (.9))\n    else\n        set [x speed v] to ((((x speed) + ((<(direction 2) = [3]> - <(direction 2) = [4]>) * <([abs v] of (x speed) ) < [30]>)) * <<(direction 2) = [3]> or <(direction 2) = [4]>>) + (<<(direction 2) = [1]> or <(direction 2) = [2]>> * (((x speed) + (((1) - (<(direction 2) = [2]> * (2))) * ((item (1) of [押されてるキー v]) - (item (2) of [押されてるキー v])))) * (.9))))\n    end\n    change [x v] by (x speed)\n    change [落下量 v] by ([abs v] of ((x speed) * <<<(direction 2) = [3]> or <(direction 2) = [4]>> and <<<(x speed) > [0]> and <(direction 2) = [3]>> or <<(x speed) < [0]> and <(direction 2) = [4]>>>>) )\n    当たり判定確認 [1]\n    if <<<(落下量) > [0]> and <(item (9) of [触れているブロック v]) and (item (1) of [触れているブロック v])>> or <(item (9) of [触れているブロック v]) and <not (item (1) of [触れているブロック v])>>> then\n        set [落下量 v] to [0]\n        change [x v] by (() - (x speed))\n        座標調整 [1] [9]\n        if <(x speed) < [0]> then\n            set [x speed v] to [20]\n        else\n            set [x speed v] to [-20]\n        end\n    else\n        if (item (1) of [触れているブロック v]) then\n            set [落下量 v] to [0]\n            change [x v] by (() - (x speed))\n            座標調整 [1] [1]\n            if <(direction 2) = [1]> then\n                set [direction 3 v] to [1]\n                if <(x speed) < [0]> then\n                    set [direction 2 v] to [4]\n                    set [direction 4 v] to [90]\n                    set [y speed v] to (() - (x speed))\n                else\n                    set [direction 2 v] to [3]\n                    set [direction 4 v] to [-90]\n                    set [y speed v] to (x speed)\n                end\n                set [x speed v] to [0]\n            end\n            if <(direction 2) = [2]> then\n                set [direction 3 v] to [2]\n                if <(x speed) < [0]> then\n                    set [direction 2 v] to [4]\n                    set [direction 4 v] to [-90]\n                    set [y speed v] to (x speed)\n                else\n                    set [direction 2 v] to [3]\n                    set [direction 4 v] to [90]\n                    set [y speed v] to (() - (x speed))\n                end\n                set [x speed v] to [0]\n            end\n            if <(direction 2) = [3]> then\n                if <<(x speed) > [0]> and <(item (3) of [押されてるキー v]) = [true]>> then\n                    set [x speed v] to [-13]\n                    replace item (3) of [押されてるキー v] with [2]\n                else\n                    if <(x speed) < [0]> then\n                        if <not <(イベント) = [1]>> then\n                            set [direction 3 v] to [3]\n                            set [direction 2 v] to [4]\n                            set [direction 4 v] to [-180]\n                        end\n                    end\n                    set [x speed v] to [0]\n                end\n            end\n            if <(direction 2) = [4]> then\n                if <<(x speed) < [0]> and <(item (3) of [押されてるキー v]) = [true]>> then\n                    set [x speed v] to [13]\n                    replace item (3) of [押されてるキー v] with [2]\n                else\n                    if <(x speed) > [0]> then\n                        set [direction 3 v] to [4]\n                        set [direction 2 v] to [3]\n                        set [direction 4 v] to [180]\n                    end\n                    set [x speed v] to [0]\n                end\n            end\n        end\n    end\nelse\n    if < and <<(direction 2) = [1]> or <(direction 2) = [2]>>> then\n        set [y speed v] to (((y speed) + (((item (3) of [押されてるキー v]) - (item (4) of [押されてるキー v])) * (<(direction 2) = [1]> - <(direction 2) = [2]>))) * (.9))\n    else\n        set [y speed v] to ((((y speed) + ((<(direction 2) = [2]> - <(direction 2) = [1]>) * <([abs v] of (y speed) ) < [30]>)) * <<(direction 2) = [2]> or <(direction 2) = [1]>>) + (<<(direction 2) = [3]> or <(direction 2) = [4]>> * (((y speed) + (((1) - (<(direction 2) = [3]> * (2))) * ((item (2) of [押されてるキー v]) - (item (1) of [押されてるキー v])))) * (.9))))\n    end\n    change [y v] by (y speed)\n    change [落下量 v] by ([abs v] of ((y speed) * <<<(direction 2) = [1]> or <(direction 2) = [2]>> and <<<(y speed) < [0]> and <(direction 2) = [1]>> or <<(y speed) > [0]> and <(direction 2) = [2]>>>>) )\n    当たり判定確認 [2]\n    if <<<(落下量) > [0]> and <(item (9) of [触れているブロック v]) and (item (1) of [触れているブロック v])>> or <(item (9) of [触れているブロック v]) and <not (item (1) of [触れているブロック v])>>> then\n        set [落下量 v] to [0]\n        change [y v] by (() - (y speed))\n        座標調整 [2] [9]\n        if <(y speed) < [0]> then\n            set [y speed v] to [20]\n        else\n            set [y speed v] to [-20]\n        end\n    else\n        if (item (1) of [触れているブロック v]) then\n            set [落下量 v] to [0]\n            change [y v] by (() - (y speed))\n            座標調整 [2] [1]\n            if <(direction 2) = [1]> then\n                if <<(y speed) < [0]> and <(item (3) of [押されてるキー v]) = [true]>> then\n                    set [y speed v] to [13]\n                    replace item (3) of [押されてるキー v] with [2]\n                else\n                    if <(y speed) > [0]> then\n                        set [direction 3 v] to [1]\n                        set [direction 2 v] to [2]\n                        set [direction 4 v] to [-180]\n                    end\n                    set [y speed v] to [0]\n                end\n            end\n            if <(direction 2) = [2]> then\n                if <<(y speed) > [0]> and <(item (3) of [押されてるキー v]) = [true]>> then\n                    set [y speed v] to [-13]\n                    replace item (3) of [押されてるキー v] with [2]\n                else\n                    if <(y speed) < [0]> then\n                        set [direction 3 v] to [1]\n                        set [direction 2 v] to [1]\n                        set [direction 4 v] to [180]\n                    end\n                    set [y speed v] to [0]\n                end\n            end\n            if <(direction 2) = [3]> then\n                set [direction 3 v] to [3]\n                if <not <(イベント) = [1]>> then\n                    if <(y speed) < [0]> then\n                        set [direction 2 v] to [1]\n                        set [direction 4 v] to [90]\n                        set [x speed v] to (y speed)\n                    else\n                        set [direction 2 v] to [2]\n                        set [direction 4 v] to [-90]\n                        set [x speed v] to (() - (y speed))\n                    end\n                end\n                set [y speed v] to [0]\n            end\n            if <(direction 2) = [4]> then\n                set [direction 3 v] to [4]\n                if <(y speed) < [0]> then\n                    set [direction 2 v] to [1]\n                    set [direction 4 v] to [-90]\n                    set [x speed v] to (() - (y speed))\n                else\n                    set [direction 2 v] to [2]\n                    set [direction 4 v] to [90]\n                    set [x speed v] to (y speed)\n                end\n                set [y speed v] to [0]\n            end\n        end\n    end\nend\n\nif <(item ((item (1) of [@変数 v]) + (4)) of [stage当たり判定 v]) = [1]> then\n    replace item (item ((item (1) of [@変数 v]) + (4)) of [stage当たり判定 v]) of [触れているブロック v] with [1]\nend\n\ndefine ﾀﾋ\nerase all\npoint in direction (0)\nset pen size to (() / (2))\nset pen (transparency v) to ([abs v] of (() - (100)) )\n\ndefine ゴール\nset [イベント v] to [3]\nreplace item (7) of [@変数 v] with [100]\nrepeat (50)\n    背景描画\n    stage描画\n    地点への向き (x) (y) [-1100] [3700]\n    二点間距離 (x) (y) [-1100] [3700]\n    point in direction (地点への向き)\n    turn right (65) degrees\n    change [x v] by (([sin v] of (direction) ) * ((二点間距離) / (-2)))\n    change [y v] by (([cos v] of (direction) ) * ((二点間距離) / (-2)))\n    player描画 (item (7) of [@変数 v])\n    replace item (7) of [@変数 v] with ((item (7) of [@変数 v]) + (-2))\nend\n背景描画\nstage描画\nwait (1) seconds\nset [イベント v] to [5]\nstage更新\nset [direction 2 v] to [1]\nset [x v] to [0]\nset [y v] to [0]\nset [x speed v] to [0]\nset [y speed v] to [0]\nset [チェックポイントx v] to [10]\nset [チェックポイントy v] to [1]\nset [チェックポイントd v] to [1]\nset [cam x v] to [0]\nset [cam y v] to [1000]\n\ndefine You won\nset pen color to (#82efef)\n/fill [-176] [29] [-163] [29] [-155] [-1] [1]\n/fill [-149] [10] [-163] [29] [-155] [-1] [1]\n/fill [-124] [29] [-136] [29] [-145] [-1] [1]\n/fill [-151] [10] [-137] [29] [-145] [-1] [1]\n/fill [-156] [-29] [-145] [-29] [-145] [8] [1]\n/fill [-156] [-29] [-156] [8] [-145] [8] [1]\nset pen size to (43)\nGo to [-110] [-6] [1]\npen down\nGo to [-110] [-9] [1]\nset pen color to (#f5f5f5)\nset pen size to (22)\npen down\nGo to [-110] [-6] [1]\npen up\nset pen color to (#82efef)\nset pen size to (28)\nGo to [-67] [-16] [1]\npen down\nGo to [-65] [-16] [1]\npen up\nset pen size to (10)\nGo to [-50] [10] [1]\npen down\nGo to [-50] [-24] [1]\npen up\nGo to [-76] [10] [1]\npen down\nGo to [-76] [-15] [1]\npen up\nset pen size to (2)\nGo to [-54] [14] [1]\npen down\nGo to [-46] [14] [1]\nGo to [-46] [12] [1]\nGo to [-54] [12] [1]\nGo to [-54] [-28] [1]\nGo to [-46] [-28] [1]\nGo to [-46] [-26] [1]\npen up\nGo to [-80] [14] [1]\npen down\nGo to [-72] [14] [1]\nGo to [-72] [12] [1]\nGo to [-80] [12] [1]\npen up\nset pen color to (#f5f5f5)\nset pen size to (16)\nGo to [-63] [-14] [1]\npen down\nGo to [-63] [] [1]\npen up\nset pen color to (#82efef)\nset pen size to (10)\nGo to [-15] [10] [1]\npen down\nGo to [-4] [-24] [1]\nGo to [] [-24] [1]\nGo to [11] [10] [1]\nGo to [14] [10] [1]\nGo to [25] [-24] [1]\nGo to [28] [-24] [1]\nGo to [39] [10] [1]\npen up\nset pen size to (2)\nGo to [-12] [14] [1]\npen down\nGo to [-20] [14] [1]\nGo to [-7] [-28] [1]\nGo to [3] [-28] [1]\nGo to [17] [14] [1]\nGo to [8] [14] [1]\nGo to [22] [-28] [1]\nGo to [31] [-28] [1]\nGo to [45] [14] [1]\nGo to [36] [14] [1]\npen up\nset pen size to (43)\nGo to [69] [-6] [1]\npen down\nGo to [69] [-9] [1]\nset pen color to (#f5f5f5)\nset pen size to (22)\npen down\nGo to [69] [-6] [1]\npen up\nset pen color to (#82efef)\nset pen size to (28)\nGo to [121] [2] [1]\npen down\nGo to [119] [2] [1]\npen up\nset pen color to (#f5f5f5)\nset pen size to (16)\nGo to [116.5] [-14] [1]\npen down\nGo to [116.5] [-2] [1]\npen up\nset pen color to (#82efef)\nset pen size to (11)\nGo to [129.5] [] [1]\npen down\nGo to [129.5] [-23.5] [1]\npen up\nGo to [103.5] [9.5] [1]\npen down\nGo to [103.5] [-23.5] [1]\npen up\nset pen size to (2)\nGo to [108] [12] [1]\npen down\nGo to [108] [14] [1]\nGo to [99] [14] [1]\nGo to [99] [-28] [1]\nGo to [108] [-28] [1]\nGo to [108] [] [1]\npen up\nGo to [134] [] [1]\npen down\nGo to [134] [-28] [1]\nGo to [125] [-28] [1]\nGo to [125] [] [1]\npen up\n/fill [163] [29] [175] [29] [165] [-11] [1]\n/fill [175] [29] [173] [-11] [165] [-11] [1]\nset pen size to (2)\nGo to [174] [-21] [1]\npen down\nGo to [166] [-21] [1]\nGo to [166] [-28] [1]\nGo to [174] [-28] [1]\nGo to [174] [-21] [1]\npen up\nset pen size to (8)\nGo to [170] [-24] [1]\npen down\npen up\n\ndefine Go to (x) (y) (変数)\nif <(変数) = []> then\n    go to x: (x) y: (y)\nelse\n    go to x: ((x) - (cam x)) y: (((y) - (cam y)) + (100))\nend\n\nwhen flag clicked\nforever\n    play sound [suisounishizumutsuki v] until done\nend\n\nforever\n    say [こんにちは!]\nend\n\ndefine タブレット\nif <mouse down?> then\n    set pen color to (#ff0000)\n    set pen (transparency v) to (90)\n    set pen size to (260)\n    go to x: (-240) y: (400)\n    pen down\n    set y to (-400)\n    pen up\n    set x to (240)\n    pen down\n    set y to (300)\n    pen up\n    set pen color to (#3e00ff)\n    set pen (transparency v) to (90)\n    go to x: (-400) y: (180)\n    pen down\n    set x to (400)\n    pen up\nend\n\ndefine fill (x1) (y1) (x2) (y2) (x3) (y3) (x4) (y4) (direction)\nreplace item (1) of [/fill v] with (x1)\nreplace item (2) of [/fill v] with (y1)\nreplace item (3) of [/fill v] with (x2)\nreplace item (4) of [/fill v] with (y2)\nreplace item (5) of [/fill v] with (x3)\nreplace item (6) of [/fill v] with (y3)\nreplace item (7) of [/fill v] with (x4)\nreplace item (8) of [/fill v] with (y4)\n二点間距離 (item (1) of [/fill v]) (item (2) of [/fill v]) (item (3) of [/fill v]) (item (4) of [/fill v])\nreplace item (9) of [/fill v] with (二点間距離)\nreplace item (10) of [/fill v] with [1]\n二点間距離 (item (1) of [/fill v]) (item (2) of [/fill v]) (item (7) of [/fill v]) (item (8) of [/fill v])\nif <(二点間距離) < (item (9) of [/fill v])> then\n    replace item (9) of [/fill v] with (二点間距離)\n    replace item (10) of [/fill v] with [2]\nend\nreplace item (9) of [/fill v] with (item (9) of [/fill v])\nset pen size to (item (9) of [/fill v])\ngo to x: ((item (1) of [/fill v]) + (([sin v] of ((direction) + (45)) ) * ((item (9) of [/fill v]) * (.71)))) y: ((item (2) of [/fill v]) + (([cos v] of ((direction) + (45)) ) * ((item (9) of [/fill v]) * (.705))))\npen down\ngo to x: ((item (5) of [/fill v]) + (([sin v] of ((direction) + (45)) ) * ((item (9) of [/fill v]) * (-.705)))) y: ((item (6) of [/fill v]) + (([cos v] of ((direction) + (45)) ) * ((item (9) of [/fill v]) * (-.71))))\nrepeat until <((item (9) of [/fill v]) / (6)) < [1]>\n    replace item (9) of [/fill v] with ((item (9) of [/fill v]) / (6))\n    set pen size to (item (9) of [/fill v])\n    go to x: ((item (1) of [/fill v]) + (([sin v] of ((direction) + (45)) ) * ((item (9) of [/fill v]) * (.71)))) y: ((item (2) of [/fill v]) + (([cos v] of ((direction) + (45)) ) * ((item (9) of [/fill v]) * (.71))))\n    go to x: ((item (3) of [/fill v]) + (([sin v] of ((direction) + (-45)) ) * ((item (9) of [/fill v]) * (.71)))) y: ((item (4) of [/fill v]) + (([cos v] of ((direction) + (-45)) ) * ((item (9) of [/fill v]) * (.71))))\n    go to x: ((item (5) of [/fill v]) + (([sin v] of ((direction) + (45)) ) * ((item (9) of [/fill v]) * (-.71)))) y: ((item (6) of [/fill v]) + (([cos v] of ((direction) + (45)) ) * ((item (9) of [/fill v]) * (-.71))))\n    go to x: ((item (7) of [/fill v]) + (([sin v] of ((direction) + (-45)) ) * ((item (9) of [/fill v]) * (-.71)))) y: ((item (8) of [/fill v]) + (([cos v] of ((direction) + (-45)) ) * ((item (9) of [/fill v]) * (-.71))))\n    go to x: ((item (1) of [/fill v]) + (([sin v] of ((direction) + (45)) ) * ((item (9) of [/fill v]) * (.71)))) y: ((item (2) of [/fill v]) + (([cos v] of ((direction) + (45)) ) * ((item (9) of [/fill v]) * (.71))))\nend\nset pen size to (1.4)\ngo to x: (item (1) of [/fill v]) y: (item (2) of [/fill v])\ngo to x: (item (3) of [/fill v]) y: (item (4) of [/fill v])\ngo to x: (item (5) of [/fill v]) y: (item (6) of [/fill v])\ngo to x: (item (7) of [/fill v]) y: (item (8) of [/fill v])\ngo to x: (item (1) of [/fill v]) y: (item (2) of [/fill v])\npen up\n\n