Speed run platformer
@Stage\n\nwhen flag clicked\nswitch backdrop to (背景1 v)\nwait (2) seconds\nstart sound [TheFatRat - Windfall v]\n\nwhen I receive [outro v]\nwait (1.5) seconds\nswitch backdrop to (背景2 v)\n\nbroadcast (outro v)\n\n@Player\n\ndefine 動作\ngo to [back v] layer\nchange [yp v] by (-1)\nif <<<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<(mouse x) > [0]> and <mouse down?>>>> or <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<[0] > (mouse x)> and <mouse down?>>>>> then\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<(mouse x) > [0]> and <mouse down?>>>> then\n        change [xp v] by (1)\n        switch costume to (player2 v)\n    end\n    if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<[0] > (mouse x)> and <mouse down?>>>> then\n        change [xp v] by (-1)\n        switch costume to (player3 v)\n    end\nelse\n    switch costume to (player v)\nend\nset [xp v] to ((xp) * (0.88))\nchange x by (xp)\nrepeat (6)\n    if <touching (stage v)?> then\n        change y by (1)\n    end\nend\nif <<touching (stage v)?> or <touching (stage3 v)?>> then\n    if <touching (stage v)?> then\n        change y by (-6)\n        位置補正x (() - ((xp) / ([abs v] of (xp) ))) ([ceiling v] of ([abs v] of (xp) ) )\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>>> then\n            set [yp v] to [12]\n            set [xp v] to ((7) - (<(xp) > [0]> * (14)))\n        else\n            set [xp v] to [0]\n        end\n    else\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>>> then\n            if <touching (stage3 v)?> then\n                change [yp v] by (0.7)\n            else\n                set [yp v] to [12]\n            end\n        else\n            set [xp v] to ((xp) * (0.8))\n        end\n    end\nend\nif <touching (stage3 v)?> then\n    change y by ((yp) * (0.3))\nelse\n    change y by (yp)\nend\nif <<touching (stage v)?> or <touching (雫 v)?>> then\n    位置補正y (() - ((yp) / ([abs v] of (yp) ))) ([ceiling v] of ([abs v] of (yp) ) )\nend\nchange y by (-1.1)\nif <<touching (stage v)?> and <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>>>> then\n    set [yp v] to [15]\nend\nchange y by (1.1)\nif <(Y) < [-500]> then\n    初期位置\nend\n処理\nbroadcast (プログラム2 v)\n\nwhen I receive [プログラム v]\n動作\n\ndefine 処理\nchange [x v] by ((x position) - ((X) - (Camera_x)))\nchange [y v] by ((y position) - (((Y) - (Camera _y)) - (20)))\nchange [camera_x v] by ([floor v] of (((X) - (Camera_x)) * (0.1)) )\nchange [camera _y v] by ([floor v] of (((Y) - (Camera _y)) * (0.2)) )\nset x to ((X) - (Camera_x))\nset y to (((Y) - (Camera _y)) - (20))\n\ndefine 位置補正x (向き) (回数)\nif <(xp) = [0]> then\n    stop [this script v]\nend\nset [i v] to [0]\nrepeat until <<not <touching (stage v)?>> or <(i) = ((回数) + (1))>>\n    change [i v] by (1)\n    change x by (向き)\nend\nchange x by (() - ((向き) * (((回数) + (1)) * <<(i) = ((回数) + (1))> and <touching (stage v)?>>)))\n\ndefine 位置補正y (向き) (回数)\nif <(yp) = [0]> then\n    stop [this script v]\nend\nset [i v] to [0]\nrepeat until <<not <touching (stage v)?>> or <(i) = ((回数) + (1))>>\n    change [i v] by (1)\n    change y by (向き)\nend\nchange y by (() - ((向き) * (((回数) + (1)) * <<(i) = ((回数) + (1))> and <touching (stage v)?>>)))\nset [yp v] to [0]\n\ndefine 初期位置\ngo to x: (0) y: (-20)\nset [xp v] to [0]\nset [yp v] to [0]\nset [camera_x v] to [-200]\nset [camera _y v] to [0]\nset [x v] to [0]\nset [y v] to [0]\n\nif <touching (stage3 v)?> then\n    set [yp v] to [0]\nend\n\nwhen I receive [ys v]\n初期位置\n\nwhen I receive [outro v]\nwait (1.5) seconds\nhide\n\nwhen I receive [start v]\nshow\npoint in direction (90)\nset size to (60) %\ngo to [back v] layer\ngo to x: (0) y: (-20)\nset [xp v] to [0]\nset [yp v] to [0]\nset [camera_x v] to [-200]\nset [camera _y v] to [-20]\nset [x v] to [-200]\nset [y v] to [-20]\n\n@Stage\n\ndefine ステージ配置 (x座標) (y座標) (ステージ番号)\nswitch costume to (none v)\nset [my_x v] to (x座標)\nset [my_y v] to (y座標)\nswitch costume to ((ステージ番号) + (1))\nset [my_n v] to ((ステージ番号) + (1))\ncreate clone of (_myself_ v)\n\ndefine 移動 (x) (y)\nswitch costume to (none v)\ngo to x: (x) y: (y)\nif <<([abs v] of (x) ) > ([abs v] of (x position) )> or <([abs v] of (y) ) > ([abs v] of (y position) )>> then\n    hide\nelse\n    show\n    go to [back v] layer\n    go [forward v] (3) layers\nend\nswitch costume to (My_n)\n\nwhen I receive [プログラム2 v]\nif <(costume [number v]) = [1]> then\n    broadcast (プログラム v)\nelse\n    移動 ((My_x) - (Camera_x)) ((My_y) - (Camera _y))\nend\n\nwhen I start as a clone\nshow\n\nwhen I receive [outro v]\nwait (1.5) seconds\ndelete this clone\n\nwhen I receive [start v]\nset [基準値 v] to [480]\nhide\nステージ配置 [0] [0] [1]\nステージ配置 (基準値) [0] [2]\nステージ配置 ((基準値) * (2)) [0] [3]\nステージ配置 ((基準値) * (3)) [50] [4]\nステージ配置 ((基準値) * (4.5)) [0] [5]\nステージ配置 ((基準値) * (6)) [0] [6]\nステージ配置 ((基準値) * (7)) [0] [7]\nswitch costume to (none v)\nbroadcast (プログラム v)\n\n@Stage2\n\nwhen flag clicked\nset [c v] to [0]\nhide\nステージ配置 ((基準値) * (7)) [0] [1]\nswitch costume to (none v)\n\ndefine ステージ配置 (x座標) (y座標) (ステージ番号)\nswitch costume to (none v)\nset [my_x v] to (x座標)\nset [my_y v] to (y座標)\nswitch costume to ((ステージ番号) + (1))\nset [my_n v] to ((ステージ番号) + (1))\ncreate clone of (_myself_ v)\n\ndefine 移動 (x) (y)\nswitch costume to (none v)\ngo to x: (x) y: (y)\nif <<([abs v] of (x) ) > ([abs v] of (x position) )> or <([abs v] of (y) ) > ([abs v] of (y position) )>> then\n    hide\nelse\n    show\n    go to [back v] layer\n    go [forward v] (3) layers\nend\nswitch costume to (My_n)\n\nwhen I receive [プログラム2 v]\nif <(costume [number v]) = [1]> then\n    broadcast (プログラム v)\nelse\n    移動 ((My_x) - (Camera_x)) ((My_y) - (Camera _y))\n    go to [back v] layer\nend\n\nwhen I start as a clone\nshow\nforever\n    if <(end) = [0]> then\n        if <touching (player v)?> then\n            reset timer\n            set [c v] to [1]\n            start sound [SNES-Action01-22\(Select\) v]\n            switch costume to (2 v)\n            broadcast (c v)\n            repeat (20)\n                change size by (0.5)\n                change [ghost v] effect by (5)\n                go to [front v] layer\n            end\n            wait (1) seconds\n            broadcast (outro v)\n            forever\n                reset timer\n            end\n        end\n    end\nend\n\nwhen I receive [end v]\nif <(c) = [0]> then\n    stop [all v]\nend\n\n@outro2\n\nwhen I start as a clone\nshow\nif <(costume [number v]) = [2]> then\n    set size to (100) %\n    point in direction (80)\n    go to [front v] layer\n    go [backward v] (1) layers\n    forever\n        change y by (([cos v] of (y) ) * (2))\n        change [y v] by (7)\n    end\nelse\n    if <(costume [number v]) = [3]> then\n        point in direction (90)\n        set size to (50) %\n        go to [back v] layer\n        go [forward v] (1) layers\n        forever\n            change y by (([cos v] of (y) ) * (2))\n            change [y v] by (10)\n        end\n    else\n        if <<<(costume [number v]) = [4]> or <(costume [number v]) = [5]>> or <(costume [number v]) = [6]>> then\n            point in direction (pick random (0) to (360))\n            go to x: (pick random (-250) to (250)) y: (-185)\n            set size to (100) %\n            go to [back v] layer\n            set [ghost v] effect to (20)\n            repeat until <[201] < (y position)>\n                change y by (7)\n            end\n            delete this clone\n        else\n            if <(costume [number v]) = [1]> then\n                forever\n                    set size to (70) %\n                    change [outro2: s v] by (3)\n                    change x by ([cos v] of (outro2: s) )\n                    change y by ([sin v] of (outro2: s) )\n                    point in direction ((([tan v] of (outro2: s) ) * (8)) + (90))\n                end\n            else\n                if <(costume [number v]) = [7]> then\n                    forever\n                        go to x: (0) y: (0)\n                        go to [back v] layer\n                        turn right (5) degrees\n                    end\n                else\n                    if <(costume [number v]) = [8]> then\n                        go to x: (0) y: (0)\n                        show\n                        set [ghost v] effect to (100)\n                        repeat (40)\n                            change [ghost v] effect by (-2.5)\n                            go to [front v] layer\n                        end\n                        switch backdrop to (背景2 v)\n                    else\n                        go to [back v] layer\n                        go [forward v] (5) layers\n                        go to x: (0) y: (0)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwait (0.2) seconds\nrepeat (40)\n    change [ghost v] effect by (2.5)\n    go to [front v] layer\nend\nhide\n\nwhen flag clicked\ndelete this clone\n\nwhen I receive [outro v]\nswitch costume to (コスチューム1 v)\ncreate clone of (_myself_ v)\nforever\n    reset timer\nend\n\nwait (1.5) seconds\nwait (0.1) seconds\n\nwait (0.2) seconds\nswitch costume to (pick random (4) to (6))\ncreate clone of (_myself_ v)\n\nwhen I receive [outro v]\n\nhide\nswitch backdrop to (背景1 v)\nwait (1.6) seconds\nswitch backdrop to (背景2 v)\ngo to x: (-94) y: (-87)\nswitch costume to (ten  v)\ncreate clone of (_myself_ v)\ngo to x: (108) y: (72)\nswitch costume to (ダウンロード - 2021-03-19t175307 v)\ncreate clone of (_myself_ v)\ngo to x: (112) y: (-102)\nswitch costume to (logo v)\ncreate clone of (_myself_ v)\nswitch costume to (back v)\ncreate clone of (_myself_ v)\n\n@スプライト2\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (コスチューム1 v)\nwait (1) seconds\nrepeat (4)\n    next costume\n    wait (0.4) seconds\nend\nbroadcast (start v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [game over v]\nset [end v] to [1]\nshow\nswitch costume to (コスチューム2 v)\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-5)\n    go to [front v] layer\nend\nstop [all v]\n\nwhen I start as a clone\ngo to x: (0) y: (500)\n\n@スプライト3\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nwait (0.03) seconds\ndelete this clone\n\ndefine 数字\nset [time v] to ((25) - (timer))\nshow\ngo to x: (-240) y: (150)\nset [temp3 v] to [0]\nset size to (150) %\nrepeat (length of ((round ((time) * (100))) / (100)))\n    change [temp3 v] by (1)\n    if <(letter (temp3) of ((round ((time) * (100))) / (100))) = [.]> then\n        switch costume to (コスチューム11 v)\n    else\n        switch costume to ((letter (temp3) of ((round ((time) * (100))) / (100))) + (1))\n    end\n    change x by (15)\n    create clone of (_myself_ v)\nend\ngo to x: (-230) y: (150)\nhide\n\nwhen flag clicked\nset [end v] to [0]\nhide\n\nwhen I receive [start v]\nforever\n    if <(end) = [1]> then\n        go to [back v] layer\n    end\nend\n\nwhen I receive [start v]\nreset timer\nhide\ngo to x: (-230) y: (150)\nforever\n    if <(end) = [0]> then\n        show\n        数字\n    else\n        hide\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <[25] < (timer)> then\n        set [end v] to [1]\n        broadcast (Game over v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [outro v]\nhide\n\nwhen I receive [game over v]\nhide\n\nwhen I receive [c v]\nset [end v] to [1]\n\nwhen I receive [start v]\nwait (0.1) seconds\nreset timer\n\n@スプライト1\n\nwhen flag clicked\nhide\n\nshow\ngo to [front v] layer\n\n
English：英語\n▶Press the flag twice\n▶arrow key operation\n▶Aim for the goal in time\n-------------------------------------------------------------------------\nJapanese：日本語\n▶旗は2回押してください\n▶矢印キー操作\n▶時間内にゴールを目指します