First, dig a hole big enough for two an a half king slimes (and fill it with water). Then make a double layer of active stone blocks three to four spaces above the surface of your lake, and hook the blocks up to a lever with some wire. Wire can be placed with a wrench, bought from the mechanic. Then summon the king slime with the slime crown on the opposite to the lever. When the king slime spawns, it will probably try to get you, and when he does, get to the side with the lever. When the king slime tries to swim across, flip the lever, that activates the blocks, so the king slime is trapped on the line of active stone blocks. After that you can kill it any way you want.