This is a new event from the Season 10 update (April 5th, 2024)
Example usage:
Events.TeamUpgradeEraPurchased(function(event)
-- Only proceed if the Diamond Era was purchased
if (event.upgrade == TeamUpgradeEraType.DIAMOND_ERA) then
local teamPlayers = event.team:getInGamePlayers()
-- Loop over all players in the team that received the upgrade
for i, player in pairs(teamPlayers) do
-- Give each team player a Diamond Scythe item
InventoryService.giveItem(player, ItemType.DIAMOND_SCYTHE, 1)
end
end
end)