Aqua - a Monochromatic Platformer

Instructions:            Aqua\n           a Monochromatic Platformer \n           by @StervingDuckHead ft. @UnstripedZebra\n\n========================================\nInstructions\n♦️Use arrow keys or WASD to move player\n♦️Don't touch lava or spikes\n♦️Click K to change music\n♦️Click music icon to mute and unmute\n♦️Click R to restart\n♦️Click N to skip level\n♦️Click P to go back a level\n♦️There are 10 levels and they are all very easy\n♦️Click O to exit Credits\n♦️Once you reach the end click the restart button to play again!\n\nReport any bugs you find to me \n( @StervingDuckHead ) or to my brother \n( @UnstripedZebra )

@Stage\n\nwhen I receive [start v]\nif <(turbo mode?) = [true]> then\n    set volume to (0) %\nend\nif <(turbo mode?) = [false]> then\n    set volume to (100) %\n    set [ghost v] effect to (100)\n    wait (.5) seconds\n    start sound [Connect v]\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    wait (5) seconds\n    start sound [Disconnect v]\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    broadcast (Intro Done v)\nend\n\n@White Line (Intro)\n\nwhen I receive [start v]\nif <(turbo mode?) = [true]> then\n    set volume to (0) %\nend\nif <(turbo mode?) = [false]> then\n    set volume to (100) %\n    wait (1.5) seconds\n    repeat (21)\n        play sound [Buzz Whir v] until done\n    end\nend\n\nwhen I receive [start v]\nerase all\nwait (1.5) seconds\ngo to x: (-45) y: (-150)\npen down\nset pen color to (#ffffff)\nset pen size to (45)\nerase all\nrepeat (25)\n    change y by (6)\n    change x by (6.5)\nend\nrepeat (9)\n    change y by (6)\n    change x by (-6.5)\nend\nrepeat (19)\n    change y by (-6)\n    change x by (-6.5)\nend\nrepeat (8)\n    change y by (6)\n    change x by (-6.5)\nend\nrepeat (25)\n    change y by (6)\n    change x by (6.5)\nend\n\nwhen I receive [turbo mode v]\nhide\n\n@Player\n\nwhen flag clicked\nset size to (100) %\nforever\n    if <(x position) > [240]> then\n        broadcast (Next Level v)\n        go to x: (-177) y: (-80)\n    end\nend\n\ndefine Touch Ground/Level <up?>\nchange [falling? v] by (1)\nrepeat until <not <touching (ground 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 [speed y v] to [0]\nend\n\nwhen flag clicked\nset size to (50) %\nset rotation style [left-right v]\nforever\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        Walk [-90] [-10]\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        Walk [90] [10]\n    end\nend\n\ndefine Walk (direction ) (speed)\npoint in direction (direction )\nchange x by (speed)\nset [slope v] to [0]\nrepeat until <<(slope) = [8]> or <not <touching (ground v)?>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <(slope) = [8]> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope))\nend\n\nwhen flag clicked\nforever\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(falling?) < [3]>> then\n        set [speed y v] to [12]\n    end\nend\n\nwhen flag clicked\nif <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n    if <<(jumpkey) = [0]> and <(falling?) < [3]>> then\n        set [speed y v] to [14]\n        set [falling? v] to [6]\n        set [jumpkey v] to [1]\n    end\nelse\n    set [jumpkey v] to [0]\nend\n\nwhen I receive [hurt v]\ngo to x: (-177) y: (-80)\n\nwhen [r v] key pressed\nbroadcast (Hurt v)\n\nwhen flag clicked\nforever\n    if <touching (lava v)?> then\n        go to x: (-177) y: (-80)\n    end\n    if <touching (spikes v)?> then\n        go to x: (-177) y: (-80)\n    end\nend\n\nwhen [n v] key pressed\nbroadcast (Next Level v)\n\nwhen [p v] key pressed\nchange [level v] by (-1)\n\nwhen flag clicked\nif <<(speed y) < [4]> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n    change [falling? v] by (-1)\nelse\n    change [falling? v] by (-2)\nend\n\nwhen flag clicked\ngo to x: (-177) y: (-80)\nset [speed y v] to [0]\nforever\n    change y by (speed y)\n    change [speed y v] by (-1)\n    if <touching (ground v)?> then\n        set [speed y v] to [0]\n        change y by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    change [speed y v] by (-1)\n    change y by (speed y)\n    Touch Ground/Level <>\nend\n\nwhen flag clicked\nTouch Ground/Level <(speed y) > [0]>\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nshow\n\nwhen I receive [turbo mode v]\nhide\n\n@Ground\n\nwhen I receive [next level v]\nchange [level v] by (1)\n\nwhen flag clicked\nforever\n    if <(Level) = [1]> then\n        switch costume to (1 v)\n    end\n    if <(Level) = [2]> then\n        switch costume to (2 v)\n    end\n    if <(Level) = [3]> then\n        switch costume to (3 v)\n    end\n    if <(Level) = [4]> then\n        switch costume to (4 v)\n    end\n    if <(Level) = [5]> then\n        switch costume to (5 v)\n    end\n    if <(Level) = [6]> then\n        switch costume to (6 v)\n    end\n    if <(Level) = [7]> then\n        switch costume to (7 v)\n    end\n    if <(Level) = [8]> then\n        switch costume to (8 v)\n    end\n    if <(Level) = [9]> then\n        switch costume to (9 v)\n    end\n    if <(Level) = [10]> then\n        switch costume to (finish v)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nshow\nset [level v] to [1]\nforever\n    switch backdrop to (Level)\nend\n\nwhen I receive [turbo mode v]\nhide\n\n@Lava\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nif <touching (player v)?> then\n    broadcast (Hurt v)\nend\n\nwhen I receive [intro done v]\nforever\n    if <(Level) = [1]> then\n        hide\n    end\n    if <(Level) = [2]> then\n        hide\n    end\n    if <(Level) = [3]> then\n        go to x: (68) y: (-119)\n        switch costume to (lvl 3 lava v)\n        show\n    end\n    if <(Level) = [4]> then\n        hide\n    end\n    if <(Level) = [5]> then\n        switch costume to (level 5 lava v)\n        go to x: (56.5) y: (-100)\n        show\n    end\n    if <(Level) = [6]> then\n        hide\n    end\n    if <(Level) = [7]> then\n        switch costume to (lvl 7&8 lava v)\n        go to x: (145) y: (-120)\n        show\n    end\n    if <(Level) = [8]> then\n        switch costume to (lvl 7&8 lava v)\n        go to x: (112) y: (-95)\n        show\n    end\n    if <(Level) = [9]> then\n        switch costume to (lvl 9 lava v)\n        go to x: (117) y: (-59)\n        show\n    end\n    if <(Level) = [10]> then\n        hide\n    end\nend\n\nwhen I receive [turbo mode v]\nhide\n\n@Spikes\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nset size to (100) %\nforever\n    if <(Level) = [1]> then\n        hide\n    end\n    if <(Level) = [2]> then\n        hide\n    end\n    if <(Level) = [3]> then\n        hide\n    end\n    if <(Level) = [4]> then\n        go to x: (114) y: (-99)\n        show\n    end\n    if <(Level) = [5]> then\n        hide\n    end\n    if <(Level) = [6]> then\n        set size to (200) %\n        go to x: (153) y: (-35)\n        show\n    end\n    if <(Level) = [7]> then\n        hide\n    end\n    if <(Level) = [8]> then\n        hide\n    end\n    if <(Level) = [9]> then\n        set size to (100) %\n        go to x: (40) y: (-85)\n        show\n    end\n    if <(Level) = [10]> then\n        hide\n    end\nend\n\nwhen I receive [turbo mode v]\nhide\n\n@Music\n\nwhen I receive [song #5 v]\nrepeat until <(Song #) < [5]>\n    play sound [F-777 - A Lost World v] until done\nend\n\nwhen I receive [song #4 v]\nrepeat until <<(Song #) < [4]> or <(Song #) = [5]>>\n    play sound [F-777 - Airborne Robots v] until done\nend\n\nwhen I receive [song #3 v]\nrepeat until <<(Song #) < [3]> or <(Song #) > [3]>>\n    play sound [F-777 - Let's Stomp v] until done\nend\n\nwhen I receive [song #2 v]\nrepeat until <<(Song #) = [1]> or <(Song #) > [2]>>\n    play sound [F-777 - Bow Wow v] until done\nend\n\nwhen I receive [song #1 v]\nrepeat until <(Song #) > [1]>\n    play sound [Foxsky - Kirby Smash v] until done\nend\n\nwhen [k v] key pressed\nchange [song # v] by (1)\nif <(Song #) = [2]> then\n    stop all sounds\n    broadcast (song #2 v)\nend\nif <(Song #) = [3]> then\n    stop all sounds\n    broadcast (song #3 v)\nend\nif <(Song #) = [4]> then\n    stop all sounds\n    broadcast (song #4 v)\nend\nif <(Song #) = [5]> then\n    stop all sounds\n    broadcast (song #5 v)\nend\nif <(Song #) = [6]> then\n    set [song # v] to [1]\n    stop all sounds\n    broadcast (song #1 v)\nend\n\nwhen this sprite clicked\nnext costume\nif <(costume [number v]) = [2]> then\n    set volume to (0) %\nend\nif <(costume [number v]) = [1]> then\n    set volume to (100) %\nend\n\nwhen I receive [intro done v]\nif <(turbo mode?) = [true]> then\n    set volume to (0) %\nend\nif <(turbo mode?) = [false]> then\n    set volume to (100) %\n    show\n    go to [front v] layer\n    set size to (50) %\n    switch costume to (music1 v)\n    set [song # v] to [1]\n    set volume to (100) %\n    stop all sounds\n    broadcast (song #1 v)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [turbo mode v]\nhide\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (aqua-a platformer v)\nshow\ngo to [front v] layer\nwait (2) seconds\nnext costume\nwait (2) seconds\nchange [ghost v] effect by (100)\nbroadcast (START v)\n\nwhen I receive [turbo mode v]\nhide\n\n@Credits\n\nwhen I receive [intro done v]\nswitch costume to (credits button v)\nforever\n    if <(Level) = [10]> then\n        go to x: (-128) y: (-6)\n        show\n    else\n        hide\n    end\n    if <(costume [name v]) = [Credits]> then\n        go to x: (0) y: (0)\n    end\n    if <touching (mouse-pointer v)?> then\n        change [brightness v] effect by (10)\n        wait until <not <touching (mouse-pointer v)?>>\n        change [brightness v] effect by (-10)\n    end\nend\n\nwhen this sprite clicked\ngo to [front v] layer\ngo [backward v] (1) layers\ngo to x: (0) y: (0)\nswitch costume to (credits v)\n\nwhen flag clicked\nhide\n\nwhen [o v] key pressed\nswitch costume to (credits button v)\n\nwhen I receive [turbo mode v]\nhide\n\n@Restart Button\n\nwhen I receive [intro done v]\nswitch costume to (credits button v)\nforever\n    if <(Level) = [10]> then\n        go to x: (136) y: (-126)\n        show\n    else\n        hide\n    end\n    if <touching (mouse-pointer v)?> then\n        change [brightness v] effect by (10)\n        wait until <not <touching (mouse-pointer v)?>>\n        change [brightness v] effect by (-10)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nset [level v] to [1]\nhide\nwait (0.00001) seconds\nbroadcast (Hurt v)\n\n@Turbo Mode Detector\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    Turbo mode detector\nend\n\ndefine Turbo mode detector\nreset timer\nrepeat (10)\n    move (0) steps\nend\nif <(timer) > [0.1]> then\n    set [turbo mode? v] to [false]\nelse\n    set [turbo mode? v] to [true]\n    switch costume to (turbo mode v)\n    broadcast (turbo mode v)\nend\n\n