Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can i know datastore infos so i can edit it?

Asked by
Zypsoh 25
4 years ago
Edited 4 years ago

Hi i have a plugin to acess datastore and edit it but i cant find the database name and scope can someone help me?


local Banned = {"name1", "name2"} local BanUsers = {"Zypsoh", "name2"} local Prefix = ":" local Ban = game:GetService("DataStoreService"):GetDataStore("Banned") game.Players.PlayerAdded:connect(function(p) --Player added --Check upfront for Banned for i,v in pairs(Banned) do if p.Name == v then p:Kick() end end --Check command-created bans/give them a status local Status = Ban:GetAsync(p.userId) if Status then p:Kick() elseif Status == nil then Ban:SetAsync(p.userId, false) end --Check for a command user for i,v in pairs(BanUsers) do if p.Name == v or p.userId == game.CreatorId then --Connect on chat p.Chatted:connect(function(msg) --Check if message started with Prefix (and then ban) if msg:lower():sub(1,#Prefix + 4) == Prefix:lower() .. "ban " then --Check if a player with the name following (or part of the name) exists local name = msg:lower():sub(#Prefix + 5) for i,v in pairs(game.Players:GetChildren()) do if v.Name:sub(1, #name):lower() == name then --Add to ban, then proceed to kick Ban:SetAsync(v.userId, true) v:Kick() end end end if msg:lower():sub(1,#Prefix + 6) == Prefix:lower() .. "unban " then --Check if a player with the name following (or part of the name) exists local userId = msg:lower():sub(#Prefix + 7) --unban Ban:SetAsync(tonumber(userId), false) end end) end end end)

1 answer

Log in to vote
0
Answered by 4 years ago

I'm thinking what the plugin means by name is the :GetDataStore So by name it is what's inside of the :GetDataStore("") string. So the name by this chance would be Banned as shown :GetDataStore("Banned")

Ad

Answer this question