Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rayblacklist = {}
- canfire = true
- local times = 2
- local count = 0
- local ang
- local shot = Instance.new("Sound")
- shot.SoundId = "rbxassetid://6839481031"
- shot.PlayOnRemove = true
- shot.TimePosition = 0.2
- shot.Volume = 2
- tool = Instance.new("Tool",owner.Backpack)
- part = Instance.new("Part",tool)
- part.Name = "Handle"
- local Mesh2 = Instance.new("SpecialMesh")
- Mesh2.Parent = part
- Mesh2.MeshId = "http://www.roblox.com/asset/?id=4711447529"
- Mesh2.TextureId = "http://www.roblox.com/asset/?id=4711447557"
- Mesh2.Scale = Vector3.new(0.06666666666,0.06666666666,0.06666666666)
- part.Size = Vector3.new(0.4152,0.98326666666,3.33333333333)
- part2 = Instance.new("Part",owner.Character)
- part2.CanTouch = false
- part2.CanCollide = false
- local Mesh = Instance.new("SpecialMesh")
- Mesh.Parent = part2
- Mesh.MeshId = "http://www.roblox.com/asset/?id=4711447529"
- Mesh.TextureId = "http://www.roblox.com/asset/?id=4711447557"
- Mesh.Scale = Vector3.new(0.06666666666,0.06666666666,0.06666666666)
- part2.Size = Vector3.new(0.4152,0.98326666666,3.33333333333)
- local weld = Instance.new("Weld",owner.Character.HumanoidRootPart)
- weld.Part0 = part2
- weld.Part1 = owner.Character.HumanoidRootPart
- weld.C0 = CFrame.new(-0.75,0,0) * CFrame.Angles(0,math.rad(90),0) * CFrame.Angles(0,0,math.rad(45))
- tool.Equipped:Connect(function()
- toolout = true
- part2.Transparency = 1
- count += 1
- delay(0.75,function()
- if count ~= 1 then
- times = 6
- count = 0
- Mesh2.VertexColor = Vector3.new(1,0,0)
- else
- times = 2
- Mesh2.VertexColor = Vector3.new(1, 1, 1)
- count = 0
- end
- end)
- end)
- tool.Unequipped:Connect(function()
- toolout = false
- part2.Transparency = 0
- 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
- local damage = 4
- E:FireServer(Mouse.Hit,damage)
- end
- end
- Mouse.Button1Down:Connect(ButtonDown)
- Mouse.KeyDown:Connect(function(key)
- key = key:lower()
- if key == "q" and Mouse.Target ~= nil then
- E:FireServer(Mouse.Hit,nil,"true",Mouse.Target)
- wait(0.0625)
- owner.Character.Humanoid:ChangeState(Enum.HumanoidStateType.Physics)
- wait(0.065 * (owner.Character:FindFirstChildWhichIsA("Tool").Handle.Position - Mouse.Hit.Position).Magnitude)
- owner.Character.Humanoid.Touched:Wait()
- owner.Character.Humanoid:ChangeState(Enum.HumanoidStateType.Running)
- end
- end)
- ]],owner.PlayerGui)
- TweenService = game:GetService("TweenService")
- spininfo = TweenInfo.new(0.125,Enum.EasingStyle.Linear)
- spininfo2 = TweenInfo.new(0.0625,Enum.EasingStyle.Linear)
- spin = TweenService:Create(tool,spininfo,{Grip = CFrame.new(0,-0.5,1.5) * CFrame.Angles(math.rad(65),0,0)})
- Spin2 = TweenService:Create(tool,spininfo,{Grip = CFrame.new(0,-0.5,1.5)})
- recoil = TweenService:Create(tool,spininfo2,{Grip = CFrame.new(0,-0.5,1) * CFrame.Angles(math.rad(-25),0,0)})
- recoil2 = TweenService:Create(tool,spininfo2,{Grip = CFrame.new(0,-0.5,1.5)})
- spin.Completed:Connect(function()wait(0.125) Spin2:Play() end)
- recoil.Completed:Connect(function()wait(0.125) recoil2:Play() end)
- local isTouched = false
- hitsomething = Instance.new("Sound", script)
- hitsomething.PlayOnRemove = true
- local canhook = true
- E.OnServerEvent:Connect(function(plr,hitp,damage,key,hit)
- if key == nil then
- if toolout and canfire then
- canfire = false
- for i = 1, times do
- recoil:Play()
- shot.Parent = part
- shot.Parent = nil
- coroutine.wrap(function()
- for i = 1, 16 do
- task.wait()
- coroutine.wrap(function()
- if times ~= 2 then
- ang = CFrame.Angles(0,0,math.pi * 2 * math.random()) * CFrame.Angles(math.random() * math.rad(10),0,0)
- else
- ang = CFrame.Angles(0,0,math.pi * 2 * math.random()) * CFrame.Angles(math.random() * math.rad(15),0,0)
- end
- dir = part.Position
- 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 * 2, 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,hitp.Position):ToEulerAnglesXYZ()
- bul.CFrame = CFrame.new(part.Position + part.CFrame.lookVector * 2) * 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,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))
- if whathit.Anchored == false then
- local holeweld = Instance.new("WeldConstraint",whathit)
- holeweld.Part0 = hole
- holeweld.Part1 = whathit
- elseif whathit.Anchored == true then
- hole.Anchored = true
- end
- 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
- if times ~= 2 then
- humanoid.Health = humanoid.Health - damage * 4
- else
- humanoid.Health = humanoid.Health - damage
- end
- 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)()
- recoil2.Completed:Wait()
- end
- wait(0.125)
- spin:Play()
- wait(0.25)
- wait(0.125)
- canfire = true
- end
- elseif key ~= nil and canhook then
- canhook = false
- ropep = Instance.new("Part",script)
- ropep.CanCollide = false
- ropep.Anchored = true
- ropep.Size = Vector3.new(0.25,0.25,0.1)
- ropep.CFrame = part.CFrame
- local attachment0 = Instance.new("Attachment")
- attachment0.Parent = ropep
- local attachment1 = Instance.new("Attachment")
- attachment1.Parent = part
- alignposition = Instance.new("RopeConstraint")
- alignposition.Parent = ropep
- alignposition.Attachment0 = attachment0
- alignposition.Attachment1 = attachment1
- alignposition.Visible = true
- alignposition.Length = (part.Position - ropep.Position).Magnitude
- alignposition.Thickness = 0.25
- alignposition.Restitution = 0
- local tweenService = game:GetService("TweenService")
- local timeToFade = 0.0625
- local object = ropep
- local tweenInfo = TweenInfo.new(timeToFade)
- local goal = {}
- goal.CFrame = hitp
- local tween = tweenService:Create(object, tweenInfo, goal)
- tween:Play()
- task.wait()
- local tweenService = game:GetService("TweenService")
- local timeToFade = 0.0625
- local object = alignposition
- local tweenInfo = TweenInfo.new(timeToFade)
- local goal = {}
- goal.Length = (part.Position - hitp.Position).Magnitude
- local tween = tweenService:Create(object, tweenInfo, goal)
- tween:Play()
- wait(0.0625)
- ropep.Anchored = false
- local weld = Instance.new("WeldConstraint",ropep)
- weld.Part0 = hit
- weld.Part1 = ropep
- game:GetService("Debris"):AddItem(ropep,0.065 * (part.Position - ropep.Position).Magnitude)
- owner.Character.HumanoidRootPart:ApplyImpulse(Vector3.new(0,1000,0))
- local tweenService = game:GetService("TweenService")
- local timeToFade = 0.0625 * (part.Position - ropep.Position).Magnitude
- local object = alignposition
- local tweenInfo = TweenInfo.new(timeToFade)
- local goal = {}
- goal.Length = (part.Position - ropep.Position).Magnitude * 0.125
- local tween = tweenService:Create(object, tweenInfo, goal)
- tween:Play()
- wait(0.0625 * (part.Position - ropep.Position).Magnitude)
- owner.Character.HumanoidRootPart:ApplyImpulse(CFrame.new(part.Position,ropep.Position).lookVector * 5000)
- canhook = true
- end
- end)
- tool.Grip = CFrame.new(0,-0.5,1.5)
Add Comment
Please, Sign In to add comment