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

Instructions: Hey guys! It's been a VERY long time, but I'm back with my platformer "Back Again".\n\nALL PARTS: https://scratch.mit.edu/studios/30694888/\nPART 2: https://scratch.mit.edu/projects/605046222/\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 - \nthe following link shows how to beat EVERY level:\nhttps://youtu.be/sbjZyPhuvnw\n\nDO NOT ADVERTISE!! I REPORT EVERY ADVERTISMENT! (Also, please report advertisements yourself...Thanks)\n\nINSTRUCTIONS\nComputer - \nWASD or Arrow keys to move\n"S" - Skip Level\n"B" - Go Back a Level\n"R" - Restart Level\n"M" - Mute Music\n"L" - Turn off Lag(Also turns off graphics)\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: \n11/22/21     39 sec     -canCode-\n11/23/21     37 sec    -SuperFunnyAnimator-\n11/23/21     34 sec    -SuperFunnyAnimator-\n11/23/21     33 sec     shrimpnoodles\n12/3/21       29 sec     DeadCrops\n12/3/21       27 sec     Bot002          <-- Current\n\nThis platformer is in 127 studios. XD\n\nscratchbfn for the 500th love!!!\nJamesNaomi for the 1000th love!!!

@Stage\n\nwhen flag clicked\nforever\n    play sound [Vicetone - United We Dance 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 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    else\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    else\n    end\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\nset [lag v] to [0]\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)?>> then\n        if <(Lag) = [0]> then\n            start sound [splat v]\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        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    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) ))\ngo to x: (round (x position)) y: (round (y position))\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        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@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@Clouds\n\nwhen I receive [play v]\nhide\nwait (0.1) seconds\nforever\n    if <(Lag) = [0]> then\n        wait (pick random (0.5) to (0.9)) 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 [ghost v] effect to (pick random (5) to (15))\nset [cloud speed v] to (pick random (-1) to (-4))\npoint in direction (90)\ngo to x: (264) y: (pick random (80) to (155))\nrepeat until <<[-262] > (x position)> or <(Lag) = [1]>>\n    change x by (cloud speed)\nend\nrepeat (20)\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\nif <<(costume [number v]) = [3]> or <(costume [number v]) = [4]>> then\nforever\n    go to x: (214) y: (155)\n    switch costume to (sun v)\nend\n\n@Sun\n\nwhen I receive [play v]\nset size to (100) %\npoint in direction (90)\nshow\ngo to [back v] layer\ngo to x: (214) y: (155)\nswitch costume to (sun v)\ncreate clone of (_myself_ v)\nswitch costume to (sun flares v)\nset [size v] to [0]\nrepeat (10)\n    turn right (1) degrees\n    change size by (Size)\n    change [size v] by (0.05)\n    switch costume to (sun flares v)\nend\nforever\n    if <(Lag) = [0]> then\n        repeat (20)\n            turn right (1) degrees\n            change size by (Size)\n            change [size v] by (-0.05)\n            switch costume to (sun flares v)\n        end\n        repeat (20)\n            turn right (1) degrees\n            change size by (Size)\n            change [size v] by (0.05)\n            switch costume to (sun flares v)\n        end\n    end\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\npoint in direction (90)\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\n@Saw\n\nwhen flag clicked\nwait (0.01) seconds\nhide\nforever\n    if <not <<(LEVEL) = [13]> or <(LEVEL) = [14]>>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen flag clicked\nwait (0.01) seconds\nhide\nforever\n    if <(LEVEL) = [13]> then\n        go to x: (0) y: (-100)\n        show\n        set [spin v] to [20]\n        forever\n            show\n            if <(Lag) = [0]> then\n                repeat (40)\n                    if <(Lag) = [0]> then\n                        turn right (spin) degrees\n                        change [spin v] by (-1)\n                        if <not <(LEVEL) = [13]>> then\n                            wait until <(LEVEL) = [13]>\n                            go to x: (0) y: (-100)\n                        end\n                    end\n                end\n                repeat (40)\n                    if <(Lag) = [0]> then\n                        turn right (spin) degrees\n                        change [spin v] by (1)\n                        if <not <(LEVEL) = [13]>> then\n                            wait until <(LEVEL) = [13]>\n                            go to x: (0) y: (-100)\n                        end\n                    end\n                end\n            else\n                if <not <(LEVEL) = [13]>> then\n                    wait until <(LEVEL) = [13]>\n                    go to x: (0) y: (-100)\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nwait (0.01) seconds\nhide\nforever\n    if <(LEVEL) = [14]> then\n        go to x: (-75) y: (-100)\n        show\n        set [spin v] to [20]\n        forever\n            show\n            if <(Lag) = [0]> then\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) = [14]>> then\n                        wait until <(LEVEL) = [14]>\n                        go to x: (-75) y: (-100)\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) = [14]>> then\n                        wait until <(LEVEL) = [14]>\n                        go to x: (-75) y: (-100)\n                    end\n                end\n            else\n                if <not <(LEVEL) = [14]>> then\n                    wait until <(LEVEL) = [14]>\n                    go to x: (-75) y: (-100)\n                end\n            end\n        end\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\n