I’ve changed your post’s category to #help-and-feedback:scripting-support, the Cool Creations category is to show off your creations/gather feedback. You should also format your code to make it more readable, for more information see the category guidelines.

Create a map containing all used numbers then check from it when you generate a new number.

local used = {}
local function random(lower, upper)
local number = math.random(lower, upper)
repeat
number = math.random(lower, upper)
until (not used[number])
used[number] = true
return number
end

local NUMBERS = {}
local LastChoosen
for i = 0,6 do
wait()
local Range = math.random(1, 75)
if LastChoosen ~= Range then
NUMBERS[i] = Range
i = i + 1
end
LastChoosen = Range
end