Bobby | Platformer (Mobile Friendly)
@Stage\n\nwhen flag clicked\nswitch backdrop to (level 1 v)\nforever\n    play sound [Hustle v] until done\nend\n\nwhen I receive [next level v]\nnext backdrop\n\nwhen I receive [key v]\nnext backdrop\n\n@Levels\n\nwhen flag clicked\nswitch costume to (level 1 v)\ngo to x: (0) y: (-73)\n\nwhen I receive [next level v]\nnext costume\n\nwhen I receive [key v]\nnext costume\n\n@Character\n\nwhen flag clicked\nswitch costume to (character v)\nset rotation style [left-right v]\ngo to x: (-200) y: (0)\nforever\n    Y Movement\n    X Movement\nend\n\ndefine Go Back Up\nif <touching (levels v)?> then\n    set [y velocity v] to [0]\n    repeat until <not <touching (levels v)?>>\n        change y by (1)\n    end\n    change y by (-1)\nend\n\nwhen flag clicked\nforever\n    if <<(Up Key Pressed) = [1]> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n        start sound [Boing v]\n        set [y velocity v] to [11]\n    end\n    wait until <touching (levels v)?>\nend\n\ndefine Y Movement\nchange y by (Y Velocity)\nif <not <touching (levels v)?>> then\n    change [y velocity v] by (-1)\nend\nGo Back Up\n\ndefine X Movement\nif <(x position) > [250]> then\n    set x to (-200)\n    set [x velocity v] to [0]\n    broadcast (Next Level v)\nend\nchange x by (X Velocity)\nif <touching (spikes v)?> then\n    start sound [Drum Boing v]\n    go to x: (-200) y: (0)\n    set [x velocity v] to [0]\nend\nCheck\nif <<<(Right Key Pressed) = [1]> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>> or <<(Left Key Pressed) = [1]> or <<key (a v) pressed?> or <key (left arrow v) pressed?>>>> then\n    change [x velocity v] by (<<(Right Key Pressed) = [1]> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>> - <<(Left Key Pressed) = [1]> or <<key (a v) pressed?> or <key (left arrow v) pressed?>>>)\n    point in direction ((<<(Right Key Pressed) = [1]> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>> - <<(Left Key Pressed) = [1]> or <<key (a v) pressed?> or <key (left arrow v) pressed?>>>) * (90))\nelse\n    change [x velocity v] by ((-1) * ((X Velocity) / ([abs v] of (X Velocity) )))\nend\nif <<(X Velocity) > [9]> or <[-9] > (X Velocity)>> then\n    set [x velocity v] to ((9) * ((X Velocity) / ([abs v] of (X Velocity) )))\nend\n\ndefine Check\nchange y by (1)\nif <touching (levels v)?> then\n    repeat until <not <touching (levels v)?>>\n        change x by ((-1) * ((direction) / ([abs v] of (direction) )))\n    end\n    set [x velocity v] to [0]\nend\nchange y by (-1)\n\nwhen flag clicked\nforever\n    Mobile X Movement\n    Mobile Y Movement\nend\n\ndefine Mobile X Movement\nif <mouse down?> then\n    if <(mouse x) > (x position)> then\n        set [right key pressed v] to [1]\n        set [left key pressed v] to [0]\n    else\n        if <(x position) > (mouse x)> then\n            set [left key pressed v] to [1]\n            set [right key pressed v] to [0]\n        else\n            set [left key pressed v] to [0]\n            set [right key pressed v] to [0]\n        end\n    end\nelse\n    set [left key pressed v] to [0]\n    set [right key pressed v] to [0]\nend\n\ndefine Mobile Y Movement\nif <mouse down?> then\n    if <(mouse y) > (y position)> then\n        set [up key pressed v] to [1]\n    else\n        set [up key pressed v] to [0]\n    end\nelse\n    set [up key pressed v] to [0]\nend\n\n@Spikes\n\nwhen flag clicked\nswitch costume to (level 1 v)\ngo to x: (0) y: (-73)\n\nwhen I receive [next level v]\nnext costume\n\nwhen I receive [key v]\nnext costume\n\n@Keys\n\nwhen flag clicked\nswitch costume to (level 1 v)\ngo to x: (0) y: (-73)\nforever\n    if <touching (character v)?> then\n        start sound [Coin v]\n        broadcast (Key v)\n        next costume\n        wait until <not <touching (character v)?>>\n    end\nend\n\nwhen I receive [next level v]\nnext costume\n\n@Love & Favorite\n\nwhen flag clicked\nswitch costume to (big v)\ngo to x: (0) y: (-220)\nswitch costume to (love & favorite v)\nforever\n    if <not <(backdrop [name v]) = [Level 10]>> then\n        wait (pick random (10) to (20)) seconds\n        start sound [pop v]\n        repeat until <(round (y position)) = [-160]>\n            change y by (((-160) - (y position)) / (5))\n        end\n        wait (1) seconds\n        repeat until <(round (y position)) = [-220]>\n            change y by (((-220) - (y position)) / (5))\n        end\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\n
Controls:\nWASD or ARROW or TOUCH\n