# avb
if car = 1:
	if wrek = 1 or teh <= 0:bupay = rand(10000, 20000)

	if wrek = 0:
		if teh >= tehcar * 75 / 100 and wrek = 0:bupay = rand(50000, 100000)
		if teh < tehcar * 75 / 100 and teh >= tehcar * 50 / 100 and wrek = 0:bupay = rand(40000, 60000)
		if teh < tehcar * 50 / 100 and teh >= tehcar * 25 / 100 and wrek = 0:bupay = rand(20000, 40000)
		if teh < tehcar * 25 / 100 and wrek = 0:bupay = rand(10000, 20000)
	end
elseif car > 1 and car < 6:
	if wrek = 1 or teh <= 0:bupay = rand(10000, 20000)

	if wrek = 0:
		if teh >= tehcar * 75 / 100 and wrek = 0:bupay = rand(100000, 200000)
		if teh < tehcar * 75 / 100 and teh >= tehcar * 50 / 100 and wrek = 0:bupay = rand(80000, 120000)
		if teh < tehcar * 50 / 100 and teh >= tehcar * 25 / 100 and wrek = 0:bupay = rand(60000, 90000)
		if teh < tehcar * 25 / 100 and wrek = 0:bupay = rand(50000, 70000)
	end
elseif car >= 6 and car < 11:
	if wrek = 1 or teh <= 0:bupay = rand(10000, 20000)

	if wrek = 0:
		if teh >= tehcar * 75 / 100 and wrek = 0:bupay = rand(150000, 220000)
		if teh < tehcar * 75 / 100 and teh >= tehcar * 50 / 100 and wrek = 0:bupay = rand(100000, 160000)
		if teh < tehcar * 50 / 100 and teh >= tehcar * 25 / 100 and wrek = 0:bupay = rand(80000, 120000)
		if teh < tehcar * 25 / 100 and wrek = 0:bupay = rand(50000, 90000)
	end
elseif car >= 11 and car <= 12:
	if wrek = 1 or teh <= 0:bupay = rand(10000, 20000)

	if wrek = 0:
		if teh >= tehcar * 75/100 and wrek = 0:bupay = rand(70000, 100000)
		if teh < tehcar * 75 / 100 and teh >= tehcar * 50 / 100 and wrek = 0:bupay = rand(40000, 80000)
		if teh < tehcar * 50 / 100 and teh >= tehcar * 25 / 100 and wrek = 0:bupay = rand(20000, 60000)
		if teh < tehcar * 25 / 100 and wrek = 0:bupay = rand(10000, 30000)
	end
elseif car = 95:
	if wrek = 1 or teh <= 0:bupay = rand(20000, 60000)

	if wrek = 0:
		if teh >= tehcar * 75 / 100 and wrek = 0:bupay = rand(500000, 900000)
		if teh < tehcar * 75 / 100 and teh >= tehcar * 50 / 100 and wrek = 0:bupay = rand(400000, 600000)
		if teh < tehcar * 50 / 100 and teh >= tehcar * 25 / 100 and wrek = 0:bupay = rand(300000, 500000)
		if teh < tehcar * 25 / 100 and wrek = 0:bupay = rand(50000, 300000)
	end
elseif car = 96:
	if wrek = 1 or teh <= 0:bupay = rand(20000, 60000)

	if wrek = 0:
		if teh >= tehcar * 75 / 100 and wrek = 0:bupay = rand(3000000, 4800000)
		if teh < tehcar * 75 / 100 and teh >= tehcar * 50 / 100 and wrek = 0:bupay = rand(2540000, 3200000)
		if teh < tehcar * 50 / 100 and teh >= tehcar * 25 / 100 and wrek = 0:bupay = rand(1150000, 2550000)
		if teh < tehcar * 25 / 100 and wrek = 0:bupay = rand(50000, 1160000)
	end
elseif car = 97:
	if wrek = 1 or teh <= 0:bupay = rand(20000, 60000)

	if wrek = 0:
		if teh >= tehcar * 75 / 100 and wrek = 0:bupay = rand(1000000, 1800000)
		if teh < tehcar * 75 / 100 and teh >= tehcar * 50 / 100 and wrek = 0:bupay = rand(540000, 1200000)
		if teh < tehcar * 50 / 100 and teh >= tehcar * 25 / 100 and wrek = 0:bupay = rand(150000, 550000)
		if teh < tehcar * 25 / 100 and wrek = 0:bupay = rand(50000, 160000)
	end
elseif car = 98:
	if wrek = 1 or teh <= 0:bupay = rand(20000, 60000)

	if wrek = 0:
		if teh >= tehcar * 75 / 100 and wrek = 0:bupay = rand(3000000, 4800000)
		if teh < tehcar * 75 / 100 and teh >= tehcar * 50 / 100 and wrek = 0:bupay = rand(2540000, 3200000)
		if teh < tehcar * 50 / 100 and teh >= tehcar * 25 / 100 and wrek = 0:bupay = rand(1150000, 2550000)
		if teh < tehcar * 25 / 100 and wrek = 0:bupay = rand(50000, 1160000)
	end
elseif car = 99:
	if wrek = 1 or teh <= 0:bupay = rand(20000, 60000)

	if wrek = 0:
		if teh >= tehcar * 75 / 100 and wrek = 0:bupay = rand(2000000, 3800000)
		if teh < tehcar * 75 / 100 and teh >= tehcar * 50 / 100 and wrek = 0:bupay = rand(1540000, 2200000)
		if teh < tehcar * 50 / 100 and teh >= tehcar * 25 / 100 and wrek = 0:bupay = rand(550000, 1550000)
		if teh < tehcar * 25 / 100 and wrek = 0:bupay = rand(50000, 560000)
	end
elseif car = 100:
	if wrek = 1 or teh <= 0:bupay = rand(20000, 60000)

	if wrek = 0:
		if teh >= tehcar * 75 / 100 and wrek = 0:bupay = rand(3000000, 5800000)
		if teh < tehcar * 75 / 100 and teh >= tehcar * 50 / 100 and wrek = 0:bupay = rand(2540000, 3200000)
		if teh < tehcar * 50 / 100 and teh >= tehcar * 25 / 100 and wrek = 0:bupay = rand(1550000, 2550000)
		if teh < tehcar * 25 / 100 and wrek = 0:bupay = rand(50000, 1560000)
	end
end

--- avb ---------------------------------
