Platformer Quest: A Vector Platformer 

Instructions: PRESS SPACE TWICE TO RESTART!!!!!\nGREEN WILL LOSE THREE LIVES AUTOMATICALLY!!!!!!!!!!\nThe laser part still needs work.\nThere are 13 levels in this game. Use the arrow keys to move. Get to yellow and avoid red. You have 30 lives. If you lose all of them, you go back to the beginning. That is how hard this is. You will need it.\n\nPress space to reload\nUp Arrow: Jump\nDown Arrow: Sink quickly in water\nRight Arrow: Move right\nLeft Arrow: Move Left

@Stage\n\nwhen I receive [start v]\nset volume to (100) %\nforever\n    play sound [Undertale OST - Megalovania v] until done\nend\n\nwhen flag clicked\nset [level v] to [0]\nhide variable [level v]\nhide variable [deaths v]\nhide variable [lives left v]\n\n@Player\n\nwhen I receive [unpause v]\nset [game v] to [1]\n\nwhen flag clicked\nforever\n    if <key (r v) pressed?> then\n        start sound [pop v]\n        set [y-velocity v] to [0]\n        go to x: (-192) y: (-104)\n        change [deaths v] by (1)\n        change [lives left v] by (-1)\n        wait until <not <key (r v) pressed?>>\n    end\nend\n\ndefine Touching Color Black <up?>\nchange [falling? v] by (1)\nrepeat until <not <touching color (#000000)?>>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    set [speed y v] to [0]\nend\n\nwhen I receive [pause v]\nset [game v] to [0]\n\nwhen I receive [start v]\npoint in direction (90)\ngo to x: (-192) y: (-104)\nshow variable [level v]\nshow variable [deaths v]\nshow variable [lives left v]\nset [# v] to [0]\nset [level v] to [0]\nset [deaths v] to [0]\nset [xvel v] to [0]\nset [y-velocity v] to [0]\nset [game v] to [1]\nset [lives left v] to [30]\n\nwhen I receive [start v]\ngo to x: (-192) y: (-129)\nsay (join (join [ Hi my name is ] (username)) [ and I want to go on an adventure!])\nwait (3) seconds\nsay []\n\nwhen flag clicked\nset size to (65) %\n\nwhen I receive [start over v]\nset [game v] to [1]\n\nwhen flag clicked\nset [speed y v] to [0]\nforever\n    if <(Attacked?) = [1]> then\nend\n\nwhen I receive [start v]\nshow variable [level v]\nshow variable [lives left v]\nshow variable [deaths v]\ngo to [front v] layer\nshow\n\nwhen flag clicked\ngo to x: (0) y: (-90)\nshow\ngo to [front v] layer\nforever\n    if <(Game) = [1]> then\n        change [y-velocity v] by (-0.5)\n        set [xvel v] to ((XVel) * (0.9))\n        if <key (right arrow v) pressed?> then\n            point in direction (26)\n            change [xvel v] by (0.7)\n        end\n        if <key (left arrow v) pressed?> then\n            point in direction (-26)\n            change [xvel v] by (-0.7)\n        end\n        if <key (space v) pressed?> then\n            show\n            set [ghost v] effect to (0)\n        end\n        change x by (XVel)\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 x by ((XVel) * (-1))\n                                change x by (-1)\n                                change y by (-5)\n                                change x by (1)\n                                if <key (up arrow v) pressed?> then\n                                    start sound [jump v]\n                                    if <(XVel) > [0]> then\n                                        set [xvel v] to [-8]\n                                    else\n                                        set [xvel v] to [8]\n                                    end\n                                    set [y-velocity v] to [10]\n                                else\n                                    set [xvel v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change y by (Y-Velocity)\n        if <touching color (#000000)?> then\n            change y by ((Y-Velocity) * (-1))\n            set [y-velocity v] to [0]\n        end\n        change y by (-1)\n        if <touching color (#000000)?> then\n            if <key (up arrow v) pressed?> then\n                start sound [jump v]\n                set [y-velocity v] to [10]\n            end\n        end\n        change y by (1)\n        if <touching color (#ffff00)?> then\n            start sound [next lvl v]\n            broadcast (next level v)\n            go to x: (-192) y: (-100)\n        end\n        if <touching color (#ff0000)?> then\n            start sound [Laser v]\n            repeat (20)\n                change [ghost v] effect by (5)\n            end\n            change [lives left v] by (-1)\n            change [deaths v] by (1)\n            set [ghost v] effect to (0)\n            go to x: (-192) y: (-129)\n        end\n        if <touching color (#ff9400)?> then\n            start sound [jump v]\n            set [y-velocity v] to [17]\n        end\n        if <touching color (#00ffff)?> then\n            if <key (up arrow v) pressed?> then\n                set [y-velocity v] to [8]\n            else\n                set [y-velocity v] to [-1.5]\n            end\n            if <key (down arrow v) pressed?> then\n                set [y-velocity v] to [-5]\n            end\n        end\n        if <touching color (#00cc44)?> then\n            start sound [pop v]\n            go to x: (-192) y: (-129)\n            change [lives left v] by (-3)\n            change [deaths v] by (3)\n        end\n        if <(Lives Left) = [0]> then\n            broadcast (defeat v)\n        end\n        if <(Level) = [13]> then\n            hide\n        end\n    end\nend\n\ndefine say (string1)\nset [say v] to []\nrepeat (length of (string1))\n    set [say v] to (join (say) (letter ((length of (say)) + (1)) of (string1)))\n    say (say)\nend\nbroadcast (message1 v) and wait\nchange [# v] by (1)\n\nwhen flag clicked\nswitch costume to (lightblock -normal v)\nset [localblinkrandom v] to [-45]\nforever\n    Blink\n    wait (2) seconds\nend\n\nwhen I receive [defeat v]\nrepeat (20)\n    change [ghost v] effect by (10)\nend\ngo to x: (-192) y: (-104)\nset [ghost v] effect to (100)\n\nwhen I receive [defeat v]\nset [game v] to [0]\n\nwhen flag clicked\nset [attacked? v] to [0]\nforever\n    if <(x position) > [235]> then\n        broadcast (message 2 v)\n    end\nend\n\nwhen flag clicked\nif <(Game) = [0]> then\n    stop [other scripts in sprite v]\n    wait until <(Game) = [1]>\nend\n\ndefine Blink\nrepeat (5)\n    next costume\nend\nrepeat (5)\n    switch costume to ((costume [number v]) - (1))\nend\n\ndefine No Stuck\nrepeat until <not <touching color (#000000)?>>\n    change y by (1)\n    set [speed y v] to [0]\nend\n\nwhen flag clicked\nforever\n    if <(Attacked?) = [1]> then\nend\n\n@Ground\n\nwhen I receive [pause v]\nif <key (p v) pressed?> then\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\nend\n\nwhen flag clicked\nswitch costume to (black v)\n\nwhen I receive [start v]\nswitch costume to (backdrop1 v)\n\nwhen I receive [next level v]\nchange [level v] by (1)\nnext costume\n\nwhen I receive [unpause v]\nrepeat (2)\n    change [ghost v] effect by (-50)\nend\n\nwhen I receive [defeat v]\nswitch costume to (game over v)\nwait until <key (space v) pressed?>\nswitch costume to (backdrop1 v)\n\nwhen flag clicked\nwait until <(Level) = [12]>\nbroadcast (laser v)\n\n@Pause\n\nwhen flag clicked\nset [ghost v] effect to (0)\nhide\nwait (2) seconds\nforever\n    if <key (p v) pressed?> then\n        if <not <(backdrop [name v]) = [10000000]>> then\n            set [game v] to [0]\n            broadcast (Pause v)\n            set [ghost v] effect to (100)\n            show\n            repeat (10)\n                change [ghost v] effect by (-10)\n            end\n            wait until <not <key (p v) pressed?>>\n            wait until <key (p v) pressed?>\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            broadcast (Unpause v)\n            hide\n            wait until <not <key (p v) pressed?>>\n        end\n    end\nend\n\n@Diagnol Lazer\n\nwhen flag clicked\nrepeat until <(Level) = [11]>\n    hide\n    go to [front v] layer\nend\nif <(Level) = [11]> then\n    show\n    repeat until <(Level) = [13]>\n        show\n        wait (2) seconds\n        hide\n        wait (2) seconds\n    end\nend\nif <(Level) = [13]> then\n    hide\nend\n\n@Diagnol Lazer2\n\nwhen flag clicked\nrepeat until <(Level) = [11]>\n    hide\n    go to [front v] layer\nend\nif <(Level) = [11]> then\n    repeat until <(Level) = [13]>\n        show\n        wait (1.5) seconds\n        hide\n        wait (1.5) seconds\n    end\nend\nif <(Level) = [13]> then\n    hide\nend\n\n@Game Over\n\nwhen flag clicked\nset [ghost v] effect to (0)\nhide\nwait (2) seconds\n\nwhen [space v] key pressed\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch backdrop to (backdrop1 v)\nset [lives left v] to [50]\nset [deaths v] to [0]\nset [level v] to [0]\nbroadcast (Start Over v)\n\nwhen I receive [defeat v]\nshow\nforever\n    if <(Lives Left) = [0]> then\n        if <not <(backdrop [name v]) = [10000000]>> then\n            set [game v] to [0]\n            broadcast (Defeat v)\n            set [ghost v] effect to (100)\n            show\n            repeat (10)\n                change [ghost v] effect by (-100)\n            end\n            repeat (10)\n                change [ghost v] effect by (100)\n            end\n            hide\n        end\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nhide\ngo to [front v] layer\ngo to x: (8) y: (-40)\nforever\n    if <(Level) = [12]> then\n        show\n        repeat until <not <color (#ff0000) is touching (#ff0000)?>>\n            change x by (6)\n        end\n        if <not <color (#ff0000) is touching (#ff0000)?>> then\n            go to x: (8) y: (-40)\n        end\n    end\nend\n\nwhen flag clicked\nhide\ngo to x: (8) y: (-40)\nforever\n    if <(Level) = [13]> then\n        hide\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nhide\ngo to [front v] layer\ngo to x: (14) y: (6)\nforever\n    if <(Level) = [12]> then\n        show\n        repeat until <touching color (#000000)?>\n            change y by (-4)\n        end\n        glide (1) secs to x: (14) y: (6)\n    end\nend\n\nwhen flag clicked\nhide\ngo to x: (14) y: (6)\nforever\n    if <(Level) = [13]> then\n        hide\n    end\nend\n\n@07245ee19e9498c9e17020ebb1b4acec\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [15]> then\n        if <not <(backdrop [name v]) = [10000000]>> then\n            show\n            broadcast (The End v)\n            set [game v] to [0]\n            set [ghost v] effect to (100)\n            show\n            repeat (10)\n                change [ghost v] effect by (-100)\n            end\n        end\n    end\nend\n\n@Dev\n\nwhen flag clicked\ngo to [front v] layer\nbroadcast (Dev v)\n\nwhen I start as a clone\nif <(Local Data) = [1]> then\n    show\n    set [ghost v] effect to (100)\n    set [local data v] to [2]\n    change x by (-41)\n    repeat (44)\n        change [ghost v] effect by (-3)\n        change x by (Local Data)\n        change [local data v] by (-0.05)\n    end\n    FadeAway\nend\nif <(Local Data) = [2]> then\n    show\n    set [ghost v] effect to (100)\n    set [local data v] to [-2]\n    change x by (42)\n    repeat (44)\n        change [ghost v] effect by (-3)\n        change x by (Local Data)\n        change [local data v] by (0.05)\n    end\n    FadeAway\nend\nif <(Local Data) = [3]> then\n    show\n    set [ghost v] effect to (100)\n    change y by (42)\n    set [local data v] to [-2]\n    repeat (44)\n        change [ghost v] effect by (-3)\n        change y by (Local Data)\n        change [local data v] by (0.05)\n    end\n    FadeAway\nend\nif <(Local Data) = [4]> then\n    show\n    set [ghost v] effect to (100)\n    change y by (-41)\n    set [local data v] to [2]\n    repeat (44)\n        change [ghost v] effect by (-3)\n        change y by (Local Data)\n        change [local data v] by (-0.05)\n    end\nend\n\ndefine 4Dir\nrepeat (4)\n    change [local data v] by (1)\n    create clone of (_myself_ v)\nend\nset [local data v] to [0]\n\ndefine FadeAway\nrepeat (10)\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\ndefine None\nrepeat (tick)\nend\n\nwhen I receive [mainmenu v]\ndelete this clone\n\nwhen I receive [dev v]\nset size to (200) %\nswitch costume to (letter1 v)\ngo to x: (-77) y: (21)\nset [local data v] to [0]\nset [local wait v] to [3]\n4Dir\nwait (Local Wait)\nchange x by (23)\nnext costume\n4Dir\nwait (Local Wait)\nchange x by (12)\nnext costume\n4Dir\nwait (Local Wait)\nchange x by (16)\nnext costume\n4Dir\nwait (Local Wait)\nchange x by (18)\nnext costume\n4Dir\nwait (Local Wait)\nchange x by (16)\nnext costume\n4Dir\nwait (Local Wait)\nchange x by (12)\nnext costume\n4Dir\nwait (Local Wait)\nchange x by (16)\nnext costume\n4Dir\nwait (Local Wait)\nchange x by (15)\nnext costume\n4Dir\nwait (Local Wait)\nchange x by (10)\nnext costume\n4Dir\nwait (Local Wait)\nchange x by (10)\nnext costume\n4Dir\nwait (Local Wait)\nchange x by (10)\nnext costume\n4Dir\nwait (Local Wait)\ngo to x: (20) y: (-10)\nset size to (100) %\nnext costume\n4Dir\nwait (Local Wait)\nchange x by (10)\nnext costume\n4Dir\nwait (Local Wait)\nchange x by (8)\nnext costume\n4Dir\nwait (Local Wait)\nchange x by (8)\nnext costume\n4Dir\nwait (Local Wait)\nchange x by (8)\nnext costume\n4Dir\nwait (Local Wait)\nchange x by (8)\nnext costume\n4Dir\nwait (Local Wait)\nchange x by (8)\nnext costume\n4Dir\nwait (Local Wait)\nchange x by (8)\nnext costume\n4Dir\nwait (Local Wait)\nwait (3) seconds\nbroadcast (FadeBlack - Fast v)\nrepeat (19)\nend\nhide\nclear graphic effects\nbroadcast (MainMenu v)\ndelete (all) of [spawn area x,y v]\ndelete (all) of [spawn type v]\ndelete this clone\n\n@GameName\n\nwhen flag clicked\nhide variable [time v]\nhide\n\nwhen I receive [enter game v]\ndelete this clone\n\nwhen I receive [gameend v]\ngo to x: (0) y: (-166)\nwait (3) seconds\nset [ghost v] effect to (100)\nswitch costume to (ct v)\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nwait (4) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nswitch costume to (ct4 v)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nwait (6) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nswitch costume to (ct2 v)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nstart sound [aplausses v]\nwait (4) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nswitch costume to (ct3 v)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\ncreate clone of (_myself_ v)\nset [time v] to (round ((Time) / (30)))\nshow variable [time v]\n\nwhen I start as a clone\nif <(costume [number v]) = [3]> then\n    wait until <not <key (space v) pressed?>>\n    wait until <key (space v) pressed?>\n    stop [other scripts in sprite v]\n    set [ghost v] effect to (0)\n    if <(Local Glide) = [1]> then\n        start sound [Click v]\n    end\n    repeat (10)\n        hide\n        wait (0) seconds\n        show\n    end\n    if <(Local Glide) = [1]> then\n        broadcast (FadeBlack v)\n        repeat (20)\n        end\n        broadcast (DeleteCC v)\n        broadcast (Enter Game v)\n    end\n    stop [this script v]\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [7]> then\n    set [ghost v] effect to (0)\n    repeat (20)\n        go to [front v] layer\n        change [ghost v] effect by (5)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [3]> then\n    show\n    forever\n        repeat (10)\n        end\n        set [ghost v] effect to (0)\n        repeat (10)\n        end\n        set [ghost v] effect to (75)\n    end\nend\ngo to [front v] layer\nset [ghost v] effect to (100)\nchange x by (-76)\nchange y by (-76)\nshow\nset [local glide v] to [8]\nrepeat (20)\n    change x by (Local Glide)\n    change y by (Local Glide)\n    change [local glide v] by (-0.4)\n    change [ghost v] effect by (-5)\n    wait (0) seconds\nend\n\nwhen [space v] key pressed\nwait (1) seconds\nbroadcast (Start v)\n\nwhen I receive [mainmenu v]\nrepeat (26)\nend\nswitch costume to (indesign1 v)\ngo to x: (-20) y: (129)\nchange x by (6)\nchange y by (-6)\nset [brightness v] effect to (-50)\ncreate clone of (_myself_ v)\nchange x by (-6)\nchange y by (6)\nclear graphic effects\ncreate clone of (_myself_ v)\nrepeat (20)\nend\ngo to x: (60) y: (81)\nswitch costume to (indesign2 v)\nchange x by (3)\nchange y by (-3)\nset [brightness v] effect to (-50)\ncreate clone of (_myself_ v)\nchange x by (-3)\nchange y by (3)\nclear graphic effects\ncreate clone of (_myself_ v)\nrepeat (35)\nend\ngo to x: (0) y: (-166)\ngo to [front v] layer\nswitch costume to (indesign3 v)\nchange x by (3)\nchange y by (-3)\nset [brightness v] effect to (-100)\nset [local glide v] to [0]\ncreate clone of (_myself_ v)\nchange x by (-3)\nchange y by (3)\nclear graphic effects\nset [local glide v] to [1]\ncreate clone of (_myself_ v)\n\n