Complete but untested Fabric script