Fly High! (A Scrolling Platformer)

Instructions: Arrow keys to move.  Space to look around.  Fly to different platforms!\n\nTry to get through the level to the portal.  There is a hidden star in the level.  See if you can find it!  If you did, comment below! :)

@Stage\n\n@Game\n\nwhen flag clicked\nSetup\nforever\n    if <<key (space v) pressed?> and <not <(Mouse Zoom) > []>>> then\n        set [mouse zoom v] to [5]\n        wait until <not <key (space v) pressed?>>\n    else\n        if <<key (space v) pressed?> and <(Mouse Zoom) > []>> then\n            set [mouse zoom v] to []\n            wait until <not <key (space v) pressed?>>\n        end\n    end\n    if <(Mouse Zoom) > []> then\n        set [scroll x v] to ((mouse x) + (X))\n        set [scroll y v] to ((mouse y) + (Y))\n        Player Pos\n        if <<((X) - (SCROLL X)) = (x position)> and <((Y) - (SCROLL Y)) = (y position)>> then\n            show\n        else\n            hide\n        end\n        broadcast (Tick All v) and wait\n    else\n        if <(Player Die) > []> then\n            Setup\n        end\n        Tick Not All\n        broadcast (Tick All v) and wait\n    end\nend\n\ndefine Tick Not All\nshow\nswitch costume to (hitbox v)\ngo to [front v] layer\npoint in direction (90)\nset [sx v] to ((sx) * (.8))\nif <key (right arrow v) pressed?> then\n    change [sx v] by (5)\n    Collision ((7) / (item ([abs v] of (1) ) of [collision v])) [0] [Yes]\nend\nif <key (left arrow v) pressed?> then\n    change [sx v] by (-5)\n    Collision ((-7) / (item ([floor v] of (1) ) of [collision v])) [0] [Yes]\nend\nif <<key (up arrow v) pressed?> and <(Falling) < [30]>> then\n    set [sy v] to [10]\nend\nif <not <(sy) < [-15]>> then\n    change [sy v] by (-1)\nend\nCollision [0] ((sy) / (item ([floor v] of (1) ) of [collision v])) [No]\nset [scroll x v] to (X)\nchange [scroll y v] by (round (((Y) - (SCROLL Y)) / (5)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPlayer Pos\nswitch costume to (player v)\nchange y by (5)\npoint in direction ((sx) * (.9))\nif <(y position) = [-181]> then\n    set [player die v] to [Die]\nend\n\ndefine Collision (sx) (sy) (on x?)\nif <(on x?) = [Yes]> then\n    change [x v] by ((sx) + (item (2) of [collision v]))\n    Player Pos\n    repeat until <not <touching (level v)?>>\n        repeat (6)\n            change [y v] by (1)\n            Player Pos\n            if <not <touching (level v)?>> then\n                stop [this script v]\n            end\n        end\n        change [y v] by (-6)\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Player Pos\n    end\nelse\n    change [y v] by ((sy) + (item (2) of [collision v]))\n    change [falling v] by (1)\n    Player Pos\n    repeat until <not <touching (level v)?>>\n        if <(sy) > [0]> then\n            change [y v] by (-1)\n        else\n            change [y v] by (1)\n            set [falling v] to [0]\n        end\n        set [sy v] to [0]\n        Player Pos\n    end\nend\n\ndefine Player Pos\ngo to x: ((X) - (SCROLL X)) y: ((Y) - (SCROLL Y))\n\ndefine Setup\nbroadcast (Reset v) and wait\nbroadcast (Setup v) and wait\ndelete all of [collision v]\nadd [1] to [collision v]\nadd [0] to [collision v]\nset [x v] to [0]\nset [y v] to [50]\nset [sy v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to (Y)\nset [mouse zoom v] to []\nset [player die v] to []\nshow\nPlayer Pos\nbroadcast (Tick All v) and wait\n\n@Level\n\nwhen I receive [tick all v]\nPos X ((X) - (SCROLL X)) Pos Y ((Y) - (SCROLL Y))\n\ndefine Pos X (pos x) Pos Y (pos y)\ngo to x: (pos x) y: (pos y)\nif <<(pos x) = (x position)> and <(pos y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (costume1 v)\nMake Clone [360] [500]\nMake Clone [-500] [280]\nMake Clone [-500] [300]\nMake Clone [-500] [300]\nMake Clone [1000] [0]\nMake Clone [360] [300]\nMake Clone [360] [-100]\nMake Clone [300] [-360]\nMake Clone [500] [0]\n\ndefine Make Clone (posx) (posy)\ncreate clone of (_myself_ v)\nchange [x v] by (posx)\nchange [y v] by (posy)\nnext costume\n\n@Fly\n\nwhen I receive [tick all v]\nset [ghost v] to [0]\nif <<key (up arrow v) pressed?> and <([falling v] of [game v]) < [20]>> then\n    go to (game v)\n    turn right (15) degrees\n    set [ghost v] effect to ((0) + (([sin v] of ((Ghost) * (1.3)) ) * (40)))\n    change [ghost v] by (10)\nelse\n    go to (game v)\n    turn right (15) degrees\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nclear graphic effects\nset [ghost v] to [0]\nset [ghost v] effect to (100)\n\n@Portal\n\nwhen I receive [setup v]\nset [x v] to [1600]\nset [y v] to [1220]\nswitch costume to (costume1 v)\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Pos X (pos x) Pos Y (pos y)\ngo to x: (pos x) y: (pos y)\nturn right (15) degrees\nif <<(pos x) = (x position)> and <(pos y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [tick all v]\nPos X ((X) - (SCROLL X)) Pos Y ((Y) - (SCROLL Y))\nif <touching (game v)?> then\n    broadcast (YOU WIN v) and wait\nend\n\n@END\n\nwhen I receive [you win v]\nset size to (10) %\ngo to [front v] layer\nrepeat (20)\n    change [ghost v] effect by (-10)\n    turn right (15) degrees\n    change size by (1)\nend\nrepeat (40)\n    change size by (2)\n    turn right (15) degrees\nend\nset size to (100) %\nstop [all v]\n\nwhen flag clicked\nset [ghost v] effect to (100)\npoint in direction (-90)\nset size to (10) %\n\n@Star\n\nwhen I receive [setup v]\nset [star v] to []\nset [x v] to [-1140]\nset [y v] to [1380]\nswitch costume to (costume1 v)\nset size to (100) %\nclear graphic effects\n\ndefine Pos X (pos x) Pos Y (pos y)\ngo to x: (pos x) y: (pos y)\nturn right (10) degrees\nif <<not <(Star) > []>> and <<(pos x) = (x position)> and <(pos y) = (y position)>>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [tick all v]\nPos X ((X) - (SCROLL X)) Pos Y ((Y) - (SCROLL Y))\nif <<touching (game v)?> and <not <(Star) > []>>> then\n    hide\n    change [star v] by (1)\nend\n\nwhen I receive [reset v]\ndelete this clone\n\nbroadcast (STAR v)\n\nwhen I receive [star v]\nchange [ghost v] effect by (10)\nshow\nrepeat (20)\nend\n\nchange size by (-10)\n\n@Sprite1\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (100)\n\nhide\n\n