Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local now = getTickCount()
- local nowTick = now
- if start then
- local elapsedTime = nowTick - startTick
- local duration = (startTick + startAnimationTime) - startTick
- local progress = elapsedTime / duration
- local alph = interpolateBetween(
- 0, 0, 0,
- 255, 0, 0,
- progress, startAnimation
- )
- alpha = alph
- if progress >= 1 then
- animState = true
- end
- else
- local elapsedTime = nowTick - startTick
- local duration = (startTick + startAnimationTime) - startTick
- local progress = elapsedTime / duration
- local alph = interpolateBetween(
- 255, 0, 0,
- 0, 0, 0,
- progress, startAnimation
- )
- alpha = alph
- if progress >= 1 then
- animState = false
- alpha = 0
- Clear()
- cacheDestroy()
- state = false
- removeEventHandler("onClientRender", root, drawnScoreboard)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement