TheUnknownDiscord

rope

Sep 2nd, 2021 (edited)
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Tool = Instance.new("Tool")
  2. Tool.Name = "Sword"
  3. Knife = Instance.new("Part")
  4. Knife.Name = "Handle"
  5. Knife.Parent = Tool
  6. Tool.Parent = workspace.Lucas_YT111
  7. Knife.Size = Vector3.new(1, 1, 1)
  8. Knife.Massless = true
  9. Knife.CanCollide = true
  10. myhum = owner.Character.Humanoid
  11. local stab = Instance.new("Sound", owner.character.Head)
  12. stab.SoundId = "rbxassetid://199607491"
  13. stab.Volume = 0.5
  14. islunging = false
  15. Tool.Activated:connect(function()
  16. islunging = true
  17. stab.PlaybackSpeed = math.random(80, 125)/100
  18. stab:Stop()
  19. stab:Play()
  20. local Anim = Instance.new("StringValue")
  21. Anim.Name = "toolanim"
  22. Anim.Value = "Lunge"
  23. Anim.Parent = Tool
  24. wait(0.5)
  25. islunging = false
  26. end)
  27. part = Instance.new("Part",game.Workspace)
  28. part.Anchored = true
  29. part.CFrame = CFrame.new(0,1000,0)
  30. part.Size = Vector3.new(0.05,0.05,0.05)
  31. part.Transparency = 1
  32. roped = false
  33. function thinghere(plr,action,hit, target)
  34. if roped then
  35. alignposition:Destroy()
  36. roped = false
  37. else
  38. if islunging then
  39. part.Anchored = true
  40. roped = true
  41. part.CFrame = hit
  42. local attachment0 = Instance.new("Attachment")
  43. attachment0.Parent = part
  44. local attachment1 = Instance.new("Attachment")
  45. attachment1.Parent = Knife
  46. alignposition = Instance.new("RopeConstraint")
  47. alignposition.Parent = Knife
  48. alignposition.Attachment0 = attachment0
  49. alignposition.Attachment1 = attachment1
  50. alignposition.Visible = true
  51. local distance = (owner.Character.Torso.CFrame.Position - part.CFrame.Position).magnitude - 1
  52. alignposition.Length = distance
  53. alignposition.Thickness = 0.25
  54. alignposition.Restitution = 0.25
  55. local weld = Instance.new("WeldConstraint")
  56. weld.Part0 = target
  57. weld.Part1 = part
  58. weld.Parent = part
  59. end
  60. end
  61. end
  62. local E = Instance.new("RemoteEvent",NLS([[local E = script:FindFirstChildWhichIsA("RemoteEvent")
  63. count = 0
  64. local Mouse = owner:GetMouse()
  65. function ButtonDown()
  66. if Mouse.Hit ~= nil then
  67. target = Mouse.Target
  68. E:FireServer("Down",Mouse.Hit, target)
  69. count = count + 1
  70. if count == 1 then
  71. owner.Character.Humanoid.PlatformStand = true
  72. bodygyro = Instance.new('BodyGyro', owner.Character.HumanoidRootPart)
  73. bodygyro.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
  74. bodygyro.P = 10000
  75.  
  76. fly = Instance.new("BodyVelocity",owner.Character.HumanoidRootPart)
  77. fly.MaxForce = Vector3.new(0,0,0)
  78. coroutine.wrap(function()
  79. while count == 1 do
  80. task.wait()
  81. bodygyro.CFrame = CFrame.new(workspace.CurrentCamera.CFrame.Position,owner.Character.HumanoidRootPart.CFrame.Position)
  82. if owner.Character.Humanoid.MoveDirection ~= Vector3.new(0,0,0) then
  83. fly.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  84. fly.Velocity = owner.Character.HumanoidRootPart.CFrame.lookVector * math.huge
  85. elseif owner.Character.Humanoid.MoveDirection == Vector3.new(0,0,0) then
  86. fly.MaxForce = Vector3.new(0,0,0)
  87. end
  88. end
  89. end)()
  90. elseif count == 2 then
  91. bodygyro:Destroy()
  92. fly:Destroy()
  93. owner.Character.Humanoid.PlatformStand = false
  94. count = 0
  95. end
  96. end
  97. end
  98. Mouse.Button1Down:Connect(ButtonDown)
  99. ]],owner.PlayerGui))
  100. E.OnServerEvent:Connect(thinghere)
Add Comment
Please, Sign In to add comment