Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- Form Field -------
- deleteRange = 25
- -----------------------
- local sensor = peripheral.find("openperipheral_sensor")
- whitelist = {"Spectrolus"}
- whitelistcheck = {}
- for index, value in pairs(whitelist) do
- whitelistcheck[value] = "Mafia"
- end
- function round(n)
- return n % 1 >= 0.5 and math.ceil(n) or math.floor(n)
- end
- function add(a, b)
- return a + b
- end
- function negative(a)
- return a * -1
- end
- rs.setOutput("top",false)
- rs.setOutput("bottom",false)
- while true do
- local players = sensor.getPlayers()
- for i, v in pairs(players) do
- --print(v.name)
- if whitelistcheck[v.name] == nil then
- current = sensor.getPlayerByName(v.name).all()
- if (current.position.x < deleteRange and current.position.x >
- negative(deleteRange) and current.position.y < deleteRange and
- current.position.y > negative(deleteRange) and current.position.z <
- deleteRange and current.position.z > negative(deleteRange) and whitelistcheck[v.name] ==
- nil) then
- print("DIE SCUM")
- rs.setOutput("top",true)
- rs.setOutput("bottom",true)
- sleep(0.10)
- rs.setOutput("top",false)
- rs.setOutput("bottom",false)
- end
- end
- end
- sleep(0.05)
- end
Add Comment
Please, Sign In to add comment