Honeybee Hive Platformer
@Stage\n\nwhen I receive [begin v]\nwait (2) seconds\nswitch backdrop to (blank v)\n\nwhen flag clicked\nswitch backdrop to (blank v)\n\nwhen flag clicked\nforever\n    play sound [ v] until done\nend\n\n@Sprite1\n\ngo to x: (36) y: (28)\n\n@player\n\ndefine walk (steps)\nchange x by (steps)\nset [ground lift v] to [0]\nrepeat until <<not <touching (ground v)?>> or <(ground lift) = [8]>>\n    change y by (1)\n    change [ground lift v] by (1)\nend\nif <(ground lift) = [8]> then\n    change x by ((-1) * (steps))\n    change y by (-8)\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nset [y velocity v] to [0]\nforever\n    change [y velocity v] by (-2)\n    change y by (y velocity)\n    change [in air v] by (1)\n    handle ground <(y velocity) > [0]>\nend\n\nwhen flag clicked\nforever\n    if <<key (up arrow v) pressed?> and <(in air) < [8]>> then\n        set [y velocity v] to [14]\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (right arrow v) pressed?> then\n        point in direction (90)\n        walk [6]\n    end\n    if <key (left arrow v) pressed?> then\n        point in direction (-90)\n        walk [-6]\n    end\nend\n\ndefine handle ground <moving up>\nswitch costume to (costume2 v)\nrepeat until <not <touching (ground v)?>>\n    if <moving up> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [in air v] to [0]\n    end\n    set [y velocity v] to [0]\nend\nswitch costume to (sparky v)\n\nwhen flag clicked\nswitch costume to (cat-a v)\nset [deaths v] to [0]\nforever\n    if <(y position) < [-170]> then\n        set [y velocity v] to [0]\n        set x to (-230)\n        if <(y position) < [-100]> then\n            set y to (-100)\n        end\n        change [deaths v] by (1)\n        change [lives v] by (-1)\n        broadcast (reboot level v)\n    end\nend\n\ndefine die / next level\nif <(x position) > [230]> then\n    set x to (-230)\n    if <(y position) < [-100]> then\n        set y to (-100)\n    else\n        if <[-5] < (y position)> then\n            set y to (-5)\n        end\n    end\n    broadcast (next level v)\nend\n\nwhen flag clicked\nforever\n    die / next level\nend\n\nwhen flag clicked\ngo to x: (-230) y: (5)\n\nwhen [space v] key pressed\nnext costume\n\n@ground\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume8 v)\nchange [color v] effect by (5)\n\n
Use arrow keys to move the bee\n\nPlease check out some of my other projects!\nhttps://scratch.mit.edu/projects/560992727/\nhttps://scratch.mit.edu/projects/558877075/\nhttps://scratch.mit.edu/projects/554617487/