Like mentioned earlier, if it's still in the truck and it still runs then do a compression check before pulling it! Otherwise, if good compression and comes with the computer I'd say go for it!
Does it come with all the bolt on stuff like alternator, steering pump, A/C pump, etc? If so...