☀⠀seattle ~ a scrolling platformer⠀ ☀

Instructions: 3 levels so far (more coming soon)\nArrow keys or wasd or mobile controls.\n\nSTOP ADVERTISING!\n

@Stage\n\nwhen flag clicked\nforever\n    play sound [The Beatles - Here Comes The Sun \(2019 Mix\) v] until done\nend\n\n@layer1\n\nwhen flag clicked\nforever\n    go to x: ((mouse x) / (40)) y: ((mouse y) / (40))\nend\n\nwhen flag clicked\nforever\n    next costume\n    wait (0.2) seconds\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen flag clicked\ngo to [back v] layer\n\n@layer8\n\nwhen flag clicked\nforever\n    go to x: ((mouse x) / (15)) y: ((mouse y) / (15))\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen flag clicked\ngo to [back v] layer\n\n@layer7\n\nwhen flag clicked\nforever\n    go to x: ((mouse x) / (30)) y: ((mouse y) / (30))\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen flag clicked\ngo to [back v] layer\n\n@layer2\n\nwhen flag clicked\nforever\n    go to x: ((mouse x) / (20)) y: ((mouse y) / (20))\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen flag clicked\ngo to [back v] layer\n\n@layer3\n\nwhen flag clicked\nforever\n    go to x: ((mouse x) / (25)) y: ((mouse y) / (25))\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen flag clicked\ngo to [back v] layer\n\n@layer4\n\nwhen flag clicked\nforever\n    go to x: ((mouse x) / (25)) y: ((mouse y) / (30))\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen flag clicked\ngo to [back v] layer\n\n@layer6\n\nwhen flag clicked\nforever\n    go to x: ((mouse x) / (35)) y: ((mouse y) / (40))\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen flag clicked\ngo to [back v] layer\n\n@layer5\n\nwhen flag clicked\nforever\n    go to [back v] layer\n    go to x: ((mouse x) / (50)) y: ((mouse y) / (50))\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen flag clicked\ngo to [back v] layer\n\n@bit\n\nwhen flag clicked\nforever\n    wait (0.1) seconds\n    next costume\nend\n\nwhen flag clicked\nhide\nforever\n    go to x: (-250) y: (pick random (0) to (170))\n    show\n    glide (2) secs to x: (250) y: (pick random (0) to (170))\n    hide\n    wait (10) seconds\n    go to x: (250) y: (pick random (0) to (170))\n    show\n    glide (2) secs to x: (-250) y: (pick random (0) to (170))\n    hide\n    go to x: (250) y: (pick random (0) to (170))\n    wait (10) seconds\n    show\n    glide (2) secs to x: (-250) y: (pick random (0) to (170))\n    hide\n    wait (10) seconds\nend\n\nwhen flag clicked\ngo to [back v] layer\n\n@Sprite1\n\nwhen flag clicked\ngo to [back v] layer\n\n@thumb\n\nwhen [timer v] > (Stop Pressed)\nbroadcast (Player Hide v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen flag clicked\nhide\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nforever\n    set [stop pressed v] to ((timer) + (.1))\nend\n\n@Player\n\ndefine Tick\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    switch costume to (right v)\n    change [sx v] by (2)\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    switch costume to (left v)\n    change [sx v] by (-2)\nend\nif <not <<<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> or <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>>> or <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>>>> then\n    switch costume to (center v)\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    Change player x by (round (sx))\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> then\n    if <(In Air) < [4]> then\n        switch costume to (up v)\n        set [speed y v] to [16]\n    end\nend\nchange [speed y v] by (-1.5)\nChange player y by (Speed Y)\nTest - Die\nchange [scroll x v] by (round (((X) - (SCROLL X)) / (15)))\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nchange [scroll y v] by (round (((Y) - (SCROLL Y)) / (10)))\nPosition\nif <(SCROLL Y) < [-30]> then\n    set [exit v] to [Die]\nend\nif <touching (trampoline v)?> then\n    if <(In Air) < [4]> then\n        set [speed y v] to [30]\n    end\nend\n\ndefine Change player x by (sx)\nchange [x v] by (sx)\nPosition\nif <touching (ground v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (ground v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <not <touching (ground v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Change player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (ground v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [speed y v] to [0]\nend\n\ndefine Position\ngo to x: ((X) - (SCROLL X)) y: ((Y) - (SCROLL Y))\n\nwhen flag clicked\nset [level v] to [0]\n\nwhen I receive [greenflah v]\nhide\ngo to [front v] layer\n\nwhen flag clicked\nhide\n\nwhen I receive [begin  v]\nshow\nbroadcast (Greenflah v) and wait\nbroadcast (Play game v) and wait\n\ndefine Game on\nswitch costume to (idle v)\npoint in direction (90)\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nset [speed y v] to [0]\nset [sx v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset size to (100) %\nset [ghost v] effect to (0)\nshow\n\ndefine GameWin\nset rotation style [don't rotate v]\nrepeat (50)\n    point towards (exit v)\n    turn right (65) degrees\n    move ((distance to [exit v]) / (5)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nhide\nset [ghost v] effect to (0)\nset size to (100) %\nchange [level v] by (1)\nwait (1) seconds\n\nwhen I receive [play game v]\nset [level v] to [1]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Game on\n    repeat until <(EXIT) > []>\n        Tick\n        broadcast (Tick v)\n    end\n    if <(EXIT) = [Win]> then\n        GameWin\n    else\n        Game - Die\n    end\nend\n\ndefine Test - Die\nif <<touching (danger v)?> or <touching color (#000000)?>> then\n    set [exit v] to [Die \(other way\)]\nend\n\ndefine Game - Die\nset [ghost v] effect to (0)\n\nwhen flag clicked\nswitch costume to (center v)\n\nwhen flag clicked\nforever\n    set [player x v] to (x position)\nend\n\nwhen [s v] key pressed\nif <(LEVEL) < [4]> then\n    change [level v] by (1)\n    broadcast (Setup v)\nelse\n    point in direction (90)\nend\n\nwhen I receive [skip v]\nwait (0.1) seconds\nchange [level v] by (1)\nwait (0.1) seconds\nbroadcast (Setup v)\n\nwhen I receive [player hide v]\nhide\n\n@Ground\n\ndefine Position x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (lvl 1 1 v)\n    Position x: [0] y: [0]\n    switch costume to (lvl 1 2 v)\n    Position x: [450] y: [0]\n    switch costume to (lvl 1 3 v)\n    Position x: [500] y: [0]\n    switch costume to (lvl 1 4 v)\n    Position x: [500] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (lvl 2 1 v)\n        Position x: [0] y: [0]\n        switch costume to (lvl 2 2 v)\n        Position x: [750] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (lvl 3 1 v)\n            Position x: [0] y: [0]\n            switch costume to (lvl 3 2 v)\n            Position x: [0] y: [0]\n            switch costume to (lvl 3 3 v)\n            Position x: [450] y: [0]\n            switch costume to (lvl 3 4 v)\n            Position x: [300] y: [0]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (efn v)\n                Position x: [0] y: [0]\n            else\n                if <(LEVEL) = [5]> then\n            end\n        end\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [tick v]\nPosition ((X) - (SCROLL X)) ((Y) - (SCROLL Y))\n\nwhen I receive [greenflah v]\nshow\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nwait until <(LEVEL) = [5]>\nbroadcast (Costume v)\n\nswitch costume to (lvl 3 4 v)\nPosition x: [800] y: [0]\n\nwhen I receive [player hide v]\nhide\n\n@Danger\n\ndefine Position x: (x) y: (y)\nchange [x v] by (x)\nchange [y v] by (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [setup v]\nset [y v] to [0]\nset [x v] to [0]\ngo to [back v] layer\ngo [forward v] (12) layers\nswitch costume to (lvl 1 1 v)\nif <(LEVEL) = [1]> then\n    Position x: [140] y: [0]\n    switch costume to (lvl 1 2 v)\n    Position x: [180] y: [0]\n    switch costume to (lvl 1 3 v)\n    Position x: [180] y: [0]\n    switch costume to (lvl 1 4 v)\n    Position x: [180] y: [0]\n    switch costume to (lvl 1 5 v)\n    Position x: [180] y: [0]\n    switch costume to (lvl 1 6 v)\n    Position x: [185] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (lvl 2 1 v)\n        Position x: [600] y: [0]\n        switch costume to (lvl 2 2 v)\n        Position x: [200] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (lvl  3 1 v)\n            Position x: [0] y: [0]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to ( level- efn v)\n                Position x: [0] y: [0]\n            else\n                if <(LEVEL) = [5]> then\n            end\n        end\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [greenflah v]\nshow\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [begin  v]\nshow\n\nwhen I receive [player hide v]\nhide\n\n@Start\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nset [ghost v] effect to (0)\nhide\n\nwhen flag clicked\nforever\n    set y to ((0) + ((20) * ([cos v] of (((timer) - (3)) * (150)) )))\nend\n\nwhen this sprite clicked\nbroadcast (Begin  v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [button v]\nshow\n\nwhen I receive [player hide v]\nhide\n\n@Exit\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (player v)?> then\n    set [exit v] to [Win]\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [begin  v]\nset [ghost v] effect to (0)\nshow\n\ndefine Clone x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [setup v]\ngo to [front v] layer\nswitch costume to (exit v)\nshow\nset [collect coin v] to [0]\nset [y v] to [0]\nset [x v] to [0]\nif <(LEVEL) = [1]> then\n    Clone x: [1450] y: [103]\nelse\n    if <(LEVEL) = [2]> then\n        Clone x: [1150] y: [100]\n    else\n        if <(LEVEL) = [3]> then\n            Clone x: [1040] y: [200]\n        else\n            if <(LEVEL) = [4]> then\n                Clone x: [9999] y: [999]\n            else\n                if <(LEVEL) = [5]> then\n            end\n        end\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [player hide v]\nhide\n\n@Start Background\n\nwhen flag clicked\nhide\ngo to [back v] layer\ngo [forward v] (5) layers\n\nwhen I receive [begin  v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [button v]\nshow\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\nend\n\nwhen I receive [player hide v]\nhide\n\n@Clouds\n\nwhen I start as a clone\nshow\ngo to [back v] layer\ngo [backward v] (1000000000000000000) layers\nswitch costume to (pick random (1) to (10))\nif <(cn) = [1]> then\n    go to x: (240) y: (pick random (30) to (100))\n    repeat until <[240] > (x position)>\n        change x by (-1)\n    end\n    wait (0.5) seconds\n    delete this clone\nend\nif <(cn) = [2]> then\n    go to x: (-240) y: (pick random (30) to (100))\n    repeat until <[240] < (x position)>\n        change x by (1)\n    end\n    wait (0.5) seconds\n    delete this clone\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [begin  v]\nforever\n    set [cn v] to (pick random (1) to (2))\n    create clone of (_myself_ v)\n    wait (pick random (8) to (12)) seconds\nend\n\nwhen I receive [player hide v]\nhide\n\n@Sprite2\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [begin  v]\nshow\n\nwhen this sprite clicked\nbroadcast (SKIP v)\n\nwhen flag clicked\nforever\n    if <[3] < (LEVEL)> then\n        hide\n    else\n        show\n    end\nend\n\nwhen flag clicked\nbroadcast (Begin  v)\n\nwhen I receive [player hide v]\nhide\n\nwhen I receive [player hide v]\nhide\n\n@Sprite3\n\nwhen I start as a clone\nif <(clone id) = [0]> then\n    go to x: (-15) y: (0)\n    set [loved__ v] to [0]\n    switch costume to (love v)\n    forever\n        set [love? v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [loved__ v] to [1]\n        end\n    end\nend\nif <(clone id) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    set [faved___ v] to [0]\n    forever\n        set [fav v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [faved___ v] to [1]\n        end\n    end\nend\n\nwhen flag clicked\nhide\nset [faved___ v] to [0]\nset [loved__ v] to [0]\nset [clone id v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\nwait (1) seconds\nshow\ngo to x: (0) y: (50)\nreset timer\nswitch costume to (1 v)\nset [ghost v] effect to (100)\nrepeat until <(timer) > [3.5]>\n    change y by ((y position) / (-15))\n    change [ghost v] effect by (-3)\nend\nreset timer\nrepeat until <(timer) > [3.5]>\n    change y by (((y position) - (-100)) / (-15))\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [player hide v]\nhide\n\n