Dodikman

add

Mar 5th, 2019
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. while wait() do
  2. if not game.Workspace:FindFirstChild("scriptOneBrick") then
  3. local sob = Instance.new("Part")
  4. sob.Parent = game.Workspace
  5. sob.Name = "scriptOneBrick"
  6. sob.Position = Vector3.new(0, 100, 0)
  7. sob.Size = Vector3.new(10, 10, 10)
  8. sob.Shape = "Ball"
  9. sob.Anchored = true
  10. sob.CanCollide = false
  11. sob.Transparency = 0.5
  12. else
  13. local sob = game.Workspace:FindFirstChild("scriptOneBrick")
  14. for _, v in pairs(game.Workspace:GetChildren()) do
  15. if v:FindFirstChild("Humanoid") then
  16. local hum = v:FindFirstChild("Humanoid")
  17. if v:FindFirstChild("HumanoidRootPart") then
  18. local hrp = v:FindFirstChild("HumanoidRootPart")
  19. if not hrp:FindFirstChild("RopeConstraint") then
  20. local rope = Instance.new("RopeConstraint")
  21. rope.Length = 100
  22. rope.Parent = hrp
  23. rope.Visible = true
  24. rope.Restitution = 1
  25. local att0 = Instance.new("Attachment")
  26. att0.Parent = hrp
  27. local att1 = Instance.new("Attachment")
  28. att1.Parent = sob
  29. rope.Attachment0 = att0
  30. rope.Attachment1 = att1
  31. else
  32. local rope = hrp:FindFirstChild("RopeConstraint")
  33. if rope.Attachment0 == nil then
  34. local att0 = Instance.new("Attachment")
  35. att0.Parent = hrp
  36. rope.Attachment0 = att0
  37. elseif rope.Attachment1 == nil then
  38. local att1 = Instance.new("Attachment")
  39. att1.Parent = sob
  40. rope.Attachment1 = att1
  41. end
  42. end
  43. end
  44. end
  45. end
  46. end
  47. end
Advertisement
Add Comment
Please, Sign In to add comment