Config = {} function RefreshConfig() local path, sep = debug.getinfo(1,"S").source:sub(2):match("(.*)([\\/])skins") local f = io.open(path .. sep .. "Main.cfg", "r") for line in f:lines("l") do local key, value = line:match("(%w*)%s*=%s*\"?([^\"%s]*)\"?") Config[key] = value end f:close() end RefreshConfig()