Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. local now = getTickCount()
  2. local nowTick = now
  3. if start then
  4. local elapsedTime = nowTick - startTick
  5. local duration = (startTick + startAnimationTime) - startTick
  6. local progress = elapsedTime / duration
  7. local alph = interpolateBetween(
  8. 0, 0, 0,
  9. 255, 0, 0,
  10. progress, startAnimation
  11. )
  12.  
  13. alpha = alph
  14.  
  15. if progress >= 1 then
  16. animState = true
  17. end
  18. else
  19. local elapsedTime = nowTick - startTick
  20. local duration = (startTick + startAnimationTime) - startTick
  21. local progress = elapsedTime / duration
  22. local alph = interpolateBetween(
  23. 255, 0, 0,
  24. 0, 0, 0,
  25. progress, startAnimation
  26. )
  27.  
  28. alpha = alph
  29.  
  30. if progress >= 1 then
  31. animState = false
  32. alpha = 0
  33. Clear()
  34. cacheDestroy()
  35. state = false
  36. removeEventHandler("onClientRender", root, drawnScoreboard)
  37. end
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement