How to get the live count of #TeamSeas in a Roblox game

Hello everyone.

I’m trying to promote the #TeamSeas movement that has started through Roblox.

I was wondering if there is a way I can promote it by putting a live count of the amount of pounds of trash removed from the oceans.

I saw in Tree Planting Simulator they put a live count of the amount of trees planted for #TeamTrees. Is there a way for Team Seas?

I am thinking there is some sort of api for this. I haven’t found any yet.

Thanks in advance!

3 Likes

Found it!

3 Likes

Thanks!

What code would I have to write for that?

I have a proxy.

1 Like

You actually don’t need to use a proxy for this since it isn’t a Roblox API, but it should be just the typical HTTP GET kind of thing. I quickly threw this together:

local success,response = pcall(function()
	return game:GetService("HttpService"):GetAsync("https://assets01.teamassets.net/json/donation_total.json")
end)

if success then
	local decoded = game:GetService("HttpService"):JSONDecode(response)
	workspace.Part.SurfaceGui.TextLabel.Text = "Teamseas has currently collected "..decoded["count"].." dollars."
end

Which resulted in this:

Omg, thank you so much!

It works!

You’re welcome! Keep in mind it won’t automatically update, so you’d have to put it in a loop. Also, if you’re interested, you can get more api stuff through here:

However, two of them return PNG images, so you’ll probably only need this one, which shows a whole bunch of donation data (People who have donated the most, the most recent donations, teams, etc. It says recent, but I tried it out and it shows multiple items):

https://assets01.teamassets.net/json/lb_recent.json

There isn’t an endpoint for top donators but as you mentioned there is for recent donators:

https://assets01.teamassets.net/json/lb_recent.json

The original poster could use this data in a SurfaceGui somewhere to create quite a nice dynamic donators list.