TheUnknownDiscord

grab

Sep 11th, 2021 (edited)
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. where = Instance.new("RemoteEvent", owner.Character)
  2. where.Name = "whereat"
  3. NLS([[
  4. where = owner.Character:WaitForChild("whereat")
  5. local mouse = owner:GetMouse()
  6. mouse.Button1Down:connect(function()
  7. where:FireServer()
  8. end)
  9. mouse.Button1Up:connect(function()
  10. where:FireServer()
  11. end)
  12. ]],owner.PlayerGui)
  13. part1 = Instance.new("Part", game.Workspace)
  14. part1.Anchored = false
  15. part1.Transparency = 0.5
  16. part1.CanCollide = false
  17. on = 0
  18. local bp2 = Instance.new("BodyPosition",part1)
  19. bp2.D = 100
  20. bp2.P = 10000
  21. local target
  22. function wherepart(plr, pos)
  23. on = on + 1
  24. if on == "1" then
  25. pos.Position = pos.Position * 10
  26. elseif on == "2" then
  27. pos.Position = pos.Position * -10
  28. weld:Destroy()
  29. wait(0.1)
  30. on = 0
  31. end
  32. end
  33. for i,v in pairs(owner.Character:GetDescendants()) do
  34. if v:IsA("BasePart") then
  35. ownerparts = v
  36. end
  37. end
  38. function touched()
  39. if target ~= ownerparts then
  40. weld = Instance.new("WeldConstraint")
  41. weld.Parent = workspace
  42. weld.Part0 = part1
  43. weld.Part1 = target
  44. end
  45. end
  46. part1.Touched:Connect(touched)
  47. where.OnServerEvent:Connect(wherepart)
  48. while true do
  49. task.wait()
  50. bp2.position = owner.Character.Head.Position
  51. end
Add Comment
Please, Sign In to add comment