Bunny a platformer 3


@Stage\n\nwhen flag clicked\nchange [☁ veiwers v] by (1)\nhide variable [☁ veiwers v]\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    switch backdrop to (level)\nend\n\n@Welcome\n\n@stuff\n\nwhen flag clicked\nhide\n\nwhen I receive [done intro v]\n\n    play sound [Lofi HipHop 5min chill v] until done\nend\n\n@intro\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\nswitch costume to (costume1 v)\nrepeat until <(costume [number v]) = [65]>\n    wait (0.01) seconds\n    next costume\nend\nbroadcast (Done intro v)\nhide\n\nwhen this sprite clicked\nbroadcast (done intro v)\nstop all sounds\n\nwhen flag clicked\nplay sound [Short intro music v] until done\nplay sound [Bite v] until done\n\nwhen I receive [done intro v]\nhide\n\n@bunny\n\nwhen flag clicked\nshow\ngo to [back v] layer\n\ndefine Platformer engine\nchange [y v] by (-0.5)\nif <key (left arrow v) pressed?> then\n    switch costume to (right v)\n    change [x v] by (-0.8)\nend\nif <key (right arrow v) pressed?> then\n    switch costume to (left 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) > [179]> then\n    change [level v] by (1)\n    go to x: (X spawn) y: (Y spawn)\nend\nif <touching color (#fdffd1)?> then\n    set [y v] to [15]\nend\nif <touching color (#ffd1d9)?> then\n    go to x: (X spawn) y: (Y spawn)\nend\nif <touching color (#aaffbb)?> then\n    set [x v] to [0]\n    if <key (up arrow v) pressed?> then\n        set [y v] to [1]\n    end\nend\nif <<touching color (#0063ff)?> and <key (right arrow v) pressed?>> then\n    set [x v] to [11]\nend\nif <touching color (#000000)?> then\n    set [x v] to [5]\n    if <key (up arrow v) pressed?> then\n        set [y v] to [1]\n    end\nend\n\nwhen I receive [done intro v]\nshow\npoint in direction (90)\nset [x spawn v] to [-110]\nset [y spawn v] to [-26]\ngo to x: (X spawn) y: (Y spawn)\nshow\nset size to (70) %\nset [x v] to [0]\nset [y v] to [0]\nforever\n    Platformer engine\nend\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