Hello some-what recently Roblox removed the \n char-set from :Kick() methods.
Being a common addict for \n this makes me very very pissed.
So I got to thinking and thought if there was any safe and reliable way of a alternative :Kick() method, maybe something that show’s up on the players screen like a GUI that allows the use of \n this would also allow us to style our kick method / message.
Is there any method to do this without the player deleting the GUI or just preventing the kick.
I thought of inserting a GUI with the nicely formatted text into the characters PlayerGUI and than kick them after 30 seconds and this seems to work very well, as if they do bypass or delete the GUI in 30 seconds they will be kicked.
I would love to see other players thoughts on this.
The ability to gracefully disconnect a client from the game is possible only using kick.
I don’t think there is any way to change the built in, and the only alternative I know is crashing the client, using while true do. But I strongly reccomend not to use it, the client’s game may be then hanging in task manager, but it is good for punishing someone for detected exploit.
Maybe you can just hide player’s character, block him from using any events (on server of course), show that gui and that will work as a kick for you?
Is there a way to hook all remote events and block them from being responded to before the remote responds back, because this anticheat will be a module for anyone to use
You can’t use \n in kick messages now? That sucks… I using it a lot.
I don’t think you can block raw events from players using other scripts. Your best choice will be to filter them.
Make a custom OOP module that creates an event and works as a wrapper between .OnServerEvent and the function server wants to connect.
When a kicked player fires that event the wrapper detects that player is in kicked state and doesn’t pass the arguments into the function server gave.
The problem relies in this being a module/script that anyone is open to use, I wan’t to be able for the module to be drag-and-dropped into the server-script-service and to be used.
I mean, if you want to use it everywhere, it will be complicated.
The easiest solution to this will be to create some function that checks the state of the player, for example.
local playersState = {
"Player1" = "Kicked",
}
-- :: Create checking function
local function IsKicked(player)
if playersState[player.Name] == "Kicked" then
return true
else
return false
end
end
-- :: Use this function in the connected function
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player, arguments)
if IsKicked(player) == true then
return
end
-- :: The player is not kicked and we can run our stuff
end)
This is a good UI! But as I previously said while true do will cause problems with the application stuck in task manager and not closing properly. It is strongly not recommended to use on regular players.