✿ sushi platformer ✿
@Stage\n\nwhen flag clicked\nforever\n    play sound [Pokemon Littleroot Town Theme Remix.mp3 v] until done\nend\n\n@sushi\n\ndefine move - steps (steps)\nchange [fall v] by (1)\nrepeat (steps)\n    set [last value v] to (x position)\n    change x by ((speedX) / (steps))\n    check and balances\n    if <(touch) > [0]> then\n        set x to (last value)\n        set [speedx v] to [0]\n    end\n    set [last value v] to (y position)\n    change y by ((speedY) / (steps))\n    check and balances\n    if <(touch) > [0]> then\n        set y to (last value)\n        if <(speedY) < [0]> then\n            set [fall v] to [0]\n        end\n        set [speedy v] to [0]\n    end\nend\n\ndefine check and balances\nif <touching (level v)?> then\n    set [touch v] to [1]\nelse\n    set [touch v] to [0]\nend\n\nwhen I receive [tick - player v]\ncontrols - up and down\ncontrol - left and right\nmove - steps (([abs v] of (speedX) ) + ([abs v] of (speedY) ))\n\ndefine controls - up and down\nif <key (up arrow v) pressed?> then\n    if <(fall) < [3]> then\n        set [speedy v] to [12]\n    end\nend\nchange [speedy v] by (gravity)\n\ndefine control - left and right\nif <key (left arrow v) pressed?> then\n    change [speedx v] by (-1.5)\nend\nif <key (right arrow v) pressed?> then\n    change [speedx v] by (1.5)\nend\nset [speedx v] to ((speedX) * (0.8))\n\nwhen I receive [tick - last v]\nif <(x position) > [235]> then\n    begin scene # ((scene #) + (1)) go to x: [-235] []\nend\nif <(x position) < [-235]> then\n    begin scene # ((scene #) + (-1)) go to x: [235] []\nend\nif <touching (danger v)?> then\n    broadcast (lose life v)\nend\n\ndefine begin scene # (scene #) go to x: (x) (y)\nset [scene # v] to (scene #)\nset x to (x)\nbroadcast (change scene v)\n\nwhen I receive [lose life v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nchange [lives v] by (-1)\nif <(lives) = [0]> then\n    broadcast (game over v)\nend\nreset and begin level\n\ndefine reset and begin level\nset [ghost v] effect to (0)\nset [gravity v] to [-1]\nset [speedy v] to [0]\nbegin scene # (spawn scene) go to x: (spawn x) (spawn y)\nforever\n    broadcast (tick - player v)\n    broadcast (tick - last v)\nend\n\nwhen flag clicked\nset [lives v] to [3]\nreset and begin level\nset [spawn scene v] to [1]\nset [spawn x v] to [-165]\nset [spawn y v] to [55]\n\n@level\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\n\nwhen I receive [change scene v]\nswitch costume to (join [scene] (scene #))\n\n@danger\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [scene] (scene #))\nif <(scene #) = (scene #)> then\n    forever\n        set y to ((3) * ([sin v] of ((timer) * (360)) ))\n    end\nend\n\n@game over screen\n\nwhen flag clicked\nhide\n\nwhen I receive [game over v]\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\ngo to [front v] layer\nshow\nstop [all v]\n\n@Sprite1\n\nwhen I receive [flag v]\nset [lives v] to [4]\nhide\ngo to x: (-185) y: (147)\nshow\nswitch costume to (3 v)\nforever\n    if <touching (sushi v)?> then\n        set [ghost v] effect to (75)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen flag clicked\nswitch costume to (3 v)\nshow\n\nwhen I receive [lose life v]\nnext costume\nif <(lives) = [0]> then\n    broadcast (game over v)\nend\n\n@thumbnail\n\nwhen flag clicked\nhide\n\nshow\ngo to [front v] layer\n\n
✿ sushi platformer ✿\n~~~~~~~~\n» click the green flag to begin \n» use your arrow keys to move\n» avoid lava and spikes