Here it is set to '=' I want it to be set to '+' instead so that the gamepasses can stack if they buy more than one. How do I do this?
local WalkSpeedID = 361576482
local HealthBoostID = 361576482
local Cash1ID = 361576482
local WalkSpeedAmount = 10
local HealthBoostAmount = 20
local Cash1Amount = 5000
local MarketPlace = game:GetService("MarketplaceService")
game.Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Character)
if MarketPlace:PlayerOwnsAsset(Player, WalkSpeedID) then
Character:WaitForChild("Humanoid").WalkSpeed = WalkSpeedAmount
end
if MarketPlace:PlayerOwnsAsset(Player, HealthBoostID) then
Character:WaitForChild("Humanoid").MaxHealth = HealthBoostAmount
end
end)
local Money = game.ServerStorage.PlayerMoney:WaitForChild(Player.Name)
if MarketPlace:PlayerOwnsAsset(Player, Cash1ID) then
Money.Value = Money.Value + Cash1Amount
end
end)
