local noun = {
    "Bill",
    "Jane",
    "Kate",
    "Joe"
}
local verb = {
    "has",
    "was",
    "is",
    "took"
}
local noun2 = {
    "a key.",
    "a ball.",
    "a sword"
}
local a = false
repeat 
    local rn = math.random(1,4)
    local rn2 = math.random(1,4)
    local rn3 = math.random(1,3)
    local yes = noun[rn].." "..verb[rn2].." "..noun2[rn3]
    print(yes)
    if yes == "Bill is a key." then
        a = true
    end
    until a == true

Embed on website

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