I Have A Simulator Game Where You Collect Coins And Sell Them For Cash, Currently, I Am Trying To Make A Double Points Gamepass. I Have Very Limited Knowledge With Roblox Lua And Money Systems So Please Excuse My Mistakes.
game:GetService("MarketplaceService"):PromptGamePassPurchase(player, id)
game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, id)
if player then
local leaderstats = player:WaitForChild("leaderstats")
local Currency = leaderstats.Money -- Change Money To your currency
local Selling = leaderstats.Coins -- Change Grass to what you selling.
if Selling.Value > 0 then
Currency.Value = Currency.Value + Selling.Value *1.5 -- This 1 means multiple you can change it to whatever you want
Selling.Value = 0
end
end
end
end)

1 comment
How Would I Make The First Part Into A Variable?