My Little Pony Platformer

Instructions: Move Twilight with the arrow keys. Jump = up arrow key.\nCollect friends by clicking them and defeat King Sombra with magic! (aka m key)\nHave fun!

@Stage\n\nwhen flag clicked\nshow list [collected ponies v]\nswitch backdrop to (starting v)\nstart sound [My Little Pony - Friendship is Magic - Opening v]\nwait until <key (space v) pressed?>\nstop all sounds\nswitch backdrop to (sky v)\n\nwhen backdrop switches to [sky v]\nstop all sounds\nstart sound [Sia - Rainbow \(From The 'My Little Pony- The Movie' Official Soundtrack\) \(Official Video\).mp3 v]\n\nwhen backdrop switches to [backdrop1 v]\nhide list [collected ponies v]\n\nwhen backdrop switches to [backround3 v]\nstop all sounds\nstart sound [My Little Pony The Movie - Off To See The World.mp3 v]\n\nwhen backdrop switches to [backround4 v]\nstop all sounds\nstart sound [Rainbow Dash  Captain Celaeno - Time To Be Awesome \(Lyrics\) - My Little Pony- The Movie \[HD\].mp3 v]\n\nwhen backdrop switches to [backdrop1 v]\nstop all sounds\nstart sound [Im the Friend You Need - My Little Pony- The Movie.mp3 v]\n\n@twilight sparkle\n\ndefine Gravity\nif <touching color (#7f00ff)?> then\n    set [yspeed v] to [0]\nelse\n    if <(yspeed) < [-8]> then\n        set [yspeed v] to [-8]\n    else\n        change [yspeed v] by (-0.4)\n    end\nend\n\ndefine Jump\nif <<key (up arrow v) pressed?> and <touching color (#7f00ff)?>> then\n    set [yspeed v] to [12]\nend\n\ndefine Left and right controls\nif <key (left arrow v) pressed?> then\n    set [xspeed v] to [-5]\nend\nif <key (right arrow v) pressed?> then\n    point in direction (90)\n    set [xspeed v] to [5]\nend\nset [movement v] to [1]\n\nwhen flag clicked\ngo to x: (-198) y: (117)\nset [level v] to [1]\nset [lives v] to [3]\nforever\n    Check Collisions\n    Left and right controls\n    Animate\n    Gravity\n    Jump\n    change x by (xspeed)\n    change y by (yspeed)\n    set [xspeed v] to [0]\n    set [movement v] to [0]\nend\n\ndefine Setup\nset [ponies collected v] to [0]\nif <(Level) = [2]> then\n    go to x: (-180) y: (108)\nend\nif <(Level) = [3]> then\n    go to x: (-190) y: (-89)\nend\n\ndefine Check Collisions\nif <(Lives) = [0]> then\n    switch backdrop to (game over v)\nend\n\ndefine Animate\nif <(movement) = [1]> then\n    next costume\n    if <<(costume [number v]) = [1]> or <(costume [number v]) = [2]>> then\n        switch costume to (fanmade_trotcycle_twilight_right-1 v)\n    end\nend\nif <(movement) = [0]> then\n    switch costume to (twilight__s_failed_spell_by_deathpwny-d4j04nr-37 v)\nend\n\nwhen I receive [change level v]\nchange [level v] by (1)\nif <(Level) = [2]> then\n    switch backdrop to (backround3 v)\nend\nif <(Level) = [3]> then\n    switch backdrop to (backround4 v)\nend\n\nwhen backdrop switches to [sky v]\nshow variable [ponies collected v]\nshow\n\nwhen I receive [change level v]\nSetup\n\nwhen flag clicked\nSetup\n\nwhen [m v] key pressed\nswitch costume to (twilight__s_failed_spell_by_deathpwny-d4j04nr-4 v)\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\nwhen flag clicked\nhide variable [ponies collected v]\nswitch costume to (twilight__s_failed_spell_by_deathpwny-d4j04nr-37 v)\nhide\n\nwhen flag clicked\nforever\n    if <<touching (gateway v)?> and <(Ponies Collected) = [2]>> then\n        broadcast (change level v)\n    end\n    if <<touching (gateway v)?> and <(Ponies Collected) = [0]>> then\n        broadcast (talk v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [2]> then\n        set [magic v] to [1]\n    else\n        set [magic v] to [0]\n    end\nend\n\n@pinkie_front_flip_with_full_twist_by_deathpwny-d4r393j\n\nwhen flag clicked\ndelete (all) of [collected ponies v]\nhide\n\nwhen backdrop switches to [sky v]\nswitch costume to (pinkie_front_flip_with_full_twist_by_deathpwny-d4r393j-36 v)\nshow\nrepeat until <(backdrop [name v]) = [backround 3]>\n    wait (0.1) seconds\n    next costume\nend\n\nwhen this sprite clicked\nask [Who are you?] and wait\nsay (join [Oh, hi,] (join (answer) [!])) for (3) seconds\nsay [I am Pinkie Pie!] for (2) seconds\nchange [ponies collected v] by (1)\nhide\nadd [Pinkie Pie] to [collected ponies v]\n\n@FANMADE_Trixie_watch_in_awe_sprite_by_Yamino\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [sky v]\nswitch costume to (fanmade_trixie_watch_in_awe_sprite_by_yamino-21 v)\nshow\nrepeat until <(backdrop [name v]) = [backround 3]>\n    wait (0.1) seconds\n    next costume\nend\n\nwhen this sprite clicked\nask [Who graces the Great and Powerful Trixie's prasence?] and wait\nsay (join [So,] (join (answer) [ is your name.])) for (3) seconds\nsay [I will help you on your quest!] for (2) seconds\nchange [ponies collected v] by (1)\nhide\nadd [Trixie] to [collected ponies v]\n\n@applejack_pixel_trot_by_charlie46-d4voc0w\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backround3 v]\nswitch costume to (applejack_pixel_trot_by_charlie46-d4voc0w-1 v)\nshow\nrepeat until <(backdrop [name v]) = [backround 4]>\n    wait (0.1) seconds\n    next costume\nend\n\nwhen this sprite clicked\nask [What's your name?] and wait\nsay (join [Well, howdy] (join (answer) [ !])) for (3) seconds\nsay [My name's Applejack!] for (2) seconds\nchange [ponies collected v] by (1)\nhide\nadd [Applejack] to [collected ponies v]\n\n@sunset_shimmer_galloping_by_botchan_mlp-d687z7l\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backround3 v]\nswitch costume to (sunset_shimmer_galloping_by_botchan_mlp-d687z7l-0 v)\nshow\nrepeat until <(backdrop [name v]) = [backround 4]>\n    wait (0.1) seconds\n    next costume\nend\n\nwhen this sprite clicked\nask [Hello. What's your name?] and wait\nsay (join [Hi] (join [ ] (answer))) for (3) seconds\nsay [My name is Sunset Shimmer.] for (2) seconds\nchange [ponies collected v] by (1)\nhide\nadd [Sunset Shimmer] to [collected ponies v]\n\n@Sprite4\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backround4 v]\nswitch costume to (131413620186 \(co v)\nshow\nrepeat until <(backdrop [name v]) = [backdrop1]>\n    wait (0.1) seconds\n    next costume\nend\n\nwhen this sprite clicked\nask [Who are you?] and wait\nsay (join [Oh, hey,] (join (answer) [ !])) for (3) seconds\nsay [I'm Rainbow Dash!] for (2) seconds\nchange [ponies collected v] by (1)\nhide\nadd [Rainbow Dash] to [collected ponies v]\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\n@fly_fluttershy_updown_left\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backround4 v]\nswitch costume to (fly_fluttershy_updown_left-1 v)\nshow\nrepeat until <(backdrop [name v]) = [backdrop1]>\n    wait (0.1) seconds\n    next costume\nend\n\nwhen this sprite clicked\nask [Oh, h-hi. What's your name?] and wait\nsay (join [Hello,] (join (answer) [ .])) for (3) seconds\nsay [My name is Fluttershy.] for (2) seconds\nchange [ponies collected v] by (1)\nhide\nadd [Fluttershy] to [collected ponies v]\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\n@king_sombra_by_botchan_mlp-d5oj6d3\n\nwhen flag clicked\nset [magic v] to [0]\nhide\n\nwhen backdrop switches to [backround4 v]\nswitch costume to (king_sombra_by_botchan_mlp-d5oj6d3-0 v)\nshow\nrepeat until <(backdrop [name v]) = [backdrop 1]>\n    wait (0.1) seconds\n    next costume\nend\n\nwhen this sprite clicked\nset [s l v] to [3]\nask [Have you come to defeat me?] and wait\nsay [The only way you can is with magic! HAhahahahhaah!] for (3) seconds\nwait until <key (m v) pressed?>\nsay [Arugh! I am defeated!] for (2) seconds\nchange [ponies collected v] by (1)\nhide\nadd [King Sombra] to [collected ponies v]\nswitch backdrop to (backdrop1 v)\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\nwhen backdrop switches to [backdrop1 v]\nhide variable [ponies collected v]\n\n@gateway\n\nwhen flag clicked\nset [ponies collected v] to [0]\nhide\n\nwhen backdrop switches to [sky v]\nshow\n\nwhen I receive [talk v]\nsay [Go get more ponies on your side!] for (3) seconds\n\nwhen backdrop switches to [backround4 v]\nhide\n\n