Pandemic || A Platformer
@Stage\n\nwhen flag clicked\nforever\n    if <(backdrop [number v]) = [3]> then\n        broadcast (Start rain v)\n    end\nend\n\nwhen [s v] key pressed\nnext backdrop\n\nwhen flag clicked\nforever\n    if <(backdrop [number v]) = [18]> then\n        broadcast (End rain v)\n    end\nend\n\n@Cat\n\nwhen [any v] key pressed\nforever\n    if <touching color (#ff35a8)?> then\n        go to x: (-215) y: (-70)\n    end\nend\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nset [lives v] to [5]\nset [level v] to [1]\nhide variable [y v]\nhide variable [x v]\nset [x v] to [0]\nset [y v] to [0]\nshow\ngo to x: (-215) y: (-70)\nforever\n    if <key (right arrow v) pressed?> then\n        turn right (15) degrees\n        switch costume to (costume1 v)\n        change [x v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        switch costume to (costume2 v)\n        turn left (15) degrees\n        change [x v] by (-1)\n    end\n    set [x v] to ((X) * (0.9))\n    change x by (X)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change x by ((X) * (-1))\n                        change y by (-4)\n                        if <key (up arrow v) pressed?> then\n                            if <(X) > [0]> then\n                                set [x v] to [-5]\n                            else\n                                set [x v] to [5]\n                                set [y v] to [10]\n                            end\n                        else\n                            set [y v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v] by (-1)\n    change y by (Y)\n    if <touching color (#000000)?> then\n        change y by ((Y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#000000)?> then\n        if <key (up arrow v) pressed?> then\n            set [y v] to [15]\n        end\n    end\n    change y by (1)\n    if <(x position) > [238]> then\n        switch backdrop to (next backdrop v)\n        go to x: (-215) y: (-70)\n        change [level v] by (1)\n        if <(y position) < [-178]> then\n            go to x: (-215) y: (-70)\n        end\n    end\nend\n\nwhen [s v] key pressed\ngo to x: (-215) y: (-70)\n\n@Rain Engine\n\ndefine Generate Rain\nset pen size to (5)\nset pen color to (#4a6cd4)\ncreate clone of (_myself_ v)\ncreate clone of (_myself_ v)\ncreate clone of (_myself_ v)\npen up\nGenerate Rain\n\nwhen I start as a clone\nswitch costume to (costume2 v)\ngo to x: (pick random (-240) to (240)) y: (180)\nforever\n    change y by (-5)\n    move (Wind) steps\n    set pen size to (5)\n    set pen color to (#4a6cd4)\n    pen down\n    pen up\n    pen down\n    repeat (0)\n        show\n    end\n    if <(y position) < [-170]> then\n        erase all\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nif <(Lightning) = [1]> then\n    go to x: (pick random (-240) to (240)) y: (180)\n    point in direction (pick random (150) to (200))\n    pen down\n    set pen color to (#e1a91a)\n    set pen size to (50)\n    change y by (-50)\n    change pen size by (-15)\n    change pen size by (-15)\n    change y by (-50)\n    change pen size by (0)\n    change pen size by (-8)\n    change y by (-30)\n    set [lightning v] to [0]\n    delete this clone\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start rain v]\nshow\n\nwhen I receive [start rain v]\nforever\n    wait (1) seconds\n    set [lightning v] to [1]\n    wait (1) seconds\n    set [lightning v] to [0]\nend\n\nwhen backdrop switches to [backdrop3 v]\nbroadcast (Start rain v)\n\nwhen backdrop switches to [backdrop3 v]\nset [lightning v] to [0]\nswitch costume to (costume1 v)\nset [wind v] to [0]\nerase all\nGenerate Rain\n\nwhen flag clicked\nerase all\n\nwhen I receive [end rain v]\nforever\n    set [lightning v] to [0]\nend\n\nwhen I receive [end rain v]\nhide\nerase all\npen up\nstop [other scripts in sprite v]\n\n@Sprite1\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n@Sprite2\n\nwhen backdrop switches to [backdrop16 v]\nshow\nforever\n    if <touching (cat v)?> then\n        switch costume to (costume1 v)\n    else\n        switch costume to (costume2 v)\n    end\nend\n\nwhen backdrop switches to [backdrop17 v]\nhide\nstop [other scripts in sprite v]\n\nwhen flag clicked\nswitch costume to (costume2 v)\nhide\n\n
Arrow keys to move, s to skip.\nMay lag, sorry.\nPlease give the rain engine a sec to load...\nStay healthy!\nPlease help by proposing to be featured!\n\n-Update on 17/07/2020-\nWhoa! 53 views! Record!\n-Update on 19/07/2020-\n63 views... guess I’ll faint now...\n-Update on 21/07/2020-\n73 views. See a pattern there?\n-Update on 4/08/2020-\n93 views. Thanks to @smiley_giggle for pointing it out!!! It's slowing down tho. Meh.\n-Update on 7/08/2020-\n113 views. CAN SOMEONE PLEASE EXPLAIN THIS TO ME???!!!\n-Update on 9/09/2020-\n153 views! Yaaaaaaaayyyyyyyy!!!