The lost land, a platformer
@Stage\n\nwhen flag clicked\nforever\n    play sound [Julius Dreisig & Zeus X Crona - Invisible \[NCS Release\] v] until done\nend\n\n@Level\n\nwhen flag clicked\ngo to [front v] layer\nshow\nset [ghost v] effect to (0)\ngo to x: (0) y: (0)\n\nwhen I receive [change scene v]\nswitch costume to (join [Scene] (Scene #))\n\nchange [scene # v] by (1)\n\nwhen I receive [the end v]\nwait (1) seconds\ngo to (random position v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [animation time v]\nhide\nstop [other scripts in sprite v]\n\n@Guy\n\nwhen flag clicked\npoint in direction (90)\nset [gravity v] to [-1.5]\nset [jump force v] to [15]\nset [acceleration v] to [3]\nset [resistance v] to [0.8]\nReset and begin level\njoystick\n\nwhen [up arrow v] key pressed\nswitch costume to (up v)\n\nwhen [right arrow v] key pressed\nswitch costume to (right v)\n\nwhen [left arrow v] key pressed\nswitch costume to (left v)\n\ndefine Move - in steps (steps)\nchange [falling v] by (1)\nrepeat (steps)\n    set [last value v] to (x position)\n    change x by ((Speed x) / (steps))\n    Check touching solid\n    if <(Touching) > [0]> then\n        set x to (Last value)\n        set [speed x v] to [0]\n    end\n    set [last value v] to (y position)\n    change y by ((Speed y) / (steps))\n    Check touching solid\n    if <(Touching) > [0]> then\n        set y to (Last value)\n        if <(Speed y) < [0]> then\n            set [falling v] to [0]\n        end\n        set [speed y v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    change [color v] effect by (2)\nend\n\ndefine Check touching solid\nif <<touching (level v)?> or <touching (moving platforms v)?>> then\n    set [touching v] to [1]\nelse\n    set [touching v] to [0]\nend\n\nwhen I receive [tick player v]\nControls - up and down\nControls - left and right\nMove - in steps (([abs v] of (Speed x) ) + ([abs v] of (Speed y) ))\n\ndefine Controls - up and down\nif <<key (up arrow v) pressed?> or <(STICK Y) > [0.5]>> then\n    if <(falling) < [3]> then\n        set [speed y v] to (Jump Force)\n    end\nend\nchange [speed y v] by (GRAVITY)\n\ndefine Controls - left and right\nif <<key (right arrow v) pressed?> or <(STICK X) > [0.5]>> then\n    change [speed x v] by (ACCELERATION)\nend\nif <<key (left arrow v) pressed?> or <(STICK X) < [-0.5]>> then\n    change [speed x v] by ((0) - (ACCELERATION))\nend\nset [speed x v] to ((Speed x) * (Resistance))\n\ndefine Reset and begin level\ngo to [front v] layer\nshow\nset [ghost v] effect to (0)\nBegin Scene # [2] go to x and y [70] [70]\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [falling v] to [99]\npoint in direction (90)\n\nwhen I receive [game loop v]\nset size to (100) %\nset [ghost v] effect to (0)\nswitch costume to (right v)\nforever\n    broadcast (Tick player v)\n    broadcast (Tick - last v)\nend\n\nwhen I receive [tick - last v]\nif <(x position) > [235]> then\n    Begin Scene # ((Scene #) + (1)) go to x and y [-235] []\nend\nif <(x position) < [-235]> then\n    Begin Scene # ((Scene #) + (-1)) go to x and y [235] []\nend\nif <touching (danger v)?> then\n    broadcast (Lose life v)\nend\n\ndefine Begin Scene # (scene #) go to x and y (x) (y)\nset [scene # v] to (scene #)\nset x to (x)\nset y to (y)\nbroadcast (Change Scene v)\nstop [other scripts in sprite v]\nwait (0) seconds\nFix Collisions in Directions [0]\nbroadcast (Game loop v)\n\ndefine Fix Collisions in Directions (dir)\nset [temp v] to (direction)\nset [distance v] to [1]\npoint in direction (dir)\nrepeat (128)\n    Check touching solid\n    if <(Touching) < [1]> then\n        point in direction (temp)\n        stop [this script v]\n    end\n    move (distance) steps\n    turn right (180) degrees\n    change [distance v] by (1)\nend\n\nwhen I receive [lose life v]\nswitch costume to (death v)\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\n    change size by (3)\n    change y by (10)\nend\nreset scene\n\nwhen [a v] key pressed\nswitch costume to (left v)\n\nwhen [d v] key pressed\nswitch costume to (right v)\n\nwhen [w v] key pressed\nswitch costume to (up v)\n\ndefine joystick\npoint in direction (90)\nforever\n    if <<key (left arrow v) pressed?> or <(STICK X) < [-0.5]>> then\n        change x by (-6)\n    end\n    if <<key (right arrow v) pressed?> or <(STICK X) > [0.5]>> then\n        change x by (6)\n    end\nend\n\ndefine reset scene\nBegin Scene # (Scene #) go to x and y [-180] [70]\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [falling v] to [99]\npoint in direction (90)\n\nwhen I receive [animation time v]\nhide\nstop [other scripts in sprite v]\n\nwhen [s v] key pressed\nswitch costume to (down v)\n\nwhen [down arrow v] key pressed\nswitch costume to (down v)\n\n@control stick\n\nwhen flag clicked\nshow\ngo to [front v] layer\nset [myself v] to [control stick]\nset size to (140) %\nset [max stick v] to ((size) / (4))\nswitch costume to (base v)\nset [ghost v] effect to (60)\ncreate clone of (_myself_ v)\ngo [forward v] (1) layers\nrepeat (10)\n    go to [front v] layer\n    go to [front v] layer\nend\n\nwhen I start as a clone\nswitch costume to (stick v)\ngo [forward v] (2) layers\nset [ghost v] effect to (25)\nforever\n    go to [front v] layer\n    set [stick power v] to []\n    set [stick x v] to [0]\n    set [stick y v] to [0]\n    repeat until <mouse down?>\n        go to (myself)\n    end\n    if <(distance to [mouse-pointer v]) < ((size) * (0.6))> then\n        Stick Drag\n    else\n        wait until <not <mouse down?>>\n    end\nend\n\ndefine Stick Drag\nrepeat until <not <mouse down?>>\n    go to (mouse-pointer v)\n    point towards (myself)\n    turn right (180) degrees\n    set [stick direction v] to (direction)\n    set [stick power v] to (distance to [(myself) v])\n    if <(STICK POWER) > (max stick)> then\n        move ((max stick) - (STICK POWER)) steps\n        set [stick power v] to (max stick)\n    end\n    set [stick power v] to ((STICK POWER) / (max stick))\n    set [stick x v] to ((STICK POWER) * ([sin v] of (STICK DIRECTION) ))\n    set [stick y v] to ((STICK POWER) * ([cos v] of (STICK DIRECTION) ))\nend\n\nwhen I receive [animation time v]\nhide\nstop [other scripts in sprite v]\n\n@Danger\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\ngo to [back v] layer\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (Scene #))\nif <<(Scene #) = [5]> or <(Scene #) = [7]>> then\n    forever\n        set y to ((20) * ([sin v] of ((timer) * (180)) ))\n    end\nend\nif <(Scene #) = [8]> then\n    go to x: (0) y: (0)\nend\n\nwhen I receive [the end v]\nhide\n\nwhen I receive [animation time v]\nhide\nstop [other scripts in sprite v]\n\n@Decor\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (Scene #))\n\nwhen I receive [the end v]\nhide\n\nif <<(Scene #) = [5]> or > then\n    forever\n        set y to ((5) * ([sin v] of ((timer) * (180)) ))\n    end\nend\n\nwhen I receive [animation time v]\nhide\nstop [other scripts in sprite v]\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nwait (1) seconds\ngo to [back v] layer\n\n@player2\n\nwhen flag clicked\nforever\n    go to (guy v)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nset size to (100) %\nrepeat (10)\n    change size by (-1)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I receive [the end v]\nhide\n\nwhen flag clicked\nshow\n\nwhen I receive [animation time v]\nhide\nstop [other scripts in sprite v]\n\n@Circle\n\nwhen flag clicked\nforever\n    turn left (15) degrees\n    go to [back v] layer\n    wait (0.7) seconds\n    create clone of (_myself_ v)\nend\n\nrepeat (10)\n    change y by (7)\n    change x by (2)\nend\nrepeat (2)\n    change y by (0.5)\n    change x by (0.5)\nend\nrepeat (10)\n    change y by (5.5)\n    change x by (-2)\nend\nchange y by (0.5)\nchange x by (-0.5)\nchange y by (0.5)\nchange x by (-0.5)\n\nwhen I start as a clone\ngo to x: (pick random (0) to (435)) y: (-164)\nset [ghost v] effect to (100)\nshow\ngo to [back v] layer\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nrepeat until <(y position) > [200]>\n    change y by (2)\n    change x by (X-Sway)\nend\nrepeat (4)\n    change [ghost v] effect by (25)\nend\n\nwhen flag clicked\nset [x-sway v] to [-2.5]\nforever\n    repeat (10)\n        change [x-sway v] by (0.5)\n    end\n    repeat (10)\n        change [x-sway v] by (-0.5)\n    end\nend\n\nwhen flag clicked\nhide\n\n@スプライト1\n\nwhen flag clicked\nset [桜x v] to [0]\nset [桜y v] to [0]\ngo to x: (0) y: (0)\nhide\nforever\n    wait (0.3) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to [front v] layer\nset size to (pick random (70) to (100)) %\npoint in direction (pick random (90) to (150))\nshow\ngo to x: (pick random (-240) to (240)) y: (pick random (240) to (200))\nset [ghost v] effect to (pick random (10) to (45))\nset [桜x v] to (pick random (-1.0) to (1.0))\nset [桜y v] to (pick random (-1.0) to (-3.0))\nrepeat until <<touching (ステージ v)?> or <(y position) < [-178]>>\n    change x by (桜x)\n    change y by (桜y)\nend\ndelete this clone\n\n@Sprite1\n\nwhen flag clicked\nset [time' v] to [0]\nforever\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\nwhen I receive [the end v]\nif <(time') < (☁ highscore)> then\n    set [☁ highscore v] to (time')\nend\n\n@animated Guy2\n\nwhen I receive [animation time v]\nswitch costume to (glide v)\ngo to x: (0) y: (0)\nshow\n\nwhen flag clicked\nclear graphic effects\nset size to (100) %\nhide\ngo to [front v] layer\n\nbroadcast (animation time v)\n\nwhen I receive [jump v]\nforever\n    repeat (8)\n        change y by (10)\n    end\n    wait (0.001) seconds\n    repeat (8)\n        change y by (-10)\n    end\n    wait (0.08) seconds\nend\n\n@animated Guy\n\nwhen I receive [animation time v]\ngo to [front v] layer\nswitch costume to (glide v)\ngo to x: (-210) y: (-109)\nshow\nwait (1) seconds\nrepeat (15)\n    wait (0.001) seconds\n    next costume\n    change x by (20)\nend\nbroadcast (jump v)\n\nwhen flag clicked\nclear graphic effects\nset size to (100) %\nhide\ngo to [front v] layer\nforever\n    if <(Scene #) = [13]> then\n        broadcast (animation time v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [jump v]\nwait (0.5) seconds\nforever\n    repeat (8)\n        change y by (10)\n    end\n    wait (0.001) seconds\n    repeat (8)\n        change y by (-10)\n    end\n    wait (0.08) seconds\nend\n\n@Decor2\n\nwhen I receive [animation time v]\nshow\ngo to x: (0) y: (0)\ngo to [back v] layer\n\nwhen flag clicked\nhide\n\n@moving platforms\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\ngo to [back v] layer\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (Scene #))\nif  then\n    forever\n        set x to ((20) * ([sin v] of ((timer) * (180)) ))\n    end\nend\nif <(Scene #) = [8]> then\n    go to x: (0) y: (0)\nend\n\nwhen I receive [the end v]\nhide\n\nwhen I receive [animation time v]\nhide\nstop [other scripts in sprite v]\n\nset [scene # v] to [10]\n\n