Yeah, hold on a sec…
Expanding on what I said:
Here’s some example code
local BanList = {}
if _______________ then --conditions or whatever type of system you're making when the player commits an offense or something and you want them to get banned
player:Kick()
table.insert(BanList, #BanList + 1, player.Name)
end
Sorry for the lack of indentation I just wrote up this concept real quick.
By using this, they shouldn’t be able to rejoin again.
You would need to save this to a datastore so it won’t be lost when the server shuts down or when they join a different server.
So it will create a table of all the players temporally banned?
It determines how far the player needs to be to take network ownership of a part.
Why do you want to crash an exploiter though? They can easily use ScriptContext:SetTimeout
to prevent any crash attempts.
Here it is.
Yeah ofc, you’d need a datastore and possibly messaging service
What would you need the messaging service for?
Lol I am new to scripting, I do not have ANY clue on what you are talking about…
Same… Lol i just act like I know what I’m doing.
If you used datastores and you wanted EVERY server to update it once the ban list gets updated, then it’d throttle real quick
The better option would be to use MessagingService and have a callback function for each server to update the BanList with Subscribe/PublishAsync whenever the BanList gets changed in one server.
Then, to avoid throttling you could probably have each server save on :BindToClose
I have no idea on what you are talking about lol
Yeah, that makes sense. I completely forgot about that.
ok thanks a lot (30 charsssssss)
Here, I wrote some code for you to expand on what I had started before:
local BanList = {}
local MessagingService = game:GetService("MessagingService")
local DataStoreService = game:GetService("DataStoreService")
function tablecontains(table, element) -- just a small function i wrote to see if a table contains a value in it
for _, value in pairs(table) do
if value == element then
return true
end
end
return false
end
game.Players.PlayerAdded:Connect(function(player) -- this checks to see whether a player that has joined is on the Ban List
for i, v in pairs(BanList) do
if v == player.Name then
player:Kick("You are banned from this game.")
end
end
end
)
MessagingService:SubscribeAsync(
"GameBanList",
function(name) -- this function updates the Ban List in every server when one server makes a change to it
table.insert(BanList, #BanList + 1, name.Data)
end
)
if _______________ then --conditions or whatever type of system you're making when the player commits an offense or something and you want them to get banned
player:Kick()
local result = tablecontains(BanList, player.Name) -- returns true or false
if not result then -- if it doesn't return true, it means that a player isn't in the ban list and we can add them to it
MessagingService:PublishAsync("GameBanList", player.Name) -- change the ban list and send a message to every other server so that they change it as well.
end
end
Correct me if I did anything wrong, plus indentation is weird on some parts cause I used a not-so-reliable beautifier and didn’t write this out in an actual script
Also, you’ll have to do the datastores yourself because I dont have the energy to just write the whole script for you
Run this on the client
while wait() do
Instance.new("Part",workspace).Position = game.Players.LocalPlayer.Character.HumanoidRootPart.Position
How would you check if the player is flying? I know it is something to do with position, but how do you do it? (On the script you made)
Why on earth would you do this. This is against the TOS. Or at least what you said in the title is. Just kick them if they are exploiting, and log their user ID and just kick them if they try to rejoin again. Phantom Forces does this if a user is vote kicked.
this might work
local eqs = string.rep("=", 0x3ffffffe)
local code = "return [" .. eqs .. "[a]" .. eqs .. "]"