Advertisement
Diamond_Nicholas

rainbow3

Jan 31st, 2020
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1.  
  2. function sandbox(var,func)
  3. local env = getfenv(func)
  4. local newenv = setmetatable({},{
  5. __index = function(Enum,k)
  6. if k=="script" then
  7. return var
  8. else
  9. return env[k]
  10. end
  11. end,
  12. })
  13. setfenv(func,newenv)
  14. return func
  15. end
  16. cors = {}
  17. mas = Instance.new("Model",game:GetService("Lighting"))
  18. Part0 = Instance.new("Part")
  19. Script1 = Instance.new("Script")
  20. Script2 = Instance.new("Script")
  21. Part0.Name = "a"
  22. Part0.Parent = mas
  23. Part0.CFrame = CFrame.new(0, -6.85999966, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  24. Part0.Position = Vector3.new(0, -6.85999966, 0)
  25. Part0.Color = Color3.new(0.388235, 0.372549, 0.384314)
  26. Part0.Size = Vector3.new(512, 26.2799988, 512)
  27. Part0.Anchored = true
  28. Part0.BottomSurface = Enum.SurfaceType.Smooth
  29. Part0.BrickColor = BrickColor.new("Dark stone grey")
  30. Part0.Locked = true
  31. Part0.Material = Enum.Material.Grass
  32. Part0.TopSurface = Enum.SurfaceType.Smooth
  33. Part0.brickColor = BrickColor.new("Dark stone grey")
  34. Part0.FormFactor = Enum.FormFactor.Symmetric
  35. Part0.formFactor = Enum.FormFactor.Symmetric
  36. Script1.Parent = Part0
  37. table.insert(cors,sandbox(Script1,function()
  38. while wait() do
  39.  
  40. script.Parent.Color = Color3.new(255/255,0/255,0/255)
  41.  
  42. for i = 0,255,3 do
  43.  
  44. wait()
  45.  
  46. script.Parent.Color = Color3.new(255/255,i/255,0/255)
  47.  
  48. end
  49.  
  50. for i = 255,0,-3 do
  51.  
  52. wait()
  53.  
  54. script.Parent.Color = Color3.new(i/255,255/255,0/255)
  55.  
  56. end
  57.  
  58. for i = 0,255,3 do
  59.  
  60. wait()
  61.  
  62. script.Parent.Color = Color3.new(0/255,255/255,i/255)
  63.  
  64. end
  65.  
  66. for i = 255,0,-3 do
  67.  
  68. wait()
  69.  
  70. script.Parent.Color = Color3.new(0/255,i/255,255/255)
  71.  
  72. end
  73.  
  74. for i = 0,255,3 do
  75.  
  76. wait()
  77.  
  78. script.Parent.Color = Color3.new(i/255,0/255,255/255)
  79.  
  80. end
  81.  
  82. for i = 255,0,-3 do
  83.  
  84. wait()
  85.  
  86. script.Parent.Color = Color3.new(255/255,0/255,i/255)
  87.  
  88. end
  89.  
  90. end
  91.  
  92. end))
  93. Script2.Name = "sound or song"
  94. Script2.Parent = Part0
  95. table.insert(cors,sandbox(Script2,function()
  96. --created by lukaslabrat
  97. local s = Instance.new("Sound")
  98.  
  99. s.Name = "BGMusic"
  100. s.SoundId = "rbxassetid://2203600861" --if you want to change the music you must only change the id.
  101. s.Volume = 0.6 --the volume of the sound
  102. s.Looped = true
  103. s.archivable = false
  104.  
  105. s.Parent = game.Workspace
  106.  
  107. wait()-- time till the song plays again, make it 0.1 for it to loop
  108.  
  109. s:play()
  110.  
  111. --enjoy
  112. end))
  113. for i,v in pairs(mas:GetChildren()) do
  114. v.Parent = workspace
  115. pcall(function() v:MakeJoints() end)
  116. end
  117. for i,v in pairs(cors) do
  118. spawn(function()
  119. pcall(v)
  120. end)
  121. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement