The_God_M8

Untitled

Apr 18th, 2019 (edited)
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.03 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local Client = Players.LocalPlayer
  3. local Character = Client.Character or Client.CharacterAdded:Wait()
  4. local WeldBase = Character:WaitForChild("HumanoidRootPart")
  5. local ArmBase = Character:FindFirstChild("RightHand") or Character:FindFirstChild("Right Arm") or WeldBase
  6. local Backpack = Client:WaitForChild("Backpack")
  7. local Mouse = Client:GetMouse()
  8. local LP = game:GetService("Players").LocalPlayer
  9. local Char = LP.Character
  10. local Heartbeat = game:GetService("RunService").Heartbeat
  11. local HRP = Char:WaitForChild("HumanoidRootPart")
  12. local TweenService = game:GetService("TweenService")
  13. local humanoid = game:GetService("Players").LocalPlayer.Character.Humanoid
  14.  
  15.  
  16.  
  17. local Camera = workspace.CurrentCamera
  18.  
  19. local VRService = game:GetService("VRService")
  20. local VRReady = VRService.VREnabled
  21.  
  22. local UserInputService = game:GetService("UserInputService")
  23. local RunService = game:GetService("RunService")
  24. local HttpService = game:GetService("HttpService")
  25. local StarterGui = game:GetService("StarterGui")
  26.  
  27. local function GetExtraTool()
  28. for _, Tool in next, Character:GetChildren() do
  29. if Tool:IsA("Tool") and not Tool.Name:match("LIMB_TOOL") then
  30. return Tool
  31. end
  32. end
  33. end
  34.  
  35. local function GetGripForHandle(Handle)
  36. for _, Weld in next, Character:GetDescendants() do
  37. if Weld:IsA("Weld") and (Weld.Part0 == Handle or Weld.Part1 == Handle) then
  38. return Weld
  39. end
  40. end
  41.  
  42. wait(.2)
  43.  
  44. for _, Weld in next, Character:GetDescendants() do
  45. if Weld:IsA("Weld") and (Weld.Part0 == Handle or Weld.Part1 == Handle) then
  46. return Weld
  47. end
  48. end
  49. end
  50.  
  51. local function CreateRightGrip(Handle)
  52. local RightGrip = Instance.new("Weld")
  53.  
  54. RightGrip.Name = "RightGrip"
  55. RightGrip.Part1 = Handle
  56. RightGrip.Part0 = WeldBase
  57. RightGrip.Parent = WeldBase
  58.  
  59. return RightGrip
  60. end
  61.  
  62. local TrackerArm = Instance.new("Part")
  63. TrackerArm.Parent = game.Workspace
  64. TrackerArm.Size = Vector3.new(1, 2, 1)
  65. TrackerArm.Anchored = true
  66. TrackerArm.CanCollide = false
  67. TrackerArm.Transparency = 1
  68.  
  69. game.Players.LocalPlayer.Character.ChildAdded:Connect(function()
  70. local EquippedTool = GetExtraTool()
  71. if EquippedTool and EquippedTool:FindFirstChild("Handle") then
  72. game:GetService("RunService").Stepped:Connect(function()
  73. if game.Players.LocalPlayer.Character:FindFirstChild("Right Arm") then
  74. TrackerArm.CFrame = game.Players.LocalPlayer.Character:FindFirstChild("Right Arm").CFrame
  75. end
  76. wait()
  77. end)
  78.  
  79. EquippedTool.Handle.CanCollide = false
  80. local refp = Instance.new("Part", TrackerArm)
  81. refp.Size = EquippedTool.Handle.Size
  82. refp.Transparency = 1
  83. refp.CanCollide = false
  84. refp.Massless = true
  85. refp.Material = "Neon"
  86. local refw = Instance.new("Weld", TrackerArm)
  87. refw.Part0 = TrackerArm
  88. refw.Part1 = refp
  89. refw.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, -0)
  90. refw.C1 = EquippedTool.Grip
  91. wait(0.1)
  92.  
  93. local ArmBaseCFrame = ArmBase.CFrame
  94. if ArmBase.Name == "Right Arm" then
  95. ArmBaseCFrame = ArmBaseCFrame
  96. end
  97. print(EquippedTool.Name)
  98.  
  99. local BP = Instance.new('BodyPosition', EquippedTool.Handle)
  100.  
  101. BP.D = 100
  102. BP.P = 6000
  103. BP.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  104.  
  105. local BG = Instance.new("BodyGyro", EquippedTool.Handle)
  106. BG.CFrame = refp.CFrame
  107. BG.MaxTorque = Vector3.new(math.huge,math.huge,math.huge)
  108. BG.D = 100
  109. BG.P = 20000
  110.  
  111. repeat
  112. BP.Position = refp.Position
  113. BG.CFrame = refp.CFrame
  114. --EquippedTool.Handle.CanCollide = false
  115. game:GetService("RunService").Stepped:Wait()
  116. until EquippedTool.Parent ~= Character
  117.  
  118. refp:Destroy()
  119. refw:Destroy()
  120. BP:Destroy()
  121. BG:Destroy()
  122.  
  123.  
  124. end
  125. end)
Add Comment
Please, Sign In to add comment