Boeing747-8

Some random stopwatch

May 21st, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. admin="Fuzzyfirsdog#0000" -- insert your name in the quotation marks
  2.  
  3. time = 0
  4. timerTime = 1
  5. average=0
  6. numbers=0
  7. S = string.byte("S")
  8. Space = 32
  9. tfm.exec.bindKeyboard(admin, Space, true, true)
  10.  
  11. tfm.exec.bindKeyboard(admin, S, true, true)
  12.  
  13. timerStart=0
  14. function eventKeyboard(playerName, key, down, xPlayerPosition,yPlayerPosition)
  15. if key==Space then
  16. timerStart=1
  17. average=average+1
  18. print("lol")
  19.  
  20. elseif key==S then
  21. numbers=numbers+display
  22. average=numbers/average
  23. print("<VP>"..average)
  24. ui.addTextArea(0, "<font size='40'>"..display.." seconds!", nil, 322, 148, 310, 125, 0x324650, 0x000000, 0, true)
  25.  
  26. timerStart=0
  27. time=0
  28. timerTime=1
  29.  
  30. end
  31. end
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38. function timers()
  39.  
  40. time = time + 0.5
  41.  
  42. if time==timerTime then
  43. ui.addTextArea(0, "<font size='40'>"..time, nil, 322, 148, 310, 125, 0x324650, 0x000000, 0, true)
  44. timerTime = timerTime + 1
  45.  
  46. end
  47. end
  48.  
  49.  
  50.  
  51.  
  52. ui.addTextArea(0, "<font size='40'>0.00", nil, 322, 148, 310, 125, 0x324650, 0x000000, 0, true)
  53.  
  54. function eventLoop()
  55. display = timerTime-1
  56. if timerStart==1 then
  57. timers()
  58.  
  59. end
  60. end
Add Comment
Please, Sign In to add comment