Simply change the for loop to be decrementing from the full text to 0, than incrementing from 0 to the full text:
local function typewrite (object , text)
-- incrementing
for i = 1,#text,1 do
object.Text = string.sub (text,1,i)
wait(0.05)
end
-- decrementing
for i = #text, 0, -1 do
object.Text = string.sub(text, 1, i)
wait(0.05)
end
end