Red and Blue - A platformer

Instructions: Red and Blue - A platformer\n===How to play===\n* I'm Japanese so I used Google Translate *\nThe movements of the two are linked.\nOperation… ← ↓ ↑ → key, tap\nThorn ... Touch it and it's out.\nBoth of them can go to the next stage when they reach the right side of the screen.\n二人は動きが連動しています。\n操作…←↓↑→キー 、タップ\nトゲ…触れるとアウトです。\n二人とも画面の右側にたどり着くと次のステージに行けます。\n

@Stage\n\nwhen flag clicked\nwait (0.5) seconds\nset volume to (100) %\nforever\n    play sound [Warriyo - Mortals \(feat v] until done\nend\n\nwhen I receive [t v]\nrepeat (10)\n    change volume by (-10)\nend\nstop all sounds\n\n@主人公\n\nwhen flag clicked\nset [y v] to [0]\ngo to x: (-170) y: (20)\nset rotation style [left-right v]\nset [ghost v] effect to (0)\npoint in direction (90)\nforever\n    create clone of (_myself_ v)\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <[0] < (mouse x)>>> then\n        change [x v] by (1)\n        point in direction (90)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < [0]>>> then\n        change [x v] by (-1)\n        point in direction (-90)\n    end\n    if <<touching (トゲ v)?> or <(y position) < [-179]>> then\n        broadcast (die v)\n    end\n    set [x v] to ((x) * (0.89))\n    change x by (x)\n    if <touching (スプライト1 v)?> then\n        change y by (1)\n        if <touching (スプライト1 v)?> then\n            change y by (1)\n            if <touching (スプライト1 v)?> then\n                change y by (1)\n                if <touching (スプライト1 v)?> then\n                    change y by (1)\n                    if <touching (スプライト1 v)?> then\n                        change y by (1)\n                        if <touching (スプライト1 v)?> then\n                            change y by (1)\n                            if <touching (スプライト1 v)?> then\n                                change y by (1)\n                                if <touching (スプライト1 v)?> then\n                                    change x by ((x) * (-1))\n                                    change y by (-7)\n                                    if <<key (up arrow v) pressed?> or <<mouse down?> and <[0] < (mouse y)>>> then\n                                        if <[0] < (x)> then\n                                            set [x v] to [-8]\n                                        else\n                                            set [x v] to [8]\n                                        end\n                                        set [y v] to [13]\n                                    else\n                                        set [x v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (-1)\n    if <touching (スプライト1 v)?> then\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <[0] < (mouse y)>>> then\n            set [y v] to [14]\n        end\n    end\n    change y by (1)\n    change [y v] by (-1)\n    change y by (y)\n    if <touching (スプライト1 v)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\nend\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nrepeat (5)\n    change [ghost v] effect by (25)\nend\ndelete this clone\n\nwhen I receive [die v]\ngo to x: (-170) y: (20)\nset [y v] to [0]\n\n\n    go to x: (-170) y: (20)\n    broadcast (next v)\nend\n\nbroadcast (next v)\n\nwhen I receive [next v]\ngo to x: (-170) y: (20)\nset [y v] to [0]\n\nwhen I receive [t v]\nhide\n\nwhen flag clicked\nshow\n\n@スプライト1\n\nwhen flag clicked\n\nwhen flag clicked\nshow\nswitch costume to (コスチューム1 v)\ngo to x: (0) y: (0)\nforever\n    if <<[239] < ([x position v] of [主人公 v])> and <[239] < ([x position v] of [主人公2 v])>> then\n        if <(costume [number v]) = [8]> then\n            broadcast (outro v)\n            broadcast (t v) and wait\n            stop all sounds\n            stop [all v]\n        else\n            broadcast (n v) and wait\n        end\n    end\nend\n\nwhen I receive [next v]\nnext costume\n\nwhen I receive [t v]\nhide\n\nwhen flag clicked\nshow\n\n@主人公2\n\nwhen flag clicked\nset [y2 v] to [0]\ngo to x: (-170) y: (-20)\nset rotation style [left-right v]\nset [ghost v] effect to (0)\npoint in direction (90)\nforever\n    create clone of (_myself_ v)\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <[0] < (mouse x)>>> then\n        change [x2 v] by (1)\n        point in direction (90)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < [0]>>> then\n        change [x2 v] by (-1)\n        point in direction (-90)\n    end\n    if <<touching (トゲ v)?> or <[179] < (y position)>> then\n        broadcast (die v)\n    end\n    set [x2 v] to ((x2) * (0.89))\n    change x by (x2)\n    if <touching (スプライト1 v)?> then\n        change y by (-1)\n        if <touching (スプライト1 v)?> then\n            change y by (-1)\n            if <touching (スプライト1 v)?> then\n                change y by (-1)\n                if <touching (スプライト1 v)?> then\n                    change y by (-1)\n                    if <touching (スプライト1 v)?> then\n                        change y by (-1)\n                        if <touching (スプライト1 v)?> then\n                            change y by (-1)\n                            if <touching (スプライト1 v)?> then\n                                change y by (-1)\n                                if <touching (スプライト1 v)?> then\n                                    change x by ((x2) * (-1))\n                                    change y by (7)\n                                    if <<key (up arrow v) pressed?> or <<mouse down?> and <[0] < (mouse y)>>> then\n                                        if <[0] < (x2)> then\n                                            set [x2 v] to [-8]\n                                        else\n                                            set [x2 v] to [8]\n                                        end\n                                        set [y2 v] to [-13]\n                                    else\n                                        set [x2 v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (1)\n    if <touching (スプライト1 v)?> then\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <[0] < (mouse y)>>> then\n            set [y2 v] to [-14]\n        end\n    end\n    change y by (-1)\n    change [y2 v] by (1)\n    change y by (y2)\n    if <touching (スプライト1 v)?> then\n        change y by ((y2) * (-1))\n        set [y2 v] to [0]\n    end\nend\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nrepeat (5)\n    change [ghost v] effect by (25)\nend\ndelete this clone\n\nwhen I receive [die v]\ngo to x: (-170) y: (-20)\nset [y2 v] to [0]\n\nwhen I receive [next v]\ngo to x: (-170) y: (20)\nset [y v] to [0]\n\nwhen I receive [t v]\nhide\n\nwhen flag clicked\nshow\n\n@トゲ\n\nwhen flag clicked\nswitch costume to (コスチューム1 v)\ngo to [back v] layer\ngo [forward v] (1) layers\ngo to x: (0) y: (0)\n\nwhen I receive [next v]\nnext costume\n\nwhen I receive [t v]\nhide\n\nwhen flag clicked\nshow\n\n@スプライト2\n\nwhen flag clicked\nswitch costume to (コスチューム1 v)\nshow\ngo to x: (0) y: (0)\nset size to (100) %\ngo to [back v] layer\nforever\n    set size to ((100) + (([sin v] of ((timer) * (90)) ) * (1))) %\nend\n\nwhen I receive [next v]\nnext costume\n\nwhen I receive [t v]\nhide\n\nwhen flag clicked\nshow\n\n@logo\n\nwhen I start as a clone\nshow\nif <(costume [number v]) < [1.9]> then\n    delete this clone\nend\nif <(costume [number v]) < [4.9]> then\n    set size to (100) %\n    switch costume to (pick random (2) to (4))\n    go to [front v] layer\n    set [color v] effect to (pick random (0) to (200))\n    set [yv v] to (pick random (0) to (25))\n    set [logo: xv v] to (pick random (-30) to (30))\n    repeat until <<(y position) < [-179]> or <[239] < ([abs v] of (x position) )>>\n        change [yv v] by (-2)\n        set [logo: xv v] to ((logo: xv) * (0.95))\n        turn right ((logo: xv) * (-3)) degrees\n        change x by (logo: xv)\n        change y by (yv)\n    end\n    delete this clone\nelse\n    if <(costume [number v]) < [6.9]> then\n        go to x: (0) y: (0)\n        go to [back v] layer\n        go [forward v] (1) layers\n        switch costume to (コスチューム8 v)\n        set size to (250) %\n        set [color v] effect to (0)\n        set [ghost v] effect to (50)\n        switch costume to (コスチューム5 v)\n        forever\n            turn right (5) degrees\n        end\n    else\n        set size to (100) %\n        if <(costume [number v]) < [7.9]> then\n            go to x: (115) y: (80)\n            forever\n                if <(([sin v] of ((timer) * (150)) ) * (150)) < [0]> then\n                    change x by (((115) - (x position)) / (3))\n                else\n                    if <[0] < (([sin v] of ((timer) * (150)) ) * (150))> then\n                        change x by (((-115) - (x position)) / (3))\n                    end\n                end\n            end\n        else\n            if <(costume [number v]) < [8.9]> then\n                go to x: (115) y: (-80)\n                forever\n                    if <(([sin v] of ((timer) * (150)) ) * (150)) < [0]> then\n                        change x by (((115) - (x position)) / (3))\n                    else\n                        if <[0] < (([sin v] of ((timer) * (150)) ) * (150))> then\n                            change x by (((-115) - (x position)) / (3))\n                        end\n                    end\n                end\n            else\n                if <(costume [number v]) < [9.9]> then\n                    go to [back v] layer\n                    point in direction (90)\n                    go to x: (0) y: (0)\n                    switch costume to (コスチューム8 v)\n                    set size to (1500) %\n                    switch costume to (コスチューム9 v)\n                    repeat (15)\n                        switch costume to (コスチューム8 v)\n                        change size by (((50) - (size)) / (5))\n                        switch costume to (コスチューム9 v)\n                    end\n                else\n                    if <(costume [number v]) < [10.9]> then\n                        go to [back v] layer\n                        forever\n                            show\n                            set size to (100) %\n                            point in direction (90)\n                            switch costume to (コスチューム10 v)\n                            go to x: (0) y: (0)\n                        end\n                    else\n                        if <(costume [number v]) < [11.9]> then\n                            go to [front v] layer\n                            show\n                            set size to (100) %\n                            point in direction (90)\n                            switch costume to (コスチューム11 v)\n                            go to x: (0) y: (100)\n                            forever\n                                point in direction ((([sin v] of ((timer) * (150)) ) * (8)) + (90))\n                                if <[0] < (([cos v] of ((timer) * (150)) ) * (100))> then\n                                    change y by (((-120) - (y position)) / (8))\n                                else\n                                    change y by (((120) - (y position)) / (8))\n                                end\n                            end\n                        else\n                            if <(costume [number v]) < [12.9]> then\n                                go to [front v] layer\n                                go to x: (15) y: (-138)\n                                forever\n                                    point in direction ((([sin v] of ((timer) * (150)) ) * (8)) + (90))\n                                end\n                            else\n                                if <(costume [number v]) < [13.9]> then\n                                    set [ghost v] effect to (90)\n                                    go to [front v] layer\n                                    go [backward v] (1) layers\n                                    go to x: (15) y: (-138)\n                                    forever\n                                        point in direction ((([sin v] of ((timer) * (150)) ) * (8)) + (90))\n                                    end\n                                else\n                                    if <(costume [number v]) < [14.9]> then\n                                        go to [back v] layer\n                                        go [forward v] (4) layers\n                                        forever\n                                            switch costume to (コスチューム14 v)\n                                            set [ghost v] effect to (90)\n                                            set size to (pick random (70) to (130)) %\n                                            go to x: (pick random (-240) to (240)) y: (pick random (-50) to (-180))\n                                            repeat until <[179] < (y position)>\n                                                change y by ((size) / (15))\n                                                change [ghost v] effect by (-2)\n                                            end\n                                        end\n                                    else\n                                        switch costume to (コスチューム15 v)\n                                        go to [front v] layer\n                                        go to x: (0) y: (0)\n                                        set [ghost v] effect to (100)\n                                        show\n                                        repeat (10)\n                                            change [ghost v] effect by (-10)\n                                        end\n                                        reset timer\n                                        repeat (12)\n                                            change size by ((timer) * (100))\n                                        end\n                                        delete this clone\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [ok v]\nwait (0.2) seconds\nオラァ [15]\nshow\nぶちまけ [15]\npoint in direction (90)\ngo to x: (0) y: (0)\nset size to (100) %\nset [ghost v] effect to (0)\nswitch costume to (コスチューム12 v)\ncreate clone of (_myself_ v)\nswitch costume to (コスチューム13 v)\ncreate clone of (_myself_ v)\nswitch costume to (コスチューム11 v)\ncreate clone of (_myself_ v)\nswitch costume to (コスチューム10 v)\ncreate clone of (_myself_ v)\nswitch costume to (コスチューム7 v)\ncreate clone of (_myself_ v)\nswitch costume to (コスチューム6 v)\ncreate clone of (_myself_ v)\nswitch costume to (コスチューム5 v)\ncreate clone of (_myself_ v)\nswitch costume to (コスチューム1 v)\nreset timer\ngo to [front v] layer\ngo [backward v] (1) layers\nforever\n    switch costume to (コスチューム1 v)\n    set size to (100) %\n    point in direction ((([tan v] of ((timer) * (100)) ) * (6)) + (90))\n    set x to (([sin v] of ((timer) * (150)) ) * (150))\n    set y to (([cos v] of ((timer) * (150)) ) * (100))\n    set [expansion rate v] to (([sin v] of ((timer) * (150)) ) * (10))\n    if <[145] < ((([tan v] of ((timer) * (100)) ) * (6)) + (90))> then\n        ぶちまけ [12]\n    end\nend\n\nwhen I receive [outro v]\nstop [other scripts in sprite v]\nstart sound [Disconnect v]\nshow\nswitch costume to (コスチューム9 v)\nset size to (100) %\ncreate clone of (_myself_ v)\nhide\nbroadcast (“???” v)\nwait (0.5) seconds\nbroadcast (ok v)\nwait (0.2) seconds\nset volume to (100) %\nforever\n    play sound [Jnathyn - Dioma \[NCS Release\] v] until done\nend\n\nwhen I receive [ok v]\n\ndefine ぶちまけ (n)\nrepeat (n)\n    switch costume to (pick random (2) to (4))\n    create clone of (_myself_ v)\n    switch costume to (コスチューム1 v)\nend\n\ndefine オラァ (n)\nrepeat (n)\n    switch costume to (コスチューム14 v)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [“???” v]\nswitch costume to (コスチューム15 v)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\n\n@スプライト3\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [t v]\nforever\n    go to [back v] layer\n    show\nend\n\n@スプライト4\n\nwhen I receive [n v]\nshow\nswitch costume to (コスチューム2 v)\nset size to (300) %\nswitch costume to (コスチューム1 v)\ngo to x: (0) y: (382)\nset size to (100) %\nrepeat (15)\n    change y by (-25.5)\nend\nbroadcast (next v)\nwait (0.3) seconds\nrepeat (15)\n    switch costume to (コスチューム2 v)\n    set size to (300) %\n    switch costume to (コスチューム1 v)\n    change y by (25.5)\n    set size to (100) %\nend\nhide\n\nwhen flag clicked\nhide\n\n@スプライト5\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nset volume to (50) %\ngo to x: (0) y: (-50)\nrepeat (15)\n    change [ghost v] effect by (-25)\n    change y by (((4) - (y position)) / (6))\nend\nwait (1) seconds\nrepeat (15)\n    change [ghost v] effect by (25)\n    change y by (((240) - (y position)) / (6))\nend\nhide\n\n@スプライト6\n\nwhen flag clicked\nshow\nset [ghost v] effect to (50)\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        if <([costume # v] of [スプライト1 v]) = [8]> then\n            broadcast (outro v)\n            broadcast (t v) and wait\n            stop all sounds\n            stop [all v]\n        else\n            broadcast (n v) and wait\n        end\n    end\nend\n\nwhen I receive [t v]\nhide\n\n@スプライト7\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nhide\n\n