Advertisement
infiniteblock

Untitled

Dec 25th, 2019
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local name = "joey" -- ascii only
  2. local uri = "https://discor"
  3. print("Warpdrive security active!")
  4. while true do
  5.     local p = peripheral.find("warpdriveAirGenerator")
  6.     local x,y,z = p.getLocalPosition()
  7.     local text = x .. " "..y.." "..z
  8.     local oldText = ""
  9.     if fs.exists(".lastpos") then
  10.         local f = fs.open(".lastpos","r")        
  11.         oldText = f.readAll()
  12.         f.close()
  13.     end
  14.     if oldText ~= text then
  15.         local f2 = fs.open(".lastpos","w")
  16.         f2.write(text)
  17.         http.post(uri,"{\"content\":\""..name..": "..text.."\"}",{['content-type']="application/json"})
  18.         f2.close()                                                
  19.     end    
  20.     sleep(10)
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement