Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p = peripheral.wrap("bottom")
- m = peripheral.wrap("monitor_4")
- x,y = m.getSize()
- while true do
- if p.getStackInSlot(1) ~= nil then
- name = p.getStackInSlot(1).destination
- if string.len(name) > x then
- name = string.sub(name,1,x-1)
- end
- m.clear()
- m.setTextScale(1)
- m.setCursorPos((x-string.len(name))/2,y/2)
- m.write(name)
- sleep(1)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement