Animescapetower

Darkness["New update"]

Apr 20th, 2018
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 36.11 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Model0 = Instance.new("Model")
  20. Part1 = Instance.new("Part")
  21. Motor6D2 = Instance.new("Motor6D")
  22. Part3 = Instance.new("Part")
  23. BodyForce4 = Instance.new("BodyForce")
  24. Motor6D5 = Instance.new("Motor6D")
  25. Motor6D6 = Instance.new("Motor6D")
  26. Motor6D7 = Instance.new("Motor6D")
  27. Motor6D8 = Instance.new("Motor6D")
  28. Motor6D9 = Instance.new("Motor6D")
  29. Part10 = Instance.new("Part")
  30. Part11 = Instance.new("Part")
  31. Part12 = Instance.new("Part")
  32. Part13 = Instance.new("Part")
  33. Weld14 = Instance.new("Weld")
  34. Part15 = Instance.new("Part")
  35. Decal16 = Instance.new("Decal")
  36. SpecialMesh17 = Instance.new("SpecialMesh")
  37. Humanoid18 = Instance.new("Humanoid")
  38. Script19 = Instance.new("Script")
  39. StringValue20 = Instance.new("StringValue")
  40. Animation21 = Instance.new("Animation")
  41. StringValue22 = Instance.new("StringValue")
  42. Animation23 = Instance.new("Animation")
  43. StringValue24 = Instance.new("StringValue")
  44. Animation25 = Instance.new("Animation")
  45. NumberValue26 = Instance.new("NumberValue")
  46. Animation27 = Instance.new("Animation")
  47. NumberValue28 = Instance.new("NumberValue")
  48. StringValue29 = Instance.new("StringValue")
  49. Animation30 = Instance.new("Animation")
  50. StringValue31 = Instance.new("StringValue")
  51. Animation32 = Instance.new("Animation")
  52. StringValue33 = Instance.new("StringValue")
  53. Animation34 = Instance.new("Animation")
  54. StringValue35 = Instance.new("StringValue")
  55. Animation36 = Instance.new("Animation")
  56. BillboardGui37 = Instance.new("BillboardGui")
  57. TextLabel38 = Instance.new("TextLabel")
  58. Sound39 = Instance.new("Sound")
  59. Tool40 = Instance.new("Tool")
  60. LocalScript41 = Instance.new("LocalScript")
  61. Script42 = Instance.new("Script")
  62. BodyVelocity43 = Instance.new("BodyVelocity")
  63. Part44 = Instance.new("Part")
  64. Sound45 = Instance.new("Sound")
  65. SpecialMesh46 = Instance.new("SpecialMesh")
  66. BoolValue47 = Instance.new("BoolValue")
  67. Sound48 = Instance.new("Sound")
  68. Script49 = Instance.new("Script")
  69. Model0.Name = "Darkness"
  70. Model0.Parent = mas
  71. Part1.Name = "HumanoidRootPart"
  72. Part1.Parent = Model0
  73. Part1.BrickColor = BrickColor.new("Earth green")
  74. Part1.Transparency = 1
  75. Part1.Rotation = Vector3.new(0, -90, 0)
  76. Part1.FormFactor = Enum.FormFactor.Symmetric
  77. Part1.Size = Vector3.new(2.75328374, 2.75328374, 1.37664187)
  78. Part1.CFrame = CFrame.new(-8.29670906, 4.1299367, -21.1356354, 4.49431016e-21, -6.79974523e-22, -1, 4.72251821e-22, 1, -6.79974523e-22, 1, -4.72251821e-22, 4.49431016e-21)
  79. Part1.BottomSurface = Enum.SurfaceType.Smooth
  80. Part1.TopSurface = Enum.SurfaceType.Smooth
  81. Part1.Color = Color3.new(0.152941, 0.27451, 0.176471)
  82. Part1.Position = Vector3.new(-8.29670906, 4.1299367, -21.1356354)
  83. Part1.Orientation = Vector3.new(0, -90, 0)
  84. Part1.Color = Color3.new(0.152941, 0.27451, 0.176471)
  85. Motor6D2.Name = "Root Hip"
  86. Motor6D2.Parent = Part1
  87. Motor6D2.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  88. Motor6D2.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  89. Motor6D2.Part0 = Part1
  90. Motor6D2.Part1 = Part3
  91. Motor6D2.MaxVelocity = 0.10000000149012
  92. Part3.Name = "Torso"
  93. Part3.Parent = Model0
  94. Part3.BrickColor = BrickColor.new("Smoky grey")
  95. Part3.Rotation = Vector3.new(0, -90, 0)
  96. Part3.FormFactor = Enum.FormFactor.Symmetric
  97. Part3.Size = Vector3.new(2.75328374, 2.75328374, 1.37664187)
  98. Part3.CFrame = CFrame.new(-8.29670906, 4.1299367, -21.1356354, 4.49431016e-21, -6.79974523e-22, -1, 4.72251821e-22, 1, -6.79974523e-22, 1, -4.72251821e-22, 4.49431016e-21)
  99. Part3.BottomSurface = Enum.SurfaceType.Smooth
  100. Part3.TopSurface = Enum.SurfaceType.Smooth
  101. Part3.Color = Color3.new(0.356863, 0.364706, 0.411765)
  102. Part3.Position = Vector3.new(-8.29670906, 4.1299367, -21.1356354)
  103. Part3.Orientation = Vector3.new(0, -90, 0)
  104. Part3.Color = Color3.new(0.356863, 0.364706, 0.411765)
  105. BodyForce4.Name = "RepulsionForce"
  106. BodyForce4.Parent = Part3
  107. BodyForce4.force = Vector3.new(0, 0, 0)
  108. Motor6D5.Name = "Left Hip"
  109. Motor6D5.Parent = Part3
  110. Motor6D5.C0 = CFrame.new(-1.37664187, -1.37664187, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
  111. Motor6D5.C1 = CFrame.new(-0.688320935, 1.37664187, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
  112. Motor6D5.Part0 = Part3
  113. Motor6D5.Part1 = Part10
  114. Motor6D5.MaxVelocity = 0.10000000149012
  115. Motor6D6.Name = "Right Hip"
  116. Motor6D6.Parent = Part3
  117. Motor6D6.C0 = CFrame.new(1.37664187, -1.37664187, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08)
  118. Motor6D6.C1 = CFrame.new(0.688320935, 1.37664187, 0, -4.37113883e-08, 0, 1, 0, 0.99999994, 0, -1, 0, -4.37113883e-08)
  119. Motor6D6.Part0 = Part3
  120. Motor6D6.Part1 = Part11
  121. Motor6D6.MaxVelocity = 0.10000000149012
  122. Motor6D7.Name = "Left Shoulder"
  123. Motor6D7.Parent = Part3
  124. Motor6D7.C0 = CFrame.new(-1.37664187, 0.688320935, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
  125. Motor6D7.C1 = CFrame.new(0.688320935, 0.688320935, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
  126. Motor6D7.Part0 = Part3
  127. Motor6D7.Part1 = Part12
  128. Motor6D7.MaxVelocity = 0.10000000149012
  129. Motor6D8.Name = "Right Shoulder"
  130. Motor6D8.Parent = Part3
  131. Motor6D8.C0 = CFrame.new(1.37664187, 0.688320935, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08)
  132. Motor6D8.C1 = CFrame.new(-0.688320935, 0.688320935, 0, -4.37113883e-08, 0, 1, 0, 0.99999994, 0, -1, 0, -4.37113883e-08)
  133. Motor6D8.Part0 = Part3
  134. Motor6D8.Part1 = Part13
  135. Motor6D8.MaxVelocity = 0.10000000149012
  136. Motor6D9.Name = "Neck"
  137. Motor6D9.Parent = Part3
  138. Motor6D9.C0 = CFrame.new(0, 1.37664187, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  139. Motor6D9.C1 = CFrame.new(0, -0.688320935, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  140. Motor6D9.Part0 = Part3
  141. Motor6D9.Part1 = Part15
  142. Motor6D9.MaxVelocity = 0.10000000149012
  143. Part10.Name = "Left Leg"
  144. Part10.Parent = Model0
  145. Part10.BrickColor = BrickColor.new("Black")
  146. Part10.Rotation = Vector3.new(0, -90, 0)
  147. Part10.CanCollide = false
  148. Part10.FormFactor = Enum.FormFactor.Symmetric
  149. Part10.Size = Vector3.new(1.37664187, 2.75328374, 1.37664187)
  150. Part10.CFrame = CFrame.new(-8.29670906, 1.37665319, -21.8239555, 4.49431016e-21, -6.79974422e-22, -1, 4.72251821e-22, 0.999999881, -6.79974523e-22, 1, -4.7225177e-22, 4.49431016e-21)
  151. Part10.BottomSurface = Enum.SurfaceType.Smooth
  152. Part10.TopSurface = Enum.SurfaceType.Smooth
  153. Part10.Color = Color3.new(0.105882, 0.164706, 0.207843)
  154. Part10.Position = Vector3.new(-8.29670906, 1.37665319, -21.8239555)
  155. Part10.Orientation = Vector3.new(0, -90, 0)
  156. Part10.Color = Color3.new(0.105882, 0.164706, 0.207843)
  157. Part11.Name = "Right Leg"
  158. Part11.Parent = Model0
  159. Part11.BrickColor = BrickColor.new("Black")
  160. Part11.Rotation = Vector3.new(0, -90, 0)
  161. Part11.CanCollide = false
  162. Part11.FormFactor = Enum.FormFactor.Symmetric
  163. Part11.Size = Vector3.new(1.37664187, 2.75328374, 1.37664187)
  164. Part11.CFrame = CFrame.new(-8.29670906, 1.37665319, -20.4473152, 4.49431016e-21, -6.79974422e-22, -1, 4.72251821e-22, 0.999999881, -6.79974523e-22, 1, -4.7225177e-22, 4.49431016e-21)
  165. Part11.BottomSurface = Enum.SurfaceType.Smooth
  166. Part11.TopSurface = Enum.SurfaceType.Smooth
  167. Part11.Color = Color3.new(0.105882, 0.164706, 0.207843)
  168. Part11.Position = Vector3.new(-8.29670906, 1.37665319, -20.4473152)
  169. Part11.Orientation = Vector3.new(0, -90, 0)
  170. Part11.Color = Color3.new(0.105882, 0.164706, 0.207843)
  171. Part12.Name = "Left Arm"
  172. Part12.Parent = Model0
  173. Part12.BrickColor = BrickColor.new("Black")
  174. Part12.Rotation = Vector3.new(0, -90, 0)
  175. Part12.CanCollide = false
  176. Part12.FormFactor = Enum.FormFactor.Symmetric
  177. Part12.Size = Vector3.new(1.37664187, 2.75328374, 1.37664187)
  178. Part12.CFrame = CFrame.new(-8.29670906, 4.1299367, -23.2005978, 4.49431016e-21, -6.79974422e-22, -1, 4.72251821e-22, 0.999999881, -6.79974523e-22, 1, -4.7225177e-22, 4.49431016e-21)
  179. Part12.BottomSurface = Enum.SurfaceType.Smooth
  180. Part12.TopSurface = Enum.SurfaceType.Smooth
  181. Part12.Color = Color3.new(0.105882, 0.164706, 0.207843)
  182. Part12.Position = Vector3.new(-8.29670906, 4.1299367, -23.2005978)
  183. Part12.Orientation = Vector3.new(0, -90, 0)
  184. Part12.Color = Color3.new(0.105882, 0.164706, 0.207843)
  185. Part13.Name = "Right Arm"
  186. Part13.Parent = Model0
  187. Part13.BrickColor = BrickColor.new("Black")
  188. Part13.Rotation = Vector3.new(0, -90, 0)
  189. Part13.CanCollide = false
  190. Part13.FormFactor = Enum.FormFactor.Symmetric
  191. Part13.Size = Vector3.new(1.37664187, 2.75328374, 1.37664187)
  192. Part13.CFrame = CFrame.new(-8.29670906, 4.1299367, -19.070673, 4.49431016e-21, -6.79974422e-22, -1, 4.72251821e-22, 0.999999881, -6.79974523e-22, 1, -4.7225177e-22, 4.49431016e-21)
  193. Part13.BottomSurface = Enum.SurfaceType.Smooth
  194. Part13.TopSurface = Enum.SurfaceType.Smooth
  195. Part13.Color = Color3.new(0.105882, 0.164706, 0.207843)
  196. Part13.Position = Vector3.new(-8.29670906, 4.1299367, -19.070673)
  197. Part13.Orientation = Vector3.new(0, -90, 0)
  198. Part13.Color = Color3.new(0.105882, 0.164706, 0.207843)
  199. Weld14.Name = "RightGrip"
  200. Weld14.Parent = Part13
  201. Weld14.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, -0)
  202. Weld14.C1 = CFrame.new(0, 0, -1, 0, 0, 1, 1, 0, 0, 0, 1, 0)
  203. Weld14.Part0 = Part13
  204. Weld14.Part1 = Part44
  205. Part15.Name = "Head"
  206. Part15.Parent = Model0
  207. Part15.BrickColor = BrickColor.new("Black")
  208. Part15.Rotation = Vector3.new(0, -90, 0)
  209. Part15.FormFactor = Enum.FormFactor.Symmetric
  210. Part15.Size = Vector3.new(2.75328374, 1.37664187, 1.37664187)
  211. Part15.CFrame = CFrame.new(-8.29670906, 6.19489956, -21.1356354, 4.49431016e-21, -6.79974523e-22, -1, 4.72251821e-22, 1, -6.79974523e-22, 1, -4.72251821e-22, 4.49431016e-21)
  212. Part15.BottomSurface = Enum.SurfaceType.Smooth
  213. Part15.TopSurface = Enum.SurfaceType.Smooth
  214. Part15.Color = Color3.new(0.105882, 0.164706, 0.207843)
  215. Part15.Position = Vector3.new(-8.29670906, 6.19489956, -21.1356354)
  216. Part15.Orientation = Vector3.new(0, -90, 0)
  217. Part15.Color = Color3.new(0.105882, 0.164706, 0.207843)
  218. Decal16.Name = "Face"
  219. Decal16.Parent = Part15
  220. Decal16.Texture = "http://www.roblox.com/asset/?id=7074882"
  221. SpecialMesh17.Parent = Part15
  222. SpecialMesh17.Scale = Vector3.new(1.25, 1.25, 1.25)
  223. SpecialMesh17.Scale = Vector3.new(1.25, 1.25, 1.25)
  224. Humanoid18.Parent = Model0
  225. Humanoid18.RightLeg = Part11
  226. Humanoid18.LeftLeg = Part10
  227. Humanoid18.Torso = Part1
  228. Humanoid18.Health = 34353544
  229. Humanoid18.MaxHealth = 34353544
  230. Humanoid18.WalkSpeed = 5
  231. Script19.Name = "Animate"
  232. Script19.Parent = Model0
  233. table.insert(cors,sandbox(Script19,function()
  234. function waitForChild(parent, childName)
  235. local child = parent:findFirstChild(childName)
  236. if child then return child end
  237. while true do
  238. child = parent.ChildAdded:wait()
  239. if child.Name==childName then return child end
  240. end
  241. end
  242.  
  243. local Figure = script.Parent
  244. local Torso = waitForChild(Figure, "Torso")
  245. local RightShoulder = waitForChild(Torso, "Right Shoulder")
  246. local LeftShoulder = waitForChild(Torso, "Left Shoulder")
  247. local RightHip = waitForChild(Torso, "Right Hip")
  248. local LeftHip = waitForChild(Torso, "Left Hip")
  249. local Neck = waitForChild(Torso, "Neck")
  250. local Humanoid = waitForChild(Figure, "Humanoid")
  251. local pose = "Standing"
  252.  
  253. local currentAnim = ""
  254. local currentAnimTrack = nil
  255. local currentAnimKeyframeHandler = nil
  256. local currentAnimSpeed = 1.0
  257. local animTable = {}
  258. local animNames = {
  259. idle = {
  260. { id = "http://www.roblox.com/asset/?id=125750544", weight = 9 },
  261. { id = "http://www.roblox.com/asset/?id=125750618", weight = 1 }
  262. },
  263. walk = {
  264. { id = "http://www.roblox.com/asset/?id=125749145", weight = 10 }
  265. },
  266. run = {
  267. { id = "run.xml", weight = 10 }
  268. },
  269. jump = {
  270. { id = "http://www.roblox.com/asset/?id=125750702", weight = 10 }
  271. },
  272. fall = {
  273. { id = "http://www.roblox.com/asset/?id=125750759", weight = 10 }
  274. },
  275. climb = {
  276. { id = "http://www.roblox.com/asset/?id=125750800", weight = 10 }
  277. },
  278. toolnone = {
  279. { id = "http://www.roblox.com/asset/?id=125750867", weight = 10 }
  280. },
  281. toolslash = {
  282. { id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
  283. -- { id = "slash.xml", weight = 10 }
  284. },
  285. toollunge = {
  286. { id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
  287. },
  288. wave = {
  289. { id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
  290. },
  291. point = {
  292. { id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
  293. },
  294. dance = {
  295. { id = "http://www.roblox.com/asset/?id=130018893", weight = 10 },
  296. { id = "http://www.roblox.com/asset/?id=132546839", weight = 10 },
  297. { id = "http://www.roblox.com/asset/?id=132546884", weight = 10 }
  298. },
  299. dance2 = {
  300. { id = "http://www.roblox.com/asset/?id=160934142", weight = 10 },
  301. { id = "http://www.roblox.com/asset/?id=160934298", weight = 10 },
  302. { id = "http://www.roblox.com/asset/?id=160934376", weight = 10 }
  303. },
  304. dance3 = {
  305. { id = "http://www.roblox.com/asset/?id=160934458", weight = 10 },
  306. { id = "http://www.roblox.com/asset/?id=160934530", weight = 10 },
  307. { id = "http://www.roblox.com/asset/?id=160934593", weight = 10 }
  308. },
  309. laugh = {
  310. { id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
  311. },
  312. cheer = {
  313. { id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
  314. },
  315. }
  316.  
  317. -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
  318. local emoteNames = { wave = false, point = false, dance = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
  319.  
  320. math.randomseed(tick())
  321.  
  322. function configureAnimationSet(name, fileList)
  323. if (animTable[name] ~= nil) then
  324. for _, connection in pairs(animTable[name].connections) do
  325. connection:disconnect()
  326. end
  327. end
  328. animTable[name] = {}
  329. animTable[name].count = 0
  330. animTable[name].totalWeight = 0
  331. animTable[name].connections = {}
  332.  
  333. -- check for config values
  334. local config = script:FindFirstChild(name)
  335. if (config ~= nil) then
  336. -- print("Loading anims " .. name)
  337. table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
  338. table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
  339. local idx = 1
  340. for _, childPart in pairs(config:GetChildren()) do
  341. if (childPart:IsA("Animation")) then
  342. table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
  343. animTable[name][idx] = {}
  344. animTable[name][idx].anim = childPart
  345. local weightObject = childPart:FindFirstChild("Weight")
  346. if (weightObject == nil) then
  347. animTable[name][idx].weight = 1
  348. else
  349. animTable[name][idx].weight = weightObject.Value
  350. end
  351. animTable[name].count = animTable[name].count + 1
  352. animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
  353. -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
  354. idx = idx + 1
  355. end
  356. end
  357. end
  358.  
  359. -- fallback to defaults
  360. if (animTable[name].count <= 0) then
  361. for idx, anim in pairs(fileList) do
  362. animTable[name][idx] = {}
  363. animTable[name][idx].anim = Instance.new("Animation")
  364. animTable[name][idx].anim.Name = name
  365. animTable[name][idx].anim.AnimationId = anim.id
  366. animTable[name][idx].weight = anim.weight
  367. animTable[name].count = animTable[name].count + 1
  368. animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
  369. -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
  370. end
  371. end
  372. end
  373.  
  374. -- Setup animation objects
  375. function scriptChildModified(child)
  376. local fileList = animNames[child.Name]
  377. if (fileList ~= nil) then
  378. configureAnimationSet(child.Name, fileList)
  379. end
  380. end
  381.  
  382. script.ChildAdded:connect(scriptChildModified)
  383. script.ChildRemoved:connect(scriptChildModified)
  384.  
  385.  
  386. for name, fileList in pairs(animNames) do
  387. configureAnimationSet(name, fileList)
  388. end
  389.  
  390. -- ANIMATION
  391.  
  392. -- declarations
  393. local toolAnim = "None"
  394. local toolAnimTime = 0
  395.  
  396. local jumpAnimTime = 0
  397. local jumpAnimDuration = 0.3
  398.  
  399. local toolTransitionTime = 0.1
  400. local fallTransitionTime = 0.3
  401. local jumpMaxLimbVelocity = 0.75
  402.  
  403. -- functions
  404.  
  405. function stopAllAnimations()
  406. local oldAnim = currentAnim
  407.  
  408. -- return to idle if finishing an emote
  409. if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
  410. oldAnim = "idle"
  411. end
  412.  
  413. currentAnim = ""
  414. if (currentAnimKeyframeHandler ~= nil) then
  415. currentAnimKeyframeHandler:disconnect()
  416. end
  417.  
  418. if (currentAnimTrack ~= nil) then
  419. currentAnimTrack:Stop()
  420. currentAnimTrack:Destroy()
  421. currentAnimTrack = nil
  422. end
  423. return oldAnim
  424. end
  425.  
  426. function setAnimationSpeed(speed)
  427. if speed ~= currentAnimSpeed then
  428. currentAnimSpeed = speed
  429. currentAnimTrack:AdjustSpeed(currentAnimSpeed)
  430. end
  431. end
  432.  
  433. function keyFrameReachedFunc(frameName)
  434. if (frameName == "End") then
  435. -- print("Keyframe : ".. frameName)
  436. local repeatAnim = stopAllAnimations()
  437. local animSpeed = currentAnimSpeed
  438. playAnimation(repeatAnim, 0.0, Humanoid)
  439. setAnimationSpeed(animSpeed)
  440. end
  441. end
  442.  
  443. -- Preload animations
  444. function playAnimation(animName, transitionTime, humanoid)
  445. local idleFromEmote = (animName == "idle" and emoteNames[currentAnim] ~= nil)
  446. if (animName ~= currentAnim and not idleFromEmote) then
  447.  
  448. if (currentAnimTrack ~= nil) then
  449. currentAnimTrack:Stop(transitionTime)
  450. currentAnimTrack:Destroy()
  451. end
  452.  
  453. currentAnimSpeed = 1.0
  454. local roll = math.random(1, animTable[animName].totalWeight)
  455. local origRoll = roll
  456. local idx = 1
  457. while (roll > animTable[animName][idx].weight) do
  458. roll = roll - animTable[animName][idx].weight
  459. idx = idx + 1
  460. end
  461. -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
  462. local anim = animTable[animName][idx].anim
  463.  
  464. -- load it to the humanoid; get AnimationTrack
  465. currentAnimTrack = humanoid:LoadAnimation(anim)
  466.  
  467. -- play the animation
  468. currentAnimTrack:Play(transitionTime)
  469. currentAnim = animName
  470.  
  471. -- set up keyframe name triggers
  472. if (currentAnimKeyframeHandler ~= nil) then
  473. currentAnimKeyframeHandler:disconnect()
  474. end
  475. currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
  476. end
  477. end
  478.  
  479. -------------------------------------------------------------------------------------------
  480. -------------------------------------------------------------------------------------------
  481.  
  482. local toolAnimName = ""
  483. local toolAnimTrack = nil
  484. local currentToolAnimKeyframeHandler = nil
  485.  
  486. function toolKeyFrameReachedFunc(frameName)
  487. if (frameName == "End") then
  488. -- print("Keyframe : ".. frameName)
  489. local repeatAnim = stopToolAnimations()
  490. playToolAnimation(repeatAnim, 0.0, Humanoid)
  491. end
  492. end
  493.  
  494.  
  495. function playToolAnimation(animName, transitionTime, humanoid)
  496. if (animName ~= toolAnimName) then
  497.  
  498. if (toolAnimTrack ~= nil) then
  499. toolAnimTrack:Stop()
  500. toolAnimTrack:Destroy()
  501. transitionTime = 0
  502. end
  503.  
  504. local roll = math.random(1, animTable[animName].totalWeight)
  505. local origRoll = roll
  506. local idx = 1
  507. while (roll > animTable[animName][idx].weight) do
  508. roll = roll - animTable[animName][idx].weight
  509. idx = idx + 1
  510. end
  511. -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
  512. local anim = animTable[animName][idx].anim
  513.  
  514. -- load it to the humanoid; get AnimationTrack
  515. toolAnimTrack = humanoid:LoadAnimation(anim)
  516.  
  517. -- play the animation
  518. toolAnimTrack:Play(transitionTime)
  519. toolAnimName = animName
  520.  
  521. currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
  522. end
  523. end
  524.  
  525. function stopToolAnimations()
  526. local oldAnim = toolAnimName
  527.  
  528. if (currentToolAnimKeyframeHandler ~= nil) then
  529. currentToolAnimKeyframeHandler:disconnect()
  530. end
  531.  
  532. toolAnimName = ""
  533. if (toolAnimTrack ~= nil) then
  534. toolAnimTrack:Stop()
  535. toolAnimTrack:Destroy()
  536. toolAnimTrack = nil
  537. end
  538.  
  539.  
  540. return oldAnim
  541. end
  542.  
  543. -------------------------------------------------------------------------------------------
  544. -------------------------------------------------------------------------------------------
  545.  
  546.  
  547. function onRunning(speed)
  548. if speed>0.01 then
  549. playAnimation("walk", 0.1, Humanoid)
  550. pose = "Running"
  551. else
  552. playAnimation("idle", 0.1, Humanoid)
  553. pose = "Standing"
  554. end
  555. end
  556.  
  557. function onDied()
  558. pose = "Dead"
  559. end
  560.  
  561. function onJumping()
  562. playAnimation("jump", 0.1, Humanoid)
  563. jumpAnimTime = jumpAnimDuration
  564. pose = "Jumping"
  565. end
  566.  
  567. function onClimbing(speed)
  568. playAnimation("climb", 0.1, Humanoid)
  569. setAnimationSpeed(speed / 12.0)
  570. pose = "Climbing"
  571. end
  572.  
  573. function onGettingUp()
  574. pose = "GettingUp"
  575. end
  576.  
  577. function onFreeFall()
  578. if (jumpAnimTime <= 0) then
  579. playAnimation("fall", fallTransitionTime, Humanoid)
  580. end
  581. pose = "FreeFall"
  582. end
  583.  
  584. function onFallingDown()
  585. pose = "FallingDown"
  586. end
  587.  
  588. function onSeated()
  589. pose = "Seated"
  590. end
  591.  
  592. function onPlatformStanding()
  593. pose = "PlatformStanding"
  594. end
  595.  
  596. function onSwimming(speed)
  597. if speed>0 then
  598. pose = "Running"
  599. else
  600. pose = "Standing"
  601. end
  602. end
  603.  
  604. function getTool()
  605. for _, kid in ipairs(Figure:GetChildren()) do
  606. if kid.className == "Tool" then return kid end
  607. end
  608. return nil
  609. end
  610.  
  611. function getToolAnim(tool)
  612. for _, c in ipairs(tool:GetChildren()) do
  613. if c.Name == "toolanim" and c.className == "StringValue" then
  614. return c
  615. end
  616. end
  617. return nil
  618. end
  619.  
  620. function animateTool()
  621.  
  622. if (toolAnim == "None") then
  623. playToolAnimation("toolnone", toolTransitionTime, Humanoid)
  624. return
  625. end
  626.  
  627. if (toolAnim == "Slash") then
  628. playToolAnimation("toolslash", 0, Humanoid)
  629. return
  630. end
  631.  
  632. if (toolAnim == "Lunge") then
  633. playToolAnimation("toollunge", 0, Humanoid)
  634. return
  635. end
  636. end
  637.  
  638. function moveSit()
  639. RightShoulder.MaxVelocity = 0.15
  640. LeftShoulder.MaxVelocity = 0.15
  641. RightShoulder:SetDesiredAngle(3.14 /2)
  642. LeftShoulder:SetDesiredAngle(-3.14 /2)
  643. RightHip:SetDesiredAngle(3.14 /2)
  644. LeftHip:SetDesiredAngle(-3.14 /2)
  645. end
  646.  
  647. local lastTick = 0
  648.  
  649. function move(time)
  650. local amplitude = 1
  651. local frequency = 1
  652. local deltaTime = time - lastTick
  653. lastTick = time
  654.  
  655. local climbFudge = 0
  656. local setAngles = false
  657.  
  658. if (jumpAnimTime > 0) then
  659. jumpAnimTime = jumpAnimTime - deltaTime
  660. end
  661.  
  662. if (pose == "FreeFall" and jumpAnimTime <= 0) then
  663. playAnimation("fall", fallTransitionTime, Humanoid)
  664. elseif (pose == "Seated") then
  665. stopAllAnimations()
  666. moveSit()
  667. return
  668. elseif (pose == "Running") then
  669. playAnimation("walk", 0.1, Humanoid)
  670. elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
  671. -- print("Wha " .. pose)
  672. amplitude = 0.1
  673. frequency = 1
  674. setAngles = true
  675. end
  676.  
  677. if (setAngles) then
  678. desiredAngle = amplitude * math.sin(time * frequency)
  679.  
  680. RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
  681. LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
  682. RightHip:SetDesiredAngle(-desiredAngle)
  683. LeftHip:SetDesiredAngle(-desiredAngle)
  684. end
  685.  
  686. -- Tool Animation handling
  687. local tool = getTool()
  688. if tool then
  689.  
  690. animStringValueObject = getToolAnim(tool)
  691.  
  692. if animStringValueObject then
  693. toolAnim = animStringValueObject.Value
  694. -- message recieved, delete StringValue
  695. animStringValueObject.Parent = nil
  696. toolAnimTime = time + .3
  697. end
  698.  
  699. if time > toolAnimTime then
  700. toolAnimTime = 0
  701. toolAnim = "None"
  702. end
  703.  
  704. animateTool()
  705. else
  706. stopToolAnimations()
  707. toolAnim = "None"
  708. toolAnimTime = 0
  709. end
  710. end
  711.  
  712. -- connect events
  713. Humanoid.Died:connect(onDied)
  714. Humanoid.Running:connect(onRunning)
  715. Humanoid.Jumping:connect(onJumping)
  716. Humanoid.Climbing:connect(onClimbing)
  717. Humanoid.GettingUp:connect(onGettingUp)
  718. Humanoid.FreeFalling:connect(onFreeFall)
  719. Humanoid.FallingDown:connect(onFallingDown)
  720. Humanoid.Seated:connect(onSeated)
  721. Humanoid.PlatformStanding:connect(onPlatformStanding)
  722. Humanoid.Swimming:connect(onSwimming)
  723.  
  724. -- main program
  725.  
  726. local runService = game:service("RunService");
  727.  
  728. -- initialize to idle
  729. playAnimation("idle", 0.1, Humanoid)
  730. pose = "Standing"
  731.  
  732. while Figure.Parent~=nil do
  733. local _, time = wait(0.1)
  734. move(time)
  735. end
  736.  
  737.  
  738.  
  739. end))
  740. StringValue20.Name = "climb"
  741. StringValue20.Parent = Script19
  742. Animation21.Name = "ClimbAnim"
  743. Animation21.Parent = StringValue20
  744. Animation21.AnimationId = "http://www.roblox.com/asset/?id=125750800"
  745. StringValue22.Name = "fall"
  746. StringValue22.Parent = Script19
  747. Animation23.Name = "FallAnim"
  748. Animation23.Parent = StringValue22
  749. Animation23.AnimationId = "http://www.roblox.com/asset/?id=125750759"
  750. StringValue24.Name = "idle"
  751. StringValue24.Parent = Script19
  752. Animation25.Name = "Animation1"
  753. Animation25.Parent = StringValue24
  754. Animation25.AnimationId = "http://www.roblox.com/asset/?id=125750544"
  755. NumberValue26.Name = "Weight"
  756. NumberValue26.Parent = Animation25
  757. NumberValue26.Value = 9
  758. Animation27.Name = "Animation2"
  759. Animation27.Parent = StringValue24
  760. Animation27.AnimationId = "http://www.roblox.com/asset/?id=125750618"
  761. NumberValue28.Name = "Weight"
  762. NumberValue28.Parent = Animation27
  763. NumberValue28.Value = 1
  764. StringValue29.Name = "jump"
  765. StringValue29.Parent = Script19
  766. Animation30.Name = "JumpAnim"
  767. Animation30.Parent = StringValue29
  768. Animation30.AnimationId = "http://www.roblox.com/asset/?id=125750702"
  769. StringValue31.Name = "run"
  770. StringValue31.Parent = Script19
  771. Animation32.Name = "RunAnim"
  772. Animation32.Parent = StringValue31
  773. Animation32.AnimationId = "http://www.roblox.com/asset/?id=125749145"
  774. StringValue33.Name = "toolnone"
  775. StringValue33.Parent = Script19
  776. Animation34.Name = "ToolNoneAnim"
  777. Animation34.Parent = StringValue33
  778. Animation34.AnimationId = "http://www.roblox.com/asset/?id=125750867"
  779. StringValue35.Name = "walk"
  780. StringValue35.Parent = Script19
  781. Animation36.Name = "WalkAnim"
  782. Animation36.Parent = StringValue35
  783. Animation36.AnimationId = "http://www.roblox.com/asset/?id=125749145"
  784. BillboardGui37.Parent = Model0
  785. BillboardGui37.Size = UDim2.new(0, 100, 0, 30)
  786. BillboardGui37.StudsOffset = Vector3.new(0, 5, 0)
  787. TextLabel38.Parent = BillboardGui37
  788. TextLabel38.Size = UDim2.new(1, 0, 1, 0)
  789. TextLabel38.Text = "Idle"
  790. TextLabel38.Visible = false
  791. TextLabel38.BackgroundColor3 = Color3.new(1, 1, 1)
  792. TextLabel38.Font = Enum.Font.SourceSansBold
  793. TextLabel38.FontSize = Enum.FontSize.Size24
  794. Sound39.Name = "Moan"
  795. Sound39.Parent = Model0
  796. Sound39.Pitch = 0.15000000596046
  797. Sound39.SoundId = "http://www.roblox.com/asset/?id=12222242"
  798. Sound39.Volume = 0.050000000745058
  799. Tool40.Name = "Epic Hammer"
  800. Tool40.Parent = Model0
  801. Tool40.GripForward = Vector3.new(-1, -0, -0)
  802. Tool40.GripPos = Vector3.new(0, 0, -1)
  803. Tool40.GripRight = Vector3.new(0, 1, 0)
  804. Tool40.GripUp = Vector3.new(0, 0, 1)
  805. Tool40.ToolTip = "This can make you dash"
  806. LocalScript41.Name = "Local Gui"
  807. LocalScript41.Parent = Tool40
  808. table.insert(cors,sandbox(LocalScript41,function()
  809. local Tool = script.Parent;
  810.  
  811. enabled = true
  812. function onButton1Down(mouse)
  813. if not enabled then
  814. return
  815. end
  816.  
  817. enabled = false
  818. mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
  819.  
  820. wait(1)
  821. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  822. enabled = true
  823.  
  824. end
  825.  
  826. function onEquippedLocal(mouse)
  827.  
  828. if mouse == nil then
  829. print("Mouse not found")
  830. return
  831. end
  832.  
  833. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  834. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  835. end
  836.  
  837.  
  838. Tool.Equipped:connect(onEquippedLocal)
  839.  
  840. end))
  841. Script42.Name = "IceHammer"
  842. Script42.Parent = Tool40
  843. table.insert(cors,sandbox(Script42,function()
  844. -------- OMG HAX
  845.  
  846. at2 = 0
  847. debris = game:GetService("Debris")
  848. r = game:service("RunService")
  849.  
  850. cool = 5
  851.  
  852. mod = Instance.new("Model")
  853. mod.Parent = script.Parent
  854. h = Instance.new("Humanoid")
  855. h.Parent = mod
  856. h.MaxHealth = 0
  857. head = Instance.new("Part")
  858. head.Name = "Head"
  859. head.Transparency = 0.989
  860. head.BrickColor = BrickColor.new("Really black")
  861. head.formFactor = "Custom"
  862. head.Size = Vector3.new(0.2,0.2,0.2)
  863. head.TopSurface = 0
  864. head.BottomSurface = 0
  865. head.Anchored = true
  866. head.Parent = mod
  867.  
  868. local damage = 0
  869.  
  870.  
  871. local slash_damage = 12
  872.  
  873.  
  874. sword = script.Parent.Handle
  875. Tool = script.Parent
  876.  
  877.  
  878. local SlashSound = Instance.new("Sound")
  879. SlashSound.SoundId = "http://www.roblox.com/asset/?id=926058764"
  880. SlashSound.Parent = sword
  881. SlashSound.Pitch = 1
  882. SlashSound.Volume = 10
  883.  
  884.  
  885. local UnsheathSound = Instance.new("Sound")
  886. UnsheathSound.SoundId = "http://www.roblox.com/asset/?id=15933756"
  887. UnsheathSound.Parent = sword
  888. UnsheathSound.Volume = 1
  889.  
  890. --local blues = {"Really blue", "Really black", "Black", "Bright blue"}
  891.  
  892.  
  893. function isTurbo(character)
  894. return character:FindFirstChild("WingwsHeaddess") ~= nil
  895. end
  896.  
  897. function allThatIce(pos, isTurbo)
  898.  
  899. local count = 1
  900. if (isTurbo == true) then count = 1 end
  901.  
  902. for i=1,count do
  903. local p = Instance.new("Part")
  904. --p.BrickColor = BrickColor.new(blues[math.random(#blues)])
  905. p.formFactor = "Symmetric"
  906. p.Name = "ICEY NOOB"
  907. p.Size = Vector3.new(5,5,1)
  908. p.BrickColor = BrickColor.new("New Yeller")
  909. p.TopSurface = 0
  910. p.Material = "Neon"
  911. p.Transparency = 0.5
  912. p.CanCollide = false
  913. --p.Shape = 0
  914. p.Friction = 0
  915. p.Elasticity = 0
  916. p.BottomSurface = 0
  917.  
  918. local a = math.random() * 6.28
  919. local d = Vector3.new(math.cos(a), 0, math.sin(a)).unit
  920. bv = script.BodyVelocity:clone()
  921. bv.Parent = p
  922. --p.RotVelocity = d * 1000
  923. p.CFrame = CFrame.new(pos + Vector3.new(0, 0, 0) + (d * 0), Tool.Parent.Torso.CFrame.lookVector * -9999999999)
  924. --p.CFrame = CFrame.new(p.Position, Tool.Parent.Torso.Position)
  925. p.Parent = game.Workspace
  926.  
  927. debris:AddItem(p, 0.1)
  928. wait()
  929. end
  930.  
  931. end
  932.  
  933.  
  934. function blow(hit)
  935. local humanoid = hit.Parent:findFirstChild("Humanoid")
  936. local vCharacter = Tool.Parent
  937. local vPlayer = game.Players:playerFromCharacter(vCharacter)
  938. local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
  939.  
  940.  
  941.  
  942. if humanoid~=nil and humanoid ~= hum and hum ~= nil then
  943. -- final check, make sure sword is in-hand
  944.  
  945. local right_arm = vCharacter:FindFirstChild("Right Arm")
  946. if (right_arm ~= nil) then
  947. local joint = right_arm:FindFirstChild("RightGrip")
  948. if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
  949. tagHumanoid(humanoid, vPlayer)
  950. if (isTurbo(vCharacter) == true) then
  951. humanoid:TakeDamage(damage * 1.2)
  952. else
  953. humanoid:TakeDamage(damage)
  954. end
  955. end
  956. end
  957.  
  958.  
  959. end
  960. end
  961.  
  962.  
  963. function tagHumanoid(humanoid, player)
  964. local creator_tag = Instance.new("ObjectValue")
  965. creator_tag.Value = player
  966. creator_tag.Name = "creator"
  967. creator_tag.Parent = humanoid
  968. debris:AddItem(creator_tag, 1)
  969. end
  970.  
  971.  
  972.  
  973.  
  974. function attack()
  975. CHARACTER =script.Parent.Parent
  976. for i = 1,5 do
  977. allThatIce(CHARACTER.Torso.Position + (CHARACTER.Torso.CFrame.lookVector * 0) - Vector3.new(0,0,0), isTurbo(CHARACTER))
  978. end
  979.  
  980. SlashSound:play()
  981. local anim = Instance.new("StringValue")
  982. anim.Name = "toolanim"
  983. anim.Value = "Slash"
  984. anim.Parent = Tool
  985. lol = script.Parent.Parent.Torso
  986. lol.Velocity = script.Parent.Parent.Head.CFrame.lookVector * 150 -- Foward Dash
  987. wait(0.1)
  988. lol.Velocity = script.Parent.Parent.Head.CFrame.lookVector * 150 -- Foward Dash
  989. wait(0.1)
  990. lol.Velocity = script.Parent.Parent.Head.CFrame.lookVector * 50 -- Foward Dash
  991. wait(0.1)
  992.  
  993. end
  994.  
  995.  
  996.  
  997.  
  998. function swordUp()
  999. Tool.GripForward = Vector3.new(-1,0,0)
  1000. Tool.GripRight = Vector3.new(0,1,0)
  1001. Tool.GripUp = Vector3.new(0,0,1)
  1002. end
  1003.  
  1004. function swordOut()
  1005. Tool.GripForward = Vector3.new(0,0,1)
  1006. Tool.GripRight = Vector3.new(0,-1,0)
  1007. Tool.GripUp = Vector3.new(-1,0,0)
  1008. end
  1009.  
  1010.  
  1011.  
  1012. Tool.Enabled = true
  1013.  
  1014.  
  1015.  
  1016.  
  1017. function onActivated()
  1018.  
  1019. if not Tool.Enabled then
  1020. return
  1021. end
  1022.  
  1023. Tool.Enabled = false
  1024.  
  1025. local character = Tool.Parent;
  1026. local humanoid = character.Humanoid
  1027. if humanoid == nil then
  1028. print("Humanoid not found")
  1029. return
  1030. end
  1031.  
  1032.  
  1033.  
  1034. if cool >= 1 then
  1035. attack()
  1036. if character.Torso.Velocity.y * -1 < 3 then
  1037. damage = 10
  1038. cool = cool - 1
  1039. b = script.BodyVelocity:clone()
  1040. b.velocity = character.Torso.CFrame.lookVector * 200
  1041. b.Parent = character.Torso
  1042. game:GetService("Debris"):AddItem(b,0.4)
  1043. for i = 1,5 do
  1044. allThatIce(character.Torso.Position + (character.Torso.CFrame.lookVector * 0) - Vector3.new(0,0,0), isTurbo(character))
  1045. end
  1046. damage = 5
  1047. b.velocity = Vector3.new(0,0,0)
  1048. end
  1049. end
  1050. mod.Name = "" .. cool .. ""
  1051. mod.Head.Position = Tool.Handle.Position + Vector3.new(0,10,0)
  1052. wait(0.5)
  1053. Tool.Enabled = true
  1054. end
  1055.  
  1056.  
  1057. function onEquipped()
  1058. UnsheathSound:play()
  1059. script.Parent.Handle.Boss:Play()
  1060. end
  1061.  
  1062. function Stopmusic()
  1063. script.Parent.Handle.Boss:Stop()
  1064. end
  1065.  
  1066. script.Parent.Activated:connect(onActivated)
  1067. script.Parent.Equipped:connect(onEquipped)
  1068. script.Parent.Unequipped:connect(Stopmusic)
  1069.  
  1070. connection = sword.Touched:connect(blow)
  1071.  
  1072. while true do
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083. attack()
  1084. Character = Tool.Parent
  1085. Path = Tool.Handle
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091. attack()
  1092.  
  1093.  
  1094.  
  1095.  
  1096. wait(4)
  1097.  
  1098. swordUp()
  1099.  
  1100.  
  1101.  
  1102. bomb = Instance.new("Part")
  1103. bomb.CFrame = CFrame.fromEulerAnglesXYZ(0,math.pi/20,10)
  1104. bomb.Position = Tool.Handle.Position
  1105. bomb.Material = "Neon"
  1106. bomb.Shape = "0"
  1107. bomb.BrickColor = BrickColor.Red()
  1108. bomb.Name = "Explosion"
  1109. bomb.Anchored = true
  1110. bomb.Parent = workspace
  1111. local anim = Instance.new("Animation")
  1112. anim.AnimationId = "rbxassetid://973866387"
  1113.  
  1114.  
  1115. local playAnim = script.Parent.Parent.Humanoid:LoadAnimation(anim)
  1116. playAnim:Play()
  1117.  
  1118. for n = 1,20 do
  1119. wait()
  1120. bomb.Size = bomb.Size + Vector3.new(1,1,1)
  1121. bomb.Transparency = bomb.Transparency + 0.06
  1122. bomb.CanCollide = false
  1123.  
  1124.  
  1125. end
  1126.  
  1127. bomb:Destroy()
  1128. anim:Destroy()
  1129. Tool.GripForward = Vector3.new(-1,0,0)
  1130. Tool.GripRight = Vector3.new(0,1,0)
  1131. Tool.GripUp = Vector3.new(0,0,1)
  1132.  
  1133. wait(5)
  1134.  
  1135. attack()
  1136.  
  1137. wait(5)
  1138. attack()
  1139. attack()
  1140. attack()
  1141. attack()
  1142. attack()
  1143. attack()
  1144. attack()
  1145. attack()
  1146. attack()
  1147. attack()
  1148. end
  1149.  
  1150. end))
  1151. BodyVelocity43.Parent = Script42
  1152. BodyVelocity43.Velocity = Vector3.new(0, 0, 0)
  1153. BodyVelocity43.velocity = Vector3.new(0, 0, 0)
  1154. Part44.Name = "Handle"
  1155. Part44.Parent = Tool40
  1156. Part44.BrickColor = BrickColor.new("Really black")
  1157. Part44.Rotation = Vector3.new(90, 90, 0)
  1158. Part44.CanCollide = false
  1159. Part44.Size = Vector3.new(3.1400001, 1.898, 6.28399992)
  1160. Part44.CFrame = CFrame.new(-7.29670906, 3.1299367, -19.070673, -6.79974422e-22, 4.49431016e-21, 1, 0.999999881, 4.72251821e-22, 6.79974523e-22, -4.7225177e-22, 1, -4.49431016e-21)
  1161. Part44.BottomSurface = Enum.SurfaceType.Smooth
  1162. Part44.TopSurface = Enum.SurfaceType.Smooth
  1163. Part44.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  1164. Part44.Position = Vector3.new(-7.29670906, 3.1299367, -19.070673)
  1165. Part44.Orientation = Vector3.new(0, 90, 90)
  1166. Part44.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  1167. Sound45.Name = "Boss"
  1168. Sound45.Parent = Part44
  1169. Sound45.Volume = 2
  1170. SpecialMesh46.Parent = Part44
  1171. SpecialMesh46.MeshId = "rbxassetid://15924243"
  1172. SpecialMesh46.Scale = Vector3.new(2, 2, 2)
  1173. SpecialMesh46.MeshType = Enum.MeshType.FileMesh
  1174. SpecialMesh46.Scale = Vector3.new(2, 2, 2)
  1175. BoolValue47.Name = "CanAttack"
  1176. BoolValue47.Parent = Model0
  1177. Sound48.Parent = Model0
  1178. Sound48.SoundId = "rbxassetid://299247304"
  1179. Sound48.Volume = 5
  1180. Sound48.Looped = true
  1181. Sound48:Play()
  1182. Script49.Name = "Follow"
  1183. Script49.Parent = Model0
  1184. table.insert(cors,sandbox(Script49,function()
  1185. local larm = script.Parent:FindFirstChild("Left Arm")
  1186. local rarm = script.Parent:FindFirstChild("Right Arm")
  1187.  
  1188. function findNearestTorso(pos)
  1189. local list = game.Workspace:children()
  1190. local torso = nil
  1191. local dist = 455
  1192. local temp = nil
  1193. local human = nil
  1194. local temp2 = nil
  1195. for x = 1, #list do
  1196. temp2 = list[x]
  1197. if (temp2.className == "Model") and (temp2 ~= script.Parent) then
  1198. temp = temp2:findFirstChild("Torso")
  1199. human = temp2:findFirstChild("Humanoid")
  1200. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  1201. if (temp.Position - pos).magnitude < dist then
  1202. torso = temp
  1203. dist = (temp.Position - pos).magnitude
  1204. end
  1205. end
  1206. end
  1207. end
  1208. return torso
  1209. end
  1210.  
  1211. while true do
  1212.  
  1213. wait(0.1)
  1214. local target = findNearestTorso(script.Parent.Torso.Position)
  1215.  
  1216. if target ~= nil then
  1217.  
  1218. script.Parent.Humanoid:MoveTo(target.Position, target)
  1219. elseif script.Parent.CanAttack == false then
  1220.  
  1221. script.Parent.CanAttack = true
  1222.  
  1223. end
  1224.  
  1225.  
  1226.  
  1227. end
  1228. end))
  1229. for i,v in pairs(mas:GetChildren()) do
  1230. v.Parent = workspace
  1231. pcall(function() v:MakeJoints() end)
  1232. end
  1233. mas:Destroy()
  1234. for i,v in pairs(cors) do
  1235. spawn(function()
  1236. pcall(v)
  1237. end)
  1238. end
Add Comment
Please, Sign In to add comment