Add Gimpy's version

This commit is contained in:
Ayane Satomi 2022-05-03 01:31:40 +08:00
parent 83c9f750f5
commit 0e8fd1c086

View file

@ -0,0 +1,20 @@
--@name GimpyTTS
--@author Mavain and Minori
--@client
local lang = "en"
local soundref
hook.add("playerchat", "fucke2", function(ply, txt)
if ply ~= owner() then return end
bass.loadURL("https://translate.google.com/translate_tts?ie=UTF-8&q=" .. txt .. "&tl=" .. lang .. "&client=tw-ob", "3d",
function(a, err, name)
-- we dispose the current reference, then we create a new one
if soundref then soundref:stop() end
soundref = a
hook.add("think", "soundFollow", function() a:setPos(owner():getPos()) end)
a:play()
end)
end)