[ @Aaron-Auto ]
---
There's 2 ways. You can hardcode the timing inside the script or create a database with pastebin or etc. Using database will allows you add more user without making changes to the script, unlike hardcode, you need to keep adding a new user inside the script. So which one do you want? but first of all, here's some inner working of what you want:
--[ Updated & tested on: 05/12/23 ]
--Time format (year:month:day:hour:minute:second)
lookup =
{
["user1"] = "2023:12:05:16:22:00"
}
function parser(inputs)
cparse = os.date("%Y%m%d%H%M%S")
uparse = lookup[inputs[1]]:gsub(':', '')
if tonumber(cparse) >= tonumber(uparse) then
return false
else
return true
end
end
function notice(message)
gg.alert(message)
os.exit()
end
function menus()
notice('You have reached the main menu!')
end
inputs = gg.prompt({'Enter username :'},{[1] = nil},{[1] = 'string'})
if inputs == nil then
notice('Username empty, exiting...')
else
if lookup[inputs[1]] == nil then
notice('Username not found, exiting...')
else
if parser(inputs) == false then
notice('Username expired, exiting...')
else
menus()
end
end
end
---