Zed Nov's Tycoon Kit - Badge Awarding System (on completion)

Hello forum readers/users.

I am a user of Zed Nov’s Tycoon Kit, and I am making a Tycoon and am having troubles finding how I would place a badge award on a player who buys a product using the featured buttons. (This being the finishing product)

The badge will work as awarding the player for completing the tycoon. I have looked everywhere I can, and I cannot locate a way to do this. So I have decided to take to the developers of ROBLOX.

If anyone can help me out here that would be much appreciated, this post may also be able to help other creators in my position. Since it is a very well used kit, and a very well done idea, I think this information needs to get on the internet.

I have left a few sources below that could help anyone trying to find the answer, and thank you to anyone who tries :slight_smile:

  1. Zed Nov’s Tycoon Kit (used kit): Zed's Tycoon Kit [FIXED] - Roblox

  2. Social Media/Setup Tutorial: (to gather information on how it works) Roblox: Making your own Tycoon! Part 1: Basics [READ DESCRIPTION] - YouTube

  • Owen - Roblox Developer
3 Likes

Let me know if this works. Put it at the bottom of PurchaseHandler. Also looking at the script it looks pretty ancient, it might be a good idea to go through stuff and change a few things. This is what I came up with without looking too far into the source code. There’s probably something more optimized out there if you look into the code but I’ve literally never touched this Tycoon Kit before and I’m unfamiliar with the workings of it.

local Tycoon = script.Parent
local BadgeService = game:GetService("BadgeService")
local NumberOfButtons = #Tycoon.Buttons:GetChildren()
local badgeId = 0 --Replace this with the ID of the badge 

Tycoon.PurchasedObjects.ChildAdded:Connect(function()
	if NumberOfButtons == #Tycoon.PurchasedObjects:GetChildren() then
		BadgeService:AwardBadge(Tycoon.Owner.Value.UserId, badgeId)

	end
end)
3 Likes