Back Again 2 || Platformer #all #games #art #music

Instructions: Hey guys! Thanks so much for 500 loves on "Back Again"!!! Here is part 2.\n\nALL PARTS: https://scratch.mit.edu/studios/30694888/\nPART 1: https://scratch.mit.edu/projects/603561759/\nPART 3: https://scratch.mit.edu/projects/606735170/\nPART 4: https://scratch.mit.edu/projects/608314738/\nPART 5: https://scratch.mit.edu/projects/610630126/\n\nGET A SHOUTOUT!!! https://scratch.mit.edu/projects/615028671/\n\nALL LEVELS ARE POSSIBLE! Here is how to beat each level: https://youtu.be/XbAC0HMp5kA\n\nDO NOT ADVERTISE!! ALL ADVERTISEMENTS WILL BE REPORTED!!\n\nINSTRUCTIONS\nComputer - \nWASD or Arrow keys to move\n"S" to skip\n"B" to go back\n"R" to restart\n"M" to mute\n"L" to turn off lag\n❤️ + ⭐= Thanks so much! :D\n\nMobile - \nTap the screen, and drag in a direction to move the joystick. You will move in that direction.\n❤️ + ⭐= Thanks so much! :D\n\nHighscores:\n35 Sec     -canCode-\n33 Sec     shrimpnoodles\n32 Sec     shrimpnoodles\n31 Sec     shrimpnoodles\n30 Sec     GrUmPyCaRtEr\n29 Sec     shrimpnoodles\n28 Sec     DeadCrops\n27 Sec     danipoplpl

@Stage\n\nwhen I receive [play v]\nset [time v] to [0]\nhide variable [☁ world record v]\nset [level skipped v] to [0]\nforever\n    if <(level skipped) = [0]> then\n        if <(LEVEL) = [15]> then\n            if <(round (Time)) < (☁ World Record)> then\n                repeat (10)\n                    set [☁ world record v] to (round (Time))\n                end\n                stop [this script v]\n            end\n        end\n    end\n    if <key (s v) pressed?> then\n        set [level skipped v] to [1]\n        forever\n            set [time v] to [Level skipped]\n        end\n    end\nend\n\nwhen I receive [play v]\nforever\n    if <(LEVEL) = [15]> then\n        show variable [☁ world record v]\n    end\nend\n\nwhen I receive [play v]\nreset timer\nforever\n    if <<not <(LEVEL) = [15]>> and <(level skipped) = [0]>> then\n        set [time v] to (timer)\n    end\nend\n\nwhen flag clicked\nforever\n    play sound [hyperdrive edited v] until done\nend\n\nwhen [s v] key pressed\nif <not <(LEVEL) = [15]>> then\n    change [level v] by (1)\n    broadcast (Reset v)\nend\n\nwhen [r v] key pressed\nbroadcast (Reset v)\n\nwhen [b v] key pressed\nif <not <(LEVEL) = [1]>> then\n    change [level v] by (-1)\n    broadcast (Reset v)\nend\n\nwhen [m v] key pressed\nif <(volume) = [100]> then\n    set volume to (0) %\nelse\n    set volume to (100) %\nend\n\nwhen [l v] key pressed\nif <(Lag) = [0]> then\n    set [lag v] to [1]\nelse\n    set [lag v] to [0]\nend\n\n@Player\n\nwhen flag clicked\nbroadcast (Play v)\n\nwhen I receive [play v]\nbroadcast (Reset v)\nswitch costume to (player body v)\nshow\nset [acceleration v] to [1.9]\nset [gravity v] to [-1.7]\nset [friction v] to [0.85]\nset [jump height v] to [15]\nset [clone type v] to [Eye]\ncreate clone of (_myself_ v)\nforever\n    PLATFORM PHYSICS | Acceleration: (ACCELERATION) Gravity: (GRAVITY) Friction: (FRICTION) Jump Height: (JUMP HEIGHT)\n    set [x pos v] to (x position)\n    set [y pos v] to (y position)\n    if <<touching (spikes v)?> or <<touching (saw v)?> or <(y position) < [-180]>>> then\n        start sound [splat v]\n        if <(Lag) = [0]> then\n            set [deathx v] to (x position)\n            set [deathy v] to (y position)\n            repeat (3)\n                create clone of (player death v)\n                create clone of (player death v)\n                create clone of (player death v)\n            end\n            broadcast (shake v)\n        end\n        broadcast (Reset v)\n    end\nend\n\ndefine Move - In steps (steps)\nchange [falling v] by (1)\nrepeat (steps)\n    set [last value v] to (x position)\n    change x by ((Speed x) / (steps))\n    if <touching (ground v)?> then\n        collide x\n    end\n    set [last value v] to (y position)\n    if <touching (bouncy v)?> then\n        set [speed y v] to [27]\n    end\n    change y by ((Speed y) / (steps))\n    if <touching (ground v)?> then\n        collide y\n    end\nend\n\ndefine PLATFORM PHYSICS | Acceleration: (acceleration) Gravity: (gravity) Friction: (friction) Jump Height: (jump height)\nif <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(([y position v] of [mobile2 v]) - ([y position v] of [mobile v])) > [10]>>>> then\n    if <(Falling) < [3]> then\n        set [speed y v] to (jump height)\n    end\nend\nif <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(([x position v] of [mobile v]) - ([x position v] of [mobile2 v])) > [10]>>>> then\n    change [speed x v] by ((acceleration) * (-1))\n    set [x eye v] to [-5]\nend\nif <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(([x position v] of [mobile2 v]) - ([x position v] of [mobile v])) > [10]>>>> then\n    change [speed x v] by (acceleration)\n    set [x eye v] to [5]\nend\nif <not <<key (right arrow v) pressed?> or <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<key (d v) pressed?> or <<<mouse down?> and <(([x position v] of [mobile2 v]) - ([x position v] of [mobile v])) > [10]>> or <<mouse down?> and <(([x position v] of [mobile v]) - ([x position v] of [mobile2 v])) > [10]>>>>>>>> then\n    set [x eye v] to [0]\nend\nset [speed x v] to ((Speed x) * (friction))\nchange [speed y v] by (gravity)\nMove - In steps (([abs v] of (Speed x) ) + ([abs v] of (Speed y) ))\n\nwhen I start as a clone\nif <(Clone type) = [Eye]> then\n    switch costume to (eye v)\n    go to [front v] layer\n    forever\n        go to x: (X pos) y: (Y pos)\n        change x by ((x eye) / (2))\n        change y by ((Speed y) / (3))\n    end\nend\nif <(Clone type) = [trail]> then\n    switch costume to (clone v)\n    repeat (10)\n        change size by (-5)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen I receive [reset v]\ngo to x: (-180) y: (-50)\nset [speed y v] to [0]\nset [speed x v] to [0]\n\nwhen I receive [play v]\nwait (0.01) seconds\nforever\n    if <(Lag) = [0]> then\n        set [clone type v] to [trail]\n        create clone of (_myself_ v)\n    end\nend\n\ndefine collide x\nchange y by (1)\nif <touching (ground v)?> then\n    change y by (1)\n    if <touching (ground v)?> then\n        change y by (-2)\n        set x to (Last Value)\n        set [speed x v] to [0]\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(([y position v] of [mobile2 v]) - ([y position v] of [mobile v])) > [10]>>>> then\n            if <(Speed x) < [0]> then\n                if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(([x position v] of [mobile v]) - ([x position v] of [mobile2 v])) > [10]>>>> then\n                    set [speed x v] to [10]\n                    set [speed y v] to [12]\n                end\n            else\n                if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(([x position v] of [mobile2 v]) - ([x position v] of [mobile v])) > [10]>>>> then\n                    set [speed x v] to [-10]\n                    set [speed y v] to [12]\n                end\n            end\n        end\n        stop [this script v]\n    end\n    set [speed x v] to ((Speed x) * (0.8))\nend\nset [speed x v] to ((Speed x) * (0.95))\n\ndefine collide y\nset y to (Last Value)\nif <[0] < (Speed y)> then\n    set [speed y v] to [0]\n    stop [this script v]\nend\nset [falling v] to [0]\nset [speed y v] to [0]\n\nwhen I receive [play v]\nswitch costume to (player body v)\nforever\n    wait (pick random (10) to (12)) seconds\n    repeat (15)\n        next costume\n    end\n    repeat (15)\n        next costume\n        next costume\n        next costume\n        next costume\n        next costume\n        next costume\n        next costume\n        next costume\n        next costume\n        next costume\n        next costume\n        next costume\n        next costume\n        next costume\n        next costume\n        next costume\n        next costume\n    end\nend\n\n@Ground\n\nwhen I receive [reset v]\nswitch costume to (LEVEL)\n\nwhen I receive [shake v]\nshake [45]\nshake [-45]\nshake [135]\nshake [-150]\n\ndefine shake (direction)\npoint in direction (direction)\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\npoint in direction ((direction) + (180))\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\n\n@Spikes\n\ndefine shake (direction)\npoint in direction (direction)\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\npoint in direction ((direction) + (180))\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\n\nwhen I receive [reset v]\nswitch costume to (LEVEL)\n\nwhen I receive [shake v]\nshake [45]\nshake [-45]\nshake [135]\nshake [-150]\n\n@Saw\n\nwhen flag clicked\nwait (0.01) seconds\nhide\nset [moving v] to [0]\nforever\n    if <(LEVEL) = [6]> then\n        go to x: (-75) y: (180)\n        set [moving v] to [0]\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [6]>>\n    end\n    if <(LEVEL) = [7]> then\n        set [moving v] to [0]\n        go to x: (-75) y: (-100)\n        create clone of (_myself_ v)\n        go to x: (10) y: (-45)\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [7]>>\n    end\n    if <(LEVEL) = [8]> then\n        set [moving v] to [0]\n        go to x: (0) y: (95)\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [8]>>\n    end\n    if <(LEVEL) = [10]> then\n        set [moving v] to [0]\n        go to x: (65) y: (73)\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [10]>>\n    end\n    if <(LEVEL) = [11]> then\n        set [moving v] to [1]\n        go to x: (80) y: (-100)\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [11]>>\n    end\n    if <(LEVEL) = [12]> then\n        set [moving v] to [1]\n        go to x: (80) y: (80)\n        create clone of (_myself_ v)\n        wait (0.00001) seconds\n        set [moving v] to [0]\n        go to x: (-20) y: (-20)\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [12]>>\n    end\n    if <(LEVEL) = [13]> then\n        set [moving v] to [0]\n        go to x: (115) y: (-100)\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [13]>>\n    end\nend\n\nwhen I receive [shake v]\nshake [45]\nshake [-45]\nshake [135]\nshake [-150]\n\ndefine shake (direction)\npoint in direction (direction)\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\npoint in direction ((direction) + (180))\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\n\nwhen I start as a clone\nshow\nset [spin v] to [20]\nset [current level v] to (LEVEL)\nforever\n    repeat (40)\n        if <(Lag) = [0]> then\n            turn right (spin) degrees\n            change [spin v] by (-1)\n        end\n        if <not <(LEVEL) = (current level)>> then\n            delete this clone\n        end\n    end\n    repeat (40)\n        if <(Lag) = [0]> then\n            turn right (spin) degrees\n            change [spin v] by (1)\n        end\n        if <not <(LEVEL) = (current level)>> then\n            delete this clone\n        end\n    end\nend\n\nwhen I start as a clone\nset [current level v] to (LEVEL)\nset [motion v] to [0]\nif <(moving) = [1]> then\n    repeat (14)\n        change [motion v] by (-1)\n        change x by (motion)\n        if <not <(LEVEL) = (current level)>> then\n            delete this clone\n        end\n    end\n    forever\n        repeat (28)\n            change [motion v] by (1)\n            change x by (motion)\n            if <not <(LEVEL) = (current level)>> then\n                delete this clone\n            end\n        end\n        repeat (28)\n            change [motion v] by (-1)\n            change x by (motion)\n            if <not <(LEVEL) = (current level)>> then\n                delete this clone\n            end\n        end\n    end\nend\n\n@Bouncy\n\ndefine shake (direction)\npoint in direction (direction)\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\npoint in direction ((direction) + (180))\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\n\nwhen I receive [reset v]\nswitch costume to (LEVEL)\n\nwhen I receive [shake v]\nshake [45]\nshake [-45]\nshake [135]\nshake [-150]\n\n@Player Death\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nset size to (pick random (80) to (120)) %\nset [y v] to (pick random (8) to (12))\nset [x v] to (pick random (-4) to (4))\ngo to x: (deathx) y: (deathy)\nrepeat (10)\n    change x by (x)\n    change y by (y)\n    change [y v] by (-1)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\n@Mobile\n\nwhen I receive [play v]\nhide\nforever\n    if <mouse down?> then\n        set [ghost v] effect to (50)\n        go to (mouse-pointer v)\n        show\n        wait until <not <mouse down?>>\n        hide\n    end\nend\n\nset [joystickx v] to (x position)\nset [joysticky v] to (y position)\n\n@Stars\n\nwhen I receive [play v]\ngo to [back v] layer\nhide\nwait (0.1) seconds\nforever\n    if <(Lag) = [0]> then\n        wait (pick random (0) to (0.1)) seconds\n        switch costume to (pick random (1) to (2))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nshow\nclear graphic effects\nset size to (pick random (80) to (200)) %\nset [ghost v] effect to (100)\npoint in direction (90)\ngo to x: (pick random (-240) to (240)) y: (pick random (180) to (-100))\nrepeat (20)\n    go to [back v] layer\n    if <(Lag) = [0]> then\n        change [ghost v] effect by (-5)\n    end\nend\nrepeat (20)\n    go to [back v] layer\n    if <(Lag) = [0]> then\n        change [ghost v] effect by (5)\n    end\nend\ndelete this clone\n\nwhen I receive [shake v]\nshake [45]\nshake [-45]\nshake [135]\nshake [-150]\n\ndefine shake (direction)\npoint in direction (direction)\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\npoint in direction ((direction) + (180))\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\n\n@Moon\n\nwhen I receive [play v]\nset size to (70) %\npoint in direction (90)\nshow\ngo to [back v] layer\ngo to x: (180) y: (120)\nswitch costume to (screenshot 2021-11-22 154308 v)\nset [size v] to [0]\nrepeat (10)\n    change size by (Size)\n    change [size v] by (0.05)\n    switch costume to (screenshot 2021-11-22 154308 v)\n    wait until <(Lag) = [0]>\nend\nforever\n    repeat (20)\n        wait until <(Lag) = [0]>\n        change size by (Size)\n        change [size v] by (-0.05)\n        switch costume to (screenshot 2021-11-22 154308 v)\n    end\n    repeat (20)\n        wait until <(Lag) = [0]>\n        change size by (Size)\n        change [size v] by (0.05)\n        switch costume to (screenshot 2021-11-22 154308 v)\n    end\nend\n\nif <(Lag) = [0]> then\nelse\nend\n\nif <(Lag) = [0]> then\nelse\nend\n\nif <(Lag) = [0]> then\nelse\nend\n\n@Mobile2\n\ndefine block name\nif <(mouse x) > (x position)> then\n    repeat until <<(round (x position)) = (round (mouse x))> or <(round (x position)) > (([x position v] of [mobile v]) + (19))>>\n        change x by (1)\n    end\nelse\n    if <(x position) > (mouse x)> then\n        repeat until <<(round (x position)) = (round (mouse x))> or <(([x position v] of [mobile v]) + (-19)) > (round (x position))>>\n            change x by (-1)\n        end\n    end\nend\nif <(mouse y) > (y position)> then\n    repeat until <<(round (y position)) = (round (mouse y))> or <(round (y position)) > (([y position v] of [mobile v]) + (19))>>\n        change y by (1)\n    end\nelse\n    if <(y position) > (mouse y)> then\n        repeat until <<(round (y position)) = (round (mouse y))> or <(([y position v] of [mobile v]) + (-19)) > (round (y position))>>\n            change y by (-1)\n        end\n    end\nend\n\nwhen I receive [play v]\npoint in direction (90)\nhide\nforever\n    if <mouse down?> then\n        set [ghost v] effect to (50)\n        go to (mobile v)\n        show\n        repeat until <not <mouse down?>>\n            block name\n        end\n        hide\n    end\nend\n\nforever\n    \n        say [Hello!]\n    else\n        say []\n    end\nend\n\n\n    move (1) steps\nend\n\n@Flag\n\nwhen I receive [play v]\nswitch costume to (flag v)\nset [level v] to [1]\ngo to x: (190) y: (-100)\npoint in direction (90)\nforever\n    if <touching (player v)?> then\n        change [level v] by (1)\n        start sound [ding v]\n        broadcast (Reset v)\n        broadcast (throw clones v)\n        if <(Lag) = [0]> then\n            turn right (-4) degrees\n            repeat (2)\n                repeat (2)\n                    turn right (4) degrees\n                end\n                repeat (2)\n                    turn right (-4) degrees\n                end\n            end\n            turn right (4) degrees\n        end\n    end\nend\n\nwhen I receive [throw clones v]\nif <(Lag) = [0]> then\n    repeat (5)\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo to [front v] layer\nswitch costume to (clone v)\nset size to (pick random (80) to (120)) %\nset [y v] to (pick random (8) to (12))\nset [x v] to (pick random (-4) to (4))\nrepeat (10)\n    change x by (x)\n    change y by (y)\n    change [y v] by (-1)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\nwhen I receive [shake v]\nshake [45]\nshake [-45]\nshake [135]\nshake [-150]\n\ndefine shake (direction)\npoint in direction (direction)\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\npoint in direction ((direction) + (180))\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\n\n@Words\n\nwhen I receive [reset v]\npoint in direction (90)\nset size to (100) %\nif <not <(LEVEL) = [15]>> then\n    go to x: (0) y: (0)\n    set [ghost v] effect to (20)\n    switch costume to (LEVEL)\n    wait (5) seconds\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\nelse\n    go to x: (-50) y: (50)\n    set [ghost v] effect to (0)\n    switch costume to (LEVEL)\n    repeat (5)\n        turn right (-0.5) degrees\n    end\n    forever\n        repeat (10)\n            turn right (0.5) degrees\n        end\n        repeat (2)\n            change size by (5)\n        end\n        repeat (2)\n            change size by (-5)\n        end\n        repeat (10)\n            turn right (-0.5) degrees\n        end\n        repeat (2)\n            change size by (5)\n        end\n        repeat (2)\n            change size by (-5)\n        end\n    end\nend\n\n@Love, Fav, and Follow\n\nwhen flag clicked\nhide\ngo to x: (-130) y: (-212)\nset [follow time v] to (pick random (5) to (8))\nforever\n    wait (pick random (follow time) to ((follow time) + (10))) seconds\n    go to x: (-130) y: (-200)\n    show\n    repeat (10)\n        change y by (5)\n    end\n    wait (1) seconds\n    turn left (5) degrees\n    repeat (2)\n        repeat (2)\n            turn right (5) degrees\n        end\n        repeat (2)\n            turn right (-5) degrees\n        end\n    end\n    turn left (-5) degrees\n    wait (1) seconds\n    repeat (10)\n        change y by (-5)\n    end\n    hide\n    change [follow time v] by (pick random (9) to (11))\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to [front v] layer\npoint in direction (90)\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\n