Help with ROBLOX subscription

I need help with something. So Roblox rolled out game subscriptions and i was wondering how would i make a script that gives a player a badge in Roblox studio for having that subscription?

For starters, Please move this topic in #help-and-feedback:scripting-support

and B, you would want to do something like:

local SubscriptionID = nil 
local BadgeID = nil
game.Players.PlayerAdded:Connect(function(player)
   local Status = game:GetService("MarketplaceService"):GetUserSubscriptionStatusAsync(player, SubscriptionID)

if Status.IsSubscribed == true then 
   game:GetService("BadgeService"):AwardBadge(player, BadgeID)
end
end)

This will check when a player joins the game with a subscription and award the badge if they do. Ideally you want to award the badge when they buy it after you prompt it, but that needs your system.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.