Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- EASE OF ACCESS SETTINGS
- local aoeColor = Color3.new(0.85, 0.95, 0.9)
- local aoeStartTrans = 0.5
- local aoeStartSize = Vector3.new(17, 17, 17)
- local aoeEndSize = Vector3.new(22, 22, 22)
- local inColor = Color3.new(0.85, 0.95, 0.9)
- local outColor = Color3.new(0.6, 0.6, 0.65)
- local inTrans = 0.4
- local outTrans = 0.7
- local inSize = Vector3.new(7, 7, 7)
- local outSize = Vector3.new(8, 8, 8)
- local inMaterial = "SmoothPlastic"
- local outMaterial = "SmoothPlastic"
- local aoeDMG = 55
- local radius = 20
- local meleeDMG = 55
- local lifetime = 2.25
- local successMSG = {"SPLENDID!", "AMAZING!", "EXCELLENT!", "PERFECT!", "STYLISH!"}
- local foo = task
- --[[
- Below is the attack function.
- DESC: Begins a countdown, at the end of which the user must be in the air and moving backwards. If they aren't, they are made to sit
- and execute a 55 DMG basic melee. If they are, they have increased speed while executing a 110 DMG basic melee.
- --]]
- local function Use(...)
- local TweenService = game:GetService("TweenService")
- local DamageService = require(game:GetService("ServerScriptService").Libraries.DamageService)
- local args = {...}
- local char = args[1].Character
- local torso = char.Torso
- local hum = char.Humanoid
- local damageMulti = math.random(1, 10) == 1 and 2 or 1
- -- Display
- local stopper = Instance.new("Part")
- stopper.CFrame, stopper.CanCollide, stopper.Anchored, stopper.Transparency =
- torso.CFrame, false, true, 1
- stopper.Parent = workspace
- local billboard = Instance.new("BillboardGui")
- billboard.Adornee, billboard.MaxDistance, billboard.Size, billboard.StudsOffsetWorldSpace =
- stopper, 150, UDim2.new(0, 300, 0, 200), Vector3.new(0, 0, -4)
- local text = Instance.new("TextLabel")
- text.BackgroundTransparency, text.Size, text.FontFace, text.RichText, text.TextSize =
- 1, UDim2.new(1, 0, 1, 0), Font.fromName("HighwayGothic"), true, 40
- text.Parent = billboard
- billboard.Parent = stopper
- -- Jump detection
- if hum:GetState() == Enum.HumanoidStateType.Freefall then
- text.TextColor3 = Color3.new(1, 0.6, 0.6)
- local aoe = Instance.new("Part")
- aoe.Material, aoe.Anchored, aoe.CanCollide, aoe.CFrame, aoe.Color, aoe.Transparency, aoe.Size =
- "SmoothPlastic", true, false, torso.CFrame, aoeColor, aoeStartTrans, aoeStartSize
- aoe.Parent = workspace
- local SizeMod = TweenService:Create(aoe, TweenInfo.new(3.7, Enum.EasingStyle.Quint), {Size = aoeEndSize, Transparency = 1})
- SizeMod.Completed:Connect(function() aoe:Destroy() end)
- SizeMod:Play()
- DamageService:RegisterRangeDamage(args[1], radius, aoeDMG*damageMulti)
- text.Text = "<i><b>"..successMSG[math.random(1, #successMSG)].."</b></i>"
- else
- text.TextColor3 = Color3.new(0.3, 0.4, 0.4)
- text.Text = "<i><b>Miss...</b></i>"
- local text2 = Instance.new("TextLabel")
- text2.BackgroundTransparency, text2.Size, text2.FontFace, text2.RichText, text2.TextSize, text2.TextYAlignment, text2.TextColor3 =
- 1, UDim2.new(1, 0, 1, 0), Font.fromName("HighwayGothic"), true, 20, Enum.TextYAlignment.Top, Color3.new(0.3, 0.4, 0.4)
- text2.Text = "<i>(Jump and attack!)</i>"
- text2.Parent = billboard
- end
- -- Part creation
- local inner = Instance.new("Part")
- inner.Color, inner.Size, inner.Transparency, inner.Material, inner.Massless, inner.CanCollide, inner.CFrame =
- inColor, inSize, inTrans, inMaterial, true, false, torso.CFrame
- inner.Parent = workspace
- local outer = Instance.new("Part")
- outer.Color, outer.Size, outer.Transparency, outer.Material, outer.Massless, outer.CanCollide, outer.CFrame =
- outColor, outSize, outTrans, outMaterial, true, false, torso.CFrame
- outer.Parent = workspace
- local oplib = require(game.ServerScriptService.Libraries.Optimalization)
- oplib(outer)
- local weld = Instance.new("Weld")
- weld.Part0, weld.Part1 =
- torso, inner
- weld.Parent = inner
- weld = Instance.new("Weld")
- weld.Part0, weld.Part1 =
- torso, outer
- weld.Parent = outer
- -- Speed and DMG
- local Stats = require(game:GetService("ServerScriptService").Stats)
- local myLevel = Stats.GetStat(args[1], char.BaseStat.Value)
- local mySpeed = char.BaseSpeed
- coroutine.wrap(function()
- for i = 0, lifetime * 10 do
- hum.WalkSpeed = mySpeed.Value*2 * (myLevel*0.0025 + 0.25)
- task.wait(0.1)
- end
- hum.WalkSpeed = mySpeed.Value * (myLevel*0.0025 + 0.25)
- end)()
- local Debris = game:GetService("Debris")
- local DamageMod = require(game:GetService("ServerScriptService").Libraries.DamageService)
- DamageMod:RegisterWeaponPart(args[1], {inner, outer}, meleeDMG*damageMulti)
- Debris:AddItem(inner, lifetime)
- Debris:AddItem(outer, lifetime)
- Debris:AddItem(stopper, 5)
- end
- return Use
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement