Halloween- A Mobile Platformer
@Stage\n\nwhen flag clicked\nforever\n    switch backdrop to (join [backdrop] (level))\nend\n\n@spikes\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\n@Exit\n\n@Player\n\nwhen flag clicked\nset [air time v] to [0]\nset [max level v] to [1]\nset [level v] to [1]\nRespawn [-200] [-100]\nforever\n    switch costume to (hitbox v)\n    change [air time v] by (1)\n    if <(air time) > [100]> then\n        set [air time v] to [100]\n    end\n    change [y speed v] by (-2)\n    Change Y (y speed)\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(touching ground) = [1]>> then\n        set [y speed v] to [20]\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        point in direction (90)\n        change [x speed v] by (2)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        point in direction (-90)\n        change [x speed v] by (-2)\n    end\n    if <(x speed) > [8]> then\n        set [x speed v] to [8]\n    else\n        if <(x speed) < [-8]> then\n            set [x speed v] to [-8]\n        end\n    end\n    Change X (x speed)\n    if <(x speed) > [0]> then\n        change [x speed v] by (-1)\n    else\n        if <(x speed) < [0]> then\n            change [x speed v] by (1)\n        end\n    end\n    if <<(x position) > [239]> and <not <(level) = [16]>>> then\n        if <not <(level) = (max level)>> then\n            Respawn [-210] [-100]\n            change [level v] by (1)\n        end\n    end\n    if <<touching (rising lava v)?> or <touching (spikes v)?>> then\n        if <<(level) = [11]> or <(level) = [15]>> then\n            change [deaths on hard level v] by (1)\n        end\n        Respawn [-210] [-100]\n    end\n    switch costume to (player v)\nend\n\ndefine Respawn (x) (y)\nset [x speed v] to [0]\nset [y speed v] to [0]\ngo to x: (x) y: (y)\n\ndefine Change X (x speed)\nset [slope v] to [0]\nif <(touching ground) = [1]> then\n    set [max slope v] to [15]\nelse\n    set [max slope v] to [1]\nend\nchange x by (x speed)\nif <touching (level v)?> then\n    repeat until <<not <touching (level v)?>> or <(slope) = (max slope)>>\n        change y by (1)\n        change [slope v] by (1)\n    end\nend\nif <(slope) = (max slope)> then\n    change y by (() - (slope))\n    set [x speed v] to [0]\n    if <(x speed) > [0]> then\n        repeat until <not <touching (level v)?>>\n            change x by (-1)\n        end\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(air time) > [5]>> then\n            set [y speed v] to [15]\n            set [x speed v] to [-10]\n        end\n    else\n        repeat until <not <touching (level v)?>>\n            change x by (1)\n        end\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(air time) > [5]>> then\n            set [y speed v] to [15]\n            set [x speed v] to [10]\n        end\n    end\nend\nif <(touching ground) = [1]> then\n    change y by (-15)\n    if <touching (level v)?> then\n        repeat until <not <touching (level v)?>>\n            change y by (1)\n        end\n    else\n        change y by (15)\n    end\nend\n\ndefine Change Y (y speed)\nchange y by (y speed)\nset [touching ground v] to [0]\nif <touching (level v)?> then\n    set [y speed v] to [0]\n    if <<(y speed) > [0]> or <(y speed) = [0]>> then\n        repeat until <not <touching (level v)?>>\n            change y by (-1)\n        end\n    else\n        set [touching ground v] to [1]\n        set [air time v] to [0]\n        repeat until <not <touching (level v)?>>\n            change y by (1)\n        end\n    end\nend\n\nwhen flag clicked\nset rotation style [left-right v]\n\nset size to (100) %\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    if <<touching (spikes v)?> or <(y position) < [-180]>> then\n        Respawn [-200] [-100]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(x position) > [240]> then\n        change [level v] by (1)\n        broadcast (Next Level v) and wait\n        Respawn [-200] [100]\n    end\nend\n\nwhen I receive [respawn v]\nRespawn [-200] [-100]\n\n@level\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    switch costume to (level)\nend\n\nset [level v] to [70]\n\nwhen flag clicked\nset volume to (50) %\nforever\n    play sound [Vexento - Tevo \(Original Mix\)2.MP3 v] until done\nend\n\nwhen I receive [mute v]\nset volume to (0) %\n\nwhen I receive [unmute v]\nset volume to (50) %\n\n@mute button\n\nwhen flag clicked\ngo to [front v] layer\ngo to x: (220) y: (170)\nswitch costume to (costume1 v)\nbroadcast (unmute v)\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    switch costume to (costume2 v)\n    broadcast (mute v)\nelse\n    switch costume to (costume1 v)\n    broadcast (unmute v)\nend\n\n@respawn button \n\nwhen flag clicked\ngo to x: (-221) y: (-166)\n\nwhen this sprite clicked\nbroadcast (respawn v)\n\n@bg\n\nwhen flag clicked\nforever\n    switch costume to (level)\n    go to [back v] layer\nend\n\n@Sprite1\n\nwhen flag clicked\nforever\n    wait until <<touching (mouse-pointer v)?> and <mouse down?>>\n    if <(level) > [72]> then\nend\n\nchange [level v] by (-1)\n\n@coin\n\nwhen flag clicked\nhide\nset [collected_coins v] to [0]\nwait until <(level) = [35]>\nshow\ngo to x: (36) y: (20)\nwait until <touching (player v)?>\nchange [collected_coins v] by (1)\nhide\nwait until <(level) = [36]>\nhide\nwait until <(level) = [40]>\nshow\ngo to x: (76) y: (66)\nwait until <touching (player v)?>\nchange [collected_coins v] by (1)\nhide\nwait until <(level) = [42]>\nshow\ngo to x: (85) y: (-39)\nwait until <touching (player v)?>\nchange [collected_coins v] by (1)\nhide\nwait until <(level) = [47]>\nshow\ngo to x: (-5) y: (1)\nwait until <touching (player v)?>\nchange [collected_coins v] by (1)\nhide\nwait until <(level) = [60]>\nshow\ngo to x: (96) y: (137)\nwait until <touching (player v)?>\nchange [collected_coins v] by (1)\nhide\nwait until <(level) = [63]>\nshow\ngo to x: (133) y: (80)\nwait until <touching (player v)?>\nchange [collected_coins v] by (1)\nhide\nwait until <(level) = [73]>\nshow\nrepeat (4)\n    go to x: (pick random (-200) to (0)) y: (0)\n    wait until <touching (player v)?>\n    change [collected_coins v] by (1)\nend\nhide\n\nset [level v] to [60]\n\nshow\n\nwhen flag clicked\nforever\n    if <(username) = [AngrybirdsElWy]> then\n        switch costume to (coin v)\n    else\n        switch costume to (coin v)\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nforever\n    switch costume to ((collected_coins) + (1))\nend\n\n@Sprite3\n\n
        ✿ Sunlight Valley ✿ 100% Multiplayer!\n       ✿ Multiplayer Scrolling Platformer ✿\nIf you give it a heart and a star, You get 10 coins! :D\nTry it!\n\nTHIS IS MY BEST GAME SO FAR!! DON’T FORGET TO FOLLOW FOR MORE FUN GAMES =)\n\nIf you had fun or appreciate my hard work, make sure to love ❤️ and favorite ⭐\n\nInstructions:\nWelcome to the Sunlight Valley! Collect coins to buy items from the shop. Make sure to watch out for dangerous critters! There are 4 optional hidden places, finding one gives you 10 explorer points! Enjoy :)\n          ✦✦ How to play ✦✦\n➜ Collect coins, use them to buy items in the shop\n➜ [T] to chat, [#] or [letter] to choose phrase. On MOBILE, tap the player\n➜ Press the SPACE key to activate a parachute. Hold your finger down on mobile.\n➜ [N] to turn on/off names\n           ✦✦ Credits ✦✦\n➜ Multiplayer engine by @StratfordJames\n➜ ALL ART - 100% - drawn by @StratfordJames\n➜ Art inspired by Veewo (Super Phantom Cat 2)\n\n#games #games #games #games #art #multiplayer #scrolling #platformer #amazingQ #amazingQ