-- References
--local standardBulletModel = game:GetService("ReplicatedStorage").Projectiles.Standard


setmetatable(weaponTemplate, weaponBase)

function weaponTemplate.new(isClient, weaponModel, weaponType, projectileModel, isAutomatic, fireRate, miniGunSpoolTime, coneSpread)
	local newWeapon = weaponBase.new(isClient, weaponModel, weaponType, projectileModel, isAutomatic, fireRate, coneSpread)
	setmetatable(newWeapon, weaponTemplate)

	print(newWeapon.coneSpread)
	
	newWeapon.isFiring = false
	newWeapon.spoolTimer = timer.new(miniGunSpoolTime, function() newWeapon.isFiring = true  end, true)
	

	
	-- Send client weapon details so they can construct it on the client.
	if not isClient then
		currency = require(game:GetService("ServerScriptService").Managers.Currency)
		setClientWeaponContext_RE:FireClient(newWeapon.ownerPlayer, newWeapon)
		newWeapon.rewardTimer = timer.new(1, function() currency.AddPower(newWeapon.ownerPlayer.UserId,5) end, newWeapon.isAutomatic)
	end
	
	return newWeapon
end

