Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function doomlaser()
- local tween = game:GetService("TweenService")
- local spread=Vector3.new((math.random(-1,0)+math.random())*7,(math.random(-1,0)+math.random())*7,(math.random(-1,0)+math.random())*7)*(prt.Position-mouse.Hit.p).magnitude/60
- local TheHit=mouse.Hit.p
- local MouseLook=CFrame.new((prt.Position+TheHit)/2,TheHit+spread/16)
- local hit,pos = rayCast(prt.Position,MouseLook.lookVector,1000,laser)
- local list = {}
- table.insert(list,prt)
- local laser = Instance.new("Part",fold)
- local mag=(prt.Position - pos).magnitude
- local Halfway = ((pos)/2)
- val = val + 1
- val = val%9
- if val==1 then
- sond1.Pitch = (math.random(40,60)/100)
- sond1:Play()
- end
- if val==2 then
- sond2.Pitch = (math.random(40,60)/100)
- sond2:Play()
- end
- if val==3 then
- sond3.Pitch = (math.random(40,60)/100)
- sond3:Play()
- end
- if val==4 then
- sond4.Pitch = (math.random(40,60)/100)
- sond4:Play()
- end
- if val==5 then
- sond5.Pitch = (math.random(40,60)/100)
- sond5:Play()
- end
- if val==6 then
- sond6.Pitch = (math.random(40,60)/100)
- sond6:Play()
- end
- if val==7 then
- sond7.Pitch = (math.random(40,60)/100)
- sond7:Play()
- end
- if val==8 then
- sond8.Pitch = (math.random(40,60)/100)
- sond8:Play()
- end
- laser.Anchored = true
- laser.Material = "Neon"
- laser.CanCollide = false
- laser.Size = Vector3.new(0.1,0.1,mag)
- laser.BrickColor = BrickColor.new("Really red")
- laser.CFrame = CFrame.new((prt.Position+pos)/2,pos)
- game:GetService("Debris"):AddItem(laser,1.05)
- --print(mag)
- twen:Create(laser, TweenInfo.new(1,Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),
- {Size = Vector3.new(laser.Size.X+6,laser.Size.Y+6,laser.Size.Z), Transparency = 1, Orientation = Vector3.new(laser.Orientation.X,laser.Orientation.Y,laser.Orientation.Z+math.random(-90,90))}-- ? left,right,
- ):Play()
- for _,i in pairs(hit.Parent:GetDescendants()) do
- if i:IsA("Part") or i:IsA("WedgePart") or i:IsA("TrussPart") or i:IsA("CornerWedgePart") or i:IsA("BasePart") or i:IsA("MeshPart") then
- if i.Parent~= workspace then
- local bv = Instance.new("BodyVelocity",i)
- --bv:Destroy()
- bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- bv.Velocity = MouseLook.lookVector*2000
- i.Anchored = false
- spawn(function()
- wait(0.1)
- bv:Destroy()
- end)
- end
- end
- end
- if(hit.Parent:FindFirstChildWhichIsA("Humanoid")== nil and hit.Parent:IsA("Accessory"))then
- if hit.Parent:FindFirstChildWhichIsA("Humanoid") == nil and hit.Parent:IsA("Accessory") and hit.Name ~= "Base" and hit.Parent.Name ~= Player.Name then
- for _,i in pairs(hit.Parent:GetChildren()) do
- --i:BreakJoints()
- local bv = Instance.new("BodyVelocity",i)
- bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- bv.Velocity = MouseLook.lookVector*2000
- spawn(function()
- wait(0.1)
- bv:Destroy()
- --i:BreakJoints()
- end)
- spawn(function()
- wait(0.1)
- --i:Destroy()
- end)
- end
- end
- end
- if(hit.Parent:FindFirstChildWhichIsA("Humanoid")~= nil)then
- if hit.Parent:FindFirstChildWhichIsA("Humanoid") ~= nil and hit.Name ~= "Base" and hit.Parent.Name ~= Player.Name then
- for _,i in pairs(hit.Parent:GetChildren()) do
- --i:BreakJoints()
- local bv = Instance.new("BodyVelocity",i)
- bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- bv.Velocity = MouseLook.lookVector*2000
- spawn(function()
- wait(0.1)
- bv:Destroy()
- --i:BreakJoints()
- end)
- spawn(function()
- wait(0.1)
- --i:Destroy()
- end)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement