-- Define a function to handle button clicks and ban the player

function onBanButtonClicked()
	local playerId = tonumber(idTextBox.Text)
	if playerId then
		local success, result = pcall(function()
			return banPlayerRemote:A(playerId)
		end)
		if success and result then
			idTextBox.Text = ""
			idTextBox.PlaceholderText = "Player ID"
			idTextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
			idTextBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
		else
			idTextBox.TextColor3 = Color3.fromRGB(255, 0, 0)
			idTextBox.BackgroundColor3 = Color3.fromRGB(255, 200, 200)
			idTextBox.PlaceholderText = "Invalid ID"
		end
	else
		idTextBox.TextColor3 = Color3.fromRGB(255, 0, 0)
		idTextBox.BackgroundColor3 = Color3.fromRGB(255, 200, 200)
		idTextBox.PlaceholderText = "Invalid ID"
	end
end
