Advertisement
Leo_Verto

ASTU Speaking turtle

Feb 16th, 2013
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. local s = peripheral.wrap("right")
  2.  
  3. tArgs = { ... }
  4. local pitch = 100
  5.  
  6. if tArgs[1] == "deep" then
  7.   pitch = 1
  8.   table.remove(tArgs, 1)
  9. elseif tArgs[1] == "high" then
  10.   pitch = 400
  11.   table.remove(tArgs, 1)
  12. end
  13.  
  14. local msg = table.concat(tArgs, " ")
  15.  
  16. msg = string.gsub(msg, "wtf", "what the fuck")
  17. msg = string.gsub(msg, "shit", "ship")
  18. msg = string.gsub(msg, "crap", "carp")
  19. msg = string.gsub(msg, "fuck", "frog")
  20. msg = string.gsub(msg, ":D", "happyface")
  21. msg = string.gsub(msg, "D:", "sadface")
  22. msg = string.gsub(msg, "xD", "loud laugh with closed eyes")
  23.  
  24. s.say(msg, pitch)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement