YellowGreg

Minecraft Texture For Roblox Arsenal

Oct 16th, 2023 (edited)
1,700
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.38 KB | None | 0 0
  1. -- NOTE this does WORK in some games
  2.  
  3.         local faces = {"Front", "Back", "Bottom", "Top", "Right", "Left"}
  4.         local materials = {
  5.             {"Wood", "3258599312"}, {"WoodPlanks", "8676581022"},
  6.             {"Brick", "8558400252"}, {"Cobblestone", "5003953441"},
  7.             {"Concrete", "7341687607"}, {"DiamondPlate", "6849247561"},
  8.             {"Fabric", "118776397"}, {"Granite", "4722586771"},
  9.             {"Grass", "4722588177"}, {"Ice", "3823766459"},
  10.             {"Marble", "62967586"}, {"Metal", "62967586"},
  11.             {"Sand", "152572215"}
  12.         }
  13.        
  14.         function texture(ins, id)
  15.             for _, v in pairs(faces) do
  16.                 local texture = Instance.new("Texture", ins)
  17.                 texture.ZIndex = 2147483647
  18.                 texture.Texture = "rbxassetid://" .. id
  19.                 texture.Face = Enum.NormalId[v]
  20.                 texture.Color3 = ins.Color
  21.                 texture.Transparency = ins.Transparency
  22.             end
  23.         end
  24.        
  25.         for _, part in pairs(workspace:GetDescendants()) do
  26.             if part:IsA("BasePart") then
  27.                 for _, v in pairs(materials) do
  28.                     if part.Material.Name == v[1] then
  29.                         texture(part, v[2])
  30.                         part.Material = "SmoothPlastic"
  31.                     end
  32.                 end
  33.             end
  34.         end
Advertisement
Add Comment
Please, Sign In to add comment