local player = game.Players.LocalPlayer local character = player.Character local used = false local tool = Instance.new("Tool", player.Backpack) tool.Name = "Pistol" tool.GripPos = Vector3.new(0.5, 0, 0) tool.GripForward = Vector3.new(-1, 0, 0) tool.GripUp = Vector3.new(0, 1, 0) tool.GripRight = Vector3.new(0, 0, -1) local handle = Instance.new("Part", tool) handle.Name = "Handle" handle.Size = Vector3.new(1, 1, 1) handle.BrickColor = BrickColor.new("Black") local mesh = Instance.new("SpecialMesh", handle) mesh.MeshId = "rbxassetid://4112161930" mesh.Scale = Vector3.new(0.03, 0.03, 0.03) local shoot = Instance.new("Sound", handle) shoot.SoundId = "rbxassetid://12222140" tool.Activated:Connect(function() if not used then shoot:Play() used = true local bullet = Instance.new("Part", workspace) bullet.Size = Vector3.new(0.3, 0.3, 0.3) bullet.BrickColor = BrickColor.new("New Yeller") bullet.Position = handle.Position + Vector3.new(0, 1.5, 0) bullet.Velocity = character.HumanoidRootPart.CFrame.LookVector * 150 local sound = Instance.new("Sound", bullet) sound.SoundId = "rbxassetid://12221984" sound.PlayOnRemove = true game:GetService("Debris"):AddItem(bullet, 2) bullet.Touched:Connect(function(hit) if hit ~= handle and hit.Parent ~= character then Instance.new("Explosion", workspace).Position = bullet.Position bullet:Destroy() end if hit.Locked == false then hit.Anchored = false end end) wait(2) used = false end end)