Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- VISUAL SETTINGS
- local aoeColor = Color3.fromRGB(250, 80, 0)
- local aoeMaterial = "Snow"
- local dash1Size = Vector3.new(4, 4, 7)
- local dash2Size = Vector3.new(7, 7, 10)
- local dashColor = Color3.fromRGB(160, 30, 0)
- local aoeSpeed = 100
- local meleeSpeed = 65
- -- flat added bonuses
- -- FUNCTIONS FOR SETUP
- local TweenService = game:GetService("TweenService")
- local RunService = game:GetService("RunService")
- local function Buffer(Time)
- local save = tick() + Time
- repeat RunService.Heartbeat:Wait() until tick() >= save
- end
- local function MakeAoE(root)
- local p = Instance.new("Part")
- p.Color, p.Material, p.Transparency, p.Size, p.Anchored, p.CanCollide, p.CFrame =
- aoeColor, aoeMaterial, 0.5, Vector3.new(40,40,40), true, false, root.CFrame
- p.Parent = workspace
- TweenService:Create(p, TweenInfo.new(3, Enum.EasingStyle.Linear), {Size = Vector3.new(7, 60, 7), Transparency = 1}):Play()
- coroutine.wrap(function()
- for i = 1,45 do
- p.CFrame = root.CFrame
- Buffer(1/15)
- end
- end)()
- end
- local function ChangeSpeed(char, val, lvl, add)
- local speed = char.BaseSpeed
- if add then speed.Value = val else speed.Value += val end
- char.Humanoid.WalkSpeed = speed.Value * 0.0025 * (100 + lvl)
- end
- --[[ATTACK CODE]]--
- local function Use(...)
- -- Initialize variables
- local args = {...}
- local char = args[1].Character
- local torso = char.Torso
- local hum = char.Humanoid
- local speed = char.BaseSpeed
- local att0 = Instance.new("Attachment", torso)
- local DamageMod = require(game:GetService("ServerScriptService").Libraries.DamageService)
- local Stats = require(game:GetService("ServerScriptService").Stats)
- local lvl = Stats.GetStat(args[1], char.BaseStat.Value)
- -- Visual aaaaaaaaaaaaefke
- local exp = Instance.new("Explosion")
- exp.BlastPressure, exp.BlastRadius, exp.ExplosionType, exp.Position =
- 0, 0, Enum.ExplosionType.NoCraters, torso.Position
- exp.Parent = workspace
- local light = Instance.new("PointLight")
- light.Color, light.Brightness, light.Range =
- Color3.fromRGB(200, 0, 0), 40, 10
- light.Parent = torso
- local old = speed.Value
- local temp = math.min(40 + math.floor(speed.Value/15), speed.Value) -- This is the lowered speed (FIRSTSET)
- local foo = 0
- ChangeSpeed(char, temp, lvl, true)
- -- Upon taking damage, deal 10 damage AoE (slightly smaller than PowderSnow)
- coroutine.wrap(function()
- local last = 0
- local prev = hum.Health
- local c = hum.HealthChanged:Connect(function(newHP)
- if newHP < prev then
- if tick()-last >= 0.1 then
- last = tick()
- if light then light.Range += 1 end
- MakeAoE(torso)
- print("vvv")
- DamageMod:RegisterRangeDamage(args[1], 25, 10)
- local bv = torso:FindFirstChild("LinearVelocity") or Instance.new("LinearVelocity", torso)
- bv.Attachment0, bv.MaxForce, bv.VectorVelocity =
- att0, math.huge, Vector3.new(0, -3, 0)
- Buffer(0.5)
- print("a")
- repeat Buffer(1/20) until tick() >= last+0.25
- print("babsid")
- bv:Destroy()
- end
- end
- prev = newHP
- end)
- Buffer(15.5)
- c:Disconnect()
- end)()
- -- Actual attack section (performs aoe first AND last always)
- MakeAoE(torso)
- DamageMod:RegisterRangeDamage(args[1], 30, 30)
- ChangeSpeed(char, aoeSpeed, lvl)
- foo = 2
- Buffer(0.5)
- ChangeSpeed(char, -aoeSpeed, lvl)
- foo = 0
- Buffer(2)
- for i = 1, 5 do
- if math.random(1,2) == 1 then
- -- Dash Attack
- coroutine.wrap(function()
- end)()
- local exp = Instance.new("Explosion")
- exp.BlastPressure, exp.BlastRadius, exp.ExplosionType, exp.Position =
- 0, 0, Enum.ExplosionType.NoCraters, torso.Position
- exp.Parent = workspace
- local dash = Instance.new("Part")
- dash.CanCollide, dash.Massless, dash.Color =
- false, true, dashColor
- dash.Transparency, dash.Material, dash.Size, dash.CFrame =
- 0.4, "Neon", dash1Size, torso.CFrame
- dash.Parent = workspace
- local weld2 = Instance.new("Weld")
- weld2.Part0, weld2.Part1 =
- torso, dash
- weld2.Parent = dash
- local dash2 = Instance.new("Part")
- dash2.CanCollide, dash2.Massless, dash2.Color =
- false, true, dashColor
- dash2.Transparency, dash2.Material, dash2.Size, dash2.CFrame =
- 0.7, "Neon", dash2Size, torso.CFrame
- dash2.Parent = workspace
- local weld3 = Instance.new("Weld")
- weld3.Part0, weld3.Part1 =
- torso, dash2
- weld3.Parent = dash2
- DamageMod:RegisterWeaponPart(args[1], {dash}, 20)
- ChangeSpeed(char, meleeSpeed, lvl)
- foo = 1
- Buffer(1.5)
- if dash then dash:Destroy() end
- if dash2 then dash2:Destroy() end
- ChangeSpeed(char, -meleeSpeed, lvl)
- foo = 0
- Buffer(0.5)
- else
- -- AoE Attack
- MakeAoE(torso)
- local exp = Instance.new("Explosion")
- exp.BlastPressure, exp.BlastRadius, exp.ExplosionType, exp.Position =
- 0, 0, Enum.ExplosionType.NoCraters, torso.Position
- exp.Parent = workspace
- DamageMod:RegisterRangeDamage(args[1], 30, 30)
- ChangeSpeed(char, aoeSpeed, lvl)
- foo = 2
- Buffer(0.5)
- ChangeSpeed(char, -aoeSpeed, lvl)
- foo = 0
- Buffer(2)
- end
- end
- local bv = Instance.new("LinearVelocity")
- bv.Attachment0, bv.MaxForce, bv.VectorVelocity =
- att0, math.huge, Vector3.new(0, -3, 0)
- bv.Parent = torso
- Buffer(0.5)
- for i = 1, 2 do
- MakeAoE(torso)
- coroutine.wrap(function()
- for i = 1, 3 do
- local exp = Instance.new("Explosion")
- exp.BlastPressure, exp.BlastRadius, exp.ExplosionType, exp.Position =
- 0, 0, Enum.ExplosionType.NoCraters, torso.Position + Vector3.new(math.random(-8, 8), math.random(0, 8), math.random(-8, 8))
- exp.Parent = workspace
- Buffer(1/3)
- end
- end)()
- DamageMod:RegisterRangeDamage(args[1], 30, 20)
- Buffer(0.2)
- end
- bv:Destroy()
- if light then light:Destroy() end
- ChangeSpeed(char, old - (speed.Value - 50*foo - temp), lvl, true)
- end
- return Use
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement