Platformer | part 3
@Stage\n\nwhen flag clicked\nforever\n    play sound [TheFatRat  JJD - Prelude VIP Edit.mp3 v] until done\nend\n\n@Player\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        change y by (1)\n    else\n        change y by (-1)\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <<key (right arrow v) pressed?> or <<key (left arrow v) pressed?> or <key (up arrow v) pressed?>>>> then\n        switch costume to (1 v)\n    end\nend\n\nwhen flag clicked\ngo to x: (-220) y: (-57)\nforever\n    if <key (right arrow v) pressed?> then\n        switch costume to (2 v)\n        point in direction (90)\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (left arrow v) pressed?> then\n        switch costume to (2 v)\n        point in direction (-90)\n    end\nend\n\nwhen flag clicked\nset [№ lvl v] to [1]\nforever\n    if <touching (end lvl v)?> then\n        change [№ lvl v] by (1)\n        go to x: (-227) y: (-72)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#ff0000)?> then\n        broadcast (die v)\n    end\nend\n\nwhen I receive [die v]\ngo to x: (-227) y: (-72)\n\nwhen flag clicked\nforever\n    if <touching (spikes v)?> then\n        broadcast (die v)\n    end\nend\n\nwhen I receive [die v]\ngo to x: (-220) y: (-57)\n\nwhen flag clicked\nset [x v] to [0]\nset [y v] to [0]\nforever\n    if <<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <(Mobile X) = [1]>> then\n        point in direction (90)\n        change [x v] by (1)\n    end\n    if <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <(Mobile X) = [-1]>> then\n        point in direction (-90)\n        change [x v] by (-1)\n    end\n    set [x v] to ((x) * ((9) / (10)))\n    change x by (x)\n    if <touching (ground v)?> then\n        change y by (1)\n        if <touching (ground v)?> then\n            change y by (1)\n            if <touching (ground v)?> then\n                change y by (1)\n                if <touching (ground v)?> then\n                    change y by (1)\n                    if <touching (ground v)?> then\n                        change x by ((x) * (-1))\n                        change y by (-4)\n                    end\n                    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <(Mobile Y) = [1]>> then\n                        if <(x) > [0]> then\n                            set [x v] to [-5]\n                        else\n                            set [x v] to [5]\n                        end\n                        set [y v] to [10]\n                    else\n                        set [x v] to [0]\n                    end\n                end\n            end\n        end\n    end\n    change [y v] by (-1)\n    change y by (y)\n    if <touching (ground v)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <touching (ground v)?> then\n        if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <(Mobile Y) = [1]>> then\n            set [y v] to [15]\n        end\n    end\n    change y by (1)\nend\n\nwhen flag clicked\nset [№ lvl v] to [1]\nforever\n    if <touching (end level v)?> then\n        change [№ lvl v] by (1)\n        go to x: (-220) y: (-57)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#0092f7)?> then\n        change y by (4)\n    end\nend\n\n@Ground\n\nwhen flag clicked\nforever\n    switch costume to (№ Lvl)\nend\n\n@Spikes\n\nwhen flag clicked\nforever\n    switch costume to (№ Lvl)\nend\n\n@End level\n\nwhen flag clicked\nchange [ghost v] effect by (100)\nforever\n    if <(№ Lvl) = [6]> then\n        hide\n    else\n        show\n    end\nend\n\n@lava\n\nwhen flag clicked\nforever\n    switch costume to (№ Lvl)\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    repeat (15)\n        change y by (0.5)\n    end\n    repeat (15)\n        change y by (-0.5)\n    end\nend\n\n@previu\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n
My platformer part 3!!!\nControls:arrows and WASD\n15 like=part 4\npart 4 - https://scratch.mit.edu/projects/607783515