NOT a Platformer!

Instructions: Use direction keys to move, use space to defeat the final boss.\n(You can speedrun the final boss by spamming the meow, please don't.)

@Stage\n\nwhen flag clicked\nswitch backdrop to (wall 1 v)\nforever\n    if <(Level) = [2]> then\n        switch backdrop to (castle 3 v)\n    end\n    if <(Level) = [3]> then\n        switch backdrop to (backdrop2 v)\n    end\n    if <(Level) = [4]> then\n        switch backdrop to (backdrop2 v)\n    end\n    if <(Level) = [5]> then\n        switch backdrop to (backdrop2 v)\n    end\n    if <(Level) = [6]> then\n        broadcast (cutscene v)\n        switch backdrop to (neon tunnel v)\n        stop [this script v]\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nshow\ngo to x: (-167) y: (-108)\nset [gravity v] to [-5]\nforever\n    if <key (left arrow v) pressed?> then\n        go to (hbox v)\n        switch costume to (act_move_l1 v)\n        wait (0.05) seconds\n        go to (hbox v)\n        repeat (3)\n            next costume\n            wait (0.05) seconds\n            go to (hbox v)\n        end\n    else\n        if <key (right arrow v) pressed?> then\n            go to (hbox v)\n            switch costume to (act_move_1 v)\n            wait (0.05) seconds\n            go to (hbox v)\n            repeat (3)\n                next costume\n                wait (0.05) seconds\n                go to (hbox v)\n            end\n        else\n            switch costume to (act_stand_1 v)\n        end\n    end\n    change x by (XVel)\n    if <not <touching (ground v)?>> then\n        change y by (Gravity)\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (space v) pressed?> then\n        forever\n            go to (hbox v)\n        end\n    end\nend\n\nrepeat until <not <key (left arrow v) pressed?>>\n    change [xvel v] by (-0.25)\nend\nrepeat until <not <key (right arrow v) pressed?>>\n    change [xvel v] by (0.25)\nend\n\nwhen I receive [bullethell v]\nhide\n\nforever\n\nchange y by (Gravity)\n\nset [speed y v] to [0]\nforever\n    change [speed y v] by (-1)\n    change y by (Speed Y)\n    CheckGround\nend\n\ndefine CheckGround\nrepeat until <not <touching (ground v)?>>\n    change y by (1)\nend\n\n@Ground\n\nwhen flag clicked\n\nwhen flag clicked\ngo to [back v] layer\nshow\nset [ghost v] effect to (0)\nswitch costume to (costume2 v)\nforever\n    if <(Level) = [2]> then\n        switch costume to (costume3 v)\n    end\n    if <(Level) = [3]> then\n        switch costume to (costume2 v)\n    end\n    if <(Level) = [4]> then\n        switch costume to (costume4 v)\n    end\n    if <(Level) = [5]> then\n        switch costume to (costume5 v)\n    end\nend\n\nforever\n\nset [ghost v] effect to (100)\n\nwhen I receive [bullethell v]\nhide\n\n@HBox\n\nwhen flag clicked\nshow\nset [level v] to [1]\ngo to x: (-167) y: (-98)\nset [ghost v] effect to (100)\nforever\n    if <not <touching (ground v)?>> then\n        change y by (Gravity)\n    end\n    if <key (left arrow v) pressed?> then\n        set [xvel v] to [-5]\n    else\n        if <key (right arrow v) pressed?> then\n            set [xvel v] to [5]\n        else\n            set [xvel v] to [0]\n        end\n    end\n    change x by (XVel)\nend\n\ngo to (sprite1 v)\n\nwhen flag clicked\nforever\n    if <key (space v) pressed?> then\n        if <touching (ground v)?> then\n            repeat (7)\n                set [speed y v] to [12.5]\n                change y by (Speed Y)\n            end\n        end\n    end\nend\n\nrepeat (10)\n    change y by (15)\nend\n\nrepeat until <touching (ground v)?>\n    change y by (-5)\nend\n\nwhen flag clicked\nforever\n    if <touching (lava v)?> then\n        go to x: (-167) y: (-108)\n    end\n    if <touching (goal v)?> then\n        go to x: (-167) y: (-108)\n        change [level v] by (1)\n    end\nend\n\nwhen I receive [bullethell v]\nhide\n\ndefine CheckGround\nif <(Speed Y) < [0]> then\n    repeat until <not <touching (ground v)?>>\n        change y by (1)\n    end\nelse\n    if <touching (ground v)?> then\n        set [speed y v] to [-10]\n    end\n    change [xvel v] by ((XVel) * (-5))\nend\n\nchange [speed y v] by (15)\n\nwhen flag clicked\nset [speed y v] to [0]\nforever\n    repeat until <touching (ground v)?>\n        change [speed y v] by (-1.25)\n        change y by (Speed Y)\n        CheckGround\n    end\nend\n\ndefine Move (dist)\nchange [xvel v] by (1)\nset [slope v] to [0]\nrepeat until <<(Slope) > [8]> or <not <touching (ground v)?>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <(Slope) > [8]> then\n    if <touching (ground v)?> then\n        change x by ((0) - (dist))\n        change y by ((0) - (Slope))\n    end\nend\n\nchange x by (dist)\n\nMove []\n\n@Goal\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\ngo to x: (143) y: (-24)\n\nwhen I receive [bullethell v]\nhide\n\n@Lava\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\nforever\n    go to [front v] layer\n    if <(Level) = [2]> then\n        switch costume to (costume1 v)\n    end\n    if <(Level) = [3]> then\n        switch costume to (costume2 v)\n    end\n    if <(Level) = [4]> then\n        switch costume to (costume3 v)\n    end\n    if <(Level) = [5]> then\n        switch costume to (costume4 v)\n    end\nend\n\nwhen I receive [bullethell v]\nhide\n\nwhen I receive [cutscene v]\nhide\n\n@Sprite2\n\n@cutscene\n\nwhen flag clicked\nhide\n\nwhen I receive [cutscene v]\nrepeat (1)\n    go to [front v] layer\n    set [ghost v] effect to (0)\n    show\n    switch costume to (costume1 v)\n    next costume\n    wait (1) seconds\n    next costume\n    wait (1) seconds\n    repeat (4)\n        next costume\n        wait (0.15) seconds\n    end\n    wait (1) seconds\n    next costume\n    next costume\n    wait (2.5) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n        wait (0.05) seconds\n    end\n    broadcast (bullethell v)\nend\n\n@Gobo\n\nwhen flag clicked\nhide\n\nwhen I receive [bullethell v]\ngo to x: (200) y: (-38)\nshow\nsay [MUWAHAHAHHAHAHA! Did you think this would be a NORMAL platformer?!] for (2) seconds\nforever\n    broadcast (FIRE v)\n    wait (5) seconds\nend\n\nwhen I receive [meowofdeath v]\nif <(GoboHealth) = [0]> then\n    repeat (10)\n        change y by (-10)\n    end\n    say [NOOOOOOOOOOO] for (2) seconds\n    hide\n    broadcast (WIN v)\n    stop [all v]\nend\n\nrepeat until \nend\n\n@BulletHellCat\n\nwhen flag clicked\nswitch costume to (cat flying-b2 v)\nhide\ngo to x: (-178) y: (-3)\n\nwhen I receive [bullethell v]\nset [gobohealth v] to [5]\nset [health v] to [100]\nshow\nshow variable [health v]\nforever\n    if <touching (bullets v)?> then\n        change [health v] by (-1)\n    end\n    if <(Health) < [1]> then\n        set [health v] to [0]\n        hide\n        wait (1) seconds\n        set [health v] to [100]\n        show\n        show variable [health v]\n    end\nend\n\n\n    change y by (10)\nelse\n    \nend\n\nwhen I receive [bullethell v]\nforever\n    if <key (space v) pressed?> then\n        broadcast (MeowOfDeath v) and wait\n        switch costume to (cat flying-a2 v)\n        play sound [Meow v] until done\n        change [gobohealth v] by (-1)\n    end\n    if <key (up arrow v) pressed?> then\n        change y by (15)\n        switch costume to (cat flying-b2 v)\n    else\n        if <key (down arrow v) pressed?> then\n            change y by (-15)\n            switch costume to (cat flying-b v)\n        else\n            if <key (right arrow v) pressed?> then\n                change x by (10)\n                switch costume to (cat flying-a v)\n            else\n                if <key (left arrow v) pressed?> then\n                    change x by (-10)\n                    switch costume to (cat flying-a v)\n                end\n            end\n        end\n    end\nend\n\n@Bullets\n\nwhen flag clicked\nhide variable [health v]\nhide\ngo to x: (175) y: (-20)\n\nwhen I receive [fire v]\ngo to x: (145) y: (-20)\nshow\nswitch costume to (costume1 v)\nshow\nrepeat (50)\n    change x by (-10)\nend\nhide\nwait (0.25) seconds\nswitch costume to (costume2 v)\ngo to x: (175) y: (-20)\nshow\nrepeat (50)\n    change x by (-10)\nend\nhide\nwait (0.25) seconds\nswitch costume to (costume3 v)\ngo to x: (175) y: (-20)\nshow\nrepeat (50)\n    change x by (-10)\nend\nhide\ngo to x: (145) y: (-20)\n\nrepeat (35)\nend\n\nrepeat (35)\nend\n\nrepeat (35)\n    change x by (-10)\nend\n\nrepeat until <touching (bulletkillwall v)?>\n    change x by (-10)\nend\n\nrepeat until <touching (bulletkillwall v)?>\n    change x by (-10)\nend\n\nwhen I receive [bullethell v]\n\nshow\n\n@Win!\n\nwhen flag clicked\nhide\n\nwhen I receive [win v]\nshow\ngo to [front v] layer\n\n@Sprite3\n\nwhen flag clicked\nhide\n\n@bulletkillwall\n\n