mirror - a platformer [for Scratch 2.0]
@Stage\n\nwhen I receive [3 v]\nswitch backdrop to (backdrop4 v)\n\nwhen flag clicked\nswitch backdrop to (backdrop5 v)\n\nwhen I receive [green flag v]\nswitch backdrop to (backdrop4 v)\nforever\n    play sound [PIKASONIC - Miss You v] until done\nend\n\nnext backdrop\n\n@Spikes\n\nwhen flag clicked\nshow\nswitch costume to (1 v)\nforever\n    go to [back v] layer\nend\n\nwhen I receive [levelup v]\nnext costume\n\n@Ground\n\nwhen I receive [end v]\nhide\n\nwhen flag clicked\nswitch costume to (1 v)\nhide\n\nwhen I receive [green flag v]\ngo to [front v] layer\ngo [backward v] (10) layers\nshow\nswitch costume to (1 v)\n\nswitch costume to (6 v)\n\nwhen I receive [levelup v]\nnext costume\n\n@Player\n\nwhen flag clicked\n\nwhen I start as a clone\nswitch costume to (\( .    \) v)\nset [ghost v] effect to (60)\nrepeat (4)\n    wait (0.01) seconds\n    change [ghost v] effect by (5)\n    change size by (-3)\nend\ndelete this clone\n\nwhen I receive [dead v]\nset [y v] to [12]\nset [dead? v] to [1]\nrepeat (2)\n    switch costume to (\('' \)y v)\n    wait (0.1) seconds\n    switch costume to (\('' \)r v)\n    wait (0.1) seconds\nend\nset [dead? v] to [0]\ngo to x: (-200) y: (-50)\n\nwhen I receive [levelup v]\nset [dead? v] to [0]\ngo to x: (-200) y: (-50)\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\ngo [backward v] (9) layers\nswitch costume to (\(o\) v)\nset [ghost v] effect to (0)\nshow\ngo to x: (40) y: (-50)\nset [level v] to [1]\nset [x v] to [0]\nset [y v] to [0]\npoint in direction (90)\nforever\n    change [y v] by (-1)\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        if <(dead?) = [0]> then\n            switch costume to (\(.o\) v)\n            change [x v] by (-0.8)\n        end\n    else\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            if <(dead?) = [0]> then\n                switch costume to (\(o.\) v)\n                change [x v] by (0.8)\n            end\n        else\n            if <(dead?) = [0]> then\n                switch costume to (\(o\) v)\n            end\n        end\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <<key (space v) pressed?> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n            set [y v] to [10]\n            if <([abs v] of (x) ) = (x)> then\n                set [x v] to [-5]\n            else\n                set [x v] to [5]\n            end\n        else\n            set [x v] to [0]\n        end\n    end\n    change y by (y)\n    if <touching (ground v)?> then\n        change y by ((0) - (y))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<<key (space v) pressed?> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> and <touching (ground v)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    if <(y position) > [180]> then\n        set [y v] to [0]\n    end\nend\n\nwhen flag clicked\n\nbroadcast (dead v)\n\nwhen I receive [green flag v]\nset [dead? v] to [0]\nset [level v] to [1]\nforever\n    if <<<key (b v) pressed?> or <touching (spikes v)?>> or <<touching (sprite9 v)?> or <[-175] > (y position)>>> then\n        broadcast (dead v) and wait\n    end\n    if <(x position) > [242]> then\n        if <not <([costume # v] of [ground v]) = [21]>> then\n            broadcast (levelup v)\n        end\n    end\nend\n\nwhen I receive [green flag v]\nforever\n    create clone of (_myself_ v)\n    wait (0.01) seconds\nend\n\nwhen this sprite clicked\n\nchange y by (-9999)\nif <(Level) > [2]> then\n    change [level v] by (-2)\nend\n\nwhen flag clicked\nhide\n\nchange [level v] by (1)\n\nset [level v] to [1]\n\nset [dead? v] to [0]\ngo to x: (-180) y: (-50)\n\nswitch backdrop to (backdrop1 v)\nset [hp v] to [5]\nrepeat (10)\n    set [dead? v] to [0]\nend\n\nchange [hp v] by (-1)\nif <(HP) > [0]> then\n\nchange [level v] by (1)\n\nbroadcast (green flag v)\n\nbroadcast (dead v)\n\n@Sprite1\n\nforever\n\nwhen flag clicked\n\nwhen I receive [staaaaart v]\nhide\nwait (8) seconds\nshow\ngo to [front v] layer\ngo [backward v] (2) layers\nrepeat (60)\n    next costume\n    wait (0.03) seconds\nend\nhide\n\n@Sprite2\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (5) layers\nclear graphic effects\nswitch costume to (costume2 v)\nshow\n\nwhen I receive [3 v]\ngo to [front v] layer\ngo [backward v] (1) layers\n\nwhen I receive [4 v]\ngo to [front v] layer\nset [ghost v] effect to (100)\nshow\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nwait (1) seconds\nbroadcast (green flag v)\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\nrepeat (25)\n    change [ghost v] effect by (4)\nend\nhide\n\nwhen I receive [1 v]\n\nwait (1) seconds\n\nwhen I receive [staaaaart v]\nwait (6) seconds\nhide\n\n@Sprite3\n\nwhen flag clicked\n\nwhen I receive [staaaaart v]\nwait (3) seconds\ngo to [front v] layer\nset [ghost v] effect to (100)\nshow\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nwait (1) seconds\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\n\n@sprite4\n\nwhen flag clicked\n\nforever\n\nset [dead? v] to [0]\n\nstart sound [rocket-in-flight_z1i4ba4_2 v]\n\nwhen I receive [3 v]\ngo to [front v] layer\nhide\nswitch costume to (2 v)\nset size to (50) %\nwait (1) seconds\nshow\ngo to x: (-300) y: (40)\npoint in direction (60)\nrepeat (35)\n    go to x: ((x position) + (pick random (-2) to (2))) y: ((y position) + (pick random (-2) to (2)))\n    move (10) steps\n    turn right (2) degrees\n    change size by (-1.29)\nend\nturn left (0) degrees\nswitch costume to (3 v)\ncreate clone of (_myself_ v)\nshow\nstart sound [zvuk-vzryva v]\nset size to (30) %\nswitch costume to (costume1 v)\nrepeat (7)\n    next costume\n    wait (0.08) seconds\nend\nhide\nwait (3) seconds\nbroadcast (4 v)\n\nchange [dead? v] by (1)\n\nhide\n\nwhen I receive [green flag v]\ndelete this clone\n\nwhen I receive [staaaaart v]\nhide\nset size to (90) %\npoint in direction (90)\nswitch costume to ( v)\nwait (8) seconds\nshow\nstart sound [rocket-in-flight_z1i4ba4_ v]\ngo to [front v] layer\ngo to [front v] layer\nrepeat (114)\n    go to x: (pick random (-3) to (3)) y: (pick random (-3) to (3))\nend\nbroadcast (1 v)\nhide\nrepeat (2)\n    play sound [rocket-in-flight_z1i4ba4_2 v] until done\nend\nstart sound [rocket-in-flight_z1i4ba4_3 v]\n\n@1dcda66ab2ff5f4031dc26474dc2d2cf\n\nwhen I receive [3 v]\nshow\ngo to [front v] layer\ngo [backward v] (1) layers\n\nwhen flag clicked\nhide\n\nwhen I receive [green flag v]\nhide\n\n@Sprite4\n\nwhen I receive [1 v]\nswitch costume to (costume1 v)\ngo to [front v] layer\ngo [backward v] (2) layers\nshow\nrepeat (257)\n    set [xx v] to (pick random (-1) to (1))\n    set [yy v] to (pick random (-1) to (1))\n    go to x: (xx) y: (yy)\nend\nhide\nbroadcast (3 v)\n\nwhen flag clicked\nhide\n\nforever\n\nwhen I receive [2 v]\nrepeat (48)\n    next costume\n    wait (0.001) seconds\nend\n\nforever\n\n@Sprite5\n\nwhen I receive [1 v]\nshow\nstart sound [korabl-signalizatsiya-signal-trevoga-na-bortu-sudna-26727 v]\nswitch costume to (costume1 v)\ngo to [front v] layer\nrepeat (3)\n    repeat (5)\n        change [ghost v] effect by (20)\n    end\n    repeat (5)\n        change [ghost v] effect by (-20)\n    end\n    wait (0.2) seconds\nend\nswitch costume to (costume2 v)\nrepeat (3)\n    repeat (5)\n        change [ghost v] effect by (20)\n    end\n    repeat (5)\n        change [ghost v] effect by (-20)\n    end\n    wait (0.2) seconds\nend\nswitch costume to (costume3 v)\nrepeat (3)\n    repeat (5)\n        change [ghost v] effect by (20)\n    end\n    repeat (5)\n        change [ghost v] effect by (-20)\n    end\n    wait (0.2) seconds\nend\nhide\nbroadcast (2 v)\n\nwhen flag clicked\nhide\n\nwhen I receive [1 v]\nforever\n    go to x: ((xx) + (7)) y: ((yy) + (50))\nend\n\ngo to [front v] layer\n\n@Sprite6\n\nset [ghost v] effect to (85)\n\nrepeat (10)\n\nset [ghost v] effect to (80)\n\nwhen I receive [1 v]\nshow\nset [ghost v] effect to (100)\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\nrepeat (5)\n    repeat (15)\n        change [ghost v] effect by (-1.25)\n    end\n    repeat (15)\n        change [ghost v] effect by (1.25)\n    end\nend\nhide\n\nbroadcast (1 v)\n\nbroadcast (1 v)\n\nwhen flag clicked\nhide\n\n@Sprite7\n\nwhen flag clicked\ngo to x: (0) y: (-320)\nforever\n    go to [front v] layer\n    if <(photo) = [1]> then\n        show\n        glide (0.3) secs to x: (0) y: (0)\n    else\n        glide (0.3) secs to x: (0) y: (-320)\n        hide\n    end\nend\n\n@Sprite8\n\nwhen flag clicked\ngo to [front v] layer\nset [photo v] to [0]\nforever\n    if <([costume name v] of [ground v]) = [4]> then\n        show\n        if <touching (player v)?> then\n            set [photo v] to [1]\n        else\n            set [photo v] to [0]\n        end\n    else\n        hide\n    end\nend\n\n\n\n@Sprite9\n\nwhen flag clicked\npoint in direction (90)\nhide\nwait until <([costume # v] of [ground v]) = [14]>\ngo to x: (30) y: (-110)\npoint in direction (90)\nshow\nrepeat until <not <([costume # v] of [ground v]) = [14]>>\n    repeat (80)\n        move (2) steps\n        if <not <([costume # v] of [ground v]) = [14]>> then\n            hide\n            stop [this script v]\n        end\n    end\n    turn right (180) degrees\nend\n\n@Sprite10\n\nwhen flag clicked\nforever\n    if <([costume # v] of [ground v]) = [21]> then\n        show\n    else\n        hide\n    end\nend\n\n@Sprite11\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\n@INTRO\n\nwhen I start as a clone\nif <(Clone) = [Particles]> then\n    switch costume to (pick random (29) to (31))\n    set size to (pick random (50) to (150)) %\n    set [ghost v] effect to (pick random (0.) to (5.))\n    set [brightness v] effect to (pick random (-25.) to (100.))\n    go to x: (0) y: (0)\n    point in direction (pick random (-180) to (180))\n    set [intro: x v] to (pick random (10.) to (12.))\n    set [i v] to (pick random (2.) to (9.))\n    go to [front v] layer\n    show\n    repeat until <touching (_edge_ v)?>\n        move (INTRO: X) steps\n        change y by (I)\n        change [i v] by (-0.4)\n        set [intro: x v] to ((INTRO: X) * (0.95))\n    end\n    delete this clone\nend\n\ndefine Particles\nset [clone v] to [Particles]\nrepeat (50)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(Clone) = [Name]> then\n    switch costume to (name v)\n    set size to (50) %\n    clear graphic effects\n    go to [front v] layer\n    go to x: (0) y: (-100)\n    point in direction (0)\n    show\n    repeat (50)\n        go to [front v] layer\n        change size by (((130) - (size)) / (8))\n        change y by (((0) - (y position)) / (8))\n        turn right (((90) - (direction)) / (8)) degrees\n    end\n    set [i v] to [-1]\n    repeat (10)\n        go to [front v] layer\n        change size by (I)\n        change [i v] by (join [-] (([abs v] of (I) ) / (2)))\n        turn right (I) degrees\n    end\n    switch costume to (logo v)\n    repeat (40)\n        go to [front v] layer\n        change size by (((130) - (size)) / (8))\n        turn right (((90) - (direction)) / (8)) degrees\n    end\n    set [i v] to [-1]\n    repeat (20)\n        go to [front v] layer\n        change size by ((I) / (3))\n        change [i v] by (join [-] (([abs v] of (I) ) / (4)))\n        turn right ((I) / (-3)) degrees\n    end\n    delete this clone\nend\n\nwhen flag clicked\ngo to [front v] layer\nreset timer\nhide\nstart sound [Prismo - Stronger v]\nset volume to (100) %\nclear graphic effects\nset size to (100) %\npoint in direction (90)\ngo to x: (0) y: (0)\nset [clone v] to [Square]\ncreate clone of (_myself_ v)\nwait (1) seconds\nset [clone v] to [Name]\ncreate clone of (_myself_ v)\nwait (0) seconds\nrepeat (2)\n    Spiral spline explosion\n    Particles\n    Rect\n    Spiral spline explosion\nend\nCircle\nrepeat (4)\n    Spiral spline explosion\n    Particles\n    Rect\n    Spiral spline explosion\nend\nCircle\nrepeat (2)\n    Spiral spline explosion\n    Rect\n    Spiral spline explosion\nend\nbroadcast (STAAAAART v)\n\nwhen I start as a clone\nif <(Clone) = [Square]> then\n    clear graphic effects\n    show\n    set size to (0) %\n    go to x: (0) y: (300)\n    point in direction (0)\n    switch costume to (square v)\n    repeat (20)\n        change size by (((100) - (size)) / (5))\n        turn right (((90) - (direction)) / (5)) degrees\n        change y by (((0) - (y position)) / (5))\n    end\n    point in direction (90)\n    repeat (12)\n        next costume\n    end\n    repeat (20)\n        switch costume to (blank v)\n        change size by (((2000) - (size)) / (5))\n        switch costume to (square13 v)\n    end\n    wait (3) seconds\n    repeat (20)\n        switch costume to (blank v)\n        change size by (((100) - (size)) / (5))\n        switch costume to (square13 v)\n    end\n    repeat (12)\n        switch costume to ((costume [number v]) - (1))\n        change size by (-5)\n    end\n    set [i v] to [-1]\n    repeat (20)\n        change size by ((I) / (3))\n        change [i v] by (join [-] (([abs v] of (I) ) / (4)))\n        turn right ((I) / (-3)) degrees\n        change y by ((I) / (3))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Bursts]> then\n    switch costume to (lineexplosion1 v)\n    clear graphic effects\n    go to [front v] layer\n    go [backward v] (1) layers\n    set [i v] to (pick random (1) to (3))\n    if <(I) = [1]> then\n        set [brightness v] effect to (100)\n    else\n        if <(I) = [2]> then\n            set [brightness v] effect to (25)\n        else\n            set [brightness v] effect to (-25)\n        end\n    end\n    show\n    set [i v] to [20]\n    Animate   x: [0] y: [0] size: [0] rotate: (pick random (-180) to (180)) speed: [1]\n    repeat (2)\n        set [i v] to ((I) * (0.9))\n        move (I) steps\n        Size: [100] speed: [5]\n    end\n    repeat (10)\n        set [i v] to ((I) * (0.9))\n        move (I) steps\n        Size: [100] speed: [5]\n        change [ghost v] effect by (10)\n        next costume\n    end\n    delete this clone\nend\n\ndefine Animate   x: (x) y: (y) size: (s) rotate: (r) speed: (s)\nchange x by (((round (x)) - (round (x position))) / (s))\nchange y by (((round (y)) - (round (y position))) / (s))\nchange size by (((round (s)) - (round (size))) / (s))\nturn right (((round (r)) - (round (direction))) / (s)) degrees\n\ndefine Spiral spline explosion\nset [clone v] to [Bursts]\nrepeat (5)\n    create clone of (_myself_ v)\nend\n\ndefine Size: (s) speed: (spd)\nchange size by (((round (s)) - (round (size))) / (spd))\n\ndefine Rect\nset [clone v] to [Rect]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(Clone) = [Rect]> then\n    clear graphic effects\n    show\n    set size to (0) %\n    go to (random position v)\n    point in direction (90)\n    switch costume to (background rect v)\n    repeat until <(round (size)) = [300]>\n        change size by (((300) - (size)) / (15))\n        change [ghost v] effect by (4)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Circle]> then\n    clear graphic effects\n    set [brightness v] effect to (100)\n    go to [front v] layer\n    go [backward v] (2) layers\n    show\n    set size to (0) %\n    go to x: (0) y: (0)\n    point in direction (90)\n    switch costume to (circle explosion 1 v)\n    repeat (20)\n        switch costume to (blank v)\n        change size by (((300) - (size)) / (5))\n        switch costume to (circle explosion 1 v)\n    end\n    delete this clone\nend\n\ndefine Circle\nset [clone v] to [Circle]\ncreate clone of (_myself_ v)\nwait (0.1) seconds\nset [clone v] to [Circle 2]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(Clone) = [Circle 2]> then\n    clear graphic effects\n    set [brightness v] effect to (0)\n    go to [front v] layer\n    go [backward v] (1) layers\n    show\n    set size to (0) %\n    go to x: (0) y: (0)\n    point in direction (90)\n    switch costume to (circle explosion 1 v)\n    repeat (20)\n        switch costume to (blank v)\n        change size by (((300) - (size)) / (5))\n        switch costume to (circle explosion 1 v)\n    end\n    delete this clone\nend\n\n@Sprite12\n\nwhen flag clicked\nshow\ngo to [front v] layer\ngo [backward v] (4) layers\nwait (3) seconds\nhide\n\nrepeat (10)\nend\n\n@Sprite13\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\nwait (2) seconds\nforever\n    switch costume to (reminder2 v)\n    go to x: (121) y: (-200)\n    show\n    go to [front v] layer\n    repeat (7)\n        change y by (6)\n    end\n    start sound [pop v]\n    repeat (5)\n        change y by (-3)\n    end\n    repeat (5)\n        change y by (1)\n    end\n    wait (2) seconds\n    repeat (5)\n        change y by (-7)\n    end\n    hide\n    wait (pick random (20) to (30)) seconds\nend\n\n
Same as normal, mobile friendly!\nSame on turbo!