Platformer

Instructions: You have the only light in the world!!! \nTry to make your way through the 18 levels of darkness.\n\nInstructions:\n- Move with arrow keys\n- Skip levels with s\n- Love and favourite for less lags xD\n- Have fun!!!

@Stage\n\n@スプライト5\n\nwhen this sprite clicked\nstart sound [Finger Snap2 v]\nset [2d v] to [1]\nbroadcast (2d v)\nset size to (80) %\nwait (0.1) seconds\nset size to (70) %\n\nwhen I receive [スタート v]\nshow\ngo to [front v] layer\n\nwhen flag clicked\nhide\ngo to x: (100) y: (143)\n\n@スプライト6\n\nwhen this sprite clicked\nstart sound [Finger Snap2 v]\nset [2d v] to [2]\nset size to (80) %\nwait (0.1) seconds\nset size to (70) %\n\nwhen flag clicked\nhide\n\nwhen I receive [スタート v]\ngo to x: (-30) y: (140)\nshow\nset [2d v] to [2]\ngo to [front v] layer\n\n@スキン変更\n\nwhen flag clicked\nshow\n\nwhen this sprite clicked\nstart sound [Finger Snap2 v]\nset size to (110) %\nwait (0.1) seconds\nset size to (100) %\nbroadcast (a v)\n\nwhen I receive [スタート v]\nhide\n\n@プレイヤー\n\ndefine 初期設定プログラム\nshow\nset [x v] to [0]\nset [y v] to [0]\npoint in direction (90)\ngo to x: (-210) y: (-30)\nset size to (115) %\nswitch costume to (右 v)\n\nwhen flag clicked\nshow\ngo to x: (0) y: (80)\nset size to (150) %\nrepeat until <(a) = [1]>\n    set rotation style [all around v]\n    change size by ((((150) + ((3) * ([sin v] of ((400) * (((100) * (3)) + (timer))) ))) - (size)) / (3))\n    point in direction ((90) + ((2) * ([sin v] of ((180) * (((100) * (0.5)) + (timer))) )))\nend\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nswitch costume to (コスチューム1 v)\nrepeat (10)\n    change [ghost v] effect by (8.4)\n    change size by (-5)\nend\ndelete this clone\n\nwhen I receive [スタート v]\nswitch costume to (右 v)\nshow\n初期設定プログラム\nforever\n    set rotation style [left-right v]\n    if <<key (right arrow v) pressed?> or <<<mouse down?> and <(x position) < (mouse x)>> or <key (d v) pressed?>>> then\n        change [x v] by (0.95)\n        point in direction (90)\n    end\n    if <<key (left arrow v) pressed?> or <<<mouse down?> and <(mouse x) < (x position)>> or <key (a v) pressed?>>> then\n        change [x v] by (-0.95)\n        point in direction (-90)\n    end\n    set [x v] to ((X) * (0.89))\n    change x by (X)\n    if <touching (地形 v)?> then\n        change y by (1)\n    end\n    if <touching (地形 v)?> then\n        change y by (1)\n    end\n    if <touching (地形 v)?> then\n        change y by (1)\n    end\n    if <touching (地形 v)?> then\n        change y by (1)\n    end\n    if <touching (地形 v)?> then\n        change y by (1)\n    end\n    if <touching (地形 v)?> then\n        change y by (-5)\n        change x by ((X) * (-1))\n        if <<key (up arrow v) pressed?> or <<<mouse down?> and <(y position) < (mouse y)>> or <key (w v) pressed?>>> then\n            if <(X) < [0]> then\n                start sound [壁キック v]\n                set [x v] to [7]\n            else\n                start sound [壁キック v]\n                set [x v] to [-7]\n            end\n            set [y v] to [10]\n        end\n    end\n    change y by (Y)\n    if <touching (地形 v)?> then\n        change y by ((Y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<key (up arrow v) pressed?> or <<<mouse down?> and <(y position) < (mouse y)>> or <key (w v) pressed?>>> then\n        if <touching (地形 v)?> then\n            set [y v] to [12.4]\n            start sound [Jump v]\n        end\n    end\n    change y by (1)\n    if <[242] < (x position)> then\n        start sound [next v]\n        wait (0.1) seconds\n        初期設定プログラム\n        change [level v] by (1)\n    end\n    if <<(y position) < [-180]> or <touching (障害物 v)?>> then\n        start sound [チーン v]\n        change [hp v] by (-20)\n        初期設定プログラム\n    end\n    if <touching (ehat2 v)?> then\n        start sound [チーン v]\n        change [hp v] by (-20)\n        初期設定プログラム\n        broadcast (死 v)\n    end\n    change [y v] by (-1)\nend\n\nwhen I receive [a v]\nnext costume\n\n@かくし\n\nwhen flag clicked\ngo to x: (36) y: (28)\ngo to [front v] layer\nwait (0.02) seconds\ngo to [front v] layer\ngo to [front v] layer\nforever\n    if <<touching (ehat2 v)?> or <touching (プレイヤー v)?>> then\n        set [ghost v] effect to (85)\n    else\n        set [ghost v] effect to (0)\n    end\n    switch costume to (Level)\nend\n\n@スプライト3\n\nwhen flag clicked\ngo to x: (0) y: (-130)\nset [a v] to [0]\nshow\nwait (0.01) seconds\nforever\n    go to [front v] layer\nend\n\nwhen this sprite clicked\nset size to (90) %\nwait (0.1) seconds\nset size to (80) %\nbroadcast (スタート v)\nset [a v] to [1]\nhide\n\n@EHAT2\n\nwhen flag clicked\ngo to x: (1000) y: (10000)\nswitch costume to (explode-05-june\[2 v)\nhide\n\nwhen I receive [死 v]\ngo to x: (1000) y: (10000)\n\nwhen I receive [スタート v]\nset [動いてよろしい? v] to [1]\nhide\ngo to [front v] layer\nset size to (100) %\nswitch costume to ( v)\nset drag mode [not draggable v]\ngo to x: (1000) y: (100)\npoint in direction (90)\nset [now v] to [1]\nforever\n    if <<(Level) = [6]> or <(Level) = [8]>> then\n        show\n        set rotation style [left-right v]\n        if <([x position v] of [プレイヤー v]) < (x position)> then\n            change [xv3 v] by (-0.8)\n            point in direction (-90)\n        end\n        if <(x position) < ([x position v] of [プレイヤー v])> then\n            change [xv3 v] by (0.8)\n            point in direction (90)\n        end\n        set [xv3 v] to ((xv3) * (0.9))\n        change x by (xv3)\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                        end\n                        if <touching (地形 v)?> then\n                            change x by ((xv3) * (-1))\n                            change y by (-5)\n                        end\n                    end\n                end\n            end\n        end\n        change y by (1)\n        change [yv3 v] by (-1)\n        change y by (yv3)\n        if <touching (地形 v)?> then\n            change y by ((yv3) * (-1))\n            set [yv3 v] to [0]\n        end\n    else\n        hide\n    end\nend\n\n@スプライト1\n\nwhen flag clicked\nshow\nset size to (100) %\nforever\n    repeat (10)\n        change size by (0.4)\n    end\n    repeat (10)\n        change size by (-0.4)\n    end\n    go to [back v] layer\nend\n\n@スプライト2\n\nwhen I receive [終わり v]\nshow\nstop [all v]\n\nwhen flag clicked\nhide\n\n@地形\n\nwhen flag clicked\nset [level v] to [1]\nset [deaths v] to [0]\nset [タイム v] to [0]\nhide variable [deaths v]\n\nwhen flag clicked\nclear graphic effects\ngo to x: (40) y: (0)\nshow\nforever\n    if <(Level) > [4]> then\n        broadcast (う v)\n    end\n    switch costume to (Level)\n    if <(HP) < [0]> then\n        stop [all v]\n    end\nend\n\ndefine 地面作成\nerase all\nshow\ngo to x: (0) y: (0)\nset [brightness v] effect to (-50)\nset size to (50) %\nrepeat (50)\n    stamp\n    change size by (1.1)\n    change y by (0.1)\n    change [brightness v] effect by (1)\nend\n\nwhen flag clicked\nhide variable [☁ 世界記録 v]\nhide variable [タイム v]\nforever\n    repeat until <(Level) = [10]>\n        wait (0.1) seconds\n        change [タイム v] by (.1)\n        broadcast (kann v)\n    end\nend\n\nwhen I receive [kann v]\nif <(Level) = [10]> then\n    show variable [☁ 世界記録 v]\n    show variable [タイム v]\n    if <(タイム) < (☁ 世界記録)> then\n        set [☁ 世界記録 v] to (タイム)\n    end\nend\n\nwhen flag clicked\nforever\n    play sound [PIKASONIC - Osaka Express  v] until done\nend\n\nwhen flag clicked\nforever\n    if <(2D) = [1]> then\n        2d\n    end\n    if <(2D) = [2]> then\n        地面作成\n    end\nend\n\ndefine 2d\nclear graphic effects\nerase all\nshow\ngo to x: (0) y: (0)\n\nhide variable [☁ 世界記録 v]\nhide variable [タイム v]\n\nwhen I receive [スタート v]\nforever\n    go to [front v] layer\nend\n\n@HP1\n\nwhen flag clicked\nerase all\ngo to x: (-100) y: (169)\nset [maxhp v] to [100]\nset [hp v] to (MaxHP)\nforever\n    meter (HP) [100] (MaxHP) [-120] [140]\nend\n\ndefine meter (variable) (distance) (max) (x) (y)\nif <<(2D) = [1]> or <(2D) = [2]>> then\n    set y to (y)\n    set pen color to (#8c8c8c)\n    set pen size to (12)\n    set x to ((x) - (distance))\n    pen down\n    change x by ([abs v] of ((distance) * (1)) )\n    pen up\n    if <((max) * ((25) / (100))) < (variable)> then\n        set pen color to (#65ff00)\n    else\n        if <<((max) * ((10) / (100))) < (variable)> and <(variable) < ((max) * (((25) + (1)) / (100)))>> then\n            set pen color to (#eeff00)\n        else\n            if <<[0] < (variable)> and <(variable) < ((max) * (((10) + (1)) / (100)))>> then\n                set pen color to (#ff0000)\n            end\n        end\n    end\n    set pen size to (9)\n    set x to ((x) - (distance))\n    pen down\n    change x by ((variable) * ((2) / ((max) / (50))))\n    pen up\nend\n\nhide\n\nwhen I receive [2d v]\nforever\n    meter (HP) [100] (MaxHP) [-120] [140]\nend\n\n@Person effect\n\nwhen flag clicked\nset size to (30) %\nforever\n    go to [back v] layer\n    go [forward v] (10) layers\nend\n\nwhen flag clicked\nforever\n    show\n    go to (プレイヤー v)\n    turn right (1) degrees\nend\n\n@Cloud\n\nwhen flag clicked\nset [pixelate v] effect to (20)\nclear graphic effects\nhide\nset [初め+ v] to [-10]\nset [scroll x v] to [-500]\nset [scroll y v] to [100]\nset [最高x v] to [500]\nset [最高y v] to [200]\nbroadcast (雲へ v)\n\nwhen I receive [雲へ v]\nwait (0.1) seconds\n？\n\ndefine はいち (1) (2) (3)\nset [1 v] to (1)\nset [2 v] to (2)\nset [3 v] to (3)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset size to (75) %\nforever\n    go to [back v] layer\n    go [forward v] (1) layers\n    動き (((1) - (Scroll X)) + (合計)) (((2) - (Scroll Y)) + (([sin v] of ((timer) * (200)) ) * (5))) (3)\nend\n\ndefine 動き (1) (2) (3)\nshow\nswitch costume to (mu v)\nset size to ((1) / ()) %\ngo to x: (1) y: (2)\nset size to (100) %\nswitch costume to ((3) + (1))\n\nwhen I start as a clone\nhide\ngo to [back v] layer\n\nwhen I receive [ゲームへ v]\ndelete this clone\n\ndefine ？\nrepeat (((最高x) + (最高y)) / (250))\n    はいち (pick random (0) to ((最高x) - (500))) (pick random (80) to (最高y)) (pick random (1) to (3))\nend\n\nwhen I start as a clone\nforever\n    set [合計 v] to [0]\n    set [ghost v] effect to (100)\n    repeat (10)\n        change [ghost v] effect by (-7)\n    end\n    if <(pick random (1) to (2)) = [1]> then\n        set [進む方向 v] to [1]\n    else\n        set [進む方向 v] to [-1]\n    end\n    set [進む速度 v] to (pick random (1) to (4))\n    repeat until <<(((1) - (Scroll X)) + (合計)) < [-500]> or <(最高x) < (((1) - (Scroll X)) + (合計))>>\n        change [合計 v] by (((進む速度) * (進む方向)) + (初め+))\n    end\nend\n\nwhen I receive [クローンへ v]\nbroadcast (雲へ v)\n\n@サムネ\n\nwhen flag clicked\nhide\nforever\n    reset timer\nend\n\nwhen [timer v] > (0)\nset [pixelate v] effect to (400)\nshow\ngo to [front v] layer\nrepeat (20)\n    change [pixelate v] effect by (-20)\nend\n\n@障害物\n\nwhen flag clicked\nclear graphic effects\ngo to x: (40) y: (0)\nshow\nforever\n    switch costume to (Level)\nend\n\ndefine 地面作成\nshow\ngo to x: (0) y: (0)\nset [brightness v] effect to (-50)\nset size to (50) %\nrepeat (50)\n    go to [back v] layer\n    stamp\n    change size by (1.1)\n    change y by (0.1)\n    change [brightness v] effect by (1)\nend\n\nwhen flag clicked\nwait (0.1) seconds\nforever\n    if <(2D) = [1]> then\n        2d\n    end\n    if <(2D) = [2]> then\n        地面作成\n    end\nend\n\ndefine 2d\nclear graphic effects\nerase all\nshow\ngo to x: (0) y: (0)\n\n