Journey - A Platformer XD

Instructions: PLZ STOP REMIXING!!!\n---------------------------------------------------------------------------------\nNot every hero gets to grow old\nNot every hero's story gets told.\nWhere does your journey take you?\n\n-------------------------------------------------------------------------\n\nIt's the year 4000. Earth had been laid waste by humans. You are the last person on the planet, and you have two choices. One, is to survive as best as you can. Two, is to somehow find the wormhole that led to another dimension and try to bring back life onto the barren planet. You knew very well that you might not survive the trip, and even if you do, you will be forgotten, sooner or later. Which path will you choose?\n-------------------------------------------------------------------------\nUse the arrow keys or WASD to help you on your mission, if you choose the embark on the dangerous journey, that is. Best of luck to you, young adventurer.\n-------------------------------------------------------------------------\nFor more, comment #Part2\nWhen we reach 100 loves and 100 faves, I'll add more levels.\n

@Stage\n\nwhen [space v] key pressed\nif <(username) = [FlyFree-]> then\n    change [level v] by (1)\nend\n\nwhen I receive [portal v]\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nswitch backdrop to (13 v)\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\nwhen flag clicked\nclear graphic effects\nforever\n    switch backdrop to (Level)\nend\n\nwhen flag clicked\nclear graphic effects\nforever\n    play sound [TheFatRat - Unity \(Instrumental\) v] until done\nend\n\nwhen I receive [end v]\n\n@Player\n\ndefine PlatformerPhysics (jumpheight) (gravity) (friction) (movementspeed)\nswitch costume to (hitbox v)\nchange y by (Yv)\nif <touching (ground v)?> then\n    repeat ([abs v] of (Yv) )\n        if <touching (ground v)?> then\n            change y by ((-1) * (([abs v] of (Yv) ) / (Yv)))\n        end\n    end\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <not <(Yv) > [0]>>> then\n        start sound [High Whoosh v]\n        set [yv v] to (jumpheight)\n    else\n        set [yv v] to [0]\n    end\nelse\n    change [yv v] by (gravity)\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [xv v] by (movementspeed)\n    point in direction (90)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [xv v] by ((-1) * (movementspeed))\n    point in direction (-90)\nend\nchange x by (Xv)\nif <touching (ground v)?> then\n    repeat ([abs v] of (Xv) )\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n    end\n    if <touching (ground v)?> then\n        repeat ([ceiling v] of ([abs v] of (Xv) ) )\n            if <touching (ground v)?> then\n                change x by ((-1) * (([abs v] of (Xv) ) / (Xv)))\n            end\n        end\n        set [xv v] to [0]\n    end\nend\nset [xv v] to ((Xv) * (friction))\nswitch costume to (idle v)\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n    switch costume to (WalkCycle)\nend\nif <(Yv) > [1]> then\n    switch costume to (jump v)\nend\nif <(Yv) < [-3]> then\n    switch costume to (fall v)\nend\n\nwhen flag clicked\nset rotation style [left-right v]\ngo to x: (-228) y: (-154)\nset [level v] to [1]\nforever\n    if <touching (portal v)?> then\n        repeat (50)\n            switch costume to (idle v)\n            point towards (portal v)\n            turn right (65) degrees\n            move ((distance to [portal v]) / (2)) steps\n            change size by (-1)\n            change [ghost v] effect by (2)\n        end\n        broadcast (ClosePortal v) and wait\n    end\n    if <touching (flag v)?> then\n        start sound [Ding \(CinemaSins\) - Sound Effect.mp3 v]\n        change [level v] by (1)\n        go to x: (-228) y: (-154)\n    end\n    if <touching (obstacles v)?> then\n        start sound [Bone Breaking Sound EffectNon Copyrighted Sound Effects.mp3 v]\n        go to x: (-228) y: (-154)\n    end\n    if <touching (trampoline v)?> then\n        start sound [Cartoon Sound Effect - Bounce.mp3 v]\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [yv v] to [20]\n        else\n            set [yv v] to [15]\n        end\n    end\n    PlatformerPhysics [10] [-1] [0.7] [2]\nend\n\nwhen I receive [portal v]\nset [end v] to [19]\nstop [other scripts in sprite v]\nbroadcast (Walk v)\nset size to (50) %\nclear graphic effects\ngo to x: (-228) y: (-154)\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nrepeat (25)\n    change [brightness v] effect by (4)\nend\nforever\n    if <touching (slide v)?> then\n        start sound [High Whoosh v]\n        if <([costume name v] of [slide v]) = [Left]> then\n            change [xv v] by (-20)\n        else\n            change [xv v] by (20)\n        end\n    end\n    if <touching (portal v)?> then\n        repeat (50)\n            switch costume to (idle v)\n            point towards (portal v)\n            turn right (65) degrees\n            move ((distance to [portal v]) / (2)) steps\n            change size by (-1)\n            change [ghost v] effect by (2)\n        end\n        broadcast (ClosePortal v) and wait\n    end\n    if <touching (flag v)?> then\n        start sound [Ding \(CinemaSins\) - Sound Effect.mp3 v]\n        change [level v] by (1)\n        go to x: (-228) y: (-154)\n    end\n    if <touching (obstacles v)?> then\n        start sound [Bone Breaking Sound EffectNon Copyrighted Sound Effects.mp3 v]\n        go to x: (-228) y: (-154)\n    end\n    if <touching (trampoline v)?> then\n        start sound [Slide Whistle v]\n        set [yv v] to [20]\n    end\n    if <touching (goo v)?> then\n        set [xv v] to [0]\n        set [yv v] to [0]\n    end\n    if <touching (water v)?> then\n        WaterPhysics\n    else\n        PlatformerPhysics [10] [-1] [0.7] [2]\n    end\n    if <touching (zoomin v)?> then\n        set size to (70) %\n    end\n    if <(Level) = (End)> then\n        broadcast (End v)\n    end\nend\n\ndefine WaterPhysics\nif <touching (ground v)?> then\n    repeat ([ceiling v] of ([abs v] of (Xv) ) )\n        if <touching (ground v)?> then\n            change x by ((-1) * (([abs v] of (Xv) ) / (Xv)))\n        end\n    end\n    change y by (1)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [xv v] by (-1)\n    point in direction (-90)\n    switch costume to (WalkCycle)\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [xv v] by (1)\n    point in direction (90)\n    switch costume to (WalkCycle)\nend\nif <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n    change [yv v] by (-1.5)\n    switch costume to (fall v)\nend\nif <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n    change [yv v] by (0.5)\n    switch costume to (jump v)\nend\nset [yv v] to ((Yv) * (0.8))\nchange [yv v] by (((Yv) / (15)) + (0.5))\nset [xv v] to ((Xv) * (0.7))\nchange x by (Xv)\nchange y by (Yv)\n\nwhen flag clicked\nshow\nclear graphic effects\nset size to (50) %\nset [walkcycle v] to [3]\nforever\n    change [walkcycle v] by (1)\n    if <(WalkCycle) > [6]> then\n        set [walkcycle v] to [3]\n    end\n    wait (0.05) seconds\nend\n\nwhen I receive [walk v]\nwait (1) seconds\nset size to (50) %\nset [walkcycle v] to [3]\nforever\n    change [walkcycle v] by (1)\n    if <(WalkCycle) > [6]> then\n        set [walkcycle v] to [3]\n    end\n    wait (0.05) seconds\nend\n\nwhen I receive [end v]\nhide\nbroadcast (End v) and wait\nstop [other scripts in sprite v]\nstop [all v]\n\n@Ground\n\nwhen flag clicked\nshow\nclear graphic effects\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\nwhen I receive [portal v]\nswitch costume to (12 v)\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nswitch costume to (13 v)\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\nwhen I receive [end v]\nhide\nstop [other scripts in sprite v]\n\n@Flag\n\nwhen flag clicked\nclear graphic effects\nforever\n    if <(Level) > [12]> then\n        wait (0.05) seconds\n        switch costume to (5 v)\n        wait (0.05) seconds\n        switch costume to (6 v)\n        wait (0.05) seconds\n        switch costume to (7 v)\n        wait (0.05) seconds\n        switch costume to (8 v)\n    else\n        wait (0.05) seconds\n        switch costume to (1 v)\n        wait (0.05) seconds\n        switch costume to (2 v)\n        wait (0.05) seconds\n        switch costume to (3 v)\n        wait (0.05) seconds\n        switch costume to (4 v)\n    end\nend\n\nwhen flag clicked\nshow\nforever\n    if <(Level) = [1]> then\n        go to x: (205) y: (-172)\n    end\n    if <(Level) = [2]> then\n        go to x: (205) y: (-172)\n    end\n    if <(Level) = [3]> then\n        go to x: (205) y: (-172)\n    end\n    if <(Level) = [4]> then\n        go to x: (-220) y: (-30)\n    end\n    if <(Level) = [5]> then\n        go to x: (195) y: (95)\n    end\n    if <(Level) = [6]> then\n        go to x: (207) y: (-175)\n    end\n    if <(Level) = [7]> then\n        go to x: (-5) y: (113)\n    end\n    if <(Level) = [8]> then\n        go to x: (0) y: (113)\n    end\n    if <(Level) = [9]> then\n        go to x: (100) y: (70)\n    end\n    if <(Level) = [10]> then\n        go to x: (-210) y: (110)\n    end\n    if <(Level) = [11]> then\n        go to x: (-210) y: (110)\n    end\n    if <(Level) = [12]> then\n        hide\n    else\n        show\n    end\n    if <(Level) = [13]> then\n        go to x: (205) y: (-172)\n    end\n    if <(Level) = [14]> then\n        go to x: (195) y: (-125)\n    end\n    if <(Level) = [15]> then\n        go to x: (195) y: (-125)\n    end\n    if <(Level) = [16]> then\n        go to x: (195) y: (-173)\n    end\n    if <(Level) = [17]> then\n        go to x: (195) y: (-135)\n    end\n    if <(Level) = [18]> then\n        go to x: (85) y: (-5)\n    end\nend\n\nwhen I receive [portal v]\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\nwhen I receive [end v]\nhide\nstop [other scripts in sprite v]\n\n@Trampoline\n\nwhen flag clicked\nshow\nclear graphic effects\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\n    show\nend\n\nwhen I receive [portal v]\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\nwhen I receive [end v]\nhide\nstop [other scripts in sprite v]\n\n@Portal\n\nwhen flag clicked\nclear graphic effects\nhide\nset size to (100) %\ngo to x: (0) y: (120)\nset [portal v] to [Off]\nforever\n    if <(Level) = [12]> then\n        set size to (0) %\n        show\n        if <(Portal) = [Off]> then\n            repeat (10)\n                change size by (10)\n            end\n            set [portal v] to [On]\n            start sound [Open v]\n        else\n            set size to (100) %\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [portal v]\nchange [level v] by (1)\nset [portal v] to [Off]\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\nwhen I receive [closeportal v]\nstart sound [Close v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change size by (-10)\nend\nbroadcast (Portal v)\nhide\n\n@Water\n\nwhen flag clicked\nshow\nset [ghost v] effect to (35)\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\n    go [backward v] (5) layers\nend\n\n@Grunge\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo [backward v] (50) layers\nshow\nforever\n    set [ghost v] effect to (95)\nend\n\nwhen I receive [portal v]\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\nwhen I receive [end v]\nhide\nstop [other scripts in sprite v]\n\n@Texture\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo [backward v] (100) layers\nshow\nset [brightness v] effect to (90)\nforever\n    set [ghost v] effect to (90)\nend\n\nwhen I receive [portal v]\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\nwhen I receive [end v]\nhide\nstop [other scripts in sprite v]\n\n@Bubbles\n\nwhen flag clicked\nclear graphic effects\nhide\nforever\n    create clone of (_myself_ v)\n    wait (0.15) seconds\nend\n\nwhen I start as a clone\npoint in direction (pick random (0) to (360))\ngo to (random position v)\ngo [backward v] (25) layers\nswitch costume to (pick random (1) to (3))\nset size to (pick random (300) to (500)) %\nset [ghost v] effect to (100)\nshow\nrepeat (17)\n    change [ghost v] effect by (-1)\nend\nwait (0.1) seconds\nrepeat (7)\n    change [ghost v] effect by (1)\nend\ndelete this clone\n\nwhen I receive [portal v]\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\nwhen I receive [portal v]\ndelete this clone\n\nwhen I receive [end v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@Beam\n\nwhen flag clicked\nhide\nclear graphic effects\nforever\n    create clone of (_myself_ v)\n    wait (pick random (3) to (5)) seconds\nend\n\nwhen I start as a clone\nclear graphic effects\ngo [backward v] (75) layers\nswitch costume to (pick random (1) to (3))\ngo to x: (pick random (-200) to (240)) y: (0)\nset size to (pick random (150) to (300)) %\nset [ghost v] effect to (100)\nshow\nrepeat (20)\n    change [ghost v] effect by (-1)\n    if <(costume [number v]) = [1]> then\n        move (-0.5) steps\n    end\n    if <(costume [number v]) = [2]> then\n        move (-1) steps\n    end\n    if <(costume [number v]) = [3]> then\n        move (-2) steps\n    end\nend\nrepeat until <(x position) < [-240]>\n    if <(costume [number v]) = [1]> then\n        move (-0.5) steps\n    end\n    if <(costume [number v]) = [2]> then\n        move (-1) steps\n    end\n    if <(costume [number v]) = [3]> then\n        move (-2) steps\n    end\nend\nrepeat (20)\n    change [ghost v] effect by (2)\n    if <(costume [number v]) = [1]> then\n        move (-0.5) steps\n    end\n    if <(costume [number v]) = [2]> then\n        move (-1) steps\n    end\n    if <(costume [number v]) = [3]> then\n        move (-2) steps\n    end\nend\ndelete this clone\n\nwhen I receive [portal v]\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\nwhen I receive [portal v]\ndelete this clone\n\nwhen I receive [end v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@Fog\n\nwhen flag clicked\ngo to x: (0) y: (-70)\nclear graphic effects\nset [ghost v] effect to (65)\nshow\nforever\n    if <[12] < (Level)> then\n        hide\n    else\n        switch costume to (fog v)\n        go to [back v] layer\n        change [ghost v] effect by (pick random (-5) to (5))\n        wait (pick random (3) to (5)) seconds\n    end\nend\n\nwhen I receive [end v]\nhide\nstop [other scripts in sprite v]\n\n@Slide\n\nwhen flag clicked\nclear graphic effects\nforever\n    if <[15] < (Level)> then\n        switch costume to (right v)\n        show\n        go to x: (-55) y: (-110)\n    else\n        hide\n    end\n    if <(Level) = [16]> then\n        show\n    else\n        if <(Level) = [18]> then\n            show\n            switch costume to (left v)\n            turn left (90) degrees\n        else\n            hide\n        end\n    end\nend\n\nwhen I receive [end v]\nhide\nstop [other scripts in sprite v]\n\n@Goo\n\nwhen flag clicked\nshow\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\n    set [ghost v] effect to (40)\n    go [backward v] (20) layers\nend\n\nwhen I receive [end v]\nhide\nstop [other scripts in sprite v]\n\n@ZoomIn\n\nwhen flag clicked\nforever\n    switch costume to (Level)\n    set size to (100) %\n    go to x: (0) y: (0)\n    if <([size v] of [player v]) = [70]> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [end v]\nhide\nstop [other scripts in sprite v]\n\n@Thumbnail\n\nwhen flag clicked\nswitch costume to (thumbnail v)\nshow\nwait (1) seconds\nhide\n\n