View difference between Paste ID: 7D3FDyJN and SuN8wUqu
SHOW: | | - or go back to the newest paste.
1
Player = game:GetService("Players").LocalPlayer
2
PlayerGui = Player.PlayerGui
3
Cam = workspace.CurrentCamera
4
Backpack = Player.Backpack
5
Character = Player.Character
6
char = Player.Character
7
Humanoid = Character.Humanoid
8
Mouse = Player:GetMouse()
9
RootPart = Character["HumanoidRootPart"]
10
Torso = Character["Torso"]
11
Head = Character["Head"]
12
RightArm = Character["Right Arm"]
13
LeftArm = Character["Left Arm"]
14
RightLeg = Character["Right Leg"]
15
LeftLeg = Character["Left Leg"]
16
RootJoint = RootPart["RootJoint"]
17
Neck = Torso["Neck"]
18
RightShoulder = Torso["Right Shoulder"]
19
LeftShoulder = Torso["Left Shoulder"]
20
RightHip = Torso["Right Hip"]
21
LeftHip = Torso["Left Hip"]
22
23
local righteyebrickcolor = "Really red"
24
local reye = Instance.new("Part", char)
25
reye.CanCollide = false
26
reye.BrickColor = BrickColor.new(righteyebrickcolor)
27
reye.Material = "Neon"
28
reye.Size = Vector3.new(.25,.35,.15)
29
weld(reye, char.Head, CFrame.new(0.15,-0.2,0.55), CFrame.new(1,0,0))
30
m1 = Instance.new("SpecialMesh", reye)
31
m1.MeshType = "Sphere"
32
m1.Scale = Vector3.new(0.9,0.9,0.9)
33
reye.Locked = true
34
reye.Name = "re"
35
36
37
local lefteyebrickcolor = "Really red"
38
local leye = Instance.new("Part", char)
39
leye.CanCollide = false
40
leye.BrickColor = BrickColor.new(lefteyebrickcolor)
41
leye.Material = "Neon"
42
leye.Size = Vector3.new(.25,.35,.15)
43
weld(reye, char.Head, CFrame.new(0.15,-0.2,0.55), CFrame.new(1,0,0))
44
m1 = Instance.new("SpecialMesh", leye)
45
m1.MeshType = "Sphere"
46
m1.Scale = Vector3.new(0.9,0.9,0.9)
47
leye.Locked = true
48
leye.Name = "le"
49
50
wait(1)
51
local Dummy = game.Workspace:FindFirstChild("Meti2000")
52
if Dummy == nil then
53
	error("Target not found!")
54
	return
55
end
56
wait(0.5)
57
for i,v in pairs(Dummy:GetChildren()) do
58
	if v.ClassName == "Part" then
59
		v.Transparency = 10
60
	end
61
end
62
Dummy["Left Arm"].Transparency = 1
63
Dummy["Right Arm"].Transparency = 1
64
Dummy["Torso"].Transparency = 1
65
Dummy["Neck"].Transparency = 1
66
Dummy["Left Leg"].Transparency = 1
67
Dummy["Right Leg"].Transparency = 1
68
leye1.Transparency = 1
69
reye.Transparency = 1
70
local Humanoid = Dummy:FindFirstChild("Humanoid")
71
local Head = Dummy:FindFirstChild("Head")
72
local ishead = true
73
if Humanoid == nil then error("Humanoid not found!") return end
74
if Head == nil then ishead = false end
75
if ishead == true then
76
	if Head:FindFirstChild("face") then
77
		Head:FindFirstChild("face"):Destroy()
78
	end
79
end
80
Humanoid.MaxHealth = math.huge
81
Humanoid.Health = math.huge
82
Humanoid.WalkSpeed = 6000
83
Humanoid.Name = "Zombie"
84
function onTouchedDeath(part)
85
	if part.Parent ~= nil then
86
		local h = part.Parent:findFirstChild("Humanoid")
87
		if h ~= nil then
88
			local has_health = h.Health > 0
89
			h:TakeDamage(h.MaxHealth + 10)
90
		end
91
	end
92
end
93
Dummy["Left Arm"].Touched:connect(onTouchedDeath)
94
Dummy["Right Arm"].Touched:connect(onTouchedDeath)
95
Dummy["Torso"].Touched:connect(onTouchedDeath)
96
Dummy["Neck"].Touched:connect(onTouchedDeath)
97
Dummy["Left Leg"].Touched:connect(onTouchedDeath)
98
Dummy["Right Leg"].Touched:connect(onTouchedDeath)
99
local larm = script.Parent:FindFirstChild("Left Arm")
100
local rarm = script.Parent:FindFirstChild("Right Arm")
101
function findNearestTorso(pos)
102
	local list = game.Workspace:children()
103
	local torso = nil
104
	local dist = 5
105
	local temp = nil
106
	local human = nil
107
	local temp2 = nil
108
	for x = 1, #list do
109
		temp2 = list[x]
110
		if (temp2.className == "Model") and (temp2 ~= script.Parent) then
111
			temp = temp2:findFirstChild("Right Arm")
112
			human = temp2:findFirstChild("Humanoid")
113
			if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
114
				if (temp.Position - pos).magnitude < dist then
115
					torso = temp
116
					dist = (temp.Position - pos).magnitude
117
				end
118
			end
119
		end
120
	end
121
	return torso
122
end
123
while true do
124
	wait(0.3)
125
	local target = findNearestTorso(Dummy["Torso"].Position)
126
	if target ~= nil then
127
		Humanoid:MoveTo(target.Position, target)
128
		local Music = Instance.new("Sound", Dummy.Head)
129
		Music.SoundId = "http://www.roblox.com/asset/?id=224299497"
130
		Music.Looped = false
131
		Music.Volume = 1
132
		Music:Play()
133
		Dummy["Left Arm"].Transparency = 0
134
		Dummy["Right Arm"].Transparency = 0
135
		Dummy["Torso"].Transparency = 0
136
		Dummy["Neck"].Transparency = 0
137
		Dummy["Left Leg"].Transparency = 0
138
		Dummy["Right Leg"].Transparency = 0
139
        leye.Transparency = 0
140
        reye.Transparency = 0
141
		wait(3)
142
		Dummy["Left Arm"].Transparency = 1
143
		Dummy["Right Arm"].Transparency = 1
144
		Dummy["Torso"].Transparency = 1
145
		Dummy["Neck"].Transparency = 1
146
		Dummy["Left Leg"].Transparency = 1
147
		Dummy["Right Leg"].Transparency = 1
148
		leye.Transparency = 1
149
        reye.Transparency = 1
150
	end
151
end