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

Instructions: Hey guys! Thanks so much for 2000 loves on "Back Again 4"!!! Here is part 5.\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 4: https://scratch.mit.edu/projects/608314738/\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: 52 seconds by @-canCode-\n\nLevel 7 inspired by AquaJ6610

@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 [Castle \(Clarx & Harddope\) 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) < [-179]>>> 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        set size to (player size) %\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]\nset size to (100) %\nset [player size v] to [100]\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 (((round (GRAVITY)) / (2)) * (-1))\nif <<touching (ground v)?> or <touching (moving v)?>> then\n    change y by (((round (GRAVITY)) / (2)) * (-1))\n    if <<touching (ground v)?> or <touching (moving v)?>> then\n        change y by (round (GRAVITY))\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) = [6]> 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]> or <(LEVEL) = [14]>> 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\nwhen I receive [play v]\nset [player size v] to [100]\nforever\n    if <touching (shrink v)?> then\n        if <(size) = [100]> then\n            repeat (5)\n                change size by (-10)\n                change [player size v] by (-10)\n            end\n        else\n            repeat (5)\n                change size by (10)\n                change [player size v] by (10)\n            end\n        end\n        if <touching (ground v)?> 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\n        wait until <not <touching (shrink 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) = [10]> then\n        go to x: (-90) y: (-100)\n        set [moving v] to [1]\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [10]>>\n    end\n    if <(LEVEL) = [11]> then\n        go to x: (0) y: (-100)\n        set [moving v] to [1]\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [11]>>\n    end\n    if <(LEVEL) = [12]> then\n        go to x: (0) y: (20)\n        set [moving v] to [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: (-100)\n        set [moving v] to [0]\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [13]>>\n    end\n    if <(LEVEL) = [14]> then\n        go to x: (100) y: (-100)\n        set [moving v] to [2]\n        create clone of (_myself_ v)\n        go to x: (-100) y: (-100)\n        set [moving v] to [1]\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\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]\ngo to x: (0) y: (0)\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\nwhen I receive [play v]\nforever\n    if <(LEVEL) = [7]> then\n        go to x: (190) y: (-25)\n    else\n        go to x: (190) y: (-110)\n    end\nend\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@earth\n\nwhen I receive [play v]\nset size to (40) %\npoint in direction (90)\nshow\ngo to [back v] layer\ngo to x: (-170) y: (120)\nswitch costume to (earth v)\nset [size v] to [0]\nrepeat (10)\n    turn right (-0.1) degrees\n    change size by (Size)\n    change [size v] by (0.05)\n    switch costume to (earth v)\nend\nforever\n    if <(Lag) = [0]> then\n        repeat (20)\n            turn right (0.1) degrees\n            change size by (Size)\n            change [size v] by (-0.05)\n            switch costume to (earth v)\n        end\n        repeat (20)\n            turn right (-0.1) degrees\n            change size by (Size)\n            change [size v] by (0.05)\n            switch costume to (earth v)\n        end\n    end\nend\n\n@moving\n\nwhen I receive [shake v]\nif <<not <(LEVEL) = [12]>> and <not <(LEVEL) = [6]>>> then\n    shake [45]\n    shake [-45]\n    shake [135]\n    shake [-150]\nend\nif <(LEVEL) = [14]> then\n    set x to (0)\nend\n\ndefine shake (direction)\npoint in direction (direction)\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\npoint in direction (45)\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 (12)\n            change x by (7)\n        end\n        wait (0.5) seconds\n        repeat (12)\n            change x by (-7)\n        end\n        wait (0.5) seconds\n    end\nend\nif <(moving) = [2]> then\n    forever\n        turn right (2) degrees\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\nif <(moving) = [4]> then\n    forever\n        change y by (-2)\n    end\nend\n\nwhen flag clicked\nwait (0.01) seconds\nhide\nset [moving v] to [0]\nforever\n    if <(LEVEL) = [6]> then\n        switch costume to (costume1 v)\n        go to x: (-60) y: (-50)\n        set [moving v] to [1]\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [6]>>\n    end\n    if <(LEVEL) = [12]> then\n        switch costume to (costume2 v)\n        go to x: (0) y: (20)\n        set [moving v] to [2]\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [12]>>\n    end\n    if <(LEVEL) = [14]> then\n        switch costume to (costume3 v)\n        go to x: (0) y: (349)\n        set [moving v] to [4]\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [14]>>\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\nwhen I receive [reset v]\nif <<(LEVEL) = [14]> and <touching (player v)?>> then\n    go to x: (0) y: (349)\nend\n\nset x to (-60)\n\nif <(LEVEL) = [6]> then\n    set y to (-50)\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: (200) y: (-75)\n        create clone of (_myself_ v)\n        wait until <not <(LEVEL) = [7]>>\n    end\n    if <(LEVEL) = [13]> then\n        go to x: (-100) y: (60)\n        create clone of (_myself_ v)\n        go to x: (-100) y: (150)\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 [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 I start as a clone\nforever\n    if <touching (player v)?> then\n        repeat (10)\n            change [brightness v] effect by (5)\n        end\n        repeat (10)\n            change [brightness v] effect by (-5)\n        end\n        wait until <not <touching (player v)?>>\n    end\nend\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@shrink\n\nwhen I receive [reset v]\nswitch costume to (LEVEL)\nset rotation style [don't rotate v]\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 [shake v]\nshake [45]\nshake [-45]\nshake [135]\nshake [-150]\ngo to x: (0) y: (0)\n\n