Cra-Z-Gaming

Hold Unanchored items script

Mar 8th, 2025
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.96 KB | None | 0 0
  1. --hold unancored items--
  2.  
  3. -- r15
  4. -- made by joshclark756#7155
  5. local mouse = game.Players.LocalPlayer:GetMouse()
  6. local uis = game:GetService("UserInputService")
  7.  
  8. -- Connect
  9. mouse.Button1Down:Connect(function()
  10. -- Check for Target & Left Shift
  11. if mouse.Target and uis:IsKeyDown(Enum.KeyCode.LeftControl) then
  12. local npc = mouse.target
  13. local PlayerCharacter = game:GetService("Players").LocalPlayer.Character
  14. local PlayerRootPart = PlayerCharacter.HumanoidRootPart
  15. local A0 = Instance.new("Attachment")
  16. local AP = Instance.new("AlignPosition")
  17. local AO = Instance.new("AlignOrientation")
  18. local A1 = Instance.new("Attachment")
  19. for _, v in pairs(npc:GetDescendants()) do
  20. if v:IsA("Part") and v.Name ~= "HumanoidRootPart" then
  21. game:GetService("RunService").Stepped:Connect(function()
  22. v.CanCollide = false
  23. end)
  24. end
  25. end
  26.  
  27. for _, v in pairs(PlayerCharacter:GetDescendants()) do
  28. if v:IsA("BasePart") then
  29. if v.Name == "HumanoidRootPart" or v.Name == "UpperTorso" or v.Name == "Head" then
  30. end
  31. end
  32. end
  33. PlayerRootPart.Position = PlayerRootPart.Position+Vector3.new(0, 0, 0)
  34. A0.Parent = npc
  35. AP.Parent = npc
  36. AO.Parent = npc
  37. AP.Responsiveness = 200
  38. AP.MaxForce = math.huge
  39. AO.MaxTorque = math.huge
  40. AO.Responsiveness = 200
  41. AP.Attachment0 = A0
  42. AP.Attachment1 = A1
  43. AO.Attachment1 = A1
  44. AO.Attachment0 = A0
  45. A1.Parent = PlayerCharacter.RightHand
  46. end
  47. end)
  48. -- r6
  49. -- made by joshclark756#7155
  50. local mouse = game.Players.LocalPlayer:GetMouse()
  51. local uis = game:GetService("UserInputService")
  52.  
  53. -- Connect
  54. mouse.Button1Down:Connect(function()
  55. -- Check for Target & Left Shift
  56. if mouse.Target and uis:IsKeyDown(Enum.KeyCode.LeftControl) then
  57. local npc = mouse.target
  58. local PlayerCharacter = game:GetService("Players").LocalPlayer.Character
  59. local PlayerRootPart = PlayerCharacter.HumanoidRootPart
  60. local A0 = Instance.new("Attachment")
  61. local AP = Instance.new("AlignPosition")
  62. local AO = Instance.new("AlignOrientation")
  63. local A1 = Instance.new("Attachment")
  64. for _, v in pairs(npc:GetDescendants()) do
  65. if v:IsA("Part") and v.Name ~= "HumanoidRootPart" then
  66. game:GetService("RunService").Stepped:Connect(function()
  67. v.CanCollide = false
  68. end)
  69. end
  70. end
  71.  
  72. for _, v in pairs(PlayerCharacter:GetDescendants()) do
  73. if v:IsA("BasePart") then
  74. if v.Name == "HumanoidRootPart" or v.Name == "UpperTorso" or v.Name == "Head" then
  75. end
  76. end
  77. end
  78. PlayerRootPart.Position = PlayerRootPart.Position+Vector3.new(0, 0, 0)
  79. A0.Parent = npc
  80. AP.Parent = npc
  81. AO.Parent = npc
  82. AP.Responsiveness = 200
  83. AP.MaxForce = math.huge
  84. AO.MaxTorque = math.huge
  85. AO.Responsiveness = 200
  86. AP.Attachment0 = A0
  87. AP.Attachment1 = A1
  88. AO.Attachment1 = A1
  89. AO.Attachment0 = A0
  90. A1.Parent = PlayerCharacter.RightArm
  91. end
  92. end)
  93. -- remove attachments
  94. -- made by joshclark756#7155
  95. for _, v in next, game:GetDescendants() do
  96. if v and v:IsA"Attachment" and v.Parent == game.Players.LocalPlayer.Character.RightHand
  97. then do v:destroy()
  98. end
  99. end
  100.  
  101. end
Advertisement
Add Comment
Please, Sign In to add comment