Pixel Joy - A Platformer

Instructions: Use arrows to move left and right\nUse up arrow to jump\nUse down to get down of semi solid platiforms\n\nWHAT!!!???? 215 loves and 164favs???? \nI'm currently working on a ""sequel"" so i think no more updates (even tho they were none)

@Stage\n\n@Tiles\n\nwhen flag clicked\nshow variable [diamond v]\nset [world width v] to [125]\nset [world height v] to [50]\nset [screen width v] to [16]\nset [screen height v] to [13]\nset [cam x v] to [0]\nset [cam y v] to [0]\nWorld Setup\nSetup\n\nwhen I start as a clone\nshow\nforever\n    switch costume to (item ((((tile x) * (World Height)) + (tile y)) + (1)) of [world v])\n    set size to (1000) %\n    go to x: ((((tile x) - ((Screen width) / (2))) * (32)) - (cam x)) y: ((((tile y) - ((Screen height) / (2))) * (32)) - (cam y))\n    set size to (200) %\n    change [tile x v] by (((Screen width) * (-1)) * (((<((((tile x) - ((Screen width) / (2))) * (32)) - (cam x)) > [0]> * (2)) - (1)) * <([abs v] of ((((tile x) - ((Screen width) / (2))) * (32)) - (cam x)) ) > ((Screen width) * (16))>))\n    change [tile y v] by (((Screen height) * (-1)) * (((<((((tile y) - ((Screen height) / (2))) * (32)) - (cam y)) > [0]> * (2)) - (1)) * <([abs v] of ((((tile y) - ((Screen height) / (2))) * (32)) - (cam y)) ) > ((Screen height) * (16))>))\nend\n\ndefine Setup\nset [tile x v] to [0]\nrepeat (Screen width)\n    set [tile y v] to [0]\n    repeat (Screen height)\n        create clone of (_myself_ v)\n        change [tile y v] by (1)\n    end\n    change [tile x v] by (1)\nend\n\ndefine World Setup\ndelete all of [world v]\nrepeat (8)\n    repeat (5)\n        add [3] to [world v]\n    end\n    add [2] to [world v]\n    repeat ((World Height) - (6))\n        add [1] to [world v]\n    end\nend\nrepeat ((World Width) - (8))\n    repeat (World Height)\n        add [1] to [world v]\n    end\nend\n\nwhen I start as a clone\nforever\n    if <[diamond animation v] contains (item ((((tile x) * (World Height)) + (tile y)) + (1)) of [world v])?> then\n        replace item ((((tile x) * (World Height)) + (tile y)) + (1)) of [world v] with (Diamond animation index)\n    end\nend\n\nwhen flag clicked\nset [diamond animation index v] to [13]\nforever\n    set [diamond animation index v] to [13]\n    wait (0.02) seconds\n    repeat ((length of [diamond animation v]) - (1))\n        change [diamond animation index v] by (1)\n        wait (0.02) seconds\n    end\nend\n\nadd (Level Save) to [levels v]\n\n@Player\n\ndefine 4 Tiles (width) (height)\nset [collision v] to [0]\nset [x index v] to ((width) / (-2))\nrepeat (2)\n    set [y index v] to ((height) / (-2))\n    repeat (2)\n        if <[collision tiles v] contains (item ((1) + (((round ((((x) + (x index)) + ((Screen width) * (16))) / (32))) * (World Height)) + (round ((((y) + (y index)) + ((Screen height) * (16))) / (32))))) of [world v])?> then\n            set [collision v] to [1]\n            stop [this script v]\n        else\n            if <[downward collision tiles v] contains (item ((1) + (((round ((((x) + (x index)) + ((Screen width) * (16))) / (32))) * (World Height)) + (round ((((y) + (y index)) + ((Screen height) * (16))) / (32))))) of [world v])?> then\n                if <<[0] < (y vel)> or <(y index) = ((height) / (-2))>> then\n                    if <key (down arrow v) pressed?> then\n                        set [collision v] to [0]\n                    else\n                        set [collision v] to [2]\n                    end\n                end\n                if <<[0] < (y vel)> or <(y index) = ((height) / (2))>> then\n                    set [collision v] to [0]\n                    stop [this script v]\n                end\n            end\n        end\n        if <[collectibles v] contains (item ((1) + (((round ((((x) + (x index)) + ((Screen width) * (16))) / (32))) * (World Height)) + (round ((((y) + (y index)) + ((Screen height) * (16))) / (32))))) of [world v])?> then\n            replace item ((1) + (((round ((((x) + (x index)) + ((Screen width) * (16))) / (32))) * (World Height)) + (round ((((y) + (y index)) + ((Screen height) * (16))) / (32))))) of [world v] with [1]\n            change [diamond v] by (1)\n            start sound [Coin v]\n            broadcast (Coins v)\n        end\n        change [y index v] by (height)\n    end\n    change [x index v] by (width)\nend\n\ndefine X coll\n4 Tiles [24] [24]\nrepeat until <(collision) = [0]>\n    4 Tiles [24] [24]\n    change [x v] by ((<(x vel) > [0]> * (-2)) + (1))\nend\nchange [x v] by ((<(x vel) > [0]> * (2)) + (-1))\n\ndefine Debug collision\nrepeat (6)\n    4 Tiles [24] [24]\n    if <(collision) = [1]> then\n        change [y v] by (1)\n    end\nend\n\ndefine Y vel\n4 Tiles [24] [24]\nrepeat until <(collision) = [0]>\n    4 Tiles [24] [24]\n    change [y v] by ((<(y vel) > [0]> * (-2)) + (1))\nend\nchange [y v] by ((<(y vel) > [0]> * (2)) + (-1))\n\nwhen flag clicked\nSpawn player [-75] [20]\nset [diamond v] to [0]\nforever\n    Gamemode\nend\n\nCreation mode\nSave level to var\n\ndefine Replace Camera\nchange [cam x v] by (((x) - (cam x)) / (6))\nchange [cam y v] by ((((y) + (60)) - (cam y)) / (8))\nif <(cam x) < [0]> then\n    set [cam x v] to [0]\nend\nif <(cam y) < [0]> then\n    set [cam y v] to [0]\nend\nif <(((World Width) * (16)) + ((Screen width) * (32))) < (cam x)> then\n    set [cam x v] to (((World Width) * (16)) + ((Screen width) * (32)))\nend\nif <(((World Height) * (16)) + ((Screen height) * (32))) < (cam y)> then\n    set [cam y v] to (((World Height) * (16)) + ((Screen height) * (32)))\nend\n\ndefine Resfresh player\nif <(y) < [-300]> then\n    Spawn player [-75] [20]\nend\n\ndefine Spawn player (spawn x) (spawn y)\ngo to [front v] layer\nset [level v] to [1]\nset [speed v] to [3]\nset [top speed v] to [10]\nset [x v] to (spawn x)\nset [y v] to (spawn y)\nset [x vel v] to [0]\nset [y vel v] to [0]\n\ndefine Creation mode\nset [x vel v] to ((<key (right arrow v) pressed?> - <key (left arrow v) pressed?>) * (8))\nset [y vel v] to ((<key (up arrow v) pressed?> - <key (down arrow v) pressed?>) * (8))\nchange [x v] by (x vel)\nchange [y v] by (y vel)\nif <mouse down?> then\n    replace item ((1) + (((round ((((mouse x) + (cam x)) + ((Screen width) * (16))) / (32))) * (World Height)) + (round ((((mouse y) + (cam y)) + ((Screen height) * (16))) / (32))))) of [world v] with (hold tile)\nend\nReplace Camera\nset size to (1000) %\ngo to x: ((x) - (cam x)) y: ((y) - (cam y))\nset size to (150) %\n\ndefine Gamemode\nchange [x vel v] by ((speed) * (<key (right arrow v) pressed?> - <key (left arrow v) pressed?>))\nif <([abs v] of (speed) ) > (top speed)> then\n    change [x vel v] by ((speed) * (<key (left arrow v) pressed?> - <key (right arrow v) pressed?>))\nend\nchange [x v] by (x vel)\n4 Tiles [24] [24]\nif <(collision) = [1]> then\n    Debug collision\n    4 Tiles [24] [24]\n    if <(collision) = [1]> then\n        change [y v] by (-6)\n        X coll\n    end\nend\nchange [y v] by (y vel)\n4 Tiles [24] [24]\nif <<(collision) = [1]> or <(collision) = [2]>> then\n    Y vel\n    if <(y vel) < [0]> then\n        set [y vel v] to (<key (up arrow v) pressed?> * (13))\n    else\n        set [y vel v] to [0]\n    end\nelse\n    change [y vel v] by (-1)\nend\nset [x vel v] to ((x vel) / (2))\nReplace Camera\nResfresh player\nset size to (1000) %\ngo to x: ((x) - (cam x)) y: ((y) - (cam y))\nset size to (150) %\nif <([abs v] of (x vel) ) > [1]> then\n    switch costume to (<(x vel) < [0]> + (1))\nend\n\ndefine Save level to var\nset [index v] to [0]\nset [level save v] to []\nrepeat (length of [world v])\n    change [index v] by (1)\n    set [level save v] to (join (Level Save) (item (item (index) of [world v]) of [alphabet v]))\nend\n\ndefine Read Level (level)\ndelete all of [world v]\nset [index v] to [0]\nrepeat (length of (level))\n    change [index v] by (1)\n    add (item # of (letter (index) of (level)) in [alphabet v]) to [world v]\nend\n\nwhen flag clicked\nwait (0) seconds\nRead Level (item (Level) of [levels v])\n\nwhen I receive [next level v]\nRead Level (item (Level) of [levels v])\nSpawn player [-75] [20]\n\n@particles\n\nwhen flag clicked\nset [is clone v] to [0]\nhide\n\ndefine Diamond particles (numbers) (type)\nswitch costume to (type)\nif <(type) = [1]> then\n    repeat (numbers)\n        set [x v] to ([x v] of [player v])\n        set [y v] to ([y v] of [player v])\n        set [y vel v] to (pick random (2) to (10))\n        set [x vel v] to (pick random (-5) to (5))\n        create clone of (_myself_ v)\n    end\nend\nif <(type) = [2]> then\n    repeat (numbers)\n        set [x v] to ([x v] of [player v])\n        set [y v] to ([y v] of [player v])\n        set [y vel v] to (pick random (-2) to (2))\n        set [x vel v] to (([y v] of [player v]) + (pick random (-1) to (1)))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nshow\nset [is clone v] to [1]\nrepeat until <(y) < ((Screen height) * (-32))>\n    set size to (1000) %\n    go to x: ((x) - (cam x)) y: ((y) - (cam y))\n    set size to (100) %\n    change [y vel v] by (-1)\n    change [x v] by (x vel)\n    change [y v] by (y vel)\nend\ndelete this clone\n\nwhen I receive [coins v]\nif <(is clone) = [0]> then\n    Diamond particles [5] [1]\nend\n\n@Goal\n\nwhen flag clicked\nset [x v] to (item (((Level) * (2)) - (1)) of [goal v])\nset [y v] to (item ((Level) * (2)) of [goal v])\nforever\n    set size to (1000) %\n    go to x: ((x) - (cam x)) y: ((y) - (cam y))\n    set size to (200) %\nend\n\nwhen flag clicked\nforever\n    repeat (3)\n        change [y v] by (2)\n        wait (0.01) seconds\n    end\n    repeat (3)\n        change [y v] by (-2)\n        wait (0.01) seconds\n    end\nend\n\nwhen flag clicked\nrepeat ((length of [levels v]) - (1))\n    wait until <touching (player v)?>\n    change [level v] by (1)\n    set [x v] to (item (((Level) * (2)) - (1)) of [goal v])\n    set [y v] to (item ((Level) * (2)) of [goal v])\n    broadcast (Next Level v)\nend\nwait until <touching (player v)?>\nbroadcast (end message v)\n\nset [x v] to [2692]\nset [y v] to [71]\n\n@Win\n\nwhen flag clicked\nhide\n\nwhen I receive [end message v]\nshow\nset [ghost v] effect to (100)\nrepeat (50)\n    go to [front v] layer\n    change [ghost v] effect by (-2)\nend\n\n@Thumbnail\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nset [ghost v] effect to (0)\n\n@Music\n\nwhen flag clicked\nshow variable [diamond v]\nforever\n    play sound [Main song v] until done\n    wait (1) seconds\nend\n\n