Platformer

Instructions: 基本は十字キーで操作します。\n↑　ジャンプ\n←　左に行く\n→　右に行く\n↓　しゃがむ\nまだレベルは少ないですが、これからも増やしていきます！

@Stage\n\nwhen flag clicked\nhide variable [jump v]\nhide variable [speed v]\nhide variable [xz v]\nhide variable [yz v]\nhide variable [復活x v]\nhide variable [復活y v]\nhide variable [変数 v]\nswitch backdrop to (level 1 v)\nforever\n    if <<[1] < (current [dayofweek v])> and <(current [dayofweek v]) < [4]>> then\n        play sound [8-bit_Aggressive v] until done\n    else\n        play sound [TheFatRat - Time Lapse v] until done\n    end\nend\n\nwhen I receive [goal v]\nswitch backdrop to (goal v)\n\nwhen I receive [stage 2 v]\nswitch backdrop to (level 2 v)\n\nwhen I receive [stage 3 v]\nswitch backdrop to (level 3 v)\n\n@logo\n\nwhen flag clicked\npoint in direction (90)\nturn left (15) degrees\nforever\n    repeat (13)\n        turn right (2) degrees\n    end\n    repeat (4)\n        turn right (1) degrees\n    end\n    repeat (13)\n        turn left (2) degrees\n    end\n    repeat (4)\n        turn left (1) degrees\n    end\nend\n\n@satge\n\nwhen flag clicked\nswitch costume to (stage 1 v)\nshow\nhide variable [タイム v]\nset [タイム v] to [0]\nset [jump v] to [-13]\nset [speed v] to [1]\nset [speed v] to [1]\nset [xz v] to [0]\nset [yz v] to [0]\nset [復活x v] to [555]\nset [復活y v] to [206]\ngo to x: (復活x) y: (復活y)\nforever\n    if <key (right arrow v) pressed?> then\n        set [xz v] to ((Xz) - (speed))\n    end\n    if <key (left arrow v) pressed?> then\n        set [xz v] to ((Xz) + (speed))\n    end\n    set [xz v] to ((Xz) * (0.9))\n    change x by (Xz)\n    if <touching (player v)?> then\n        change y by (-1)\n        if <touching (player v)?> then\n            change y by (-1)\n            if <touching (player v)?> then\n                change y by (-1)\n                if <touching (player v)?> then\n                    change y by (-1)\n                    if <touching (player v)?> then\n                        change y by (-1)\n                        if <touching (player v)?> then\n                            change x by ((Xz) * (-1))\n                            set y to ((y position) + (5))\n                            set [xz v] to [0]\n                            if <key (up arrow v) pressed?> then\n                                if <key (right arrow v) pressed?> then\n                                    if <(Xz) < [0]> then\n                                        set [xz v] to [-6]\n                                    else\n                                        set [xz v] to [6]\n                                    end\n                                else\n                                    if <(Xz) < [0]> then\n                                        set [xz v] to [6]\n                                    else\n                                        set [xz v] to [-6]\n                                    end\n                                end\n                                set [yz v] to [-13]\n                            else\n                                set [xz v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    set y to ((y position) + (1))\n    if <key (up arrow v) pressed?> then\n        if <touching (player v)?> then\n            set [yz v] to (jump)\n        end\n    end\n    set y to ((y position) - (1))\n    set [yz v] to ((Yz) + (1))\n    change y by (Yz)\n    if <touching (player v)?> then\n        change y by ((Yz) * (-1))\n        set [yz v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(y position) > [450]> then\n        go to x: (復活x) y: (復活y)\n    end\nend\n\nwhen I receive [goal v]\ngo to x: (復活x) y: (復活y)\nswitch costume to (goal v)\n\nwhen I receive [stage 2 v]\ngo to x: (復活x) y: (復活y)\nswitch costume to (stage 2 v)\n\nwhen I receive [lava v]\ngo to x: (復活x) y: (復活y)\n\nwhen I receive [stage 3 v]\ngo to x: (復活x) y: (復活y)\nswitch costume to (stage 3 v)\n\nset [jump v] to [-13]\nset [speed v] to [1]\n\nif <touching (player v)?> then\n    set [yz v] to (jump)\nend\n\n@player\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\nend\n\nwhen flag clicked\nforever\n    if <(backdrop [name v]) = [Level 1]> then\n        if <touching (goal v)?> then\n            broadcast (stage 2 v)\n            broadcast (画面切り替え 1 v)\n            play sound [Collect v] until done\n            wait until <not <touching (goal v)?>>\n        end\n    end\n    if <(backdrop [name v]) = [Level 2]> then\n        if <touching (goal v)?> then\n            broadcast (stage 3 v)\n            broadcast (画面切り替え 2 v)\n            play sound [Collect v] until done\n            wait until <not <touching (goal v)?>>\n        end\n    end\n    if <(backdrop [name v]) = [Level 3]> then\n        if <touching (goal v)?> then\n            broadcast (goal v)\n            broadcast (画面切り替え 3 v)\n            play sound [Collect v] until done\n            wait until <not <touching (goal v)?>>\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(backdrop [name v]) = [Level 2]> then\n        if <touching (lava v)?> then\n            broadcast (lava v)\n            start sound [Disconnect2 v]\n        end\n        wait until <not <touching (lava v)?>>\n    end\n    if <(backdrop [name v]) = [Level 3]> then\n        if <touching (lava v)?> then\n            broadcast (lava v)\n            start sound [Disconnect2 v]\n        end\n        wait until <not <touching (lava v)?>>\n    end\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nforever\n    if <key (right arrow v) pressed?> then\n        point in direction (90)\n    end\n    if <key (left arrow v) pressed?> then\n        point in direction (-90)\n    end\n    if <key (down arrow v) pressed?> then\n        switch costume to (コスチューム1 v)\n    else\n        switch costume to (player v)\n    end\nend\n\n@goal\n\nwhen flag clicked\nshow\nset [speed v] to [1]\nset [xz v] to [0]\nset [yz v] to [0]\nset [復活x v] to [555]\nset [復活y v] to [206]\ngo to x: (復活x) y: (復活y)\nforever\n    go to (satge v)\nend\n\nwhen flag clicked\nforever\n    if <(y position) > [450]> then\n        go to x: (復活x) y: (復活y)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(backdrop [name v]) = [goal]> then\n        hide\n    else\n        if <(backdrop [name v]) = [Level 3]> then\n            if <<(y position) > [-63]> or <[280] > (x position)>> then\n                hide\n            else\n                show\n            end\n        else\n            if <<(y position) > [50]> or <(x position) > [-170]>> then\n                hide\n            else\n                show\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(backdrop [name v]) = [Level 3]> then\n        switch costume to (goal 3 v)\n    else\n        switch costume to (goal v)\n    end\nend\n\n@lava\n\ngo to x: (復活x) y: (復活y)\n\nwhen flag clicked\nforever\n    if <<(backdrop [name v]) = [goal]> or <(backdrop [name v]) = [Level 1]>> then\n        hide\n    else\n        \n            hide\n        else\n            show\n        end\n    end\nend\n\nwhen flag clicked\nshow\nset [speed v] to [1]\nset [xz v] to [0]\nset [yz v] to [0]\nset [復活x v] to [555]\nset [復活y v] to [206]\ngo to x: (復活x) y: (復活y)\nforever\n    go to (satge v)\nend\n\nwhen flag clicked\nforever\n    if <(backdrop [name v]) = [level 2]> then\n        switch costume to (stage 2 v)\n    end\n    if <(backdrop [name v]) = [level 3]> then\n        switch costume to (stage 3 v)\n    end\nend\n\n@stage(demo)\n\n@lava(demo)\n\n@スプライト1\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\nend\n\nwhen flag clicked\nset [☁ 10 v] to (username)\nforever\n    change [ghost v] effect by (12)\n    wait (0.1) seconds\nend\n\nwhen flag clicked\nforever\n    repeat (10)\n        change [pixelate v] effect by (5)\n    end\nend\n\n@スプライト2\n\nwhen I receive [画面切り替え 1 v]\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\n@time 十の位\n\nwhen flag clicked\nswitch costume to (0 v)\nhide variable [タイム v]\nset [タイム v] to [0]\n\nwhen flag clicked\nforever\n    go to x: (212) y: (157)\nend\n\nwhen flag clicked\nforever\n    set [タイムy座標 v] to (y position)\nend\n\nwhen flag clicked\nforever\n    wait (10) seconds\n    next costume\nend\n\n@time 十の位2\n\nwhen flag clicked\nswitch costume to (0 v)\nhide variable [タイム v]\nset [タイム v] to [0]\n\nwhen flag clicked\nforever\n    set x to ((212) + (19))\nend\n\nwhen flag clicked\nforever\n    set y to (タイムy座標)\nend\n\nwhen flag clicked\nforever\n    wait (1) seconds\n    next costume\nend\n\n