Survival-A platformer
@Stage\n\nwhen flag clicked\n\nwhen I receive [volume v]\nforever\n    if <([costume # v] of [volume v]) = [1]> then\n        set volume to (100) %\n    end\n    if <([costume # v] of [volume v]) = [2]> then\n        set volume to (0) %\n    end\nend\n\nwhen flag clicked\nset volume to (100) %\nplay sound [Vicetone - United We Dance2 v] until done\n\nwhen I receive [1iaaxshow v]\nforever\n    play sound [ParagonX9 - Chaoz Fantasy v] until done\n    play sound [JJD - Adventure \[NCS Release\] \(1\) v] until done\n    play sound [TheFatRat - Unity v] until done\n    play sound [Vicetone - United We Dance v] until done\n    play sound [DEAF KEV - Invincible \[NCS Release\].mp3 v] until done\n    play sound [Mountains v] until done\nend\n\n@You\n\ndefine Walk (speed) Wall Jump (x) (y)\nchange x by (speed)\nset [slope v] to [0]\nrepeat until <<(Slope) = [8]> or <not <<touching color (#000000)?> or <touching (_edge_ v)?>>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <(Slope) = [8]> then\n    change y by ((0) - (Slope))\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or > then\n        if <<<<key (right arrow v) pressed?> or <key (a v) pressed?>> or <<key (left arrow v) pressed?> or <key (d v) pressed?>>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n            if <(speed) < [0]> then\n                set [sx v] to (x)\n            else\n                set [sx v] to ((0) - (x))\n            end\n            set [sy v] to (y)\n        end\n    end\n    repeat until <not <<touching color (#000000)?> or <touching (_edge_ v)?>>>\n        if <(speed) > [0]> then\n            change x by (-1)\n        else\n            change x by (1)\n        end\n    end\nend\n\ndefine Respawn\nset [sx v] to [0]\nset [sy v] to [0]\nset [falling? v] to [10]\nset size to (70) %\ngo to x: (-196) y: (-144)\nshow\n\ndefine Touch Ground <up?>\nchange [falling? v] by (1)\nrepeat until <not <<touching color (#000000)?> or <touching (_edge_ v)?>>>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    set [sy v] to [0]\nend\n\nwhen flag clicked\nset volume to (100) %\nhide\n\nwhen I receive [start v]\nbroadcast (levelchange v)\nset [level v] to [1]\nRespawn\nwait (0.4) seconds\nforever\n    change [sy v] by (-1.5)\n    change y by (SY)\n    Touch Ground <(SY) > [0]>\n    set [sx v] to ((SX) * (0.8))\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [sx v] by (-1.5)\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [sx v] by (1.5)\n    end\n    if <not <(SX) = [0]>> then\n        Walk (SX) Wall Jump (10) (11)\n    end\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        if <<(Jump Key) = [0]> and <(Falling?) < [3]>> then\n            set [sy v] to [14]\n            set [falling? v] to [6]\n        end\n    else\n        set [jump key v] to [0]\n    end\n    if <<(y position) < [-180]> or <touching color (#ff0000)?>> then\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        start sound [Ricochet v]\n        set [ghost v] effect to (0)\n        Respawn\n    end\n    if <touching color (#6e00ff)?> then\n        change [level v] by (1)\n        broadcast (levelchange v)\n        Respawn\n    end\nend\n\nwhen flag clicked\ngo to x: (-219) y: (-145)\n\nwhen I receive [levelxchange v]\nbroadcast (levelchange v)\nRespawn\n\nwhen I receive [respawn v]\nRespawn\n\nwhen [m v] key pressed\nset volume to (0) %\n\nwhen [u v] key pressed\nset volume to (100) %\n\nwhen I receive [1iaaxshow v]\nshow\n\nwhen flag clicked\nswitch costume to (you v)\n\nwhen [space v] key pressed\nchange [color v] effect by (5)\n\nwhen [c v] key pressed\nnext costume\n\nset [sy v] to [14]\n\nwhen flag clicked\nforever\n    if <touching color (#fcff00)?> then\n        set [sy v] to [27]\n    end\nend\n\nwhen I receive [up v]\n\nwhen I receive [left v]\n\nwhen I receive [right v]\n\nif  then\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [sx v] by (1.5)\nend\nif <not <(SX) = [0]>> then\n    Walk (SX) Wall Jump (10) (11)\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<[0] > (mouse y)> and <mouse down?>>> then\n    if <<(Jump Key) = [0]> and <(Falling?) < [3]>> then\n        set [sy v] to [14]\n        set [falling? v] to [6]\n    end\nelse\n    set [jump key v] to [0]\nend\nif <<(y position) < [-180]> or <touching color (#ff0000)?>> then\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    start sound [Ricochet v]\n    set [ghost v] effect to (0)\n    Respawn\nend\nif <touching color (#6e00ff)?> then\n    change [level v] by (1)\n    broadcast (levelchange v)\n    Respawn\nend\n\nwhen I receive [left v]\nchange [sx v] by (-1.5)\n\nif  then\nend\n\nwhen I receive [right v]\nchange [sx v] by (1.5)\n\nwhen I receive [up v]\nif <<(Jump Key) = [0]> and <(Falling?) < [3]>> then\n    set [sy v] to [14]\n    set [falling? v] to [6]\nelse\n    set [jump key v] to [0]\nend\n\nwhen I receive [wall jump v]\nif <not <(SX) = [0]>> then\n    Walk (SX) Wall Jump (10) (11)\nend\n\n@Platform\n\nwhen I receive [levelchange v]\nnext costume\n\nwhen flag clicked\nswitch costume to (intro v)\n\nwhen flag clicked\ngo to x: (4) y: (-170)\nhide\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [20]> then\n        broadcast (Ending v)\n        start sound [Tada v]\n        hide variable [level v]\n    end\nend\n\nwhen I receive [1iaaxshow v]\nshow\n\nwhen flag clicked\nhide variable [level v]\nset [level v] to [0]\n\nwhen I receive [levelchange v]\nshow variable [level v]\nchange [level v] by (1)\nchange [level v] by (-1)\n\n@Thumb\n\nwhen flag clicked\nhide\nforever\n    go to [front v] layer\nend\n\nwhen [timer v] > (my variable)\nbroadcast (STOP v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen flag clicked\nforever\n    set [my variable v] to ((timer) + (.1))\nend\n\nwhen flag clicked\nswitch costume to (costume2 v)\nhide\n\nhide variable [time v]\n\n@Sprite3\n\nwhen flag clicked\nhide\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (110) %\n    else\n        set size to (100) %\n    end\nend\n\nwhen this sprite clicked\nstart sound [mouse click v]\nbroadcast (start v)\nhide\n\nwhen I receive [1iaaxshow v]\nshow\n\n@vie\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [1iaaxshow v]\nshow\n\n@volume\n\nwhen flag clicked\nhide\nset size to (100) %\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (20)\n        change [ghost v] effect by (25)\n        wait until <not <touching (mouse-pointer v)?>>\n        change size by (-20)\n        change [ghost v] effect by (-25)\n    end\nend\n\nwhen this sprite clicked\nplay sound [mouse click v] until done\nnext costume\nbroadcast (Volume v)\n\nwhen flag clicked\nforever\n    go to x: (-220) y: (160)\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset volume to (100) %\n\n\n\nwhen I receive [1iaaxshow v]\nshow\n\n@skip\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    go to x: (217) y: (160)\nend\n\nwhen flag clicked\nset size to (100) %\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (20)\n        change [ghost v] effect by (25)\n        wait until <not <touching (mouse-pointer v)?>>\n        change size by (-20)\n        change [ghost v] effect by (-25)\n    end\nend\n\nwhen this sprite clicked\nstart sound [mouse click v]\nbroadcast (Levelxchange v)\nchange [level v] by (1)\n\nwhen I receive [start v]\nshow\n\nwhen I receive [ending v]\nhide\n\nwhen flag clicked\nset [time v] to [0]\n\n@Heart\n\nwhen flag clicked\nhide\npoint in direction (90)\n\nwhen I receive [start v]\nforever\n    wait (1) seconds\n    change [time v] by (1)\nend\n\nwhen I receive [ending v]\nshow\nforever\n    turn right (5) degrees\nend\n\nwhen I receive [ending v]\nstop [all v]\n\n@Star\n\nwhen I receive [ending v]\nshow variable [time v]\nshow\nforever\n    turn right (5) degrees\nend\n\nwhen flag clicked\nhide\npoint in direction (90)\n\nwhen flag clicked\nhide variable [time v]\n\n@Sprite4\n\nwhen flag clicked\nhide\npoint in direction (90)\nforever\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    repeat (20)\n        change [ghost v] effect by (-5)\n    end\nend\n\nwhen I receive [start v]\nhide\n\nchange [color v] effect by (25)\n\nwhen I receive [1iaaxshow v]\nshow\n\n@Cloud\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\nforever\n    go to [back v] layer\nend\n\n@Cloud2\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\nforever\n    go to [back v] layer\nend\n\n@retry\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nset size to (100) %\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (20)\n        change [ghost v] effect by (25)\n        wait until <not <touching (mouse-pointer v)?>>\n        change size by (-20)\n        change [ghost v] effect by (-25)\n    end\nend\n\nwhen I receive [start v]\nshow\n\nwhen this sprite clicked\nstart sound [mouse click v]\nbroadcast (Respawn v)\n\nwhen I receive [ending v]\nhide\n\n@bB\n\nwhen flag clicked\ngo to x: (17) y: (-93)\nhide\nforever\n    go to x: (-75) y: (-100)\n    change x by (pick random (-2) to (4))\n    change x by (pick random (-2) to (4))\n    change y by (pick random (-2) to (4))\n    change y by (pick random (-2) to (4))\nend\n\nwhen I receive [start v]\nhide\n\nwhen I receive [1iaaxshow v]\nshow\n\n@Sprite6\n\n@Sprite2\n\nwhen flag clicked\nshow\npoint in direction (90)\ngo to x: (0) y: (0)\nglide (1) secs to x: (-163) y: (0)\nbroadcast (Okdokie v)\nrepeat (72)\n    turn left (5) degrees\nend\nrepeat (3)\n    set size to (110) %\n    wait (01) seconds\n    set size to (100) %\n    wait (1) seconds\nend\nbroadcast (1iaaxshow v)\nhide\n\n@Sprite7\n\nwhen I receive [okdokie v]\nshow\n\nwhen flag clicked\nhide\n\nwhen I receive [1iaaxshow v]\nhide\n\n@Sprite8\n\nwhen flag clicked\nhide\n\nwhen I receive [okdokie v]\nshow\n\nwhen I receive [1iaaxshow v]\nhide\n\n@Sprite9\n\nwhen I receive [start v]\nshow\nforever\n    go to (random position v)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to (random position v)\nwait (1) seconds\ndelete this clone\n\nwhen flag clicked\nset [ghost v] effect to (0)\nhide\nforever\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nend\n\nwhen I receive [start v]\nshow\nforever\n    go to (random position v)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [start v]\nshow\nforever\n    go to [back v] layer\nend\n\n@Mobile\n\nwhen this sprite clicked\nstart sound [mouse click v]\nbroadcast (Mobile v)\n\nwhen I receive [start v]\nshow\n\nwhen flag clicked\nhide\n\nwhen I receive [ending v]\nhide\n\n@Sprite5\n\nwhen I receive [ending v]\nhide\n\nwhen flag clicked\ngo to x: (-16) y: (73)\nhide\n\nwhen I receive [mobile v]\nshow\nset drag mode [draggable v]\nforever\n    go to [back v] layer\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        broadcast (Up v)\n    end\nend\n\n@Sprite10\n\nwhen I receive [ending v]\nhide\n\nwhen I receive [mobile v]\nshow\nset drag mode [draggable v]\nforever\n    go to [back v] layer\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        broadcast (Left v)\n    end\nend\n\nwhen flag clicked\ngo to x: (-60) y: (31)\nhide\n\n@Sprite11\n\nwhen I receive [ending v]\nhide\n\nwhen flag clicked\ngo to x: (26) y: (34)\nhide\n\nwhen I receive [mobile v]\nshow\nset drag mode [draggable v]\nforever\n    go to [back v] layer\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        broadcast (Right v)\n    end\nend\n\n@Sprite12\n\nwhen I receive [ending v]\nhide\n\nwhen I receive [mobile v]\nset drag mode [draggable v]\nshow\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\ngo to x: (-15) y: (29)\nhide\n\n@Close\n\nwhen flag clicked\nhide\n\nwhen I receive [help v]\nshow\ngo to [front v] layer\ngo [forward v] (1) layers\n\nwhen this sprite clicked\nstart sound [mouse click v]\nbroadcast (close v)\nhide\n\n@Help\n\nwhen this sprite clicked\nstart sound [mouse click v]\nbroadcast (Help v)\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [1iaaxshow v]\nshow\n\nwhen I receive [close v]\nshow\n\nwhen I receive [start v]\nhide\n\nshow\n\n@Tab\n\nwhen flag clicked\nhide\n\nwhen I receive [help v]\nshow\ngo to [front v] layer\ngo [backward v] (1) layers\n\nwhen I receive [close v]\nhide\n\n@Text/Guide\n\nwhen I receive [start v]\nshow\n\nwhen flag clicked\nswitch costume to (level0 v)\nhide\n\nwhen I receive [levelchange v]\nnext costume\n\n
Scroll down or hit the question button for instructions!\nADDED IN-GAME TEXT/GUIDE FOR 600 VIEWS.\nNEW MOBILE MODE! HIT THE MOBILE  BUTTON ON TOP OF THE SCREEN AND HOT THE KEYS TO MOVE!(You can drag the keys)\nAdded 4 new levels.\nADDED BOUNCE PADS AND NEW LEVELS!\nHit space to change your colour\nHit 'c' to change skin\nADDED NEW LEVELS VARIABLE!\nCheck out my new games: https://scratch.mit.edu/projects/381219319/\nhttps://scratch.mit.edu/projects/382268404/\nhttps://scratch.mit.edu/projects/384268131/\nCheck out my new animation(my first one):\nhttps://scratch.mit.edu/projects/382595378/\n----------------------------UPDATE~3-----------------------------\n Added more new levels! new guide and new end - game thumbnail!\n-------------------------INSTRUCTIONS-------------------------\nArrow keys to move, touch the purple portal to go to the next level. Red is lava so don't touch red(lava) or you die. Yellow is the bounce pad so jump higher by touching yellow!\n-------------------------------------------------------------------------\nI hope we can get this in featured!\n----------------------------KEYBINDS------------------------------\nPress "m" to mute.(sound EFFECTS)\nPress "u" to unmute(sound EFFECTS) \nPress the button on the top left corner to mute ONLY music.\nPress the button on the top-center to reset\nPress the button on top right to skip.\nGame can now be played on mobile!\nKnown bugs:\nNOTE:There is a bug in people using mobile when they tap right, the player goes left. To avoid it, reset the player by clicking the reset button at the top of the screen.(I know it does not affect anything but just try)\nWall jump does not work on mobile:(