Marlingaming

Numb Converter

Jan 6th, 2022 (edited)
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. local tArg = {..}
  2. local key = tArg[1]
  3. local Result = -1
  4. if key == "one" then
  5. Result = 1
  6. elseif key == "two" then
  7. Result = 2
  8. elseif key == "three" then
  9. Result = 3
  10. elseif key == "four" then
  11. Result = 4
  12. elseif key == "five" then
  13. Result = 5
  14. elseif key == "six" then
  15. Result = 6
  16. elseif key == "seven" then
  17. Result = 7
  18. elseif key == "eight" then
  19. Result = 8
  20. elseif key == "nine" then
  21. Result = 9
  22. elseif key == "zero" then
  23. Result = 0
  24. else
  25. Result = -1
  26. end
  27.  
  28. return(Result)
Add Comment
Please, Sign In to add comment