Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local p = game.Players.LocalPlayer
- local m = p:GetMouse()
- local on = false
- p.Character.Humanoid.PlatformStand = true
- m.Button1Down:connect(function()
- on = true
- end)
- m.Button1Up:connect(function()
- on = false
- end)
- local A1 = Instance.new("Attachment")
- local A2 = Instance.new("Attachment")
- local Rope = Instance.new("RopeConstraint")
- delay(0,function()
- while wait() do
- if on and m.Target then
- A1.Parent = m.Target
- A1.Position = -(m.Target.Position - m.Hit.p)
- A2.Parent = p.Character.Torso
- Rope.Parent = p.Character.Torso
- Rope.Attachment0 = A1
- Rope.Attachment1 = A2
- Rope.Length = (m.Hit.p - p.Character.Torso.Position).magnitude
- Rope.Visible = true
- print((m.Target.Position - p.Character.Torso.Position).magnitude)
- repeat wait() until not on
- else
- A1.Parent = nil
- A2.Parent = nil
- Rope.Parent = nil
- Rope.Attachment0 = nil
- Rope.Attachment1 = nil
- repeat wait() until on
- end
- end
- end)
Add Comment
Please, Sign In to add comment