Potions - Platformer
@Stage\n\nwhen flag clicked\nforever\n    play sound [Dance Slow Mo v] until done\nend\n\n@Player\n\nwhen flag clicked\nPosition\nReset\nforever\n    if <key (left arrow v) pressed?> then\n        set [x velocity v] to [-8]\n    else\n        if <key (right arrow v) pressed?> then\n            set [x velocity v] to [8]\n        else\n            set [x velocity v] to [0]\n        end\n    end\n    if <not <touching (ground v)?>> then\n        change y by (gravity)\n    end\n    if <touching (danger v)?> then\n        Position\n    end\n    change x by (x velocity)\nend\n\nwhen flag clicked\nforever\n    if <touching (next level v)?> then\n        change [level v] by (1)\n        broadcast (message1 v)\n        Position\n    end\n    if <key (up arrow v) pressed?> then\n        repeat (10)\n            change y by (20)\n        end\n        repeat until <touching (ground v)?>\n            change y by (-10)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (left arrow v) pressed?> then\n        change [velocity v] by (-1)\n    end\n    if <key (right arrow v) pressed?> then\n        change [velocity v] by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#ff0000)?> then\n        go to x: (-185) y: (-129)\n    end\n    if <touching color (#fbff00)?> then\n        go to x: (-185) y: (-129)\n        next backdrop\n    end\n    if <touching color (#fcff50)?> then\n        switch backdrop to (finished v)\n    end\nend\n\ndefine Position\ngo to x: (-205) y: (-118)\n\ndefine Reset\nset [gravity v] to [-5]\nset [level v] to [1]\n\n@Ground\n\n@Danger\n\nwhen flag clicked\nswitch costume to (1 v)\nforever\n    go to [back v] layer\nend\n\nwhen I receive [message1 v]\nnext costume\n\n@Next Level\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\n@Tumbnail\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\nend\n\n
I made this for the SDS Studio called Magical Mixes!