Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- EASE OF ACCESS SETTINGS
- local color = Color3.new(0.6, 1, 1)
- local trans = 0.8
- local size = Vector3.new(14, 14, 14)
- local material = "Neon"
- local lifetime = 5
- local baseDamage = 70
- --[[
- Below is the attack function.
- DESC: Basic projectile.
- --]]
- local function Use(...)
- local args = {...}
- local damage = math.random(1, 10) == 1 and baseDamage*2 or baseDamage
- -- Projectile itself
- local part = Instance.new("Part")
- part.Color, part.Transparency, part.Size, part.Material, part.CanCollide, part.CFrame =
- color, trans, size, material, false, args[1].Character.Torso.CFrame * CFrame.new(Vector3.new(0, 0, -7))
- part.Parent = workspace
- local sparkles = Instance.new("Sparkles")
- sparkles.SparkleColor, sparkles.Enabled =
- Color3.new(0.6, 1, 1)
- sparkles.Parent = part
- local light = Instance.new("PointLight")
- light.Brightness, light.Range, light.Color, light.Enabled, light.Shadows =
- 8, 8, Color3.new(0.2, 0.6, 0.7), true, false
- light.Parent = part
- -- Movement shenans and damage
- local att0 = Instance.new("Attachment", part)
- local bv = Instance.new("LinearVelocity")
- bv.Attachment0, bv.MaxForce, bv.VectorVelocity =
- att0, math.huge, args[3]
- bv.Parent = part
- local bg = Instance.new("AlignOrientation", part)
- local sub = Instance.new("Part")
- local att1 = Instance.new("Attachment", sub)
- sub.CanCollide, sub.Anchored, sub.Transparency =
- false, true, 1
- sub.Parent = workspace
- bg.Attachment0, bg.Attachment1, bg.Mode, bg.MaxTorque =
- att0, att1, Enum.OrientationAlignmentMode.TwoAttachment, math.huge
- local DamageMod = require(game.ServerScriptService.Libraries.DamageService)
- DamageMod:RegisterWeaponPart(args[1], {part}, damage)
- game:GetService("Debris"):AddItem(part, lifetime)
- game:GetService("Debris"):AddItem(sub, lifetime)
- end
- return Use
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement