Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local colors = "1234567890abcdef"
- local tArgs = {...}
- if #tArgs ~= 2 then
- print("Usage: "..shell.getRunningProgram().." <path> <characters>")
- return
- end
- local file = tArgs[1]
- local loop = tonumber(tArgs[2])
- if not fs.exists(file) then
- local open = fs.open(file, "w")
- open.close()
- end
- for i = 1, loop do
- local stat = math.random(1,16)
- local open = fs.open(file, "a")
- local rand = math.random(1,#colors)
- local char = colors:sub(rand, rand)
- if stat == 5 then
- open.writeLine(char)
- open.close()
- else
- open.write(char)
- open.close()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement