Here is the script I used to add money to my game. I want it so that if you buy something you get a tool.
local id = 1172399 game.Players.PlayerAdded:Connect(function(player) local leaderstats = Instance.new("Folder",player) leaderstats.Name = "leaderstats" local Cash = Instance.new("StringValue",leaderstats) Cash.Name = "Cash" local doesOwn local success, message = pcall(function() doesOwn = game.MarketplaceService:UserOwnsGamePassAsync(player.UserId,id) end) if doesOwn then Cash.Value = "Infinite" print(player.Name.." owns the gamepass") game.ReplicatedStorage.Notifications:FireClient(player,"You own the infinite money gamepass!") else print(player.Name.." does not own the gamepass") game.ReplicatedStorage.Notifications:FireClient(player,"You do not own the infinite money gamepass.") Cash.Value = 0 while wait() do wait(10) Cash.Value = Cash.Value + 25 end end end)
Hi, I could not manage to make a script, But all you need to do is make a clone of the item, and put it in the players
"Backpack" and "StarterGear"