The Quest || A Mobile Scrolling Platformer (v.1.4)
@Stage\n\nwhen flag clicked\nswitch backdrop to (blackness v)\nforever\n    reset timer\nend\n\nwhen I receive [play game v]\nset volume to (100) %\nswitch backdrop to (city v)\nforever\n    play sound (pick random (1) to (11)) until done\nend\n\nwhen I receive [lab v]\nswitch backdrop to (lab v)\n\nwhen [m v] key pressed\nif <(volume) = [0]> then\n    set volume to (100) %\nelse\n    set volume to (0) %\nend\n\nwhen [x v] key pressed\nset [mouse v] to (join (mouse x) (join [, ] (mouse y)))\n\nwhen I receive [yeet v]\nswitch backdrop to (backdrop1 v)\n\n@Exit\n\nwhen I receive [play game v]\nshow\nswitch costume to (open v)\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <<(costume [name v]) = [Open]> and <touching (player v)?>> then\n    set [lab animation v] to [1]\n    hide\nend\n\nset [exit v] to [win]\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    Clone at x: [7880] y: [0]\n    show\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (closed v)\n        Clone at x: [8858] y: [0]\n        show\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [open portal v]\n\ndelete this clone\n\n@Platforms\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (costume1 1 v)\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [850] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\nelse\n    switch costume to (costume1 2 v)\n    clear graphic effects\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [700] y: [0]\n    Clone at x: [500] y: [0]\n    Clone at x: [600] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [420] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [green flag v]\ngo to [front v] layer\nshow\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [lab animation v]\nhide\n\nwhen I receive [lab v]\nshow\n\nwhen I receive [lab animation v]\nif <(LAB ANIMATION) = [1]> then\n    set [ghost v] effect to (100)\nelse\n    broadcast (Setup v) and wait\nend\n\nswitch costume to (emptiness v)\n\nwhen I receive [yeet v]\nswitch backdrop to (backdrop1 v)\nhide\nstop [all v]\n\n@Button1\n\nwhen this sprite clicked\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nset [level v] to [1]\nbroadcast (Play Game v) and wait\n\nwhen I receive [watch story v]\nhide\n\nwhen I receive [test-story v]\nshow\nclear graphic effects\ngo to x: (-122) y: (-10)\nforever\n    go to x: ((x position) + ((5) * ([sin v] of ((tick) * (10)) ))) y: (-10)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nset [ghost v] effect to (100)\nhide\n\n@ouch\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\nshow\nset [ghost v] effect to (100)\n\nwhen I receive [stop v]\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [ow v]\nif <(LAB ANIMATION) = [0]> then\n    show\n    repeat (2)\n        repeat (3)\n            change [ghost v] effect by (-20)\n        end\n        wait (0.2) seconds\n        repeat (3)\n            change [ghost v] effect by (20)\n        end\n    end\nelse\n    hide\nend\n\nwhen I receive [ow v]\nif <(LAB ANIMATION) = [0]> then\n    play sound [Alert v] until done\nend\n\nwhen I receive [yeet v]\nhide\n\n@Signs\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (costume1 v)\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [900] y: [0]\n    Clone at x: [360] y: [0]\nelse\n    switch costume to (costume1 v)\n    Clone at x: [360] y: [0]\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [green flag v]\ngo to [front v] layer\nshow\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [lab animation v]\nhide\n\nwhen I receive [lab v]\nshow\n\n@Intro\n\ndefine Intro\nstop all sounds\nstart sound [Jackpot! The fat rat2 v]\nerase all\nset pen color to (#ff9400)\nset pen size to (30)\npen up\ngo to x: (-90) y: (100)\npen down\nrepeat (20)\n    change y by (-10)\nend\npen up\ngo to x: (-90) y: (6)\npen down\nrepeat (15)\n    change x by (10)\nend\npen up\ngo to x: (60) y: (100)\npen down\nrepeat (20)\n    change y by (-10)\nend\nwait (2.5) seconds\nset pen color to (#000000)\nset pen size to (32)\npen up\ngo to x: (-90) y: (100)\npen down\nrepeat (20)\n    change y by (-10)\nend\npen up\ngo to x: (-90) y: (6)\npen down\nrepeat (15)\n    change x by (10)\nend\npen up\ngo to x: (60) y: (100)\npen down\nrepeat (20)\n    change y by (-10)\nend\nerase all\nstop all sounds\n\nwhen I receive [into v]\nIntro\nbroadcast (test-story v)\n\n@boss\n\ndefine Attack 1\nset [attack v] to [1]\nswitch costume to (boss v)\nrepeat (3)\n    switch costume to (toxin v)\n    create clone of (_myself_ v)\n    wait (0.2) seconds\nend\nrepeat (3)\n    glide (1) secs to (player v)\nend\n\ndefine Reset clones\ndelete this clone\n\n@yeet\n\nwhen flag clicked\ngo to x: (0) y: (20)\nhide\n\nwhen I receive [yeet v]\nset [yeet v] to [1]\nbroadcast (stop v)\nshow\nswitch backdrop to (tn v)\ngo to [front v] layer\npoint in direction (100)\nforever\n    repeat (4)\n        turn right (-5) degrees\n    end\n    repeat (4)\n        turn right (-2) degrees\n    end\n    repeat (4)\n        turn right (2) degrees\n    end\n    repeat (4)\n        turn right (5) degrees\n    end\n    repeat (4)\n        turn right (2) degrees\n    end\n    repeat (4)\n        turn right (-2) degrees\n    end\nend\n\n@Player\n\ndefine Say (text) (wait)\nset instrument to (20 v)\nset [letter v] to [1]\nset [print text v] to []\nrepeat (length of (text))\n    set [print text v] to (join (Print Text) (letter (letter) of (text)))\n    change [letter v] by (1)\n    wait (wait) seconds\n    play note (67) for ((2) * (0.03)) beats\n    say (Print Text)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nset [ghost v] effect to (100)\nhide\n\ndefine Game On\nset [x v] to [0]\nset [y v] to [0]\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset [lab v] to [off]\nset [lab animation v] to [0]\ngo to [front v] layer\nswitch costume to (costume1 v)\nset size to (100) %\nset [ghost v] effect to (0)\npoint in direction (90)\nshow\n\ndefine Tick\nif <<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    change [sx v] by (2)\n    point in direction (90)\nend\nif <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    change [sx v] by (-2)\n    point in direction (-90)\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    Change Player X By (round (sx))\nend\nif <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <(mouse y) > [50]>>> then\n    if <(in air) < [4]> then\n        set [sy v] to [16]\n    end\nend\nif <(sy) > [-20]> then\n    change [sy v] by (-2)\nend\nChange Player Y By (sy)\nTest - Die\nset [scroll x v] to (x)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\nif <touching (bouncepad v)?> then\n    if <key (up arrow v) pressed?> then\n        set [sy v] to [25]\n    else\n        set [sy v] to [19]\n    end\nend\n\ndefine Change Player Y By (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (platforms v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\nwhen I receive [play game v]\nset rotation style [left-right v]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Game On\n    repeat until <(EXIT) > []>\n        Tick\n        broadcast (Tick v) and wait\n    end\n    if <(EXIT) = [win]> then\n        Game - Win\n    else\n        Game - Die\n    end\nend\n\ndefine Game - Win\nrepeat (50)\n    point towards (exit v)\n    turn right (65) degrees\n    move ((distance to [exit v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nhide\nwait (1) seconds\n\ndefine Game - Die\nswitch costume to (costume1 v)\nset [exit v] to [die]\nbroadcast (ow v)\nSay [Ow!] [0]\nrepeat (5)\n    hide\n    wait (0.1) seconds\n    show\n    wait (0.1) seconds\nend\nhide\nwait (0.5) seconds\npoint in direction (90)\nsay []\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine Change Player X By (sx)\nchange [x v] by (sx)\nPosition\nif <touching (platforms v)?> then\n    repeat (8)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <(LEVEL) = [2]> then\n        if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <(mouse y) > [50]>>> then\n            if <(sx) > [0]> then\n                set [sx v] to [-16]\n            else\n                set [sx v] to [16]\n            end\n            set [in air v] to [0]\n        else\n            set [sx v] to [0]\n        end\n    end\n    repeat until <not <touching (platforms v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Test - Die\nif <<touching (danger v)?> or <touching (laserbeam v)?>> then\n    set [exit v] to [die]\nend\n\nwhen I receive [play game v]\nforever\n    set [position v] to (join ((x) + (SCROLL X)) (join [ , ] ((y) + (SCROLL Y))))\nend\n\nwhen I receive [lab animation v]\nset [ghost v] effect to (100)\nwait until <(LAB) = [on]>\n\nwhen I receive [play game v]\nforever\n    wait (pick random (3) to (5)) seconds\n    repeat (8)\n        next costume\n        wait (0.07) seconds\n    end\n    switch costume to (costume1 v)\nend\n\nwhen I receive [play game v]\nforever\n    if <(LEVEL) = [1]> then\n        if <<(POSITION) = [7886 , -154]> or <(POSITION) = [7888  , -154]>> then\n            broadcast (Lab Animation v)\n            set [lab animation v] to [1]\n        end\n    else\n        if <(LEVEL) = [2]> then\n            if <(POSITION) = [8858 , -149]> then\n                set [yeet v] to [1]\n                broadcast (yeet v)\n            end\n        end\n    end\nend\n\nwhen I receive [yeet v]\nhide variable [time-show v]\nhide\n\nbroadcast (Lab v)\n\n@BouncePad\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\nforever\n    show\n    go to [front v] layer\n    go [backward v] (1) layers\n    switch costume to (LEVEL)\nend\n\nwhen I receive [stop v]\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (costume1 v)\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\nelse\n    switch costume to (costume1 2 v)\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [700] y: [0]\n    Clone at x: [500] y: [0]\n    Clone at x: [600] y: [0]\n    Clone at x: [360] y: [0]\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [lab animation v]\nhide\n\nwhen I receive [lab v]\nshow\n\nwhen I receive [yeet v]\nhide\n\n@Thumbnail\n\nwhen flag clicked\nset [level v] to [1]\nset [yeet v] to [0]\nhide variable [time-show v]\ngo to [front v] layer\nshow\nset [ghost v] effect to (0)\nwait (1) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\n    wait (0.05) seconds\nend\nhide\nclear graphic effects\nbroadcast (into v)\nforever\n    change [tick v] by (1)\nend\n\nwhen [timer v] > (0.001)\nif <(YEET) = [0]> then\n    broadcast (stop v)\n    hide variable [time-show v]\n    switch costume to (costume1 v)\n    go to x: (0) y: (345)\n    show\n    glide (0.3) secs to x: (0) y: (0)\n    stop [all v]\nend\n\n@story\n\nwhen I receive [test-story v]\nset [slide v] to [0]\nswitch costume to (costume1 v)\ngo to x: (-14) y: (-5)\nshow\nforever\n    go to x: (x position) y: ((y position) + ((4) * ([sin v] of ((tick) * (10)) )))\nend\n\nwhen I receive [play game v]\nhide\n\nwhen I receive [watch story v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\n    wait (0.05) seconds\nend\nnext costume\ngo to x: (0) y: (0)\nrepeat (10)\n    change [ghost v] effect by (-10)\n    wait (0.05) seconds\nend\nswitch costume to (costume2 v)\nbroadcast (WATCH STORY FOR REAL v)\n\nwhen I receive [watch story for real v]\nforever\n    if <<key (space v) pressed?> or <mouse down?>> then\n        repeat (10)\n            change [ghost v] effect by (10)\n            wait (0.05) seconds\n        end\n        next costume\n        change [slide v] by (1)\n        repeat (10)\n            change [ghost v] effect by (-10)\n            wait (0.05) seconds\n        end\n    end\nend\n\nwhen I receive [watch story for real v]\nforever\n    if <<(slide) = [12]> or <(slide) > [12]>> then\n        stop [other scripts in sprite v]\n        broadcast (Play Game v)\n        stop [this script v]\n    end\nend\n\nstop [this script v]\n\nwhen I receive [stop v]\nset [ghost v] effect to (100)\nhide\n\nset [color v] effect to (0)\n\nwhen flag clicked\nhide\n\n@danger\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (l1 1 v)\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\nelse\n    switch costume to (l1 2 v)\nend\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [green flag v]\nshow\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\nshow\ngo to [front v] layer\ngo [backward v] (1) layers\n\nwhen I receive [stop v]\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [lab animation v]\nhide\n\nwhen I receive [play game v]\nshow\n\nwhen I receive [yeet v]\nhide\n\n@Talk\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (costume1 v)\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [900] y: [0]\n    Clone at x: [360] y: [0]\nelse\n    switch costume to (costume10 v)\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [lab animation v]\nhide\n\nwhen I receive [lab v]\nshow\n\n@timer\n\nwhen flag clicked\nhide variable [time-show v]\nhide\n\nwhen I receive [play game v]\nset [time v] to [200]\nshow variable [time-show v]\nrepeat until <<(Time) = [0]> or <(Time) < [1]>>\n    set [time-show v] to (join [Time:] (join [ ] (Time)))\n    change [time v] by (-1)\n    wait (1) seconds\nend\nif <<(Time) = [0]> or <(Time) < [1]>> then\n    broadcast (fail v)\n    stop [all v]\nend\n\nwhen I receive [stop v]\nset [ghost v] effect to (100)\nhide\n\n@Animation\n\nwhen I receive [lab animation v]\nshow\ngo to [front v] layer\nrepeat until <(costume [number v]) = [16]>\n    next costume\n    wait (0.03) seconds\nend\nhide\nset [level v] to [2]\nset [lab animation v] to [0]\nset [lab v] to [on]\nbroadcast (Lab v) and wait\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\n@Button2\n\nwhen I receive [test-story v]\nclear graphic effects\ngo to x: (81) y: (-10)\nshow\nforever\n    go to x: ((x position) + ((5) * ([sin v] of ((tick) * (10)) ))) y: (-10)\nend\n\nwhen this sprite clicked\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nbroadcast (watch story v)\n\nwhen I receive [play game v]\nhide\n\nwhen flag clicked\nhide\n\nwhen flag clicked\n\nwhen I receive [stop v]\nset [ghost v] effect to (100)\nhide\n\n@Blank\n\n
[WARNING]: ADVERTISEMENTS/SPAMS WILL BE REMOVED!\n\nArrow keys/WAD keys/ Mobile controls to move\nAvoid danger / falling off the ledge\nThe rest of the instructions are in-game\nPlay in fullscreen otherwise it won't work\n\nCheck out my pen platformer too!\nAnd help me get this remixed!\n\nSTOP SPAMMING ME WITH LAB NOT WORKING! READ THE FAQ AT THE END OF THE NOTES AND CREDITS AND PLAY IN FULLSCREEN!\n\n\n\nTOP LOVED ON 02/11/19 !! A BIG THANK YOU TO EVERYONE WHO LOVED/FAVED MY PROJECT!\n\nPlease give feedback (except for the lab being broken)