Firstly, find the graphics that you want to be your bottomless pits. Make them into walkable combos, and give them the 'Left Statue' attribute.
If you like, you can also give them inherent flag 96, which will stop enemies from walking onto them.
Rip in your Link Falling animation, and make a new Weapon/Misc. sprite using that animation (make sure to set the AFrames and NumSpeed). Keep a note of the ID of the sprite.
Repeat for your Link Drowning In Lava animation (this is reasonably optional, if you don't want lava don't bother with it).
Find your 'Link Falling' and 'Link Drowning' sound effects, add those to the SFX editor, and make a note of their ID numbers too.
Make a transparent combo and give it combotype 'Autowarp A'. Make a note of its ID.
Part two - Configuring the script
Make sure you have all of your scripts in the same file, with import "std.zh" at the top.
Set up the constants at the top of the script with the ID numbers you gathered earlier.
Part three - Applying the script
All screens with your script applied will now change all 'Left Statue' type combos into bottomless pits or lava.
The position of the ffc is where Link will respawn after falling. If you leave the ffc in the top left corner, or set it to be a changer, Link will spawn where he entered the screen.
Arguments:
D0: Whether this screen has pits or lava. 0 for pits, 1 for lava
D1: Whether to warp Link after falling (example: pits that take you to a lower floor in a dungeon)
[*]D2: Damage Link takes from falling, in 16ths of a heart. Default damage is half a heart