Advertisement
memberhero

test5

Nov 20th, 2017
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 63.55 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. CylinderMesh2 = Instance.new("CylinderMesh")
  22. Part3 = Instance.new("Part")
  23. SpecialMesh4 = Instance.new("SpecialMesh")
  24. Sound5 = Instance.new("Sound")
  25. Part6 = Instance.new("Part")
  26. SpecialMesh7 = Instance.new("SpecialMesh")
  27. Part8 = Instance.new("Part")
  28. CylinderMesh9 = Instance.new("CylinderMesh")
  29. Part10 = Instance.new("Part")
  30. SpecialMesh11 = Instance.new("SpecialMesh")
  31. Part12 = Instance.new("Part")
  32. SpecialMesh13 = Instance.new("SpecialMesh")
  33. Part14 = Instance.new("Part")
  34. CylinderMesh15 = Instance.new("CylinderMesh")
  35. Part16 = Instance.new("Part")
  36. SpecialMesh17 = Instance.new("SpecialMesh")
  37. Sound18 = Instance.new("Sound")
  38. Sound19 = Instance.new("Sound")
  39. Sound20 = Instance.new("Sound")
  40. Part21 = Instance.new("Part")
  41. SpecialMesh22 = Instance.new("SpecialMesh")
  42. Part23 = Instance.new("Part")
  43. SpecialMesh24 = Instance.new("SpecialMesh")
  44. Part25 = Instance.new("Part")
  45. CylinderMesh26 = Instance.new("CylinderMesh")
  46. Part27 = Instance.new("Part")
  47. SpecialMesh28 = Instance.new("SpecialMesh")
  48. Part29 = Instance.new("Part")
  49. SpecialMesh30 = Instance.new("SpecialMesh")
  50. Sound31 = Instance.new("Sound")
  51. Part32 = Instance.new("Part")
  52. CylinderMesh33 = Instance.new("CylinderMesh")
  53. Part34 = Instance.new("Part")
  54. CylinderMesh35 = Instance.new("CylinderMesh")
  55. Part36 = Instance.new("Part")
  56. SpecialMesh37 = Instance.new("SpecialMesh")
  57. Sound38 = Instance.new("Sound")
  58. Part39 = Instance.new("Part")
  59. SpecialMesh40 = Instance.new("SpecialMesh")
  60. Part41 = Instance.new("Part")
  61. SpecialMesh42 = Instance.new("SpecialMesh")
  62. Part43 = Instance.new("Part")
  63. CylinderMesh44 = Instance.new("CylinderMesh")
  64. Part45 = Instance.new("Part")
  65. CylinderMesh46 = Instance.new("CylinderMesh")
  66. Humanoid47 = Instance.new("Humanoid")
  67. Script48 = Instance.new("Script")
  68. Part49 = Instance.new("Part")
  69. SpecialMesh50 = Instance.new("SpecialMesh")
  70. Part51 = Instance.new("Part")
  71. SpecialMesh52 = Instance.new("SpecialMesh")
  72. Sound53 = Instance.new("Sound")
  73. Configuration54 = Instance.new("Configuration")
  74. IntValue55 = Instance.new("IntValue")
  75. IntValue56 = Instance.new("IntValue")
  76. IntValue57 = Instance.new("IntValue")
  77. IntValue58 = Instance.new("IntValue")
  78. IntValue59 = Instance.new("IntValue")
  79. IntValue60 = Instance.new("IntValue")
  80. NumberValue61 = Instance.new("NumberValue")
  81. IntValue62 = Instance.new("IntValue")
  82. IntValue63 = Instance.new("IntValue")
  83. IntValue64 = Instance.new("IntValue")
  84. IntValue65 = Instance.new("IntValue")
  85. IntValue66 = Instance.new("IntValue")
  86. IntValue67 = Instance.new("IntValue")
  87. IntValue68 = Instance.new("IntValue")
  88. IntValue69 = Instance.new("IntValue")
  89. IntValue70 = Instance.new("IntValue")
  90. IntValue71 = Instance.new("IntValue")
  91. IntValue72 = Instance.new("IntValue")
  92. Script73 = Instance.new("Script")
  93. BrickColorValue74 = Instance.new("BrickColorValue")
  94. Model0.Name = "Golem"
  95. Model0.Parent = mas
  96. Part1.Name = "LeftLowerLeg"
  97. Part1.Parent = Model0
  98. Part1.BrickColor = BrickColor.new("Black")
  99. Part1.Rotation = Vector3.new(-2.38999987, 89.3699951, 2.33999991)
  100. Part1.FormFactor = Enum.FormFactor.Symmetric
  101. Part1.Size = Vector3.new(1, 2, 1)
  102. Part1.CFrame = CFrame.new(-1.099213, 2.03623009, 40.9988403, 0.0110410023, -0.000451922766, 0.999938905, -0.000760279945, 0.999999702, 0.000460344891, -0.999938786, -0.000765316363, 0.0110406559)
  103. Part1.BottomSurface = Enum.SurfaceType.Smooth
  104. Part1.TopSurface = Enum.SurfaceType.Smooth
  105. Part1.Color = Color3.new(0.105882, 0.164706, 0.207843)
  106. Part1.Position = Vector3.new(-1.099213, 2.03623009, 40.9988403)
  107. Part1.Orientation = Vector3.new(-0.0299999993, 89.3699951, -0.0399999991)
  108. Part1.Color = Color3.new(0.105882, 0.164706, 0.207843)
  109. CylinderMesh2.Parent = Part1
  110. CylinderMesh2.Scale = Vector3.new(0.800000012, 1, 0.800000012)
  111. CylinderMesh2.Scale = Vector3.new(0.800000012, 1, 0.800000012)
  112. Part3.Name = "LeftFoot"
  113. Part3.Parent = Model0
  114. Part3.BrickColor = BrickColor.new("Black")
  115. Part3.Rotation = Vector3.new(179.959991, 0.629999995, 179.970001)
  116. Part3.FormFactor = Enum.FormFactor.Symmetric
  117. Part3.Size = Vector3.new(1, 1, 1)
  118. Part3.CFrame = CFrame.new(-1.09855604, 0.536222994, 40.9999847, -0.999939084, -0.000457213639, 0.0110247592, -0.000465554273, 0.999999642, -0.00075398467, -0.011024408, -0.000759071379, -0.999939024)
  119. Part3.BottomSurface = Enum.SurfaceType.Smooth
  120. Part3.TopSurface = Enum.SurfaceType.Smooth
  121. Part3.Color = Color3.new(0.105882, 0.164706, 0.207843)
  122. Part3.Position = Vector3.new(-1.09855604, 0.536222994, 40.9999847)
  123. Part3.Orientation = Vector3.new(0.0399999991, 179.369995, -0.0299999993)
  124. Part3.Color = Color3.new(0.105882, 0.164706, 0.207843)
  125. SpecialMesh4.Parent = Part3
  126. SpecialMesh4.Scale = Vector3.new(3, 1, 2)
  127. SpecialMesh4.MeshType = Enum.MeshType.Torso
  128. SpecialMesh4.Scale = Vector3.new(3, 1, 2)
  129. Sound5.Name = "Stomp"
  130. Sound5.Parent = Part3
  131. Sound5.Pitch = 3
  132. Sound5.SoundId = "http://www.roblox.com/asset?id=11984254"
  133. Sound5.Volume = 1
  134. Part6.Name = "LeftKnee"
  135. Part6.Parent = Model0
  136. Part6.BrickColor = BrickColor.new("Black")
  137. Part6.Rotation = Vector3.new(-2.38999987, 89.3699951, 2.33999991)
  138. Part6.FormFactor = Enum.FormFactor.Symmetric
  139. Part6.Size = Vector3.new(1, 1, 1)
  140. Part6.CFrame = CFrame.new(-1.09989905, 3.53625488, 40.9976807, 0.0110410023, -0.000451922766, 0.999938905, -0.000760279945, 0.999999702, 0.000460344891, -0.999938786, -0.000765316363, 0.0110406559)
  141. Part6.BottomSurface = Enum.SurfaceType.Smooth
  142. Part6.TopSurface = Enum.SurfaceType.Smooth
  143. Part6.Color = Color3.new(0.105882, 0.164706, 0.207843)
  144. Part6.Position = Vector3.new(-1.09989905, 3.53625488, 40.9976807)
  145. Part6.Orientation = Vector3.new(-0.0299999993, 89.3699951, -0.0399999991)
  146. Part6.Color = Color3.new(0.105882, 0.164706, 0.207843)
  147. SpecialMesh7.Parent = Part6
  148. SpecialMesh7.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
  149. SpecialMesh7.MeshType = Enum.MeshType.Sphere
  150. SpecialMesh7.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
  151. Part8.Name = "LeftUpperLeg"
  152. Part8.Parent = Model0
  153. Part8.BrickColor = BrickColor.new("Black")
  154. Part8.Rotation = Vector3.new(84.9399948, 82.7999954, -89.9499969)
  155. Part8.FormFactor = Enum.FormFactor.Symmetric
  156. Part8.Size = Vector3.new(1, 2, 1)
  157. Part8.CFrame = CFrame.new(-0.911864996, 5.01875877, 40.8678894, 0.000114652779, 0.12536335, 0.992110968, -0.08723142, 0.988330364, -0.124875546, -0.996188164, -0.0865289196, 0.0110489363)
  158. Part8.BottomSurface = Enum.SurfaceType.Smooth
  159. Part8.TopSurface = Enum.SurfaceType.Smooth
  160. Part8.Color = Color3.new(0.105882, 0.164706, 0.207843)
  161. Part8.Position = Vector3.new(-0.911864996, 5.01875877, 40.8678894)
  162. Part8.Orientation = Vector3.new(7.17000008, 89.3600006, -5.03999996)
  163. Part8.Color = Color3.new(0.105882, 0.164706, 0.207843)
  164. CylinderMesh9.Parent = Part8
  165. CylinderMesh9.Scale = Vector3.new(0.800000012, 1, 0.800000012)
  166. CylinderMesh9.Scale = Vector3.new(0.800000012, 1, 0.800000012)
  167. Part10.Name = "LeftHip"
  168. Part10.Parent = Model0
  169. Part10.BrickColor = BrickColor.new("Black")
  170. Part10.Rotation = Vector3.new(84.9399948, 82.7999954, -89.9499969)
  171. Part10.FormFactor = Enum.FormFactor.Symmetric
  172. Part10.Size = Vector3.new(1, 1, 1)
  173. Part10.CFrame = CFrame.new(-0.723755002, 6.50131893, 40.7381134, 0.000114652779, 0.12536335, 0.992110968, -0.08723142, 0.988330364, -0.124875546, -0.996188164, -0.0865289196, 0.0110489363)
  174. Part10.BottomSurface = Enum.SurfaceType.Smooth
  175. Part10.TopSurface = Enum.SurfaceType.Smooth
  176. Part10.Color = Color3.new(0.105882, 0.164706, 0.207843)
  177. Part10.Position = Vector3.new(-0.723755002, 6.50131893, 40.7381134)
  178. Part10.Orientation = Vector3.new(7.17000008, 89.3600006, -5.03999996)
  179. Part10.Color = Color3.new(0.105882, 0.164706, 0.207843)
  180. SpecialMesh11.Parent = Part10
  181. SpecialMesh11.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
  182. SpecialMesh11.MeshType = Enum.MeshType.Sphere
  183. SpecialMesh11.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
  184. Part12.Name = "LeftElbow"
  185. Part12.Parent = Model0
  186. Part12.BrickColor = BrickColor.new("Black")
  187. Part12.Rotation = Vector3.new(43.2799988, 65.1999969, -42.9899979)
  188. Part12.FormFactor = Enum.FormFactor.Symmetric
  189. Part12.Size = Vector3.new(1, 1, 1)
  190. Part12.CFrame = CFrame.new(-0.599731028, 8.67869377, 44.0670319, 0.306790709, 0.286007345, 0.907788157, -0.0412597992, 0.956882298, -0.287530959, -0.950882256, 0.0507566668, 0.305363178)
  191. Part12.BottomSurface = Enum.SurfaceType.Smooth
  192. Part12.TopSurface = Enum.SurfaceType.Smooth
  193. Part12.Color = Color3.new(0.105882, 0.164706, 0.207843)
  194. Part12.Position = Vector3.new(-0.599731028, 8.67869377, 44.0670319)
  195. Part12.Orientation = Vector3.new(16.7099991, 71.409996, -2.47000003)
  196. Part12.Color = Color3.new(0.105882, 0.164706, 0.207843)
  197. SpecialMesh13.Parent = Part12
  198. SpecialMesh13.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
  199. SpecialMesh13.MeshType = Enum.MeshType.Sphere
  200. SpecialMesh13.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
  201. Part14.Name = "LeftUpperArm"
  202. Part14.Parent = Model0
  203. Part14.BrickColor = BrickColor.new("Black")
  204. Part14.Rotation = Vector3.new(39.9399986, 86.3899994, -89.9499969)
  205. Part14.FormFactor = Enum.FormFactor.Symmetric
  206. Part14.Size = Vector3.new(1, 1, 1)
  207. Part14.CFrame = CFrame.new(-0.536789, 9.32013607, 43.3025208, 5.69261756e-05, 0.06289161, 0.998020411, -0.766093016, 0.641460121, -0.0403787792, -0.642729819, -0.764574111, 0.0482173413)
  208. Part14.BottomSurface = Enum.SurfaceType.Smooth
  209. Part14.TopSurface = Enum.SurfaceType.Smooth
  210. Part14.Color = Color3.new(0.105882, 0.164706, 0.207843)
  211. Part14.Position = Vector3.new(-0.536789, 9.32013607, 43.3025208)
  212. Part14.Orientation = Vector3.new(2.30999994, 87.2299957, -50.0599976)
  213. Part14.Color = Color3.new(0.105882, 0.164706, 0.207843)
  214. CylinderMesh15.Parent = Part14
  215. CylinderMesh15.Scale = Vector3.new(0.800000012, 1, 0.800000012)
  216. CylinderMesh15.Scale = Vector3.new(0.800000012, 1, 0.800000012)
  217. Part16.Name = "Torso"
  218. Part16.Parent = Model0
  219. Part16.BrickColor = BrickColor.new("Black")
  220. Part16.Rotation = Vector3.new(0, 90, 0)
  221. Part16.FormFactor = Enum.FormFactor.Symmetric
  222. Part16.Friction = 0
  223. Part16.Size = Vector3.new(6, 4, 1)
  224. Part16.CFrame = CFrame.new(-0.723679006, 8.71128559, 39.7379608, 0.000115037183, 2.09771024e-05, 1, -7.53645072e-05, 1, -2.09684331e-05, -1, -7.53620916e-05, 0.000115038762)
  225. Part16.BottomSurface = Enum.SurfaceType.Smooth
  226. Part16.TopSurface = Enum.SurfaceType.Weld
  227. Part16.Color = Color3.new(0.105882, 0.164706, 0.207843)
  228. Part16.Position = Vector3.new(-0.723679006, 8.71128559, 39.7379608)
  229. Part16.Orientation = Vector3.new(0, 89.9899979, 0)
  230. Part16.Color = Color3.new(0.105882, 0.164706, 0.207843)
  231. SpecialMesh17.Parent = Part16
  232. SpecialMesh17.MeshId = "http://www.roblox.com/asset/?id=27120789"
  233. SpecialMesh17.Scale = Vector3.new(2.5, 2.5, 2)
  234. SpecialMesh17.MeshType = Enum.MeshType.FileMesh
  235. SpecialMesh17.Scale = Vector3.new(2.5, 2.5, 2)
  236. Sound18.Name = "GunWindUp"
  237. Sound18.Parent = Part16
  238. Sound18.SoundId = "http://roblox.com/asset/?id=2692844"
  239. Sound18.Volume = 1
  240. Sound19.Name = "GunShoot"
  241. Sound19.Parent = Part16
  242. Sound19.Pitch = 2
  243. Sound19.SoundId = "http://roblox.com/asset/?id=2692806"
  244. Sound19.Volume = 1
  245. Sound20.Name = "GunStop"
  246. Sound20.Parent = Part16
  247. Sound20.SoundId = "http://roblox.com/asset/?id=10209786"
  248. Sound20.Volume = 1
  249. Part21.Name = "RightHip"
  250. Part21.Parent = Model0
  251. Part21.BrickColor = BrickColor.new("Black")
  252. Part21.Rotation = Vector3.new(-84.7900009, 88.1999969, 89.7799988)
  253. Part21.FormFactor = Enum.FormFactor.Symmetric
  254. Part21.Size = Vector3.new(1, 1, 1)
  255. Part21.CFrame = CFrame.new(-0.723541021, 6.50116301, 38.7380524, 0.000118329481, -0.031399861, 0.99950707, 0.0870812982, 0.995710254, 0.0312702768, -0.996201217, 0.087034665, 0.00285216304)
  256. Part21.BottomSurface = Enum.SurfaceType.Smooth
  257. Part21.TopSurface = Enum.SurfaceType.Smooth
  258. Part21.Color = Color3.new(0.105882, 0.164706, 0.207843)
  259. Part21.Position = Vector3.new(-0.723541021, 6.50116301, 38.7380524)
  260. Part21.Orientation = Vector3.new(-1.78999996, 89.8399963, 5)
  261. Part21.Color = Color3.new(0.105882, 0.164706, 0.207843)
  262. SpecialMesh22.Parent = Part21
  263. SpecialMesh22.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
  264. SpecialMesh22.MeshType = Enum.MeshType.Sphere
  265. SpecialMesh22.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
  266. Part23.Name = "LeftShoulder"
  267. Part23.Parent = Model0
  268. Part23.BrickColor = BrickColor.new("Black")
  269. Part23.Rotation = Vector3.new(39.9399986, 86.3899994, -89.9499969)
  270. Part23.FormFactor = Enum.FormFactor.Symmetric
  271. Part23.Size = Vector3.new(2, 2, 2)
  272. Part23.CFrame = CFrame.new(-0.473892003, 9.96160793, 42.5378876, 5.69261756e-05, 0.06289161, 0.998020411, -0.766093016, 0.641460121, -0.0403787792, -0.642729819, -0.764574111, 0.0482173413)
  273. Part23.BottomSurface = Enum.SurfaceType.Smooth
  274. Part23.TopSurface = Enum.SurfaceType.Smooth
  275. Part23.Color = Color3.new(0.105882, 0.164706, 0.207843)
  276. Part23.Position = Vector3.new(-0.473892003, 9.96160793, 42.5378876)
  277. Part23.Orientation = Vector3.new(2.30999994, 87.2299957, -50.0599976)
  278. Part23.Color = Color3.new(0.105882, 0.164706, 0.207843)
  279. SpecialMesh24.Parent = Part23
  280. SpecialMesh24.Scale = Vector3.new(1.25, 1.25, 1.25)
  281. SpecialMesh24.MeshType = Enum.MeshType.Sphere
  282. SpecialMesh24.Scale = Vector3.new(1.25, 1.25, 1.25)
  283. Part25.Name = "RightLowerLeg"
  284. Part25.Parent = Model0
  285. Part25.BrickColor = BrickColor.new("Black")
  286. Part25.Rotation = Vector3.new(-84.7900009, 88.1999969, 84.7799988)
  287. Part25.RotVelocity = Vector3.new(4.434355e-19, 1.25183769e-23, 4.55071656e-19)
  288. Part25.Velocity = Vector3.new(3.04825775e-18, -5.79360196e-19, -2.97029763e-18)
  289. Part25.FormFactor = Enum.FormFactor.Symmetric
  290. Part25.Size = Vector3.new(1, 2, 1)
  291. Part25.CFrame = CFrame.new(-0.582427979, 2.01467299, 38.4770966, 0.00285525713, -0.0312702321, 0.99950707, -3.24817483e-05, 0.999510944, 0.0312704444, -0.999996126, -0.000121750898, 0.00285284547)
  292. Part25.BottomSurface = Enum.SurfaceType.Smooth
  293. Part25.TopSurface = Enum.SurfaceType.Smooth
  294. Part25.Color = Color3.new(0.105882, 0.164706, 0.207843)
  295. Part25.Position = Vector3.new(-0.582427979, 2.01467299, 38.4770966)
  296. Part25.Orientation = Vector3.new(-1.78999996, 89.8399963, 0)
  297. Part25.Color = Color3.new(0.105882, 0.164706, 0.207843)
  298. CylinderMesh26.Parent = Part25
  299. CylinderMesh26.Scale = Vector3.new(0.800000012, 1, 0.800000012)
  300. CylinderMesh26.Scale = Vector3.new(0.800000012, 1, 0.800000012)
  301. Part27.Name = "RightShoulder"
  302. Part27.Parent = Model0
  303. Part27.BrickColor = BrickColor.new("Black")
  304. Part27.Rotation = Vector3.new(-39.9199982, 86.4000015, 89.9199982)
  305. Part27.RotVelocity = Vector3.new(4.434355e-19, 1.25183769e-23, 4.55071656e-19)
  306. Part27.Velocity = Vector3.new(-5.68804544e-19, -1.35538744e-18, 5.54297502e-19)
  307. Part27.FormFactor = Enum.FormFactor.Symmetric
  308. Part27.Size = Vector3.new(2, 2, 2)
  309. Part27.CFrame = CFrame.new(-0.473266989, 9.96119404, 36.9378204, 8.90214069e-05, -0.0628643036, 0.998022079, 0.766000926, 0.641572297, 0.0403435975, -0.642839551, 0.764482439, 0.0482112356)
  310. Part27.BottomSurface = Enum.SurfaceType.Smooth
  311. Part27.TopSurface = Enum.SurfaceType.Smooth
  312. Part27.Color = Color3.new(0.105882, 0.164706, 0.207843)
  313. Part27.Position = Vector3.new(-0.473266989, 9.96119404, 36.9378204)
  314. Part27.Orientation = Vector3.new(-2.30999994, 87.2299957, 50.0499992)
  315. Part27.Color = Color3.new(0.105882, 0.164706, 0.207843)
  316. SpecialMesh28.Parent = Part27
  317. SpecialMesh28.Scale = Vector3.new(1.25, 1.25, 1.25)
  318. SpecialMesh28.MeshType = Enum.MeshType.Sphere
  319. SpecialMesh28.Scale = Vector3.new(1.25, 1.25, 1.25)
  320. Part29.Name = "Head"
  321. Part29.Parent = Model0
  322. Part29.BrickColor = BrickColor.new("Really black")
  323. Part29.Rotation = Vector3.new(0, 90, 0)
  324. Part29.FormFactor = Enum.FormFactor.Symmetric
  325. Part29.Friction = 0
  326. Part29.Size = Vector3.new(4, 3, 2)
  327. Part29.CFrame = CFrame.new(-0.423602521, 12.2112808, 39.7377319, 0.000115037183, 2.09771024e-05, 1, -7.53645072e-05, 1, -2.09684331e-05, -1, -7.53620916e-05, 0.000115038762)
  328. Part29.BottomSurface = Enum.SurfaceType.Smooth
  329. Part29.TopSurface = Enum.SurfaceType.Smooth
  330. Part29.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  331. Part29.Position = Vector3.new(-0.423602521, 12.2112808, 39.7377319)
  332. Part29.Orientation = Vector3.new(0, 89.9899979, 0)
  333. Part29.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  334. SpecialMesh30.Parent = Part29
  335. SpecialMesh30.MeshId = "http://www.roblox.com/asset/?id=52489607"
  336. SpecialMesh30.Scale = Vector3.new(1.5, 1.5, 1.5)
  337. SpecialMesh30.TextureId = "http://www.roblox.com/asset/?id=52489666"
  338. SpecialMesh30.VertexColor = Vector3.new(0.300000012, 0.300000012, 0.300000012)
  339. SpecialMesh30.MeshType = Enum.MeshType.FileMesh
  340. SpecialMesh30.Scale = Vector3.new(1.5, 1.5, 1.5)
  341. Sound31.Name = "Death"
  342. Sound31.Parent = Part29
  343. Sound31.Pitch = 0.5
  344. Sound31.SoundId = "http://www.roblox.com/asset?id=69935389"
  345. Sound31.Volume = 0.69999998807907
  346. Part32.Name = "RightUpperArm"
  347. Part32.Parent = Model0
  348. Part32.BrickColor = BrickColor.new("Black")
  349. Part32.Rotation = Vector3.new(-39.9199982, 86.4000015, 89.9199982)
  350. Part32.RotVelocity = Vector3.new(4.434355e-19, 1.25183769e-23, 4.55071656e-19)
  351. Part32.Velocity = Vector3.new(-2.76630187e-19, -1.7169029e-18, 2.69603985e-19)
  352. Part32.FormFactor = Enum.FormFactor.Symmetric
  353. Part32.Size = Vector3.new(1, 1, 1)
  354. Part32.CFrame = CFrame.new(-0.410385013, 9.31960201, 36.1733398, 8.90214069e-05, -0.0628643036, 0.998022079, 0.766000926, 0.641572297, 0.0403435975, -0.642839551, 0.764482439, 0.0482112356)
  355. Part32.BottomSurface = Enum.SurfaceType.Smooth
  356. Part32.TopSurface = Enum.SurfaceType.Smooth
  357. Part32.Color = Color3.new(0.105882, 0.164706, 0.207843)
  358. Part32.Position = Vector3.new(-0.410385013, 9.31960201, 36.1733398)
  359. Part32.Orientation = Vector3.new(-2.30999994, 87.2299957, 50.0499992)
  360. Part32.Color = Color3.new(0.105882, 0.164706, 0.207843)
  361. CylinderMesh33.Parent = Part32
  362. CylinderMesh33.Scale = Vector3.new(0.800000012, 1, 0.800000012)
  363. CylinderMesh33.Scale = Vector3.new(0.800000012, 1, 0.800000012)
  364. Part34.Name = "LeftLowerArm"
  365. Part34.Parent = Model0
  366. Part34.BrickColor = BrickColor.new("Black")
  367. Part34.Rotation = Vector3.new(43.2799988, 65.1999969, -42.9899979)
  368. Part34.RotVelocity = Vector3.new(4.434355e-19, 1.25183769e-23, 4.55071656e-19)
  369. Part34.Velocity = Vector3.new(8.90396133e-19, 2.05747674e-18, -8.67685476e-19)
  370. Part34.FormFactor = Enum.FormFactor.Symmetric
  371. Part34.Size = Vector3.new(1, 3, 1)
  372. Part34.CFrame = CFrame.new(-1.17175305, 6.76479578, 43.9655457, 0.306790709, 0.286007345, 0.907788157, -0.0412597992, 0.956882298, -0.287530959, -0.950882256, 0.0507566668, 0.305363178)
  373. Part34.BottomSurface = Enum.SurfaceType.Smooth
  374. Part34.TopSurface = Enum.SurfaceType.Smooth
  375. Part34.Color = Color3.new(0.105882, 0.164706, 0.207843)
  376. Part34.Position = Vector3.new(-1.17175305, 6.76479578, 43.9655457)
  377. Part34.Orientation = Vector3.new(16.7099991, 71.409996, -2.47000003)
  378. Part34.Color = Color3.new(0.105882, 0.164706, 0.207843)
  379. CylinderMesh35.Parent = Part34
  380. CylinderMesh35.Scale = Vector3.new(0.800000012, 1, 0.800000012)
  381. CylinderMesh35.Scale = Vector3.new(0.800000012, 1, 0.800000012)
  382. Part36.Name = "RightFoot"
  383. Part36.Parent = Model0
  384. Part36.BrickColor = BrickColor.new("Black")
  385. Part36.Rotation = Vector3.new(180, 0.159999996, 178.209991)
  386. Part36.RotVelocity = Vector3.new(4.434355e-19, 1.25183769e-23, 4.55071656e-19)
  387. Part36.Velocity = Vector3.new(3.73083437e-18, -5.86003594e-19, -3.63542074e-18)
  388. Part36.FormFactor = Enum.FormFactor.Symmetric
  389. Part36.Size = Vector3.new(1, 1, 1)
  390. Part36.CFrame = CFrame.new(-0.535583019, 0.515412986, 38.4772644, -0.999506712, -0.0312756523, 0.00283887517, -0.0312758349, 0.999510884, -2.61967816e-05, -0.002836667, -0.00011497207, -0.999996126)
  391. Part36.BottomSurface = Enum.SurfaceType.Smooth
  392. Part36.TopSurface = Enum.SurfaceType.Smooth
  393. Part36.Color = Color3.new(0.105882, 0.164706, 0.207843)
  394. Part36.Position = Vector3.new(-0.535583019, 0.515412986, 38.4772644)
  395. Part36.Orientation = Vector3.new(0, 179.839996, -1.78999996)
  396. Part36.Color = Color3.new(0.105882, 0.164706, 0.207843)
  397. SpecialMesh37.Parent = Part36
  398. SpecialMesh37.Scale = Vector3.new(3, 1, 2)
  399. SpecialMesh37.MeshType = Enum.MeshType.Torso
  400. SpecialMesh37.Scale = Vector3.new(3, 1, 2)
  401. Sound38.Name = "Stomp"
  402. Sound38.Parent = Part36
  403. Sound38.Pitch = 3
  404. Sound38.SoundId = "http://www.roblox.com/asset?id=11984254"
  405. Sound38.Volume = 1
  406. Part39.Name = "RightElbow"
  407. Part39.Parent = Model0
  408. Part39.BrickColor = BrickColor.new("Black")
  409. Part39.Rotation = Vector3.new(145.209991, 74.6999969, -145.009995)
  410. Part39.RotVelocity = Vector3.new(4.434355e-19, 1.25183769e-23, 4.55071656e-19)
  411. Part39.Velocity = Vector3.new(1.55441713e-20, -2.07841826e-18, -1.50895321e-20)
  412. Part39.FormFactor = Enum.FormFactor.Symmetric
  413. Part39.Size = Vector3.new(1, 1, 1)
  414. Part39.CFrame = CFrame.new(-0.347564995, 8.67803001, 35.4088135, -0.216174453, 0.15128389, 0.964563072, 0.019964207, 0.988401055, -0.150548384, -0.976150572, -0.0132879764, -0.216687366)
  415. Part39.BottomSurface = Enum.SurfaceType.Smooth
  416. Part39.TopSurface = Enum.SurfaceType.Smooth
  417. Part39.Color = Color3.new(0.105882, 0.164706, 0.207843)
  418. Part39.Position = Vector3.new(-0.347564995, 8.67803001, 35.4088135)
  419. Part39.Orientation = Vector3.new(8.65999985, 102.659996, 1.15999997)
  420. Part39.Color = Color3.new(0.105882, 0.164706, 0.207843)
  421. SpecialMesh40.Parent = Part39
  422. SpecialMesh40.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
  423. SpecialMesh40.MeshType = Enum.MeshType.Sphere
  424. SpecialMesh40.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
  425. Part41.Name = "RightKnee"
  426. Part41.Parent = Model0
  427. Part41.BrickColor = BrickColor.new("Black")
  428. Part41.Rotation = Vector3.new(-84.7900009, 88.1999969, 84.7799988)
  429. Part41.RotVelocity = Vector3.new(4.434355e-19, 1.25183769e-23, 4.55071656e-19)
  430. Part41.Velocity = Vector3.new(2.36568113e-18, -5.72716798e-19, -2.30517473e-18)
  431. Part41.FormFactor = Enum.FormFactor.Symmetric
  432. Part41.Size = Vector3.new(1, 1, 1)
  433. Part41.CFrame = CFrame.new(-0.629393995, 3.51396704, 38.4769135, 0.00285525713, -0.0312702321, 0.99950707, -3.24817483e-05, 0.999510944, 0.0312704444, -0.999996126, -0.000121750898, 0.00285284547)
  434. Part41.BottomSurface = Enum.SurfaceType.Smooth
  435. Part41.TopSurface = Enum.SurfaceType.Smooth
  436. Part41.Color = Color3.new(0.105882, 0.164706, 0.207843)
  437. Part41.Position = Vector3.new(-0.629393995, 3.51396704, 38.4769135)
  438. Part41.Orientation = Vector3.new(-1.78999996, 89.8399963, 0)
  439. Part41.Color = Color3.new(0.105882, 0.164706, 0.207843)
  440. SpecialMesh42.Parent = Part41
  441. SpecialMesh42.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
  442. SpecialMesh42.MeshType = Enum.MeshType.Sphere
  443. SpecialMesh42.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
  444. Part43.Name = "RightUpperLeg"
  445. Part43.Parent = Model0
  446. Part43.BrickColor = BrickColor.new("Black")
  447. Part43.Rotation = Vector3.new(-84.7900009, 88.1999969, 89.7799988)
  448. Part43.FormFactor = Enum.FormFactor.Symmetric
  449. Part43.Size = Vector3.new(1, 2, 1)
  450. Part43.CFrame = CFrame.new(-0.676497996, 5.00754404, 38.6074677, 0.000118329481, -0.031399861, 0.99950707, 0.0870812982, 0.995710254, 0.0312702768, -0.996201217, 0.087034665, 0.00285216304)
  451. Part43.BottomSurface = Enum.SurfaceType.Smooth
  452. Part43.TopSurface = Enum.SurfaceType.Smooth
  453. Part43.Color = Color3.new(0.105882, 0.164706, 0.207843)
  454. Part43.Position = Vector3.new(-0.676497996, 5.00754404, 38.6074677)
  455. Part43.Orientation = Vector3.new(-1.78999996, 89.8399963, 5)
  456. Part43.Color = Color3.new(0.105882, 0.164706, 0.207843)
  457. CylinderMesh44.Parent = Part43
  458. CylinderMesh44.Scale = Vector3.new(0.800000012, 1, 0.800000012)
  459. CylinderMesh44.Scale = Vector3.new(0.800000012, 1, 0.800000012)
  460. Part45.Name = "RightLowerArm"
  461. Part45.Parent = Model0
  462. Part45.BrickColor = BrickColor.new("Black")
  463. Part45.Rotation = Vector3.new(145.209991, 74.6999969, -145.009995)
  464. Part45.RotVelocity = Vector3.new(4.434355e-19, 1.25183769e-23, 4.55071656e-19)
  465. Part45.Velocity = Vector3.new(9.12830512e-19, -1.9120983e-18, -8.89436914e-19)
  466. Part45.FormFactor = Enum.FormFactor.Symmetric
  467. Part45.Size = Vector3.new(1, 3, 1)
  468. Part45.CFrame = CFrame.new(-0.650116026, 6.70110178, 35.4354095, -0.216174453, 0.15128389, 0.964563072, 0.019964207, 0.988401055, -0.150548384, -0.976150572, -0.0132879764, -0.216687366)
  469. Part45.BottomSurface = Enum.SurfaceType.Smooth
  470. Part45.TopSurface = Enum.SurfaceType.Smooth
  471. Part45.Color = Color3.new(0.105882, 0.164706, 0.207843)
  472. Part45.Position = Vector3.new(-0.650116026, 6.70110178, 35.4354095)
  473. Part45.Orientation = Vector3.new(8.65999985, 102.659996, 1.15999997)
  474. Part45.Color = Color3.new(0.105882, 0.164706, 0.207843)
  475. CylinderMesh46.Parent = Part45
  476. CylinderMesh46.Scale = Vector3.new(0.800000012, 1, 0.800000012)
  477. CylinderMesh46.Scale = Vector3.new(0.800000012, 1, 0.800000012)
  478. Humanoid47.Parent = Model0
  479. Humanoid47.NameOcclusion = Enum.NameOcclusion.NoOcclusion
  480. Humanoid47.Torso = Part16
  481. Humanoid47.Health = 25000
  482. Humanoid47.MaxHealth = 25000
  483. Humanoid47.WalkSpeed = 8
  484. Script48.Name = "Put this in Boss's Humanoid"
  485. Script48.Parent = Humanoid47
  486. table.insert(cors,sandbox(Script48,function()
  487. while true do
  488. for _, Players in pairs(game.Players:GetChildren()) do
  489. local BossBattleHealthGui = Players.PlayerGui:FindFirstChild("BossBattleHealthGui")
  490. if BossBattleHealthGui then
  491. BossBattleHealthGui.Frame.Boss.Value = script.Parent.Parent
  492. end
  493. end
  494. wait()
  495. end
  496. end))
  497. Part49.Name = "LeftHand"
  498. Part49.Parent = Model0
  499. Part49.BrickColor = BrickColor.new("Dark stone grey")
  500. Part49.Rotation = Vector3.new(-86.9599991, 16.6199989, -108.669998)
  501. Part49.FormFactor = Enum.FormFactor.Symmetric
  502. Part49.Size = Vector3.new(1, 1, 1)
  503. Part49.CFrame = CFrame.new(-1.87617505, 5.26676178, 43.6665802, -0.306793004, 0.907787025, 0.286008418, 0.0412609205, -0.287531883, 0.956881881, 0.9508816, 0.305365562, 0.0507566258)
  504. Part49.BottomSurface = Enum.SurfaceType.Smooth
  505. Part49.TopSurface = Enum.SurfaceType.Smooth
  506. Part49.Color = Color3.new(0.388235, 0.372549, 0.384314)
  507. Part49.Position = Vector3.new(-1.87617505, 5.26676178, 43.6665802)
  508. Part49.Orientation = Vector3.new(-73.1100006, 79.9399948, 171.830002)
  509. Part49.Color = Color3.new(0.388235, 0.372549, 0.384314)
  510. SpecialMesh50.Parent = Part49
  511. SpecialMesh50.MeshId = "http://www.roblox.com/asset/?id=2806162"
  512. SpecialMesh50.Scale = Vector3.new(0.800000012, 0.800000012, 0.800000012)
  513. SpecialMesh50.MeshType = Enum.MeshType.FileMesh
  514. SpecialMesh50.Scale = Vector3.new(0.800000012, 0.800000012, 0.800000012)
  515. Part51.Name = "RightHand"
  516. Part51.Parent = Model0
  517. Part51.BrickColor = BrickColor.new("Royal purple")
  518. Part51.Reflectance = 0.20000000298023
  519. Part51.Rotation = Vector3.new(-34.7900009, -74.6999969, 145.009995)
  520. Part51.RotVelocity = Vector3.new(4.434355e-19, 1.25183769e-23, 4.55071656e-19)
  521. Part51.Velocity = Vector3.new(1.85498106e-18, -1.73746227e-18, -1.80750151e-18)
  522. Part51.FormFactor = Enum.FormFactor.Symmetric
  523. Part51.Size = Vector3.new(1, 1, 1)
  524. Part51.CFrame = CFrame.new(-0.96786499, 4.62536812, 35.4632874, -0.216174424, -0.151283905, -0.964563012, 0.0199641939, -0.988401055, 0.150548398, -0.976150632, 0.0132879931, 0.216687307)
  525. Part51.BottomSurface = Enum.SurfaceType.Smooth
  526. Part51.TopSurface = Enum.SurfaceType.Smooth
  527. Part51.Color = Color3.new(0.384314, 0.145098, 0.819608)
  528. Part51.Position = Vector3.new(-0.96786499, 4.62536812, 35.4632874)
  529. Part51.Orientation = Vector3.new(-8.65999985, -77.3399963, 178.839996)
  530. Part51.Color = Color3.new(0.384314, 0.145098, 0.819608)
  531. SpecialMesh52.Parent = Part51
  532. SpecialMesh52.MeshId = "http://www.roblox.com/asset/?id=1031410"
  533. SpecialMesh52.Scale = Vector3.new(1, 2, 1)
  534. SpecialMesh52.MeshType = Enum.MeshType.FileMesh
  535. SpecialMesh52.Scale = Vector3.new(1, 2, 1)
  536. Sound53.Name = "FireLaser"
  537. Sound53.Parent = Part51
  538. Sound53.Pitch = 3
  539. Sound53.SoundId = "http://www.roblox.com/asset?id=2248511"
  540. Sound53.Volume = 0.40000000596046
  541. Configuration54.Name = "Stats"
  542. Configuration54.Parent = Model0
  543. IntValue55.Name = "BeamDamage"
  544. IntValue55.Parent = Configuration54
  545. IntValue55.Value = 10
  546. IntValue56.Name = "BeamForce"
  547. IntValue56.Parent = Configuration54
  548. IntValue56.Value = 90
  549. IntValue57.Name = "BeamLength"
  550. IntValue57.Parent = Configuration54
  551. IntValue57.Value = 4
  552. IntValue58.Name = "BeamSpeed"
  553. IntValue58.Parent = Configuration54
  554. IntValue58.Value = 6
  555. IntValue59.Name = "ExplosionRadius"
  556. IntValue59.Parent = Configuration54
  557. IntValue59.Value = 20
  558. IntValue60.Name = "GunDamage"
  559. IntValue60.Parent = Configuration54
  560. IntValue60.Value = 1
  561. NumberValue61.Name = "GunSpread"
  562. NumberValue61.Parent = Configuration54
  563. NumberValue61.Value = 0.05
  564. IntValue62.Name = "GunFlySpeed"
  565. IntValue62.Parent = Configuration54
  566. IntValue62.Value = 5
  567. IntValue63.Name = "MBShockwaveRadius"
  568. IntValue63.Parent = Configuration54
  569. IntValue63.Value = 100
  570. IntValue64.Name = "MBSize"
  571. IntValue64.Parent = Configuration54
  572. IntValue64.Value = 35
  573. IntValue65.Name = "MBSpeed"
  574. IntValue65.Parent = Configuration54
  575. IntValue65.Value = 2
  576. IntValue66.Name = "MBShockwaveForce"
  577. IntValue66.Parent = Configuration54
  578. IntValue66.Value = 100
  579. IntValue67.Name = "MBShockwaveDamage"
  580. IntValue67.Parent = Configuration54
  581. IntValue67.Value = 1
  582. IntValue68.Name = "NormalKickDamage"
  583. IntValue68.Parent = Configuration54
  584. IntValue68.Value = 5
  585. IntValue69.Name = "NormalKickForce"
  586. IntValue69.Parent = Configuration54
  587. IntValue69.Value = 30
  588. IntValue70.Name = "DefaultWalkSpeed"
  589. IntValue70.Parent = Configuration54
  590. IntValue70.Value = 12
  591. IntValue71.Name = "BaseDamage"
  592. IntValue71.Parent = Configuration54
  593. IntValue71.Value = 1
  594. IntValue72.Name = "RunSpeed"
  595. IntValue72.Parent = Configuration54
  596. IntValue72.Value = 22
  597. Script73.Name = "MainGolem"
  598. Script73.Parent = Model0
  599. table.insert(cors,sandbox(Script73,function()
  600. --[[
  601. I made this around 2011/2012, so the code isn't the most efficient, and some features aren't utilized
  602.  
  603. I did some basic cleaning up, but there are still some problems.
  604.  
  605. Any glitches/suggestions send to RobustPhysics/WrathOfTheElvhen
  606. --]]
  607.  
  608.  
  609. local rad = math.rad
  610. local sin = math.sin
  611. local cos = math.cos
  612. local pi = math.pi
  613. local random = math.random
  614.  
  615. local model = script.Parent --The golem model itself
  616. local stats = model.Stats
  617. local Golem = { --A table containing all of the Golem's parts
  618. Humanoid = model.Humanoid,
  619. Head = model.Head,
  620. Torso = model.Torso,
  621.  
  622. RightArm = {
  623. Shoulder = model.RightShoulder,
  624. Elbow = model.RightElbow,
  625. Lower = model.RightLowerArm,
  626. Upper = model.RightUpperArm,
  627. Hand = model.RightHand
  628. },
  629.  
  630. LeftArm = {
  631. Shoulder = model.LeftShoulder,
  632. Elbow = model.LeftElbow,
  633. Lower = model.LeftLowerArm,
  634. Upper = model.LeftUpperArm,
  635. Hand = model.LeftHand
  636. },
  637.  
  638. RightLeg = {
  639. Hip = model.RightHip,
  640. Knee = model.RightKnee,
  641. Lower = model.RightLowerLeg,
  642. Upper = model.RightUpperLeg,
  643. Foot = model.RightFoot
  644. },
  645.  
  646. LeftLeg = {
  647. Hip = model.LeftHip,
  648. Knee = model.LeftKnee,
  649. Lower = model.LeftLowerLeg,
  650. Upper = model.LeftUpperLeg,
  651. Foot = model.LeftFoot
  652. }
  653. }
  654.  
  655. --[[
  656. This section is just a bunch of welding
  657.  
  658. rs = Right Shoulder
  659. ls = Left Shoulder
  660.  
  661. re = Right Elbow
  662. le = Left Elbow
  663.  
  664. rh = Right Hip
  665. lh = Left Hip
  666.  
  667. rk = Right Knee
  668. lk = Left Knee
  669.  
  670. rf = Right Foot
  671. lf = Left Foot
  672.  
  673. rhand = Right Hand
  674. lhand = Left Hand
  675. --]]
  676.  
  677. local neck = Instance.new("Weld",Golem.Torso)
  678. local rs = Instance.new("Weld",Golem.Torso)
  679. local ls = Instance.new("Weld",Golem.Torso)
  680. local rs2 = Instance.new("Weld",Golem.RightArm.Shoulder)
  681. local ls2 = Instance.new("Weld",Golem.LeftArm.Shoulder)
  682. local re = Instance.new("Weld",Golem.RightArm.Upper)
  683. local le = Instance.new("Weld",Golem.LeftArm.Upper)
  684. local re2 = Instance.new("Weld",Golem.RightArm.Elbow)
  685. local le2 = Instance.new("Weld",Golem.LeftArm.Elbow)
  686. local rh = Instance.new("Weld",Golem.Torso)
  687. local lh = Instance.new("Weld",Golem.Torso)
  688. local rh2 = Instance.new("Weld",Golem.RightLeg.Hip)
  689. local lh2 = Instance.new("Weld",Golem.LeftLeg.Hip)
  690. local rk = Instance.new("Weld",Golem.RightLeg.Upper)
  691. local lk = Instance.new("Weld",Golem.LeftLeg.Upper)
  692. local rk2 = Instance.new("Weld",Golem.RightLeg.Lower)
  693. local lk2 = Instance.new("Weld",Golem.LeftLeg.Lower)
  694. local rf = Instance.new("Weld",Golem.RightLeg.Lower)
  695. local lf = Instance.new("Weld",Golem.LeftLeg.Lower)
  696. local rhand = Instance.new("Weld",Golem.RightArm.Lower)
  697. local lhand = Instance.new("Weld",Golem.LeftArm.Lower)
  698.  
  699. neck.Part0 = Golem.Torso
  700. neck.Part1 = Golem.Head
  701. rs.Part0 = Golem.Torso
  702. rs.Part1 = Golem.RightArm.Shoulder
  703. ls.Part0 = Golem.Torso
  704. ls.Part1 = Golem.LeftArm.Shoulder
  705. rs2.Part0 = Golem.RightArm.Shoulder
  706. rs2.Part1 = Golem.RightArm.Upper
  707. ls2.Part0 = Golem.LeftArm.Shoulder
  708. ls2.Part1 = Golem.LeftArm.Upper
  709. re.Part0 = Golem.RightArm.Upper
  710. re.Part1 = Golem.RightArm.Elbow
  711. le.Part0 = Golem.LeftArm.Upper
  712. le.Part1 = Golem.LeftArm.Elbow
  713. re2.Part0 = Golem.RightArm.Elbow
  714. re2.Part1 = Golem.RightArm.Lower
  715. le2.Part0 = Golem.LeftArm.Elbow
  716. le2.Part1 = Golem.LeftArm.Lower
  717. rh.Part0 = Golem.Torso
  718. rh.Part1 = Golem.RightLeg.Hip
  719. lh.Part0 = Golem.Torso
  720. lh.Part1 = Golem.LeftLeg.Hip
  721. rh2.Part0 = Golem.RightLeg.Hip
  722. rh2.Part1 = Golem.RightLeg.Upper
  723. lh2.Part0 = Golem.LeftLeg.Hip
  724. lh2.Part1 = Golem.LeftLeg.Upper
  725. rk.Part0 = Golem.RightLeg.Upper
  726. rk.Part1 = Golem.RightLeg.Knee
  727. lk.Part0 = Golem.LeftLeg.Upper
  728. lk.Part1 = Golem.LeftLeg.Knee
  729. rk2.Part0 = Golem.RightLeg.Knee
  730. rk2.Part1 = Golem.RightLeg.Lower
  731. lk2.Part0 = Golem.LeftLeg.Knee
  732. lk2.Part1 = Golem.LeftLeg.Lower
  733. rf.Part0 = Golem.RightLeg.Lower
  734. rf.Part1 = Golem.RightLeg.Foot
  735. lf.Part0 = Golem.LeftLeg.Lower
  736. lf.Part1 = Golem.LeftLeg.Foot
  737. rhand.Part0 = Golem.RightArm.Lower
  738. rhand.Part1 = Golem.RightArm.Hand
  739. lhand.Part0 = Golem.LeftArm.Lower
  740. lhand.Part1 = Golem.LeftArm.Hand
  741.  
  742. neck.C0 = CFrame.new(0,3.5,0.3)
  743. rs.C0 = CFrame.new(2.8,1.25,0.25)*CFrame.Angles(0,0,rad(50))
  744. ls.C0 = CFrame.new(-2.8,1.25,0.25)*CFrame.Angles(0,0,rad(-50))
  745. rs2.C0 = CFrame.new(0,-1,0)
  746. ls2.C0 = CFrame.new(0,-1,0)
  747. re.C0 = CFrame.new(0,-1,0)*CFrame.Angles(rad(20),0,rad(-50))
  748. le.C0 = CFrame.new(0,-1,0)*CFrame.Angles(rad(20),0,rad(50))
  749. re2.C0 = CFrame.new(0,-2,0)
  750. le2.C0 = CFrame.new(0,-2,0)
  751. rh.C0 = CFrame.new(1,-2.21,0)*CFrame.Angles(rad(0),0,rad(5))
  752. lh.C0 = CFrame.new(-1,-2.21,0)*CFrame.Angles(rad(0),0,rad(-5))
  753. rh2.C0 = CFrame.new(0,-1.5,0)
  754. lh2.C0 = CFrame.new(0,-1.5,0)
  755. rk.C0 = CFrame.new(0,-1.5,0)*CFrame.Angles(rad(0),0,rad(-5))
  756. lk.C0 = CFrame.new(0,-1.5,0)*CFrame.Angles(rad(0),0,rad(5))
  757. rk2.C0 = CFrame.new(0,-1.5,0)
  758. lk2.C0 = CFrame.new(0,-1.5,0)
  759. rf.C0 = CFrame.new(0,-1.5,0)*CFrame.Angles(0,rad(90),0)
  760. lf.C0 = CFrame.new(0,-1.5,0)*CFrame.Angles(0,rad(90),0)
  761. rhand.C0 = CFrame.new(0,-2.1,0)*CFrame.Angles(rad(180),0,0)
  762. lhand.C0 = CFrame.new(0.13,-1.65,-0.3)*CFrame.Angles(rad(-90),0,rad(180))
  763.  
  764. --All done welding
  765.  
  766. --[[
  767. --This was previously a fix to ROBLOX's humanoid glitches
  768.  
  769. for _,v in pairs(Golem) do --Basic start up stuff
  770. if v.className == "Part" then
  771. v.Anchored = false
  772. elseif v.className == "Humanoid" then
  773. v.Health = v.MaxHealth - 1 --I blame Humanoids for being weird
  774. else
  775. for _,p in pairs(v) do
  776. p.Anchored = false
  777. end
  778. end
  779. end
  780.  
  781. Golem.Humanoid.Health = Golem.Humanoid.MaxHealth - 1 --Seriously, I hate them
  782. wait(0.1)
  783. Golem.Humanoid.Health = Golem.Humanoid.MaxHealth - 1 --A LOT
  784.  
  785. ]]
  786.  
  787. local speed = 1.2 --How fast the walking animation is
  788. local factor1 = 1*speed --Also for walking animation
  789. local factor2 = 0.25*speed --See above
  790. local cooldown = 0 --Move cooldowns
  791. local cooldownStart = tick()
  792. local move = 0 --Which move to use (for main loop usage)
  793.  
  794. function PartsHit(pos, size, ignore, totalParts) --Find parts in Region3 based on Vector3 position and Vector3 size
  795. totalParts = totalParts or 20
  796. local hs = size.X/2
  797. local hs2 = size.Y/2
  798. local hs3 = size.Z/2
  799. local pos1 = Vector3.new(pos.X-hs, pos.y-hs2, pos.z-hs3)
  800. local pos2 = Vector3.new(pos.x+hs, pos.y+hs2, pos.z+hs3)
  801. local region = Region3.new(pos1, pos2)
  802. local parts = workspace:FindPartsInRegion3(region, ignore, totalParts)
  803. return parts
  804. end
  805.  
  806. function Run(sign) --The sprinting/walking animations are done here
  807. local sprint = false
  808. if speed >= 2 then
  809. sprint = true
  810. end
  811. if not sprint then
  812. for i = 1, 10 do
  813. re.C0 = re.C0 * CFrame.Angles(rad(2*sign*(speed/2)),0,0)
  814. le.C0 = le.C0 * CFrame.Angles(rad(-2*sign*(speed/2)),0,0)
  815. rs.C0 = rs.C0 * CFrame.Angles(rad(4*sign*(speed/2)),0,0)
  816. ls.C0 = ls.C0 * CFrame.Angles(rad(-4*sign*(speed/2)),0,0)
  817. rh.C0 = rh.C0 * CFrame.Angles(rad(4*sign*factor1),0,0)
  818. lh.C0 = lh.C0 * CFrame.Angles(rad(-4*sign*factor2),0,0)
  819. if factor1 > factor2 then
  820. rk.C0 = rk.C0 * CFrame.Angles(rad(-4*sign*factor1),0,0)
  821. else
  822. lk.C0 = lk.C0 * CFrame.Angles(rad(4*sign*factor2),0,0)
  823. end
  824. wait(0.01)
  825. end
  826. else
  827. for i = 1, 4 do
  828. re.C0 = re.C0 * CFrame.Angles(rad(2*sign*(speed/2))*2.5,0,0)
  829. le.C0 = le.C0 * CFrame.Angles(rad(-2*sign*(speed/2))*2.5,0,0)
  830. rs.C0 = rs.C0 * CFrame.Angles(rad(4*sign*(speed/2))*2.5,0,0)
  831. ls.C0 = ls.C0 * CFrame.Angles(rad(-4*sign*(speed/2))*2.5,0,0)
  832. rh.C0 = rh.C0 * CFrame.Angles(rad(4*sign*factor1)*2.5,0,0)
  833. lh.C0 = lh.C0 * CFrame.Angles(rad(-4*sign*factor2)*2.5,0,0)
  834. if factor1 > factor2 then
  835. rk.C0 = rk.C0 * CFrame.Angles(rad(-4*sign*factor1)*2.5,0,0)
  836. else
  837. lk.C0 = lk.C0 * CFrame.Angles(rad(4*sign*factor2)*2.5,0,0)
  838. end
  839. wait(0.01)
  840. end
  841. end
  842. end
  843.  
  844. function DrawLine(pos1, pos2, t, color, width)
  845. --Draws a line from Vector3 pos1 to Vector3 pos2, will auto delete after time 't'. Optional BrickColor color and int width
  846. t = t or 0.1 --how long until the part created is destroyed
  847. color = color or BrickColor.new("Black")
  848. width = width or 0.1
  849. local p = Instance.new("Part",workspace)
  850. p.FormFactor = "Symmetric"
  851. p.TopSurface = "Smooth"
  852. p.BottomSurface = "Smooth"
  853. p.Size = Vector3.new(1,1,1)
  854. p.Anchored = true
  855. p.BrickColor = color
  856. p.CanCollide = false
  857. p.CFrame = CFrame.new((pos1+pos2)/2,pos2)
  858. local m = Instance.new("BlockMesh",p)
  859. m.Scale = Vector3.new(width,width,(pos2-pos1).magnitude)
  860. game:GetService("Debris"):AddItem(p,t)
  861. return p
  862. end
  863.  
  864. function Raycast(pos1, dir, ignore) --Basic raycasting (goes through invisible parts)
  865. local hit,newpos=game.Workspace:FindPartOnRay(Ray.new(pos1,dir*500),ignore)
  866. if hit and newpos then
  867. if hit.Parent.className == "Hat" then
  868. return hit.Parent.Parent.Torso,newpos
  869. end
  870. if hit.Transparency == 1 or not hit.CanCollide then
  871. hit,newpos=Raycast(newpos,dir,ignore) --Recursive raycast
  872. end
  873. end
  874. return hit,newpos
  875. end
  876.  
  877. function Explosion(pos,radius) --Creates an explosion at Vector3 position with a radius
  878. local kaboom = {}
  879. local p = Instance.new("Part") --Sphere for the explosion
  880. p.Name = "Fire"
  881. p.FormFactor = "Symmetric"
  882. p.CanCollide = false
  883. p.Anchored = true
  884. p.Size = Vector3.new(1,1,1)
  885. p.TopSurface = "Smooth"
  886. p.BottomSurface = "Smooth"
  887. local m = Instance.new("SpecialMesh",p)
  888. m.MeshType = "Sphere"
  889. m.Scale = Vector3.new(1,1,1)
  890. for i = 1, 3 do --Creates 3 spheres with different colors/transparency for the explosion
  891. local c = p:clone()
  892. c.Parent = workspace
  893. game:GetService("Debris"):AddItem(c,15)
  894. c.CFrame = CFrame.new(pos)
  895. table.insert(kaboom,1,c)
  896. if i == 1 then
  897. c.BrickColor = BrickColor.new("Bright red")
  898. c.Transparency = 0.45
  899. elseif i == 2 then
  900. c.BrickColor = BrickColor.new("Black")
  901. c.Transparency = 0.5
  902. else
  903. c.BrickColor = BrickColor.new("Bright yellow")
  904. c.Transparency = 0.8
  905. end
  906. end
  907. coroutine.resume(coroutine.create(function()
  908. for i = 1,radius/0.55 do
  909. for _,v in pairs(kaboom) do --Increases explosion parts size and transparency slowly
  910. local size = (1-v.Transparency)
  911. v.Mesh.Scale = v.Mesh.Scale + Vector3.new(size,size,size)
  912. end
  913. wait(0.01)
  914. local checkSize = kaboom[3].Mesh.Scale.X --Radius of taking damage
  915. for _,v in pairs(game.Players:GetChildren()) do --Checking for damage
  916. local h = v.Character:findFirstChild("Humanoid")
  917. local t = v.Character:findFirstChild("Torso")
  918. if h and t and (t.Position-pos).magnitude <= checkSize then
  919. h:TakeDamage(stats["BeamDamage"].Value)
  920. h.PlatformStand = true
  921. t.Velocity = CFrame.new(pos,t.Position).lookVector*stats["BeamForce"].Value
  922. t.RotVelocity = CFrame.new(pos,t.Position).lookVector*stats["BeamForce"].Value
  923. end
  924. end
  925. end
  926. for _,v in pairs(kaboom) do --Destroy the explosion parts
  927. v:Destroy()
  928. end
  929. end))
  930. end
  931.  
  932. function ShootBeam(pos) --Shoots a laser beam from Right Hand (pos is a Vector3 where the laser starts)
  933. local p = Instance.new("Part",workspace) --Fancy summoning circle for decoration
  934. p.Name = "Circle"
  935. p.FormFactor = "Symmetric"
  936. p.Size = Vector3.new(6,1,6)
  937. p.TopSurface = "Smooth"
  938. p.BottomSurface = "Smooth"
  939. p.Transparency = 1
  940. p.Anchored = true
  941. p.CanCollide = false
  942. local d = Instance.new("Decal",p)
  943. d.Face = "Top"
  944. d.Texture = "http://www.roblox.com/asset/?id=98270704"
  945. local d2 = Instance.new("Decal",p)
  946. d2.Face = "Bottom"
  947. d2.Texture = "http://www.roblox.com/asset/?id=98270704"
  948. game:GetService("Debris"):AddItem(p,10)
  949. local dir = (CFrame.new(Golem.Head.Position,pos)*CFrame.Angles(rad(random(-30,-5)),0,0)).lookVector
  950. --Gets the desired direction the Golem will shoot at
  951. local hit,newpos = Raycast(pos,dir,model)
  952. if newpos then
  953. dir = CFrame.new(pos,newpos).lookVector --Updates direction if a barrier is in the way
  954. end
  955. coroutine.resume(coroutine.create(function()
  956. p.CFrame = CFrame.new(pos+dir*3,pos+dir*999)*CFrame.Angles(rad(90),0,0) --Spins circle
  957. local beam = DrawLine(p.Position,p.Position+dir*stats["BeamLength"].Value,15,BrickColor.new("Bright red"),1)
  958. --beam is the actual beam that will be shot out
  959. if newpos then
  960. local startTime = tick()
  961. repeat --Loop that spins circle and moves the beam forward until it is near 'nearpos' or 10 seconds passed
  962. p.CFrame = p.CFrame * CFrame.Angles(0,rad(8),0)
  963. beam.CFrame = CFrame.new(beam.Position+dir*stats["BeamSpeed"].Value,beam.Position+dir*999)
  964. wait(0.01)
  965. until (beam.Position-newpos).magnitude <= stats["BeamSpeed"].Value/2 or (tick()-startTime) >= 10
  966. local boomScale = stats["ExplosionRadius"].Value
  967. Explosion(newpos,boomScale) --Creates an explosion where beam hit
  968. local targets = PartsHit(newpos,Vector3.new(boomScale,boomScale,boomScale),model,100)
  969. --calculates all targets near explosion via Region3
  970. local enemies = {}
  971. for _,v in pairs(targets) do --Filters targets, since the table 'targets' might have multiple parts of the same character
  972. if v.Parent:findFirstChild("Humanoid") and v.Parent.Humanoid.Health > 0 and v.Parent.Name ~= "Golem" then
  973. local check = false
  974. for _,c in pairs(enemies) do
  975. if c == v.Parent then
  976. check = true
  977. end
  978. end
  979. if not check then
  980. table.insert(enemies,1,v.Parent)
  981. end
  982. end
  983. end
  984. for _,v in pairs(enemies) do --Deals damage to everybody hit by explosion
  985. v.Humanoid:TakeDamage(stats["BeamDamage"].Value)
  986. v.Humanoid.PlatformStand = true
  987. v.Torso.Velocity = CFrame.new(newpos,v.Torso.Position).lookVector*stats["BeamForce"].Value
  988. v.Torso.RotVelocity = CFrame.new(newpos,v.Torso.Position).lookVector*stats["BeamForce"].Value
  989. end
  990. end
  991. beam:Destroy()
  992. for i = 0,1.1,0.06 do --Fancy summoning circle disappears
  993. p.CFrame = p.CFrame * CFrame.Angles(0,rad(8),0)
  994. for _,v in pairs(p:GetChildren()) do
  995. if v.className == "Decal" then
  996. v.Transparency = i
  997. end
  998. end
  999. wait(0.01)
  1000. end
  1001. p:Destroy()
  1002. end))
  1003. end
  1004.  
  1005. function ShootProjectile(pos,size,radius,s,color) --Shoots a projectile (particle) at desired position
  1006. --pos is a Vector3, where the projectile goes
  1007. --size is how large the projectile (sphere) is
  1008. --radius is how far away from pos the projectile spawns
  1009. --s is speed of the projectile
  1010. --color is a BrickColor value
  1011. size = size or 0.1
  1012. coroutine.resume(coroutine.create(function()
  1013. local p = Instance.new("Part",workspace) --creates projectile
  1014. p.Name = "Energy"
  1015. p.BrickColor = color
  1016. p.FormFactor = "Symmetric"
  1017. p.Size = Vector3.new(1,1,1)
  1018. p.TopSurface = "Smooth"
  1019. p.Anchored = true
  1020. p.BottomSurface = "Smooth"
  1021. p.CanCollide = false
  1022. p.CFrame = CFrame.new(pos+Vector3.new(random(-radius,radius),random(-radius,radius),random(-radius,radius)))
  1023. local m = Instance.new("SpecialMesh",p)
  1024. m.MeshType = "Sphere"
  1025. m.Scale = Vector3.new(size,size,size)
  1026. local dir = CFrame.new(p.Position,pos).lookVector --direction projectile moves
  1027. repeat --moves projectile
  1028. p.CFrame = CFrame.new(p.Position+dir*s)
  1029. wait(0.02)
  1030. until (p.Position-pos).magnitude <= radius/2+s
  1031. p:Destroy()
  1032. end))
  1033. end
  1034.  
  1035. function ChargeEnergy(offset,color,radius,inc,particleS,id) --Creates the illusion that a ball of energy is getting bigger
  1036. --offset is how far away the energy is from the Golem's hand (CFrame value)
  1037. --color is the color of the energy
  1038. --radius is how big the energy ball will grow
  1039. --inc is how fast the energy ball grows
  1040. --particleS is the size of the particles created
  1041. --id is the sound played during this
  1042.  
  1043. local p = Instance.new("Part") --Creates the energy ball
  1044. p.Name = "Energy"
  1045. p.FormFactor = "Symmetric"
  1046. p.Size = Vector3.new(1,1,1)
  1047. p.TopSurface = "Smooth"
  1048. p.BottomSurface = "Smooth"
  1049. p.Parent = model
  1050. p.CanCollide = false
  1051. p.BrickColor = color
  1052. p.CFrame = Golem.RightArm.Hand.CFrame*offset
  1053. local m = Instance.new("SpecialMesh",p)
  1054. m.MeshType = "Sphere"
  1055. m.Scale = Vector3.new(0.1,0.1,0.1)
  1056. p:BreakJoints()
  1057. local w = Instance.new("Weld") --Weld sphere to hand
  1058. w.Name = "ChargeWeld"
  1059. w.Part0 = Golem.RightArm.Hand
  1060. w.Part1 = p
  1061. w.C0 = offset
  1062. w.Parent = Golem.RightArm.Hand
  1063. if id then --plays sound
  1064. local s = Instance.new("Sound",p)
  1065. s.SoundId = "http://www.roblox.com/asset?id="..id
  1066. s.Pitch = .3
  1067. s.Volume = 1
  1068. s:play()
  1069. s:stop()
  1070. s:play()
  1071. end
  1072. repeat --Shoots projectiles/particles at the ball, while the ball grows in size
  1073. ShootProjectile(p.Position,particleS,m.Scale.X+2,0.6,color)
  1074. m.Scale = m.Scale + Vector3.new(inc,inc,inc)
  1075. wait(0.02)
  1076. until m.Scale.X >= radius
  1077. return p
  1078. end
  1079.  
  1080. function ShootBullet() --Shoots a bullet into the sky, and then returns it for later use
  1081. local accuracy = stats["GunSpread"].Value
  1082. local x = random(-accuracy*1000,accuracy*1000)
  1083. local y = random(-accuracy*1000,accuracy*1000)
  1084. local z = random(-accuracy*1000,accuracy*1000)
  1085. local startPos = Golem.LeftArm.Lower.CFrame*CFrame.new(0,-3.5,-0.75) --Where the bullet starts
  1086. local endPos = startPos*CFrame.new(x,-1000+y,z) --Where the bullet is going to go
  1087. local hit,pos = Raycast(startPos.p,(endPos.p-startPos.p).unit,model)
  1088. local dir = CFrame.new(startPos.p,pos).lookVector
  1089. local bullet = DrawLine(startPos.p,startPos.p+dir*3,5,BrickColor.new("Bright yellow"),0.1) --Creates the bullet
  1090. local maxDist = random(100,130) --How far the bullet travels
  1091. coroutine.resume(coroutine.create(function()
  1092. repeat --Moves the bullet until it goes far enough
  1093. bullet.CFrame = CFrame.new(bullet.Position+dir*stats["GunFlySpeed"].Value,bullet.Position+dir*2)
  1094. wait(0.01)
  1095. until (bullet.Position-pos).magnitude <= stats["GunFlySpeed"].Value/2 or (bullet.Position-startPos.p).magnitude >= maxDist
  1096. bullet.Transparency = 1
  1097. end))
  1098. return bullet --Bullet is now transparent and is returned for future use
  1099. end
  1100.  
  1101. function Shockwave(pos,damage,force,radius,height,inc) --Creates a shockwave at position
  1102. --pos is the origin of the shockwave (Vector3)
  1103. --damage is how much damage the shockwave will do
  1104. --force is how much force the shockwave will hit players with
  1105. --height is how high the shockwave is
  1106. --inc is how fast the shockwave increases
  1107.  
  1108. inc = inc or 1
  1109. local shock = Instance.new("Part",workspace) --main shockwave part
  1110. shock.FormFactor = "Symmetric"
  1111. shock.Anchored = true
  1112. shock.CanCollide = false
  1113. shock.Size = Vector3.new(1,1,1)
  1114. shock.CFrame = CFrame.new(pos)
  1115. shock.BrickColor = BrickColor.new("White")
  1116. local mesh = Instance.new("SpecialMesh",shock)
  1117. mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
  1118. game:GetService("Debris"):AddItem(shock,10)
  1119. coroutine.resume(coroutine.create(function()
  1120. local i = 2
  1121. repeat --Increases the shockwave size while calculating damage against players
  1122. i = i + inc
  1123. mesh.Scale = Vector3.new(i,height,i)
  1124. for _,v in pairs(game.Players:GetChildren()) do
  1125. local h = v.Character:FindFirstChild("Humanoid")
  1126. local t = v.Character:FindFirstChild("Torso")
  1127. if h and t and (t.Position-pos).magnitude <= i*1.2 then
  1128. h:TakeDamage(damage)
  1129. h.PlatformStand = true
  1130. t.Velocity = CFrame.new(pos,t.Position).lookVector*force
  1131. t.RotVelocity = CFrame.new(pos,t.Position).lookVector*force
  1132. end
  1133. end
  1134. wait(0.02)
  1135. until mesh.Scale.X >= radius
  1136. shock:Destroy()
  1137. end))
  1138. end
  1139.  
  1140. function MoveOne() --The first move, shoots a laser beam that explodes upon hitting the target
  1141. wait(1)
  1142. for i = 1, 18 do --animation
  1143. rs.C0 = rs.C0 * CFrame.Angles(0,0,rad(2.5))
  1144. re.C0 = re.C0 * CFrame.Angles(0,0,rad(5))
  1145. wait(0.01)
  1146. end
  1147. wait(1)
  1148. local energy = ChargeEnergy(CFrame.new(0,3,0),BrickColor.new("Bright red"),2.5,0.05)
  1149. --energy is a ball that showcases where the beams start
  1150. wait(1)
  1151. for i = 1, 18 do
  1152. re.C0 = re.C0 * CFrame.Angles(0,0,rad(-1.5))
  1153. wait(0.01)
  1154. end
  1155. for i = 1, 55 do
  1156. rs.C0 = rs.C0 * CFrame.Angles(rad(2),0,0)
  1157. if i%7 == 0 then --every 7 animation frames it will shoot a laser beam
  1158. Golem.RightArm.Hand.FireLaser:Play()
  1159. ShootBeam(energy.Position)
  1160. end
  1161. wait(0.01)
  1162. end
  1163. wait(1)
  1164. for i = 0,1.1,0.08 do --energy ball fades away
  1165. energy.Transparency = i
  1166. wait(0.01)
  1167. end
  1168. energy:Destroy()
  1169. for i = 1, 30 do --restore animation
  1170. re.C0 = re.C0 * CFrame.Angles(0,0,rad(-63)/30)
  1171. rs.C0 = rs.C0 * CFrame.Angles(rad(-110)/30,0,0)
  1172. wait(0.01)
  1173. end
  1174. for i = 1, 9 do
  1175. rs.C0 = rs.C0 * CFrame.Angles(0,0,rad(-5))
  1176. wait(0.01)
  1177. end
  1178. end
  1179.  
  1180. function MoveTwo() --Second move, shoots bullets into the air, that then fall down onto players
  1181. local leD = CFrame.new(0,-1,0)*CFrame.Angles(rad(20),0,rad(50))
  1182. local lsD = CFrame.new(-2.8,1.25,0.25)--*CFrame.Angles(0,0,rad(-50))
  1183. for i = 0, 14 do --animation
  1184. ls.C0 = lsD * CFrame.Angles(rad(175)*(i/15),rad(0)*(i/15),rad(-50))
  1185. --le.C0 = leD * CFrame.Angles(rad(-20)*(i/15),0,rad(-50)*(i/15))
  1186. wait(0.07)
  1187. end
  1188. Golem.Torso.GunWindUp:play() --plays a minigun start up sound
  1189. wait(0.5)
  1190. local bullets = {}
  1191. for i = 1, game.Players.NumPlayers*30 do --number of bullets shot out
  1192. local bullet = ShootBullet() --creates the bullet
  1193. table.insert(bullets,#bullets+1,bullet)
  1194. if i%3==0 then --every 3 bullets it plays the gun shooting sound
  1195. Golem.Torso.GunShoot:play()
  1196. end
  1197. wait(0.02)
  1198. end
  1199. Golem.Torso.GunStop:play() --plays a minigun cool down sound
  1200. for i = 14, 0, -1 do
  1201. --ls.C0 = ls.C0 * CFrame.Angles(rad(-70)/15,rad(-125)/15,0)
  1202. --le.C0 = le.C0 * CFrame.Angles(rad(20)/15,0,rad(50)/15)
  1203. ls.C0 = lsD * CFrame.Angles(rad(175)*(i/15),rad(0)*(i/15),rad(-50))
  1204. --le.C0 = leD * CFrame.Angles(rad(-20)*(i/15),0,rad(-50)*(i/15))
  1205. wait(0.07)
  1206. end
  1207. wait(1)
  1208. for _,v in pairs(bullets) do --loop that causes all the bullets to fall down at players in area
  1209. v.Transparency = 0
  1210. local startPos = v.CFrame
  1211. coroutine.resume(coroutine.create(function()
  1212. wait(random())
  1213. local x = random(-10,10)
  1214. local z = random(-10,10)
  1215. local players = GetPlayersInArea(300) --list of all players within 300 studs
  1216. local player --the player the bullet will fall towards
  1217. local dir --direction the bullet will fall down
  1218. if #players >= 1 then
  1219. player = players[random(1,#players)] --chooses random player to shoot at
  1220. end
  1221. if player then
  1222. local pos = player.Character["Torso"].Position
  1223. dir = CFrame.new(v.Position,pos+Vector3.new(x/2,random(-5,5),z/2)).lookVector
  1224. else
  1225. dir = CFrame.new(v.Position,v.Position-Vector3.new(x,50,z)).lookVector
  1226. end
  1227. local hit = false
  1228. local speedMult = random(15,30)/10 --speed bullets will fall at
  1229. repeat --Animates the falling bullets and damages players
  1230. v.CFrame = CFrame.new(v.Position+dir*stats["GunFlySpeed"].Value*speedMult,v.Position+dir*2)
  1231. for _,p in pairs(game.Players:GetChildren()) do
  1232. local h = p.Character:findFirstChild("Humanoid")
  1233. if h and h.Health > 0 and (p.Character["Torso"].Position-v.Position).magnitude <= 9 then
  1234. h:takeDamage(stats["GunDamage"].Value)
  1235. h.Sit = true
  1236. hit = true
  1237. end
  1238. end
  1239. wait(0.03)
  1240. until (v.Position-startPos.p).magnitude >= 300 or hit or v.Position.Y <= Golem.LeftLeg.Foot.Position.Y
  1241. if not hit and random() > 0.75 then --If the bullet didn't hit anything, then 25% it'll create a dust cloud
  1242. v.CFrame = CFrame.new(Vector3.new(v.Position.X,Golem.LeftLeg.Foot.Position.Y,v.Position.Z))
  1243. local p = Instance.new("Part",workspace) --Dust cloud
  1244. game:GetService("Debris"):AddItem(p,2)
  1245. p.Size = Vector3.new(1,1,1)
  1246. p.FormFactor = "Symmetric"
  1247. p.CanCollide = false
  1248. p.Anchored = true
  1249. p.CFrame = CFrame.new(v.Position)
  1250. p.BrickColor = BrickColor.new("Brown")
  1251. local m = Instance.new("SpecialMesh",p)
  1252. m.MeshId = "http://www.roblox.com/asset/?id=1095708"
  1253. v:Destroy()
  1254. for i = 2, 3, 0.1 do --increases the smoke size, but lowers the transparency
  1255. m.Scale = Vector3.new(i,i,i)
  1256. p.Transparency = 1-(3-i)
  1257. wait(0.01)
  1258. end
  1259. p:Destroy()
  1260. else
  1261. v:Destroy()
  1262. end
  1263. end))
  1264. end
  1265. end
  1266.  
  1267. function MoveThree() --Magna-Bomb, creates a giant 'black hole' that crashes into the ground and creates a shockwave
  1268. local rsWelds = {} --stores animation movements to play back later in reverse
  1269. local lsWelds = {}
  1270. for i = 1, 18 do --animation
  1271. table.insert(rsWelds,1,rs.C0)
  1272. table.insert(lsWelds,1,ls.C0)
  1273. rh.C0 = rh.C0 * CFrame.Angles(rad(90)/18,0,0)
  1274. rk.C0 = rk.C0 * CFrame.Angles(rad(-90)/18,0,0)
  1275. lk.C0 = lk.C0 * CFrame.Angles(rad(-108)/18,0,0)
  1276. rs.C0 = rs.C0 * CFrame.Angles(rad(115)/18,rad(-72)/18,rad(-18)/18)
  1277. ls.C0 = ls.C0 * CFrame.Angles(rad(115)/18,rad(72)/18,rad(18)/18)
  1278. wait(0.01)
  1279. end
  1280. wait(0.1)
  1281. local radius = stats["MBSize"].Value --radius of the 'black hole'
  1282. local energy = ChargeEnergy(CFrame.new(16.126,25,-5),BrickColor.new("Black"),radius,0.5,0.3,"2233910")
  1283. --'energy' is the black hole itself, after it finishes charging
  1284. wait(2.5)
  1285. if Golem.RightArm.Hand:findFirstChild("ChargeWeld") then
  1286. Golem.RightArm.Hand.ChargeWeld:Destroy()
  1287. end
  1288. energy.Anchored = true
  1289. coroutine.resume(coroutine.create(function()
  1290. local cf = CFrame.new(Golem.Torso.Position,energy.Position)
  1291. local dir = (cf*CFrame.Angles(rad(-130),0,0)).lookVector
  1292. local speed = stats["MBSpeed"].Value
  1293. --local startTime = tick()
  1294. repeat --Moves the 'black hole' towards the ground
  1295. energy.CFrame = CFrame.new(energy.Position+dir*speed,energy.Position+dir*999)
  1296. wait(0.01)
  1297. until #PartsHit(energy.Position,Vector3.new(5,5,5),model) > 0 --or (tick()-startTime) >= #seconds
  1298. local p = Instance.new("Part",model) --source of the sound that plays next
  1299. p.Anchored = true
  1300. p.Transparency = 1
  1301. p.CanCollide = false
  1302. p.CFrame = energy.CFrame
  1303. local s = Instance.new("Sound",p) --plays ball crashing sound
  1304. s.SoundId = "http://www.roblox.com/asset?id=2101159"
  1305. s.Pitch = 2
  1306. s.Volume = 1
  1307. s:play()
  1308. s:stop()
  1309. s:play()
  1310. game:GetService("Debris"):AddItem(p,6)
  1311. Shockwave(energy.Position+Vector3.new(0,stats["MBSpeed"].Value,0),stats["MBShockwaveDamage"].Value,stats["MBShockwaveForce"].Value,stats["MBShockwaveRadius"].Value,12,4)
  1312. --Spawns a shockwave
  1313. energy:Destroy()
  1314. end))
  1315. for i = 1, 18 do --reverse animations back to normal
  1316. rh.C0 = rh.C0 * CFrame.Angles(rad(-90)/18,0,0)
  1317. rk.C0 = rk.C0 * CFrame.Angles(rad(90)/18,0,0)
  1318. lk.C0 = lk.C0 * CFrame.Angles(rad(108)/18,0,0)
  1319. --rs.C0 = rs.C0 * CFrame.Angles(rad(-115)/18,rad(72)/18,rad(18)/18)
  1320. --ls.C0 = ls.C0 * CFrame.Angles(rad(-115)/18,rad(-72)/18,rad(-18)/18)
  1321. rs.C0 = rsWelds[i]
  1322. ls.C0 = lsWelds[i]
  1323. wait(0.01)
  1324. end
  1325. end
  1326.  
  1327. function MoveFour() --Kicks the player (think soccer kick)
  1328. coroutine.resume(coroutine.create(function()
  1329. for i = 1, 6 do --damages all targets near the foot every 0.05 seconds
  1330. local targets = PartsHit(Golem.RightLeg.Foot.Position,Vector3.new(4,4,4),model,100)
  1331. local enemies = {}
  1332. for _,v in pairs(targets) do
  1333. if v.Parent:findFirstChild("Humanoid") and v.Parent.Humanoid.Health > 0 then
  1334. local check = false
  1335. for _,c in pairs(enemies) do
  1336. if c == v.Parent then
  1337. check = true
  1338. end
  1339. end
  1340. if not check then
  1341. table.insert(enemies,1,v.Parent)
  1342. end
  1343. end
  1344. end
  1345. for _,v in pairs(enemies) do
  1346. v.Humanoid:takeDamage(stats["NormalKickDamage"].Value)
  1347. v.Humanoid.Sit = true
  1348. v.Torso.Velocity = CFrame.new(Golem.RightLeg.Foot.Position,v.Torso.Position).lookVector*stats["NormalKickForce"].Value
  1349. v.Torso.RotVelocity = CFrame.new(Golem.RightLeg.Foot.Position,v.Torso.Position).lookVector*stats["MBShockwaveForce"].Value
  1350. end
  1351. wait(0.05)
  1352. end
  1353. end))
  1354. for i = 1, 10 do --Kicking animation for the Golem
  1355. rs.C0 = rs.C0 * CFrame.Angles(rad(15)/10,rad(-10)/10,0)
  1356. re.C0 = re.C0 * CFrame.Angles(rad(40)/10,0,0)
  1357. ls.C0 = ls.C0 * CFrame.Angles(rad(-25)/10,0,0)
  1358. rh.C0 = rh.C0 * CFrame.Angles(rad(90)/10,0,0)
  1359. rk.C0 = rk.C0 * CFrame.Angles(rad(-70)/10,0,0)
  1360. lh.C0 = lh.C0 * CFrame.Angles(rad(10)/10,0,0)
  1361. lk.C0 = lk.C0 * CFrame.Angles(rad(-20)/10,0,0)
  1362. wait(0.01)
  1363. end
  1364. for i = 1, 10 do
  1365. rs.C0 = rs.C0 * CFrame.Angles(rad(25)/10,rad(-10)/10,0)
  1366. re.C0 = re.C0 * CFrame.Angles(rad(20)/10,0,0)
  1367. ls.C0 = ls.C0 * CFrame.Angles(rad(-25)/10,0,0)
  1368. rk.C0 = rk.C0 * CFrame.Angles(rad(70)/10,0,0)
  1369. wait(0.01)
  1370. end
  1371. wait(0.2)
  1372. for i = 1, 10 do
  1373. rs.C0 = rs.C0 * CFrame.Angles(rad(-40)/10,rad(20)/10,0)
  1374. re.C0 = re.C0 * CFrame.Angles(rad(-60)/10,0,0)
  1375. ls.C0 = ls.C0 * CFrame.Angles(rad(50)/10,0,0)
  1376. rh.C0 = rh.C0 * CFrame.Angles(-rad(90)/10,0,0)
  1377. lh.C0 = lh.C0 * CFrame.Angles(rad(-10)/10,0,0)
  1378. lk.C0 = lk.C0 * CFrame.Angles(rad(20)/10,0,0)
  1379. wait(0.01)
  1380. end
  1381. factor1 = 0.25*speed
  1382. factor2 = 1*speed
  1383. Run(-1)
  1384. Run(1)
  1385. end
  1386.  
  1387. function Stomp() --The default attack, the golem just stomps on the ground, causing a small shockwave
  1388. local num = random()
  1389. local foot,hip,knee
  1390. if num >= 0.5 then
  1391. foot = Golem.RightLeg.Foot
  1392. hip = rh
  1393. knee = rk
  1394. else
  1395. foot = Golem.LeftLeg.Foot
  1396. hip = lh
  1397. knee = lk
  1398. end
  1399. for i = 1, 20 do
  1400. hip.C0 = hip.C0 * CFrame.Angles(rad(100)/20,0,0)
  1401. knee.C0 = knee.C0 * CFrame.Angles(rad(-100)/20,0,0)
  1402. Golem.Torso.CFrame = Golem.Torso.CFrame * CFrame.new(0,0,-0.025)
  1403. wait(0.01)
  1404. end
  1405. for i = 1, 10 do
  1406. hip.C0 = hip.C0 * CFrame.Angles(rad(-100)/10,0,0)
  1407. knee.C0 = knee.C0 * CFrame.Angles(rad(100)/10,0,0)
  1408. wait(0.01)
  1409. end
  1410. Golem.RightLeg.Foot.Stomp.Volume = 0.4
  1411. Golem.RightLeg.Foot.Stomp:play()
  1412. Shockwave(foot.Position,stats["BaseDamage"].Value,0,9,5,0.5)
  1413. if num >= 0.5 then
  1414. factor1 = 0.25*speed
  1415. factor2 = 1*speed
  1416. Run(-1)
  1417. Run(1)
  1418. end
  1419. end
  1420.  
  1421. function GetClosestPlayer() --Finds the closest player within a table of players
  1422. local cdist = 10000 --Closest distance so far
  1423. local closest = nil --Closest player
  1424. for _,v in pairs(game.Players:GetChildren()) do
  1425. if v.Character and v.Character.Humanoid.Health > 0 then
  1426. local dist = v:DistanceFromCharacter(Golem.Torso.Position)
  1427. if dist < cdist then
  1428. cdist = dist
  1429. closest = v
  1430. end
  1431. end
  1432. end
  1433. return closest,cdist
  1434. end
  1435.  
  1436. function GetPlayersInArea(radius) --Gets all players within a certain range from the Golem's torso
  1437. --radius determines what range you want to find players within
  1438. local players = {}
  1439. for _,v in pairs(game.Players:GetChildren()) do
  1440. if v.Character and v.Character.Humanoid.Health > 0 then
  1441. local dist = v:DistanceFromCharacter(Golem.Torso.Position)
  1442. if dist <= radius then
  1443. table.insert(players,1,v)
  1444. end
  1445. end
  1446. end
  1447. return players
  1448. end
  1449.  
  1450. function SelectAttack() --Selects the attack to do
  1451. --Possibilities: MoveOne, MoveTwo, MoveThree, MoveFour,
  1452. local numP = GetPlayersInArea(10)
  1453. if #numP > 0 then
  1454. return 4
  1455. else
  1456. local player,dist = GetClosestPlayer()
  1457. if not player then
  1458. return 0
  1459. end
  1460. if dist <= 60 then
  1461. local winner = nil
  1462. repeat
  1463. local c1 = random(1,dist*2)
  1464. local c2 = random(1,(60-dist)*2+10)
  1465. local c3 = random(1,(100-dist)*2+10)
  1466. if c1 == 1 then
  1467. winner = 3
  1468. elseif c2 == 1 then
  1469. winner = 1
  1470. elseif c3 == 1 then
  1471. winner = 2
  1472. end
  1473. wait(0.01)
  1474. until winner
  1475. return winner
  1476. elseif dist <= 90 then
  1477. return 2
  1478. end
  1479. end
  1480. return 0
  1481. end
  1482.  
  1483. Golem.Humanoid.Died:connect(function()
  1484. for _,v in pairs(model:GetChildren()) do
  1485. if v.className == "Part" then
  1486. v.Anchored = true
  1487. end
  1488. end
  1489. Golem.Head.Death:Play()
  1490. wait(0.1)
  1491. Golem.Head.Death:Stop()
  1492. Golem.Head.Death:Play()
  1493. Golem.RightArm.Hand.Anchored = false
  1494. Golem.RightArm.Upper.Anchored = false
  1495. Golem.RightArm.Lower.Anchored = false
  1496. Golem.RightArm.Elbow.Anchored = false
  1497. Golem.RightArm.Shoulder.Anchored = false
  1498. wait(1.5)
  1499. Golem.LeftArm.Hand.Anchored = false
  1500. Golem.LeftArm.Upper.Anchored = false
  1501. Golem.LeftArm.Lower.Anchored = false
  1502. Golem.LeftArm.Elbow.Anchored = false
  1503. Golem.LeftArm.Shoulder.Anchored = false
  1504. wait(1)
  1505. Golem.RightLeg.Foot.Anchored = false
  1506. Golem.RightLeg.Upper.Anchored = false
  1507. Golem.RightLeg.Lower.Anchored = false
  1508. Golem.RightLeg.Knee.Anchored = false
  1509. Golem.RightLeg.Hip.Anchored = false
  1510. Golem.Head.Anchored = false
  1511. wait(0.3)
  1512. Golem.LeftLeg.Foot.Anchored = false
  1513. Golem.LeftLeg.Upper.Anchored = false
  1514. Golem.LeftLeg.Lower.Anchored = false
  1515. Golem.LeftLeg.Knee.Anchored = false
  1516. Golem.LeftLeg.Hip.Anchored = false
  1517. Golem.Torso.Anchored = false
  1518. script:Destroy()
  1519. end)
  1520.  
  1521. while wait(0.01) do
  1522. move = 0 --variable that decides what move will be committed
  1523. if random(1,100) <= 50 and tick()-cooldownStart >= cooldown then --50% chance of a move every second.
  1524. move = SelectAttack()
  1525. if move ~= 0 and GetClosestPlayer() then --if a special move is choosen, stops the Golem from walking
  1526. local t = GetClosestPlayer().Character.Torso
  1527. Golem.Humanoid:MoveTo(t.Position,t)
  1528. Golem.Humanoid.WalkSpeed = 0
  1529. wait(0.2)
  1530. Golem.Humanoid:MoveTo(Golem.Torso.Position,Golem.Torso)
  1531. end
  1532. end
  1533. if move == 1 then
  1534. MoveOne()
  1535. cooldownStart = tick()--resets the cooldown
  1536. cooldown = 4
  1537. elseif move == 2 then
  1538. MoveTwo()
  1539. cooldownStart = tick()
  1540. cooldown = 3
  1541. elseif move == 3 then
  1542. MoveThree()
  1543. cooldownStart = tick()
  1544. cooldown = 7
  1545. elseif move == 4 then
  1546. MoveFour()
  1547. cooldownStart = tick()
  1548. cooldown = 1
  1549. end
  1550. if move == 0 then
  1551. local num = #GetPlayersInArea(7)
  1552. if num > 0 then --if there is a player within 7 studs of the golem, it will stomp
  1553. Golem.Humanoid:MoveTo(Golem.Torso.Position,Golem.Torso)
  1554. Stomp()
  1555. else
  1556. local target,dist = GetClosestPlayer() --target player to walk towards
  1557. if target then
  1558. target = target.Character
  1559. if dist <= 80 then --walks at a normal speed towards player
  1560. Golem.Humanoid.WalkSpeed = stats["DefaultWalkSpeed"].Value
  1561. Golem.Humanoid:MoveTo(target.Torso.Position,target.Torso)
  1562. Golem.RightLeg.Foot.Stomp.Volume = 0.2
  1563. Golem.LeftLeg.Foot.Stomp.Volume = 0.2
  1564. speed = 1.4
  1565. else --sprints towards the player as fast as possible
  1566. Golem.Humanoid:MoveTo(target.Torso.Position,target.Torso)
  1567. Golem.RightLeg.Foot.Stomp.Volume = 0.5
  1568. Golem.LeftLeg.Foot.Stomp.Volume = 0.5
  1569. speed = 2.2
  1570. Golem.Humanoid.WalkSpeed = stats["RunSpeed"].Value
  1571. end
  1572. else --Stomping sound/speed
  1573. Golem.Humanoid:MoveTo(Golem.Torso.Position,Golem.Torso)
  1574. Golem.RightLeg.Foot.Stomp.Volume = 0
  1575. Golem.LeftLeg.Foot.Stomp.Volume = 0
  1576. speed = 0.2
  1577. end
  1578. if move == 0 then
  1579. factor1 = 1*speed --factor1 and factor2 determine the 'power' of the animation for each foot
  1580. factor2 = 0.1*speed
  1581. Run(1) --Golem will start running
  1582. Run(-1) --Reverses last animation
  1583. Golem.RightLeg.Foot.Stomp:play()
  1584. factor1 = 0.1*speed
  1585. factor2 = 1*speed
  1586. Run(-1)
  1587. Run(1)
  1588. Golem.LeftLeg.Foot.Stomp:play()
  1589. end
  1590. end
  1591. end
  1592. if Golem.Humanoid.Sit then --Makes sure the golem cannot sit
  1593. Golem.Humanoid.Sit = false
  1594. end
  1595. if Golem.Humanoid.PlatformStand then
  1596. Golem.Humanoid.PlatformStand = false
  1597. end
  1598. end
  1599.  
  1600. end))
  1601. BrickColorValue74.Name = "TEAM"
  1602. BrickColorValue74.Parent = Model0
  1603. BrickColorValue74.Value = BrickColor.new("Bright green")
  1604. for i,v in pairs(mas:GetChildren()) do
  1605. v.Parent = workspace
  1606. pcall(function() v:MakeJoints() end)
  1607. end
  1608. mas:Destroy()
  1609. for i,v in pairs(cors) do
  1610. spawn(function()
  1611. pcall(v)
  1612. end)
  1613. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement