Posted 02 February 2017 - 06:24 PM
So i was bored today and wanted to make something. I just learnt the fs api. So i decided to make a program that writes viruses for you to practice the api. But when i was done with the first virus generator thing it gave me and error. viruscreator:5: attempt to call string
function virus1()
hacked = "You have been hacked"
print("What kind of virus do you want. Please select one of them")
print("If you want a virus that replaces the startup file type 'normal'.")
input = read() --Line 5
if input == "normal" then
f = fs.open("startup","w")
f.write("os.pullEvent() = os.pullEventRaw()")
f.write("print(hacked)")
f.write("sleep(2)")
f.write("os.shutDown()")
f.close()
end
end
virus1()
Edited on 02 February 2017 - 05:26 PM