Lost Dreams [Collab] - a platformer
@Stage\n\nwhen flag clicked\nset [whirl v] effect to (0)\nswitch backdrop to (backdrop2 v)\nwait (12) seconds\nswitch backdrop to (background1 v) and wait\nset [brightness v] effect to (0)\nforever\n    change [brightness v] effect by (-0.005)\nend\n\nwhen I receive [end of the game v]\nrepeat (200)\n    change [brightness v] effect by (-.5)\n    change volume by (-.175)\nend\nswitch backdrop to (backdrop3 v)\nrepeat (200)\n    change [brightness v] effect by (.5)\n    change volume by (-.175)\nend\nswitch backdrop to (backdrop3 v)\nrepeat (200)\n    change [brightness v] effect by (-.5)\n    change volume by (-.175)\nend\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    if <(Level) = [30]> then\n        repeat (50)\n            broadcast (end of the game v)\n            stop [this script v]\n        end\n    end\nend\n\nset [level v] to [29]\n\nwhen flag clicked\nset volume to (100) %\nforever\n    play sound [TheFatRat - Monody \(feat. Laura Brehm\).mp3 v] until done\n    play sound [TheFatRat - Jackpot v] until done\nend\n\n@Stars\n\nwhen flag clicked\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\nforever\n    go to [back v] layer\n    change [ghost v] effect by (-0.005)\nend\n\nwhen I receive [end of the game v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\n\n@Player\n\ndefine Platform Physics Jump Height (j) Speed (s) Gravity (g) Friction (f)\nif <not <<touching (water1 v)?> or <touching (water2 v)?>>> then\n    change [yv v] by (g)\n    change y by (YV)\n    if <touching (level v)?> then\n        repeat until <not <touching (level v)?>>\n            change y by ((([abs v] of (YV) ) / (YV)) * (-1))\n        end\n        if <<key (up arrow v) pressed?> and <(YV) < [0]>> then\n            change [jumps v] by (1)\n            start sound [Jump v]\n            set [yv v] to (j)\n        else\n            set [yv v] to [0]\n        end\n    end\n    set [xv v] to (((XV) + ((<key (right arrow v) pressed?> * (s)) + (<key (left arrow v) pressed?> * ((s) * (-1))))) * (f))\n    change x by (XV)\n    set [slope v] to [0]\n    repeat until <<not <touching (level v)?>> or <(Slope) = [-10]>>\n        change y by (1)\n        change [slope v] by (-1)\n    end\n    if <touching (level v)?> then\n        change y by (Slope)\n        repeat until <not <touching (level v)?>>\n            change x by ((([abs v] of (XV) ) / (XV)) * (-1))\n        end\n        if <key (up arrow v) pressed?> then\n            start sound [Jump v]\n            if <key (right arrow v) pressed?> then\n                set [yv v] to [10]\n                set [xv v] to [-5]\n            else\n                if <key (left arrow v) pressed?> then\n                    set [yv v] to [10]\n                    set [xv v] to [5]\n                end\n            end\n        end\n    end\n    if <key (right arrow v) pressed?> then\n        switch costume to (right v)\n    else\n        if <key (left arrow v) pressed?> then\n            switch costume to (left v)\n        end\n    end\nelse\n    if <key (up arrow v) pressed?> then\n        change [yv v] by (.4)\n    end\n    if <key (down arrow v) pressed?> then\n        change [yv v] by (-.4)\n    end\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (.5)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xv v] by (-.5)\n    end\n    if <touching (level v)?> then\n        repeat until <not <touching (level v)?>>\n            change x by ((([abs v] of (XV) ) / (XV)) * (-1))\n        end\n        set [xv v] to [0]\n    end\n    change x by (XV)\n    set [xv v] to ((XV) * (.9))\n    change [yv v] by (.1)\n    change y by (YV)\nend\n\nwhen flag clicked\nhide\nwait (12) seconds\nset size to (150) %\ngo to x: (-180) y: (0)\nshow\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    Platform Physics Jump Height [13] Speed [.9] Gravity [-.8] Friction [.9]\nend\n\nwhen flag clicked\nswitch costume to (right v)\nset [delete clones? v] to [nein]\nforever\n    if <(x position) > [242]> then\n        broadcast (Next Level v)\n        wait until <not <(x position) > [242]>>\n    end\n    if <<(y position) < [-182]> or <<touching (spikes v)?> or <touching (shredder v)?>>> then\n        go to x: (-180) y: (0)\n        set [xv v] to [0]\n        set [yv v] to [0]\n    end\nend\n\nwhen I receive [next level v]\ngo to x: (-180) y: (0)\nset [xv v] to [0]\nset [yv v] to [0]\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nswitch costume to (no eye v)\nset size to (150) %\nrepeat (15)\n    if <(Delete Clones?) = [nein]> then\n        change [ghost v] effect by (10)\n        change size by (-10)\n        go to [front v] layer\n        go [backward v] (8) layers\n    else\n        delete this clone\n    end\nend\ndelete this clone\n\nwhen I receive [go animation v]\nset [delete clones? v] to [ja]\nhide\n\nwhen I receive [the end animation v]\nset [delete clones? v] to [nein]\nset [slope v] to [0]\nset [xv v] to [0]\nset [yv v] to [0]\ngo to x: (-180) y: (0)\nshow\n\nwhen flag clicked\nset [brightness v] effect to (0)\nforever\n    change [brightness v] effect by (-0.005)\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    go [backward v] (7) layers\nend\n\nwhen I receive [end of the game v]\nhide\n\nwhen I receive [end of the game v]\nstop [other scripts in sprite v]\ngo to x: (-180) y: (0)\nforever\n    hide\nend\n\n@Level\n\nwhen flag clicked\nhide\nwait (12) seconds\nshow\nset [level v] to [1]\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    go [backward v] (3) layers\nend\n\nwhen I receive [next level v]\nbroadcast (Go Animation v)\n\nset [level v] to [19]\n\nwhen flag clicked\n\nwhen flag clicked\nforever\n    change [brightness v] effect by (-0.005)\nend\n\nset [brightness v] effect to (0)\ngo to x: (36) y: (20)\nforever\n    change [brightness v] effect by (-0.005)\nend\n\nwhen I receive [end of the game v]\nhide\n\n@Spikes\n\nwhen flag clicked\nhide\nwait (12) seconds\nshow\nset [level v] to [1]\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\nset [level v] to [12]\n\nwhen flag clicked\nset [brightness v] effect to (0)\ngo to x: (36) y: (20)\nforever\n    change [brightness v] effect by (-0.005)\nend\n\n@Shredder\n\nwhen flag clicked\nhide\nforever\n    hide\n    go to [back v] layer\n    set size to (60) %\n    turn right (8) degrees\n    if <(Level) = [6]> then\n        go to x: (-70) y: (-122)\n        show\n    else\n        if <(Level) = [9]> then\n            go to x: (101) y: (16)\n            show\n        else\n            if <(Level) = [27]> then\n                set x to (0)\n                show\n                set y to ((([sin v] of ((timer) * (100)) ) * (150)) + (0))\n            else\n                if <(Level) = [28]> then\n                    set x to (0)\n                    show\n                    set y to ((([sin v] of ((timer) * (200)) ) * (150)) + (0))\n                end\n                if  then\n                end\n            end\n        end\n    end\nend\n\nwait until <not <(Level) = [9]>>\n\nhide\n\nwhen flag clicked\nforever\n    go [backward v] (99) layers\nend\n\nwhen flag clicked\nwait (12) seconds\nforever\n    change [brightness v] effect by (-0.005)\nend\n\nset [level v] to [27]\n\n@Effect\n\nwhen flag clicked\nhide\nwait (12) seconds\nforever\n    create clone of (_myself_ v)\n    hide\n    wait (1) seconds\nend\n\nwhen I start as a clone\nshow\ngo to [back v] layer\ngo to x: (240) y: (pick random (180) to (-180))\nset size to (pick random (10) to (110)) %\nset [ghost v] effect to (pick random (50) to (100))\nrepeat until <(x position) < [-235]>\n    change x by (-2.5)\nend\ndelete this clone\n\nwhen I receive [end of the game v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@MrWhite11\n\nwhen flag clicked\npoint in direction ((([sin v] of ((timer) * (100)) ) * (12)) + (90))\nhide\nset [size v] to [0]\ngo to x: (-100) y: (0)\nset size to (0) %\nwait (1) seconds\nshow\nrepeat (10)\n    change size by (Size)\n    change [size v] by (2)\nend\nrepeat (200)\n    point in direction ((([sin v] of ((timer) * (100)) ) * (12)) + (90))\n    set size to ((([sin v] of ((timer) * (200)) ) * (10)) + (93)) %\n    set y to ((([sin v] of ((timer) * (500)) ) * (15)) + (0))\nend\nhide\n\n@Jooona\n\nwhen flag clicked\npoint in direction ((([sin v] of ((timer) * (100)) ) * (12)) + (90))\nset [size v] to [0]\ngo to x: (100) y: (0)\nhide\nset size to (0) %\nwait (1) seconds\nshow\nrepeat (8)\n    change size by (Size)\n    change [size v] by (2)\nend\nrepeat (200)\n    point in direction ((([sin v] of ((timer) * (100)) ) * (12)) + (90))\n    set y to ((([sin v] of ((timer) * (500)) ) * (15)) + (0))\n    set size to ((([sin v] of ((timer) * (200)) ) * (10)) + (58)) %\nend\nhide\n\n@Plus\n\nwhen flag clicked\nhide\nwait (1) seconds\ngo to x: (0) y: (0)\nshow\nrepeat (200)\n    point in direction ((([sin v] of ((timer) * (100)) ) * (12)) + (90))\n    set size to ((([sin v] of ((timer) * (500)) ) * (10)) + (93)) %\n    set y to ((([sin v] of ((timer) * (500)) ) * (15)) + (0))\nend\nhide\n\n@Picture\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\nwait (6) seconds\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Thumbnail \n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\nforever\n    go to [front v] layer\nend\n\n@Screen\n\nwhen I receive [go animation v]\nif <(Skipping?) = [0]> then\n    switch costume to (costume1 v)\nelse\n    switch costume to (costume2 v)\nend\nshow\ngo to x: (0) y: (398)\nrepeat (15)\n    go to [front v] layer\n    change y by (((0) - (y position)) / (5))\n    go to [front v] layer\nend\nchange [level v] by (1)\nwait (1) seconds\nrepeat (15)\n    go to [front v] layer\n    change y by (((398) - (y position)) / (5))\n    go to [front v] layer\nend\nset [skipping? v] to [0]\nhide\nbroadcast (The End Animation v)\n\nwhen flag clicked\nhide\nforever\n    go to [front v] layer\n    go [forward v] (10) layers\nend\n\n@Skip-Button\n\nwhen flag clicked\nset [skipping? v] to [0]\ngo to x: (200) y: (150)\ngo to [front v] layer\nhide\nwait (12) seconds\nshow\nforever\n    point in direction ((([sin v] of ((timer) * (250)) ) * (10)) + (90))\n    set y to ((([sin v] of ((timer) * (200)) ) * (8)) + (-150))\n    if <touching (mouse-pointer v)?> then\n        set size to ((([sin v] of ((timer) * (300)) ) * (8)) + (120)) %\n        if <mouse down?> then\n            broadcast (Next Level v)\n            set [skipping? v] to [1]\n        end\n    else\n        set size to ((([sin v] of ((timer) * (300)) ) * (8)) + (100)) %\n    end\nend\n\nwhen flag clicked\ngo to x: (200) y: (150)\nforever\n    go [forward v] (99) layers\n    go to [front v] layer\nend\n\nwhen I receive [go animation v]\nhide\n\nwhen I receive [the end animation v]\nshow\n\nwhen I receive [end of the game v]\nhide\n\nwhen I receive [end of the game v]\nstop [other scripts in sprite v]\nforever\n    hide\nend\n\n@water1\n\nwhen flag clicked\nhide\nset [level v] to [1]\ngo to x: (9) y: (-200)\npoint in direction (90)\nset [color v] effect to (0)\nset [ghost v] effect to (70)\nwait until <(Level) = [2]>\nshow\nforever\n    repeat (5)\n        change y by (1)\n    end\n    turn right (2) degrees\n    repeat (5)\n        change y by (-1)\n    end\n    turn left (2) degrees\nend\n\nwhen flag clicked\nforever\n    go to [back v] layer\n    go [forward v] (1) layers\nend\n\nwait until <(Level) = [2]>\n\nwhen I receive [end of the game v]\nhide\n\n@water2\n\nwhen flag clicked\nhide\ngo to x: (9) y: (-200)\npoint in direction (90)\nset [color v] effect to (0)\nset [ghost v] effect to (70)\nwait until <(Level) = [2]>\nshow\nrepeat (5)\n    change y by (-1)\nend\nforever\n    repeat (5)\n        change y by (1)\n    end\n    turn right (2) degrees\n    repeat (5)\n        change y by (-1)\n    end\n    turn left (2) degrees\nend\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\nwhen I receive [end of the game v]\nhide\n\n@decorations front\n\nwhen flag clicked\nhide\nwait (12) seconds\nshow\nset [level v] to [1]\ngo to x: (0) y: (0)\nforever\n    go to [front v] layer\n    go [backward v] (5) layers\n    switch costume to (Level)\nend\n\nwhen I receive [go animation v]\ngo to [back v] layer\n\nwhen I receive [the end animation v]\ngo to [front v] layer\n\nwhen flag clicked\nset [brightness v] effect to (0)\nforever\n    change [brightness v] effect by (-0.005)\nend\n\nwhen flag clicked\nwait (12) seconds\nforever\n    change [brightness v] effect by (-0.005)\nend\n\nwhen I receive [end of the game v]\nhide\n\n@decorations background\n\nwhen flag clicked\nhide\nwait (12) seconds\nshow\nset [level v] to [1]\ngo to x: (0) y: (0)\nforever\n    go to [back v] layer\n    go [backward v] (3) layers\n    switch costume to (Level)\nend\n\nwhen flag clicked\nset [brightness v] effect to (0)\ngo to x: (36) y: (20)\nforever\n    change [brightness v] effect by (-0.005)\nend\n\nwhen flag clicked\nwait (12) seconds\nforever\n    change [brightness v] effect by (-0.005)\nend\n\nwhen I receive [end of the game v]\nhide\n\n@Light\n\nwhen flag clicked\nhide\nwait (12) seconds\nshow\nforever\n    go to (player v)\n    set size to ((([sin v] of ((timer) * (200)) ) * (15)) + (150)) %\n    go to [back v] layer\nend\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    change [ghost v] effect by (-0.01)\nend\n\nwhen I receive [go animation v]\nhide\n\nwhen I receive [the end animation v]\nshow\n\nwhen I receive [end of the game v]\nforever\n    hide\nend\n\n@EasterEgg\n\nwhen flag clicked\nhide\nswitch costume to (egg v)\ngo to x: (0) y: (-180)\nwait until <mouse down?>\nwait until <not <mouse down?>>\nset [pixelate v] effect to (0)\nhide\nset [ghost v] effect to (0)\nswitch costume to (egg v)\ngo to x: (0) y: (-180)\nshow\nrepeat (35)\n    change y by (((0) - (y position)) / (5))\n    go to [front v] layer\nend\nwait (.5) seconds\nstart sound [pop v]\nswitch costume to (egg2 v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nswitch costume to (egg3 v)\ngo to x: (0) y: (180)\nrepeat (35)\n    change y by (((-50) - (y position)) / (5))\n    go to [front v] layer\nend\nwait (1) seconds\nrepeat (15)\n    change y by ((y position) * (0.1))\n    go to [front v] layer\nend\nbroadcast (Bye Easter Egg v)\nhide\n\nwhen I receive [bye easter egg v]\nrepeat (20)\n    change [pixelate v] effect by (10)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen flag clicked\nwait until <key (1 v) pressed?>\nwait until <not <key (1 v) pressed?>>\nwait until <key (1 v) pressed?>\nset [pixelate v] effect to (0)\nhide\nset [ghost v] effect to (0)\nswitch costume to (egg v)\ngo to x: (0) y: (-180)\nshow\nrepeat (35)\n    change y by (((0) - (y position)) / (5))\n    go to [front v] layer\nend\nwait (.5) seconds\nstart sound [pop v]\nswitch costume to (egg2 v)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nwait until <key (t v) pressed?>\nwait until <not <key (t v) pressed?>>\nset [pixelate v] effect to (0)\nhide\nset [ghost v] effect to (0)\nswitch costume to (egg v)\ngo to x: (0) y: (-180)\nshow\nrepeat (35)\n    change y by (((0) - (y position)) / (5))\n    go to [front v] layer\nend\nwait (.5) seconds\nstart sound [pop v]\nswitch costume to (egg2 v)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nwait until <key (j v) pressed?>\nwait until <not <key (j v) pressed?>>\nset [pixelate v] effect to (0)\nhide\nset [ghost v] effect to (0)\nswitch costume to (egg v)\ngo to x: (0) y: (-180)\nshow\nrepeat (35)\n    change y by (((0) - (y position)) / (5))\n    go to [front v] layer\nend\nwait (.5) seconds\nstart sound [pop v]\nswitch costume to (egg2 v)\ncreate clone of (_myself_ v)\n\n@game end\n\n
                             LOST DREAMS\n**************************************************************\nPlease like also the version on @-TIC-\n**************************************************************\nMove with the arrow keys\nGo to the right side of the screen\nFind the way through the land of dreams in 19 levels and win the game!\n\nA collab between @-TIC- and @Jooona\n