Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --By Rufus14
- --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")
- SpecialMesh2 = Instance.new("SpecialMesh")
- Sound3 = Instance.new("Sound")
- RemoteEvent4 = Instance.new("RemoteEvent")
- Sound5 = Instance.new("Sound")
- RemoteEvent6 = Instance.new("RemoteEvent")
- Sound7 = Instance.new("Sound")
- RemoteEvent8 = Instance.new("RemoteEvent")
- Sound9 = Instance.new("Sound")
- RemoteEvent10 = Instance.new("RemoteEvent")
- Sound11 = Instance.new("Sound")
- RemoteEvent12 = Instance.new("RemoteEvent")
- Sound13 = Instance.new("Sound")
- RemoteEvent14 = Instance.new("RemoteEvent")
- Sound15 = Instance.new("Sound")
- RemoteEvent16 = Instance.new("RemoteEvent")
- Sound17 = Instance.new("Sound")
- RemoteEvent18 = Instance.new("RemoteEvent")
- Sound19 = Instance.new("Sound")
- RemoteEvent20 = Instance.new("RemoteEvent")
- Decal21 = Instance.new("Decal")
- Sound22 = Instance.new("Sound")
- Sound23 = Instance.new("Sound")
- Weld24 = Instance.new("Weld")
- Weld25 = Instance.new("Weld")
- Part26 = Instance.new("Part")
- Decal27 = Instance.new("Decal")
- Motor6D28 = Instance.new("Motor6D")
- Motor6D29 = Instance.new("Motor6D")
- Motor6D30 = Instance.new("Motor6D")
- Motor6D31 = Instance.new("Motor6D")
- Motor6D32 = Instance.new("Motor6D")
- Part33 = Instance.new("Part")
- Part34 = Instance.new("Part")
- Part35 = Instance.new("Part")
- Part36 = Instance.new("Part")
- Humanoid37 = Instance.new("Humanoid")
- Part38 = Instance.new("Part")
- Motor6D39 = Instance.new("Motor6D")
- Script40 = Instance.new("Script")
- BodyColors41 = Instance.new("BodyColors")
- Accessory42 = Instance.new("Accessory")
- Part43 = Instance.new("Part")
- SpecialMesh44 = Instance.new("SpecialMesh")
- Vector3Value45 = Instance.new("Vector3Value")
- Weld46 = Instance.new("Weld")
- Accessory47 = Instance.new("Accessory")
- Hat48 = Instance.new("Hat")
- Part49 = Instance.new("Part")
- SpecialMesh50 = Instance.new("SpecialMesh")
- Hat51 = Instance.new("Hat")
- Part52 = Instance.new("Part")
- SpecialMesh53 = Instance.new("SpecialMesh")
- Shirt54 = Instance.new("Shirt")
- Pants55 = Instance.new("Pants")
- Part56 = Instance.new("Part")
- SpecialMesh57 = Instance.new("SpecialMesh")
- Sound58 = Instance.new("Sound")
- Script59 = Instance.new("Script")
- Model0.Name = "Gun NPC"
- Model0.Parent = mas
- Model0.PrimaryPart = Part1
- Part1.Name = "Head"
- Part1.Parent = Model0
- Part1.CFrame = CFrame.new(4.00040197, 36.3000336, -104.303101, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part1.Position = Vector3.new(4.00040197, 36.3000336, -104.303101)
- Part1.Color = Color3.new(1, 0.8, 0.6)
- Part1.Size = Vector3.new(2, 1, 1)
- Part1.BrickColor = BrickColor.new("Pastel brown")
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.brickColor = BrickColor.new("Pastel brown")
- Part1.FormFactor = Enum.FormFactor.Symmetric
- Part1.formFactor = Enum.FormFactor.Symmetric
- SpecialMesh2.Parent = Part1
- SpecialMesh2.Scale = Vector3.new(1.25, 1.25, 1.25)
- Sound3.Name = "GettingUp"
- Sound3.Parent = Part1
- Sound3.MaxDistance = 150
- Sound3.EmitterSize = 5
- Sound3.MinDistance = 5
- Sound3.SoundId = "rbxasset://sounds/action_get_up.mp3"
- Sound3.Volume = 0.64999997615814
- RemoteEvent4.Name = "CharacterSoundEvent"
- RemoteEvent4.Parent = Sound3
- Sound5.Name = "Died"
- Sound5.Parent = Part1
- Sound5.MaxDistance = 150
- Sound5.EmitterSize = 5
- Sound5.MinDistance = 5
- Sound5.SoundId = "rbxasset://sounds/uuhhh.mp3"
- Sound5.Volume = 0.64999997615814
- RemoteEvent6.Name = "CharacterSoundEvent"
- RemoteEvent6.Parent = Sound5
- Sound7.Name = "FreeFalling"
- Sound7.Parent = Part1
- Sound7.Looped = true
- Sound7.TimePosition = 0.23687450328543
- Sound7.MaxDistance = 150
- Sound7.EmitterSize = 5
- Sound7.MinDistance = 5
- Sound7.SoundId = "rbxasset://sounds/action_falling.mp3"
- Sound7.Volume = 0
- RemoteEvent8.Name = "CharacterSoundEvent"
- RemoteEvent8.Parent = Sound7
- Sound9.Name = "Jumping"
- Sound9.Parent = Part1
- Sound9.MaxDistance = 150
- Sound9.EmitterSize = 5
- Sound9.MinDistance = 5
- Sound9.SoundId = "rbxasset://sounds/action_jump.mp3"
- Sound9.Volume = 0.64999997615814
- RemoteEvent10.Name = "CharacterSoundEvent"
- RemoteEvent10.Parent = Sound9
- Sound11.Name = "Landing"
- Sound11.Parent = Part1
- Sound11.MaxDistance = 150
- Sound11.EmitterSize = 5
- Sound11.MinDistance = 5
- Sound11.SoundId = "rbxasset://sounds/action_jump_land.mp3"
- Sound11.Volume = 1
- RemoteEvent12.Name = "CharacterSoundEvent"
- RemoteEvent12.Parent = Sound11
- Sound13.Name = "Splash"
- Sound13.Parent = Part1
- Sound13.MaxDistance = 150
- Sound13.EmitterSize = 5
- Sound13.MinDistance = 5
- Sound13.SoundId = "rbxasset://sounds/impact_water.mp3"
- Sound13.Volume = 0.64999997615814
- RemoteEvent14.Name = "CharacterSoundEvent"
- RemoteEvent14.Parent = Sound13
- Sound15.Name = "Running"
- Sound15.Parent = Part1
- Sound15.Looped = true
- Sound15.MaxDistance = 150
- Sound15.EmitterSize = 5
- Sound15.MinDistance = 5
- Sound15.Pitch = 1.8500000238419
- Sound15.PlaybackSpeed = 1.8500000238419
- Sound15.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
- Sound15.Volume = 0.64999997615814
- RemoteEvent16.Name = "CharacterSoundEvent"
- RemoteEvent16.Parent = Sound15
- Sound17.Name = "Swimming"
- Sound17.Parent = Part1
- Sound17.Looped = true
- Sound17.MaxDistance = 150
- Sound17.EmitterSize = 5
- Sound17.MinDistance = 5
- Sound17.Pitch = 1.6000000238419
- Sound17.PlaybackSpeed = 1.6000000238419
- Sound17.SoundId = "rbxasset://sounds/action_swim.mp3"
- Sound17.Volume = 0.64999997615814
- RemoteEvent18.Name = "CharacterSoundEvent"
- RemoteEvent18.Parent = Sound17
- Sound19.Name = "Climbing"
- Sound19.Parent = Part1
- Sound19.Looped = true
- Sound19.MaxDistance = 150
- Sound19.EmitterSize = 5
- Sound19.MinDistance = 5
- Sound19.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
- Sound19.Volume = 0.64999997615814
- RemoteEvent20.Name = "CharacterSoundEvent"
- RemoteEvent20.Parent = Sound19
- Decal21.Name = "face"
- Decal21.Parent = Part1
- Decal21.Texture = "http://www.roblox.com/asset/?id=7074780"
- Sound22.Name = "The Prodigy - Voodoo People (Pendulum Remix)"
- Sound22.Parent = Part1
- Sound22.Looped = true
- Sound22.Playing = true
- Sound22.SoundId = "rbxassetid://775076753"
- Sound22.Volume = 0
- Sound23.Name = "footstep"
- Sound23.Parent = Part1
- Sound23.SoundId = "rbxassetid://131436155"
- Sound23.Volume = 8
- Weld24.Name = "HeadWeld"
- Weld24.Parent = Part1
- Weld24.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld24.C1 = CFrame.new(0, 0.075000003, 0.0500000007, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld24.Part0 = Part1
- Weld24.Part1 = Part49
- Weld24.part1 = Part49
- Weld25.Name = "HeadWeld"
- Weld25.Parent = Part1
- Weld25.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld25.C1 = CFrame.new(0, 0.25999999, 0.150000006, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld25.Part0 = Part1
- Weld25.Part1 = Part52
- Weld25.part1 = Part52
- Part26.Name = "Torso"
- Part26.Parent = Model0
- Part26.CFrame = CFrame.new(4.00040197, 34.8000336, -104.303101, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part26.Position = Vector3.new(4.00040197, 34.8000336, -104.303101)
- Part26.Color = Color3.new(0, 1, 0)
- Part26.Size = Vector3.new(2, 2, 1)
- Part26.BrickColor = BrickColor.new("Lime green")
- Part26.LeftParamA = 0
- Part26.LeftParamB = 0
- Part26.LeftSurface = Enum.SurfaceType.Weld
- Part26.RightParamA = 0
- Part26.RightParamB = 0
- Part26.RightSurface = Enum.SurfaceType.Weld
- Part26.brickColor = BrickColor.new("Lime green")
- Part26.FormFactor = Enum.FormFactor.Symmetric
- Part26.formFactor = Enum.FormFactor.Symmetric
- Decal27.Name = "roblox"
- Decal27.Parent = Part26
- Motor6D28.Name = "Left Shoulder"
- Motor6D28.Parent = Part26
- Motor6D28.MaxVelocity = 0.10000000149012
- Motor6D28.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D28.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D28.Part0 = Part26
- Motor6D28.Part1 = Part33
- Motor6D28.part1 = Part33
- Motor6D29.Name = "Right Hip"
- Motor6D29.Parent = Part26
- Motor6D29.MaxVelocity = 0.10000000149012
- Motor6D29.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D29.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D29.Part0 = Part26
- Motor6D29.Part1 = Part36
- Motor6D29.part1 = Part36
- Motor6D30.Name = "Left Hip"
- Motor6D30.Parent = Part26
- Motor6D30.MaxVelocity = 0.10000000149012
- Motor6D30.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D30.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D30.Part0 = Part26
- Motor6D30.Part1 = Part35
- Motor6D30.part1 = Part35
- Motor6D31.Name = "Right Shoulder"
- Motor6D31.Parent = Part26
- Motor6D31.MaxVelocity = 0.10000000149012
- Motor6D31.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D31.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D31.Part0 = Part26
- Motor6D31.Part1 = Part34
- Motor6D31.part1 = Part34
- Motor6D32.Name = "Neck"
- Motor6D32.Parent = Part26
- Motor6D32.MaxVelocity = 0.10000000149012
- Motor6D32.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D32.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D32.Part0 = Part26
- Motor6D32.Part1 = Part1
- Motor6D32.part1 = Part1
- Part33.Name = "Left Arm"
- Part33.Parent = Model0
- Part33.CFrame = CFrame.new(2.50040197, 34.8000336, -104.303101, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part33.Position = Vector3.new(2.50040197, 34.8000336, -104.303101)
- Part33.Color = Color3.new(1, 0.8, 0.6)
- Part33.Size = Vector3.new(1, 2, 1)
- Part33.BrickColor = BrickColor.new("Pastel brown")
- Part33.CanCollide = false
- Part33.brickColor = BrickColor.new("Pastel brown")
- Part33.FormFactor = Enum.FormFactor.Symmetric
- Part33.formFactor = Enum.FormFactor.Symmetric
- Part34.Name = "Right Arm"
- Part34.Parent = Model0
- Part34.CFrame = CFrame.new(5.50040197, 34.8000336, -104.303101, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part34.Position = Vector3.new(5.50040197, 34.8000336, -104.303101)
- Part34.Color = Color3.new(1, 0.8, 0.6)
- Part34.Size = Vector3.new(1, 2, 1)
- Part34.BrickColor = BrickColor.new("Pastel brown")
- Part34.CanCollide = false
- Part34.brickColor = BrickColor.new("Pastel brown")
- Part34.FormFactor = Enum.FormFactor.Symmetric
- Part34.formFactor = Enum.FormFactor.Symmetric
- Part35.Name = "Left Leg"
- Part35.Parent = Model0
- Part35.CFrame = CFrame.new(3.50040197, 32.8000336, -104.303101, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part35.Position = Vector3.new(3.50040197, 32.8000336, -104.303101)
- Part35.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Part35.Size = Vector3.new(1, 2, 1)
- Part35.BottomSurface = Enum.SurfaceType.Smooth
- Part35.BrickColor = BrickColor.new("Really black")
- Part35.CanCollide = false
- Part35.brickColor = BrickColor.new("Really black")
- Part35.FormFactor = Enum.FormFactor.Symmetric
- Part35.formFactor = Enum.FormFactor.Symmetric
- Part36.Name = "Right Leg"
- Part36.Parent = Model0
- Part36.CFrame = CFrame.new(4.50040197, 32.8000336, -104.303101, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part36.Position = Vector3.new(4.50040197, 32.8000336, -104.303101)
- Part36.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Part36.Size = Vector3.new(1, 2, 1)
- Part36.BottomSurface = Enum.SurfaceType.Smooth
- Part36.BrickColor = BrickColor.new("Really black")
- Part36.CanCollide = false
- Part36.brickColor = BrickColor.new("Really black")
- Part36.FormFactor = Enum.FormFactor.Symmetric
- Part36.formFactor = Enum.FormFactor.Symmetric
- Humanoid37.Parent = Model0
- Humanoid37.LeftLeg = Part35
- Humanoid37.RightLeg = Part36
- Humanoid37.Torso = Part38
- Part38.Name = "HumanoidRootPart"
- Part38.Parent = Model0
- Part38.CFrame = CFrame.new(4.00040197, 34.8000336, -104.303101, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part38.Position = Vector3.new(4.00040197, 34.8000336, -104.303101)
- Part38.Transparency = 1
- Part38.Size = Vector3.new(2, 2, 1)
- Part38.BottomSurface = Enum.SurfaceType.Smooth
- Part38.CanCollide = false
- Part38.LeftParamA = 0
- Part38.LeftParamB = 0
- Part38.RightParamA = 0
- Part38.RightParamB = 0
- Part38.TopSurface = Enum.SurfaceType.Smooth
- Part38.FormFactor = Enum.FormFactor.Symmetric
- Part38.formFactor = Enum.FormFactor.Symmetric
- Motor6D39.Name = "RootJoint"
- Motor6D39.Parent = Part38
- Motor6D39.MaxVelocity = 0.10000000149012
- Motor6D39.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D39.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D39.Part0 = Part38
- Motor6D39.Part1 = Part26
- Motor6D39.part1 = Part26
- Script40.Name = "Health"
- Script40.Parent = Model0
- table.insert(cors,sandbox(Script40,function()
- -- Gradually regenerates the Humanoid's Health over time.
- local REGEN_RATE = 1/100 -- Regenerate this fraction of MaxHealth per second.
- local REGEN_STEP = 1 -- Wait this long between each regeneration step.
- --------------------------------------------------------------------------------
- local Character = script.Parent
- local Humanoid = Character:WaitForChild'Humanoid'
- --------------------------------------------------------------------------------
- while true do
- while Humanoid.Health < Humanoid.MaxHealth do
- local dt = wait(REGEN_STEP)
- local dh = dt*REGEN_RATE*Humanoid.MaxHealth
- Humanoid.Health = math.min(Humanoid.Health + dh, Humanoid.MaxHealth)
- end
- Humanoid.HealthChanged:Wait()
- end
- end))
- BodyColors41.Parent = Model0
- BodyColors41.HeadColor = BrickColor.new("Pastel brown")
- BodyColors41.HeadColor3 = Color3.new(1, 0.8, 0.6)
- BodyColors41.LeftArmColor = BrickColor.new("Pastel brown")
- BodyColors41.LeftArmColor3 = Color3.new(1, 0.8, 0.6)
- BodyColors41.LeftLegColor = BrickColor.new("Really black")
- BodyColors41.LeftLegColor3 = Color3.new(0.0666667, 0.0666667, 0.0666667)
- BodyColors41.RightArmColor = BrickColor.new("Pastel brown")
- BodyColors41.RightArmColor3 = Color3.new(1, 0.8, 0.6)
- BodyColors41.RightLegColor = BrickColor.new("Really black")
- BodyColors41.RightLegColor3 = Color3.new(0.0666667, 0.0666667, 0.0666667)
- BodyColors41.TorsoColor = BrickColor.new("Lime green")
- BodyColors41.TorsoColor3 = Color3.new(0, 1, 0)
- Accessory42.Name = "Bandana"
- Accessory42.Parent = Model0
- Accessory42.AttachmentPoint = CFrame.new(0, 0.800000012, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Accessory42.AttachmentPos = Vector3.new(0, 0.800000012, 0)
- Part43.Name = "Handle"
- Part43.Parent = Accessory42
- Part43.CFrame = CFrame.new(4.00040197, 36.0000343, -104.302826, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part43.Position = Vector3.new(4.00040197, 36.0000343, -104.302826)
- Part43.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Part43.Size = Vector3.new(1, 1, 1)
- Part43.BottomSurface = Enum.SurfaceType.Smooth
- Part43.BrickColor = BrickColor.new("Really black")
- Part43.CanCollide = false
- Part43.TopSurface = Enum.SurfaceType.Smooth
- Part43.brickColor = BrickColor.new("Really black")
- Part43.FormFactor = Enum.FormFactor.Symmetric
- Part43.formFactor = Enum.FormFactor.Symmetric
- SpecialMesh44.Parent = Part43
- SpecialMesh44.MeshId = "http://www.roblox.com/asset/?id=20637493"
- SpecialMesh44.Scale = Vector3.new(1, 0.899999976, 1)
- SpecialMesh44.VertexColor = Vector3.new(0, 0, 0)
- SpecialMesh44.TextureId = "http://www.roblox.com/asset/?id=143631818 "
- SpecialMesh44.MeshType = Enum.MeshType.FileMesh
- Vector3Value45.Name = "OriginalSize"
- Vector3Value45.Parent = Part43
- Vector3Value45.Value = Vector3.new(1, 1, 1)
- Weld46.Name = "AccessoryWeld"
- Weld46.Parent = Part43
- Weld46.C0 = CFrame.new(3.93629307e-09, 0.300000191, -0.600272298, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld46.C1 = CFrame.new(0, 0, -0.600000024, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld46.Part0 = Part43
- Weld46.Part1 = Part1
- Weld46.part1 = Part1
- Accessory47.Name = "YellowROBLOXVisor"
- Accessory47.Parent = Model0
- Accessory47.AttachmentPoint = CFrame.new(0, 0.0900000036, 0.180000007, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Accessory47.AttachmentPos = Vector3.new(0, 0.0900000036, 0.180000007)
- Hat48.Name = "Black Charmer"
- Hat48.Parent = Model0
- Hat48.AttachmentPoint = CFrame.new(0, 0.075000003, 0.0500000007, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Hat48.AttachmentPos = Vector3.new(0, 0.075000003, 0.0500000007)
- Part49.Name = "Handle"
- Part49.Parent = Hat48
- Part49.CFrame = CFrame.new(4.00040197, 36.7250328, -104.353104, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part49.Position = Vector3.new(4.00040197, 36.7250328, -104.353104)
- Part49.Size = Vector3.new(1.19999957, 1, 1.5999999)
- Part49.BottomSurface = Enum.SurfaceType.Smooth
- Part49.CanCollide = false
- Part49.TopSurface = Enum.SurfaceType.Smooth
- Part49.FormFactor = Enum.FormFactor.Custom
- Part49.formFactor = Enum.FormFactor.Custom
- SpecialMesh50.Parent = Part49
- SpecialMesh50.MeshId = "http://www.roblox.com/asset/?id=74878559"
- SpecialMesh50.Scale = Vector3.new(1.04999995, 1, 1.04999995)
- SpecialMesh50.TextureId = "http://www.roblox.com/asset/?id=21557995"
- SpecialMesh50.MeshType = Enum.MeshType.FileMesh
- Hat51.Name = "ClockworksShades"
- Hat51.Parent = Model0
- Hat51.AttachmentPoint = CFrame.new(0, 0.25999999, 0.150000006, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Hat51.AttachmentPos = Vector3.new(0, 0.25999999, 0.150000006)
- Part52.Name = "Handle"
- Part52.Parent = Hat51
- Part52.CFrame = CFrame.new(4.00040197, 36.5400352, -104.453102, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part52.Position = Vector3.new(4.00040197, 36.5400352, -104.453102)
- Part52.Size = Vector3.new(1, 1.60000002, 1)
- Part52.BottomSurface = Enum.SurfaceType.Smooth
- Part52.CanCollide = false
- Part52.Material = Enum.Material.DiamondPlate
- Part52.TopSurface = Enum.SurfaceType.Smooth
- Part52.FormFactor = Enum.FormFactor.Plate
- Part52.formFactor = Enum.FormFactor.Plate
- SpecialMesh53.Parent = Part52
- SpecialMesh53.MeshId = "http://www.roblox.com/asset/?id=1577360"
- SpecialMesh53.Scale = Vector3.new(1, 1.29999995, 1)
- SpecialMesh53.VertexColor = Vector3.new(0, 0, 0)
- SpecialMesh53.TextureId = "http://www.roblox.com/asset/?id=175673588"
- SpecialMesh53.MeshType = Enum.MeshType.FileMesh
- Shirt54.Name = "Shirt"
- Shirt54.Parent = Model0
- Shirt54.ShirtTemplate = "rbxassetid://463141967"
- Pants55.Name = "Pants"
- Pants55.Parent = Model0
- Pants55.PantsTemplate = "rbxassetid://175974404"
- Part56.Name = "AK-47"
- Part56.Parent = Model0
- Part56.CFrame = CFrame.new(6.30040455, 32.800045, -107.403091, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part56.Position = Vector3.new(6.30040455, 32.800045, -107.403091)
- Part56.Size = Vector3.new(1, 2, 6)
- Part56.BottomSurface = Enum.SurfaceType.Smooth
- Part56.CanCollide = false
- Part56.TopSurface = Enum.SurfaceType.Smooth
- SpecialMesh57.Parent = Part56
- SpecialMesh57.MeshId = "rbxassetid://477006495"
- SpecialMesh57.Scale = Vector3.new(0.0399999991, 0.0399999991, 0.0399999991)
- SpecialMesh57.TextureId = "rbxassetid://477006525"
- SpecialMesh57.MeshType = Enum.MeshType.FileMesh
- Sound58.Name = "shoot"
- Sound58.Parent = Part56
- Sound58.SoundId = "rbxassetid://139711658"
- Sound58.Volume = 2
- Script59.Name = "NPC AI"
- Script59.Parent = Model0
- table.insert(cors,sandbox(Script59,function()
- --Fully made by Rufus14
- --animations are made with :lerp()
- --you can convert the model to use it in script builder
- local npc = script.Parent
- local torso = npc.Torso
- local head = npc.Head
- local leftarm = npc["Left Arm"]
- local rightarm = npc["Right Arm"]
- local leftleg = npc["Left Leg"]
- local rightleg = npc["Right Leg"]
- local npchumanoid = npc.Humanoid
- local aksound = npc["AK-47"].shoot
- --Motor6D's
- local neck = torso.Neck
- neck.C1 = CFrame.new(0,0,0)
- local leftshoulder = torso["Left Shoulder"]
- leftshoulder.C1 = CFrame.new(0,0,0)
- local rightshoulder = torso["Right Shoulder"]
- rightshoulder.C1 = CFrame.new(0,0,0)
- local lefthip = torso["Left Hip"]
- lefthip.C1 = CFrame.new(0,0,0)
- local righthip = torso["Right Hip"]
- righthip.C1 = CFrame.new(0,0,0)
- local root = npc.HumanoidRootPart.RootJoint
- root.C1 = CFrame.new(0,0,0)
- --
- local sight = 120
- local walking = false
- local shooting = false
- local canshoot = true
- local cansay = true
- local saycooldown = 0
- local akweld = Instance.new("Weld", npc["AK-47"])
- akweld.Part0 = rightarm
- akweld.Part1 = npc["AK-47"]
- function walkanim(walkspeed)
- if walkspeed > 15 then
- walking = true
- else
- walking = false
- end
- end
- npchumanoid.Running:connect(walkanim)
- function randomwalk()
- while wait(math.random(3,6)) do
- if not shooting and not walking then
- npchumanoid.WalkSpeed = 16
- local function createwalkpart()
- local walkpart = Instance.new("Part", npc)
- walkpart.Size = Vector3.new(1,1,1)
- walkpart.Anchored = true
- walkpart.Material = "Neon"
- walkpart.Transparency = 1
- walkpart.BrickColor = BrickColor.new("Maroon")
- walkpart.CFrame = torso.CFrame * CFrame.new(math.random(-60,60),math.random(-30,30),math.random(-60,60))
- local path = game:GetService("PathfindingService"):FindPathAsync(torso.Position, walkpart.Position)
- local waypoints = path:GetWaypoints()
- if path.Status == Enum.PathStatus.Success then
- for i,v in pairs(waypoints) do
- local pospart = Instance.new("Part", npc)
- pospart.Size = Vector3.new(1,1,1)
- pospart.Anchored = true
- pospart.Material = "Neon"
- pospart.Transparency = 1
- pospart.Position = v.Position
- pospart.Name = "pospart"
- pospart.CanCollide = false
- end
- for i,v in pairs(waypoints) do
- npchumanoid:MoveTo(v.Position)
- local allow = 0
- while (torso.Position - v.Position).magnitude > 4.5 and allow < 35 do
- allow = allow + 1
- wait()
- end
- if v.Action == Enum.PathWaypointAction.Jump then
- npchumanoid.Jump = true
- end
- end
- for i,v in pairs(npc:GetChildren()) do
- if v.Name == "pospart" then
- v:destroy()
- end
- end
- else
- createwalkpart()
- wait()
- end
- walkpart:destroy()
- end
- createwalkpart()
- end
- end
- end
- function checkandshoot()
- while wait() do
- saycooldown = saycooldown + 1
- if saycooldown == 500 then
- cansay = true
- saycooldown = 0
- end
- for i,v in pairs(workspace:GetChildren()) do
- if v.ClassName == "Model" and v.Name ~= "Rufus14" then
- local victimhumanoid = v:findFirstChildOfClass("Humanoid")
- local victimhead = v:findFirstChild("Head")
- if victimhumanoid and victimhead and v.Name ~= npc.Name then
- if (victimhead.Position - head.Position).magnitude < sight then
- if victimhumanoid.Name == "noneofurbusiness" and cansay then
- elseif not shooting and victimhumanoid.Health > 0 and canshoot then
- shooting = true
- walking = false
- local doesshoot = 0
- local hpnow = npchumanoid.Health
- local walk = 0
- npchumanoid.WalkSpeed = 0
- while shooting and (victimhead.Position - head.Position).magnitude < sight and victimhumanoid.Health > 0 and canshoot do
- doesshoot = doesshoot + 1
- walk = walk + 1
- if npchumanoid.PlatformStand == false then
- npc.HumanoidRootPart.CFrame = CFrame.new(npc.HumanoidRootPart.Position,Vector3.new(victimhead.Position.x,npc.HumanoidRootPart.Position.y,victimhead.Position.z))
- end
- if walk == 100 and not walking then
- local function createwalkpart()
- local walkpart = Instance.new("Part", npc)
- walkpart.Size = Vector3.new(1,1,1)
- walkpart.Anchored = true
- walkpart.Material = "Neon"
- walkpart.Transparency = 1
- walkpart.BrickColor = BrickColor.new("Maroon")
- walkpart.CFrame = torso.CFrame * CFrame.new(-math.random(20,60),math.random(-40,40),math.random(-10,10))
- local path = game:GetService("PathfindingService"):FindPathAsync(torso.Position, walkpart.Position)
- local waypoints = path:GetWaypoints()
- if path.Status == Enum.PathStatus.Success then
- shooting = false
- canshoot = false
- npchumanoid.WalkSpeed = 20
- for i,v in pairs(waypoints) do
- local pospart = Instance.new("Part", npc)
- pospart.Size = Vector3.new(1,1,1)
- pospart.Anchored = true
- pospart.Material = "Neon"
- pospart.Transparency = 1
- pospart.Position = v.Position
- pospart.Name = "pospart"
- pospart.CanCollide = false
- end
- for i,v in pairs(waypoints) do
- npchumanoid:MoveTo(v.Position)
- local allow = 0
- while (torso.Position - v.Position).magnitude > 4.5 and allow < 35 do
- allow = allow + 1
- wait()
- end
- if v.Action == Enum.PathWaypointAction.Jump then
- npchumanoid.Jump = true
- end
- end
- canshoot = true
- npchumanoid.WalkSpeed = 16
- for i,v in pairs(npc:GetChildren()) do
- if v.Name == "pospart" then
- v:destroy()
- end
- end
- else
- createwalkpart()
- wait()
- end
- walkpart:destroy()
- end
- createwalkpart()
- end
- if doesshoot == 5 then
- doesshoot = 0
- npc["AK-47"].shoot:Play()
- local bullet = Instance.new("Part", npc)
- bullet.Size = Vector3.new(0.3,0.3,3.5)
- bullet.Material = "Neon"
- bullet.CFrame = npc["AK-47"].CFrame * CFrame.new(0,0,-4)
- bullet.CanCollide = false
- local velocity = Instance.new("BodyVelocity", bullet)
- velocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- bullet.CFrame = CFrame.new(bullet.Position, victimhead.Position)
- velocity.Velocity = bullet.CFrame.lookVector * 500 + Vector3.new(math.random(-25,25),math.random(-25,25),0)
- local function damage(part)
- local damage = math.random(10,25)
- if part.Parent.ClassName ~= "Accessory" and part.Parent.Parent.ClassName ~= "Accessory" and part.ClassName ~= "Accessory" and part.Parent.Name ~= npc.Name then
- bullet:destroy()
- local victimhumanoid = part.Parent:findFirstChildOfClass("Humanoid")
- if victimhumanoid then
- if victimhumanoid.Health > damage then
- victimhumanoid:TakeDamage(damage)
- else
- victimhumanoid:TakeDamage(damage)
- end
- end
- end
- end
- game.Debris:AddItem(bullet, 5)
- bullet.Touched:connect(damage)
- end
- wait()
- end
- walking = false
- shooting = false
- end
- end
- end
- end
- end
- end
- end
- function run()
- while wait() do
- local hpnow = npchumanoid.Health
- wait()
- if npchumanoid.Health < hpnow then
- local dorun = math.random(1,1)
- if dorun == 1 and not walking then
- local function createwalkpart()
- local walkpart = Instance.new("Part", npc)
- walkpart.Size = Vector3.new(1,1,1)
- walkpart.Anchored = true
- walkpart.Material = "Neon"
- walkpart.Transparency = 1
- walkpart.BrickColor = BrickColor.new("Maroon")
- walkpart.CFrame = torso.CFrame * CFrame.new(math.random(20,60),math.random(-20,20),math.random(-60,60))
- local path = game:GetService("PathfindingService"):FindPathAsync(torso.Position, walkpart.Position)
- local waypoints = path:GetWaypoints()
- if path.Status == Enum.PathStatus.Success then
- shooting = false
- canshoot = false
- walking = true
- npchumanoid.WalkSpeed = 20
- for i,v in pairs(waypoints) do
- local pospart = Instance.new("Part", npc)
- pospart.Size = Vector3.new(1,1,1)
- pospart.Anchored = true
- pospart.Material = "Neon"
- pospart.Transparency = 1
- pospart.Position = v.Position
- pospart.Name = "pospart"
- pospart.CanCollide = false
- end
- for i,v in pairs(waypoints) do
- npchumanoid:MoveTo(v.Position)
- local allow = 0
- while (torso.Position - v.Position).magnitude > 4.5 and allow < 35 do
- allow = allow + 1
- wait()
- end
- if v.Action == Enum.PathWaypointAction.Jump then
- npchumanoid.Jump = true
- end
- end
- shooting = false
- canshoot = true
- walking = false
- npchumanoid.WalkSpeed = 16
- for i,v in pairs(npc:GetChildren()) do
- if v.Name == "pospart" then
- v:destroy()
- end
- end
- else
- createwalkpart()
- wait()
- end
- walkpart:destroy()
- end
- createwalkpart()
- end
- end
- end
- end
- function death()
- if head:findFirstChild("The Prodigy - Voodoo People (Pendulum Remix)") then
- head["The Prodigy - Voodoo People (Pendulum Remix)"]:destroy()
- end
- npchumanoid.Archivable = true
- local zombiecorpse = npchumanoid.Parent:Clone()
- npchumanoid.Parent:destroy()
- zombiecorpse.Parent = workspace
- game.Debris:AddItem(zombiecorpse, 15)
- local Humanoid = zombiecorpse:findFirstChildOfClass("Humanoid")
- local Torso = zombiecorpse.Torso
- Humanoid.PlatformStand = true
- Humanoid:SetStateEnabled("Dead", false)
- for i,v in pairs(Humanoid.Parent.Torso:GetChildren()) do
- if v.ClassName == 'Motor6D' or v.ClassName == 'Weld' then
- v:destroy()
- end
- end
- for i,v in pairs(zombiecorpse:GetChildren()) do
- if v.ClassName == "Part" then
- for q,w in pairs(v:GetChildren()) do
- if w.ClassName == "BodyPosition" or w.ClassName == "BodyVelocity" then
- w:destroy()
- end
- end
- end
- end
- local function makeconnections(limb, attachementone, attachmenttwo, twistlower, twistupper, upperangle)
- local connection = Instance.new('BallSocketConstraint', limb)
- connection.LimitsEnabled = true
- connection.Attachment0 = attachementone
- connection.Attachment1 = attachmenttwo
- connection.TwistLimitsEnabled = true
- connection.TwistLowerAngle = twistlower
- connection.TwistUpperAngle = twistupper
- connection.UpperAngle = 70
- end
- local function makehingeconnections(limb, attachementone, attachmenttwo, twistlower, twistupper, upperangle)
- local connection = Instance.new('HingeConstraint', limb)
- connection.Attachment0 = attachementone
- connection.Attachment1 = attachmenttwo
- connection.LimitsEnabled = true
- connection.LowerAngle = twistlower
- connection.UpperAngle = twistupper
- end
- Humanoid.Parent['Right Arm'].RightShoulderAttachment.Position = Vector3.new(0, 0.5, 0)
- Torso.RightCollarAttachment.Position = Vector3.new(1.5, 0.5, 0)
- Humanoid.Parent['Left Arm'].LeftShoulderAttachment.Position = Vector3.new(0, 0.5, 0)
- Torso.LeftCollarAttachment.Position = Vector3.new(-1.5, 0.5, 0)
- local RightLegAttachment = Instance.new("Attachment", Humanoid.Parent["Right Leg"])
- RightLegAttachment.Position = Vector3.new(0, 1, 0)
- local TorsoRightLegAttachment = Instance.new("Attachment", Torso)
- TorsoRightLegAttachment.Position = Vector3.new(0.5, -1, 0)
- --
- local LeftLegAttachment = Instance.new("Attachment", Humanoid.Parent["Left Leg"])
- LeftLegAttachment.Position = Vector3.new(0, 1, 0)
- local TorsoLeftLegAttachment = Instance.new("Attachment", Torso)
- TorsoLeftLegAttachment.Position = Vector3.new(-0.5, -1, 0)
- --
- if Humanoid.Parent:findFirstChild("Head") then
- local HeadAttachment = Instance.new("Attachment", Humanoid.Parent.Head)
- HeadAttachment.Position = Vector3.new(0, -0.5, 0)
- makehingeconnections(Humanoid.Parent.Head, HeadAttachment, Torso.NeckAttachment, -20, 20, 70)
- end
- makeconnections(Humanoid.Parent['Right Arm'], Humanoid.Parent['Right Arm'].RightShoulderAttachment, Torso.RightCollarAttachment, -80, 80)
- makeconnections(Humanoid.Parent['Left Arm'], Humanoid.Parent['Left Arm'].LeftShoulderAttachment, Torso.LeftCollarAttachment, -80, 80)
- makeconnections(Humanoid.Parent['Right Leg'], RightLegAttachment, TorsoRightLegAttachment, -80, 80, 70)
- makeconnections(Humanoid.Parent['Left Leg'], LeftLegAttachment, TorsoLeftLegAttachment, -80, 80, 70)
- if Humanoid.Parent:findFirstChild("Right Arm") then
- local limbcollider = Instance.new("Part", Humanoid.Parent["Right Arm"])
- limbcollider.Size = Vector3.new(1,1.3,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = Humanoid.Parent["Right Arm"]
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.4,0,0)
- for i,v in pairs(zombiecorpse["Right Arm"]:GetChildren()) do
- if v.ClassName == 'Motor6D' or v.ClassName == 'Weld' then
- v:destroy()
- end
- end
- end
- --
- if Humanoid.Parent:findFirstChild("Left Arm") then
- local limbcollider = Instance.new("Part", Humanoid.Parent["Left Arm"])
- limbcollider.Size = Vector3.new(1,1.3,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = Humanoid.Parent["Left Arm"]
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.4,0,0)
- end
- --
- if Humanoid.Parent:findFirstChild("Left Leg") then
- local limbcollider = Instance.new("Part", Humanoid.Parent["Left Leg"])
- limbcollider.Size = Vector3.new(1,1.3,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = Humanoid.Parent["Left Leg"]
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.4,0,0)
- end
- --
- if Humanoid.Parent:findFirstChild("Right Leg") then
- local limbcollider = Instance.new("Part", Humanoid.Parent["Right Leg"])
- limbcollider.Size = Vector3.new(1,1.3,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = Humanoid.Parent["Right Leg"]
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.4,0,0)
- end
- local ragdoll = zombiecorpse
- if ragdoll:findFirstChild("HumanoidRootPart") then
- ragdoll.HumanoidRootPart.CanCollide = false
- ragdoll.HumanoidRootPart:destroy()
- end
- end
- npchumanoid.Died:connect(death)
- spawn(run)
- spawn(checkandshoot)
- spawn(randomwalk)
- while wait() do --check animations and other things
- if not walking and not shooting then
- for i = 0.2,0.8 , 0.09 do
- if not walking and not shooting then
- akweld.C0 = akweld.C0:lerp(CFrame.new(-0.583096504, -1.87343168, 0.0918724537, 0.808914721, -0.582031429, 0.0830438882, -0.166903317, -0.0918986499, 0.981681228, -0.56373775, -0.807956576, -0.171481162),i)
- rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new(1.32261992, 0.220639229, -0.279059082, 0.766044497, 0.604022682, -0.219846413, -0.492403805, 0.331587851, -0.804728508, -0.413175881, 0.724711061, 0.551434159),i)
- leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(-1.16202736, -0.00836706161, -0.880517244, 0.939692557, -0.342020094, -2.98023224e-08, 0.171009958, 0.46984598, -0.866025567, 0.296198159, 0.813797832, 0.499999642),i)
- lefthip.C0 = lefthip.C0:lerp(CFrame.new(-0.599619389, -1.99128425, 0, 0.996194661, 0.087155968, 0, -0.087155968, 0.996194661, 0, 0, 0, 1),i)
- righthip.C0 = righthip.C0:lerp(CFrame.new(0.599619389, -1.99128449, 0, 0.996194661, -0.087155968, 0, 0.087155968, 0.996194661, 0, 0, 0, 1),i)
- root.C0 = root.C0:lerp(CFrame.new(0,0,0),i)
- neck.C0 = neck.C0:lerp(CFrame.new(0,1.5,0),i)
- wait()
- end
- end
- end
- if walking then --this is the walking animation
- for i = 0.2,0.8 , 0.09 do
- if walking then
- akweld.C0 = akweld.C0:lerp(CFrame.new(-0.583096504, -1.87343168, 0.0918724537, 0.808914721, -0.582031429, 0.0830438882, -0.166903317, -0.0918986499, 0.981681228, -0.56373775, -0.807956576, -0.171481162),i)
- rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new(1.32261992, 0.220639229, -0.279059082, 0.766044497, 0.604022682, -0.219846413, -0.492403805, 0.331587851, -0.804728508, -0.413175881, 0.724711061, 0.551434159),i)
- leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(-1.16202736, -0.00836706161, -0.880517244, 0.939692557, -0.342020094, -2.98023224e-08, 0.171009958, 0.46984598, -0.866025567, 0.296198159, 0.813797832, 0.499999642),i)
- lefthip.C0 = lefthip.C0:lerp(CFrame.new(-0.527039051, -1.78302765, 0.642787695, 0.999390841, 0.026734557, 0.0224329531, -0.0348994918, 0.765577614, 0.642395973, 0, -0.642787635, 0.766044438),i)
- righthip.C0 = righthip.C0:lerp(CFrame.new(0.522737741, -1.65984559, -0.766044617, 0.999390841, -0.0224329531, 0.0267345682, 0.0348994918, 0.642395794, -0.765577734, 0, 0.766044497, 0.642787457),i)
- root.C0 = root.C0:lerp(CFrame.new(0, 0, 0, 0.996194661, 6.98491931e-09, -0.0871561021, 0.00759615982, 0.996194661, 0.0868242308, 0.0868244469, -0.087155886, 0.992403805),i)
- neck.C0 = neck.C0:lerp(CFrame.new(2.38418579e-07, 1.49809694, 0.0435779095, 0.996194661, 6.38283382e-09, 0.0871560946, 0.00759615889, 0.996194601, -0.0868242308, -0.0868244469, 0.087155886, 0.992403746),i)
- wait()
- end
- end
- head.footstep:Play()
- for i = 0.2,0.8 , 0.09 do
- if walking then
- akweld.C0 = akweld.C0:lerp(CFrame.new(-0.583096504, -1.87343168, 0.0918724537, 0.808914721, -0.582031429, 0.0830438882, -0.166903317, -0.0918986499, 0.981681228, -0.56373775, -0.807956576, -0.171481162),i)
- rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new(1.32261992, 0.220639229, -0.279059082, 0.766044497, 0.604022682, -0.219846413, -0.492403805, 0.331587851, -0.804728508, -0.413175881, 0.724711061, 0.551434159),i)
- leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(-1.16202736, -0.00836706161, -0.880517244, 0.939692557, -0.342020094, -2.98023224e-08, 0.171009958, 0.46984598, -0.866025567, 0.296198159, 0.813797832, 0.499999642),i)
- lefthip.C0 = lefthip.C0:lerp(CFrame.new(-0.520322084, -1.59067655, -0.819151878, 0.999390841, 0.0200175196, -0.028587997, -0.0348994918, 0.573226929, -0.818652987, 0, 0.819151998, 0.57357645),i)
- righthip.C0 = righthip.C0:lerp(CFrame.new(0.528892756, -1.83610249, 0.573575974, 0.999390841, -0.0285879895, -0.020017527, 0.0348994955, 0.818652987, 0.57322675, -7.4505806e-09, -0.573576212, 0.819152057),i)
- root.C0 = root.C0:lerp(CFrame.new(0, 0, 0, 0.996194661, -1.44354999e-08, 0.0871558934, -0.00759615237, 0.996194661, 0.0868244395, -0.0868242383, -0.0871560946, 0.992403805),i)
- neck.C0 = neck.C0:lerp(CFrame.new(0, 1.49809742, 0.0435781479, 0.996194601, -1.27129169e-08, -0.0871559009, -0.0075961519, 0.996194661, -0.0868244097, 0.0868242458, 0.0871560723, 0.992403746),i)
- wait()
- end
- end
- head.footstep:Play()
- end
- if shooting then --this is the shooting animation
- for i = 0.2,0.8 , 0.45 do
- if shooting then
- akweld.C0 = akweld.C0:lerp(CFrame.new(-0.109231472, -2.24730468, -0.300003052, 0.984807491, 1.94707184e-07, 0.173647866, -0.173648044, -2.68220873e-07, 0.984807491, 3.67846468e-07, -0.999999821, -8.00420992e-08),i)
- root.C0 = root.C0:lerp(CFrame.new(0, 0, 0, 0.173648223, 0, -0.98480773, 0, 1, 0, 0.98480773, 0, 0.173648223),i)
- rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new(1.21384871, 0.500000477, -0.879925251, 0.342019856, 0.939692438, -1.49501886e-08, 1.94707184e-07, -2.68220873e-07, -0.999999821, -0.939692438, 0.342020035, -3.76157232e-07),i)
- leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(-1.59201181, 0.470158577, -0.794548988, 0.271118939, 0.181368172, 0.945304275, 0.902039766, -0.390578717, -0.18377316, 0.335885108, 0.902526498, -0.269494623),i)
- lefthip.C0 = lefthip.C0:lerp(CFrame.new(-0.681244373, -2.07163191, 0, 0.98480773, 0.173648283, 0, -0.173648283, 0.98480767, 0, 0, -1.86264515e-09, 0.99999994),i)
- righthip.C0 = righthip.C0:lerp(CFrame.new(0.681244612, -2.07163191, -4.76837158e-07, 0.98480773, -0.173648283, 0, 0.173648283, 0.98480767, 0, 0, 1.86264515e-09, 0.99999994),i)
- neck.C0 = neck.C0:lerp(CFrame.new(0.0296957493, 1.49240398, -0.0815882683, 0.336824059, 0.059391167, 0.939692557, -0.173648164, 0.98480773, -7.4505806e-09, -0.925416589, -0.163175896, 0.342020094),i)
- wait()
- end
- end
- for i = 0.2,0.8 , 0.45 do
- if shooting then
- akweld.C0 = akweld.C0:lerp(CFrame.new(-0.109231472, -2.24730468, -0.300003052, 0.984807491, 1.94707184e-07, 0.173647866, -0.173648044, -2.68220873e-07, 0.984807491, 3.67846468e-07, -0.999999821, -8.00420992e-08),i)
- root.C0 = root.C0:lerp(CFrame.new(0, 0, 0, 0.173648223, 0, -0.98480773, 0, 1, 0, 0.98480773, 0, 0.173648223),i)
- rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new(1.60777056, 0.499999523, -0.81046629, 0.342019439, 0.939691842, 1.55550936e-07, 4.10554577e-08, -3.93739697e-07, -0.999999464, -0.939691901, 0.342019975, -4.77612389e-07),i)
- leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(-1.10000956, 0.482372284, -0.926761627, 0.27112025, 0.263066441, 0.925899446, 0.902039289, -0.405109912, -0.149033815, 0.335885197, 0.875603914, -0.347129732),i)
- lefthip.C0 = lefthip.C0:lerp(CFrame.new(-0.681244373, -2.07163191, 0, 0.98480773, 0.173648283, 0, -0.173648283, 0.98480767, 0, 0, -1.86264515e-09, 0.99999994),i)
- righthip.C0 = righthip.C0:lerp(CFrame.new(0.681244612, -2.07163191, -4.76837158e-07, 0.98480773, -0.173648283, 0, 0.173648283, 0.98480767, 0, 0, 1.86264515e-09, 0.99999994),i)
- neck.C0 = neck.C0:lerp(CFrame.new(0.121206045, 1.4753027, -0.0450725555, 0.336823881, 0.221664757, 0.915103495, -0.173648164, 0.969846308, -0.171010077, -0.925416648, -0.101305753, 0.365159094),i)
- wait()
- end
- end
- end
- end
- end))
- 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