Advertisement
Rufus14

SCP-173 NPC

May 31st, 2019
2,251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 22.65 KB | None | 0 0
  1. --By Rufus14
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4.     local env = getfenv(func)
  5.     local newenv = setmetatable({},{
  6.         __index = function(self,k)
  7.             if k=="script" then
  8.                 return var
  9.             else
  10.                 return env[k]
  11.             end
  12.         end,
  13.     })
  14.     setfenv(func,newenv)
  15.     return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Model0 = Instance.new("Model")
  20. Part1 = Instance.new("Part")
  21. Sound2 = Instance.new("Sound")
  22. Script3 = Instance.new("Script")
  23. Sound4 = Instance.new("Sound")
  24. Sound5 = Instance.new("Sound")
  25. Part6 = Instance.new("Part")
  26. Weld7 = Instance.new("Weld")
  27. Sound8 = Instance.new("Sound")
  28. Weld9 = Instance.new("Weld")
  29. SpecialMesh10 = Instance.new("SpecialMesh")
  30. Sound11 = Instance.new("Sound")
  31. Sound12 = Instance.new("Sound")
  32. Sound13 = Instance.new("Sound")
  33. Sound14 = Instance.new("Sound")
  34. Sound15 = Instance.new("Sound")
  35. Sound16 = Instance.new("Sound")
  36. Weld17 = Instance.new("Weld")
  37. Model0.Name = "SCP-173"
  38. Model0.Parent = mas
  39. Part1.Name = "Head"
  40. Part1.Parent = Model0
  41. Part1.CFrame = CFrame.new(1.76984, 3.30001307, 118.930084, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  42. Part1.Position = Vector3.new(1.76984, 3.30001307, 118.930084)
  43. Part1.Size = Vector3.new(1.59999943, 6.60000134, 3.00000072)
  44. Part1.Anchored = true
  45. Part1.BottomSurface = Enum.SurfaceType.Smooth
  46. Part1.TopSurface = Enum.SurfaceType.Smooth
  47. Sound2.Name = "Death"
  48. Sound2.Parent = Part1
  49. Sound2.Pitch = 0.20000000298023
  50. Sound2.PlaybackSpeed = 0.20000000298023
  51. Sound2.SoundId = "rbxassetid://515093461"
  52. Sound2.Volume = 1
  53. Script3.Name = "SCP AI"
  54. Script3.Parent = Part1
  55. table.insert(cors,sandbox(Script3,function()
  56. --By Rufus14
  57. ragdolldeath = true
  58. cantouchkill = false
  59. debugmode = false
  60. canchase = true
  61. chasing = false
  62. amount = 0
  63. speed = 0.6
  64. heartbeat = game:GetService("RunService").Stepped
  65. pathfindingser = game:GetService("PathfindingService")
  66. scphead = script.Parent
  67. hitbox = script.Parent.Hitbox
  68. deathsound = script.Parent.Death
  69. killsound = script.Parent.Kill
  70. jumpscaresounds = {scphead.Jumpscare,scphead.Jumpscare2,scphead.Jumpscare3,scphead.Jumpscare4,scphead.Jumpscare5,scphead.Jumpscare6}
  71. concretemovesound = script.Parent["Concrete Moving"]
  72. canjumpscare = false
  73. distance = 120
  74. function checkhowmanycharactersseeme()
  75.     while heartbeat:wait() do
  76.         amount = 0
  77.         for i,v in pairs(workspace:GetChildren()) do
  78.             if v.ClassName == "Model" then
  79.                 local characterhumanoid = v:findFirstChildOfClass("Humanoid")
  80.                 local characterscpdet = v:findFirstChild("SCPDetection")
  81.                 local characterhead = v:findFirstChild("Head")
  82.                 if characterhumanoid and characterscpdet then
  83.                     if characterhumanoid.Health > 0 then
  84.                         if (characterscpdet.Position - scphead.Position).magnitude < distance then
  85.                             if characterhead.Orientation.y > characterscpdet.Orientation.y - 90 and characterhead.Orientation.y < characterscpdet.Orientation.y + 90 then
  86.                                 amount = amount + 1
  87.                                 if debugmode then
  88.                                     print(v.Name)
  89.                                 end
  90.                             else
  91.                                 --do n o t h i n g
  92.                             end
  93.                         end
  94.                     end
  95.                 end
  96.             end
  97.         end
  98.         if debugmode then
  99.             print("people staring at this thing: "..amount)
  100.         end
  101.     end
  102. end
  103. function adddetectors()
  104.     while heartbeat:wait() do
  105.         for i,v in pairs(workspace:GetChildren()) do
  106.             if v.ClassName == "Model" then
  107.                 local characterhumanoid = v:findFirstChildOfClass("Humanoid")
  108.                 local characterhead = v:findFirstChild("Head")
  109.                 if characterhumanoid and characterhead then
  110.                     if characterhumanoid.Health <= 0 then
  111.                         if v:findFirstChild("SCPDetection") then
  112.                             v:findFirstChild("SCPDetection"):destroy()
  113.                         end
  114.                     else
  115.                         if not v:findFirstChild("SCPDetection") then
  116.                             local lookpart = Instance.new("Part", v)
  117.                             lookpart.CanCollide = false
  118.                             lookpart.Size = Vector3.new(1,1,1)
  119.                             lookpart.Anchored = true
  120.                             lookpart.Shape = "Cylinder"
  121.                             lookpart.Transparency = 1
  122.                             if debugmode then
  123.                                 lookpart.Transparency = 0
  124.                             end
  125.                             lookpart.Name = "SCPDetection"
  126.                             local deed = false
  127.                             local function lookatme()
  128.                                 local hed = characterhead
  129.                                 while heartbeat:wait() do
  130.                                     lookpart.CFrame = CFrame.new(hed.Position, scphead.Position)
  131.                                 end
  132.                             end
  133.                             spawn(lookatme)
  134.                         end
  135.                     end
  136.                 end
  137.             end
  138.         end
  139.     end
  140. end
  141. function orientation()
  142.     while heartbeat:wait() do
  143.         scphead.Orientation = Vector3.new(0,scphead.Orientation.y,0)
  144.     end
  145. end
  146. function kill(part)
  147.     if cantouchkill then
  148.         if part.Parent then
  149.             local victimhumanoid = part.Parent:findFirstChildOfClass("Humanoid")
  150.             if victimhumanoid then
  151.                 if victimhumanoid.Health > 0 then
  152.                     killsound:Play()
  153.                     for i,v in pairs(victimhumanoid.Parent:GetChildren()) do
  154.                         if v.ClassName == "Script" or v.ClassName == "LocalScript" then
  155.                             v.Disabled = true
  156.                         end
  157.                     end
  158.                     victimhumanoid.Parent:BreakJoints()
  159.                     victimhumanoid.Health = 0
  160.                     if ragdolldeath then
  161.                         ragdollkill(victimhumanoid.Parent)
  162.                     end
  163.                     if scphead:findFirstChild("ChaseWho") then
  164.                         scphead:findFirstChild("ChaseWho"):destroy()
  165.                     end
  166.                 end
  167.             end
  168.         end
  169.     end
  170. end
  171. hitbox.Touched:connect(kill)
  172. going = false
  173. function attack()
  174.     while heartbeat:wait() do
  175.         if amount == 0 and canchase then
  176.             cantouchkill = true
  177.             canjumpscare = true
  178.             going = true
  179.             for i,v in pairs(workspace:GetChildren()) do
  180.                 if v.ClassName == "Model" and v.Name ~= scphead.Parent.Name then
  181.                     local characterhumanoid = v:findFirstChildOfClass("Humanoid")
  182.                     local characterhead = v:findFirstChild("Head")
  183.                     if characterhumanoid and characterhead then
  184.                         if characterhumanoid.Health > 0 then
  185.                             if not scphead:findFirstChild("ChaseWho") then
  186.                                 chasewho = Instance.new("ObjectValue", scphead)
  187.                                 chasewho.Name = "ChaseWho"
  188.                                 chasewho.Value = characterhead
  189.                             end
  190.                             if (chasewho.Value.Position - scphead.Position).magnitude < distance then
  191.                                 chasing = true
  192.                                 local path = pathfindingser:FindPathAsync(scphead.Position, chasewho.Value.Position, distance)
  193.                                 local waypoints = path:GetWaypoints()
  194.                                 if path.Status == Enum.PathStatus.Success then
  195.                                     for i,v in pairs(waypoints) do
  196.                                         if i >= 3 then
  197.                                             if amount == 0 then
  198.                                                 scphead.Anchored = true
  199.                                                 scphead.CFrame = CFrame.new(v.Position)
  200.                                                 scphead.CFrame = scphead.CFrame * CFrame.new(0,6.6/2,0)
  201.                                                 scphead.CFrame = CFrame.new(scphead.Position, chasewho.Value.Position) * CFrame.fromEulerAnglesXYZ(-0.1,0,0)
  202.                                                 concretemovesound.Volume = 2
  203.                                                 cantouchkill = true
  204.                                                 wait(0.05)
  205.                                             end
  206.                                         end
  207.                                     end
  208.                                 else
  209.                                     scphead.Anchored = false
  210.                                 end
  211.                                 chasing = false
  212.                                 concretemovesound.Volume = 0
  213.                             else
  214.                                 chasewho:destroy()
  215.                                 chasing = false
  216.                             end
  217.                         elseif characterhumanoid.Health <= 0 then
  218.                             scphead.Anchored = true
  219.                             chasing = false
  220.                         end
  221.                     end
  222.                 end
  223.             end
  224.         else
  225.             if going then
  226.                 for i,v in pairs(workspace:GetChildren()) do
  227.                     if v.ClassName == "Model" then
  228.                         local characterhumanoid = v:findFirstChildOfClass("Humanoid")
  229.                         local characterhead = v:findFirstChild("Head")
  230.                         if characterhumanoid and characterhead then
  231.                             if characterhumanoid.Health > 0 then
  232.                                 if (characterhead.Position - scphead.Position).magnitude < 20 then
  233.                                     canjumpscare = false
  234.                                     local whatjumpscare = math.random(1,table.getn(jumpscaresounds))
  235.                                     jumpscaresounds[whatjumpscare]:Play()
  236.                                 end
  237.                             elseif characterhumanoid.Health <= 0 then
  238.                                 --nothing again
  239.                             end
  240.                         end
  241.                     end
  242.                 end
  243.             end
  244.             if scphead:findFirstChild("ChaseWho") then
  245.                 scphead:findFirstChild("ChaseWho"):destroy()
  246.             end
  247.             cantouchkill = false
  248.             scphead.Anchored = true
  249.             chasing = false
  250.             going = false
  251.             concretemovesound.Volume = 0
  252.         end
  253.     end
  254. end
  255. function ragdollkill(character)
  256.     local victimshumanoid = character:findFirstChildOfClass("Humanoid")
  257.     if not character:findFirstChild("UpperTorso") then
  258.         character.Archivable = true
  259.         local ragdoll = character:Clone()
  260.         ragdoll:findFirstChildOfClass("Humanoid").Health = 0
  261.         if ragdoll:findFirstChild("Health") then
  262.             if ragdoll:findFirstChild("Health").ClassName == "Script" then
  263.                 ragdoll:findFirstChild("Health").Disabled = true
  264.             end
  265.         end
  266.         for i,v in pairs(character:GetChildren()) do
  267.             if v.ClassName == "Part" or v.ClassName == "ForceField" or v.ClassName == "Accessory" or v.ClassName == "Hat" then
  268.                 v:destroy()
  269.             end
  270.         end
  271.         for i,v in pairs(character:GetChildren()) do
  272.             if v.ClassName == "Accessory" then
  273.                 local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
  274.                 if attachment1 then
  275.                     for q,w in pairs(character:GetChildren()) do
  276.                         if w.ClassName == "Part" then
  277.                             local attachment2 = w:findFirstChild(attachment1.Name)
  278.                             if attachment2 then
  279.                                 local hinge = Instance.new("HingeConstraint", v.Handle)
  280.                                 hinge.Attachment0 = attachment1
  281.                                 hinge.Attachment1 = attachment2
  282.                                 hinge.LimitsEnabled = true
  283.                                 hinge.LowerAngle = 0
  284.                                 hinge.UpperAngle = 0
  285.                             end
  286.                         end
  287.                     end
  288.                 end
  289.             end
  290.         end
  291.         ragdoll.Parent = workspace
  292.         if ragdoll:findFirstChild("Right Arm") then
  293.             local glue = Instance.new("Glue", ragdoll.Torso)
  294.             glue.Part0 = ragdoll.Torso
  295.             glue.Part1 = ragdoll:findFirstChild("Right Arm")
  296.             glue.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  297.             glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  298.             local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Arm"))
  299.             limbcollider.Size = Vector3.new(1.4,1,1)
  300.             limbcollider.Shape = "Cylinder"
  301.             limbcollider.Transparency = 1
  302.             limbcollider.Name = "LimbCollider"
  303.             local limbcolliderweld = Instance.new("Weld", limbcollider)
  304.             limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Arm")
  305.             limbcolliderweld.Part1 = limbcollider
  306.             limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  307.         end
  308.         if ragdoll:findFirstChild("Left Arm") then
  309.             local glue = Instance.new("Glue", ragdoll.Torso)
  310.             glue.Part0 = ragdoll.Torso
  311.             glue.Part1 = ragdoll:findFirstChild("Left Arm")
  312.             glue.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  313.             glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  314.             local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Arm"))
  315.             limbcollider.Size = Vector3.new(1.4,1,1)
  316.             limbcollider.Shape = "Cylinder"
  317.             limbcollider.Name = "LimbCollider"
  318.             limbcollider.Transparency = 1
  319.             local limbcolliderweld = Instance.new("Weld", limbcollider)
  320.             limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Arm")
  321.             limbcolliderweld.Part1 = limbcollider
  322.             limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  323.         end
  324.         if ragdoll:findFirstChild("Left Leg") then
  325.             local glue = Instance.new("Glue", ragdoll.Torso)
  326.             glue.Part0 = ragdoll.Torso
  327.             glue.Part1 = ragdoll:findFirstChild("Left Leg")
  328.             glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  329.             glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  330.             local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Leg"))
  331.             limbcollider.Size = Vector3.new(1.4,1,1)
  332.             limbcollider.Shape = "Cylinder"
  333.             limbcollider.Name = "LimbCollider"
  334.             limbcollider.Transparency = 1
  335.             local limbcolliderweld = Instance.new("Weld", limbcollider)
  336.             limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Leg")
  337.             limbcolliderweld.Part1 = limbcollider
  338.             limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  339.         end
  340.         if ragdoll:findFirstChild("Right Leg") then
  341.             local glue = Instance.new("Glue", ragdoll.Torso)
  342.             glue.Part0 = ragdoll.Torso
  343.             glue.Part1 = ragdoll:findFirstChild("Right Leg")
  344.             glue.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  345.             glue.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  346.             local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Leg"))
  347.             limbcollider.Size = Vector3.new(1.4,1,1)
  348.             limbcollider.Shape = "Cylinder"
  349.             limbcollider.Name = "LimbCollider"
  350.             limbcollider.Transparency = 1
  351.             local limbcolliderweld = Instance.new("Weld", limbcollider)
  352.             limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Leg")
  353.             limbcolliderweld.Part1 = limbcollider
  354.             limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  355.         end
  356.         if ragdoll:findFirstChild("Head") and ragdoll.Torso:findFirstChild("NeckAttachment") then
  357.             local HeadAttachment = Instance.new("Attachment", ragdoll["Head"])
  358.             HeadAttachment.Position = Vector3.new(0, -0.5, 0)
  359.             local connection = Instance.new('HingeConstraint', ragdoll["Head"])
  360.             connection.LimitsEnabled = true
  361.             connection.Attachment0 = ragdoll.Torso.NeckAttachment
  362.             connection.Attachment1 = HeadAttachment
  363.             connection.UpperAngle = 60
  364.             connection.LowerAngle = -60
  365.         elseif ragdoll:findFirstChild("Head") and not ragdoll.Torso:findFirstChild("NeckAttachment") then
  366.             local hedweld = Instance.new("Weld", ragdoll.Torso)
  367.             hedweld.Part0 = ragdoll.Torso
  368.             hedweld.Part1 = ragdoll.Head
  369.             hedweld.C0 = CFrame.new(0,1.5,0)
  370.         end
  371.         game.Debris:AddItem(ragdoll, 30)
  372.     elseif character:findFirstChild("UpperTorso") then
  373.         character.Archivable = true
  374.         local ragdoll = character:Clone()
  375.         ragdoll:findFirstChildOfClass("Humanoid").Health = 0
  376.         if ragdoll:findFirstChild("Health") then
  377.             if ragdoll:findFirstChild("Health").ClassName == "Script" then
  378.                 ragdoll:findFirstChild("Health").Disabled = true
  379.             end
  380.         end
  381.         for i,v in pairs(character:GetChildren()) do
  382.             if v.ClassName == "Part" or v.ClassName == "ForceField" or v.ClassName == "Accessory" or v.ClassName == "Hat" or v.ClassName == "MeshPart" then
  383.                 v:destroy()
  384.             end
  385.         end
  386.         for i,v in pairs(character:GetChildren()) do
  387.             if v.ClassName == "Accessory" then
  388.                 local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
  389.                 if attachment1 then
  390.                     for q,w in pairs(character:GetChildren()) do
  391.                         if w.ClassName == "Part" or w.ClassName == "MeshPart" then
  392.                             local attachment2 = w:findFirstChild(attachment1.Name)
  393.                             if attachment2 then
  394.                                 local hinge = Instance.new("HingeConstraint", v.Handle)
  395.                                 hinge.Attachment0 = attachment1
  396.                                 hinge.Attachment1 = attachment2
  397.                                 hinge.LimitsEnabled = true
  398.                                 hinge.LowerAngle = 0
  399.                                 hinge.UpperAngle = 0
  400.                             end
  401.                         end
  402.                     end
  403.                 end
  404.             end
  405.         end
  406.         ragdoll.Parent = workspace
  407.         local Humanoid = ragdoll:findFirstChildOfClass("Humanoid")
  408.         Humanoid.PlatformStand = true
  409.         local function makeballconnections(limb, attachementone, attachmenttwo, twistlower, twistupper)
  410.             local connection = Instance.new('BallSocketConstraint', limb)
  411.             connection.LimitsEnabled = true
  412.             connection.Attachment0 = attachementone
  413.             connection.Attachment1 = attachmenttwo
  414.             connection.TwistLimitsEnabled = true
  415.             connection.TwistLowerAngle = twistlower
  416.             connection.TwistUpperAngle = twistupper
  417.             local limbcollider = Instance.new("Part", limb)
  418.             limbcollider.Size = Vector3.new(0.1,1,1)
  419.             limbcollider.Shape = "Cylinder"
  420.             limbcollider.Transparency = 1
  421.             limbcollider:BreakJoints()
  422.             local limbcolliderweld = Instance.new("Weld", limbcollider)
  423.             limbcolliderweld.Part0 = limb
  424.             limbcolliderweld.Part1 = limbcollider
  425.             limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
  426.         end
  427.         local function makehingeconnections(limb, attachementone, attachmenttwo, lower, upper)
  428.             local connection = Instance.new('HingeConstraint', limb)
  429.             connection.LimitsEnabled = true
  430.             connection.Attachment0 = attachementone
  431.             connection.Attachment1 = attachmenttwo
  432.             connection.LimitsEnabled = true
  433.             connection.LowerAngle = lower
  434.             connection.UpperAngle = upper
  435.             local limbcollider = Instance.new("Part", limb)
  436.             limbcollider.Size = Vector3.new(0.1,1,1)
  437.             limbcollider.Shape = "Cylinder"
  438.             limbcollider.Transparency = 1
  439.             limbcollider:BreakJoints()
  440.             local limbcolliderweld = Instance.new("Weld", limbcollider)
  441.             limbcolliderweld.Part0 = limb
  442.             limbcolliderweld.Part1 = limbcollider
  443.             limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
  444.         end
  445.         local HeadAttachment = Instance.new("Attachment", Humanoid.Parent.Head)
  446.         HeadAttachment.Position = Vector3.new(0, -0.5, 0)
  447.         makehingeconnections(Humanoid.Parent.Head, HeadAttachment, ragdoll.UpperTorso.NeckAttachment, -50, 50)
  448.         makehingeconnections(Humanoid.Parent.LowerTorso, Humanoid.Parent.LowerTorso.WaistRigAttachment, Humanoid.Parent.UpperTorso.WaistRigAttachment, -50, 50)
  449.         makeballconnections(Humanoid.Parent.LeftUpperArm, Humanoid.Parent.LeftUpperArm.LeftShoulderRigAttachment, Humanoid.Parent.UpperTorso.LeftShoulderRigAttachment, -200, 200, 180)
  450.         makehingeconnections(Humanoid.Parent.LeftLowerArm, Humanoid.Parent.LeftLowerArm.LeftElbowRigAttachment, Humanoid.Parent.LeftUpperArm.LeftElbowRigAttachment, 0, -60)
  451.         makehingeconnections(Humanoid.Parent.LeftHand, Humanoid.Parent.LeftHand.LeftWristRigAttachment, Humanoid.Parent.LeftLowerArm.LeftWristRigAttachment, -20, 20)
  452.         --
  453.         makeballconnections(Humanoid.Parent.RightUpperArm, Humanoid.Parent.RightUpperArm.RightShoulderRigAttachment, Humanoid.Parent.UpperTorso.RightShoulderRigAttachment, -200, 200, 180)
  454.         makehingeconnections(Humanoid.Parent.RightLowerArm, Humanoid.Parent.RightLowerArm.RightElbowRigAttachment, Humanoid.Parent.RightUpperArm.RightElbowRigAttachment, 0, -60)
  455.         makehingeconnections(Humanoid.Parent.RightHand, Humanoid.Parent.RightHand.RightWristRigAttachment, Humanoid.Parent.RightLowerArm.RightWristRigAttachment, -20, 20)
  456.         --
  457.         makeballconnections(Humanoid.Parent.RightUpperLeg, Humanoid.Parent.RightUpperLeg.RightHipRigAttachment, Humanoid.Parent.LowerTorso.RightHipRigAttachment, -80, 80, 80)
  458.         makehingeconnections(Humanoid.Parent.RightLowerLeg, Humanoid.Parent.RightLowerLeg.RightKneeRigAttachment, Humanoid.Parent.RightUpperLeg.RightKneeRigAttachment, 0, 60)
  459.         makehingeconnections(Humanoid.Parent.RightFoot, Humanoid.Parent.RightFoot.RightAnkleRigAttachment, Humanoid.Parent.RightLowerLeg.RightAnkleRigAttachment, -20, 20)
  460.         --
  461.         makeballconnections(Humanoid.Parent.LeftUpperLeg, Humanoid.Parent.LeftUpperLeg.LeftHipRigAttachment, Humanoid.Parent.LowerTorso.LeftHipRigAttachment, -80, 80, 80)
  462.         makehingeconnections(Humanoid.Parent.LeftLowerLeg, Humanoid.Parent.LeftLowerLeg.LeftKneeRigAttachment, Humanoid.Parent.LeftUpperLeg.LeftKneeRigAttachment, 0, 60)
  463.         makehingeconnections(Humanoid.Parent.LeftFoot, Humanoid.Parent.LeftFoot.LeftAnkleRigAttachment, Humanoid.Parent.LeftLowerLeg.LeftAnkleRigAttachment, -20, 20)
  464.         for i,v in pairs(Humanoid.Parent:GetChildren()) do
  465.             if v.ClassName == "Accessory" then
  466.                 local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
  467.                 if attachment1 then
  468.                     for q,w in pairs(Humanoid.Parent:GetChildren()) do
  469.                         if w.ClassName == "Part" then
  470.                             local attachment2 = w:findFirstChild(attachment1.Name)
  471.                             if attachment2 then
  472.                                 local hinge = Instance.new("HingeConstraint", v.Handle)
  473.                                 hinge.Attachment0 = attachment1
  474.                                 hinge.Attachment1 = attachment2
  475.                                 hinge.LimitsEnabled = true
  476.                                 hinge.LowerAngle = 0
  477.                                 hinge.UpperAngle = 0
  478.                             end
  479.                         end
  480.                     end
  481.                 end
  482.             end
  483.         end
  484.         for i,v in pairs(ragdoll:GetChildren()) do
  485.             for q,w in pairs(v:GetChildren()) do
  486.                 if w.ClassName == "Motor6D"--[[ and w.Name ~= "Neck"--]] then
  487.                     w:destroy()
  488.                 end
  489.             end
  490.         end
  491.         if ragdoll:findFirstChild("HumanoidRootPart") then
  492.             ragdoll.HumanoidRootPart.Anchored = true
  493.             ragdoll.HumanoidRootPart.CanCollide = false
  494.         end
  495.         game.Debris:AddItem(ragdoll, 30)
  496.     end
  497. end
  498. spawn(orientation)
  499. spawn(attack)
  500. spawn(checkhowmanycharactersseeme)
  501. spawn(adddetectors)
  502. end))
  503. Sound4.Name = "Kill"
  504. Sound4.Parent = Part1
  505. Sound4.SoundId = "rbxassetid://2808764165"
  506. Sound5.Name = "Concrete Moving"
  507. Sound5.Parent = Part1
  508. Sound5.Looped = true
  509. Sound5.Playing = true
  510. Sound5.SoundId = "rbxassetid://171705140"
  511. Sound5.Volume = 0
  512. Part6.Name = "Hitbox"
  513. Part6.Parent = Part1
  514. Part6.CFrame = CFrame.new(1.76983643, 3.30001259, 117.730087, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  515. Part6.Position = Vector3.new(1.76983643, 3.30001259, 117.730087)
  516. Part6.Transparency = 1
  517. Part6.Size = Vector3.new(1.59999943, 6.60000134, 4.20000076)
  518. Part6.BottomSurface = Enum.SurfaceType.Smooth
  519. Part6.CanCollide = false
  520. Part6.Material = Enum.Material.ForceField
  521. Part6.TopSurface = Enum.SurfaceType.Smooth
  522. Weld7.Parent = Part6
  523. Weld7.C0 = CFrame.new(-256, 10, 256, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  524. Weld7.C1 = CFrame.new(-257.769836, -3.30001307, 138.269913, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  525. Weld7.Part0 = nil
  526. Weld7.Part1 = Part6
  527. Weld7.part1 = Part6
  528. Sound8.Name = "Dread"
  529. Sound8.Parent = Part1
  530. Sound8.Looped = true
  531. Sound8.Playing = true
  532. Sound8.SoundId = "rbxassetid://345477939"
  533. Sound8.Volume = 2
  534. Weld9.Parent = Part1
  535. Weld9.C0 = CFrame.new(0, 0, -1.19999838, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  536. Weld9.Part0 = Part1
  537. Weld9.Part1 = Part6
  538. Weld9.part1 = Part6
  539. SpecialMesh10.Parent = Part1
  540. SpecialMesh10.MeshId = "rbxassetid://476426932"
  541. SpecialMesh10.Scale = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  542. SpecialMesh10.TextureId = "rbxassetid://1464875005"
  543. SpecialMesh10.MeshType = Enum.MeshType.FileMesh
  544. Sound11.Name = "Jumpscare"
  545. Sound11.Parent = Part1
  546. Sound11.MaxDistance = 20
  547. Sound11.SoundId = "rbxassetid://150184992"
  548. Sound12.Name = "Jumpscare2"
  549. Sound12.Parent = Part1
  550. Sound12.MaxDistance = 20
  551. Sound12.SoundId = "rbxassetid://150184965"
  552. Sound12.Volume = 1
  553. Sound13.Name = "Jumpscare3"
  554. Sound13.Parent = Part1
  555. Sound13.MaxDistance = 20
  556. Sound13.SoundId = "rbxassetid://150185006"
  557. Sound14.Name = "Jumpscare4"
  558. Sound14.Parent = Part1
  559. Sound14.MaxDistance = 20
  560. Sound14.EmitterSize = 10000
  561. Sound14.MinDistance = 10000
  562. Sound14.SoundId = "rbxassetid://497249345"
  563. Sound15.Name = "Jumpscare5"
  564. Sound15.Parent = Part1
  565. Sound15.MaxDistance = 20
  566. Sound15.SoundId = "rbxassetid://150185025"
  567. Sound16.Name = "Jumpscare6"
  568. Sound16.Parent = Part1
  569. Sound16.MaxDistance = 20
  570. Sound16.SoundId = "rbxassetid://2899948244"
  571. Weld17.Parent = Part1
  572. Weld17.C0 = CFrame.new(-256, 10, 256, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  573. Weld17.C1 = CFrame.new(-257.769836, -3.30001307, 137.069916, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  574. Weld17.Part0 = nil
  575. Weld17.Part1 = Part1
  576. Weld17.part1 = Part1
  577. for i,v in pairs(mas:GetChildren()) do
  578.     v.Parent = script
  579.     pcall(function() v:MakeJoints() end)
  580. end
  581. mas:Destroy()
  582. for i,v in pairs(cors) do
  583.     spawn(function()
  584.         pcall(v)
  585.     end)
  586. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement