Advertisement
BNutty07

DOOOOT

Nov 4th, 2017
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 59.50 KB | None | 0 0
  1. --Created with PenguinAnonymous's compiler
  2. --PenguinAnonymous is not responsible for damages caused to your game
  3. --This plugin does not remove things
  4. --PenguinAnonymous cannot be held resonsible for manual deletion for the purpose of testing
  5. --Keep in mind, any items that cause errors in compilation will be skipped and documented within the last line of the disclaimer comments
  6. --Thank you for using my plugin and enjoy :)
  7. --It is free to use
  8. --If you use this plugin to create your own, please give me credit
  9. --Z_V edited my plugin to look like his own and published it without giving me credit, and that makes me very angry
  10. --Errors: Animator,Accessory,Camera
  11. local runDummyScript = function(f,scri)
  12. local oldenv = getfenv(f)
  13. local newenv = setmetatable({}, {
  14. __index = function(_, k)
  15. if k:lower() == 'script' then
  16. return scri
  17. else
  18. return oldenv[k]
  19. end
  20. end
  21. })
  22. setfenv(f, newenv)
  23. ypcall(function() f() end)
  24. end
  25. cors = {}
  26. mas = Instance.new("Model",game:GetService("Lighting"))
  27. mas.Name = "CompiledModel"
  28. o1 = Instance.new("Model")
  29. o2 = Instance.new("Animation")
  30. o3 = Instance.new("Humanoid")
  31. o4 = Instance.new("Model")
  32. o5 = Instance.new("Model")
  33. o7 = Instance.new("BodyColors")
  34. o8 = Instance.new("Hat")
  35. o9 = Instance.new("Part")
  36. o10 = Instance.new("SpecialMesh")
  37. o12 = Instance.new("Hat")
  38. o13 = Instance.new("Part")
  39. o14 = Instance.new("SpecialMesh")
  40. o16 = Instance.new("Hat")
  41. o17 = Instance.new("Part")
  42. o18 = Instance.new("SpecialMesh")
  43. o20 = Instance.new("Part")
  44. o21 = Instance.new("Hat")
  45. o22 = Instance.new("Part")
  46. o23 = Instance.new("SpecialMesh")
  47. o25 = Instance.new("Script")
  48. o26 = Instance.new("Script")
  49. o27 = Instance.new("Script")
  50. o28 = Instance.new("Script")
  51. o29 = Instance.new("Part")
  52. o30 = Instance.new("Part")
  53. o31 = Instance.new("Part")
  54. o32 = Instance.new("SpecialMesh")
  55. o33 = Instance.new("Sound")
  56. o34 = Instance.new("Weld")
  57. o35 = Instance.new("Weld")
  58. o36 = Instance.new("Weld")
  59. o37 = Instance.new("Weld")
  60. o38 = Instance.new("Sound")
  61. o39 = Instance.new("Weld")
  62. o40 = Instance.new("Weld")
  63. o41 = Instance.new("Weld")
  64. o42 = Instance.new("Weld")
  65. o43 = Instance.new("Weld")
  66. o44 = Instance.new("Weld")
  67. o45 = Instance.new("Part")
  68. o46 = Instance.new("Motor6D")
  69. o47 = Instance.new("Part")
  70. o49 = Instance.new("Part")
  71. o50 = Instance.new("Decal")
  72. o51 = Instance.new("Motor6D")
  73. o52 = Instance.new("Motor6D")
  74. o53 = Instance.new("Motor6D")
  75. o54 = Instance.new("Motor6D")
  76. o55 = Instance.new("Motor6D")
  77. o56 = Instance.new("Animation")
  78. o57 = Instance.new("CharacterMesh")
  79. o58 = Instance.new("CharacterMesh")
  80. o59 = Instance.new("CharacterMesh")
  81. o60 = Instance.new("CharacterMesh")
  82. o61 = Instance.new("CharacterMesh")
  83. o62 = Instance.new("Sound")
  84. o63 = Instance.new("BodyColors")
  85. o64 = Instance.new("Script")
  86. o65 = Instance.new("StringValue")
  87. o66 = Instance.new("Animation")
  88. o67 = Instance.new("StringValue")
  89. o68 = Instance.new("Animation")
  90. o69 = Instance.new("StringValue")
  91. o70 = Instance.new("Animation")
  92. o71 = Instance.new("NumberValue")
  93. o72 = Instance.new("Animation")
  94. o73 = Instance.new("NumberValue")
  95. o74 = Instance.new("StringValue")
  96. o75 = Instance.new("Animation")
  97. o76 = Instance.new("StringValue")
  98. o77 = Instance.new("Animation")
  99. o78 = Instance.new("StringValue")
  100. o79 = Instance.new("Animation")
  101. o80 = Instance.new("StringValue")
  102. o81 = Instance.new("Animation")
  103. o82 = Instance.new("StringValue")
  104. o83 = Instance.new("Animation")
  105. o84 = Instance.new("Script")
  106. o85 = Instance.new("Script")
  107. o86 = Instance.new("Animation")
  108. o87 = Instance.new("Script")
  109. o1.Name = "SCP 049"
  110. o1.Parent = mas
  111. o2.Name = "WalkAnim"
  112. o2.Parent = o1
  113. o2.AnimationId = "http://www.roblox.com/asset/?id=189040478"
  114. o3.Name = "Shadow"
  115. o3.Parent = o1
  116. o3.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
  117. o3.HealthDisplayDistance = 0
  118. o3.NameDisplayDistance = 0
  119. o3.NameOcclusion = Enum.NameOcclusion.EnemyOcclusion
  120. o3.RightLeg = o30
  121. o3.LeftLeg = o20
  122. o3.Torso = o45
  123. o3.Health = 5000
  124. o3.MaxHealth = 5000
  125. o3.WalkSpeed = 0
  126. o4.Name = "Status"
  127. o4.Parent = o3
  128. o5.Name = "AvalibleSpawns"
  129. o5.Parent = o4
  130. o7.Parent = o1
  131. o7.HeadColor = BrickColor.new("Really black")
  132. o7.LeftArmColor = BrickColor.new("Black")
  133. o7.LeftLegColor = BrickColor.new("Black")
  134. o7.RightArmColor = BrickColor.new("Black")
  135. o7.RightLegColor = BrickColor.new("Black")
  136. o7.TorsoColor = BrickColor.new("Really black")
  137. o8.Name = "Eye"
  138. o8.Parent = o1
  139. o8.AttachmentPos = Vector3.new(0.180000007, 0.449999988, 0.49000001)
  140. o9.Name = "Handle"
  141. o9.Parent = o8
  142. o9.BrickColor = BrickColor.new("Institutional white")
  143. o9.Position = Vector3.new(-44.8000031, 4.7014761, -220.610001)
  144. o9.CanCollide = false
  145. o9.FormFactor = Enum.FormFactor.Custom
  146. o9.Size = Vector3.new(0.5, 0.5, 0.5)
  147. o9.CFrame = CFrame.new(-44.8000031, 4.7014761, -220.610001, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  148. o9.BottomSurface = Enum.SurfaceType.Smooth
  149. o9.TopSurface = Enum.SurfaceType.Smooth
  150. o9.Color = Color3.new(0.972549, 0.972549, 0.972549)
  151. o9.Position = Vector3.new(-44.8000031, 4.7014761, -220.610001)
  152. o10.Parent = o9
  153. o10.MeshId = "http://www.roblox.com/asset/?id=1185246"
  154. o10.Scale = Vector3.new(0.300000012, 0.300000012, 0.300000012)
  155. o10.TextureId = "http://www.roblox.com/asset/?id=189023804"
  156. o10.MeshType = Enum.MeshType.FileMesh
  157. o12.Name = "Eye"
  158. o12.Parent = o1
  159. o12.AttachmentForward = Vector3.new(-0, 0, -0.99999994)
  160. o12.AttachmentPos = Vector3.new(-0.180000007, 0.449999988, 0.49000001)
  161. o13.Name = "Handle"
  162. o13.Parent = o12
  163. o13.BrickColor = BrickColor.new("Institutional white")
  164. o13.Position = Vector3.new(-44.4400024, 4.7014761, -220.610001)
  165. o13.CanCollide = false
  166. o13.FormFactor = Enum.FormFactor.Custom
  167. o13.Size = Vector3.new(0.5, 0.5, 0.5)
  168. o13.CFrame = CFrame.new(-44.4400024, 4.7014761, -220.610001, 1, 0, 0, 0, 1, 0, 0, 0, 0.99999994)
  169. o13.BottomSurface = Enum.SurfaceType.Smooth
  170. o13.TopSurface = Enum.SurfaceType.Smooth
  171. o13.Color = Color3.new(0.972549, 0.972549, 0.972549)
  172. o13.Position = Vector3.new(-44.4400024, 4.7014761, -220.610001)
  173. o14.Parent = o13
  174. o14.MeshId = "http://www.roblox.com/asset/?id=1185246"
  175. o14.Scale = Vector3.new(0.300000012, 0.300000012, 0.300000012)
  176. o14.TextureId = "http://www.roblox.com/asset/?id=189023804"
  177. o14.MeshType = Enum.MeshType.FileMesh
  178. o16.Name = "Hood"
  179. o16.Parent = o1
  180. o16.AttachmentPos = Vector3.new(0, 0.200000003, 0)
  181. o17.Name = "Handle"
  182. o17.Parent = o16
  183. o17.BrickColor = BrickColor.new("Really black")
  184. o17.Position = Vector3.new(-44.6200027, 4.9514761, -220.119995)
  185. o17.CanCollide = false
  186. o17.FormFactor = Enum.FormFactor.Symmetric
  187. o17.Size = Vector3.new(1, 1, 2)
  188. o17.CFrame = CFrame.new(-44.6200027, 4.9514761, -220.119995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  189. o17.BottomSurface = Enum.SurfaceType.Smooth
  190. o17.TopSurface = Enum.SurfaceType.Smooth
  191. o17.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  192. o17.Position = Vector3.new(-44.6200027, 4.9514761, -220.119995)
  193. o18.Parent = o17
  194. o18.MeshId = "http://www.roblox.com/asset/?id=16952952"
  195. o18.Scale = Vector3.new(1, 1.14999998, 1.29999995)
  196. o18.TextureId = "http://www.roblox.com/asset/?id=189029867"
  197. o18.MeshType = Enum.MeshType.FileMesh
  198. o20.Name = "Left Leg"
  199. o20.Parent = o1
  200. o20.Material = Enum.Material.SmoothPlastic
  201. o20.BrickColor = BrickColor.new("Really black")
  202. o20.Position = Vector3.new(-45.1200027, 1.15147591, -220.119995)
  203. o20.CanCollide = false
  204. o20.Locked = true
  205. o20.Elasticity = 0
  206. o20.FormFactor = Enum.FormFactor.Symmetric
  207. o20.Friction = 2
  208. o20.Size = Vector3.new(1, 2, 1)
  209. o20.CFrame = CFrame.new(-45.1200027, 1.15147591, -220.119995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  210. o20.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  211. o20.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  212. o20.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  213. o20.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  214. o20.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  215. o20.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  216. o20.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  217. o20.Position = Vector3.new(-45.1200027, 1.15147591, -220.119995)
  218. o21.Name = "Mask"
  219. o21.Parent = o1
  220. o21.AttachmentPos = Vector3.new(0, 0.400000006, 0.639999986)
  221. o22.Name = "Handle"
  222. o22.Parent = o21
  223. o22.Position = Vector3.new(-44.6200027, 4.75147581, -220.759995)
  224. o22.CanCollide = false
  225. o22.FormFactor = Enum.FormFactor.Symmetric
  226. o22.Size = Vector3.new(1, 1, 2)
  227. o22.CFrame = CFrame.new(-44.6200027, 4.75147581, -220.759995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  228. o22.BottomSurface = Enum.SurfaceType.Smooth
  229. o22.TopSurface = Enum.SurfaceType.Smooth
  230. o22.Position = Vector3.new(-44.6200027, 4.75147581, -220.759995)
  231. o23.Parent = o22
  232. o23.MeshId = "http://www.roblox.com/asset/?id=12472639"
  233. o23.Scale = Vector3.new(1.20000005, 1.20000005, 1.5)
  234. o23.TextureId = "http://www.roblox.com/asset/?id=189029251"
  235. o23.MeshType = Enum.MeshType.FileMesh
  236. o25.Name = "SCP049AnimationScript"
  237. o25.Parent = o1
  238. table.insert(cors,coroutine.create(function()
  239. wait()
  240. runDummyScript(function()
  241. local SCP049=script.Parent;
  242. local SCP049Humanoid = SCP049:FindFirstChild("Humanoid");
  243. local SCP049WalkAnimation = SCP049Humanoid:LoadAnimation(SCP049.WalkAnim);
  244. repeat Wait(0.5) until SCP049Humanoid ~= nil
  245. function SCP049Walk(WalkSpeed)
  246. if WalkSpeed>0.05 then
  247. SCP049WalkAnimation:Play()
  248. else
  249. SCP049WalkAnimation:Stop()
  250. end
  251. end
  252. SCP049Humanoid.Running:connect(SCP049Walk)
  253. end,o25)
  254. end))
  255. o26.Name = "SCP049AttackScript"
  256. o26.Parent = o1
  257. table.insert(cors,coroutine.create(function()
  258. wait()
  259. runDummyScript(function()
  260. local SCP049MainScript = script;
  261. local SCP049 = SCP049MainScript.Parent;
  262. local SCP049Humanoid = SCP049:FindFirstChild("Humanoid")
  263. local Head = SCP049:FindFirstChild("Head");
  264. local HumanoidRootPart = SCP049:FindFirstChild("HumanoidRootPart");
  265. local LeftArm = SCP049:FindFirstChild("Left Arm");
  266. local LeftLeg = SCP049:FindFirstChild("Left Leg");
  267. local RightArm = SCP049:FindFirstChild("Right Arm");
  268. local RightLeg = SCP049:FindFirstChild("Right Leg");
  269. local Torso = SCP049:FindFirstChild("Torso");
  270. local NeckSnapAnimation = SCP049Humanoid:LoadAnimation(SCP049.ArmOutAnim);
  271. local SCP049AttackEnable = true;
  272. function FindTargetToTerrorise(TargetPosition)
  273. local PlayerList = Game.Workspace:children();
  274. local TargetTorso = nil;
  275. local VisibleDistance = 5;
  276. local TempTargetModel = nil;
  277. local TargetHumanoid = nil;
  278. local TargetModel = nil;
  279. for Check = 1, #PlayerList do
  280. TargetModel = PlayerList[Check]
  281. if (TargetModel.className == "Model") and (TargetModel ~= SCP049) and (TargetModel.Name ~= SCP049.Name) and (TargetModel.Name ~= "SCP-106") and (TargetModel.Name ~= "SCP-173") and (TargetModel.Name ~= "SCP-096") then
  282. TempTargetModel = TargetModel:findFirstChild("Torso")
  283. TargetHumanoid = TargetModel:findFirstChild("Humanoid")
  284. if (TempTargetModel ~= nil) and (TargetHumanoid ~= nil) and (TargetHumanoid.Health > 0) then
  285. if (TempTargetModel.Position - TargetPosition).magnitude < VisibleDistance then
  286. TargetTorso = TempTargetModel
  287. VisibleDistance = (TempTargetModel.Position - TargetPosition).magnitude
  288. end
  289. end
  290. end
  291. end
  292. return TargetTorso
  293. end
  294. while true do
  295. Wait(0)
  296. local SCP049ChosenTarget = FindTargetToTerrorise(Head.Position);
  297. if SCP049ChosenTarget ~= nil then
  298. if SCP049AttackEnable == false then return end
  299. SCP049AttackEnable = false
  300. local SCP049Damage = 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
  301. local SelectedAttackList = {"NeckSnap1", "NeckSnap2", "NeckSnap3"};
  302. local SelectedAttackSound = Torso[math.random(1, #SelectedAttackList)];
  303. SelectedAttackSound:Play()
  304. SCP049ChosenTarget.Parent.Humanoid:TakeDamage(SCP049Damage)
  305. NeckSnapAnimation:Play()
  306. Wait(0.5)
  307. NeckSnapAnimation:Stop()
  308. SCP049AttackEnable = true
  309. end
  310. end
  311. end,o26)
  312. end))
  313. o27.Name = "SCP049HeadSoundScript"
  314. o27.Parent = o1
  315. table.insert(cors,coroutine.create(function()
  316. wait()
  317. runDummyScript(function()
  318. --[[ By: Brutez ]]--
  319. local SCP049 = script.Parent;
  320. local SCP049Head = SCP049:FindFirstChild("Head");
  321. local SelectedSoundID = {187645728, 187645755, 187645778};
  322. local SelectedSounds = {};
  323. local HurtEnable = true;
  324. while true do
  325. Wait(0)
  326. SCP049RandomSound=math.random(1,1000)
  327. if SCP049RandomSound==10 or SCP049RandomSound==20 or SCP049RandomSound==30 then
  328. if HurtEnable==false then return end
  329. HurtEnable = false;
  330. local SCP049HurtSoundList = {"049_1", "049_2", "049_3", "049_4", "049_5", "049_6", "049_7", "049_8"};
  331. local SelectedHurtSound = SCP049Head[math.random(1, #SCP049HurtSoundList)];
  332. SelectedHurtSound:Play()
  333. Wait(4)
  334. HurtEnable = true;
  335. end
  336. end
  337. --[[ By: Brutez ]]--
  338. end,o27)
  339. end))
  340. o28.Name = "SCP049TargetScript"
  341. o28.Parent = o1
  342. table.insert(cors,coroutine.create(function()
  343. wait()
  344. runDummyScript(function()
  345. local SCP049MainScript = script;
  346. local SCP049 = SCP049MainScript.Parent;
  347. local Head = SCP049:FindFirstChild("Head");
  348. local HumanoidRootPart = SCP049:FindFirstChild("HumanoidRootPart");
  349. local LeftArm = SCP049:FindFirstChild("Left Arm");
  350. local LeftLeg = SCP049:FindFirstChild("Left Leg");
  351. local RightArm = SCP049:FindFirstChild("Right Arm");
  352. local RightLeg = SCP049:FindFirstChild("Right Leg");
  353. local Torso = SCP049:FindFirstChild("Torso");
  354. local SCP049Humanoid = SCP049:FindFirstChild("Humanoid");
  355. local RechargeTime = 0;
  356. for SCP049HealthCheck = 1,5 do
  357. SCP049Humanoid.Health = SCP049Humanoid.MaxHealth
  358. Wait(0)
  359. end
  360. local SpawnForceField = Instance.new("ForceField")
  361. SpawnForceField.Name = "SpawnForceField"
  362. SpawnForceField.Parent = SCP049
  363. function FindTargetToTerrorise(TargetPosition)
  364. local PlayerList = Game.Workspace:children();
  365. local TargetTorso = nil;
  366. local VisibleDistance = 13337777777;
  367. local TempTargetModel = nil;
  368. local TargetHumanoid = nil;
  369. local TargetModel = nil;
  370. for Check = 1, #PlayerList do
  371. TargetModel = PlayerList[Check]
  372. if (TargetModel.className == "Model") and (TargetModel ~= SCP049) and (TargetModel.Name ~= SCP049.Name) and (TargetModel.Name ~= "SCP-106") and (TargetModel.Name ~= "SCP-173") and (TargetModel.Name ~= "SCP-096") then
  373. TempTargetModel = TargetModel:FindFirstChild("Torso")
  374. TargetHumanoid = TargetModel:FindFirstChild("Humanoid")
  375. if (TempTargetModel ~= nil) and (TargetHumanoid ~= nil) and (TargetHumanoid.Health > 0) then
  376. if (TempTargetModel.Position - TargetPosition).magnitude < VisibleDistance then
  377. TargetTorso = TempTargetModel
  378. VisibleDistance = (TempTargetModel.Position - TargetPosition).magnitude
  379. end
  380. end
  381. end
  382. end
  383. return TargetTorso
  384. end
  385. Wait(5)
  386. for SCP049HealthCheck = 1,5 do
  387. SCP049Humanoid.Health = SCP049Humanoid.MaxHealth
  388. Wait(0)
  389. end
  390. HumanoidRootPart.Anchored = false
  391. SpawnForceField:Destroy()
  392. while true do
  393. Wait(0)
  394. if SCP049Humanoid.Health == 0 or SCP049Humanoid.Health < 0 then
  395. SCP049["SCP049AttackScript"].Disabled = true
  396. SCP049["SCP049TargetScript"].Disabled = true
  397. SCP049["SCP049HeadSoundScript"].Disabled = true
  398. Wait(5)
  399. SCP049:Destroy()
  400. end
  401. local SCP049ChosenTarget = FindTargetToTerrorise(Torso.Position);
  402. if SCP049Humanoid.Sit==true then
  403. SCP049Humanoid.Jump=true
  404. end
  405. if SCP049Humanoid.PlatformStand==true then
  406. SCP049Humanoid.Jump=true
  407. end
  408. if SCP049ChosenTarget ~= nil then
  409. SCP049RadiusXAxis = math.random(-2,2)
  410. SCP049RadiusYAxis = math.random(-2,2)
  411. SCP049RadiusZAxis = math.random(-2,2)
  412. SCP049Humanoid:MoveTo(SCP049ChosenTarget.Position+Vector3.new(SCP049RadiusXAxis,SCP049RadiusYAxis,SCP049RadiusZAxis), SCP049ChosenTarget)
  413. end
  414. end
  415. end,o28)
  416. end))
  417. o29.Name = "Right Arm"
  418. o29.Parent = o1
  419. o29.Material = Enum.Material.SmoothPlastic
  420. o29.BrickColor = BrickColor.new("Really black")
  421. o29.Position = Vector3.new(-43.1200027, 3.15147591, -220.119995)
  422. o29.CanCollide = false
  423. o29.Locked = true
  424. o29.Elasticity = 0
  425. o29.FormFactor = Enum.FormFactor.Symmetric
  426. o29.Friction = 2
  427. o29.Size = Vector3.new(1, 2, 1)
  428. o29.CFrame = CFrame.new(-43.1200027, 3.15147591, -220.119995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  429. o29.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  430. o29.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  431. o29.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  432. o29.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  433. o29.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  434. o29.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  435. o29.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  436. o29.Position = Vector3.new(-43.1200027, 3.15147591, -220.119995)
  437. o30.Name = "Right Leg"
  438. o30.Parent = o1
  439. o30.Material = Enum.Material.SmoothPlastic
  440. o30.BrickColor = BrickColor.new("Really black")
  441. o30.Position = Vector3.new(-44.1200027, 1.15147591, -220.119995)
  442. o30.CanCollide = false
  443. o30.Locked = true
  444. o30.Elasticity = 0
  445. o30.FormFactor = Enum.FormFactor.Symmetric
  446. o30.Friction = 2
  447. o30.Size = Vector3.new(1, 2, 1)
  448. o30.CFrame = CFrame.new(-44.1200027, 1.15147591, -220.119995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  449. o30.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  450. o30.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  451. o30.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  452. o30.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  453. o30.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  454. o30.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  455. o30.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  456. o30.Position = Vector3.new(-44.1200027, 1.15147591, -220.119995)
  457. o31.Name = "Head"
  458. o31.Parent = o1
  459. o31.Material = Enum.Material.SmoothPlastic
  460. o31.BrickColor = BrickColor.new("Really black")
  461. o31.Position = Vector3.new(-44.6200027, 4.65147591, -220.119995)
  462. o31.CanCollide = false
  463. o31.Locked = true
  464. o31.Elasticity = 0
  465. o31.FormFactor = Enum.FormFactor.Symmetric
  466. o31.Friction = 0
  467. o31.Size = Vector3.new(2, 1, 1)
  468. o31.CFrame = CFrame.new(-44.6200027, 4.65147591, -220.119995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  469. o31.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  470. o31.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  471. o31.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  472. o31.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  473. o31.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  474. o31.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  475. o31.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  476. o31.Position = Vector3.new(-44.6200027, 4.65147591, -220.119995)
  477. o32.Name = "HeadMesh"
  478. o32.Parent = o31
  479. o32.Scale = Vector3.new(1.25, 1.25, 1.25)
  480. o33.Name = "Runner"
  481. o33.Parent = o31
  482. o33.Pitch = 0.80000001192093
  483. o33.SoundId = "rbxassetid://432854997"
  484. o33.Volume = 1
  485. o33.Looped = true
  486. o34.Name = "HeadWeld"
  487. o34.Parent = o31
  488. o34.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  489. o34.C1 = CFrame.new(0, 0.200000003, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  490. o34.Part0 = o31
  491. o34.Part1 = o17
  492. o35.Name = "HeadWeld"
  493. o35.Parent = o31
  494. o35.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  495. o35.C1 = CFrame.new(0, 0.400000006, 0.639999986, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  496. o35.Part0 = o31
  497. o35.Part1 = o22
  498. o36.Name = "HeadWeld"
  499. o36.Parent = o31
  500. o36.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  501. o36.C1 = CFrame.new(0.180000007, 0.449999988, 0.49000001, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  502. o36.Part0 = o31
  503. o36.Part1 = o9
  504. o37.Name = "HeadWeld"
  505. o37.Parent = o31
  506. o37.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  507. o37.C1 = CFrame.new(-0.180000007, 0.449999988, 0.49000001, 1, -0, 0, 0, 1, -0, 0, 0, 0.99999994)
  508. o37.Part0 = o31
  509. o37.Part1 = o13
  510. o38.Name = "Psst"
  511. o38.Parent = o31
  512. o38.SoundId = "rbxassetid://432855060"
  513. o38.Volume = 1
  514. o38.Looped = true
  515. o39.Name = "HeadWeld"
  516. o39.Parent = o31
  517. o39.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  518. o39.C1 = CFrame.new(0.180000007, 0.449999988, 0.49000001, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  519. o39.Part0 = o31
  520. o39.Part1 = o9
  521. o40.Name = "HeadWeld"
  522. o40.Parent = o31
  523. o40.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  524. o40.C1 = CFrame.new(-0.180000007, 0.449999988, 0.49000001, 1, -0, 0, 0, 1, -0, 0, 0, 0.99999994)
  525. o40.Part0 = o31
  526. o40.Part1 = o13
  527. o41.Name = "HeadWeld"
  528. o41.Parent = o31
  529. o41.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  530. o41.C1 = CFrame.new(0, 0.400000006, 0.639999986, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  531. o41.Part0 = o31
  532. o41.Part1 = o22
  533. o42.Name = "HeadWeld"
  534. o42.Parent = o31
  535. o42.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  536. o42.C1 = CFrame.new(0.180000007, 0.449999988, 0.49000001, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  537. o42.Part0 = o31
  538. o42.Part1 = o9
  539. o43.Name = "HeadWeld"
  540. o43.Parent = o31
  541. o43.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  542. o43.C1 = CFrame.new(-0.180000007, 0.449999988, 0.49000001, 1, -0, 0, 0, 1, -0, 0, 0, 0.99999994)
  543. o43.Part0 = o31
  544. o43.Part1 = o13
  545. o44.Name = "HeadWeld"
  546. o44.Parent = o31
  547. o44.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  548. o44.C1 = CFrame.new(0, 0.400000006, 0.639999986, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  549. o44.Part0 = o31
  550. o44.Part1 = o22
  551. o45.Name = "HumanoidRootPart"
  552. o45.Parent = o1
  553. o45.Material = Enum.Material.SmoothPlastic
  554. o45.BrickColor = BrickColor.new("Deep blue")
  555. o45.Transparency = 1
  556. o45.Position = Vector3.new(-44.6200027, 3.15147591, -220.119995)
  557. o45.CanCollide = false
  558. o45.Locked = true
  559. o45.Elasticity = 0
  560. o45.FormFactor = Enum.FormFactor.Symmetric
  561. o45.Friction = 0
  562. o45.Size = Vector3.new(2, 2, 1)
  563. o45.CFrame = CFrame.new(-44.6200027, 3.15147591, -220.119995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  564. o45.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  565. o45.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  566. o45.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  567. o45.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  568. o45.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  569. o45.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  570. o45.Color = Color3.new(0.129412, 0.329412, 0.72549)
  571. o45.Position = Vector3.new(-44.6200027, 3.15147591, -220.119995)
  572. o46.Name = "RootJoint"
  573. o46.Parent = o45
  574. o46.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  575. o46.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  576. o46.Part0 = o45
  577. o46.Part1 = o49
  578. o46.MaxVelocity = 0.10000000149012
  579. o47.Name = "Left Arm"
  580. o47.Parent = o1
  581. o47.Material = Enum.Material.SmoothPlastic
  582. o47.BrickColor = BrickColor.new("Really black")
  583. o47.Position = Vector3.new(-46.1200027, 3.15147591, -220.119995)
  584. o47.CanCollide = false
  585. o47.Locked = true
  586. o47.Elasticity = 0
  587. o47.FormFactor = Enum.FormFactor.Symmetric
  588. o47.Friction = 2
  589. o47.Size = Vector3.new(1, 2, 1)
  590. o47.CFrame = CFrame.new(-46.1200027, 3.15147591, -220.119995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  591. o47.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  592. o47.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  593. o47.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  594. o47.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  595. o47.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  596. o47.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  597. o47.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  598. o47.Position = Vector3.new(-46.1200027, 3.15147591, -220.119995)
  599. o49.Name = "Torso"
  600. o49.Parent = o1
  601. o49.Material = Enum.Material.SmoothPlastic
  602. o49.BrickColor = BrickColor.new("Really black")
  603. o49.Position = Vector3.new(-44.6200027, 3.15147591, -220.119995)
  604. o49.CanCollide = false
  605. o49.Locked = true
  606. o49.Elasticity = 0
  607. o49.FormFactor = Enum.FormFactor.Symmetric
  608. o49.Friction = 2
  609. o49.Size = Vector3.new(2, 2, 1)
  610. o49.CFrame = CFrame.new(-44.6200027, 3.15147591, -220.119995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  611. o49.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  612. o49.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  613. o49.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  614. o49.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  615. o49.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  616. o49.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  617. o49.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  618. o49.Position = Vector3.new(-44.6200027, 3.15147591, -220.119995)
  619. o50.Name = "roblox"
  620. o50.Parent = o49
  621. o51.Name = "Right Shoulder"
  622. o51.Parent = o49
  623. o51.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  624. o51.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  625. o51.Part0 = o49
  626. o51.Part1 = o29
  627. o51.DesiredAngle = -0.077736437320709
  628. o51.MaxVelocity = 0.10000000149012
  629. o52.Name = "Left Shoulder"
  630. o52.Parent = o49
  631. o52.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  632. o52.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  633. o52.Part0 = o49
  634. o52.Part1 = o47
  635. o52.DesiredAngle = -0.077736437320709
  636. o52.MaxVelocity = 0.10000000149012
  637. o53.Name = "Right Hip"
  638. o53.Parent = o49
  639. o53.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  640. o53.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  641. o53.Part0 = o49
  642. o53.Part1 = o30
  643. o53.DesiredAngle = 0.077736437320709
  644. o53.MaxVelocity = 0.10000000149012
  645. o54.Name = "Left Hip"
  646. o54.Parent = o49
  647. o54.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  648. o54.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  649. o54.Part0 = o49
  650. o54.Part1 = o20
  651. o54.DesiredAngle = 0.077736437320709
  652. o54.MaxVelocity = 0.10000000149012
  653. o55.Name = "Neck"
  654. o55.Parent = o49
  655. o55.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  656. o55.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  657. o55.Part0 = o49
  658. o55.Part1 = o31
  659. o55.MaxVelocity = 0.10000000149012
  660. o56.Name = "ArmOutAnim"
  661. o56.Parent = o1
  662. o56.AnimationId = "http://www.roblox.com/item.aspx?id=189040829"
  663. o57.Name = "Pilgrim Left Arm"
  664. o57.Parent = o1
  665. o57.MeshId = 66229897
  666. o57.BodyPart = Enum.BodyPart.LeftArm
  667. o57.OverlayTextureId = 189033450
  668. o58.Name = "Pilgrim Right Arm"
  669. o58.Parent = o1
  670. o58.MeshId = 66229924
  671. o58.BodyPart = Enum.BodyPart.RightArm
  672. o58.OverlayTextureId = 189033450
  673. o59.Name = "Pilgrim Torso"
  674. o59.Parent = o1
  675. o59.MeshId = 66230010
  676. o59.BodyPart = Enum.BodyPart.Torso
  677. o59.OverlayTextureId = 189033450
  678. o60.Name = "WAI Left Leg"
  679. o60.Parent = o1
  680. o60.MeshId = 106703213
  681. o60.BodyPart = Enum.BodyPart.LeftLeg
  682. o60.OverlayTextureId = 189033450
  683. o61.Name = "WAI RightLeg"
  684. o61.Parent = o1
  685. o61.MeshId = 106703301
  686. o61.BodyPart = Enum.BodyPart.RightLeg
  687. o61.OverlayTextureId = 189033450
  688. o62.Name = "Night1"
  689. o62.Parent = o1
  690. o62.SoundId = "rbxassetid://432855173"
  691. o62.Volume = 1
  692. o62.Looped = true
  693. o63.Parent = o1
  694. o63.HeadColor = BrickColor.new("Really black")
  695. o63.LeftArmColor = BrickColor.new("Really black")
  696. o63.LeftLegColor = BrickColor.new("Really black")
  697. o63.RightArmColor = BrickColor.new("Really black")
  698. o63.RightLegColor = BrickColor.new("Really black")
  699. o63.TorsoColor = BrickColor.new("Really black")
  700. o64.Name = "AnimateSauce"
  701. o64.Parent = o1
  702. table.insert(cors,coroutine.create(function()
  703. wait()
  704. runDummyScript(function()
  705. function waitForChild(parent, childName)
  706. local child = parent:findFirstChild(childName)
  707. if child then return child end
  708. while true do
  709. child = parent.ChildAdded:wait()
  710. if child.Name==childName then return child end
  711. end
  712. end
  713. local Figure = script.Parent
  714. local Torso = waitForChild(Figure, "Torso")
  715. local RightShoulder = waitForChild(Torso, "Right Shoulder")
  716. local LeftShoulder = waitForChild(Torso, "Left Shoulder")
  717. local RightHip = waitForChild(Torso, "Right Hip")
  718. local LeftHip = waitForChild(Torso, "Left Hip")
  719. local Neck = waitForChild(Torso, "Neck")
  720. local Humanoid;
  721. for _,Child in pairs(Figure:GetChildren())do
  722. if Child and Child.ClassName=="Humanoid"then
  723. Humanoid=Child;
  724. end;
  725. end;
  726. local pose = "Standing"
  727. local currentAnim = ""
  728. local currentAnimInstance = nil
  729. local currentAnimTrack = nil
  730. local currentAnimKeyframeHandler = nil
  731. local currentAnimSpeed = 1.0
  732. local animTable = {}
  733. local animNames = {
  734. idle = {
  735. { id = "http://www.roblox.com/asset/?id=180435571", weight = 9 },
  736. { id = "http://www.roblox.com/asset/?id=180435792", weight = 1 }
  737. },
  738. walk = {
  739. { id = "http://www.roblox.com/asset/?id=180426354", weight = 10 }
  740. },
  741. run = {
  742. { id = "http://www.roblox.com/asset/?id=252557606", weight = 20 }
  743. },
  744. jump = {
  745. { id = "http://www.roblox.com/asset/?id=125750702", weight = 10 }
  746. },
  747. fall = {
  748. { id = "http://www.roblox.com/asset/?id=180436148", weight = 10 }
  749. },
  750. climb = {
  751. { id = "http://www.roblox.com/asset/?id=180436334", weight = 10 }
  752. },
  753. sit = {
  754. { id = "http://www.roblox.com/asset/?id=178130996", weight = 10 }
  755. },
  756. toolnone = {
  757. { id = "http://www.roblox.com/asset/?id=182393478", weight = 10 }
  758. },
  759. toolslash = {
  760. { id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
  761. --{ id = "slash.xml", weight = 10 }
  762. },
  763. toollunge = {
  764. { id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
  765. },
  766. wave = {
  767. { id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
  768. },
  769. point = {
  770. { id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
  771. },
  772. dance1 = {
  773. { id = "http://www.roblox.com/asset/?id=182435998", weight = 10 },
  774. { id = "http://www.roblox.com/asset/?id=182491037", weight = 10 },
  775. { id = "http://www.roblox.com/asset/?id=182491065", weight = 10 }
  776. },
  777. dance2 = {
  778. { id = "http://www.roblox.com/asset/?id=182436842", weight = 10 },
  779. { id = "http://www.roblox.com/asset/?id=182491248", weight = 10 },
  780. { id = "http://www.roblox.com/asset/?id=182491277", weight = 10 }
  781. },
  782. dance3 = {
  783. { id = "http://www.roblox.com/asset/?id=182436935", weight = 10 },
  784. { id = "http://www.roblox.com/asset/?id=182491368", weight = 10 },
  785. { id = "http://www.roblox.com/asset/?id=182491423", weight = 10 }
  786. },
  787. laugh = {
  788. { id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
  789. },
  790. cheer = {
  791. { id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
  792. },
  793. }
  794. local dances = {"dance1", "dance2", "dance3"}
  795.  
  796. -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
  797. local emoteNames = { wave = false, point = false, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
  798.  
  799. function configureAnimationSet(name, fileList)
  800. if (animTable[name] ~= nil) then
  801. for _, connection in pairs(animTable[name].connections) do
  802. connection:disconnect()
  803. end
  804. end
  805. animTable[name] = {}
  806. animTable[name].count = 0
  807. animTable[name].totalWeight = 0
  808. animTable[name].connections = {}
  809.  
  810. -- check for config values
  811. local config = script:FindFirstChild(name)
  812. if (config ~= nil) then
  813. --print("Loading anims " .. name)
  814. table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
  815. table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
  816. local idx = 1
  817. for _, childPart in pairs(config:GetChildren()) do
  818. if (childPart:IsA("Animation")) then
  819. table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
  820. animTable[name][idx] = {}
  821. animTable[name][idx].anim = childPart
  822. local weightObject = childPart:FindFirstChild("Weight")
  823. if (weightObject == nil) then
  824. animTable[name][idx].weight = 1
  825. else
  826. animTable[name][idx].weight = weightObject.Value
  827. end
  828. animTable[name].count = animTable[name].count + 1
  829. animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
  830. --print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
  831. idx = idx + 1
  832. end
  833. end
  834. end
  835.  
  836. -- fallback to defaults
  837. if (animTable[name].count <= 0) then
  838. for idx, anim in pairs(fileList) do
  839. animTable[name][idx] = {}
  840. animTable[name][idx].anim = Instance.new("Animation")
  841. animTable[name][idx].anim.Name = name
  842. animTable[name][idx].anim.AnimationId = anim.id
  843. animTable[name][idx].weight = anim.weight
  844. animTable[name].count = animTable[name].count + 1
  845. animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
  846. --print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
  847. end
  848. end
  849. end
  850.  
  851. -- Setup animation objects
  852. function scriptChildModified(child)
  853. local fileList = animNames[child.Name]
  854. if (fileList ~= nil) then
  855. configureAnimationSet(child.Name, fileList)
  856. end
  857. end
  858.  
  859. script.ChildAdded:connect(scriptChildModified)
  860. script.ChildRemoved:connect(scriptChildModified)
  861.  
  862.  
  863. for name, fileList in pairs(animNames) do
  864. configureAnimationSet(name, fileList)
  865. end
  866.  
  867. -- ANIMATION
  868.  
  869. -- declarations
  870. local toolAnim = "None"
  871. local toolAnimTime = 0
  872.  
  873. local jumpAnimTime = 0
  874. local jumpAnimDuration = 0.3
  875.  
  876. local toolTransitionTime = 0.1
  877. local fallTransitionTime = 0.3
  878. local jumpMaxLimbVelocity = 0.75
  879.  
  880. -- functions
  881.  
  882. function stopAllAnimations()
  883. local oldAnim = currentAnim
  884.  
  885. -- return to idle if finishing an emote
  886. if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
  887. oldAnim = "idle"
  888. end
  889.  
  890. currentAnim = ""
  891. currentAnimInstance = nil
  892. if (currentAnimKeyframeHandler ~= nil) then
  893. currentAnimKeyframeHandler:disconnect()
  894. end
  895.  
  896. if (currentAnimTrack ~= nil) then
  897. currentAnimTrack:Stop()
  898. currentAnimTrack:Destroy()
  899. currentAnimTrack = nil
  900. end
  901. return oldAnim
  902. end
  903.  
  904. function setAnimationSpeed(speed)
  905. if speed ~= currentAnimSpeed then
  906. currentAnimSpeed = speed
  907. currentAnimTrack:AdjustSpeed(currentAnimSpeed)
  908. end
  909. end
  910.  
  911. function keyFrameReachedFunc(frameName)
  912. if (frameName == "End") then
  913.  
  914. local repeatAnim = currentAnim
  915. -- return to idle if finishing an emote
  916. if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
  917. repeatAnim = "idle"
  918. end
  919.  
  920. local animSpeed = currentAnimSpeed
  921. playAnimation(repeatAnim, 0.0, Humanoid)
  922. setAnimationSpeed(animSpeed)
  923. end
  924. end
  925.  
  926. -- Preload animations
  927. function playAnimation(animName, transitionTime, humanoid)
  928.  
  929. local roll = math.random(1, animTable[animName].totalWeight)
  930. local origRoll = roll
  931. local idx = 1
  932. while (roll > animTable[animName][idx].weight) do
  933. roll = roll - animTable[animName][idx].weight
  934. idx = idx + 1
  935. end
  936. --print(animName .. " " .. idx .. " [" .. origRoll .. "]")
  937. local anim = animTable[animName][idx].anim
  938. -- switch animation
  939. if (anim ~= currentAnimInstance) then
  940. if (currentAnimTrack ~= nil) then
  941. currentAnimTrack:Stop(transitionTime)
  942. currentAnimTrack:Destroy()
  943. end
  944. currentAnimSpeed = 1.0
  945. -- load it to the humanoid; get AnimationTrack
  946. currentAnimTrack = humanoid:LoadAnimation(anim)
  947. -- play the animation
  948. currentAnimTrack:Play(transitionTime)
  949. currentAnim = animName
  950. currentAnimInstance = anim
  951. -- set up keyframe name triggers
  952. if (currentAnimKeyframeHandler ~= nil) then
  953. currentAnimKeyframeHandler:disconnect()
  954. end
  955. currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
  956. end
  957. end
  958. -------------------------------------------------------------------------------------------
  959. -------------------------------------------------------------------------------------------
  960. local toolAnimName = ""
  961. local toolAnimTrack = nil
  962. local toolAnimInstance = nil
  963. local currentToolAnimKeyframeHandler = nil
  964. function toolKeyFrameReachedFunc(frameName)
  965. if (frameName == "End") then
  966. --print("Keyframe : ".. frameName)
  967. playToolAnimation(toolAnimName, 0.0, Humanoid)
  968. end
  969. end
  970. function playToolAnimation(animName, transitionTime, humanoid)
  971. local roll = math.random(1, animTable[animName].totalWeight)
  972. local origRoll = roll
  973. local idx = 1
  974. while (roll > animTable[animName][idx].weight) do
  975. roll = roll - animTable[animName][idx].weight
  976. idx = idx + 1
  977. end
  978. --print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
  979. local anim = animTable[animName][idx].anim
  980. if (toolAnimInstance ~= anim) then
  981. if (toolAnimTrack ~= nil) then
  982. toolAnimTrack:Stop()
  983. toolAnimTrack:Destroy()
  984. transitionTime = 0
  985. end
  986. -- load it to the humanoid; get AnimationTrack
  987. toolAnimTrack = humanoid:LoadAnimation(anim)
  988. -- play the animation
  989. toolAnimTrack:Play(transitionTime)
  990. toolAnimName = animName
  991. toolAnimInstance = anim
  992. currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
  993. end
  994. end
  995. function stopToolAnimations()
  996. local oldAnim = toolAnimName
  997. if (currentToolAnimKeyframeHandler ~= nil) then
  998. currentToolAnimKeyframeHandler:disconnect()
  999. end
  1000. toolAnimName = ""
  1001. toolAnimInstance = nil
  1002. if (toolAnimTrack ~= nil) then
  1003. toolAnimTrack:Stop()
  1004. toolAnimTrack:Destroy()
  1005. toolAnimTrack = nil
  1006. end
  1007. return oldAnim
  1008. end
  1009. -------------------------------------------------------------------------------------------
  1010. -------------------------------------------------------------------------------------------
  1011. function onRunning(speed)
  1012. if speed>0.01 then
  1013. if Figure and Humanoid and Humanoid.WalkSpeed<17 then
  1014. playAnimation("walk", 0.1, Humanoid);
  1015. elseif Figure and Humanoid and Humanoid.WalkSpeed>17 then
  1016. playAnimation("run", 0.1, Humanoid);
  1017. end;
  1018. if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then
  1019. setAnimationSpeed(speed / 14.5)
  1020. end
  1021. pose = "Running"
  1022. else
  1023. playAnimation("idle", 0.1, Humanoid)
  1024. pose = "Standing"
  1025. end
  1026. end
  1027. function onDied()
  1028. pose = "Dead"
  1029. end
  1030. function onJumping()
  1031. playAnimation("jump", 0.1, Humanoid)
  1032. jumpAnimTime = jumpAnimDuration
  1033. pose = "Jumping"
  1034. end
  1035. function onClimbing(speed)
  1036. playAnimation("climb", 0.1, Humanoid)
  1037. setAnimationSpeed(speed / 12.0)
  1038. pose = "Climbing"
  1039. end
  1040. function onGettingUp()
  1041. pose = "GettingUp"
  1042. end
  1043. function onFreeFall()
  1044. if (jumpAnimTime <= 0) then
  1045. playAnimation("fall", fallTransitionTime, Humanoid)
  1046. end
  1047. pose = "FreeFall"
  1048. end
  1049. function onFallingDown()
  1050. pose = "FallingDown"
  1051. end
  1052. function onSeated()
  1053. pose = "Seated"
  1054. end
  1055. function onPlatformStanding()
  1056. pose = "PlatformStanding"
  1057. end
  1058. function onSwimming(speed)
  1059. if speed>0 then
  1060. pose = "Running"
  1061. else
  1062. pose = "Standing"
  1063. end
  1064. end
  1065.  
  1066. function getTool()
  1067. for _, kid in ipairs(Figure:GetChildren()) do
  1068. if kid.className == "Tool" then return kid end
  1069. end
  1070. return nil
  1071. end
  1072.  
  1073. function getToolAnim(tool)
  1074. for _, c in ipairs(tool:GetChildren()) do
  1075. if c.Name == "toolanim" and c.className == "StringValue" then
  1076. return c
  1077. end
  1078. end
  1079. return nil
  1080. end
  1081.  
  1082. function animateTool()
  1083.  
  1084. if (toolAnim == "None") then
  1085. playToolAnimation("toolnone", toolTransitionTime, Humanoid)
  1086. return
  1087. end
  1088.  
  1089. if (toolAnim == "Slash") then
  1090. playToolAnimation("toolslash", 0, Humanoid)
  1091. return
  1092. end
  1093.  
  1094. if (toolAnim == "Lunge") then
  1095. playToolAnimation("toollunge", 0, Humanoid)
  1096. return
  1097. end
  1098. end
  1099.  
  1100. function moveSit()
  1101. RightShoulder.MaxVelocity = 0.15
  1102. LeftShoulder.MaxVelocity = 0.15
  1103. RightShoulder:SetDesiredAngle(3.14 /2)
  1104. LeftShoulder:SetDesiredAngle(-3.14 /2)
  1105. RightHip:SetDesiredAngle(3.14 /2)
  1106. LeftHip:SetDesiredAngle(-3.14 /2)
  1107. end
  1108.  
  1109. local lastTick = 0
  1110.  
  1111. function move(time)
  1112. local amplitude = 1
  1113. local frequency = 1
  1114. local deltaTime = time - lastTick
  1115. lastTick = time
  1116.  
  1117. local climbFudge = 0
  1118. local setAngles = false
  1119.  
  1120. if (jumpAnimTime > 0) then
  1121. jumpAnimTime = jumpAnimTime - deltaTime
  1122. end
  1123.  
  1124. if (pose == "FreeFall" and jumpAnimTime <= 0) then
  1125. playAnimation("fall", fallTransitionTime, Humanoid)
  1126. elseif (pose == "Seated") then
  1127. playAnimation("sit", 0.5, Humanoid)
  1128. return
  1129. elseif (pose == "Running") then
  1130. if Figure and Humanoid and Humanoid.WalkSpeed<17 then
  1131. playAnimation("walk", 0.1, Humanoid);
  1132. elseif Figure and Humanoid and Humanoid.WalkSpeed>17 then
  1133. playAnimation("run", 0.1, Humanoid);
  1134. end;
  1135. elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
  1136. stopAllAnimations()
  1137. amplitude = 0.1
  1138. frequency = 1
  1139. setAngles = true
  1140. end
  1141. if (setAngles) then
  1142. local desiredAngle = amplitude * math.sin(time * frequency)
  1143. RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
  1144. LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
  1145. RightHip:SetDesiredAngle(-desiredAngle)
  1146. LeftHip:SetDesiredAngle(-desiredAngle)
  1147. end
  1148. -- Tool Animation handling
  1149. local tool = getTool()
  1150. if tool and tool:FindFirstChild("Handle") then
  1151. local animStringValueObject = getToolAnim(tool)
  1152. if animStringValueObject then
  1153. toolAnim = animStringValueObject.Value
  1154. -- message recieved, delete StringValue
  1155. animStringValueObject.Parent = nil
  1156. toolAnimTime = time + .3
  1157. end
  1158. if time > toolAnimTime then
  1159. toolAnimTime = 0
  1160. toolAnim = "None"
  1161. end
  1162. animateTool()
  1163. else
  1164. stopToolAnimations()
  1165. toolAnim = "None"
  1166. toolAnimInstance = nil
  1167. toolAnimTime = 0
  1168. end
  1169. end
  1170. -- connect events
  1171. Humanoid.Died:connect(onDied)
  1172. Humanoid.Running:connect(onRunning)
  1173. Humanoid.Jumping:connect(onJumping)
  1174. Humanoid.Climbing:connect(onClimbing)
  1175. Humanoid.GettingUp:connect(onGettingUp)
  1176. Humanoid.FreeFalling:connect(onFreeFall)
  1177. Humanoid.FallingDown:connect(onFallingDown)
  1178. Humanoid.Seated:connect(onSeated)
  1179. Humanoid.PlatformStanding:connect(onPlatformStanding)
  1180. Humanoid.Swimming:connect(onSwimming)
  1181. local runService = game:GetService("RunService");
  1182. playAnimation("idle", 0.1, Humanoid)
  1183. pose = "Standing"
  1184. while Wait(0)do
  1185. local _,time=wait(0)
  1186. move(time)
  1187. end
  1188. end,o64)
  1189. end))
  1190. o65.Name = "climb"
  1191. o65.Parent = o64
  1192. o66.Name = "ClimbAnim"
  1193. o66.Parent = o65
  1194. o66.AnimationId = "http://www.roblox.com/asset/?id=180436334"
  1195. o67.Name = "fall"
  1196. o67.Parent = o64
  1197. o68.Name = "FallAnim"
  1198. o68.Parent = o67
  1199. o68.AnimationId = "http://www.roblox.com/asset/?id=180436148"
  1200. o69.Name = "idle"
  1201. o69.Parent = o64
  1202. o70.Name = "Animation1"
  1203. o70.Parent = o69
  1204. o70.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  1205. o71.Name = "Weight"
  1206. o71.Parent = o70
  1207. o71.Value = 9
  1208. o72.Name = "Animation2"
  1209. o72.Parent = o69
  1210. o72.AnimationId = "http://www.roblox.com/asset/?id=180435792"
  1211. o73.Name = "Weight"
  1212. o73.Parent = o72
  1213. o73.Value = 1
  1214. o74.Name = "jump"
  1215. o74.Parent = o64
  1216. o75.Name = "JumpAnim"
  1217. o75.Parent = o74
  1218. o75.AnimationId = "http://www.roblox.com/asset/?id=125750702"
  1219. o76.Name = "run"
  1220. o76.Parent = o64
  1221. o77.Name = "RunAnim"
  1222. o77.Parent = o76
  1223. o77.AnimationId = "http://www.roblox.com/asset/?id=252557606"
  1224. o78.Name = "sit"
  1225. o78.Parent = o64
  1226. o79.Name = "SitAnim"
  1227. o79.Parent = o78
  1228. o79.AnimationId = "http://www.roblox.com/asset/?id=178130996"
  1229. o80.Name = "toolnone"
  1230. o80.Parent = o64
  1231. o81.Name = "ToolNoneAnim"
  1232. o81.Parent = o80
  1233. o81.AnimationId = "http://www.roblox.com/asset/?id=182393478"
  1234. o82.Name = "walk"
  1235. o82.Parent = o64
  1236. o83.Name = "WalkAnim"
  1237. o83.Parent = o82
  1238. o83.AnimationId = "http://www.roblox.com/asset/?id=180426354"
  1239. o84.Name = "Health"
  1240. o84.Parent = o1
  1241. table.insert(cors,coroutine.create(function()
  1242. wait()
  1243. runDummyScript(function()
  1244. --Responsible for regening a player's humanoid's health
  1245.  
  1246. -- declarations
  1247. local Figure = script.Parent
  1248. local Head = Figure:WaitForChild("Head")
  1249. local Humanoid;
  1250. for _,Child in pairs(Figure:GetChildren())do
  1251. if Child and Child.ClassName=="Humanoid"then
  1252. Humanoid=Child;
  1253. end;
  1254. end;
  1255. local regening = false
  1256.  
  1257. -- regeneration
  1258. function regenHealth()
  1259. if regening then return end
  1260. regening = true
  1261.  
  1262. while Humanoid.Health < Humanoid.MaxHealth do
  1263. local s = wait(1)
  1264. local health = Humanoid.Health
  1265. if health~=0 and health < Humanoid.MaxHealth then
  1266. local newHealthDelta = 0.01 * s * Humanoid.MaxHealth
  1267. health = health + newHealthDelta
  1268. Humanoid.Health = math.min(health,Humanoid.MaxHealth)
  1269. end
  1270. end
  1271.  
  1272. if Humanoid.Health > Humanoid.MaxHealth then
  1273. Humanoid.Health = Humanoid.MaxHealth
  1274. end
  1275.  
  1276. regening = false
  1277. end
  1278.  
  1279. Humanoid.HealthChanged:connect(regenHealth)
  1280.  
  1281. end,o84)
  1282. end))
  1283. o85.Name = "PsstGuyMain"
  1284. o85.Parent = o1
  1285. table.insert(cors,coroutine.create(function()
  1286. wait()
  1287. runDummyScript(function()
  1288. --[[ By: Brutez. ]]--
  1289. local PsstGuyScript=script;
  1290. repeat Wait(0);until PsstGuyScript and PsstGuyScript.Parent and PsstGuyScript.Parent.ClassName=="Model"and PsstGuyScript.Parent:FindFirstChild("Head")and PsstGuyScript.Parent:FindFirstChild("Torso");
  1291. local PsstGuy=PsstGuyScript.Parent;
  1292. function raycast(Spos,vec,currentdist)
  1293. local hit2,pos2=game.Workspace:FindPartOnRay(Ray.new(Spos+(vec*.05),vec*currentdist),PsstGuy);
  1294. if hit2~=nil and pos2 then
  1295. if hit2.Name=="Handle" and not hit2.CanCollide or string.sub(hit2.Name,1,6)=="Effect"and not hit2.CanCollide then
  1296. local currentdist=currentdist-(pos2-Spos).magnitude;
  1297. return raycast(pos2,vec,currentdist);
  1298. end;
  1299. end;
  1300. return hit2,pos2;
  1301. end;
  1302. function RayCast(Position,Direction,MaxDistance,IgnoreList)
  1303. return Game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(Position,Direction.unit*(MaxDistance or 999.999)),IgnoreList);
  1304. end;
  1305. local PsstGuyHumanoid;
  1306. for _,Child in pairs(PsstGuy:GetChildren())do
  1307. if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
  1308. PsstGuyHumanoid=Child;
  1309. end;
  1310. end;
  1311. local FindPartOnRay = Game:GetService("Workspace").FindPartOnRay;
  1312. function IsAbleToSee(Parent,Target)
  1313. if Parent and Parent:FindFirstChild("Torso")and Target and Target:FindFirstChild("Torso")then
  1314. if (Parent:FindFirstChild("Torso").Position-Target:FindFirstChild("Torso").Position):Dot(Target:FindFirstChild("Torso").CFrame.lookVector)>0 then
  1315. if Parent and Parent:FindFirstChild("Torso")and Target and Target:FindFirstChild("Torso")then
  1316. local TheRay = Ray.new(Target:FindFirstChild("Torso").Position,(Parent:FindFirstChild("Torso").Position-Target:FindFirstChild("Torso").Position).unit*200)
  1317. local ThePartOnTheRay = FindPartOnRay(Game:GetService("Workspace"),TheRay,Target,false)
  1318. return not ThePartOnTheRay or ThePartOnTheRay:IsDescendantOf(Parent)
  1319. end;
  1320. end;
  1321. return false;
  1322. end;
  1323. end;
  1324. function IsAbleToSee2(Parent,Target)
  1325. if Parent and Parent:FindFirstChild("Torso")and Target and Target:FindFirstChild("Torso")then
  1326. local TheRay = Ray.new(Target:FindFirstChild("Torso").Position,(Parent:FindFirstChild("Torso").Position-Target:FindFirstChild("Torso").Position).unit*200)
  1327. local ThePartOnTheRay = FindPartOnRay(Game:GetService("Workspace"),TheRay,Target,false)
  1328. return not ThePartOnTheRay or ThePartOnTheRay:IsDescendantOf(Parent)
  1329. end;
  1330. return false;
  1331. end;
  1332. local AttackDebounce=false;
  1333. local PsstGuyHead=PsstGuy:FindFirstChild("Head");
  1334. local PsstGuyHumanoidRootPart=PsstGuy:FindFirstChild("HumanoidRootPart");
  1335. local PsstDebounce=false;
  1336. local DynamicWander=true;
  1337. local OriginalC0;
  1338. if PsstGuyScript and PsstGuy and PsstGuy:FindFirstChild("Torso")and PsstGuy:FindFirstChild("Torso"):FindFirstChild("Neck")then
  1339. PsstGuy:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0);
  1340. OriginalC0=PsstGuy:FindFirstChild("Torso"):FindFirstChild("Neck").C0;
  1341. end;
  1342. local SwingAnimation=PsstGuyHumanoid:LoadAnimation(PsstGuyScript:FindFirstChild("Swing"));
  1343. function FindNearestBae()
  1344. local NoticeDistance=100;
  1345. local TargetMain;
  1346. for _,TargetModel in pairs(Game:GetService("Workspace"):GetChildren())do
  1347. if PsstGuyScript and PsstGuy and PsstGuyHumanoid and PsstGuyHumanoid.Health~=0 and TargetModel.className=="Model"and TargetModel~=PsstGuy and TargetModel.Name~=PsstGuy.Name and TargetModel:FindFirstChild("Torso")and TargetModel:FindFirstChild("Head")then
  1348. local TargetPart=TargetModel:FindFirstChild("Torso");
  1349. local FoundHumanoid;
  1350. for _,Child in pairs(TargetModel:GetChildren())do
  1351. if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
  1352. FoundHumanoid=Child;
  1353. end;
  1354. end;
  1355. if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-PsstGuyHumanoidRootPart.Position).magnitude<NoticeDistance then
  1356. TargetMain=TargetPart;
  1357. NoticeDistance=(TargetPart.Position-PsstGuyHumanoidRootPart.Position).magnitude;
  1358. end;
  1359. end;
  1360. end;
  1361. return TargetMain;
  1362. end;
  1363. while Wait(0)do
  1364. if PsstGuyScript and PsstGuy and PsstGuy:FindFirstChild("Night1")and not PsstGuy:FindFirstChild("Night1").IsPlaying then
  1365. PsstGuy:FindFirstChild("Night1"):Play();
  1366. end;
  1367. local IsBeingLookedAt=false;
  1368. local TargetPoint=PsstGuyHumanoid.TargetPoint;
  1369. local Blockage,BlockagePos=RayCast((PsstGuyHumanoidRootPart.CFrame+CFrame.new(PsstGuyHumanoidRootPart.Position,Vector3.new(TargetPoint.X,PsstGuyHumanoidRootPart.Position.Y,TargetPoint.Z)).lookVector*(PsstGuyHumanoidRootPart.Size.Z/2)).p,PsstGuyHumanoidRootPart.CFrame.lookVector,(PsstGuyHumanoidRootPart.Size.Z*2.5),{PsstGuy,PsstGuy})
  1370. local Jumpable=false;
  1371. local MainTarget=FindNearestBae();
  1372. local BlockageHumanoid;
  1373. if Blockage then
  1374. if Blockage and Blockage.Parent and Blockage.Parent:IsA("Model")then
  1375. for _,Child in pairs(Blockage.Parent:GetChildren())do
  1376. if Child and Child:IsA("Humanoid")and Child.Health~=0 then
  1377. BlockageHumanoid=Child;
  1378. end;
  1379. end;
  1380. end;
  1381. Jumpable=true;
  1382. if Blockage and Blockage:IsA("Terrain")then
  1383. local CellPos=Blockage:WorldToCellPreferSolid((BlockagePos-Vector3.new(0,2,0)));
  1384. local CellMaterial,CellShape,CellOrientation=Blockage:GetCell(CellPos.X,CellPos.Y,CellPos.Z);
  1385. if CellMaterial==Enum.CellMaterial.Water or MainTarget and Blockage:IsDescendantOf(MainTarget.Parent)or BlockageHumanoid~=nil then
  1386. Jumpable=false;
  1387. end;
  1388. elseif Blockage.ClassName=="TrussPart"or Blockage.ClassName=="WedgePart"or Blockage.Name=="Handle"and Blockage.Parent:IsA("Hat")or Blockage.Name=="Handle"and Blockage.Parent:IsA("Tool")or MainTarget and Blockage:IsDescendantOf(MainTarget.Parent)or BlockageHumanoid~=nil then
  1389. Jumpable=false;
  1390. end;
  1391. end;
  1392. if PsstGuyScript and PsstGuy and PsstGuyHumanoid and PsstGuyHumanoid.Health~=0 and not PsstGuyHumanoid.Sit and Jumpable then
  1393. PsstGuyHumanoid.Jump=true;
  1394. end;
  1395. if PsstGuyScript and PsstGuy and PsstGuyHead and PsstGuyHumanoidRootPart and PsstGuyHead:FindFirstChild("Runner")and(PsstGuyHumanoidRootPart.Velocity-Vector3.new(0,PsstGuyHumanoidRootPart.Velocity.y,0)).magnitude>=5 and PsstGuyHumanoid and PsstGuyHumanoid.Health~=0 then
  1396. local FiredRay=Ray.new(PsstGuyHumanoidRootPart.Position,Vector3.new(0,-4,0));
  1397. local RayTarget,endPoint=Game:GetService("Workspace"):FindPartOnRay(FiredRay,PsstGuy);
  1398. if RayTarget then
  1399. if PsstGuyScript and PsstGuy and PsstGuyHead and PsstGuyHead:FindFirstChild("Runner")and PsstGuyHumanoid and PsstGuyHumanoid.WalkSpeed<29 then
  1400. PsstGuy:FindFirstChild("Head"):FindFirstChild("Runner").Pitch=0.8;
  1401. if PsstGuyScript and PsstGuy and PsstGuyHead and PsstGuyHead:FindFirstChild("Runner")and not PsstGuyHead:FindFirstChild("Runner").IsPlaying then
  1402. PsstGuy:FindFirstChild("Head"):FindFirstChild("Runner"):Play();
  1403. end;
  1404. elseif PsstGuyScript and PsstGuy and PsstGuyHead and PsstGuyHead:FindFirstChild("Runner")and PsstGuyHumanoid and PsstGuyHumanoid.WalkSpeed>29 then
  1405. PsstGuy:FindFirstChild("Head"):FindFirstChild("Runner").Pitch=1;
  1406. if PsstGuyScript and PsstGuy and PsstGuyHead and PsstGuyHead:FindFirstChild("Runner")and not PsstGuyHead:FindFirstChild("Runner").IsPlaying then
  1407. PsstGuy:FindFirstChild("Head"):FindFirstChild("Runner"):Play();
  1408. end;
  1409. end;
  1410. end;
  1411. elseif PsstGuyScript and PsstGuy and PsstGuyHead and PsstGuyHumanoidRootPart and PsstGuyHead:FindFirstChild("Runner")and(PsstGuyHumanoidRootPart.Velocity-Vector3.new(0,PsstGuyHumanoidRootPart.Velocity.y,0)).magnitude<=5 and PsstGuyHumanoid and PsstGuyHumanoid.Health~=0 then
  1412. PsstGuy:FindFirstChild("Head"):FindFirstChild("Runner").Pitch=0.8;
  1413. if PsstGuyScript and PsstGuy and PsstGuyHead and PsstGuyHead:FindFirstChild("Runner")and PsstGuyHead:FindFirstChild("Runner").IsPlaying then
  1414. PsstGuy:FindFirstChild("Head"):FindFirstChild("Runner"):Stop();
  1415. end;
  1416. end;
  1417. local MainTarget=FindNearestBae();
  1418. local FoundHumanoid;
  1419. if MainTarget then
  1420. for _,Child in pairs(MainTarget.Parent:GetChildren())do
  1421. if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
  1422. FoundHumanoid=Child;
  1423. end;
  1424. end;
  1425. end;
  1426. if PsstGuyScript and PsstGuy and PsstGuyHumanoid and PsstGuyHumanoid.Health~=0 and MainTarget and MainTarget.Parent and FoundHumanoid and FoundHumanoid.Jump then
  1427. PsstGuyHumanoid.Jump=true;
  1428. end;
  1429. if MainTarget then
  1430. if PsstGuyScript and PsstGuy and PsstGuyHumanoid and PsstGuyHumanoid.Health~=0 then
  1431. if MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-PsstGuyHumanoidRootPart.Position).magnitude>7 then
  1432. PsstGuyHumanoid.WalkSpeed=30;
  1433. PsstDebounce=false;
  1434. elseif MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-PsstGuyHumanoidRootPart.Position).magnitude<7 then
  1435. if not PsstDebounce and PsstGuyScript and PsstGuy and PsstGuyHead and PsstGuyHead:FindFirstChild("Psst")then
  1436. PsstGuyHead:FindFirstChild("Psst").Pitch=0.9+math.random()*0.2;
  1437. PsstGuyHead:FindFirstChild("Psst"):Play();
  1438. PsstDebounce=true;
  1439. end;
  1440. PsstGuyHumanoid.WalkSpeed=0.004;
  1441. end;
  1442. PsstGuyHumanoid:MoveTo(MainTarget.Position+(MainTarget.Position-PsstGuyHumanoidRootPart.Position).unit*2,Game:GetService("Workspace"):FindFirstChild("Terrain"));
  1443. end;
  1444. if PsstGuyScript and PsstGuy and PsstGuy:FindFirstChild("Torso")and PsstGuy:FindFirstChild("Torso"):FindFirstChild("Neck")then
  1445. local NeckRotation=(PsstGuy:FindFirstChild("Torso").Position.Y-MainTarget.Parent:FindFirstChild("Head").Position.Y)/10;
  1446. if NeckRotation>-1.5 and NeckRotation<1.5 then
  1447. if PsstGuyScript and PsstGuy and PsstGuy:FindFirstChild("Torso")and PsstGuy:FindFirstChild("Torso"):FindFirstChild("Neck")then
  1448. PsstGuy:FindFirstChild("Torso"):FindFirstChild("Neck").C0=OriginalC0*CFrame.fromEulerAnglesXYZ(NeckRotation,0,0);
  1449. end;
  1450. end;
  1451. if NeckRotation<-1.5 then
  1452. PsstGuy:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,-0.993636549,0.112633869,0,0.112633869,0.993636549);
  1453. elseif NeckRotation>1.5 then
  1454. if PsstGuyScript and PsstGuy and PsstGuy:FindFirstChild("Torso")and PsstGuy:FindFirstChild("Torso"):FindFirstChild("Neck")then
  1455. PsstGuy:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0.996671617,0.081521146,0,0.081521146,-0.996671617);
  1456. end;
  1457. end;
  1458. end;
  1459. if PsstDebounce and(PsstGuy:FindFirstChild("Torso").CFrame.p-MainTarget.CFrame.p).magnitude<200 and IsAbleToSee(PsstGuy,MainTarget.Parent)then
  1460. IsBeingLookedAt=true;
  1461. if MainTarget.Parent and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and IsBeingLookedAt and IsAbleToSee2(PsstGuy,MainTarget.Parent)then
  1462. if(PsstGuy:FindFirstChild("Torso").CFrame.p-MainTarget.CFrame.p).magnitude then
  1463. SwingAnimation:Play();
  1464. FoundHumanoid:TakeDamage(10);
  1465. end;
  1466. end;
  1467. end;
  1468. else
  1469. if PsstGuyScript and PsstGuy and PsstGuyHumanoid and PsstGuyHumanoid.Health~=0 and PsstGuyHead and PsstGuyHead:FindFirstChild("Runner")then
  1470. PsstGuyHumanoid.WalkSpeed=16;
  1471. PsstGuyHead:FindFirstChild("Runner").Pitch=0.8;
  1472. end;
  1473. if PsstGuyScript and PsstGuy and PsstGuy:FindFirstChild("Torso")and PsstGuy:FindFirstChild("Torso"):FindFirstChild("Neck")then
  1474. PsstGuy:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0);
  1475. end;
  1476. local SwitchWander=math.random(1,2000);
  1477. if SwitchWander==1 and not DynamicWander then
  1478. DynamicWander=true;
  1479. elseif SwitchWander==1 and DynamicWander then
  1480. DynamicWander=false;
  1481. end;
  1482. local WalkChance=math.random(1,40);
  1483. local JumpChance=math.random(1,70);
  1484. if WalkChance==1 and PsstGuyScript and PsstGuy and PsstGuy:FindFirstChild("Torso")and PsstGuy:FindFirstChild("Head")and PsstGuyHumanoid and PsstGuyHumanoid.Health>0.001 and not DynamicWander then
  1485. PsstGuyHumanoid:MoveTo(Game:GetService("Workspace"):FindFirstChild("Terrain").Position+Vector3.new(math.random(-2048,2048),0,math.random(-2048,2048)),Game:GetService("Workspace"):FindFirstChild("Terrain"));
  1486. elseif PsstGuyScript and PsstGuy and PsstGuy:FindFirstChild("Torso")and PsstGuy:FindFirstChild("Head")and PsstGuyHumanoid and PsstGuyHumanoid.Health>0.001 and DynamicWander then
  1487. local WanderAngle=(math.random()-0.5)*1;
  1488. local RotatingLookVector=CFrame.Angles(0,WanderAngle,0)*script.Parent.Torso.CFrame.lookVector;
  1489. PsstGuyHumanoid:MoveTo(PsstGuy:FindFirstChild("Torso").Position+6*RotatingLookVector,PsstGuy:FindFirstChild("Torso"));
  1490. end;
  1491. if JumpChance==1 and PsstGuyScript and PsstGuy and PsstGuy:FindFirstChild("Torso")and PsstGuy:FindFirstChild("Head")and PsstGuyHumanoid and PsstGuyHumanoid.Health>0.001 then
  1492. PsstGuyHumanoid.Jump=true;
  1493. end;
  1494. end;
  1495. if PsstGuyScript and PsstGuy and PsstGuyHumanoid then
  1496. PsstGuyHumanoid.DisplayDistanceType="None";
  1497. PsstGuyHumanoid.HealthDisplayDistance=0;
  1498. PsstGuyHumanoid.Name="Shadow";
  1499. PsstGuyHumanoid.NameDisplayDistance=0;
  1500. PsstGuyHumanoid.NameOcclusion="EnemyOcclusion";
  1501. PsstGuyHumanoid.AutoJumpEnabled=true;
  1502. PsstGuyHumanoid.AutoRotate=true;
  1503. PsstGuyHumanoid.MaxHealth=5000;
  1504. PsstGuyHumanoid.JumpPower=60;
  1505. PsstGuyHumanoid.MaxSlopeAngle=89.9;
  1506. end;
  1507. if PsstGuyScript and PsstGuy and PsstGuyHumanoid and not PsstGuyHumanoid.AutoJumpEnabled then
  1508. PsstGuyHumanoid.AutoJumpEnabled=true;
  1509. end;
  1510. if PsstGuyScript and PsstGuy and PsstGuyHumanoid and not PsstGuyHumanoid.AutoRotate then
  1511. PsstGuyHumanoid.AutoRotate=true;
  1512. end;
  1513. if PsstGuyScript and PsstGuy and PsstGuyHumanoid and PsstGuyHumanoid.PlatformStand then
  1514. PsstGuyHumanoid.PlatformStand=false;
  1515. end;
  1516. if PsstGuyScript and PsstGuy and PsstGuyHumanoid and PsstGuyHumanoid.Sit then
  1517. PsstGuyHumanoid.Sit=false;
  1518. end;
  1519. end;
  1520. --[[ By: Brutez. ]]--
  1521. end,o85)
  1522. end))
  1523. o86.Name = "Swing"
  1524. o86.Parent = o85
  1525. o86.AnimationId = "rbxassetid://191123156"
  1526. o87.Name = "Respawn"
  1527. o87.Parent = o1
  1528. table.insert(cors,coroutine.create(function()
  1529. wait()
  1530. runDummyScript(function()
  1531. --[[ By: Brutez, 2/28/2015, 1:34 AM, (UTC-08:00) Pacific Time (US & Canada) ]]--
  1532. local PlayerSpawning=false; --[[ Change this to true if you want the NPC to spawn like a player, and change this to false if you want the NPC to spawn at it's current position. ]]--
  1533. local AdvancedRespawnScript=script;
  1534. repeat Wait(0)until script and script.Parent and script.Parent.ClassName=="Model";
  1535. local PsstGuy=AdvancedRespawnScript.Parent;
  1536. if AdvancedRespawnScript and PsstGuy and PsstGuy:FindFirstChild("Thumbnail")then
  1537. PsstGuy:FindFirstChild("Thumbnail"):Destroy();
  1538. end;
  1539. local GameDerbis=Game:GetService("Debris");
  1540. local PsstGuyHumanoid;
  1541. for _,Child in pairs(PsstGuy:GetChildren())do
  1542. if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
  1543. PsstGuyHumanoid=Child;
  1544. end;
  1545. end;
  1546. local Respawndant=PsstGuy:Clone();
  1547. if PlayerSpawning then --[[ LOOK AT LINE: 2. ]]--
  1548. coroutine.resume(coroutine.create(function()
  1549. if PsstGuy and PsstGuyHumanoid and PsstGuyHumanoid:FindFirstChild("Status")and not PsstGuyHumanoid:FindFirstChild("Status"):FindFirstChild("AvalibleSpawns")then
  1550. SpawnModel=Instance.new("Model");
  1551. SpawnModel.Parent=PsstGuyHumanoid.Status;
  1552. SpawnModel.Name="AvalibleSpawns";
  1553. else
  1554. SpawnModel=PsstGuyHumanoid:FindFirstChild("Status"):FindFirstChild("AvalibleSpawns");
  1555. end;
  1556. function FindSpawn(SearchValue)
  1557. local PartsArchivable=SearchValue:GetChildren();
  1558. for AreaSearch=1,#PartsArchivable do
  1559. if PartsArchivable[AreaSearch].className=="SpawnLocation"then
  1560. local PositionValue=Instance.new("Vector3Value",SpawnModel);
  1561. PositionValue.Value=PartsArchivable[AreaSearch].Position;
  1562. PositionValue.Name=PartsArchivable[AreaSearch].Duration;
  1563. end;
  1564. FindSpawn(PartsArchivable[AreaSearch]);
  1565. end;
  1566. end;
  1567. FindSpawn(Game:GetService("Workspace"));
  1568. local SpawnChilden=SpawnModel:GetChildren();
  1569. if#SpawnChilden>0 then
  1570. local SpawnItself=SpawnChilden[math.random(1,#SpawnChilden)];
  1571. local RespawningForceField=Instance.new("ForceField");
  1572. RespawningForceField.Parent=PsstGuy;
  1573. RespawningForceField.Name="SpawnForceField";
  1574. GameDerbis:AddItem(RespawningForceField,SpawnItself.Name);
  1575. PsstGuy:MoveTo(SpawnItself.Value+Vector3.new(0,3.5,0));
  1576. else
  1577. if PsstGuy:FindFirstChild("SpawnForceField")then
  1578. PsstGuy:FindFirstChild("SpawnForceField"):Destroy();
  1579. end;
  1580. PsstGuy:MoveTo(Vector3.new(0,115,0));
  1581. end;
  1582. end));
  1583. end;
  1584. function Respawn()
  1585. Wait(5);
  1586. Respawndant.Parent=PsstGuy.Parent;
  1587. Respawndant:makeJoints();
  1588. Respawndant:FindFirstChild("Head"):MakeJoints();
  1589. Respawndant:FindFirstChild("Torso"):MakeJoints();
  1590. PsstGuy:remove();
  1591. end;
  1592. if AdvancedRespawnScript and PsstGuy and PsstGuyHumanoid then
  1593. PsstGuyHumanoid.Died:connect(Respawn);
  1594. end;
  1595. --[[ By: Brutez, 2/28/2015, 1:34 AM, (UTC-08:00) Pacific Time (US & Canada) ]]--
  1596. end,o87)
  1597. end))
  1598. mas.Parent = workspace
  1599. mas:MakeJoints()
  1600. local mas1 = mas:GetChildren()
  1601. for i=1,#mas1 do
  1602. mas1[i].Parent = script
  1603. ypcall(function() mas1[i]:MakeJoints() end)
  1604. end
  1605. mas:Destroy()
  1606. for i=1,#cors do
  1607. coroutine.resume(cors[i])
  1608. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement