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

Instructions: Hey guys! Thanks so much for 1000 loves on "Back Again 3"!!! Here is part 4.\n\nALL PARTS: https://scratch.mit.edu/studios/30694888/\nPART 1: https://scratch.mit.edu/projects/603561759/\nPART 2: https://scratch.mit.edu/projects/605046222/\nPART 3: https://scratch.mit.edu/projects/606735170/\nPART 5: https://scratch.mit.edu/projects/610630126/\n\nGET A SHOUTOUT!!! https://scratch.mit.edu/projects/615028671/\n\nALL LEVELS ARE POSSIBLE\n\nDO NOT ADVERTISE AS IT 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\nHighscore: 34 seconds by shayaan2012

@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 [tobu higher 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 [clone type v] to [Eye]\ncreate clone of (_myself_ v)\nforever\n    Moved - by moving platform\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        wait (0.1) seconds\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)?> or <touching (moving 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) * (((GRAVITY) / (1.7)) * (-1)))\n    end\n    change y by ((Speed y) / (steps))\n    if <<touching (ground v)?> or <touching (moving 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) * (((GRAVITY) / (1.7)) * (-1)))\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]\nset [acceleration v] to [1.9]\nset [gravity v] to [-1.7]\nset [friction v] to [0.85]\nset [jump height v] to [15]\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)?> or <touching (moving v)?>> then\n    change y by (1)\n    if <<touching (ground v)?> or <touching (moving 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) * (((GRAVITY) / (1.7)) * (-1)))> 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\ndefine Moved - by moving platform\nif <touching (moving v)?> then\n    if <(LEVEL) = [7]> then\n        replace item (5) of [moving distances v] with (x position)\n        repeat until <not <touching (moving v)?>>\n            change x by (1)\n        end\n        replace item (6) of [moving distances v] with ((x position) - (item (5) of [moving distances v]))\n        set x to (item (5) of [moving distances v])\n        replace item (7) of [moving distances v] with (x position)\n        repeat until <not <touching (moving v)?>>\n            change x by (-1)\n        end\n        replace item (8) of [moving distances v] with ((x position) - (item (7) of [moving distances v]))\n        set x to (item (7) of [moving distances v])\n        if <([abs v] of (item (6) of [moving distances v]) ) > ([abs v] of (item (8) of [moving distances v]) )> then\n            change x by (item (8) of [moving distances v])\n        else\n            change x by (item (6) of [moving distances v])\n        end\n    end\n    if <(LEVEL) = [12]> then\n        replace item (1) of [moving distances v] with (y position)\n        repeat until <<not <touching (moving v)?>> or <(y position) > [180]>>\n            change y by (1)\n        end\n        replace item (2) of [moving distances v] with ((y position) - (item (1) of [moving distances v]))\n        set y to (item (1) of [moving distances v])\n        replace item (3) of [moving distances v] with (y position)\n        repeat until <<not <touching (moving v)?>> or <[-180] > (y position)>>\n            change y by (-1)\n        end\n        replace item (4) of [moving distances v] with ((y position) - (item (3) of [moving distances v]))\n        set y to (item (3) of [moving distances v])\n        if <([abs v] of (item (2) of [moving distances v]) ) > ([abs v] of (item (4) of [moving distances v]) )> then\n            change y by (item (4) of [moving distances v])\n        else\n            change y by (item (2) of [moving distances v])\n        end\n    end\n    if <touching (ground v)?> then\n        set [deathx v] to (x position)\n        set [deathy v] to (y position)\n        broadcast (Reset v)\n        if <(Lag) = [0]> then\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        end\n    end\nend\n\nwhen flag clicked\ndelete all of [moving distances v]\nadd [0] to [moving distances v]\nadd [0] to [moving distances v]\nadd [0] to [moving distances v]\nadd [0] to [moving distances v]\nadd [0] to [moving distances v]\nadd [0] to [moving distances v]\nadd [0] to [moving distances v]\nadd [0] to [moving distances v]\n\nif <(LEVEL) = [13]> then\n    replace item (1) of [moving distances v] with (y position)\n    repeat until <<not <touching (moving v)?>> or <(y position) > [180]>>\n        change y by (1)\n    end\n    replace item (2) of [moving distances v] with ((y position) - (item (1) of [moving distances v]))\n    set y to (item (1) of [moving distances v])\n    replace item (3) of [moving distances v] with (y position)\n    repeat until <not <touching (moving v)?>>\n        change y by (-1)\n    end\n    replace item (4) of [moving distances v] with ((y position) - (item (3) of [moving distances v]))\n    set y to (item (3) of [moving distances v])\n    if <([abs v] of (item (2) of [moving distances v]) ) > ([abs v] of (item (4) of [moving distances v]) )> then\n        change y by (item (4) of [moving distances v])\n    else\n        change y by (item (2) of [moving distances v])\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]\ngo to x: (0) y: (0)\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]\ngo to x: (0) y: (0)\n\n@Saw\n\nwhen flag clicked\nwait (0.01) seconds\nhide\nset [moving v] to [0]\nforever\n    if <(LEVEL) = [4]> then\n        go to x: (90) y: (-100)\n        set [moving v] to [1]\n        create clone of (_myself_ v)\n        go to x: (-90) y: (20)\n        set [moving v] to [2]\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [4]>>\n    end\n    if <(LEVEL) = [9]> then\n        go to x: (90) y: (-100)\n        set [moving v] to [1]\n        create clone of (_myself_ v)\n        go to x: (-90) y: (-100)\n        set [moving v] to [2]\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [9]>>\n    end\n    if <(LEVEL) = [10]> then\n        go to x: (-90) y: (-20)\n        set [moving v] to [0]\n        create clone of (_myself_ v)\n        go to x: (90) y: (-20)\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [10]>>\n    end\n    if <(LEVEL) = [13]> then\n        go to x: (0) y: (100)\n        set [moving v] to [3]\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [13]>>\n    end\n    if <(LEVEL) = [14]> then\n        go to x: (-85) y: (20)\n        set [moving v] to [0]\n        create clone of (_myself_ v)\n        go to x: (120) y: (20)\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [14]>>\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\nif <(moving) = [2]> 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\nif <(moving) = [3]> then\n    set [motion v] to [0]\n    repeat (14)\n        change [motion v] by (-1)\n        change y 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 y 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 y 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)\nset rotation style [don't rotate v]\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\ngo to [front v] layer\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@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: (-110)\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@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@Love, Fav, and Follow\n\nwhen flag clicked\ngo to [front v] layer\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@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@moving\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\nif <(moving) = [1]> then\n    forever\n        repeat (28)\n            change x by (-7)\n        end\n        wait (0.5) seconds\n        repeat (28)\n            change x by (7)\n        end\n        wait (0.5) seconds\n    end\nend\nif <(moving) = [2]> then\n    forever\n        repeat (13)\n            change y by (5)\n        end\n        repeat (13)\n            change y by (-5)\n        end\n    end\nend\nif <(moving) = [3]> then\n    forever\n        repeat (13)\n            change y by (-5)\n        end\n        repeat (13)\n            change y by (5)\n        end\n    end\nend\n\nwhen flag clicked\nwait (0.01) seconds\nhide\nset [moving v] to [0]\nforever\n    if <(LEVEL) = [7]> then\n        switch costume to (costume1 v)\n        go to x: (150) y: (0)\n        set [moving v] to [1]\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [7]>>\n    end\n    if <(LEVEL) = [12]> then\n        switch costume to (costume2 v)\n        go to x: (-90) y: (-100)\n        point in direction (90)\n        set [moving v] to [2]\n        create clone of (_myself_ v)\n        go to x: (90) y: (95)\n        point in direction (-90)\n        set [moving v] to [3]\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [12]>>\n    end\nend\n\nwhen I start as a clone\nset [current level v] to (LEVEL)\nforever\n    if <not <(current level) = (LEVEL)>> then\n        delete this clone\n    end\nend\n\n@gravity reverse\n\nwhen flag clicked\nhide\nset [level v] to [1]\nforever\n    if <(LEVEL) = [5]> then\n        go to x: (-40) y: (-75)\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [5]>>\n    end\n    if <(LEVEL) = [7]> then\n        go to x: (-50) y: (-75)\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [7]>>\n    end\n    if <(LEVEL) = [8]> then\n        go to x: (-140) y: (0)\n        create clone of (_myself_ v)\n        go to x: (-90) y: (0)\n        create clone of (_myself_ v)\n        go to x: (-40) y: (0)\n        create clone of (_myself_ v)\n        go to x: (10) y: (0)\n        create clone of (_myself_ v)\n        go to x: (60) y: (0)\n        create clone of (_myself_ v)\n        go to x: (110) y: (0)\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [8]>>\n    end\n    if <(LEVEL) = [9]> then\n        go to x: (0) y: (80)\n        create clone of (_myself_ v)\n        go to x: (200) y: (80)\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [9]>>\n    end\n    if <(LEVEL) = [10]> then\n        go to x: (0) y: (0)\n        create clone of (_myself_ v)\n        go to x: (200) y: (80)\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [10]>>\n    end\n    if <(LEVEL) = [12]> then\n        go to x: (0) y: (0)\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [12]>>\n    end\n    if <(LEVEL) = [13]> then\n        go to x: (0) y: (0)\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [13]>>\n    end\n    if <(LEVEL) = [14]> then\n        go to x: (-30) y: (20)\n        create clone of (_myself_ v)\n        go to x: (70) y: (20)\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [14]>>\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 [current level# v] to (LEVEL)\nset size to (100) %\npoint in direction (90)\nforever\n    repeat (20)\n        if <(Lag) = [0]> then\n            change size by (-0.4)\n            turn right (15) degrees\n        else\n            set size to (100) %\n            point in direction (90)\n        end\n        if <not <(LEVEL) = (current level#)>> then\n            delete this clone\n        end\n    end\n    repeat (20)\n        if <(Lag) = [0]> then\n            change size by (0.4)\n            turn right (15) degrees\n        else\n            set size to (100) %\n            point in direction (90)\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\nforever\n    if <touching (player v)?> then\n        set [gravity v] to ((GRAVITY) * (-1))\n        wait until <not <touching (player v)?>>\n    end\nend\n\nwhen flag clicked\ndelete this clone\n\n@snow\n\nwhen flag clicked\nhide\nforever\n    if <(Lag) = [0]> then\n        wait (pick random (0) to (0.05)) seconds\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nshow\ngo to x: (pick random (-240) to (240)) y: (180)\nset size to (pick random (90) to (110)) %\nset [speed v] to (pick random (-2) to (-6))\nrepeat until <(y position) < [-170]>\n    change y by (speed)\nend\ndelete this clone\n\n