Sunset || A mobile platformer #games #art #all

Instructions: Welcome to Sunset, a mobile platformer!\nThere are 5 secret blue coins — some are very hidden!\nIf you enjoyed it, why not love, favourite, and follow?\n▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚\n-[How to Play]-\nUse the arrow keys on PC, or use mobile controls on mobile devices.\nAvoid danger, like spikes.\nYou do NOT have to collect the blue coins - they are just a bonus for players who find this game too easy.\nAll levels and blue coins are possible (yes, ALL the blue coins are possible!) because they have been tested by me.\n___________________________________________________\n- Yoshi_Coder

@Stage\n\nwhen I receive [green flag v]\nbroadcast (Start Sound v)\n\nwhen I receive [next soundtrack v]\nif <(song) = [0]> then\n    set [song v] to [1]\nelse\n    set [song v] to [0]\nend\nstop all sounds\nbroadcast (Start Sound v)\n\nwhen I receive [start sound v]\nforever\n    play sound ((song) + (1)) until done\nend\n\n@blank\n\n@Player\n\ndefine engine\nif <<<mouse down?> and <(mouse x) < (x position)>> or <key (left arrow v) pressed?>> then\n    change [xv v] by (-1.2)\n    point in direction (-90)\nend\nif <<<mouse down?> and <(mouse x) > (x position)>> or <key (right arrow v) pressed?>> then\n    change [xv v] by (1.2)\n    point in direction (90)\nend\nset [xv v] to ((xv) * (0.83))\nif <([abs v] of (xv) ) < [0.75]> then\n    set [xv v] to [0]\nend\nchange x by (xv)\nif <touching (level v)?> then\n    change y by (1)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (-5)\n                        if <touching (level v)?> then\n                            change x by (() - (xv))\n                            if <<<mouse down?> and <(mouse y) > (y position)>> or <key (up arrow v) pressed?>> then\n                                if <(xv) > [0]> then\n                                    set [xv v] to [-10]\n                                else\n                                    set [xv v] to [10]\n                                end\n                                set [yv v] to [12]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange [yv v] by (-1)\nchange y by (yv)\nif <touching (level v)?> then\n    if <(yv) > [0]> then\n        repeat until <not <touching (level v)?>>\n            change y by (-1)\n        end\n        set [yv v] to [0]\n    else\n        repeat until <not <touching (level v)?>>\n            change y by (1)\n        end\n        set [yv v] to [0]\n    end\nend\nchange y by (-1)\nif <touching (level v)?> then\n    if <<<mouse down?> and <(mouse y) > (y position)>> or <key (up arrow v) pressed?>> then\n        set [yv v] to [15]\n    end\nend\nchange y by (1)\nif <(x position) > [239]> then\n    broadcast (Skip v)\nend\nset [previouscostume v] to (costume [number v])\nswitch costume to (hitbox v)\nif <<touching (danger v)?> or <(y position) < [-175]>> then\n    broadcast (Restart v)\nend\nswitch costume to (previousCostume)\n\nwhen flag clicked\nbroadcast (Green Flag v)\n\nwhen I receive [restart v]\nset [xv v] to [0]\nset [yv v] to [0]\ngo to x: (-200) y: (-113)\n\nwhen I receive [green flag v]\nset rotation style [left-right v]\nshow\nforever\n    engine\nend\n\nwhen I receive [skip v]\nset size to (100) %\nchange [level v] by (1)\nset [xv v] to [0]\nset [yv v] to [0]\ngo to x: (-200) y: (-113)\n\nwhen I receive [mini v]\nset size to (100) %\nrepeat (3)\n    change size by (8)\nend\nrepeat (5)\n    change size by (-15)\nend\nrepeat (3)\n    change size by (6)\nend\nrepeat (3)\n    change size by (-3)\nend\nset size to (50) %\n\nwhen [r v] key pressed\nbroadcast (Restart v)\n\nwhen I receive [restart to beginning v]\nhide\nset [coins v] to [0]\nset [ghost v] effect to (0)\ngo to [front v] layer\nswitch costume to (default v)\nset [level v] to [1]\nbroadcast (Start v)\ngo to x: (-200) y: (0)\nset [xv v] to [0]\nset [yv v] to [0]\n\nwhen I receive [next colour v]\nnext costume\nif <(costume [name v]) = [hitbox]> then\n    next costume\nend\n\n@Level\n\nsay [Love and favourite this project!!!]\n\nwhen I receive [skip v]\nswitch costume to (level)\n\nwhen I receive [start v]\nswitch costume to (level)\n\n@Danger\n\nsay [Follow @Yoshi_Coder please :\)]\n\nwhen I receive [skip v]\nswitch costume to (level)\n\nwhen I receive [start v]\nswitch costume to (level)\n\n@Deco\n\nwhen I receive [skip v]\nswitch costume to (level)\n\nwhen I receive [start v]\nswitch costume to (level)\n\n@Water\n\nwhen I receive [green flag v]\nset [ghost v] effect to (45)\ngo to [back v] layer\nhide\nswitch costume to (7 v)\nwait until <(level) = [7]>\nshow\nwait until <(level) > [8]>\nhide\n\nwhen I receive [switch ldm v]\nif <(LDM) = [0]> then\n    forever\n        go to x: (0) y: (([sin v] of ((timer) * (100)) ) * (10))\n    end\nelse\n    hide\n    stop [other scripts in sprite v]\nend\n\n@Clones\n\nwhen I receive [green flag v]\nhide\nrepeat (1)\n    delete this clone\nend\ndelete all of [keys collected v]\ncreate clone type [6] x [94] y [15] on level [3] and set key [0] and set hidden []\ncreate clone type [7] x [215] y [-85] on level [3] and set key [0] and set hidden []\ncreate clone type [7] x [215] y [150] on level [5] and set key [0] and set hidden []\ncreate clone type [6] x [137] y [-88] on level [5] and set key [0] and set hidden []\ncreate clone type [8] x [-178] y [90] on level [6] and set key [1] and set hidden [1]\ncreate clone type [9] x [75] y [80] on level [7] and set key [1] and set hidden [1]\ncreate clone type [7] x [115] y [-158] on level [7] and set key [0] and set hidden [0]\ncreate clone type [1] x [135] y [-113] on level [9] and set key [0] and set hidden []\nrepeat (2)\n    create clone type [3] x (pick random (0) to (210)) y (pick random (-50) to (35)) on level [10] and set key [0] and set hidden []\nend\ncreate clone type [2] x [20] y [-113] on level [10] and set key [0] and set hidden []\ncreate clone type [8] x [90] y [145] on level [10] and set key [2] and set hidden [1]\ncreate clone type [9] x [-89] y [-50] on level [11] and set key [0] and set hidden []\ncreate clone type [7] x [165] y [100] on level [11] and set key [2] and set hidden [1]\ncreate clone type [4] x [-185] y [-112] on level [15] and set key [0] and set hidden [0]\ncreate clone type [8] x [211] y [153] on level [1] and set key [3] and set hidden [1]\ncreate clone type [4] x [105] y [55] on level [15] and set key [0] and set hidden [0]\ncreate clone type [4] x [-110] y [-33] on level [18] and set key [0] and set hidden [0]\ncreate clone type [7] x [-2] y [34] on level [21] and set key [3] and set hidden [1]\nhide\n\ndefine create clone type (type) x (x) y (y) on level (level) and set key (key) and set hidden (hidden)\nswitch costume to (type)\nset [clone x v] to (x)\nset [clone y v] to (y)\nset [clone level v] to (level)\nset [key req v] to (key)\nset [ghost v] effect to ((96) * (hidden))\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nhide\nset size to (100) %\nset drag mode [not draggable v]\nset [color v] effect to (0)\nset rotation style [left-right v]\ngo to x: (clone x) y: (clone y)\nif <<(costume [number v]) = [8]> or <(key req) = [0]>> then\n    wait until <(level) = (clone level)>\nelse\n    wait until <<(level) = (clone level)> and <[keys collected v] contains (key req)?>>\nend\nshow\nwait (0) seconds\nif <(costume [number v]) < [3]> then\n    forever\n        point in direction (90)\n        repeat until <touching (level v)?>\n            change x by (3)\n        end\n        change x by (-3)\n        point in direction (-90)\n        repeat until <touching (level v)?>\n            change x by (-3)\n        end\n        change x by (3)\n    end\nend\nif <(costume [number v]) = [3]> then\n    forever\n        point towards (player v)\n        move (2) steps\n    end\nend\nif <(costume [number v]) < [4]> then\n    forever\n        if <touching (player v)?> then\n            if <(costume [number v]) = [2]> then\n                broadcast (Restart v)\n            else\n                if <(yv) < [0]> then\n                    hide\n                    set [yv v] to [10]\n                else\n                    broadcast (Restart v)\n                end\n            end\n        end\n    end\nend\nif <(costume [number v]) = [4]> then\n    forever\n        if <<touching (player v)?> and <(yv) < [0]>> then\n            set [yv v] to [17]\n            switch costume to (mushroom-bounce v)\n            wait (0.1) seconds\n            switch costume to (mushroom v)\n        end\n    end\nend\nif <(costume [number v]) = [6]> then\n    set [ghost v] effect to (25)\n    forever\n        repeat (10)\n            change size by (10)\n        end\n        repeat (10)\n            change size by (-10)\n        end\n    end\nend\nif <(costume [number v]) = [7]> then\n    show\n    forever\n        repeat (10)\n            change [brightness v] effect by (1)\n            change y by (0.5)\n            if <touching (player v)?> then\n                set [ghost v] effect to (0)\n                broadcast (Coin v)\n                repeat (10)\n                    change size by (5)\n                    change [ghost v] effect by (10)\n                end\n                delete this clone\n            end\n        end\n        repeat (10)\n            change [brightness v] effect by (-1)\n            change y by (-0.5)\n            if <touching (player v)?> then\n                set [ghost v] effect to (0)\n                broadcast (Coin v)\n                repeat (10)\n                    change size by (5)\n                    change [ghost v] effect by (10)\n                end\n                delete this clone\n            end\n        end\n    end\nend\nif <(costume [number v]) = [8]> then\n    set rotation style [all around v]\n    wait (0.1) seconds\n    show\n    forever\n        repeat (10)\n            change [brightness v] effect by (1)\n            change y by (0.5)\n            if <touching (player v)?> then\n                set [ghost v] effect to (0)\n                point in direction (105)\n                add (key req) to [keys collected v]\n                repeat (10)\n                    change size by (5)\n                    change [ghost v] effect by (10)\n                end\n                delete this clone\n            end\n        end\n        repeat (10)\n            change [brightness v] effect by (-1)\n            change y by (-0.5)\n            if <touching (player v)?> then\n                set [ghost v] effect to (0)\n                point in direction (105)\n                add (key req) to [keys collected v]\n                repeat (10)\n                    change size by (5)\n                    change [ghost v] effect by (10)\n                end\n                delete this clone\n            end\n        end\n    end\nend\nif <(costume [number v]) = [9]> then\n    wait (0.1) seconds\n    show\n    forever\n        repeat (10)\n            change [brightness v] effect by (1)\n            change y by (0.5)\n            if <touching (player v)?> then\n                set [ghost v] effect to (0)\n                repeat (10)\n                    change size by (5)\n                    change [ghost v] effect by (10)\n                end\n                broadcast (Mini v)\n                delete this clone\n            end\n        end\n        repeat (10)\n            change [brightness v] effect by (-1)\n            change y by (-0.5)\n            if <touching (player v)?> then\n                set [ghost v] effect to (0)\n                repeat (10)\n                    change size by (5)\n                    change [ghost v] effect by (10)\n                end\n                broadcast (Mini v)\n                delete this clone\n            end\n        end\n    end\nend\n\nwhen I receive [restart v]\nset [xv v] to [0]\nset [enemy yv v] to [0]\ngo to x: (clone x) y: (clone y)\n\nwhen I start as a clone\nforever\n    change y by (enemy yv)\nend\n\nwhen I start as a clone\nwait until <(level) > (clone level)>\ndelete this clone\n\nwhen I start as a clone\nwait (0) seconds\nif <<(costume [number v]) = [1]> or <(costume [number v]) = [3]>> then\n    forever\n        if <touching (player v)?> then\n            if <(yv) < [0]> then\n                if <<<mouse down?> and <(mouse y) > (y position)>> or <key (up arrow v) pressed?>> then\n                    set [yv v] to [16]\n                else\n                    set [yv v] to [10]\n                end\n                delete this clone\n            else\n                broadcast (Restart v)\n            end\n        end\n    end\nend\nif <<(costume [number v]) = [10]> or <(costume [number v]) = [11]>> then\n    forever\n        if <touching (player v)?> then\n            set [xv v] to [0]\n            set [yv v] to [0]\n            delete this clone\n        end\n    end\nend\nif <(costume [number v]) = [2]> then\n    forever\n        if <touching (player v)?> then\n            broadcast (Restart v)\n        end\n    end\nend\n\nwhen I receive [switch ldm v]\nif <(costume [number v]) = [6]> then\n    if <(LDM) = [1]> then\n        hide\n    else\n        wait until <(clone level) = (level)>\n        show\n    end\nend\n\n@glow\n\nwhen I receive [green flag v]\nswitch costume to ([costume # v] of [player v])\ngo to [front v] layer\ngo [backward v] (12) layers\n\nwhen I receive [next colour v]\nswitch costume to ([costume # v] of [player v])\n\nwhen I receive [switch ldm v]\nif <(LDM) = [0]> then\n    show\n    forever\n        go to (player v)\n        set size to (100) %\n        set [ghost v] effect to ([abs v] of (([sin v] of ((timer) * (50)) ) * (10)) )\n        set size to (((50) + ([abs v] of (([sin v] of ((timer) * (50)) ) * (100)) )) * (([size v] of [player v]) / (100))) %\n    end\nelse\n    hide\nend\n\n@Sprites\n\n@Particles\n\nwhen flag clicked\nhide\nforever\n    wait (pick random (0.16) to (0.55)) seconds\n    if <(LDM) = [0]> then\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nset [clonespeed v] to (pick random (0.8) to (2))\nset [ghost v] effect to (100)\nshow\nset size to (pick random (80) to (160)) %\ngo to (random position v)\npoint in direction (pick random (-180) to (180))\nrepeat (100)\n    turn right (pick random (-1.0) to (1.0)) degrees\n    move (cloneSpeed) steps\n    if <touching (_edge_ v)?> then\n        create clone of (_myself_ v)\n        delete this clone\n    end\n    change [ghost v] effect by (1)\nend\ndelete this clone\n\nwhen I receive [switch ldm v]\ndelete this clone\n\nwhen I start as a clone\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\n\n@Coin Message\n\nwhen I receive [coin v]\nset [ghost v] effect to (25)\nshow\nchange [coins v] by (1)\nshow variable [coins v]\ngo to x: (0) y: (-195)\nrepeat (10)\n    change y by (6)\nend\nrepeat (5)\n    change y by (-1)\nend\nwait (0.4) seconds\nrepeat (3)\n    change [brightness v] effect by (3)\nend\nrepeat (3)\n    change [brightness v] effect by (-3)\nend\nwait (1.4) seconds\nrepeat (10)\n    change y by (-7)\nend\nhide variable [coins v]\nhide\n\nwhen I receive [green flag v]\nhide\nhide variable [coins v]\ngo to [front v] layer\ngo to x: (0) y: (-195)\n\n@Thumbnail\n\nwhen I receive [green flag v]\nif <(costume [number v]) = [1]> then\n    switch costume to (thumbnail v)\n    show\n    repeat (15)\n        go to [front v] layer\n    end\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    switch costume to (stopped v)\nelse\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\nend\n\nswitch costume to (thumbnail v)\nshow\nrepeat (15)\n    go to [front v] layer\nend\n\nwhen this sprite clicked\nif <(costume [number v]) = [2]> then\n    broadcast (Green Flag v)\nend\n\nwhen flag clicked\nif <(username) = [Yoshi_Coder]> then\n    hide\nelse\n    show\nend\nif <(costume [number v]) = [2]> then\n    set [ghost v] effect to (100)\nend\n\n@Message\n\nwhen I receive [green flag v]\nhide\nset [ghost v] effect to (10)\nwait (15) seconds\nshow\ngo to x: (-150) y: (201)\nset [messageyv v] to [0]\nrepeat (60)\n    change [messageyv v] by (-1)\n    change y by (messageYv)\n    if <(y position) < [130]> then\n        set y to (130)\n        set [messageyv v] to (() - ((messageYv) * (0.7)))\n    end\nend\nset [messageyv v] to [0]\nwait (5) seconds\nrepeat (20)\n    change [messageyv v] by (1)\n    change y by (messageYv)\nend\nhide\n\nwhen I receive [green flag v]\nswitch costume to (1 v)\nwait (17) seconds\nswitch costume to (2 v)\nwait (1.5) seconds\nswitch costume to (3 v)\nwait (1.5) seconds\nswitch costume to (4 v)\n\n@Skip\n\nwhen I receive [green flag v]\ngo to x: (215) y: (-155)\nset [ghost v] effect to (50)\n\nwhen this sprite clicked\nrepeat until <<not <touching (mouse-pointer v)?>> or <not <mouse down?>>>\n    change size by (((80) - (size)) / (5))\nend\nif <touching (mouse-pointer v)?> then\n    if <not <([costume name v] of [level v]) = [final]>> then\n        broadcast (Skip v)\n    end\nend\nrepeat until <(size) = [100]>\n    change size by (((100) - (size)) / (5))\nend\n\n@mouse\n\nwhen I receive [green flag v]\nshow\nset [ghost v] effect to (100)\ngo to x: (-200) y: (114)\nwait (16) seconds\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (1) seconds\nglide (1) secs to x: (-159) y: (113)\nwait (0.6) seconds\nglide (0.8) secs to x: (-118) y: (116)\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Back to beginning\n\nwhen I receive [green flag v]\ngo to x: (-215) y: (-155)\nset [ghost v] effect to (50)\n\nwhen this sprite clicked\nrepeat until <<not <touching (mouse-pointer v)?>> or <not <mouse down?>>>\n    change size by (((80) - (size)) / (5))\nend\nif <touching (mouse-pointer v)?> then\n    ask [This will restart you to the very beginning — are you sure? Type Yes or No.] and wait\n    if <(answer) = [Yes]> then\n        broadcast (Green Flag v)\n        broadcast (Restart to beginning v)\n    end\nend\nrepeat until <(size) = [100]>\n    change size by (((100) - (size)) / (5))\nend\n\n@Next icon\n\nwhen I receive [green flag v]\ngo to x: (170) y: (-155)\nset [ghost v] effect to (50)\n\nwhen this sprite clicked\nrepeat until <<not <touching (mouse-pointer v)?>> or <not <mouse down?>>>\n    change size by (((80) - (size)) / (5))\nend\nif <touching (mouse-pointer v)?> then\n    broadcast (Next Colour v)\nend\nrepeat until <(size) = [100]>\n    change size by (((100) - (size)) / (5))\nend\n\n@Next music\n\nwhen I receive [green flag v]\ngo to x: (125) y: (-155)\nset [ghost v] effect to (50)\n\nwhen this sprite clicked\nrepeat until <<not <touching (mouse-pointer v)?>> or <not <mouse down?>>>\n    change size by (((80) - (size)) / (5))\nend\nif <touching (mouse-pointer v)?> then\n    broadcast (Next Soundtrack v)\nend\nrepeat until <(size) = [100]>\n    change size by (((100) - (size)) / (5))\nend\n\n@Low detail mode\n\nwhen I receive [green flag v]\nset [ldm v] to [0]\nbroadcast (Switch LDM v)\ngo to x: (125) y: (-155)\nswitch costume to (costume1 v)\nset [ghost v] effect to (50)\n\nwhen this sprite clicked\nrepeat until <<not <touching (mouse-pointer v)?>> or <not <mouse down?>>>\n    change size by (((80) - (size)) / (5))\nend\nif <touching (mouse-pointer v)?> then\n    if <(LDM) = [1]> then\n        set [ldm v] to [0]\n    else\n        set [ldm v] to [1]\n    end\n    next costume\n    broadcast (Switch LDM v)\nend\nrepeat until <(size) = [100]>\n    change size by (((100) - (size)) / (5))\nend\n\n@Sprite1\n\n