Xencehone! - A Scrolling Platformer!


@Stage\n\nwhen flag clicked\nforever\n    play sound [Vexento - Tevo \(Original Mix\).mp3 v] until done\nend\n\n@Sprite1\n\n@Sprite2\n\n@Sprite3\n\n@Sprite4\n\n@Blank\n\n@Assets\n\nwhen flag clicked\nforever\n    switch costume to (costume6 v)\n    go to [back v] layer\n    go [backward v] (1) layers\n    hide\nend\n\nwhen flag clicked\nforever\n    set drag mode [not draggable v]\n    set [game count v] to [0]\n    set [game count v] to [0]\n    hide variable [game count v]\n    set [game count v] to [-1]\n    set [game count v] to [1]\nend\n\nwhen flag clicked\nhide\nforever\n    set [setup scrolling x v] to (((2) / ((480) - (3))) + (380))\n    set [setup scrolling y v] to (((2) / ((480) - (3))) + (380))\n    wait (1) seconds\n    set drag mode [not draggable v]\n    if <(username) = [Uvbeach]> then\n        broadcast (Edit mode? v)\n    end\nend\n\n@Player\n\nwhen flag clicked\nbroadcast (Green Flag v) and wait\nbroadcast (Play Game v) and wait\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\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        Start\n        broadcast (Tick v) and wait\n    end\n    if <(EXIT) = [win]> then\n        Wining\n    else\n        Dieing\n    end\nend\n\ndefine Game On\nset [y v] to [0]\nset [x v] to [0]\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset [ghost v] effect to (0)\nset size to (100) %\nshow\n\ndefine Start\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    switch costume to (left v)\n    change [sx v] by (-2)\nelse\n    if <not <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n        if <not <key (up arrow v) pressed?>> then\n            switch costume to (normal left v)\n        end\n    end\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    change [sx v] by (2)\n    switch costume to (right v)\nelse\n    if <not <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n        if <not <key (up arrow v) pressed?>> then\n            switch costume to (normal right v)\n        end\n    end\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    Change x by (round (sx))\n    Moving platformers x (round (sx))\n    Lift x (round (sx))\nend\nif <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n    if <(in air) < [4]> then\n        switch costume to (normal up v)\n        set [sy v] to [19]\n    end\nend\nif <(sy) > [-20]> then\n    change [sy v] by (-2)\nend\nChange y by (sy)\nMoving platformer sy (sy)\nLift (sy)\nDie\nset [scroll x v] to (x)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\n\ndefine Change 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 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    if <key (up arrow v) pressed?> then\n        if <(sx) > [0]> then\n            set [sx v] to [-16]\n        else\n            set [sx v] to [16]\n        end\n        set [in air v] to [0]\n    else\n        set [sx v] to [0]\n    end\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 Dieing\nset [exit v] to []\nrepeat (5)\n    hide\n    wait (.1) seconds\n    show\n    wait (0.1) seconds\nend\nhide\nwait (0.5) seconds\n\ndefine Die\nif <touching (danger v)?> then\n    set [exit v] to [die]\nend\n\ndefine Wining\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 (danger  v)?> then\n        set [exit v] to [Die]\n        Dieing\n    end\nend\n\nwhen flag clicked\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 (platforms v)?> then\n            set [in air v] to [0]\n        end\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\nend\n\nwhen flag clicked\nforever\n    if <touching (lava v)?> then\n        set [exit v] to [Die]\n        Dieing\n    end\nend\n\ndefine Moving platformers x (sx)\nchange [x v] by (sx)\nPosition\nif <touching (moving x platformers v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (moving x platformers v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <key (up arrow v) pressed?> then\n        if <(sx) > [0]> then\n            set [sx v] to [-16]\n        else\n            set [sx v] to [16]\n        end\n        set [in air v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <touching (moving x platformers 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 Moving platformer sy (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (moving x platformers 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 Lift (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (moving y platformers 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 Lift x (sx)\nchange [x v] by (sx)\nPosition\nif <touching (moving y platformers v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (moving y platformers v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <key (up arrow v) pressed?> then\n        if <(sx) > [0]> then\n            set [sx v] to [-16]\n        else\n            set [sx v] to [16]\n        end\n        set [in air v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <touching (moving y platformers 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\nwhen flag clicked\nforever\n    if <touching (lava v)?> then\n        set [exit v] to [Die]\n        Dieing\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (danger  v)?> then\n        set [exit v] to [Die]\n        Dieing\n    end\nend\n\nwhen flag clicked\nforever\n    set drag mode [not draggable v]\nend\n\n@Platforms art\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    switch costume to (costume 1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\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\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\nwhen I start as a clone\nforever\n    go to [back v] layer\nend\n\n@Wait for moving pt\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    switch costume to (costume 1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\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\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\nwhen I start as a clone\nforever\n    go to [back v] layer\nend\n\n@Moving y platformers\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    switch costume to (costume 1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\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\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I start as a clone\ngo to [front v] layer\nforever\n    repeat (250)\n        change [y v] by (1)\n    end\n    wait (0.1) seconds\n    repeat (250)\n        change [y v] by (-1)\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    repeat (250)\n        change [y v] by (1)\n    end\n    repeat (250)\n        change [y v] by (-1)\n    end\nend\n\n@Jump Boost\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    switch costume to (costume 1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\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\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\n@moving Platforms art\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    switch costume to (costume 1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\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\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\nwhen I start as a clone\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\nhide\nforever\n    set [setup scrolling x v] to (((2) / ((480) - (3))) + (380))\n    set [setup scrolling y v] to (((2) / ((480) - (3))) + (380))\n    wait (1) seconds\n    set drag mode [not draggable v]\n    if <(username) = [Uvbeach]> then\n        broadcast (Edit mode? v)\n    end\nend\n\n@Lava\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    switch costume to (costume 1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\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\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I start as a clone\ngo to [back v] layer\nforever\n    repeat (10)\n        change [y v] by (1)\n    end\n    wait (0.1) seconds\n    repeat (10)\n        change [y v] by (-1)\n    end\nend\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    repeat (10)\n        change [y v] by (1)\n    end\n    wait (0.1) seconds\n    repeat (10)\n        change [y v] by (-1)\n    end\nend\n\n@Moving X platformers\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    switch costume to (costume 1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\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\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I start as a clone\ngo to [front v] layer\nforever\n    repeat (400)\n        change [x v] by (1)\n    end\n    wait (0.1) seconds\n    repeat (400)\n        change [x v] by (-1)\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    repeat (400)\n        change [x v] by (1)\n    end\n    repeat (400)\n        change [x v] by (-1)\n    end\nend\n\n@Danger\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    switch costume to (costume 1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\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\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\ngo to [back v] layer\n\n@Platforms\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    switch costume to (costume 1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\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\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\n@Setup\n\nwhen flag clicked\nhide\nforever\n    set [setup scrolling x v] to (((2) / ((480) - (3))) + (380))\n    set [setup scrolling y v] to (((2) / ((480) - (3))) + (380))\n    wait (1) seconds\n    set drag mode [not draggable v]\n    if <(username) = [Uvbeach]> then\n        broadcast (Edit mode? v)\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\nhide\nforever\n    go to [front v] layer\nend\n\n