The Red Ninja 5 || A platformer

Instructions: Press the green flag twice.\nThis is a pixel platformer game. Click on the green flag, then the Start button and follow the in-game directions. \nPress r to restart the level. Press p to pause the game.\nPress c to change the ball's colour.\nComment below on which level you got to and how many deaths it took you to beat this game! (It took me 8 deaths to get to level 25. Can you beat my record?)

@Stage\n\n@Level\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\n\nwhen I receive [new costume v]\nnext costume\n\n@Danger\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [new costume v]\nnext costume\n\n@Thumbnail \n\nwhen flag clicked\nshow\nforever\n    set [ghost v] effect to (100)\n    set size to (100) %\nend\n\n@Player2\n\ndefine ok\nif <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    change [x v] by (5)\nend\nif <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    change [x v] by (-5)\nend\nset [x v] to ((X) * (.9))\nchange x by (X)\nif <touching (level v)?> then\n    change y by (1)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change x by ((X) * (-1))\n                        change y by (-5)\n                        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n                            set [y v] to [10]\n                            if <(X) > [0]> then\n                                set [x v] to [-15]\n                            else\n                                set [x v] to [15]\n                            end\n                        else\n                            set [x v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange [y v] by (-1)\nchange y by (Y)\nif <touching (level v)?> then\n    change y by ((Y) * (-1))\n    set [y v] to [0]\nend\nchange y by (-1)\nif <touching (level v)?> then\n    if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n        change [y v] by (12)\n    end\nend\nchange y by (1)\nif <(x position) > [239]> then\n    set [y v] to [0]\n    set [x v] to [0]\n    go to x: (-193) y: (-94)\n    broadcast (New costume v)\nend\nif <<touching color (#ff0000)?> or <touching color (#ff5f5f)?>> then\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    set [ghost v] effect to (0)\n    set [x v] to [0]\n    set [y v] to [0]\n    go to x: (-193) y: (-94)\nend\n\nwhen flag clicked\n\nwhen flag clicked\nswitch costume to (costume2 v)\ngo to x: (-193) y: (-94)\nset [ghost v] effect to (0)\nshow\nset [x v] to [0]\nset [y v] to [0]\nforever\n    ok\nend\n\nwhen flag clicked\nforever\n    play sound [Warriyo - Mortals \(feat. Laura Brehm\) \[NCS Release\] v] until done\nend\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nswitch costume to (costume1 v)\nrepeat (10)\n    change size by (-3)\n    change [ghost v] effect by (15)\nend\ndelete this clone\n\n