Nature 2  II A platformer #Games II  

Instructions: Nature Part 1 - https://scratch.mit.edu/projects/454334799/\nWelcome!  To my newest Platformer!!!\nTask- Stop the factories from producing too much smoke!!!!\n - Controls -\n- Arrow Keys or WASD to move\n- Up Arrow To Jump ( You can wall jump )\n- Dodge The Dangerous Things And fun dangerous stuff!! :D\nPlease Leave a ❤️ and ⭐ will be highly appreciated.\nStory -\nOh noes The factory is producing too many carbon dioxide, we need to stop it.\nHelp the player get across nasty dangers.\nAnd push the stop button to stop all the factories.\nAnd you win! ;)\n\n

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [intro v]\nswitch backdrop to (backdrop2 v)\n\n@player\n\ndefine Platformer Physics (speed) (friction) (jump height)\nchange [y vel v] by (-1)\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [x vel v] by (speed)\n    switch costume to (costume1 v)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [x vel v] by ((speed) * (-1))\n    switch costume to (costume2 v)\nend\nset [x vel v] to ((X vel) * (friction))\nchange x by (X vel)\nset [slope v] to [0]\nif <<touching (level v)?> or <touching (moving platform v)?>> then\n    repeat until <<<not <touching (level v)?>> or <(slope) = [-8]>> or <<not <touching (moving platform v)?>> or <(slope) = [-8]>>>\n        change [slope v] by (-1)\n        change y by (1)\n    end\nend\nif <<touching (level v)?> or <touching (moving platform v)?>> then\n    change y by (slope)\n    repeat until <not <touching (level v)?>>\n        change x by ((([abs v] of (X vel) ) / (X vel)) * (-1))\n    end\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        if <(X vel) > [0]> then\n            set [x vel v] to [-12]\n        else\n            set [x vel v] to [12]\n        end\n        set [y vel v] to [12]\n    else\n        set [x vel v] to [0]\n    end\nend\nchange y by (Y vel)\nif <<touching (level v)?> or <touching (moving platform v)?>> then\n    repeat until <not <touching (level v)?>>\n        change y by ((([abs v] of (Y vel) ) / (Y vel)) * (-1))\n    end\n    set [y vel v] to [0]\nend\nchange y by (-1)\nif <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <touching (level v)?>> or <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <touching (moving platform v)?>>> then\n    set [y vel v] to (jump height)\nend\nchange y by (1)\n\nwhen flag clicked\n\nwhen I receive [end v]\ngo to x: (-198) y: (-10)\n\nwhen I receive [intro v]\nshow\ngo to [front v] layer\nset size to (50) %\nset [level v] to [1]\nset [x vel v] to [0]\nset [y vel v] to [0]\nswitch costume to (costume1 v)\ngo to x: (-198) y: (-10)\npoint in direction (90)\nforever\n    Platformer Physics [1] [0.9] [9]\n    if <<<<<touching (danger v)?> or <touching (crusher v)?>> or <touching (lasers v)?>> or <touching (balls v)?>> or <touching (spinny boii v)?>> then\n        start sound [Roblox Death Sound - OOF Sound Effect v]\n        go to x: (-198) y: (-10)\n    end\n    if <touching (trampoline v)?> then\n        set [y vel v] to [20]\n    end\n    if <touching (teleporter v)?> then\n        start sound [Whiz v]\n        go to x: (56) y: (140)\n    end\nend\n\nwhen I receive [intro v]\nforever\n    play sound [recording3 v] until done\nend\n\nwhen flag clicked\nset [level v] to [1]\nhide\n\nwhen I receive [hurt v]\nstart sound [recording1 v]\ngo to x: (-198) y: (-10)\n\nwhen I receive [intro v]\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nswitch costume to (effect v)\nrepeat (10)\n    change [ghost v] effect by (10)\n    change size by (-5)\nend\ndelete this clone\n\nwhen I receive [intro v]\nforever\n    play sound [Nope v] until done\nend\n\nwhen I receive [the stop v]\nhide\n\n@level\n\nwhen flag clicked\nhide\ngo to x: (-2) y: (6)\nswitch costume to (costume1 v)\n\nwhen I receive [end v]\nnext costume\n\nwhen I receive [intro v]\nshow\n\nwhen I receive [the stop v]\nhide\n\n@end\n\nwhen flag clicked\nhide\n\nwhen I receive [intro v]\nshow\ngo to x: (139) y: (-7)\nforever\n    if <touching (player v)?> then\n        switch costume to (1 v)\n        start sound [Ding Sound Effect v]\n        repeat (7)\n            wait (0.02) seconds\n            next costume\n        end\n        broadcast (end v)\n        switch costume to (1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [16]> then\n        hide\n    end\nend\n\n@text\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\n\nwhen I receive [end v]\nnext costume\n\nwhen I receive [intro v]\nshow\n\nwhen I receive [the stop v]\nhide\n\n@thumbnail\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\n@Sprite1\n\nwhen flag clicked\nswitch costume to (1 v)\nset size to (100) %\ngo to x: (0) y: (0)\nshow\nwait (2) seconds\nrepeat (3)\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    next costume\n    repeat (20)\n        change [ghost v] effect by (-5)\n    end\n    wait (2) seconds\nend\nbroadcast (intro v)\nhide\n\nwhen I receive [the stop v]\nwait (1.70) seconds\nforever\n    go to [front v] layer\nend\n\nwhen I receive [the stop v]\nswitch backdrop to (backdrop1 v)\nwait (1.70) seconds\nshow\nswitch costume to (5 v)\nwait (1) seconds\nrepeat (3)\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    next costume\n    repeat (20)\n        change [ghost v] effect by (-5)\n    end\n    wait (2) seconds\nend\nwait (2) seconds\nstop [all v]\n\n@danger\n\nwhen flag clicked\nhide\ngo to x: (-2) y: (6)\nswitch costume to (costume1 v)\n\nwhen I receive [end v]\nshow\ngo to [front v] layer\nnext costume\n\nwhen I receive [intro v]\nshow\n\n@crusher\n\nwhen flag clicked\nhide\nwait (1) seconds\nforever\n    repeat (10)\n        change y by (5)\n    end\n    wait (1) seconds\n    repeat (10)\n        change y by (-5)\n    end\nend\n\nwhen I receive [intro v]\ngo to x: (36) y: (5)\nforever\n    if <(level) = [5]> then\n        show\n    end\n    if <(level) = [6]> then\n        hide\n    end\nend\n\n@nothing\n\nwhen I receive [end v]\nchange [level v] by (1)\n\n@Clouds\n\nwhen I receive [intro v]\nhide\nrepeat (5)\n    create clone of (_myself_ v)\n    wait (1) seconds\nend\n\nwhen I start as a clone\nshow\nforever\n    switch costume to (pick random (1) to (2))\n    set size to (pick random (70) to (80)) %\n    go to [back v] layer\n    set [ghost v] effect to (pick random (5) to (20))\n    if <(pick random (1) to (2)) = [1]> then\n        show\n        go to x: (200) y: (pick random (20) to (180))\n        repeat (50)\n            change x by (2)\n        end\n        if <touching (_edge_ v)?> then\n            hide\n        end\n        wait (pick random (1) to (5)) seconds\n    end\n    switch costume to (pick random (1) to (2))\n    set size to (pick random (70) to (80)) %\n    go to [back v] layer\n    set [ghost v] effect to (pick random (5) to (20))\n    if <(pick random (1) to (2)) = [2]> then\n        show\n        go to x: (220) y: (pick random (20) to (180))\n        repeat (110)\n            change x by (-4)\n        end\n        hide\n        wait (pick random (1) to (5)) seconds\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\n\nwhen I receive [the stop v]\nforever\n    hide\n    go to [back v] layer\nend\n\n@Trampoline\n\nwhen flag clicked\nhide\n\nwhen I receive [intro v]\nswitch costume to (costume1 v)\nset size to (80) %\nforever\n    if <(level) = [8]> then\n        show\n        go to x: (-9) y: (-130)\n    end\n    if <(level) = [9]> then\n        hide\n    end\n    if <(level) = [14]> then\n        hide\n    end\n    if <(level) = [15]> then\n        go to x: (-99) y: (-130)\n        show\n    end\n    if <(level) = [16]> then\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    if <touching (player v)?> then\n        repeat (4)\n            wait (0.03) seconds\n            next costume\n        end\n        start sound [Mario Jump - Gaming Sound Effect \(HD\) v]\n        repeat (4)\n            switch costume to ((costume [number v]) - (1))\n        end\n    end\nend\n\n@lasers\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\nforever\n    if <(level) = [6]> then\n        show\n        go to [back v] layer\n        go to x: (118) y: (27)\n        glide (3) secs to x: (-112) y: (27)\n        glide (3) secs to x: (118) y: (27)\n        hide\n        wait (3) seconds\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\nforever\n    if <(level) = [7]> then\n        hide\n    end\nend\n\n@balls\n\nwhen flag clicked\ngo to x: (157) y: (-43)\nhide\nforever\n    if <(level) = [7]> then\n        show\n        go to x: (157) y: (-43)\n        glide (0.80) secs to x: (67) y: (-122)\n        glide (0.80) secs to x: (-1) y: (-59)\n        glide (0.70) secs to x: (-1) y: (-59)\n        glide (0.80) secs to x: (-86) y: (-122)\n    end\nend\n\nwhen flag clicked\ngo to x: (157) y: (-43)\nhide\nforever\n    if <(level) = [8]> then\n        hide\n    end\nend\n\n@Moving platform\n\nwhen flag clicked\ngo to x: (151) y: (-142)\nhide\nforever\n    if <(level) = [9]> then\n        show\n        glide (2) secs to x: (21) y: (-142)\n        wait (0.1) seconds\n        glide (2) secs to x: (151) y: (-142)\n    else\n        hide\n    end\nend\n\nrepeat (30)\n    change x by (-5)\nend\nrepeat (30)\n    change x by (5)\nend\n\nwhen flag clicked\ngo to x: (109) y: (-142)\nforever\n    if <(level) = [10]> then\n        hide\n    end\nend\n\nwhen flag clicked\ngo to x: (109) y: (-142)\nforever\n    if <(level) = [9]> then\n        show\n    else\n        hide\n    end\nend\n\ngo to x: (151) y: (-142)\n\n@Spinny boii\n\nwhen flag clicked\ngo to [back v] layer\nhide\npoint in direction (90)\nforever\n    if <(level) = [11]> then\n        show\n        turn right (10) degrees\n        go to [back v] layer\n        go to x: (3) y: (-171)\n    end\nend\n\nwhen flag clicked\ngo to [back v] layer\nhide\npoint in direction (90)\nforever\n    if <(level) = [12]> then\n        hide\n    end\nend\n\nwhen flag clicked\ngo to [back v] layer\nhide\npoint in direction (90)\nforever\n    if <(level) = [14]> then\n        show\n        turn right (10) degrees\n        go to [back v] layer\n        go to x: (99) y: (-171)\n    end\nend\n\nwhen flag clicked\ngo to [back v] layer\nhide\npoint in direction (90)\nforever\n    if <(level) = [15]> then\n        hide\n    end\nend\n\n@teleporter\n\nwhen flag clicked\nhide\nforever\n    if <(level) = [12]> then\n        show\n        go to x: (-180) y: (135)\n    end\nend\n\ngo to x: (-30) y: (-111)\n\nwhen flag clicked\nhide\nforever\n    if <(level) = [13]> then\n        hide\n    end\nend\n\ngo to x: (-139) y: (135)\n\n@Stop button\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\ngo to [back v] layer\nforever\n    if <(level) = [16]> then\n        go to [front v] layer\n        show\n    end\n    if <touching (player v)?> then\n        wait (0.1) seconds\n        switch costume to (costume2 v)\n        broadcast (the stop v)\n        hide\n        go to [back v] layer\n    end\nend\n\nwhen I receive [the stop v]\nswitch costume to (costume3 v)\n\n@Sprite2\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nset size to (290) %\n\nwhen I receive [the stop v]\nshow\ngo to [front v] layer\nswitch costume to (27575116_200x130 v)\nstart sound [sound effects explosion v]\nrepeat (19)\n    wait (0.02) seconds\n    next costume\nend\nwait (0.1) seconds\nhide\n\n