game.ServerStorage.RemoteFunctions.GetObjectFromID.OnInvoke=function(N)for U,F in pairs(game.ReplicatedStorage.Objects:GetChildren())do if F.ItemID.Value==N then return F end end end game.ServerStorage.RemoteFunctions.ChangeCash.Event:connect(function(N,U)local F=game.ReplicatedStorage.PlayerData:FindFirstChild(N.userId)if F then F.cash.Value=F.cash.Value+U end end)
--okay, for some dumb reason we made duplicate purchasing functions... go to ItemBuyScript

game.ServerStorage.RemoteFunctions.GetObjectFromID.OnInvoke = function(id)
	for _, v in pairs(game.ReplicatedStorage.Objects:GetChildren()) do
		if v.ItemID.Value == id then
			return v
		end
	end
end

game.ServerStorage.RemoteFunctions.ChangeCash.Event:connect(function(plr, amt)
	local data = game.ReplicatedStorage.PlayerData:FindFirstChild(plr.userId)
	if data then
		data.cash.Value = data.cash.Value + amt
	end
end)
