Dark_EccentricYT

Untitled

Oct 31st, 2020 (edited)
15,375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.12 KB | None | 0 0
  1. --https://v3rmillion.net/showthread.php?tid=1063479
  2. --You do need to be wearing the hat yourself
  3. local hatid = "HatIdHere"
  4. local hatname = game:GetObjects("rbxassetid://".. hatid)[1].Name
  5. local victimname = "VictimNameHere"
  6.  
  7. local plrs = game:GetService("Players")
  8. local plr = plrs.LocalPlayer
  9. local hat = plr.Character:FindFirstChild(hatname)
  10. local hatc = hat:Clone()
  11. hatc.Parent = plr.Character
  12. local bp = Instance.new("BodyPosition", hat.Handle)
  13. local victim = plrs:FindFirstChild(victimname)
  14. local heartbeat = game:GetService("RunService").Heartbeat
  15.  
  16. hat.Handle.AccessoryWeld:Destroy()
  17. hatc.Handle.Transparency = 1
  18.  
  19. if getgenv().netted then
  20. if getgenv().netted == false then
  21. spawn(function()
  22. plrs.PlayerAdded:Connect(function(player)
  23. player.MaximumSimulationRadius = 0.1;
  24. sethiddenproperty(player, "SimulationRadius", 0);
  25. end)
  26.  
  27. for _,player in pairs(plrs:GetPlayers()) do
  28. if player ~= plr then
  29. player.MaximumSimulationRadius = 0.1;
  30. sethiddenproperty(player, "SimulationRadius", 0);
  31. end
  32. end
  33.  
  34. while true do
  35. heartbeat:Wait();
  36. settings().Physics.AllowSleep = false;
  37. plr.MaximumSimulationRadius = math.huge;
  38. if setsimulationradius then
  39. setsimulationradius(math.huge);
  40. else
  41. sethiddenproperty(plr, "SimulationRadius", math.huge);
  42. end
  43. end
  44. end)
  45. end
  46. else
  47. getgenv().netted = true
  48. spawn(function()
  49. plrs.PlayerAdded:Connect(function(player)
  50. player.MaximumSimulationRadius = 0.1;
  51. sethiddenproperty(player, "SimulationRadius", 0);
  52. end)
  53.  
  54. for _,player in pairs(plrs:GetPlayers()) do
  55. if player ~= plr then
  56. player.MaximumSimulationRadius = 0.1;
  57. sethiddenproperty(player, "SimulationRadius", 0);
  58. end
  59. end
  60.  
  61. while true do
  62. heartbeat:Wait();
  63. settings().Physics.AllowSleep = false;
  64. plr.MaximumSimulationRadius = math.huge;
  65. if setsimulationradius then
  66. setsimulationradius(math.huge);
  67. else
  68. sethiddenproperty(plr, "SimulationRadius", math.huge);
  69. end
  70. end
  71. end)
  72. end
  73.  
  74. local function weld(attachment0, attachment1, part0)
  75. local weldpos = Instance.new("AlignPosition", part0)
  76. weldpos.Attachment0 = attachment0
  77. weldpos.Attachment1 = attachment1
  78. weldpos.RigidityEnabled = false
  79. weldpos.ReactionForceEnabled = false
  80. weldpos.ApplyAtCenterOfMass = false
  81. weldpos.MaxForce = 5000
  82. weldpos.MaxVelocity = 5000
  83. weldpos.Responsiveness = 200
  84. local weldrot = Instance.new("AlignOrientation", part0)
  85. weldrot.Attachment0 = attachment0
  86. weldrot.Attachment1 = attachment1
  87. weldrot.ReactionTorqueEnabled = true
  88. weldrot.PrimaryAxisOnly = false
  89. weldrot.MaxTorque = 1000
  90. weldrot.MaxAngularVelocity = 1000
  91. weldrot.Responsiveness = 200
  92. end
  93.  
  94. local attname = hat.Handle:FindFirstChildOfClass("Attachment").Name
  95.  
  96. if victim.Character:FindFirstChildOfClass("Humanoid").RigType == Enum.HumanoidRigType.R6 then
  97. if victim.Character.Torso:FindFirstChild(attname) then
  98. hatc.Handle.AccessoryWeld.Part1 = victim.Character.Torso
  99. elseif victim.Character.Head:FindFirstChild(attname) then
  100. hatc.Handle.AccessoryWeld.Part1 = victim.Character.Head
  101. end
  102. else
  103. if victim.Character.UpperTorso:FindFirstChild(attname) then
  104. hatc.Handle.AccessoryWeld.Part1 = victim.Character.UpperTorso
  105. elseif victim.Character.Head:FindFirstChild(attname) then
  106. hatc.Handle.AccessoryWeld.Part1 = victim.Character.Head
  107. end
  108. end
  109.  
  110. bp.Position = hatc.Handle.Position
  111. bp.D = 999999999999999
  112. bp.P = 999999999999999999999999999999
  113. bp.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  114.  
  115. spawn(function()
  116. repeat
  117. heartbeat:Wait()
  118. bp.Position = hatc.Handle.Position
  119. hat.Handle.Orientation = hatc.Handle.Orientation
  120. until (bp == nil)
  121. end)
  122.  
  123. plr.CharacterRemoving:Connect(function()
  124. if (bp ~= nil) then
  125. bp = nil
  126. end
  127. end)
  128.  
  129. plrs.PlayerRemoving:Connect(function(player)
  130. if player == victim then
  131. hatc:Destroy()
  132. hat:Destroy()
  133. end
  134. end)
  135.  
  136. victim.CharacterAdded:Connect(function(chary)
  137. hatc.Handle.CanCollide = false
  138. hat.Handle.CanCollide = false
  139. repeat wait() until victim.Character:FindFirstChildOfClass("Humanoid")
  140. wait()
  141. local hum = victim.Character:FindFirstChildOfClass("Humanoid")
  142. if hum.RigType == Enum.HumanoidRigType.R6 then
  143. repeat wait() until chary:FindFirstChild("Head")
  144. repeat wait() until chary:FindFirstChild("Torso")
  145. else
  146. repeat wait() until chary:FindFirstChild("Head")
  147. repeat wait() until chary:FindFirstChild("UpperTorso")
  148. end
  149. hatc.Handle.Anchored = false
  150. if hum.RigType == Enum.HumanoidRigType.R6 then
  151. if victim.Character.Torso:FindFirstChild(attname) then
  152. hatc.Handle.AccessoryWeld.Part1 = victim.Character.Torso
  153. elseif victim.Character.Head:FindFirstChild(attname) then
  154. hatc.Handle.AccessoryWeld.Part1 = victim.Character.Head
  155. end
  156. else
  157. if victim.Character.UpperTorso:FindFirstChild(attname) then
  158. hatc.Handle.AccessoryWeld.Part1 = victim.Character.UpperTorso
  159. elseif victim.Character.Head:FindFirstChild(attname) then
  160. hatc.Handle.AccessoryWeld.Part1 = victim.Character.Head
  161. end
  162. end
  163. end)
  164.  
  165. victim.Character:FindFirstChildOfClass("Humanoid").Died:Connect(function()
  166. hatc.Handle.CanCollide = true
  167. hat.Handle.CanCollide = true
  168. end)
Add Comment
Please, Sign In to add comment