Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --20-Sided Die in Computercraft
- --TheCountChuckula
- math.randomseed(os.time())
- m = peripheral.wrap("top")
- while true do
- os.pullEvent(monitor_touch)
- for r = 1, 5 do
- for x = 1, 2 do
- local effect = math.random(20)
- m.setCursorPos(1,x)
- m.clear()
- m.setTextScale(3)
- if effect < 10 then
- m.write("0")
- m.write(effect)
- else
- m.write(effect)
- end
- sleep(.05)
- end
- end
- local rint = math.random(20)
- m.setCursorPos(1,1)
- m.clear()
- m.setTextScale(3)
- if rint < 10 then
- m.write("0")
- m.write(rint)
- else
- m.write(rint)
- end
- m.setCursorPos(1,2)
- m.write("^^")
- end
Advertisement
Add Comment
Please, Sign In to add comment