Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- word scrambler because im bored in summer school when I should be doing my work
- word = "POTATO"
- local tab = {}
- local tab2 = {}
- local word2 = ""
- for i=1,#word do
- table.insert(tab,#tab+1,string.sub(word,i,i))
- end
- function kek(strin)
- for i=1,#tab do
- if tab[i] == strin then
- table.remove(tab,i)
- end
- end
- end
- while #tab ~= 0 do
- local k = math.random(1,#tab)
- table.insert(tab2,#tab2+1,tab[k])
- table.remove(tab,k)
- end
- for i=1,#tab2 do
- word2 = word2..tab2[i]
- end
- print(word2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement