Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Curtis Joseph Winkler (AvidMalignus)
- --Script that spawns a zombie off a player's corpse after a short period of time.
- --5/12/2015 @ 11:02 AM
- ----------------------------------------------------------------------------------------------------------------------------------
- local Workspace = game:GetService('Workspace')
- local Players = game:GetService('Players')
- ---
- local InsertService = game:GetService('InsertService')
- local Zombie = 0
- ---
- local Player = Players.LocalPlayer
- local Character = Player.Character or Character.CharacterAdded
- local Humanoid = Character:WaitForChild("Humanoid")
- ----------------------------------------------------------------------------------------------------------------------------------
- function WaitForChild(start,...)
- if not start:IsA("Instance") then return end
- local currentObj = start
- for _,v in pairs{...} do
- if type(v) == "string" then
- currentObj = currentObj:WaitForChild(v)
- end
- end
- return currentObj
- end
- ----------------------------------------------------------------------------------------------------------------------------------
- local function SpawnZombie()
- if Humanoid.Health and Humanoid.MaxHealth == 0 then
- local ZombieModel = InsertService:Insert(Zombie):GetChildren([1])
- ZombieModel.Parent = Workspace
- local ZHRP = WaitForChild(ZombieModel,"Character","HumanoidRootPart")
- ZHRP.CFrame = CFrame.new(Vector3.new(WaitForChild(Character,"HumanoidRootPart","CFrame")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement