Advertisement
briannovius

Engine main api

Nov 4th, 2018
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. local Instance = {}
  2. for i, v in pairs(fs.list("/PEngine/api/") do
  3. if tostring(v) == "thread" then
  4. shell.run("/PEngine/api/thread")
  5. else
  6. h = fs.open(v, "r")
  7. q = h.readAll()
  8. loadstring(q)()
  9. end
  10. end
  11.  
  12. function spawnf(func)
  13. os.startThread(func)
  14. end
  15.  
  16. function Instance.new(t)
  17. if t == "Part" then
  18. local NewInst = {}
  19. NewInst.Name = t
  20. NewInst.ClassName = t
  21. spawnf(function()
  22. while true do
  23. local st = false
  24. sleep(1)
  25. backup = NewInst
  26. while backup == NewInst do
  27. sleep(1)
  28. print("still teh same")
  29. end
  30. print("changed!")
  31. end
  32. end)
  33. end
  34. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement