but my script can save the table( somethimes have dataloss)
–// AdminTable \–
_G.Admins = {“pro_developer213”,“tudor22oi”}
_G.Banned = {“bananacool123rs”}
–// VerifyBann \–
local savebanns = game:GetService(“DataStoreService”)
local data = savebanns:GetDataStore(“Banns”)
local addata = savebanns:GetDataStore(“Admins”)
–// Custom function \–
local function Warn(WarnText)
warn(WarnText)
end
local function Warn(PrintText)
print(PrintText)
end
local function Banned(Player,Time)
game.Players[Player]:Kick(“You has ben banned, wait “…Time…” to get unbanned!”)
end
local function BannedKick(Player,Time)
game.Players[Player]:Kick(“You has ben banned, wait “…Time…” to get unbanned!”)
end
local function Kick(Player,AdminName)
game.Players[Player]:Kick(“You has ben kicked by “…AdminName…” if u want to raport he, text at me with his name and what he do”)
end
–// Sistem \–
game.Players.PlayerAdded:Connect(function(plr)
if not table.find(_G.Admins, plr.Name) and table.find(_G.Banned, plr.Name) then
BannedKick(plr, game.ReplicatedStorage.RecentTime.Value)
end
end)
while wait() do
data:SetAsync(“Banns”, _G.Banned)
end
while wait() do
addata:SetAsync(“Admins”, _G.Admins)
end