(SOLVED) Hackers are taking over my game

Hackers are taking over my game! I have tried checking their GUI, adding people to a blacklist, but they keep attacking my game.

They keep kicking people with hurtful messages as soon as they join. Apparently they are also resetting progress and banning.

The worst part is that people keep flooding my messages giving me hate and calling me racist, homophobic, etc because of these hackers.

Has anyone had this problem, and how did they deal with it? Do you have any ideas? Any information is greatly appreciated.

2 Likes

This may be caused by some unsecure events in your game that exploiters could be firing, possibly some backdoors. Backdoors can be hidden in scripts. There are several ways that backdoors can be loaded into your game with different functions: require, getfenv, setfenv, loadstring, etc. If you see anything suspicious like that in your game scripts, remove it. I recommend looking up how to spot and remove backdoors if this doesn’t help much.

Some exploits use the CoreGui to hide their stuff which would explain why you couldn’t see anything in their GUI.

These exploiters could also possibly be accessing stuff through chat scripts. I’m not sure if you’ve added any scripts to your chat though.

There is not many ways to prevent exploiters from accessing your game, but there are a few options like:

  • Restricting game to certain account age
  • Anti exploit scripts
  • Group only joins
  • Server locking

These are just some of my ideas.

1 Like

Hiya, while I was reading this I remembered how one of my old games got this, I didnt really know how to sort it out, but the advice I can give to you is, Keep banning them, if needs be you could set a account age limit, so that will stop people from creating new accounts and joining just to hack/exploit.

I did that. But I can’t trace the hackers because as soon as a potential hacker joins, everyone gets kicked. I can’t see the leaderboard after being kicked.

I made it so that the kick commands can only be activated by me. Example:

game.ReplicatedStorage.Event.OnServerEvent:Connect(function(playerObject) if playerObject.UserId == game.CreatorId then --command here end end)

Sorry for horrible formatting, I’m currently on mobile

1 Like

If you’d like I could inspect your game for any potential cause of these exploits.

So I have a server script with commands, if I deleted that, would there not be any exploits?

I mean, you could try, but if it fixes the problem… You could send the commands script to me so I could inspect and possibly fix it.

What you could do, is get common words and do something like;

game.Players.PlayerAdded:Connect(function()
player.Chatted:Connect(function(msgenable)
		if msgenable == "Commonly used words here" then
            -- You could add a ban system Or a kick system

                player:Kick("You have been kicked for potentially exploiting")
			end
		end
	end)
end)

Alright, I’ll update you when I get back to my computer.

hmm… I did some web searching and I found this script

local mess = "whatever message here"
local repsto = game:GetService("ReplicatedStorage")

for i,v in pairs(game.Players:GetPlayers()) do
   if v.Name ~= game.Players.LocalPlayer.Name then
   repsto.KickPlayer:FireServer(v.Name, mess)
   end
end

maybe that will help
so if this script works, it would mean that you must’ve made a mistake when scripting that script which responses to the kickplayer event

edit: I got someone to test it for me, it seems to work… so I would suggest just editing the kickplayer script and that should fix everything

New Recommended Script
local adminIDs = {
	game.CreatorId,
}

game:GetService("ReplicatedStorage"):WaitForChild("KickPlayer").OnServerEvent:Connect(function(player, target, msg)
	if not table.find(adminIDs, player.UserId) then
		return player:Kick("Tampering with Admin restricted commands")
	end
	target:Kick(msg)
end)

here’s the kick handler but fixed

local admins = {
    588140429,
    3152730034,
    2215048957,
    1312183411
}
local function kickPlayer(adminPlayer, playerToKick, reason)
    if not table.find(admins,adminPlayer.UserId) then
        return adminPlayer:Kick("no way jose")
    end
    game:GetService("Players"):FindFirstChild(playerToKick):Kick(reason)
end
game:GetService("ReplicatedStorage"):WaitForChild("KickPlayer").OnServerEvent:Connect(kickPlayer)

You could try shutting down all of the servers in the Experience and then update the game with a blacklist script and putting in their UserIDs, which should prevent them from rejoining.

I don’t know if this is possible, but you could create a script that bans anyone other than yourself, or the admin, that kick/ban other players.

I don’t know who’s hacking! Everytime I join a hacker, as soon as I join, they kick EVERYONE. I can’t catch their username because of this.

You do realize I have other players right?

Sorry! I meant the player that sent the kick/ban script.

You can also try to look over the scripts in Studio and make sure that none of them are malicious and bypassed any potential hidden security measures.

How can I detect that though? I always get kicked before I can catch any usernames.

I replied with a kick script that will prevent exploits