Advertisement
BNutty07

main for 106

Nov 4th, 2017
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.57 KB | None | 0 0
  1. --[[ By: Brutez ]]--
  2. local SCP106MainScript = script;
  3. local SCP106 = SCP106MainScript.Parent;
  4. local Head = SCP106:FindFirstChild("Head");
  5. local HumanoidRootPart = SCP106:FindFirstChild("HumanoidRootPart");
  6. local LeftArm = SCP106:FindFirstChild("Left Arm");
  7. local LeftLeg = SCP106:FindFirstChild("Left Leg");
  8. local RightArm = SCP106:FindFirstChild("Right Arm");
  9. local RightLeg = SCP106:FindFirstChild("Right Leg");
  10. local Torso = SCP106:FindFirstChild("Torso");
  11. local SCP106Humanoid = SCP106:FindFirstChild("Humanoid");
  12. local SCP106WalkAnimation = SCP106Humanoid:LoadAnimation(SCP106.WalkAnim);
  13. repeat Wait(0) until SCP106Humanoid ~= nil
  14. repeat SCP106Humanoid:TakeDamage(10) SCP106Humanoid.Health = SCP106Humanoid.MaxHealth Wait(0) until SCP106Humanoid.Health == SCP106Humanoid.MaxHealth
  15. local SpawnForceField = Instance.new("ForceField")
  16. SpawnForceField.Name = "SpawnForceField"
  17. SpawnForceField.Parent = SCP106
  18. function FollowTarget(TargetHumanoid, TargetTorso)
  19. if not TargetHumanoid or not TargetHumanoid.Parent or TargetHumanoid.Health == 0 or not TargetTorso or not TargetTorso.Parent then
  20. return
  21. end
  22. local SCP106RadiusXAxis = math.random(-2,2)
  23. local SCP106RadiusYAxis = math.random(-2,2)
  24. local SCP106RadiusZAxis = math.random(-2,2)
  25. Torso.CFrame = (Torso.CFrame + Torso.CFrame.lookVector * (SCP106Humanoid.WalkSpeed/30))
  26. Torso.CFrame = CFrame.new(Torso.Position, TargetTorso.Position)
  27. SCP106Humanoid:MoveTo(TargetTorso.Position+Vector3.new(SCP106RadiusXAxis,SCP106RadiusYAxis,SCP106RadiusZAxis), TargetTorso)
  28. end
  29. function CloseAttack(TargetHumanoid, TargetTorso)
  30. if not TargetHumanoid or not TargetHumanoid.Parent or TargetHumanoid.Health == 0 or not TargetTorso or not TargetTorso.Parent then
  31. return
  32. end
  33. local NeckSnapAnim = SCP106Humanoid:LoadAnimation(SCP106.NeckSnapAnim);
  34. NeckSnapAnim:Play()
  35. Wait(0.2)
  36. if TargetTorso~=nil and(Torso.Position-TargetTorso.Position).magnitude<=10 then
  37. local SelectedAttackList = {"NeckSnap1", "NeckSnap2", "NeckSnap3"};
  38. local SelectedAttackSound = Head[math.random(1, #SelectedAttackList)];
  39. SelectedAttackSound:Play()
  40. TargetTorso.Parent.Humanoid:TakeDamage(99999e99999)
  41. end
  42. Wait(0.3)
  43. end
  44. function FindTarget()
  45. local ClosestCharacter
  46. local ClosestHumanoid = nil
  47. local ClosestTorso = nil
  48. local ClosestTorsoDistance = 99999e99999
  49. for TargetCount, TargetModel in pairs(Game.Workspace:GetChildren()) do
  50. if TargetModel:IsA("Model") and (TargetModel ~= SCP106) and (TargetModel.Name ~= SCP106.Name) and (TargetModel.Name ~= "SCP-173") and (TargetModel.Name ~= "SCP-432-1") and (TargetModel.Name ~= "SCP-049") and (TargetModel.Name ~= "SCP-096") then
  51. if TargetModel:FindFirstChild("Humanoid")~=nil then
  52. local humanoid = TargetModel:FindFirstChild("Humanoid")
  53. local torso = TargetModel:FindFirstChild("Torso")
  54. if torso ~= nil then
  55. local TorsoDistance = (torso.Position - Torso.Position).magnitude
  56. if humanoid and humanoid.Health > 0 and torso and TorsoDistance <= ClosestTorsoDistance then
  57. ClosestCharacter = TargetModel
  58. ClosestHumanoid = humanoid
  59. ClosestTorso = torso
  60. ClosestTorsoDistance = TorsoDistance
  61. end
  62. end
  63. end
  64. end
  65. end
  66. return ClosestCharacter, ClosestHumanoid, ClosestTorso
  67. end
  68. function FindTarget2()
  69. local ClosestCharacter
  70. local ClosestHumanoid = nil
  71. local ClosestTorso = nil
  72. local ClosestTorsoDistance = 7
  73. for TargetCount, TargetModel in pairs(Game.Workspace:GetChildren()) do
  74. if TargetModel:IsA("Model") and (TargetModel ~= SCP106) and (TargetModel.Name ~= SCP106.Name) and (TargetModel.Name ~= "SCP-173") and (TargetModel.Name ~= "SCP-432-1") and (TargetModel.Name ~= "SCP-049") and (TargetModel.Name ~= "SCP-096") then
  75. if TargetModel:FindFirstChild("Humanoid")~=nil then
  76. local humanoid = TargetModel:FindFirstChild("Humanoid")
  77. local torso = TargetModel:FindFirstChild("Torso")
  78. if torso ~= nil then
  79. local TorsoDistance = (torso.Position - Torso.Position).magnitude
  80. if humanoid and humanoid.Health > 0 and torso and TorsoDistance <= ClosestTorsoDistance then
  81. ClosestCharacter = TargetModel
  82. ClosestHumanoid = humanoid
  83. ClosestTorso = torso
  84. ClosestTorsoDistance = TorsoDistance
  85. end
  86. end
  87. end
  88. end
  89. end
  90. return ClosestCharacter, ClosestHumanoid, ClosestTorso
  91. end
  92. Wait(5)
  93. for DavidHealthCheck = 1,5 do
  94. SCP106Humanoid.Health = SCP106Humanoid.MaxHealth
  95. Wait(0)
  96. end
  97. SCP106WalkAnimation:Play()
  98. Torso.Anchored = true
  99. SpawnForceField:Destroy()
  100. Head["Oldman5"]:Play()
  101. if SCP106Humanoid.Health > 0 then
  102. SCP106["BumpInTheNight"]:Play()
  103. end
  104. coroutine.resume(coroutine.create(function()
  105. while Wait(0) do
  106. if SCP106Humanoid.Health == 0 or SCP106Humanoid.Health < 0 then
  107. Torso.Anchored = false
  108. SCP106["BumpInTheNight"]:Stop()
  109. SCP106Humanoid.WalkSpeed = 0
  110. Wait(5)
  111. SCP106:Destroy()
  112. end
  113. if SCP106Humanoid.AutoRotate==false then
  114. SCP106Humanoid.AutoRotate=true
  115. end
  116. if SCP106Humanoid.Jump==true then
  117. SCP106Humanoid.Jump=false
  118. end
  119. if SCP106Humanoid.PlatformStand==true then
  120. SCP106Humanoid.PlatformStand=false
  121. end
  122. if SCP106Humanoid.Sit==true then
  123. SCP106Humanoid.Sit=false
  124. end
  125. end
  126. end))
  127. coroutine.resume(coroutine.create(function()
  128. while Wait(0) do
  129. if SCP106Humanoid.Health ~= 0 or SCP106Humanoid.Health > 0 then
  130. local character, humanoid, torso = FindTarget()
  131. if character and character.Parent and humanoid and humanoid.Parent and torso and torso.Parent then
  132. FollowTarget(humanoid, torso)
  133. end
  134. end
  135. end
  136. end))
  137. coroutine.resume(coroutine.create(function()
  138. while Wait(0) do
  139. if SCP106Humanoid.Health ~= 0 or SCP106Humanoid.Health > 0 then
  140. local character, humanoid, torso = FindTarget2()
  141. if character and character.Parent and humanoid and humanoid.Parent and torso and torso.Parent then
  142. CloseAttack(humanoid, torso)
  143. end
  144. end
  145. end
  146. end))
  147. --[[ By: Brutez ]]--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement