Desert || A Platformer || Mobile

Instructions: [ Play In Full Screen For Better Graphics ]\nArrow Keys or W/A/D \nI have also added Mobile Compatibility\nDon't forget to smash that ★ and ❤️.\nIf we get a 1k views we will make part 2.\n50 views!\n100 views!\n250 views!\n500 views!\n1000 views?\n\nChange Log:\n5/24/2020 - Added Mobile Compatible Controls \n5/22/2020 - Added an FPS in the menu and Press F button function to toggle FPS\n5/22/2020 - Added more realistic shadows and made player smaller. Added a different shade of sand in the platformer.\n5/16/2020 - Released full version of game\n5/13/2020 - Released Beta version of game\n5/9/2020 - Released Alpha version  of game

@Stage\n\nwhen flag clicked\nset [done v] to [no]\nswitch backdrop to (bruh v)\nwait (0.5) seconds\nnext backdrop\nrepeat until <(Done) = [yes]>\n    wait (0.5) seconds\n    change [color v] effect by (25)\nend\nset [color v] effect to (0)\n\nwhen I receive [green flag v]\nclear graphic effects\nstop all sounds\nswitch backdrop to (desert v)\nforever\n    play sound [Vexento-masked-heroes-1-AHM56EBq6 \(1\) v] until done\nend\n\nwhen I receive [story v]\nclear graphic effects\nswitch backdrop to (story v)\n\nwhen I receive [menu v]\nset [ghost v] effect to (50)\nswitch backdrop to (menu v)\nstart sound [Menu Music - Fluffing A Duck v]\n\nwhen I receive [back to menu v]\nset [ghost v] effect to (50)\nswitch backdrop to (menu v)\nstart sound [Menu Music - Fluffing A Duck v]\n\n@Sprite1\n\n@Player\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\nwhen I receive [play game v]\nset [level v] to [1]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Game On\n    repeat until <(EXIT) > []>\n        Tick\n        broadcast (Tick v) and wait\n    end\n    if <(EXIT) = [Win]> then\n        Game - Win\n    else\n        Game - Die\n    end\nend\n\ndefine Game On\nset [x v] to [0]\nset [y v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset size to (100) %\nset [ghost v] effect to (0)\nshow\n\ndefine Tick\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    switch costume to (player2 v)\n    change [sx v] by (-2)\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    switch costume to (player v)\n    change [sx v] by (2)\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 (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n    if <(in air) < [4]> then\n        set [sy v] to [16]\n    end\nend\nif <(sy) > [-20]> then\n    change [sy v] by (-2)\nend\nChange Player y by (sy)\nPosition\nTest - Die\nset [scroll x v] to (x)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nif <(LEVEL) = [3]> then\n    if <(SCROLL X) > [0]> then\n        set [scroll x v] to [0]\n    end\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\n\ndefine Change Player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (platformers 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) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine Change Player x by (sx)\nchange [x v] by (sx)\nPosition\nrepeat until <not <touching (platformers v)?>>\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platformers v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <key (up arrow v) pressed?> then\n        if <(sx) > [0]> then\n            set [sx v] to [-16]\n        else\n            set [sx v] to [16]\n        end\n        set [in air v] to [0]\n    else\n        if <key (w v) pressed?> then\n            if <(sx) > [0]> then\n                set [sx v] to [-16]\n            else\n                set [sx v] to [16]\n            end\n            set [in air v] to [0]\n        else\n            set [sx v] to [0]\n        end\n    end\n    repeat until <not <touching (platformers 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 - Die\nstart sound [Roblox oof v]\nset [exit v] to []\nwait (0.1) seconds\nhide\nwait (0.5) seconds\n\ndefine Test - Die\nif <touching (danger v)?> then\n    set [exit v] to [Die]\nend\n\ndefine Game - Win\nchange [level v] by (1)\nwait (1) seconds\n\nwhen I receive [green flag v]\nbroadcast (Play Game v) and wait\n\nwhen flag clicked\nhide\n\n@Platformers\n\nwhen I receive [play game v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at x [450] y: [0]\n    Clone at x [450] y: [0]\n    Clone at x [450] y: [0]\n    Clone at x [450] y: [0]\n    Clone at x [450] y: [0]\n    Clone at x [450] y: [0]\n    Clone at x [450] y: [0]\n    Clone at x [450] y: [0]\n    Clone at x [450] y: [0]\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\n@Danger\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [50]\nset [y v] to [-100]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at x [485] y: [100]\n    Clone at x [465] y: [0]\n    Clone at x [415] y: [0]\n    Clone at x [450] y: [0]\n    Clone at x [450] y: [0]\n    Clone at x [450] y: [0]\n    Clone at x [450] y: [0]\n    Clone at x [450] y: [0]\n    Clone at x [450] y: [0]\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\n@buttons\n\nwhen I start as a clone\nadd [Vexento-masked heroes] to [music v]\nadd [DJ Striden - Lights \[Dream Trance\]] to [music v]\nshow\nif <(CLONE ID) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (costume1 v)\nelse\n    if <(CLONE ID) = [2]> then\n        go to x: (-144) y: (-55)\n        switch costume to (costume2 v)\n    else\n        if <(CLONE ID) = [3]> then\n            go to x: (0) y: (0)\n            switch costume to (costume3 v)\n        else\n            if <(CLONE ID) = [4]> then\n                go to x: (144) y: (-55)\n                switch costume to (costume4 v)\n            else\n                if <(CLONE ID) = [6]> then\n                    go to x: (0) y: (-110)\n                    switch costume to (costume5 v)\n                end\n            end\n        end\n    end\nend\nforever\n    if <not <(CLONE ID) = [3]>> then\n        if <touching (mouse-pointer v)?> then\n            change size by (((250) - (size)) / (4))\n            set [brightness v] effect to (10)\n            if <(CLONE ID) = [2]> then\n                say [Music on \(In game mode\) is Vexento - Masked Heroes ]\n            end\n            if <mouse down?> then\n                wait until <not <mouse down?>>\n                start sound [Coin v]\n                set size to (170) %\n                if <(CLONE ID) = [1]> then\n                    broadcast (Green Flag v)\n                    set [fps shown v] to [ok boomer]\n                else\n                    if <(CLONE ID) = [2]> then\n                end\n            end\n        else\n            change size by (((200) - (size)) / (4))\n            set [brightness v] effect to (0)\n            say []\n        end\n    else\n        set x to ((0) + (([sin v] of ((timer) * (200)) ) * (7)))\n    end\nend\n\nwhen I receive [menu v]\nhide\ngo to x: (0) y: (0)\nset [clone id v] to [0]\nrepeat (4)\n    change [clone id v] by (1)\n    create clone of (_myself_ v)\nend\nchange [clone id v] by (2)\ncreate clone of (_myself_ v)\nset [clone id v] to [5]\nforever\n\nwhen flag clicked\nhide\n\nwhen I receive [green flag v]\nhide\ndelete this clone\n\nwhen I receive [skin! v]\nhide\n\nwhen I receive [story v]\nhide\n\nwhen I receive [back to menu v]\nif <not <(CLONE ID) = [5]>> then\n    show\nend\n\n@Menu \n\nwhen flag clicked\nhide\ngo to x: (155) y: (-142)\n\nwhen I receive [story v]\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((130) - (size)) / (4))\n        set [brightness v] effect to (10)\n    else\n        set size to (100) %\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [story v]\nshow\nforever\n    if <mouse down?> then\n        broadcast (back to menu v)\n        hide\n    end\nend\n\nwhen flag clicked\nhide\n\n@Background 1\n\nwhen I receive [end v]\nwait (1) seconds\nhide\n\nwhen I receive [start v]\nset [veolcity v] to [0]\nwait (2) seconds\nrepeat until <(end) = [1]>\n    repeat until <(veolcity) = [10]>\n        wait (0.1) seconds\n        change [veolcity v] by (1)\n    end\n    repeat until <(veolcity) = [-10]>\n        wait (0.1) seconds\n        change [veolcity v] by (-1)\n    end\nend\n\nwhen I receive [start v]\ngo to [back v] layer\nrepeat until <(end) = [1]>\n    turn right ((veolcity) * (3)) degrees\nend\n\nwhen I receive [start v]\nshow\npoint in direction (90)\nswitch costume to (costume2 v)\nset size to (100) %\nset [ghost v] effect to (50)\ngo to x: (0) y: (0)\nrepeat (10)\n    wait (0.1) seconds\n    change [ghost v] effect by (-5)\nend\nwait (3) seconds\npoint in direction (80)\nset [data v] to [70]\nset [doat v] to (pick random (70) to (110))\nset [daro v] to (pick random (-1) to (1))\nrepeat (17)\n    set [brightness v] effect to (data)\n    set [data v] to ((data) * (0.7))\n    set size to ((90) + (data)) %\n    point in direction ((doat) + (((data) / (4)) * (daro)))\nend\nwait (0.87) seconds\npoint in direction (80)\nset [data v] to [70]\nset [doat v] to (pick random (70) to (110))\nset [daro v] to (pick random (-1) to (1))\nrepeat (17)\n    set [brightness v] effect to (data)\n    set [data v] to ((data) * (0.7))\n    set size to ((90) + (data)) %\n    point in direction ((doat) + (((data) / (4)) * (daro)))\nend\nrepeat (3)\n    wait (0.87) seconds\n    point in direction (80)\n    set [data v] to [70]\n    set [doat v] to (pick random (70) to (110))\n    set [daro v] to (pick random (-1) to (1))\n    repeat (17)\n        set [brightness v] effect to (data)\n        set [data v] to ((data) * (0.7))\n        set size to ((90) + (data)) %\n        point in direction ((doat) + (((data) / (4)) * (daro)))\n    end\nend\n\nwhen flag clicked\nhide\n\n@Logo/Name\n\nwhen I receive [end v]\nset [end v] to [1]\nwait (2) seconds\nhide\n\nwhen I receive [end v]\nset [ghost v] effect to (0)\nrepeat (25)\n    change [ghost v] effect by (4)\nend\n\nwhen I receive [start v]\npoint in direction (90)\nset size to (100) %\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\nrepeat (10)\n    wait (0.1) seconds\n    change [ghost v] effect by (-10)\nend\nwait (3) seconds\npoint in direction (80)\nset [data v] to [70]\nset [doat v] to (pick random (70) to (110))\nset [daro v] to (pick random (-1) to (1))\nrepeat (17)\n    set [brightness v] effect to (data)\n    set [data v] to ((data) * (0.7))\n    set size to ((90) + (data)) %\n    point in direction ((doat) + (((data) / (4)) * (daro)))\nend\nwait (0.87) seconds\npoint in direction (80)\nset [data v] to [70]\nset [doat v] to (pick random (70) to (110))\nset [daro v] to (pick random (-1) to (1))\nrepeat (17)\n    set [brightness v] effect to (data)\n    set [data v] to ((data) * (0.7))\n    set size to ((90) + (data)) %\n    point in direction ((doat) + (((data) / (4)) * (daro)))\nend\nrepeat (3)\n    wait (0.87) seconds\n    point in direction (80)\n    set [data v] to [70]\n    set [doat v] to (pick random (70) to (110))\n    set [daro v] to (pick random (-1) to (1))\n    repeat (17)\n        set [brightness v] effect to (data)\n        set [data v] to ((data) * (0.7))\n        set size to ((90) + (data)) %\n        point in direction ((doat) + (((data) / (4)) * (daro)))\n    end\nend\n\nwhen I receive [start v]\nset [end v] to [0]\nshow\nstart sound [Tobu - Hope \[NCS Release\] v]\nwait (12) seconds\nbroadcast (end v)\n\nwhen I receive [start v]\nwait (2) seconds\nrepeat until <(end) = [1]>\n    point in direction ((([sin v] of ((timer) * (160)) ) * (16)) + (90))\nend\n\nwhen flag clicked\nhide\n\n@In/Fade2\n\nwhen flag clicked\ngo to x: (-300) y: (300)\n\nwhen I receive [end v]\ngo to [front v] layer\nshow\nglide (0.8) secs to x: (0) y: (0)\nswitch backdrop to (hi v)\nset [done v] to [yes]\nbroadcast (menu v)\nwait (1) seconds\nglide (0.8) secs to x: (-300) y: (300)\n\nwhen flag clicked\nhide\n\n@In/Fade\n\nwhen flag clicked\ngo to x: (300) y: (-300)\n\nwhen I receive [end v]\ngo to [front v] layer\nshow\nglide (0.8) secs to x: (0) y: (0)\nwait (1) seconds\nglide (0.8) secs to x: (300) y: (-300)\n\nwhen flag clicked\nhide\n\n@Thumbnail\n\nwhen flag clicked\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\nbroadcast (start v)\nhide\n\n