Lava Platformer 2 (Caves update inbound!!)
@Stage\n\nwhen flag clicked\nforever\n    switch costume to (lvl)\nend\n\nwhen I receive [next backdrop v]\nnext backdrop\n\nwhen flag clicked\nif <(backdrop [number v]) = []> then\n    stop [other scripts in sprite v]\nend\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\ndefine block name <boolean> (number or text) <boolean>\n\nwhen backdrop switches to [who v]\nbroadcast (BLUD v)\n\nwhen backdrop switches to [back2 v]\n\n@player\n\ndefine delete (i)\nrepeat (3)\n    delete ((i) + (1)) of [xy trail v]\nend\n\ndefine render trail\nset [_i v] to ((length of [xy trail v]) - (3))\nset pen size to (item ((_i) + (3)) of [xy trail v])\nset pen color to (#ff5400)\nset [olx v] to (x position)\nset [oly v] to (y position)\nrepeat ((length of [xy trail v]) / (3))\n    pen down\n    go to x: (item ((_i) + (1)) of [xy trail v]) y: (item ((_i) + (2)) of [xy trail v])\n    replace item ((_i) + (3)) of [xy trail v] with ((item ((_i) + (3)) of [xy trail v]) - ((#trail size) / (20)))\n    if <(item ((_i) + (3)) of [xy trail v]) < [1]> then\n        delete (_i)\n    end\n    change pen size by (() - ((#trail size) / (20)))\n    change [_i v] by (-3)\n    pen up\nend\npen up\ngo to x: (olx) y: (oly)\n\ndefine physics <<> <>> <^>\npoint in direction (((<<> * (-1)) + <>>) + (<((<<> * (-1)) + <>>) = [0]> * ((sx) / ([abs v] of (sx) ))))\nchange [sx v] by (((<<> * (-1)) + <>>) - ((sx) * (0.1)))\nchange [sy v] by (-0.5)\nchange y by (sy)\nif <touching (level v)?> then\n    change y by ((sy) * (-1))\n    set [sy v] to (<^> * (8))\nend\nif <touching (sprite3 v)?> then\n    set [sy v] to ((17) + (<^> * (6)))\nend\nchange x by (sx)\nrepeat (5)\n    if <touching (level v)?> then\n        change y by (1)\n    end\nend\nif <touching (level v)?> then\n    change x by (((sx) * <touching (level v)?>) * (-1))\n    change y by (-5)\n    set [sx v] to (((<^> * (-8)) * ((sx) / ([abs v] of (sx) ))) + (<not <^>> * (sx)))\n    set [sy v] to ((<^> * (8)) + (<not <^>> * (sy)))\nend\nif <<touching (spikes and lava v)?> or <(y position) < [-177]>> then\n    setup\nend\nif <(x position) > [233]> then\n    change [lvl v] by (1)\n    setup\nend\nif <[177] < (y position)> then\n    set [sy v] to ((() - (sy)) / (5))\nend\nadd (x position) to [xy trail v]\nadd (y position) to [xy trail v]\nadd (#trail size) to [xy trail v]\n\nwhen flag clicked\n\ndefine setup\nbroadcast (reset dust v)\ndelete all of [xy trail v]\nset [sx v] to [0]\nset [sy v] to [0]\ngo to x: (-219) y: (2)\nbroadcast (transaction v)\n\nwhen I receive [next lvl v]\nchange [lvl v] by (1)\nsetup\n\nwhen I receive [begin  v]\nset [#trail size v] to [30]\nsetup\ndelete all of [xy trail v]\nset [lvl v] to [1]\nforever\n    erase all\n    physics <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>> <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>>\n    render trail\nend\n\n@Thumbnail\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\n    go to [front v] layer\nend\n\nswitch backdrop to (backdrop2 v)\nset size to (90) %\n\n@spikes and lava\n\nwhen flag clicked\nforever\n    switch costume to (lvl)\nend\n\n@level\n\nwhen flag clicked\nforever\n    switch costume to (lvl)\nend\n\nforever\n\n\n\nstart sound [Xaf - Nebula v]\n\nwhen flag clicked\nif <touching (sprite2 v)?> then\n    play sound [GMod Zombie Survival v] until done\nelse\n    forever\n        play sound [Vexento - Return Of The Raver v] until done\n    end\nend\n\nrepeat (10)\n\nwhen backdrop switches to [backdrop16 v]\nbroadcast (rolllingggg v)\n\nwhen flag clicked\n\n@Sprite6\n\nwhen flag clicked\ngo to x: (-9) y: (-33)\ngo to [front v] layer\nshow\n\nwhen flag clicked\nforever\n    point in direction ((([sin v] of ((timer) * (150)) ) * (10)) + (90))\nend\n\nset y to (0)\n\nwhen this sprite clicked\nbroadcast (Begin  v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (startbutton2 v)\n    else\n        switch costume to (startbutton v)\n    end\nend\n\nwhen I receive [stop v]\nhide\n\n@Sprite1\n\nwhen I receive [begin  v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\n@transaction\n\nwhen I receive [transaction v]\ngo to [front v] layer\nset [ghost v] effect to (0)\nnext costume\nwait (0.5) seconds\nrepeat (4)\n    change [ghost v] effect by (25)\nend\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (0)\nwait (0.1) seconds\nrepeat (4)\n    change [ghost v] effect by (25)\nend\n\n@Sprite2\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [who v]\n\nhide\n\nwhen flag clicked\n\n    play sound [GMod Zombie Survival v] until done\nelse\n    forever\n        play sound [Vexento - Return Of The Raver v] until done\n    end\nend\n\nwhen I receive [blud v]\nshow\nforever\n    if <touching (player v)?> then\n        broadcast (DEATH v)\n    end\nend\n\n@Sprite3\n\nwhen I receive [death v]\nforever\n    go to [front v] layer\n    show\n    broadcast (CHANGE SOUND v)\nend\n\nwhen flag clicked\nhide\n\nshow\n\n@Sprite4\n\nwhen flag clicked\nhide\n\nwhen I receive [roll down hill v]\nforever\n    if <touching (player v)?> then\n        broadcast (he ded v)\n    end\nend\n\nwait (1) seconds\n\nwhen I receive [rolllingggg v]\nrepeat until <([costume # v] of [level v]) = [17]>\n    show\n    go to x: (36) y: (28)\n    glide (2) secs to x: (-168) y: (-35)\n    hide\n    go to x: (36) y: (28)\n    wait (2) seconds\n    show\nend\n\nwhen I receive [rolllingggg v]\nrepeat until <([costume # v] of [level v]) = [17]>\n    wait (0.01) seconds\n    next costume\nend\n\nwait (1) seconds\n\nwhen I receive [rolllingggg v]\nif <([costume # v] of [level v]) = [17]> then\n    hide\nend\n\n@Sprite5\n\nwhen I receive [he ded v]\n\nforever\n    go to [front v] layer\n    show\n    broadcast (CHANGE SOUND v)\nend\n\nwhen flag clicked\n\nhide\n\nshow\n\n@skip\n\nwhen flag clicked\nforever\n    click\n    if <touching (mouse-pointer v)?> then\n        Poke velo [0.8] size [140] speed [5]\n        set [touching skip button v] to [1]\n        if <(mouse check) = [1]> then\n            set size to (50) %\n            if <(lvl) < [9]> then\n                broadcast (NEXT LVL v)\n            end\n        end\n    end\n    if <not <touching (mouse-pointer v)?>> then\n        set [touching skip button v] to [0]\n        Poke velo [0.8] size [110] speed [5]\n    end\n    change size by (_poke)\nend\n\ndefine Poke velo (v) size (s) speed (sp)\nset [_poke v] to (((_poke) * (v)) + (((s) - (size)) / (sp)))\n\ndefine click\nset [old check mouse v] to (mouse check)\nset [mouse check v] to ((<(old check mouse) > [0]> * <mouse down?>) + <mouse down?>)\n\n
WARNING to those people thinking why is there a "fake loading screen" Well its because when you start he game the charactar spawns higher than the platform and i want to make sure no body is using that."Oh why didn't you just mike the charactor spawn lower" Because it would send the charactor through the ground..