Advertisement
Xnatee

FE Hold Accessories Script

May 26th, 2022
953
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. --made by Nightmare#0930
  2. local lp = game.Players.LocalPlayer
  3. local char = lp.Character
  4.  
  5. for i, v in pairs(char:GetChildren()) do
  6. if v:IsA("BallSocketConstraint") then
  7. v:Destroy()
  8. end
  9. end
  10.  
  11. for i, v in pairs(char:GetChildren()) do
  12. if v:IsA("HingeConstraint") then
  13. v:Destroy()
  14. end
  15. end
  16.  
  17. for i, v in pairs(char.Humanoid:GetAccessories()) do
  18. local hat = v.Name
  19.  
  20. char[hat].Archivable = true
  21. local fake = char[hat]:Clone()
  22. fake.Parent = char
  23. fake.Handle.Transparency = 1
  24.  
  25. local hold = false
  26. local enabled = false
  27.  
  28. char[hat].Handle.AccessoryWeld:Destroy()
  29.  
  30. local tool = Instance.new("Tool", lp.Backpack)
  31. tool.RequiresHandle = true
  32. tool.CanBeDropped = false
  33. tool.Name = hat
  34.  
  35. local handle = Instance.new("Part", tool)
  36. handle.Name = "Handle"
  37. handle.Size = Vector3.new(1, 1, 1)
  38. handle.Massless = true
  39. handle.Transparency = 1
  40.  
  41. local positions = {
  42. forward = tool.GripForward,
  43. pos = tool.GripPos,
  44. right = tool.GripRight,
  45. up = tool.GripUp
  46. }
  47.  
  48. tool.Equipped:connect(function()
  49. hold = true
  50. end)
  51.  
  52. tool.Unequipped:connect(function()
  53. hold = false
  54. end)
  55.  
  56. tool.Activated:connect(function()
  57. if enabled == false then
  58. enabled = true
  59. tool.GripForward = Vector3.new(-0.976,0,-0.217)
  60. tool.GripPos = Vector3.new(.95,-0.76,1.4)
  61. tool.GripRight = Vector3.new(0.217,0, 0.976)
  62. tool.GripUp = Vector3.new(0,1,0)
  63. wait(.8)
  64. tool.GripForward = positions.forward
  65. tool.GripPos = positions.pos
  66. tool.GripRight = positions.right
  67. tool.GripUp = positions.up
  68. enabled = false
  69. end
  70. end)
  71.  
  72. game:GetService("RunService").Heartbeat:connect(function()
  73. pcall(function()
  74. char[hat].Handle.Velocity = Vector3.new(30, 0, 0)
  75. if hold == false then
  76. char[hat].Handle.CFrame = fake.Handle.CFrame
  77. elseif hold == true then
  78. char[hat].Handle.CFrame = handle.CFrame
  79. end
  80. end)
  81. end)
  82. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement