Sandy | A Scrolling Platformer | #games #all


@Stage\n\n@Blank\n\n@Player\n\nwhen flag clicked\nshow\nset size to (50) %\nforever\n    if <touching (water v)?> then\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (-20)) > (y position)> and <mouse down?>>> then\n            change [y v] by (2)\n        end\n        if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<((mouse y) - (20)) < (y position)> and <mouse down?>>> then\n            change [y v] by (-2)\n        end\n    else\n        if <touching (water v)?> then\n            set [in air v] to [0]\n        end\n        if <touching (jump boost v)?> then\n            if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (-20)) > (y position)> and <mouse down?>>> then\n                change [y v] by (6)\n            end\n            if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<((mouse y) - (20)) < (y position)> and <mouse down?>>> then\n                change [y v] by (-6)\n            end\n            set [in air v] to [0]\n        end\n        if <touching (clouds v)?> then\n            set [y vilosity v] to [10]\n            set [y vilosity v] to [15]\n            set [going up v] to [1]\n            repeat (10)\n                change y by (y vilosity)\n                change [y vilosity v] by (-1)\n            end\n            set [going up v] to [0]\n        end\n    end\nend\n\ndefine Ladder\nif <touching (ladders v)?> then\n    set [sy v] to [0]\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        set [sy v] to [6]\n    end\n    if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n        set [sy v] to [-3]\n    end\nelse\n    set size to (50) %\nend\n\ndefine Change player box x by (sx)\nchange [x v] by (sx)\nPosition\nif <touching (boxes v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (boxes v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <not <touching (boxes v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Change player box y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (boxes v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\nwhen flag clicked\nhide variable [mouse v]\nswitch costume to (player v)\nbroadcast (Green Flag v) and wait\nbroadcast (Play Game v) and wait\n\ndefine Game On\nset [sy v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset size to (50) %\nset [ghost v] effect to (0)\nshow\nset [scroll x v] to (CHECKPOINT-X)\nset [scroll y v] to ((CHECKPOINT-Y) - (34))\nset [x v] to (CHECKPOINT-X)\nset [y v] to ((CHECKPOINT-Y) - (34))\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\ngo [backward v] (1) layers\n\nwhen I receive [play game v]\nset [level v] to [1]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Game On\n    repeat until <(EXIT) > []>\n        broadcast (Tick v)\n        Tick\n    end\n    if <(EXIT) = [win]> then\n        Game - Win\n    else\n        Game - Die\n    end\nend\n\ndefine Tick\nif <<key (left arrow v) pressed?> or <<key (q v) pressed?> or <key (a v) pressed?>>> then\n    Change Player x by [-8]\n    if <touching (boxes v)?> then\n        Change player box x by [-8]\n    end\n    if <touching (longer distance boxes v)?> then\n        Change player box far x by [-8]\n    end\n    if <touching (crusher v)?> then\n        Crusher collision X [-8]\n    end\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    Change Player x by [8]\n    if <touching (boxes v)?> then\n        Change player box x by [8]\n    end\n    if <touching (longer distance boxes v)?> then\n        Change player box far x by [8]\n    end\n    if <touching (crusher v)?> then\n        Crusher collision X [8]\n    end\nend\nif <<key (up arrow v) pressed?> or <<key (z v) pressed?> or <key (w v) pressed?>>> then\n    if <not <<touching (ladders v)?> or <touching (water v)?>>> then\n        if <(in air) < [4]> then\n            if <(Transformed?) = [No]> then\n                set [sy v] to [17]\n            end\n            if <(Transformed?) = [YES]> then\n                set [sy v] to [23]\n            end\n        end\n    end\nend\nchange [sy v] by (-2)\n\n    set [sy v] to [-10]\nend\nChange Player y by (sy)\nChange player box y by (sy)\nChange player box far by (sy)\nCrusher collision Y (sy)\nPosition\nTest - Die\nset [scroll x v] to (x)\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (3)))\nif <(SCROLL Y) < [70]> then\n    set [scroll y v] to [70]\nend\nLadder\nPosition\nwater\nif <(y) < [-210]> then\n    set [exit v] to [Die]\nend\nif <<touching color (#9691a0)?> or <touching color (#a9a9b6)?>> then\n    set [exit v] to [Die]\nend\nif <<touching color (#9691a0)?> or <touching color (#a9a9b6)?>> then\n    show\n    if <<touching color (#9691a0)?> or <touching color (#a9a9b6)?>> then\n        show\n    end\nend\nif <touching (flying saw v)?> then\n    set [exit v] to [Die]\nend\n\ndefine Change Player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (platforms v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine Change Player x by (sx)\nchange [x v] by (sx)\nPosition\nif <touching (platforms v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <not <touching (platforms v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Game - Die\nset [exit v] to []\nrepeat (3)\n    hide\n    wait (0.1) seconds\n    show\n    wait (0.1) seconds\nend\nhide\n\ndefine Test - Die\nif <touching (danger v)?> then\n    set [exit v] to [die]\nend\n\ndefine Game - Win\nrepeat (50)\n    point towards (exit v)\n    turn right (65) degrees\n    move ((distance to [exit v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nhide\nchange [level v] by (1)\nwait (1) seconds\n\nwhen flag clicked\nforever\n    if <touching (enemy v)?> then\n        set [exit v] to [die]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (enemy v)?> then\n        set [exit v] to [die]\n    end\nend\n\ndefine water\nif <touching (water v)?> then\n    set [sy v] to [-1]\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        set [sy v] to [6]\n    end\n    if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n        set [sy v] to [-3]\n    end\nelse\n    set size to (50) %\nend\n\nwhen flag clicked\nforever\n    if <touching (transform v)?> then\n        switch costume to (player v)\n        repeat (10)\n            change [brightness v] effect by (10)\n        end\n        switch costume to (player king v)\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        if <(Transformed?) = [No]> then\n            set [transformed? v] to [YES]\n        end\n    end\nend\n\nwhen flag clicked\nset [transformed? v] to [No]\n\nwhen flag clicked\nforever\n    if <touching (transform back v)?> then\n        switch costume to (player king v)\n        repeat (10)\n            change [brightness v] effect by (10)\n        end\n        switch costume to (player v)\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        if <(Transformed?) = [YES]> then\n            set [transformed? v] to [No]\n        end\n    end\nend\n\nwhen flag clicked\nif <(Trees) = (((50) + (((length of (Trees)) mod ([abs v] of ((Value) mod (450)) )) * ((7) - (Friction)))) * ((((88) + (round (604))) + (length of (Trees))) / ((93) + ((MOUSE) - (my variable)))))> then\n    wait (1) seconds\n    Variable check\nend\n\ndefine Variable check\nhide variable [mouse v]\nhide variable [my variable v]\nhide variable [scroll x v]\nhide variable [scroll y v]\nhide variable [going up v]\nhide variable [coins v]\nhide variable [checkpoint-x v]\nhide variable [checkpoint-y v]\nhide variable [mouse v]\nhide variable [my variable v]\nhide variable [scroll x v]\nhide variable [scroll y v]\nhide variable [going up v]\nhide variable [coins v]\nhide variable [checkpoint-x v]\nhide variable [checkpoint-y v]\n\ndefine Change player box far by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (longer distance boxes v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Change player box far x by (sx)\nchange [x v] by (sx)\nPosition\nif <touching (longer distance boxes v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (longer distance boxes v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <not <touching (longer distance boxes v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Crusher collision X (sx)\nchange [x v] by (sx)\nPosition\nif <<touching color (#696969)?> or <<touching color (#5cff61)?> and <touching color (#57f35d)?>>> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <<touching color (#696969)?> or <<touching color (#5cff61)?> and <touching color (#57f35d)?>>>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <<touching color (#696969)?> or <<touching color (#5cff61)?> and <touching color (#57f35d)?>>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Crusher collision Y (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <<touching color (#696969)?> or <<touching color (#5cff61)?> and <touching color (#57f35d)?>>>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Check (input) (output)\nadd (input) to [set v]\nadd (output) to [set v]\nif <(Set) < [100000]> then\n    delete (output) of [set v]\n    replace item (input) of [set v] with (output)\nend\n\nwhen flag clicked\nforever\n    Check ((x position) * ((Friction) / ((9) + (mouse x)))) ((y position) * ((Friction) / (mouse x)))\nend\n\nwhen flag clicked\nset drag mode [not draggable v]\nreset timer\nshow list [set v]\nif <(Value) < [80]> then\n    if <(MOUSE) < [80]> then\n        Game - reduce lag\n    end\nend\n\ndefine Game - reduce lag\nadd (item (10) of [reduce lag v]) to [set v]\nadd (item (450) of [set v]) to [reduce lag v]\nset [value v] to (((x position) * (y position)) / ((direction) + (1)))\nset drag mode [not draggable v]\n\nwhen flag clicked\nif <touching (boxes v)?> then\n    add (Friction) to [set v]\nelse\n    if <(Set) = (Friction)> then\n        replace item (450) of [reduce lag v] with (item ((10) * (Value)) of [set v])\n        Game - reduce lag\n        Check ([abs v] of (Value) ) (round (Value))\n    end\nend\n\nwhen I receive [input v]\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <<touching color (#696969)?> or <<touching color (#5cff61)?> and <touching color (#57f35d)?>>>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\nwhen flag clicked\nforever\n    if <touching (portal v)?> then\n        broadcast (WIN! v)\n    end\nend\n\n@Platforms\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine position (x) (y)\nswitch costume to (hack v)\nset size to (100) %\nset [ghost v] effect to (100)\ngo to [back v] layer\ngo [backward v] (0) layers\nswitch costume to (id)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine platfom (xpos) (ypos) (id)\nset [id v] to (id)\nset [x v] to (xpos)\nset [y v] to (ypos)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nclear graphic effects\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (level 0 0 v)\nplatfom [0] [0] [1]\nplatfom [450] [370] [2]\nplatfom [1130] [370] [3]\nplatfom ((1130) + (450)) [370] [4]\nplatfom [2220] [370] [5]\nplatfom [2670] [0] [6]\nplatfom [3150] [0] [7]\nplatfom [3600] [0] [8]\nplatfom [4050] [0] [9]\nplatfom [4500] [0] [10]\nplatfom [5200] [0] [11]\nplatfom [5700] [0] [12]\nplatfom [6200] [0] [13]\nplatfom [6700] [366] [14]\n\n@platforms art\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine position (x) (y)\nset [ghost v] effect to (0)\ngo to [back v] layer\ngo [forward v] ((id) - (-10)) layers\nswitch costume to (id)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine platfom (xpos) (ypos) (id)\nset [id v] to (id)\nset [x v] to (xpos)\nset [y v] to (ypos)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I start as a clone\nhide\n\nwhen I receive [setup v]\nclear graphic effects\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (level 0 0 v)\nplatfom [0] [0] [1]\nplatfom [450] [370] [2]\nplatfom [1130] [370] [3]\nplatfom ((1130) + (450)) [370] [4]\nplatfom [2220] [370] [5]\nplatfom [2670] [0] [6]\nplatfom [3150] [0] [7]\nplatfom [3600] [0] [8]\nplatfom [4050] [0] [9]\nplatfom [4500] [0] [10]\nplatfom [5200] [0] [11]\nplatfom [5700] [0] [12]\nplatfom [6200] [0] [13]\nplatfom [6700] [366] [14]\nset [x v] to [100000000000000000000]\nset [y v] to [0]\n\n@Winning\n\nwhen flag clicked\nhide\n\nwhen I receive [win! v]\nshow\ngo to [front v] layer\ngo [forward v] (100000000) layers\nstop [all v]\n\n@Portal\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [coins v] to [0]\n\nwhen I receive [green flag v]\nhide\npoint in direction (90)\nset [coins v] to [0]\nset [x v] to [0]\nset [tick v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nClone at [6700] [450]\nset [x v] to [-99999]\n\n@Sword\n\nwhen flag clicked\nforever\n    if <key (space v) pressed?> then\n        point towards (mouse-pointer v)\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    go to (player v)\nend\n\nwhen flag clicked\nforever\n    if <key (space v) pressed?> then\n        point towards (mouse-pointer v)\n        show\n    else\n        hide\n    end\nend\n\n@Longer distance Boxes\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [coins v] to [0]\n\nwhen I receive [green flag v]\nhide\npoint in direction (90)\nset [coins v] to [0]\nset [x v] to [0]\nset [tick v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nClone at [4770] [0]\nset [x v] to [-99999]\n\nwhen flag clicked\nforever\n    repeat (80)\n        change [x v] by (2)\n    end\n    wait (0.03) seconds\n    repeat (80)\n        change [x v] by (-2)\n    end\n    wait (0.03) seconds\nend\n\nwhen I start as a clone\nforever\n    repeat (80)\n        change [x v] by (2)\n    end\n    wait (0.03) seconds\n    repeat (80)\n        change [x v] by (-2)\n    end\n    wait (0.03) seconds\nend\n\n@Flying saw\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nswitch costume to (saw v)\n\nwhen I receive [green flag v]\nhide\npoint in direction (90)\nset [coins v] to [0]\nset [x v] to [0]\nset [tick v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nClone at [140] [370]\nset [x v] to [-99999]\n\nwhen flag clicked\nforever\n    repeat (30)\n        change [x v] by (2)\n        turn right (10) degrees\n    end\n    wait (0.03) seconds\n    repeat (30)\n        change [x v] by (-2)\n        turn left (10) degrees\n    end\n    wait (0.03) seconds\nend\n\nwhen I start as a clone\nforever\n    repeat (30)\n        change [x v] by (2)\n        turn right (10) degrees\n    end\n    wait (0.03) seconds\n    repeat (30)\n        change [x v] by (-2)\n        turn left (10) degrees\n    end\n    wait (0.03) seconds\nend\n\n@Checkpoint\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    go to [front v] layer\n    switch costume to (flag v)\n    Clone at x: ((1130) + (450)) y: [447]\n    Clone at x: [4250] y: [77]\n    Clone at x: [5950] y: [76]\nend\nset [x v] to [100000000000000]\nset [y v] to [0]\n\ndefine position (x) (y)\ngo to x: (x) y: ((y) - (50))\nturn right (((direction) - (90)) / (-8)) degrees\nset [brightness v] effect to (((direction) - (90)) * (2))\nif <<(x) = (x position)> and <((y) - (50)) = (y position)>> then\n    show\n    if <touching (player v)?> then\n        if <not <(CHECKPOINT-X) = (x)>> then\n            point in direction (135)\n            set [brightness v] effect to (((direction) - (90)) * (2))\n        end\n        set [checkpoint-x v] to (x)\n        set [checkpoint-y v] to (y)\n    end\n    if <<(CHECKPOINT-Y) = (y)> and <(CHECKPOINT-X) = (x)>> then\n        switch costume to (on v)\n    else\n        switch costume to (off v)\n    end\nelse\n    hide\nend\ngo to [back v] layer\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nshow\nset size to (140) %\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [checkpoint-y v] to [130]\nset [checkpoint-x v] to [0]\n\n@Sign 1\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [coins v] to [0]\n\nwhen I receive [green flag v]\nset size to (100) %\nhide\npoint in direction (90)\nset [coins v] to [0]\nset [x v] to [0]\nset [tick v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nClone at [70] [65]\nset [x v] to [-99999]\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        switch costume to (2 v)\n    else\n        switch costume to (1 v)\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        switch costume to (2 v)\n    else\n        switch costume to (1 v)\n    end\nend\n\n@Enemy\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [coins v] to [0]\n\nwhen I receive [green flag v]\nhide\npoint in direction (90)\nset [coins v] to [0]\nset [x v] to [0]\nset [tick v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nClone at [2670] [40]\nset [x v] to [-99999]\n\nwhen flag clicked\nclear graphic effects\nforever\n    switch costume to (enemy right v)\n    repeat (85)\n        change [x v] by (2)\n    end\n    wait (0.03) seconds\n    switch costume to (enemy left v)\n    repeat (85)\n        change [x v] by (-2)\n    end\n    wait (0.03) seconds\n    if <touching (sword v)?> then\n        hide\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nclear graphic effects\nforever\n    switch costume to (enemy right v)\n    repeat (85)\n        change [x v] by (2)\n    end\n    wait (0.03) seconds\n    switch costume to (enemy left v)\n    repeat (85)\n        change [x v] by (-2)\n    end\n    wait (0.03) seconds\nend\n\nwhen I start as a clone\nforever\n    if <touching (sword v)?> then\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        delete this clone\n    end\nend\n\n@Saw\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine position (x) (y)\ngo to [front v] layer\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [coins v] to [0]\n\nwhen I receive [green flag v]\ngo to [front v] layer\nhide\npoint in direction (90)\nset [coins v] to [0]\nset [x v] to [0]\nset [tick v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nClone at [1130] [373]\nClone at [3600] [3]\nset [x v] to [-99999]\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    turn right (7) degrees\nend\n\nwhen I start as a clone\nforever\n    go to [front v] layer\n    turn right (7) degrees\nend\n\n@Boxes\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [coins v] to [0]\n\nwhen I receive [green flag v]\nhide\npoint in direction (90)\nset [coins v] to [0]\nset [x v] to [0]\nset [tick v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nClone at [705] [366]\nClone at [1815] [366]\nset [x v] to [-99999]\n\nwhen flag clicked\nforever\n    repeat (85)\n        change [x v] by (2)\n    end\n    wait (0.03) seconds\n    repeat (85)\n        change [x v] by (-2)\n    end\n    wait (0.03) seconds\nend\n\nwhen I start as a clone\nforever\n    repeat (85)\n        change [x v] by (2)\n    end\n    wait (0.03) seconds\n    repeat (85)\n        change [x v] by (-2)\n    end\n    wait (0.03) seconds\nend\n\n@assets\n\nwhen flag clicked\nforever\n    set drag mode [draggable v]\n    hide\nend\n\n@Transform back\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine position (x) (y)\nset [ghost v] effect to (0)\ngo to [back v] layer\ngo [forward v] ((id) - (-10)) layers\nswitch costume to (id)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine platfom (xpos) (ypos) (id)\nset [id v] to (id)\nset [x v] to (xpos)\nset [y v] to (ypos)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I start as a clone\nhide\n\nwhen I receive [setup v]\nclear graphic effects\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (level 0 0 v)\nplatfom [0] [0] [1]\nplatfom [450] [400] [2]\nplatfom [1130] [400] [3]\nplatfom ((1130) + (450)) [400] [4]\nplatfom [2220] [400] [5]\nplatfom [2670] [0] [6]\nplatfom [3150] [0] [7]\nplatfom [3600] [0] [8]\nplatfom [4050] [0] [9]\nplatfom [4500] [0] [10]\nplatfom [5200] [0] [11]\nset [x v] to [100000000000000000000]\nset [y v] to [0]\n\n@Transform\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine position (x) (y)\nset [ghost v] effect to (0)\ngo to [back v] layer\ngo [forward v] ((id) - (-10)) layers\nswitch costume to (id)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine platfom (xpos) (ypos) (id)\nset [id v] to (id)\nset [x v] to (xpos)\nset [y v] to (ypos)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I start as a clone\nhide\n\nwhen I receive [setup v]\nclear graphic effects\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (level 0 0 v)\nplatfom [0] [0] [1]\nplatfom [450] [400] [2]\nplatfom [1130] [400] [3]\nplatfom ((1130) + (450)) [400] [4]\nplatfom [2220] [400] [5]\nplatfom [2670] [0] [6]\nplatfom [3150] [0] [7]\nplatfom [3600] [0] [8]\nplatfom [4050] [0] [9]\nplatfom [4500] [0] [10]\nset [x v] to [100000000000000000000]\nset [y v] to [0]\n\n@ladders\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine position (x) (y)\nset [ghost v] effect to (0)\ngo to [back v] layer\ngo [forward v] ((id) - (-10)) layers\nswitch costume to (id)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine platfom (xpos) (ypos) (id)\nset [id v] to (id)\nset [x v] to (xpos)\nset [y v] to (ypos)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I start as a clone\nhide\n\nwhen I receive [setup v]\nclear graphic effects\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (level 0 0 v)\nplatfom [0] [0] [1]\nplatfom [450] [400] [2]\nplatfom [1130] [400] [3]\nplatfom ((1130) + (450)) [400] [4]\nplatfom [2220] [400] [5]\nplatfom [2670] [0] [6]\nplatfom [3150] [0] [7]\nplatfom [3600] [0] [8]\nplatfom [4050] [0] [9]\nplatfom [4500] [0] [10]\nplatfom [5200] [0] [11]\nplatfom [6200] [0] [13]\nset [x v] to [100000000000000000000]\nset [y v] to [0]\n\n@Danger\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine position (x) (y)\nset [ghost v] effect to (0)\ngo to [back v] layer\ngo [forward v] ((id) - (-10)) layers\nswitch costume to (id)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine platfom (xpos) (ypos) (id)\nset [id v] to (id)\nset [x v] to (xpos)\nset [y v] to (ypos)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I start as a clone\nhide\n\nwhen I receive [setup v]\nclear graphic effects\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (level 0 0 v)\nplatfom [0] [0] [1]\nplatfom [450] [400] [2]\nplatfom [1130] [400] [3]\nplatfom ((1130) + (450)) [400] [4]\nplatfom [2220] [370] [5]\nplatfom [2670] [0] [6]\nplatfom [3150] [0] [7]\nplatfom [3600] [0] [8]\nplatfom [4050] [0] [9]\nplatfom [4500] [0] [10]\nplatfom [5200] [0] [11]\nplatfom [5700] [0] [12]\nset [x v] to [100000000000000000000]\nset [y v] to [0]\n\n@thumbnail\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    hide\nend\n\n@Water\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine position (x) (y)\ngo to [back v] layer\nswitch costume to (id)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine platfom (xpos) (ypos) (id)\nset [id v] to (id)\nset [x v] to (xpos)\nset [y v] to (ypos)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I start as a clone\nhide\n\nwhen I receive [setup v]\nclear graphic effects\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (level 0 0 v)\nplatfom [0] [0] [1]\nplatfom [450] [400] [2]\nplatfom [1130] [400] [3]\nplatfom ((1130) + (450)) [400] [4]\nplatfom [2220] [400] [5]\nplatfom [2670] [0] [6]\nplatfom [3150] [0] [7]\nplatfom [3600] [0] [8]\nplatfom [4050] [0] [9]\nplatfom [4500] [0] [10]\nplatfom [5200] [0] [11]\nset [x v] to [100000000000000000000]\nset [y v] to [0]\n\n