I was curious what addon had those ebars, googling brought me to your unanswered reddit thread. Since you want to check if the group has 4 or more players, checking the number of members is better.
Lua Code:
local f=CreateFrame("frame")
f:RegisterEvent("GROUP_ROSTER_UPDATE")
f:SetScript("OnEvent",function()
if GetNumGroupMembers()>3 then
eBar_bar_4:SetAlpha(0)
eBar_bar_5:SetAlpha(0)
eBar_bar_6:SetAlpha(0)
eBar_bar_7:SetAlpha(0)
LoseControlparty1:SetAlpha(0)
LoseControlparty2:SetAlpha(0)
else
eBar_bar_4:SetAlpha(1)
eBar_bar_5:SetAlpha(1)
eBar_bar_6:SetAlpha(1)
eBar_bar_7:SetAlpha(1)
LoseControlparty1:SetAlpha(1)
LoseControlparty2:SetAlpha(1)
end
end
However, after looking for eBar and LoseControl and stumbling on what I believe is your thread in a certain other forum, I have a hunch this code won't work for you since the event GROUP_ROSTER_UPDATE was added in Battle for Azeroth and GetNumGroupMembers() was added in Mists of Pandaria.