Save the stickman a platformer !


@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop11 v)\nhide variable [dragon: v]\nhide variable [leaves v]\n\n@lvl\n\nwhen flag clicked\nhide\nswitch backdrop to (backdrop11 v)\nhide variable [survive 7 seconds to pass! v]\n\nswitch costume to (costume1 v)\n\nbroadcast (show v) and wait\nstop [all v]\n\nwhen I receive [go to background 3 v]\nswitch costume to (costume3 v)\nswitch backdrop to (backdrop3 v)\n\ngo to x: (0) y: (0)\n\nwhen I receive [go to back ground 7 v]\nshow\nswitch backdrop to (backdrop7 v)\nswitch costume to (costume6 v)\n\nwhen I receive [get out v]\nswitch costume to (costume2 v)\nswitch backdrop to (backdrop2 v)\nshow\n\nwhen I receive [go to background 4 v]\nshow\nswitch costume to (costume4 v)\nswitch backdrop to (backdrop4 v)\nwait (0.2) seconds\ngo to [front v] layer\n\nwhen I receive [go to 5 v]\nswitch backdrop to (backdrop5 v)\nswitch costume to (costume5 v)\ngo to [back v] layer\n\nwhen I receive [go to 6 v]\nswitch costume to (costume5-2 v)\nswitch backdrop to (backdrop6 v)\n\nwhen I receive [go to 8 v]\nswitch costume to (costume7 v)\nswitch backdrop to (backdrop8 v)\n\nwhen I receive [go to 9 v]\nset [survive 7 seconds to pass! v] to [0]\nswitch backdrop to (backdrop9 v)\nswitch costume to (costume8 v)\nshow variable [survive 7 seconds to pass! v]\n\nwhen I receive [go to 10 v]\nswitch backdrop to (backdrop10 v)\nswitch costume to (costume9 v)\n\nwhen I receive [the game is on v]\nshow\nswitch costume to (costume1 v)\nswitch backdrop to (backdrop1 v)\n\nwhen flag clicked\nforever\n    play sound [Rainforest WOF v] until done\nend\n\nwhen I receive [go to 9 v]\nwait (0.7) seconds\nrepeat (7)\n    change [survive 7 seconds to pass! v] by (1)\n    wait (1) seconds\nend\nif <(Survive 7 seconds to pass!) = [7]> then\n    broadcast (stop v)\n    broadcast (yay u did it v)\nend\n\nwhen I receive [yay u did it v]\nswitch costume to (costume8.1 v)\nhide variable [survive 7 seconds to pass! v]\n\nwhen I receive [zzzz v]\nset [survive 7 seconds to pass! v] to [0]\nbroadcast (go to 9 v)\n\nwhen I receive [skiiip v]\nswitch costume to (costume9 v)\nstop [other scripts in sprite v]\n\n@player\n\nwhen flag clicked\nhide\ngo to x: (-208) y: (-111)\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nforever\n    platform gravity: [-1] jump height: [15] side movement speed: [3] friction: [.7] slope: [8]\nend\n\ndefine platform gravity: (gravity) jump height: (jump height) side movement speed: (side movement speed) friction: (friction) slope: (slope)\nchange [y velocity v] by (gravity)\nchange y by (y velocity)\nif <touching (lvl v)?> then\n    repeat until <not <touching (lvl v)?>>\n        change y by ((([abs v] of (y velocity) ) / (y velocity)) * (-1))\n    end\n    set [y velocity v] to [0]\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        set [y velocity v] to (jump height)\n    end\nend\nset [x velocity v] to (((x velocity) + ((<<key (left arrow v) pressed?> or <key (a v) pressed?>> * ((side movement speed) * (-1))) + (<<key (right arrow v) pressed?> or <key (d v) pressed?>> * (side movement speed)))) * (friction))\nchange x by (x velocity)\nset [slope v] to [0]\nrepeat until <<(slope) = ((slope) * (-1))> or <not <touching (lvl v)?>>>\n    change y by (1)\n    change [slope v] by (-1)\nend\nif <touching (lvl v)?> then\n    change y by (slope)\n    repeat until <not <touching (lvl v)?>>\n        change x by ((([abs v] of (x velocity) ) / (x velocity)) * (-1))\n    end\nend\n\nwhen I receive [go to background 3 v]\ngo to x: (-199) y: (25)\n\nwhen flag clicked\nset [dragon: v] to [Glory]\nset size to (250) %\nswitch costume to (costume41 v)\nrepeat until <<key (1 v) pressed?> or <<key (2 v) pressed?> or <<key (3 v) pressed?> or <<key (6 v) pressed?> or <key (5 v) pressed?>>>>>\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        switch costume to (costume41 v)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        switch costume to (costume4 v)\n    end\nend\n\nwhen backdrop switches to [backdrop7 v]\ngo to x: (-211) y: (57)\n\nwhen [4 v] key pressed\nset [dragon: v] to [Glory]\nset size to (250) %\nswitch costume to (costume41 v)\nrepeat until <<key (1 v) pressed?> or <<key (2 v) pressed?> or <<key (3 v) pressed?> or <<key (6 v) pressed?> or <key (5 v) pressed?>>>>>\n    if <key (z v) pressed?> then\n        switch costume to (costume421 v)\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            switch costume to (costume421 v)\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            switch costume to (costume42 v)\n        end\n    else\n        switch costume to (costume41 v)\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            switch costume to (costume41 v)\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            switch costume to (costume4 v)\n        end\n    end\nend\n\nwhen [3 v] key pressed\nset [dragon: v] to [Sunny]\nset size to (250) %\nswitch costume to (costume31 v)\nrepeat until <<key (1 v) pressed?> or <<key (2 v) pressed?> or <<key (6 v) pressed?> or <<key (4 v) pressed?> or <key (5 v) pressed?>>>>>\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        switch costume to (costume31 v)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        switch costume to (costume3 v)\n    end\n    if <key (z v) pressed?> then\n        set size to (150) %\n    else\n        set size to (250) %\n    end\nend\n\nwhen [2 v] key pressed\nset [dragon: v] to [Tsunami]\nset size to (250) %\nswitch costume to (costume21 v)\nrepeat until <<key (1 v) pressed?> or <<key (6 v) pressed?> or <<key (3 v) pressed?> or <<key (4 v) pressed?> or <key (5 v) pressed?>>>>>\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        switch costume to (costume21 v)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        switch costume to (costume2 v)\n    end\nend\n\nwhen [1 v] key pressed\nset [dragon: v] to [Clay]\nset size to (250) %\nswitch costume to (costume11 v)\nrepeat until <<key (6 v) pressed?> or <<key (2 v) pressed?> or <<key (3 v) pressed?> or <<key (4 v) pressed?> or <key (5 v) pressed?>>>>>\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        switch costume to (costume11 v)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        switch costume to (costume1 v)\n    end\nend\n\nwhen [5 v] key pressed\nset [dragon: v] to [Starflight]\nset size to (250) %\nswitch costume to (costume51 v)\nrepeat until <<key (1 v) pressed?> or <<key (2 v) pressed?> or <<key (3 v) pressed?> or <<key (4 v) pressed?> or <key (6 v) pressed?>>>>>\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        switch costume to (costume51 v)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        switch costume to (costume5 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (sprite5 v)?> and <<(dragon:) = [Sunny]> or <<(dragon:) = [Starflight]> or <<(dragon:) = [Tsunami]> or <<(dragon:) = [Silver]> or <(dragon:) = [Glory]>>>>>> then\n        go to x: (-210) y: (-104)\n        say [AAAH! TO HOT!] for (0.2) seconds\n    end\nend\n\nwhen I receive [get out v]\ngo to x: (-211) y: (-108)\n\nwhen I receive [go to background 4 v]\ngo to x: (-199) y: (25)\n\nwhen I receive [go to 5 v]\ngo to x: (-211) y: (-108)\n\nwhen I receive [go to 6 v]\ngo to x: (-211) y: (-108)\n\nwhen [r v] key pressed\ngo to x: (-186) y: (-89)\n\nwhen I receive [go to 8 v]\ngo to x: (-206) y: (-66)\n\nwhen I receive [go to 9 v]\ngo to x: (-234) y: (-101)\n\nwhen I receive [i found u v]\ngo to x: (-234) y: (-101)\n\nwhen I receive [go to 10 v]\ngo to x: (-234) y: (-101)\n\nwhen I receive [the game is on v]\nshow\n\nwhen [6 v] key pressed\nset [dragon: v] to [Silver]\nset size to (250) %\nswitch costume to (slotha v)\nrepeat until <<key (1 v) pressed?> or <<key (2 v) pressed?> or <<key (3 v) pressed?> or <<key (4 v) pressed?> or <key (5 v) pressed?>>>>>\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        switch costume to (slotha v)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        switch costume to (slothb v)\n    end\nend\n\nwhen flag clicked\n\nwhen I receive [zzz v]\ngo to x: (-210) y: (-104)\nsay [Zzzz...] for (0.2) seconds\n\n@Sprite1\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\nforever\n    if <touching (player v)?> then\n        broadcast (get out v)\n        stop [this script v]\n    end\nend\n\nsay [Hello!] for (2) seconds\n\nwhen backdrop switches to [backdrop2 v]\nshow\nswitch costume to (costume1 v)\nforever\n    if <touching (player v)?> then\n        broadcast (go to background 3 v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\n\nhide\n\nwhen backdrop switches to [backdrop3 v]\nshow\nswitch costume to (costume1 v)\nforever\n    if <touching (player v)?> then\n        broadcast (go to background 4 v)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop4 v]\nshow\nswitch costume to (costume1 v)\nforever\n    if <touching (player v)?> then\n        broadcast (go to 5 v)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop5 v]\nshow\nswitch costume to (costume1 v)\nforever\n    if <touching (player v)?> then\n        broadcast (go to 6 v)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop6 v]\nshow\nswitch costume to (costume1 v)\nforever\n    if <touching (player v)?> then\n        broadcast (go to back ground 7 v)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop7 v]\nshow\nswitch costume to (costume1 v)\nforever\n    if <touching (player v)?> then\n        broadcast (go to 8 v)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop8 v]\nshow\nswitch costume to (costume1 v)\nforever\n    if <touching (player v)?> then\n        broadcast (go to 9 v)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop9 v]\nshow\nswitch costume to (costume1 v)\nforever\n    if <touching (player v)?> then\n        broadcast (go to 10 v)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop10 v]\nhide\n\n@Sprite3\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop2 v]\n\nshow\n\nwhen backdrop switches to [backdrop3 v]\n\nhide\n\nwhen backdrop switches to [backdrop10 v]\nhide\n\n@Sprite4\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop3 v]\n\nshow\n\nwhen backdrop switches to [backdrop4 v]\nhide\n\nrepeat until <<key (1 v) pressed?> or <<key (2 v) pressed?> or <<key (3 v) pressed?> or <<key (4 v) pressed?> or <key (5 v) pressed?>>>>>\n\nwhen backdrop switches to [backdrop10 v]\nhide\n\n@Sprite5\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop5 v]\nshow\ngo to x: (34) y: (-53)\ngo to [back v] layer\n\nwhen backdrop switches to [backdrop5 v]\nforever\n    next costume\n    wait (0.07) seconds\nend\n\nwhen backdrop switches to [backdrop6 v]\nhide\n\n@Sprite2\n\nwhen flag clicked\nset [leaves v] to [0]\nhide\nforever\n    turn left (30) degrees\n    wait (0.3) seconds\n    turn right (30) degrees\n    wait (0.3) seconds\nend\n\nwhen I start as a clone\n\nwhen backdrop switches to [backdrop3 v]\ngo to x: (92) y: (-100)\nshow\nforever\n    if <touching (player v)?> then\n        hide\n        change [leaves v] by (1)\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\n\ncreate clone of (_myself_ v)\n\nwhen backdrop switches to [backdrop4 v]\ngo to x: (14) y: (102)\nshow\nforever\n    if <touching (player v)?> then\n        hide\n        change [leaves v] by (1)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop5 v]\ngo to x: (22) y: (-12)\nshow\ngo to [back v] layer\nforever\n    if <touching (player v)?> then\n        hide\n        change [leaves v] by (1)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop6 v]\ngo to x: (92) y: (-100)\nshow\ngo to [front v] layer\nforever\n    if <touching (player v)?> then\n        hide\n        change [leaves v] by (1)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop7 v]\ngo to x: (-150) y: (-69)\nshow\ngo to [back v] layer\nforever\n    if <touching (player v)?> then\n        hide\n        change [leaves v] by (1)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop8 v]\ngo to x: (-10) y: (-100)\nshow\ngo to [front v] layer\nforever\n    if <touching (player v)?> then\n        hide\n        change [leaves v] by (1)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop9 v]\ngo to x: (171) y: (-18)\nshow\ngo to [front v] layer\nforever\n    if <touching (player v)?> then\n        hide\n        change [leaves v] by (1)\n        stop [this script v]\n    end\nend\n\nwhen I receive [skiiip v]\nhide\n\n@Sprite6\n\nwhen backdrop switches to [backdrop5 v]\nforever\n    if <(dragon:) = [Starflight]> then\n        hide\n    else\n        show\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [go to 5 v]\n\nwhen backdrop switches to [backdrop6 v]\nforever\n    hide\nend\n\nwhen backdrop switches to [backdrop10 v]\nhide\n\n@KESTREL\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop7 v]\nswitch costume to (open2 v)\nshow\ngo to [front v] layer\nforever\n    if <touching color (#000000)?> then\n        switch costume to (open v)\n        broadcast (I FOUND U v)\n        say [Dragon Alert!] for (0.4) seconds\n        switch costume to (open2 v)\n    end\nend\n\nwhen backdrop switches to [backdrop8 v]\nhide\n\nwhen backdrop switches to [backdrop8 v]\nstop [other scripts in sprite v]\n\n@Sprite10\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop10 v]\nshow\nforever\n    if <<(Leaves) = [7]> or <(Leaves) > [7]>> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\n@Sprite11\n\nwhen flag clicked\ngo to x: (105) y: (-59)\nshow\n\nwhen this sprite clicked\nhide\nbroadcast (the game is on v)\nshow variable [dragon: v]\nshow variable [leaves v]\n\n@Sprite7\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop8 v]\ngo to x: (15) y: (106)\nshow\nrepeat until <(backdrop [number v]) = [9]>\n    repeat until <<touching (_edge_ v)?> or <<touching (player v)?> or <touching (lvl v)?>>>\n        glide (0.5) secs to x: (165) y: (-126)\n    end\n    go to x: (15) y: (106)\nend\n\nwhen backdrop switches to [backdrop8 v]\nforever\n    if <touching (player v)?> then\n        broadcast (ZZZ v)\n    end\nend\n\nwhen backdrop switches to [backdrop9 v]\nhide\n\n@Sprite9\n\nwhen backdrop switches to [backdrop8 v]\ngo to x: (133) y: (104)\nshow\nrepeat until <(backdrop [number v]) = [9]>\n    repeat until <<touching (_edge_ v)?> or <<touching (player v)?> or <touching (lvl v)?>>>\n        glide (1) secs to x: (-104) y: (-131)\n    end\n    go to x: (133) y: (104)\nend\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop8 v]\nforever\n    if <touching (player v)?> then\n        broadcast (ZZZ v)\n    end\nend\n\nwhen backdrop switches to [backdrop9 v]\nhide\n\n@Sprite12\n\nwhen backdrop switches to [backdrop9 v]\ngo to x: (-76) y: (123)\nshow\nrepeat until <(backdrop [number v]) = [10]>\n    glide (0.5) secs to x: (-32) y: (125)\n    broadcast (AAdart v)\n    repeat until <<touching (_edge_ v)?> or <<touching (player v)?> or <touching (lvl v)?>>>\n        glide (1) secs to (player v)\n    end\n    go to x: (-76) y: (123)\nend\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop9 v]\nforever\n    if <touching (player v)?> then\n        go to x: (-76) y: (123)\n        broadcast (ZZzz v)\n    end\nend\n\nwhen backdrop switches to [backdrop10 v]\nhide\n\nwhen backdrop switches to [backdrop9 v]\nforever\n    point towards (player v)\nend\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\n\n@Sprite8\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop10 v]\n\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\n@Sprite13\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nhide variable [survive 7 seconds to pass! v]\nbroadcast (skiiip v)\nswitch backdrop to (backdrop10 v)\nhide\n\nwhen I receive [go to 9 v]\nshow\n\n@Screen Shot 2021-01-05 at 12\n\nwhen flag clicked\nhide\n\nwhen I receive [spoil v]\nshow\nwait (3) seconds\nhide\n\nsay [baiii] for (2) seconds\n\n@Sprite14\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop10 v]\nshow\n\nwhen this sprite clicked\nask [Sloth says hi] and wait\nif <(answer) = [Spoil5]> then\n    broadcast (spoil v)\nelse\n    say [baii] for (2) seconds\nend\n\nsay [baiii]\n\n