math.randomseed(os.time())
local player = {name = "your name", gold = 1000, HP = 100,}
print("|---------------------|")
print("|tomato`s fun shop!!!!|")
print("|---------------------|")
print("tomato:やぁ!いらっしゃい!")
print("何をしよう?(入力に文字を入れて選択してください)")
print("手持ち " .. player.gold .. "G")
print("HP " .. player.HP)
print("1: フライパンを買う(500G)")
print("2: 話す")
print("3: 離れる")
local input = io.read()
local select = tonumber(input)
if select == 1 then
    player.gold = player.gold - 500
    print("tomato:お買い上げありがとう!")
    print("フライパンを入手した!")
    print("残り " .. player.gold .. "G")
    print("おっとフライパンを手から滑らせて")
    print("~~GAME OVER~~")
elseif select == 2 then
    local Q = math.random(1, 3)
    if Q == 1 then
        print("tomato:知ってる?とまとって爆発するらしいよ?")
    elseif Q == 2 then
        print("tomato:最近ここら辺で爆発事件が起きてるらしい...")
    elseif Q == 3 then
        print("tomato:この頃お客が全然こなくて暇だなぁ...国家資格でも取ろうかなぁ")
    end
elseif select == 3 then
    print("tomato:じゃあね!")
    print("外に出た。")
    print("ドゴオオンばゴオオオオオオンドッカアアアン")
    print("~~GAME OVER~~")
end

Embed on website

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