I’m not entirely sure about the curve and the acceleration, I just made right now cause it looked amazing, I might continue it.
local TweenService = game:GetService("TweenService")
local Debris = game:GetService("Debris")
local BulletAcceleration = 0 -- Not in use
local BulletSpeed = 4
local BulletCurve = 0 -- Not in use
local FireRate = 4
local Origin = script.Parent
local _Downtime = false
local function CreateBullet(LookVector: Vector3)
local BodyVelocity = Instance.new("BodyVelocity")
local Bullet = Instance.new("Part")
BodyVelocity.Parent = Bullet
BodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
BodyVelocity.Velocity = LookVector * (BulletSpeed * 10)
Bullet.Size = Vector3.new(0.5, 0.5, 2.5)
Bullet.Material = Enum.Material.Neon
Bullet.BrickColor = BrickColor.Red()
Bullet.CFrame = CFrame.new(Origin.Position, LookVector + Origin.Position)
Bullet.Parent = workspace
Bullet.CanCollide = false
Debris:AddItem(Bullet, 10)
return Bullet
end
local function Fire()
coroutine.wrap(CreateBullet)(Origin.CFrame.LookVector)
coroutine.wrap(CreateBullet)(-Origin.CFrame.LookVector)
end
local function WaitForTween(Tween: Tween)
if Tween.PlaybackState == Enum.PlaybackState.Playing then
Tween.Completed:Wait()
end
end
local function Rotate(Radians)
local Tween = TweenService:Create(Origin, TweenInfo.new(0), {
CFrame = CFrame.new(Origin.Position) * CFrame.Angles(0, Radians, 0)
})
Tween:Play()
WaitForTween(Tween)
end
while true do
for Degrees = 1, 360, 4 do
task.spawn(function()
if not _Downtime then
_Downtime = true
Fire()
task.wait(FireRate / 50)
_Downtime = false
end
end)
Rotate(math.rad(Degrees))
end
end