Escape!! | A Platformer P1
@Stage\n\nwhen I receive [game playing v]\nswitch backdrop to (backdrop 2 v)\nif <(game end) = <[50] = [50]>> then\n    stop all sounds\n    stop [this script v]\nelse\n    forever\n        play sound [506467_Fly-or-Die-AlienFly v] until done\n    end\nend\n\nwhen backdrop switches to [backdrop 9 v]\nbroadcast (Game end! v)\n\n@player\n\nwhen I start as a clone\nclear graphic effects\nrepeat (10)\n    change [ghost v] effect by (10)\n    change y by (5)\n    turn right (-5) degrees\nend\ndelete this clone\n\nwhen flag clicked\nhide\nset [level # v] to [1]\nset [game end v] to <[5] = [50]>\nswitch costume to (player v)\n\nwhen I receive [reset v]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\ngo to x: (-190) y: (-79)\n\nwhen I receive [game playing v]\nshow\ngo to x: (-41) y: (-124)\nforever\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [x velocity v] by (-1.5)\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [x velocity v] by (1.5)\n    end\n    set [x velocity v] to ((X velocity) * (0.85))\n    change x by (X velocity)\n    if <touching ( ground sprite v)?> then\n        change y by (1)\n    end\n    if <touching ( ground sprite v)?> then\n        change y by (1)\n    end\n    if <touching ( ground sprite v)?> then\n        change y by (1)\n    end\n    if <touching ( ground sprite v)?> then\n        change y by (1)\n    end\n    if <touching ( ground sprite v)?> then\n        change y by (-4)\n        change x by ((X velocity) * (-1))\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            if <(X velocity) > [0]> then\n                set [x velocity v] to [-10]\n            else\n                set [x velocity v] to [10]\n            end\n            set [y velocity v] to [15]\n        else\n            set [x velocity v] to [0]\n        end\n    end\n    change [y velocity v] by (-1)\n    change y by (Y velocity)\n    if <touching ( ground sprite v)?> then\n        change y by ((Y velocity) - ((Y velocity) * (2)))\n        set [y velocity v] to [0]\n        if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n            switch costume to (crouch v)\n        else\n            switch costume to (player v)\n        end\n    end\n    change y by (-1)\n    if <<touching ( ground sprite v)?> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        set [y velocity v] to [15]\n    end\n    change y by (1)\n    if <(x position) > [239]> then\n        broadcast (Next Level v) and wait\n    end\n    if <touching (spikes v)?> then\n        broadcast (Reset v)\n        create clone of (_myself_ v)\n    else\n        if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n            switch costume to (crouch v)\n        else\n            switch costume to (player v)\n        end\n        if <touching (lava v)?> then\n            broadcast (Reset v)\n            create clone of (_myself_ v)\n        end\n    end\n    if <(game end) = <[50] = [50]>> then\n        switch costume to (player v)\n        go to x: (-164) y: (-124)\n        stop [this script v]\n    end\nend\n\nwhen I receive [next level v]\nbroadcast (Reset v)\n\nwhen I receive [game end! v]\nset [game end v] to <[50] = [50]>\n\n@ Ground Sprite\n\nwhen flag clicked\nswitch costume to (1 v)\nhide\n\nwhen I receive [game playing v]\nshow\n\nwhen I receive [next level v]\nnext costume\nnext backdrop\n\n@Lava\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen backdrop switches to [backdrop 3 v]\nswitch costume to (lava 1 v)\nshow\n\nwhen I receive [next level v]\nnext costume\n\n@Intro\n\nwhen flag clicked\nshow\nset [ghost v] effect to (0)\nswitch costume to (end credits  v)\ngo to x: (0) y: (0)\npoint in direction (90)\nset [fisheye v] effect to (2000)\nstart sound [Drum Boing v]\nrepeat (20)\n    change [fisheye v] effect by (-100)\nend\nwait (1) seconds\nstart sound [Low Whoosh v]\nswitch costume to (end credits 2 v)\nwait (1.5) seconds\nrepeat (100)\n    change [ghost v] effect by (2)\nend\nbroadcast (play Intro v)\nhide\n\n@Game Story \n\nwhen flag clicked\nset [ghost v] effect to (0)\nswitch costume to (story1 v)\nhide\n\nwhen I receive [play intro v]\nshow\nwait (7) seconds\nswitch costume to (story2 v)\nwait (4) seconds\nstart sound [Glass Breaking v]\nbroadcast (Game playing v)\nrepeat (100)\n    change [ghost v] effect by (2)\nend\nhide\n\n@Spikes\n\nwhen flag clicked\npoint in direction (90)\nhide\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\n\nwhen backdrop switches to [backdrop 5 v]\nshow\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\n@Thummail\n\nwhen flag clicked\nhide\n\n@follow\n\nwhen flag clicked\nset [pixelate v] effect to (300)\npoint in direction (90)\ngo to x: (207) y: (80)\nhide\n\nwhen I receive [follow, fave, love v]\nshow\nrepeat (15)\n    change [pixelate v] effect by (-20)\n    wait (0.1) seconds\nend\n\n@Alien\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [game end! v]\nshow\ngo to x: (243) y: (-134)\nwait (1) seconds\nglide (1) secs to x: (89) y: (-134)\nSay [I've got you now!] and wait (1) secs\nSay [do you know what I am going to do to you?] and wait (1) secs\nSay [I will continuing experiments on you!] and wait (1) secs\nSay [Then once I find out how control all humans with mind control] and wait (1) secs\nSay [We will take over the world!!] and wait (1) secs\nSay [HA HA HA HA HA HA!!!] and wait (1) secs\nglide (1) secs to x: (243) y: (-134)\nhide\nbroadcast (Follow, fave, love v)\n\ndefine Say (phrase1) and wait (num) secs\nset [say v] to []\nrepeat (length of (phrase1))\n    start sound [Chit chat v]\n    set [say v] to (join (Say) (letter ((length of (Say)) + (1)) of (phrase1)))\n    say (Say)\n    if <(letter (length of (Say)) of (phrase1)) = [.]> then\n        wait (0.5) seconds\n    end\n    if <(letter (length of (Say)) of (phrase1)) = [!]> then\n        wait (0.5) seconds\n    end\n    if <(letter (length of (Say)) of (phrase1)) = [,]> then\n        wait (0.5) seconds\n    end\n    if <(letter (length of (Say)) of (phrase1)) = [?]> then\n        wait (0.5) seconds\n    end\n    wait (0.05) seconds\nend\nwait (num) seconds\nsay []\n\n@text\n\nwhen I receive [follow, fave, love v]\nshow\nrepeat (15)\n    change [pixelate v] effect by (-20)\n    wait (0.1) seconds\nend\n\nwhen flag clicked\nset [pixelate v] effect to (300)\npoint in direction (90)\ngo to x: (0) y: (-37)\nhide\n\n@fave\n\nwhen flag clicked\nset [pixelate v] effect to (300)\npoint in direction (90)\ngo to x: (-89) y: (7)\nhide\n\nwhen I receive [follow, fave, love v]\nshow\nrepeat (15)\n    change [pixelate v] effect by (-20)\n    wait (0.1) seconds\nend\n\n@cage\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [game end! v]\nshow\ngo to x: (-180) y: (-95)\nplay sound [BFDI big hit v] until done\n\n@love\n\nwhen flag clicked\nset [pixelate v] effect to (300)\npoint in direction (90)\ngo to x: (-36) y: (107)\nhide\n\nwhen I receive [follow, fave, love v]\nshow\nrepeat (15)\n    change [pixelate v] effect by (-20)\n    wait (0.1) seconds\nend\n\n
Hope you enjoy!!\n\nALL LEVELS ARE POSSIBLE!\n\nControls:\nS/Down arrow (Crouch)\nW/ Up arrow  (Jump)\nA/D/Right/Left arrow   (Move)     \n\n