(Sorry for my terrible english but im a little bit upset)
Ok so a couple of hackers entered to my game and this is what happened:
Image:
https://ibb.co/SRR9gbb
Im tired of reseting the whole score table, so i want to remove these specific hackers scores. How can i do that? I need to put a code in the Command Bar? (Keep in mind that i dont have the remote idea how to do that, so please explain very carefully)
To wipe their data, first, you need to ofc ban them, use this:
1 | local bans = { "edg90210" , "gabo253464" , "SF_REACHER" , "Casilini" } |
2 | game.Players.PlayerAdded:Connect( function (p) |
3 | for _, v in ipairs (bans) do |
4 | if p.Name = = v then |
5 | p:Kick( "wooh funny exploit man xddd" ) |
6 | end |
7 | end ) |
8 | end ) |
It searches through the table of banned players, then if they're in it it kicks them Then you'll need to actually wipe their data:
01 | local dss = game:GetService( "DataStoreService" ) |
02 | local ds = dss:GetDataStore( "DATA_STORE_NAME_HERE" ) |
03 | local bans = { "edg90210" , "gabo253464" , "SF_REACHER" } |
04 | game.Players.PlayerAdded:Connect( function (p) |
05 | for _, v in ipairs (bans) do |
06 | if p.Name = = v then |
07 | p:Kick( "wooh funny exploit man xddd" ) |
08 | ds:SetAsync(p.UserId, 0 ) |
09 | end |
10 | end ) |
11 | end ) |
This then further resets their datastore.