NINJA - A PLATFORMER
@Stage\n\nwhen flag clicked\nforever\n    play sound [Ninja music GREAT! v] until done\nend\n\n@LEVEL\n\nwhen I receive [new_level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nforever\nend\n\nforever\nend\n\n@NINJA\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (1) layers\npoint in direction (90)\nset rotation style [left-right v]\nforever\n    go to x: ([x position v] of [hitbox v]) y: ([y position v] of [hitbox v])\n    if <<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> then\n        point in direction (X-VELOCITY-P1)\n    end\nend\n\nrepeat until \n    change y by (1)\nend\n\n@HITBOX\n\nwhen flag clicked\nbroadcast (START v)\nbroadcast (NEW_LEVEL v)\n\ndefine SenseFloor <touchingceiling?>\nrepeat until <not <touching (level v)?>>\n    if <touchingceiling?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [ground-touch v] to [0]\n    end\n    set [gravity-p1 v] to [0]\nend\n\ndefine WALL_DETECTION\nrepeat until <not <touching (level v)?>>\n    change x by ((X-VELOCITY-P1) * (-1))\nend\n\nwhen I receive [start v]\ngo to [front v] layer\nset [ghost v] effect to (100)\ngo to x: (-175) y: (-100)\nforever\n    change [gravity-p1 v] by (-1)\n    change y by (GRAVITY-P1)\n    set [ground-touch v] to [1]\n    SenseFloor <(GRAVITY-P1) > [0]>\n    change [gravity-p1 v] by (((<(GROUND-TOUCH) = [0]> * (1)) * <key (up arrow v) pressed?>) * (15))\n    set [x-velocity-p1 v] to ((<key (right arrow v) pressed?> - <key (left arrow v) pressed?>) * (5))\n    change x by (X-VELOCITY-P1)\n    if <touching (level v)?> then\n        WALL_DETECTION\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    wait until <touching (ninja v)?>\n    broadcast (START v)\n    broadcast (NEW_LEVEL v)\nend\n\n@DANGER\n\nwhen flag clicked\nswitch costume to (costume2 v)\n\nwhen I receive [new_level v]\nnext costume\n\nwhen flag clicked\nforever\n    if <touching (ninja v)?> then\n        broadcast (START v)\n    end\nend\n\n@Sprite2\n\n@Sprite3\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\n    show\n    go to [front v] layer\nend\n\n
-Arrow Keys to move\n-Dodge the spikes \nHope you enjoy :)\n❤️+⭐️ if you did