Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rayblacklist = {}
- tool = Instance.new("Tool",owner.Backpack)
- local shot = Instance.new("Sound")
- shot.SoundId = "rbxassetid://6839481031"
- shot.PlayOnRemove = true
- shot.TimePosition = 0.2
- shot.Volume = 2
- tool.Grip = CFrame.new(0,-0.5,-1.25) * CFrame.Angles(0,math.rad(190),0)
- local part = Instance.new("Part",script)
- part.Size = Vector3.new(0.25,1,7)
- part.Anchored = true
- part.CFrame = owner.Character.Head.CFrame * CFrame.new(5,0,0)
- mesh = Instance.new("SpecialMesh",part)
- mesh.TextureId = "rbxassetid://2492974190"
- mesh.MeshId = "rbxassetid://2492972199"
- mesh.Scale = Vector3.new(1,1,1)
- local part2 = Instance.new("Part",part)
- part2.Size = Vector3.new(0.25,1,3)
- part2.CFrame = owner.Character.Head.CFrame * CFrame.new(4.925,0.325,0.75)
- mesh2 = Instance.new("SpecialMesh",part2)
- local cf = part.CFrame:Inverse() * part2.CFrame
- weld = Instance.new("Weld",part)
- weld.Part0 = part2
- weld.Part1 = part
- weld.C1 = cf
- mesh2.TextureId = "rbxassetid://2492974637"
- mesh2.MeshId = "rbxassetid://2492972666"
- local sound = Instance.new("Sound",part)
- sound.Volume = 1
- sound.SoundId = "rbxassetid://5049374013"
- local sound2 = Instance.new("Sound",part)
- sound2.Volume = 1
- sound2.Looped = true
- sound2.SoundId = "rbxassetid://4993417047"
- local sound3 = Instance.new("Sound")
- sound3.Volume = 2
- sound3.PlayOnRemove = true
- local wel = Instance.new("Weld", owner.Character.Torso)
- wel.Part0 = owner.Character.Torso
- wel.Part1 = owner.Character["Right Arm"]
- wel.C0 = CFrame.new(1.45, 0.5, -0.85) * CFrame.Angles(math.rad(90),0,math.rad(-10))
- wel.Enabled = false
- local wel2 = Instance.new("Weld", part2)
- wel2.Part0 = part2
- wel2.Part1 = owner.Character["Left Arm"]
- wel2.C0 = CFrame.new(0.5, -0.5, 0) * CFrame.Angles(math.rad(85),0,math.rad(15))
- wel2.Enabled = false
- local shells = {"7836855576","7836855160","7836854786"}
- local insert = "4993417047"
- local times = 0
- local tweenService = game:GetService("TweenService")
- local timeToFade = 0.25
- local object = weld
- local object2 = wel
- local object3 = tool
- local tweenInfo = TweenInfo.new(timeToFade,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
- local goal = {}
- goal.C0 = CFrame.new(0,0,0.6)
- local tween = tweenService:Create(object, tweenInfo, goal)
- local goal2 = {}
- goal2.C0 = CFrame.new(0,0,0)
- local tween2 = tweenService:Create(object, tweenInfo, goal2)
- local goal3 = {}
- goal3.C0 = CFrame.new(1.45, 0.5, -0.55) * CFrame.Angles(math.rad(100),0,math.rad(-10))
- local tween3 = tweenService:Create(object2, tweenInfo, goal3)
- local goal4 = {}
- goal4.C0 = CFrame.new(1.45, 0.5, -0.85) * CFrame.Angles(math.rad(90),0,math.rad(-10))
- local tween4 = tweenService:Create(object2, tweenInfo, goal4)
- local goal5 = {}
- goal5.Grip = CFrame.new(0,-0.5,-1.0625) * CFrame.Angles(0,math.rad(190),0)
- local tween5 = tweenService:Create(object3, tweenInfo, goal5)
- local goal6 = {}
- goal6.Grip = CFrame.new(0,-0.5,-1.25) * CFrame.Angles(0,math.rad(190),0)
- local tween6 = tweenService:Create(object3, tweenInfo, goal6)
- sound2.DidLoop:Connect(function(_, timess)
- if timess == 5 then
- sound2:Stop()
- times = 0
- end
- end)
- part.Anchored = false
- part.Name = "Handle"
- part2.CanCollide = false
- part.Parent = tool
- canfire = true
- mesh2.Scale = Vector3.new(1,1,1)
- function pump()
- sound:Play()
- tween:Play()
- tween3:Play()
- tween5:Play()
- coroutine.wrap(function()
- tween3.Completed:Wait()
- tween4:Play()
- tween6:Play()
- end)()
- times += 1
- if times == 5 then
- repeat
- task.wait()
- until sound.TimePosition >= 0.25
- sound:Pause()
- sound2:Play()
- local magdebris3 = Instance.new("SpawnLocation",workspace)
- magdebris3.Enabled = false
- magdebris3.Shape = "Cylinder"
- local magdebris4 = Instance.new("SpawnLocation",workspace)
- magdebris4.Enabled = false
- magdebris4.Shape = "Cylinder"
- magdebris4.CanCollide = false
- magdebris4.Massless = true
- local shellweld = Instance.new("Weld",magdebris3)
- shellweld.Part0 = magdebris4
- shellweld.Part1 = magdebris3
- shellweld.C0 = CFrame.new(-0.15,0,0)
- game:GetService("Debris"):AddItem(magdebris3,10)
- game:GetService("Debris"):AddItem(magdebris4,10)
- magdebris3.Size = Vector3.new(0.35,0.125,0.125)
- magdebris4.Size = Vector3.new(0.075,0.15,0.15)
- magdebris3.Color = Color3.fromRGB(230, 37, 37)
- magdebris4.Color = Color3.fromRGB(237, 203, 31)
- magdebris3.CFrame = part2.CFrame * CFrame.new(-0.0325,0.0625,-0.475) * CFrame.Angles(0,math.rad(90),0)
- magdebris3.Material = "SmoothPlastic"
- magdebris4.Material = "SmoothPlastic"
- magdebris3.Reflectance = 0.1
- magdebris4.Reflectance = 0.1
- magdebris3:ApplyImpulse(part2.CFrame.RightVector * -0.015 + part2.CFrame.upVector * 0.025)
- coroutine.wrap(function()
- wait(0.125)
- while true do
- task.wait()
- if magdebris3.Velocity.y <= 1 and magdebris3.Velocity.y >= -1 then
- pcall(function()
- sound3.SoundId = "rbxassetid://"..shells[math.random(1,3)]
- sound3.Parent = magdebris3
- sound3.Parent = nil
- end)
- break
- end
- end
- end)()
- repeat
- wait()
- until times == 0
- sound:Play()
- repeat
- task.wait()
- until sound.TimePosition >= 0.35
- else
- local magdebris3 = Instance.new("SpawnLocation",workspace)
- magdebris3.Enabled = false
- magdebris3.Shape = "Cylinder"
- local magdebris4 = Instance.new("SpawnLocation",workspace)
- magdebris4.Enabled = false
- magdebris4.Shape = "Cylinder"
- magdebris4.CanCollide = false
- magdebris4.Massless = true
- local shellweld = Instance.new("Weld",magdebris3)
- shellweld.Part0 = magdebris4
- shellweld.Part1 = magdebris3
- shellweld.C0 = CFrame.new(-0.15,0,0)
- game:GetService("Debris"):AddItem(magdebris3,10)
- game:GetService("Debris"):AddItem(magdebris4,10)
- magdebris3.Size = Vector3.new(0.35,0.125,0.125)
- magdebris4.Size = Vector3.new(0.075,0.15,0.15)
- magdebris3.Color = Color3.fromRGB(230, 37, 37)
- magdebris4.Color = Color3.fromRGB(237, 203, 31)
- magdebris3.CFrame = part2.CFrame * CFrame.new(-0.0325,0.0625,-1.125) * CFrame.Angles(0,math.rad(90),0)
- magdebris3.Material = "SmoothPlastic"
- magdebris4.Material = "SmoothPlastic"
- magdebris3.Reflectance = 0.1
- magdebris4.Reflectance = 0.1
- magdebris3:ApplyImpulse(part2.CFrame.RightVector * 0.015 + part2.CFrame.upVector * 0.025)
- coroutine.wrap(function()
- wait(0.125)
- while true do
- task.wait()
- if magdebris3.Velocity.y <= 1 and magdebris3.Velocity.y >= -1 then
- pcall(function()
- sound3.SoundId = "rbxassetid://"..shells[math.random(1,3)]
- sound3.Parent = magdebris3
- sound3.Parent = nil
- end)
- break
- end
- end
- end)()
- repeat
- task.wait()
- until sound.TimePosition >= 0.25
- end
- tween2:Play()
- canfire = true
- end
- hitsomething = Instance.new("Sound", script)
- hitsomething.PlayOnRemove = true
- canfire = true
- toolout = false
- tool.Equipped:Connect(function()
- toolout = true
- wel2.Enabled = true
- wel.Enabled = true
- end)
- tool.Unequipped:Connect(function()
- toolout = false
- wel2.Enabled = false
- wel.Enabled = false
- end)
- local E = Instance.new("RemoteEvent",owner.Character)
- NLS([[
- local E = owner.Character:FindFirstChildWhichIsA("RemoteEvent")
- local Mouse = owner:GetMouse()
- function ButtonDown()
- if Mouse.Target ~= nil then
- E:FireServer(Mouse.Hit,5)
- end
- end
- Mouse.Button1Down:Connect(ButtonDown)
- ]],owner.PlayerGui)
- E.OnServerEvent:Connect(function(plr,hitp,damage)
- if toolout and canfire then
- canfire = false
- coroutine.wrap(function()
- pump()
- end)()
- shot.Parent = part
- shot.Parent = nil
- coroutine.wrap(function()
- for i = 1, 16 do
- task.wait()
- coroutine.wrap(function()
- ang = CFrame.Angles(0,0,math.pi * 2 * math.random()) * CFrame.Angles(math.random() * math.rad(15),0,0)
- dir = part.Position + part.CFrame.lookVector * -3.75 + part.CFrame.upVector * 0.25
- dir = (CFrame.new(dir,hitp.Position) * ang).lookVector
- local params = RaycastParams.new()
- params.FilterDescendantsInstances = {part, owner.Character,rayblacklist}
- params.FilterType = Enum.RaycastFilterType.Blacklist
- local result = game.Workspace:Raycast(part.Position + part.CFrame.lookVector * -3.75 + part.CFrame.upVector * 0.25, dir * 500,params)
- local bul = Instance.new("SpawnLocation",script)
- bul.Enabled = false
- bul.Anchored = true
- table.insert(rayblacklist,bul)
- local x,y,z = CFrame.new(part.Position + part.CFrame.lookVector * -3.75 + part.CFrame.upVector * 0.25,hitp.Position):ToEulerAnglesXYZ()
- bul.CFrame = CFrame.new(part.Position + part.CFrame.lookVector * -3.75) * CFrame.Angles(x,y,z) * ang
- bul.Size = Vector3.new(0.1,0.1,1)
- bul.CanCollide = false
- bul.Material = "Neon"
- if not result then
- game:GetService("Debris"):AddItem(bul,5)
- local tweenService = game:GetService("TweenService")
- local timeToFade = 5
- local object = bul
- local tweenInfo = TweenInfo.new(timeToFade)
- local goal = {}
- goal.CFrame = bul.CFrame * CFrame.new(0,0,-1000)
- goal.Transparency = 1
- local tween = tweenService:Create(object, tweenInfo, goal)
- tween:Play()
- elseif result then
- game:GetService("Debris"):AddItem(bul,0.25)
- local tweenService = game:GetService("TweenService")
- local timeToFade = 0.25
- local object = bul
- local tweenInfo = TweenInfo.new(timeToFade)
- local goal = {}
- local x,y,z = CFrame.new(part.Position + part.CFrame.lookVector * -3.75 + part.CFrame.upVector * 0.25,hitp.Position):ToEulerAnglesXYZ()
- goal.CFrame = bul.CFrame * CFrame.new(0,0,(bul.Position - result.Position).Magnitude * -2)
- local tween = tweenService:Create(object, tweenInfo, goal)
- tween:Play()
- local whathit = result.Instance
- local hole = Instance.new("SpawnLocation",workspace)
- hole.Enabled = false
- table.insert(rayblacklist,hole)
- hole.Shape = "Cylinder"
- hole.CanCollide = false
- hole.Size = Vector3.new(0.02,0.25,0.25)
- hole:BreakJoints()
- hole.Position = result.Position
- local currentRightVector = whathit.CFrame.RightVector
- local upVector = result.Normal
- local newFacialVector = currentRightVector:Cross(upVector)
- hole.CFrame = CFrame.fromMatrix(hole.Position, currentRightVector, upVector, newFacialVector) * CFrame.Angles(0,0,math.rad(90))
- local holeweld = Instance.new("WeldConstraint",whathit)
- holeweld.Part0 = hole
- holeweld.Part1 = whathit
- if whathit.Material == "Glass" or whathit.Material == Enum.Material.Glass then
- whathit:Destroy()
- end
- local humanoid = whathit.Parent:FindFirstChild("Humanoid") or whathit.Parent.Parent:FindFirstChild("Humanoid")
- hole.Color = Color3.fromRGB()
- hitsomething.Parent = hole
- local whatsound = math.random(1,2)
- if whatsound == 1 and not humanoid then
- hitsomething.SoundId = "rbxassetid://4427234167"
- hitsomething.Volume = 0.25
- hitsomething.Parent = nil
- elseif whatsound == 2 and not humanoid then
- hitsomething.SoundId = "rbxassetid://4427236368"
- hitsomething.Volume = 0.25
- hitsomething.Parent = nil
- end
- task.wait()
- if humanoid then
- humanoid.Health = humanoid.Health - damage
- end
- game:GetService("Debris"):AddItem(hole,30)
- if humanoid then
- hitsomething.Parent = hole
- hitsomething.SoundId = "rbxassetid://7441119598"
- hitsomething.Volume = 1
- task.wait()
- hitsomething.Parent = nil
- hole.BrickColor = BrickColor.new("Maroon")
- coroutine.wrap(function()
- for i = 1, 2 do
- wait(0.125)
- local bloodpartfloor = Instance.new("SpawnLocation", workspace)
- bloodpartfloor.Enabled = false
- bloodpartfloor.CanCollide = false
- local random2 = math.random(-5,5)
- local random3 = math.random(-5,5)
- bloodpartfloor.Size = Vector3.new(0.005,0.25,0.25)
- bloodpartfloor.CanCollide = false
- bloodpartfloor.Material = "Glass"
- bloodpartfloor.Shape = "Cylinder"
- bloodpartfloor.Anchored = true
- table.insert(rayblacklist,bloodpartfloor)
- local params2 = RaycastParams.new()
- params2.FilterDescendantsInstances = {whathit, owner.Character,rayblacklist}
- params2.FilterType = Enum.RaycastFilterType.Blacklist
- local result2 = workspace:Raycast(whathit.Position + Vector3.new(random2,0,random3), whathit.Position + Vector3.new(random2,-300,random3), params2)
- if result2 then
- bloodpartfloor.Position = result2.Position
- local currentRightVector2 = whathit.CFrame.RightVector
- local upVector2 = result2.Normal
- local newFacialVector2 = currentRightVector2:Cross(upVector2)
- bloodpartfloor.CFrame = CFrame.fromMatrix(bloodpartfloor.Position, currentRightVector2, upVector2, newFacialVector2) * CFrame.Angles(0,0,math.rad(90))
- bloodpartfloor.BrickColor = BrickColor.new("Maroon")
- game:GetService("Debris"):AddItem(bloodpartfloor,25)
- local tweenService = game:GetService("TweenService")
- local timeToFade = 10
- local object = bloodpartfloor
- local tweenInfo = TweenInfo.new(timeToFade)
- local goal = {}
- local random = math.random(0.25,5)
- goal.Size = Vector3.new(0.05,random,random)
- local grow = tweenService:Create(object, tweenInfo, goal)
- grow:Play()
- end
- end
- end)()
- end
- end
- end)()
- end
- end)()
- end
- end)
Add Comment
Please, Sign In to add comment