Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.44 KB | None | 0 0
  1. spawn = true
  2. ids = {6,2,1,10}
  3. i = 20
  4.  
  5. for _,dsble in next,{"AutoNewGame","AutoTimeLeft","AutoShaman","AutoScore","PhysicalConsumables","DebugCommand","MinimalistMode"} do
  6. tfm.exec["disable"..dsble](true)
  7. end
  8.  
  9. function eventLoop (timeC, timeR)
  10. ui.addText("<font color='%s' face='Soopafresh' size='15'><b>Objects expires in: "..i.."</b></font>", 0, 370, "#BABD2F", "#333")
  11. if i == 0 then
  12. for k,v in pairs(ids) do
  13. tfm.exec.removeObject(v)
  14. end
  15. i = 20
  16. end
  17. table.insert(ids, tfm.exec.addShamanObject(math.random(2801,2818), math.random(5, 1000), 370))
  18. table.insert(ids, tfm.exec.addShamanObject(math.random(601,611), math.random(5, 1000), 20))
  19. table.insert(ids, tfm.exec.addShamanObject(math.random(1001,1004), math.random(5, 1000), 20))
  20. tfm.exec.explosion(math.random(5,800), math.random(5, 500), 50, 20, false)
  21. tfm.exec.explosion(math.random(5,800), math.random(5, 500), 50, 20, false)
  22. tfm.exec.explosion(math.random(5,800), math.random(5, 500), 50, 20, false)
  23. tfm.exec.explosion(math.random(5,800), math.random(5, 500), 50, 20, false)
  24. i = i - 1
  25. end
  26.  
  27. function ui.addText(string, x, y, color, border)
  28. ui.addTextArea(1, string.format(string, border), nil, x, y-1, 900, 25, nil, nil, 0, true)
  29. ui.addTextArea(2, string.format(string, border), nil, x, y+1, 900, 25, nil, nil, 0, true)
  30. ui.addTextArea(3, string.format(string, border), nil, x+1, y, 900, 25, nil, nil, 0, true)
  31. ui.addTextArea(4, string.format(string, border), nil, x-1, y, 900, 25, nil, nil, 0, true)
  32. ui.addTextArea(5, string.format(string, color), nil, x, y, 900, 25, nil, nil, 0, true)
  33. end
  34.  
  35. function eventNewGame()
  36. i = 0
  37. local t={} for k,v in pairs(tfm.get.room.objectList) do table.insert(t,k) end for k,v in ipairs(t) do tfm.exec.removeObject(v) end
  38. tfm.exec.newGame("#4")
  39. end
  40.  
  41. local t={} for k,v in pairs(tfm.get.room.objectList) do table.insert(t,k) end for k,v in ipairs(t) do tfm.exec.removeObject(v) end
  42. tfm.exec.newGame("#8")
  43.  
  44. local timer = { }
  45.  
  46. function eventNewPlayer(playerName)
  47. tfm.exec.bindKeyboard(playerName,32,true,true)
  48. tfm.exec.bindKeyboard(playerName,1,true,true)
  49.  
  50. timer[playerName] = 0
  51. end
  52.  
  53. function eventKeyboard(playerName, keyCode, True, x, y)
  54. if keyCode == 1 then
  55. timer[playerName] = os.time() + 500
  56. elseif keyCode == 32 and os.time() < timer[playerName] then
  57. tfm.exec.movePlayer ( playerName, 0, 0, false, 0, -50, false )
  58. timer[playerName] = 0
  59. end
  60. end
  61.  
  62. table.foreach(tfm.get.room.playerList, eventNewPlayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement