Earth - A platformer #games #all
@Stage\n\nwhen flag clicked\nforever\n    play sound [Goodbye v] until done\n    wait (1) seconds\nend\n\n@platform\n\nwhen flag clicked\nforever\n    switch costume to (join [costume] (level))\nend\n\nwhen flag clicked\nhide variable [love/fav v]\nhide variable [treasure v]\n\n@Hitbox\n\nwhen flag clicked\ngo to [back v] layer\nset size to (70) %\nReset player\nset [level v] to [1]\nbroadcast (game loop v)\nforever\n    create clone of (_myself_ v)\n    change [xvel v] by ((<<<key (right arrow v) pressed?> or <<(mouse x) > ((x position) + (15))> and <mouse down?>>> or <key (d v) pressed?>> - <<<<(mouse x) < ((x position) + (-15))> and <mouse down?>> or <key (left arrow v) pressed?>> or <key (a v) pressed?>>) * (2))\n    if <<<<key (right arrow v) pressed?> or <<(mouse x) > ((x position) + (15))> and <mouse down?>>> or <key (d v) pressed?>> or <<<<(mouse x) < ((x position) + (-15))> and <mouse down?>> or <key (left arrow v) pressed?>> or <key (a v) pressed?>>> then\n        point in direction ((<<<key (right arrow v) pressed?> or <<(mouse x) > ((x position) + (15))> and <mouse down?>>> or <key (d v) pressed?>> - <<<<(mouse x) < ((x position) + (-15))> and <mouse down?>> or <key (left arrow v) pressed?>> or <key (a v) pressed?>>) * (90))\n    end\n    set [xvel v] to ((Xvel) * (0.8))\n    change x by (Xvel)\n    if <<touching (platform v)?> or <touching (wall v)?>> then\n        change y by (1)\n        if <<touching (platform v)?> or <touching (wall v)?>> then\n            change y by (1)\n            if <<touching (platform v)?> or <touching (wall v)?>> then\n                change y by (1)\n                if <<touching (platform v)?> or <touching (wall v)?>> then\n                    change y by (1)\n                    if <<touching (platform v)?> or <touching (wall v)?>> then\n                        change y by (1)\n                        if <<touching (platform v)?> or <touching (wall v)?>> then\n                            change x by ((Xvel) * (-1))\n                            change y by (-5)\n                            if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<(mouse y) > ((y position) + (20))> and <mouse down?>>> then\n                                start sound [Zoop v]\n                                if <(Xvel) > [0]> then\n                                    set [xvel v] to [-13]\n                                else\n                                    set [xvel v] to [13]\n                                end\n                                set [yvel v] to [10]\n                            else\n                                set [xvel v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yvel v] by (-1)\n    change y by (Yvel)\n    if <<touching (platform v)?> or <touching (wall v)?>> then\n        change y by ((Yvel) * (-1))\n        set [yvel v] to [0]\n    end\n    change y by (-1)\n    if <<touching (platform v)?> or <touching (wall v)?>> then\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<(mouse y) > ((y position) + (20))> and <mouse down?>>> then\n            set [yvel v] to [13]\n        end\n    end\n    if <(y position) < [-175]> then\n        Reset player\n        start sound [Crunch v]\n    end\n    if <(x position) > [235]> then\n        broadcast (next level v)\n        change [level v] by (1)\n        change x by (-470)\n    end\n    if <<touching (spikes v)?> or <<touching (boss v)?> or <touching (enemy v)?>>> then\n        Reset player\n        start sound [Crunch v]\n    end\n    if <touching (treasure v)?> then\n        repeat (2)\n            set [treasure v] to [1]\n        end\n        stop [all v]\n    end\n    change y by (1)\nend\n\ndefine Reset player\ngo to x: (-180) y: (0)\npoint in direction (90)\nset rotation style [left-right v]\nset [xvel v] to [0]\nset [yvel v] to [0]\n\nwhen I start as a clone\nrepeat (4)\n    change [ghost v] effect by (20)\n    change size by (-4)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    if <(Love/fav) = [2]> then\n        change [brightness v] effect by (25)\n    end\nend\n\nwhen I receive [loved/faved v]\nforever\n    change [color v] effect by (25)\nend\n\nwhen flag clicked\nhide variable [love v]\nhide variable [fave v]\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen flag clicked\nforever\n    change [ghost v] effect by (100)\nend\n\n@text\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    switch costume to ( v)\n    switch costume to (join [Level] (level))\nend\n\n@Thumbnail\n\nwhen flag clicked\nforever\n    set [e v] to ((timer) + (.1))\n    go to [front v] layer\nend\n\nwhen [timer v] > (e)\nshow\n\nwhen flag clicked\nhide\n\n@Spikes\n\nwhen flag clicked\nforever\n    switch costume to ( v)\n    switch costume to (join [Level] (level))\nend\n\n@Heart\n\nwhen flag clicked\nshow\nwait (5) seconds\nhide\n\n@Star\n\nwhen flag clicked\nshow\nwait (5) seconds\nhide\n\n@love\n\nwhen flag clicked\nset [fave v] to [0]\nset [love v] to [0]\nforever\n    if <touching (mouse-pointer v)?> then\n        wait (3) seconds\n        set [fave v] to [1]\n        set [love v] to [1]\n        broadcast (loved/faved v)\n    end\nend\n\n@fav\n\nwhen flag clicked\nset [fave v] to [0]\nset [love v] to [0]\nforever\n    if <touching (mouse-pointer v)?> then\n        wait (3) seconds\n        set [fave v] to [1]\n        set [love v] to [1]\n        broadcast (loved/faved v)\n    end\nend\n\n@Sprite2\n\n@player\n\nwhen I receive [loved/faved v]\nforever\n    change [color v] effect by (25)\nend\n\nwhen flag clicked\nforever\n    if <(Love/fav) = [2]> then\n        change [brightness v] effect by (25)\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen flag clicked\nhide variable [love v]\nhide variable [fave v]\n\nwhen flag clicked\nforever\n    go to (hitbox v)\nend\n\nwhen flag clicked\nif <key (a v) pressed?> then\n    forever\n        switch costume to (costume1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (a v) pressed?> then\n        broadcast (left side v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (left arrow v) pressed?> then\n        broadcast (left side v)\n    end\nend\n\nwhen I receive [left side v]\nswitch costume to (costume1 v)\n\nwhen flag clicked\nforever\n    if <key (right arrow v) pressed?> then\n        broadcast (right side v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (d v) pressed?> then\n        broadcast (right side v)\n    end\nend\n\nwhen I receive [right side v]\nswitch costume to (costume2 v)\n\nwhen flag clicked\ngo to [back v] layer\nset size to (70) %\nReset player\nset [level v] to [1]\nbroadcast (game loop v)\nforever\n    create clone of (_myself_ v)\n    change [xvel v] by ((<<<key (right arrow v) pressed?> or <<(mouse x) > ((x position) + (15))> and <mouse down?>>> or <key (d v) pressed?>> - <<<<(mouse x) < ((x position) + (-15))> and <mouse down?>> or <key (left arrow v) pressed?>> or <key (a v) pressed?>>) * (2))\n    if <<<<key (right arrow v) pressed?> or <<(mouse x) > ((x position) + (15))> and <mouse down?>>> or <key (d v) pressed?>> or <<<<(mouse x) < ((x position) + (-15))> and <mouse down?>> or <key (left arrow v) pressed?>> or <key (a v) pressed?>>> then\n        point in direction ((<<<key (right arrow v) pressed?> or <<(mouse x) > ((x position) + (15))> and <mouse down?>>> or <key (d v) pressed?>> - <<<<(mouse x) < ((x position) + (-15))> and <mouse down?>> or <key (left arrow v) pressed?>> or <key (a v) pressed?>>) * (90))\n    end\n    set [xvel v] to ((Xvel) * (0.8))\n    change x by (Xvel)\nend\n\nchange [yvel v] by (-1)\nchange y by (Yvel)\nif <<touching (platform v)?> or <touching (wall v)?>> then\n    change y by ((Yvel) * (-1))\n    set [yvel v] to [0]\nend\nchange y by (-1)\nif <<touching (platform v)?> or <touching (wall v)?>> then\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<(mouse y) > ((y position) + (20))> and <mouse down?>>> then\n        set [yvel v] to [13]\n    end\nend\nif <(y position) < [-175]> then\n    Reset player\n    start sound [Crunch v]\nend\nif <(x position) > [235]> then\n    broadcast (next level v)\n    change [level v] by (1)\n    change x by (-470)\nend\nif <<touching (spikes v)?> or <<touching (boss v)?> or <touching (enemy v)?>>> then\n    Reset player\n    start sound [Crunch v]\nend\nif <touching (treasure v)?> then\n    repeat (2)\n        set [treasure v] to [1]\n    end\n    stop [all v]\nend\nchange y by (1)\n\nwhen I start as a clone\nrepeat (4)\n    change [ghost v] effect by (20)\n    change size by (-4)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    if <key (a v) pressed?> then\n        forever\n            point in direction (90)\n        end\n    end\nend\n\nwhen flag clicked\nif <key (left arrow v) pressed?> then\n    forever\n        switch costume to (costume1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (left arrow v) pressed?> then\n        forever\n            point in direction (90)\n        end\n    end\nend\n\nwhen flag clicked\npoint in direction (-90)\n\nwhen flag clicked\nforever\n    if <touching (spikes v)?> then\n        wait (1) seconds\n        switch costume to (costume3 v)\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nhide\n\n
You can use arrow keys or mobile to play! Thanks to SodaTurtle for the OG game\nHitbox added!!\nPT: 2  https://scratch.mit.edu/projects/891401570/\nThe hitbox glitch is fixed! you no longer gets stuck in the wall!