Demonlord27

some mario shi

Apr 6th, 2017
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. function hasMesh(Part)
  2. local c = Part:GetChildren()
  3. for i = 1, #c do
  4. if (c[i]:IsA("SpecialMesh")) then
  5. return true
  6. end
  7. end
  8. end
  9.  
  10. function Paint(Brick)
  11. if (Brick:findFirstChild("8bit") == nil) then
  12. if (hasMesh(Brick)) then return end
  13. if (Brick.Transparency == 1) then return end
  14. for i = 0, 5 do
  15. local t = Instance.new("Texture")
  16. t.Name = "8bit"
  17. t.Face = i
  18. t.StudsPerTileU = 0.5
  19. t.StudsPerTileV = 0.5
  20. t.Texture = "http://www.roblox.com/asset/?id=42896454"
  21. t.Parent = Brick
  22. end
  23. end
  24. Brick.Material = "SmoothPlastic"
  25. end
  26.  
  27. function Search(Object)
  28. -- wait()
  29. if (Object:IsA("BasePart")) then
  30. coroutine.resume(coroutine.create(Paint), Object)
  31. end
  32. local Children = Object:GetChildren()
  33. for X = 1, # Children do
  34. Search(Children[X])
  35. end
  36. end
  37.  
  38. function bitmaker()
  39. Search(game.Workspace)
  40. end
  41.  
  42. Search(game.Workspace)
  43. game.Workspace.ChildAdded:connect(bitmaker)
  44.  
  45. local bgm = Instance.new("Sound",workspace)
  46. bgm.Pitch = 1
  47. bgm.Volume = 1
  48. bgm.SoundId = "rbxassetid://420736255"
  49. bgm:Play()
  50.  
  51. print(_VERSION)
Add Comment
Please, Sign In to add comment