Advertisement
Spyroz

Untitled

Apr 14th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. local DECALID = "244905905" -- Insert decal ID here
  2.  
  3. local function GetClasses(Object, Class)
  4. local Objects = {}
  5. for _, Child in pairs(Object:GetChildren()) do
  6. pcall(function()
  7. if Child:IsA(Class) then
  8. table.insert(Objects, Child)
  9. end
  10. end)
  11. pcall(function()
  12. for _, Obj in pairs(GetClasses(Child, Class)) do
  13. table.insert(Objects, Obj)
  14. end
  15. end)
  16. end
  17. return Objects
  18. end
  19.  
  20. local function Spam(ID)
  21. local Surfaces = {"Front", "Back", "Left", "Right", "Top", "Bottom"}
  22. for _, Part in pairs(GetClasses(game, "BasePart")) do
  23. for _, Surface in pairs(Surfaces) do
  24. local Decal = Instance.new("Decal", Part)
  25. Decal.Face = Surface
  26. Decal.Texture = "rbxassetid://" .. (ID-1)
  27. end
  28. end
  29. end
  30.  
  31. Spam(DECALID)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement