Advertisement
Aeyao

breakapart

Feb 24th, 2017
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. local p = game.Players.LocalPlayer
  2. local c = p.Character
  3. local m = p:GetMouse()
  4.  
  5. function SelectionBox(thing,size)
  6. local SB = Instance.new("SelectionBox")
  7. SB.Parent = thing
  8. SB.Adornee = thing
  9. SB.LineThickness = size
  10. SB.Color3 = Color3.new(255,0,0)
  11. SB.Name = "SB23134121"
  12. end
  13.  
  14.  
  15. m.KeyDown:connect(function(k)
  16.  
  17. if k == "r" then
  18.  
  19. if m.Target then
  20. if m.Target.Parent:IsA("Model") then
  21.  
  22. local tim = m.Target.Parent:GetChildren()
  23.  
  24. for i = 1,#tim do
  25.  
  26. if tim[i]:FindFirstChild("SB23134121") then
  27. else
  28.  
  29. if tim[i]:IsA("BasePart") or tim[i]:IsA("UnionOperation") then
  30. if tim[i].Locked == true then
  31. local raise = Instance.new("BodyPosition",tim[i])
  32. tim[i].Anchored = false
  33. tim[i].CanCollide = false
  34. raise.Position = tim[i].Position + Vector3.new(0,10,0)
  35.  
  36. SelectionBox(tim[i],0.01)
  37.  
  38. delay(math.random(1,40)/10,function()
  39.  
  40. tim[i].Anchored = false
  41. tim[i].CanCollide = true
  42. tim[i]:BreakJoints()
  43. wait(1)
  44. raise:remove()
  45. wait(3)
  46.  
  47. if tim[i]:findFirstChild("SB23134121") then
  48. tim[i].SB23134121:remove()
  49. end
  50.  
  51. end)
  52. end
  53. end
  54. end
  55.  
  56. end
  57.  
  58. end
  59. end
  60. end
  61. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement