Advertisement
Eliaseeg

Banner

May 24th, 2015
596
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.04 KB | None | 0 0
  1. local text = "Overpowered!"
  2. local mice = {}
  3.  
  4. _G["eventNewPlayer"] = function(name)
  5.     mice[name] = {
  6.         despawnTime = 5
  7.     }
  8.     for i=1,100 do
  9.         tfm.exec.bindKeyboard(name, i, true)
  10.     end
  11.     table.foreach({1,2,3,4,5}, function(a) ui.addTextArea(a, ("<B><p align='center'><font face='Freestyle Script' size='120'   color='#%x'>\n"..text..""):format(a < 5 and 0 or 0xC2C2DA), name, ({10,0,5,5,5})[a], ({-50,-50,-45,-55,-50})[a], 790, 400, 0, 0, 0.0, true) end)
  12.     system.bindMouse(name, true)
  13. end
  14.  
  15. function eventKeyboard(name, key, down, x, y)
  16.     if key == 27 then
  17.         removeBanner(name)
  18.     end
  19. end
  20.  
  21. function eventMouse(name, x, y)
  22.     if x <= 400 and y <= 800 then
  23.         removeBanner(name)
  24.     end
  25. end
  26.  
  27. function removeBanner(name)
  28.     for i=1,5 do
  29.         ui.removeTextArea(i, name)
  30.     end
  31. end
  32.  
  33. function eventLoop()
  34.     for name,_ in pairs(tfm.get.room.playerList) do
  35.         mice[name].despawnTime = mice[name].despawnTime - 0.5
  36.         if mice[name].despawnTime <= 0 then
  37.             removeBanner(name)
  38.         end
  39.     end
  40. end
  41.  
  42. table.foreach(tfm.get.room.playerList, _G["eventNewPlayer"])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement