SHOW:
|
|
- or go back to the newest paste.
1 | Tool = Instance.new("Tool") | |
2 | Part = Instance.new("Part") | |
3 | Part.Name = "Handle" | |
4 | Tool.Name = "up" | |
5 | - | Tool.Parent = workspace.Lucas_YT111 -- replace name |
5 | + | |
6 | - | Mesh = Instance.new("SpecialMesh") |
6 | + | Part.Size = Vector3.new(1.75,2,0.5) |
7 | - | Mesh.Parent = Part |
7 | + | Tool.Parent = owner.Character |
8 | - | Mesh.MeshId = "http://www.roblox.com/asset/?id=12221720" |
8 | + | local decal = Instance.new("Decal", Part) |
9 | - | Mesh.TextureId = "http://www.roblox.com/asset/?id=12224218" |
9 | + | decal.Face = Enum.NormalId.Front |
10 | - | Mesh.Scale = Vector3.new(1, 1, 1) |
10 | + | local happyFace = "http://www.roblox.com/asset/?id=9104817" |
11 | - | Tool = script.Parent |
11 | + | decal.Texture = happyFace |
12 | Part.BottomSurface = Enum.SurfaceType.Smooth | |
13 | Part.BrickColor = BrickColor.new("Pastel Blue") | |
14 | Part.TopSurface = Enum.SurfaceType.Smooth | |
15 | Part.brickColor = BrickColor.new("Pastel Blue") | |
16 | local Goodbye = Instance.new("Sound", owner.character.Head) | |
17 | Goodbye.SoundId = "rbxassetid://5574462925" | |
18 | Goodbye.Volume = 1 | |
19 | local A = Instance.new("Sound", owner.character.Head) | |
20 | A.SoundId = "rbxassetid://7323113985" | |
21 | A.Volume = 10 | |
22 | gotsomeone = false | |
23 | function damage(dmg) | |
24 | for i,v in pairs(workspace:GetDescendants()) do | |
25 | if v.ClassName == "Model" and v ~= character then | |
26 | local headdude = v:findFirstChild("Head") | |
27 | if headdude then | |
28 | if (headdude.Position - Part.Position).magnitude < 3.25 then | |
29 | if headdude.Parent ~= nil then | |
30 | local humm = v:findFirstChildOfClass("Humanoid") | |
31 | if humm then | |
32 | if humm.Parent ~= owner.Character then | |
33 | Goodbye:Play() | |
34 | if humm.Health > 0 then | |
35 | gotsomeone = true | |
36 | Goodbye.Ended:Wait() | |
37 | A:Play() | |
38 | humm.BreakJointsOnDeath = false | |
39 | wait(0.125) | |
40 | headdude:Destroy() | |
41 | gotsomeone = false | |
42 | end | |
43 | end | |
44 | end | |
45 | end | |
46 | end | |
47 | end | |
48 | end | |
49 | end | |
50 | end | |
51 | Tool.Activated:Connect(damage) | |
52 | ||
53 | while true do | |
54 | task.wait() | |
55 | if gotsomeone then | |
56 | for i,v in pairs(workspace:GetDescendants()) do | |
57 | if v.ClassName == "Model" and v ~= character then | |
58 | local headdude = v:findFirstChild("Head") | |
59 | if headdude then | |
60 | if (headdude.Position - Part.Position).magnitude < 3.25 then | |
61 | if headdude.Parent ~= nil then | |
62 | local humm = v:findFirstChildOfClass("Humanoid") | |
63 | if humm then | |
64 | if humm.Parent ~= owner.Character then | |
65 | owner.Character.HumanoidRootPart.CFrame = CFrame.new(owner.Character.HumanoidRootPart.Position, Vector3.new(headdude.Position.x,owner.Character.HumanoidRootPart.Position.y,headdude.Position.z)) | |
66 | end | |
67 | end | |
68 | end | |
69 | end | |
70 | end | |
71 | end | |
72 | end | |
73 | end | |
74 | end |