Beyond script there isn't a whole lot— nlocktime lets you make transactions which cannot be mined until a specified time in the future. This lets you build protocols that have "refunds", so that they don't cause funds to get stuck if a participant walks away.
But even just using a few features of script and nlocktime is exceptionally powerful:
Securely and privately trading Bitcoins for other cryptocoins (including Bitcoins): https://bitcointalk.org/index.php?topic=321228.0
or
Buying computationally verifiable information in an environment of mutual distrust: https://en.bitcoin.it/wiki/User:Gmaxwell/why_hash_locked
One of the most important things script does is allows you to produce transactions which are bound into more complex protocols occurring outside of Bitcoin in a secure way. This allows you to extend Bitcoin's trustless decentralization into things which aren't part of Bitcoin proper.
I highly recommend watching this talk by Mike Hearn, as well as reading the links in NhanH's comment: https://www.youtube.com/watch?v=mD4L7xDNCmA
Interestingly, I believe that this is one of the case where "lazy programmers make best programmers": instead of implementing the transaction system, Satoshi decides that he couldn't be bothered and just put in a scripting system instead (I have no citation for this, and can't claim for certain that this is the case, it was just something I read a while ago).
However, due to security concerns, I think that most of the scripting ability is currently disabled.
Due to the ponzi-like setup, the people who paid 4 million dollars for "MasterCoin" are very, very vocal when it comes to promoting it.
https://blockchain.info/address/1EXoDusjGwvnjZUyKkxZ4UHEf77z...
I wonder if a future Bitcoin offshoot might even use a more general standard language for in-ledger transactions. Javascript? LLVM?
Surely there'd be a number of technical and economic challenges to be overcome, but Bitcoin itself is an example of how a good-enough solution may be hiding in plain sight.
By not having looping or recursion script naturally gets an operation limit by virtue of having a size limit, and this is _relatively_ easy to get right between implementations. (Though, so far several of the alt implementations have gotten it wrong).
There is nothing that indicates undefined behavior of LLVM would lead to a fork in the blockchain.
If undefined behavior could make some nodes accept a transaction while others reject it the state would become inconsistent and potentially mutually exclusive. From one currency, you'd have two and every coin could be spent twice.
"This is a list of all Script words (commands/functions). Some of the more complicated opcodes are disabled out of concern that the client might have a bug in their implementation; if a transaction using such an opcode were to be included in the chain any fix would risk forking the chain."
Common wallet software just uses templates to create and decide which scripts are relevant to them— but the network itself absolutely does validate them.
But I can see it working with some adjustments: make your contractually obliged lawyer part of the transaction and include his fees. This way he can't grab all the money for himself and your usurpers can't get to your money that easy.
I know, I'm pessimistic.
Bitcoin has a scripting language which enables more than a “send money from X to Y” transaction. A Bitcoin transaction can require M of N parties to approve a transaction. Imagine Wills that automatically unlock when most of the heirs agree that their parent has passed, no lawyer required. Or business accounts that require two of any three trusted signatures to approve an expenditure. Or wire escrows that go through when any arbiter agrees that the supplier sent the goods to the buyer. Or wallets that are socially secured by your friends and family. Or an allowance account accessible by the child and either of two parents. Or a crowdfunding of a Kickstarter project that pays out on milestones, based on the majority of the backers approving the next payment. The escrow in each case can be locked so that the arbiters can’t take the money themselves – only approve or deny the transaction.
The scripting language can also unlock transactions based on other parameters. Unlocking them over time can enable automatic mortgage, trust, and allowance payouts. Unlocking them on guessable numbers creates a lottery auditable by third parties. One can even design smart property – for example, a car’s electronic key so that when and only when a payment is made by the car buyer to the seller, the seller’s car key stops working and the buyer’s car key (or mobile phone) starts the car. Imagine your self-driving car negotiating traffic, paying fractional bitcoin to neighboring cars in exchange for priority.
I've been following Bitcoin since the beginning and had no idea it supported "transaction approved only when M of N participants agree."
How do you feel about those scenarios? Also, does anyone know of other little-known Bitcoin functionality?