Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- args = { ... }
- side = args[1]
- if not peripheral.isPresent(side) or peripheral.getType(side) ~= "monitor" then print("Monitor is not attached at "..side.." side!") return end
- local mon = peripheral.wrap(side)
- local monWidth, monHeight, termWidth, termHeight, mx, my, tx, ty
- while true do
- termWidth, termHeight = term.getSize()
- monWidth, monHeight = mon.getSize()
- mx = math.floor(math.random(1,monWidth))
- my = math.floor(math.random(1,monHeight))
- tx = math.floor(math.random(1,termWidth))
- ty = math.floor(math.random(1,termHeight))
- mon.setCursorPos(mx, my)
- term.setCursorPos(tx, ty)
- mon.write("LOL")
- term.write("HAX")
- sleep(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment