variables

The following script (I believe) works for what you need. It could probably be done smoother. I wish I knew how to NAME variables in a repeat loop. (i.e. ‘set variable_x to whatever’ where x is an integer of a loop) Anyone know if that’s possible?
Script:

set var_lst to {}
repeat
	set rand_num to random number from 1 to 50
	if var_lst does not contain rand_num then
		set var_lst to var_lst & rand_num
	end if
	if (count of var_lst) is 10 then
		exit repeat
	end if
end repeat
--I don't know how to do the following in a repeat loop
set var1 to item 1 of var_lst
set var2 to item 2 of var_lst
set var3 to item 3 of var_lst
set var4 to item 4 of var_lst
set var5 to item 5 of var_lst
set var6 to item 6 of var_lst
set var7 to item 7 of var_lst
set var8 to item 8 of var_lst
set var9 to item 9 of var_lst
set var10 to item 10 of var_lst
--following lines only for showing results
log var1
log var2
log var3
log var4
log var5
log var6
log var7
log var8
log var9
log var10