Last active
August 29, 2015 14:20
-
-
Save SwadicalRag/43b879de59a716cd8472 to your computer and use it in GitHub Desktop.
doge.lua
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doge(...) | |
local dogeWords = { | |
"very", | |
"so", | |
"much", | |
"many", | |
"such", | |
"quite" | |
} | |
local ending = { | |
"wow", | |
"amaze", | |
"excite" | |
} | |
local args = {...} | |
local out = {} | |
local lastRandom = 0 | |
for i,v in ipairs(args) do | |
local rand = math.random(1,#dogeWords) | |
while(rand == lastRandom) do | |
rand = math.random(1,#dogeWords) | |
end | |
table.insert(out,dogeWords[rand].." "..v) | |
lastRandom = rand | |
end | |
table.insert(out,ending[math.random(1,#ending)]) | |
local nice = "Maymay incoming:\n" | |
for i,v in ipairs(out) do | |
nice = nice..'.'..string.rep(" ",math.random(2,6))..v.."\n" | |
end | |
return nice | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment