Potion platformer Part I
@Stage\n\n@Player\n\nwhen flag clicked\nforever\n    if <key (down arrow v) pressed?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I start as a clone\nrepeat (10)\n    change [ghost v] effect by (10)\n    change size by (-1)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nhide variable [force gravity v]\nswitch backdrop to (backdrop1 v)\nReset Player Position\nset [force walk v] to [3]\nset [force gravity v] to [-1.37]\nset [force jump v] to [17]\nset [player speed x v] to [0]\nforever\n    Check Player Gravity\n    Check Player Walk\n    Check Player Touching\nend\n\ndefine move out (dx) (dy)\nrepeat until <not <<touching color (#66ffed)?> or <<touching color (#c8c8c8)?> or <<touching color (#ff6680)?> or <<touching color (#ffbf00)?> or <touching color (#4d97ff)?>>>>>>\n    change x by (dx)\n    change y by (dy)\nend\n\ndefine Check Player Gravity\nchange [player speed y v] by (FORCE GRAVITY)\nchange y by (Player Speed Y)\nif <<touching color (#66ffed)?> or <<touching color (#c8c8c8)?> or <<touching color (#ff6680)?> or <<touching color (#ffbf00)?> or <touching color (#4d97ff)?>>>>> then\n    if <(Player Speed Y) > [0]> then\n        move out [0] [-1]\n        set [player speed y v] to [0]\n    else\n        move out [0] [1]\n        if <key (up arrow v) pressed?> then\n            set [player speed y v] to (FORCE JUMP)\n        else\n            set [player speed y v] to [0]\n        end\n    end\nend\n\ndefine Check Player Walk\nif <key (left arrow v) pressed?> then\n    change [player speed x v] by ((-1) * (FORCE WALK))\nend\nif <key (right arrow v) pressed?> then\n    change [player speed x v] by ((1) * (FORCE WALK))\nend\nset [player speed x v] to ((Player Speed X) * (0.7))\nchange x by (Player Speed X)\nif <(Player Speed X) > [0]> then\n    move out [-1] [0]\nelse\n    move out [1] [0]\nend\n\ndefine Check Player Touching\nif <touching color (#d519f7)?> then\n    broadcast (Complete level v) and wait\n    Reset Player Position\n    next backdrop\nend\nif <touching color (#7971ff)?> then\n    set [player speed y v] to [24]\nend\nif <<touching color (#ff0202)?> or <touching color (#b9b9b9)?>> then\n    create clone of (_myself_ v)\n    repeat (10)\n        change [ghost v] effect by (50)\n    end\n    Reset Player Position\nend\n\ndefine Reset Player Position\nclear graphic effects\ngo to x: (-200) y: (-10)\n\nwhen backdrop switches to [backdrop11 v]\nhide\n\nwhen flag clicked\nshow\n\nwhen flag clicked\nswitch costume to (costume1 v)\nsay (join [Hello ] (username)) for (2) seconds\n\nwhen flag clicked\nforever\n    if <touching color (#19f76d)?> then\n        set [force walk v] to [9.16]\n    else\n        set [force walk v] to [3]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#f7db19)?> then\n        set [force walk v] to [8.74]\n    else\n        set [force walk v] to [3]\n    end\nend\n\n@Collectable\n\nwhen backdrop switches to [backdrop2 v]\nshow\ngo to x: (-22) y: (78)\n\nwhen flag clicked\nhide\nforever\n    change [color v] effect by (3)\n    if <touching (player v)?> then\n        hide\n    end\nend\n\nwhen I receive [complete level v]\nhide\n\nwhen backdrop switches to [backdrop1 v]\nshow\ngo to x: (-50) y: (30)\n\nwhen backdrop switches to [backdrop9 v]\nshow\ngo to x: (63) y: (-9)\n\nwhen backdrop switches to [backdrop7 v]\nshow\ngo to x: (-179) y: (77)\n\nwhen backdrop switches to [backdrop8 v]\nshow\ngo to x: (49) y: (38)\n\n
Press arrow keys to move. Avoid spikes and lava and collect the Potions.\nHave fun.\nPls propose this to be featured here\nhttps://scratch.mit.edu/studios/28715018/\nPart II- https://scratch.mit.edu/projects/641497173