Earth 3 I A Platformer

Instructions: Click That Green Flag 2 Times For Better Gameplay!!!!\nIf we got 10k Views and 1000 loves and favs i will do a part 4 i know its alot but i know you guys will do it also to speed it up add it to all famous studios\nParts -\nPart 1 - \nhttps://scratch.mit.edu/projects/892201456/\nPart 2 -\nhttps://scratch.mit.edu/projects/899984714/\n\nStory -\nIn part 1\n\n\nIf you want it to be more famous then add it to 5-10 studios

@Stage\n\nwhen flag clicked\nswitch backdrop to (normal v)\nforever\n    play sound [musicy v] until done\nend\n\nwhen flag clicked\nforever\n    if <([costume # v] of [g v]) > [9]> then\n        switch backdrop to (corrupted v)\n    else\n        switch backdrop to (normal v)\n    end\nend\n\n@p\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nset [lvl v] to [1]\nforever\n    if <<key (b v) pressed?> or <<touching (s2 v)?> or <touching (guards v)?>>> then\n        broadcast (die v)\n    end\n    if <(x position) > [242]> then\n        if <not <[] = [14]>> then\n            if <not <[] = [15]>> then\n                broadcast (lvl v)\n            end\n        end\n    end\n    if <(y position) < [-171]> then\n        broadcast (die v)\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nswitch costume to (r v)\nset [ghost v] effect to (0)\nshow\ngo to x: (-180) y: (-50)\nset [lvl 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?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n        change [x? v] by (-0.8)\n        if <([costume # v] of [g v]) > [9]> then\n            switch costume to (lc v)\n        else\n            switch costume to (l v)\n        end\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        if <([costume # v] of [g v]) > [9]> then\n            switch costume to (rc v)\n        else\n            switch costume to (r v)\n        end\n        change [x? v] by (0.8)\n    end\n    set [x? v] to ((x?) * (0.9))\n    change x by (x?)\n    if <touching (g v)?> then\n        change y by (1)\n    end\n    if <touching (g v)?> then\n        change y by (1)\n    end\n    if <touching (g v)?> then\n        change y by (1)\n    end\n    if <touching (g v)?> then\n        change y by (1)\n    end\n    if <touching (g 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?>>> or <<mouse down?> and <(mouse y) > (y position)>>> 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 (g 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?>>> or <<mouse down?> and <(mouse y) > (y position)>>> and <touching (g 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\nforever\n    create clone of (_myself_ v)\n    wait (0.01) seconds\nend\n\nwhen I start as a clone\nset [ghost v] effect to (70)\nrepeat (4)\n    wait (0.01) seconds\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\nwhen I receive [die v]\ngo to x: (-180) y: (-50)\n\nwhen I receive [lvl v]\nchange [lvl v] by (1)\ngo to x: (-180) y: (-50)\n\nbroadcast (lvl v)\n\n@g\n\nwhen I receive [ed v]\nhide\n\nwhen flag clicked\nshow\nswitch costume to (1 v)\ngo to x: (0) y: (0)\n\nwhen flag clicked\ngo to [front v] layer\n\nbroadcast (lvl v)\n\ngo to x: (0) y: (100)\n\nwhen I receive [lvl v]\nnext costume\n\n@s2\n\nwhen flag clicked\nshow\nswitch costume to (1 v)\nforever\n    go to [back v] layer\nend\n\nbroadcast (lvl v)\n\nwhen I receive [lvl v]\nnext costume\n\n@tn\n\nwhen flag clicked\nset [ghost v] effect to (100)\nshow\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@sb\n\nwhen flag clicked\nshow\nswitch costume to (s v)\nset [d v] to [0]\ngo to x: (-195) y: (155)\nforever\n    if <touching (mouse-pointer v)?> then\n        if <([costume # v] of [g v]) > [13]> then\n            switch costume to (s2 v)\n        else\n            if <not <(d) = [1]>> then\n                set [brightness v] effect to (30)\n                repeat until <(size) = [110]>\n                    change size by (2.5)\n                end\n                if <mouse down?> then\n                    if <not <(d) = [1]>> then\n                        if <not <(lvl) = [15]>> then\n                            broadcast (lvl v)\n                            broadcast (die v)\n                            set [d v] to [1]\n                            switch costume to (s2 v)\n                            clear graphic effects\n                            repeat until <(size) = [100]>\n                                wait (0.01) seconds\n                                change size by (-2.5)\n                            end\n                            wait (3) seconds\n                            set [d v] to [0]\n                            switch costume to (s v)\n                        end\n                    end\n                end\n            end\n        end\n    else\n        clear graphic effects\n        repeat until <(size) = [100]>\n            change size by (-2.5)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen I receive [die v]\n\nbroadcast (lvl v)\n\n@s\n\nwhen I receive [lvl v]\nnext costume\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [14]> then\n        wait (0.5) seconds\n    end\n    if <(costume [number v]) = [15]> then\n        wait (0.5) seconds\n    end\nend\n\nwhen flag clicked\nshow\nswitch costume to (1 v)\nclear graphic effects\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    set [brightness v] effect to (50)\n    set [color v] effect to ((8) * (2))\nend\n\nbroadcast (lvl v)\n\nswitch costume to ((costume [number v]) - (1))\n\n@r\n\nwhen flag clicked\nhide\ngo to x: (-6) y: (105)\n\nwhen flag clicked\nhide\ngo to [front v] layer\nforever\n    wait (pick random (15) to (20)) seconds\n    switch costume to (reminder v)\n    go to x: (0) y: (105)\n    show\n    go to [front v] layer\n    repeat (9)\n        change y by (-6)\n    end\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 (15)\n        change y by (7)\n    end\n    hide\nend\n\nswitch costume to (reminder v)\ngo to x: (0) y: (105)\nshow\ngo to [front v] layer\nrepeat (9)\n    change y by (-6)\nend\nrepeat (5)\n    change y by (3)\nend\nrepeat (5)\n    change y by (-1)\nend\nwait (2) seconds\nrepeat (15)\n    change y by (7)\nend\nhide\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nswitch costume to (reminder v)\ngo to x: (0) y: (105)\nshow\ngo to [front v] layer\nrepeat (9)\n    change y by (-6)\nend\nrepeat (5)\n    change y by (3)\nend\nrepeat (5)\n    change y by (-1)\nend\nwait (2) seconds\nrepeat (15)\n    change y by (7)\nend\nhide\n\n@Guards\n\nwhen flag clicked\nhide\nset rotation style [left-right v]\nSpawn Guard At [6]\n\ngo to x: (217) y: (-91)\n\ndefine Show Until Level is Passed (number)\nshow\nCheck1\nrepeat until <([costume # v] of [g v]) > (number)>\n    Check1\n    point in direction (-90)\n    repeat (42)\n        change x by (4)\n    end\n    point in direction (90)\n    repeat (42)\n        change x by (-4)\n    end\n    Check1\nend\nhide\n\ndefine Spawn Guard At (level)\nwait until <([costume # v] of [g v]) = (level)>\nShow Until Level is Passed (level)\n\nbroadcast (lvl v)\n\ndefine Check1\nrepeat until <([costume # v] of [g v]) > (number)>\nstop [other scripts in sprite v]\n\n@CORRUPTED\n\nwhen flag clicked\nset [ghost v] effect to (65)\nforever\n    if <([costume # v] of [g v]) > [9]> then\n        go to [front v] layer\n        show\n        set [ghost v] effect to (63)\n    else\n        hide\n    end\nend\n\nbroadcast (lvl v)\n\n