Minecraft Platformer - Episode 2 

Instructions: sand || scrolling platformer (mobile friendly)\nby @TimMcCool (shared on the 11/25/2019)\n- arrow keys or tap to move\n- don't touch spikes\n- the cacti change your direction\n- hop on the booster to jump very high

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [start v]\nswitch backdrop to (sun and sky? v)\nforever\n    play sound [Unity v] until done\nend\n\n@Player\n\nwhen I start as a clone\nset size to (100) %\nrepeat (20)\n    change [ghost v] effect by (6)\n    change size by (-6)\nend\ndelete this clone\n\nchange [ghost v] effect by (20)\n\n\n\nwhen I receive [start v]\nshow\ngo to x: (-190) y: (0)\nset [x v] to [0]\nset [y v] to [0]\nforever\n    switch costume to (idle v)\n    go to [front v] layer\n    if <key (right arrow v) pressed?> then\n        change [x v] by (1)\n        switch costume to (right v)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x v] by (-1)\n        switch costume to (left v)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <<touching color (#7a0000)?> or <touching color (#54ff00)?>> then\n        change y by (1)\n        if <<touching color (#7a0000)?> or <touching color (#54ff00)?>> then\n            change y by (1)\n            if <<touching color (#7a0000)?> or <touching color (#54ff00)?>> then\n                change y by (1)\n                if <<touching color (#7a0000)?> or <touching color (#54ff00)?>> then\n                    change y by (1)\n                    if <<touching color (#7a0000)?> or <touching color (#54ff00)?>> then\n                        change y by (1)\n                        if <<touching color (#7a0000)?> or <touching color (#54ff00)?>> then\n                            change y by (1)\n                            if <<touching color (#7a0000)?> or <touching color (#54ff00)?>> then\n                                change y by (1)\n                                if <<touching color (#7a0000)?> or <touching color (#54ff00)?>> then\n                                    change x by ((x) * (-1))\n                                    change y by (-7)\n                                    if <key (up arrow v) pressed?> then\n                                        if <(x) > [0]> then\n                                            set [x v] to [-4]\n                                        else\n                                            set [x v] to [4]\n                                        end\n                                        set [y v] to [8]\n                                    else\n                                        set [x v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (-1)\n    if <key (up arrow v) pressed?> then\n        if <<touching color (#7a0000)?> or <touching color (#54ff00)?>> then\n            set [y v] to [15]\n        end\n    end\n    change y by (1)\n    change [y v] by (-1)\n    set [y v] to ((y) * (1))\n    change y by (y)\n    if <<touching color (#7a0000)?> or <touching color (#54ff00)?>> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    if <(x position) > [244]> then\n        broadcast (next v)\n        go to x: (-190) y: (0)\n        set [x v] to [0]\n        set [y v] to [0]\n    end\n    if <<touching color (#ff0000)?> or <[-171] > (y position)>> then\n        go to x: (-190) y: (0)\n        set [x v] to [0]\n        set [y v] to [0]\n        start sound [sfx_hit v]\n    end\n    if <touching (trolls v)?> then\n        go to x: (-190) y: (0)\n        set [x v] to [0]\n        set [y v] to [0]\n        broadcast (Trolled! v)\n    end\nend\n\nwhen I receive [start v]\nchange volume by (-10)\nforever\n    play sound [The song v] until done\nend\n\nwhen I receive [start v]\n\nstart sound [sfx_hit v]\n\nwhen I receive [s-troll v]\ngo to x: (-190) y: (0)\n\nforever\n    create clone of (_myself_ v)\n    wait (0.1) seconds\nend\n\n@Levels\n\nwhen flag clicked\nhide\n\nwhen I receive [next v]\nnext costume\n\nwhen [s v] key pressed\nif <not <(costume [number v]) = [1]>> then\n    switch costume to ((costume [number v]) - (1))\n    broadcast (s-troll v)\nend\n\nwhen flag clicked\n\nwhen I receive [start v]\nhide variable [trolls you fell for v]\nshow\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\n\nwhen I receive [start v]\nforever\n    if <(costume [name v]) = [LAST]> then\n        show variable [trolls you fell for v]\n        set [trolls you fell for v] to (join [Only ] (Trolls you fell for))\n        stop [this script v]\n    end\nend\n\n@Clouds\n\nwhen flag clicked\n\nhide\n\nwhen I receive [game start v]\n\nwhen flag clicked\n\nwhen I receive [start v]\nset [ghost v] effect to (35)\ngo to [back v] layer\nshow\ngo to x: (-66) y: (90)\nforever\n    glide (25) secs to x: (356) y: (90)\n    go to x: (-365) y: (90)\nend\n\nwhen I receive [start v]\nforever\n    go to [back v] layer\nend\n\ngo to [back v] layer\n\n@Trolls\n\nwhen flag clicked\nshow\nset [ghost v] effect to (99)\nforever\n    switch costume to ([costume # v] of [levels v])\nend\n\nwhen I receive [hint v]\nset [ghost v] effect to (0)\nwait (0.1) seconds\nset [ghost v] effect to (99)\nwait (0.1) seconds\nset [ghost v] effect to (0)\nwait (0.1) seconds\nset [ghost v] effect to (99)\nwait (0.1) seconds\nset [ghost v] effect to (0)\nwait (0.1) seconds\nset [ghost v] effect to (99)\nwait (0.1) seconds\nset [ghost v] effect to (0)\nwait (0.1) seconds\nset [ghost v] effect to (99)\nwait (0.1) seconds\n\nwhen I receive [next v]\nset [ghost v] effect to (99)\n\n@Sprite1\n\nwhen flag clicked\n\nwhen I receive [trolled! v]\nchange [trolls you fell for v] by (1)\nchange volume by (50)\nstart sound [Bonk v]\nshow\nwait (1) seconds\nhide\nchange volume by (-50)\n\nwhen I receive [start v]\nhide\nset [trolls you fell for v] to [0]\n\nwhen [s v] key pressed\nbroadcast (Trolled! v)\n\n@Sprite2\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\n@Sprite3\n\ngo to x: (0) y: (0)\n\nwhen this sprite clicked\nbroadcast (Hint v)\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\ngo to [back v] layer\nshow\n\n@loading\n\nwhen flag clicked\nshow\nswitch costume to (loading-0 v)\nrepeat (10)\n    next costume\n    start sound [Pop v]\n    wait (pick random (0.1) to (0.5)) seconds\nend\nbroadcast (start v)\nhide\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch backdrop to (backdrop1 v)\n\nstart sound [meow v]\n\n