Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Model0 = Instance.new("Model")
- Part1 = Instance.new("Part")
- CylinderMesh2 = Instance.new("CylinderMesh")
- Part3 = Instance.new("Part")
- SpecialMesh4 = Instance.new("SpecialMesh")
- Sound5 = Instance.new("Sound")
- Part6 = Instance.new("Part")
- SpecialMesh7 = Instance.new("SpecialMesh")
- Part8 = Instance.new("Part")
- CylinderMesh9 = Instance.new("CylinderMesh")
- Part10 = Instance.new("Part")
- SpecialMesh11 = Instance.new("SpecialMesh")
- Part12 = Instance.new("Part")
- SpecialMesh13 = Instance.new("SpecialMesh")
- Part14 = Instance.new("Part")
- CylinderMesh15 = Instance.new("CylinderMesh")
- Part16 = Instance.new("Part")
- SpecialMesh17 = Instance.new("SpecialMesh")
- Sound18 = Instance.new("Sound")
- Sound19 = Instance.new("Sound")
- Sound20 = Instance.new("Sound")
- Part21 = Instance.new("Part")
- SpecialMesh22 = Instance.new("SpecialMesh")
- Part23 = Instance.new("Part")
- SpecialMesh24 = Instance.new("SpecialMesh")
- Part25 = Instance.new("Part")
- CylinderMesh26 = Instance.new("CylinderMesh")
- Part27 = Instance.new("Part")
- SpecialMesh28 = Instance.new("SpecialMesh")
- Part29 = Instance.new("Part")
- SpecialMesh30 = Instance.new("SpecialMesh")
- Sound31 = Instance.new("Sound")
- Part32 = Instance.new("Part")
- CylinderMesh33 = Instance.new("CylinderMesh")
- Part34 = Instance.new("Part")
- CylinderMesh35 = Instance.new("CylinderMesh")
- Part36 = Instance.new("Part")
- SpecialMesh37 = Instance.new("SpecialMesh")
- Sound38 = Instance.new("Sound")
- Part39 = Instance.new("Part")
- SpecialMesh40 = Instance.new("SpecialMesh")
- Part41 = Instance.new("Part")
- SpecialMesh42 = Instance.new("SpecialMesh")
- Part43 = Instance.new("Part")
- CylinderMesh44 = Instance.new("CylinderMesh")
- Part45 = Instance.new("Part")
- CylinderMesh46 = Instance.new("CylinderMesh")
- Humanoid47 = Instance.new("Humanoid")
- Script48 = Instance.new("Script")
- Part49 = Instance.new("Part")
- SpecialMesh50 = Instance.new("SpecialMesh")
- Part51 = Instance.new("Part")
- SpecialMesh52 = Instance.new("SpecialMesh")
- Sound53 = Instance.new("Sound")
- Configuration54 = Instance.new("Configuration")
- IntValue55 = Instance.new("IntValue")
- IntValue56 = Instance.new("IntValue")
- IntValue57 = Instance.new("IntValue")
- IntValue58 = Instance.new("IntValue")
- IntValue59 = Instance.new("IntValue")
- IntValue60 = Instance.new("IntValue")
- NumberValue61 = Instance.new("NumberValue")
- IntValue62 = Instance.new("IntValue")
- IntValue63 = Instance.new("IntValue")
- IntValue64 = Instance.new("IntValue")
- IntValue65 = Instance.new("IntValue")
- IntValue66 = Instance.new("IntValue")
- IntValue67 = Instance.new("IntValue")
- IntValue68 = Instance.new("IntValue")
- IntValue69 = Instance.new("IntValue")
- IntValue70 = Instance.new("IntValue")
- IntValue71 = Instance.new("IntValue")
- IntValue72 = Instance.new("IntValue")
- Script73 = Instance.new("Script")
- BrickColorValue74 = Instance.new("BrickColorValue")
- Model0.Name = "Golem"
- Model0.Parent = mas
- Part1.Name = "LeftLowerLeg"
- Part1.Parent = Model0
- Part1.BrickColor = BrickColor.new("Black")
- Part1.Rotation = Vector3.new(-2.38999987, 89.3699951, 2.33999991)
- Part1.FormFactor = Enum.FormFactor.Symmetric
- Part1.Size = Vector3.new(1, 2, 1)
- 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)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part1.Position = Vector3.new(-1.099213, 2.03623009, 40.9988403)
- Part1.Orientation = Vector3.new(-0.0299999993, 89.3699951, -0.0399999991)
- Part1.Color = Color3.new(0.105882, 0.164706, 0.207843)
- CylinderMesh2.Parent = Part1
- CylinderMesh2.Scale = Vector3.new(0.800000012, 1, 0.800000012)
- CylinderMesh2.Scale = Vector3.new(0.800000012, 1, 0.800000012)
- Part3.Name = "LeftFoot"
- Part3.Parent = Model0
- Part3.BrickColor = BrickColor.new("Black")
- Part3.Rotation = Vector3.new(179.959991, 0.629999995, 179.970001)
- Part3.FormFactor = Enum.FormFactor.Symmetric
- Part3.Size = Vector3.new(1, 1, 1)
- 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)
- Part3.BottomSurface = Enum.SurfaceType.Smooth
- Part3.TopSurface = Enum.SurfaceType.Smooth
- Part3.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part3.Position = Vector3.new(-1.09855604, 0.536222994, 40.9999847)
- Part3.Orientation = Vector3.new(0.0399999991, 179.369995, -0.0299999993)
- Part3.Color = Color3.new(0.105882, 0.164706, 0.207843)
- SpecialMesh4.Parent = Part3
- SpecialMesh4.Scale = Vector3.new(3, 1, 2)
- SpecialMesh4.MeshType = Enum.MeshType.Torso
- SpecialMesh4.Scale = Vector3.new(3, 1, 2)
- Sound5.Name = "Stomp"
- Sound5.Parent = Part3
- Sound5.Pitch = 3
- Sound5.SoundId = "http://www.roblox.com/asset?id=11984254"
- Sound5.Volume = 1
- Part6.Name = "LeftKnee"
- Part6.Parent = Model0
- Part6.BrickColor = BrickColor.new("Black")
- Part6.Rotation = Vector3.new(-2.38999987, 89.3699951, 2.33999991)
- Part6.FormFactor = Enum.FormFactor.Symmetric
- Part6.Size = Vector3.new(1, 1, 1)
- 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)
- Part6.BottomSurface = Enum.SurfaceType.Smooth
- Part6.TopSurface = Enum.SurfaceType.Smooth
- Part6.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part6.Position = Vector3.new(-1.09989905, 3.53625488, 40.9976807)
- Part6.Orientation = Vector3.new(-0.0299999993, 89.3699951, -0.0399999991)
- Part6.Color = Color3.new(0.105882, 0.164706, 0.207843)
- SpecialMesh7.Parent = Part6
- SpecialMesh7.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
- SpecialMesh7.MeshType = Enum.MeshType.Sphere
- SpecialMesh7.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
- Part8.Name = "LeftUpperLeg"
- Part8.Parent = Model0
- Part8.BrickColor = BrickColor.new("Black")
- Part8.Rotation = Vector3.new(84.9399948, 82.7999954, -89.9499969)
- Part8.FormFactor = Enum.FormFactor.Symmetric
- Part8.Size = Vector3.new(1, 2, 1)
- 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)
- Part8.BottomSurface = Enum.SurfaceType.Smooth
- Part8.TopSurface = Enum.SurfaceType.Smooth
- Part8.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part8.Position = Vector3.new(-0.911864996, 5.01875877, 40.8678894)
- Part8.Orientation = Vector3.new(7.17000008, 89.3600006, -5.03999996)
- Part8.Color = Color3.new(0.105882, 0.164706, 0.207843)
- CylinderMesh9.Parent = Part8
- CylinderMesh9.Scale = Vector3.new(0.800000012, 1, 0.800000012)
- CylinderMesh9.Scale = Vector3.new(0.800000012, 1, 0.800000012)
- Part10.Name = "LeftHip"
- Part10.Parent = Model0
- Part10.BrickColor = BrickColor.new("Black")
- Part10.Rotation = Vector3.new(84.9399948, 82.7999954, -89.9499969)
- Part10.FormFactor = Enum.FormFactor.Symmetric
- Part10.Size = Vector3.new(1, 1, 1)
- 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)
- Part10.BottomSurface = Enum.SurfaceType.Smooth
- Part10.TopSurface = Enum.SurfaceType.Smooth
- Part10.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part10.Position = Vector3.new(-0.723755002, 6.50131893, 40.7381134)
- Part10.Orientation = Vector3.new(7.17000008, 89.3600006, -5.03999996)
- Part10.Color = Color3.new(0.105882, 0.164706, 0.207843)
- SpecialMesh11.Parent = Part10
- SpecialMesh11.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
- SpecialMesh11.MeshType = Enum.MeshType.Sphere
- SpecialMesh11.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
- Part12.Name = "LeftElbow"
- Part12.Parent = Model0
- Part12.BrickColor = BrickColor.new("Black")
- Part12.Rotation = Vector3.new(43.2799988, 65.1999969, -42.9899979)
- Part12.FormFactor = Enum.FormFactor.Symmetric
- Part12.Size = Vector3.new(1, 1, 1)
- 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)
- Part12.BottomSurface = Enum.SurfaceType.Smooth
- Part12.TopSurface = Enum.SurfaceType.Smooth
- Part12.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part12.Position = Vector3.new(-0.599731028, 8.67869377, 44.0670319)
- Part12.Orientation = Vector3.new(16.7099991, 71.409996, -2.47000003)
- Part12.Color = Color3.new(0.105882, 0.164706, 0.207843)
- SpecialMesh13.Parent = Part12
- SpecialMesh13.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
- SpecialMesh13.MeshType = Enum.MeshType.Sphere
- SpecialMesh13.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
- Part14.Name = "LeftUpperArm"
- Part14.Parent = Model0
- Part14.BrickColor = BrickColor.new("Black")
- Part14.Rotation = Vector3.new(39.9399986, 86.3899994, -89.9499969)
- Part14.FormFactor = Enum.FormFactor.Symmetric
- Part14.Size = Vector3.new(1, 1, 1)
- 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)
- Part14.BottomSurface = Enum.SurfaceType.Smooth
- Part14.TopSurface = Enum.SurfaceType.Smooth
- Part14.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part14.Position = Vector3.new(-0.536789, 9.32013607, 43.3025208)
- Part14.Orientation = Vector3.new(2.30999994, 87.2299957, -50.0599976)
- Part14.Color = Color3.new(0.105882, 0.164706, 0.207843)
- CylinderMesh15.Parent = Part14
- CylinderMesh15.Scale = Vector3.new(0.800000012, 1, 0.800000012)
- CylinderMesh15.Scale = Vector3.new(0.800000012, 1, 0.800000012)
- Part16.Name = "Torso"
- Part16.Parent = Model0
- Part16.BrickColor = BrickColor.new("Black")
- Part16.Rotation = Vector3.new(0, 90, 0)
- Part16.FormFactor = Enum.FormFactor.Symmetric
- Part16.Friction = 0
- Part16.Size = Vector3.new(6, 4, 1)
- 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)
- Part16.BottomSurface = Enum.SurfaceType.Smooth
- Part16.TopSurface = Enum.SurfaceType.Weld
- Part16.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part16.Position = Vector3.new(-0.723679006, 8.71128559, 39.7379608)
- Part16.Orientation = Vector3.new(0, 89.9899979, 0)
- Part16.Color = Color3.new(0.105882, 0.164706, 0.207843)
- SpecialMesh17.Parent = Part16
- SpecialMesh17.MeshId = "http://www.roblox.com/asset/?id=27120789"
- SpecialMesh17.Scale = Vector3.new(2.5, 2.5, 2)
- SpecialMesh17.MeshType = Enum.MeshType.FileMesh
- SpecialMesh17.Scale = Vector3.new(2.5, 2.5, 2)
- Sound18.Name = "GunWindUp"
- Sound18.Parent = Part16
- Sound18.SoundId = "http://roblox.com/asset/?id=2692844"
- Sound18.Volume = 1
- Sound19.Name = "GunShoot"
- Sound19.Parent = Part16
- Sound19.Pitch = 2
- Sound19.SoundId = "http://roblox.com/asset/?id=2692806"
- Sound19.Volume = 1
- Sound20.Name = "GunStop"
- Sound20.Parent = Part16
- Sound20.SoundId = "http://roblox.com/asset/?id=10209786"
- Sound20.Volume = 1
- Part21.Name = "RightHip"
- Part21.Parent = Model0
- Part21.BrickColor = BrickColor.new("Black")
- Part21.Rotation = Vector3.new(-84.7900009, 88.1999969, 89.7799988)
- Part21.FormFactor = Enum.FormFactor.Symmetric
- Part21.Size = Vector3.new(1, 1, 1)
- 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)
- Part21.BottomSurface = Enum.SurfaceType.Smooth
- Part21.TopSurface = Enum.SurfaceType.Smooth
- Part21.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part21.Position = Vector3.new(-0.723541021, 6.50116301, 38.7380524)
- Part21.Orientation = Vector3.new(-1.78999996, 89.8399963, 5)
- Part21.Color = Color3.new(0.105882, 0.164706, 0.207843)
- SpecialMesh22.Parent = Part21
- SpecialMesh22.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
- SpecialMesh22.MeshType = Enum.MeshType.Sphere
- SpecialMesh22.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
- Part23.Name = "LeftShoulder"
- Part23.Parent = Model0
- Part23.BrickColor = BrickColor.new("Black")
- Part23.Rotation = Vector3.new(39.9399986, 86.3899994, -89.9499969)
- Part23.FormFactor = Enum.FormFactor.Symmetric
- Part23.Size = Vector3.new(2, 2, 2)
- 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)
- Part23.BottomSurface = Enum.SurfaceType.Smooth
- Part23.TopSurface = Enum.SurfaceType.Smooth
- Part23.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part23.Position = Vector3.new(-0.473892003, 9.96160793, 42.5378876)
- Part23.Orientation = Vector3.new(2.30999994, 87.2299957, -50.0599976)
- Part23.Color = Color3.new(0.105882, 0.164706, 0.207843)
- SpecialMesh24.Parent = Part23
- SpecialMesh24.Scale = Vector3.new(1.25, 1.25, 1.25)
- SpecialMesh24.MeshType = Enum.MeshType.Sphere
- SpecialMesh24.Scale = Vector3.new(1.25, 1.25, 1.25)
- Part25.Name = "RightLowerLeg"
- Part25.Parent = Model0
- Part25.BrickColor = BrickColor.new("Black")
- Part25.Rotation = Vector3.new(-84.7900009, 88.1999969, 84.7799988)
- Part25.RotVelocity = Vector3.new(4.434355e-19, 1.25183769e-23, 4.55071656e-19)
- Part25.Velocity = Vector3.new(3.04825775e-18, -5.79360196e-19, -2.97029763e-18)
- Part25.FormFactor = Enum.FormFactor.Symmetric
- Part25.Size = Vector3.new(1, 2, 1)
- 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)
- Part25.BottomSurface = Enum.SurfaceType.Smooth
- Part25.TopSurface = Enum.SurfaceType.Smooth
- Part25.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part25.Position = Vector3.new(-0.582427979, 2.01467299, 38.4770966)
- Part25.Orientation = Vector3.new(-1.78999996, 89.8399963, 0)
- Part25.Color = Color3.new(0.105882, 0.164706, 0.207843)
- CylinderMesh26.Parent = Part25
- CylinderMesh26.Scale = Vector3.new(0.800000012, 1, 0.800000012)
- CylinderMesh26.Scale = Vector3.new(0.800000012, 1, 0.800000012)
- Part27.Name = "RightShoulder"
- Part27.Parent = Model0
- Part27.BrickColor = BrickColor.new("Black")
- Part27.Rotation = Vector3.new(-39.9199982, 86.4000015, 89.9199982)
- Part27.RotVelocity = Vector3.new(4.434355e-19, 1.25183769e-23, 4.55071656e-19)
- Part27.Velocity = Vector3.new(-5.68804544e-19, -1.35538744e-18, 5.54297502e-19)
- Part27.FormFactor = Enum.FormFactor.Symmetric
- Part27.Size = Vector3.new(2, 2, 2)
- 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)
- Part27.BottomSurface = Enum.SurfaceType.Smooth
- Part27.TopSurface = Enum.SurfaceType.Smooth
- Part27.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part27.Position = Vector3.new(-0.473266989, 9.96119404, 36.9378204)
- Part27.Orientation = Vector3.new(-2.30999994, 87.2299957, 50.0499992)
- Part27.Color = Color3.new(0.105882, 0.164706, 0.207843)
- SpecialMesh28.Parent = Part27
- SpecialMesh28.Scale = Vector3.new(1.25, 1.25, 1.25)
- SpecialMesh28.MeshType = Enum.MeshType.Sphere
- SpecialMesh28.Scale = Vector3.new(1.25, 1.25, 1.25)
- Part29.Name = "Head"
- Part29.Parent = Model0
- Part29.BrickColor = BrickColor.new("Really black")
- Part29.Rotation = Vector3.new(0, 90, 0)
- Part29.FormFactor = Enum.FormFactor.Symmetric
- Part29.Friction = 0
- Part29.Size = Vector3.new(4, 3, 2)
- 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)
- Part29.BottomSurface = Enum.SurfaceType.Smooth
- Part29.TopSurface = Enum.SurfaceType.Smooth
- Part29.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Part29.Position = Vector3.new(-0.423602521, 12.2112808, 39.7377319)
- Part29.Orientation = Vector3.new(0, 89.9899979, 0)
- Part29.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- SpecialMesh30.Parent = Part29
- SpecialMesh30.MeshId = "http://www.roblox.com/asset/?id=52489607"
- SpecialMesh30.Scale = Vector3.new(1.5, 1.5, 1.5)
- SpecialMesh30.TextureId = "http://www.roblox.com/asset/?id=52489666"
- SpecialMesh30.VertexColor = Vector3.new(0.300000012, 0.300000012, 0.300000012)
- SpecialMesh30.MeshType = Enum.MeshType.FileMesh
- SpecialMesh30.Scale = Vector3.new(1.5, 1.5, 1.5)
- Sound31.Name = "Death"
- Sound31.Parent = Part29
- Sound31.Pitch = 0.5
- Sound31.SoundId = "http://www.roblox.com/asset?id=69935389"
- Sound31.Volume = 0.69999998807907
- Part32.Name = "RightUpperArm"
- Part32.Parent = Model0
- Part32.BrickColor = BrickColor.new("Black")
- Part32.Rotation = Vector3.new(-39.9199982, 86.4000015, 89.9199982)
- Part32.RotVelocity = Vector3.new(4.434355e-19, 1.25183769e-23, 4.55071656e-19)
- Part32.Velocity = Vector3.new(-2.76630187e-19, -1.7169029e-18, 2.69603985e-19)
- Part32.FormFactor = Enum.FormFactor.Symmetric
- Part32.Size = Vector3.new(1, 1, 1)
- 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)
- Part32.BottomSurface = Enum.SurfaceType.Smooth
- Part32.TopSurface = Enum.SurfaceType.Smooth
- Part32.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part32.Position = Vector3.new(-0.410385013, 9.31960201, 36.1733398)
- Part32.Orientation = Vector3.new(-2.30999994, 87.2299957, 50.0499992)
- Part32.Color = Color3.new(0.105882, 0.164706, 0.207843)
- CylinderMesh33.Parent = Part32
- CylinderMesh33.Scale = Vector3.new(0.800000012, 1, 0.800000012)
- CylinderMesh33.Scale = Vector3.new(0.800000012, 1, 0.800000012)
- Part34.Name = "LeftLowerArm"
- Part34.Parent = Model0
- Part34.BrickColor = BrickColor.new("Black")
- Part34.Rotation = Vector3.new(43.2799988, 65.1999969, -42.9899979)
- Part34.RotVelocity = Vector3.new(4.434355e-19, 1.25183769e-23, 4.55071656e-19)
- Part34.Velocity = Vector3.new(8.90396133e-19, 2.05747674e-18, -8.67685476e-19)
- Part34.FormFactor = Enum.FormFactor.Symmetric
- Part34.Size = Vector3.new(1, 3, 1)
- 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)
- Part34.BottomSurface = Enum.SurfaceType.Smooth
- Part34.TopSurface = Enum.SurfaceType.Smooth
- Part34.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part34.Position = Vector3.new(-1.17175305, 6.76479578, 43.9655457)
- Part34.Orientation = Vector3.new(16.7099991, 71.409996, -2.47000003)
- Part34.Color = Color3.new(0.105882, 0.164706, 0.207843)
- CylinderMesh35.Parent = Part34
- CylinderMesh35.Scale = Vector3.new(0.800000012, 1, 0.800000012)
- CylinderMesh35.Scale = Vector3.new(0.800000012, 1, 0.800000012)
- Part36.Name = "RightFoot"
- Part36.Parent = Model0
- Part36.BrickColor = BrickColor.new("Black")
- Part36.Rotation = Vector3.new(180, 0.159999996, 178.209991)
- Part36.RotVelocity = Vector3.new(4.434355e-19, 1.25183769e-23, 4.55071656e-19)
- Part36.Velocity = Vector3.new(3.73083437e-18, -5.86003594e-19, -3.63542074e-18)
- Part36.FormFactor = Enum.FormFactor.Symmetric
- Part36.Size = Vector3.new(1, 1, 1)
- 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)
- Part36.BottomSurface = Enum.SurfaceType.Smooth
- Part36.TopSurface = Enum.SurfaceType.Smooth
- Part36.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part36.Position = Vector3.new(-0.535583019, 0.515412986, 38.4772644)
- Part36.Orientation = Vector3.new(0, 179.839996, -1.78999996)
- Part36.Color = Color3.new(0.105882, 0.164706, 0.207843)
- SpecialMesh37.Parent = Part36
- SpecialMesh37.Scale = Vector3.new(3, 1, 2)
- SpecialMesh37.MeshType = Enum.MeshType.Torso
- SpecialMesh37.Scale = Vector3.new(3, 1, 2)
- Sound38.Name = "Stomp"
- Sound38.Parent = Part36
- Sound38.Pitch = 3
- Sound38.SoundId = "http://www.roblox.com/asset?id=11984254"
- Sound38.Volume = 1
- Part39.Name = "RightElbow"
- Part39.Parent = Model0
- Part39.BrickColor = BrickColor.new("Black")
- Part39.Rotation = Vector3.new(145.209991, 74.6999969, -145.009995)
- Part39.RotVelocity = Vector3.new(4.434355e-19, 1.25183769e-23, 4.55071656e-19)
- Part39.Velocity = Vector3.new(1.55441713e-20, -2.07841826e-18, -1.50895321e-20)
- Part39.FormFactor = Enum.FormFactor.Symmetric
- Part39.Size = Vector3.new(1, 1, 1)
- 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)
- Part39.BottomSurface = Enum.SurfaceType.Smooth
- Part39.TopSurface = Enum.SurfaceType.Smooth
- Part39.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part39.Position = Vector3.new(-0.347564995, 8.67803001, 35.4088135)
- Part39.Orientation = Vector3.new(8.65999985, 102.659996, 1.15999997)
- Part39.Color = Color3.new(0.105882, 0.164706, 0.207843)
- SpecialMesh40.Parent = Part39
- SpecialMesh40.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
- SpecialMesh40.MeshType = Enum.MeshType.Sphere
- SpecialMesh40.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
- Part41.Name = "RightKnee"
- Part41.Parent = Model0
- Part41.BrickColor = BrickColor.new("Black")
- Part41.Rotation = Vector3.new(-84.7900009, 88.1999969, 84.7799988)
- Part41.RotVelocity = Vector3.new(4.434355e-19, 1.25183769e-23, 4.55071656e-19)
- Part41.Velocity = Vector3.new(2.36568113e-18, -5.72716798e-19, -2.30517473e-18)
- Part41.FormFactor = Enum.FormFactor.Symmetric
- Part41.Size = Vector3.new(1, 1, 1)
- 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)
- Part41.BottomSurface = Enum.SurfaceType.Smooth
- Part41.TopSurface = Enum.SurfaceType.Smooth
- Part41.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part41.Position = Vector3.new(-0.629393995, 3.51396704, 38.4769135)
- Part41.Orientation = Vector3.new(-1.78999996, 89.8399963, 0)
- Part41.Color = Color3.new(0.105882, 0.164706, 0.207843)
- SpecialMesh42.Parent = Part41
- SpecialMesh42.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
- SpecialMesh42.MeshType = Enum.MeshType.Sphere
- SpecialMesh42.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
- Part43.Name = "RightUpperLeg"
- Part43.Parent = Model0
- Part43.BrickColor = BrickColor.new("Black")
- Part43.Rotation = Vector3.new(-84.7900009, 88.1999969, 89.7799988)
- Part43.FormFactor = Enum.FormFactor.Symmetric
- Part43.Size = Vector3.new(1, 2, 1)
- 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)
- Part43.BottomSurface = Enum.SurfaceType.Smooth
- Part43.TopSurface = Enum.SurfaceType.Smooth
- Part43.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part43.Position = Vector3.new(-0.676497996, 5.00754404, 38.6074677)
- Part43.Orientation = Vector3.new(-1.78999996, 89.8399963, 5)
- Part43.Color = Color3.new(0.105882, 0.164706, 0.207843)
- CylinderMesh44.Parent = Part43
- CylinderMesh44.Scale = Vector3.new(0.800000012, 1, 0.800000012)
- CylinderMesh44.Scale = Vector3.new(0.800000012, 1, 0.800000012)
- Part45.Name = "RightLowerArm"
- Part45.Parent = Model0
- Part45.BrickColor = BrickColor.new("Black")
- Part45.Rotation = Vector3.new(145.209991, 74.6999969, -145.009995)
- Part45.RotVelocity = Vector3.new(4.434355e-19, 1.25183769e-23, 4.55071656e-19)
- Part45.Velocity = Vector3.new(9.12830512e-19, -1.9120983e-18, -8.89436914e-19)
- Part45.FormFactor = Enum.FormFactor.Symmetric
- Part45.Size = Vector3.new(1, 3, 1)
- 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)
- Part45.BottomSurface = Enum.SurfaceType.Smooth
- Part45.TopSurface = Enum.SurfaceType.Smooth
- Part45.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part45.Position = Vector3.new(-0.650116026, 6.70110178, 35.4354095)
- Part45.Orientation = Vector3.new(8.65999985, 102.659996, 1.15999997)
- Part45.Color = Color3.new(0.105882, 0.164706, 0.207843)
- CylinderMesh46.Parent = Part45
- CylinderMesh46.Scale = Vector3.new(0.800000012, 1, 0.800000012)
- CylinderMesh46.Scale = Vector3.new(0.800000012, 1, 0.800000012)
- Humanoid47.Parent = Model0
- Humanoid47.NameOcclusion = Enum.NameOcclusion.NoOcclusion
- Humanoid47.Torso = Part16
- Humanoid47.Health = 25000
- Humanoid47.MaxHealth = 25000
- Humanoid47.WalkSpeed = 8
- Script48.Name = "Put this in Boss's Humanoid"
- Script48.Parent = Humanoid47
- table.insert(cors,sandbox(Script48,function()
- while true do
- for _, Players in pairs(game.Players:GetChildren()) do
- local BossBattleHealthGui = Players.PlayerGui:FindFirstChild("BossBattleHealthGui")
- if BossBattleHealthGui then
- BossBattleHealthGui.Frame.Boss.Value = script.Parent.Parent
- end
- end
- wait()
- end
- end))
- Part49.Name = "LeftHand"
- Part49.Parent = Model0
- Part49.BrickColor = BrickColor.new("Dark stone grey")
- Part49.Rotation = Vector3.new(-86.9599991, 16.6199989, -108.669998)
- Part49.FormFactor = Enum.FormFactor.Symmetric
- Part49.Size = Vector3.new(1, 1, 1)
- 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)
- Part49.BottomSurface = Enum.SurfaceType.Smooth
- Part49.TopSurface = Enum.SurfaceType.Smooth
- Part49.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part49.Position = Vector3.new(-1.87617505, 5.26676178, 43.6665802)
- Part49.Orientation = Vector3.new(-73.1100006, 79.9399948, 171.830002)
- Part49.Color = Color3.new(0.388235, 0.372549, 0.384314)
- SpecialMesh50.Parent = Part49
- SpecialMesh50.MeshId = "http://www.roblox.com/asset/?id=2806162"
- SpecialMesh50.Scale = Vector3.new(0.800000012, 0.800000012, 0.800000012)
- SpecialMesh50.MeshType = Enum.MeshType.FileMesh
- SpecialMesh50.Scale = Vector3.new(0.800000012, 0.800000012, 0.800000012)
- Part51.Name = "RightHand"
- Part51.Parent = Model0
- Part51.BrickColor = BrickColor.new("Royal purple")
- Part51.Reflectance = 0.20000000298023
- Part51.Rotation = Vector3.new(-34.7900009, -74.6999969, 145.009995)
- Part51.RotVelocity = Vector3.new(4.434355e-19, 1.25183769e-23, 4.55071656e-19)
- Part51.Velocity = Vector3.new(1.85498106e-18, -1.73746227e-18, -1.80750151e-18)
- Part51.FormFactor = Enum.FormFactor.Symmetric
- Part51.Size = Vector3.new(1, 1, 1)
- 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)
- Part51.BottomSurface = Enum.SurfaceType.Smooth
- Part51.TopSurface = Enum.SurfaceType.Smooth
- Part51.Color = Color3.new(0.384314, 0.145098, 0.819608)
- Part51.Position = Vector3.new(-0.96786499, 4.62536812, 35.4632874)
- Part51.Orientation = Vector3.new(-8.65999985, -77.3399963, 178.839996)
- Part51.Color = Color3.new(0.384314, 0.145098, 0.819608)
- SpecialMesh52.Parent = Part51
- SpecialMesh52.MeshId = "http://www.roblox.com/asset/?id=1031410"
- SpecialMesh52.Scale = Vector3.new(1, 2, 1)
- SpecialMesh52.MeshType = Enum.MeshType.FileMesh
- SpecialMesh52.Scale = Vector3.new(1, 2, 1)
- Sound53.Name = "FireLaser"
- Sound53.Parent = Part51
- Sound53.Pitch = 3
- Sound53.SoundId = "http://www.roblox.com/asset?id=2248511"
- Sound53.Volume = 0.40000000596046
- Configuration54.Name = "Stats"
- Configuration54.Parent = Model0
- IntValue55.Name = "BeamDamage"
- IntValue55.Parent = Configuration54
- IntValue55.Value = 10
- IntValue56.Name = "BeamForce"
- IntValue56.Parent = Configuration54
- IntValue56.Value = 90
- IntValue57.Name = "BeamLength"
- IntValue57.Parent = Configuration54
- IntValue57.Value = 4
- IntValue58.Name = "BeamSpeed"
- IntValue58.Parent = Configuration54
- IntValue58.Value = 6
- IntValue59.Name = "ExplosionRadius"
- IntValue59.Parent = Configuration54
- IntValue59.Value = 20
- IntValue60.Name = "GunDamage"
- IntValue60.Parent = Configuration54
- IntValue60.Value = 1
- NumberValue61.Name = "GunSpread"
- NumberValue61.Parent = Configuration54
- NumberValue61.Value = 0.05
- IntValue62.Name = "GunFlySpeed"
- IntValue62.Parent = Configuration54
- IntValue62.Value = 5
- IntValue63.Name = "MBShockwaveRadius"
- IntValue63.Parent = Configuration54
- IntValue63.Value = 100
- IntValue64.Name = "MBSize"
- IntValue64.Parent = Configuration54
- IntValue64.Value = 35
- IntValue65.Name = "MBSpeed"
- IntValue65.Parent = Configuration54
- IntValue65.Value = 2
- IntValue66.Name = "MBShockwaveForce"
- IntValue66.Parent = Configuration54
- IntValue66.Value = 100
- IntValue67.Name = "MBShockwaveDamage"
- IntValue67.Parent = Configuration54
- IntValue67.Value = 1
- IntValue68.Name = "NormalKickDamage"
- IntValue68.Parent = Configuration54
- IntValue68.Value = 5
- IntValue69.Name = "NormalKickForce"
- IntValue69.Parent = Configuration54
- IntValue69.Value = 30
- IntValue70.Name = "DefaultWalkSpeed"
- IntValue70.Parent = Configuration54
- IntValue70.Value = 12
- IntValue71.Name = "BaseDamage"
- IntValue71.Parent = Configuration54
- IntValue71.Value = 1
- IntValue72.Name = "RunSpeed"
- IntValue72.Parent = Configuration54
- IntValue72.Value = 22
- Script73.Name = "MainGolem"
- Script73.Parent = Model0
- table.insert(cors,sandbox(Script73,function()
- --[[
- I made this around 2011/2012, so the code isn't the most efficient, and some features aren't utilized
- I did some basic cleaning up, but there are still some problems.
- Any glitches/suggestions send to RobustPhysics/WrathOfTheElvhen
- --]]
- local rad = math.rad
- local sin = math.sin
- local cos = math.cos
- local pi = math.pi
- local random = math.random
- local model = script.Parent --The golem model itself
- local stats = model.Stats
- local Golem = { --A table containing all of the Golem's parts
- Humanoid = model.Humanoid,
- Head = model.Head,
- Torso = model.Torso,
- RightArm = {
- Shoulder = model.RightShoulder,
- Elbow = model.RightElbow,
- Lower = model.RightLowerArm,
- Upper = model.RightUpperArm,
- Hand = model.RightHand
- },
- LeftArm = {
- Shoulder = model.LeftShoulder,
- Elbow = model.LeftElbow,
- Lower = model.LeftLowerArm,
- Upper = model.LeftUpperArm,
- Hand = model.LeftHand
- },
- RightLeg = {
- Hip = model.RightHip,
- Knee = model.RightKnee,
- Lower = model.RightLowerLeg,
- Upper = model.RightUpperLeg,
- Foot = model.RightFoot
- },
- LeftLeg = {
- Hip = model.LeftHip,
- Knee = model.LeftKnee,
- Lower = model.LeftLowerLeg,
- Upper = model.LeftUpperLeg,
- Foot = model.LeftFoot
- }
- }
- --[[
- This section is just a bunch of welding
- rs = Right Shoulder
- ls = Left Shoulder
- re = Right Elbow
- le = Left Elbow
- rh = Right Hip
- lh = Left Hip
- rk = Right Knee
- lk = Left Knee
- rf = Right Foot
- lf = Left Foot
- rhand = Right Hand
- lhand = Left Hand
- --]]
- local neck = Instance.new("Weld",Golem.Torso)
- local rs = Instance.new("Weld",Golem.Torso)
- local ls = Instance.new("Weld",Golem.Torso)
- local rs2 = Instance.new("Weld",Golem.RightArm.Shoulder)
- local ls2 = Instance.new("Weld",Golem.LeftArm.Shoulder)
- local re = Instance.new("Weld",Golem.RightArm.Upper)
- local le = Instance.new("Weld",Golem.LeftArm.Upper)
- local re2 = Instance.new("Weld",Golem.RightArm.Elbow)
- local le2 = Instance.new("Weld",Golem.LeftArm.Elbow)
- local rh = Instance.new("Weld",Golem.Torso)
- local lh = Instance.new("Weld",Golem.Torso)
- local rh2 = Instance.new("Weld",Golem.RightLeg.Hip)
- local lh2 = Instance.new("Weld",Golem.LeftLeg.Hip)
- local rk = Instance.new("Weld",Golem.RightLeg.Upper)
- local lk = Instance.new("Weld",Golem.LeftLeg.Upper)
- local rk2 = Instance.new("Weld",Golem.RightLeg.Lower)
- local lk2 = Instance.new("Weld",Golem.LeftLeg.Lower)
- local rf = Instance.new("Weld",Golem.RightLeg.Lower)
- local lf = Instance.new("Weld",Golem.LeftLeg.Lower)
- local rhand = Instance.new("Weld",Golem.RightArm.Lower)
- local lhand = Instance.new("Weld",Golem.LeftArm.Lower)
- neck.Part0 = Golem.Torso
- neck.Part1 = Golem.Head
- rs.Part0 = Golem.Torso
- rs.Part1 = Golem.RightArm.Shoulder
- ls.Part0 = Golem.Torso
- ls.Part1 = Golem.LeftArm.Shoulder
- rs2.Part0 = Golem.RightArm.Shoulder
- rs2.Part1 = Golem.RightArm.Upper
- ls2.Part0 = Golem.LeftArm.Shoulder
- ls2.Part1 = Golem.LeftArm.Upper
- re.Part0 = Golem.RightArm.Upper
- re.Part1 = Golem.RightArm.Elbow
- le.Part0 = Golem.LeftArm.Upper
- le.Part1 = Golem.LeftArm.Elbow
- re2.Part0 = Golem.RightArm.Elbow
- re2.Part1 = Golem.RightArm.Lower
- le2.Part0 = Golem.LeftArm.Elbow
- le2.Part1 = Golem.LeftArm.Lower
- rh.Part0 = Golem.Torso
- rh.Part1 = Golem.RightLeg.Hip
- lh.Part0 = Golem.Torso
- lh.Part1 = Golem.LeftLeg.Hip
- rh2.Part0 = Golem.RightLeg.Hip
- rh2.Part1 = Golem.RightLeg.Upper
- lh2.Part0 = Golem.LeftLeg.Hip
- lh2.Part1 = Golem.LeftLeg.Upper
- rk.Part0 = Golem.RightLeg.Upper
- rk.Part1 = Golem.RightLeg.Knee
- lk.Part0 = Golem.LeftLeg.Upper
- lk.Part1 = Golem.LeftLeg.Knee
- rk2.Part0 = Golem.RightLeg.Knee
- rk2.Part1 = Golem.RightLeg.Lower
- lk2.Part0 = Golem.LeftLeg.Knee
- lk2.Part1 = Golem.LeftLeg.Lower
- rf.Part0 = Golem.RightLeg.Lower
- rf.Part1 = Golem.RightLeg.Foot
- lf.Part0 = Golem.LeftLeg.Lower
- lf.Part1 = Golem.LeftLeg.Foot
- rhand.Part0 = Golem.RightArm.Lower
- rhand.Part1 = Golem.RightArm.Hand
- lhand.Part0 = Golem.LeftArm.Lower
- lhand.Part1 = Golem.LeftArm.Hand
- neck.C0 = CFrame.new(0,3.5,0.3)
- rs.C0 = CFrame.new(2.8,1.25,0.25)*CFrame.Angles(0,0,rad(50))
- ls.C0 = CFrame.new(-2.8,1.25,0.25)*CFrame.Angles(0,0,rad(-50))
- rs2.C0 = CFrame.new(0,-1,0)
- ls2.C0 = CFrame.new(0,-1,0)
- re.C0 = CFrame.new(0,-1,0)*CFrame.Angles(rad(20),0,rad(-50))
- le.C0 = CFrame.new(0,-1,0)*CFrame.Angles(rad(20),0,rad(50))
- re2.C0 = CFrame.new(0,-2,0)
- le2.C0 = CFrame.new(0,-2,0)
- rh.C0 = CFrame.new(1,-2.21,0)*CFrame.Angles(rad(0),0,rad(5))
- lh.C0 = CFrame.new(-1,-2.21,0)*CFrame.Angles(rad(0),0,rad(-5))
- rh2.C0 = CFrame.new(0,-1.5,0)
- lh2.C0 = CFrame.new(0,-1.5,0)
- rk.C0 = CFrame.new(0,-1.5,0)*CFrame.Angles(rad(0),0,rad(-5))
- lk.C0 = CFrame.new(0,-1.5,0)*CFrame.Angles(rad(0),0,rad(5))
- rk2.C0 = CFrame.new(0,-1.5,0)
- lk2.C0 = CFrame.new(0,-1.5,0)
- rf.C0 = CFrame.new(0,-1.5,0)*CFrame.Angles(0,rad(90),0)
- lf.C0 = CFrame.new(0,-1.5,0)*CFrame.Angles(0,rad(90),0)
- rhand.C0 = CFrame.new(0,-2.1,0)*CFrame.Angles(rad(180),0,0)
- lhand.C0 = CFrame.new(0.13,-1.65,-0.3)*CFrame.Angles(rad(-90),0,rad(180))
- --All done welding
- --[[
- --This was previously a fix to ROBLOX's humanoid glitches
- for _,v in pairs(Golem) do --Basic start up stuff
- if v.className == "Part" then
- v.Anchored = false
- elseif v.className == "Humanoid" then
- v.Health = v.MaxHealth - 1 --I blame Humanoids for being weird
- else
- for _,p in pairs(v) do
- p.Anchored = false
- end
- end
- end
- Golem.Humanoid.Health = Golem.Humanoid.MaxHealth - 1 --Seriously, I hate them
- wait(0.1)
- Golem.Humanoid.Health = Golem.Humanoid.MaxHealth - 1 --A LOT
- ]]
- local speed = 1.2 --How fast the walking animation is
- local factor1 = 1*speed --Also for walking animation
- local factor2 = 0.25*speed --See above
- local cooldown = 0 --Move cooldowns
- local cooldownStart = tick()
- local move = 0 --Which move to use (for main loop usage)
- function PartsHit(pos, size, ignore, totalParts) --Find parts in Region3 based on Vector3 position and Vector3 size
- totalParts = totalParts or 20
- local hs = size.X/2
- local hs2 = size.Y/2
- local hs3 = size.Z/2
- local pos1 = Vector3.new(pos.X-hs, pos.y-hs2, pos.z-hs3)
- local pos2 = Vector3.new(pos.x+hs, pos.y+hs2, pos.z+hs3)
- local region = Region3.new(pos1, pos2)
- local parts = workspace:FindPartsInRegion3(region, ignore, totalParts)
- return parts
- end
- function Run(sign) --The sprinting/walking animations are done here
- local sprint = false
- if speed >= 2 then
- sprint = true
- end
- if not sprint then
- for i = 1, 10 do
- re.C0 = re.C0 * CFrame.Angles(rad(2*sign*(speed/2)),0,0)
- le.C0 = le.C0 * CFrame.Angles(rad(-2*sign*(speed/2)),0,0)
- rs.C0 = rs.C0 * CFrame.Angles(rad(4*sign*(speed/2)),0,0)
- ls.C0 = ls.C0 * CFrame.Angles(rad(-4*sign*(speed/2)),0,0)
- rh.C0 = rh.C0 * CFrame.Angles(rad(4*sign*factor1),0,0)
- lh.C0 = lh.C0 * CFrame.Angles(rad(-4*sign*factor2),0,0)
- if factor1 > factor2 then
- rk.C0 = rk.C0 * CFrame.Angles(rad(-4*sign*factor1),0,0)
- else
- lk.C0 = lk.C0 * CFrame.Angles(rad(4*sign*factor2),0,0)
- end
- wait(0.01)
- end
- else
- for i = 1, 4 do
- re.C0 = re.C0 * CFrame.Angles(rad(2*sign*(speed/2))*2.5,0,0)
- le.C0 = le.C0 * CFrame.Angles(rad(-2*sign*(speed/2))*2.5,0,0)
- rs.C0 = rs.C0 * CFrame.Angles(rad(4*sign*(speed/2))*2.5,0,0)
- ls.C0 = ls.C0 * CFrame.Angles(rad(-4*sign*(speed/2))*2.5,0,0)
- rh.C0 = rh.C0 * CFrame.Angles(rad(4*sign*factor1)*2.5,0,0)
- lh.C0 = lh.C0 * CFrame.Angles(rad(-4*sign*factor2)*2.5,0,0)
- if factor1 > factor2 then
- rk.C0 = rk.C0 * CFrame.Angles(rad(-4*sign*factor1)*2.5,0,0)
- else
- lk.C0 = lk.C0 * CFrame.Angles(rad(4*sign*factor2)*2.5,0,0)
- end
- wait(0.01)
- end
- end
- end
- function DrawLine(pos1, pos2, t, color, width)
- --Draws a line from Vector3 pos1 to Vector3 pos2, will auto delete after time 't'. Optional BrickColor color and int width
- t = t or 0.1 --how long until the part created is destroyed
- color = color or BrickColor.new("Black")
- width = width or 0.1
- local p = Instance.new("Part",workspace)
- p.FormFactor = "Symmetric"
- p.TopSurface = "Smooth"
- p.BottomSurface = "Smooth"
- p.Size = Vector3.new(1,1,1)
- p.Anchored = true
- p.BrickColor = color
- p.CanCollide = false
- p.CFrame = CFrame.new((pos1+pos2)/2,pos2)
- local m = Instance.new("BlockMesh",p)
- m.Scale = Vector3.new(width,width,(pos2-pos1).magnitude)
- game:GetService("Debris"):AddItem(p,t)
- return p
- end
- function Raycast(pos1, dir, ignore) --Basic raycasting (goes through invisible parts)
- local hit,newpos=game.Workspace:FindPartOnRay(Ray.new(pos1,dir*500),ignore)
- if hit and newpos then
- if hit.Parent.className == "Hat" then
- return hit.Parent.Parent.Torso,newpos
- end
- if hit.Transparency == 1 or not hit.CanCollide then
- hit,newpos=Raycast(newpos,dir,ignore) --Recursive raycast
- end
- end
- return hit,newpos
- end
- function Explosion(pos,radius) --Creates an explosion at Vector3 position with a radius
- local kaboom = {}
- local p = Instance.new("Part") --Sphere for the explosion
- p.Name = "Fire"
- p.FormFactor = "Symmetric"
- p.CanCollide = false
- p.Anchored = true
- p.Size = Vector3.new(1,1,1)
- p.TopSurface = "Smooth"
- p.BottomSurface = "Smooth"
- local m = Instance.new("SpecialMesh",p)
- m.MeshType = "Sphere"
- m.Scale = Vector3.new(1,1,1)
- for i = 1, 3 do --Creates 3 spheres with different colors/transparency for the explosion
- local c = p:clone()
- c.Parent = workspace
- game:GetService("Debris"):AddItem(c,15)
- c.CFrame = CFrame.new(pos)
- table.insert(kaboom,1,c)
- if i == 1 then
- c.BrickColor = BrickColor.new("Bright red")
- c.Transparency = 0.45
- elseif i == 2 then
- c.BrickColor = BrickColor.new("Black")
- c.Transparency = 0.5
- else
- c.BrickColor = BrickColor.new("Bright yellow")
- c.Transparency = 0.8
- end
- end
- coroutine.resume(coroutine.create(function()
- for i = 1,radius/0.55 do
- for _,v in pairs(kaboom) do --Increases explosion parts size and transparency slowly
- local size = (1-v.Transparency)
- v.Mesh.Scale = v.Mesh.Scale + Vector3.new(size,size,size)
- end
- wait(0.01)
- local checkSize = kaboom[3].Mesh.Scale.X --Radius of taking damage
- for _,v in pairs(game.Players:GetChildren()) do --Checking for damage
- local h = v.Character:findFirstChild("Humanoid")
- local t = v.Character:findFirstChild("Torso")
- if h and t and (t.Position-pos).magnitude <= checkSize then
- h:TakeDamage(stats["BeamDamage"].Value)
- h.PlatformStand = true
- t.Velocity = CFrame.new(pos,t.Position).lookVector*stats["BeamForce"].Value
- t.RotVelocity = CFrame.new(pos,t.Position).lookVector*stats["BeamForce"].Value
- end
- end
- end
- for _,v in pairs(kaboom) do --Destroy the explosion parts
- v:Destroy()
- end
- end))
- end
- function ShootBeam(pos) --Shoots a laser beam from Right Hand (pos is a Vector3 where the laser starts)
- local p = Instance.new("Part",workspace) --Fancy summoning circle for decoration
- p.Name = "Circle"
- p.FormFactor = "Symmetric"
- p.Size = Vector3.new(6,1,6)
- p.TopSurface = "Smooth"
- p.BottomSurface = "Smooth"
- p.Transparency = 1
- p.Anchored = true
- p.CanCollide = false
- local d = Instance.new("Decal",p)
- d.Face = "Top"
- d.Texture = "http://www.roblox.com/asset/?id=98270704"
- local d2 = Instance.new("Decal",p)
- d2.Face = "Bottom"
- d2.Texture = "http://www.roblox.com/asset/?id=98270704"
- game:GetService("Debris"):AddItem(p,10)
- local dir = (CFrame.new(Golem.Head.Position,pos)*CFrame.Angles(rad(random(-30,-5)),0,0)).lookVector
- --Gets the desired direction the Golem will shoot at
- local hit,newpos = Raycast(pos,dir,model)
- if newpos then
- dir = CFrame.new(pos,newpos).lookVector --Updates direction if a barrier is in the way
- end
- coroutine.resume(coroutine.create(function()
- p.CFrame = CFrame.new(pos+dir*3,pos+dir*999)*CFrame.Angles(rad(90),0,0) --Spins circle
- local beam = DrawLine(p.Position,p.Position+dir*stats["BeamLength"].Value,15,BrickColor.new("Bright red"),1)
- --beam is the actual beam that will be shot out
- if newpos then
- local startTime = tick()
- repeat --Loop that spins circle and moves the beam forward until it is near 'nearpos' or 10 seconds passed
- p.CFrame = p.CFrame * CFrame.Angles(0,rad(8),0)
- beam.CFrame = CFrame.new(beam.Position+dir*stats["BeamSpeed"].Value,beam.Position+dir*999)
- wait(0.01)
- until (beam.Position-newpos).magnitude <= stats["BeamSpeed"].Value/2 or (tick()-startTime) >= 10
- local boomScale = stats["ExplosionRadius"].Value
- Explosion(newpos,boomScale) --Creates an explosion where beam hit
- local targets = PartsHit(newpos,Vector3.new(boomScale,boomScale,boomScale),model,100)
- --calculates all targets near explosion via Region3
- local enemies = {}
- for _,v in pairs(targets) do --Filters targets, since the table 'targets' might have multiple parts of the same character
- if v.Parent:findFirstChild("Humanoid") and v.Parent.Humanoid.Health > 0 and v.Parent.Name ~= "Golem" then
- local check = false
- for _,c in pairs(enemies) do
- if c == v.Parent then
- check = true
- end
- end
- if not check then
- table.insert(enemies,1,v.Parent)
- end
- end
- end
- for _,v in pairs(enemies) do --Deals damage to everybody hit by explosion
- v.Humanoid:TakeDamage(stats["BeamDamage"].Value)
- v.Humanoid.PlatformStand = true
- v.Torso.Velocity = CFrame.new(newpos,v.Torso.Position).lookVector*stats["BeamForce"].Value
- v.Torso.RotVelocity = CFrame.new(newpos,v.Torso.Position).lookVector*stats["BeamForce"].Value
- end
- end
- beam:Destroy()
- for i = 0,1.1,0.06 do --Fancy summoning circle disappears
- p.CFrame = p.CFrame * CFrame.Angles(0,rad(8),0)
- for _,v in pairs(p:GetChildren()) do
- if v.className == "Decal" then
- v.Transparency = i
- end
- end
- wait(0.01)
- end
- p:Destroy()
- end))
- end
- function ShootProjectile(pos,size,radius,s,color) --Shoots a projectile (particle) at desired position
- --pos is a Vector3, where the projectile goes
- --size is how large the projectile (sphere) is
- --radius is how far away from pos the projectile spawns
- --s is speed of the projectile
- --color is a BrickColor value
- size = size or 0.1
- coroutine.resume(coroutine.create(function()
- local p = Instance.new("Part",workspace) --creates projectile
- p.Name = "Energy"
- p.BrickColor = color
- p.FormFactor = "Symmetric"
- p.Size = Vector3.new(1,1,1)
- p.TopSurface = "Smooth"
- p.Anchored = true
- p.BottomSurface = "Smooth"
- p.CanCollide = false
- p.CFrame = CFrame.new(pos+Vector3.new(random(-radius,radius),random(-radius,radius),random(-radius,radius)))
- local m = Instance.new("SpecialMesh",p)
- m.MeshType = "Sphere"
- m.Scale = Vector3.new(size,size,size)
- local dir = CFrame.new(p.Position,pos).lookVector --direction projectile moves
- repeat --moves projectile
- p.CFrame = CFrame.new(p.Position+dir*s)
- wait(0.02)
- until (p.Position-pos).magnitude <= radius/2+s
- p:Destroy()
- end))
- end
- function ChargeEnergy(offset,color,radius,inc,particleS,id) --Creates the illusion that a ball of energy is getting bigger
- --offset is how far away the energy is from the Golem's hand (CFrame value)
- --color is the color of the energy
- --radius is how big the energy ball will grow
- --inc is how fast the energy ball grows
- --particleS is the size of the particles created
- --id is the sound played during this
- local p = Instance.new("Part") --Creates the energy ball
- p.Name = "Energy"
- p.FormFactor = "Symmetric"
- p.Size = Vector3.new(1,1,1)
- p.TopSurface = "Smooth"
- p.BottomSurface = "Smooth"
- p.Parent = model
- p.CanCollide = false
- p.BrickColor = color
- p.CFrame = Golem.RightArm.Hand.CFrame*offset
- local m = Instance.new("SpecialMesh",p)
- m.MeshType = "Sphere"
- m.Scale = Vector3.new(0.1,0.1,0.1)
- p:BreakJoints()
- local w = Instance.new("Weld") --Weld sphere to hand
- w.Name = "ChargeWeld"
- w.Part0 = Golem.RightArm.Hand
- w.Part1 = p
- w.C0 = offset
- w.Parent = Golem.RightArm.Hand
- if id then --plays sound
- local s = Instance.new("Sound",p)
- s.SoundId = "http://www.roblox.com/asset?id="..id
- s.Pitch = .3
- s.Volume = 1
- s:play()
- s:stop()
- s:play()
- end
- repeat --Shoots projectiles/particles at the ball, while the ball grows in size
- ShootProjectile(p.Position,particleS,m.Scale.X+2,0.6,color)
- m.Scale = m.Scale + Vector3.new(inc,inc,inc)
- wait(0.02)
- until m.Scale.X >= radius
- return p
- end
- function ShootBullet() --Shoots a bullet into the sky, and then returns it for later use
- local accuracy = stats["GunSpread"].Value
- local x = random(-accuracy*1000,accuracy*1000)
- local y = random(-accuracy*1000,accuracy*1000)
- local z = random(-accuracy*1000,accuracy*1000)
- local startPos = Golem.LeftArm.Lower.CFrame*CFrame.new(0,-3.5,-0.75) --Where the bullet starts
- local endPos = startPos*CFrame.new(x,-1000+y,z) --Where the bullet is going to go
- local hit,pos = Raycast(startPos.p,(endPos.p-startPos.p).unit,model)
- local dir = CFrame.new(startPos.p,pos).lookVector
- local bullet = DrawLine(startPos.p,startPos.p+dir*3,5,BrickColor.new("Bright yellow"),0.1) --Creates the bullet
- local maxDist = random(100,130) --How far the bullet travels
- coroutine.resume(coroutine.create(function()
- repeat --Moves the bullet until it goes far enough
- bullet.CFrame = CFrame.new(bullet.Position+dir*stats["GunFlySpeed"].Value,bullet.Position+dir*2)
- wait(0.01)
- until (bullet.Position-pos).magnitude <= stats["GunFlySpeed"].Value/2 or (bullet.Position-startPos.p).magnitude >= maxDist
- bullet.Transparency = 1
- end))
- return bullet --Bullet is now transparent and is returned for future use
- end
- function Shockwave(pos,damage,force,radius,height,inc) --Creates a shockwave at position
- --pos is the origin of the shockwave (Vector3)
- --damage is how much damage the shockwave will do
- --force is how much force the shockwave will hit players with
- --height is how high the shockwave is
- --inc is how fast the shockwave increases
- inc = inc or 1
- local shock = Instance.new("Part",workspace) --main shockwave part
- shock.FormFactor = "Symmetric"
- shock.Anchored = true
- shock.CanCollide = false
- shock.Size = Vector3.new(1,1,1)
- shock.CFrame = CFrame.new(pos)
- shock.BrickColor = BrickColor.new("White")
- local mesh = Instance.new("SpecialMesh",shock)
- mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
- game:GetService("Debris"):AddItem(shock,10)
- coroutine.resume(coroutine.create(function()
- local i = 2
- repeat --Increases the shockwave size while calculating damage against players
- i = i + inc
- mesh.Scale = Vector3.new(i,height,i)
- for _,v in pairs(game.Players:GetChildren()) do
- local h = v.Character:FindFirstChild("Humanoid")
- local t = v.Character:FindFirstChild("Torso")
- if h and t and (t.Position-pos).magnitude <= i*1.2 then
- h:TakeDamage(damage)
- h.PlatformStand = true
- t.Velocity = CFrame.new(pos,t.Position).lookVector*force
- t.RotVelocity = CFrame.new(pos,t.Position).lookVector*force
- end
- end
- wait(0.02)
- until mesh.Scale.X >= radius
- shock:Destroy()
- end))
- end
- function MoveOne() --The first move, shoots a laser beam that explodes upon hitting the target
- wait(1)
- for i = 1, 18 do --animation
- rs.C0 = rs.C0 * CFrame.Angles(0,0,rad(2.5))
- re.C0 = re.C0 * CFrame.Angles(0,0,rad(5))
- wait(0.01)
- end
- wait(1)
- local energy = ChargeEnergy(CFrame.new(0,3,0),BrickColor.new("Bright red"),2.5,0.05)
- --energy is a ball that showcases where the beams start
- wait(1)
- for i = 1, 18 do
- re.C0 = re.C0 * CFrame.Angles(0,0,rad(-1.5))
- wait(0.01)
- end
- for i = 1, 55 do
- rs.C0 = rs.C0 * CFrame.Angles(rad(2),0,0)
- if i%7 == 0 then --every 7 animation frames it will shoot a laser beam
- Golem.RightArm.Hand.FireLaser:Play()
- ShootBeam(energy.Position)
- end
- wait(0.01)
- end
- wait(1)
- for i = 0,1.1,0.08 do --energy ball fades away
- energy.Transparency = i
- wait(0.01)
- end
- energy:Destroy()
- for i = 1, 30 do --restore animation
- re.C0 = re.C0 * CFrame.Angles(0,0,rad(-63)/30)
- rs.C0 = rs.C0 * CFrame.Angles(rad(-110)/30,0,0)
- wait(0.01)
- end
- for i = 1, 9 do
- rs.C0 = rs.C0 * CFrame.Angles(0,0,rad(-5))
- wait(0.01)
- end
- end
- function MoveTwo() --Second move, shoots bullets into the air, that then fall down onto players
- local leD = CFrame.new(0,-1,0)*CFrame.Angles(rad(20),0,rad(50))
- local lsD = CFrame.new(-2.8,1.25,0.25)--*CFrame.Angles(0,0,rad(-50))
- for i = 0, 14 do --animation
- ls.C0 = lsD * CFrame.Angles(rad(175)*(i/15),rad(0)*(i/15),rad(-50))
- --le.C0 = leD * CFrame.Angles(rad(-20)*(i/15),0,rad(-50)*(i/15))
- wait(0.07)
- end
- Golem.Torso.GunWindUp:play() --plays a minigun start up sound
- wait(0.5)
- local bullets = {}
- for i = 1, game.Players.NumPlayers*30 do --number of bullets shot out
- local bullet = ShootBullet() --creates the bullet
- table.insert(bullets,#bullets+1,bullet)
- if i%3==0 then --every 3 bullets it plays the gun shooting sound
- Golem.Torso.GunShoot:play()
- end
- wait(0.02)
- end
- Golem.Torso.GunStop:play() --plays a minigun cool down sound
- for i = 14, 0, -1 do
- --ls.C0 = ls.C0 * CFrame.Angles(rad(-70)/15,rad(-125)/15,0)
- --le.C0 = le.C0 * CFrame.Angles(rad(20)/15,0,rad(50)/15)
- ls.C0 = lsD * CFrame.Angles(rad(175)*(i/15),rad(0)*(i/15),rad(-50))
- --le.C0 = leD * CFrame.Angles(rad(-20)*(i/15),0,rad(-50)*(i/15))
- wait(0.07)
- end
- wait(1)
- for _,v in pairs(bullets) do --loop that causes all the bullets to fall down at players in area
- v.Transparency = 0
- local startPos = v.CFrame
- coroutine.resume(coroutine.create(function()
- wait(random())
- local x = random(-10,10)
- local z = random(-10,10)
- local players = GetPlayersInArea(300) --list of all players within 300 studs
- local player --the player the bullet will fall towards
- local dir --direction the bullet will fall down
- if #players >= 1 then
- player = players[random(1,#players)] --chooses random player to shoot at
- end
- if player then
- local pos = player.Character["Torso"].Position
- dir = CFrame.new(v.Position,pos+Vector3.new(x/2,random(-5,5),z/2)).lookVector
- else
- dir = CFrame.new(v.Position,v.Position-Vector3.new(x,50,z)).lookVector
- end
- local hit = false
- local speedMult = random(15,30)/10 --speed bullets will fall at
- repeat --Animates the falling bullets and damages players
- v.CFrame = CFrame.new(v.Position+dir*stats["GunFlySpeed"].Value*speedMult,v.Position+dir*2)
- for _,p in pairs(game.Players:GetChildren()) do
- local h = p.Character:findFirstChild("Humanoid")
- if h and h.Health > 0 and (p.Character["Torso"].Position-v.Position).magnitude <= 9 then
- h:takeDamage(stats["GunDamage"].Value)
- h.Sit = true
- hit = true
- end
- end
- wait(0.03)
- until (v.Position-startPos.p).magnitude >= 300 or hit or v.Position.Y <= Golem.LeftLeg.Foot.Position.Y
- if not hit and random() > 0.75 then --If the bullet didn't hit anything, then 25% it'll create a dust cloud
- v.CFrame = CFrame.new(Vector3.new(v.Position.X,Golem.LeftLeg.Foot.Position.Y,v.Position.Z))
- local p = Instance.new("Part",workspace) --Dust cloud
- game:GetService("Debris"):AddItem(p,2)
- p.Size = Vector3.new(1,1,1)
- p.FormFactor = "Symmetric"
- p.CanCollide = false
- p.Anchored = true
- p.CFrame = CFrame.new(v.Position)
- p.BrickColor = BrickColor.new("Brown")
- local m = Instance.new("SpecialMesh",p)
- m.MeshId = "http://www.roblox.com/asset/?id=1095708"
- v:Destroy()
- for i = 2, 3, 0.1 do --increases the smoke size, but lowers the transparency
- m.Scale = Vector3.new(i,i,i)
- p.Transparency = 1-(3-i)
- wait(0.01)
- end
- p:Destroy()
- else
- v:Destroy()
- end
- end))
- end
- end
- function MoveThree() --Magna-Bomb, creates a giant 'black hole' that crashes into the ground and creates a shockwave
- local rsWelds = {} --stores animation movements to play back later in reverse
- local lsWelds = {}
- for i = 1, 18 do --animation
- table.insert(rsWelds,1,rs.C0)
- table.insert(lsWelds,1,ls.C0)
- rh.C0 = rh.C0 * CFrame.Angles(rad(90)/18,0,0)
- rk.C0 = rk.C0 * CFrame.Angles(rad(-90)/18,0,0)
- lk.C0 = lk.C0 * CFrame.Angles(rad(-108)/18,0,0)
- rs.C0 = rs.C0 * CFrame.Angles(rad(115)/18,rad(-72)/18,rad(-18)/18)
- ls.C0 = ls.C0 * CFrame.Angles(rad(115)/18,rad(72)/18,rad(18)/18)
- wait(0.01)
- end
- wait(0.1)
- local radius = stats["MBSize"].Value --radius of the 'black hole'
- local energy = ChargeEnergy(CFrame.new(16.126,25,-5),BrickColor.new("Black"),radius,0.5,0.3,"2233910")
- --'energy' is the black hole itself, after it finishes charging
- wait(2.5)
- if Golem.RightArm.Hand:findFirstChild("ChargeWeld") then
- Golem.RightArm.Hand.ChargeWeld:Destroy()
- end
- energy.Anchored = true
- coroutine.resume(coroutine.create(function()
- local cf = CFrame.new(Golem.Torso.Position,energy.Position)
- local dir = (cf*CFrame.Angles(rad(-130),0,0)).lookVector
- local speed = stats["MBSpeed"].Value
- --local startTime = tick()
- repeat --Moves the 'black hole' towards the ground
- energy.CFrame = CFrame.new(energy.Position+dir*speed,energy.Position+dir*999)
- wait(0.01)
- until #PartsHit(energy.Position,Vector3.new(5,5,5),model) > 0 --or (tick()-startTime) >= #seconds
- local p = Instance.new("Part",model) --source of the sound that plays next
- p.Anchored = true
- p.Transparency = 1
- p.CanCollide = false
- p.CFrame = energy.CFrame
- local s = Instance.new("Sound",p) --plays ball crashing sound
- s.SoundId = "http://www.roblox.com/asset?id=2101159"
- s.Pitch = 2
- s.Volume = 1
- s:play()
- s:stop()
- s:play()
- game:GetService("Debris"):AddItem(p,6)
- Shockwave(energy.Position+Vector3.new(0,stats["MBSpeed"].Value,0),stats["MBShockwaveDamage"].Value,stats["MBShockwaveForce"].Value,stats["MBShockwaveRadius"].Value,12,4)
- --Spawns a shockwave
- energy:Destroy()
- end))
- for i = 1, 18 do --reverse animations back to normal
- rh.C0 = rh.C0 * CFrame.Angles(rad(-90)/18,0,0)
- rk.C0 = rk.C0 * CFrame.Angles(rad(90)/18,0,0)
- lk.C0 = lk.C0 * CFrame.Angles(rad(108)/18,0,0)
- --rs.C0 = rs.C0 * CFrame.Angles(rad(-115)/18,rad(72)/18,rad(18)/18)
- --ls.C0 = ls.C0 * CFrame.Angles(rad(-115)/18,rad(-72)/18,rad(-18)/18)
- rs.C0 = rsWelds[i]
- ls.C0 = lsWelds[i]
- wait(0.01)
- end
- end
- function MoveFour() --Kicks the player (think soccer kick)
- coroutine.resume(coroutine.create(function()
- for i = 1, 6 do --damages all targets near the foot every 0.05 seconds
- local targets = PartsHit(Golem.RightLeg.Foot.Position,Vector3.new(4,4,4),model,100)
- local enemies = {}
- for _,v in pairs(targets) do
- if v.Parent:findFirstChild("Humanoid") and v.Parent.Humanoid.Health > 0 then
- local check = false
- for _,c in pairs(enemies) do
- if c == v.Parent then
- check = true
- end
- end
- if not check then
- table.insert(enemies,1,v.Parent)
- end
- end
- end
- for _,v in pairs(enemies) do
- v.Humanoid:takeDamage(stats["NormalKickDamage"].Value)
- v.Humanoid.Sit = true
- v.Torso.Velocity = CFrame.new(Golem.RightLeg.Foot.Position,v.Torso.Position).lookVector*stats["NormalKickForce"].Value
- v.Torso.RotVelocity = CFrame.new(Golem.RightLeg.Foot.Position,v.Torso.Position).lookVector*stats["MBShockwaveForce"].Value
- end
- wait(0.05)
- end
- end))
- for i = 1, 10 do --Kicking animation for the Golem
- rs.C0 = rs.C0 * CFrame.Angles(rad(15)/10,rad(-10)/10,0)
- re.C0 = re.C0 * CFrame.Angles(rad(40)/10,0,0)
- ls.C0 = ls.C0 * CFrame.Angles(rad(-25)/10,0,0)
- rh.C0 = rh.C0 * CFrame.Angles(rad(90)/10,0,0)
- rk.C0 = rk.C0 * CFrame.Angles(rad(-70)/10,0,0)
- lh.C0 = lh.C0 * CFrame.Angles(rad(10)/10,0,0)
- lk.C0 = lk.C0 * CFrame.Angles(rad(-20)/10,0,0)
- wait(0.01)
- end
- for i = 1, 10 do
- rs.C0 = rs.C0 * CFrame.Angles(rad(25)/10,rad(-10)/10,0)
- re.C0 = re.C0 * CFrame.Angles(rad(20)/10,0,0)
- ls.C0 = ls.C0 * CFrame.Angles(rad(-25)/10,0,0)
- rk.C0 = rk.C0 * CFrame.Angles(rad(70)/10,0,0)
- wait(0.01)
- end
- wait(0.2)
- for i = 1, 10 do
- rs.C0 = rs.C0 * CFrame.Angles(rad(-40)/10,rad(20)/10,0)
- re.C0 = re.C0 * CFrame.Angles(rad(-60)/10,0,0)
- ls.C0 = ls.C0 * CFrame.Angles(rad(50)/10,0,0)
- rh.C0 = rh.C0 * CFrame.Angles(-rad(90)/10,0,0)
- lh.C0 = lh.C0 * CFrame.Angles(rad(-10)/10,0,0)
- lk.C0 = lk.C0 * CFrame.Angles(rad(20)/10,0,0)
- wait(0.01)
- end
- factor1 = 0.25*speed
- factor2 = 1*speed
- Run(-1)
- Run(1)
- end
- function Stomp() --The default attack, the golem just stomps on the ground, causing a small shockwave
- local num = random()
- local foot,hip,knee
- if num >= 0.5 then
- foot = Golem.RightLeg.Foot
- hip = rh
- knee = rk
- else
- foot = Golem.LeftLeg.Foot
- hip = lh
- knee = lk
- end
- for i = 1, 20 do
- hip.C0 = hip.C0 * CFrame.Angles(rad(100)/20,0,0)
- knee.C0 = knee.C0 * CFrame.Angles(rad(-100)/20,0,0)
- Golem.Torso.CFrame = Golem.Torso.CFrame * CFrame.new(0,0,-0.025)
- wait(0.01)
- end
- for i = 1, 10 do
- hip.C0 = hip.C0 * CFrame.Angles(rad(-100)/10,0,0)
- knee.C0 = knee.C0 * CFrame.Angles(rad(100)/10,0,0)
- wait(0.01)
- end
- Golem.RightLeg.Foot.Stomp.Volume = 0.4
- Golem.RightLeg.Foot.Stomp:play()
- Shockwave(foot.Position,stats["BaseDamage"].Value,0,9,5,0.5)
- if num >= 0.5 then
- factor1 = 0.25*speed
- factor2 = 1*speed
- Run(-1)
- Run(1)
- end
- end
- function GetClosestPlayer() --Finds the closest player within a table of players
- local cdist = 10000 --Closest distance so far
- local closest = nil --Closest player
- for _,v in pairs(game.Players:GetChildren()) do
- if v.Character and v.Character.Humanoid.Health > 0 then
- local dist = v:DistanceFromCharacter(Golem.Torso.Position)
- if dist < cdist then
- cdist = dist
- closest = v
- end
- end
- end
- return closest,cdist
- end
- function GetPlayersInArea(radius) --Gets all players within a certain range from the Golem's torso
- --radius determines what range you want to find players within
- local players = {}
- for _,v in pairs(game.Players:GetChildren()) do
- if v.Character and v.Character.Humanoid.Health > 0 then
- local dist = v:DistanceFromCharacter(Golem.Torso.Position)
- if dist <= radius then
- table.insert(players,1,v)
- end
- end
- end
- return players
- end
- function SelectAttack() --Selects the attack to do
- --Possibilities: MoveOne, MoveTwo, MoveThree, MoveFour,
- local numP = GetPlayersInArea(10)
- if #numP > 0 then
- return 4
- else
- local player,dist = GetClosestPlayer()
- if not player then
- return 0
- end
- if dist <= 60 then
- local winner = nil
- repeat
- local c1 = random(1,dist*2)
- local c2 = random(1,(60-dist)*2+10)
- local c3 = random(1,(100-dist)*2+10)
- if c1 == 1 then
- winner = 3
- elseif c2 == 1 then
- winner = 1
- elseif c3 == 1 then
- winner = 2
- end
- wait(0.01)
- until winner
- return winner
- elseif dist <= 90 then
- return 2
- end
- end
- return 0
- end
- Golem.Humanoid.Died:connect(function()
- for _,v in pairs(model:GetChildren()) do
- if v.className == "Part" then
- v.Anchored = true
- end
- end
- Golem.Head.Death:Play()
- wait(0.1)
- Golem.Head.Death:Stop()
- Golem.Head.Death:Play()
- Golem.RightArm.Hand.Anchored = false
- Golem.RightArm.Upper.Anchored = false
- Golem.RightArm.Lower.Anchored = false
- Golem.RightArm.Elbow.Anchored = false
- Golem.RightArm.Shoulder.Anchored = false
- wait(1.5)
- Golem.LeftArm.Hand.Anchored = false
- Golem.LeftArm.Upper.Anchored = false
- Golem.LeftArm.Lower.Anchored = false
- Golem.LeftArm.Elbow.Anchored = false
- Golem.LeftArm.Shoulder.Anchored = false
- wait(1)
- Golem.RightLeg.Foot.Anchored = false
- Golem.RightLeg.Upper.Anchored = false
- Golem.RightLeg.Lower.Anchored = false
- Golem.RightLeg.Knee.Anchored = false
- Golem.RightLeg.Hip.Anchored = false
- Golem.Head.Anchored = false
- wait(0.3)
- Golem.LeftLeg.Foot.Anchored = false
- Golem.LeftLeg.Upper.Anchored = false
- Golem.LeftLeg.Lower.Anchored = false
- Golem.LeftLeg.Knee.Anchored = false
- Golem.LeftLeg.Hip.Anchored = false
- Golem.Torso.Anchored = false
- script:Destroy()
- end)
- while wait(0.01) do
- move = 0 --variable that decides what move will be committed
- if random(1,100) <= 50 and tick()-cooldownStart >= cooldown then --50% chance of a move every second.
- move = SelectAttack()
- if move ~= 0 and GetClosestPlayer() then --if a special move is choosen, stops the Golem from walking
- local t = GetClosestPlayer().Character.Torso
- Golem.Humanoid:MoveTo(t.Position,t)
- Golem.Humanoid.WalkSpeed = 0
- wait(0.2)
- Golem.Humanoid:MoveTo(Golem.Torso.Position,Golem.Torso)
- end
- end
- if move == 1 then
- MoveOne()
- cooldownStart = tick()--resets the cooldown
- cooldown = 4
- elseif move == 2 then
- MoveTwo()
- cooldownStart = tick()
- cooldown = 3
- elseif move == 3 then
- MoveThree()
- cooldownStart = tick()
- cooldown = 7
- elseif move == 4 then
- MoveFour()
- cooldownStart = tick()
- cooldown = 1
- end
- if move == 0 then
- local num = #GetPlayersInArea(7)
- if num > 0 then --if there is a player within 7 studs of the golem, it will stomp
- Golem.Humanoid:MoveTo(Golem.Torso.Position,Golem.Torso)
- Stomp()
- else
- local target,dist = GetClosestPlayer() --target player to walk towards
- if target then
- target = target.Character
- if dist <= 80 then --walks at a normal speed towards player
- Golem.Humanoid.WalkSpeed = stats["DefaultWalkSpeed"].Value
- Golem.Humanoid:MoveTo(target.Torso.Position,target.Torso)
- Golem.RightLeg.Foot.Stomp.Volume = 0.2
- Golem.LeftLeg.Foot.Stomp.Volume = 0.2
- speed = 1.4
- else --sprints towards the player as fast as possible
- Golem.Humanoid:MoveTo(target.Torso.Position,target.Torso)
- Golem.RightLeg.Foot.Stomp.Volume = 0.5
- Golem.LeftLeg.Foot.Stomp.Volume = 0.5
- speed = 2.2
- Golem.Humanoid.WalkSpeed = stats["RunSpeed"].Value
- end
- else --Stomping sound/speed
- Golem.Humanoid:MoveTo(Golem.Torso.Position,Golem.Torso)
- Golem.RightLeg.Foot.Stomp.Volume = 0
- Golem.LeftLeg.Foot.Stomp.Volume = 0
- speed = 0.2
- end
- if move == 0 then
- factor1 = 1*speed --factor1 and factor2 determine the 'power' of the animation for each foot
- factor2 = 0.1*speed
- Run(1) --Golem will start running
- Run(-1) --Reverses last animation
- Golem.RightLeg.Foot.Stomp:play()
- factor1 = 0.1*speed
- factor2 = 1*speed
- Run(-1)
- Run(1)
- Golem.LeftLeg.Foot.Stomp:play()
- end
- end
- end
- if Golem.Humanoid.Sit then --Makes sure the golem cannot sit
- Golem.Humanoid.Sit = false
- end
- if Golem.Humanoid.PlatformStand then
- Golem.Humanoid.PlatformStand = false
- end
- end
- end))
- BrickColorValue74.Name = "TEAM"
- BrickColorValue74.Parent = Model0
- BrickColorValue74.Value = BrickColor.new("Bright green")
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = workspace
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement