Goodbye, 2.0 || a platformer
@Stage\n\n@Exit\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\ngo to x: (36) y: (28)\n\nwhen backdrop switches to [10 v]\nhide\n\n@Player\n\nwhen flag clicked\nswitch backdrop to (1 v)\nswitch costume to (normal v)\nshow\ngo to x: (-201) y: (154)\nset size to (30) %\nset [level v] to [1]\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    Big Chungus Big Chungus\nend\n\ndefine Big Chungus Big Chungus\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    switch costume to (right v)\n    change [xv v] by (1)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    switch costume to (left v)\n    change [xv v] by (-1)\nend\nset [xv v] to ((XV) * (0.9))\nchange x by (XV)\nif <touching (level v)?> then\n    change y by (1)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n            end\n        end\n    end\nend\nif <touching (level v)?> then\n    change x by ((XV) * (-1))\n    change y by (-4)\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        if <(XV) > [0]> then\n            set [xv v] to [-5]\n        else\n            set [xv v] to [5]\n        end\n        set [yv v] to [15]\n    else\n        set [yv v] to [0]\n    end\nend\nchange [yv v] by (-1)\nchange y by (YV)\nif <touching (level v)?> then\n    change y by ((YV) * (-1))\n    set [yv v] to [0]\nend\nchange y by (-1)\nif <touching (level v)?> then\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        set [yv v] to [15]\n    end\nend\nchange y by (1)\n\nwhen flag clicked\nset [ghost v] effect to (0)\nforever\n    if <<<<touching (spikes v)?> or <touching (lava v)?>> or <touching (sprite2 v)?>> or <touching (ai @icmy123 v)?>> then\n        change [ghost v] effect by (100)\n        broadcast (Reset v)\n        wait (0.5) seconds\n        show\n        change [ghost v] effect by (-100)\n        go to x: (-201) y: (154)\n    end\nend\n\nwhen flag clicked\nforever\n    play sound [Alan Walker - Force v] until done\nend\n\nwhen flag clicked\nforever\n    if <touching (exit v)?> then\n        go to x: (-201) y: (154)\n        broadcast (Reset v)\n        next backdrop\n    end\nend\n\n@Level\n\nwhen backdrop switches to [1 v]\nswitch costume to (1 v)\n\nwhen backdrop switches to [2 v]\nswitch costume to (2 v)\n\nwhen backdrop switches to [3 v]\nswitch costume to (3 v)\n\nwhen backdrop switches to [4 v]\nswitch costume to (4 v)\n\nwhen backdrop switches to [5 v]\nswitch costume to (5 v)\n\nwhen backdrop switches to [6 v]\nswitch costume to (6 v)\n\nwhen backdrop switches to [7 v]\nswitch costume to (7 v)\n\nwhen backdrop switches to [8 v]\nswitch costume to (8 v)\n\nwhen backdrop switches to [9 v]\nswitch costume to (9 v)\n\nwhen backdrop switches to [10 v]\nswitch costume to (10 v)\n\n@Spikes\n\nwhen flag clicked\nshow\n\nwhen backdrop switches to [2 v]\nswitch costume to (2 v)\n\nwhen backdrop switches to [1 v]\nswitch costume to (1 v)\n\nwhen backdrop switches to [3 v]\nswitch costume to (3 v)\n\nwhen backdrop switches to [4 v]\nswitch costume to (4 v)\n\nwhen backdrop switches to [5 v]\nswitch costume to (5 v)\n\nwhen backdrop switches to [6 v]\nswitch costume to (6 v)\n\nwhen backdrop switches to [7 v]\nswitch costume to (7 v)\n\nwhen backdrop switches to [8 v]\nhide\n\nwhen backdrop switches to [9 v]\nswitch costume to (8 v)\n\nwhen backdrop switches to [10 v]\nhide\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\n@TB\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\n\n@Particle\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\ngo to [back v] layer\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to [back v] layer\nset [ghost v] effect to (pick random (20) to (50))\nshow\nset y to (10000)\nset [myx v] to (pick random ((ScrollX) - (400)) to ((ScrollX) + (400)))\nset [bubble speed v] to (pick random (-5) to (-12))\nset size to (pick random (50) to (60)) %\nrepeat (30)\n    switch costume to (costume2 v)\n    change y by (Bubble speed)\n    set x to ((MyX) - (ScrollX))\n    switch costume to (costume1 v)\n    change size by (-1)\n    change [ghost v] effect by (1)\nend\ndelete this clone\n\n@Sprite2\n\nwhen flag clicked\nhide\ngo to [back v] layer\nforever\n    if <(Level) < [9]> then\n        wait (pick random (4) to (8)) seconds\n        go to x: (pick random (-250) to (250)) y: (-120)\n        start sound [Splash v]\n        repeat (10)\n            create clone of (_myself_ v)\n        end\n    else\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\nshow\npoint in direction (pick random (-25) to (25))\nrepeat (pick random (20) to (10))\n    move (pick random (8) to (10)) steps\nend\ndelete this clone\n\nwhen backdrop switches to [10 v]\nstop [other scripts in sprite v]\nforever\n    hide\nend\n\nwhen backdrop switches to [10 v]\ndelete this clone\n\n@AI @icmy123\n\ndefine Game\nshow\nchange [yv v] by (-1)\nPosition\nif <(limit) < [5]> then\n    if <(xv) > [-7]> then\n        if <([abs v] of (([x v] of [player v]) - (x)) ) > [20]> then\n            if <([x v] of [player v]) < (x)> then\n                change [xv v] by (-0.2)\n            else\n                change [xv v] by (0.2)\n            end\n        end\n    end\nend\nif <<(round (x)) = (round (data x))> and <(round (y)) = (round (data y))>> then\n    change [limit v] by (1)\nelse\n    set [limit v] to [0]\n    set [data x v] to (round (x))\n    set [data y v] to (round (y))\nend\nif <(limit) > [5]> then\n    change [y v] by (-2)\n    Position\n    if <touching (level v)?> then\n        repeat until <not <touching (level v)?>>\n            change [y v] by (-1)\n            change [xv v] by (-10)\n            set [xv v] to ((xv) * (0.9))\n            change [y v] by (1)\n            change x by (xv)\n            Position\n        end\n    end\nend\nif <(limit) < [5]> then\n    set [xv v] to ((xv) * (0.9))\nend\nchange x by (xv)\nchange [y v] by (-2)\nPosition\nif <<touching (level v)?> and <(y) < ([y v] of [player v])>> then\n    set [yv v] to [0]\nend\nchange [y v] by (2)\nPosition\nchange y by (yv)\n\ndefine change x by (xv)\nchange [x v] by (xv)\nPosition\nif <touching (level v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (level v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    set [yv v] to [12]\n    Position\n    if <touching (level v)?> then\n        repeat until <not <touching (level v)?>>\n            if <(xv) > [0]> then\n                change [x v] by (-1)\n            else\n                change [x v] by (1)\n            end\n            Position\n        end\n        set [xv v] to [0]\n    end\nend\n\ndefine change y by (yv)\nchange [y v] by (yv)\nPosition\nif <touching (level v)?> then\n    repeat until <not <touching (level v)?>>\n        if <(yv) > [0]> then\n            change [y v] by (-0.7)\n        else\n            change [y v] by (0.7)\n        end\n        Position\n    end\n    set [yv v] to [0]\nend\n\ndefine Position\ngo to x: (x) y: (y)\n\nwhen I receive [tick v]\ngo to x: (300) y: (0)\nset [x v] to [300]\nset [y v] to [0]\nforever\n    Game\nend\n\nwhen I receive [reset v]\nReset\n\ndefine Reset\nset [x v] to [204]\nset [y v] to [120]\nset [xv v] to [0]\nset [yv v] to [0]\nset [limit v] to [0]\nshow\n\nwhen backdrop switches to [2 v]\nbroadcast (Tick v)\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [10 v]\nstop [other scripts in sprite v]\nhide\n\n@Sprite3\n\nwhen flag clicked\nhide\nwait (1) seconds\nset [treasure? v] to [0]\n\nwhen backdrop switches to [10 v]\nshow\nforever\n    if <<touching (player v)?> and <(Treasure?) = [0]>> then\n        set [treasure? v] to [1]\n        hide\n    end\nend\n\n
Use W A S D or arrow keys to move\nThe rest is in the game!\n\nSpeedrun Mode (NEW): https://scratch.mit.edu/projects/992455715/\n\nPart 2:\nhttps://scratch.mit.edu/projects/340605280/\n\nPlease change something if you remix