I’m making an overheadgui that will display your rank ONLY if your in the group.
Script:
local AdmissionGuiClone = game.ServerStorage:WaitForChild("Admissions"):Clone()
local EmpireGuiClone = game.ServerStorage:WaitForChild("Empire"):Clone()
local AgencyGuiClone = game.ServerStorage:WaitForChild("SpyAgency"):Clone()
local UsernameGuiClone = game.ServerStorage:WaitForChild("Username"):Clone()
local SpyAgency = 6389701
local Empire = 6390261
local Admission = 6973181
local PlayerService = game:GetService("Players")
PlayerService.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
if plr:IsInGroup(Empire) then --:GetRoleInGroup
EmpireGuiClone.Frame.TextLabel.Text = plr:GetRoleInGroup(Empire)
print("test1")
else
EmpireGuiClone.Frame.TextLabel.Text = "Foreigner"
print("test2")
end
if plr:IsInGroup(SpyAgency) then
AgencyGuiClone.Frame.TextLabel.Text = plr:GetRoleInGroup(SpyAgency)
print("test3")
else
AgencyGuiClone:Destroy()
print("test4")
end
if plr:IsInGroup(Admission) then
AdmissionGuiClone.Frame.TextLabel.Text = plr:GetRoleInGroup(Admission)
print("test5")
else
AdmissionGuiClone:Destroy()
print("test6")
end
UsernameGuiClone.Frame.TextLabel.Text = (plr.Name)
print("test7")
end)
end)
local AdmissionGui = game.ServerStorage:WaitForChild("Admissions"):Clone()
local EmpireGui = game.ServerStorage:WaitForChild("Empire"):Clone()
local Agency = game.ServerStorage:WaitForChild("SpyAgency"):Clone()
local UsernameGui = game.ServerStorage:WaitForChild("Username"):Clone()
local AdmissionGuiClone = AdmissionGui:Clone()
local EmpireGuiClone = EmpireGui:Clone()
local AgencyGuiClone = Agency:Clone()
local UsernameGuiClone = UsernameGui:Clone()
AdmissionGuiClone.Parent = game.ServerStorage
EmpireGui.Parent = game.ServerStorage
AgencyGuiClone.Parent = game.ServerStorage
UsernameGuiClone.Parent = game.ServerStorage
local SpyAgency = 6389701
local Empire = 6390261
local Admission = 6973181
local PlayerService = game:GetService("Players")
PlayerService.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
if plr:IsInGroup(Empire) then --:GetRoleInGroup
EmpireGuiClone.Frame.TextLabel.Text = plr:GetRoleInGroup(Empire)
print("test1")
else
EmpireGuiClone.Frame.TextLabel.Text = "Foreigner"
print("test2")
end
if plr:IsInGroup(SpyAgency) then
AgencyGuiClone.Frame.TextLabel.Text = plr:GetRoleInGroup(SpyAgency)
print("test3")
else
AgencyGuiClone:Destroy()
print("test4")
end
if plr:IsInGroup(Admission) then
AdmissionGuiClone.Frame.TextLabel.Text = plr:GetRoleInGroup(Admission)
print("test5")
else
AdmissionGuiClone:Destroy()
print("test6")
end
UsernameGuiClone.Frame.TextLabel.Text = (plr.Name)
print("test7")
end)
end)