I need help with my ban datastore some time player has been ban like 1 day when player has join the private server it will show message like this:
This is normal but when you join another server like public server it will show like this:
I want to know how to make another server has same time with private server
Note: It will help me alot if you show me a source code
local Data = game:GetService("DataStoreService");
local BanDataStore = Data:GetDataStore("Test", "1")
local CurrentTime = os.time()
local OneDays = 86400
local ThreeDays = 259200
local OneWeek = 604800
local OneMonth = 2592000
local Banned = 3110400000
game.Players.PlayerAdded:Connect(function(plr)
while true do
if BanDataStore:GetAsync(plr.UserId) ~= nil then
local Data = BanDataStore:GetAsync(plr.UserId)
local DataTime = tonumber(Data.Time)
local TimeLeft = tonumber((DataTime - CurrentTime))
if TimeLeft > 0 then
local seconds = TimeLeft % 60
local minutes = math.floor(TimeLeft / 60) % 60
local hours = math.floor(TimeLeft / 3600) % 24
local days = math.floor(TimeLeft / 86400) % 30
local month = math.floor(TimeLeft / 2592000)
local Message = "\nYOU ARE BANNED FOR\n".. month .. " Month " ..days.. " Days " .. hours .. " Hours " .. minutes .. " Minutes " .. seconds .. " Seconds\nREASON: " .. Data.Reason.."\nWarning ("..Data.Warning.."/5)"
plr:Kick(Message)
elseif TimeLeft <= 0 then
local bantable = {
["Warning"] = Data.Warning,
["Time"] = 0,
["Reason"] = ""
}
BanDataStore:UpdateAsync(plr.UserId, function(oldValue)
return bantable
end)
end
end
wait(30)
end
end)