Basically, this is my ban module:
function Aloe:GetBanStatus(player)
local areBanned = BanData:GetAsync(player.UserId)
if not areBanned then return false end
local Arguments = areBanned.UnbanTime or {Years=0,Months=0,Weeks=0,Days=0,Hours=0,Minutes=0,Seconds=0}
local Years = (Arguments.Years or 0)
local Months = (Arguments.Months or 0)
local Weeks = (Arguments.Weeks or 0)
local Days = (Arguments.Days or 0)
local Hours = (Arguments.Hours or 0)
local Minutes = (Arguments.Minutes or 0)
local Seconds = (Arguments.Seconds or 0)
local years = ((365 * 7 * 24 * 60 * 60) * Years)
local months = ((12 * 7 * 24 * 60 * 60) * Months)
local weeks = ((7 * 24 * 60 * 60) * Weeks)
local days = ((24 * 60 * 60) * Days)
local hours = ((60 * 60) * Hours)
local minutes = (60 * Minutes)
local seconds = (1 * Seconds)
if not areBanned then
return false;
else
if os.time() > areBanned.FinalTime then
BanData:RemoveAsync(player.UserId);
return false;
else
local str = [[
You are currently banned!
You currently have %d years, %d months, %d weeks, %d days, %d hours, %d minutes, %s seconds left on your ban!
Appeal at: .gg/tappingworld!
]]
local final = string.format(str, years, months, weeks, days, hours, minutes, seconds)
return final
end
end
end
function Aloe:Ban(player, Arguments)
local Years = (Arguments.Years or 0)
local Months = (Arguments.Months or 0)
local Weeks = (Arguments.Weeks or 0)
local Days = (Arguments.Days or 0)
local Hours = (Arguments.Hours or 0)
local Minutes = (Arguments.Minutes or 0)
local Seconds = (Arguments.Seconds or 0)
local years = ((365 * 7 * 24 * 60 * 60) * Years)
local months = ((12 * 7 * 24 * 60 * 60) * Months)
local weeks = ((7 * 24 * 60 * 60) * Weeks)
local days = ((24 * 60 * 60) * Days)
local hours = ((60 * 60) * Hours
local minutes = (60 * Minutes)
local seconds = (1 * Seconds)
local UnbanTime = {
Years = years,
Months = months,
Weeks = weeks,
Days = days,
Hours = hours,
Minutes = minutes,
Seconds = seconds,
FinalTime = years + months + weeks + days + hours + minutes + seconds
}
BanData:SetAsync(player.UserId, UnbanTime)
local str = [[
You are currently banned!
You currently have %d years, %d months, %d weeks, %d days, %d hours, %d minutes, %s seconds left on your ban!
Appeal at: .gg/tappingworld!
]]
local final = string.format(str, years, months, weeks, days, hours, minutes, seconds)
player:Kick(final);
end
This is what the ban message looked like when I banned myself for 65 years: