bunny a platformer


@Stage\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    switch backdrop to (level)\nend\n\n@Marshmallo\n\nwhen I receive [done intro v]\npoint in direction (90)\nset [x spawn v] to [-177]\nset [y spawn v] to [-68]\ngo to x: (X spawn) y: (Y spawn)\nshow\nset size to (30) %\nset [x v] to [0]\nset [y v] to [0]\nforever\n    Platformer engine\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [done intro v]\nshow\n\ndefine Platformer engine\nchange [y v] by (-0.5)\nif <key (left arrow v) pressed?> then\n    switch costume to (left v)\n    change [x v] by (-0.8)\nend\nif <key (right arrow v) pressed?> then\n    switch costume to (right v)\n    change [x v] by (0.8)\nend\nset [x v] to ((X) * (0.9))\nchange x by (X)\nif <touching color (#ffffff)?> then\n    change y by (1)\n    if <touching color (#ffffff)?> then\n        change y by (1)\n        if <touching color (#ffffff)?> then\n            change y by (1)\n            if <touching color (#ffffff)?> then\n                change y by (1)\n                if <touching color (#ffffff)?> then\n                    change y by (1)\n                    if <touching color (#ffffff)?> then\n                        change y by (-6)\n                        change x by ((X) * (-1))\n                        if <key (up arrow v) pressed?> then\n                            set [y v] to [10]\n                            if <(X) > [0]> then\n                                set [x v] to [-10]\n                            else\n                                set [x v] to [10]\n                            end\n                        else\n                            set [x v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange y by (Y)\nif <touching color (#ffffff)?> then\n    change y by ((Y) * (-1))\n    set [y v] to [0]\nend\nchange y by (-0.5)\nif <<touching color (#ffffff)?> and <key (up arrow v) pressed?>> then\n    set [y v] to [10]\nend\nchange y by (0.5)\nif <(x position) > [217]> then\n    change [level v] by (1)\n    go to x: (X spawn) y: (Y spawn)\nend\nif <touching (tramppoline v)?> then\n    set [y v] to [15]\nend\nif <touching color (#ffd1d9)?> then\n    go to x: (X spawn) y: (Y spawn)\nend\n\nwhen flag clicked\nchange [☁ viewers v] by (1)\nhide variable [☁ viewers v]\n\n@intro\n\nwhen flag clicked\nrepeat (45)\n    wait (0.01) seconds\n    next costume\nend\n\nwhen flag clicked\nswitch costume to (1 v)\n\nwhen flag clicked\nshow\nwait (3.7) seconds\nset [ghost v] effect to (25)\nwait (0.01) seconds\nset [ghost v] effect to (45)\nwait (0.01) seconds\nset [ghost v] effect to (75)\nwait (0.01) seconds\nset [ghost v] effect to (85)\nwait (0.4) seconds\nhide\nbroadcast (done intro v)\n\nwhen flag clicked\nstart sound [Slide Whistle v]\nbroadcast (whistle done v)\n\nwhen I receive [whistle done v]\nwait (1) seconds\nstart sound [Drum Boing v]\nbroadcast (boing v)\n\nwhen I receive [whistle done v]\nwait (1.7) seconds\nstart sound [Disconnect v]\nbroadcast (bite v)\n\nwhen I receive [bite v]\nwait (2) seconds\nstart sound [Bite v]\n\n@Sprite1\n\nwhen flag clicked\nforever\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    go to x: (0) y: (0)\nend\n\n