Advertisement
RidwanRF

Typewriter animation

Jun 30th, 2022
784
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. local nextUpdate = 0
  2. local text = "I want you to know that"
  3. local itera = 0
  4.  
  5. addEventHandler("onClientRender", root, function ()
  6.     local timeNow = getTickCount()
  7.     if timeNow > nextUpdate then
  8.         nextUpdate = timeNow + 1000/10
  9.         --outputChatBox(itera)
  10.         if itera < #text then
  11.             itera = itera + 1
  12.         elseif itera == #text then
  13.             itera = 1
  14.         end
  15.     end
  16.     dxDrawText(text:sub(1, itera), (sX - 467) / 2, (sY - 77) / 2, ((sX - 467) / 2) + 467, ( (sY - 77) / 2) + 77, tocolor(255, 255, 255, 255), 2.00, "default", "left", "top", false, false, false, false, false)
  17. end)
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement