2021 Platformer(プラットフォーマー！)

Instructions: 傾向1ページのった！1/9\nターボモードなし\n1／1に出したかった(泣)\nタップでオープニングスキップ\npc=上下右左かクリック\nMobile=タップ\n世界記録… 20秒\nコメ欄に嘘書いてもバレます！\n\nhttps://scratch.mit.edu/projects/478078161\n\n\n

@Stage\n\nwhen I receive [栗 v]\nwait (0.3) seconds\nforever\n    play sound [Tobu - Candyland \[NCS Release\].mp3 v] until done\nend\n\nwhen flag clicked\nplay sound [Jackpot--TheFatRat v] until done\n\nwhen I receive [栗 v]\nstop all sounds\n\n@プレイヤー\n\nwhen flag clicked\nhide\nif <touching (端よう v)?> then\n    wait (1) seconds\n    move (-5) steps\nend\n\nwhen I receive [次のステージ v]\ngo to x: (-147) y: (-56)\nwait (1) seconds\n\nwhen I receive [動け v]\ngo to x: (-147) y: (-56)\nset [動力\(x\) v] to [0]\nset [動力\(y\) v] to [0]\nshow\nset size to (030) %\npoint in direction (90)\nforever\n    set [動力\(x\) v] to ((動力\(x\)) * (0.9))\n    if <key (any v) pressed?> then\n        change [動力\(x\) v] by (<key (right arrow v) pressed?> - <key (left arrow v) pressed?>)\n        point in direction ((<key (right arrow v) pressed?> - <key (left arrow v) pressed?>) * (90))\n    else\n        change [動力\(x\) v] by (<<mouse down?> and <(mouse x) > [0]>> - <<mouse down?> and <[0] > (mouse x)>>)\n        point in direction ((<<mouse down?> and <(mouse x) > [0]>> - <<mouse down?> and <[0] > (mouse x)>>) * (90))\n    end\n    change x by (動力\(x\))\n    if <touching (地面 v)?> then\n        change y by (1)\n    end\n    if <touching (地面 v)?> then\n        change y by (1)\n    end\n    if <touching (地面 v)?> then\n        change y by (1)\n    end\n    if <touching (地面 v)?> then\n        change y by (1)\n    end\n    if <touching (地面 v)?> then\n        change y by (1)\n    end\n    if <touching (地面 v)?> then\n        change y by (1)\n    end\n    if <touching (地面 v)?> then\n        change x by ((動力\(x\)) * (-1))\n        change y by (-6)\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > [0]>>> then\n            if <(動力\(x\)) > [0]> then\n                set [動力\(x\) v] to [-7]\n            else\n                set [動力\(x\) v] to [7]\n            end\n            set [動力\(y\) v] to [10]\n        else\n            set [動力\(x\) v] to [0]\n        end\n    end\n    change y by (-1)\n    if <touching (地面 v)?> then\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > [0]>>> then\n            set [動力\(y\) v] to [15]\n        end\n    end\n    if <touching (バックパック 大ジャンプ v)?> then\n        set [動力\(y\) v] to [10]\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > [0]>>> then\n            set [動力\(y\) v] to [20]\n        end\n    end\n    change y by (1)\n    change [動力\(y\) v] by (-1)\n    change y by (動力\(y\))\n    if <touching (地面 v)?> then\n        change y by ((動力\(y\)) * (-1))\n        set [動力\(y\) v] to [0]\n    end\n    if <(x position) > [230]> then\n        初期設定\n        broadcast (次のステージ v)\n    end\n    if <(y position) < [-170]> then\n        初期設定\n    end\n    if <touching (障害物 v)?> then\n        初期設定\n    end\n    if <touching (トゲ v)?> then\n        初期設定\n    end\n    if <touching color (#d61010)?> then\n        初期設定\n    end\n    if <touching (トゲ2 v)?> then\n        初期設定\n    end\n    if <[-230] > (x position)> then\n        change x by (10)\n    end\nend\n\ndefine 初期設定\nset [動力\(y\) v] to [0]\nset [動力\(x\) v] to [0]\ngo to x: (-147) y: (-56)\n\nchange [☁ タイム！ v] by (1)\n\nwhen I receive [p v]\nforever\n    move (-50) steps\nend\n\n@地面\n\nwhen flag clicked\nset [タイム v] to [0]\nhide variable [タイム v]\nswitch costume to (1 v)\nhide variable [☁ 世界記録 v]\nhide\n\nwhen I receive [動け v]\nshow\nshow variable [タイム v]\nshow variable [☁ 世界記録 v]\ngo to x: (13) y: (5)\n\nwhen I receive [次のステージ v]\nnext costume\n\nwhen I receive [動け v]\nforever\n    if <<(costume [name v]) = [クリア]> and <(☁ 世界記録) > (タイム)>> then\n        set [☁ 世界記録 v] to (タイム)\n        hide variable [☁ 世界記録 v]\n    end\nend\n\nwhen I receive [動け v]\nforever\n    if <(costume [name v]) = [クリア]> then\n        set [☁ タイム！ v] to (タイム)\n    end\nend\n\nwhen I receive [動け v]\nforever\n    repeat until <<(costume [name v]) = [クリア]> and <(☁ 世界記録) > (タイム)>>\n        wait (1) seconds\n        change [タイム v] by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    broadcast (ターボチェック v)\nend\n\nwhen I receive [ターボ感知 v]\nforever\n    stop [all v]\nend\n\n@サムネ\n\nwhen flag clicked\nhide\ngo to x: (-86) y: (-91)\nset [ghost v] effect to (0)\n\nwhen I receive [初め v]\nwait (1) seconds\nrepeat (4)\n    change [ghost v] effect by (25)\nend\nbroadcast (動け v)\n\nwhen I receive [栗 v]\nshow\n\nwhen I receive [動け v]\nforever\n    hide\nend\n\n@スプライト2\n\nwhen flag clicked\nhide\ngo to x: (3) y: (34)\nset [ghost v] effect to (0)\nswitch costume to (コスチューム1 v)\nset drag mode [not draggable v]\n\nwhen this sprite clicked\nnext costume\nwait (1) seconds\nrepeat (4)\n    change [ghost v] effect by (25)\n    wait (0.2) seconds\nend\nbroadcast (動け v)\n\nwhen I receive [栗 v]\nshow\n\n@背景\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    set drag mode [not draggable v]\n    go to [back v] layer\n    show\nend\n\n@トゲ\n\nwhen flag clicked\nswitch costume to (1 v)\ngo to x: (-89) y: (-93)\nhide\n\nwhen I receive [次のステージ v]\nnext costume\n\nwhen I receive [動け v]\nshow\n\n@障害物\n\nwhen flag clicked\ngo to x: (-57) y: (-38)\nswitch costume to (コスチューム1 v)\nhide\n\nwhen I receive [次のステージ v]\nnext costume\n\nwhen I receive [動け v]\nshow\n\n@スプライト7\n\nwhen flag clicked\nshow\nset [ghost v] effect to (0)\ngo to x: (0) y: (0)\nset [color v] effect to (0)\ngo to [front v] layer\nswitch costume to (コスチューム2 v)\nrepeat (7)\n    wait (1) seconds\n    next costume\n    change [color v] effect by (25)\nend\nturn right (15) degrees\nwait (0.1) seconds\nturn left (15) degrees\nwait (0.1) seconds\nturn left (15) degrees\nwait (0.1) seconds\nturn right (15) degrees\nwait (0.1) seconds\nwait (0.8) seconds\nbroadcast (メッセージ1 v)\ngo to [back v] layer\nset [color v] effect to (0)\nnext costume\n\nwhen I receive [栗 v]\nhide\n\nwhen this sprite clicked\nbroadcast (栗 v)\n\n@スプライト1\n\nwhen flag clicked\nshow\npoint in direction (90)\nset size to (100) %\ngo to x: (0) y: (0)\nchange [ghost v] effect by (0)\nforever\n    repeat (10)\n        change size by (5)\n        wait (0.2) seconds\n        change size by (5)\n        wait (0.2) seconds\n        change size by (-5)\n        wait (0.2) seconds\n        change size by (-5)\n        wait (0.2) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    turn right (5) degrees\n    change [ghost v] effect by (30)\n    wait (0.2) seconds\n    turn left (5) degrees\n    change [ghost v] effect by (-30)\n    wait (0.2) seconds\n    turn left (5) degrees\n    change [color v] effect by (25)\n    wait (0.2) seconds\n    turn right (5) degrees\n    change [color v] effect by (-25)\nend\n\nwhen I receive [栗 v]\nhide\n\nwhen this sprite clicked\nbroadcast (栗 v)\n\n@スプライト6\n\nwhen flag clicked\nshow\nset size to (100) %\nforever\n    go to x: (pick random (-225) to (225)) y: (-147)\n    forever\n        wait (0.7) seconds\n        repeat (10)\n            repeat (10)\n                repeat (10)\n                    change y by (20)\n                    if <(y position) > [170]> then\n                        go to x: (pick random (-225) to (225)) y: (-147)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [栗 v]\nhide\n\n@スプライト3\n\nwhen flag clicked\nshow\nset size to (100) %\nforever\n    go to x: (pick random (-225) to (225)) y: (-147)\n    forever\n        wait (0.6) seconds\n        repeat (10)\n            repeat (10)\n                repeat (10)\n                    change y by (20)\n                    if <(y position) > [170]> then\n                        go to x: (pick random (-225) to (225)) y: (-147)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [栗 v]\nhide\n\n@スプライト4\n\nwhen flag clicked\nshow\nset size to (100) %\nforever\n    go to x: (pick random (-225) to (225)) y: (-147)\n    forever\n        wait (2.2) seconds\n        repeat (10)\n            repeat (10)\n                repeat (10)\n                    change y by (20)\n                    if <(y position) > [170]> then\n                        go to x: (pick random (-225) to (225)) y: (-147)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [栗 v]\nhide\n\n@スプライト8\n\nwhen flag clicked\nshow\nset size to (100) %\nforever\n    go to x: (pick random (-225) to (225)) y: (-147)\n    forever\n        repeat (10)\n            repeat (10)\n                repeat (10)\n                    change y by (20)\n                    if <(y position) > [170]> then\n                        go to x: (pick random (-225) to (225)) y: (-147)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [栗 v]\nhide\n\n@スプライト5\n\nwhen flag clicked\nshow\nset size to (100) %\nforever\n    go to x: (pick random (-225) to (225)) y: (-147)\n    forever\n        wait (1) seconds\n        repeat (10)\n            repeat (10)\n                repeat (10)\n                    change y by (20)\n                    if <(y position) > [170]> then\n                        go to x: (pick random (-225) to (225)) y: (-147)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [栗 v]\nhide\n\n@スプライト9\n\nwhen flag clicked\nshow\npoint in direction (90)\nswitch costume to (コスチューム1 v)\nchange [ghost v] effect by (100)\nset size to (100) %\n\nwhen I receive [メッセージ1 v]\nwait (0.5) seconds\nrepeat (4)\n    wait (0.2) seconds\n    change [ghost v] effect by (-25)\nend\nwait (3) seconds\nrepeat (4)\n    wait (0.2) seconds\n    change [ghost v] effect by (25)\nend\nnext costume\nrepeat (4)\n    wait (0.2) seconds\n    change [ghost v] effect by (-25)\nend\nwait (0.5) seconds\nchange size by (-10)\nwait (0.2) seconds\nchange size by (10)\nrepeat (4)\n    wait (0.2) seconds\n    change [ghost v] effect by (25)\nend\nnext costume\nturn right (15) degrees\nwait (0.1) seconds\nturn left (15) degrees\nwait (0.1) seconds\nturn right (15) degrees\nwait (0.1) seconds\nturn left (15) degrees\nwait (0.1) seconds\nturn left (15) degrees\nwait (0.1) seconds\nturn right (15) degrees\nwait (2.5) seconds\nrepeat (4)\n    wait (0.2) seconds\n    change [ghost v] effect by (-25)\nend\nbroadcast (栗 v)\nhide\n\nwhen I receive [栗 v]\nhide\n\n@Love fave\n\nwhen I receive [動け v]\nforever\n    wait (1) seconds\n    change [ghost v] effect by (25)\n    wait (0.2) seconds\n    change [ghost v] effect by (25)\n    wait (0.2) seconds\n    change [ghost v] effect by (25)\n    wait (0.2) seconds\n    change [ghost v] effect by (25)\n    wait (0.2) seconds\n    change [ghost v] effect by (-25)\n    wait (0.2) seconds\n    change [ghost v] effect by (-25)\n    wait (0.2) seconds\n    change [ghost v] effect by (-25)\n    wait (0.2) seconds\n    change [ghost v] effect by (-25)\n    wait (0.2) seconds\n    wait (1) seconds\nend\n\nwhen I receive [動け v]\nshow\n\nwhen flag clicked\ngo to x: (-303) y: (18)\nset [ghost v] effect to (0)\nhide\ngo to [front v] layer\nset size to (100) %\n\n@プレイヤー2\n\nwhen flag clicked\ngo to x: (-78) y: (-66)\nhide\n\nwhen I receive [次のステージ v]\ngo to x: (-155) y: (-103)\n\ndefine 初期設定\nset [動力\(y\) v] to [0]\nset [動力\(x\) v] to [0]\ngo to x: (-201) y: (-80)\n\nchange [☁ タイム！ v] by (1)\n\nwhen I receive [栗 v]\nshow\n\nwhen I receive [動け v]\nforever\n    hide\nend\n\n@トゲ2\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (1 v)\nhide\n\nwhen I receive [次のステージ v]\nnext costume\n\nwhen I receive [動け v]\nshow\n\n@スプライト10\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (80)\nset size to (pick random (40) to (70)) %\nrepeat until \n    change y by (((size) / (12)) * (-1))\n    if <key ((<<mouse down?> and <(mouse x) > [0]>> - <<mouse down?> and <[0] > (mouse x)>>) v) pressed?> then\n        change x by (((size) / (40)) * (2))\n    end\n    if <key ((<<mouse down?> and <(mouse x) > [0]>> - <<mouse down?> and <[0] > (mouse x)>>) v) pressed?> then\n        change x by (((size) / (40)) * (-2))\n    end\nend\ndelete this clone\n\nwhen flag clicked\nforever\nend\n\nwhen I receive [動け v]\nset [ghost v] effect to (80)\ngo to [front v] layer\ngo [backward v] (1) layers\nset size to (40) %\nforever\n    set y to (180)\n    set x to (pick random (-350) to (350))\n    if <(x position) < [-240]> then\n        set y to (pick random (-180) to (180))\n    end\n    if <[240] < (x position)> then\n        set y to (pick random (-180) to (180))\n    end\n    wait (0.05) seconds\n    create clone of (_myself_ v)\nend\n\n@バックパック 大ジャンプ\n\nwhen flag clicked\nshow\nswitch costume to (コスチューム2 v)\n\nwhen I receive [次のステージ v]\nnext costume\n\n@ターボを対策\n\nwhen I receive [最後 v]\nstop [all v]\n\nwhen I receive [動け v]\nset [ターボ対策 v] to [0]\nforever\n    change [ターボ対策 v] by (10)\nend\n\nwhen I receive [動け v]\nforever\n    wait (0.01) seconds\n    set [ターボ対策 v] to [0]\nend\n\nwhen I receive [動け v]\nforever\n    if <(ターボ対策) > [10000]> then\n        broadcast (最後 v)\n    end\nend\n\n