Notebook//A Platformer #all #games
@Stage\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Player\n\nwhen I receive [reset v]\nset size to (100) %\nswitch costume to (costume1 v)\nset [yv v] to [0]\nset [xv v] to [0]\ngo to x: (-142) y: (-72)\n\nwhen I start as a clone\nclear graphic effects\nrepeat (10)\n    change [ghost v] effect by (10)\n    change y by (5)\n    turn right (5) degrees\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    if <key (r v) pressed?> then\n        broadcast (RESet v)\n    end\nend\n\nwhen I receive [level v]\nbroadcast (RESet v)\n\nwhen flag clicked\ngo to x: (-142) y: (-72)\nset [level v] to [1]\nbroadcast (LEvel v)\nforever\n    if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>>> then\n        change [xv v] by (-1.5)\n    end\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n        change [xv v] by (1.5)\n    end\n    set [xv v] to ((XV) * (0.85))\n    change x by (XV)\n    if <touching (ground v)?> then\n        change y by (4)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((XV) * (-1))\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n            if <(XV) > [0]> then\n                set [xv v] to [-10]\n            else\n                set [xv v] to [10]\n            end\n            set [yv v] to [15]\n        else\n            set [xv v] to [0]\n        end\n    end\n    change [yv v] by (-1)\n    change y by (YV)\n    if <touching (ground v)?> then\n        change y by ((YV) - ((YV) * (2)))\n        set [yv v] to [0]\n    end\n    if <<key (down arrow v) pressed?> or <<key (s v) pressed?> or <<mouse down?> and <(mouse y) < (y position)>>>> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\n    change y by (-1)\n    if <<touching (ground v)?> and <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<touching (ground v)?> and <<mouse down?> and <(mouse y) > (y position)>>>>>> then\n        set [yv v] to [15]\n    end\n    change y by (1)\n    if <touching (level end thing v)?> then\n        broadcast (LEvel v) and wait\n        change [level v] by (1)\n    end\n    if <<touching (spikes v)?> or <touching (lava v)?>> then\n        broadcast (RESet v)\n        create clone of (_myself_ v)\n    else\n        if <<key (down arrow v) pressed?> or <<key (s v) pressed?> or <<mouse down?> and <(mouse y) < (y position)>>>> then\n            switch costume to (costume2 v)\n        else\n            switch costume to (costume1 v)\n        end\n        if <(y position) < [-178]> then\n            broadcast (RESet v)\n        end\n    end\nend\n\n@Ground\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Spikes\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@level end thing\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Lava\n\nwhen flag clicked\ngo to x: (36) y: (25)\ngo to [back v] layer\nforever\n    repeat (10)\n        change y by (1)\n    end\n    repeat (10)\n        change y by (-1)\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (36) y: (35)\nshow\ngo to [front v] layer\nrepeat (9)\n    change y by (-6)\nend\nrepeat (5)\n    change y by (3)\nend\nrepeat (5)\n    change y by (-1)\nend\nwait (2) seconds\nrepeat (15)\n    change y by (7)\nend\nhide\n\n
WASD or arrow keys to move\ndon't touch spikes or lava\nHave fun