SHOW:
|
|
- or go back to the newest paste.
| 1 | Tool = Instance.new("Tool")
| |
| 2 | - | Tool.Name = "Sword" |
| 2 | + | Tool.Name = "Gun" |
| 3 | - | Knife = Instance.new("Part")
|
| 3 | + | Gun = Instance.new("Part")
|
| 4 | - | Knife.Name = "Handle" |
| 4 | + | Gun.Name = "Handle" |
| 5 | - | Knife.Parent = Tool |
| 5 | + | Gun.Parent = Tool |
| 6 | - | Tool.Parent = workspace.Lucas_YT111 |
| 6 | + | Tool.Parent = owner.Character |
| 7 | - | Knife.Size = Vector3.new(0.82325, 2.1545, 6.25) |
| 7 | + | Gun.Size = Vector3.new(0.82325, 2.1545, 6.25) |
| 8 | - | Knife.Massless = true |
| 8 | + | Gun.Massless = true |
| 9 | - | Knife.CanCollide = true |
| 9 | + | Gun.CanCollide = true |
| 10 | - | myhum = owner.Character.Humanoid |
| 10 | + | local Pow = Instance.new("Sound", owner.character.Head)
|
| 11 | - | local stab = Instance.new("Sound", owner.character.Head)
|
| 11 | + | Pow.SoundId = "rbxassetid://5339941902" |
| 12 | - | stab.SoundId = "rbxassetid://663369157" |
| 12 | + | Pow.Volume = 1 |
| 13 | - | stab.Volume = 1 |
| 13 | + | |
| 14 | - | stab.Looped = true |
| 14 | + | |
| 15 | Mesh.Parent = Gun | |
| 16 | Mesh.MeshId = "http://www.roblox.com/asset/?id=868963093" | |
| 17 | - | Mesh.Parent = Knife |
| 17 | + | Mesh.TextureId = "http://www.roblox.com/asset/?id=868963099" |
| 18 | - | Mesh.MeshId = "http://www.roblox.com/asset/?id=6938825994" |
| 18 | + | Mesh.Scale = Vector3.new(0.01, 0.01, 0.01) |
| 19 | - | Mesh.TextureId = "http://www.roblox.com/asset/?id=6938826036" |
| 19 | + | toolout = false |
| 20 | - | Mesh.Scale = Vector3.new(0.125, 0.125, 0.125) |
| 20 | + | owner = nil |
| 21 | local E = Instance.new("RemoteEvent",Tool.Parent)
| |
| 22 | local gunlocal = [[ | |
| 23 | Tool = owner.Character:WaitForChild("Gun")
| |
| 24 | - | local Anim = Instance.new("StringValue")
|
| 24 | + | local E = Tool.Parent:FindFirstChildWhichIsA("RemoteEvent")
|
| 25 | - | Anim.Name = "toolanim" |
| 25 | + | |
| 26 | - | Anim.Value = "Lunge" |
| 26 | + | |
| 27 | - | Anim.Parent = Tool |
| 27 | + | |
| 28 | - | wait(0.25) |
| 28 | + | |
| 29 | end | |
| 30 | - | wait(0.40) |
| 30 | + | |
| 31 | Mouse.Button1Down:Connect(ButtonDown) | |
| 32 | ]] | |
| 33 | Tool.Equipped:Connect(function() | |
| 34 | pcall(function() | |
| 35 | - | function thinghere(plr,action,otherPart) |
| 35 | + | toolout = true |
| 36 | if game:GetService("Players"):GetPlayerFromCharacter(Tool.Parent) ~= owner then
| |
| 37 | - | local partParent = otherPart.Parent |
| 37 | + | owner = game:GetService("Players"):GetPlayerFromCharacter(Tool.Parent)
|
| 38 | - | local humanoid = partParent:FindFirstChildWhichIsA("Humanoid")
|
| 38 | + | NLS(gunlocal,owner.PlayerGui) |
| 39 | - | if humanoid ~= "myhum" and humanoid then |
| 39 | + | |
| 40 | - | if not isTouched then |
| 40 | + | |
| 41 | - | isTouched = true |
| 41 | + | |
| 42 | - | humanoid.BreakJointsOnDeath = false |
| 42 | + | |
| 43 | - | if humanoid.Health ~= 0 then |
| 43 | + | Tool.Unequipped:Connect(function() |
| 44 | - | humanoid.Health = 0 |
| 44 | + | toolout = false |
| 45 | - | wait(0.75) |
| 45 | + | |
| 46 | - | isTouched = false |
| 46 | + | |
| 47 | Tool.Activated:connect(function() | |
| 48 | islunging = true | |
| 49 | Pow:Play() | |
| 50 | wait(0.65) | |
| 51 | islunging = false | |
| 52 | end) | |
| 53 | ||
| 54 | - | local E = Instance.new("RemoteEvent",NLS([[local E = script:FindFirstChildWhichIsA("RemoteEvent")
|
| 54 | + | |
| 55 | ||
| 56 | function thinghere(plr,action,part) | |
| 57 | if islunging then | |
| 58 | if part.Name ~= "Base" then | |
| 59 | part:Destroy() | |
| 60 | end | |
| 61 | end | |
| 62 | - | ]],owner.PlayerGui)) |
| 62 | + | |
| 63 | ||
| 64 | E.OnServerEvent:Connect(thinghere) | |
| 65 | - | Tool.Unequipped:connect(function() |
| 65 | + | Tool.Grip = CFrame.Angles(0,math.rad(90),0) |
| 66 | - | stab:Stop() |
| 66 | + | Tool.GripPos = Vector3.new(1,0,0) |