SUNNY | -a scrolling platformer-

Instructions: Hello Guys, So I'am Noticing A Big Change On My Profile.\n\n(SUNNY 2)\nhttps://scratch.mit.edu/projects/417126652/\n(SUNNY 3)\nhttps://scratch.mit.edu/projects/418545496/\n\n\nSince The End Of @corpcooga Contest Iam Actually Getting (SEMI - FAMOUS) So To Celebrate This Victory I Present This New Scrolling Platformer!!!!\n\nINSTRUCTIONS :-\n* Arrow Keys, WASD, Mobile Controls\n* Avoid Spikes And Lava\n* Get To The Portals\n* Finish The Game!!\n* Like And Star This Project        :-)\n\nMORE STUFF :-\n* Propose This To Be Featured Here :-\nhttps://scratch.mit.edu/studios/4228481/\n \nSHOUTOUTS:-\n* @Aiden4549 For The Epic Logo\n* @_Underscore For The Amazing Intro\n\nCREDITS:-\n@clareyberry For The Engine And Lava\n@TimMcCool For The Character\n@SullyBully For The Background,Portals And Clouds\nRest Art And Code By Me!\n\nTAGS:-\n#SUNNY#a#scrolling#platformer#Sequel#Games#Art#Best\n\nHave Fun!          Mahdi Out   (-_-)

@Stage\n\nwhen I receive [intro finished v]\nswitch backdrop to (game v)\nchange [pitch v] effect by (10)\nwait (1) seconds\nset volume to (50) %\nforever\n    play sound [Frontier - Doctor Vox v] until done\nend\n\nwhen flag clicked\nswitch backdrop to (intro v)\n\nwhen flag clicked\nforever\n\n@Intro\n\nwhen flag clicked\nset [intro1 v] to [0]\nset [intro2 v] to [0]\nset [intro3 v] to [0]\nset volume to (100) %\nstart sound [Xenogenesis v]\nswitch costume to (blank v)\nset [id v] to [1]\nrepeat (18)\n    create clone of (_myself_ v)\n    change [id v] by (1)\nend\nwait (13) seconds\nbroadcast (Intro finished v)\nrepeat (20)\n    change volume by (-5)\nend\nstop all sounds\n\nwhen I start as a clone\nif <(Id) = [1]> then\n    hide\n    switch costume to (backdrop v)\n    go to x: (-1000) y: (164)\n    wait (0) seconds\n    show\n    glide (0.2) secs to x: (0) y: (164)\n    wait (10) seconds\n    glide (0.2) secs to x: (1000) y: (164)\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Id) = [2]> then\n    hide\n    switch costume to (backdrop v)\n    go to x: (-1000) y: (134)\n    wait (0.2) seconds\n    show\n    glide (0.2) secs to x: (0) y: (134)\n    wait (10) seconds\n    glide (0.2) secs to x: (1000) y: (134)\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Id) = [3]> then\n    hide\n    switch costume to (backdrop v)\n    go to x: (-1000) y: (104)\n    wait (0.4) seconds\n    show\n    glide (0.2) secs to x: (0) y: (104)\n    wait (10) seconds\n    glide (0.2) secs to x: (1000) y: (104)\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Id) = [4]> then\n    hide\n    switch costume to (backdrop v)\n    go to x: (-1000) y: (74)\n    wait (0.6) seconds\n    show\n    glide (0.2) secs to x: (0) y: (74)\n    wait (10) seconds\n    glide (0.2) secs to x: (1000) y: (74)\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Id) = [5]> then\n    hide\n    switch costume to (backdrop v)\n    go to x: (-1000) y: (44)\n    wait (0.8) seconds\n    show\n    glide (0.2) secs to x: (0) y: (44)\n    wait (10) seconds\n    glide (0.2) secs to x: (1000) y: (44)\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Id) = [6]> then\n    hide\n    switch costume to (backdrop v)\n    go to x: (-1000) y: (14)\n    wait (1.0) seconds\n    show\n    glide (0.2) secs to x: (0) y: (14)\n    wait (10) seconds\n    glide (0.2) secs to x: (1000) y: (14)\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Id) = [7]> then\n    hide\n    switch costume to (backdrop v)\n    go to x: (-1000) y: (-24)\n    wait (1.2) seconds\n    show\n    glide (0.2) secs to x: (0) y: (-24)\n    wait (10) seconds\n    glide (0.2) secs to x: (1000) y: (-24)\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Id) = [8]> then\n    hide\n    switch costume to (backdrop v)\n    go to x: (-1000) y: (-54)\n    wait (1.4) seconds\n    show\n    glide (0.2) secs to x: (0) y: (-54)\n    wait (10) seconds\n    glide (0.2) secs to x: (1000) y: (-54)\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Id) = [9]> then\n    hide\n    switch costume to (backdrop v)\n    go to x: (-1000) y: (-84)\n    wait (1.6) seconds\n    show\n    glide (0.2) secs to x: (0) y: (-84)\n    wait (10) seconds\n    glide (0.2) secs to x: (1000) y: (-84)\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Id) = [10]> then\n    hide\n    switch costume to (backdrop v)\n    go to x: (-1000) y: (-114)\n    wait (1.8) seconds\n    show\n    glide (0.2) secs to x: (0) y: (-114)\n    wait (10) seconds\n    glide (0.2) secs to x: (1000) y: (-114)\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Id) = [11]> then\n    hide\n    switch costume to (backdrop v)\n    go to x: (-1000) y: (-144)\n    wait (2) seconds\n    show\n    glide (0.2) secs to x: (0) y: (-144)\n    wait (10) seconds\n    glide (0.2) secs to x: (1000) y: (-144)\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Id) = [12]> then\n    hide\n    switch costume to (backdrop v)\n    go to x: (-1000) y: (-174)\n    wait (2.2) seconds\n    show\n    glide (0.2) secs to x: (0) y: (-174)\n    wait (10) seconds\n    glide (0.2) secs to x: (1000) y: (-174)\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Id) = [15]> then\n    go to [front v] layer\n    set size to (100) %\n    hide\n    switch costume to (logo white bg v)\n    go to x: (0) y: (-400)\n    wait (2) seconds\n    show\n    wait (0.15) seconds\n    repeat (35)\n        change y by ((y position) / (-5))\n    end\n    repeat (10)\n        change size by (((110) - (size)) / (2))\n    end\n    repeat (180)\n        change [intro1 v] by (10)\n        point in direction ((90) + (([sin v] of (Intro1) ) * (20)))\n    end\n    repeat (10)\n        change size by (((100) - (size)) / (2))\n    end\n    go to x: (0) y: (-1)\n    repeat (35)\n        change y by ((y position) / (5))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Id) = [16]> then\n    set size to (100) %\n    hide\n    switch costume to (shine v)\n    go to x: (0) y: (-400)\n    wait (2) seconds\n    show\n    wait (0.15) seconds\n    repeat (35)\n        change y by ((y position) / (-5))\n    end\n    repeat (10)\n        change size by (((500) - (size)) / (3))\n    end\n    repeat (180)\n        turn right (4) degrees\n    end\n    repeat (10)\n        change size by (((100) - (size)) / (3))\n    end\n    go to x: (0) y: (-1)\n    repeat (35)\n        change y by ((y position) / (5))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Id) = [14]> then\n    set [ghost v] effect to (40)\n    set size to (100) %\n    hide\n    switch costume to (logo shadow v)\n    go to x: (0) y: (-400)\n    wait (2) seconds\n    show\n    wait (0.15) seconds\n    repeat (35)\n        change y by ((y position) / (-5))\n    end\n    repeat (10)\n        change size by (((110) - (size)) / (2))\n    end\n    repeat (180)\n        change [intro1 v] by (10)\n        point in direction ((90) + (([sin v] of (Intro1) ) * (20)))\n    end\n    repeat (10)\n        change size by (((100) - (size)) / (2))\n    end\n    go to x: (0) y: (-1)\n    repeat (35)\n        change y by ((y position) / (5))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Id) = [13]> then\n    set [ghost v] effect to (50)\n    set size to (100) %\n    hide\n    switch costume to (blur-er v)\n    go to x: (0) y: (400)\n    wait (1.7) seconds\n    show\n    wait (0.15) seconds\n    repeat (35)\n        change y by ((y position) / (-5))\n    end\n    repeat (10)\n        change size by (((110) - (size)) / (2))\n    end\n    repeat (170)\n    repeat (10)\n        change size by (((100) - (size)) / (2))\n    end\n    go to x: (0) y: (1)\n    repeat (35)\n        change y by ((y position) / (5))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Id) = [17]> then\n    set size to (100) %\n    hide\n    switch costume to (name v)\n    go to x: (0) y: (-400)\n    wait (2) seconds\n    go to [front v] layer\n    show\n    wait (0.15) seconds\n    repeat (35)\n        change y by ((y position) / (-5))\n    end\n    repeat (10)\n        change size by (((110) - (size)) / (2))\n    end\n    repeat (180)\n        change [intro3 v] by (0.05)\n        set y to (([cos v] of ((Intro3) * (200)) ) * (10))\n    end\n    repeat (10)\n        change size by (((100) - (size)) / (2))\n    end\n    go to x: (0) y: (-1)\n    repeat (35)\n        change y by ((y position) / (5))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Id) = [18]> then\n    set size to (100) %\n    set [ghost v] effect to (40)\n    hide\n    switch costume to (name shadow v)\n    go to x: (0) y: (-400)\n    wait (2) seconds\n    show\n    wait (0.15) seconds\n    repeat (35)\n        change y by ((y position) / (-5))\n    end\n    repeat (10)\n        change size by (((110) - (size)) / (2))\n    end\n    repeat (180)\n        change [intro3 v] by (0.05)\n        set y to (([cos v] of ((Intro3) * (200)) ) * (10))\n    end\n    repeat (10)\n        change size by (((100) - (size)) / (2))\n    end\n    go to x: (0) y: (-1)\n    repeat (35)\n        change y by ((y position) / (5))\n    end\n    delete this clone\nend\n\n@Player\n\nwhen I receive [platformer v]\nif <(cl) = [0]> then\n    Platformer\n    create clone of (_myself_ v)\n    broadcast (Lvl v)\nend\n\ndefine Platformer\nswitch costume to ((<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> - <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>>) + (2))\nchange x by (Xspeed)\nif <touching color (#0cc216)?> then\n    repeat (8)\n        if <touching color (#0cc216)?> then\n            change y by (1)\n        end\n    end\n    if <touching color (#0cc216)?> then\n        change y by (-8)\n        repeat until <not <touching color (#0cc216)?>>\n            change x by ((0) - ((Xspeed) / ([abs v] of (Xspeed) )))\n        end\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > (y position)> and <mouse down?>>>> then\n            set [xspeed v] to ((15) * ((0) - ((Xspeed) / ([abs v] of (Xspeed) ))))\n            set [yspeed v] to [12]\n        else\n            set [xspeed v] to [0]\n        end\n    end\nend\nchange [xspeed v] by ((2) * (<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> - <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>>))\nchange [xspeed v] by (<(Xspeed) < [0]> - <(Xspeed) > [0]>)\nchange [xspeed v] by (<(Xspeed) < [-10]> - <(Xspeed) > [10]>)\nchange y by (Yspeed)\nif <touching color (#0cc216)?> then\n    repeat until <not <touching color (#0cc216)?>>\n        change y by ((0) - ((Yspeed) / ([abs v] of (Yspeed) )))\n    end\n    if <<(Yspeed) < [0]> and <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > (y position)> and <mouse down?>>>>> then\n        set [yspeed v] to [14]\n    else\n        set [yspeed v] to [0]\n    end\nend\nif <touching color (#b92fa3)?> then\n    set [scrollx v] to [50]\n    set [xspeed v] to [0]\n    set [yspeed v] to [0]\n    set y to (0)\n    broadcast (Next Level v)\nend\nif <<<touching color (#ff5300)?> or <touching color (#525252)?>> or <touching color (#838383)?>> then\n    set [scrollx v] to [50]\n    set [xspeed v] to [0]\n    set [yspeed v] to [0]\n    set y to (0)\nend\nchange [yspeed v] by (-1)\nchange [scrollx v] by (x position)\nset x to (0)\n\nwhen I start as a clone\nset [cl v] to [1]\nset [trail v] to (ScrollX)\nswitch costume to (costume1 v)\nset [ghost v] effect to (30)\nrepeat (10)\n    change [ghost v] effect by (7)\n    change size by (-5)\n    set x to ((Trail) - (ScrollX))\nend\ndelete this clone\n\nwhen I receive [intro finished v]\nset [cl v] to [0]\nset [scrollx v] to [50]\nset [xspeed v] to [0]\nset [yspeed v] to [0]\ngo to x: (0) y: (0)\nshow\n\nwhen flag clicked\nhide\n\n@Level\n\ndefine Go to pos\nswitch costume to (big v)\nset x to ((MyX) - (ScrollX))\nswitch costume to (lvlsegc)\n\nwhen I receive [lvl v]\nGo to pos\nif <(MyX) = [2400]> then\n    broadcast (Platformer v)\nend\n\nwhen I start as a clone\ngo to [back v] layer\n\nwhen I receive [next level v]\nchange [lvlsegc v] by (5)\n\ndefine Create lvl\nrepeat (5)\n    create clone of (_myself_ v)\n    change [lvlsegc v] by (1)\n    change [myx v] by (480)\nend\n\nwhen I receive [intro finished v]\nset [myx v] to [0]\nset [lvlsegc v] to [1]\nswitch costume to (costume1 v)\nshow\nset y to (0)\nCreate lvl\nhide\nbroadcast (Platformer v)\n\n@Clouds\n\nwhen flag clicked\nhide\n\nwhen I receive [intro finished v]\nforever\n    go to [back v] layer\n    create clone of (_myself_ v)\n    wait (pick random (3) to (5)) seconds\nend\n\nwhen I start as a clone\nshow\nswitch costume to (pick random (1) to (4))\ngo to x: (200) y: (pick random (70) to (120))\nrepeat (170)\n    change x by (-2.5)\nend\ndelete this clone\n\n@TN\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n