99  [Pen platformer]

Instructions: 私の作品がまとまったスタジオはこちら\nhttps://scratch.mit.edu/studios/26060782/\n========================================\n WELCOME TO MY GAMES!!!\n Arrow keys .You can also operate by clicking the mouse.\n Don't touch red area. So if you touch red area, you will start over...\n If you touch yellow area, you can taller jump!\n If you touch blue area, you can faster move.\n If you touch purple area, you can't jump!! (OH no!)\n　矢印キーで動きます。マウスをクリックすることでも動きます。\n　赤いところに触れてはいけません。もし触れてしまうと、最初からやり直しになってしまいます…\n　黄色いところに触れると高いジャンプができます。\n　青いところに触れると早く動くことができます。\n　紫色のところに触れるとジャンプができなくなってしまいます…\n

@Stage\n\nwhen flag clicked\nforever\n    play sound [TheFatRat+-+Time+Lapse.mp3 v] until done\nend\n\n@スプライト1\n\nwhen I start as a clone\nset [ghost v] effect to (2)\nrepeat (10)\n    change size by (-3)\n    change [ghost v] effect by (4)\nend\nhide\ndelete this clone\n\nwhen flag clicked\nset [動いていい? v] to [0]\nset [ペーン♡ v] to [1]\nshow\nset size to (50) %\nset drag mode [not draggable v]\ngo to x: (-201) y: (-50)\npoint in direction (90)\nset [xvel v] to [0]\nset [yvel v] to [0]\nforever\n    set rotation style [left-right v]\n    if <(動いていい?) = [1]> then\n        if <<<mouse down?> and <(x position) > (mouse x)>> or <key (left arrow v) pressed?>> then\n            change [xv v] by (-1)\n            if <touching color (#0042ff)?> then\n                change [xv v] by (-3)\n            end\n            point in direction (-90)\n        end\n        if <<<mouse down?> and <(x position) < (mouse x)>> or <key (right arrow v) pressed?>> then\n            change [xv v] by (1)\n            if <touching color (#0042ff)?> then\n                change [xv v] by (3)\n            end\n            point in direction (90)\n        end\n        set [xv v] to ((Xv) * (0.9))\n        change x by (Xv)\n        if <touching color (#1fff00)?> then\n            change y by (1)\n            if <touching color (#1fff00)?> then\n                change y by (1)\n                if <touching color (#1fff00)?> then\n                    change y by (1)\n                    if <touching color (#1fff00)?> then\n                        change y by (1)\n                        if <touching color (#1fff00)?> then\n                            change y by (1)\n                            if <touching color (#1fff00)?> then\n                                change x by ((Xv) * (-1))\n                                change y by (-5)\n                                if <<<mouse down?> and <(y position) < (mouse y)>> or <key (up arrow v) pressed?>> then\n                                    if <(Xv) > [0]> then\n                                        set [xv v] to [-7]\n                                    else\n                                        set [xv v] to [7]\n                                    end\n                                    set [yv v] to [10]\n                                else\n                                    set [xv v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change y by (-1)\n        if <touching color (#1fff00)?> then\n            if <not <touching color (#bf00ff)?>> then\n                if <<<mouse down?> and <(y position) < (mouse y)>> or <key (up arrow v) pressed?>> then\n                    set [yv v] to [15]\n                    start sound [Water Drop v]\n                end\n            end\n        end\n        change y by (1)\n        change [yv v] by (-1)\n        change y by (Yv)\n        if <touching color (#1dfd00)?> then\n            change y by ((Yv) * (-1))\n            set [yv v] to [0]\n        end\n        hide variable [xv v]\n        if <(x position) > [230]> then\n            change [ペーン♡ v] by (1)\n            broadcast (next level v)\n            set [yv v] to [0]\n            set [xv v] to [0]\n            go to x: (-201) y: (-50)\n        end\n        if <(y position) < [-170]> then\n            go to x: (-201) y: (-50)\n        end\n        if <touching color (#ff0000)?> then\n            start sound [Rip v]\n            go to x: (-201) y: (-50)\n            set [yv v] to [0]\n            set [xv v] to [0]\n        end\n        if <touching color (#ffe900)?> then\n            set [yv v] to [21]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    wait (0.000000001) seconds\n    create clone of (_myself_ v)\nend\n\n@スプライト2\n\ndefine とりま地形?\nerase all\nset pen size to (50)\nset pen color to (#e5deff)\ngo to x: (240) y: (180)\npen down\ngo to x: (180) y: (180)\npen up\nset pen size to (50)\nset pen color to (#e5deff)\ngo to x: (230) y: (170)\npen down\ngo to x: (170) y: (170)\npen up\npen up\nset pen color to (#44ffff)\nset pen size to (15000000)\npen down\npen up\nset pen color to (#964e00)\nset pen size to (75)\ngo to x: (-250) y: (-160)\npen down\ngo to x: (230) y: (-160)\npen up\nset pen color to (#005a00)\nset pen size to (12)\ngo to x: (250) y: (-137)\npen down\ngo to x: (-250) y: (-137)\npen up\nset pen color to (#058e00)\nset pen size to (12)\ngo to x: (250) y: (-130)\npen down\ngo to x: (-250) y: (-130)\npen up\nset pen color to (#1dfd00)\nset pen size to (12)\ngo to x: (250) y: (-121)\npen down\ngo to x: (-250) y: (-121)\npen up\nset pen color to (#e8770d)\nset pen size to (30)\ngo to x: (-150) y: (-160)\npen down\ngo to x: (-150) y: (-160.4)\npen up\nset pen color to (#e8770d)\nset pen size to (30)\ngo to x: (-30) y: (-161)\npen down\ngo to x: (-30) y: (-161.5)\npen up\nset pen color to (#e8770d)\nset pen size to (30)\ngo to x: (150) y: (-171)\npen down\ngo to x: (150) y: (-171.5)\npen up\nset pen color to (#e8770d)\nset pen size to (30)\ngo to x: (-230) y: (-180)\npen down\ngo to x: (-230) y: (-180.5)\npen up\nset pen color to (#e8770d)\nset pen size to (30)\ngo to x: (240) y: (-160)\npen down\ngo to x: (240) y: (-160.5)\npen up\nset pen color to (#863200)\nset pen size to (20)\ngo to x: (-160) y: (-80)\npen down\ngo to x: (-160) y: (90)\npen up\nset pen color to (#863200)\nset pen size to (20)\ngo to x: (0) y: (-70)\npen down\ngo to x: (0) y: (110)\npen up\nset pen color to (#863200)\nset pen size to (20)\ngo to x: (160) y: (60)\npen down\ngo to x: (160) y: (-80)\npen up\nset pen color to (#8ff178)\nset pen size to (125)\ngo to x: (-160) y: (90)\npen down\ngo to x: (-160) y: (90.5)\npen up\nset pen color to (#8ef077)\nset pen size to (125)\ngo to x: (0) y: (105)\npen down\ngo to x: (0) y: (105.5)\npen up\nset pen color to (#8ef077)\nset pen size to (125)\ngo to x: (160) y: (80)\npen down\ngo to x: (160) y: (80.5)\npen up\n\ndefine 何ですか? (言い訳)\nforever\n    何ですか? (ペーン♡)\nend\n\ndefine コース作り (色) (ペンの太さ) (x\(始め\)) (y\(始め\)) (x\(終わり\)) (y\(終わり\))\nif <(色) = [赤]> then\n    set pen color to (#ff0000)\nelse\n    if <(色) = [黄]> then\n        set pen color to (#ffe900)\n    else\n        if <(色) = [青]> then\n            set pen color to (#0043ff)\n        else\n            if <(色) = [紫]> then\n                set pen color to (#bf00ff)\n            else\n                if <(色) = [緑]> then\n                    set pen color to (#1dff00)\n                end\n            end\n        end\n    end\nend\nset pen size to (ペンの太さ)\ngo to x: (x\(始め\)) y: (y\(始め\))\npen down\ngo to x: (x\(終わり\)) y: (y\(終わり\))\npen up\n\ndefine ステージ作るゾ\nif <(ペーン♡) = [2]> then\n    set [動いていい? v] to [0]\n    とりま地形?\n    コース作り [赤] [15] [-121] [-121] [31] [-121]\n    set [動いていい? v] to [1]\nend\nif <(ペーン♡) = [3]> then\n    set [動いていい? v] to [0]\n    とりま地形?\n    コース作り [緑] [15] [85] [-119] [85] [91]\n    set [動いていい? v] to [1]\nend\nif <(ペーン♡) = [4]> then\n    set [動いていい? v] to [0]\n    とりま地形?\n    コース作り [緑] [15] [111] [-119] [111] [91]\n    コース作り [緑] [15] [-61] [-119] [-61] [11]\n    set [動いていい? v] to [1]\nend\nif <(ペーン♡) = [5]> then\n    set [動いていい? v] to [0]\n    とりま地形?\n    コース作り [黄] [12] [-61] [-121] [-91] [-121]\n    set [動いていい? v] to [1]\nend\nif <(ペーン♡) = [6]> then\n    set [動いていい? v] to [0]\n    とりま地形?\n    コース作り [黄] [12] [-61] [-121] [-91] [-121]\n    コース作り [赤] [15] [65] [-111] [65] [71]\n    set [動いていい? v] to [1]\nend\nif <(ペーン♡) = [7]> then\n    set [動いていい? v] to [0]\n    とりま地形?\n    コース作り [黄] [12] [-61] [-121] [-91] [-121]\n    コース作り [赤] [15] [-101] [91] [101] [91]\n    コース作り [黄] [12] [61] [-121] [91] [-121]\n    set [動いていい? v] to [1]\nend\nif <(ペーン♡) = [8]> then\n    set [動いていい? v] to [0]\n    とりま地形?\n    コース作り [赤] [12] [-61] [-111] [-61] [-41]\n    コース作り [赤] [12] [61] [-111] [61] [-41]\n    set [動いていい? v] to [1]\nend\nif <(ペーン♡) = [9]> then\n    set [動いていい? v] to [0]\n    とりま地形?\n    コース作り [緑] [12] [-250] [40] [250] [40]\n    コース作り [黄] [12] [-61] [-121] [-91] [-121]\n    コース作り [黄] [12] [81] [-121] [111] [-121]\n    set [動いていい? v] to [1]\nend\nif <(ペーン♡) = [10]> then\n    set [動いていい? v] to [0]\n    とりま地形?\n    コース作り [緑] [12] [-250] [-11] [250] [-11]\n    コース作り [赤] [12] [-61] [-111] [-61] [-71]\n    コース作り [赤] [12] [61] [-111] [61] [-71]\n    set [動いていい? v] to [1]\nend\nif <(ペーン♡) = [11]> then\n    set [動いていい? v] to [0]\n    とりま地形?\n    コース作り [黄] [12] [-69] [-121] [-39] [-121]\n    コース作り [赤] [12] [21] [-111] [21] [31]\n    コース作り [赤] [12] [169] [-111] [169] [41]\n    コース作り [黄] [12] [99] [-121] [69] [-121]\n    set [動いていい? v] to [1]\nend\nif <(ペーン♡) = [12]> then\n    set [動いていい? v] to [0]\n    とりま地形?\n    コース作り [青] [12] [-39] [-111] [0] [-111]\n    set [動いていい? v] to [1]\nend\nif <(ペーン♡) = [13]> then\n    set [動いていい? v] to [0]\n    とりま地形?\n    コース作り [青] [12] [-39] [-111] [0] [-111]\n    コース作り [赤] [12] [39] [-121] [209] [-121]\n    set [動いていい? v] to [1]\nend\nif <(ペーン♡) = [14]> then\n    set [動いていい? v] to [0]\n    とりま地形?\n    コース作り [青] [12] [-39] [-111] [0] [-111]\n    コース作り [赤] [12] [39] [-121] [39] [-29]\n    set [動いていい? v] to [1]\nend\nif <(ペーン♡) = [15]> then\n    set [動いていい? v] to [0]\n    とりま地形?\n    コース作り [青] [12] [-99] [-111] [-69] [-111]\n    コース作り [赤] [12] [-39] [-121] [-39] [-29]\n    コース作り [青] [12] [99] [-111] [129] [-111]\n    コース作り [赤] [12] [159] [-121] [159] [-29]\n    set [動いていい? v] to [1]\nend\nif <(ペーン♡) = [15]> then\n    set [動いていい? v] to [0]\n    とりま地形?\n    コース作り [青] [12] [-99] [-111] [-69] [-111]\n    コース作り [赤] [12] [-39] [-121] [89] [-29]\n    set [動いていい? v] to [1]\nend\nif <(ペーン♡) = [16]> then\n    set [動いていい? v] to [0]\n    とりま地形?\n    コース作り [紫] [12] [-99] [-111] [-29] [-111]\n    コース作り [赤] [12] [19] [-121] [19] [-59]\n    set [動いていい? v] to [1]\nend\nif <(ペーン♡) = [17]> then\n    set [動いていい? v] to [0]\n    とりま地形?\n    コース作り [紫] [12] [-99] [-111] [-29] [-111]\n    コース作り [赤] [12] [19] [-111] [19] [-59]\n    set [動いていい? v] to [1]\nend\nif <(ペーン♡) = [18]> then\n    set [動いていい? v] to [0]\n    とりま地形?\n    コース作り [赤] [12] [-250] [-111] [250] [-111]\n    コース作り [緑] [12] [-209] [-111] [-139] [-111]\n    コース作り [緑] [12] [29] [-111] [99] [-111]\n    set [動いていい? v] to [1]\nend\nif <(ペーン♡) = [19]> then\n    set [動いていい? v] to [0]\n    とりま地形?\n    コース作り [緑] [12] [-99] [-111] [-99] [91]\n    コース作り [赤] [12] [-250] [-111] [250] [-111]\n    コース作り [緑] [12] [-209] [-111] [-139] [-111]\n    コース作り [緑] [12] [29] [-111] [99] [-111]\n    set [動いていい? v] to [1]\nend\nif <(ペーン♡) = [20]> then\n    set [動いていい? v] to [0]\n    とりま地形?\n    コース作り [赤] [35] [-250] [180] [250] [180]\n    コース作り [緑] [12] [-99] [-111] [-99] [91]\n    コース作り [赤] [12] [-250] [-111] [250] [-111]\n    コース作り [緑] [12] [-209] [-111] [-139] [-111]\n    コース作り [緑] [12] [29] [-111] [99] [-111]\n    set [動いていい? v] to [1]\nend\nif <(ペーン♡) = [21]> then\n    set [動いていい? v] to [0]\n    とりま地形?\n    コース作り [赤] [75] [-250] [180] [250] [180]\n    コース作り [緑] [12] [-99] [-111] [-99] [81]\n    コース作り [赤] [12] [-250] [-111] [250] [-111]\n    コース作り [緑] [12] [-209] [-111] [-139] [-111]\n    コース作り [緑] [12] [29] [-111] [99] [-111]\n    set [動いていい? v] to [1]\nend\nif <(ペーン♡) = [22]> then\n    set [動いていい? v] to [0]\n    とりま地形?\n    コース作り [赤] [90] [-250] [180] [250] [180]\n    コース作り [緑] [12] [-99] [-111] [-99] [81]\n    コース作り [赤] [12] [-250] [-111] [250] [-111]\n    コース作り [緑] [12] [-209] [-111] [-139] [-111]\n    コース作り [緑] [12] [29] [-111] [99] [-111]\n    コース作り [黄] [12] [69] [-111] [99] [-111]\n    set [動いていい? v] to [1]\nend\nif <(ペーン♡) = [23]> then\n    set [動いていい? v] to [0]\n    とりま地形?\n    コース作り [緑] [25] [240] [-111] [240] [180]\n    コース作り [黄] [12] [-169] [109] [-69] [109]\n    コース作り [黄] [12] [-69] [109] [-149] [34]\n    コース作り [黄] [12] [-149] [34] [-119] [149]\n    コース作り [黄] [12] [-119] [149] [-84] [34]\n    コース作り [黄] [12] [-84] [34] [-165] [109]\n    コース作り [青] [8] [-39] [34] [-29] [24]\n    コース作り [赤] [10] [64] [34] [24] [74]\n    コース作り [赤] [10] [24] [74] [24] [134]\n    コース作り [赤] [10] [24] [134] [64] [94]\n    コース作り [赤] [10] [64] [94] [104] [134]\n    コース作り [赤] [10] [104] [134] [104] [74]\n    コース作り [赤] [10] [104] [74] [64] [34]\n    set [動いていい? v] to [1]\nend\n\nwhen flag clicked\nとりま地形?\nset [動いていい? v] to [1]\n\nwhen I receive [next level v]\nステージ作るゾ\n\nif <(色) = [赤]> then\n    set pen color to (#ff0000)\nelse\n    if <(色) = [黄]> then\n        set pen color to (#ffe900)\n    else\n        if <(色) = [青]> then\n            set pen color to (#0043ff)\n        else\n            if <(色) = [紫]> then\n                set pen color to (#bf00ff)\n            else\n                if <(色) = [緑]> then\n                    set pen color to (#1dff00)\n                end\n            end\n        end\n    end\nend\nset pen size to (ペンの太さ)\ngo to x: (x\(始め\)) y: (y\(始め\))\npen down\ngo to x: (x\(終わり\)) y: (y\(終わり\))\npen up\n\ngo to x: (240) y: (180)\npen down\ngo to x: (180) y: (180)\npen up\nset pen size to (50)\nset pen color to (#e5deff)\ngo to x: (230) y: (170)\npen down\ngo to x: (170) y: (170)\npen up\npen up\nset pen color to (#44ffff)\nset pen size to (15000000)\npen down\npen up\nset pen color to (#964e00)\nset pen size to (75)\ngo to x: (-250) y: (-160)\npen down\ngo to x: (230) y: (-160)\npen up\nset pen color to (#005a00)\nset pen size to (12)\ngo to x: (250) y: (-137)\npen down\ngo to x: (-250) y: (-137)\npen up\nset pen color to (#058e00)\nset pen size to (12)\ngo to x: (250) y: (-130)\npen down\ngo to x: (-250) y: (-130)\npen up\nset pen color to (#1dfd00)\nset pen size to (12)\ngo to x: (250) y: (-121)\npen down\ngo to x: (-250) y: (-121)\npen up\nset pen color to (#e8770d)\nset pen size to (30)\ngo to x: (-150) y: (-160)\npen down\ngo to x: (-150) y: (-160.4)\npen up\nset pen color to (#e8770d)\nset pen size to (30)\ngo to x: (-30) y: (-161)\npen down\ngo to x: (-30) y: (-161.5)\npen up\nset pen color to (#e8770d)\nset pen size to (30)\ngo to x: (150) y: (-171)\npen down\ngo to x: (150) y: (-171.5)\npen up\nset pen color to (#e8770d)\nset pen size to (30)\ngo to x: (-230) y: (-180)\npen down\ngo to x: (-230) y: (-180.5)\npen up\nset pen color to (#e8770d)\nset pen size to (30)\ngo to x: (240) y: (-160)\npen down\ngo to x: (240) y: (-160.5)\npen up\nset pen color to (#863200)\nset pen size to (20)\ngo to x: (-160) y: (-80)\npen down\ngo to x: (-160) y: (90)\npen up\nset pen color to (#863200)\nset pen size to (20)\ngo to x: (0) y: (-70)\npen down\ngo to x: (0) y: (110)\npen up\nset pen color to (#863200)\nset pen size to (20)\ngo to x: (160) y: (60)\npen down\ngo to x: (160) y: (-80)\npen up\nset pen color to (#8ff178)\nset pen size to (125)\ngo to x: (-160) y: (90)\npen down\ngo to x: (-160) y: (90.5)\npen up\nset pen color to (#8ef077)\nset pen size to (125)\ngo to x: (0) y: (105)\npen down\ngo to x: (0) y: (105.5)\npen up\nset pen color to (#8ef077)\nset pen size to (125)\ngo to x: (160) y: (80)\npen down\ngo to x: (160) y: (80.5)\npen up\n\n@スプライト3\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\ngo to [front v] layer\n\n@スプライト4\n\nwhen flag clicked\nhide\nforever\n    reset timer\nend\n\nwhen [timer v] > (0)\ngo to x: (0) y: (0)\nswitch costume to (nightm v)\nshow\ngo to [front v] layer\n\n