Save Nature - (A Platformer) - Part 3 - #All#Art#Games#Trending

Instructions: Save Nature - A platformer (Part 3)\nIf you want to save nature, then go and donate to https://teamtrees.org/ - Team Trees!\nhttps://scratch.mit.edu/projects/640036112/ - 500 followers PFP contest!!!\n\n#3rd on trending, All.\n#9th on trending, Games.\n\nPlease propose it to be featured in this studio - https://scratch.mit.edu/studios/28715018/\n\nHey, guys! I am currently against @SRIJAN2412 to 1k, please help me win by following me!\n----------------------------------------------------------------------\nUPDATES ( In respect of Part 2 ):-\n> Improved Graphics.\n> Background and Platform confusion removed.\n----------------------------------------------------------------------\nRules:\n> !! MOBILE FRIENDLY !!\n> !! NO ADVERTISING !!\n\nADVERTISEMENTS AND SPAM WILL BE DELETED! - STRICT RULE\n----------------------------------------------------------------------\n\nAs you all know, we must save our nature. It is going down due to different reasons such as cutting them down, and not planting them again, so that's why I am making a platformer series on saving nature!\n\n----------------------------------------------------------------------\n\nControls: Arrow keys or WASD\nPower-Ups: \n>Green button or P to go ahead a few steps.\n>Red button or R to go back to the start position.\n\nIf you hover your mouse on my logo icon, then a love and fav button will appear, click it to close it.

@Stage\n\nwhen flag clicked\nforever\n    play sound [\[MP3FY\] Clarx & Harddope - Castle  v] until done\nend\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\nset [stage: level v] to [1]\nforever\n    go to x: (0) y: (0)\nend\n\nwhen I receive [intro finish v]\ngo to [front v] layer\ngo [backward v] (5) layers\n\nwhen I receive [next level v]\nnext costume\nchange [stage: level v] by (1)\n\nwhen I receive [levelübergang v]\nnext costume\nchange [stage: level v] by (1)\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nshow\ngo to [front v] layer\ngo [forward v] (10000) layers\nwait (0.5) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\ngo to [front v] layer\n\n@Player\n\nwhen I receive [death v]\nset rotation style [all around v]\nset [gravity v] to [10]\nrepeat until <(y position) < [-179]>\n    switch costume to (bye-bye v)\n    go to [front v] layer\n    turn right (10) degrees\n    change y by (Gravity)\n    change [gravity v] by (-1)\nend\nset rotation style [left-right v]\n\nwhen I receive [start v]\npoint in direction (90)\nset rotation style [left-right v]\nshow\nhide variable [y v]\nhide variable [x v]\nset [y v] to [0]\nset [x v] to [0]\nforever\n    change [y v] by (-1)\n    if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(x position) > (mouse x)>>>> then\n        point in direction (-90)\n        change [x v] by (-1)\n    end\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n        point in direction (90)\n        change [x v] by (1)\n    end\n    set [x v] to ((X) * (0.9))\n    change x by (X)\n    if <<touching (platformer v)?> or <touching (helper v)?>> then\n        change y by (1)\n    end\n    if <<touching (platformer v)?> or <touching (helper v)?>> then\n        change y by (1)\n    end\n    if <<touching (platformer v)?> or <touching (helper v)?>> then\n        change y by (1)\n    end\n    if <<touching (platformer v)?> or <touching (helper v)?>> then\n        change y by (1)\n    end\n    if <<touching (platformer v)?> or <touching (helper v)?>> then\n        change y by (-4)\n        change x by ((X) * (-1))\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n            set [y v] to [17]\n            if <(X) > [0]> then\n                set [x v] to [-10]\n            else\n                set [x v] to [10]\n            end\n        else\n            set [x v] to [0]\n        end\n    end\n    change y by (Y)\n    if <<touching (platformer v)?> or <touching (helper v)?>> then\n        change y by ((Y) - ((Y) * (2)))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> and <touching (platformer v)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    if <<touching (spikes  v)?> or <<touching (attackers v)?> or <touching (lava v)?>>> then\n        broadcast (Death v) and wait\n        go to x: (-217) y: (100)\n        point in direction (90)\n        set rotation style [left-right v]\n        broadcast (Reset the moving variables v)\n        clear graphic effects\n    end\n    if <(x position) > [222]> then\n        hide\n        broadcast (Next Level v) and wait\n        go to x: (-214) y: (100)\n        broadcast (Reset the moving variables v)\n        show\n        clear graphic effects\n    end\nend\n\nwhen I receive [reset the moving variables v]\nset [x v] to [0]\nset [y v] to [0]\n\nwhen flag clicked\ngo to x: (-214) y: (100)\npoint in direction (90)\n\nwhen I receive [skip v]\nhide\ngo to x: (-214) y: (170)\nbroadcast (Next Level v)\nbroadcast (Reset the moving variables v)\nshow\n\nwhen flag clicked\nforever\n    if <<touching (bounce v)?> or <touching (bounce2 v)?>> then\n        set [y v] to [20]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (speed2 v)?> then\n        change [x v] by (10)\n    end\n    if <<<touching (speed3 v)?> or <touching (speed4 v)?>> or <<touching (speed5 v)?> or <<touching (speed6 v)?> or <<touching (speed v)?> or <<<touching (speed8 v)?> or <<touching (speed9 v)?> or <touching (speed10 v)?>>> or <touching (speed11 v)?>>>>>> then\n        change [x v] by (-10)\n    end\n    if <touching (speed7 v)?> then\n        change [y v] by (-10)\n    end\nend\n\nwhen flag clicked\nbroadcast (Start v)\n\nwhen flag clicked\nforever\n    if <<<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> or <<key (left arrow v) pressed?> or <<mouse down?> and <(x position) > (mouse x)>>>> then\n        if <not <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n            switch costume to (side v)\n        else\n            switch costume to (up-side v)\n        end\n    else\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            if <<<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> or <<key (left arrow v) pressed?> or <<mouse down?> and <(x position) > (mouse x)>>>> then\n                switch costume to (up-side v)\n            else\n                switch costume to (up v)\n            end\n        else\n            if <<key (down arrow v) pressed?> or <<mouse down?> and <(y position) > (mouse y)>>> then\n                switch costume to (squueze v)\n            else\n                switch costume to (middle v)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nshow\ngo to x: (-205) y: (-54)\nforever\n    if <<<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> and <touching (water v)?>> then\n        change [y v] by (1)\n        if <<<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> and <not <touching (water v)?>>> then\n            set [y v] to [-1]\n        end\n    end\nend\n\nwhen I receive [next level v]\ngo to x: (-205) y: (-55)\n\nwhen flag clicked\nswitch costume to (middle v)\nforever\n    wait (0.1) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nswitch costume to (trail v)\nrepeat (20)\n    change size by (-5)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    if <key (p v) pressed?> then\n        wait (0.5) seconds\n        change x by (80)\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (r v) pressed?> then\n        wait (0.6) seconds\n        go to x: (-217) y: (50)\n    end\nend\n\nwhen I receive [bp v]\nwait (0.6) seconds\ngo to x: (-217) y: (50)\n\nwhen I receive [tp v]\nwait (0.5) seconds\nchange x by (80)\n\n@Spikes \n\nwhen flag clicked\npoint in direction (90)\nshow\nforever\n    go to x: (0) y: (0)\nend\n\nif <<(level) = [7]> or <<(level) = [12]> or <<(level) = [28]> or <(level) = [29]>>>> then\n    point in direction (90)\n    repeat (15)\n        move (5) steps\n    end\n    repeat (30)\n        change x by (-5)\n    end\n    repeat (15)\n        move (5) steps\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset [level v] to [1]\n\nwhen flag clicked\nforever\n    go to [back v] layer\n    go [forward v] (1) layers\nend\n\nwhen I receive [next level v]\nnext costume\n\nwhen I receive [next level v]\nchange [level v] by (1)\n\nset y to ((([sin v] of (((timer) + (Lava)) * (300)) ) * (2)) - ((Lava) * (4)))\n\n@Love fave\n\nwhen flag clicked\nset [love fave: costume v] to [0]\nhide\nforever\n    if <not <<(B) = [1]> and <(A) = [1]>>> then\n        wait (pick random (25) to (35)) seconds\n        switch costume to (costume1 v)\n        go to x: (0) y: (50)\n        show\n        go to [front v] layer\n        repeat (9)\n            change y by (-6)\n        end\n        repeat (5)\n            change y by (3)\n        end\n        repeat (5)\n            change y by (-1)\n        end\n        wait (2) seconds\n        repeat (15)\n            change y by (7)\n        end\n        hide\n    end\n    if <(Love fave: Costume) > [0]> then\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I receive [game over \(you win\) v]\nhide\n\n@detector\n\nwhen I start as a clone\nif <(Clones) = [0]> then\n    go to x: (-15) y: (0)\n    set [b v] to [0]\n    switch costume to (love v)\n    forever\n        set [b v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [b v] to [1]\n            broadcast (Show Text v)\n        end\n    end\nend\nif <(Clones) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    set [a v] to [0]\n    forever\n        set [a v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [a v] to [1]\n            broadcast (Show Text v)\n        end\n    end\nend\n\nwhen flag clicked\nhide\nset [a v] to [0]\nset [b v] to [0]\nset [clones v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clones v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(B) = [1]> and <(A) = [1]>>\nwait (1) seconds\nshow\ngo to x: (0) y: (50)\nreset timer\nswitch costume to (pick random (1) to (4))\nset [ghost v] effect to (100)\nrepeat until <(timer) > [3.5]>\n    change y by ((y position) / (-15))\n    change [ghost v] effect by (-3)\nend\nreset timer\nrepeat until <(timer) > [3.5]>\n    change y by (((y position) - (-100)) / (-15))\n    change [ghost v] effect by (10)\nend\n\nwhen I start as a clone\nif <(Clones) = [0]> then\n    go to x: (-15) y: (0)\nend\nif <(Clones) = [1]> then\n    go to x: (0) y: (0)\nend\n\n@Skip\n\nwhen this sprite clicked\nbroadcast (Next Level v)\n\nwhen flag clicked\nshow\ngo to x: (-180) y: (-142)\ngo to [front v] layer\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (100) %\n    else\n        set size to (80) %\n    end\n    point in direction ((([sin v] of ((Direction) * (300)) ) * (10)) + (90))\n    change [direction v] by (0.01)\nend\n\nwhen I receive [game over \(you win\) v]\n\nhide\n\nwhen flag clicked\nforever\n    if <(level) = [25]> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [over v]\n\nhide\n\n@Level tranzition\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\ngo [forward v] (1) layers\ngo to [front v] layer\nset x to (500)\nshow\nrepeat (6)\n    change x by (-80)\nend\nchange x by (-15)\nwait (0.6) seconds\nrepeat (5)\n    change x by (-80)\nend\nhide\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Platformer\n\nwhen I receive [levelübergang v]\nnext costume\nchange [level v] by (1)\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\nset [level v] to [1]\nforever\n    go to x: (0) y: (0)\nend\n\nwhen I receive [intro finish v]\ngo to [front v] layer\ngo [backward v] (5) layers\n\nwhen I receive [next level v]\nnext costume\nchange [level v] by (1)\n\nwhen flag clicked\nforever\n    if <(level) = [20]> then\n        broadcast (Over v)\n    end\nend\n\n@Logo\n\nwhen flag clicked\ngo to [front v] layer\nshow\nforever\n    set [ghost v] effect to (50)\n    glide (1) secs to x: (0) y: (-15)\n    glide (1) secs to x: (0) y: (-5)\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        broadcast (show follow v)\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [show follow v]\ngo to [front v] layer\ngo to x: (0) y: (-140)\nshow\nforever\n    repeat (6)\n        wait (0.04) seconds\n        next costume\n        point in direction ((([sin v] of ((Direction) * (300)) ) * (5)) + (90))\n        change [direction v] by (0.01)\n    end\nend\n\nwhen this sprite clicked\nhide\n\n@Texts\n\nwhen I receive [levelübergang v]\nnext costume\nchange [level v] by (1)\n\nwhen flag clicked\nshow\ngo to [front v] layer\nswitch costume to (costume1 v)\nset [level v] to [1]\nforever\n    go to x: (0) y: (0)\nend\n\nwhen I receive [intro finish v]\ngo to [front v] layer\n\nwhen I receive [next level v]\nnext costume\nchange [level v] by (1)\n\nwhen flag clicked\nforever\n    if <(level) = [14]> then\n        broadcast (Over v)\n    end\nend\n\n@Lava\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset [level v] to [1]\n\nwhen flag clicked\nforever\n    go to [back v] layer\n    go [forward v] (1) layers\nend\n\nwhen I receive [next level v]\nnext costume\n\nwhen I receive [next level v]\nchange [level v] by (1)\n\nwhen flag clicked\npoint in direction (90)\nshow\nforever\n    go to x: (0) y: (0)\n    set y to ((([sin v] of (((timer) + (Lava)) * (300)) ) * (4)) - ((Lava) * (6)))\n    if <<(level) = [10]> or <(level) = [13]>> then\n        turn right (5) degrees\n        go to x: (160) y: (-70)\n    else\n        point in direction (90)\n    end\nend\n\n@Assets\n\nwhen flag clicked\nhide\n\n@Trash2\n\nwhen flag clicked\nhide\nforever\n    wait until <(Stage: level) = [8]>\n    switch costume to (costume1 v)\n    show\n    wait until <touching (player v)?>\n    hide\n    wait until <(Stage: level) = [11]>\n    show\n    switch costume to (costume2 v)\n    wait until <touching (player v)?>\n    hide\n    wait until <(Stage: level) = [14]>\n    show\n    switch costume to (costume3 v)\n    wait until <touching (player v)?>\n    hide\nend\n\n@Back\n\nwhen this sprite clicked\nwait (0.5) seconds\nbroadcast (BP v)\n\nwhen flag clicked\ngo to [front v] layer\nshow\nforever\n    set [ghost v] effect to (30)\n    glide (1) secs to x: (30) y: (0)\n    glide (1) secs to x: (30) y: (-10)\nend\n\n@Go\n\nwhen this sprite clicked\nwait (0.5) seconds\nbroadcast (TP v)\n\nwhen flag clicked\ngo to [front v] layer\nshow\nforever\n    set [ghost v] effect to (30)\n    glide (1) secs to x: (30) y: (0)\n    glide (1) secs to x: (30) y: (-10)\nend\n\n@Trash\n\nwhen flag clicked\nhide\nforever\n    wait until <(Stage: level) = [8]>\n    switch costume to (costume1 v)\n    show\n    wait until <touching (player v)?>\n    hide\n    wait until <(Stage: level) = [12]>\n    show\n    switch costume to (costume3 v)\n    wait until <touching (player v)?>\n    hide\n    wait until <(Stage: level) = [13]>\n    show\n    switch costume to (costume2 v)\n    wait until <touching (player v)?>\n    hide\nend\n\n@Trash3\n\nwhen flag clicked\nhide\nforever\n    wait until <(Stage: level) = [15]>\n    switch costume to (costume3 v)\n    show\n    wait until <touching (player v)?>\n    hide\n    wait until <(Stage: level) = [18]>\n    show\n    switch costume to (costume2 v)\n    wait until <touching (player v)?>\n    hide\n    wait until <(Stage: level) = [22]>\n    show\n    switch costume to (costume1 v)\n    wait until <touching (player v)?>\n    hide\nend\n\n@Attackers\n\nwhen flag clicked\npoint in direction (90)\nshow\nforever\n    go to x: (0) y: (0)\n    repeat (15)\n        move (5) steps\n    end\n    repeat (30)\n        change x by (-5)\n    end\n    repeat (15)\n        move (5) steps\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset [level v] to [1]\n\nwhen flag clicked\nforever\n    go to [back v] layer\n    go [forward v] (1) layers\nend\n\nwhen I receive [next level v]\nnext costume\n\nwhen I receive [next level v]\nchange [level v] by (1)\n\n