Colors || a platformer [1]

Instructions: ➠ Arrow keys to move\n➠ N to skip\n➠ Space for light ➠ Unlocked at lvl 20\n➠ F to shoot ➠ Unlocked at lvl 40\nPart 2: https://scratch.mit.edu/projects/551098381/\nPart 3: https://scratch.mit.edu/projects/551205351/\nPlease report any bugs or improvements. Thank you! Have fun!\nAlso ❤️ and ⭐ this took me many months to make.\nMake sure to follow so you know when I release the sequel and any other games!

@Stage\n\nwhen I receive [intro finished v]\n\nforever\n    if <(Lev) = [1]> then\n    if <(Lev) = [20]> then\n    if <(Lev) = [40]> then\nend\n\nwhen flag clicked\nswitch backdrop to (blue sky v)\n\n@persona\n\nwhen flag clicked\nhide\nhide variable [lev v]\n\nwhen flag clicked\nset [intro finished v] to [no]\nbroadcast (Player to x -200 y 0 v) and wait\nset [lev v] to [1]\n[0] x\n\nwhen I receive [player to x -200 y 0 v]\ngo to x: (-200) y: (0)\n\ndefine (x) x\nif <(Intro finished) = [yes]> then\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [x v] by (x)\n        set [right or left arrow pressed -> <- v] to [right arrow]\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [x v] by ((x) * (-1))\n        set [right or left arrow pressed -> <- v] to [left arrow]\n    end\n    set [x v] to ((X) * (0.7))\n    change x by (X)\n    if <touching (ground v)?> then\n        set [slope v] to [0]\n        repeat until <<(Slope) = [32]> or <not <touching (ground v)?>>>\n            change y by (1)\n            change [slope v] by (4)\n        end\n        if <touching (ground v)?> then\n            change y by (((Slope) * (-1)) * (0.25))\n            repeat ([abs v] of (X) )\n                if <touching (ground v)?> then\n                    change x by (([abs v] of (X) ) / ((X) * (-1)))\n                end\n            end\n            set [x v] to [0]\n        end\n    end\n    change y by (Y)\n    if <touching (ground v)?> then\n        repeat ([abs v] of (Y) )\n            if <touching (ground v)?> then\n                change y by (([abs v] of (Y) ) / ((Y) * (-1)))\n            end\n        end\n        if <<(([abs v] of (Y) ) / (Y)) = [-1]> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n            set [y v] to [15]\n        else\n            set [y v] to [0]\n        end\n    else\n        change [y v] by (-1)\n    end\nelse\n    set [y v] to [0]\nend\n\nwhen I receive [intro finished v]\nshow\nhide variable [lev v]\nbroadcast (Player to x -200 y 0 v) and wait\nforever\n    [2.6] x\nend\n\nwhen I receive [intro finished v]\nswitch costume to (persona yellow v)\nforever\n    if <(Lev) = [1]> then\n        switch costume to (persona yellow v)\n    end\n    if <(Lev) = [22]> then\n        switch costume to (persona green v)\n    end\n    if <(Lev) = [41]> then\n        switch costume to (persona pink v)\n    end\n    if <(Lev) > [41]> then\n        go to [back v] layer\n        hide\n    end\nend\n\nwhen I receive [intro finished v]\nwait (1) seconds\nforever\n    if <key (n v) pressed?> then\n        if <not <<<(Lev) = [19]> or <(Lev) = [20]>> or <<(Lev) = [39]> or <(Lev) = [40]>>>> then\n            broadcast (Player to x -200 y 0 v) and wait\n            change [lev v] by (1)\n            wait (0.5) seconds\n        end\n    end\nend\n\nwhen I receive [intro finished v]\nforever\n    if <touching (boiing v)?> then\n        set [y v] to [20]\n    end\nend\n\nwhen I receive [intro finished v]\nforever\n    if <[235] < (x position)> then\n        if <not <(Lev) = [20]>> then\n            change [lev v] by (1)\n            broadcast (Player to x -200 y 0 v) and wait\n        else\n            if <(ball) = [hide]> then\n                change [lev v] by (1)\n                broadcast (Player to x -200 y 0 v) and wait\n            end\n        end\n    end\n    if <touching (spickle v)?> then\n        broadcast (Player to x -200 y 0 v) and wait\n    end\n    if <(y position) < [-179]> then\n        broadcast (Player to x -200 y 0 v) and wait\n    end\nend\n\nwhen I receive [intro finished v]\nset [intro finished v] to [yes]\n\nforever\n    if <(Lev) > [41]> then\n        go to [back v] layer\n        hide\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nset [lev v] to [1]\nstop all sounds\nforever\n    if <(Lev) < [20]> then\n        play sound [Vexento - Lights v] until done\n    else\n        if <(Lev) < [42]> then\n            play sound [Vexento - Pixel Party v] until done\n        else\n            play sound [Awesome SONG v] until done\n        end\n    end\nend\n\nwhen flag clicked\nwait until <(Lev) = [20]>\nrepeat (50)\n    change volume by (-2)\n    wait (0.01) seconds\nend\nwait (0.05) seconds\nstop all sounds\nset volume to (100) %\nwait until <(Lev) = [42]>\nhide variable [lev v]\nrepeat (20)\n    change volume by (-5)\n    wait (0.01) seconds\nend\nwait (0.05) seconds\nstop all sounds\nset volume to (100) %\n\n@ground\n\nwhen flag clicked\nhide\n\nwhen I receive [intro finished v]\nshow\nrepeat until <(Lev) > [41]>\n    switch costume to (Lev)\nend\ngo to [back v] layer\nhide\nhide variable [lev v]\nstop [other scripts in sprite v]\nstop [this script v]\n\n@spickle\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nwhen I receive [intro finished v]\nshow\nrepeat until <(Lev) > [41]>\n    switch costume to (Lev)\nend\ngo to [back v] layer\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nset [lev v] to [30]\n\n@Intro\n\nwhen I start as a clone\nset [size variable v] to [0]\nnext costume\nnext costume\nnext costume\nnext costume\nnext costume\nnext costume\ngo to x: (0) y: (0)\nset size to (2) %\nclear graphic effects\nif <(costume [number v]) = [12]> then\n    go to [front v] layer\nend\nrepeat (35)\n    set [size variable v] to (((size variable) * (0.8)) + (((100) - (size)) / (5)))\n    change size by (size variable)\nend\nwait (5) seconds\nset [size variable v] to [25]\nrepeat (10)\n    change size by (size variable)\n    change [ghost v] effect by (10)\n    set [size variable v] to (((5) - (size)) / (5))\nend\ndelete this clone\n\nwhen I receive [intro finished v]\ndelete this clone\n\nwhen flag clicked\nset [intro v] to [yes]\nforever\n    if <(Intro) = [yes]> then\n        show\n        go to [front v] layer\n        switch costume to (costume1 v)\n        create clone of (_myself_ v)\n        wait (6.8) seconds\n        if <(Intro) = [yes]> then\n            switch costume to (costume2 v)\n            create clone of (_myself_ v)\n            wait (6.8) seconds\n            if <(Intro) = [yes]> then\n                switch costume to (costume3 v)\n                create clone of (_myself_ v)\n                wait (6.8) seconds\n                if <(Intro) = [yes]> then\n                    switch costume to (costume4 v)\n                    create clone of (_myself_ v)\n                    wait (6.8) seconds\n                    if <(Intro) = [yes]> then\n                        switch costume to (costume5 v)\n                        create clone of (_myself_ v)\n                        wait (6.8) seconds\n                        if <(Intro) = [yes]> then\n                            switch costume to (costume6 v)\n                            create clone of (_myself_ v)\n                            wait (6.8) seconds\n                            broadcast (Intro finished v)\n                            hide\n                            stop [other scripts in sprite v]\n                            stop [this script v]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (n v) pressed?> then\n        set [intro v] to [no]\n        broadcast (Intro finished v) and wait\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Intro) = [no]> then\n        forever\n            hide\n        end\n    end\nend\n\nhide\n\n@boiing\n\nwhen I receive [intro finished v]\nforever\n    set y to (0)\n    if <touching (persona v)?> then\n        change y by (-10)\n        repeat (10)\n            change y by (1)\n        end\n        set y to (0)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<<<<(Lev) = [8]> or <(Lev) = [9]>> or <<(Lev) = [10]> or <(Lev) = [15]>>> or <(Lev) = [27]>> or <(Lev) = [33]>> or <(Lev) = [35]>> then\n        if <(Lev) = [8]> then\n            show\n            switch costume to (1boing v)\n        end\n        if <(Lev) = [9]> then\n            show\n            switch costume to (2boing v)\n        end\n        if <(Lev) = [10]> then\n            show\n            switch costume to (3boing v)\n        end\n        if <(Lev) = [15]> then\n            show\n            switch costume to (4boing v)\n        end\n        if <(Lev) = [27]> then\n            show\n            switch costume to (5boing v)\n        end\n        if <(Lev) = [33]> then\n            show\n            switch costume to (6boing v)\n        end\n        if <(Lev) = [35]> then\n            show\n            switch costume to (7boing v)\n        end\n    else\n        hide\n        go to [back v] layer\n    end\nend\n\n@Balls\n\nwhen flag clicked\nset [ball v] to [hide]\ngo to x: (0) y: (-80)\nset size to (100) %\ngo to [back v] layer\nhide\n\nwhen I receive [intro finished v]\nset [ball v] to [hide]\nset size to (100) %\nforever\n    if <<(Lev) = [20]> or <(Lev) = [40]>> then\n        set size to (((sin) * (0.7)) + (100)) %\n        set y to ((-70) + (([sin v] of (2*) ) * (10)))\n        if <<(Lev) = [20]> or <(Lev) = [40]>> then\n            if <(Lev) = [20]> then\n                switch costume to (costume1 v)\n                go to [front v] layer\n                go [backward v] (2) layers\n                if <touching (persona v)?> then\n                    set [ball v] to [hide]\n                    hide\n                    create clone of (_myself_ v)\n                end\n                if <(Lev) = [40]> then\n                    switch costume to (costume2 v)\n                    go to [front v] layer\n                    go [backward v] (2) layers\n                    if <touching (persona v)?> then\n                        set [ball v] to [hide]\n                        hide\n                        create clone of (_myself_ v)\n                        broadcast (lazer v)\n                    end\n                end\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nif <(Lev) = [20]> then\n    show\n    set size to (50) %\n    go to [front v] layer\n    switch costume to (costume1 v)\n    glide (1) secs to x: (210) y: (150)\n    forever\n        if <touching (persona v)?> then\n            set [ghost v] effect to (70)\n        else\n            set [ghost v] effect to (35)\n            forever\n                set size to ((([sin v] of (2*) ) * (8)) + (50)) %\n            end\n        end\n    end\nelse\n    if <(Lev) = [40]> then\n        show\n        set size to (50) %\n        go to [front v] layer\n        switch costume to (costume2 v)\n        glide (1) secs to x: (170) y: (150)\n        forever\n            if <touching (persona v)?> then\n                set [ghost v] effect to (70)\n            else\n                set [ghost v] effect to (35)\n                forever\n                    set size to ((([sin v] of (2*) ) * (8)) + (50)) %\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    wait until <(Lev) = [20]>\n    set [ball v] to [show]\n    switch costume to (costume1 v)\n    wait until <(Lev) = [40]>\n    set [ball v] to [show]\n    switch costume to (costume2 v)\nend\n\nwhen flag clicked\nforever\n    change [5* v] by (5)\n    change [8* v] by (8)\n    change [2* v] by (2)\n    set [sin v] to (([sin v] of (8*) ) * (20))\nend\n\nwhen flag clicked\nforever\n    if <(ball) = [show]> then\n        show\n    end\n    if <(ball) = [hide]> then\n        hide\n        go to [back v] layer\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (persona v)?> then\n        set [ball v] to [hide]\n        hide\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(Lev) > [41]> then\n        delete this clone\n    end\nend\n\n@boss1\n\nwhen I start as a clone\nshow\nswitch costume to (boss attack v)\ngo to [back v] layer\ngo to x: (250) y: (pick random (-105) to (160))\nrepeat until <<(x position) < [-225]> or <(Lev) < [19]>>\n    if <(Lev) < [19]> then\n        delete this clone\n    else\n        move (-10) steps\n    end\nend\ndelete this clone\n\nwhen I receive [intro finished v]\nwait until <(Lev) = [19]>\ngo to x: (175) y: (125)\nrepeat until <(Lev) < [19]>\n    if <(Lev) = [19]> then\n        create clone of (_myself_ v)\n        wait (0.1) seconds\n    else\n        stop [this script v]\n    end\nend\n\nwhen I receive [intro finished v]\nforever\n    if <touching (persona v)?> then\n        broadcast (Player to x -200 y 0 v) and wait\n    end\n    if <(Lev) = [19]> then\n        switch costume to (boss v)\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nforever\n    if <touching (persona v)?> then\n        broadcast (Player to x -200 y 0 v)\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(Lev) < [19]> then\n        delete this clone\n    end\nend\n\n@boss2\n\nwhen I start as a clone\nshow\nswitch costume to (spikelay v)\ngo to [back v] layer\ngo to x: (boss x position) y: (boss y position)\nrepeat until <<(x position) < [-225]> or <(Lev) < [39]>>\n    if <(Lev) < [39]> then\n        delete this clone\n    else\n        point towards (persona v)\n        if <[-100] > (x position)> then\n            move (2) steps\n        end\n        if <<[0] > (x position)> and <not <[-100] > (x position)>>> then\n            move (3.25) steps\n        end\n        if <(x position) > [0]> then\n            move (4.25) steps\n        end\n        if <<(x position) > [100]> and <not <[99] > (x position)>>> then\n            move (5.4) steps\n        end\n    end\nend\ndelete this clone\n\nwhen I receive [intro finished v]\nwait until <(Lev) = [39]>\ngo to x: (107) y: (69)\nshow\nswitch costume to (boass v)\npoint in direction (90)\nrepeat until <(Lev) < [39]>\n    if <(Lev) = [39]> then\n        create clone of (_myself_ v)\n        wait (1.5) seconds\n    else\n        stop [this script v]\n    end\nend\n\nwhen I receive [intro finished v]\nforever\n    if <touching (persona v)?> then\n        broadcast (Player to x -200 y 0 v) and wait\n    end\n    if <(Lev) = [39]> then\n        switch costume to (boass v)\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nforever\n    if <touching (persona v)?> then\n        broadcast (Player to x -200 y 0 v)\n        delete this clone\n    end\nend\n\nshow\n\nwhen flag clicked\nforever\n    set [boss x position v] to (x position)\n    set [boss y position v] to (y position)\nend\n\nwhen I start as a clone\nforever\n    if <(Lev) < [39]> then\n        delete this clone\n    end\nend\n\n@ligiht\n\nwhen flag clicked\nrepeat (10)\n    set [ball v] to [hide]\nend\nrepeat until <(Lev) = [20]>\n    hide\nend\nwait until <(ball) = [show]>\nwait until <(ball) = [hide]>\nrepeat until <(Lev) = [22]>\n    show\n    go to (persona v)\nend\nrepeat until <(Lev) = [42]>\n    if <key (space v) pressed?> then\n        show\n        go to (persona v)\n    else\n        hide\n    end\nend\nstop [this script v]\n\n@ShOioty bawl\n\nwhen I start as a clone\nshow\ngo to (persona v)\nif <(right or left arrow pressed -> <-) = [right arrow]> then\n    repeat until <(x position) > [230]>\n        move (12) steps\n    end\n    delete this clone\nend\nif <(right or left arrow pressed -> <-) = [left arrow]> then\n    repeat until <(x position) < [-230]>\n        move (-12) steps\n    end\n    delete this clone\nend\n\nwhen flag clicked\nforever\n    hide\nend\n\nwhen flag clicked\nhide\nwait until <(Lev) = [40]>\nwait until <(ball) = [show]>\nwait until <(ball) = [hide]>\nforever\n    if <key (f v) pressed?> then\n        create clone of (_myself_ v)\n        wait (0.4) seconds\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(Lev) < [41]> then\n        switch costume to (pwink bawly v)\n    end\n    if <(Lev) > [41]> then\n        switch costume to (pwink bawly v)\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (emeny v)?> then\n        broadcast (emeny ded v)\n        delete this clone\n    end\nend\n\n@emeny\n\nwhen I receive [intro finished v]\nhide\nwait until <(Lev) = [41]>\nshow\ngo to x: (168) y: (-89)\nrepeat until <(Lev) = [42]>\n    repeat (75)\n        move (-5) steps\n    end\n    repeat (75)\n        move (5) steps\n    end\nend\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen flag clicked\nhide\n\nwhen I receive [intro finished v]\nwait until <(Lev) = [41]>\nrepeat until <(Lev) = [42]>\n    if <touching (persona v)?> then\n        broadcast (Player to x -200 y 0 v)\n    end\nend\n\nwhen I receive [emeny ded v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [intro finished v]\nhide\nwait until <(Lev) = [42]>\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\n@emd skreen\n\nwhen flag clicked\nhide\nrepeat until <(Lev) > [41]>\n    hide\nend\nshow\n\nwhen I receive [intro finished v]\nhide\nrepeat until <(Lev) > [41]>\n    hide\nend\nshow\n\nhide\nshow variable [lev v]\n\nwhen I receive [intro finished v]\n\nhide\n\nrepeat until <[-1] > (Lev)>\n    show\n    hide variable [lev v]\nend\n\n@LoFavLow\n\nwhen flag clicked\npoint in direction (90)\nshow variable [lev v]\nhide\nrepeat until <(Lev) > [41]>\n    hide\nend\nshow\npoint in direction (90)\nhide variable [lev v]\nforever\n    point in direction ((([sin v] of ((8*) * (1.5)) ) * (10)) + (90))\nend\n\n@thoenail\n\nwhen flag clicked\nhide\n\nwhen I receive [intro finished v]\nhide\n\nhide\ngo to [back v] layer\nshow variable [lev v]\n\nshow\ngo to [front v] layer\nhide variable [lev v]\n\n@counter - levels\n\nwhen flag clicked\nset [-idclone v] to [0]\nhide\n\nwhen I start as a clone\nset size to (50) %\ngo to [front v] layer\nshow\nclear graphic effects\nset [brightness v] effect to (-100)\nset y to (-157)\npoint in direction (90)\n\ndefine gen clones\nrepeat (10)\n    change [-idclone v] by (1)\n    create clone of (_myself_ v)\nend\nset [-idclone v] to [man]\n\nwhen I receive [intro finished v]\ngen clones\nforever\n    broadcast (Tick v)\nend\n\nwhen I start as a clone\n\nwhen I receive [tick v]\nif <not <(-idClone) = [man]>> then\n    if <((length of (Lev)) + (1)) > (-idClone)> then\n        show\n        switch costume to (letter (-idClone) of (Lev))\n        set x to ((-240) + ((-idClone) * (20)))\n        set y to ((160) + ([sin v] of ((timer) * (1000)) ))\n        point in direction ((90) + (([sin v] of ((timer) * (200)) ) * (9)))\n        set [brightness v] effect to (-100)\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    hide variable [lev v]\nend\n\n