Chromatic - A Platformer v1.3
@Stage\n\nwhen flag clicked\nhide variable [timer v]\nswitch backdrop to (backdrop2 v)\n\nwhen I receive [intro v]\nswitch backdrop to (backdrop1 v)\nshow variable [timer v]\nshow variable [☁ hs v]\n\nwhen flag clicked\nset [timer v] to [0]\nset [timer state v] to [STOP]\n\nwhen I receive [intro v]\nset [timer state v] to [PLAY]\nforever\n    if <(TIMER STATE) = [PLAY]> then\n        wait (0.1) seconds\n        change [timer v] by (0.1)\n    end\nend\n\nwhen I receive [intro v]\nforever\n    set volume to (20) %\n    play sound [Water v] until done\nend\n\nwhen I receive [intro v]\nforever\n    if <<<(TIMER) < (☁ HS)> and <(LEVEL) = [9]>> and <(SKIP?) = [no]>> then\n        set [☁ hs v] to (((TIMER) * (100)) / (100))\n    end\nend\n\n@Intro\n\nwhen flag clicked\nstart sound [mixkit-fire-explosion-1343 v]\nshow\npoint in direction (90)\nset size to (100) %\ngo to x: () y: ()\nExplosion\nswitch costume to (black oc v)\nwait (1.05) seconds\nCloning\nswitch costume to (oc v)\nstart sound [Intro Music v]\nrepeat (70)\n    point in direction ((([tan v] of (Sin) ) * (5)) + (90))\n    go to x: (0) y: ((([sin v] of (Sin) ) / (2)) * (25))\n    change [sin v] by (10)\nend\nwait (1) seconds\nhide\n\ndefine Explosion\nswitch costume to (1 v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(costume [number v]) = [5]> then\n    wait (1) seconds\n    switch costume to (explosion size hack v)\n    set size to (400) %\n    go to x: (30) y: (90)\n    go to [front v] layer\n    switch costume to (1 v)\n    repeat (16)\n        next costume\n    end\n    delete this clone\nend\n\ndefine Cloning\nswitch costume to (background v)\ncreate clone of (_myself_ v)\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nswitch costume to (costume3 v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(costume [name v]) = [background]> then\n    repeat (100)\n        change [color v] effect by (1)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [26]> then\n    go to [front v] layer\n    go to x: (622) y: (449)\n    clear graphic effects\n    wait (2) seconds\n    glide (1) secs to x: (36) y: (30)\n    start sound [Wood Tap v]\n    wait (2) seconds\n    glide (1) secs to x: (-504) y: (-386)\n    broadcast (intro v)\n    delete this clone\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [26]> then\n    go to [front v] layer\n    go to x: (622) y: (449)\n    clear graphic effects\n    wait (2) seconds\n    forever\n        change [color v] effect by (2)\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [27]> then\n    go to x: (0) y: (-8)\n    go [forward v] (1) layers\n    repeat (4)\n        switch costume to (costume3 v)\n        clear graphic effects\n        repeat (9)\n            wait (0.00005) seconds\n            next costume\n            change [ghost v] effect by (10)\n        end\n    end\n    delete this clone\nend\n\n@2. Player\n\nwhen I receive [intro v]\nshow\nset [level v] to [1]\nbroadcast (Next Level v)\nforever\n    if <<key (left arrow v) pressed?> or <<(mouse x) < (x position)> and <mouse down?>>> then\n        change [x vel v] by (-1)\n        point in direction (-90)\n    end\n    if <<key (right arrow v) pressed?> or <<(mouse x) > (x position)> and <mouse down?>>> then\n        change [x vel v] by (1)\n        point in direction (90)\n    end\n    set [x vel v] to ((x vel) * (0.9))\n    change x by (x vel)\n    if <touching (3. level v)?> then\n        change y by (1)\n    end\n    if <touching (3. level v)?> then\n        change y by (1)\n    end\n    if <touching (3. level v)?> then\n        change y by (1)\n    end\n    if <touching (3. level v)?> then\n        change y by (1)\n    end\n    if <touching (3. level v)?> then\n        change y by (-4)\n        change x by ((x vel) * (-1))\n        if <<key (up arrow v) pressed?> or <<(mouse x) > (x position)> and <mouse down?>>> then\n            if <(x vel) > [0]> then\n                set [x vel v] to [-10]\n            else\n                set [x vel v] to [10]\n            end\n            set [y vel v] to [15]\n        else\n            set [x vel v] to [0]\n        end\n    end\n    if <touching (6. water v)?> then\n        change [y vel v] by (-0.5)\n    else\n        change [y vel v] by (-1)\n    end\n    change y by (y vel)\n    if <touching (3. level v)?> then\n        change y by ((y vel) - ((y vel) * (2)))\n        set [y vel v] to [0]\n    end\n    change y by (-1)\n    if <touching (6. water v)?> then\n        if <<touching (6. water v)?> and <<key (up arrow v) pressed?> or <<(mouse x) > (x position)> and <mouse down?>>>> then\n            set [y vel v] to [2]\n        end\n    else\n        if <<touching (3. level v)?> and <<key (up arrow v) pressed?> or <<(mouse x) > (x position)> and <mouse down?>>>> then\n            set [y vel v] to [15]\n        end\n    end\n    change y by (1)\n    create clone of (_myself_ v)\n    if <(x position) > [236]> then\n        change [level v] by (1)\n        broadcast (Next Level v) and wait\n    end\n    if <touching (4. danger v)?> then\n        broadcast (Restart v)\n    end\n    if <touching (5. bouncepad v)?> then\n        set [y vel v] to [20]\n    end\nend\n\nwhen flag clicked\nset [skip? v] to [no]\nhide\n\nwhen I start as a clone\nclear graphic effects\nrepeat (5)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I receive [next level v]\nbroadcast (Restart v)\n\nwhen I receive [restart v]\nset [x vel v] to [0]\nset [y vel v] to [0]\ngo to x: (-220) y: (45)\n\nwhen I receive [copleted! v]\nhide\n\nwhen I receive [intro v]\nforever\n    if <key (r v) pressed?> then\n        broadcast (Restart v)\n    end\n    if <key (s v) pressed?> then\n        broadcast (Next Level v)\n        change [level v] by (1)\n        wait (0.5) seconds\n        set [skip? v] to [yes]\n    end\nend\n\n@3. Level\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset drag mode [not draggable v]\nhide\n\nwhen I receive [intro v]\nshow\nforever\n    switch costume to (LEVEL)\nend\n\nwhen flag clicked\nforever\n    if <(LEVEL) = [9]> then\n        broadcast (Copleted! v)\n    end\nend\n\nwhen I receive [copleted! v]\nhide\n\n@4. Danger\n\nwhen flag clicked\nhide\n\nwhen I receive [intro v]\nshow\nforever\n    switch costume to (LEVEL)\nend\n\n@5. BouncePad\n\ndefine Clone at x: (x) y: (y)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [next level v]\nif  then\n    delete this clone\nend\nif <(LEVEL) = [2]> then\n    Clone at x: [-175] y: [-116]\nend\n\nwhen I start as a clone\nforever\n    show\n    if <touching (2. player v)?> then\n        switch costume to (crouch v)\n        wait (0.1) seconds\n    else\n        switch costume to (idle v)\n    end\nend\n\nwhen flag clicked\nhide\n\n@6. Water\n\nwhen flag clicked\nhide\n\nwhen I receive [intro v]\nshow\nforever\n    set [tide v] to [0]\n    repeat (10)\n        change [tide v] by (1)\n    end\n    repeat (20)\n        change [tide v] by (-1)\n    end\n    repeat (10)\n        change [tide v] by (1)\n    end\nend\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    set y to (tide)\n    switch costume to (LEVEL)\nend\n\n@7. Enemy\n\nwhen flag clicked\nhide\n\ndefine Clone at x: (x) y: (y)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nforever\n    if <([x position v] of [2. player v]) < (x position)> then\n        change [x vel v] by (-0.5)\n        point in direction (-90)\n    end\n    if <(x position) < ([x position v] of [2. player v])> then\n        change [x vel v] by (0.5)\n        point in direction (90)\n    end\n    set [x vel v] to ((x vel) * (0.9))\n    change x by (x vel)\n    if <touching (3. level v)?> then\n        change y by (1)\n    end\n    if <touching (3. level v)?> then\n        change y by (1)\n    end\n    if <touching (3. level v)?> then\n        change y by (1)\n    end\n    if <touching (3. level v)?> then\n        change y by (1)\n    end\n    if <touching (3. level v)?> then\n        change y by (-4)\n        change x by ((x vel) * (-1))\n        if <(([y position v] of [2. player v]) - (50)) > (y position)> then\n            if <(x vel) > [0]> then\n                set [x vel v] to [-10]\n            else\n                set [x vel v] to [10]\n            end\n            set [y vel v] to [15]\n        else\n            set [x vel v] to [0]\n        end\n    end\n    if <touching (6. water v)?> then\n        change [y vel v] by (-0.5)\n    else\n        change [y vel v] by (-1)\n    end\n    change y by (y vel)\n    if <touching (3. level v)?> then\n        change y by ((y vel) - ((y vel) * (2)))\n        set [y vel v] to [0]\n    end\n    change y by (-1)\n    if <touching (6. water v)?> then\n        if <(([y position v] of [2. player v]) - (50)) < (y position)> then\n            set [y vel v] to [2]\n        end\n    else\n        if <<touching (3. level v)?> and <(([y position v] of [2. player v]) - (50)) < (y position)>> then\n            set [y vel v] to [15]\n        end\n    end\n    change y by (1)\n    if <touching (4. danger v)?> then\n        delete this clone\n    end\n    if <touching (5. bouncepad v)?> then\n        set [y vel v] to [20]\n    end\n    if <touching (2. player v)?> then\n        broadcast (Restart v)\n    end\nend\n\nwhen I receive [restart v]\nif  then\n    delete this clone\nend\nif <(LEVEL) = [3]> then\n    Clone at x: [200] y: [95]\nend\nif <(LEVEL) = [7]> then\n    Clone at x: [200] y: [155]\nend\nif <(LEVEL) = [7]> then\n    Clone at x: [200] y: [45]\nend\n\n@8. Thumbnail\n\nwhen flag clicked\nhide\n\nhide variable [☁ hs v]\nhide variable [timer v]\ngo to [front v] layer\nshow\ngo to x: (0) y: (0)\n\n@9. notifier\n\nwhen flag clicked\ngo to x: (0) y: (50)\ngo to [front v] layer\nhide\nwait (pick random (8) to (15)) seconds\nshow\nrepeat until <(y position) < [6]>\n    change y by (((5) - (y position)) / (6))\nend\nwait (3.5) seconds\nrepeat until <(y position) > [49.5]>\n    change y by (((y position) + (5)) / (5))\nend\nhide\nforever\n    wait (pick random (14) to (26)) seconds\n    show\n    repeat until <(y position) < [6]>\n        change y by (((5) - (y position)) / (6))\n    end\n    wait (3.5) seconds\n    repeat until <(y position) > [49.5]>\n        change y by (((y position) + (5)) / (5))\n    end\n    hide\nend\n\nwhen I receive [tick v]\n\n@10. Completed\n\nwhen flag clicked\nstop all sounds\nhide\n\nwhen I receive [copleted! v]\nset [timer state v] to [STOP]\nif <(TIMER) > [5]> then\n    show\n    stop [all v]\nend\n\n@11. Text Renderer\n\ndefine type (text) at x: (x) y: (y)\nswitch costume to ( v)\ngo to x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\nset [# v] to [0]\nrepeat (length of (text))\n    change [# v] by (1)\n    set [asset v] to (letter (#) of (text))\n    create clone of (_myself_ v)\nend\nwait (2) seconds\nbroadcast (Clear v)\n\ndefine clone setup\nswitch costume to (asset)\nrepeat (#)\n    change x by (15)\n    if <(x position) > [175]> then\n        set x to (x)\n        change y by (-18)\n    end\nend\n\nwhen I start as a clone\nclone setup\n\nwhen I receive [clear v]\ndelete this clone\n\nwhen I receive [intro v]\nforever\n    if <(LEVEL) = [1]> then\n        type [phew! just a slope.] at x: [-130] y: [150]\n        wait until <(LEVEL) = [2]>\n        type [i always wanted to use a bounce pad.] at x: [-170] y: [150]\n        wait until <(LEVEL) = [3]>\n        type [who is that will he kill me!] at x: [-200] y: [150]\n        wait until <(LEVEL) = [4]>\n        type [so many spikes!] at x: [-150] y: [150]\n        wait until <(LEVEL) = [5]>\n        type [how do i "wall jump".] at x: [-150] y: [150]\n        wait until <(LEVEL) = [6]>\n        type [this is just plain.] at x: [-150] y: [150]\n        wait until <(LEVEL) = [7]>\n        type [why are there two killers!] at x: [-220] y: [150]\n        wait until <(LEVEL) = [8]>\n        type [is this a maze!] at x: [-120] y: [150]\n    end\nend\n\n@12. Thumbnail Border\n\nwhen flag clicked\nhide\n\nhide variable [☁ hs v]\nhide variable [timer v]\nset [ghost v] effect to (20)\ngo to [front v] layer\nshow\ngo to x: (0) y: (0)\n\n
>Check me on Youtube\nhttps://www.youtube.com/channel/UCYqHajesubHpsDJ-rTSawCg\nEveryone, please follow @Scratchsanity\n                                  Instructions\nArrow Keys to move\nUSE BOUNCE PAD TO JUMP HIGHER\nDON'T TOUCH ENEMIES\nTRY TO COMPLETE FAST AS YOU CAN\nIF YOU SKIP LEVEL IT WILL NOT BE A HIGH SCORE\nR to Restart\nS to Skip\n\nall levels are possible.\n\n\nTags: #Platformer, #Colours, #coolplatformer, #shorts, #shortplatformer, #1000v