Advertisement
coolgoldboy166

CHAINSAWWWW

Nov 17th, 2017
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 51.85 KB | None | 0 0
  1. --Converted with ttyyuu12345's model to script plugin v4
  2. function sandbox(var,func)
  3. local env = getfenv(func)
  4. local newenv = setmetatable({},{
  5. __index = function(self,k)
  6. if k=="script" then
  7. return var
  8. else
  9. return env[k]
  10. end
  11. end,
  12. })
  13. setfenv(func,newenv)
  14. return func
  15. end
  16. cors = {}
  17. mas = Instance.new("Model",game:GetService("Lighting"))
  18. Model0 = Instance.new("Model")
  19. Part1 = Instance.new("Part")
  20. Motor6D2 = Instance.new("Motor6D")
  21. Part3 = Instance.new("Part")
  22. Motor6D4 = Instance.new("Motor6D")
  23. Motor6D5 = Instance.new("Motor6D")
  24. Motor6D6 = Instance.new("Motor6D")
  25. Motor6D7 = Instance.new("Motor6D")
  26. Motor6D8 = Instance.new("Motor6D")
  27. Sound9 = Instance.new("Sound")
  28. BillboardGui10 = Instance.new("BillboardGui")
  29. TextLabel11 = Instance.new("TextLabel")
  30. BillboardGui12 = Instance.new("BillboardGui")
  31. Frame13 = Instance.new("Frame")
  32. Frame14 = Instance.new("Frame")
  33. Frame15 = Instance.new("Frame")
  34. Part16 = Instance.new("Part")
  35. Part17 = Instance.new("Part")
  36. Part18 = Instance.new("Part")
  37. Part19 = Instance.new("Part")
  38. Weld20 = Instance.new("Weld")
  39. Part21 = Instance.new("Part")
  40. Sound22 = Instance.new("Sound")
  41. SpecialMesh23 = Instance.new("SpecialMesh")
  42. Script24 = Instance.new("Script")
  43. StringValue25 = Instance.new("StringValue")
  44. Animation26 = Instance.new("Animation")
  45. StringValue27 = Instance.new("StringValue")
  46. Animation28 = Instance.new("Animation")
  47. StringValue29 = Instance.new("StringValue")
  48. Animation30 = Instance.new("Animation")
  49. NumberValue31 = Instance.new("NumberValue")
  50. Animation32 = Instance.new("Animation")
  51. NumberValue33 = Instance.new("NumberValue")
  52. StringValue34 = Instance.new("StringValue")
  53. Animation35 = Instance.new("Animation")
  54. StringValue36 = Instance.new("StringValue")
  55. Animation37 = Instance.new("Animation")
  56. StringValue38 = Instance.new("StringValue")
  57. Animation39 = Instance.new("Animation")
  58. StringValue40 = Instance.new("StringValue")
  59. Animation41 = Instance.new("Animation")
  60. Shirt42 = Instance.new("Shirt")
  61. Animation43 = Instance.new("Animation")
  62. Script44 = Instance.new("Script")
  63. BodyColors45 = Instance.new("BodyColors")
  64. Sound46 = Instance.new("Sound")
  65. Script47 = Instance.new("Script")
  66. Script48 = Instance.new("Script")
  67. Humanoid49 = Instance.new("Humanoid")
  68. Tool50 = Instance.new("Tool")
  69. Part51 = Instance.new("Part")
  70. SpecialMesh52 = Instance.new("SpecialMesh")
  71. Sound53 = Instance.new("Sound")
  72. Sound54 = Instance.new("Sound")
  73. Sound55 = Instance.new("Sound")
  74. Sound56 = Instance.new("Sound")
  75. Sound57 = Instance.new("Sound")
  76. Sound58 = Instance.new("Sound")
  77. Sound59 = Instance.new("Sound")
  78. Sound60 = Instance.new("Sound")
  79. Sound61 = Instance.new("Sound")
  80. Sound62 = Instance.new("Sound")
  81. Sound63 = Instance.new("Sound")
  82. Sound64 = Instance.new("Sound")
  83. Sound65 = Instance.new("Sound")
  84. Sound66 = Instance.new("Sound")
  85. Sound67 = Instance.new("Sound")
  86. Sound68 = Instance.new("Sound")
  87. Sound69 = Instance.new("Sound")
  88. Sound70 = Instance.new("Sound")
  89. Sound71 = Instance.new("Sound")
  90. Sound72 = Instance.new("Sound")
  91. Sound73 = Instance.new("Sound")
  92. Sound74 = Instance.new("Sound")
  93. Sound75 = Instance.new("Sound")
  94. Sound76 = Instance.new("Sound")
  95. Sound77 = Instance.new("Sound")
  96. Sound78 = Instance.new("Sound")
  97. Sound79 = Instance.new("Sound")
  98. Sound80 = Instance.new("Sound")
  99. Sound81 = Instance.new("Sound")
  100. Sound82 = Instance.new("Sound")
  101. Sound83 = Instance.new("Sound")
  102. Sound84 = Instance.new("Sound")
  103. Sound85 = Instance.new("Sound")
  104. Sound86 = Instance.new("Sound")
  105. Sound87 = Instance.new("Sound")
  106. Sound88 = Instance.new("Sound")
  107. Sound89 = Instance.new("Sound")
  108. Sound90 = Instance.new("Sound")
  109. Sound91 = Instance.new("Sound")
  110. Sound92 = Instance.new("Sound")
  111. Sound93 = Instance.new("Sound")
  112. LocalScript94 = Instance.new("LocalScript")
  113. Script95 = Instance.new("Script")
  114. ShirtGraphic96 = Instance.new("ShirtGraphic")
  115. Script97 = Instance.new("Script")
  116. Model0.Name = "Dipsy Chainsaw"
  117. Model0.Parent = mas
  118. Part1.Name = "HumanoidRootPart"
  119. Part1.Parent = Model0
  120. Part1.Transparency = 1
  121. Part1.FormFactor = Enum.FormFactor.Symmetric
  122. Part1.Size = Vector3.new(2, 2, 1)
  123. Part1.CFrame = CFrame.new(-30, 3.00001001, -11, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  124. Part1.BottomSurface = Enum.SurfaceType.Smooth
  125. Part1.TopSurface = Enum.SurfaceType.Smooth
  126. Part1.Position = Vector3.new(-30, 3.00001001, -11)
  127. Motor6D2.Name = "Root Hip"
  128. Motor6D2.Parent = Part1
  129. Motor6D2.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  130. Motor6D2.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  131. Motor6D2.Part0 = Part1
  132. Motor6D2.Part1 = Part3
  133. Motor6D2.MaxVelocity = 0.10000000149012
  134. Part3.Name = "Torso"
  135. Part3.Parent = Model0
  136. Part3.BrickColor = BrickColor.new("Lime green")
  137. Part3.CanCollide = false
  138. Part3.FormFactor = Enum.FormFactor.Symmetric
  139. Part3.Size = Vector3.new(2, 2, 1)
  140. Part3.CFrame = CFrame.new(-30, 3.00001001, -11, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  141. Part3.BottomSurface = Enum.SurfaceType.Smooth
  142. Part3.TopSurface = Enum.SurfaceType.Smooth
  143. Part3.Color = Color3.new(0, 1, 0)
  144. Part3.Position = Vector3.new(-30, 3.00001001, -11)
  145. Part3.Color = Color3.new(0, 1, 0)
  146. Motor6D4.Name = "Left Hip"
  147. Motor6D4.Parent = Part3
  148. Motor6D4.C0 = CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
  149. Motor6D4.C1 = CFrame.new(-0.5, 1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
  150. Motor6D4.Part0 = Part3
  151. Motor6D4.Part1 = Part16
  152. Motor6D4.MaxVelocity = 0.10000000149012
  153. Motor6D5.Name = "Right Hip"
  154. Motor6D5.Parent = Part3
  155. Motor6D5.C0 = CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08)
  156. Motor6D5.C1 = CFrame.new(0.5, 1, 0, -4.37113883e-08, 0, 1, 0, 0.99999994, 0, -1, 0, -4.37113883e-08)
  157. Motor6D5.Part0 = Part3
  158. Motor6D5.Part1 = Part17
  159. Motor6D5.MaxVelocity = 0.10000000149012
  160. Motor6D6.Name = "Left Shoulder"
  161. Motor6D6.Parent = Part3
  162. Motor6D6.C0 = CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
  163. Motor6D6.C1 = CFrame.new(0.5, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
  164. Motor6D6.Part0 = Part3
  165. Motor6D6.Part1 = Part18
  166. Motor6D6.MaxVelocity = 0.10000000149012
  167. Motor6D7.Name = "Right Shoulder"
  168. Motor6D7.Parent = Part3
  169. Motor6D7.C0 = CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08)
  170. Motor6D7.C1 = CFrame.new(-0.5, 0.5, 0, -4.37113883e-08, 0, 1, 0, 0.99999994, 0, -1, 0, -4.37113883e-08)
  171. Motor6D7.Part0 = Part3
  172. Motor6D7.Part1 = Part19
  173. Motor6D7.MaxVelocity = 0.10000000149012
  174. Motor6D8.Name = "Neck"
  175. Motor6D8.Parent = Part3
  176. Motor6D8.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  177. Motor6D8.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  178. Motor6D8.Part0 = Part3
  179. Motor6D8.Part1 = Part21
  180. Motor6D8.MaxVelocity = 0.10000000149012
  181. Sound9.Name = "HitSound"
  182. Sound9.Parent = Part3
  183. Sound9.SoundId = "rbxassetid://2766576"
  184. Sound9.Volume = 5
  185. BillboardGui10.Name = "BossGui"
  186. BillboardGui10.Parent = Part3
  187. BillboardGui10.Size = UDim2.new(5, 0, 5, 0)
  188. BillboardGui10.AlwaysOnTop = true
  189. BillboardGui10.StudsOffset = Vector3.new(0, 10, 0)
  190. TextLabel11.Parent = BillboardGui10
  191. TextLabel11.Transparency = 1
  192. TextLabel11.Size = UDim2.new(1, 0, 1, 0)
  193. TextLabel11.Text = "BOSS"
  194. TextLabel11.BackgroundColor3 = Color3.new(1, 1, 1)
  195. TextLabel11.BackgroundTransparency = 1
  196. TextLabel11.Font = Enum.Font.ArialBold
  197. TextLabel11.FontSize = Enum.FontSize.Size12
  198. TextLabel11.TextColor3 = Color3.new(1, 0, 0)
  199. TextLabel11.TextStrokeColor3 = Color3.new(0.784314, 0, 0)
  200. TextLabel11.TextStrokeTransparency = 0
  201. BillboardGui12.Name = "Healthbar"
  202. BillboardGui12.Parent = Part3
  203. BillboardGui12.Size = UDim2.new(50, 0, 1, 0)
  204. BillboardGui12.AlwaysOnTop = true
  205. BillboardGui12.StudsOffset = Vector3.new(0, 20, 0)
  206. Frame13.Parent = BillboardGui12
  207. Frame13.Size = UDim2.new(1, 0, 1, 0)
  208. Frame13.BackgroundColor3 = Color3.new(0, 0, 0)
  209. Frame13.BorderColor3 = Color3.new(0, 0, 0)
  210. Frame14.Name = "Full"
  211. Frame14.Parent = Frame13
  212. Frame14.Size = UDim2.new(1, 0, 1, 0)
  213. Frame14.BackgroundColor3 = Color3.new(0, 0.784314, 0)
  214. Frame14.BorderColor3 = Color3.new(0, 0, 0)
  215. Frame14.BorderSizePixel = 0
  216. Frame15.Name = "Reflec"
  217. Frame15.Parent = Frame14
  218. Frame15.Transparency = 0.625
  219. Frame15.Size = UDim2.new(1, 0, 0.370000005, 0)
  220. Frame15.BackgroundColor3 = Color3.new(1, 1, 1)
  221. Frame15.BackgroundTransparency = 0.625
  222. Frame15.BorderSizePixel = 0
  223. Part16.Name = "Left Leg"
  224. Part16.Parent = Model0
  225. Part16.BrickColor = BrickColor.new("Lime green")
  226. Part16.CanCollide = false
  227. Part16.FormFactor = Enum.FormFactor.Symmetric
  228. Part16.Size = Vector3.new(1, 2, 1)
  229. Part16.CFrame = CFrame.new(-30.5, 1.00001013, -11, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1)
  230. Part16.BottomSurface = Enum.SurfaceType.Smooth
  231. Part16.TopSurface = Enum.SurfaceType.Smooth
  232. Part16.Color = Color3.new(0, 1, 0)
  233. Part16.Position = Vector3.new(-30.5, 1.00001013, -11)
  234. Part16.Color = Color3.new(0, 1, 0)
  235. Part17.Name = "Right Leg"
  236. Part17.Parent = Model0
  237. Part17.BrickColor = BrickColor.new("Lime green")
  238. Part17.CanCollide = false
  239. Part17.FormFactor = Enum.FormFactor.Symmetric
  240. Part17.Size = Vector3.new(1, 2, 1)
  241. Part17.CFrame = CFrame.new(-29.5, 1.00001013, -11, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1)
  242. Part17.BottomSurface = Enum.SurfaceType.Smooth
  243. Part17.TopSurface = Enum.SurfaceType.Smooth
  244. Part17.Color = Color3.new(0, 1, 0)
  245. Part17.Position = Vector3.new(-29.5, 1.00001013, -11)
  246. Part17.Color = Color3.new(0, 1, 0)
  247. Part18.Name = "Left Arm"
  248. Part18.Parent = Model0
  249. Part18.BrickColor = BrickColor.new("Lime green")
  250. Part18.CanCollide = false
  251. Part18.FormFactor = Enum.FormFactor.Symmetric
  252. Part18.Size = Vector3.new(1, 2, 1)
  253. Part18.CFrame = CFrame.new(-31.5, 3.00001001, -11, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1)
  254. Part18.BottomSurface = Enum.SurfaceType.Smooth
  255. Part18.TopSurface = Enum.SurfaceType.Smooth
  256. Part18.Color = Color3.new(0, 1, 0)
  257. Part18.Position = Vector3.new(-31.5, 3.00001001, -11)
  258. Part18.Color = Color3.new(0, 1, 0)
  259. Part19.Name = "Right Arm"
  260. Part19.Parent = Model0
  261. Part19.BrickColor = BrickColor.new("Lime green")
  262. Part19.CanCollide = false
  263. Part19.FormFactor = Enum.FormFactor.Symmetric
  264. Part19.Size = Vector3.new(1, 2, 1)
  265. Part19.CFrame = CFrame.new(-28.5, 3.00001001, -11, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1)
  266. Part19.BottomSurface = Enum.SurfaceType.Smooth
  267. Part19.TopSurface = Enum.SurfaceType.Smooth
  268. Part19.Color = Color3.new(0, 1, 0)
  269. Part19.Position = Vector3.new(-28.5, 3.00001001, -11)
  270. Part19.Color = Color3.new(0, 1, 0)
  271. Weld20.Name = "RightGrip"
  272. Weld20.Parent = Part19
  273. Weld20.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
  274. Weld20.C1 = CFrame.new(0, 0, 1.5, 0.996545732, 0, -0.0830454826, 0.0830454826, 0, 0.996545732, 0, -1, 0)
  275. Weld20.Part0 = Part19
  276. Weld20.Part1 = Part51
  277. Part21.Name = "Head"
  278. Part21.Parent = Model0
  279. Part21.BrickColor = BrickColor.new("Lime green")
  280. Part21.FormFactor = Enum.FormFactor.Symmetric
  281. Part21.Size = Vector3.new(2, 1, 1)
  282. Part21.CFrame = CFrame.new(-30, 4.50001001, -11, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  283. Part21.BottomSurface = Enum.SurfaceType.Smooth
  284. Part21.TopSurface = Enum.SurfaceType.Smooth
  285. Part21.Color = Color3.new(0, 1, 0)
  286. Part21.Position = Vector3.new(-30, 4.50001001, -11)
  287. Part21.Color = Color3.new(0, 1, 0)
  288. Sound22.Name = "Hurt"
  289. Sound22.Parent = Part21
  290. Sound22.SoundId = "rbxassetid://134059106"
  291. Sound22.Volume = 10
  292. SpecialMesh23.Parent = Part21
  293. SpecialMesh23.Offset = Vector3.new(0, -0.5, 0)
  294. SpecialMesh23.Scale = Vector3.new(0.00999999978, 0.00999999978, 0.00999999978)
  295. SpecialMesh23.MeshType = Enum.MeshType.Sphere
  296. SpecialMesh23.Scale = Vector3.new(0.00999999978, 0.00999999978, 0.00999999978)
  297. Script24.Name = "AnimateSauce"
  298. Script24.Parent = Model0
  299. table.insert(cors,sandbox(Script24,function()
  300. function waitForChild(parent, childName)
  301. local child = parent:findFirstChild(childName)
  302. if child then return child end
  303. while true do
  304. child = parent.ChildAdded:wait()
  305. if child.Name==childName then return child end
  306. end
  307. end
  308.  
  309. local Figure = script.Parent
  310. local Torso = waitForChild(Figure, "Torso")
  311. local RightShoulder = waitForChild(Torso, "Right Shoulder")
  312. local LeftShoulder = waitForChild(Torso, "Left Shoulder")
  313. local RightHip = waitForChild(Torso, "Right Hip")
  314. local LeftHip = waitForChild(Torso, "Left Hip")
  315. local Neck = waitForChild(Torso, "Neck")
  316. local Humanoid = waitForChild(Figure, "Humanoid")
  317. local pose = "Standing"
  318.  
  319. local currentAnim = ""
  320. local currentAnimTrack = nil
  321. local currentAnimKeyframeHandler = nil
  322. local currentAnimSpeed = 1.0
  323. local animTable = {}
  324. local animNames = {
  325. idle = {
  326. { id = "http://www.roblox.com/asset/?id=125750544", weight = 9 },
  327. { id = "http://www.roblox.com/asset/?id=125750618", weight = 1 }
  328. },
  329. walk = {
  330. { id = "http://www.roblox.com/asset/?id=125749145", weight = 10 }
  331. },
  332. run = {
  333. { id = "run.xml", weight = 10 }
  334. },
  335. jump = {
  336. { id = "http://www.roblox.com/asset/?id=125750702", weight = 10 }
  337. },
  338. fall = {
  339. { id = "http://www.roblox.com/asset/?id=125750759", weight = 10 }
  340. },
  341. climb = {
  342. { id = "http://www.roblox.com/asset/?id=125750800", weight = 10 }
  343. },
  344. toolnone = {
  345. { id = "http://www.roblox.com/asset/?id=125750867", weight = 10 }
  346. },
  347. toolslash = {
  348. { id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
  349. -- { id = "slash.xml", weight = 10 }
  350. },
  351. toollunge = {
  352. { id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
  353. },
  354. wave = {
  355. { id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
  356. },
  357. point = {
  358. { id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
  359. },
  360. dance = {
  361. { id = "http://www.roblox.com/asset/?id=130018893", weight = 10 },
  362. { id = "http://www.roblox.com/asset/?id=132546839", weight = 10 },
  363. { id = "http://www.roblox.com/asset/?id=132546884", weight = 10 }
  364. },
  365. dance2 = {
  366. { id = "http://www.roblox.com/asset/?id=160934142", weight = 10 },
  367. { id = "http://www.roblox.com/asset/?id=160934298", weight = 10 },
  368. { id = "http://www.roblox.com/asset/?id=160934376", weight = 10 }
  369. },
  370. dance3 = {
  371. { id = "http://www.roblox.com/asset/?id=160934458", weight = 10 },
  372. { id = "http://www.roblox.com/asset/?id=160934530", weight = 10 },
  373. { id = "http://www.roblox.com/asset/?id=160934593", weight = 10 }
  374. },
  375. laugh = {
  376. { id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
  377. },
  378. cheer = {
  379. { id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
  380. },
  381. }
  382.  
  383. -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
  384. local emoteNames = { wave = false, point = false, dance = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
  385.  
  386. math.randomseed(tick())
  387.  
  388. function configureAnimationSet(name, fileList)
  389. if (animTable[name] ~= nil) then
  390. for _, connection in pairs(animTable[name].connections) do
  391. connection:disconnect()
  392. end
  393. end
  394. animTable[name] = {}
  395. animTable[name].count = 0
  396. animTable[name].totalWeight = 0
  397. animTable[name].connections = {}
  398.  
  399. -- check for config values
  400. local config = script:FindFirstChild(name)
  401. if (config ~= nil) then
  402. -- print("Loading anims " .. name)
  403. table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
  404. table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
  405. local idx = 1
  406. for _, childPart in pairs(config:GetChildren()) do
  407. if (childPart:IsA("Animation")) then
  408. table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
  409. animTable[name][idx] = {}
  410. animTable[name][idx].anim = childPart
  411. local weightObject = childPart:FindFirstChild("Weight")
  412. if (weightObject == nil) then
  413. animTable[name][idx].weight = 1
  414. else
  415. animTable[name][idx].weight = weightObject.Value
  416. end
  417. animTable[name].count = animTable[name].count + 1
  418. animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
  419. -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
  420. idx = idx + 1
  421. end
  422. end
  423. end
  424.  
  425. -- fallback to defaults
  426. if (animTable[name].count <= 0) then
  427. for idx, anim in pairs(fileList) do
  428. animTable[name][idx] = {}
  429. animTable[name][idx].anim = Instance.new("Animation")
  430. animTable[name][idx].anim.Name = name
  431. animTable[name][idx].anim.AnimationId = anim.id
  432. animTable[name][idx].weight = anim.weight
  433. animTable[name].count = animTable[name].count + 1
  434. animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
  435. -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
  436. end
  437. end
  438. end
  439.  
  440. -- Setup animation objects
  441. function scriptChildModified(child)
  442. local fileList = animNames[child.Name]
  443. if (fileList ~= nil) then
  444. configureAnimationSet(child.Name, fileList)
  445. end
  446. end
  447.  
  448. script.ChildAdded:connect(scriptChildModified)
  449. script.ChildRemoved:connect(scriptChildModified)
  450.  
  451.  
  452. for name, fileList in pairs(animNames) do
  453. configureAnimationSet(name, fileList)
  454. end
  455.  
  456. -- ANIMATION
  457.  
  458. -- declarations
  459. local toolAnim = "None"
  460. local toolAnimTime = 0
  461.  
  462. local jumpAnimTime = 0
  463. local jumpAnimDuration = 0.3
  464.  
  465. local toolTransitionTime = 0.1
  466. local fallTransitionTime = 0.3
  467. local jumpMaxLimbVelocity = 0.75
  468.  
  469. -- functions
  470.  
  471. function stopAllAnimations()
  472. local oldAnim = currentAnim
  473.  
  474. -- return to idle if finishing an emote
  475. if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
  476. oldAnim = "idle"
  477. end
  478.  
  479. currentAnim = ""
  480. if (currentAnimKeyframeHandler ~= nil) then
  481. currentAnimKeyframeHandler:disconnect()
  482. end
  483.  
  484. if (currentAnimTrack ~= nil) then
  485. currentAnimTrack:Stop()
  486. currentAnimTrack:Destroy()
  487. currentAnimTrack = nil
  488. end
  489. return oldAnim
  490. end
  491.  
  492. function setAnimationSpeed(speed)
  493. if speed ~= currentAnimSpeed then
  494. currentAnimSpeed = speed
  495. currentAnimTrack:AdjustSpeed(currentAnimSpeed)
  496. end
  497. end
  498.  
  499. function keyFrameReachedFunc(frameName)
  500. if (frameName == "End") then
  501. -- print("Keyframe : ".. frameName)
  502. local repeatAnim = stopAllAnimations()
  503. local animSpeed = currentAnimSpeed
  504. playAnimation(repeatAnim, 0.0, Humanoid)
  505. setAnimationSpeed(animSpeed)
  506. end
  507. end
  508.  
  509. -- Preload animations
  510. function playAnimation(animName, transitionTime, humanoid)
  511. local idleFromEmote = (animName == "idle" and emoteNames[currentAnim] ~= nil)
  512. if (animName ~= currentAnim and not idleFromEmote) then
  513.  
  514. if (currentAnimTrack ~= nil) then
  515. currentAnimTrack:Stop(transitionTime)
  516. currentAnimTrack:Destroy()
  517. end
  518.  
  519. currentAnimSpeed = 1.0
  520. local roll = math.random(1, animTable[animName].totalWeight)
  521. local origRoll = roll
  522. local idx = 1
  523. while (roll > animTable[animName][idx].weight) do
  524. roll = roll - animTable[animName][idx].weight
  525. idx = idx + 1
  526. end
  527. -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
  528. local anim = animTable[animName][idx].anim
  529.  
  530. -- load it to the humanoid; get AnimationTrack
  531. currentAnimTrack = humanoid:LoadAnimation(anim)
  532.  
  533. -- play the animation
  534. currentAnimTrack:Play(transitionTime)
  535. currentAnim = animName
  536.  
  537. -- set up keyframe name triggers
  538. if (currentAnimKeyframeHandler ~= nil) then
  539. currentAnimKeyframeHandler:disconnect()
  540. end
  541. currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
  542. end
  543. end
  544.  
  545. -------------------------------------------------------------------------------------------
  546. -------------------------------------------------------------------------------------------
  547.  
  548. local toolAnimName = ""
  549. local toolAnimTrack = nil
  550. local currentToolAnimKeyframeHandler = nil
  551.  
  552. function toolKeyFrameReachedFunc(frameName)
  553. if (frameName == "End") then
  554. -- print("Keyframe : ".. frameName)
  555. local repeatAnim = stopToolAnimations()
  556. playToolAnimation(repeatAnim, 0.0, Humanoid)
  557. end
  558. end
  559.  
  560.  
  561. function playToolAnimation(animName, transitionTime, humanoid)
  562. if (animName ~= toolAnimName) then
  563.  
  564. if (toolAnimTrack ~= nil) then
  565. toolAnimTrack:Stop()
  566. toolAnimTrack:Destroy()
  567. transitionTime = 0
  568. end
  569.  
  570. local roll = math.random(1, animTable[animName].totalWeight)
  571. local origRoll = roll
  572. local idx = 1
  573. while (roll > animTable[animName][idx].weight) do
  574. roll = roll - animTable[animName][idx].weight
  575. idx = idx + 1
  576. end
  577. -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
  578. local anim = animTable[animName][idx].anim
  579.  
  580. -- load it to the humanoid; get AnimationTrack
  581. toolAnimTrack = humanoid:LoadAnimation(anim)
  582.  
  583. -- play the animation
  584. toolAnimTrack:Play(transitionTime)
  585. toolAnimName = animName
  586.  
  587. currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
  588. end
  589. end
  590.  
  591. function stopToolAnimations()
  592. local oldAnim = toolAnimName
  593.  
  594. if (currentToolAnimKeyframeHandler ~= nil) then
  595. currentToolAnimKeyframeHandler:disconnect()
  596. end
  597.  
  598. toolAnimName = ""
  599. if (toolAnimTrack ~= nil) then
  600. toolAnimTrack:Stop()
  601. toolAnimTrack:Destroy()
  602. toolAnimTrack = nil
  603. end
  604.  
  605.  
  606. return oldAnim
  607. end
  608.  
  609. -------------------------------------------------------------------------------------------
  610. -------------------------------------------------------------------------------------------
  611.  
  612.  
  613. function onRunning(speed)
  614. if speed>0.01 then
  615. playAnimation("walk", 0.1, Humanoid)
  616. pose = "Running"
  617. else
  618. playAnimation("idle", 0.1, Humanoid)
  619. pose = "Standing"
  620. end
  621. end
  622.  
  623. function onDied()
  624. pose = "Dead"
  625. end
  626.  
  627. function onJumping()
  628. playAnimation("jump", 0.1, Humanoid)
  629. jumpAnimTime = jumpAnimDuration
  630. pose = "Jumping"
  631. end
  632.  
  633. function onClimbing(speed)
  634. playAnimation("climb", 0.1, Humanoid)
  635. setAnimationSpeed(speed / 12.0)
  636. pose = "Climbing"
  637. end
  638.  
  639. function onGettingUp()
  640. pose = "GettingUp"
  641. end
  642.  
  643. function onFreeFall()
  644. if (jumpAnimTime <= 0) then
  645. playAnimation("fall", fallTransitionTime, Humanoid)
  646. end
  647. pose = "FreeFall"
  648. end
  649.  
  650. function onFallingDown()
  651. pose = "FallingDown"
  652. end
  653.  
  654. function onSeated()
  655. pose = "Seated"
  656. end
  657.  
  658. function onPlatformStanding()
  659. pose = "PlatformStanding"
  660. end
  661.  
  662. function onSwimming(speed)
  663. if speed>0 then
  664. pose = "Running"
  665. else
  666. pose = "Standing"
  667. end
  668. end
  669.  
  670. function getTool()
  671. for _, kid in ipairs(Figure:GetChildren()) do
  672. if kid.className == "Tool" then return kid end
  673. end
  674. return nil
  675. end
  676.  
  677. function getToolAnim(tool)
  678. for _, c in ipairs(tool:GetChildren()) do
  679. if c.Name == "toolanim" and c.className == "StringValue" then
  680. return c
  681. end
  682. end
  683. return nil
  684. end
  685.  
  686. function animateTool()
  687.  
  688. if (toolAnim == "None") then
  689. playToolAnimation("toolnone", toolTransitionTime, Humanoid)
  690. return
  691. end
  692.  
  693. if (toolAnim == "Slash") then
  694. playToolAnimation("toolslash", 0, Humanoid)
  695. return
  696. end
  697.  
  698. if (toolAnim == "Lunge") then
  699. playToolAnimation("toollunge", 0, Humanoid)
  700. return
  701. end
  702. end
  703.  
  704. function moveSit()
  705. RightShoulder.MaxVelocity = 0.15
  706. LeftShoulder.MaxVelocity = 0.15
  707. RightShoulder:SetDesiredAngle(3.14 /2)
  708. LeftShoulder:SetDesiredAngle(-3.14 /2)
  709. RightHip:SetDesiredAngle(3.14 /2)
  710. LeftHip:SetDesiredAngle(-3.14 /2)
  711. end
  712.  
  713. local lastTick = 0
  714.  
  715. function move(time)
  716. local amplitude = 1
  717. local frequency = 1
  718. local deltaTime = time - lastTick
  719. lastTick = time
  720.  
  721. local climbFudge = 0
  722. local setAngles = false
  723.  
  724. if (jumpAnimTime > 0) then
  725. jumpAnimTime = jumpAnimTime - deltaTime
  726. end
  727.  
  728. if (pose == "FreeFall" and jumpAnimTime <= 0) then
  729. playAnimation("fall", fallTransitionTime, Humanoid)
  730. elseif (pose == "Seated") then
  731. stopAllAnimations()
  732. moveSit()
  733. return
  734. elseif (pose == "Running") then
  735. playAnimation("walk", 0.1, Humanoid)
  736. elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
  737. -- print("Wha " .. pose)
  738. amplitude = 0.1
  739. frequency = 1
  740. setAngles = true
  741. end
  742.  
  743. if (setAngles) then
  744. desiredAngle = amplitude * math.sin(time * frequency)
  745.  
  746. RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
  747. LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
  748. RightHip:SetDesiredAngle(-desiredAngle)
  749. LeftHip:SetDesiredAngle(-desiredAngle)
  750. end
  751.  
  752. -- Tool Animation handling
  753. local tool = getTool()
  754. if tool then
  755.  
  756. animStringValueObject = getToolAnim(tool)
  757.  
  758. if animStringValueObject then
  759. toolAnim = animStringValueObject.Value
  760. -- message recieved, delete StringValue
  761. animStringValueObject.Parent = nil
  762. toolAnimTime = time + .3
  763. end
  764.  
  765. if time > toolAnimTime then
  766. toolAnimTime = 0
  767. toolAnim = "None"
  768. end
  769.  
  770. animateTool()
  771. else
  772. stopToolAnimations()
  773. toolAnim = "None"
  774. toolAnimTime = 0
  775. end
  776. end
  777.  
  778. -- connect events
  779. Humanoid.Died:connect(onDied)
  780. Humanoid.Running:connect(onRunning)
  781. Humanoid.Jumping:connect(onJumping)
  782. Humanoid.Climbing:connect(onClimbing)
  783. Humanoid.GettingUp:connect(onGettingUp)
  784. Humanoid.FreeFalling:connect(onFreeFall)
  785. Humanoid.FallingDown:connect(onFallingDown)
  786. Humanoid.Seated:connect(onSeated)
  787. Humanoid.PlatformStanding:connect(onPlatformStanding)
  788. Humanoid.Swimming:connect(onSwimming)
  789.  
  790. -- setup emote chat hook
  791.  
  792.  
  793. -- main program
  794.  
  795. local runService = game:service("RunService");
  796.  
  797. -- initialize to idle
  798. playAnimation("idle", 0.1, Humanoid)
  799. pose = "Standing"
  800.  
  801. while Figure.Parent~=nil do
  802. local _, time = wait(0.1)
  803. move(time)
  804. end
  805.  
  806.  
  807.  
  808. end))
  809. StringValue25.Name = "climb"
  810. StringValue25.Parent = Script24
  811. Animation26.Name = "ClimbAnim"
  812. Animation26.Parent = StringValue25
  813. Animation26.AnimationId = "http://www.roblox.com/asset/?id=125750800"
  814. StringValue27.Name = "fall"
  815. StringValue27.Parent = Script24
  816. Animation28.Name = "FallAnim"
  817. Animation28.Parent = StringValue27
  818. Animation28.AnimationId = "http://www.roblox.com/asset/?id=125750759"
  819. StringValue29.Name = "idle"
  820. StringValue29.Parent = Script24
  821. Animation30.Name = "Animation1"
  822. Animation30.Parent = StringValue29
  823. Animation30.AnimationId = "http://www.roblox.com/asset/?id=125750544"
  824. NumberValue31.Name = "Weight"
  825. NumberValue31.Parent = Animation30
  826. NumberValue31.Value = 9
  827. Animation32.Name = "Animation2"
  828. Animation32.Parent = StringValue29
  829. Animation32.AnimationId = "http://www.roblox.com/asset/?id=125750618"
  830. NumberValue33.Name = "Weight"
  831. NumberValue33.Parent = Animation32
  832. NumberValue33.Value = 1
  833. StringValue34.Name = "jump"
  834. StringValue34.Parent = Script24
  835. Animation35.Name = "JumpAnim"
  836. Animation35.Parent = StringValue34
  837. Animation35.AnimationId = "http://www.roblox.com/asset/?id=125750702"
  838. StringValue36.Name = "run"
  839. StringValue36.Parent = Script24
  840. Animation37.Name = "RunAnim"
  841. Animation37.Parent = StringValue36
  842. Animation37.AnimationId = "http://www.roblox.com/asset/?id=125749145"
  843. StringValue38.Name = "toolnone"
  844. StringValue38.Parent = Script24
  845. Animation39.Name = "ToolNoneAnim"
  846. Animation39.Parent = StringValue38
  847. Animation39.AnimationId = "http://www.roblox.com/asset/?id=125750867"
  848. StringValue40.Name = "walk"
  849. StringValue40.Parent = Script24
  850. Animation41.Name = "WalkAnim"
  851. Animation41.Parent = StringValue40
  852. Animation41.AnimationId = "http://www.roblox.com/asset/?id=125749145"
  853. Shirt42.Parent = Model0
  854. Shirt42.ShirtTemplate = "rbxassetid://1061437532"
  855. Animation43.Name = "Swing"
  856. Animation43.Parent = Model0
  857. Animation43.AnimationId = "rbxassetid://94161088"
  858. Script44.Name = "MonsterMain"
  859. Script44.Parent = Model0
  860. table.insert(cors,sandbox(Script44,function()
  861. --[[ By: Brutez. ]]--
  862. local JeffTheKillerScript=script;
  863. repeat Wait(0)until JeffTheKillerScript and JeffTheKillerScript.Parent and JeffTheKillerScript.Parent.ClassName=="Model"and JeffTheKillerScript.Parent:FindFirstChild("Head")and JeffTheKillerScript.Parent:FindFirstChild("Torso");
  864. local JeffTheKiller=JeffTheKillerScript.Parent;
  865. function raycast(Spos,vec,currentdist)
  866. local hit2,pos2=game.Workspace:FindPartOnRay(Ray.new(Spos+(vec*.05),vec*currentdist),JeffTheKiller);
  867. if hit2~=nil and pos2 then
  868. if hit2.Name=="Handle" and not hit2.CanCollide or string.sub(hit2.Name,1,6)=="Effect"and not hit2.CanCollide then
  869. local currentdist=currentdist-(pos2-Spos).magnitude;
  870. return raycast(pos2,vec,currentdist);
  871. end;
  872. end;
  873. return hit2,pos2;
  874. end;
  875. function RayCast(Position,Direction,MaxDistance,IgnoreList)
  876. return Game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(Position,Direction.unit*(MaxDistance or 999.999)),IgnoreList);
  877. end;
  878. --[[if JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Thumbnail")then]]--
  879. --[[JeffTheKiller:FindFirstChild("Thumbnail"):Destroy();]]--
  880. --[[end;]]--
  881. local JeffTheKillerHumanoid;
  882. for _,Child in pairs(JeffTheKiller:GetChildren())do
  883. if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
  884. JeffTheKillerHumanoid=Child;
  885. end;
  886. end;
  887. local AttackDebounce=false;
  888. local JeffTheKillerKnife=JeffTheKiller:FindFirstChild("Knife");
  889. local JeffTheKillerHead=JeffTheKiller:FindFirstChild("Head");
  890. local JeffTheKillerHumanoidRootPart=JeffTheKiller:FindFirstChild("HumanoidRootPart");
  891. local WalkDebounce=false;
  892. local Notice=false;
  893. local JeffLaughDebounce=false;
  894. local MusicDebounce=false;
  895. local NoticeDebounce=false;
  896. local ChosenMusic;
  897. JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0);
  898. local OriginalC0=JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0;
  899. function FindNearestBae()
  900. local NoticeDistance=100;
  901. local TargetMain;
  902. for _,TargetModel in pairs(Game:GetService("Workspace"):GetChildren())do
  903. 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
  904. local TargetPart=TargetModel:FindFirstChild("Torso");
  905. local FoundHumanoid;
  906. for _,Child in pairs(TargetModel:GetChildren())do
  907. if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
  908. FoundHumanoid=Child;
  909. end;
  910. end;
  911. if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<NoticeDistance then
  912. TargetMain=TargetPart;
  913. NoticeDistance=(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude;
  914. local hit,pos=raycast(JeffTheKillerHumanoidRootPart.Position,(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).unit,500)
  915. if hit and hit.Parent and hit.Parent.ClassName=="Model"and hit.Parent:FindFirstChild("Torso")and hit.Parent:FindFirstChild("Head")then
  916. if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<9 and not AttackDebounce then
  917. Spawn(function()
  918. AttackDebounce=true;
  919. local SwingAnimation=JeffTheKillerHumanoid:LoadAnimation(JeffTheKiller:FindFirstChild("Swing"));
  920. local SwingChoice=math.random(1,2);
  921. local HitChoice=math.random(1,3);
  922. SwingAnimation:Play();
  923. SwingAnimation:AdjustSpeed(1.5+(math.random()*0.1));
  924. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Swing")then
  925. local SwingSound=JeffTheKillerKnife:FindFirstChild("Swing");
  926. SwingSound.Pitch=1+(math.random()*0.04);
  927. SwingSound:Play();
  928. end;
  929. Wait(0.3);
  930. if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<8 then
  931. FoundHumanoid:TakeDamage(30);
  932. if HitChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit1")then
  933. local HitSound=JeffTheKillerKnife:FindFirstChild("Hit1");
  934. HitSound.Pitch=1+(math.random()*0.04);
  935. HitSound:Play();
  936. elseif HitChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit2")then
  937. local HitSound=JeffTheKillerKnife:FindFirstChild("Hit2");
  938. HitSound.Pitch=1+(math.random()*0.04);
  939. HitSound:Play();
  940. elseif HitChoice==3 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit3")then
  941. local HitSound=JeffTheKillerKnife:FindFirstChild("Hit3");
  942. HitSound.Pitch=1+(math.random()*0.04);
  943. HitSound:Play();
  944. end;
  945. end;
  946. Wait(0.1);
  947. AttackDebounce=false;
  948. end);
  949. end;
  950. end;
  951. end;
  952. end;
  953. end;
  954. return TargetMain;
  955. end;
  956. while Wait(0)do
  957. local TargetPoint=JeffTheKillerHumanoid.TargetPoint;
  958. 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})
  959. local Jumpable=false;
  960. if Blockage then
  961. Jumpable=true;
  962. if Blockage and Blockage.Parent and Blockage.Parent.ClassName~="Workspace"then
  963. local BlockageHumanoid;
  964. for _,Child in pairs(Blockage.Parent:GetChildren())do
  965. if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
  966. BlockageHumanoid=Child;
  967. end;
  968. end;
  969. if Blockage and Blockage:IsA("Terrain")then
  970. local CellPos=Blockage:WorldToCellPreferSolid((BlockagePos-Vector3.new(0,2,0)));
  971. local CellMaterial,CellShape,CellOrientation=Blockage:GetCell(CellPos.X,CellPos.Y,CellPos.Z);
  972. if CellMaterial==Enum.CellMaterial.Water then
  973. Jumpable=false;
  974. end;
  975. 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
  976. Jumpable=false;
  977. end;
  978. end;
  979. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and not JeffTheKillerHumanoid.Sit and Jumpable then
  980. JeffTheKillerHumanoid.Jump=true;
  981. end;
  982. end;
  983. 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
  984. Spawn(function()
  985. WalkDebounce=true;
  986. local FiredRay=Ray.new(JeffTheKillerHumanoidRootPart.Position,Vector3.new(0,-4,0));
  987. local RayTarget,endPoint=Game:GetService("Workspace"):FindPartOnRay(FiredRay,JeffTheKiller);
  988. if RayTarget then
  989. local JeffTheKillerHeadFootStepClone=JeffTheKillerHead:FindFirstChild("Jeff_Step"):Clone();
  990. JeffTheKillerHeadFootStepClone.Parent=JeffTheKillerHead;
  991. JeffTheKillerHeadFootStepClone:Play();
  992. JeffTheKillerHeadFootStepClone:Destroy();
  993. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed<17 then
  994. Wait(0.4);
  995. elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed>17 then
  996. Wait(0.15);
  997. end
  998. end;
  999. WalkDebounce=false;
  1000. end);
  1001. end;
  1002. local MainTarget=FindNearestBae();
  1003. local FoundHumanoid;
  1004. if MainTarget then
  1005. for _,Child in pairs(MainTarget.Parent:GetChildren())do
  1006. if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
  1007. FoundHumanoid=Child;
  1008. end;
  1009. end;
  1010. end;
  1011. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and MainTarget.Parent and FoundHumanoid and FoundHumanoid.Jump then
  1012. JeffTheKillerHumanoid.Jump=true;
  1013. end;
  1014. 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
  1015. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and not JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then
  1016. JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=1;
  1017. JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Play();
  1018. end;
  1019. 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
  1020. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then
  1021. if not JeffLaughDebounce then
  1022. Spawn(function()
  1023. JeffLaughDebounce=true;
  1024. 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;
  1025. JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0;
  1026. JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop();
  1027. JeffLaughDebounce=false;
  1028. end);
  1029. end;
  1030. end;
  1031. end;
  1032. 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
  1033. local MusicChoice=math.random(1,2);
  1034. if MusicChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1")then
  1035. ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1");
  1036. elseif MusicChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2")then
  1037. ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2");
  1038. end;
  1039. if JeffTheKillerScript and JeffTheKiller and ChosenMusic and not ChosenMusic.IsPlaying then
  1040. ChosenMusic.Volume=0.5;
  1041. ChosenMusic:Play();
  1042. end;
  1043. 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
  1044. if JeffTheKillerScript and JeffTheKiller and ChosenMusic and ChosenMusic.IsPlaying then
  1045. if not MusicDebounce then
  1046. Spawn(function()
  1047. MusicDebounce=true;
  1048. 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;
  1049. if ChosenMusic then
  1050. ChosenMusic.Volume=0;
  1051. ChosenMusic:Stop();
  1052. end;
  1053. ChosenMusic=nil;
  1054. MusicDebounce=false;
  1055. end);
  1056. end;
  1057. end;
  1058. end;
  1059. if not MainTarget and not JeffLaughDebounce then
  1060. Spawn(function()
  1061. JeffLaughDebounce=true;
  1062. 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;
  1063. JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0;
  1064. JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop();
  1065. JeffLaughDebounce=false;
  1066. end);
  1067. end;
  1068. if not MainTarget and not MusicDebounce then
  1069. Spawn(function()
  1070. MusicDebounce=true;
  1071. 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;
  1072. if ChosenMusic then
  1073. ChosenMusic.Volume=0;
  1074. ChosenMusic:Stop();
  1075. end;
  1076. ChosenMusic=nil;
  1077. MusicDebounce=false;
  1078. end);
  1079. end;
  1080. if MainTarget then
  1081. Notice=true;
  1082. if Notice and not NoticeDebounce and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Susto2")then
  1083. JeffTheKillerHead:FindFirstChild("Jeff_Susto2"):Play();
  1084. NoticeDebounce=true;
  1085. end
  1086. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then
  1087. if MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>5 then
  1088. JeffTheKillerHumanoid.WalkSpeed=30;
  1089. elseif MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<5 then
  1090. JeffTheKillerHumanoid.WalkSpeed=0.004;
  1091. end;
  1092. JeffTheKillerHumanoid:MoveTo(MainTarget.Position+(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).unit*2,Game:GetService("Workspace"):FindFirstChild("Terrain"));
  1093. local NeckRotation=(JeffTheKiller:FindFirstChild("Torso").Position.Y-MainTarget.Parent:FindFirstChild("Head").Position.Y)/10;
  1094. if NeckRotation>-1.5 and NeckRotation<1.5 then
  1095. JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=OriginalC0*CFrame.fromEulerAnglesXYZ(NeckRotation,0,0);
  1096. end;
  1097. if NeckRotation<-1.5 then
  1098. JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,-0.993636549,0.112633869,0,0.112633869,0.993636549);
  1099. elseif NeckRotation>1.5 then
  1100. JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0.996671617,0.081521146,0,0.081521146,-0.996671617);
  1101. end;
  1102. else
  1103. end;
  1104. else
  1105. Notice=false;
  1106. NoticeDebounce=false;
  1107. JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0);
  1108. local RandomWalk=math.random(1,150);
  1109. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then
  1110. JeffTheKillerHumanoid.WalkSpeed=12;
  1111. if RandomWalk==1 then
  1112. JeffTheKillerHumanoid:MoveTo(Game:GetService("Workspace"):FindFirstChild("Terrain").Position+Vector3.new(math.random(-2048,2048),0,math.random(-2048,2048)),Game:GetService("Workspace"):FindFirstChild("Terrain"));
  1113. end;
  1114. end;
  1115. end;
  1116. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid then
  1117. JeffTheKillerHumanoid.DisplayDistanceType="None";
  1118. JeffTheKillerHumanoid.HealthDisplayDistance=0;
  1119. JeffTheKillerHumanoid.Name="ColdBloodedKiller";
  1120. JeffTheKillerHumanoid.NameDisplayDistance=0;
  1121. JeffTheKillerHumanoid.NameOcclusion="EnemyOcclusion";
  1122. JeffTheKillerHumanoid.AutoJumpEnabled=true;
  1123. JeffTheKillerHumanoid.AutoRotate=true;
  1124. JeffTheKillerHumanoid.MaxHealth=500;
  1125. JeffTheKillerHumanoid.JumpPower=60;
  1126. JeffTheKillerHumanoid.MaxSlopeAngle=89.9;
  1127. end;
  1128. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoJumpEnabled then
  1129. JeffTheKillerHumanoid.AutoJumpEnabled=true;
  1130. end;
  1131. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoRotate then
  1132. JeffTheKillerHumanoid.AutoRotate=true;
  1133. end;
  1134. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.PlatformStand then
  1135. JeffTheKillerHumanoid.PlatformStand=false;
  1136. end;
  1137. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Sit then
  1138. JeffTheKillerHumanoid.Sit=false;
  1139. end;
  1140. end;
  1141. --[[ By: Brutez. ]]--
  1142. end))
  1143. BodyColors45.Parent = Model0
  1144. BodyColors45.HeadColor = BrickColor.new("Lime green")
  1145. BodyColors45.LeftArmColor = BrickColor.new("Lime green")
  1146. BodyColors45.LeftLegColor = BrickColor.new("Lime green")
  1147. BodyColors45.RightArmColor = BrickColor.new("Lime green")
  1148. BodyColors45.RightLegColor = BrickColor.new("Lime green")
  1149. BodyColors45.TorsoColor = BrickColor.new("Lime green")
  1150. Sound46.Name = "BossMusic"
  1151. Sound46.Parent = Model0
  1152. Sound46.SoundId = "rbxassetid://1071438257"
  1153. Sound46.Volume = 2
  1154. Sound46.Looped = true
  1155. Script47.Parent = Sound46
  1156. table.insert(cors,sandbox(Script47,function()
  1157. wait(1)
  1158. script.Parent:Play()
  1159. end))
  1160. Script48.Name = "Sound"
  1161. Script48.Parent = Model0
  1162. table.insert(cors,sandbox(Script48,function()
  1163. -- util
  1164.  
  1165. function waitForChild(parent, childName)
  1166. local child = parent:findFirstChild(childName)
  1167. if child then return child end
  1168. while true do
  1169. child = parent.ChildAdded:wait()
  1170. if child.Name==childName then return child end
  1171. end
  1172. end
  1173.  
  1174. function newSound(id)
  1175. local sound = Instance.new("Sound")
  1176. sound.SoundId = id
  1177. sound.archivable = false
  1178. sound.Parent = script.Parent.Head
  1179. return sound
  1180. end
  1181.  
  1182. -- declarations
  1183.  
  1184. local sDied = newSound("rbxassetid://133918674")
  1185. sDied.Pitch = 1
  1186. sDied.Volume = 1
  1187. local sFallingDown = newSound("rbxasset://sounds/splat.wav")
  1188. local sFreeFalling = newSound("rbxasset://sounds/swoosh.wav")
  1189. local sGettingUp = newSound("rbxasset://sounds/hit.wav")
  1190. local sJumping = newSound("rbxasset://sounds/button.wav")
  1191. local sRunning = newSound("rbxasset://sounds/bfsl-minifigfoots1.mp3")
  1192. sRunning.Looped = true
  1193.  
  1194. local Figure = script.Parent
  1195. local Head = waitForChild(Figure, "Head")
  1196. local Humanoid = waitForChild(Figure, "Humanoid")
  1197.  
  1198. -- functions
  1199.  
  1200. function onDied()
  1201. sDied:Play()
  1202. wait(2.5)
  1203. script.Parent:Destroy()
  1204. end
  1205.  
  1206. function onState(state, sound)
  1207. if state then
  1208. sound:Play()
  1209. else
  1210. sound:Pause()
  1211. end
  1212. end
  1213.  
  1214. function onRunning(speed)
  1215. if speed>0 then
  1216. sRunning:Play()
  1217. else
  1218. sRunning:Pause()
  1219. end
  1220. end
  1221.  
  1222. -- connect up
  1223.  
  1224. Humanoid.Died:connect(onDied)
  1225. Humanoid.Running:connect(onRunning)
  1226. Humanoid.Jumping:connect(function(state) onState(state, sJumping) end)
  1227. Humanoid.GettingUp:connect(function(state) onState(state, sGettingUp) end)
  1228. Humanoid.FreeFalling:connect(function(state) onState(state, sFreeFalling) end)
  1229. Humanoid.FallingDown:connect(function(state) onState(state, sFallingDown) end)
  1230.  
  1231. end))
  1232. Humanoid49.Parent = Model0
  1233. Humanoid49.RightLeg = Part17
  1234. Humanoid49.LeftLeg = Part16
  1235. Humanoid49.Torso = Part1
  1236. Humanoid49.Health = 10000
  1237. Humanoid49.MaxHealth = 10000
  1238. Humanoid49.WalkSpeed = 14
  1239. Tool50.Name = "Cain saw"
  1240. Tool50.Parent = Model0
  1241. Tool50.GripForward = Vector3.new(0.0830454826, -0.996545732, -0)
  1242. Tool50.GripPos = Vector3.new(0, 0, 1.5)
  1243. Tool50.GripRight = Vector3.new(0.996545732, 0.0830454826, 0)
  1244. Tool50.GripUp = Vector3.new(0, 0, -1)
  1245. Part51.Name = "Handle"
  1246. Part51.Parent = Tool50
  1247. Part51.BrickColor = BrickColor.new("Dark stone grey")
  1248. Part51.Reflectance = 0.40000000596046
  1249. Part51.Rotation = Vector3.new(0, 0, -4.75999975)
  1250. Part51.CanCollide = false
  1251. Part51.FormFactor = Enum.FormFactor.Plate
  1252. Part51.Size = Vector3.new(1, 0.800000012, 4)
  1253. Part51.CFrame = CFrame.new(-28.5, 2.00001001, -12.5, 0.996545732, 0.0830454826, 0, -0.0830454752, 0.996545613, 0, 0, 0, 1)
  1254. Part51.BottomSurface = Enum.SurfaceType.Smooth
  1255. Part51.TopSurface = Enum.SurfaceType.Smooth
  1256. Part51.Color = Color3.new(0.388235, 0.372549, 0.384314)
  1257. Part51.Position = Vector3.new(-28.5, 2.00001001, -12.5)
  1258. Part51.Orientation = Vector3.new(0, 0, -4.75999975)
  1259. Part51.Color = Color3.new(0.388235, 0.372549, 0.384314)
  1260. SpecialMesh52.Parent = Part51
  1261. SpecialMesh52.MeshId = "http://www.roblox.com/asset/?id=2766469"
  1262. SpecialMesh52.Scale = Vector3.new(1, 1, 1.29999995)
  1263. SpecialMesh52.TextureId = "rbxasset://textures/SwordTexture.png"
  1264. SpecialMesh52.MeshType = Enum.MeshType.FileMesh
  1265. SpecialMesh52.Scale = Vector3.new(1, 1, 1.29999995)
  1266. Sound53.Parent = Part51
  1267. Sound54.Parent = Part51
  1268. Sound55.Parent = Part51
  1269. Sound55.Volume = 0.69999998807907
  1270. Sound56.Parent = Part51
  1271. Sound56.Volume = 1
  1272. Sound57.Parent = Part51
  1273. Sound57.SoundId = "http://www.roblox.com/asset/?id=2766589"
  1274. Sound57.Volume = 1
  1275. Sound58.Parent = Part51
  1276. Sound58.Volume = 0.69999998807907
  1277. Sound59.Parent = Part51
  1278. Sound59.Volume = 1
  1279. Sound60.Parent = Part51
  1280. Sound60.Volume = 0.69999998807907
  1281. Sound61.Parent = Part51
  1282. Sound61.Volume = 1
  1283. Sound62.Parent = Part51
  1284. Sound62.Volume = 0.69999998807907
  1285. Sound63.Parent = Part51
  1286. Sound63.Volume = 1
  1287. Sound64.Parent = Part51
  1288. Sound64.Volume = 0.69999998807907
  1289. Sound65.Parent = Part51
  1290. Sound65.Volume = 1
  1291. Sound66.Parent = Part51
  1292. Sound66.Volume = 0.69999998807907
  1293. Sound67.Parent = Part51
  1294. Sound67.Volume = 1
  1295. Sound68.Parent = Part51
  1296. Sound68.Volume = 0.69999998807907
  1297. Sound69.Parent = Part51
  1298. Sound69.Volume = 1
  1299. Sound70.Parent = Part51
  1300. Sound70.Volume = 0.69999998807907
  1301. Sound71.Parent = Part51
  1302. Sound71.Volume = 1
  1303. Sound72.Parent = Part51
  1304. Sound72.Volume = 0.69999998807907
  1305. Sound73.Parent = Part51
  1306. Sound73.Volume = 1
  1307. Sound74.Parent = Part51
  1308. Sound74.Volume = 0.69999998807907
  1309. Sound75.Parent = Part51
  1310. Sound75.Volume = 1
  1311. Sound76.Parent = Part51
  1312. Sound76.Volume = 0.69999998807907
  1313. Sound77.Parent = Part51
  1314. Sound77.Volume = 1
  1315. Sound78.Parent = Part51
  1316. Sound78.Volume = 0.69999998807907
  1317. Sound79.Parent = Part51
  1318. Sound79.Volume = 1
  1319. Sound80.Parent = Part51
  1320. Sound80.Volume = 0.69999998807907
  1321. Sound81.Parent = Part51
  1322. Sound81.Volume = 1
  1323. Sound82.Parent = Part51
  1324. Sound82.Volume = 0.69999998807907
  1325. Sound83.Parent = Part51
  1326. Sound83.Volume = 1
  1327. Sound84.Parent = Part51
  1328. Sound84.Volume = 0.69999998807907
  1329. Sound85.Parent = Part51
  1330. Sound85.Volume = 1
  1331. Sound86.Parent = Part51
  1332. Sound86.Volume = 0.69999998807907
  1333. Sound87.Parent = Part51
  1334. Sound87.Volume = 1
  1335. Sound88.Parent = Part51
  1336. Sound88.Volume = 0.69999998807907
  1337. Sound89.Parent = Part51
  1338. Sound89.Volume = 1
  1339. Sound90.Parent = Part51
  1340. Sound90.Volume = 0.69999998807907
  1341. Sound91.Parent = Part51
  1342. Sound91.Volume = 1
  1343. Sound92.Parent = Part51
  1344. Sound92.Volume = 0.69999998807907
  1345. Sound93.Parent = Part51
  1346. Sound93.Volume = 1
  1347. LocalScript94.Name = "Local Gui"
  1348. LocalScript94.Parent = Tool50
  1349. Script95.Name = "Sword Script"
  1350. Script95.Parent = Tool50
  1351. table.insert(cors,sandbox(Script95,function()
  1352. -------- OMG HAX
  1353.  
  1354. r = game:service("RunService")
  1355.  
  1356.  
  1357. local damage = 50
  1358.  
  1359.  
  1360. local slash_damage = 50
  1361.  
  1362. sword = script.Parent.Handle
  1363. Tool = script.Parent
  1364.  
  1365.  
  1366. local SlashSound = Instance.new("Sound")
  1367. SlashSound.SoundId = "ca44f4f00def1e47ab481d97fe3586ce"
  1368. SlashSound.Parent = sword
  1369. SlashSound.Volume = .7
  1370.  
  1371. local UnsheathSound = Instance.new("Sound")
  1372. UnsheathSound.SoundId = "db5eaca58f42785dd69a16c6df0e765d"
  1373. UnsheathSound.Parent = sword
  1374. UnsheathSound.Volume = 1
  1375.  
  1376.  
  1377.  
  1378. function blow(hit)
  1379. local humanoid = hit.Parent:findFirstChild("Zombie")
  1380. local vCharacter = Tool.Parent
  1381. local vPlayer = game.Players:playerFromCharacter(vCharacter)
  1382. local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
  1383. if humanoid~=nil and humanoid ~= hum and hum ~= nil then
  1384. print("SWORD HIT")
  1385. tagHumanoid(humanoid, vPlayer)
  1386. humanoid:TakeDamage(damage)
  1387. wait(1)
  1388. untagHumanoid(humanoid)
  1389. end
  1390. end
  1391.  
  1392.  
  1393. function tagHumanoid(humanoid, player)
  1394. local creator_tag = Instance.new("ObjectValue")
  1395. creator_tag.Value = player
  1396. creator_tag.Name = "creator"
  1397. creator_tag.Parent = humanoid
  1398. end
  1399.  
  1400. function untagHumanoid(humanoid)
  1401. if humanoid ~= nil then
  1402. local tag = humanoid:findFirstChild("creator")
  1403. if tag ~= nil then
  1404. tag.Parent = nil
  1405. end
  1406. end
  1407. end
  1408.  
  1409.  
  1410. function attack()
  1411. damage = slash_damage
  1412. SlashSound:play()
  1413. local anim = Instance.new("StringValue")
  1414. anim.Name = "toolanim"
  1415. anim.Value = "Slash"
  1416. anim.Parent = Tool
  1417. end
  1418.  
  1419.  
  1420. function swordUp()
  1421. Tool.GripForward = Vector3.new(-1.1,0,0)
  1422. Tool.GripRight = Vector3.new(0,1,0)
  1423. Tool.GripUp = Vector3.new(0,0,1)
  1424. end
  1425.  
  1426. function swordOut()
  1427. Tool.GripForward = Vector3.new(0,0,1)
  1428. Tool.GripRight = Vector3.new(0,-1,0)
  1429. Tool.GripUp = Vector3.new(-1,0,0)
  1430. end
  1431.  
  1432. function swordAcross()
  1433. -- parry
  1434. end
  1435.  
  1436.  
  1437. Tool.Enabled = true
  1438. local last_attack = 0
  1439. function onActivated()
  1440.  
  1441. if not Tool.Enabled then
  1442. return
  1443. end
  1444.  
  1445. Tool.Enabled = false
  1446.  
  1447. local character = Tool.Parent;
  1448. local humanoid = character.Humanoid
  1449. if humanoid == nil then
  1450. print("Humanoid not found")
  1451. return
  1452. end
  1453.  
  1454. t = r.Stepped:wait()
  1455. attack()
  1456. last_attack = t
  1457.  
  1458. --wait(.5)
  1459.  
  1460. Tool.Enabled = true
  1461. end
  1462.  
  1463.  
  1464. function onEquipped()
  1465. UnsheathSound:play()
  1466. end
  1467.  
  1468.  
  1469. script.Parent.Activated:connect(onActivated)
  1470. script.Parent.Equipped:connect(onEquipped)
  1471.  
  1472.  
  1473. connection = sword.Touched:connect(blow)
  1474.  
  1475.  
  1476.  
  1477. end))
  1478. ShirtGraphic96.Parent = Model0
  1479. ShirtGraphic96.Graphic = "http://www.roblox.com/asset/?id=11149596"
  1480. Script97.Name = "HealthBarGUIScript"
  1481. Script97.Parent = Model0
  1482. table.insert(cors,sandbox(Script97,function()
  1483. Humanoid = script.Parent.Humanoid
  1484.  
  1485. function GainCharge(Humanoid)
  1486. Humanoid.Parent.Torso.Healthbar.Frame.Full.Size = UDim2.new(Humanoid.Health/Humanoid.MaxHealth,0,1,0)
  1487. if Humanoid.Health >= Humanoid.MaxHealth/2 then
  1488. Humanoid.Parent.Torso.Healthbar.Frame.Full.BackgroundColor3 = Color3.new(0,200/255,0)
  1489. elseif Humanoid.Health >= Humanoid.MaxHealth/4 and Humanoid.Health <= Humanoid.MaxHealth/2 then
  1490. Humanoid.Parent.Torso.Healthbar.Frame.Full.BackgroundColor3 = Color3.new(200/255,0,0)
  1491. elseif Humanoid.Health <= Humanoid.MaxHealth/4 then
  1492. Humanoid.Parent.Torso.Healthbar.Frame.Full.BackgroundColor3 = Color3.new(200/255,0,0)
  1493. end
  1494. end
  1495.  
  1496. Humanoid.HealthChanged:connect(function() GainCharge(Humanoid) end)
  1497. end))
  1498. for i,v in pairs(mas:GetChildren()) do
  1499. v.Parent = script
  1500. pcall(function() v:MakeJoints() end)
  1501. end
  1502. mas:Destroy()
  1503. for i,v in pairs(cors) do
  1504. spawn(function()
  1505. pcall(v)
  1506. end)
  1507. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement