CUBED || PLATFORMER

Instructions: --------------------NEW PLATFORMER-------------------\nhttps://scratch.mit.edu/projects/397131412\n_________________________________________\n#10 on trending!!!\n[UPDATE] You can now use mobile!\n[UPDATE] Added 7 new levels!\n============================\nWelcome to land a platformer!\nYou can use Arrow Keys or WASD to Move\nDon't Touch Spikes!\nGet to the far right side of the screen to pass the level\nif you are struggling you can press R to reset the level \nHave fun and enjoy!\n\nPls leave a heart and star!\nLevel art from kenney.nl\nMost code by me!\nThx for my intro @mistaclean\nThe thumbnail text is from cooltext.com\nMusic is Nightcore - Faded by Alan Walker\n\n-Fox Out!\n\n\n\n-----------------------------------------\n#Mobile #GraphicFox #griffpatch #kenney.nl #cool #easy #awesome #Platformers #Platformer #Advertise #F4F #No #Don't #Do #THat #! #trending #platformer

@Stage\n\n@You\n\nwhen I receive [start v]\nbroadcast (Unmute v)\nforever\n    play sound [Purple%20Planet%20Music%20-%20Molten%20Alloy%20%281%3A50%29%20180bpm v] until done\nend\n\nwhen I receive [start v]\nchange [☁ players v] by (1)\nshow\ngo to [front v] layer\nswitch backdrop to (1 v)\ngo to x: (-200) y: (0)\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        point in direction (90)\n        change [xv v] by (1)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        point in direction (-90)\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                                set [yv v] to [10]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <touching (level v)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching (level v)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [yv v] to [15]\n        end\n    end\n    change y by (1)\n    if <(x position) > [220]> then\n        broadcast (New v)\n        go to x: (-200) y: (0)\n    end\n    if <[-160] > (y position)> then\n        start sound [Crunch v]\n        repeat (20)\n            change [ghost v] effect by (5)\n            change size by (.2)\n            change [pixelate v] effect by (20)\n        end\n        set size to (15) %\n        clear graphic effects\n        go to x: (-200) y: (0)\n        go to x: (-200) y: (0)\n    end\n    if <touching (spikes v)?> then\n        start sound [Crunch v]\n        repeat (20)\n            change [ghost v] effect by (5)\n            change size by (.2)\n            change [pixelate v] effect by (20)\n        end\n        set size to (15) %\n        clear graphic effects\n        go to x: (-200) y: (0)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [end v]\nhide\nstop all sounds\nstop [other scripts in sprite v]\nif <(Time) < (☁ Record)> then\n    set [☁ record v] to (Time)\nend\n\nwhen I receive [mute v]\nset volume to (0) %\n\nwhen I receive [unmute v]\nset volume to (100) %\n\nwhen I receive [start v]\nshow variable [☁ record v]\nshow variable [time v]\nset [time v] to [0]\nforever\n    wait (0) seconds\n    change [time v] by (0.03)\nend\n\nwhen flag clicked\nhide variable [time v]\nhide variable [☁ record v]\n\n@Intro\n\nwhen flag clicked\nstart sound [Intro v]\nshow\nswitch costume to (bbmlogo v)\nset [ghost v] effect to (0)\ngo to x: (0) y: (0)\nset size to (0) %\npoint in direction (90)\nrepeat (20)\n    change size by (5)\n    turn right (70) degrees\nend\npoint in direction (90)\nrepeat (5)\n    repeat (15)\n        change size by (.7)\n    end\n    repeat (15)\n        change size by (-.7)\n    end\nend\nwait (1) seconds\nrepeat (50)\n    change [ghost v] effect by (10)\nend\nhide\nbroadcast (Start v)\n\nwhen flag clicked\nset volume to (100) %\nwait (5) seconds\nrepeat (40)\n    change volume by (-2.5)\nend\n\n@Sprite1\n\nwhen flag clicked\nshow\n\nwhen I receive [start v]\nhide\n\n@Background\n\nwhen I receive [end v]\nhide\nstop all sounds\nstop [other scripts in sprite v]\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\n\n@Level\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nswitch costume to (1 v)\nshow\ngo to [front v] layer\ngo [backward v] (1) layers\n\nwhen I receive [new v]\nif <(costume [name v]) = [15]> then\n    broadcast (end v)\nelse\n    next costume\nend\n\nwhen I receive [end v]\nhide\nstop all sounds\nstop [other scripts in sprite v]\n\n@Spikes\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\nswitch costume to (1 v)\n\nwhen I receive [new v]\nnext costume\n\nwhen I receive [end v]\nhide\nstop all sounds\nstop [other scripts in sprite v]\n\n@Outro2Scratch\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [end v]\nadd (username) to [finishers v]\nwait (1.5) seconds\nforever\n    wait (pick random (.02) to (.2)) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to [front v] layer\nswitch costume to (pick random (1) to (4))\nif <(costume [number v]) = [4]> then\n    set size to (25) %\nelse\n    set size to (10) %\nend\npoint in direction (pick random (1) to (360))\ngo to x: (pick random (-240) to (240)) y: (182)\nshow\nglide (.5) secs to x: (x position) y: (-182)\nhide\ndelete this clone\n\n@OutroForScratch\n\ndefine Change Size (change) (speed)\nset [sizegoal v] to ((size) + (change))\nrepeat until <([abs v] of ((SizeGoal) - (size)) ) < [0.1]>\n    change size by (((SizeGoal) - (size)) * ((speed) / (5)))\nend\n\ndefine Glide (x) (y) (speed)\nrepeat (50)\n    change x by (((x) - (x position)) * ((speed) / (5)))\n    change y by (((y) - (y position)) * ((speed) / (5)))\nend\n\nwhen flag clicked\nset size to (100) %\nclear graphic effects\nswitch costume to (costume1 v)\nset [outro: clone id v] to [1]\ngo to x: (0) y: (0)\n\nwhen I start as a clone\nif <(Outro: Clone ID) = [1]> then\n    set size to (400) %\n    switch costume to (costume2 v)\n    go to x: (0) y: (195)\n    Glide (0) (0) (1.5)\nelse\n    if <(Outro: Clone ID) = [2]> then\n        go to [front v] layer\n        switch costume to (costume4 v)\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        delete this clone\n    else\n        if <(Outro: Clone ID) = [3]> then\n            switch costume to (costume5 v)\n            forever\n                point in direction ((([sin v] of (rfvdcsx) ) * (7)) + (90))\n                change y by ([sin v] of (rfvdcsx) )\n                change size by ([sin v] of (rfvdcsx) )\n                change [rfvdcsx v] by (10)\n            end\n        else\n            if <(Outro: Clone ID) = [4]> then\n                switch costume to (costume6 v)\n                Change Size (900) (0.8)\n            else\n                if <(Outro: Clone ID) = [5]> then\n                    set [ghost v] effect to (100)\n                    switch costume to (costume7 v)\n                    go to [front v] layer\n                    repeat (20)\n                        change [ghost v] effect by (-5)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(Outro: Clone ID) = [1]> then\n    wait until <(Outro: Clone ID) = [2]>\n    next costume\n    go to [front v] layer\n    Change Size (250) (0.5)\nend\n\nwhen I receive [end v]\nchange [☁ finishers v] by (1)\nwait (0.8) seconds\ncreate clone of (_myself_ v)\nwait (0.7) seconds\nrepeat (3)\n    change [outro: clone id v] by (1)\n    create clone of (_myself_ v)\nend\nwait (3) seconds\nset [outro: clone id v] to [5]\ncreate clone of (_myself_ v)\nwait (3) seconds\n\nwhen I receive [end v]\nwait (1.5) seconds\nforever\n    play sound [Outro v] until done\nend\n\nwhen I start as a clone\nwait (1) seconds\nforever\n    point in direction ((([sin v] of (rfvdcsx) ) * (7)) + (90))\n    change y by ([sin v] of (rfvdcsx) )\n    change size by ([sin v] of (rfvdcsx) )\n    change [rfvdcsx v] by (1)\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n@Poot\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    go to (you v)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [end v]\nhide\nstop all sounds\nstop [other scripts in sprite v]\n\nwhen I start as a clone\nshow\nrepeat (20)\n    change [ghost v] effect by (10)\n    change size by (-3)\nend\ndelete this clone\n\n@Sprite2\n\nwhen flag clicked\nhide\n\nwhen I receive [end v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [start v]\nshow\nforever\n    go to [front v] layer\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        if <(costume [name v]) = [0%]> then\n            switch costume to (100% v)\n            broadcast (Unmute v)\n        else\n            switch costume to (0% v)\n            broadcast (Mute v)\n        end\n        wait until <not <mouse down?>>\n    end\nend\n\n