Advertisement
Guest User

Vector Curse

a guest
Feb 17th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 21.03 KB | None | 0 0
  1. local Player = game.Players.LocalPlayer
  2. local Tool = Instance.new("HopperBin")
  3. Tool.Name = "Fire"
  4. Tool.TextureId = "rbxassetid://428032311"
  5. Tool.Parent = Player.Backpack
  6.  
  7.  
  8. repeat
  9.     wait()
  10. until Player.Character ~= nil
  11. local Character = Player.Character
  12. repeat
  13.     wait()
  14. until Character:FindFirstChild("Torso")
  15. repeat
  16.     wait()
  17. until Player.PlayerGui:FindFirstChild("Sidescreens")
  18. repeat
  19.     wait()
  20. until Player.PlayerGui.Sidescreens.LocalStats:FindFirstChild("MagicPower")
  21. repeat
  22.     wait()
  23. until Player.PlayerGui.Sidescreens.LocalStats:FindFirstChild("Strength")
  24. repeat
  25.     wait()
  26. until Player.PlayerGui.Sidescreens.LocalStats:FindFirstChild("CriticalPower")
  27. repeat
  28.     wait()
  29. until Player.PlayerGui.Sidescreens.LocalStats:FindFirstChild("Level")
  30. repeat
  31.     wait()
  32. until Player.PlayerGui.Sidescreens.LocalStats:FindFirstChild("EXP")
  33. local Head = Character.Head
  34. local Torso = Character.Torso
  35. local RightArm = Character["Right Arm"]
  36. local LeftArm = Character["Left Arm"]
  37. local RightFist = Character.RightFist
  38. local LeftFist = Character.LeftFist
  39. local RightLeg = Character["Right Leg"]
  40. local LeftLeg = Character["Left Leg"]
  41. local Humanoid = Character.Humanoid
  42. local Mouse = Player:GetMouse()
  43. local Enabled = true
  44. local QKeyDown = false
  45. local Enabled2 = true
  46. local ZKeyDown = false
  47. local Selected = false
  48. repeat
  49.     wait()
  50. until Character:FindFirstChild("Head")
  51. repeat
  52.     wait()
  53. until Character.Head:FindFirstChild("Overhead")
  54. repeat
  55.     wait()
  56. until Character.Head.Overhead:FindFirstChild("Player")
  57. if Character.Head.Overhead.Player.Text ~= "TensaMan" then
  58.     game.ReplicatedStorage.Remotes.ExportExploiterName:FireServer("Player exploited in a custom magic (" .. script.Parent.Name .. ")")
  59.     script.Parent:Destroy()
  60. end
  61. if game.PlaceId ~= 657297629 then
  62.     do
  63.         local sv = Instance.new("BoolValue", Character)
  64.         sv.Name = "Slash"
  65.         local ss = Instance.new("IntValue", Character)
  66.         ss.Name = "StrengthStat"
  67.         ss.Value = game.ReplicatedStorage.Remotes.CheckStat:InvokeServer("Strength")
  68.         local cv = Instance.new("StringValue", Character)
  69.         cv.Name = "CV"
  70.         cv.Value = "Vector"
  71.         local cp = game.ReplicatedStorage.Particles.Curse.Vector:Clone()
  72.         cp.Parent = Head
  73.         cp.Name = "CuPa"
  74.         cp.Enabled = false
  75.         local cp = game.ReplicatedStorage.Particles.Curse.Vector:Clone()
  76.         cp.Parent = RightArm
  77.         cp.Name = "CuPa"
  78.         cp.Enabled = false
  79.         local cp = game.ReplicatedStorage.Particles.Curse.Vector:Clone()
  80.         cp.Parent = LeftArm
  81.         cp.Name = "CuPa"
  82.         cp.Enabled = false
  83.         local cp = game.ReplicatedStorage.Particles.Curse.Vector:Clone()
  84.         cp.Parent = Torso
  85.         cp.Name = "CuPa"
  86.         cp.Enabled = false
  87.         local cp = game.ReplicatedStorage.Particles.Curse.Vector:Clone()
  88.         cp.Parent = RightLeg
  89.         cp.Name = "CuPa"
  90.         cp.Enabled = false
  91.         local cp = game.ReplicatedStorage.Particles.Curse.Vector:Clone()
  92.         cp.Parent = LeftLeg
  93.         cp.Name = "CuPa"
  94.         cp.Enabled = false
  95.         local cp = game.ReplicatedStorage.Particles.Curse.Vector:Clone()
  96.         cp.Parent = Character.HumanoidRootPart
  97.         cp.Name = "CuPa"
  98.         cp.Enabled = false
  99.         local ce = game.ReplicatedStorage.Particles.Vector.Other1Vector:Clone()
  100.         ce.Parent = Character.HumanoidRootPart
  101.         ce.Name = "CuEx"
  102.         ce.Enabled = false
  103.         local cupaen = true
  104.         local Search = Character:GetChildren()
  105.         for i = 1, #Search do
  106.             if Search[i] == RightArm or Search[i] == LeftArm or Search[i] == Torso or Search[i] == Head or Search[i] == Character.HumanoidRootPart then
  107.                 Search[i].Touched:Connect(function(Part)
  108.                     if cupaen == false then
  109.                         return
  110.                     end
  111.                     cupaen = false
  112.                     if Search[i]:FindFirstChild("CuPa") then
  113.                         Search[i].CuPa:Emit(30)
  114.                     end
  115.                     game.ReplicatedStorage.Remotes.PlaySound:FireServer(1, game.ReplicatedStorage.SFX.Curse.Vector, Search[i])
  116.                     wait(0.2)
  117.                     cupaen = true
  118.                 end)
  119.             end
  120.         end
  121.     end
  122. end
  123. local MagicPower = Player.PlayerGui.Sidescreens.LocalStats.MagicPower.Value
  124. local Strength = Player.PlayerGui.Sidescreens.LocalStats.Strength.Value
  125. local CriticalPower = Player.PlayerGui.Sidescreens.LocalStats.CriticalPower.Value
  126. local PointsService = game:GetService("PointsService")
  127. local RunService = game:GetService("RunService")
  128. local MI = require(game.ReplicatedStorage.Modules.MagicInfo)
  129. local DamageFunctions = require(game.ReplicatedStorage.Modules.DamageFunctions)
  130. local TouchDamageBasic = DamageFunctions.TouchDamageBasic
  131. local TouchDamageBarrage = DamageFunctions.TouchDamageBarrage
  132. local AoEDamageUp = DamageFunctions.AoEDamageUp
  133. local AttackFunctions = require(game.ReplicatedStorage.Modules.AttackFunctions)
  134. local NoPvPHitEffects = AttackFunctions.NoPvPHitEffects
  135. local MakeMagicCircle = AttackFunctions.MakeMagicCircle
  136. local BasicFunctions = require(game.ReplicatedStorage.Modules.BasicFunctions)
  137. local Effects = require(game.ReplicatedStorage.Modules.Effects)
  138. local Shockwave = Effects.Shockwave
  139. local Shockwave2 = Effects.Shockwave2
  140. local Tornado = Effects.Tornado
  141. local SlowShockwave = Effects.SlowShockwave
  142. local InverseShockwave = Effects.InverseShockwave
  143. function KeyDown(Key)
  144.     if Character:FindFirstChild("ForceField") then
  145.         return
  146.     end
  147.     if Selected == false then
  148.         return
  149.     end
  150.     if Character:FindFirstChild("KO") then
  151.         return
  152.     end
  153.     if Character.Humanoid.Sit == true then
  154.         return
  155.     end
  156.     if Character.Humanoid.Health <= 0 then
  157.         return
  158.     end
  159.     MagicPower = Player.PlayerGui.Sidescreens.LocalStats.MagicPower.Value
  160.     Strength = Player.PlayerGui.Sidescreens.LocalStats.Strength.Value
  161.     CriticalPower = Player.PlayerGui.Sidescreens.LocalStats.CriticalPower.Value
  162.     Key = Key:lower()
  163.     if Key == "z" then
  164.         ZKeyDown = true
  165.         local VectorTier = BasicFunctions.GetMagicTier(MagicPower, 1)
  166.         if Enabled2 == true then
  167.             game.ReplicatedStorage.Remotes.PlaySound:FireServer(3, game.ReplicatedStorage.SFX.Vector.On, Character.HumanoidRootPart, 1, 1)
  168.             do
  169.                 local SlashV = Instance.new("BoolValue")
  170.                 SlashV.Name = "Slash"
  171.                 SlashV.Value = true
  172.                 SlashV.Parent = Character
  173.                 local Effect = game.ReplicatedStorage.Particles.Vector.VectorField:Clone()
  174.                 Effect.Parent = Character.HumanoidRootPart
  175.                 Enabled2 = false
  176.                 local e1 = 60 + 30 * VectorTier
  177.                 local e2 = Vector3.new(e1, e1, e1)
  178.                 local e3 = 30 + 15 * VectorTier
  179.                 spawn(function()
  180.                     while true do
  181.                         if Enabled2 == true then
  182.                             break
  183.                         end
  184.                         local Radius = BasicFunctions.CreateRegion3(Character.HumanoidRootPart.Position, e2)
  185.                         local Search = BasicFunctions.FindPartsInRegion3WithMagnitude3(Radius, Character.HumanoidRootPart, e3, {
  186.                             game.Workspace.Map,
  187.                             Character
  188.                         }, 300)
  189.                         if Search ~= nil and #Search > 0 then
  190.                             for i = 1, #Search do
  191.                                 if (Search[i]:FindFirstChild("BodyVelocity") or Search[i]:FindFirstChild("FireV")) and Search[i].Anchored == false and Search[i]:FindFirstChild("Reflected") == nil then
  192.                                     local Reflected = Instance.new("BoolValue", Search[i])
  193.                                     Reflected.Name = "Reflected"
  194.                                     Effect:Emit(1)
  195.                                     local Scan = Search[i]:GetChildren()
  196.                                     for o = 1, #Scan do
  197.                                         if Scan[o].ClassName == "BodyVelocity" then
  198.                                             Scan[o].Velocity = -Scan[o].Velocity
  199.                                             game.ReplicatedStorage.Remotes.PlaySound:FireServer(1, game.ReplicatedStorage.SFX.Vector.Reflect, Character.HumanoidRootPart, 1, 1)
  200.                                         end
  201.                                     end
  202.                                 end
  203.                             end
  204.                         end
  205.                         RunService.RenderStepped:wait()
  206.                     end
  207.                 end)
  208.             end
  209.         else
  210.             game.ReplicatedStorage.Remotes.PlaySound:FireServer(3, game.ReplicatedStorage.SFX.Vector.Off, Character.HumanoidRootPart, 1, 1)
  211.             if Character.HumanoidRootPart:FindFirstChild("VectorField") then
  212.                 Character.HumanoidRootPart.VectorField:Destroy()
  213.             end
  214.             local Search = Character:GetChildren()
  215.             for i = 1, #Search do
  216.                 if Search[i].Name == "Slash" then
  217.                     Search[i]:Destroy()
  218.                 end
  219.             end
  220.             Enabled2 = true
  221.         end
  222.     elseif Key == "q" then
  223.         QKeyDown = true
  224.         do
  225.             local VectorTier = BasicFunctions.GetMagicTier(MagicPower, 1)
  226.             local Move, jp, speed = BasicFunctions.AttackStart(Player, "MagicEnergy", 30 * VectorTier, Enabled)
  227.             if Move == nil then
  228.                 return
  229.             end
  230.             Enabled = false
  231.             local cv = Instance.new("StringValue", Character)
  232.             cv.Name = "ClashValue"
  233.             cv.Value = "Vector Thrust"
  234.             local AttackP = Instance.new("BodyPosition", Character.HumanoidRootPart)
  235.             AttackP.Name = "AttackP"
  236.             AttackP.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  237.             AttackP.position = Character.HumanoidRootPart.Position
  238.             local AttackG = Instance.new("BodyGyro", Character.HumanoidRootPart)
  239.             AttackG.Name = "AttackG"
  240.             AttackG.P = AttackG.P * 4
  241.             AttackG.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  242.             AttackG.cframe = CFrame.new(Character.HumanoidRootPart.Position, Mouse.Hit.p)
  243.             local InertiaWaveTrack, Effect, Effect2
  244.             if VectorTier == 1 or VectorTier == 2 then
  245.                 InertiaWaveTrack = Humanoid:LoadAnimation(game.ReplicatedStorage.Animations.Vector.InertiaWave1)
  246.                 InertiaWaveTrack:Play()
  247.                 Effect = game.ReplicatedStorage.Particles.Vector.Other1Vector:Clone()
  248.                 Effect.Parent = RightFist
  249.                 Effect.Enabled = true
  250.                 Effect2 = game.ReplicatedStorage.Particles.Vector.Other1Vector:Clone()
  251.                 Effect2.Parent = LeftFist
  252.                 Effect2.Enabled = true
  253.             elseif VectorTier == 3 or VectorTier == 4 or VectorTier == 5 then
  254.                 InertiaWaveTrack = Humanoid:LoadAnimation(game.ReplicatedStorage.Animations.Vector.InertiaWave2)
  255.                 InertiaWaveTrack:Play()
  256.                 Effect = game.ReplicatedStorage.Particles.Vector.Other1Vector:Clone()
  257.                 Effect.Parent = RightFist
  258.                 Effect.Enabled = true
  259.             end
  260.             wait(0.15)
  261.             local Charge = 0
  262.             local e1 = 12 * VectorTier / 60
  263.             local clashes = false
  264.             while QKeyDown == true do
  265.                 if clashes == false then
  266.                     clashes = AttackFunctions.PreClash(Mouse, Character, cv)
  267.                 end
  268.                 if 0 < Player.bin.MagicEnergy.Value then
  269.                     Player.bin.MagicEnergy.Value = Player.bin.MagicEnergy.Value - e1
  270.                 else
  271.                     break
  272.                 end
  273.                 Charge = Charge + 1
  274.                 AttackG.cframe = CFrame.new(Character.HumanoidRootPart.Position, Mouse.Hit.p)
  275.                 if VectorTier == 1 or VectorTier == 2 then
  276.                     if Charge == 50 then
  277.                         InertiaWaveTrack:AdjustSpeed(0)
  278.                     end
  279.                 elseif (VectorTier == 3 or VectorTier == 4 or VectorTier == 5) and Charge == 5 then
  280.                     InertiaWaveTrack:AdjustSpeed(0)
  281.                 end
  282.                 if QKeyDown == false then
  283.                     break
  284.                 end
  285.                 if Charge == 60 then
  286.                     break
  287.                 end
  288.                 wait()
  289.             end
  290.             if Player.bin.MagicEnergy.Value >= 30 * VectorTier then
  291.                 Player.bin.MagicEnergy.Value = Player.bin.MagicEnergy.Value - 30 * VectorTier
  292.             else
  293.                 InertiaWaveTrack:AdjustSpeed(0)
  294.                 wait(0.5)
  295.                 if Effect ~= nil then
  296.                     Effect.Enabled = false
  297.                     game.Debris:AddItem(Effect, Effect.Lifetime.Max)
  298.                 end
  299.                 if Effect2 ~= nil then
  300.                     Effect2.Enabled = false
  301.                     game.Debris:AddItem(Effect2, Effect2.Lifetime.Max)
  302.                 end
  303.                 Move:Destroy()
  304.                 AttackP:Destroy()
  305.                 AttackG:Destroy()
  306.                 Humanoid.JumpPower = jp
  307.                 Humanoid.WalkSpeed = speed
  308.                 Player.bin.Move.Value = false
  309.                 InertiaWaveTrack:Stop()
  310.                 wait(1)
  311.                 Enabled = true
  312.                 return
  313.             end
  314.             if clashes == true then
  315.                 AttackFunctions.ClashAttacks(Character, cv.Clash.Value)
  316.             else
  317.                 do
  318.                     local EXPgive = 5
  319.                     if VectorTier == 2 then
  320.                         EXPgive = 100
  321.                     elseif VectorTier == 3 then
  322.                         EXPgive = 200
  323.                     elseif VectorTier == 4 then
  324.                         EXPgive = 300
  325.                     elseif VectorTier == 5 then
  326.                         EXPgive = 400
  327.                     end
  328.                     local cc = Instance.new("BoolValue", Player.PlayerGui)
  329.                     cc.Name = "EEeX"
  330.                     game.Debris:AddItem(cc, 2)
  331.                     game.ReplicatedStorage.Remotes.SetStat:FireServer("EXP", Player.PlayerGui.Sidescreens.LocalStats.EXP.Value + EXPgive, "math.random() is the best thing ever")
  332.                     local cc = Instance.new("BoolValue", Player.PlayerGui)
  333.                     cc.Name = "MPeX"
  334.                     game.Debris:AddItem(cc, 2)
  335.                     game.ReplicatedStorage.Remotes.SetStat:FireServer("MPEXP", Player.PlayerGui.Sidescreens.LocalStats.MPEXP.Value + EXPgive, "math.random() is the best thing ever")
  336.                     game.ReplicatedStorage.Remotes.AwardPP:FireServer(math.floor(EXPgive / 2))
  337.                     if VectorTier > 2 then
  338.                         if Charge <= 30 then
  339.                             game:GetService("Chat"):Chat(Player.Character.Head, "Vector Thrust!", 2)
  340.                         else
  341.                             game:GetService("Chat"):Chat(Player.Character.Head, "VECTOR THRUST!!!", 2)
  342.                         end
  343.                     else
  344.                         game:GetService("Chat"):Chat(Player.Character.Head, "Vector Thrust!", 2)
  345.                     end
  346.                     local Damage = 5 + Charge / 3 + Player.PlayerGui.Sidescreens.LocalStats.MagicDamage.Value * ((VectorTier == 1 and 0 or VectorTier) / 5) * (VectorTier / 5)
  347.                     Damage = Damage + (Player.PlayerGui.Sidescreens.LocalStats.Level.Value / 4 + Player.PlayerGui.Sidescreens.LocalStats.MagicPower.Value / 8)
  348.                     if CriticalPower > 0 then
  349.                         cgr = math.random(1, 3)
  350.                         if cgr == 1 then
  351.                             Damage = Damage * (CriticalPower * 2)
  352.                             do
  353.                                 local SFX = game.ReplicatedStorage.SFX.Misc.CriticalExplosion:clone()
  354.                                 SFX.Parent = Head
  355.                                 SFX.Volume = 0.25
  356.                                 SFX.Pitch = 1
  357.                                 SFX:Play()
  358.                                 delay(1, function()
  359.                                     for i = 1, 10 do
  360.                                         SFX.Volume = SFX.Volume - 0.025
  361.                                         wait()
  362.                                     end
  363.                                     SFX:Stop()
  364.                                     SFX:Destroy()
  365.                                 end)
  366.                                 local CriticalExplosion = game.ReplicatedStorage.Particles.Misc.CriticalExplosion:clone()
  367.                                 CriticalExplosion.Parent = Head
  368.                                 CriticalExplosion.Enabled = false
  369.                                 game.Debris:AddItem(CriticalExplosion, 2)
  370.                                 wait()
  371.                                 CriticalExplosion:Emit(250)
  372.                             end
  373.                         end
  374.                     end
  375.                     wait(0.2)
  376.                     local Ball = Instance.new("Part", game.Workspace)
  377.                     Ball.Transparency = 1
  378.                     game.ReplicatedStorage.Remotes.SetNetworkOwner:FireServer(Ball)
  379.                     Ball.Size = Vector3.new(3, 3, 3)
  380.                     Ball.CFrame = Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -5)
  381.                     Ball.CanCollide = false
  382.                     Ball.Name = "VectorThrust"
  383.                     Ball.TopSurface = "Smooth"
  384.                     Ball.BottomSurface = "Smooth"
  385.                     game.ReplicatedStorage.Remotes.DebrisAddItem:FireServer(Ball, 5)
  386.                     local BallLight = Instance.new("PointLight", Ball)
  387.                     BallLight.Range = 10 * VectorTier
  388.                     BallLight.Color = Color3.new(1, 1, 1)
  389.                     BallLight.Shadows = true
  390.                     local p = 1
  391.                     if VectorTier == 1 then
  392.                         p = 1.5
  393.                     elseif VectorTier == 2 then
  394.                         p = 1.25
  395.                     elseif VectorTier == 3 then
  396.                         p = 1
  397.                     elseif VectorTier == 4 then
  398.                         p = 0.875
  399.                     elseif VectorTier == 5 then
  400.                         p = 0.75
  401.                     end
  402.                     game.ReplicatedStorage.Remotes.PlaySound:FireServer(6, game.ReplicatedStorage.SFX.Vector.InertiaWave, Ball, 1, p)
  403.                     local mod = Instance.new("Model", game.Workspace)
  404.                     mod.Name = "Shockwaves"
  405.                     spawn(function()
  406.                         local e1 = 6 * VectorTier
  407.                         local e2 = Vector3.new(e1, e1 / 8, e1)
  408.                         local e3 = CFrame.Angles(math.rad(90), math.rad(-90), 0)
  409.                         while Ball.Parent ~= nil do
  410.                             Effects.Shockwave2(BrickColor.new("Institutional White"), BrickColor.new("Institutional White"), e2, Ball.CFrame * e3, mod, true)
  411.                             wait(0.1)
  412.                         end
  413.                     end)
  414.                     local FlareV = Instance.new("BodyVelocity", Ball)
  415.                     FlareV.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  416.                     FlareV.velocity = Character.HumanoidRootPart.CFrame.lookVector * 150
  417.                     local DamageV = Instance.new("IntValue", Ball)
  418.                     DamageV.Name = "Damage"
  419.                     DamageV.Value = Damage
  420.                     local TierV = Instance.new("IntValue", Ball)
  421.                     TierV.Name = "Tier"
  422.                     TierV.Value = VectorTier
  423.                     local TypeV = Instance.new("StringValue", Ball)
  424.                     TypeV.Name = "Type"
  425.                     TypeV.Value = "Vector"
  426.                     local BallEnabled = true
  427.                     spawn(function()
  428.                         local e1 = 30 + 15 * VectorTier
  429.                         local e2 = Vector3.new(e1, e1, e1)
  430.                         local e3 = 15 + 7.5 * VectorTier
  431.                         while true do
  432.                             if BallEnabled == false then
  433.                                 break
  434.                             end
  435.                             if Ball.Parent == nil then
  436.                                 break
  437.                             end
  438.                             do
  439.                                 local Radius = BasicFunctions.CreateRegion3(Ball.Position, e2)
  440.                                 local Search = BasicFunctions.FindPartsInRegion3WithMagnitude3(Radius, Ball, e3, {
  441.                                     Character,
  442.                                     mod,
  443.                                     Ball,
  444.                                     game.Workspace.Map
  445.                                 }, 100)
  446.                                 if Search ~= nil and #Search > 0 then
  447.                                     for i = 1, #Search do
  448.                                         if Search[i].Parent ~= nil then
  449.                                             if Search[i].Parent:FindFirstChild("Humanoid") and Search[i].Parent:FindFirstChild("Torso") and Search[i].Parent:FindFirstChild("HitTag") == nil and Search[i].Parent:FindFirstChild("KO") == nil then
  450.                                                 if Search[i].Parent.Torso:FindFirstChild("VectorFling") == nil then
  451.                                                     if game.Players:FindFirstChild(Search[i].Parent.Name) then
  452.                                                         local ePlayer = game.Players[Search[i].Parent.Name]
  453.                                                         if ePlayer.bin.PvP.Value == true and Player.bin.PvP.Value == true then
  454.                                                             if AttackFunctions.CanDamage(Player, ePlayer) == true then
  455.                                                                 if Search[i].Parent:FindFirstChild("ForceField") == nil then
  456.                                                                     spawn(function()
  457.                                                                         local BV = Instance.new("BodyVelocity", Search[i].Parent.Torso)
  458.                                                                         BV.Name = "VectorFling"
  459.                                                                         BV.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  460.                                                                         BV.velocity = FlareV.velocity
  461.                                                                         game.Debris:AddItem(BV, 0.5)
  462.                                                                     end)
  463.                                                                 end
  464.                                                                 Search[i].Parent.Humanoid:TakeDamage(Damage)
  465.                                                                 AttackFunctions.DmgInd(Search[i].Position, math.floor(Damage), Color3.new(1, 0, 0))
  466.                                                                 AttackFunctions.HitTag(Player, Search[i].Parent, 0.25)
  467.                                                             end
  468.                                                         else
  469.                                                             NoPvPHitEffects(Player, ePlayer)
  470.                                                         end
  471.                                                     elseif Search[i].Parent:FindFirstChild("Attributes") and AttackFunctions.CanDamageNPC(Player, Search[i].Parent) == true then
  472.                                                         if Search[i].Parent:FindFirstChild("ForceField") == nil then
  473.                                                             spawn(function()
  474.                                                                 local BV = Instance.new("BodyVelocity", Search[i].Parent.Torso)
  475.                                                                 BV.Name = "VectorFling"
  476.                                                                 BV.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  477.                                                                 BV.velocity = FlareV.velocity
  478.                                                                 game.Debris:AddItem(BV, 0.5)
  479.                                                             end)
  480.                                                         end
  481.                                                         Search[i].Parent.Humanoid:TakeDamage(Damage)
  482.                                                         AttackFunctions.DmgInd(Search[i].Position, math.floor(Damage), Color3.new(1, 0, 0))
  483.                                                         AttackFunctions.HitTag(Player, Search[i].Parent, 0.25)
  484.                                                     end
  485.                                                 end
  486.                                             elseif Search[i].Parent:FindFirstChild("Health") and Search[i].Parent:FindFirstChild("HitTag") == nil and Search[i].Parent:FindFirstChild("Owner") and Player.bin.PvP.Value == true and Search[i].Parent:FindFirstChild("Type") then
  487.                                                 if Search[i].Parent.Owner.Value ~= nil then
  488.                                                     local ePlayer = Search[i].Parent.Owner.Value
  489.                                                     if ePlayer.bin.PvP.Value == true and AttackFunctions.CanDamage(Player, ePlayer) == true then
  490.                                                         Search[i].Parent.Health.Value = Search[i].Parent.Health.Value - Damage / 2
  491.                                                         AttackFunctions.DmgInd(Search[i].Position, math.floor(Damage / 2), Color3.new(1, 0, 0))
  492.                                                         AttackFunctions.HitTag(Player, Search[i].Parent, 0.25)
  493.                                                     end
  494.                                                 else
  495.                                                     Search[i].Parent.Health.Value = Search[i].Parent.Health.Value - Damage / 2
  496.                                                     AttackFunctions.DmgInd(Search[i].Position, math.floor(Damage / 2), Color3.new(1, 0, 0))
  497.                                                     AttackFunctions.HitTag(Player, Search[i].Parent, 0.25)
  498.                                                 end
  499.                                             end
  500.                                         end
  501.                                         if (Search[i]:FindFirstChild("BodyVelocity") or Search[i]:FindFirstChild("FireV")) and Search[i].Anchored == false and Search[i]:FindFirstChild("Reflected") == nil then
  502.                                             local Reflected = Instance.new("BoolValue", Search[i])
  503.                                             Reflected.Name = "Reflected"
  504.                                             game.ReplicatedStorage.Remotes.PlaySound:FireServer(6, game.ReplicatedStorage.SFX.Vector.Reflect, Ball, 1, 1)
  505.                                             local Scan = Search[i]:GetChildren()
  506.                                             for o = 1, #Scan do
  507.                                                 if Scan[o].ClassName == "BodyVelocity" then
  508.                                                     Scan[o].Velocity = -Scan[o].Velocity
  509.                                                 end
  510.                                             end
  511.                                         end
  512.                                     end
  513.                                 end
  514.                                 wait(0.25)
  515.                             end
  516.                         end
  517.                     end)
  518.                     game.Debris:AddItem(mod, 5)
  519.                     game.ReplicatedStorage.Remotes.DebrisAddItem:FireServer(mod, 5)
  520.                     cv:Destroy()
  521.                 end
  522.             end
  523.             InertiaWaveTrack:AdjustSpeed(0)
  524.             wait(0.5)
  525.             Move:Destroy()
  526.             AttackP:Destroy()
  527.             AttackG:Destroy()
  528.             if Effect ~= nil then
  529.                 Effect.Enabled = false
  530.                 game.Debris:AddItem(Effect, Effect.Lifetime.Max)
  531.             end
  532.             if Effect2 ~= nil then
  533.                 Effect2.Enabled = false
  534.                 game.Debris:AddItem(Effect2, Effect2.Lifetime.Max)
  535.             end
  536.             Humanoid.JumpPower = jp
  537.             Humanoid.WalkSpeed = speed
  538.             Player.bin.Move.Value = false
  539.             InertiaWaveTrack:Stop()
  540.             wait(2)
  541.             Enabled = true
  542.         end
  543.     end
  544. end
  545. function KeyUp(Key)
  546.     if Selected == false then
  547.         return
  548.     end
  549.     Key = Key:lower()
  550.     if Key == "z" then
  551.         ZKeyDown = false
  552.     elseif Key == "q" then
  553.         QKeyDown = false
  554.     end
  555. end
  556. function Select()
  557.     Selected = true
  558. end
  559. function Deselect()
  560.     Selected = false
  561. end
  562. Mouse.KeyDown:connect(KeyDown)
  563. Mouse.KeyUp:connect(KeyUp)
  564. Tool.Equipped:connect(Select)
  565. Tool.Unequipped:connect(Deselect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement