Bootleg Bitlife

an anonymous user · January 27, 2022
local module = {}

function wait(time)
    local duration = os.time() + time
    while os.time() < duration do end
end

local CharacterGenerated = {
    CountryOrRegion = nil;
    FirstName = nil;
    LastName = nil;
    Age = nil;
    -- --
    Happiness = math.random(75, 100);
    Looks = math.random(30, 100);
    Smarts = math.random(20, 100);
    -- --
    Occupation = nil;
}

-- RESPONSE SYSTEM --
function module.CreateResponseDialogue(Dialogue)
    if not Dialogue then Dialogue = "(Y/N)" end
    -- --
    io.write(Dialogue.." >> ")
    local Response = io.read()
    if string.match(Response, "[yes]") or string.match(Response, "[Yes]") then
        return true    
    elseif string.match(Response, "[no]") or string.match(Response, "[No]") then
        return false    
    else
        -- NO PROPER RESPONSE GIVEN --
        print("PLEASE GIVE A PROPER RESPONSE!")
        module.CreateResponseDialogue(Dialogue)
    end
end

function module:StartDialogue()
    print("Welcome to Bootleg Bitlife created entirely on a school laptop w/ an online compiler.")
    -- --
    wait(0.5)
    -- --
    io.write("Please type a country and or region of your choice. >> ")
    local RegionInput = io.read()
    
end

return module
Output

Comments

Please sign up or log in to contribute to the discussion.