math.randomseed(os.time())
print("H&L game!")
print("write your answer in 1~13")
local input = io.read()
local A = tonumber(input)
if A == nil then
    print("U write nothing!")
else
    local count = 0
    local card


    repeat
        count = count + 1
        card = math.random(1, 13)
        print(count .. "th chalenge!")
    until card == A or count >= 10
    if card == A then
        print("thats light! " .. count .. "th calenge you get!")
        print("your answer " .. A)
        print("you win!")
    else
        print("U lose... you couldnt get it in 10 tries ")
        print("your answer " .. A)
    end
end

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: