Advertisement
Zagear

سكربت احتفالية العيد

Jun 23rd, 2017
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.82 KB | None | 0 0
  1. tfm.exec.disableAfkDeath(true)
  2. tfm.exec.disableAutoNewGame(true)
  3. tfm.exec.disableAutoScore(true)
  4. tfm.exec.disableAutoShaman(true)
  5. tfm.exec.disableAutoTimeLeft(true)
  6. tfm.exec.disablePhysicalConsumables(true)
  7. tfm.exec.setGameTime(0)
  8.  
  9. adm = {Zagear=true,Modyyii=true,Turkitutu=true,Miiiclaroo=true,Bolodefchoco=true} -- اسماء الادمنز
  10. mod = {Zagear=true} -- اسم المشرف
  11. ban={} -- لا تكتب أى شئ هنا
  12. mice={} -- لا تكتب أى شئ هنا
  13. data = {0,"جار تحميل المفرقعات"}
  14. words = {"♠", "∞", "Δ", "φ", "♪"}
  15. d = {"عيد سعيد", "احتفالية العيد", "كل عام وانتم بخير", "عيد مبارك"}
  16. tfm.exec.newGame(6799000)
  17. id=0
  18. play=true
  19. b = {"d0d0d0","000000"}
  20. c = {"d0d0d0","000000","1b9ad4","35b821","d41111","581cc7","e66f20","bda60f","d10f83","1b9ad4"}
  21.  
  22. eventLoop = function()
  23.  
  24.     data[1] = math.min(data[1] + 16,100)
  25. if not play then
  26. firework()
  27. end
  28.  if play then
  29.     if data[1] == 100 then
  30.         data[2] = "تم تحميل المفرقعات"
  31.      play = false
  32.     end
  33.     ui.addTextArea(11, "", nil, 194, 215, 420, 41, 0x07ebbd, 0xffffff, 0.6, true)
  34.     ui.addTextArea(12, "<p align='center'><font size='15'>"..data[1].." %", nil, 195, 215, (data[1] * 4.2), 41, 0x002bff, 0xffffff, 0.3, true)
  35.     ui.addTextArea(13, "<p align='center'><font size='15'>"..data[2].."", nil, 342, 265, 120, 23, 0x6e41b3, 0xffffff, 0.6, true)
  36.     if data[1] == 100 then
  37.      for i,k in pairs({11,12,13}) do
  38.         ui.removeTextArea(k)
  39.      end
  40.   end
  41. end
  42. for i in pairs(tfm.get.room.playerList) do
  43. tfm.exec.setNameColor(i, tostring(math.random(0x000000, 0xFFFFFF)))
  44. ui.setMapName ("<p align='center'><font color='#"..c[math.random(#c)].."'>"..d[math.random(#d)].."")
  45. end
  46. ui.addTextArea(103,".",nil,-1000,-1000,3000,3000,tostring(math.random(0x000000, 0xFFFFFF)),0x010101,0.1,true)
  47. end
  48.  
  49. function string.nick(n)
  50.     local v = 1
  51.     if n:sub(0,1)=="+" then v = 2 end
  52.     return n:sub(0,v):upper()..n:sub(v+1):lower()
  53. end
  54.  
  55. function table.is(t,n)
  56.     local is=false
  57.     for i,v in pairs (t) do
  58.         if n==v then
  59.             is=true
  60.             break
  61.         end
  62.     end
  63.     return is
  64. end
  65.  
  66. function table.destroy(t,k)
  67.     for i,v in pairs (t) do
  68.         if k==v then
  69.             table.remove(t,i)
  70.             break
  71.         end
  72.     end
  73. end
  74.  
  75. function banned(n)
  76.     if table.is(ban,n) then
  77.         tfm.exec.setNameColor(n,1)
  78.         ui.addTextArea(5,'',n,-1500,-1500,3000,3000,1,1,1,true)
  79.         system.bindKeyboard(n,('V'):byte(),false,false)
  80.         system.bindKeyboard(n,('V'):byte(),true,false)
  81.         system.bindKeyboard(n,('P'):byte(),true,false)
  82.     else
  83.         tfm.exec.setNameColor(n,0)
  84.         ui.removeTextArea(5,n)
  85.         system.bindKeyboard(n,('V'):byte(),false,true)
  86.         system.bindKeyboard(n,('V'):byte(),true,true)
  87.         system.bindKeyboard(n,('P'):byte(),true,true)
  88.     end
  89. end
  90.  
  91. function eventNewPlayer(n)
  92.     if string.find(tfm.get.room.name,"#") then
  93.     end
  94.     if not mice[n] then
  95.         mice[n]={
  96.         id=id
  97.         }
  98.         id=id+1
  99.     end
  100.     for n, playername in pairs(tfm.get.room.playerList) do
  101. for _,keys in pairs({32}) do
  102. system.bindKeyboard(n, keys, true, true)
  103. end
  104. end
  105.     banned(n)
  106.     tfm.exec.respawnPlayer(n)
  107. end
  108. for n in pairs (tfm.get.room.playerList) do eventNewPlayer(n) end
  109.  
  110. function eventNewGame()
  111. _i = 10
  112. tfm.exec.setGameTime(0)
  113. ui.addTextArea(101, "<p align='center'><font color='#ff0000' size='150' face='Soopafresh'>عيد سعيد", nil, 160, 77, 486, 162, 0xffffff, 0x000000, 0, true)
  114. ui.addTextArea(102, "<p align='center'><font color='#ffdd00' size='150' face='Soopafresh'>عيد سعيد", nil, 132, 82, 533, 156, 0xffffff, 0x000000, 0, true)
  115. end
  116.  
  117. function eventKeyboard(n, key, down, x, y)
  118. if key == 32 then
  119. ui.addTextArea(mice[n].id, "<p align='center'><font size='15' color='#"..b[math.random(#b)].."'>"..n.." ("..words[math.random(#words)]..")", name, tfm.get.room.playerList[n].x-35,tfm.get.room.playerList[n].y, nil, 0x263740, 0x00ff66, 0.5, true)
  120. end
  121. end
  122.  
  123. function eventChatCommand(n,c)
  124.     local arg={}
  125.     for v in c:gmatch('[^%s]+') do
  126.         table.insert(arg,v)
  127.     end
  128.     if arg[1] == "ban" and (adm[n] or mod[n] or n==_V) then
  129.         if arg[2] then
  130.             arg[2] = string.nick(arg[2])
  131.             if tfm.get.room.playerList[arg[2]] then
  132.                 if not table.is(ban,arg[2]) and not adm[arg[2]] and n~=_V then
  133.                     table.insert(ban,arg[2])
  134.                     banned(arg[2])
  135.                 end
  136.             end
  137.         end
  138.     end
  139.     if arg[1] == "unban" and (adm[n] or mod[n] or n==_V) then
  140.         if arg[2] then
  141.             arg[2] = string.nick(arg[2])
  142.             if tfm.get.room.playerList[arg[2]] then
  143.                 if table.is(ban,arg[2]) then
  144.                     table.destroy(ban,arg[2])
  145.                     banned(arg[2])
  146.                 end
  147.             end
  148.         end
  149.     end
  150. end
  151.  
  152. for _,c in pairs({'ban','unban','BAN','UNBAN'}) do
  153.     system.disableChatCommandDisplay(c,true)
  154. end
  155.  
  156. ids = {0,1,2,9,11,13,21,22,23,24,29,32,33}
  157.  
  158. firework = coroutine.wrap(function()
  159.     local time = 0
  160.     local id = 0
  161.     local x,y = 0,0
  162.     while true do
  163.         time = time + 1
  164.  
  165.         if time % 4 == 0 then
  166.             for i = -10,10 do
  167.                 for o = 10,10 do
  168.                     tfm.exec.displayParticle(id,x,y,i,(math.random(0,1) == 0 and -i or i))
  169.                     tfm.exec.displayParticle(id,x,y,i)
  170.                     tfm.exec.displayParticle(id,x,y,0,i)
  171.                 end
  172.             end
  173.         elseif time % 2 == 0 then
  174.             id = ids[math.random(#ids)]
  175.             x,y = math.random(60,740),math.random(100,340)
  176.    
  177.             for i = 40,80 do
  178.                 tfm.exec.displayParticle(id,x,y + i,0,-1.5)
  179.             end
  180.         end
  181.  
  182.         coroutine.yield()
  183.     end
  184. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement