autoclick.lua

by PC_Cat
671 days agolua
COPY
1
-- Basic NI autoclicker
2
-- PC_Cat
3

4

5
local args = {...}
6
local cps = args[1] or 1
7
print(tostring(cps) .. " cps")
8
local p = peripheral.wrap("back")
9

10
if not p or not p.swing then
11
    error("NI with kinetic module required!")
12
end
13

14
while true do
15
    print(p.swing())
16
    sleep(1 / cps)
17
end