Dungeon Journey - A platformer [Mobile friendly]

Instructions: Cringe instructions fixed in 2022

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop2 v)\nforever\n    play sound [545395_Midnight v] until done\nend\n\nwhen flag clicked\nwait until <([costume # v] of [ground v]) = [10]>\nswitch backdrop to (backdrop3 v)\n\n@Player\n\nwhen flag clicked\nbroadcast (Restart v)\nswitch costume to (costume1 v)\nshow\nset [x v] to [0]\nset [y v] to [0]\nforever\n    go to [front v] layer\n    if <touching (ladders v)?> then\n        set [y v] to [0]\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            change [y v] by (8)\n        end\n        if <<key (down arrow v) pressed?> or <<mouse down?> and <(y position) > (mouse y)>>> then\n            change [y v] by (-8)\n        end\n        if <not <touching (ladders v)?>> then\n            set [y v] to [15]\n        end\n    else\n        change [y v] by (-1)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x v] by (-1)\n        point in direction (-90)\n    end\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(x position) < (mouse x)>>> then\n        change [x v] by (1)\n        point in direction (90)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [y v] to [15]\n            if <([abs v] of (x) ) = (x)> then\n                set [x v] to [-10]\n            else\n                set [x v] to [10]\n            end\n        else\n            set [x v] to [0]\n        end\n    end\n    change y by (y)\n    if <touching (ground v)?> then\n        change y by ((y) - ((y) * (2)))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> and <touching (ground v)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\nend\n\nwhen flag clicked\nshow\nforever\n    if <<(x position) > [230]> and <touching (_edge_ v)?>> then\n        broadcast (Next level v)\n    end\n    if <<touching (spikes v)?> or <<touching (lava v)?> or <<(y position) < [-170]> and <touching (_edge_ v)?>>>> then\n        broadcast (Restart v)\n    end\n    if <touching (bounce v)?> then\n        set [y v] to [20]\n    end\nend\n\nwhen [r v] key pressed\nbroadcast (Restart v)\n\nwhen I receive [next level v]\nbroadcast (Restart v)\n\nwhen I receive [restart v]\ngo to x: (-220) y: (-30)\nset [y v] to [0]\n\nwhen flag clicked\nforever\n    if <touching (water v)?> then\n        broadcast (Restart v)\n    end\nend\n\n@Light2\n\nwhen flag clicked\nforever\n    Fix\nend\n\ndefine Fix\ngo to (player v)\ngo to [back v] layer\nshow\nif <touching (player v)?> then\n    set [ghost v] effect to (0)\nelse\n    set [ghost v] effect to (100)\nend\n\nwhen flag clicked\nforever\n    set size to (50) %\n    repeat (10)\n        change size by (1)\n    end\n    wait (0.5) seconds\n    repeat (10)\n        change size by (-1)\n    end\nend\n\nwhen backdrop switches to [backdrop10 v]\nforever\n    hide\nend\n\n@Trail thingy\n\nwhen flag clicked\nforever\n    hide\n    go to (player v)\n    create clone of (_myself_ v)\n    go to [front v] layer\n    if <touching (ladders v)?> then\n        go [forward v] (1) layers\n    end\n    if <touching (stick man v)?> then\n        go [forward v] (1) layers\n    end\nend\n\nwhen I start as a clone\nshow\nclear graphic effects\ngo to [back v] layer\ngo [forward v] (1) layers\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\n@Ground\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\n@Stick Man\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    switch costume to ([costume # v] of [ground v])\n    go to [back v] layer\nend\n\n@Spikes\n\nwhen flag clicked\nforever\n    switch costume to ([costume # v] of [ground v])\n    clear graphic effects\nend\n\n@bounce\n\nwhen flag clicked\nwait until <([costume # v] of [ground v]) = [3]>\ngo to x: (-125) y: (-117)\ncreate clone of (_myself_ v)\nwait until <([costume # v] of [ground v]) = [7]>\ngo to x: (-125) y: (-117)\ncreate clone of (_myself_ v)\nwait until <([costume # v] of [ground v]) = [10]>\ngo to x: (-125) y: (-85)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\ngo to [back v] layer\ngo [forward v] (1) layers\nforever\n    show\n    if <touching (player v)?> then\n        set [y v] to [20]\n        switch costume to (costume1 v)\n        repeat (2)\n            next costume\n        end\n        repeat (2)\n            switch costume to ((costume [number v]) - (1))\n        end\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [next level v]\ndelete this clone\n\nwhen flag clicked\ndelete this clone\n\n@Water\n\nwhen flag clicked\ngo to [back v] layer\ngo to x: (0) y: (0)\nset [tide v] to [0]\nforever\n    repeat (10)\n        change [tide v] by (-0.1)\n    end\n    repeat (20)\n        change [tide v] by (0.1)\n    end\n    repeat (10)\n        change [tide v] by (-0.1)\n    end\nend\n\nwhen flag clicked\nforever\n    go to [back v] layer\n    switch costume to ([costume # v] of [ground v])\n    set [ghost v] effect to (50)\n    change y by (tide)\nend\n\ngo [backward v] (1) layers\n\n@LADDERS\n\nwhen flag clicked\nforever\n    switch costume to ([costume # v] of [ground v])\n    clear graphic effects\n    go to [back v] layer\nend\n\n@Sprite1\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (100)\nset size to (120) %\nforever\n    reset timer\nend\n\nwhen [timer v] > (0.03)\nset size to (120) %\nrepeat (20)\n    go to [front v] layer\n    show\n    change size by (-1)\n    change [ghost v] effect by (-5)\nend\n\n