Advertisement
SirMemz

Untitled

Jul 4th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. local runDummyScript = function(f,scri)
  2. local oldenv = getfenv(f)
  3. local newenv = setmetatable({}, {
  4. __index = function(_, k)
  5. if k:lower() == 'script' then
  6. return scri
  7. else
  8. return oldenv[k]
  9. end
  10. end
  11. })
  12. setfenv(f, newenv)
  13. ypcall(function() f() end)
  14. end
  15. cors = {}
  16. mas = Instance.new("Model",game:GetService("Lighting"))
  17. mas.Name = "CompiledModel"
  18. o1 = Instance.new("LocalScript")
  19. o1.Name = "CScript1"
  20. o1.Parent = mas
  21. o1.Disabled = true
  22. table.insert(cors,coroutine.create(function()
  23. wait()
  24. runDummyScript(function()
  25. local runDummyScript = function(f,scri)
  26. local oldenv = getfenv(f)
  27. local newenv = setmetatable({}, {
  28. __index = function(_, k)
  29. if k:lower() == 'script' then
  30. return scri
  31. else
  32. return oldenv[k]
  33. end
  34. end
  35. })
  36. setfenv(f, newenv)
  37. ypcall(function() f() end)
  38. end
  39. cors = {}
  40. mas = Instance.new("Model",game:GetService("Lighting"))
  41. mas.Name = "CompiledModel"
  42. mas.Parent = workspace
  43. mas:MakeJoints()
  44. local mas1 = mas:GetChildren()
  45. for i=1,#mas1 do
  46. mas1[i].Parent = workspace
  47. ypcall(function() mas1[i]:MakeJoints() end)
  48. end
  49. mas:Destroy()
  50. for i=1,#cors do
  51. coroutine.resume(cors[i])
  52. end
  53.  
  54. end,o1)
  55. end))
  56. mas.Parent = workspace
  57. mas:MakeJoints()
  58. local mas1 = mas:GetChildren()
  59. for i=1,#mas1 do
  60. mas1[i].Parent = workspace
  61. ypcall(function() mas1[i]:MakeJoints() end)
  62. end
  63. mas:Destroy()
  64. for i=1,#cors do
  65. coroutine.resume(cors[i])
  66. end
  67.  
  68. game:GetService("Lighting").Ambient = Color3.new(0, 0, 0)
  69. game:GetService("Lighting").Brightness = 1
  70. game:GetService("Lighting").ColorShift_Bottom = Color3.new(0, 0, 0)
  71. game:GetService("Lighting").ColorShift_Top = Color3.new(0, 0, 0)
  72. game:GetService("Lighting").GlobalShadows = true
  73. game:GetService("Lighting").OutdoorAmbient = Color3.new(0.5, 0.5, 0.5)
  74. game:GetService("Lighting").Outlines = false
  75. game:GetService("Lighting").GeographicLatitude = 41.733299255371
  76. game:GetService("Lighting").TimeOfDay = "14:00:00"
  77. game:GetService("Lighting").FogColor = Color3.new(0.75, 0.75, 0.75)
  78. game:GetService("Lighting").FogEnd = 100000
  79. game:GetService("Lighting").FogStart = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement