|| Mouse || A Platformer ||
@Stage\n\nwhen flag clicked\nswitch backdrop to (black v)\nset [player_status v] to [Trash]\n\nwhen I receive [>>>messages v]\nset [player_status v] to [Messages]\n\nwhen I receive [>>>zoom v]\nset [player_status v] to [Zoom]\n\nwhen I receive [>>>chrome v]\nset [player_status v] to [Chrome]\n\nwhen I receive [gmail v]\nset [player_status v] to [Gmail]\n\nwhen I receive [>>>coolmathgames v]\nset [player_status v] to [CoolMathGames]\n\nwhen I receive [>>>scratch v]\nset [player_status v] to [Scratch]\n\nwhen I receive [>>>settings v]\nset [player_status v] to [Settings]\n\nwhen flag clicked\n\nset volume to (100) %\n\n@Player\n\nwhen flag clicked\nset [game on? v] to [Off]\nhide\n\ndefine walk (steps)\nchange x by (X)\nset [ground lift v] to [0]\nrepeat until <<not <touching (not scrolling level v)?>> or <(Ground Lift) = [8]>>\n    change y by (1)\n    change [ground lift v] by (1)\nend\nif <(Ground Lift) = [8]> then\n    change x by ((-1) * (steps))\n    change y by (-8)\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            set [x v] to [8]\n            set [y v] to [10]\n        end\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            set [x v] to [-8]\n            set [y v] to [10]\n        end\n    end\nend\n\ndefine Controls Left Right\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [x v] by (-1.5)\n    if <(X) < [-7]> then\n        set [x v] to [-7]\n    end\n    set [player_direction v] to [Left]\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [x v] by (1.5)\n    if <(X) > [7]> then\n        set [x v] to [7]\n    end\n    set [player_direction v] to [Right]\nend\n\ndefine handle ground <moving up>\nrepeat until <<not <touching (not scrolling level v)?>> and <not <touching (shield v)?>>>\n    if <moving up> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [in air v] to [0]\n    end\n    set [y v] to [0]\nend\n\ndefine Check Surroundings (Trash)\nif <(x position) > [240]> then\n    broadcast (Level Up! v) and wait\nend\nif <touching color (#590093)?> then\n    set [y v] to [21]\n    start sound [Big Boing v]\nend\nif <touching color (#930000)?> then\n    start sound [Crunch v]\n    repeat (20)\n        change [pixelate v] effect by (5)\n        change [ghost v] effect by (5)\n    end\n    hide\n    clear graphic effects\n    set [ghost v] effect to (100)\n    point in direction (90)\n    go to x: (-200) y: (-90)\n    show\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    set [x v] to [0]\n    set [y v] to [0]\nend\nif <touching (portal v)?> then\n    repeat (50)\n        go to [front v] layer\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    hide\n    broadcast (>>>Messages v)\nend\n\nwhen I receive [level up! v]\nwait (0.75) seconds\npoint in direction (90)\nshow\nif <(Player_Status) = [Scratch]> then\n    go to x: (-200) y: (-70)\nelse\n    go to x: (-200) y: (-90)\nend\nset size to (75) %\nset [x v] to [0]\nset [y v] to [0]\nchange [level v] by (1)\nwait (1) seconds\n\nwhen I receive [trash v]\nshow\nset size to (80) %\nswitch backdrop to (black v)\ngo to [front v] layer\ngo [backward v] (3) layers\nset [ghost v] effect to (0)\nset rotation style [all around v]\ngo to x: (-200) y: (-90)\npoint in direction (90)\nset [player_direction v] to [Right]\nset [y v] to [0]\nset [x v] to [0]\nset [level v] to [1]\nbroadcast (Start Player v)\n\nwhen I receive [start player v]\nforever\n    if <(Game On?) = [On]> then\n        Controls Left Right\n        set [x v] to ((0.9) * (X))\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(In Air) < [8]>> then\n            set [y v] to [10]\n        end\n        walk (X)\n        change [y v] by (-1)\n        change y by (Y)\n        change [in air v] by (1)\n        handle ground <(Y) > [0]>\n    end\n    if <(Player_Status) = [Trash]> then\n        Check Surroundings (Trash)\n    end\n    if <(Player_Status) = [Zoom]> then\n        Check Surroundings (Zoom)\n    end\n    if <(Player_Status) = [Scratch]> then\n        Check Surroundings (Scratch)\n    end\nend\n\nwhen I receive [messages v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [zoom v]\nshow\nset size to (80) %\nswitch backdrop to (black v)\ngo to [front v] layer\ngo [backward v] (2) layers\nset [ghost v] effect to (0)\nset rotation style [all around v]\ngo to x: (-200) y: (-90)\npoint in direction (90)\nset [player_direction v] to [Right]\nset [y v] to [0]\nset [x v] to [0]\nset [level v] to [11]\nset [>>>zoom spawn point v] to [-200]\nbroadcast (Start Player v)\n\ndefine Check Surroundings (Zoom)\nif <(>>>Zoom Spawn Point) > [0]> then\n    if <(x position) < [-240]> then\n        go to x: (>>>Zoom Spawn Point) y: (162)\n        change [level v] by (-1)\n    end\nelse\n    if <(x position) > [240]> then\n        broadcast (Level Up! v) and wait\n    end\nend\nif <touching color (#00aa52)?> then\n    set [y v] to [21]\n    start sound [Big Boing v]\nend\nif <<<touching color (#b50000)?> or <touching color (#cc0000)?>> or <<touching color (#e30000)?> or <<touching color (#ff0000)?> or <<touching color (#c40000)?> or <touching color (#ad0000)?>>>>> then\n    start sound [Crunch v]\n    repeat (20)\n        change [pixelate v] effect by (5)\n        change [ghost v] effect by (5)\n    end\n    hide\n    clear graphic effects\n    set [ghost v] effect to (100)\n    point in direction (90)\n    if <(>>>Zoom Spawn Point) > [0]> then\n        go to x: (>>>Zoom Spawn Point) y: (162)\n    else\n        go to x: (>>>Zoom Spawn Point) y: (-90)\n    end\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    set [x v] to [0]\n    set [y v] to [0]\n    show\nend\nif <touching (portal v)?> then\n    repeat (50)\n        go to [front v] layer\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    hide\n    broadcast (>>>Chrome v)\nend\n\nwhen I receive [chrome v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [>>>chrome v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [>>>gmail v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [scratch v]\nshow\nset size to (80) %\nswitch backdrop to (black v)\ngo to [front v] layer\ngo [backward v] (3) layers\nset [ghost v] effect to (0)\nset rotation style [all around v]\ngo to x: (-200) y: (-90)\npoint in direction (90)\nset [player_direction v] to [Right]\nset [y v] to [0]\nset [x v] to [0]\nset [level v] to [18]\nbroadcast (Start Player v)\n\ndefine Check Surroundings (Scratch)\nif <(x position) > [240]> then\n    broadcast (Level Up! v) and wait\nend\nif <touching color (#590093)?> then\n    set [y v] to [21]\nend\nif <(y position) < [-170]> then\n    repeat (20)\n        change [pixelate v] effect by (5)\n        change [ghost v] effect by (5)\n    end\n    hide\n    clear graphic effects\n    set [ghost v] effect to (100)\n    point in direction (90)\n    go to x: (-200) y: (-70)\n    show\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    set [x v] to [0]\n    set [y v] to [0]\nend\n\nwhen I receive [settings v]\nstop [other scripts in sprite v]\nhide\n\n@Not Scrolling Level\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [trash v]\nwait (1) seconds\nshow\ngo to [front v] layer\ngo [backward v] (2) layers\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [messages v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [zoom v]\nshow\ngo to [front v] layer\ngo [backward v] (3) layers\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [chrome v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [>>>chrome v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [>>>gmail v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [scratch v]\nshow\ngo to [front v] layer\ngo [backward v] (3) layers\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [settings v]\nstop [other scripts in sprite v]\nhide\n\n@Obstacles (Trash)\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [trash v]\nwait (1) seconds\nshow\ngo to [back v] layer\ngo [forward v] (2) layers\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [messages v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [chrome v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [zoom v]\nshow\ngo to [back v] layer\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [>>>chrome v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [>>>gmail v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [scratch v]\nshow\ngo to [back v] layer\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [settings v]\nstop [other scripts in sprite v]\nhide\n\n@Fog\n\nwhen flag clicked\nhide\nset [ghost v] effect to (75)\n\nwhen I receive [trash v]\ngo to x: (0) y: (0)\nshow\ngo to [front v] layer\ngo [backward v] (2) layers\n\nwhen I receive [messages v]\nstop [other scripts in sprite v]\nhide\n\n@Light\n\nwhen flag clicked\nhide\n\nwhen I receive [messages v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [trash v]\nforever\n    show\n    go to [back v] layer\n    go [forward v] (1) layers\n    go to (player v)\nend\n\n@Transition\n\ndefine Smooth Glide x: (x) y: (y) speed: (speed)\nrepeat until <<(round (x position)) = (round (x))> and <(round (y position)) = (round (y))>>\n    change x by (((round (x)) - (round (x position))) / (speed))\n    change y by (((round (y)) - (round (y position))) / (speed))\n    change [ghost v] effect by (-10)\nend\ngo to x: (x) y: (y)\n\nwhen I receive [>>>trash v]\nstart sound [Boom Cloud v]\nswitch costume to (trash v)\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nbroadcast (Trash v)\nwait (1) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [level up! v]\nClone\n\nwhen I start as a clone\nstart sound [High Whoosh v]\ngo to [front v] layer\nset [ghost v] effect to (100)\nshow\nset size to (100) %\nif <((costume [number v]) mod (2)) = [0]> then\n    go to x: (-300) y: (0)\nelse\n    go to x: (300) y: (0)\nend\nSmooth Glide x: (0) y: (0) speed: (7)\nstart sound [Low Whoosh v]\nrepeat (20)\n    change size by (-5)\n    change [ghost v] effect by (5)\n    if <((costume [number v]) mod (2)) = [0]> then\n        change x by (-15)\n    else\n        change x by (15)\n    end\nend\ndelete this clone\n\ndefine Clone\nhide\nswitch costume to (level 1 v)\nrepeat (4)\n    create clone of (_myself_ v)\n    next costume\nend\n\nwhen I receive [>>>messages v]\nstart sound [Low Whoosh v]\nswitch costume to (messages v)\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nbroadcast (Messages v)\nwait (1) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [>>>zoom v]\nstart sound [Low Whoosh v]\nswitch costume to (zoom v)\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nbroadcast (Zoom v)\nwait (1) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [lose v]\nstart sound [Low Whoosh v]\nswitch costume to (lose v)\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nrepeat (5)\n    change [ghost v] effect by (-20)\nend\nwait (1) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\nbroadcast (>>>Zoom v)\n\nwhen I receive [>>>chrome v]\nstart sound [Low Whoosh v]\nswitch costume to (chrome v)\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nbroadcast (Chrome v)\nwait (1) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [>>>gmail v]\nstart sound [Low Whoosh v]\nswitch costume to (gmail v)\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nbroadcast (Gmail v)\nwait (1) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [>>>coolmathgames v]\nstart sound [Low Whoosh v]\nswitch costume to (coolmathgames v)\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nbroadcast (CoolMathGames v)\nwait (1) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [>>>scratch v]\nstart sound [Low Whoosh v]\nswitch costume to (scratch v)\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nbroadcast (Scratch v)\nwait (1) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [>>> duolingo v]\nstart sound [Low Whoosh v]\nswitch costume to (duolingo v)\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nbroadcast (Duolingo v)\nwait (1) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [>>>settings v]\nstart sound [Low Whoosh v]\nswitch costume to (system preferences v)\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nbroadcast (Settings v)\nwait (1) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\n@text\n\ndefine type (text) at x: (x) y: (y) size: (size) brightness: (brightness)\nset [volume v] to [25]\nclear graphic effects\nswitch costume to (trash v)\nset y to (-130)\nset x to (0)\nset size to (50) %\nshow\ngo to [front v] layer\nrepeat (20)\n    change size by (((225) - (size)) / (4))\nend\nset [text # v] to [0]\nset [text brightness v] to (brightness)\nset [text x v] to (x)\nset [text y v] to (y)\nset [text spacing x v] to ((size) / (13))\nset [text spacing y v] to ((size) / (11))\nrepeat (length of (text))\n    change [text # v] by (1)\n    if <(letter (TEXT #) of (text)) > []> then\n        set [text letter v] to (letter (TEXT #) of (text))\n    else\n        set [text letter v] to []\n    end\n    create clone of (_myself_ v)\n    if <((TEXT #) mod (2)) = [0]> then\nend\nset [text # v] to [0]\nrepeat until <<key (e v) pressed?> or <key (space v) pressed?>>\n    go to [front v] layer\n    broadcast (gf v)\nend\nwait until <not <<key (e v) pressed?> or <key (space v) pressed?>>>\nbroadcast (Clear v) and wait\nhide\n\nwhen I receive [clear v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\ndelete this clone\n\nwhen I start as a clone\nset x to (TEXT X)\nset y to (TEXT Y)\nset size to (50) %\nset [brightness v] effect to (TEXT Brightness)\nswitch costume to (TEXT Letter)\nif <(costume [number v]) = [55]> then\n    switch costume to ( v)\n    delete this clone\nend\nchange x by (-42)\nchange y by (22)\nset [text org. x v] to (x position)\nclone setup\nshow\ngo to [front v] layer\nif <(costume [name v]) = [Trash]> then\n    delete this clone\nend\n\ndefine clone setup\nrepeat (TEXT #)\n    change x by (TEXT Spacing X)\n    if <(x position) > [190]> then\n        set x to ((TEXT Org. X) + (TEXT Spacing X))\n        change y by ((0) - (TEXT Spacing Y))\n    end\nend\ngo to [front v] layer\n\ndefine render (text) at x: (x) y: (y) brightness: (brightness) size: (size)\nclear graphic effects\nswitch costume to ( v)\nset y to (x)\nset x to (y)\nset size to (50) %\nshow\ngo to [front v] layer\nset size to (300) %\nset [text # v] to [0]\nset [text brightness v] to (brightness)\nset [text x v] to (x)\nset [text y v] to (y)\nset [text spacing x v] to ((size) / (17))\nset [text spacing y v] to ((size) / (11))\nrepeat (length of (text))\n    change [text # v] by (1)\n    if <(letter (TEXT #) of (text)) > []> then\n        set [text letter v] to (letter (TEXT #) of (text))\n    else\n        set [text letter v] to []\n    end\n    create clone of (_myself_ v)\nend\nset [text # v] to [0]\n\nwhen I receive [gf v]\ngo to [front v] layer\n\nwhen I receive [tick v]\ngo to [front v] layer\n\nwhen flag clicked\nhide\n\nwhen I receive [trash v]\nwait (1.5) seconds\nset [game on? v] to [Off]\ntype [hello and welcome to the   trash, the land of unwantedthings.       press space] at x: [-170] y: [-135] size: [190] brightness: [100]\ntype [your only hope of getting  out is finding a way to    pass the dangers.] at x: [-170] y: [-135] size: [190] brightness: [100]\ntype [good luck!] at x: [-170] y: [-152] size: [190] brightness: [100]\nset [game on? v] to [On]\nset [volume v] to [50]\n\nwhen I receive [level up! v]\nwait (0.8) seconds\nwait (1) seconds\nif <(Level) = [2]> then\n    set [game on? v] to [Off]\n    type [ugh, the graphics are      terrible down here. ] at x: [-170] y: [-145] size: [190] brightness: [100]\n    type [oh! by the way, avoid red. ] at x: [-170] y: [-152] size: [190] brightness: [100]\n    set [game on? v] to [On]\nend\nif <(Level) = [3]> then\n    set [game on? v] to [Off]\n    type [purple is bouncy!] at x: [-170] y: [-152] size: [190] brightness: [100]\n    set [game on? v] to [On]\nend\nif <(Level) = [6]> then\n    set [game on? v] to [Off]\n    type [oh no! we have reached deadmeme land!] at x: [-170] y: [-145] size: [190] brightness: [100]\n    set [game on? v] to [On]\nend\nif <(Level) = [9]> then\n    set [game on? v] to [Off]\n    type [aaaaaaaaahhhhhh!!!!!] at x: [-170] y: [-152] size: [190] brightness: [100]\n    set [game on? v] to [On]\nend\nif <(Level) = [10]> then\n    set [game on? v] to [Off]\n    type [a portal! jump into it!] at x: [-170] y: [-152] size: [190] brightness: [100]\n    set [game on? v] to [On]\nend\nif <(Level) = [17]> then\n    set [game on? v] to [Off]\n    type [aaaaahhh!] at x: [-170] y: [-152] size: [190] brightness: [100]\n    type [this is the head of glitch detection!] at x: [-170] y: [-145] size: [190] brightness: [100]\n    type [run back!] at x: [-170] y: [-152] size: [190] brightness: [100]\n    type [you have 60 seconds.] at x: [-170] y: [-152] size: [190] brightness: [100]\n    type [go!!!] at x: [-170] y: [-152] size: [190] brightness: [100]\n    set [>>>zoom spawn point v] to [200]\n    set [game on? v] to [On]\nend\nif <(Level) = [20]> then\n    set [game on? v] to [Off]\n    type [? no katana? that is       weird...] at x: [-170] y: [-145] size: [190] brightness: [100]\n    set [game on? v] to [On]\nend\nif <(Level) = [21]> then\n    set [game on? v] to [Off]\n    type [no enemies? did 0014049    change it?] at x: [-170] y: [-145] size: [190] brightness: [100]\n    set [game on? v] to [On]\nend\nif <(Level) = [22]> then\n    set [game on? v] to [Off]\n    type [oh no!] at x: [-170] y: [-152] size: [190] brightness: [100]\n    type [the computer is            malfunctioning!] at x: [-170] y: [-145] size: [190] brightness: [100]\n    type [it must be the new update.] at x: [-170] y: [-152] size: [190] brightness: [100]\n    type [go to settings and change  it!] at x: [-170] y: [-145] size: [190] brightness: [100]\n    broadcast (>>>Settings v)\nend\nset [volume v] to [50]\n\nwhen I receive [messages v]\nwait (1.5) seconds\nset [game on? v] to [Off]\ntype [woohoo! we made it out of  the trash!] at x: [-170] y: [-145] size: [190] brightness: [100]\ntype [but we are still not safe  yet...] at x: [-170] y: [-145] size: [190] brightness: [100]\ntype [that update you installed  upgraded the glitch        detection on this computer!] at x: [-170] y: [-135] size: [190] brightness: [100]\ntype [so, stay away from red     boxes as much as possible.] at x: [-170] y: [-145] size: [190] brightness: [100]\ntype [and also...] at x: [-170] y: [-152] size: [190] brightness: [100]\ntype [if you are having trouble  getting up the messages...] at x: [-170] y: [-145] size: [190] brightness: [100]\ntype [try bouncing off the walls!] at x: [-170] y: [-152] size: [190] brightness: [100]\nset [game on? v] to [On]\nset [volume v] to [50]\n\nwhen I receive [zoom v]\nwait (1.5) seconds\nset [game on? v] to [Off]\ntype [welcome to zoom!] at x: [-170] y: [-152] size: [190] brightness: [100]\nset [game on? v] to [On]\nset [volume v] to [50]\n\nwhen I receive [gmail v]\nwait (1.5) seconds\nset [game on? v] to [Off]\ntype [welcome to gmail!] at x: [-170] y: [-152] size: [190] brightness: [100]\ntype [get all the stars to unlockthe portal. ] at x: [-170] y: [-145] size: [190] brightness: [100]\nset [game on? v] to [On]\nset [volume v] to [50]\n\nwhen I receive [coolmathgames v]\nset [game on? v] to [Off]\nwait (1.5) seconds\ntype [welcome to corona clicker!] at x: [-170] y: [-152] size: [190] brightness: [100]\ntype [get 5,000 antibodies to    move on. ] at x: [-170] y: [-145] size: [190] brightness: [100]\nset [game on? v] to [On]\nset [volume v] to [50]\n\nwhen I receive [scratch v]\nset [game on? v] to [Off]\nwait (1.5) seconds\ntype [hey, this is the red ninja by 0014049!] at x: [-170] y: [-145] size: [190] brightness: [100]\ntype [i love this game!] at x: [-170] y: [-152] size: [190] brightness: [100]\nset [game on? v] to [On]\nset [volume v] to [50]\n\nwhen I receive [settings v]\nwait (1.5) seconds\nset [game on? v] to [Off]\ntype [agh! this place is infestedwith glitch detectors!] at x: [-170] y: [-145] size: [190] brightness: [100]\nset [game on? v] to [On]\nset [volume v] to [100]\nwait until <(Scroll X) > [3293]>\nset [game on? v] to [Off]\ntype [what?! i cannot believe it] at x: [-170] y: [-152] size: [190] brightness: [100]\ntype [this is the firewall!] at x: [-170] y: [-152] size: [190] brightness: [100]\ntype [legend has it there is no  way to cross it. ] at x: [-170] y: [-145] size: [190] brightness: [100]\nset [game on? v] to [On]\nset [volume v] to [50]\n\n@Portal\n\nwhen I start as a clone\ngo to [front v] layer\nif <(costume [number v]) = [1]> then\n    show\n    go to x: (0) y: (0)\n    point in direction (45)\n    set [ghost v] effect to (100)\n    repeat (10)\n        change [ghost v] effect by (-5)\n    end\n    set [ghost v] effect to (50)\n    forever\n        turn right (1) degrees\n    end\nend\nif <(costume [number v]) = [3]> then\n    point in direction (45)\n    set [ghost v] effect to (50)\nend\nif <(costume [number v]) = [4]> then\n    point in direction (90)\n    set [ghost v] effect to (50)\nend\nif <(costume [number v]) = [5]> then\n    show\n    go to x: (0) y: (0)\n    point in direction (45)\n    set [ghost v] effect to (50)\n    forever\n        turn right (1) degrees\n        if <(Level) = [11]> then\n            show\n        else\n            hide\n        end\n    end\nend\nif <(costume [number v]) = [6]> then\n    show\n    go to x: (0) y: (0)\n    point in direction (90)\n    set [ghost v] effect to (50)\n    forever\n        turn right (1) degrees\n        if <(Level) = [11]> then\n            show\n        else\n            hide\n        end\n    end\nend\n\nwhen I receive [level up! v]\nif <(Level) = [9]> then\n    wait (2) seconds\n    broadcast (Start Player v)\n    switch costume to (box 1 v)\n    create clone of (_myself_ v)\n    switch costume to (box 2 v)\n    go to [front v] layer\n    show\n    go to x: (0) y: (0)\n    point in direction (90)\n    set [ghost v] effect to (100)\n    repeat (10)\n        change [ghost v] effect by (-5)\n    end\n    set [ghost v] effect to (50)\n    forever\n        turn left (1) degrees\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [messages v]\nhide\ndelete this clone\n\nwhen I receive [tick v]\nPosition ((x) - (Scroll X)) ((y) - (Scroll Y))\n\nwhen I receive [messages setup v]\nwait (0.1) seconds\nset [coins collected v] to [9]\nstop [other scripts in sprite v]\nset [x v] to [0]\nset [y v] to [1500]\nswitch costume to (box 3 v)\ncreate clone of (_myself_ v)\nswitch costume to (box 4 v)\ncreate clone of (_myself_ v)\nswitch costume to (master v)\nhide\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(costume [number v]) = [3]> or <(costume [number v]) = [7]>> then\n    if <(costume [number v]) = [3]> then\n        turn right (1) degrees\n    else\n        point in direction (90)\n    end\nelse\n    turn left (1) degrees\nend\nif <<(Player_Status) = [Messages]> or <(Player_Status) = [Settings]>> then\n    if <not <(costume [name v]) = [Master]>> then\n        if <<(x) = (x position)> and <(y) = (y position)>> then\n            show\n        else\n            hide\n        end\n    else\n        hide\n    end\nend\nif <(Player_Status) = [Gmail]> then\n    if <<not <(costume [name v]) = [Master]>> and <(Coins Collected) > [8]>> then\n        if <<(x) = (x position)> and <(y) = (y position)>> then\n            show\n        else\n            hide\n        end\n    else\n        hide\n    end\nend\nif <(costume [number v]) = [7]> then\n    set [ghost v] effect to (0)\nelse\n    set [ghost v] effect to (50)\nend\n\nwhen I receive [safari v]\nhide\ndelete this clone\n\nwhen I receive [level up! v]\nwait (2) seconds\nif <(Level) = [17]> then\n    broadcast (Start Player v)\n    switch costume to (box 5 v)\n    create clone of (_myself_ v)\n    switch costume to (box 6 v)\n    create clone of (_myself_ v)\n    go to x: (0) y: (0)\nend\n\nwhen I receive [zoom v]\nhide\ndelete this clone\n\nwhen I receive [chrome v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [gmail setup v]\nset [x v] to [2000]\nset [y v] to [50]\nswitch costume to (box 3 v)\ncreate clone of (_myself_ v)\nswitch costume to (box 4 v)\ncreate clone of (_myself_ v)\nswitch costume to (master v)\nhide\n\nwhen I receive [settings setup v]\nset [x v] to [3840]\nset [y v] to [1500]\nswitch costume to (box 7 v)\ncreate clone of (_myself_ v)\nswitch costume to (master v)\nhide\n\nwhen I receive [reset v]\nhide\ndelete this clone\n\nwhen I receive [win!! v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@Glitch Detectors\n\nwhen I receive [messages setup v]\nset [x v] to [-80]\nset [y v] to [844]\nset [var 1 v] to [2]\ncreate clone of (_myself_ v)\n\nwhen I receive [tick v]\nif <not <(costume [number v]) = [2]>> then\n    Position ((x) - (Scroll X)) ((y) - (Scroll Y))\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 flag clicked\nhide\n\nwhen I start as a clone\nswitch costume to (costume1 v)\nshow\nforever\n    repeat (150)\n        change [x v] by (Var 1)\n    end\n    repeat (150)\n        change [x v] by ((0) - (Var 1))\n    end\nend\n\nwhen I receive [zoom v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [reset v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [settings setup v]\n\nwhen I receive [settings setup v]\nset [var 1 v] to [2.5]\nset [x v] to [1020]\nset [y v] to [230]\ncreate clone of (_myself_ v)\nset [var 1 v] to [2]\nset [x v] to [2253]\nset [y v] to [394]\ncreate clone of (_myself_ v)\nset [var 1 v] to [2.5]\nset [x v] to [289]\nset [y v] to [41]\ncreate clone of (_myself_ v)\nset [var 1 v] to [-2.5]\nset [x v] to [1405]\nset [y v] to [230]\ncreate clone of (_myself_ v)\nset [var 1 v] to [-2]\nset [x v] to [2558]\nset [y v] to [394]\ncreate clone of (_myself_ v)\nset [var 1 v] to [-2.5]\nset [x v] to [656]\nset [y v] to [41]\ncreate clone of (_myself_ v)\nhide\n\n@Animation Characters\n\ndefine Say (text) at Speed (speed)\nset [number v] to [1]\nset [text v] to (letter (Number) of (text))\nrepeat (length of (text))\n    start sound [B Elec Piano v]\n    say (Text) for ((10) / (speed)) seconds\n    change [number v] by (1)\n    set [text v] to (join (Text) (letter (Number) of (text)))\nend\nsay (Text) for (0.75) seconds\n\ndefine Smooth Glide x: (x) y: (y) speed: (speed)\nrepeat until <<(round (x position)) = (round (x))> and <(round (y position)) = (round (y))>>\n    change x by (((round (x)) - (round (x position))) / (speed))\n    change y by (((round (y)) - (round (y position))) / (speed))\nend\ngo to x: (x) y: (y)\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nif <(costume [name v]) = [Circle]> then\n    show\n    set size to (100) %\n    change x by (-10)\n    change y by (10)\n    repeat (10)\n        change size by (10)\n        change [ghost v] effect by (10)\n    end\nend\nif <(costume [name v]) = [Regular Mouse]> then\n    wait (1) seconds\n    show\n    set size to (100) %\n    clear graphic effects\n    go to x: (-300) y: (0)\n    point in direction (135)\n    Smooth Glide x: (-100) y: (0) speed: (5)\n    Say [Looks like someone needs to be replaced!] at Speed [500]\n    Say [HAHAHAHAHAHAHAHA] at Speed [500]\n    start sound [Pew v]\n    switch costume to (fire v)\n    create clone of (_myself_ v)\n    switch costume to (regular mouse v)\nend\nif <(costume [name v]) = [Fire]> then\n    go to [front v] layer\n    set size to (75) %\n    point in direction (90)\n    glide (1) secs to x: (50) y: (0)\nend\n\nwhen I receive [aaaahh v]\ndelete this clone\n\nwhen I receive [start! v]\nshow\nwait (1) seconds\nSay [A new update!] at Speed [500]\nSay [I better install it!] at Speed [500]\nwait (1.25) seconds\nSay [Wait...] at Speed [500]\nset [ghost v] effect to (100)\ngo to x: (300) y: (0)\nstart sound [Suspense v]\nwait (3.2) seconds\nstart sound [Dun Dun Dunnn v]\nSay [HUH!] at Speed [500]\n\nwhen I receive [start! v]\npoint in direction (90)\nclear graphic effects\nswitch costume to (fire v)\nset size to (30) %\nswitch costume to (pixel mouse v)\ngo to x: (100) y: (100)\ngo to [front v] layer\nwait (1) seconds\nwait (2) seconds\nglide (1) secs to x: (76) y: (-39)\nplay sound [pop v] until done\nswitch costume to (circle v)\ncreate clone of (_myself_ v)\nswitch costume to (pixel mouse v)\nwait (5) seconds\nswitch costume to (regular mouse v)\ncreate clone of (_myself_ v)\nswitch costume to (pixel mouse2 v)\nclear graphic effects\nset size to (100) %\nSmooth Glide x: (100) y: (0) speed: (5)\nwait (4) seconds\nSay [Oh no!] at Speed [500]\nwait (0.25) seconds\nstart sound [Disconnect v]\nset [var 1 v] to [10]\nrepeat (30)\n    change y by (Var 1)\n    change [var 1 v] by (-1)\nend\nrepeat (10)\n    change y by (Var 1)\n    change [ghost v] effect by (10)\nend\nbroadcast (AAAAHH v)\nstart sound [Teleport v]\nshow\nset size to (200) %\nclear graphic effects\ngo to x: (0) y: (0)\nrepeat (100)\n    turn right (15) degrees\n    change [ghost v] effect by (1)\n    change size by (-2)\nend\nbroadcast (>>>Trash v)\nhide\n\n@Animation\n\nwhen flag clicked\nhide\n\nwhen I receive [aaaahh v]\nswitch costume to (costume4 v)\nset size to (100) %\ngo to x: (0) y: (0)\nrepeat (100)\n    Shake [0] [0] [30]\nend\n\ndefine Shake (x) (y) (amount)\ngo to x: (pick random ((x) - (amount)) to ((x) + (amount))) y: (pick random ((y) - (amount)) to ((y) + (amount)))\nwait (0.05) seconds\ngo to x: (x) y: (y)\nwait (0.05) seconds\n\nwhen I receive [trash v]\nwait (1) seconds\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [start! v]\nshow\npoint in direction (90)\ngo to x: (0) y: (0)\nset size to (100) %\nswitch costume to (costume1 v)\nwait (6) seconds\nswitch costume to (costume2 v)\ngo to x: (0) y: (0)\nset size to (100) %\nrepeat (9)\n    change size by (5)\n    change x by (10)\nend\nrepeat (80)\n    change y by (1)\nend\nset size to (100) %\ngo to x: (0) y: (0)\nswitch costume to (costume3 v)\n\n@Timer\n\nwhen I receive [level up! v]\nif <(Level) = [16]> then\n    wait (2) seconds\n    set [timer v] to [160]\n    create clone of (_myself_ v)\n    show\n    go to [front v] layer\n    go to x: (-220) y: (156)\n    forever\n        switch costume to (letter (2) of (Timer))\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\ngo to [front v] layer\ngo to x: (-200) y: (156)\nforever\n    switch costume to (letter (3) of (Timer))\nend\n\nwhen I receive [>>>zoom v]\nhide\nset size to (150) %\nset [timer v] to [0]\nwait until <(Timer) = [160]>\nrepeat until <(Timer) < [101]>\n    if <(Game On?) = [On]> then\n        change [timer v] by (-1)\n        wait (1) seconds\n    end\nend\nbroadcast (Lose v)\n\nwhen I receive [>>>zoom v]\ndelete this clone\n\nwhen I receive [level up! v]\nif <(Level) = [16]> then\n    wait (2) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I receive [chrome v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@Background\n\nwhen I receive [gmail v]\ngo to x: (0) y: (0)\ngo to [back v] layer\nswitch costume to (costume1 v)\nset size to (110) %\nswitch costume to (gmail v)\nshow\n\nwhen I receive [tick v]\ngo to x: (((Scroll X) / (-10)) + (140)) y: ((Scroll Y) / (-10))\n\nwhen flag clicked\nhide\n\nwhen I receive [>>>messages v]\nstop [other scripts in sprite v]\nhide\n\nshow\n\nwhen I receive [>>>chrome v]\nhide\n\nif <(Player_Status) = [Gmail]> then\n\nwhen I receive [settings v]\ngo to x: (0) y: (0)\ngo to [back v] layer\nset size to (110) %\nswitch costume to (settings v)\nshow\n\nwhen I receive [win!! v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@Stars\n\nwhen flag clicked\nhide\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\nset [>>>gmail coins collected v] to (join (Coins Collected) [/9])\nif <(Coins Collected) = [9]> then\n    set [>>>gmail coins collected v] to [Portal Open!]\nend\nif <touching (scrolling player v)?> then\n    start sound [Collect v]\n    change [coins collected v] by (1)\n    hide\n    delete this clone\nend\n\nwhen I receive [tick v]\nPosition ((x) - (Scroll X)) ((y) - (Scroll Y))\n\nwhen I receive [reset v]\nset [coins collected v] to [0]\ndelete this clone\n\nwhen I receive [gmail setup v]\nswitch costume to (star v)\nstop [other scripts in sprite v]\nClone at [-161] [10]\nClone at [185] [45]\nClone at [355] [115]\nClone at [694] [20]\nClone at [608] [215]\nClone at [1054] [5]\nClone at [1307] [35]\nClone at [1412] [120]\nClone at [1618] [210]\nswitch costume to (master v)\n\ndefine Clone at (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\n@Scrolling Level\n\nwhen I receive [tick v]\nPosition ((X) - (Scroll X)) ((Y) - (Scroll Y))\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\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 [messages setup v]\nswitch costume to (1 v)\nset [x v] to [0]\nset [y v] to [0]\nClone at x: [0] y: [360]\nClone at x: [0] y: [360]\nClone at x: [0] y: [360]\nClone at x: [0] y: [360]\nClone at x: [0] y: [360]\nswitch costume to (master v)\n\nwhen I receive [chrome setup v]\nhide variable [>>>gmail coins collected v]\nswitch backdrop to (white v)\nswitch costume to (>>>Chrome Tab)\nset [x v] to [0]\nset [y v] to [0]\nClone at x: [0] y: [0]\nswitch costume to (master v)\n\nwhen I receive [gmail setup v]\nshow variable [>>>gmail coins collected v]\nswitch costume to (6 v)\nset [x v] to [0]\nset [y v] to [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nswitch costume to (master v)\n\nwhen flag clicked\nset [>>>chrome tab v] to [Gmail]\n\nwhen I receive [coolmathgames v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [scratch v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen flag clicked\nhide variable [>>>gmail coins collected v]\n\nwhen I receive [duolingo v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [zoom v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [settings setup v]\nswitch costume to (12 v)\nset [x v] to [0]\nset [y v] to [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [360]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [0] y: [360]\nClone at x: [0] y: [360]\nClone at x: [0] y: [360]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nset [x v] to [0]\nset [y v] to [0]\nchange [x v] by (1440)\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nrepeat (4)\n    switch costume to (20 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    switch costume to (master v)\nend\n\nset [game on? v] to [On]\n\nbroadcast (>>>Settings v)\n\nwhen I receive [win!! v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@Scrolling Player\n\nwhen flag clicked\nbroadcast (Green Flag v) and wait\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [play game v]\nset [level v] to [1]\nforever\n    broadcast (Reset v) and wait\n    if <(Player_Status) = [Messages]> then\n        broadcast (Messages Setup v) and wait\n        (Messages) Setup\n    end\n    if <(Player_Status) = [Chrome]> then\n        broadcast (Chrome Setup v) and wait\n        (Chrome) Setup\n    end\n    if <(Player_Status) = [Gmail]> then\n        broadcast (Gmail Setup v) and wait\n        (Gmail) Setup\n    end\n    if <(Player_Status) = [Settings]> then\n        broadcast (Settings Setup v) and wait\n        (Settings) Setup\n    end\n    forever\n        if <(Game On?) = [On]> then\n            Tick\n            broadcast (Tick v) and wait\n        end\n    end\nend\n\ndefine (Messages) Setup\npoint in direction (90)\nset rotation style [all around v]\nset [x v] to [-122]\nset [y v] to (>>>Messages Spawn Point)\nset [speed y v] to [0]\nset [speed x v] to [0]\nset [in air v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to (>>>Messages Spawn Point)\nset [x-limit v] to [0]\nset size to (75) %\nclear graphic effects\nset [ghost v] effect to (0)\nshow\n\ndefine Tick\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    change [speed x v] by (-2)\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    change [speed x v] by (2)\nend\nset [speed x v] to ((Speed X) * (0.8))\nif <([abs v] of (Speed X) ) > [0.9]> then\n    Change Player X by (round (Speed X))\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n    if <<(In Air) < [4]> and <not <touching (water v)?>>> then\n        set [speed y v] to [16]\n    end\nend\nif <<not <touching (water v)?>> and <(Speed Y) > [-20]>> then\n    change [speed y v] by (-2)\nend\nif <touching (water v)?> then\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n        if <(Speed Y) < [4]> then\n            change [speed y v] by (0.5)\n        else\n            set [speed y v] to [4]\n        end\n    else\n        if <<key (down arrow v) pressed?> or <<mouse down?> and <(y position) > (mouse y)>>> then\n            if <(Speed Y) > [-4]> then\n                change [speed y v] by (-0.5)\n            else\n                set [speed y v] to [-4]\n            end\n        else\n            if <(Speed Y) > [-2]> then\n                change [speed y v] by (-0.5)\n            else\n                set [speed y v] to [-2]\n            end\n        end\n    end\nend\nChange Player Y by (Speed Y)\nset [scroll x v] to (X)\nif <(Player_Status) = [Messages]> then\n    if <(Scroll X) < [0]> then\n        set [scroll x v] to [0]\n    end\n    if <<<touching color (#00c401)?> or <touching color (#00ad01)?>> or <touching (glitch detectors v)?>> then\n        broadcast (Die v)\n    end\n    if <touching (portal v)?> then\n        broadcast (Portal v)\n    end\n    if <touching color (#ff00e9)?> then\n        start sound [Big Boing v]\n        set [speed y v] to [30]\n    end\nend\nif <(Player_Status) = [Gmail]> then\n    if <(Scroll X) < [0]> then\n        set [scroll x v] to [0]\n    end\n    if <<touching color (#ff0000)?> or <<touching color (#c40000)?> or <touching color (#ad0000)?>>> then\n        broadcast (Die v)\n    end\n    if <touching (portal v)?> then\n        broadcast (Portal v)\n    end\nend\nif <(Player_Status) = [Settings]> then\n    if <(Scroll X) < [0]> then\n        set [scroll x v] to [0]\n    end\n    if <<<touching color (#ff0000)?> or <<touching color (#ffa500)?> or <touching color (#ffd900)?>>> or <<touching color (#c40000)?> or <touching color (#ad0000)?>>> then\n        broadcast (Die v)\n    end\n    if <touching (portal v)?> then\n        broadcast (Portal v)\n    end\nend\nif <(Scroll X) > (X-Limit)> then\n    set [scroll x v] to (X-Limit)\nend\nif <touching (bounce v)?> then\n    set [speed y v] to [26]\nend\nchange [scroll y v] by (round (((Y) - (Scroll Y)) / (10)))\nPosition\nif <(Player_Status) = [Messages]> then\n    if <(Scroll Y) < [0]> then\n        set [scroll y v] to [0]\n    end\nend\nif <(Player_Status) = [Chrome]> then\n    if <key ((join [enter] []) v) pressed?> then\n        if <(>>>Chrome Tab) = [Gmail]> then\n            stop [other scripts in sprite v]\n            broadcast (>>>Gmail v)\n        end\n        if <(>>>Chrome Tab) = [Scratch]> then\n            stop [other scripts in sprite v]\n            broadcast (>>>Scratch v)\n        end\n    end\nend\n\ndefine Change Player Y by (speed y)\nchange [y v] by (speed y)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (scrolling level v)?>>\n    if <(speed y) > [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 [speed y v] to [0]\nend\n\ndefine Position\ngo to x: ((X) - (Scroll X)) y: ((Y) - (Scroll Y))\n\ndefine Change Player X by (speed x)\nchange [x v] by (speed x)\nPosition\nif <touching (scrolling level v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (scrolling level v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    set [speed x v] to [0]\n    repeat until <not <touching (scrolling level v)?>>\n        if <(speed x) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        if <(speed x) > [0]> then\n            set [speed x v] to [-15]\n            set [speed y v] to [20]\n        else\n            set [speed x v] to [15]\n            set [speed y v] to [20]\n        end\n    end\nend\n\nwhen I receive [die v]\nstop [other scripts in sprite v]\nstart sound [Crunch v]\nrepeat (20)\n    change [ghost v] effect by (5)\n    change [pixelate v] effect by (5)\nend\nbroadcast (Play Game v)\n\ndefine (Chrome) Setup\npoint in direction (90)\nset rotation style [all around v]\nset [x v] to [0]\nset [y v] to [0]\nset [speed y v] to [0]\nset [speed x v] to [0]\nset [in air v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [x-limit v] to [1800]\nset size to (75) %\nclear graphic effects\nset [ghost v] effect to (0)\nshow\n\ndefine (Gmail) Setup\npoint in direction (90)\nset rotation style [all around v]\nset [x v] to [0]\nset [y v] to [0]\nset [speed y v] to [0]\nset [speed x v] to [0]\nset [in air v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [x-limit v] to [1920]\nset size to (75) %\nclear graphic effects\nset [ghost v] effect to (0)\nshow\n\nwhen I receive [messages v]\nset [>>>messages spawn point v] to [-100]\nswitch backdrop to (white v)\nforever\n    broadcast (Reset v) and wait\n    broadcast (Messages Setup v) and wait\n    (Messages) Setup\n    broadcast (Tick v) and wait\n    forever\n        if <(Game On?) = [On]> then\n            Tick\n            broadcast (Tick v) and wait\n        end\n    end\nend\n\nwhen I receive [chrome v]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Chrome Setup v) and wait\n    (Chrome) Setup\n    broadcast (Tick v) and wait\n    forever\n        if <(Game On?) = [On]> then\n            Tick\n            broadcast (Tick v) and wait\n        end\n    end\nend\n\nwhen I receive [gmail v]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Gmail Setup v) and wait\n    (Gmail) Setup\n    broadcast (Tick v) and wait\n    forever\n        if <(Game On?) = [On]> then\n            Tick\n            broadcast (Tick v) and wait\n        end\n    end\nend\n\nwhen I receive [portal v]\nstop [other scripts in sprite v]\nrepeat (50)\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    go to [front v] layer\nend\nhide\nif <(Player_Status) = [Messages]> then\n    broadcast (>>>Zoom v)\nend\nif <(Player_Status) = [Gmail]> then\n    set [>>>chrome tab v] to [Scratch]\n    broadcast (>>>Chrome v)\nend\nif <(Player_Status) = [Settings]> then\n    broadcast (WIN!! v)\nend\n\nwhen I receive [scratch v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [duolingo v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [settings v]\nset [game on? v] to [Off]\nset [level v] to [1]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Settings Setup v) and wait\n    (Settings) Setup\n    repeat (10)\n        broadcast (Tick v) and wait\n    end\n    forever\n        if <(Game On?) = [On]> then\n            Tick\n            broadcast (Tick v) and wait\n        end\n    end\nend\n\ndefine (Settings) Setup\npoint in direction (90)\nset rotation style [all around v]\nset [x v] to [0]\nset [y v] to [100]\nset [speed y v] to [0]\nset [speed x v] to [0]\nset [in air v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [100]\nset [x-limit v] to [3840]\nset size to (75) %\nclear graphic effects\nset [ghost v] effect to (0)\nshow\n\nwhen I receive [win!! v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@Scrolling Obstacles\n\nwhen I receive [tick v]\nPosition ((X) - (Scroll X)) ((Y) - (Scroll Y))\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\nif <(costume [number v]) = [3]> then\n    if <touching (scrolling player v)?> then\n        set [>>>messages spawn point v] to [700]\n        switch costume to (11 v)\n    end\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 [messages setup v]\nswitch costume to (1 v)\nset [x v] to [0]\nset [y v] to [0]\nClone at x: [0] y: [360]\nClone at x: [0] y: [360]\nClone at x: [0] y: [360]\nClone at x: [0] y: [360]\nClone at x: [0] y: [360]\nswitch costume to (master v)\n\nwhen I receive [chrome setup v]\nswitch costume to (>>>Chrome Tab)\nset [x v] to [0]\nset [y v] to [0]\nClone at x: [0] y: [0]\nswitch costume to (master v)\n\nwhen I receive [gmail setup v]\nswitch costume to (6 v)\nset [x v] to [0]\nset [y v] to [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nswitch costume to (master v)\n\nwhen I receive [scratch v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [duolingo v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [win!! v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [settings setup v]\nswitch costume to (12 v)\nset [x v] to [0]\nset [y v] to [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [360]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [0] y: [360]\nClone at x: [0] y: [360]\nClone at x: [0] y: [360]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nset [x v] to [0]\nset [y v] to [0]\nchange [x v] by (1440)\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nrepeat (4)\n    switch costume to (20 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    switch costume to (master v)\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\nwhen I receive [>>>chrome v]\nstop [other scripts in sprite v]\n\nwhen I receive [>>>messages v]\nstop [other scripts in sprite v]\n\nwhen I receive [>>>scratch v]\nstop [other scripts in sprite v]\nforever\n    go to [front v] layer\nend\n\nwhen I receive [>>>coolmathgames v]\nstop [other scripts in sprite v]\n\nwhen I receive [>>>trash v]\nstop [other scripts in sprite v]\nforever\n    go to [front v] layer\nend\n\nwhen I receive [>>>zoom v]\nstop [other scripts in sprite v]\nforever\n    go to [front v] layer\nend\n\nwhen I receive [tick v]\ngo to [front v] layer\n\nwhen I receive [>>>settings v]\nstop [other scripts in sprite v]\n\nwhen I receive [>>> duolingo v]\nstop [other scripts in sprite v]\nforever\n    go to [front v] layer\nend\n\n@WIN!\n\nwhen flag clicked\nhide\n\ndefine Shake (x) (y) (amount) (time)\nif <(pick random (1) to (2)) = [1]> then\n    if <(pick random (1) to (2)) = [1]> then\n        go to x: ((x) + (amount)) y: ((y) + (amount))\n    else\n        go to x: ((x) - (amount)) y: ((y) + (amount))\n    end\nelse\n    if <(pick random (1) to (2)) = [1]> then\n        go to x: ((x) + (amount)) y: ((y) - (amount))\n    else\n        go to x: ((x) - (amount)) y: ((y) - (amount))\n    end\nend\nwait (time) seconds\ngo to x: (x) y: (y)\nwait (time) seconds\n\nwhen I receive [win!! v]\nshow\ngo to [front v] layer\nset [var 1 v] to [20]\nrepeat (24)\n    Shake [0] [0] (Var 1) [0.01]\n    set [var 1 v] to ((Var 1) * (0.9))\nend\nwait (1) seconds\nbroadcast (Outro v)\nwait (1) seconds\nhide\n\n@Start Screen\n\nwhen I start as a clone\nshow\ngo to [back v] layer\ngo to x: (0) y: (0)\nset size to (100) %\n\nwhen I receive [start 1 v]\nstop [other scripts in sprite v]\ngo to [front v] layer\nrepeat (20)\n    change [brightness v] effect by (5)\nend\nif <(costume [number v]) = [1]> then\n    broadcast (START! v)\n    repeat (50)\n        change [ghost v] effect by (5)\n    end\n    hide\n    delete this clone\nelse\n    hide\nend\n\nwhen flag clicked\nstart sound [Super World v]\nhide\nclear graphic effects\nswitch costume to (thumbnail v)\ncreate clone of (_myself_ v)\nswitch costume to (play v)\nshow\ngo to x: (0) y: (-110)\nset size to (100) %\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((120) - (size)) / (5))\n        if <mouse down?> then\n            stop all sounds\n            start sound [Low Whoosh v]\n            broadcast (Start 1 v)\n        end\n    else\n        change size by (((100) - (size)) / (5))\n    end\nend\n\n@Outro\n\nwhen I start as a clone\nif <(costume [name v]) = [Transition]> then\n    show\n    go to x: (0) y: (0)\n    go to [front v] layer\n    set size to (0) %\n    repeat (25)\n        change size by (((100) - (size)) / (5))\n        point in direction ((90) + ((100) - (size)))\n    end\n    wait until <(timer) > [4]>\n    hide\n    delete this clone\nend\nif <(costume [name v]) = [Text 1]> then\n    show\n    go to x: (0) y: (0)\n    go to [front v] layer\n    set size to (0) %\n    repeat (20)\n        change size by (((100) - (size)) / (5))\n        point in direction ((90) + ((100) - (size)))\n    end\n    point in direction (90)\n    switch costume to (text 1 v)\n    set size to (100) %\n    set [var 2 v] to [100]\n    repeat until <(timer) > [4]>\n        Hack Zoom (Var 2)\n        change [var 2 v] by ((((size) / (1000)) * (Var 2)) / (5))\n        turn right ((Var 2) / (10)) degrees\n    end\n    hide\n    delete this clone\nend\nif <(costume [name v]) = [Flash]> then\n    point in direction (90)\n    show\n    go to x: (0) y: (0)\n    go to [front v] layer\n    set size to (100) %\n    set [ghost v] effect to (100)\n    wait until <(timer) > [4]>\n    set [ghost v] effect to (0)\n    repeat (50)\n        change [ghost v] effect by (2)\n    end\nend\n\ndefine Hack Zoom (zoom)\nset [var 1 v] to (costume [number v])\nswitch costume to (dot v)\nset size to (zoom) %\nswitch costume to (Var 1)\n\nwhen I receive [flash v]\nif <(costume [name v]) = [Flash]> then\n    set [ghost v] effect to (0)\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [Project 1]> then\n    show\n    go to x: (-100) y: (-50)\n    go to [back v] layer\n    set size to (90) %\n    wait (3) seconds\n    forever\n        if <touching (mouse-pointer v)?> then\n            hide list [project 1 link v]\n        else\n            show list [project 1 link v]\n        end\n    end\nend\nif <(costume [name v]) = [Project 2]> then\n    show\n    go to x: (100) y: (-50)\n    go to [back v] layer\n    set size to (90) %\n    wait (3) seconds\n    forever\n        if <touching (mouse-pointer v)?> then\n            hide list [project 2 link v]\n        else\n            show list [project 2 link v]\n        end\n    end\nend\nif <(costume [name v]) = [Text 2]> then\n    show\n    go to x: (0) y: (85)\n    go to [back v] layer\n    set size to (90) %\nend\nif <(costume [name v]) = [Circle]> then\n    wait until <(timer) > [2]>\n    show\n    go to x: (0) y: (90)\n    go to [back v] layer\n    set [ghost v] effect to (50)\n    set size to (pick random (75) to (100)) %\n    forever\n        glide (1.95) secs to (random position v)\n    end\nend\nif < (costume [name v]) contains [Item]?> then\n    show\n    set size to (25) %\n    go to [back v] layer\n    go [forward v] (7) layers\n    go to x: (-300) y: (pick random (-175) to (175))\n    set [var 1 v] to [0]\n    repeat (10)\n        change x by (Var 1)\n        change [var 1 v] by (1)\n    end\n    repeat (32)\n        change x by (Var 1)\n    end\n    repeat (10)\n        change x by (Var 1)\n        change [var 1 v] by (-0.5)\n    end\n    repeat (10)\n        change x by (Var 1)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [Spotlight]> then\n    go to [back v] layer\n    show\n    set [ghost v] effect to (0)\n    set [var 1 v] to [0]\n    if <(direction) = [89]> then\n        forever\n            turn left ([cos v] of ((Var 1) * (50)) ) degrees\n            change [var 1 v] by (0.05)\n        end\n    else\n        forever\n            turn right ([cos v] of ((Var 1) * (50)) ) degrees\n            change [var 1 v] by (0.05)\n        end\n    end\nend\n\ndefine Setup\nswitch costume to (text 1 v)\ncreate clone of (_myself_ v)\nswitch costume to (flash v)\ncreate clone of (_myself_ v)\nswitch costume to (project 1 v)\ncreate clone of (_myself_ v)\nswitch costume to (project 2 v)\ncreate clone of (_myself_ v)\nswitch costume to (text 2 v)\ncreate clone of (_myself_ v)\npoint in direction (89)\ngo to x: (-150) y: (-160)\nswitch costume to (spotlight v)\ncreate clone of (_myself_ v)\npoint in direction (90)\ngo to x: (150) y: (-160)\nswitch costume to (spotlight v)\ncreate clone of (_myself_ v)\nswitch costume to (circle v)\nrepeat (6)\n    create clone of (_myself_ v)\nend\nswitch costume to (master v)\n\nwhen flag clicked\nshow list [project 1 link v]\nshow list [project 2 link v]\ndelete all of [project 1 link v]\ndelete all of [project 2 link v]\nadd [https://scratch.mit.edu/projects/436343603/] to [project 1 link v]\nadd [https://scratch.mit.edu/projects/423164543/] to [project 2 link v]\n\nbroadcast (Outro v)\n\nwhen I receive [outro v]\nwait (1) seconds\nswitch backdrop to (blue v)\nwait until <(timer) > [2]>\nforever\n    switch costume to (pick random (11) to (15))\n    create clone of (_myself_ v)\n    wait (0.01) seconds\nend\n\nwhen I receive [outro v]\nhide\nstart sound [LEGO 2 - Catchy Song - Dillon Francis feat v]\nreset timer\nswitch costume to (transition v)\nset [brightness v] effect to (-50)\nrepeat (10)\n    create clone of (_myself_ v)\n    wait (0.1) seconds\n    change [brightness v] effect by (5)\nend\nSetup\nbroadcast (Setup v)\nwait until <(timer) > [6]>\nbroadcast (Flash v)\nforever\n    reset timer\n    wait until <(timer) > [1.95]>\n    broadcast (Flash v)\nend\n\n@Music\n\nwhen I receive [settings v]\nstop [other scripts in sprite v]\nstop all sounds\nforever\n    play sound [Spectre - Alan Walker v] until done\nend\n\nwhen I receive [trash v]\nforever\n    play sound [Treenan v] until done\nend\n\nwhen flag clicked\nforever\n    set volume to (Volume) %\nend\n\nwhen I receive [win!! v]\nstop [other scripts in sprite v]\nstop all sounds\nplay sound [Win v] until done\n\n@Red\n\nwhen flag clicked\nhide\n\nwhen I receive [level up! v]\nwait (1) seconds\nif <(Level) = [22]> then\n    show\n    go to [front v] layer\n    go to x: (0) y: (0)\n    set [ghost v] effect to (100)\n    repeat (20)\n        change [ghost v] effect by (-5)\n    end\nend\n\nwhen I receive [settings v]\nhide\n\n
Welcome to Mouse: A Platformer! My first game in a while... Should I keep making games? Tell me in the comments!\n\nControls: Arrow keys/AWSD to move. (Instructions in game)\n\nStory: You are an old pixel mouse who just installed an update that made a new mouse! Travel through the apps to undo this. \n\nAlso, this is my entry for @ComplicatedCodes platformer contest. Hope you enjoy! I tried to make it as un-generic as possible. :)\n\n