local side = "back"
while true do
os.pullEvent("redstone")
if redstone.getInput(side) then
for i=1,16 do
if turtle.getItemCount(i)>1 then
turtle.select(i)
turtle.place()
break
end
end
end
end
Change the "back" to whatever side you will be applying a redstone signal to deploy. This doesn't use any server resources unless it is triggered, unlike other systems that constantly probe the input.
Tell me if I got anything wrong. I wrote it on my iPhone in Tapatalk.