SHOW:
|
|
- or go back to the newest paste.
1 | function blood(hit) | |
2 | local name = hit.Name | |
3 | if (name == "edvardsonic") then | |
4 | local human = hit.Parent:findFirstChild("Humanoid") or hit.Parent:findFirstChild("Zombie") or hit.Parent:findFirstChild("Alien") | |
5 | if (human ~= nil) then | |
6 | local h = hit.Parent:findFirstChild("Head") | |
7 | local t = hit.Parent:findFirstChild("Torso") | |
8 | if (h ~= nil) and (t ~= nil) then | |
9 | local x = h.Position.x | |
10 | local y = h.Position.y | |
11 | local z = h.Position.z | |
12 | local x1 = x + 1 | |
13 | local y1 = y + 1 | |
14 | local z1 = z + 1 | |
15 | local x2 = x - 1 | |
16 | local y2 = y - 1 | |
17 | local z2 = z - 1 | |
18 | local b1 = Instance.new("Part") | |
19 | b1.Parent = h.Parent | |
20 | b1.BrickColor = BrickColor.new(21) | |
21 | b1.formFactor = 2 | |
22 | b1.Name = "Part" | |
23 | b1.Size = Vector3.new(1, 0.4, 1) | |
24 | b1.Position = Vector3.new(x, y1, z) | |
25 | b1.BottomSurface = 1 | |
26 | b1.TopSurface = 1 | |
27 | b1.Locked = true | |
28 | local b2 = Instance.new("Part") | |
29 | b2.Parent = h.Parent | |
30 | b2.BrickColor = BrickColor.new(21) | |
31 | b2.formFactor = 2 | |
32 | b2.Name = "Part" | |
33 | b2.Size = Vector3.new(1, 0.4, 1) | |
34 | b2.Position = Vector3.new(x1, y, z) | |
35 | b2.BottomSurface = 1 | |
36 | b2.TopSurface = 1 | |
37 | b2.Locked = true | |
38 | local b3 = Instance.new("Part") | |
39 | b3.Parent = h.Parent | |
40 | b3.BrickColor = BrickColor.new(21) | |
41 | b3.formFactor = 2 | |
42 | b3.Name = "Part" | |
43 | b3.Size = Vector3.new(1, 0.4, 1) | |
44 | b3.Position = Vector3.new(x, y, z1) | |
45 | b3.BottomSurface = 1 | |
46 | b3.TopSurface = 1 | |
47 | b3.Locked = true | |
48 | local b4 = Instance.new("Part") | |
49 | b4.Parent = h.Parent | |
50 | b4.BrickColor = BrickColor.new(21) | |
51 | b4.formFactor = 2 | |
52 | b4.Name = "Part" | |
53 | b4.Size = Vector3.new(1, 0.4, 1) | |
54 | b4.Position = Vector3.new(x, y2, z) | |
55 | b4.BottomSurface = 1 | |
56 | b4.TopSurface = 1 | |
57 | b4.Locked = true | |
58 | local b5 = Instance.new("Part") | |
59 | b5.Parent = h.Parent | |
60 | b5.BrickColor = BrickColor.new(21) | |
61 | b5.formFactor = 2 | |
62 | b5.Name = "Part" | |
63 | b5.Size = Vector3.new(1, 0.4, 1) | |
64 | b5.Position = Vector3.new(x2, y, z) | |
65 | b5.BottomSurface = 1 | |
66 | b5.TopSurface = 1 | |
67 | b5.Locked = true | |
68 | local b6 = Instance.new("Part") | |
69 | b6.Parent = h.Parent | |
70 | b6.BrickColor = BrickColor.new(21) | |
71 | b6.formFactor = 2 | |
72 | b6.Name = "Part" | |
73 | b6.Size = Vector3.new(1, 0.4, 1) | |
74 | b6.Position = Vector3.new(x, y, z2) | |
75 | b6.BottomSurface = 1 | |
76 | b6.TopSurface = 1 | |
77 | b6.Locked = true | |
78 | h:remove() | |
79 | local bd1 = Instance.new("Decal") | |
80 | bd1.Parent = t | |
81 | bd1.Name = "Blood" | |
82 | bd1.Texture = "http://www.roblox.com/asset/?id=2520255" | |
83 | bd1.Face = 0 | |
84 | local bd2 = Instance.new("Decal") | |
85 | bd2.Parent = t | |
86 | bd2.Name = "Blood" | |
87 | bd2.Texture = "http://www.roblox.com/asset/?id=2520270" | |
88 | bd2.Face = 1 | |
89 | local bd3 = Instance.new("Decal") | |
90 | bd3.Parent = t | |
91 | bd3.Name = "Blood" | |
92 | bd3.Texture = "http://www.roblox.com/asset/?id=2520255" | |
93 | bd3.Face = 2 | |
94 | local bd4 = Instance.new("Decal") | |
95 | bd4.Parent = t | |
96 | bd4.Name = "Blood" | |
97 | bd4.Texture = "http://www.roblox.com/asset/?id=2520255" | |
98 | bd4.Face = 3 | |
99 | local bd5 = Instance.new("Decal") | |
100 | bd5.Parent = t | |
101 | bd5.Name = "Blood" | |
102 | bd5.Texture = "http://www.roblox.com/asset/?id=2520270" | |
103 | bd5.Face = 4 | |
104 | local bd6 = Instance.new("Decal") | |
105 | bd6.Parent = t | |
106 | bd6.Name = "Blood" | |
107 | bd6.Texture = "http://www.roblox.com/asset/?id=2520255" | |
108 | bd6.Face = 5 | |
109 | end | |
110 | end | |
111 | end | |
112 | end | |
113 | ||
114 | - | connection = script.Parent.Touched:connect(blood) |
114 | + | connection = script.Parent.edvardsonic:connect(blood) |