PasteBlueJelly

Disco Workspace Bricks

Apr 3rd, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. Scale = 0.3
  2.  
  3.  
  4. function DarkColor(Source)
  5. for _, Part in pairs(Source:GetChildren()) do
  6. if Part:IsA("Clothing") or Part:IsA("CharacterMesh") or Part:IsA("BodyColors") or Part:IsA("Decal") or Part:IsA("Texture") or Part:IsA("ShirtGraphic") or Part:IsA("CylinderMesh") or Part:IsA("BlockMesh") then
  7. Part:Remove()
  8. elseif Part:IsA("BasePart") then
  9. if Part:FindFirstChild("Mesh") == nil then
  10. local Mesh = Instance.new("SpecialMesh", Part)
  11. Mesh.MeshType = "FileMesh"
  12. Mesh.MeshId = "http://www.roblox.com/Asset/?id=9856898"
  13. Mesh.TextureId = "http://www.roblox.com/Asset/?id=48358980"
  14. Mesh.Scale = Part.Size * 2
  15. Mesh.VertexColor = Vector3.new(Part.BrickColor.r, Part.BrickColor.g, Part.BrickColor.b)
  16. Part.BrickColor = BrickColor.new("Institutional white")
  17. end
  18. if Part:FindFirstChild("Direction") == nil then
  19. local Direction = Instance.new("BoolValue", Part)
  20. Direction.Name = "Direction"
  21. Direction.Value = math.random(1, 2) == 1 and false or true
  22. end
  23. if Part:FindFirstChild("") == nil then
  24. local Increment = Instance.new("NumberValue", Part)
  25. Increment.Name = "Increment"
  26. Increment.Value = math.random(0, 1000) / 1000
  27. end
  28. if Part:FindFirstChild("OriginalColor") == nil then
  29. local OriginalColor = Instance.new("Vector3Value", Part)
  30. OriginalColor.Name = "OriginalColor"
  31. OriginalColor.Value = Part.Mesh.VertexColor
  32. end
  33. if Part.Increment.Value <= 0 then
  34. Part.Direction.Value = true
  35. elseif Part.Increment.Value >= 1 then
  36. Part.Direction.Value = false
  37. end
  38. Part.Increment.Value = Part.Increment.Value + (Scale * (Part.Direction.Value and 1 or -1))
  39. Part.Mesh.VertexColor = Part.OriginalColor.Value * Part.Increment.Value
  40. end
  41. DarkColor(Part)
  42. end
  43. end
  44.  
  45.  
  46. while true do
  47. DarkColor(Workspace)
  48. wait()
  49. end
Add Comment
Please, Sign In to add comment