Caved || A Mobile Platformer

Instructions: I think it's a good engine what do you think\nComment what you think :D\n✔️  Crouching          ✔️  Levels\n✔️  Wall jumping       ✔️  Fairly easy to re-code if you \n✔️  Spikes               happen to be making a platformer\n✔️  Lava

@Stage\n\nwhen flag clicked\nswitch backdrop to ( v)\nforever\n    play sound [ v] until done\nend\n\n@軽量化\n\nwhen flag clicked\nset [fps v] to []\nhide variable [情報 v]\nset [情報 v] to []\nset [mode v] to []\n\nwhen I receive [🎌 v]\nset [fps v] to [loading...]\nwait (1) seconds\nset [fps v] to [go!]\nforever\n    set [fps v] to [0]\n    wait (1) seconds\n    set [fps v] to (Fps)\n    wait (1) seconds\nend\n\nwhen I receive [🎌 v]\nif <[Creative] = (mode)> then\n    show variable [情報 v]\n    set [情報 v] to [このモードは現在メンテナンス中ですバグが少しありますが気にしないでください]\n    wait (5) seconds\nend\nhide variable [情報 v]\n\ndefine riset\nset [☁ world v] to [10000]\n\nriset\n\n@Player\n\ndefine 動作\nif <(mode) = [survival]> then\n    if <touching (mizu v)?> then\n        change [yの力 v] by (-0.2)\n    else\n        change [yの力 v] by (-1)\n    end\nend\nif <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<(mouse x) > [0]> and <mouse down?>>>> then\n    point in direction (90)\n    if <touching (mizu v)?> then\n        change [xの力 v] by (0.8)\n    else\n        change [xの力 v] by (1)\n    end\nend\nif <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<[0] > (mouse x)> and <mouse down?>>>> then\n    point in direction (-90)\n    if <touching (mizu v)?> then\n        change [xの力 v] by (-0.8)\n    else\n        change [xの力 v] by (-1)\n    end\nend\nset [xの力 v] to ((xの力) * (0.88))\nchange x by (xの力)\nrepeat (6)\n    if <touching (ステージ v)?> then\n        change y by (1)\n    end\n    if <touching (ステージ v)?> then\n        change y by (-6)\n        位置補正x (() - ((xの力) / ([abs v] of (xの力) ))) ([ceiling v] of ([abs v] of (xの力) ) )\n        if <not <touching (mizu v)?>> then\n            if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>>> then\n                set [yの力 v] to [12]\n                set [xの力 v] to ((7) - (<(xの力) > [0]> * (14)))\n            else\n                set [xの力 v] to [0]\n            end\n        end\n    end\nend\nchange y by (yの力)\nif <touching (ステージ v)?> then\n    位置補正y (() - ((yの力) / ([abs v] of (yの力) ))) ([ceiling v] of ([abs v] of (yの力) ) )\nend\nif <touching (mizu v)?> then\n    change y by (-0.2)\nelse\n    change y by (-1.1)\nend\nif <(mode) = [survival]> then\n    if <not <touching (mizu v)?>> then\n        if <<touching (ステージ v)?> and <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>>>> then\n            change [☁ セカイのジャンプ数 v] by (1)\n            change [jump 何回 v] by (1)\n            set [yの力 v] to [15]\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            set [yの力 v] to [6]\n        end\n    end\n    change y by (1.1)\n    if <touching (teki1 v)?> then\n        set [yの力 v] to [1]\n        if <(direction) = [90]> then\n            set [xの力 v] to [2]\n        else\n            set [xの力 v] to [-2]\n        end\n    end\n    if <touching (チェックポイント3 v)?> then\n        set [yの力 v] to [15]\n    end\nelse\n    if <not <touching (mizu v)?>> then\n        if <<key (down arrow v) pressed?> or <<key (s v) pressed?> or <<[0] > (mouse y)> and <mouse down?>>>> then\n            set [yの力 v] to [-1]\n        end\n    else\n        if <<key (down arrow v) pressed?> or <<key (s v) pressed?> or <<[0] > (mouse y)> and <mouse down?>>>> then\n            set [yの力 v] to [-0.5]\n        end\n    end\n    if <not <touching (mizu v)?>> then\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>>> then\n            set [yの力 v] to [1]\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            set [yの力 v] to [0.5]\n        end\n        if <touching (チェックポイント3 v)?> then\n            set [yの力 v] to [2]\n        end\n    end\n    change y by (1.1)\nend\nif <(mode) = [survival]> then\n    if <<<(Y) < [-400]> or <touching (障害物 v)?>> or <touching (teki1 v)?>> then\n        if <(無敵・) = [0]> then\n            broadcast (333 v)\n            set [無敵・ v] to [1]\n            start sound [A Elec Bass v]\n            if <<<touching color (#ffff54)?> or <touching color (#f3c633)?>> or <<touching color (#b92601)?> or <touching color (#a70f00)?>>> then\n                change [ライフ v] by (-2.5)\n                broadcast (111 v)\n                if <(ライフ) < [0.5]> then\n                    broadcast (死んだ v)\n                    change [☁ セカイの死亡数 v] by (1)\n                    初期位置\n                end\n            else\n                change [ライフ v] by (-1.5)\n                broadcast (222 v)\n                if <(ライフ) < [0.5]> then\n                    broadcast (死んだ v)\n                    change [☁ セカイの死亡数 v] by (1)\n                    初期位置\n                end\n            end\n        end\n    end\n    処理\n    broadcast (プログラム2 v)\nelse\n    set [ライフ v] to [20]\n    処理\n    broadcast (プログラム2 v)\nend\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 <(xの力) = [0]> then\n    stop [this script v]\nend\nset [i v] to [0]\nrepeat until <<not <touching (ステージ v)?>> or <(i) = ((回数) + (1))>>\n    change [i v] by (1)\n    change x by (向き)\nend\nchange x by (() - ((向き) * (((回数) + (1)) * <<(i) = ((回数) + (1))> and <touching (ステージ v)?>>)))\n\ndefine 位置補正y (向き) (回数)\nif <(yの力) = [0]> then\n    stop [this script v]\nend\nset [i v] to [0]\nrepeat until <<not <touching (ステージ v)?>> or <(i) = ((回数) + (1))>>\n    change [i v] by (1)\n    change y by (向き)\nend\nchange y by (() - ((向き) * (((回数) + (1)) * <<(i) = ((回数) + (1))> and <touching (ステージ v)?>>)))\nset [yの力 v] to [0]\n\ndefine 初期位置\nset rotation style [left-right v]\nstart sound [_oof v]\nclear graphic effects\nrepeat (10)\n    change size by (10)\n    change [ghost v] effect by (5)\nend\nset size to (500) %\nclear graphic effects\nhide\nwait (1) seconds\nshow\nset rotation style [left-right v]\nset [ghost v] effect to (0)\nswitch costume to (idle v)\ngo to x: (0) y: (-20)\nset [ライフ v] to [20]\nset [xの力 v] to [0]\nset [yの力 v] to [0]\nset [camera_x v] to (復活x)\nset [camera _y v] to (復活y)\nset [x v] to (復活x)\nset [y v] to (復活y)\nbroadcast (555 v)\n\nwhen I receive [111 v]\n無敵判定 [0.3]\n\nwhen I receive [222 v]\n無敵判定 [0.1]\n\nwhen I receive [333 v]\nset [brightness v] effect to (-20)\nwait (0.1) seconds\nset [brightness v] effect to (0)\n\nwhen [timer v] > (1)\nset [ghost v] effect to (100)\nswitch costume to (idle v)\nshow\npoint in direction (90)\ngo to x: (-205) y: (-42)\nset size to (700) %\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\n\ndefine 無敵判定 (何秒)\nwait (何秒) seconds\nset [無敵・ v] to [0]\n\nwhen I receive [555 v]\n無敵判定 [2]\n\nwhen I receive [🎌 v]\nshow\nif <(mode) = [survival]> then\n    forever\n        wait (1) seconds\n        if <<(ライフ) < [19.5]> and <not <touching (障害物 v)?>>> then\n            change [ライフ v] by (1)\n        end\n    end\nend\n\nwhen I receive [🎌 v]\nset [水に触れた v] to [0]\nforever\n    if <(mode) = [survival]> then\n        if <<touching (チェックポイント v)?> or <touching (チェックポイント2 v)?>> then\n            set [yの力 v] to [15]\n        end\n    else\n        if <<touching (チェックポイント v)?> or <touching (チェックポイント2 v)?>> then\n            set [yの力 v] to [1]\n        end\n    end\n    if <not <(mode) = [Creative]>> then\n        if <not <(yの力) = [0]>> then\n            switch costume to (jump v)\n        end\n    end\n    if <touching (mizu v)?> then\n        set [水に触れた v] to [1]\n        forever\n            if <touching (mizu v)?> then\n                set [水に触れた v] to [1]\n            else\n                set [水に触れた v] to [0]\n            end\n        end\n    end\nend\n\nwhen I receive [🎌 v]\nset size to (500) %\nforever\n    wait (0.1) seconds\n    set [y 過去 v] to (yの力)\n    if <touching (mizu v)?> then\n        play sound [Swim3 v] until done\n    end\n    reset timer\n    if <(mode) = [survival]> then\n        if <touching (障害物 v)?> then\n            set [yの力 v] to [7]\n            if <(direction) = [90]> then\n                change [xの力 v] by (1)\n            else\n                change [xの力 v] by (-1)\n            end\n        end\n    end\nend\n\nwhen I receive [🎌 v]\nforever\n    wait (0.1) seconds\n    if <not <<<touching (ステージ v)?> and <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>>>> or <<<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<[0] > (mouse x)> and <mouse down?>>>> or <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<(mouse x) > [0]> and <mouse down?>>>>>>> then\n    if <<not <touching (ステージ v)?>> and <not <(yの力) = [0]>>> then\nend\n\nwhen I receive [🎌 v]\nforever\n    if <<<touching (ステージ v)?> and <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>>>> or <<<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<[0] > (mouse x)> and <mouse down?>>>> or <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<(mouse x) > [0]> and <mouse down?>>>>>> then\nend\n\nwhen I receive [🎌 v]\nset [無敵・ v] to [0]\nswitch costume to (idle v)\nset rotation style [left-right v]\ngo to x: (0) y: (-20)\nset [xの力 v] to [0]\nset [yの力 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]\nset [復活x v] to [-200]\nset [復活y v] to [-20]\nforever\n    if <not <(y 過去) = [0]>> then\n        switch costume to (jump v)\n    end\n    if <not <touching (mizu v)?>> then\n        if <<<<touching (ステージ v)?> and <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>>>> or <<<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<[0] > (mouse x)> and <mouse down?>>>> or <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<(mouse x) > [0]> and <mouse down?>>>>>> and <not <touching (障害物 v)?>>> then\n            if <not <[7] = (costume [number v])>> then\n                wait (pick random (2) to (4)) seconds\n                start sound [A Bass3 v]\n            end\n        end\n    end\nend\n\nwhen I receive [🎌 v]\nset [jump 何回 v] to [0]\n\nwhen flag clicked\nhide\nrepeat until <(えらんだ？) = [1]>\n    set [camera _y v] to [0]\n    set [camera_x v] to [0]\n    hide\nend\n\nwhen I receive [🎌 v]\nchange [☁ 参照 v] by (1)\nshow\n\nwhen I receive [プログラム v]\nforever\n    change [fps v] by (1)\n    if <(えらんだ？) = [1]> then\n        動作\n    else\n        hide\n    end\nend\n\nset [camera _y v] to [20]\nset [camera_x v] to [20]\n\nwhen I receive [🎌 v]\nset volume to (0) %\nrepeat (4)\n    初期位置\nend\nset volume to (100) %\n\n@ステージ\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\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\nchange [camera _y v] by (1000)\n\nwhen I receive [🎌 v]\nhide\nステージ配置 [0] [0] [1]\nステージ配置 [239] [0] [1]\nステージ配置 [478] [0] [1]\nステージ配置 [717] [0] [1]\nステージ配置 [1195] [0] [1]\nステージ配置 [1396] [0] [2]\nステージ配置 [1686] [0] [2]\nステージ配置 [1924] [0] [2]\nステージ配置 [2150] [0] [2]\nステージ配置 [2300] [0] [2]\nステージ配置 [2500] [100] [2]\nステージ配置 [2800] [200] [2]\nステージ配置 [3100] [300] [2]\nステージ配置 [3300] [400] [2]\nステージ配置 [3500] [500] [2]\nステージ配置 [3800] [500] [2]\nステージ配置 [4100] [500] [2]\nステージ配置 [4600] [450] [4]\nステージ配置 [4800] [480] [4]\nステージ配置 [5100] [500] [2]\nステージ配置 [5500] [600] [2]\nステージ配置 [5800] [500] [2]\nステージ配置 [6100] [400] [2]\nステージ配置 [6400] [300] [2]\nswitch costume to (none v)\nbroadcast (プログラム v)\n\nset [camera_x v] to [5000]\nchange [camera _y v] by (2000)\n\n@障害物\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\nend\nswitch costume to (My_n)\n\nwhen I receive [プログラム2 v]\nif <not <(costume [number v]) = [1]>> then\n    移動 ((My_x) - (Camera_x)) ((My_y) - (Camera _y))\nend\n\nwhen I start as a clone\nshow\n\nwhen I receive [🎌 v]\nhide\nステージ配置 [-340] [-220] [1]\nステージ配置 [-550] [-220] [1]\nステージ配置 [-760] [-220] [1]\nステージ配置 [800] [-220] [1]\nswitch costume to (none v)\n\n@サムネ\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen [timer v] > (1)\nset [ghost v] effect to (100)\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\n\n@ステージ（背面）\n\ndefine ステージ配置 (x座標) (y座標) (ステージ番号)\ngo to [back v] layer\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\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    set [brightness v] effect to (7)\nend\n\nwhen I start as a clone\ngo to [back v] layer\nshow\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\nend\nswitch costume to (My_n)\n\nwhen I receive [🎌 v]\nhide\nステージ配置 [-218] [-20] [4]\nステージ配置 [269] [-60] [4]\nステージ配置 [0] [0] [1]\nステージ配置 [600] [0] [2]\nステージ配置 [870] [-100] [3]\nステージ配置 [1000] [-20] [4]\nステージ配置 [1300] [-100] [5]\nステージ配置 [1760] [0] [2]\nステージ配置 [2100] [-77] [8]\nswitch costume to (none v)\nbroadcast (プログラム v)\n\n@Health2\n\nwhen flag clicked\ngo to x: (0) y: (-160)\nset [ライフ v] to [20]\ngo to [front v] layer\nhide\nforever\n    switch costume to ((ライフ) + (1))\nend\n\nwhen flag clicked\nforever\n    set [前ライフ v] to (ライフ)\n    wait (0.2) seconds\nend\n\nwhen flag clicked\nforever\n    if <(ライフ) < [4]> then\n        change y by (3)\n        wait (0.07) seconds\n        change y by (-3)\n    end\nend\n\nwhen [timer v] > (1)\nhide\n\nwhen I receive [🎌 v]\nshow\n\n@チェックポイント2\n\nwhen flag clicked\nswitch costume to (a v)\nhide\n\nwhen I receive [プログラム2 v]\n移動 ((1825) - (Camera_x)) ((-80) - (Camera _y))\n\ndefine 移動 (x) (y)\nswitch costume to ((チェックポイント) + (1))\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    if <<touching (player v)?> and <(チェックポイント) = [1]>> then\n        start sound [ v]\n        set [チェックポイント v] to [2]\n        set [復活x v] to [1825]\n        set [復活y v] to [0]\n        broadcast (スポーン地点設定 v)\n        switch costume to (b v)\n    end\nend\n\n@チェックポイント\n\nwhen flag clicked\nset [チェックポイント v] to [0]\nswitch costume to (a v)\nhide\n\nwhen I receive [プログラム2 v]\n移動 ((1127) - (Camera_x)) ((-80) - (Camera _y))\n\ndefine 移動 (x) (y)\nswitch costume to (none v)\ngo to x: (x) y: (y)\nswitch costume to ((チェックポイント) + (2))\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    if <<touching (player v)?> and <(チェックポイント) = [0]>> then\n        start sound [levelup v]\n        set [チェックポイント v] to [1]\n        set [復活x v] to [1127]\n        set [復活y v] to [0]\n        broadcast (スポーン地点設定 v)\n        switch costume to (b v)\n    end\nend\n\n@mizu\n\nwhen flag clicked\nhide\nswitch costume to (none v)\nbroadcast (プログラム v)\n\ndefine ステージ配置 (x座標) (y座標) (ステージ番号)\ngo to [back v] layer\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    go to [back v] layer\n    show\nend\nswitch costume to (My_n)\n\nwhen I receive [プログラム2 v]\nif <(costume [number v]) = [1]> then\n    broadcast (プログラム v)\nelse\n    go to [back v] layer\n    移動 ((My_x) - (Camera_x)) ((My_y) - (Camera _y))\nend\n\nwhen I start as a clone\ngo to [back v] layer\nshow\n\n@Timer\n\nwhen flag clicked\nhide variable [time: v]\nreset timer\nset [time: v] to [0]\nforever\n    change [タイマー v] by (1)\n    wait (1) seconds\nend\n\nwhen I receive [クリア v]\nset [time: v] to (join (タイマー) [s])\nshow variable [time: v]\nforever\n    \nend\n\ndefine \nif <(タイマー) < (☁ world)> then\n    set [☁ world v] to (タイマー)\nend\n\n@お知らせ\n\nwhen flag clicked\nhide\n\nwhen I receive [スポーン地点設定 v]\nswitch costume to (1 v)\ngo to x: (-100) y: (192)\nshow\nglide (1) secs to x: (-100) y: (153)\nwait (1) seconds\nglide (1) secs to x: (-100) y: (200)\nhide\n\n@お知らせ2\n\nwhen flag clicked\nhide\nwait until <(Jump 何回) = [10]>\nstart sound [ v]\nshow\ngo to x: (-90) y: (192)\nswitch costume to (1 v)\nglide (1) secs to x: (-90) y: (153)\nwait (1) seconds\nglide (1) secs to x: (-90) y: (200)\nhide\nwait until <(Jump 何回) = [30]>\nstart sound [ v]\nshow\ngo to x: (-90) y: (192)\nswitch costume to (4 v)\nglide (1) secs to x: (-90) y: (153)\nwait (1) seconds\nglide (1) secs to x: (-90) y: (200)\nhide\nwait until <(Jump 何回) = [50]>\nstart sound [ v]\nshow\ngo to x: (-90) y: (192)\nswitch costume to (3 v)\nglide (1) secs to x: (-90) y: (153)\nwait (1) seconds\nglide (1) secs to x: (-90) y: (200)\nhide\nwait until <(Jump 何回) = [100]>\nstart sound [ v]\nshow\ngo to x: (-90) y: (192)\nswitch costume to (2 v)\nglide (1) secs to x: (-90) y: (153)\nwait (1) seconds\nglide (1) secs to x: (-90) y: (200)\nhide\n\n@お知らせ3\n\nwhen flag clicked\nhide\nwait (1) seconds\nwait until <(水に触れた) = [1]>\nstart sound [ v]\nswitch costume to (1 v)\ngo to x: (-90) y: (192)\nshow\nglide (1) secs to x: (-90) y: (153)\nwait (1) seconds\nglide (1) secs to x: (-90) y: (200)\nhide\n\n@ネザー\n\nwhen flag clicked\nhide\nswitch costume to (a v)\n\nwhen I receive [プログラム2 v]\n移動 ((0) - (Camera_x)) ((30) - (Camera _y))\n\ndefine 移動 (x) (y)\nif <(えらんだ？) = [1]> then\n    go to x: (x) y: (y)\n    if <<([abs v] of (x) ) > ([abs v] of (x position) )> or <([abs v] of (y) ) > ([abs v] of (y position) )>> then\n        hide\n    else\n        show\n    end\nelse\n    hide\nend\n\nif <touching (player v)?> then\nbroadcast (クリア v)\n\nwhen [timer v] > (0.2)\nhide\n\n@クリア\n\nwhen flag clicked\nset [a v] to [0]\nset [jump 何回 v] to [0]\nhide\n\nwhen I receive [クリア v]\nset [a v] to [0]\nset size to (80) %\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\nforever\n    change [a v] by (1)\n    point in direction (([sin v] of ((a) * (5)) ) + (90))\nend\n\n@武器\n\nset size to (80) %\npoint in direction (90)\nshow\ngo to [back v] layer\ngo [forward v] (2) layers\nswitch costume to (_sword6 v)\nforever\n    if <(costume [number v]) = [1]> then\n        if <<key (space v) pressed?> or <<touching (mouse-pointer v)?> and <mouse down?>>> then\n            repeat (5)\n                turn right (10) degrees\n                if <([direction v] of [player v]) = [90]> then\n                    go to x: (([x position v] of [player v]) + (30)) y: ([y position v] of [player v])\n                    switch costume to (_sword6 v)\n                else\n                    go to x: (([x position v] of [player v]) + (-30)) y: ([y position v] of [player v])\n                    switch costume to (_sword2 v)\n                end\n            end\n            repeat (5)\n                turn right (-10) degrees\n                if <([direction v] of [player v]) = [90]> then\n                    go to x: (([x position v] of [player v]) + (30)) y: ([y position v] of [player v])\n                    switch costume to (_sword6 v)\n                else\n                    go to x: (([x position v] of [player v]) + (-30)) y: ([y position v] of [player v])\n                    switch costume to (_sword2 v)\n                end\n                if <([direction v] of [player v]) = [90]> then\n                    go to x: (([x position v] of [player v]) + (30)) y: ([y position v] of [player v])\n                    switch costume to (_sword6 v)\n                else\n                    go to x: (([x position v] of [player v]) + (-30)) y: ([y position v] of [player v])\n                    switch costume to (_sword2 v)\n                end\n            end\n        end\n        if <([direction v] of [player v]) = [90]> then\n            go to x: (([x position v] of [player v]) + (30)) y: ([y position v] of [player v])\n            switch costume to (_sword6 v)\n        else\n            go to x: (([x position v] of [player v]) + (-30)) y: ([y position v] of [player v])\n            switch costume to (_sword2 v)\n        end\n    else\n        if <<key (space v) pressed?> or <<touching (mouse-pointer v)?> and <mouse down?>>> then\n            repeat (5)\n                turn right (-10) degrees\n                if <([direction v] of [player v]) = [90]> then\n                    go to x: (([x position v] of [player v]) + (30)) y: ([y position v] of [player v])\n                    switch costume to (_sword6 v)\n                else\n                    go to x: (([x position v] of [player v]) + (-30)) y: ([y position v] of [player v])\n                    switch costume to (_sword2 v)\n                end\n            end\n            repeat (5)\n                turn right (10) degrees\n                if <([direction v] of [player v]) = [90]> then\n                    go to x: (([x position v] of [player v]) + (30)) y: ([y position v] of [player v])\n                    switch costume to (_sword6 v)\n                else\n                    go to x: (([x position v] of [player v]) + (-30)) y: ([y position v] of [player v])\n                    switch costume to (_sword2 v)\n                end\n                if <([direction v] of [player v]) = [90]> then\n                    go to x: (([x position v] of [player v]) + (30)) y: ([y position v] of [player v])\n                    switch costume to (_sword6 v)\n                else\n                    go to x: (([x position v] of [player v]) + (-30)) y: ([y position v] of [player v])\n                    switch costume to (_sword2 v)\n                end\n            end\n        end\n        if <([direction v] of [player v]) = [90]> then\n            go to x: (([x position v] of [player v]) + (30)) y: ([y position v] of [player v])\n            switch costume to (_sword6 v)\n        else\n            go to x: (([x position v] of [player v]) + (-30)) y: ([y position v] of [player v])\n            switch costume to (_sword2 v)\n        end\n    end\nend\n\nwhen I receive [isonoken womotu v]\nforever\n    hide\nend\n\nwhen [timer v] > (1)\nset [ghost v] effect to (100)\nswitch costume to (_sword6 v)\npoint in direction (90)\nset size to (150) %\ngo to x: (([x position v] of [player v]) + (60)) y: (130)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\n\nwhen I receive [🎌 v]\n\nwhen flag clicked\nhide\n\n@isinoken\n\nwhen I receive [プログラム2 v]\nforever\n    移動 ((2955) - (Camera_x)) ((259) - (Camera _y))\nend\n\nwhen flag clicked\n\nset [敵1hp v] to [30]\nset [brightness v] effect to (0)\nswitch costume to (2 v)\nhide\n\ndefine 移動 (x) (y)\n\nchange [s2 v] by (8)\ngo to x: (x) y: (y)\nset size to ((([sin v] of (s2) ) * (9)) + (100)) %\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\nend\nif <touching (player v)?> then\n    switch costume to (1 v)\n    broadcast (isonoken womotu v)\nend\n\nwhen [timer v] > (1)\nhide\n\n@武器2\n\nwhen I receive [て v]\nforever\n    hide\nend\n\nwhen I receive [isonoken womotu v]\n\nshow\nforever\n    if <(costume [number v]) = [1]> then\n        if <<key (space v) pressed?> or <<touching (mouse-pointer v)?> and <mouse down?>>> then\n            repeat (5)\n                turn right (10) degrees\n                if <([direction v] of [player v]) = [90]> then\n                    go to x: (([x position v] of [player v]) + (30)) y: ([y position v] of [player v])\n                    switch costume to (_sword6 v)\n                else\n                    go to x: (([x position v] of [player v]) + (-30)) y: ([y position v] of [player v])\n                    switch costume to (_sword2 v)\n                end\n            end\n            repeat (5)\n                turn right (-10) degrees\n                if <([direction v] of [player v]) = [90]> then\n                    go to x: (([x position v] of [player v]) + (30)) y: ([y position v] of [player v])\n                    switch costume to (_sword6 v)\n                else\n                    go to x: (([x position v] of [player v]) + (-30)) y: ([y position v] of [player v])\n                    switch costume to (_sword2 v)\n                end\n                if <([direction v] of [player v]) = [90]> then\n                    go to x: (([x position v] of [player v]) + (30)) y: ([y position v] of [player v])\n                    switch costume to (_sword6 v)\n                else\n                    go to x: (([x position v] of [player v]) + (-30)) y: ([y position v] of [player v])\n                    switch costume to (_sword2 v)\n                end\n            end\n        end\n        if <([direction v] of [player v]) = [90]> then\n            go to x: (([x position v] of [player v]) + (30)) y: ([y position v] of [player v])\n            switch costume to (_sword6 v)\n        else\n            go to x: (([x position v] of [player v]) + (-30)) y: ([y position v] of [player v])\n            switch costume to (_sword2 v)\n        end\n    else\n        if <<key (space v) pressed?> or <<touching (mouse-pointer v)?> and <mouse down?>>> then\n            repeat (5)\n                turn right (-10) degrees\n                if <([direction v] of [player v]) = [90]> then\n                    go to x: (([x position v] of [player v]) + (30)) y: ([y position v] of [player v])\n                    switch costume to (_sword6 v)\n                else\n                    go to x: (([x position v] of [player v]) + (-30)) y: ([y position v] of [player v])\n                    switch costume to (_sword2 v)\n                end\n            end\n            repeat (5)\n                turn right (10) degrees\n                if <([direction v] of [player v]) = [90]> then\n                    go to x: (([x position v] of [player v]) + (30)) y: ([y position v] of [player v])\n                    switch costume to (_sword6 v)\n                else\n                    go to x: (([x position v] of [player v]) + (-30)) y: ([y position v] of [player v])\n                    switch costume to (_sword2 v)\n                end\n                if <([direction v] of [player v]) = [90]> then\n                    go to x: (([x position v] of [player v]) + (30)) y: ([y position v] of [player v])\n                    switch costume to (_sword6 v)\n                else\n                    go to x: (([x position v] of [player v]) + (-30)) y: ([y position v] of [player v])\n                    switch costume to (_sword2 v)\n                end\n            end\n        end\n        if <([direction v] of [player v]) = [90]> then\n            go to x: (([x position v] of [player v]) + (30)) y: ([y position v] of [player v])\n            switch costume to (_sword6 v)\n        else\n            go to x: (([x position v] of [player v]) + (-30)) y: ([y position v] of [player v])\n            switch costume to (_sword2 v)\n        end\n    end\nend\n\nwhen [timer v] > (1)\nhide\n\nwhen flag clicked\nset size to (80) %\npoint in direction (90)\nhide\ngo to [back v] layer\ngo [forward v] (2) layers\nswitch costume to (_sword6 v)\n\n@最初の画面\n\nwhen flag clicked\nset [えらんだ？ v] to [0]\ngo to [front v] layer\nswitch costume to ( v)\nshow\ngo to x: (0) y: (0)\nwait (1) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\n    go to x: (0) y: (0)\nend\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\ngo to [back v] layer\ngo [backward v] (9999) layers\nhide\nwait until <(えらんだ？) = [2]>\nbroadcast (🎌 v)\n\nwhen [timer v] > (1)\ngo to x: (0) y: (0)\ngo to [back v] layer\nhide\n\nwhen flag clicked\nrepeat until <(えらんだ？) = [2]>\n    reset timer\nend\n\n@チェックポイント3\n\nwhen flag clicked\nset [チェックポイント v] to [0]\nswitch costume to (a v)\nhide\n\nwhen I receive [プログラム2 v]\n移動 ((5000) - (Camera_x)) ((420) - (Camera _y))\n\ndefine 移動 (x) (y)\nswitch costume to (none v)\ngo to x: (x) y: (y)\nswitch costume to ((チェックポイント) + (0))\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    if <<touching (player v)?> and <(チェックポイント) = [2]>> then\n        start sound [ v]\n        set [チェックポイント v] to [3]\n        set [復活x v] to [5000]\n        set [復活y v] to [500]\n        broadcast (スポーン地点設定 v)\n        switch costume to (b v)\n    end\nend\n\n@宣伝\n\nwhen flag clicked\nswitch costume to ( v)\ngo to x: (-114) y: (250)\nhide\ngo to [front v] layer\nforever\n    wait (pick random (10) to (30)) seconds\n    show\n    if <<touching (お知らせ v)?> or <<touching (お知らせ3 v)?> or <touching (お知らせ2 v)?>>> then\n        hide\n        wait (1) seconds\n        show\n        if <<touching (お知らせ v)?> or <<touching (お知らせ3 v)?> or <touching (お知らせ2 v)?>>> then\n            hide\n            wait (1) seconds\n            show\n            if <<touching (お知らせ v)?> or <<touching (お知らせ3 v)?> or <touching (お知らせ2 v)?>>> then\n                hide\n                wait (1) seconds\n                show\n                if <<touching (お知らせ v)?> or <<touching (お知らせ3 v)?> or <touching (お知らせ2 v)?>>> then\n                    hide\n                    wait (1) seconds\n                    show\n                    if <<touching (お知らせ v)?> or <<touching (お知らせ3 v)?> or <touching (お知らせ2 v)?>>> then\n                        hide\n                        wait (1) seconds\n                        show\n                        if <<touching (お知らせ v)?> or <<touching (お知らせ3 v)?> or <touching (お知らせ2 v)?>>> then\n                            hide\n                            wait (1) seconds\n                            show\n                        end\n                    end\n                end\n            end\n        end\n    end\n    glide (1) secs to x: (-114) y: (153)\n    wait (1) seconds\n    if <<touching (お知らせ v)?> or <<touching (お知らせ3 v)?> or <touching (お知らせ2 v)?>>> then\n        hide\n    end\n    glide (1) secs to x: (-114) y: (250)\n    hide\nend\n\nwhen [timer v] > (0.5)\nhide\n\n@teki1\n\nwhen I receive [プログラム2 v]\n\nforever\n    if <(えらんだ？) = [1]> then\n        移動 (((1500) - (Camera_x)) + (huttobi 1)) ((-70) - (Camera _y))\n    end\nend\n\nwhen flag clicked\n\nset size to (120) %\npoint in direction (90)\nset [敵1hp v] to [30]\nshow variable [fps v]\nset [敵一　エフェクト v] to [0]\nset [brightness v] effect to (0)\nswitch costume to (1 v)\nhide\n\nwhen I receive [444 v]\nset [brightness v] effect to (30)\nwait (0.1) seconds\nset [brightness v] effect to (0)\n\ndefine 移動 (x) (y)\n\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    if <(敵1hp) < [1]> then\n        if <(敵一　エフェクト) = [0]> then\n            set [敵一　エフェクト v] to [1]\n            broadcast (666 v)\n            wait (1) seconds\n        end\n        hide\n    end\nend\nif <touching (障害物 v)?> then\n    change [敵1hp v] by (-1)\n    broadcast (444 v)\n    start sound (pick random (1) to (4))\nend\nif <<touching (武器 v)?> and <not <([direction v] of [武器 v]) = [90]>>> then\n    if <touching (武器 v)?> then\n        change [敵1hp v] by (-1)\n    end\n    if <[90] = ([direction v] of [player v])> then\n        change [huttobi 1 v] by (pick random (1) to (5))\n    else\n        change [huttobi 1 v] by (pick random (-1) to (-5))\n    end\n    broadcast (444 v)\n    if <(敵1hp) < [1]> then\nend\nif <<<touching (武器 v)?> and <not <([direction v] of [武器 v]) = [90]>>> or <<touching (武器2 v)?> and <not <([x position v] of [武器2 v]) = [90]>>>> then\n    repeat (4)\n        start sound (pick random (1) to (4))\n    end\nend\nif <<touching (武器2 v)?> and <not <([direction v] of [武器2 v]) = [90]>>> then\n    if <touching (武器2 v)?> then\n        change [敵1hp v] by (-5)\n    end\n    if <[90] = ([direction v] of [player v])> then\n        change [huttobi 1 v] by (pick random (1) to (6))\n    else\n        change [huttobi 1 v] by (pick random (-1) to (-6))\n    end\n    broadcast (444 v)\n    if <(敵1hp) < [1]> then\nend\nif <<<touching (武器 v)?> and <not <([direction v] of [武器 v]) = [90]>>> or <<touching (武器2 v)?> and <not <([x position v] of [武器2 v]) = [90]>>>> then\n    repeat (4)\n        start sound (pick random (1) to (4))\n    end\nend\n\nwhen flag clicked\nset [huttobi 1 v] to [0]\n\nwhen flag clicked\n\nforever\n    if <not <touching (ステージ v)?>> then\n        if <<not <touching (player v)?>> and <(distance to [player v]) < [150]>> then\n            repeat (100)\n                change [huttobi 1 v] by (1)\n            end\n            wait (1) seconds\n            repeat (100)\n                change [huttobi 1 v] by (-1)\n            end\n            wait (1) seconds\n        end\n    end\nend\n\nwhen I receive [666 v]\nrepeat (18)\n    turn right (5) degrees\nend\n\n@saisyo\n\nwhen flag clicked\nshow\nset [えらんだ？ v] to [0]\ngo to x: (-710) y: (0)\ngo to [back v] layer\nrepeat until <(えらんだ？) = [1]>\n    change x by (3)\n    if <[1200] < (x position)> then\n        go to x: (-710) y: (0)\n    end\nend\n\nwhen I receive [🎌 v]\nhide\n\nwhen [timer v] > (1)\nhide\n\n@saba\n\nwhen flag clicked\nhide\nwait (3) seconds\ngo to x: (-90) y: (-70)\nset size to (0) %\nshow\nrepeat until <(えらんだ？) = [1]>\n    if <touching (mouse-pointer v)?> then\n        change size by (((115) - (size)) * (0.2))\n        if <mouse down?> then\n            if <(えらんだ？) = [0]> then\n                change [えらんだ？ v] by (1)\n                set [mode v] to [survival]\n                broadcast (サバ v)\n                hide\n                play sound [Click v] until done\n            end\n        end\n    else\n        change size by (((100) - (size)) * (0.2))\n    end\nend\n\nwhen [timer v] > (1)\nhide\n\nwhen I receive [クリ v]\nbroadcast (🎌 v)\nhide\n\n@saba2\n\nwhen flag clicked\nhide\nwait (3) seconds\nset size to (0) %\ngo to x: (90) y: (70)\nshow\nrepeat until <(えらんだ？) = [1]>\n    if <touching (mouse-pointer v)?> then\n        change size by (((115) - (size)) * (0.2))\n        if <mouse down?> then\n            if <(えらんだ？) = [0]> then\n                change [えらんだ？ v] by (1)\n                set [mode v] to [Creative]\n                broadcast (クリ v)\n                hide\n                play sound [Click v] until done\n            end\n        end\n    else\n        change size by (((100) - (size)) * (0.2))\n    end\nend\n\nwhen [timer v] > (1)\nhide\n\nwhen I receive [サバ v]\nbroadcast (🎌 v)\nhide\n\n@背景\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\nwhen I receive [🎌 v]\nbroadcast (h v)\ngo to [front v] layer\nshow\nset [ライフ v] to [20]\nset [xの力 v] to [0]\nset [yの力 v] to [0]\nset [camera_x v] to (復活x)\nset [camera _y v] to (復活y)\nset [x v] to (復活x)\nset [y v] to (復活y)\nbroadcast (555 v)\nwait (6) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nif <[20] < (FPS)> then\n    set [ライフ v] to [20]\n    set [xの力 v] to [0]\n    set [yの力 v] to [0]\n    set [camera_x v] to (復活x)\n    set [camera _y v] to (復活y)\n    set [x v] to (復活x)\n    set [y v] to (復活y)\n    set [タイマー v] to [0]\n    broadcast (555 v)\nelse\n    set [ライフ v] to [20]\n    set [xの力 v] to [0]\n    set [yの力 v] to [0]\n    set [camera_x v] to (復活x)\n    set [camera _y v] to (復活y)\n    set [x v] to (復活x)\n    set [y v] to (復活y)\n    show variable [情報 v]\n    if <(mode) = [Creative]> then\n        set [タイマー v] to [0]\n        broadcast (555 v)\n        wait (8) seconds\n        set [情報 v] to [FPSが極端に低いです...]\n    else\n        set [情報 v] to [FPSが極端に低いです...]\n    end\n    wait (4) seconds\n    hide variable [情報 v]\nend\n\nwhen [timer v] > (0.1)\nhide\n\nwhen flag clicked\nset [\[1000 o 1\] v] to [0]\nforever\n    if <<(☁ セカイのジャンプ数) = [1000]> and <[0] = (\[1000 o 1\])>> then\n        set [\[1000 o 1\] v] to [1]\n        speak [世界のジャンプ数が1000を達成しました！]::tts\n    end\n    if <<(☁ セカイのジャンプ数) = [2000]> and <[0] = (\[2000 o 1\])>> then\n        set [\[2000 o 1\] v] to [1]\n        speak [世界のジャンプ数が2000を達成しました！]::tts\n    end\n    if <<(☁ セカイのジャンプ数) = [3000]> and <[0] = (\[3000 o 1\])>> then\n        set [\[3000 o 1\] v] to [1]\n        speak [世界のジャンプ数が3000を達成しました！]::tts\n    end\n    if <<(☁ セカイのジャンプ数) = [4000]> and <[0] = (\[4000 o 1\])>> then\n        set [\[4000 o 1\] v] to [1]\n        speak [世界のジャンプ数が5000を達成しました！]::tts\n    end\n    if <<(☁ セカイのジャンプ数) = [5000]> and <[0] = (\[5000 o 1\])>> then\n        set [\[5000 o 1\] v] to [1]\n        speak [世界のジャンプ数が5000を達成しました！]::tts\n    end\n    if <<(☁ セカイのジャンプ数) = [6000]> and <[0] = (\[6000 o 1\])>> then\n        set [\[6000 o 1\] v] to [1]\n        speak [世界のジャンプ数が6000を達成しました！]::tts\n    end\n    if <<(☁ セカイのジャンプ数) = [7000]> and <[0] = (\[7000 o 1\])>> then\n        set [\[7000 o 1\] v] to [1]\n        speak [世界のジャンプ数が7000を達成しました！]::tts\n    end\n    if <<(☁ セカイのジャンプ数) = [8000]> and <[0] = (\[8000 o 1\])>> then\n        set [\[8000 o 1\] v] to [1]\n        speak [世界のジャンプ数が8000を達成しました！]::tts\n    end\n    if <<(☁ セカイのジャンプ数) = [9000]> and <[0] = (\[9000 o 1\])>> then\n        set [\[9000 o 1\] v] to [1]\n        speak [世界のジャンプ数が9000を達成しました！]::tts\n    end\n    if <<(☁ セカイのジャンプ数) = [10000]> and <[0] = (\[10000 o 1\])>> then\n        set [\[10000 o 1\] v] to [1]\n        speak [世界のジャンプ数が10000を達成しました！]::tts\n    end\n    if <<(☁ セカイのジャンプ数) = [100000]> and <[0] = (\[10000 o 1\])>> then\n        set [\[100000 o 1\] v] to [1]\n        speak [世界のジャンプ数が100000を達成しました！]::tts\n    end\nend\n\n@ネザー2\n\nwhen flag clicked\nhide\nswitch costume to (a v)\n\nwhen I receive [プログラム2 v]\n移動 ((6303) - (Camera_x)) ((330) - (Camera _y))\n\ndefine 移動 (x) (y)\nif <(えらんだ？) = [1]> then\n    go to x: (x) y: (y)\n    if <<([abs v] of (x) ) > ([abs v] of (x position) )> or <([abs v] of (y) ) > ([abs v] of (y position) )>> then\n        hide\n    else\n        show\n        if <touching (player v)?> then\n            broadcast (クリア v)\n        end\n    end\nelse\n    hide\nend\n\nwhen [timer v] > (0.2)\nhide\n\n