Desert | A Platformer
@Stage\n\n@Player\n\nwhen I receive [play v]\ngo to x: (-213) y: (0)\nforever\n    create clone of (_myself_ v)\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [speedx v] by (1.5)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [speedx v] by (-1.5)\n    end\n    change x by (speedX)\n    if <touching (platform v)?> then\n        change x by ((speedX) * (-1))\n        set [speedx v] to [0]\n    else\n        set [speedx v] to ((speedX) * (0.8))\n    end\n    change y by (speedY)\n    if <touching (platform v)?> then\n        change y by ((speedY) * (-1))\n        set [speedy v] to [0]\n        if <(lock) = [0]> then\n            if <<key (up arrow v) pressed?> or <<mouse down?> and <((mouse y) - (y position)) > [50]>>> then\n                set [speedy v] to [13]\n                set [lock v] to [1]\n            end\n        end\n    else\n        change [speedy v] by (-1)\n        set [lock v] to [0]\n    end\nend\n\nwhen I start as a clone\nclear graphic effects\nset size to (100) %\nrepeat (20)\n    change size by (-10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I receive [play v]\nforever\n    if <(x position) > [230]> then\n        go to x: (-213) y: (-94)\n        change [level v] by (1)\n    end\n    if <touching (dangerous v)?> then\n        if <(On/Off) = [1]> then\n            start sound [Crunch v]\n        end\n        go to x: (-213) y: (-94)\n    end\n    if <key (r v) pressed?> then\n        go to x: (-213) y: (-94)\n    end\nend\n\nwhen flag clicked\ngo to x: (-213) y: (0)\n\nwhen I receive [r v]\ngo to x: (-213) y: (-94)\n\nwhen I receive [skip v]\ngo to x: (-213) y: (0)\n\n@Eye\n\nwhen I receive [play v]\ngo to [front v] layer\nforever\n    point towards (mouse-pointer v)\n    go to x: ([x position v] of [player v]) y: (([y position v] of [player v]) - (1))\nend\n\nwhen flag clicked\ngo to x: (-213) y: (0)\n\n@platform\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    switch costume to (Level)\nend\n\nwhen [s v] key pressed\nif <not <(Level) = [11]>> then\n    wait until <key (k v) pressed?>\n    wait until <key (i v) pressed?>\n    wait until <key (p v) pressed?>\n    change [level v] by (1)\nend\n\n@Particle\n\nwhen I start as a clone\nshow\nclear graphic effects\nset size to (pick random (1) to (500)) %\nset [ghost v] effect to (pick random (79) to (111))\ngo to x: (400) y: (pick random (-170) to (180))\nglide (pick random (1.01) to (5)) secs to x: (-240) y: (pick random (-180.1) to (180))\ndelete this clone\n\nwhen I receive [play v]\nhide\nforever\n    create clone of (_myself_ v)\nend\n\n@Dangerous\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Play\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\ngo to [front v] layer\nforever\n    set y to ((0) + (([cos v] of (((timer) - (3)) * (400)) ) * (10)))\n    set x to ((0) + (([cos v] of (((timer) - (2)) * (300)) ) * (10)))\n    if <touching (mouse-pointer v)?> then\n        set size to ((120) + (([cos v] of (((timer) - (3)) * (400)) ) * (10))) %\n        if <mouse down?> then\n            broadcast (Play v)\n            hide\n            forever\n                stop [this script v]\n            end\n        end\n    else\n        set size to (100) %\n    end\nend\n\n@Text\n\nwhen flag clicked\ngo to x: (0) y: (89)\nshow\nforever\n    point in direction ((90) + (([cos v] of (((timer) - (3)) * (400)) ) * (10)))\nend\n\nwhen I receive [play v]\nhide\n\n@Love/Fav Detector\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nclear graphic effects\npoint in direction (pick random (-180) to (180))\nrepeat (50)\n    switch costume to (pick random (2) to (3))\n    move (5) steps\n    change y by (-0.5)\n    if <(direction) > [180]> then\n        turn left (2.5) degrees\n    end\n    if <(direction) < [180]> then\n        turn right (2.5) degrees\n    end\n    change [brightness v] effect by (1.5)\n    change [ghost v] effect by (1.5)\nend\ndelete this clone\n\nwhen flag clicked\ngo to [front v] layer\nwait (.5) seconds\nforever\n    if <(touching) = [Love]> then\n        wait (.2) seconds\n        if <(touching) = [Love]> then\n            change [love/favorite v] by (1)\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nset [love/favorite v] to [0]\nforever\n    if <(Love/Favorite) = [2]> then\n        stop [other scripts in sprite v]\n        show\n        go to x: (0) y: (50)\n        switch costume to (thank you! v)\n        set [brightness v] effect to (100)\n        set size to (500) %\n        set [ghost v] effect to (100)\n        repeat (20)\n            change [ghost v] effect by (-5)\n            change [brightness v] effect by (-5)\n            change size by (((185) - (size)) / (8))\n        end\n        repeat (5)\n            create clone of (_myself_ v)\n        end\n        wait (1) seconds\n        repeat (20)\n            change [ghost v] effect by (5)\n            change [brightness v] effect by (5)\n            change size by (((385) - (size)) / (8))\n        end\n        hide\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nwait (.5) seconds\nforever\n    if <(touching) = [Fav]> then\n        wait (.2) seconds\n        if <(touching) = [Fav]> then\n            change [love/favorite v] by (1)\n            stop [this script v]\n        end\n    end\nend\n\ndefine Detect (thing) at (x) (y)\nswitch costume to (empty v)\nset size to (27000) %\ngo to x: (x) y: (y)\nset size to (100) %\nswitch costume to (thing)\nif <touching (mouse-pointer v)?> then\n    set [touching v] to (costume [name v])\nend\n\nwhen flag clicked\nset drag mode [not draggable v]\nshow\nset [ghost v] effect to (100)\nforever\n    set [touching v] to [none]\n    Detect [Love] at [-201] [-220]\n    Detect [Fav] at [-201] [-220]\nend\n\n@Music\n\nwhen flag clicked\nforever\n    play sound [TheFatRat - Time Lapse v] until done\nend\n\n@Reset\n\nwhen flag clicked\ngo to x: (-178) y: (-150)\nhide\nforever\n    if <touching (mouse-pointer v)?> then\n        set y to ((-150) + (([cos v] of (((timer) - (3)) * (400)) ) * (10)))\n        set x to ((-178) + (([cos v] of (((timer) - (2)) * (300)) ) * (10)))\n        set size to ((100) + (([cos v] of (((timer) - (3)) * (400)) ) * (10))) %\n    else\n        go to x: (-178) y: (-150)\n        set size to (90) %\n    end\nend\n\nwhen I receive [play v]\ngo to x: (-178) y: (-150)\nshow\nwait (1) seconds\ngo to [front v] layer\n\nwhen this sprite clicked\nif <mouse down?> then\n    broadcast (r v)\nend\n\n@Thumbnail\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nwait (1) seconds\ngo to [front v] layer\n\nset [ghost v] effect to (0)\nwait (1) seconds\ngo to [front v] layer\n\n@Skip\n\nwhen flag clicked\ngo to x: (-89) y: (-150)\nhide\nforever\n    if <touching (mouse-pointer v)?> then\n        set y to ((-150) + (([cos v] of (((timer) - (3)) * (400)) ) * (10)))\n        set x to ((-89) + (([cos v] of (((timer) - (2)) * (300)) ) * (10)))\n        set size to ((100) + (([cos v] of (((timer) - (3)) * (400)) ) * (10))) %\n    else\n        go to x: (-89) y: (-150)\n        set size to (90) %\n    end\nend\n\nwhen I receive [play v]\ngo to x: (-89) y: (-150)\nshow\nwait (1) seconds\ngo to [front v] layer\n\nwhen this sprite clicked\nif <mouse down?> then\n    broadcast (Skip v)\n    change [level v] by (1)\nend\n\n@Settings\n\nwhen flag clicked\nshow\n\nwhen I receive [play v]\nhide\n\nwhen this sprite clicked\nbroadcast (settings v)\n\n@Settings open\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nwhen I receive [settings v]\nstart sound [pop v]\ngo to [front v] layer\nshow\n\nwhen I receive [close v]\ngo to [back v] layer\nhide\n\n@Sound effects on/off button\n\nwhen flag clicked\ngo to x: (-5) y: (63)\nset [on/off v] to [1]\nhide\nforever\n    switch costume to (On/Off)\nend\n\nwhen I receive [settings v]\nwait (0.001) seconds\ngo to [front v] layer\nshow\n\nwhen this sprite clicked\nchange [on/off v] by (1)\nif <(On/Off) > [2]> then\n    set [on/off v] to [1]\nend\n\nwhen I receive [close v]\ngo to [back v] layer\nhide\n\n@Close\n\nwhen flag clicked\nhide\n\nwhen I receive [settings v]\nwait (0.001) seconds\ngo to [front v] layer\nshow\n\nwhen this sprite clicked\nbroadcast (Close v)\nhide\n\n
Hi and welcome to my new game "Desert | A Platformer" In this game it is 11 levels i will add more soon. Pls propose this to be featured! Press "R" if you are stuck!\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nIf you are on computer then move with the arrow keys.\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nIf you are on mobile then drag around to move.\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nType skip to skip.\n\n#platformer #Desert #game #scratch #pro #platform #OSSEBRO #griffpatch #boy #roblox #XD\n\n