Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local monitor = peripheral.find("monitor")
- term.redirect(monitor)
- monitor.setTextScale(0.5)
- local termWidth, termHeight = term.getSize()
- local value = 0
- local time = 0
- while true do
- value = value + 0.1
- local sin = math.sin(value)
- local sinval = 50 * sin
- sinval = 50 + sinval
- scaledHeight = termHeight / 100
- time = time + 1
- if time > termWidth then
- time = 0
- term.setBackgroundColor(colors.black)
- term.clear()
- end
- local x = time
- local y = sinval * scaledHeight
- paintutils.drawPixel(x, y, colors.white)
- sleep(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement