2.5D Scratch Platformer 2

Instructions: Move with left and right arrow keys.\nJump with the up arrow key.

@Stage\n\nwhen I receive [スタート v]\nforever\n    play sound [level1 v] until done\nend\n\nwhen flag clicked\nhide variable [time v]\n\nwhen I receive [スタート v]\nset [ステージ番号 v] to [1]\nset [time v] to [0]\nrepeat until <(ステージ番号) = [10]>\n    wait (1) seconds\n    change [time v] by (1)\nend\nbroadcast (タイム表示 v)\n\n@地形\n\nwhen I receive [ステージ切り替え v]\nchange [ステージ番号 v] by (1)\nステージ生成\n\nwhen I receive [スタート v]\nset [ステージ番号 v] to [1]\nステージ生成\n\nwhen flag clicked\ngo to [front v] layer\nerase all\nhide\n\ndefine ステージ生成\nset [動いてよろしい? v] to [0]\nshow\nerase all\ngo to x: (0) y: (0)\nif <(ステージ番号) = [1]> then\n    switch costume to (1 v)\nelse\n    next costume\nend\nset size to (50) %\nset [brightness v] effect to (10)\nrepeat (49)\n    stamp\n    change size by (1)\nend\nclear graphic effects\nchange size by (1)\nstamp\nset [動いてよろしい? v] to [1]\n\n@スプライト1\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\n    switch costume to (ダウンロード \(1\) v)\nend\n\n@next\n\nwhen flag clicked\nhide\nforever\n    go to [front v] layer\nend\n\nwhen I receive [next level v]\ngo to [front v] layer\nshow\ngo to x: (465) y: (0)\nglide (0.3) secs to x: (0) y: (0)\nbroadcast (ステージ切り替え v) and wait\nset [変数 v] to [0]\nglide (0.3) secs to x: (-465) y: (0)\nset [動いてよろしい? v] to [1]\nhide\n\n@Hero\n\nwhen I receive [スタート v]\ngo to [front v] layer\nshow\nset size to (50) %\nswitch costume to (1 v)\nset drag mode [not draggable v]\ngo to x: (-190) y: (-50)\npoint in direction (90)\nset [ステージ v] to [1]\nset [xvel v] to [0]\nset [yvel v] to [0]\nforever\n    if <(動いてよろしい?) = [1]> then\n        if <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <[0] < (mouse x)>>> or <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < [0]>>>> then\n            if <(ジャンプコスチューム？) = [0]> then\n                if <(costume [number v]) = [17]> then\n                    switch costume to (2 v)\n                end\n                next costume\n            else\n                switch costume to (jump01 v)\n            end\n        else\n            if <(ジャンプコスチューム？) = [0]> then\n                switch costume to (1 v)\n            else\n                switch costume to (jump01 v)\n            end\n        end\n        set rotation style [left-right v]\n        if <<<mouse down?> and <(x position) > (mouse x)>> or <key (left arrow v) pressed?>> then\n            change [xv v] by (-1)\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            point in direction (90)\n        end\n        set [xv v] to ((Xv) * (0.9))\n        change x by (Xv)\n        if <touching (地形 v)?> then\n            change y by (1)\n            if <touching (地形 v)?> then\n                change y by (1)\n                if <touching (地形 v)?> then\n                    change y by (1)\n                    if <touching (地形 v)?> then\n                        change y by (1)\n                        if <touching (地形 v)?> then\n                            change y by (1)\n                            if <touching (地形 v)?> 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 [-6]\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 (地形 v)?> then\n            if <<<mouse down?> and <(y position) < (mouse y)>> or <key (up arrow v) pressed?>> then\n                switch costume to (jump01 v)\n                broadcast (ジャンプコスチューム処理 v)\n                set [yv v] to [15]\n                start sound [jump v]\n            end\n        end\n        change y by (1)\n        change [yv v] by (-1)\n        change y by (Yv)\n        if <touching (地形 v)?> 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            broadcast (next level v)\n            change [ステージ v] by (1)\n            set [yv v] to [0]\n            set [xv v] to [0]\n            set [動いてよろしい? v] to [0]\n            wait until <(変数) = [0]>\n            go to x: (-190) y: (-50)\n        end\n        if <(y position) < [-170]> then\n            start sound [hurt v]\n            change y by (10)\n            repeat (2)\n                switch costume to (die1b v)\n                wait (0.1) seconds\n                switch costume to (die2b v)\n                wait (0.1) seconds\n                switch costume to (die3b v)\n                wait (0.1) seconds\n            end\n            set [xv v] to [0]\n            set [yv v] to [0]\n            go to x: (-190) y: (-50)\n        end\n        if <touching (針 v)?> then\n            start sound [hurt v]\n            repeat (2)\n                switch costume to (die1b v)\n                wait (0.1) seconds\n                switch costume to (die2b v)\n                wait (0.1) seconds\n                switch costume to (die3b v)\n                wait (0.1) seconds\n            end\n            set [xv v] to [0]\n            set [yv v] to [0]\n            go to x: (-190) y: (-50)\n        end\n    end\nend\n\nwhen flag clicked\nrepeat (10)\n    hide\n    point in direction (90)\nend\n\nwhen I receive [ジャンプコスチューム処理 v]\nset [ジャンプコスチューム？ v] to [1]\nwait until <<[0] > (Yv)> or <(Yv) = [0]>>\nset [ジャンプコスチューム？ v] to [0]\n\nwhen flag clicked\nset [ジャンプコスチューム？ v] to [0]\n\n@針\n\nwhen I receive [ステージ切り替え v]\nnext costume\n\nwhen I receive [スタート v]\nswitch costume to (1 v)\nshow\n\nwhen flag clicked\nerase all\ngo to [front v] layer\ngo [backward v] (1) layers\nhide\n\n@intro\n\nwhen flag clicked\nreset timer\nhide\nset size to (100) %\npoint in direction (90)\nset [色 v] to (pick random (0) to (100))\nstart sound [Jensation - Delicious v]\ngo to x: (0) y: (100)\nclone [1]\nwait (0.5) seconds\ngo to x: (0) y: (-100)\nclone [1]\nwait (0.5) seconds\ngo to x: (0) y: (0)\nclone [1]\nset [clone id v] to [2]\nrepeat (2)\n    switch costume to (円 v)\n    create clone of (_myself_ v)\n    wait (0.1) seconds\n    switch costume to (円2 v)\n    create clone of (_myself_ v)\n    wait (0.1) seconds\nend\nwait until <(timer) > [1.6]>\nforever\n    clone [3]\n    wait (0.4) seconds\nend\n\ndefine clone (clone id)\nset [clone id v] to (clone id)\nif <(clone id) = [1]> then\n    repeat (50)\n        create clone of (_myself_ v)\n    end\nelse\n    if <(clone id) = [3]> then\n        switch costume to (rogo v)\n        create clone of (_myself_ v)\n    else\n        if <(clone id) = [4]> then\n            switch costume to (slide-up v)\n            create clone of (_myself_ v)\n        else\n            if <(clone id) = [5]> then\n                switch costume to (slide-down v)\n                create clone of (_myself_ v)\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nshow\nset [color v] effect to (0)\nif <(clone ID) = [1]> then\n    go to [front v] layer\n    switch costume to (pick random (2) to (4))\n    set size to (0) %\n    point in direction (pick random (70) to (110))\n    set [1 v] to (pick random (5) to (20))\n    set [2 v] to (pick random (-10) to (10))\n    repeat until <touching (_edge_ v)?>\n        change x by (2)\n        change size by (2)\n        change y by (1)\n        change [1 v] by (-2)\n        turn right (10) degrees\n    end\n    delete this clone\nend\nif <(clone ID) = [2]> then\n    set size to (0) %\n    repeat (20)\n        change [ghost v] effect by (6)\n        change size by (((100) - (size)) / (4))\n    end\nend\nif <(clone ID) = [3]> then\n    set [ghost v] effect to (100)\n    go to [front v] layer\n    set [1 v] to [0]\n    point in direction (30)\n    repeat (10)\n        change [ghost v] effect by (-20)\n        set [1 v] to (((1) * (0.75)) + (((90) - (direction)) * (0.3)))\n        turn right (1) degrees\n    end\n    repeat (20)\n        change size by (((10) - (size)) / (4))\n    end\n    delete this clone\nend\nif <(clone ID) = [4]> then\n    go to x: (0) y: (-442)\n    repeat (20)\n        change y by (((-20) - (y position)) / (4))\n    end\n    wait (1) seconds\n    delete this clone\nend\nif <(clone ID) = [5]> then\n    go to x: (0) y: (420)\n    repeat (20)\n        change y by (((20) - (y position)) / (4))\n    end\n    wait (1) seconds\n    delete this clone\nend\n\nset [clone id v] to [2]\nrepeat (2)\n    switch costume to (円 v)\nend\nwait (0.1) seconds\nswitch costume to (円2 v)\ncreate clone of (_myself_ v)\nwait (0.1) seconds\n\nwhen flag clicked\nwait until <(timer) > [1.4]>\nforever\n    clone [4]\n    wait (0.46) seconds\n    clone [5]\n    wait (0.46) seconds\nend\n\nwhen I receive [intro stop v]\nrepeat (20)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I receive [intro stop v]\nbroadcast (スタート v)\n\nwhen flag clicked\nwait (6) seconds\nstop [other scripts in sprite v]\nbroadcast (intro stop v)\nreset timer\n\n@スコア\n\nwhen flag clicked\nhide\n\ndefine 書く (数字) X (x) Y (y) 大きさ (大きさ) 明るさ (明るさ) 透明度 (透明度) 色 (色)\nset [color v] effect to (色)\nset [書けた? v] to [0]\nhide\ngo to [front v] layer\ngo to x: (x) y: (y)\nset size to (大きさ) %\nset [brightness v] effect to (明るさ)\nset [ghost v] effect to (透明度)\nset [数字の変数 v] to [0]\nrepeat (length of (数字))\n    change [数字の変数 v] by (1)\n    switch costume to (letter (数字の変数) of (数字))\n    create clone of (_myself_ v)\n    change x by ((大きさ) / (9.5))\nend\nset [書けた? v] to [1]\n\nwhen I start as a clone\ngo to [front v] layer\nwait until <(書けた?) = [1]>\nshow\n\nwhen I receive [タイム表示 v]\nif <(☁ ハイスコア) > (time)> then\n    set [☁ ハイスコア v] to (time)\nend\n書く (time) X [-150] Y [30] 大きさ [200] 明るさ [-100] 透明度 [0] 色 [0]\n書く (☁ ハイスコア) X [-150] Y [-30] 大きさ [200] 明るさ [-100] 透明度 [0] 色 [0]\n\n@文字1\n\nwhen flag clicked\nset x to (-200)\nset y to (30)\nhide\n\nwhen I receive [タイム表示 v]\ngo to [front v] layer\nshow\n\n@文字2\n\nwhen flag clicked\nset x to (-200)\nset y to (-30)\nhide\n\nwhen I receive [タイム表示 v]\ngo to [front v] layer\nshow\n\n