assbagfaggotidk

jeff script

Jan 18th, 2017
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.29 KB | None | 0 0
  1. --[[ By: Brutez. ]]--
  2. local JeffTheKillerScript=script;
  3. repeat Wait(0)until JeffTheKillerScript and JeffTheKillerScript.Parent and JeffTheKillerScript.Parent.ClassName=="Model"and JeffTheKillerScript.Parent:FindFirstChild("Head")and JeffTheKillerScript.Parent:FindFirstChild("Torso");
  4. local JeffTheKiller=JeffTheKillerScript.Parent;
  5. function raycast(Spos,vec,currentdist)
  6. local hit2,pos2=game.Workspace:FindPartOnRay(Ray.new(Spos+(vec*.05),vec*currentdist),JeffTheKiller);
  7. if hit2~=nil and pos2 then
  8. if hit2.Name=="Handle" and not hit2.CanCollide or string.sub(hit2.Name,1,6)=="Effect"and not hit2.CanCollide then
  9. local currentdist=currentdist-(pos2-Spos).magnitude;
  10. return raycast(pos2,vec,currentdist);
  11. end;
  12. end;
  13. return hit2,pos2;
  14. end;
  15. function RayCast(Position,Direction,MaxDistance,IgnoreList)
  16. return Game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(Position,Direction.unit*(MaxDistance or 999.999)),IgnoreList);
  17. end;
  18. --[[if JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Thumbnail")then]]--
  19. --[[JeffTheKiller:FindFirstChild("Thumbnail"):Destroy();]]--
  20. --[[end;]]--
  21. local JeffTheKillerHumanoid;
  22. for _,Child in pairs(JeffTheKiller:GetChildren())do
  23. if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
  24. JeffTheKillerHumanoid=Child;
  25. end;
  26. end;
  27. local AttackDebounce=false;
  28. local JeffTheKillerKnife=JeffTheKiller:FindFirstChild("Knife");
  29. local JeffTheKillerHead=JeffTheKiller:FindFirstChild("Head");
  30. local JeffTheKillerHumanoidRootPart=JeffTheKiller:FindFirstChild("HumanoidRootPart");
  31. local WalkDebounce=false;
  32. local Notice=false;
  33. local JeffLaughDebounce=false;
  34. local MusicDebounce=false;
  35. local NoticeDebounce=false;
  36. local ChosenMusic;
  37. JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0);
  38. local OriginalC0=JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0;
  39. function FindNearestBae()
  40. local NoticeDistance=100;
  41. local TargetMain;
  42. for _,TargetModel in pairs(Game:GetService("Workspace"):GetChildren())do
  43. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and TargetModel.className=="Model"and TargetModel~=JeffTheKiller and TargetModel.Name~=JeffTheKiller.Name and TargetModel:FindFirstChild("Torso")and TargetModel:FindFirstChild("Head")then
  44. local TargetPart=TargetModel:FindFirstChild("Torso");
  45. local FoundHumanoid;
  46. for _,Child in pairs(TargetModel:GetChildren())do
  47. if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
  48. FoundHumanoid=Child;
  49. end;
  50. end;
  51. if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<NoticeDistance then
  52. TargetMain=TargetPart;
  53. NoticeDistance=(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude;
  54. local hit,pos=raycast(JeffTheKillerHumanoidRootPart.Position,(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).unit,500)
  55. if hit and hit.Parent and hit.Parent.ClassName=="Model"and hit.Parent:FindFirstChild("Torso")and hit.Parent:FindFirstChild("Head")then
  56. if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<9 and not AttackDebounce then
  57. Spawn(function()
  58. AttackDebounce=true;
  59. local SwingAnimation=JeffTheKillerHumanoid:LoadAnimation(JeffTheKiller:FindFirstChild("Swing"));
  60. local SwingChoice=math.random(1,2);
  61. local HitChoice=math.random(1,3);
  62. SwingAnimation:Play();
  63. SwingAnimation:AdjustSpeed(1.5+(math.random()*0.1));
  64. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Swing")then
  65. local SwingSound=JeffTheKillerKnife:FindFirstChild("Swing");
  66. SwingSound.Pitch=1+(math.random()*0.04);
  67. SwingSound:Play();
  68. end;
  69. Wait(0.3);
  70. if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<8 then
  71. FoundHumanoid:TakeDamage(30);
  72. if HitChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit1")then
  73. local HitSound=JeffTheKillerKnife:FindFirstChild("Hit1");
  74. HitSound.Pitch=1+(math.random()*0.04);
  75. HitSound:Play();
  76. elseif HitChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit2")then
  77. local HitSound=JeffTheKillerKnife:FindFirstChild("Hit2");
  78. HitSound.Pitch=1+(math.random()*0.04);
  79. HitSound:Play();
  80. elseif HitChoice==3 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit3")then
  81. local HitSound=JeffTheKillerKnife:FindFirstChild("Hit3");
  82. HitSound.Pitch=1+(math.random()*0.04);
  83. HitSound:Play();
  84. end;
  85. end;
  86. Wait(0.1);
  87. AttackDebounce=false;
  88. end);
  89. end;
  90. end;
  91. end;
  92. end;
  93. end;
  94. return TargetMain;
  95. end;
  96. while Wait(0)do
  97. local TargetPoint=JeffTheKillerHumanoid.TargetPoint;
  98. local Blockage,BlockagePos=RayCast((JeffTheKillerHumanoidRootPart.CFrame+CFrame.new(JeffTheKillerHumanoidRootPart.Position,Vector3.new(TargetPoint.X,JeffTheKillerHumanoidRootPart.Position.Y,TargetPoint.Z)).lookVector*(JeffTheKillerHumanoidRootPart.Size.Z/2)).p,JeffTheKillerHumanoidRootPart.CFrame.lookVector,(JeffTheKillerHumanoidRootPart.Size.Z*2.5),{JeffTheKiller,JeffTheKiller})
  99. local Jumpable=false;
  100. if Blockage then
  101. Jumpable=true;
  102. if Blockage and Blockage.Parent and Blockage.Parent.ClassName~="Workspace"then
  103. local BlockageHumanoid;
  104. for _,Child in pairs(Blockage.Parent:GetChildren())do
  105. if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
  106. BlockageHumanoid=Child;
  107. end;
  108. end;
  109. if Blockage and Blockage:IsA("Terrain")then
  110. local CellPos=Blockage:WorldToCellPreferSolid((BlockagePos-Vector3.new(0,2,0)));
  111. local CellMaterial,CellShape,CellOrientation=Blockage:GetCell(CellPos.X,CellPos.Y,CellPos.Z);
  112. if CellMaterial==Enum.CellMaterial.Water then
  113. Jumpable=false;
  114. end;
  115. elseif BlockageHumanoid or Blockage.ClassName=="TrussPart"or Blockage.ClassName=="WedgePart"or Blockage.Name=="Handle"and Blockage.Parent.ClassName=="Hat"or Blockage.Name=="Handle"and Blockage.Parent.ClassName=="Tool"then
  116. Jumpable=false;
  117. end;
  118. end;
  119. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and not JeffTheKillerHumanoid.Sit and Jumpable then
  120. JeffTheKillerHumanoid.Jump=true;
  121. end;
  122. end;
  123. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHumanoidRootPart and JeffTheKillerHead:FindFirstChild("Jeff_Step")and (JeffTheKillerHumanoidRootPart.Velocity-Vector3.new(0,JeffTheKillerHumanoidRootPart.Velocity.y,0)).magnitude>=5 and not WalkDebounce and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then
  124. Spawn(function()
  125. WalkDebounce=true;
  126. local FiredRay=Ray.new(JeffTheKillerHumanoidRootPart.Position,Vector3.new(0,-4,0));
  127. local RayTarget,endPoint=Game:GetService("Workspace"):FindPartOnRay(FiredRay,JeffTheKiller);
  128. if RayTarget then
  129. local JeffTheKillerHeadFootStepClone=JeffTheKillerHead:FindFirstChild("Jeff_Step"):Clone();
  130. JeffTheKillerHeadFootStepClone.Parent=JeffTheKillerHead;
  131. JeffTheKillerHeadFootStepClone:Play();
  132. JeffTheKillerHeadFootStepClone:Destroy();
  133. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed<17 then
  134. Wait(0.4);
  135. elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed>17 then
  136. Wait(0.15);
  137. end
  138. end;
  139. WalkDebounce=false;
  140. end);
  141. end;
  142. local MainTarget=FindNearestBae();
  143. local FoundHumanoid;
  144. if MainTarget then
  145. for _,Child in pairs(MainTarget.Parent:GetChildren())do
  146. if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
  147. FoundHumanoid=Child;
  148. end;
  149. end;
  150. end;
  151. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and MainTarget.Parent and FoundHumanoid and FoundHumanoid.Jump then
  152. JeffTheKillerHumanoid.Jump=true;
  153. end;
  154. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<25 then
  155. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and not JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then
  156. JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=1;
  157. JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Play();
  158. end;
  159. elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>25 then
  160. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then
  161. if not JeffLaughDebounce then
  162. Spawn(function()
  163. JeffLaughDebounce=true;
  164. repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume-0.1;else break;end;until JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume==0 or JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume<0;
  165. JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0;
  166. JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop();
  167. JeffLaughDebounce=false;
  168. end);
  169. end;
  170. end;
  171. end;
  172. if not ChosenMusic and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<50 then
  173. local MusicChoice=math.random(1,2);
  174. if MusicChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1")then
  175. ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1");
  176. elseif MusicChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2")then
  177. ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2");
  178. end;
  179. if JeffTheKillerScript and JeffTheKiller and ChosenMusic and not ChosenMusic.IsPlaying then
  180. ChosenMusic.Volume=0.5;
  181. ChosenMusic:Play();
  182. end;
  183. elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>50 then
  184. if JeffTheKillerScript and JeffTheKiller and ChosenMusic and ChosenMusic.IsPlaying then
  185. if not MusicDebounce then
  186. Spawn(function()
  187. MusicDebounce=true;
  188. repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and ChosenMusic then ChosenMusic.Volume=ChosenMusic.Volume-0.01;else break;end;until ChosenMusic.Volume==0 or ChosenMusic.Volume<0;
  189. if ChosenMusic then
  190. ChosenMusic.Volume=0;
  191. ChosenMusic:Stop();
  192. end;
  193. ChosenMusic=nil;
  194. MusicDebounce=false;
  195. end);
  196. end;
  197. end;
  198. end;
  199. if not MainTarget and not JeffLaughDebounce then
  200. Spawn(function()
  201. JeffLaughDebounce=true;
  202. repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume-0.1;else break;end;until JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume==0 or JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume<0;
  203. JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0;
  204. JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop();
  205. JeffLaughDebounce=false;
  206. end);
  207. end;
  208. if not MainTarget and not MusicDebounce then
  209. Spawn(function()
  210. MusicDebounce=true;
  211. repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and ChosenMusic then ChosenMusic.Volume=ChosenMusic.Volume-0.01;else break;end;until ChosenMusic.Volume==0 or ChosenMusic.Volume<0;
  212. if ChosenMusic then
  213. ChosenMusic.Volume=0;
  214. ChosenMusic:Stop();
  215. end;
  216. ChosenMusic=nil;
  217. MusicDebounce=false;
  218. end);
  219. end;
  220. if MainTarget then
  221. Notice=true;
  222. if Notice and not NoticeDebounce and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Susto2")then
  223. JeffTheKillerHead:FindFirstChild("Jeff_Susto2"):Play();
  224. NoticeDebounce=true;
  225. end
  226. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then
  227. if MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>5 then
  228. JeffTheKillerHumanoid.WalkSpeed=30;
  229. elseif MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<5 then
  230. JeffTheKillerHumanoid.WalkSpeed=0.004;
  231. end;
  232. JeffTheKillerHumanoid:MoveTo(MainTarget.Position+(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).unit*2,Game:GetService("Workspace"):FindFirstChild("Terrain"));
  233. local NeckRotation=(JeffTheKiller:FindFirstChild("Torso").Position.Y-MainTarget.Parent:FindFirstChild("Head").Position.Y)/10;
  234. if NeckRotation>-1.5 and NeckRotation<1.5 then
  235. JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=OriginalC0*CFrame.fromEulerAnglesXYZ(NeckRotation,0,0);
  236. end;
  237. if NeckRotation<-1.5 then
  238. JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,-0.993636549,0.112633869,0,0.112633869,0.993636549);
  239. elseif NeckRotation>1.5 then
  240. JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0.996671617,0.081521146,0,0.081521146,-0.996671617);
  241. end;
  242. else
  243. end;
  244. else
  245. Notice=false;
  246. NoticeDebounce=false;
  247. JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0);
  248. local RandomWalk=math.random(1,150);
  249. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then
  250. JeffTheKillerHumanoid.WalkSpeed=12;
  251. if RandomWalk==1 then
  252. JeffTheKillerHumanoid:MoveTo(Game:GetService("Workspace"):FindFirstChild("Terrain").Position+Vector3.new(math.random(-2048,2048),0,math.random(-2048,2048)),Game:GetService("Workspace"):FindFirstChild("Terrain"));
  253. end;
  254. end;
  255. end;
  256. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid then
  257. JeffTheKillerHumanoid.DisplayDistanceType="None";
  258. JeffTheKillerHumanoid.HealthDisplayDistance=0;
  259. JeffTheKillerHumanoid.Name="ColdBloodedKiller";
  260. JeffTheKillerHumanoid.NameDisplayDistance=0;
  261. JeffTheKillerHumanoid.NameOcclusion="EnemyOcclusion";
  262. JeffTheKillerHumanoid.AutoJumpEnabled=true;
  263. JeffTheKillerHumanoid.AutoRotate=true;
  264. JeffTheKillerHumanoid.MaxHealth=500;
  265. JeffTheKillerHumanoid.JumpPower=60;
  266. JeffTheKillerHumanoid.MaxSlopeAngle=89.9;
  267. end;
  268. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoJumpEnabled then
  269. JeffTheKillerHumanoid.AutoJumpEnabled=true;
  270. end;
  271. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoRotate then
  272. JeffTheKillerHumanoid.AutoRotate=true;
  273. end;
  274. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.PlatformStand then
  275. JeffTheKillerHumanoid.PlatformStand=false;
  276. end;
  277. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Sit then
  278. JeffTheKillerHumanoid.Sit=false;
  279. end;
  280. end;
  281. --[[ By: Brutez. ]]--
Add Comment
Please, Sign In to add comment