Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- EASE OF ACCESS SETTINGS
- local inColor = Color3.new(0.45, 0.65, 0.9)
- local outColor = Color3.new(0.75, 1, 1)
- local inTrans = 0.3
- local outTrans = 0.5
- local inSize = Vector3.new(4, 4, 4)
- local outSize = Vector3.new(7, 7, 7)
- local inMaterial = "Ice"
- local outMaterial = "Ice"
- local baseDamage = 20
- local lifetime = 2
- local foo = task
- --[[
- Below is the attack function.
- DESC: Kicks 3 times. First kick: 20 DMG melee for 2s. Second kick: only happens if first kick landed, SSneak speed 40 DMG melee for 1s. Third
- kick: only happens if second kick landed, SSneak speed 60 DMG melee for 1s. If you hit, next kick starts in 0.3s; if you miss, you're made to sit.
- --]]
- local function Use(...)
- local args = {...}
- local char = args[1].Character
- local torso = char.Torso
- local hum = char.Humanoid
- local Stats = require(game:GetService("ServerScriptService").Stats)
- local DamageMod = require(game:GetService("ServerScriptService").Libraries.DamageService)
- local myLevel = Stats.GetStat(args[1], char.BaseStat.Value)
- local mySpeed = char.BaseSpeed
- for i = 1, 3 do
- local damage = math.random(1, 20) == 1 and baseDamage*2 or baseDamage -- reduced crit (the move is already kinda toxic)
- damage*=i
- -- Part creation and some variables
- 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
- local speedMulti = 0
- local lifeTemp = 0
- if i == 1 then
- speedMulti = 2 * (myLevel*0.0025 + 0.25)
- lifeTemp = lifetime
- else
- speedMulti = 2 * (myLevel*0.0035 + 0.25)
- lifeTemp = lifetime/2
- end
- -- Speed and DMG
- local finish = tick() + lifeTemp
- local hit = false
- DamageMod:RegisterWeaponPart(args[1], {inner, outer}, damage, function() hit = true end)
- repeat
- hum.WalkSpeed = mySpeed.Value*speedMulti
- foo.wait(0.05)
- until hit or tick()>=finish
- if hit then
- local finish2 = tick() + 0.3
- repeat
- hum.WalkSpeed = mySpeed.Value*speedMulti
- foo.wait(0.05)
- until tick()>=finish or tick()>=finish2
- end
- inner:Destroy()
- outer:Destroy()
- hum.WalkSpeed = mySpeed.Value*speedMulti/2
- foo.wait(0.1)
- if not hit then hum.Sit = true break end
- end
- end
- return Use
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement