Advertisement
Guest User

Untitled

a guest
Nov 3rd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. function getCD(item, tipo, limite)
  2. 
  3. if not getItemAttribute(item, tipo) then
  4. return 0
  5. end
  6.  
  7. local string = getItemAttribute(item, tipo):gsub("cd:", "")
  8. local number = tonumber(string) - os.time()
  9.  
  10. if number <= 0 then
  11. return 0
  12. end
  13.  
  14. if limite and limite < number then
  15. return 0
  16. end
  17.  
  18. return number
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement