Win4Win

Auto TL

Dec 6th, 2021 (edited)
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.32 KB | None | 0 0
  1. --- Form Field -------
  2. deleteRange = 25
  3. -----------------------
  4. local sensor = peripheral.find("openperipheral_sensor")
  5. whitelist = {"Spectrolus"}
  6. whitelistcheck = {}
  7. for index, value in pairs(whitelist) do
  8.     whitelistcheck[value] = "Mafia"
  9. end
  10. function round(n)
  11.     return n % 1 >= 0.5 and math.ceil(n) or math.floor(n)
  12. end
  13. function add(a, b)
  14.     return a + b
  15. end
  16. function negative(a)
  17.     return a * -1
  18. end
  19. rs.setOutput("top",false)
  20. rs.setOutput("bottom",false)
  21. while true do
  22. local players = sensor.getPlayers()
  23.     for i, v in pairs(players) do
  24.         --print(v.name)
  25.         if whitelistcheck[v.name] == nil then
  26.             current = sensor.getPlayerByName(v.name).all()
  27.             if (current.position.x < deleteRange and current.position.x >
  28.             negative(deleteRange) and current.position.y < deleteRange and
  29.             current.position.y > negative(deleteRange) and current.position.z <
  30.             deleteRange and current.position.z > negative(deleteRange) and whitelistcheck[v.name] ==
  31.             nil) then
  32.                 print("DIE SCUM")
  33.                 rs.setOutput("top",true)
  34.                 rs.setOutput("bottom",true)
  35.                 sleep(0.10)
  36.                 rs.setOutput("top",false)
  37.                 rs.setOutput("bottom",false)
  38.             end    
  39.         end    
  40.     end
  41.     sleep(0.05)
  42. end
Add Comment
Please, Sign In to add comment