roblox number between 1 and 10

-- Step 1: Generate a random number between 1 and 10
local randomNumber = math.random(1, 10)

-- Step 2: Prompt the user to guess the number
print("Guess the number between 1 and 10:")

-- Step 3: Get user input
local userGuess = tonumber(io.read())

-- Step 4: Check if the guess is correct
if userGuess == randomNumber then
    print("Congratulations! You guessed the correct number.")
else
    print("Sorry, the correct number was " .. randomNumber .. ". Try again.")
end