Advertisement
LBPHacker

Disk detector for BabyCodder

Mar 31st, 2013
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.93 KB | None | 0 0
  1. function comp()
  2.     fs.makeDir("account")
  3.     fs.makeDir("cookies")
  4.     dd = fs.open("cookies/disk", "w")
  5.     print("Detecting Disk Drives...")
  6.     print("Please Wait")
  7.     -- sleep(3) -- useless
  8.     if disk.isPresent("right") == true then
  9.         print("Disk Drive 'Right' Enabled")
  10.         dd.write("right")
  11.         dd.close()
  12.     elseif disk.isPresent("left") == true then
  13.         print("Disk Drive 'Left' Enabled")
  14.         dd.write("left")
  15.         dd.close()
  16.     elseif disk.isPresent("back") == true then
  17.         print("Disk Drive 'back' Enabled")
  18.         dd.write("back")
  19.         dd.close()
  20.     elseif disk.isPresent("bottom") == true then
  21.         print("Disk Drive 'Bottom' Enabled")
  22.         dd.write("bottom")
  23.         dd.close()
  24.     elseif disk.isPresent("top") == true then
  25.         print("Disk Drive 'Top' Enabled")
  26.         dd.write("top")
  27.         dd.close()
  28.     elseif disk.isPresent("front") == true then
  29.         print("Disk Drive Is Not Allowd On The")
  30.         print("Front Of The Computer")
  31.     else
  32.         print("No Disk Drive Detected")
  33.         print("Please Install One")
  34.     end
  35. end
  36.  
  37. comp()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement