Advertisement
Guest User

urcodeflurc

a guest
Feb 22nd, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.49 KB | None | 0 0
  1.  
  2. oak1c1, oak1c2, oak1c3 = "Gold", "Bright yellow", "Deep orange" -- Oak1 colors >
  3.  
  4. oak2c1, oak2c2, oak2c3 = "Bright blue", "Pastel Blue", "Light blue" -- Oak2 colors >
  5.  
  6. pine1c1, pine1c2, pine1c3 = "Shamrock", "Sea green", "Bright green" -- Pine1 colors >
  7.  
  8. pine2c1, pine2c2, pine2c3 = "Tawny", "Dusty Rose", "Salmon" -- Pine2 colors >
  9.  
  10. -- Variable Instructions    : {change the color names in each, you should probably know that)
  11.  
  12.  
  13. -- YOU MAY EDIT EVERYTHING ABOVE THIS TEXT --------------------------------------------------
  14. --- DO NOT CHANGE ANYTHING BELOW THIS TEXT --------------------------------------------------
  15.  
  16. function loadtrees() -- main function
  17.    
  18.     for i, v in pairs (game.Workspace.Trees:GetChildren()) do
  19.        
  20.         if v.Name == ("Oak1") then
  21.             local k = math.random(1,3)
  22.             if k == 1 then
  23.                 for z, g in pairs (v:GetChildren()) do
  24.                     g.BrickColor = BrickColor.new(oak1c1)
  25.                 end
  26.             end
  27.            
  28.             if k == 2 then
  29.                 for z, g in pairs (v:GetChildren()) do
  30.                     g.BrickColor = BrickColor.new(oak1c2)
  31.                 end
  32.             end
  33.            
  34.             if k == 3 then
  35.                 for z, g in pairs (v:GetChildren()) do
  36.                     g.BrickColor = BrickColor.new(oak1c3)
  37.                 end
  38.             end
  39.         end
  40.        
  41.        
  42.         if v.Name == ("Oak2") then
  43.             local l = math.random(1,3)
  44.                 for z, g in pairs (v:GetChildren()) do
  45.                     g.BrickColor = BrickColor.new(oak2c1)
  46.                 end
  47.            
  48.                 for z, g in pairs (v:GetChildren()) do
  49.                     g.BrickColor = BrickColor.new(oak2c2)
  50.                 end
  51.            
  52.             if l == 3 then
  53.                 for z, g in pairs (v:GetChildren()) do
  54.                     g.BrickColor = BrickColor.new(oak2c3)
  55.                 end
  56.             end
  57.         end
  58.        
  59.         if v.Name == ("Pine1") then
  60.            
  61.             local p = math.random(1,3)
  62.             if p == 1 then
  63.                 for z, g in pairs (v:GetChildren()) do
  64.                     g.BrickColor = BrickColor.new(pine1c1)
  65.                 end
  66.             end
  67.            
  68.             if p == 2 then
  69.                 for z, g in pairs (v:GetChildren()) do
  70.                     g.BrickColor = BrickColor.new(pine1c2)
  71.                 end
  72.             end
  73.            
  74.             if p == 3 then
  75.                 for z, g in pairs (v:GetChildren()) do
  76.                     g.BrickColor = BrickColor.new(pine1c3)
  77.                 end
  78.             end
  79.         end
  80.        
  81.        
  82.         if v.Name == ("Pine2") then
  83.        
  84.             local s = math.random(1,3)
  85.             if s == 1 then
  86.                 for z, g in pairs (v:GetChildren()) do
  87.                     g.BrickColor = BrickColor.new(pine2c1)
  88.                 end
  89.             end
  90.            
  91.             if s == 2 then
  92.                 for z, g in pairs (v:GetChildren()) do
  93.                     g.BrickColor = BrickColor.new(pine2c2)
  94.                 end
  95.             end
  96.            
  97.             if s == 3 then
  98.                 for z, g in pairs (v:GetChildren()) do
  99.                     g.BrickColor = BrickColor.new(pine2c3)
  100.                 end
  101.             end
  102.         end
  103.     end
  104. end
  105.  
  106. loadtrees()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement