Dawn 2 - A Platformer

Instructions: Tip: easier with no jump boost. Move with arrow keys or swipe with mobile controls.  \nPlease love and follow!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop2 v)\n\nwhen I receive [start v]\nswitch backdrop to (backdrop1 v)\n\n@Sprite1\n\n@Sprite2\n\n@Sprite3\n\n@Sprite4\n\n@Sprite5\n\n@Player\n\nwhen flag clicked\nset [level v] to [1]\ngo to [front v] layer\nhide\n\nwhen I receive [start v]\nset size to (100) %\nshow\nset [signal v] to [disactivated]\npoint in direction (90)\ngo to x: (-190) y: (20)\nset [xs v] to [0]\nset [ys v] to [0]\nforever\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n        change [xs v] by (1.5)\n        switch costume to (right v)\n    end\n    if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>>> then\n        change [xs v] by (-1.5)\n        switch costume to (left v)\n    end\n    if <<<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> and <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>>> then\n        switch costume to (upright v)\n    end\n    if <<<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>>> and <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>>> then\n        switch costume to (upleft v)\n    end\n    if <not <<key (right arrow v) pressed?> or <<key (left arrow v) pressed?> or <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<key (a v) pressed?> or <<key (d v) pressed?> or <<<mouse down?> and <(mouse x) > (x position)>> or <<mouse down?> and <(mouse x) < (x position)>>>>>>>>>> then\n        switch costume to (normal v)\n    end\n    if <<key (down arrow v) pressed?> or <<key (s v) pressed?> or <<mouse down?> and <(mouse y) < (y position)>>>> then\n        switch costume to (down v)\n    end\n    change x by (Xs)\n    if <touching (ground v)?> then\n        change x by ((Xs) * (-1))\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n            if <(Xs) > [0]> then\n                set [xs v] to [-15]\n                set [ys v] to [10]\n            else\n                set [xs v] to [15]\n                set [ys v] to [10]\n            end\n        else\n            set [xs v] to [0]\n        end\n    else\n        set [xs v] to ((Xs) * (0.8))\n    end\n    change y by (Ys)\n    if <touching (ground v)?> then\n        change y by ((Ys) * (-1))\n        set [ys v] to [0]\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n            switch costume to (player - up v)\n            if <(Jumping) = [yes]> then\n                set [ys v] to [12]\n                set [jumping v] to [no]\n            end\n        end\n    else\n        change [ys v] by (-1)\n        set [jumping v] to [yes]\n    end\n    if <(Level) = [21]> then\n        if <(y position) < [-170]> then\n            change [level v] by (1)\n        end\n    else\n        if <(Level) = [26]> then\n            if <[167] < (y position)> then\n                change [level v] by (1)\n            end\n        else\n            if <(x position) > [239]> then\n                set size to (100) %\n                change [level v] by (1)\n                go to x: (-190) y: (20)\n                set [xs v] to [0]\n                set [ys v] to [0]\n            end\n        end\n    end\n    if <<<touching (spikes v)?> or <(y position) < [-178]>> or <<touching (arrow v)?> or <<touching (saws v)?> or <<touching (enemy v)?> or <touching (lava v)?>>>>> then\n        set size to (100) %\n        set [xs v] to [0]\n        set [ys v] to [0]\n        go to x: (-190) y: (50)\n    end\n    if <touching (trampoline v)?> then\n        set [ys v] to [20]\n    end\n    if <touching (water v)?> then\n        set [ys v] to [-1]\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [ys v] to [5]\n        end\n        if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<mouse down?> and <(y position) > (mouse y)>>> then\n            set [ys v] to [-5]\n        end\n    end\n    if <touching (speed ups v)?> then\n        set [xs v] to [20]\n    end\n    if <touching (back ups v)?> then\n        set [xs v] to [-20]\n    end\n    if <touching (small become v)?> then\n        set size to (50) %\n    end\n    if <touching (large become v)?> then\n        set size to (100) %\n    end\nend\n\nwhen I receive [skip v]\ngo to x: (-190) y: (50)\nchange [level v] by (1)\n\nwhen I receive [restart v]\nset [xs v] to [0]\nset [ys v] to [0]\ngo to x: (-190) y: (50)\n\n@Ground\n\nwhen I receive [start v]\ngo to [front v] layer\ngo to x: (0) y: (0)\nshow\nswitch costume to (1 v)\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\nset [level v] to [85]\n\nchange [level v] by (1)\n\nchange [level v] by (-1)\n\n@Spikes\n\nwhen I receive [start v]\ngo to [back v] layer\ngo to x: (0) y: (0)\nshow\nswitch costume to (1 v)\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@Lava\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    repeat (30)\n        change y by (-0.4)\n    end\n    repeat (30)\n        change y by (0.4)\n    end\nend\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (1 v)\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@Water\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (1 v)\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nwait (3) seconds\ngo to x: (0) y: (0)\nforever\n    repeat (30)\n        change y by (-0.4)\n    end\n    repeat (30)\n        change y by (0.4)\n    end\nend\n\n@Trampoline\n\nwhen I receive [start v]\ngo to [front v] layer\ngo to x: (0) y: (0)\nshow\nswitch costume to (1 v)\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@Speed Ups\n\nwhen I receive [start v]\ngo to [front v] layer\ngo to x: (0) y: (0)\nshow\nswitch costume to (1 v)\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@Back Ups\n\nwhen I receive [start v]\ngo to [front v] layer\ngo to x: (0) y: (0)\nshow\nswitch costume to (1 v)\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@Small become\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (1 v)\nforever\n    go to [front v] layer\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@Large become\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (1 v)\nforever\n    go to [front v] layer\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@FL. Extra\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (1 v)\nforever\n    go to [front v] layer\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@BL. Extra\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (1 v)\nforever\n    go to [back v] layer\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@ clouds\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nset size to (pick random (50) to (80)) %\nshow\ngo to [back v] layer\nset [ghost v] effect to (20)\nswitch costume to (pick random (1) to (5))\nif <(side) = [1]> then\n    go to x: (300) y: (pick random (150) to (100))\n    repeat until <(x position) < [-250]>\n        change x by (-1)\n    end\n    delete this clone\nend\nif <(side) = [2]> then\n    go to x: (-300) y: (pick random (150) to (100))\n    repeat until <(x position) > [250]>\n        change x by (1)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nforever\n    go [backward v] (1) layers\n    go to [back v] layer\nend\n\nwhen I receive [start v]\nforever\n    set [side v] to (pick random (1) to (2))\n    create clone of (_myself_ v)\n    wait (pick random (1) to (2)) seconds\nend\n\nwhen flag clicked\nforever\n    if  then\n        hide\n        delete this clone\n    else\n        hide\n    end\nend\n\n@cave coverage\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [22]> then\n        go to x: (0) y: (0)\n        show\n        go to [back v] layer\n    end\n    if <(Level) = [27]> then\n        hide\n    end\n    if <(Level) = [49]> then\n        go to x: (0) y: (0)\n        show\n        go to [back v] layer\n    end\n    if <(Level) = [55]> then\n        hide\n    end\nend\n\n@Intro\n\ndefine smooth size to (size) speed (speed)\nrepeat until <(round (size)) = (round (size))>\n    change size by (((size) - (size)) / (speed))\nend\n\ndefine smooth glide to x (x) y (y) speed (speed) turn (turn) size (size)\nrepeat until <<<(round (x position)) = (round (x))> and <(round (y position)) = (round (y))>> and <<(round (size)) = (round (size))> and <(round (direction)) = (round (turn))>>>\n    change x by (((x) - (x position)) / (speed))\n    change y by (((y) - (y position)) / (speed))\n    turn right (((turn) - (direction)) / (speed)) degrees\n    change size by (((size) - (size)) / (speed))\nend\n\nwhen I start as a clone\nif <(my variable) = [shocksquare]> then\n    point in direction (90)\n    go to x: (x2) y: (y2)\n    switch costume to (shockwave 1 v)\n    clear graphic effects\n    set size to (0) %\n    show\n    repeat (5)\n        go to [front v] layer\n        go [forward v] (1) layers\n        next costume\n        change size by (((size2) - (size)) / (5))\n    end\n    repeat (7)\n        go to [front v] layer\n        go [forward v] (1) layers\n        next costume\n        change size by (((size2) - (size)) / (5))\n        change [ghost v] effect by (10)\n    end\n    hide\nend\n\ndefine clone square shocks (x) (y) (size)\nset [x2 v] to (x)\nset [y2 v] to (y)\nset [size2 v] to (size)\nset [my variable v] to [shocksquare]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(my variable) = [arrows]> then\n    point in direction (90)\n    switch costume to (size hack v)\n    set size to (100) %\n    switch costume to (arrows v)\n    clear graphic effects\n    go to x: (0) y: (-1000)\n    go to [back v] layer\n    show\n    forever\n        repeat (400)\n            change y by (5)\n        end\n    end\nend\n\nwhen flag clicked\nreset timer\nhide\ngo to x: (-299) y: (0)\nset size to (30) %\npoint in direction (-150)\nstart sound [Vexento - Time Goes By v]\nclone [arrows]\nclone square shocks [-150] [-50] [150]\nwait (0) seconds\nclone square shocks [0] [-50] [150]\nwait (0) seconds\nclone square shocks [150] [-50] [150]\nwait (0) seconds\nclone square shocks [-150] [100] [150]\nwait (0) seconds\nclone square shocks [0] [100] [150]\nwait (0) seconds\nclone square shocks [150] [100] [150]\nwait (2) seconds\nclone [bar]\nwait (0.1) seconds\nclone [bar2]\nwait (1) seconds\nclone [circle]\nwait (1) seconds\nclone [slider]\nshow\nswitch costume to (username v)\ngo to [front v] layer\nsmooth glide to x [0] y [0] speed [15] turn [90] size [140]\nsmooth size to [170] speed [3]\nbroadcast (message1 v)\nsmooth size to [80] speed [10]\nhide\nwait (1) seconds\nbroadcast (Start v)\n\nclone square shocks [0] [0] [200]\n\ndefine clone (id)\nset [my variable v] to (id)\ncreate clone of (_myself_ v)\nwait (0) seconds\n\nwhen I start as a clone\nif <(my variable) = [bar]> then\n    switch costume to (bar v)\n    go to x: (0) y: (-900)\n    point in direction (90)\n    set size to (100) %\n    go to [front v] layer\n    show\n    repeat (50)\n        change y by (((0) - (y position)) / (7))\n    end\nend\n\nwhen I start as a clone\nif <(my variable) = [bar2]> then\n    switch costume to (bar v)\n    go to x: (240) y: (-900)\n    point in direction (90)\n    set size to (100) %\n    show\n    repeat (50)\n        change y by (((0) - (y position)) / (7))\n    end\nend\n\nwhen I start as a clone\nif <(my variable) = [circle]> then\n    point in direction (90)\n    set size to (0) %\n    switch costume to (circle v)\n    clear graphic effects\n    set [brightness v] effect to (100)\n    go to x: (0) y: (0)\n    go to [front v] layer\n    show\n    repeat (20)\n        switch costume to (size hack v)\n        change size by (((998) - (size)) / (10))\n        switch costume to (circle v)\n    end\nend\n\nwhen I start as a clone\nif <(my variable) = [slider]> then\n    point in direction (90)\n    set size to (100) %\n    switch costume to (slide v)\n    clear graphic effects\n    go to x: (-550) y: (0)\n    go to [front v] layer\n    show\n    smooth glide to x [0] y [0] speed [10] turn [90] size [100]\nend\n\nwhen I receive [message1 v]\nwait (0.3) seconds\nclone [circle]\n\nwhen [timer v] > (10)\ndelete this clone\n\n@Shine\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\ngo to [back v] layer\nforever\n    go to (player v)\nend\n\n@#1 easter egg\n\nwhen flag clicked\nhide\nforever\n    go to x: (0) y: (0)\n    if <(Level) = [40]> then\n        if <touching (player v)?> then\n            hide\n        else\n            show\n        end\n    else\n        hide\n    end\nend\n\nchange [level v] by (1)\n\n@#2 easter egg\n\nwhen flag clicked\nhide\nforever\n    go to x: (0) y: (0)\n    if <(Level) = [40]> then\n        if <touching (player v)?> then\n            hide\n        else\n            show\n        end\n    else\n        hide\n    end\nend\n\nchange [level v] by (1)\n\n@#3 easter egg\n\nwhen flag clicked\nhide\nforever\n    go to x: (0) y: (0)\n    if <(Level) = [52]> then\n        if <touching (player v)?> then\n            hide\n        else\n            show\n        end\n    else\n        hide\n    end\nend\n\nchange [level v] by (1)\n\n@Thumb\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\ngo to [front v] layer\ngo to x: (0) y: (0)\nset volume to (100) %\n\n@Skip\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nbroadcast (poop v) and wait\n\nwhen I receive [start v]\nshow\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (10)\n    end\n    if <not <touching (mouse-pointer v)?>> then\n        clear graphic effects\n    end\n    if <(Level) = [100]> then\n        hide\n    end\nend\n\nwhen this sprite clicked\nchange [level v] by (1)\nbroadcast (Restart v)\n\nwhen [k v] key pressed\nif <not <(Level) = [100]>> then\n    change [level v] by (1)\n    broadcast (Restart v)\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Restart\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nbroadcast (poop v) and wait\n\nwhen I receive [start v]\nshow\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (10)\n    end\n    if <not <touching (mouse-pointer v)?>> then\n        clear graphic effects\n    end\n    if <(Level) = [100]> then\n        hide\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Restart v)\n\nwhen [r v] key pressed\nbroadcast (Restart v)\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Mute\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nbroadcast (poop v) and wait\n\nwhen I receive [start v]\nshow\n\nwhen flag clicked\nswitch costume to (costume2 v)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (10)\n    end\n    if <not <touching (mouse-pointer v)?>> then\n        clear graphic effects\n    end\n    if <(Level) = [100]> then\n        hide\n    end\nend\n\nwhen this sprite clicked\nnext costume\n\nwhen I receive [start v]\nforever\n    play sound [Nebula v] until done\nend\n\nwhen I receive [start v]\nforever\n    if <(costume [number v]) = [1]> then\n        set volume to (0) %\n    else\n        set volume to (100) %\n    end\nend\n\nwhen [m v] key pressed\nnext costume\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n