An Adventure(Platformer)       #games
@Stage\n\nwhen flag clicked\nforever\n    play sound [Popsicle v] until done\nend\n\n@Blank\n\n@Player\n\ndefine Game On\nset [sx v] to [0]\nset [x v] to [-222]\nif <(Level) = [5]> then\n    set [y v] to [-33]\nelse\n    set [y v] to [-125]\nend\nset [sy v] to [0]\nset [in air v] to [0]\nset [finish v] to []\npoint in direction (90)\nshow\n\ndefine Movement\nswitch costume to (hitbox v)\nif <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n    point in direction (-90)\n    change [sx v] by (-1.5)\nend\nif <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n    point in direction (90)\n    change [sx v] by (1.5)\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    Change Player x by (round (sx))\nend\nif <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n    if <(in air) < [4]> then\n        set [sy v] to [10]\n    end\nend\nif <(sy) > [-20]> then\n    change [sy v] by (-1.5)\nend\nChange Player y by (sy)\nDie\nPosition\nif <(y) < [-180]> then\n    set [finish v] to [No]\nend\nif <<(x position) > [230]> and <not <(Level) = [26]>>> then\n    set [finish v] to [Yes]\nend\n\ndefine Change Player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (platform v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Position\ngo to x: (x) y: (y)\n\ndefine Change Player x by (sx)\nchange [x v] by (sx)\nPosition\nif <touching (platform v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platform v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n        if <(sx) > [0]> then\n            start sound [Wall Jump v]\n            set [sx v] to [-10]\n        else\n            set [sx v] to [10]\n        end\n        set [in air v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <touching (platform v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Game End\nstart sound [Die v]\nrepeat (2)\n    hide\n    wait (0.05) seconds\n    show\n    wait (0.05) seconds\nend\nhide\nbroadcast (Delete Clones v)\nbroadcast (Create Clone v)\n\ndefine Die\nif <touching (lava v)?> then\n    set [finish v] to [No]\nend\n\ndefine Game Con\nhide\nchange [level v] by (1)\nbroadcast (Delete Clones v)\nbroadcast (Create Clone v)\n\nwhen flag clicked\ngo to [front v] layer\nset size to (80) %\ngo to x: (-220) y: (-119)\nshow\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    Game On\n    repeat until <(Finish) > []>\n        Movement\n    end\n    if <(Finish) = [Yes]> then\n        Game Con\n    else\n        Game End\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (x v) pressed?> and <not <(Level) = [26]>>> then\n        Game On\n        wait (0.05) seconds\n        change [level v] by (1)\n        broadcast (Delete Clones v)\n        broadcast (Create Clone v)\n        wait until <not <key (x v) pressed?>>\n    end\nend\n\nwhen I receive [bounce v]\nset [sy v] to [14]\n\n@Platform\n\nwhen flag clicked\nshow\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\n@Lava\n\nwhen flag clicked\nshow\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\n@Enemy\n\ndefine clone at x: (x) y: (y) speed: (speed) size: (size)\nset size to (size) %\ngo to x: (x) y: (y)\nset [x v] to (speed)\ncreate clone of (_myself_ v)\nset [die v] to [0]\n\nwhen I start as a clone\nshow\nforever\n    Physics\nend\n\ndefine Physics\nchange x by (x)\nchange [y v] by (-1)\nif <<touching (platform v)?> or <touching (_edge_ v)?>> then\n    change y by (1)\nend\nif <<touching (platform v)?> or <touching (_edge_ v)?>> then\n    change y by (1)\nend\nif <<touching (platform v)?> or <touching (_edge_ v)?>> then\n    change y by (1)\nend\nif <<touching (platform v)?> or <touching (_edge_ v)?>> then\n    change y by (1)\nend\nif <<touching (platform v)?> or <touching (_edge_ v)?>> then\n    change y by (1)\nend\nif <<touching (platform v)?> or <touching (_edge_ v)?>> then\n    change y by (1)\nend\nif <<touching (platform v)?> or <touching (_edge_ v)?>> then\n    change y by (-6)\n    repeat until <not <<touching (platform v)?> or <touching (_edge_ v)?>>>\n        change x by ((([abs v] of (x) ) / (x)) * (-1))\n    end\n    set [x v] to ((0) - (x))\nend\nchange y by (y)\nif <<touching (platform v)?> or <touching (_edge_ v)?>> then\n    repeat until <not <<touching (platform v)?> or <touching (_edge_ v)?>>>\n        change y by ((([abs v] of (y) ) / (y)) * (-1))\n    end\n    if <(costume [number v]) = [2]> then\n        set [y v] to [10]\n    end\nend\n\nwhen I receive [create clone v]\nif <(Level) = [8]> then\n    clone at x: [205] y: [-129] speed: [2] size: [50]\n    clone at x: [210] y: [-129] speed: [4] size: [50]\nend\nif <(Level) = [9]> then\n    clone at x: [-37] y: [-124] speed: [2] size: [80]\n    clone at x: [163] y: [-129] speed: [4] size: [50]\nend\nif <(Level) = [10]> then\n    clone at x: [-14] y: [-124] speed: [5] size: [100]\nend\nif <(Level) = [11]> then\n    clone at x: [62] y: [-129] speed: [5] size: [50]\n    clone at x: [199] y: [-129] speed: [5] size: [50]\nend\nif <(Level) = [15]> then\n    clone at x: [199] y: [-129] speed: [1] size: [50]\n    clone at x: [-35] y: [-129] speed: [1] size: [50]\nend\nif <(Level) = [16]> then\n    clone at x: [199] y: [-129] speed: [4] size: [50]\nend\nif <(Level) = [21]> then\n    clone at x: [199] y: [-129] speed: [6] size: [80]\n    clone at x: [-78] y: [-129] speed: [6] size: [80]\n    clone at x: [0] y: [-129] speed: [6] size: [80]\nend\nif <(Level) = [22]> then\n    clone at x: [58] y: [-74] speed: [5] size: [80]\n    clone at x: [-62] y: [-73] speed: [5] size: [80]\nend\nif <(Level) = [25]> then\n    clone at x: [-144] y: [-125] speed: [5] size: [80]\n    clone at x: [-32] y: [-125] speed: [4] size: [50]\n    clone at x: [52] y: [-125] speed: [5] size: [80]\n    clone at x: [217] y: [-125] speed: [6] size: [80]\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [delete clones v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        if <<([y position v] of [player v]) > (y position)> and <([sy v] of [player v]) < [-1]>> then\n            start sound [Death v]\n            stop [other scripts in sprite v]\n            broadcast (Bounce v)\n            repeat (5)\n                change [ghost v] effect by (20)\n            end\n            delete this clone\n        else\n            set [finish v] to [No]\n        end\n        wait (4) seconds\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (lava v)?> then\n        delete this clone\n    end\nend\n\n@Cloud\n\nwhen flag clicked\nhide\ncreate clone of (_myself_ v)\nforever\n    wait (pick random (3) to (5)) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\ngo to [back v] layer\nset size to (pick random (80) to (100)) %\nswitch costume to (pick random (1) to (2))\nset [ghost v] effect to (pick random (30) to (45))\nset [cside v] to (pick random (1) to (2))\nif <(cSide) = [1]> then\n    go to x: (246) y: (pick random (131) to (-7))\n    repeat until <(x position) < [-243]>\n        change x by ((0) - (pick random (0.5) to (2)))\n    end\nelse\n    go to x: (-246) y: (pick random (131) to (0))\n    repeat until <(x position) > [243]>\n        change x by (pick random (0.5) to (2))\n    end\nend\ndelete this clone\n\n@Thumbnail\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    go to x: (0) y: (0)\n    show\n    set [ghost v] effect to (100)\nend\n\n@Text\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (3) layers\nshow\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\n
                           ◆◆Instructions◆◆ \n>Use The W,A,S,D or Arrow Keys To Move.\n>X to Skip\n>Jump To Kill Slimes.\n> Very Easy\n>First Pixel Art Game.\nNew Game: https://scratch.mit.edu/projects/419661760/