Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- EASE OF ACCESS SETTINGS
- local inColor = Color3.new(0.6, 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(6, 6, 6)
- local outSize = Vector3.new(7, 7, 7)
- local inMaterial = "SmoothPlastic"
- local outMaterial = "SmoothPlastic"
- local baseDamage = 60
- local lifetime = 2
- local foo = task
- --[[
- Below is the attack function.
- DESC: Basic melee.
- --]]
- local function Use(...)
- local args = {...}
- local char = args[1].Character
- local torso = char.Torso
- local damage = math.random(1, 10) == 1 and baseDamage*2 or baseDamage
- -- 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 hum = char.Humanoid
- 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)
- foo.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}, damage)
- Debris:AddItem(inner, lifetime)
- Debris:AddItem(outer, lifetime)
- end
- return Use
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement