Science Lab Adventures || A Scrolling Platformer (Mobile Friendly!)
@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop2 v)\n\nwhen I receive [begin  v]\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [finallydoneeeee v]\nswitch backdrop to (backdrop3 v)\n\n@Sprite6\n\nwhen flag clicked\ngo to x: (-9) y: (-33)\ngo to [front v] layer\nshow\n\nwhen flag clicked\nforever\n    point in direction ((([sin v] of ((timer) * (150)) ) * (10)) + (90))\nend\n\nset y to (0)\n\nwhen this sprite clicked\nbroadcast (Begin  v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (startbutton2 v)\n    else\n        switch costume to (startbutton v)\n    end\nend\n\nwhen I receive [stop v]\nhide\n\n@Sprite2\n\nwhen I receive [begin  v]\nshow\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nset [y v] to [0]\nset [x v] to [0]\nswitch costume to (costume7 v)\nif <(LEVEL) = [1]> then\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (costume8 v)\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (costume12 v)\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (costume16 v)\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (costume21 v)\n                end\n            end\n        end\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 Position x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\nhide\nforever\n    if <(costume [number v]) = [21]> then\n        switch costume to (costume22 v)\n        broadcast (finallydoneeeee v)\n    end\nend\n\nwhen I receive [stop v]\nhide\n\nwhen I receive [retryhuh v]\nhide\nwait (1) seconds\nshow\n\n@Sprite\n\ndefine GameWinYOO\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nset [ghost v] effect to (0)\nset size to (100) %\nchange [level v] by (1)\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I start as a clone\nset rotation style [all around v]\nrepeat (20)\n    turn right (15) degrees\n    change y by (10)\n    change [ghost v] effect by (5)\nend\nset [ghost v] effect to (0)\nhide\n\nwhen I receive [greenflah v]\nhide\n\nwhen I receive [play game v]\nset [level v] to [1]\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)\n    end\n    if <(EXIT) = [A win win]> then\n        GameWinYOO\n    else\n        Game - die boi boi I’m fed\n    end\nend\n\ndefine Game on\nswitch costume to (player v)\npoint in direction (90)\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [x v] to [0]\nset [y v] to [78]\nset [speedy v] to [0]\nset [sx v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset size to (100) %\nset [ghost v] effect to (0)\nshow\n\ndefine Tick\nif <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n    change [sx v] by (2)\n    switch costume to (player v)\nend\nif <<<key (left arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    change [sx v] by (-2)\n    switch costume to (player2 v)\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 (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> then\n    if <(In air) < [4]> then\n        set [speedy v] to [16]\n        switch costume to (player3 v)\n    end\nend\nchange [speedy v] by (-1.5)\nChange player y by (Speedy)\nDie? I think so\nchange [scroll x v] by (round (((x) - (SCROLL X)) / (15)))\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [Die]\nend\n\ndefine Change player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (sprite2 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 [speedy v] to [0]\nend\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 (sprite2 v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (sprite2 v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <not <touching (sprite2 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 Game - die boi boi I’m fed\nset [ghost v] effect to (0)\ncreate clone of (_myself_ v)\n\ndefine Die? I think so\nif <touching (sprite4 v)?> then\n    play sound [Suction Cup v] until done\n    set [exit v] to [Die \(other way\)]\nend\n\nwhen flag clicked\nswitch costume to (player v)\nset [level v] to [0]\n\nwhen I receive [begin  v]\nshow\nbroadcast (Greenflah v) and wait\nbroadcast (Play game v) and wait\n\nwhen flag clicked\nset [color v] effect to (0)\nset [ghost v] effect to (0)\ngo to x: (7) y: (-32)\nshow\n\nif <touching (trampoline  v)?> then\n    if <(In air) < [4]> then\n        set [speedy v] to [30]\n    end\nend\n\nwhen I receive [changefront v]\nchange [color v] effect by (25)\n\nwhen I receive [changeback v]\nchange [color v] effect by (-25)\n\nwhen I receive [stop v]\nhide\n\nwhen I receive [retryhuh v]\nRetryIbegyou\n\ndefine RetryIbegyou\nset [exit v] to [Die \(other way\)]\n\nwhen I receive [getgoskip v]\nset [exit v] to [A win win]\n\nGameWinYOO\n\n@Sprite4\n\nwhen I receive [setup v]\nset [y v] to [0]\nset [x v] to [0]\nswitch costume to (costume1 v)\nif <(LEVEL) = [1]> then\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (costume7 v)\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (costume10 v)\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (costume15 v)\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (costume20 v)\n                end\n            end\n        end\n    end\nend\n\ndefine Position x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\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 [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [begin  v]\nshow\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nhide\n\n@Collectibles2\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (sprite v)?> then\n    set [exit v] to [A win win]\nend\n\nwhen I receive [begin  v]\nset [ghost v] effect to (0)\nshow\n\nwhen I receive [setup v]\nswitch costume to (open v)\nhide\nset [collllllectttttt yooooo v] to [0]\nset [y v] to [0]\nset [x v] to [0]\nif <(LEVEL) = [1]> then\n    Clone x: [2000] y: [103]\nelse\n    if <(LEVEL) = [2]> then\n        Clone x: [2036] y: [103]\n    else\n        if <(LEVEL) = [3]> then\n            Clone x: [2000] y: [103]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (antidote v)\n                Clone x: [2000] y: [103]\n            else\n                if <(LEVEL) = [5]> then\n                    Clone x: [99999] y: [999]\n                end\n            end\n        end\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\ndefine Clone x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [open portal v]\nforever\n    switch costume to (open v)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nhide\n\nplay sound [Coin v] until done\n\n@Sprite1\n\nwhen flag clicked\nshow\nforever\n    point in direction ((([sin v] of ((timer) * (200)) ) * (10)) + (90))\nend\n\nwhen I receive [begin  v]\nhide\n\nwhen I receive [stop v]\nhide\n\n@Sprite3\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\nforever\n    play sound [Vexento - Sad Robot v] until done\n    play sound [DEAF KEV - Invincible \[NCS Release\].mp3 v] until done\nend\n\nwhen I receive [begin  v]\nshow\n\nwhen this sprite clicked\nnext costume\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [1]> then\n        set volume to (100) %\n    else\n        set volume to (0) %\n    end\nend\n\nwhen I receive [finallydoneeeee v]\nhide\n\nwhen I receive [stop v]\nhide\n\n@Thumbnailllllina\n\nwhen flag clicked\nhide\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nforever\n    set [my variable v] to ((timer) + (.1))\nend\n\nwhen [timer v] > (my variable)\nbroadcast (STOP v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\n@player-select-arrow\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (101) y: (-18)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen this sprite clicked\nbroadcast (changefront v)\n\nwhen I receive [begin  v]\nhide\n\nwhen I receive [stop v]\nhide\n\n@player-select-arrow2\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (-22) y: (-18)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen this sprite clicked\nbroadcast (changeback v)\n\nwhen I receive [begin  v]\nhide\n\nwhen I receive [stop v]\nhide\n\n@Sprite9\n\nwhen flag clicked\nforever\n    change [turbotrap v] by (99)\nend\n\nwhen flag clicked\nforever\n    set [turbotrap v] to [0]\n    wait (0.0001) seconds\n    say []\n    if <(turbotrap) > [100]> then\n        forever\n            go to [front v] layer\n            show\n        end\n    else\n        hide\n    end\nend\n\n@Sprite5\n\nwhen flag clicked\nhide\ngo to x: (231) y: (112)\nswitch costume to (costume1 v)\n\nwhen I receive [begin  v]\nshow\n\nwhen I receive [finallydoneeeee v]\nhide\n\nwhen I receive [stop v]\nhide\n\nwhen this sprite clicked\nbroadcast (didoyuknow? v)\n\n@Sprite7\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\nset [pixelate v] effect to (0)\n\nwhen I receive [didoyuknow? v]\ngo [forward v] (1) layers\nshow\n\nwhen I receive [commithide v]\nhide\n\nwhen I receive [nextplss v]\nrepeat (10)\n    change [pixelate v] effect by (10)\nend\nnext costume\nrepeat (10)\n    change [pixelate v] effect by (-10)\nend\n\n@Sprite8\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [didoyuknow? v]\ngo [forward v] (2) layers\nshow\n\nwhen this sprite clicked\nbroadcast (commithide v)\nhide\n\nbroadcast (nextplss v)\n\n@Sprite10\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [didoyuknow? v]\ngo [forward v] (2) layers\nshow\n\nwhen this sprite clicked\nbroadcast (nextplss v)\nhide\nwait (0.5) seconds\nshow\n\nwhen I receive [commithide v]\nhide\n\n@Sprite11\n\nwhen flag clicked\nhide\n\nwhen I receive [begin  v]\nshow\n\nwhen this sprite clicked\nbroadcast (retryHUH v)\n\nwhen I receive [finallydoneeeee v]\nhide\n\nwhen I receive [stop v]\nhide\n\n@Sprite12\n\nwhen flag clicked\nhide\n\nwhen I receive [begin  v]\nshow\n\nwhen this sprite clicked\nbroadcast (getgoskip v)\n\nwhen I receive [finallydoneeeee v]\nhide\n\nwhen I receive [stop v]\nhide\n\n
Featured on 10/11 of May, 2020.\ni was like 11 when i made this ok