Thunderstorms | A Platformer
@Stage\n\nwhen flag clicked\nforever\n    play sound [Alan Walker - Faded.mp3 v] until done\nend\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nhide variable [deaths v]\nhide variable [time taken v]\n\nwhen I receive [start the platformer v]\nrepeat until <(Stop Time Taken) = [1]>\n    change [time taken v] by (1)\n    wait (1) seconds\nend\n\nshow variable [deaths v]\nshow variable [time taken v]\n\nwhen flag clicked\nset [stop time taken v] to [0]\nset [show time? v] to [0]\nforever\n    if <key (space v) pressed?> then\n        if <(Show Time?) = [0]> then\n            set [show time? v] to [1]\n            show variable [time taken v]\n            show variable [deaths v]\n        else\n            set [show time? v] to [0]\n            hide variable [deaths v]\n            hide variable [time taken v]\n        end\n    end\nend\n\nwhen I receive [start the platformer v]\n\n@Ground\n\nwhen flag clicked\nset [drawing level finished? v] to [1]\nhide\nswitch costume to (costume1 v)\ngo to x: (-2) y: (5)\ngo to [front v] layer\n\ndefine Touch Ground <up?>\nchange [falling v] by (1)\nrepeat until <not <touching (ground v)?>>\n    change y by (1)\n    set [falling v] to [0]\n    set [speed y v] to [0]\nend\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [8]> then\n        broadcast (Show Fake Lava v)\n    end\nend\n\nwhen flag clicked\nset [time taken v] to [0]\nforever\n    if <(costume [number v]) = [9]> then\n        broadcast (Hide Next Level v)\n    end\nend\n\nwhen I receive [start the platformer v]\nshow\n\nwhen [timer v] > (0.4)\nhide variable [deaths v]\nhide variable [time taken v]\nhide\n\nwhen flag clicked\nforever\n    if <not <(costume [number v]) = [8]>> then\n        broadcast (Hide Fake Lava v)\n    else\n        broadcast (Show Fake Lava v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [2]> then\n        broadcast (Acid Rain Residue coordinates v)\n    end\nend\n\nbroadcast (Drawing Level  v)\n\nwhen flag clicked\nset pen size to (10)\nerase all\nset pen color to (#767676)\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [3]> then\n        broadcast (ARRc2 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [3]> then\n        broadcast (Acid Rain Residue coordinates Lv3 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [2]> then\n        broadcast (Acid Rain Residue Lv2 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [5]> then\n        broadcast (Acid Rain Residue Lv5 v)\n    end\nend\n\nforever\n    if <(costume [number v]) = [6]> then\n        broadcast (Show Portal v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [4]> then\n        broadcast (Acid Rain Residue Lv4 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [6]> then\n        broadcast (Acid Rain Residue Lv6 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [7]> then\n        broadcast (Show Moving Platform v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [8]> then\n        broadcast (Last Level v)\n    end\nend\n\nwhen flag clicked\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [8]> then\n        set [stop time taken v] to [1]\n        broadcast (Hide Moving Platforms v)\n    end\nend\n\n@player\n\nwhen flag clicked\nforever\n    if <(x position) = [239]> then\n        broadcast (Next Level v)\n        go to x: (-210) y: (0)\n    end\nend\n\nwhen flag clicked\n\ndefine walls\nif <not <(t) = [s]>> then\n    if <<(t) < [4]> and <<<touching (ground v)?> or <touching (moving platform v)?>> or <<touching (moving platform2 v)?> or <touching (moving platform3 v)?>>>> then\n        change [t v] by (1)\n        change y by (1)\n        walls\n    else\n        if <(t) = [4]> then\n            change y by (-4)\n            change x by ((-1) * (x_vel))\n            set [x_vel v] to [0]\n        end\n        set [t v] to [s]\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nhide\n\nwhen I receive [you won v]\nstop [other scripts in sprite v]\n\nwhen I receive [next v]\ngo to x: (-210) y: (0)\nset [x_vel v] to [0]\nset [y_vel v] to [0]\nbroadcast (platform v)\n\nset [y_vel v] to [8]\n\nwhen I receive [platform v]\n\nwhen I receive [restart v]\nstop [other scripts in sprite v]\ngo to x: (-210) y: (0)\nset [x_vel v] to [0]\nset [y_vel v] to [0]\nbroadcast (platform v)\n\ndefine check\n\ncheck\n\nset size to (130) %\nset size to (100) %\n\nwhen flag clicked\n\nif <<touching (not touch v)?> or <<touching (_edge_ v)?> and <(edge) = [1]>>> then\n    broadcast (restart v)\n    wait (0.1) seconds\nend\n\nwhen flag clicked\nforever\n    if <touching (next level v)?> then\n        broadcast (Next Level v)\n    end\nend\n\nwhen I receive [next level v]\ngo to x: (-206) y: (-33)\n\nwhen flag clicked\nset [deaths v] to [0]\nforever\n    if <<<<<touching (death v)?> or <touching (acid rain residue v)?>> or <touching (acid rain residue2 v)?>> or <touching (acid rain residue3 v)?>> or <touching (acid rain residue4 v)?>> then\n        go to x: (-206) y: (-33)\n        change [deaths v] by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (portal v)?> then\n        go to x: (-206) y: (-33)\n        broadcast (Next Level v)\n    end\nend\n\nwhen I receive [start the platformer v]\nforever\n    if <key (right arrow v) pressed?> then\n        change [x_vel v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x_vel v] by (-1)\n    end\n    set [x_vel v] to ((0.9) * (x_vel))\n    change x by (x_vel)\n    set [t v] to [0]\n    walls\n    if <not <(t) = [s]>> then\n        add (t) to [bugs v]\n    end\n    change [y_vel v] by (-0.8)\n    change y by (y_vel)\n    if <<<touching (ground v)?> or <touching (moving platform v)?>> or <<touching (moving platform2 v)?> or <touching (moving platform3 v)?>>> then\n        change y by ((-1) * (y_vel))\n        if <<key (up arrow v) pressed?> and <(y_vel) < [0]>> then\n            set [y_vel v] to [12]\n        else\n            set [y_vel v] to [0]\n        end\n    end\n    broadcast (message1 v)\n    check\nend\n\nwhen I receive [start the platformer v]\ngo to [front v] layer\nset [edge v] to [1]\ndelete (all) of [bugs v]\nbroadcast (platform v)\n\nwhen I receive [start the platformer v]\nshow\ngo to x: (-210) y: (0)\nset [x_vel v] to [0]\nset [y_vel v] to [0]\n\nwhen [timer v] > (0.4)\nhide\n\nwhen flag clicked\nset [size check v] to [0]\nforever\n    \n        go to x: (-206) y: (-33)\n        change [deaths v] by (1)\n    end\nend\n\nnext backdrop\n\nwhen flag clicked\n\nforever\n    if <touching (shrink v)?> then\n        if <(Size Check) = [0]> then\n            set size to (20) %\n            set [size check v] to [1]\n        else\n            set size to (35) %\n        end\n    end\nend\n\nwhen flag clicked\nhide variable [deaths v]\nhide variable [time taken v]\n\nforever\n    if <touching (ladder v)?> then\n        change y by (15)\n    end\nend\n\nwhen flag clicked\n\n@Welcome\n\nwhen flag clicked\nset [scroll position v] to [0]\nforever\n    if <[-23500] < (Scroll Position)> then\n        change [scroll position v] by (-20)\n        wait (0.01) seconds\n    end\nend\n\nif <key (right arrow v) pressed?> then\nif <key (left arrow v) pressed?> then\n\nif <(Scroll Position) < [0]> then\n    change [scroll position v] by (5)\n    wait (0.01) seconds\nend\n\n@and\n\nwhen I start as a clone\nshow\nforever\n    set x to ((Scroll Position) + ((480) * (Clone)))\nend\n\nwhen flag clicked\nhide\nset [clone v] to [0]\nswitch costume to (part 1 v)\ngo to x: (0) y: (0)\nrepeat (50)\n    create clone of (_myself_ v)\n    change [clone v] by (1)\n    next costume\nend\n\n@Next Level\n\nwhen I receive [next level v]\nhide\nwait (2) seconds\nshow\n\nwhen I receive [hide next level v]\nhide\n\nshow\n\nwhen flag clicked\nforever\n    hide\nend\n\nwhen I receive [start the platformer v]\n\n@Death\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\nwhen I receive [start the platformer v]\nshow\nforever\n    go to [front v] layer\nend\n\nwhen [timer v] > (0.4)\nhide\n\nwhen I receive [start the platformer v]\nshow\nforever\n    go to [front v] layer\nend\n\n@Portal\n\nwhen flag clicked\nhide\n\nwhen I receive [show portal v]\nshow\n\nwhen I receive [next level v]\nhide\n\nwhen [timer v] > (0.4)\nhide\n\n@Sprite1\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nwait (2) seconds\nrepeat (100)\n    change [ghost v] effect by (1)\nend\nbroadcast (Start the Platformer v)\n\nhide\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    reset timer\nend\n\nwhen [timer v] > (0.4)\ngo to [front v] layer\ngo to x: (0) y: (0)\nshow\n\nwhen I receive [start v]\n\n@Sprite2\n\nwhen I receive [show fake lava v]\nshow\n\nwhen flag clicked\nhide\n\nwhen [timer v] > (0.4)\nhide\n\nshow\n\nwhen I receive [hide fake lava v]\nhide\n\n@Sprite4\n\nwhen flag clicked\nshow\npoint in direction (90)\nshow\nset size to (100) %\nset [y v] to [2]\nset [x v] to [4]\nset [v v] to [5]\nforever\n    change [y v] by (6)\n    change [v v] by (3)\n    change [x v] by (6)\n    turn right (([cos v] of (v) ) / (3)) degrees\n    change size by ([cos v] of (y) )\n    change y by ([cos v] of (x) )\nend\n\ngo to x: (17) y: (117)\n\ngo to x: (-9) y: (66)\n\nwhen I receive [start the platformer v]\nhide\n\nwhen [timer v] > (0.4)\nhide\n\n@Sprite5\n\nwhen flag clicked\nhide\nforever\n    create clone of (_myself_ v)\n    wait (pick random (0.025) to (0.05)) seconds\nend\n\nwhen I start as a clone\nshow\ngo [backward v] (pick random (1) to (2)) layers\ngo to x: (-271) y: (153)\nset size to (pick random (10) to (100)) %\nset [ghost v] effect to (pick random (25) to (70))\nset [sprite5: x v] to [3]\nset [sprite5: y v] to (pick random (0) to (1))\nrepeat (10)\n    change x by (Sprite5: x)\n    if <(Sprite5: y) = [0]> then\n        change y by (-0.03)\n    end\n    if <(Sprite5: y) = [1]> then\n        change y by (0.03)\n    end\nend\nrepeat (200)\n    change x by (Sprite5: x)\n    if <(Sprite5: y) = [0]> then\n        change y by (-0.3)\n    end\n    if <(Sprite5: y) = [1]> then\n        change y by (0.3)\n    end\nend\ndelete this clone\n\n@Sprite6\n\nwhen flag clicked\nhide\nforever\n    create clone of (_myself_ v)\n    wait (pick random (0.025) to (0.05)) seconds\nend\n\nwhen I start as a clone\nshow\ngo [backward v] (pick random (1) to (2)) layers\ngo to x: (271) y: (153)\nset size to (pick random (10) to (100)) %\nset [ghost v] effect to (pick random (25) to (70))\nset [sprite6: x v] to [-3]\nset [sprite6: y v] to (pick random (0) to (1))\nrepeat (10)\n    change x by (Sprite6: x)\n    if <(Sprite6: y) = [0]> then\n        change y by (-0.03)\n    end\n    if <(Sprite6: y) = [1]> then\n        change y by (0.03)\n    end\nend\nrepeat (200)\n    change x by (Sprite6: x)\n    if <(Sprite6: y) = [0]> then\n        change y by (-0.3)\n    end\n    if <(Sprite6: y) = [1]> then\n        change y by (0.3)\n    end\nend\ndelete this clone\n\n@Lightning\n\nwhen flag clicked\nhide\nset [ghost v] effect to (0)\nforever\n    wait (pick random (7) to (20)) seconds\n    repeat (pick random (1) to (3))\n        show\n        wait (0.1) seconds\n        hide\n        start sound [thunder1 copy v]\n    end\nend\n\n@Rain\n\nwhen flag clicked\nhide\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to [back v] layer\nshow\ngo to x: (pick random (-232) to (232)) y: (140)\nrepeat until <touching (_edge_ v)?>\n    point in direction (direction rain)\n    move (10) steps\nend\ndelete this clone\n\nwhen flag clicked\nhide\nforever\n    set [direction rain v] to [175]\n    wait (pick random (5) to (10)) seconds\n    set [direction rain v] to [180]\n    wait (pick random (5) to (10)) seconds\n    set [direction rain v] to [170]\n    wait (pick random (5) to (10)) seconds\n    set [direction rain v] to [-176]\n    wait (pick random (5) to (10)) seconds\n    set [direction rain v] to [-174]\n    wait (pick random (5) to (10)) seconds\n    set [direction rain v] to [-170]\n    wait (pick random (5) to (10)) seconds\n    set [direction rain v] to [171]\n    wait (pick random (5) to (10)) seconds\nend\n\nwhen flag clicked\nforever\n    start sound [Rain v]\n    wait (7.5) seconds\nend\n\nwhen I receive [start the platformer v]\n\n@Acid Rain Residue\n\nwhen flag clicked\npoint in direction (90)\ngo to x: (113) y: (104)\nswitch costume to (costume3 v)\nhide\n\nwhen [timer v] > (0.4)\nhide\n\nwhen I receive [start the platformer v]\nshow\nforever\n    go to [front v] layer\nend\n\nwhen I receive [next level v]\nnext costume\n\nwhen I receive [acid rain residue coordinates v]\ngo to x: (-164) y: (41)\n\nwhen I receive [acid rain residue coordinates lv3 v]\ngo to x: (171) y: (-29)\n\nwhen I receive [acid rain residue lv5 v]\npoint in direction (180)\ngo to x: (170) y: (-102)\n\nwhen I receive [acid rain residue lv4 v]\ngo to x: (10) y: (-54)\n\nwhen I receive [acid rain residue lv6 v]\npoint in direction (90)\ngo to x: (-60) y: (23)\n\nshow\n\nwhen I receive [hide moving platforms v]\nhide\n\n@Acid Rain Residue2\n\nwhen flag clicked\npoint in direction (180)\nswitch costume to (costume1 v)\nhide\n\nwhen [timer v] > (0.4)\nhide\n\nwhen I receive [start the platformer v]\nshow\nforever\n    go to [front v] layer\nend\n\nwhen I receive [next level v]\nnext costume\n\nwhen I receive [arrc2 v]\ngo to x: (-143) y: (-25)\nshow\n\nwhen I receive [acid rain residue lv2 v]\ngo to x: (-49) y: (-100)\n\nwhen I receive [acid rain residue lv6 v]\npoint in direction (90)\ngo to x: (94) y: (-5)\n\n@Acid Rain Residue3\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen [timer v] > (0.4)\nhide\n\nwhen I receive [start the platformer v]\nshow\nforever\n    go to [front v] layer\nend\n\nwhen I receive [next level v]\nnext costume\n\nwhen I receive [acid rain residue lv6 v]\ngo to x: (252) y: (35)\n\nwhen I receive [acid rain residue lv2 v]\ngo to x: (121) y: (-139)\n\n@Acid Rain Residue4\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen [timer v] > (0.4)\nhide\n\nwhen I receive [start the platformer v]\nshow\nforever\n    go to [front v] layer\nend\n\nwhen I receive [next level v]\nnext costume\n\nwhen I receive [acid rain residue lv2 v]\npoint in direction (90)\n\n@Shrink\n\n@Moving Platform\n\nwhen flag clicked\ngo to x: (-145) y: (-90)\nforever\n    glide (1.5) secs to x: (-117) y: (-90)\n    glide (1.5) secs to x: (145) y: (-90)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [show moving platform v]\nshow\n\nwhen I receive [last level v]\n\nhide\n\nwhen [timer v] > (0.4)\nhide\n\nwhen I receive [hide moving platforms v]\nforever\n    hide\nend\n\n@Moving Platform2\n\nwhen flag clicked\ngo to x: (-145) y: (50)\nforever\n    glide (1.5) secs to x: (145) y: (50)\n    glide (1.5) secs to x: (-117) y: (50)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [show moving platform v]\nshow\n\nwhen I receive [last level v]\n\nhide\n\nwhen [timer v] > (0.4)\nhide\n\nwait (4) seconds\n\nwhen I receive [hide moving platforms v]\nhide\n\n@Moving Platform3\n\nwhen flag clicked\ngo to x: (145) y: (-10)\nforever\n    glide (1.5) secs to x: (-117) y: (-10)\n    glide (1.5) secs to x: (145) y: (-10)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [show moving platform v]\nshow\n\nwhen I receive [last level v]\n\nhide\n\nwhen [timer v] > (0.4)\nhide\n\nwait (2) seconds\n\nwait (4) seconds\n\nwhen I receive [hide moving platforms v]\nhide\n\n
This is a very, very HARD Platformer!!\n\n#1 of the Disaster Series:\nThe story: You were coming home from work when a terrible storm suddenly started. It blew apart your house and you were left out in the open. Can you survive?\n\nControls:\nArrow keys to move. Press the space button to see your time/# of Deaths.\n\nAvoid the void and the acid rain residue.\n\nAll levels are 100% possible.