Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- EASE OF ACCESS SETTINGS
- local aoeColor = Color3.new(1, 0.7, 0.7)
- local aoeTrans = 0.5
- local aoeVisSize = Vector3.new(45, 2, 45) -- visually starts at this
- local aoeFinSize = Vector3.new(60, 7, 60) -- and expands to this
- local aoeMaterial = "Neon"
- local baseDamage = 80
- local radius = 20
- local TweenService = game:GetService("TweenService")
- local foo = task
- --[[
- Below is the attack function.
- DESC: Basic AoE.
- --]]
- local function Use(...)
- local args = {...}
- local root = args[1].Character.Torso
- local damage = math.random(1, 10) == 1 and baseDamage*2 or baseDamage
- -- Create AoE "oomph" (the midair pause)
- local att0 = Instance.new("Attachment", root)
- local bv = Instance.new("LinearVelocity")
- bv.Attachment0, bv.MaxForce, bv.VectorVelocity =
- att0, math.huge, Vector3.new(0, -3, 0)
- bv.Parent = root
- local bg = Instance.new("AlignOrientation", root)
- local sub = Instance.new("Part")
- local att1 = Instance.new("Attachment", sub)
- sub.CanCollide, sub.Anchored, sub.Transparency, sub.CFrame =
- false, true, 1, root.CFrame * CFrame.Angles(0, math.rad(107), 0)
- sub.Parent = workspace
- bg.Attachment0, bg.Attachment1, bg.Mode, bg.RigidityEnabled =
- att0, att1, Enum.OrientationAlignmentMode.TwoAttachment, true
- -- Create visual AoE
- local p = Instance.new("Part")
- p.Color, p.Material, p.Transparency, p.Size, p.Anchored, p.CanCollide, p.CFrame =
- aoeColor, aoeMaterial, aoeTrans, aoeVisSize, true, false, root.CFrame*CFrame.Angles(0, math.rad(math.random(10, 45)), 0)
- p.Parent = workspace
- TweenService:Create(p, TweenInfo.new(3, Enum.EasingStyle.Linear), {Size = aoeFinSize, Transparency = 1}):Play()
- coroutine.wrap(function()
- foo.wait(0.1)
- for i = 1,200 do
- p.CFrame = root.CFrame
- foo.wait(1/60)
- end
- p:Destroy()
- end)()
- -- Damage
- local DamageMod = require(game.ServerScriptService.Libraries.DamageService)
- DamageMod:RegisterRangeDamage(args[1], radius, damage)
- foo.wait(0.1)
- sub.CFrame *= CFrame.Angles(0, math.rad(253), 0)
- foo.wait(0.1)
- bv:Destroy()
- bg:Destroy()
- sub:Destroy()
- att0:Destroy()
- end
- return Use
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement