Ban Script Working?

Do you think this ban script will work?(In ServerScriptService and is a Script)

	wait()
until game.ReplicatedStorage.EnableAdmin 

game.Players.PlayerAdded:Connect(function(player)
	local Leaderstats = player:WaitForChild("leaderstats")
	local OwnedChars = player:WaitForChild("OwnedCharacters")
	local Value = Leaderstats:WaitForChild("Equipped").Value
	
	local C2 = player:WaitForChild("Scout").Value
	
	while wait() do
		if Value == 2 and C2 == 0 then
			print("Ban")
			player:WaitForChild("Banned?").Value = 1
		end
	end
end)

No, 1. You do not check for a new Value or C2 and so it would run a infinite loop for nothing. 2. You should just set a datastore on the player then read it when they first join,

but could adding a value that bans the player when the value is 1 be viable?

It could, but I wouldn’t recommend it. Searching for if they are banned 24/7 isn’t a good idea.

I agree with what @Ihaveash0rtname said. A RemoteEvent for when the player gets banned and when they get unbanned would achieve the same thing while greatly increasing efficiency.