Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local debris = game:GetService("Debris")
- Bullet = Instance.new("SpawnLocation", owner.Character)
- Bullet.Position = Vector3.new(1000000,1000000,1000000)
- Bullet.Anchored = true
- Bullet.CanCollide = false
- Bullet.Enabled = false
- Tool = Instance.new("Tool")
- Tool.Name = "Shotgun"
- Part = Instance.new("Part")
- Part.Name = "Handle"
- Part.Parent = Tool
- Part.Size = Vector3.new(0.47466666666,1.67733333333,3.77766666667)
- Tool.GripPos = Vector3.new(0,0,1.63883333334)
- Tool.Parent = owner.Character
- local E = Instance.new("RemoteEvent", owner.Character)
- E.Name = "The"
- Bullet.BrickColor = BrickColor.new("Bright yellow")
- Mesh = Instance.new("SpecialMesh")
- Mesh.Parent = Part
- Mesh.MeshId = "http://www.roblox.com/asset/?id=553398821"
- Mesh.TextureId = "http://www.roblox.com/asset/?id=553398915"
- Mesh.Scale = Vector3.new(0.333333333333, 0.333333333333, 0.333333333333)
- local Pow = Instance.new("Sound", owner.character.Head)
- Pow.SoundId = "rbxassetid://3810328903"
- Pow.Volume = 2
- NLS([[
- Tool = owner.Character:WaitForChild("Shotgun")
- local E = owner.Character:WaitForChild("The")
- local toolout = false
- Tool.Equipped:Connect(function()
- toolout = true
- end)
- Tool.Unequipped:Connect(function()
- toolout = false
- end)
- mouse = owner:GetMouse()
- mouse.Button1Down:Connect(function()
- if toolout then
- local pos = mouse.Hit.Position
- E:FireServer(pos)
- end
- end)
- ]],owner.PlayerGui)
- E.OnServerEvent:Connect(function(player, pos)
- Pow:Play()
- for i = 1, 5 do
- position = pos + Vector3.new(math.random(-1,1),math.random(-1,1),math.random(-1,1))
- local params = RaycastParams.new()
- params.FilterDescendantsInstances = {owner.Character}
- params.FilterType = Enum.RaycastFilterType.Blacklist
- local origin = Part.Position
- local direction = (position - origin).Unit*300
- local result = game.Workspace:Raycast(origin, direction, params)
- local intersection = result and result.Position or origin + direction
- local distance = (origin - intersection).Magnitude + 5
- local bullet_clone = Bullet:Clone()
- bullet_clone.Size = Vector3.new(0.1, 0.1, distance)
- bullet_clone.CFrame = CFrame.new(origin, intersection)*CFrame.new(0, 0, -distance/2)
- bullet_clone.Parent = game.Workspace
- game:GetService("Debris"):AddItem(bullet_clone,0.25)
- if result then
- local part = result.Instance
- local humanoid = part.Parent:FindFirstChild("Humanoid") or part.Parent.Parent:FindFirstChild("Humanoid")
- if humanoid then
- if humanoid ~= owner.Character.Humanoid then
- humanoid.BreakJointsOnDeath = false
- humanoid.Health = humanoid.Health - 17.5
- local velocity = Instance.new("BodyVelocity", part)
- velocity.Velocity = bullet_clone.CFrame.lookVector * 20
- velocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- wait(0.125)
- velocity:Destroy()
- velocity = nil
- end
- end
- end
- end
- end)
Add Comment
Please, Sign In to add comment