Does my current exploiter jailling system is infaillible or any fails can be exploited?

local JailBannedUsers = {"MagicLuau"}
local DistanceCalled = {}

local function UnbanPlayer(player:Player)
	if table.find(JailBannedUsers,player.Name) then
		table.remove(JailBannedUsers,table.find(JailBannedUsers,player.Name))
	end
	
	player.Character.Humanoid.Health = 0
	DistanceCalled[player.UserId] = nil
end

game:GetService("ServerStorage").BindableEvents.UnJailBanPlayer.Event:Connect(function(player)
	if not player:IsA("Player") then
		return
	end
	
	UnbanPlayer(player)
end)

while wait() do
	local sucess,errorm = pcall(function()
		for _, player in game.Players:GetPlayers() do
			if table.find(JailBannedUsers,player.Name) then
				local distancebymagnitude =  (player.Character.HumanoidRootPart.Position - game.Workspace.Jail.Bottom.Position).Magnitude

				if distancebymagnitude > 10 then
					if DistanceCalled[player.UserId] then
						if tick() - DistanceCalled[player.UserId] < 1 then
							-- Kill player
							player.Character.Humanoid.Health = 0
							DistanceCalled[player.UserId] = tick()
						else
							DistanceCalled[player.UserId] = tick()
						end 
					end
					
					if not DistanceCalled[player.UserId] then
						DistanceCalled[player.UserId] = tick()
					end
					
					player.Character.HumanoidRootPart.CFrame = game.Workspace.Jail.Bottom.CFrame + Vector3.new(0,2,0)

					task.wait(0.2)
					local distance  = (player.Character.HumanoidRootPart.Position - game.Workspace.Jail.Bottom.Position).Magnitude

					if distance > 10 then
						player.Character.Humanoid.Health = 0
					end
				end

				if distancebymagnitude > 5 then
					--player.Character.HumanoidRootPart.Anchored = true
					
					task.spawn(function()
						local success,errror = pcall(function()
							game.MarketplaceService:PromptProductPurchase(player,3144561327)
						end)
					end)
					
					player.Character.HumanoidRootPart.CFrame = game.Workspace.Jail.Bottom.CFrame + Vector3.new(0,2,0)
				end
			end
		end
	end)
end

Currently Protecting:
Loop teleport back (kill if too far away)

If exploitable, please let me know what i should do to avoid.

1 Like

Why not just kick the player?
Also an exploiter can simply just use a FreeCam script to still “engage” in the game

We have protection by checking distances between users characters and the object player can trigger. However just kicking is not a fun experience for punishing exploiters since they just can join back and don’t really feel punished.

I see, exploiters will simply just set their camera cframe for FreeCam aswell.

I also don’t believe this can be exploited, maybe if the client freezes their game so the server doesn’t receive any updates from their character movement but still, they aren’t doing much with a frozen game

I thought the jail was a fun idea to humiliate exploiters for what they did by watching others playing and not thems.

Using freecam will be useless for them since all our interactable use magnitude to check on players position.

1 Like