:Kick() Alternative

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.


You may want to check this resource and customize it to fit your needs.

1 Like

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?

1 Like

Hmmm, this might work I’m working on a large anticheat and I wanted to make a temp-ban feature to temp-ban 100% proven exploiters

but the problem came in when i couldent correctly display info in a kick message because of \n getting removed.

And I was not exactly talking about overriding the built-in

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

I have checked this out before, and I believe someone bypass’d the gui.

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.

Well, you gotta make it right. You can try to modify Quenty’s Signal module and make it use RemoteEvents and check the state of the player.

This seems a bit complicated, I think I will stick with the original idea of displaying a UI than after around 30 seconds the player is kicked.

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
		return false

-- :: Use this function in the connected function

game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player, arguments)
	if IsKicked(player) == true then
	-- :: The player is not kicked and we can run our stuff

custom kick.lua (7.0 KB)
quick recreation of the kick ui, supports newlines

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.

1 Like

Ah is this why \n was not working for me. I tested it a week ago or something and was wondering why \n was not working. Was this announced anywhere?

iirc it was removed to patch a robux stealing vulnerability

Wait what. How does removing \n fix a Robux stealing vulnerability…

Does \n just effect the text?

you can clone a lot of guis or smth and make the client’s pc overheat and explode

1 Like

they were using it to hide gamepass prompts i think

1 Like

Sadly think this may cause your player count to go down. :laughing: Anyways why would you need lots of GUI’s, would one not just work?

Maybe try this;

It’s a new, safer method we used. If you’re looking to replace the kicking screen.