Advertisement
Guest User

die lmao

a guest
Nov 20th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 19.22 KB | None | 0 0
  1. local ai = script.Parent
  2.  
  3. local rs = game:GetService("RunService")
  4.  
  5. local canAttack = ai:WaitForChild("CanAttack")
  6. local rageMode = ai:WaitForChild("Rage")
  7.  
  8. local zom = ai:WaitForChild("Zombie")
  9.  
  10. local laserbeamPoint = ai:WaitForChild("LaserBeamPoint")
  11.  
  12. local staff = ai:WaitForChild("Handle")
  13. local staffpower = staff:WaitForChild("SpreadMagic")
  14. local torso = ai:WaitForChild("Torso")
  15.  
  16. local ignorefolder = Instance.new("Folder", game.Workspace)
  17. ignorefolder.Name = ai.Name
  18. ai.Parent = ignorefolder
  19.  
  20. local ignoreParts = {}
  21.  
  22. for i, v in pairs(ignorefolder:GetDescendants()) do
  23.     if v:IsA('BasePart') or v:IsA("MeshPart") then
  24.         table.insert(ignoreParts, v)
  25.     end
  26. end
  27.  
  28. local laserbeamRagePart1 = zom:LoadAnimation(script.LaserBeamRage1)
  29. local laserbeamRagePart2 = zom:LoadAnimation(script.LaserBeamRage2)
  30.  
  31. local spreadExplosion = zom:LoadAnimation(script.SpreadExplosion)
  32.  
  33. local explosiveThrow = zom:LoadAnimation(script.ExplosiveThrow)
  34. local floorSlam = zom:LoadAnimation(script.FloorSlam)
  35.  
  36. local spreadExplosionDmg = 75
  37. local laserbeamDmg = math.huge
  38.  
  39. local explosionDmg = 60
  40. local selfBlastDmg = 95
  41.  
  42. --ragemode dmg
  43.  
  44. local rspreadExplosionDmg = 150
  45. local rlaserbeamDmg = math.huge
  46.  
  47. local rexplosionDmg = 100
  48. local rselfBlastDmg = 175
  49.  
  50. --ragemode dmg
  51.  
  52. local maxSpreadExplosionAmount = 1
  53. local maxlaserBeamAmount = 1
  54.  
  55. local maxExplosionAmount = 4
  56. local maxSelfBlast = 1
  57.  
  58. local SpreadExplosionAmount = 1
  59. local laserBeamAmount = 1
  60.  
  61. local explosionAmount = 4
  62. local selfBlastAmount = 1
  63.  
  64. local canOperate = true
  65.  
  66. function findNearestTorso(pos)
  67.     local list = game.Workspace:children()
  68.     local torso = nil
  69.     local dist = 100000
  70.     local temp = nil
  71.     local human = nil
  72.     local temp2 = nil
  73.     for x = 1, #list do
  74.         temp2 = list[x]
  75.         if (temp2.className == "Model") and (temp2 ~= script.Parent) then
  76.             temp = temp2:findFirstChild("HumanoidRootPart")
  77.             human = temp2:findFirstChild("Humanoid")
  78.             if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  79.                 if (temp.Position - pos).magnitude < dist then
  80.                     torso = temp
  81.                     dist = (temp.Position - pos).magnitude
  82.                 end
  83.             end
  84.         end
  85.     end
  86.     return torso
  87. end
  88.  
  89. while true do
  90.     if canOperate == true and zom.Health > 0 then
  91.         local target = findNearestTorso(torso.Position)
  92.         if target ~= nil and zom.Health > 0 and canAttack.Value == true then
  93.             if (torso.CFrame.p - target.CFrame.p).magnitude > 15 and (torso.CFrame.p - target.CFrame.p).magnitude < 100 and zom.Health > 0 then
  94.                 while explosionAmount > 0 and zom.Health > 0 and canAttack.Value == true do
  95.                     explosiveThrow:Play()
  96.                     local speed, jump = zom.WalkSpeed, zom.JumpPower
  97.                     zom.WalkSpeed = 0
  98.                     zom.JumpPower = 0
  99.                     explosiveThrow.Stopped:Wait()
  100.                     zom.WalkSpeed = speed
  101.                     zom.JumpPower = jump
  102.                     explosionAmount = explosionAmount - 1
  103.                     local t = 1
  104.                     local g = Vector3.new(0, -game.Workspace.Gravity, 0)
  105.                     local x0 = staff.CFrame * Vector3.new(0, 1, 0)
  106.                     local v0 = (target.CFrame.p - x0 - 0.5*g*t*t)/t
  107.                     local blastOrb1 = Instance.new("Part", game.Workspace)
  108.                     blastOrb1.Name = "ExplosionBlastOrb"
  109.                     blastOrb1.Velocity = v0
  110.                     if rageMode.Value == false then
  111.                         blastOrb1.Color = Color3.fromRGB(0, 255, 255)
  112.                     else
  113.                         blastOrb1.Color = Color3.fromRGB(0, 0, 0)
  114.                     end
  115.                     blastOrb1.Material = Enum.Material.Neon
  116.                     blastOrb1.Rotation = Vector3.new(8,8,8)
  117.                     blastOrb1.Transparency = .6
  118.                     blastOrb1.CanCollide = false
  119.                     blastOrb1.Anchored = false
  120.                     blastOrb1.Size = Vector3.new(2, 2.25, 2)
  121.                     blastOrb1.CFrame = CFrame.new(x0)
  122.                     local emitBlock = Instance.new("Part", game.Workspace)
  123.                     emitBlock.Name = "EmitterBlock"
  124.                     emitBlock.Color = Color3.fromRGB(0, 0, 0)
  125.                     emitBlock.Material = Enum.Material.SmoothPlastic
  126.                     emitBlock.Rotation = Vector3.new(8,8,8)
  127.                     emitBlock.Transparency = 1
  128.                     emitBlock.CanCollide = false
  129.                     emitBlock.Anchored = false
  130.                     emitBlock.Massless = true
  131.                     emitBlock.Locked = true
  132.                     emitBlock.Size = Vector3.new(2, 2.25, 2)
  133.                     local motor = Instance.new("Motor6D", emitBlock)
  134.                     motor.Part0 = emitBlock
  135.                     motor.Part1 = blastOrb1
  136.                     motor.C0 = CFrame.new()
  137.                     motor.C1 = CFrame.new()
  138.                     local emit
  139.                     if rageMode.Value == false then
  140.                         emit = script.BlastOrbProjectile1:Clone()
  141.                         emit.Parent = emitBlock
  142.                         emit.Enabled = true
  143.                     else
  144.                         emit = script.BlastOrbProjectile2:Clone()
  145.                         emit.Parent = emitBlock
  146.                         emit.Enabled = true
  147.                     end
  148.                     local proSpin = script.ProjectileSpin:Clone()
  149.                     proSpin.Parent = blastOrb1
  150.                     proSpin.Disabled = false
  151.                     blastOrb1.Touched:Connect(function(hit)
  152.                         local once = true
  153.                         if hit and hit ~= emitBlock and hit ~= staffpower and hit.Parent and hit.Parent ~= ai and not hit:FindFirstChild("HThunderValue") and not hit:FindFirstChild("ExplosionValue") then
  154.                             if once == true then
  155.                                 once = false
  156.                                 emitBlock.Anchored = true
  157.                                 emit.Enabled = false
  158.                                 local harmlessThunder = Instance.new("Part", game.Workspace)
  159.                                 harmlessThunder.Name = "HarmlessThunderEffect"
  160.                                 if rageMode.Value == false then
  161.                                     harmlessThunder.Color = Color3.fromRGB(0, 255, 255)
  162.                                 else
  163.                                     harmlessThunder.Color = Color3.fromRGB(0, 0, 0)
  164.                                 end
  165.                                 harmlessThunder.Material = Enum.Material.Neon
  166.                                 harmlessThunder.Size = Vector3.new(15, math.huge, 15)
  167.                                 harmlessThunder.CFrame = CFrame.new(blastOrb1.Position)
  168.                                 harmlessThunder.CanCollide = false
  169.                                 harmlessThunder.Anchored = true
  170.                                 harmlessThunder.Transparency = .25
  171.                                 local friendlyPartValue = Instance.new("Folder", harmlessThunder)
  172.                                 friendlyPartValue.Name = "HThunderValue"
  173.                                 local thunderParticle = script.ThunderParticle:Clone()
  174.                                 thunderParticle.Parent = harmlessThunder
  175.                                 thunderParticle.Enabled = true
  176.                                 local thunderTEffect = script.ThunderTweenEffect:Clone()
  177.                                 thunderTEffect.Parent = harmlessThunder
  178.                                 thunderTEffect.Disabled = false
  179.                                 local blastOrb = Instance.new("Part", game.Workspace)
  180.                                 blastOrb.Name = "ExplosionBlast"
  181.                                 if rageMode.Value == false then
  182.                                     blastOrb.Color = Color3.fromRGB(0, 255, 255)
  183.                                 else
  184.                                     blastOrb.Color = Color3.fromRGB(0, 0, 0)
  185.                                 end
  186.                                 blastOrb.Material = Enum.Material.Neon
  187.                                 blastOrb.Size = Vector3.new(15, 25, 15)
  188.                                 blastOrb.CFrame = CFrame.new(blastOrb1.Position)
  189.                                 blastOrb.CanCollide = false
  190.                                 blastOrb.Anchored = true
  191.                                 blastOrb1:Destroy()
  192.                                 game:GetService("Debris"):AddItem(emitBlock, 2)
  193.                                 local specialMesh = Instance.new("SpecialMesh", blastOrb)
  194.                                 specialMesh.Name = "ExplosionMesh"
  195.                                 specialMesh.MeshId = "http://www.roblox.com/asset/?id=92588061"
  196.                                 specialMesh.MeshType = Enum.MeshType.FileMesh
  197.                                 specialMesh.Offset = Vector3.new(0, 0, -0.9)
  198.                                 specialMesh.Scale = Vector3.new(.25, .25, .25)
  199.                                 local friendlyPartValue2 = Instance.new("Folder", blastOrb)
  200.                                 friendlyPartValue2.Name = "ExplosionValue"
  201.                                 local tween1 = script.Tween:Clone()
  202.                                 tween1.Parent = blastOrb
  203.                                 tween1.Disabled = false
  204.                                 local tween2 = script.Tween2:Clone()
  205.                                 tween2.Parent = blastOrb
  206.                                 tween2.Disabled = false
  207.                                 local spin = script.Spin:Clone()
  208.                                 spin.Parent = blastOrb
  209.                                 spin.Disabled = false
  210.                                 blastOrb.Touched:Connect(function(hit)
  211.                                     if hit and hit ~= staffpower and hit.Parent then
  212.                                         if hit.className ~= "Accessory" or hit.className ~= "Hat" then
  213.                                             if not hit.Parent:FindFirstChild("AttackFilterBlast1") then
  214.                                                 local hum = hit.Parent:FindFirstChild("Humanoid")
  215.                                                 if (hum ~= nil) and (hum.Health > 0) then
  216.                                                     local filter = Instance.new("Folder", hit.Parent)
  217.                                                     filter.Name = "AttackFilterBlast1"
  218.                                                     hum:TakeDamage(explosionDmg)
  219.                                                     game:GetService("Debris"):AddItem(filter, 1)
  220.                                                 end
  221.                                             end
  222.                                         end
  223.                                     end
  224.                                 end)
  225.                             end
  226.                         end
  227.                     end)
  228.                     wait(0.55)
  229.                 end
  230.                 if explosionAmount <= 0 then
  231.                     wait(3)
  232.                     explosionAmount = maxExplosionAmount
  233.                 end
  234.             elseif (torso.CFrame.p - target.CFrame.p).magnitude < 15 then
  235.                 while selfBlastAmount > 0 and zom.Health > 0 and canAttack.Value == true do
  236.                     floorSlam:Play()
  237.                     local speed, jump = zom.WalkSpeed, zom.JumpPower
  238.                     zom.WalkSpeed = 0
  239.                     zom.JumpPower = 0
  240.                     floorSlam.Stopped:Wait()
  241.                     zom.WalkSpeed = speed
  242.                     zom.JumpPower = jump
  243.                     selfBlastAmount = selfBlastAmount - 1
  244.                     local blastOrb2 = Instance.new("Part", game.Workspace)
  245.                     blastOrb2.Name = "SelfBlastOrb"
  246.                     if rageMode.Value == false then
  247.                         blastOrb2.Color = Color3.fromRGB(0, 255, 255)
  248.                     else
  249.                         blastOrb2.Color = Color3.fromRGB(0, 0, 0)
  250.                     end
  251.                     blastOrb2.Material = Enum.Material.Neon
  252.                     blastOrb2.Size = Vector3.new(25, 25, 25)
  253.                     blastOrb2.CFrame = CFrame.new(ai.Head.Position)
  254.                     blastOrb2.CanCollide = false
  255.                     blastOrb2.Anchored = true
  256.                     local specialMesh = Instance.new("SpecialMesh", blastOrb2)
  257.                     specialMesh.Name = "ExplosionMesh"
  258.                     specialMesh.MeshId = "http://www.roblox.com/asset/?id=92588061"
  259.                     specialMesh.MeshType = Enum.MeshType.FileMesh
  260.                     specialMesh.Offset = Vector3.new(0, 2, -1.8)
  261.                     specialMesh.Scale = Vector3.new(.5, .5, .5)
  262.                     local tween1 = script.Tween:Clone()
  263.                     tween1.Parent = blastOrb2
  264.                     tween1.Disabled = false
  265.                     local tween2 = script.Tween2:Clone()
  266.                     tween2.Parent = blastOrb2
  267.                     tween2.Disabled = false
  268.                     local spin = script.Spin:Clone()
  269.                     spin.Parent = blastOrb2
  270.                     spin.Disabled = false
  271.                     blastOrb2.Touched:Connect(function(hit)
  272.                         if hit and hit ~= staffpower and hit.Parent then
  273.                             if hit.className ~= "Accessory" or hit.className ~= "Hat" then
  274.                                 if not hit.Parent:FindFirstChild("AttackFilterBlast1") then
  275.                                     local hum = hit.Parent:FindFirstChild("Humanoid")
  276.                                     if (hum ~= nil) and (hum.Health > 0) then
  277.                                         local filter = Instance.new("Folder", hit.Parent)
  278.                                         filter.Name = "AttackFilterBlast1"
  279.                                         hum:TakeDamage(selfBlastDmg)
  280.                                         game:GetService("Debris"):AddItem(filter, 1)
  281.                                     end
  282.                                 end
  283.                             end
  284.                         end
  285.                     end)
  286.                     wait(1)
  287.                 end
  288.                 if selfBlastAmount <= 0 then
  289.                     wait(2)
  290.                     selfBlastAmount = maxSelfBlast
  291.                 end
  292.             elseif (torso.CFrame.p - target.CFrame.p).magnitude > 100 and (torso.CFrame.p - target.CFrame.p).magnitude < 10000 and not rageMode.Value == true then
  293.                 while SpreadExplosionAmount > 0 and zom.Health > 0 and canAttack.Value == true do
  294.                     spreadExplosion:Play()
  295.                     local speed, jump = zom.WalkSpeed, zom.JumpPower
  296.                     zom.WalkSpeed = 0
  297.                     zom.JumpPower = 0
  298.                     spreadExplosion.Stopped:Wait()
  299.                     zom.WalkSpeed = speed
  300.                     zom.JumpPower = jump
  301.                     SpreadExplosionAmount = SpreadExplosionAmount - 1
  302.                     for i = 1, 10 do
  303.                     local t = 1
  304.                     local g = Vector3.new(0, -game.Workspace.Gravity, 0)
  305.                     local x0 = ai.Head.CFrame * Vector3.new(0, 20, 0)
  306.                     local v0 = (target.CFrame.p - x0 - 0.5*g*t*t)/t
  307.                     local blastOrb1 = Instance.new("Part", game.Workspace)
  308.                     blastOrb1.Name = "ExplosionBlastOrb"
  309.                     blastOrb1.Velocity = v0
  310.                     if rageMode.Value == false then
  311.                         blastOrb1.Color = Color3.fromRGB(0, 255, 255)
  312.                     else
  313.                         blastOrb1.Color = Color3.fromRGB(0, 0, 0)
  314.                     end
  315.                     blastOrb1.Material = Enum.Material.Neon
  316.                     blastOrb1.Rotation = Vector3.new(8,8,8)
  317.                     blastOrb1.Transparency = .6
  318.                     blastOrb1.CanCollide = false
  319.                     blastOrb1.Anchored = false
  320.                     blastOrb1.Size = Vector3.new(2, 2.25, 2)
  321.                     blastOrb1.CFrame = CFrame.new(x0)
  322.                     local emitBlock = Instance.new("Part", game.Workspace)
  323.                     emitBlock.Name = "EmitterBlock"
  324.                     emitBlock.Color = Color3.fromRGB(0, 0, 0)
  325.                     emitBlock.Material = Enum.Material.SmoothPlastic
  326.                     emitBlock.Rotation = Vector3.new(8,8,8)
  327.                     emitBlock.Transparency = 1
  328.                     emitBlock.CanCollide = false
  329.                     emitBlock.Anchored = false
  330.                     emitBlock.Massless = true
  331.                     emitBlock.Locked = true
  332.                     emitBlock.Size = Vector3.new(2, 2.25, 2)
  333.                     local motor = Instance.new("Motor6D", emitBlock)
  334.                     motor.Part0 = emitBlock
  335.                     motor.Part1 = blastOrb1
  336.                     motor.C0 = CFrame.new()
  337.                     motor.C1 = CFrame.new()
  338.                     local emit
  339.                     if rageMode.Value == false then
  340.                         emit = script.BlastOrbProjectile1:Clone()
  341.                         emit.Parent = emitBlock
  342.                         emit.Enabled = true
  343.                     else
  344.                         emit = script.BlastOrbProjectile2:Clone()
  345.                         emit.Parent = emitBlock
  346.                         emit.Enabled = true
  347.                     end
  348.                     local proSpin = script.ProjectileSpin:Clone()
  349.                     proSpin.Parent = blastOrb1
  350.                     proSpin.Disabled = false
  351.                     blastOrb1.Touched:Connect(function(hit)
  352.                         local once = true
  353.                         if hit and hit ~= emitBlock and hit ~= staffpower and hit.Parent and hit.Parent ~= ai and not hit:FindFirstChild("HThunderValue") and not hit:FindFirstChild("ExplosionValue") then
  354.                             if once == true then
  355.                                 once = false
  356.                                 emitBlock.Anchored = true
  357.                                 emit.Enabled = false
  358.                                 local harmlessThunder = Instance.new("Part", game.Workspace)
  359.                                 harmlessThunder.Name = "HarmlessThunderEffect"
  360.                                 harmlessThunder.Color = Color3.fromRGB(0, 225, 225)
  361.                                 harmlessThunder.Material = Enum.Material.Neon
  362.                                 harmlessThunder.Size = Vector3.new(15, math.huge, 15)
  363.                                 harmlessThunder.CFrame = CFrame.new(blastOrb1.Position)
  364.                                 harmlessThunder.CanCollide = false
  365.                                 harmlessThunder.Anchored = true
  366.                                 harmlessThunder.Transparency = .25
  367.                                 local friendlyPartValue = Instance.new("Folder", harmlessThunder)
  368.                                 friendlyPartValue.Name = "HThunderValue"
  369.                                 local thunderParticle = script.ThunderParticle:Clone()
  370.                                 thunderParticle.Parent = harmlessThunder
  371.                                 thunderParticle.Enabled = true
  372.                                 local thunderTEffect = script.ThunderTweenEffect:Clone()
  373.                                 thunderTEffect.Parent = harmlessThunder
  374.                                 thunderTEffect.Disabled = false
  375.                                 local blastOrb = Instance.new("Part", game.Workspace)
  376.                                 blastOrb.Name = "ExplosionBlast"
  377.                                 blastOrb.Color = Color3.fromRGB(0, 255, 255)
  378.                                 blastOrb.Material = Enum.Material.Neon
  379.                                 blastOrb.Size = Vector3.new(15, 25, 15)
  380.                                 blastOrb.CFrame = CFrame.new(blastOrb1.Position)
  381.                                 blastOrb.CanCollide = false
  382.                                 blastOrb.Anchored = true
  383.                                 blastOrb1:Destroy()
  384.                                 game:GetService("Debris"):AddItem(emitBlock, 2)
  385.                                 local specialMesh = Instance.new("SpecialMesh", blastOrb)
  386.                                 specialMesh.Name = "ExplosionMesh"
  387.                                 specialMesh.MeshId = "http://www.roblox.com/asset/?id=92588061"
  388.                                 specialMesh.MeshType = Enum.MeshType.FileMesh
  389.                                 specialMesh.Offset = Vector3.new(0, 0, -0.9)
  390.                                 specialMesh.Scale = Vector3.new(.25, .25, .25)
  391.                                 local friendlyPartValue2 = Instance.new("Folder", blastOrb)
  392.                                 friendlyPartValue2.Name = "ExplosionValue"
  393.                                 local tween1 = script.Tween:Clone()
  394.                                 tween1.Parent = blastOrb
  395.                                 tween1.Disabled = false
  396.                                 local tween2 = script.Tween2:Clone()
  397.                                 tween2.Parent = blastOrb
  398.                                 tween2.Disabled = false
  399.                                 local spin = script.Spin:Clone()
  400.                                 spin.Parent = blastOrb
  401.                                 spin.Disabled = false
  402.                                 blastOrb.Touched:Connect(function(hit)
  403.                                     if hit and hit ~= staffpower and hit.Parent then
  404.                                         if hit.className ~= "Accessory" or hit.className ~= "Hat" then
  405.                                             if not hit.Parent:FindFirstChild("AttackFilterBlast1") then
  406.                                                 local hum = hit.Parent:FindFirstChild("Humanoid")
  407.                                                 if (hum ~= nil) and (hum.Health > 0) then
  408.                                                     local filter = Instance.new("Folder", hit.Parent)
  409.                                                     filter.Name = "AttackFilterBlast1"
  410.                                                     hum:TakeDamage(explosionDmg)
  411.                                                     game:GetService("Debris"):AddItem(filter, .25)
  412.                                                 end
  413.                                             end
  414.                                         end
  415.                                     end
  416.                                 end)
  417.                             end
  418.                         end
  419.                     end)
  420.                     wait(.25)
  421.                 end
  422.                 end
  423.                 if SpreadExplosionAmount <= 0 then
  424.                     wait(3)
  425.                     SpreadExplosionAmount = maxSpreadExplosionAmount
  426.                 end
  427.             elseif (torso.CFrame.p - target.CFrame.p).magnitude > 100 and (torso.CFrame.p - target.CFrame.p).magnitude < 10000 and rageMode.Value == true then
  428.                 while laserBeamAmount > 0 and zom.Health > 0 and canAttack.Value == true do
  429.                     laserbeamRagePart1:Play()
  430.                     local speed, jump = zom.WalkSpeed, zom.JumpPower
  431.                     zom.WalkSpeed = 0
  432.                     zom.JumpPower = 0
  433.                     laserbeamRagePart1.Stopped:Wait()
  434.                     laserbeamRagePart2:Play()
  435.                     laserbeamRagePart2:AdjustSpeed(.5)
  436.                     local spamFolder = Instance.new("Folder", ai)
  437.                     spamFolder.Name = "SpamFolder"
  438.                     local boomFolder = Instance.new("Folder", ai)
  439.                     boomFolder.Name = "BoomFolder"
  440.                     game:GetService("Debris"):AddItem(spamFolder, 10)
  441.                     game:GetService("Debris"):AddItem(boomFolder, 10)
  442.                     for i = 1, 450 do
  443.                         rs.Heartbeat:Wait()
  444.                         local ray = Ray.new(laserbeamPoint.CFrame.p, (laserbeamPoint.CFrame.LookVector * 1000 - ai.Head.CFrame.p).unit * 1000)
  445.                         local hit, pos = workspace:FindPartOnRayWithIgnoreList(ray, {ai, spamFolder, boomFolder})
  446.                         local dist = (laserbeamPoint.CFrame.p - pos).magnitude
  447.                         local deadlybeam = Instance.new("Part", spamFolder)
  448.                         deadlybeam.Parent = spamFolder
  449.                         deadlybeam.Name = "DeadlyLaserBeam"
  450.                         if rageMode.Value == false then
  451.                             deadlybeam.Color = Color3.fromRGB(0, 255, 255)
  452.                         else
  453.                             deadlybeam.Color = Color3.fromRGB(0, 0, 0)
  454.                         end
  455.                         deadlybeam.Material = Enum.Material.Neon
  456.                         deadlybeam.Anchored = true
  457.                         deadlybeam.Massless = true
  458.                         deadlybeam.CanCollide = false
  459.                         deadlybeam.Size = Vector3.new(3.5, 3.5, dist)
  460.                         deadlybeam.CFrame = CFrame.new(laserbeamPoint.CFrame.p, pos) * CFrame.new(0, 0, -dist/2)
  461.                         local boomPartEffect = Instance.new("Part", boomFolder)
  462.                         boomPartEffect.Name = "EndPart"
  463.                         boomPartEffect.Size = Vector3.new(4, 4, 4)
  464.                         if rageMode.Value == false then
  465.                             boomPartEffect.Color = Color3.fromRGB(0, 255, 255)
  466.                         else
  467.                             boomPartEffect.Color = Color3.fromRGB(0, 0, 0)
  468.                         end
  469.                         boomPartEffect.Material = Enum.Material.Neon
  470.                         boomPartEffect.Anchored = true
  471.                         boomPartEffect.CanCollide = false
  472.                         boomPartEffect.Massless = true
  473.                         boomPartEffect.CFrame = CFrame.new(pos)
  474.                         local laserbeamTween = script.LaserbeamTweenEffect:Clone()
  475.                         laserbeamTween.Parent = deadlybeam
  476.                         laserbeamTween.Disabled = false
  477.                         game:GetService("Debris"):AddItem(boomPartEffect, .1725)
  478.                         deadlybeam.Touched:Connect(function(hit)
  479.                             if hit and hit.Parent then
  480.                                 if not hit:IsA("Accessory") then
  481.                                     if not hit.Parent:FindFirstChild("AttackFilterInstantKill") then
  482.                                         local hum = hit.Parent:FindFirstChild("Humanoid")
  483.                                         if (hum ~= nil) and (hum.Health > 0) then
  484.                                             local filter = Instance.new("Folder", hit.Parent)
  485.                                             filter.Name = "AttackFilterInstantKill"
  486.                                             hum:TakeDamage(laserbeamDmg)
  487.                                             game:GetService("Debris"):AddItem(filter, .1)
  488.                                         end
  489.                                     end
  490.                                 end
  491.                             end
  492.                         end)
  493.                     end
  494.                     laserbeamRagePart2.Stopped:Wait()
  495.                     zom.WalkSpeed = speed
  496.                     zom.JumpPower = jump
  497.                     laserBeamAmount = laserBeamAmount - 1
  498.                 end
  499.                 if laserBeamAmount <= 0 then
  500.                     wait(3)
  501.                     laserBeamAmount = maxlaserBeamAmount
  502.                 end
  503.             end
  504.         end
  505.     end
  506.     wait()
  507. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement