The Platformer 2 

Instructions: Instructions\nSpace to start  \nArrow keys to move\nMy death record (least amount of deaths in game) 12\n123456 to switch players\n1 turns you into the red normal player\n2 turns you into the grey swift player\n3 turns you into the yellow portal player\n4 turns you into the green laser player  (GLITCH FIXED)\n5 turns you into the Dark blue bouncy player\n6 turns you into the into the lava proof diamond player\nNote: Bosses and enemies have shields and you have critical hit\nso a boss might not take damage or you may deal more  \ndamage to a boss.

@Stage\n\nwhen flag clicked\nset [ghost health v] to [1]\nhide variable [ghost health v]\nset [go v] to [0]\nset [done v] to [0]\nhide variable [level v]\nwait until <(go) = [1]>\nwait until <key (space v) pressed?>\nshow variable [level v]\nforever\n    set [level v] to ((backdrop [number v]) - (1))\nend\n\nwhen flag clicked\nstop all sounds\nforever\n    if <(Done) = [0]> then\n        play sound [Cycles- AudioNau v] until done\n    end\nend\n\nwhen flag clicked\nset [deaths v] to [0]\nset [enemy health v] to [20]\nset [health v] to [20]\nhide variable [deaths v]\nwait until <(go) = [1]>\nwait until <key (space v) pressed?>\nshow variable [deaths v]\n\nwhen I receive [battle v]\nhide variable [deaths v]\nhide variable [level v]\n\nwhen I receive [begin v]\nstop [other scripts in stage v]\nstop [this script v]\n\nwhen I receive [card game rules v]\nswitch backdrop to (battle 1 v)\nhide variable [deaths v]\nhide variable [level v]\n\nwhen I receive [card game battle v]\nshow variable [deaths v]\nshow variable [level v]\nset [ghost health v] to [5]\nshow variable [ghost health v]\n\nwhen I receive [battle 2 v]\nshow variable [deaths v]\nshow variable [level v]\nset [destroyer health v] to [10]\nshow variable [destroyer health v]\n\nwhen I receive [battle destroyer v]\nswitch backdrop to (battle 2 v)\nhide variable [deaths v]\nhide variable [level v]\n\nwhen I receive [boss v]\nswitch backdrop to (battle 3 v)\nhide variable [deaths v]\nhide variable [level v]\n\nwhen I receive [ultimate boss awesomenss fight v]\nshow variable [deaths v]\nshow variable [level v]\nset [enemy health v] to [50]\nshow variable [enemy health v]\n\n@Player\n\nwhen flag clicked\nerase all\nset [gold v] to [0]\nset [answer v] to [0]\nset [silver v] to [0]\nset [platinum v] to [0]\nset [emerald v] to [0]\nset [lapis v] to [0]\nset [obsidian v] to [0]\nhide\nswitch backdrop to (backdrop 0 v)\nset size to (200) %\nswitch costume to (costume1 v)\ngo to x: (-210) y: (0)\nset [x v] to [0]\nset [y v] to [0]\nwait until <(go) = [1]>\nwait until <key (space v) pressed?>\nswitch backdrop to (next backdrop v)\nshow\nforever\n    change [y v] by (-0.5)\n    if <key (left arrow v) pressed?> then\n        change [x v] by (-1)\n        set [direction fake v] to [-90]\n    end\n    if <key (right arrow v) pressed?> then\n        change [x v] by (1)\n        set [direction fake v] to [90]\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                        if <touching color (#000000)?> then\n                            change y by (1)\n                            if <touching color (#000000)?> then\n                                change y by (-6)\n                                change x by ((x) * (-1))\n                                if <key (up arrow v) pressed?> then\n                                    set [y v] to ((10) + (Jump higher))\n                                    if <(x) > [0]> then\n                                        set [x v] to [-10]\n                                    else\n                                        set [x v] to [10]\n                                    end\n                                else\n                                    set [x v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (y)\n    if <touching color (#000000)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-0.5)\n    if <<touching color (#000000)?> and <key (up arrow v) pressed?>> then\n        set [y v] to [8]\n    end\n    change y by (0.5)\n    if <touching color (#ffff00)?> then\n        go to x: (-190) y: (-100)\n        switch backdrop to (next backdrop v)\n    end\n    if <touching color (#ff0000)?> then\n        if <not <(costume [number v]) = [6]>> then\n            if <not <(backdrop [name v]) = [battle 2]>> then\n                broadcast (message1 v)\n            else\n                change [deaths v] by (1)\n                broadcast (ghost restart v)\n            end\n        end\n    end\nend\n\nwhen I receive [message1 v]\ngo to x: (-210) y: (-100)\nchange [deaths v] by (1)\n\nwhen flag clicked\nforever\n    if <([backdrop # v] of [_stage_ v]) > [4]> then\n        set [silver v] to [1]\n    end\n    if <([backdrop # v] of [_stage_ v]) > [9]> then\n        set [gold v] to [1]\n    end\n    if <([backdrop # v] of [_stage_ v]) > [11]> then\n        set [emerald v] to [1]\n    end\n    if <([backdrop # v] of [_stage_ v]) > [16]> then\n        set [lapis v] to [1]\n    end\n    if <([backdrop # v] of [_stage_ v]) > [37]> then\n        set [platinum v] to [1]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(costume [number v]) = [3]> or <(costume [number v]) = [6]>> then\n        if <touching color (#003fff)?> then\n            go to x: (96) y: (-101)\n        end\n    end\nend\n\nwhen flag clicked\nset [jump higher v] to [0]\nforever\n    if <key (1 v) pressed?> then\n        switch costume to (costume1 v)\n        set [jump higher v] to [0]\n    end\n    if <key (2 v) pressed?> then\n        if <(Silver) = [1]> then\n            switch costume to (costume2 v)\n            set [jump higher v] to [3]\n        end\n    end\n    if <key (3 v) pressed?> then\n        if <(Gold) = [1]> then\n            switch costume to (costume3 v)\n            set [jump higher v] to [0]\n        end\n    end\n    if <key (4 v) pressed?> then\n        if <(Emerald) = [1]> then\n            switch costume to (costume4 v)\n            set [jump higher v] to [0]\n        end\n    end\n    if <key (5 v) pressed?> then\n        if <(Lapis) = [1]> then\n            switch costume to (costume5 v)\n            set [jump higher v] to [0]\n        end\n    end\n    if <key (6 v) pressed?> then\n        if <(Platinum) = [1]> then\n            switch costume to (costume6 v)\n            set [jump higher v] to [3]\n        end\n    end\nend\n\nwhen I receive [you win v]\nhide\nstop [other scripts in sprite v]\n\nbroadcast (battle v)\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [battle ghost v]\nshow\ngo to [front v] layer\ngo to x: (85) y: (-7)\n\nwhen flag clicked\nforever\n    if <touching color (#ff9400)?> then\n        broadcast (battle ghost v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [card game battle v]\ngo to x: (-155) y: (0)\nshow\n\nwhen I receive [card game rules v]\nhide\n\nwhen flag clicked\nforever\n    if <(username) = [flealet]> then\n        if <<key (g v) pressed?> and <key (u v) pressed?>> then\n            ask [what level] and wait\n            switch backdrop to (answer)\n        end\n        if <<key (g v) pressed?> and <key (h v) pressed?>> then\n            set [ghost health v] to [0]\n        end\n        if <<key (d v) pressed?> and <key (e v) pressed?>> then\n            set [destroyer health v] to [0]\n        end\n        if <<key (h v) pressed?> and <key (i v) pressed?>> then\n            broadcast (you win v)\n            stop [all v]\n        end\n    end\nend\n\nwhen I receive [ghost restart v]\ngo to x: (-155) y: (0)\nshow\n\nwhen flag clicked\nset [clonex v] to [0]\nset [cloney v] to [0]\nforever\n    if <touching color (#001966)?> then\n        if <<(costume [number v]) = [6]> or <(costume [number v]) = [5]>> then\n            change [y v] by (12)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#663b00)?> then\n        broadcast (battle destroyer v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [battle 2 v]\ngo to x: (-155) y: (0)\nshow\n\nwhen I receive [battle destroyer v]\nshow\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <touching color (#ff00bf)?> then\n        broadcast (boss v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [boss v]\nshow\ngo to [front v] layer\ngo to x: (-155) y: (0)\n\nwhen I receive [ultimate boss awesomenss fight v]\ngo to x: (-155) y: (0)\nshow\n\nset [gold v] to [0]\n\nwhen flag clicked\nforever\n    if <key (space v) pressed?> then\n        if <<([costume # v] of [player v]) = [6]> or <([costume # v] of [player v]) = [4]>> then\n            broadcast (clone test v)\n            wait (0.95) seconds\n        end\n    end\nend\n\nset [enemy health v] to [1]\n\n@Flealet\n\nwhen flag clicked\nwait until <key (space v) pressed?>\nset [go v] to [1]\nhide\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [card game rules v]\nshow\nwait (8) seconds\nhide\nbroadcast (Card Game Battle v)\n\n@Emerald Missile\n\nwhen flag clicked\nset [direction fake v] to [90]\nhide\n\nwhen I start as a clone\ngo to x: ([x position v] of [player v]) y: ([y position v] of [player v])\nshow\nchange x by (8)\nrepeat until <<<(x position) > [239]> or <touching color (#ff0000)?>> or <<<touching (ghost fight2 v)?> or <touching (ghost fight v)?>> or <touching (nightmare fight v)?>>>\n    change x by (8)\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <touching color (#ff9400)?> then\n        delete this clone\n    end\n    if <touching (ghost fight2 v)?> then\n        change [destroyer health v] by (-1)\n        delete this clone\n    end\nend\n\nwhen I receive [clone test v]\ncreate clone of (_myself_ v)\n\n@Ghost \n\nwhen I receive [battle ghost v]\ngo to [front v] layer\ngo [backward v] (1) layers\nshow\nswitch costume to (backdrop 11 v)\nwait (1) seconds\nswitch costume to (backdrop 2 v)\nwait (2) seconds\nswitch costume to (4 v)\nwait (4) seconds\nswitch costume to (2 v)\nwait (2) seconds\nbroadcast (Card Game Rules v)\nwait (1) seconds\nhide\n\nwhen flag clicked\nhide\n\n@Ghost fight\n\nwhen flag clicked\nhide\nset size to (65) %\n\nwhen I receive [card game battle v]\nswitch costume to (2 v)\ngo to x: (265) y: (0)\nshow\nforever\n    glide (0.8) secs to x: (x position) y: (pick random (125) to (-125))\nend\n\nwhen I receive [card game battle v]\nforever\n    if <touching color (#990000)?> then\n        change [ghost health v] by (-1)\n    end\nend\n\nwhen I receive [battle v]\n\nwhen I receive [card game battle v]\nforever\n    if <(Ghost Health) < [1]> then\n        stop [other scripts in sprite v]\n        set [ghost health v] to [0]\n        say [Argh] for (1) seconds\n        switch costume to (3 v)\n        go to x: (267) y: (-115)\n        wait until <not <(backdrop [name v]) = [Battle 1]>>\n        hide\n        hide variable [ghost health v]\n        stop [this script v]\n    end\nend\n\nwhen I receive [card game battle v]\nforever\n    if <touching (player v)?> then\n        change [deaths v] by (1)\n        set [ghost health v] to [5]\n        broadcast (ghost restart v)\n    end\nend\n\nwhen I receive [card game battle v]\nforever\n    wait (pick random (1) to (5)) seconds\n    create clone of (emerald missile2 v)\nend\n\n@Emerald Missile2\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\ngo to x: ([x position v] of [ghost fight v]) y: ([y position v] of [ghost fight v])\nshow\nif <(([x position v] of [player v]) + (50)) < ([x position v] of [ghost fight v])> then\n    repeat (50)\n        change x by (-8)\n    end\n    delete this clone\nelse\n    repeat (50)\n        change x by (8)\n    end\n    delete this clone\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        change [deaths v] by (1)\n        set [ghost health v] to [5]\n        broadcast (ghost restart v)\n        delete this clone\n    end\n    if <touching color (#990000)?> then\n        delete this clone\n    end\n    if <touching color (#000000)?> then\n        delete this clone\n    end\nend\n\n@Enemy\n\nwhen flag clicked\nset size to (250) %\nhide\n\nwhen flag clicked\nforever\n    if <(backdrop [name v]) = [backdrop 13]> then\n        if <(backdrop [name v]) = [backdrop 13]> then\n            show\n            create clone of (_myself_ v)\n            hide\n            repeat until <not <(backdrop [name v]) = [backdrop 13]>>\n                go to x: (-20) y: (-36)\n                glide (1) secs to x: (-80) y: (-36)\n                glide (1) secs to x: (-20) y: (-36)\n            end\n        else\n            stop [this script v]\n        end\n    end\nend\n\nset size to (250) %\n\nwhen I start as a clone\nshow\nforever\n    go to x: ([x position v] of [enemy v]) y: ([y position v] of [enemy v])\n    if <<touching color (#990000)?> or <not <(backdrop [name v]) = [backdrop 13]>>> then\n        hide\n        delete this clone\n    end\nend\n\n@Enemy2\n\nwhen flag clicked\nset size to (250) %\nhide\n\nset size to (250) %\n\nwhen flag clicked\nforever\n    if <(backdrop [name v]) = [backdrop 14]> then\n        show\n        go to x: (139) y: (67)\n        if <touching color (#990000)?> then\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(backdrop [name v]) = [backdrop 14]>> then\n        hide\n    end\nend\n\n@Enemy3\n\nwhen flag clicked\nset size to (250) %\nhide\n\nset size to (250) %\n\nwhen flag clicked\nforever\n    if <(backdrop [name v]) = [backdrop 14]> then\n        show\n        go to x: (8) y: (46)\n        if <touching color (#990000)?> then\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(backdrop [name v]) = [backdrop 14]>> then\n        hide\n    end\nend\n\n@Enemy4\n\nwhen flag clicked\nset size to (250) %\nhide\n\nset size to (250) %\n\nwhen flag clicked\nforever\n    if <(backdrop [name v]) = [backdrop 14]> then\n        show\n        go to x: (-115) y: (-52)\n        if <touching color (#990000)?> then\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(backdrop [name v]) = [backdrop 14]>> then\n        hide\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    if <(backdrop [name v]) = [backdrop 18]> then\n        switch costume to (costume1 v)\n        show\n        if <touching (mouse-pointer v)?> then\n            if <mouse down?> then\n                next costume\n                go to [front v] layer\n                stop [all v]\n            end\n        else\n            set [color v] effect to (0)\n        end\n    else\n        hide\n    end\nend\n\n@Ghost 2\n\nwhen I receive [battle destroyer v]\ngo to [front v] layer\ngo [backward v] (1) layers\nshow\ngo to x: (0) y: (0)\nswitch costume to (backdrop3 v)\nwait (2.5) seconds\nswitch costume to (3 v)\nwait (4) seconds\nswitch costume to (2 v)\nwait (4) seconds\nbroadcast (Battle 2 v)\nwait (1) seconds\nhide\n\nwhen flag clicked\nhide\n\n@Ghost fight2\n\nwhen flag clicked\nset [destroyer health v] to [10]\nhide variable [destroyer health v]\nhide\nset size to (65) %\n\nwhen I receive [battle 2 v]\nshow variable [destroyer health v]\nswitch costume to (2 v)\ncreate clone of (_myself_ v)\ngo to x: (175) y: (0)\nshow\nforever\n    glide (0.8) secs to x: (pick random (100) to (175)) y: (pick random (125) to (-125))\nend\n\nwhen I receive [battle 2 v]\nforever\n    if <(Destroyer health) < [1]> then\n        stop [other scripts in sprite v]\n        say [Argh] for (1) seconds\n        switch costume to (3 v)\n        go to x: (277) y: (-115)\n        hide variable [destroyer health v]\n        wait until <not <(backdrop [name v]) = [Battle 2]>>\n        hide\n        hide variable [destroyer health v]\n        stop [this script v]\n    end\nend\n\nwhen I receive [battle 2 v]\nforever\n    wait (pick random (1) to (5)) seconds\n    repeat (2)\n        create clone of (emerald missile3 v)\n        wait (0.5) seconds\n    end\nend\n\nwhen I receive [battle 2 v]\nforever\n    if <touching (player v)?> then\n        change [deaths v] by (1)\n        set [destroyer health v] to [10]\n        broadcast (ghost restart v)\n    end\nend\n\nwhen I start as a clone\nforever\n    switch costume to (hit box v)\n    go to x: ([x position v] of [ghost fight2 v]) y: ([y position v] of [ghost fight2 v])\n    if <touching color (#990000)?> then\n        change [destroyer health v] by (-1)\n        loop\n        delete this clone\n    end\nend\n\ndefine loop\nwait (1) seconds\ncreate clone of (_myself_ v)\n\n@Emerald Missile3\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\ngo to x: (([x position v] of [ghost fight2 v]) + (75)) y: ([y position v] of [ghost fight2 v])\nshow\nrepeat (50)\n    change x by (-10)\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        change [deaths v] by (1)\n        set [destroyer health v] to [10]\n        broadcast (ghost restart v)\n        delete this clone\n    end\n    if <touching color (#990000)?> then\n        delete this clone\n    end\n    if <touching color (#000000)?> then\n        delete this clone\n    end\nend\n\n@Nightmare\n\nwhen I receive [boss v]\ngo to [front v] layer\ngo [backward v] (1) layers\nshow\ngo to x: (0) y: (0)\nswitch costume to (2 v)\nwait (2) seconds\nswitch costume to (3 v)\nwait (2) seconds\nswitch costume to (4 v)\nwait (2) seconds\nswitch costume to (5 v)\nwait (2) seconds\nswitch costume to (6 v)\nwait (2) seconds\nswitch costume to (7 v)\nwait (2) seconds\nbroadcast (ultimate boss awesomenss fight v)\nwait (1) seconds\nhide\n\nwhen flag clicked\nhide\n\n@Nightmare fight\n\nwhen flag clicked\nset [enemy health v] to [50]\nhide variable [enemy health v]\nhide\nset size to (35) %\n\nwhen I receive [ultimate boss awesomenss fight v]\nshow variable [enemy health v]\nswitch costume to (2 v)\ncreate clone of (_myself_ v)\ngo to x: (175) y: (0)\nshow\nforever\n    glide (0.8) secs to x: (pick random (100) to (175)) y: (pick random (125) to (-125))\nend\n\nwhen I receive [ultimate boss awesomenss fight v]\nforever\n    if <(Enemy Health) < [1]> then\n        stop [other scripts in sprite v]\n        say [Argh] for (1) seconds\n        broadcast (You win v)\n        stop [all v]\n    end\nend\n\nwhen I receive [ultimate boss awesomenss fight v]\nforever\n    if <touching (player v)?> then\n        change [deaths v] by (1)\n        set [enemy health v] to [50]\n        broadcast (ghost restart v)\n    end\nend\n\nwhen I start as a clone\nforever\n    switch costume to (hit box v)\n    go to x: ([x position v] of [nightmare fight v]) y: ([y position v] of [nightmare fight v])\n    if <touching color (#990000)?> then\n        change [enemy health v] by (-1)\n        loop\n        delete this clone\n    end\nend\n\ndefine loop\nwait (1) seconds\ncreate clone of (_myself_ v)\n\nwhen I receive [ultimate boss awesomenss fight v]\nforever\n    wait (pick random (1) to (3)) seconds\n    repeat (1)\n        create clone of (emerald missile4 v)\n        wait (0.5) seconds\n    end\nend\n\n@Emerald Missile4\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\ngo to x: (([x position v] of [nightmare fight v]) + (75)) y: ([y position v] of [nightmare fight v])\nshow\nrepeat (50)\n    change x by (-10)\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        change [deaths v] by (1)\n        set [enemy health v] to [50]\n        broadcast (ghost restart v)\n        delete this clone\n    end\n    if <touching color (#cc0000)?> then\n        delete this clone\n    end\n    if <touching color (#000000)?> then\n        delete this clone\n    end\nend\n\n@Sprite3\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\n@Sprite4\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\n@Sprite5\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\n@Sprite6\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\n@Sprite7\n\nwhen flag clicked\nhide\n\n@You Win\n\nwhen flag clicked\nhide variable [your deaths v]\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [you win v]\nhide variable [deaths v]\nhide variable [level v]\nshow\nset [your deaths v] to (Deaths)\nshow variable [your deaths v]\n\n