I'm trying to add in multiple gamepasses and badges for cash giving on my tycoon, I have several problems with this script but It seems to work.
Problem 1: Doesn't work most of the time, and sometimes it does.
Problem 2: I'd like to be able to hold all my gamepass and badge scripts in this single script.
Script
game.Players.PlayerAdded:connect(function(plr)
local cashmoney = game.ServerStorage.PlayerMoney:FindFirstChild(plr.Name)
if game:GetService("MarketplaceService"):PlayerOwnsAsset(plr,852280622) then
print(plr.Name .. " owns the Badge")
if cashmoney then
cashmoney.Value = cashmoney.Value + 100000
end
else
print(plr.Name .. " doesn't own Badge")
end
end)
Thanks for your time!
-Species
