Animescapetower

oker

Mar 17th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. t = {}
  2. for i = 0,20000 do
  3. table.insert(t,i,i)
  4. end
  5.  
  6. print(collectgarbage("count"))
  7. t = nil
  8. print(collectgarbage("count"))
  9. --Script one:
  10. _G.variable = "This a variable in _G."
  11.  
  12. --Script two:
  13. while _G.variable == nil do wait() end --make sure that script one sets the variable before this one tries to read it
  14. print(_G.variable)
  15.  
  16. print (gcinfo())
  17. a=collectgarbage("count")
  18.  
  19. print(a)
  20. var1 = 7
  21. var2 = 9
  22. getfenv()["var3"] = 11
  23. for i, v in pairs(getfenv()) do
  24. print(i, " = ", v)
  25. end
  26. -- Ran from a Script in workspace called "Script"
  27. local function a()
  28. print(debug.traceback())
  29. end
  30. function b()
  31. a()
  32. end
  33. local function c()
  34. b()
  35. end
  36. c()
  37. while true do
  38. debug.profilebegin("custom_label")
  39. --your code here
  40. debug.profileend()
  41. wait()
  42. end
  43. for k,v in pairs(t) do
  44. --body
  45. end
  46. t = {1,2,"a","d",c = 12, q = 20}
  47. for i,v in pairs(t) do
  48. print(i,v)
  49. end
Add Comment
Please, Sign In to add comment