Raining Day - A Platformer

Instructions: @InfinitelyEndless for original :D

@Stage\n\nwhen flag clicked\nwait until <(Started?) = [1]>\nforever\n    play sound [OMFG - Wash Your Hands v] until done\nend\n\nwhen I receive [save the world v]\nswitch backdrop to (backdrop1 v)\n\n@Intro\n\nwhen I start as a clone\nshow\nif <(costume [number v]) = [1]> then\n    repeat (2)\n        clear graphic effects\n        wait (0.6) seconds\n        set [brightness v] effect to (100)\n        wait (0.6) seconds\n    end\n    wait (2) seconds\n    delete this clone\nelse\n    if <(costume [number v]) = [2]> then\n        set [ghost v] effect to (0)\n        wait (i1) seconds\n        repeat (10)\n            change size by (-6)\n            change [ghost v] effect by (10)\n        end\n        delete this clone\n    else\n        if <(costume [number v]) = [3]> then\n            set [brightness v] effect to (0)\n            set size to (0) %\n            repeat (30)\n                change size by (((100) - (size)) / (10))\n                change [ghost v] effect by (-4)\n            end\n            repeat (18)\n                switch costume to (blank v)\n                change size by ((size) / (4))\n                switch costume to (c1 v)\n            end\n            wait (3) seconds\n            delete this clone\n        else\n            if <(costume [number v]) = [4]> then\n                go to (random position v)\n                repeat (10)\n                    change x by ((x position) / (-4))\n                    change y by ((y position) / (-4))\n                    change [ghost v] effect by (-10)\n                end\n                delete this clone\n            else\n                if <(costume [number v]) = [6]> then\n                    set [i1 v] to [50]\n                    set size to (0) %\n                    clear graphic effects\n                    repeat (64)\n                        change size by (((100) - (size)) / (4))\n                        point in direction ((90) + (([tan v] of (i1) ) * (5)))\n                        change [i1 v] by (5)\n                    end\n                    repeat (9)\n                        change x by (20)\n                        change y by (15)\n                        turn right (((180) - (direction)) / (4)) degrees\n                        change size by ((size) / (-4))\n                        change [ghost v] effect by (13)\n                    end\n                    delete this clone\n                else\n                    if <<(costume [number v]) > [6]> and <(costume [number v]) < [9]>> then\n                        clear graphic effects\n                        set size to (pick random (40) to (50)) %\n                        repeat (30)\n                            change x by (i1)\n                            change y by (i2)\n                            change [i2 v] by (-1)\n                            change [ghost v] effect by (3.5)\n                        end\n                        delete this clone\n                    else\n                        if <(costume [number v]) = [9]> then\n                            set [ghost v] effect to (0)\n                            repeat (18)\n                                change x by ((x position) / (-4))\n                                change y by ((y position) / (-4))\n                            end\n                            repeat (10)\n                                change [ghost v] effect by (10)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Screen Refresh # (#) i (i)\nif <(#) = [1]> then\n    set [i1 v] to [0.03]\n    switch costume to (costume2 v)\n    set [brightness v] effect to (i)\n    go to x: (0) y: (-150)\n    repeat (10)\n        create clone of (_myself_ v)\n        change y by (40)\n        change [i1 v] by (0.03)\n    end\nelse\n    if <(#) = [2]> then\n        repeat (30)\n            set [i1 v] to (pick random (-5) to (5))\n            set [i2 v] to (pick random (10) to (15))\n            switch costume to (pick random (7) to (8))\n            create clone of (_myself_ v)\n        end\n    end\nend\n\nwhen I receive [message1 v]\nhide\nstart sound ((0) + (1))\nset volume to (100) %\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nset size to (100) %\npoint in direction (90)\ncreate clone of (_myself_ v)\nrepeat (2)\n    Screen Refresh # [1] i [100]\n    wait (0.6) seconds\n    Screen Refresh # [1] i [0]\n    wait (0.6) seconds\nend\ngo to x: (0) y: (0)\nswitch costume to (c1 v)\ncreate clone of (_myself_ v)\nset [brightness v] effect to (0)\nrepeat (30)\n    switch costume to (c2 v)\n    create clone of (_myself_ v)\nend\nwait (0.5) seconds\nswitch costume to (name v)\ncreate clone of (_myself_ v)\nScreen Refresh # [2] i [0]\nwait (2.5) seconds\nset [brightness v] effect to (5)\nswitch costume to (slide v)\ngo to x: (0) y: (-300)\nrepeat (3)\n    create clone of (_myself_ v)\n    wait (0.2) seconds\n    change [brightness v] effect by (30)\nend\n\n@Intro2\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset size to (100) %\nset [started? v] to [0]\nbroadcast (message1 v) and wait\nset [started? v] to [1]\nhide\nswitch costume to (background v)\ncreate clone of (_myself_ v)\nswitch costume to (virus2 v)\ncreate clone of (_myself_ v)\nwait (0.5) seconds\nswitch costume to (play v)\ncreate clone of (_myself_ v)\nforever\n    go to [back v] layer\n    go [forward v] (1) layers\n    switch costume to (virus v)\n    go to x: ((((pick random (0) to (1)) * (2)) - (1)) * (240)) y: (pick random (100) to (-100))\n    set size to (pick random (30) to (50)) %\n    create clone of (_myself_ v)\n    wait (pick random (1.5) to (3)) seconds\nend\n\nwhen I start as a clone\nshow\nif <(costume [number v]) = [2]> then\n    set [i v] to ((pick random (-13) to (-18)) * (([abs v] of (x position) ) / (x position)))\n    repeat ([ceiling v] of ((480) / ([abs v] of (i) )) )\n        change x by (i)\n        change [ghost v] effect by (2)\n        turn right ((i) / (20)) degrees\n    end\n    delete this clone\nend\nif <(costume [number v]) = [3]> then\n    set y to (300)\n    set [ghost v] effect to (100)\n    wait (0.5) seconds\n    repeat (18)\n        change [ghost v] effect by (-6)\n        change y by (((120) - (y position)) / (4))\n        point in direction ((90) + (([cos v] of (i) ) * (5)))\n        set size to ((100) + (([sin v] of (i) ) * (5))) %\n        change [i v] by (5)\n    end\n    forever\n        point in direction ((90) + (([cos v] of (i) ) * (5)))\n        set size to ((100) + (([sin v] of (i) ) * (5))) %\n        change [i v] by (5)\n    end\nend\nif <(costume [number v]) = [4]> then\n    set y to (0)\n    set [ghost v] effect to (100)\n    wait (0.5) seconds\n    repeat (18)\n        change [ghost v] effect by (-6)\n        change y by (((-50) - (y position)) / (4))\n        set size to ((100) + (([cos v] of (i) ) * (5))) %\n        change [i v] by (5)\n    end\n    forever\n        set size to ((100) + (([cos v] of (i) ) * (5))) %\n        change [i v] by (5)\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (-5)\n            if <mouse down?> then\n                stop [other scripts in sprite v]\n                broadcast (Story v)\n            end\n        else\n            clear graphic effects\n        end\n    end\nend\n\nwhen I receive [story v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [save the world v]\nforever\n    switch costume to (virus v)\n    go to x: ((((pick random (0) to (1)) * (2)) - (1)) * (240)) y: (pick random (120) to (-120))\n    set size to (pick random (10) to (20)) %\n    create clone of (_myself_ v)\n    wait (pick random (1.5) to (3)) seconds\nend\n\n@Story\n\nwhen I receive [story v]\nshow\nswitch costume to (costume1 v)\nwait (2) seconds\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\nnext costume\nrepeat (10)\n    change [brightness v] effect by (10)\nend\nwait (1) seconds\nhide\nbroadcast (Save The World v)\n\nwhen flag clicked\nset [big virus fatal? v] to [1]\nhide\n\nwhen I receive [next level v]\nwait () seconds\nif <([costume # v] of [platform v]) = [6]> then\n    set [frozen v] to [1]\n    show\n    switch costume to (costume3 v)\n    set [brightness v] effect to (-100)\n    repeat (10)\n        change [brightness v] effect by (10)\n    end\n    wait (1) seconds\n    repeat (10)\n        change [brightness v] effect by (-10)\n    end\n    hide\n    set [frozen v] to [0]\n    set [mask v] to [1]\nend\nwait until <(Vaccine) = [1]>\nset [frozen v] to [1]\nshow\nswitch costume to (costume4 v)\nset [brightness v] effect to (-100)\nrepeat (10)\n    change [brightness v] effect by (10)\nend\nwait (1) seconds\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\nbroadcast (Do you want a part two tell me in the comments v)\n\n@Player\n\nwhen I receive [save the world v]\nshow\nset [frozen v] to [0]\nset [can pass level v] to [1]\nforever\n    go to x: (-201) y: (86)\n    if <(Frozen) = [1]> then\n        go to x: (-201) y: (-108)\n    end\n    set [xv v] to [0]\n    set [yv v] to [0]\n    show\n    broadcast (Reset v)\n    repeat until <<<touching (intro2 v)?> and <(Small Virus Fatal?) = [1]>> or <<<(x position) > [230]> and <(Can Pass Level) = [1]>> or >>\n        if <(Frozen) = [0]> then\n            physics\n        end\n    end\n    if <(x position) > [230]> then\n        broadcast (Next Level v)\n    end\nend\n\ndefine physics\nswitch costume to (hitbox v)\nchange [xv v] by (<<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> - <<key (left arrow v) pressed?> or <<mouse down?> and <(x position) > (mouse x)>>>)\nchange [yv v] by (-1)\nchange y by (round (YV))\nif <touching (platform v)?> then\n    repeat until <not <touching (platform v)?>>\n        if <(YV) > [0]> then\n            change y by (-1)\n        else\n            change y by (1)\n        end\n    end\n    set [yv v] to [0]\nend\nset [xv v] to ((XV) * (0.87))\nchange x by (round (XV))\nif <touching (platform v)?> then\n    repeat until <not <touching (platform v)?>>\n        if <(XV) > [0]> then\n            change x by (-1)\n        else\n            change x by (1)\n        end\n    end\n    set [xv v] to [0]\nend\nchange y by (-1)\nif <touching (platform v)?> then\n    if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n        set [yv v] to [16]\n    end\nend\nchange y by (1)\nswitch costume to (player v)\nif <(Mask) = [2]> then\n    switch costume to (player2 v)\nend\n\nwhen flag clicked\nset [small virus fatal? v] to [1]\nhide\n\n@Platform\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [save the world v]\nshow\n\nwhen I receive [next level v]\nnext costume\nnext backdrop\n\n@Danger\n\nwhen flag clicked\nset [vaccine v] to [0]\nset [mask v] to [0]\nhide\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nwait until <([costume # v] of [platform v]) = [2]>\nshow\nset [i v] to [0]\ncreate clone of (_myself_ v)\nset [i v] to [1]\ncreate clone of (_myself_ v)\nrepeat until <not <([costume # v] of [platform v]) = [2]>>\n    go to x: (0) y: (([sin v] of ((timer) * (100)) ) * (100))\n    point in direction ((timer) * (100))\n    set size to (60) %\nend\nhide\npoint in direction (90)\nwait until <([costume # v] of [platform v]) = [4]>\ncreate clone of (_myself_ v)\nwait until <([costume # v] of [platform v]) = [5]>\nset [frozen v] to [1]\ncreate clone of (_myself_ v)\nwait until <([costume # v] of [platform v]) = [6]>\nset [frozen v] to [1]\nwait until <(Mask) = [1]>\nset [big virus fatal? v] to [0]\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nwait until <([costume # v] of [platform v]) = [7]>\nset size to (100) %\nset [big virus fatal? v] to [1]\nshow\nrepeat until <not <([costume # v] of [platform v]) = [7]>>\n    switch costume to (costume3 v)\n    go to x: (0) y: (([sin v] of ((timer) * (200)) ) * (5))\nend\nhide\nwait until <([costume # v] of [platform v]) = [8]>\nshow\nrepeat until <not <([costume # v] of [platform v]) = [8]>>\n    switch costume to (costume4 v)\n    go to x: (0) y: (([sin v] of ((timer) * (200)) ) * (5))\nend\nhide\nwait until <([costume # v] of [platform v]) = [9]>\nshow\nrepeat until <not <([costume # v] of [platform v]) = [9]>>\n    switch costume to (costume5 v)\n    go to x: (0) y: (([sin v] of ((timer) * (200)) ) * (5))\nend\nhide\nwait until <([costume # v] of [platform v]) = [10]>\nswitch costume to (costume6 v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <([costume # v] of [platform v]) = [2]> then\n    show\n    repeat until <not <([costume # v] of [platform v]) = [2]>>\n        switch costume to (costume1 v)\n        go to x: (-100) y: (([cos v] of (((timer) + (i)) * (100)) ) * (100))\n        point in direction ((timer) * (100))\n        set size to (60) %\n        if <(i) = [1]> then\n            set x to (100)\n        end\n    end\n    hide\nend\nif <([costume # v] of [platform v]) = [4]> then\n    show\n    repeat until <not <([costume # v] of [platform v]) = [4]>>\n        physics\n    end\n    hide\n    delete this clone\nend\nif <([costume # v] of [platform v]) = [5]> then\n    show\n    go to x: (33333) y: (-74)\n    set [color v] effect to (100)\n    glide (1) secs to x: (50) y: (-74)\n    Typesay [You look Soooo cute without a mask!]\n    Typesay [Do you want one\(sarcastically\)?]\n    ask [Do you want one\(sarcastically\)?] and wait\n    repeat until <(answer) = [yes]>\n        ask [HAH I WILL NOT KILL YOU, I WILL TORTURE YOU! MUAHAHAHA] and wait\n    end\n    Typesay [BOOOOOOOOOM]\n    set [frozen v] to [0]\n    delete this clone\nend\nif <(costume [number v]) = [2]> then\n    show\n    go to x: (50) y: (-20)\n    set [can pass level v] to [0]\n    repeat until <touching (player v)?>\n        go to x: (50) y: ((-20) + (([sin v] of ((timer) * (200)) ) * (5)))\n    end\n    set [can pass level v] to [1]\n    set [mask v] to [2]\n    set [small virus fatal? v] to [0]\n    delete this clone\nend\nif <(costume [number v]) = [6]> then\n    show\n    go to x: (50) y: (-20)\n    set [can pass level v] to [0]\n    set [big virus fatal? v] to [0]\n    repeat until <touching (player v)?>\n        go to x: (50) y: ((-20) + (([sin v] of ((timer) * (200)) ) * (5)))\n    end\n    set [vaccine v] to [1]\n    delete this clone\nend\n\ndefine physics\npoint in direction (90)\nset [color v] effect to (-15)\nchange [zombiexv v] by (<([x position v] of [player v]) > (x position)> - <(x position) > ([x position v] of [player v])>)\nset [zombiexv v] to ((ZombieXV) * (0.87))\nchange [zombieyv v] by (-1)\nchange y by (round (ZombieYV))\nif <touching (platform v)?> then\n    repeat until <not <touching (platform v)?>>\n        if <(ZombieYV) > [0]> then\n            change y by (-1)\n        else\n            change y by (1)\n        end\n    end\n    set [zombieyv v] to [0]\nend\nchange x by (round (ZombieXV))\nif <touching (platform v)?> then\n    repeat until <not <touching (platform v)?>>\n        if <(ZombieXV) > [0]> then\n            change x by (-1)\n        else\n            change x by (1)\n        end\n    end\n    set [zombiexv v] to [0]\nend\nchange y by (-1)\nif <touching (platform v)?> then\n    if <<key (up arrow v) pressed?> or <([y position v] of [player v]) > ((y position) + (50))>> then\n        if <not <([costume # v] of [platform v]) = [4]>> then\n            set [zombieyv v] to [16]\n        end\n    end\nend\nchange y by (1)\n\nwhen I receive [reset v]\nif <([costume # v] of [platform v]) = [4]> then\n    go to x: (200) y: (-50)\nend\n\ndefine Typesay (number or text)\nset [i v] to []\nrepeat (length of (number or text))\n    set [i v] to (join (i) (letter ((length of (i)) + (1)) of (number or text)))\n    say (i)\nend\nsay (number or text) for (1) seconds\n\n@NO PART 2\n\nwhen I receive [do you want a part two tell me in the comments v]\ngo to x: (-300) y: (0)\nrepeat (20)\n    change x by ((x position) / (-4))\n    change [ghost v] effect by (-10)\nend\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\n@Sprite1\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\n@Thanks =D\n\nwhen flag clicked\nset [ghost v] effect to (100)\ngo to x: (0) y: (-200)\nwait until <((lov) + (fav)) = [2]>\nwait (1) seconds\nrepeat (18)\n    change y by (((-140) - (y position)) / (4))\n    change [ghost v] effect by (-10)\nend\nwait (1) seconds\nrepeat (18)\n    change y by (((-200) - (y position)) / (4))\n    change [ghost v] effect by (10)\nend\n\n@detector\n\nwhen flag clicked\nhide\nset [fav v] to [0]\nset [lov v] to [0]\nset [id v] to [0]\ncreate clone of (_myself_ v)\nwait (0) seconds\nset [id v] to [1]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(id) = [0]> then\n    go to x: (0) y: (0)\n    set [lov v] to [0]\n    switch costume to (love v)\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [lov v] to [1]\n        end\n    end\nend\nif <(id) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    set [fav v] to [0]\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [fav v] to [1]\n        end\n    end\nend\n\n