Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function checkForFile()
- local fileName = "your_file_name_here" -- Replace with the name of your file
- while true do
- if fs.exists("scripts/" .. fileName) then
- print("File found: " .. fileName)
- -- Add your logic here when the file is found
- break -- Break the loop when the file is found (optional)
- end
- sleep(5) -- Check every 5 seconds (you can modify this)
- end
- end
- local shellID = multishell.launch({}, checkForFile)
- multishell.setTitle(shellID, "File Checker")
- -- Keep the program running to allow the background check to continue
- while true do
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement