Hello ive just got done fixing this ban script but i wanna know how to connect it to my Data store editor heres the editor plugin i use (22) DataStore Editor - Roblox
Ok so this is my first time actually using this since i bought it awhile back so yeah i cant figure out where the Data store name i made is and when i use the plugin this is the code for my ban button:
local versionNumber = "2"
local banstorage = game:GetService("DataStoreService"):GetDataStore("Ban storage v"..versionNumber)
local admins = {
["spydercam500"] = 1;
["masry12"] = 1;
["Crazyloco04"] = 1;
["xShadowExiled"] = 1;
}
game.Players.PlayerAdded:Connect(function(player)
if banstorage:GetAsync(player.UserId) then
player:Kick("You are banned LOOOL!")
end
end)
game.ReplicatedStorage.Ban.OnServerEvent:Connect(function(player, victim)
if admins[player.Name] then
-- if they are a admin
local found = game.Players:FindFirstChild(victim)
if found then
banstorage:SetAsync(found.UserId, true)
found:Kick("You are banned LOOOL!")
end
end
end)
Im sure this is very simple to do but i cant figure it out as i am a beginner scripter and followed a tutorial to make this ban script and had to ask for help earlier.