Colorful!platformer

Instructions: 矢印キーです！\nモバイルは想像つくでしょう？\nとげに触れたら・・・です（ﾀﾋぬということです）

@Stage\n\nwhen flag clicked\nswitch backdrop to (背景（雲ダサい・・・） v)\nwait until <(かど) = [1]>\nwait (2) seconds\nforever\n    play sound [ Masked Heroes v] until done\nend\n\nwhen flag clicked\nwait until <(かど) = [1]>\nwait (2) seconds\nforever\n    if << ([costume name v] of [stage v]) contains [平原]?> or < ([costume name v] of [stage v]) contains [北極]?>> then\n        switch backdrop to (背景（雲ダサい・・・） v)\n    else\n        if < ([costume name v] of [stage v]) contains [LAVA]?> then\n            switch backdrop to (マグマ背景（雲ダサい・・・） v)\n        else\n            switch backdrop to (洞窟の中 v)\n        end\n    end\nend\n\n@弾幕\n\nwhen flag clicked\nset [かど v] to [0]\nwait (3) seconds\nrepeat until <(かど) = [1]>\n    set [color v] effect to (pick random (1) to (100))\n    create clone of (_myself_ v)\n    next costume\n    create clone of (_myself_ v)\n    next costume\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> then\n    show\n    go to x: (pick random (30) to (150)) y: (-180)\n    point in direction (45)\n    set size to (pick random (43) to (60)) %\n    repeat until <not <touching (_edge_ v)?>>\n        move (20) steps\n    end\n    repeat until <touching (_edge_ v)?>\n        move (20) steps\n    end\n    delete this clone\nend\nif <(costume [number v]) = [2]> then\n    show\n    go to x: (pick random (-30) to (-150)) y: (180)\n    point in direction (-135)\n    set size to (pick random (43) to (60)) %\n    repeat until <not <touching (_edge_ v)?>>\n        move (20) steps\n    end\n    repeat until <touching (_edge_ v)?>\n        move (20) steps\n    end\n    delete this clone\nend\n\n@イントロ\n\nwhen flag clicked\nswitch costume to (隠し1 v)\ncreate clone of (_myself_ v)\nswitch costume to (隠し2 v)\ncreate clone of (_myself_ v)\nswitch costume to (アイコン＆ユーザー名 v)\ncreate clone of (_myself_ v)\nswitch costume to (背景 v)\ncreate clone of (_myself_ v)\nplay sound [Different Heaven - Nekozilla \[NCS Release\]  v] until done\n\nwhen I start as a clone\nshow\nif <(costume [number v]) = [1]> then\n    go to x: (0) y: (0)\n    go to x: (0) y: (0)\n    wait (2) seconds\n    switch costume to (隠し1 v)\n    show\n    set [変数 v] to [19]\n    repeat (19)\n        change x by (変数)\n        change y by (変数)\n        change [変数 v] by (-1)\n    end\n    wait (8) seconds\n    repeat (20)\n        change x by (変数)\n        change y by (変数)\n        change [変数 v] by (-1)\n    end\n    change [かど v] by (1)\n    wait (1) seconds\n    set [変数 v] to [19]\n    repeat (22)\n        change x by (変数)\n        change y by (変数)\n        change [変数 v] by (-1)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [2]> then\n    go to x: (0) y: (0)\n    go to x: (0) y: (0)\n    wait (2) seconds\n    switch costume to (隠し2 v)\n    show\n    set [変数2 v] to [-19]\n    repeat (19)\n        change x by (変数2)\n        change y by (変数2)\n        change [変数2 v] by (1)\n    end\n    wait (8) seconds\n    repeat (20)\n        change x by (変数2)\n        change y by (変数2)\n        change [変数2 v] by (1)\n    end\n    wait (1) seconds\n    set [変数2 v] to [-19]\n    repeat (22)\n        change x by (変数2)\n        change y by (変数2)\n        change [変数2 v] by (1)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [3]> then\n    point in direction (78)\n    go to x: (0) y: (0)\n    go to x: (0) y: (0)\n    wait (3) seconds\n    switch costume to (アイコン＆ユーザー名 v)\n    show\n    set [t v] to [0]\n    repeat until <(かど) = [1]>\n        change [t v] by (5)\n        turn right ([sin v] of (t) ) degrees\n    end\n    delete this clone\nend\nif <(costume [number v]) = [4]> then\n    set size to (40) %\n    show\n    go to x: (pick random (200) to (-200)) y: (200)\n    point in direction (90)\n    repeat until <not <touching (_edge_ v)?>>\n        point in direction (90)\n        change y by (-5)\n    end\n    repeat until <touching (_edge_ v)?>\n        point in direction (90)\n        change y by (-5)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nforever\n    if <<(costume [number v]) = [1]> or <(costume [number v]) = [2]>> then\n        go to [front v] layer\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [4]> then\n        set [color v] effect to (pick random (1) to (100))\n        turn right (10) degrees\n        wait (0.1) seconds\n        turn left (20) degrees\n        wait (0.1) seconds\n        turn right (10) degrees\n        wait (0.1) seconds\n    end\nend\n\nwhen flag clicked\nwait (3) seconds\nswitch costume to (紙吹雪？ v)\nrepeat (35)\n    create clone of (_myself_ v)\n    wait (0.1) seconds\nend\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [5]> then\n        go to x: (0) y: (0)\n        go to [back v] layer\n        wait until <(かど) = [1]>\n        delete this clone\n    end\nend\n\n@stage\n\nwhen flag clicked\nforever\n    go to [back v] layer\n    go to x: (0) y: (0)\nend\n\nwhen flag clicked\nswitch costume to (平原 v)\n\nwhen I receive [ステージかえる v]\nbroadcast (アニメーション v)\nwait (0.5) seconds\nnext costume\n\nwhen flag clicked\nforever\n    set [ステージ v] to (costume [number v])\nend\n\n@自機\n\nwhen flag clicked\nset size to (150) %\ngo to x: (-210) y: (100)\nhide\nset [x v] to [0]\nset [y v] to [0]\nset rotation style [left-right v]\nwait until <(かど) = [0]>\nwait until <(かど) = [1]>\nshow\nwait (2) seconds\nforever\n    if <<key (left arrow v) pressed?> or <<(mouse x) < (x position)> and <mouse down?>>> then\n        change [x v] by (-1)\n        point in direction (-90)\n        switch costume to (普通 v)\n    end\n    if <<key (right arrow v) pressed?> or <<(x position) < (mouse x)> and <mouse down?>>> then\n        change [x v] by (1)\n        point in direction (90)\n        switch costume to (普通 v)\n    end\n    change y by (-1)\n    if <touching (stage v)?> then\n        set [x v] to ((x) * (0.93))\n    else\n        set [x v] to ((x) * (0.9))\n    end\n    change y by (1)\n    change x by (x)\n    if <touching (stage v)?> then\n        change y by (1)\n        if <touching (stage v)?> then\n            change y by (1)\n            if <touching (stage v)?> then\n                change y by (1)\n                if <touching (stage v)?> then\n                    change y by (1)\n                    if <touching (stage v)?> then\n                        change y by (1)\n                        if <touching (stage v)?> then\n                            change x by ((x) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <<(y position) < (mouse y)> and <mouse down?>>> then\n                                if <(x) > [0]> then\n                                    set [x v] to [-6]\n                                else\n                                    set [x v] to [6]\n                                end\n                                set [y v] to [11.5]\n                            else\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (-1)\n    if <<key (up arrow v) pressed?> or <<(y position) < (mouse y)> and <mouse down?>>> then\n        if <touching (stage v)?> then\n            set [y v] to [15]\n        end\n    end\n    change y by (Y)\n    change [y v] by (-1)\n    if <<touching (stage v)?> or <touching (stage v)?>> then\n        change y by ((Y) * (-1))\n        set [y v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if < ([costume name v] of [stage v]) contains [LAVA]?> then\n        if <key (down arrow v) pressed?> then\n            switch costume to (マグマ状態2 v)\n        else\n            switch costume to (マグマ状態 v)\n        end\n    else\n        if < ([costume name v] of [stage v]) contains [北極]?> then\n            if <key (down arrow v) pressed?> then\n                switch costume to (アイス状態2 v)\n            else\n                switch costume to (アイス状態 v)\n            end\n        else\n            if <key (down arrow v) pressed?> then\n                switch costume to (普通2 v)\n            else\n                switch costume to (普通 v)\n            end\n        end\n    end\nend\n\nwhen I receive [リスポーン v]\ngo to x: (-210) y: (100)\nif <(ステージ) = [4]> then\n    go to x: (-210) y: (-100)\nend\n\nwhen I receive [ステージかえる v]\nrepeat (50)\n    set [x v] to [0]\n    set [y v] to [0]\nend\n\nwhen I receive [終わったよ v]\nstop [other scripts in sprite v]\n\n@とげ\n\ndefine とげを作る (x) (y) (長さ) (角度) (大きさ)\ngo to x: (x) y: (y)\nswitch costume to (長さ)\npoint in direction (角度)\nset size to (大きさ) %\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nforever\n    if <touching (自機 v)?> then\n        broadcast (リスポーン v)\n    end\nend\n\nwhen I receive [とげづくり v]\nbroadcast (とげ削除 v)\nif <(ステージ) = [1]> then\n    とげを作る [-7] [92] [1] [0] [50]\nend\nif <(ステージ) = [2]> then\n    とげを作る [-85] [-93] [2] [0] [100]\n    とげを作る [-35] [-93] [2] [0] [100]\n    とげを作る [15] [-93] [2] [0] [100]\n    とげを作る [65] [-93] [2] [0] [100]\n    とげを作る [115] [-93] [2] [0] [100]\nend\nif <(ステージ) = [3]> then\n    とげを作る [155] [-165] [1] [0] [75]\n    とげを作る [190] [-165] [1] [0] [75]\n    とげを作る [225] [-165] [1] [0] [75]\nend\nif <(ステージ) = [4]> then\n    とげを作る [-140] [-110] [1] [0] [30]\n    とげを作る [-0] [-110] [1] [0] [30]\n    とげを作る [140] [-110] [1] [0] [30]\n    とげを作る [120] [72] [1] [180] [30]\n    とげを作る [-150] [72] [1] [180] [30]\n    とげを作る [-10] [10] [1] [0] [30]\nend\nif <(ステージ) = [6]> then\n    とげを作る [-62] [-93] [2] [0] [100]\n    とげを作る [-10] [-93] [2] [0] [100]\n    とげを作る [42] [-93] [2] [0] [100]\n    とげを作る [94] [-93] [2] [0] [100]\n    とげを作る [146] [-93] [2] [0] [100]\n    とげを作る [198] [-93] [2] [0] [100]\nend\nif <(ステージ) = [7]> then\n    とげを作る [26] [163] [2] [180] [70]\nend\nif <(ステージ) = [10]> then\n    とげを作る [-62] [-93] [2] [0] [100]\n    とげを作る [-10] [-93] [2] [0] [100]\n    とげを作る [42] [-93] [2] [0] [100]\n    とげを作る [94] [-93] [2] [0] [100]\n    とげを作る [146] [-93] [2] [0] [100]\n    とげを作る [198] [-93] [2] [0] [100]\nend\n\nwhen I receive [とげ削除 v]\ndelete this clone\n\nwhen flag clicked\nwait until <(かど) = [0]>\nwait until <(かど) = [1]>\nbroadcast (とげづくり v)\n\nwhen I receive [アニメーション v]\n\nbroadcast (とげ削除 v)\n\nbroadcast (とげ削除 v)\n\n@ステージ替え\n\nwhen flag clicked\nforever\n    go to x: (240) y: (0)\n    set [ghost v] effect to (100)\n    if <touching (自機 v)?> then\n        broadcast (ステージかえる v)\n        wait until <not <touching (自機 v)?>>\n    end\nend\n\nwhen I receive [終わったよ v]\nstop [other scripts in sprite v]\n\n@隠し\n\nwhen I receive [アニメーション v]\nif <not <(ステージ) = [13]>> then\n    switch costume to (隠し2 v)\n    create clone of (_myself_ v)\n    switch costume to (隠し1 v)\n    create clone of (_myself_ v)\nelse\n    broadcast (終わったよ v)\n    go to x: (0) y: (0)\n    switch costume to (ピカッ！ v)\n    change [ghost v] effect by (100)\n    show\n    go to [front v] layer\n    repeat (50)\n        change [ghost v] effect by (-2)\n    end\n    wait (1) seconds\n    switch costume to (goal！ v)\n    start sound [Tada v]\n    wait (3) seconds\nend\n\nwhen I start as a clone\nshow\nif <(costume [number v]) = [1]> then\n    go to [front v] layer\n    go [forward v] (1) layers\n    set [aaaaaa v] to [22]\n    go to x: (-224) y: (0)\n    repeat (23)\n        change [aaaaaa v] by (-1)\n        change x by (aaaaaa)\n    end\n    broadcast (とげづくり v)\n    wait (0.5) seconds\n    set [aaaaaa v] to [-22]\n    repeat (23)\n        change [aaaaaa v] by (1)\n        change x by (aaaaaa)\n    end\n    broadcast (リスポーン v)\n    delete this clone\nend\nif <(costume [number v]) = [2]> then\n    go to [front v] layer\n    set [aaaaa v] to [-22]\n    go to x: (224) y: (0)\n    go to [front v] layer\n    repeat (23)\n        change [aaaaa v] by (1)\n        change x by (aaaaa)\n    end\n    wait (0.5) seconds\n    set [aaaaa v] to [22]\n    repeat (23)\n        change [aaaaa v] by (-1)\n        change x by (aaaaa)\n    end\n    delete this clone\nend\n\nwhen flag clicked\nhide\n\n@スプライト2\n\nwhen flag clicked\nset [weda v] to [0]\nhide\nwait until <(かど) = [0]>\nwait until <(かど) = [1]>\nshow\npoint in direction (80)\nforever\n    change [weda v] by (5)\n    turn right ([sin v] of (weda) ) degrees\nend\n\nwhen this sprite clicked\nbroadcast (ステージかえる v)\n\n@スプライト3\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> then\n    show\n    go to x: ([x position v] of [自機 v]) y: (130)\n    point in direction (180)\n    repeat until <touching (stage v)?>\n        change y by (-20)\n        if <touching (自機 v)?> then\n            broadcast (リスポーン v)\n        end\n    end\n    delete this clone\nend\nif <(costume [number v]) = [2]> then\n    show\n    forever\n        go to [back v] layer\n        turn right (15) degrees\n        if <touching (自機 v)?> then\n            broadcast (リスポーン v)\n        end\n    end\nend\n\ndefine 矢を作る\nset size to (100) %\nswitch costume to (矢 v)\ncreate clone of (_myself_ v)\n\ndefine 歯車生成 (x) (y)\nswitch costume to (歯車 v)\ngo to x: (x) y: (y)\nset size to (300) %\ncreate clone of (_myself_ v)\n\nwhen I receive [とげづくり v]\nif <(ステージ) = [11]> then\n    forever\n        矢を作る\n        wait (0.25) seconds\n    end\nend\nif <(ステージ) = [12]> then\n    歯車生成 [0] [-132]\nend\nif <(ステージ) = [13]> then\n    歯車生成 [-100] [-132]\n    歯車生成 [100] [-132]\nend\n\nwhen I receive [ステージかえる v]\nstop [other scripts in sprite v]\n\nwhen I receive [とげ削除 v]\ndelete this clone\n\n@サムネ・イル\n\nwhen flag clicked\nhide\n\n